diff --git a/upload/admin/api/api_core.php b/upload/admin/api/api_core.php index 54739873..6857d239 100644 --- a/upload/admin/api/api_core.php +++ b/upload/admin/api/api_core.php @@ -1,17 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * API: Core - * Last Updated: $Date: 2009-05-11 17:39:45 -0400 (Mon, 11 May 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * - * @author $Author: josh $ + * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board - * @link http://www.iinvisionpower.com - * @version $Rev: 4628 $ + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @link http://www.invisionpower.com + * @version $Rev: 5713 $ */ class apiCore diff --git a/upload/admin/api/blog/api_blog.php b/upload/admin/api/blog/api_blog.php index bbbd804d..92f6d7e0 100644 --- a/upload/admin/api/blog/api_blog.php +++ b/upload/admin/api/blog/api_blog.php @@ -1,194 +1,212 @@ -init(); - - if( ! ipsRegistry::isClassLoaded( 'blogFunctions' ) ) - { - /* Load the Blog functions library */ - require_once( IPSLib::getAppDir( 'blog' ) . '/sources/classes/blogFunctions.php' ); - $this->registry->setClass( 'blogFunctions', new blogFunctions( $this->registry ) ); - } - } - - /** - * Retrieve the Blog ID of a member - * THIS IS DEPRECATED - use fetchBlogIds - * - * @param int Member ID - * @return int Blog ID ( 0 if no Blog found ) - */ - public function getBlogID( $member_id=0 ) - { - $member_id = intval( $member_id ); - - //----------------------------------------- - // We entered here on member id, find blog_id and redirect them to here - //----------------------------------------- - $blog = $this->DB->buildAndFetch( array( - 'select' => 'blog_id, blog_name', - 'from' => 'blog_blogs', - 'where' => "member_id={$member_id}" - ) ); - if( ! $blog['blog_id'] or ! $blog['blog_name'] ) - { - return 0; - } - else - { - return $blog['blog_id']; - } - } - - /** - * Retrieve blog IDs this member can author in - * - * @access public - * @param int Member ID - * @return array array of ids with basic information, like: array( blog_id => array( 'blog_name', 'blog_seo_name' ) - */ - public function fetchBlogIds( $member_id=0 ) - { - $return = array(); - $member_id = intval( $member_id ); - $data = $this->registry->getClass('blogFunctions')->fetchMyBlogs( IPSMember::load( $member_id ) ); - - if ( is_array( $data ) AND count( $data ) ) - { - foreach( $data as $id => $blog ) - { - if ( $blog['_canPostIn'] ) - { - $return[ $id ] = $blog; - } - } - } - - return $return; - } - - /** - * Retrieve the Blog ID of a member - * - * @param int Blog ID - * @return string Blog URL - */ - public function getBlogUrl( $blog_id=0 ) - { - $blog_id = intval( $blog_id ); - - //----------------------------------------- - // We entered here on member id, find blog_id and redirect them to here - //----------------------------------------- - $blog = $this->DB->buildAndFetch( array ( - 'select' => 'blog_id, blog_name, blog_seo_name', - 'from' => 'blog_blogs', - 'where' => "blog_id={$blog_id}" - ) ); - if( ! $blog['blog_id'] or ! $blog['blog_name'] ) - { - return ''; - } - else - { - return $this->registry->output->buildSEOUrl( 'app=blog&blogid=' . $blog_id, 'public', $blog['blog_seo_name'], 'showblog' ); - } - } - - /** - * Retrieve the last x entries of a Blog - * Only public publishes entries are returned - * - * @param string Either 'member' or 'blog' - * @param int Blog ID or Member ID - * @param int Number of entries (to return) - * @return array Array of last X entries - */ - public function lastXEntries( $type, $id, $number_of_entries=10 ) - { - /* INIT */ - $id = intval( $id ); - $return_array = array(); - $extra = ""; - $allowguests = ""; - - /* Build permissions */ - $this->registry->blogFunctions->buildPerms(); - - /* Got permission to view blog entries? */ - if ( $this->memberData['g_blog_settings']['g_blog_allowview'] ) - { - /* Private club? */ - if( ! $this->memberData['member_id'] ) - { - $allowguests .= " AND b.blog_allowguests = 1"; - } - - if( ! $this->memberData['_blogmod']['moderate_can_view_private'] ) - { - $extra = " AND ( ( ( b.blog_owner_only=1 AND b.member_id={$this->memberData['member_id']} ) OR b.blog_owner_only=0 ) AND ( b.blog_authorized_users LIKE '%,{$this->memberData['member_id']},%' OR b.blog_authorized_users IS NULL ) ) "; - } - - $qtype = $type == 'member' ? "b.member_id={$id}" : "b.blog_id={$id}"; - - $this->DB->build( array( 'select' => "e.*", - 'from' => array('blog_entries' => 'e'), - 'where' => "{$qtype} AND b.blog_type='local' AND e.entry_status='published'".$allowguests.$extra, - 'order' => 'e.entry_date DESC', - 'limit' => array( 0, intval( $number_of_entries ) ), - 'add_join' => array( array( 'select' => 'b.blog_name, b.blog_seo_name', - 'from' => array( 'blog_blogs' => 'b' ), - 'where' => "e.blog_id=b.blog_id", - 'type' => 'left' ) ) ) ); - - $outer = $this->DB->execute(); - - while( $entry = $this->DB->fetch($outer) ) - { - $entry['blog_url'] = $this->registry->blogFunctions->getBlogUrl( $entry['blog_id'] ); - $entry['entry_url'] = $entry['blog_url'] . 'showentry='.$entry['entry_id']; - - $return_array[] = $entry; - } - return $return_array; - } - else - { - return array(); - } - } - -} - + + * Invision Power Services + * IP.Board v3.1.4 + * Blog API file + * Last Updated: $Date: 2010-10-22 14:06:33 -0400 (Fri, 22 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Blog + * @link http://www.invisionpower.com + * @version $Rev: 7018 $ + * @since 2.2.0 + * + */ + +if ( ! class_exists( 'apiCore' ) ) +{ + require_once( IPS_ROOT_PATH . 'api/api_core.php' ); +} + +/** + * apiBlog class + * @package IP.Blog + */ +class apiBlog extends apiCore +{ + /** + * Constructor. Calls parent init() method + * + * @access public + * @return void + */ + public function __construct() + { + $this->init(); + + if( ! ipsRegistry::isClassLoaded( 'blogFunctions' ) ) + { + /* Load the Blog functions library */ + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'blog' ) . '/sources/classes/blogFunctions.php', 'blogFunctions', 'blog' ); + $this->registry->setClass( 'blogFunctions', new $classToLoad( $this->registry ) ); + } + } + + /** + * Retrieve the Blog ID of a member + * THIS IS DEPRECATED - use fetchBlogIds + * + * @param int Member ID + * @return int Blog ID ( 0 if no Blog found ) + */ + public function getBlogID( $member_id=0 ) + { + $member_id = intval( $member_id ); + + //----------------------------------------- + // We entered here on member id, find blog_id and redirect them to here + //----------------------------------------- + $blog = $this->DB->buildAndFetch( array( + 'select' => 'blog_id, blog_name', + 'from' => 'blog_blogs', + 'where' => "member_id={$member_id}" + ) ); + if( ! $blog['blog_id'] or ! $blog['blog_name'] ) + { + return 0; + } + else + { + return $blog['blog_id']; + } + } + + /** + * Retrieve blog IDs this member can author in + * + * @access public + * @param int Member ID + * @return array array of ids with basic information, like: array( blog_id => array( 'blog_name', 'blog_seo_name' ) + */ + public function fetchBlogIds( $member_id=0 ) + { + $return = array(); + $member_id = intval( $member_id ); + $data = $this->registry->getClass('blogFunctions')->fetchMyBlogs( IPSMember::load( $member_id ) ); + + if ( is_array( $data ) AND count( $data ) ) + { + foreach( $data as $id => $blog ) + { + if ( $blog['_canPostIn'] ) + { + $return[ $id ] = $blog; + } + } + } + + return $return; + } + + /** + * Retrieve the Blog ID of a member + * + * @param int Blog ID + * @return string Blog URL + */ + public function getBlogUrl( $blog_id=0 ) + { + $blog_id = intval( $blog_id ); + + //----------------------------------------- + // We entered here on member id, find blog_id and redirect them to here + //----------------------------------------- + $blog = $this->DB->buildAndFetch( array ( + 'select' => 'blog_id, blog_name, blog_seo_name', + 'from' => 'blog_blogs', + 'where' => "blog_id={$blog_id}" + ) ); + if( ! $blog['blog_id'] or ! $blog['blog_name'] ) + { + return ''; + } + else + { + return $this->registry->output->buildSEOUrl( 'app=blog&blogid=' . $blog_id, 'public', $blog['blog_seo_name'], 'showblog' ); + } + } + + /** + * Retrieve the last x entries of a Blog + * Only public publishes entries are returned + * + * @param string Either 'member' or 'blog' + * @param int Blog ID or Member ID + * @param int Number of entries (to return) + * @return array Array of last X entries + */ + public function lastXEntries( $type, $id, $number_of_entries=10 ) + { + /* INIT */ + $id = intval( $id ); + $return_array = array(); + $where = array(); + + /* Build permissions */ + $modData = $this->registry->blogFunctions->buildPerms(); + + /* Got permission to view blog entries? */ + if ( $this->memberData['g_blog_settings']['g_blog_allowview'] ) + { + $this->DB->build( array( 'select' => "e.*, b.*", + 'from' => array('blog_entries' => 'e'), + 'where' => ( $type == 'member' ? "b.member_id={$id}" : "b.blog_id={$id}" ) . " AND b.blog_type='local' AND e.entry_status='published'", + 'order' => 'e.entry_date DESC', + 'limit' => array( 0, intval( $number_of_entries ) ), + 'add_join' => array( array( 'select' => 'b.blog_name, b.blog_seo_name', + 'from' => array( 'blog_blogs' => 'b' ), + 'where' => "e.blog_id=b.blog_id", + 'type' => 'left' ) ) ) ); + + $outer = $this->DB->execute(); + + while( $entry = $this->DB->fetch($outer) ) + { + if ( !$this->memberData['member_id'] or !$modData['_blogmod']['moderate_can_view_private'] ) + { + switch ( $entry['blog_view_level'] ) + { + case 'public': + if ( !$this->memberData['member_id'] and !$entry['blog_allowguests'] ) + { + continue 2; + } + break; + + case 'private': + if ( !$this->memberData['member_id'] or $this->memberData['member_id'] != $entry['member_id'] ) + { + continue 2; + } + break; + + case 'privateclub': + if ( !$this->memberData['member_id'] or !in_array( $this->memberData['member_id'], explode( ',', $entry['blog_authorized_users'] ) ) ) + { + continue 2; + } + break; + } + } + + $entry['blog_url'] = $this->registry->blogFunctions->getBlogUrl( $entry['blog_id'] ); + $entry['entry_url'] = $entry['blog_url'] . 'showentry='.$entry['entry_id']; + + $return_array[] = $entry; + } + return $return_array; + } + else + { + return array(); + } + } + +} + ?> \ No newline at end of file diff --git a/upload/admin/api/blog/index.html b/upload/admin/api/blog/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/api/blog/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/api/forums/api_topic_view.php b/upload/admin/api/forums/api_topic_view.php index 0d788a68..9fdda218 100644 --- a/upload/admin/api/forums/api_topic_view.php +++ b/upload/admin/api/forums/api_topic_view.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Forums topic view API file - * Last Updated: $Date: 2009-02-04 15:03:59 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $Date: 2010-10-25 11:20:47 -0400 (Mon, 25 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Rev: 3887 $ + * @link http://www.invisionpower.com + * @version $Rev: 7036 $ * @since 2.2.0 * */ @@ -22,6 +24,11 @@ if ( ! class_exists( 'apiCore' ) ) require_once( IPS_ROOT_PATH . 'api/api_core.php' ); } +/** + * apiTopicView class + * @package IP.Board + * @subpackage Forums + */ class apiTopicView extends apiCore { /** @@ -58,8 +65,8 @@ class apiTopicView extends apiCore // Get some classes //----------------------------------------- - require_once( IPSLib::getAppDir( 'forums' ) . '/app_class_forums.php' ); - $appClass = new app_class_forums( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/app_class_forums.php', 'app_class_forums', 'forums' ); + $appClass = new $classToLoad( $this->registry ); } /** @@ -186,7 +193,7 @@ class apiTopicView extends apiCore 'where' => "attach_rel_module='post' AND attach_rel_id IN (" . implode( ",", $this->attach_pids ) . ")" ) ); - $this->DB->execute; + $this->DB->execute(); while ( $a = $this->DB->fetch() ) { diff --git a/upload/admin/api/forums/index.html b/upload/admin/api/forums/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/api/forums/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/api/gallery/api_gallery.php b/upload/admin/api/gallery/api_gallery.php index 2f668a88..5bde56d1 100644 --- a/upload/admin/api/gallery/api_gallery.php +++ b/upload/admin/api/gallery/api_gallery.php @@ -1,18 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Gallery API file - * Last Updated: $Date: 2009-11-11 11:00:08 -0500 (Wed, 11 Nov 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * - * @author $Author: josh $ + * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board - * @subpackage IP.Gallery - * @link http://www.iinvisionpower.com - * @version $Rev: 5351 $ + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Gallery + * @link http://www.invisionpower.com + * @version $Rev: 5713 $ * @since 2.2.0 * */ @@ -22,6 +23,10 @@ if ( ! class_exists( 'apiCore' ) ) require_once( IPS_ROOT_PATH . 'api/api_core.php' ); } +/** + * apiGallery class + * @package IP.Gallery + */ class apiGallery extends apiCore { /** diff --git a/upload/admin/api/gallery/index.html b/upload/admin/api/gallery/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/api/gallery/index.html +++ b/upload/admin/api/gallery/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/api/index.html b/upload/admin/api/index.html index 9ef89742..dfdb4ca9 100644 --- a/upload/admin/api/index.html +++ b/upload/admin/api/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/admin/index.html b/upload/admin/applications/core/extensions/admin/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/extensions/admin/index.html +++ b/upload/admin/applications/core/extensions/admin/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/admin/member_form.php b/upload/admin/applications/core/extensions/admin/member_form.php index 9bce9f44..b114cc7f 100644 --- a/upload/admin/applications/core/extensions/admin/member_form.php +++ b/upload/admin/applications/core/extensions/admin/member_form.php @@ -1,97 +1,99 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class admin_member_form__core implements admin_member_form -{ - /** - * Tab name - * This can be left blank and the application title will - * be used - * - * @access public - * @var string - */ - public $tab_name = ""; - - - /** - * Returns sidebar links for this tab - * You may return an empty array or FALSE to not have - * any links show in the sidebar for this block. - * - * The links must have 'section=xxxxx&module=xxxxx[&do=xxxxxx]'. The rest of the URL - * is added automatically. - * - * The image must be a full URL or blank to use a default image. - * - * Use the format: - * $array[] = array( 'img' => '', 'url' => '', 'title' => '' ); - * - * @access public - * @author Matt Mecham - * @param array Member data - * @return array Array of links - */ - public function getSidebarLinks( $member=array() ) - { - $array = array(); - - if( $member['failed_login_count'] ) - { - $array[] = array( 'img' => '', - 'url' => "app=members&module=members&section=tools&do=do_locked&auth_key=".ipsRegistry::member()->form_hash."&mid_{$member['member_id']}=1&type=unlock", - 'title' => "Сбросить" ); - } - - return $array; - } - - /** - * Returns content for the page. - * - * @access public - * @author Matt Mecham - * @param array Member data - * @return array Array of tabs, content - */ - public function getDisplayContent( $member=array() ) - { - return array(); - } - - /** - * Process the entries for saving and return - * - * @access public - * @author Brandon Farber - * @return array Multi-dimensional array (core, extendedProfile) for saving - */ - public function getForSave() - { - return array( 'core' => array(), 'extendedProfile' => array() ); - } - - + + * Invision Power Services + * IP.Board v3.1.4 + * Member property updater (AJAX) + * Last Updated: $Date: 2010-01-15 14:28:09 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: josh $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 1st march 2002 + * @version $Revision: 5715 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class admin_member_form__core implements admin_member_form +{ + /** + * Tab name + * This can be left blank and the application title will + * be used + * + * @access public + * @var string + */ + public $tab_name = ""; + + + /** + * Returns sidebar links for this tab + * You may return an empty array or FALSE to not have + * any links show in the sidebar for this block. + * + * The links must have 'section=xxxxx&module=xxxxx[&do=xxxxxx]'. The rest of the URL + * is added automatically. + * + * The image must be a full URL or blank to use a default image. + * + * Use the format: + * $array[] = array( 'img' => '', 'url' => '', 'title' => '' ); + * + * @access public + * @author Matt Mecham + * @param array Member data + * @return array Array of links + */ + public function getSidebarLinks( $member=array() ) + { + $array = array(); + + if( $member['failed_login_count'] ) + { + $array[] = array( 'img' => '', + 'url' => "app=members&module=members&section=tools&do=do_locked&auth_key=".ipsRegistry::member()->form_hash."&mid_{$member['member_id']}=1&type=unlock", + 'title' => $this->lang->words['reset_failed_logins'] ); + } + + return $array; + } + + /** + * Returns content for the page. + * + * @access public + * @author Matt Mecham + * @param array Member data + * @return array Array of tabs, content + */ + public function getDisplayContent( $member=array(), $tabsUsed=5 ) + { + return array( 'tabs' => '', 'content' => '', 'tabsUsed' => 0 ); + } + + /** + * Process the entries for saving and return + * + * @access public + * @author Brandon Farber + * @return array Multi-dimensional array (core, extendedProfile) for saving + */ + public function getForSave() + { + return array( 'core' => array(), 'extendedProfile' => array() ); + } + + } \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/coreExtensions.php b/upload/admin/applications/core/extensions/coreExtensions.php index 3404fce6..bcd679eb 100644 --- a/upload/admin/applications/core/extensions/coreExtensions.php +++ b/upload/admin/applications/core/extensions/coreExtensions.php @@ -1,106 +1,108 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -/** -* Main loader class -*/ -class publicSessions__core -{ - /** - * Return session variables for this application - * - * current_appcomponent, current_module and current_section are automatically - * stored. This function allows you to add specific variables in. - * - * @access public - * @author Matt Mecham - * @return array - */ - public function getSessionVariables() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $array = array( 'location_1_type' => '', - 'location_1_id' => 0, - 'location_2_type' => '', - 'location_2_id' => 0 ); - - return $array; - } - - /** - * Parse/format the online list data for the records - * - * @access public - * @author Brandon Farber - * @param array Online list rows to check against - * @return array Online list rows parsed - */ - public function parseOnlineEntries( $rows ) - { - if( !is_array($rows) OR !count($rows) ) - { - return $rows; - } - - $final = array(); - - foreach( $rows as $row ) - { - if( $row['current_appcomponent'] == 'core' ) - { - if( $row['current_module'] == 'global' ) - { - if( $row['current_section'] == 'login' ) - { - $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_login']; - } - } - else if( $row['current_module'] == 'search' ) - { - $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_search']; - } - else if( $row['current_module'] == 'reports' ) - { - $rcCache = ipsRegistry::cache()->getCache('report_cache'); - - if( is_array( $rcCache ) ) - { - if( $rcCache['group_access'][ ipsRegistry::member()->getProperty('member_group_id') ] == true ) - { - $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_reports']; - } - } - } - } - - $final[ $row['id'] ] = $row; - } - - return $final; - } -} + + * Invision Power Services + * IP.Board v3.1.4 + * Core Sessions + * Last Updated: $Date: 2010-01-21 03:39:17 -0500 (Thu, 21 Jan 2010) $ + * + * + * @author $Author: matt $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 20th February 2002 + * @version $Rev: 5732 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +/** +* Main loader class +*/ +class publicSessions__core +{ + /** + * Return session variables for this application + * + * current_appcomponent, current_module and current_section are automatically + * stored. This function allows you to add specific variables in. + * + * @access public + * @author Matt Mecham + * @return array + */ + public function getSessionVariables() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $array = array( 'location_1_type' => '', + 'location_1_id' => 0, + 'location_2_type' => '', + 'location_2_id' => 0 ); + + return $array; + } + + /** + * Parse/format the online list data for the records + * + * @access public + * @author Brandon Farber + * @param array Online list rows to check against + * @return array Online list rows parsed + */ + public function parseOnlineEntries( $rows ) + { + if( !is_array($rows) OR !count($rows) ) + { + return $rows; + } + + $final = array(); + + foreach( $rows as $row ) + { + if( $row['current_appcomponent'] == 'core' ) + { + if( $row['current_module'] == 'global' ) + { + if( $row['current_section'] == 'login' ) + { + $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_login']; + } + } + else if( $row['current_module'] == 'search' ) + { + $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_search']; + } + else if( $row['current_module'] == 'reports' ) + { + $rcCache = ipsRegistry::cache()->getCache('report_cache'); + + if( is_array( $rcCache ) ) + { + if( $rcCache['group_access'][ ipsRegistry::member()->getProperty('member_group_id') ] == true ) + { + $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_reports']; + } + } + } + } + + $final[ $row['id'] ] = $row; + } + + return $final; + } +} diff --git a/upload/admin/applications/core/extensions/coreVariables.php b/upload/admin/applications/core/extensions/coreVariables.php index 00cdf15f..385701e8 100644 --- a/upload/admin/applications/core/extensions/coreVariables.php +++ b/upload/admin/applications/core/extensions/coreVariables.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Core registered caches, redirect resets and bitwise settings - * Last Updated: $Date: 2009-11-25 17:27:38 -0500 (Wed, 25 Nov 2009) $ + * Last Updated: $Date: 2010-09-15 19:24:12 -0400 (Wed, 15 Sep 2010) $ + * * - * @author $Author: josh $ + * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 5477 $ + * @version $Rev: 6882 $ * */ @@ -27,26 +29,30 @@ if ( ! defined( 'IN_IPB' ) ) */ $_LOAD = array(); -if ( $_GET['module'] == 'search' ) +if( isset($_GET['module']) ) { - $_LOAD['ranks'] = 1; - $_LOAD['bbcode'] = 1; - $_LOAD['emoticons'] = 1; - $_LOAD['reputation_levels'] = 1; -} - -if ( $_GET['module'] == 'reports' ) -{ - $_LOAD['ranks'] = 1; - $_LOAD['bbcode'] = 1; - $_LOAD['emoticons'] = 1; -} - -if( $_GET['module'] == 'usercp' ) -{ - $_LOAD['ranks'] = 1; - $_LOAD['reputation_levels'] = 1; - $_LOAD['emoticons'] = 1; + if ( $_GET['module'] == 'search' ) + { + $_LOAD['ranks'] = 1; + $_LOAD['bbcode'] = 1; + $_LOAD['emoticons'] = 1; + $_LOAD['reputation_levels'] = 1; + $_LOAD['attachtypes'] = 1; + } + + if ( $_GET['module'] == 'reports' ) + { + $_LOAD['ranks'] = 1; + $_LOAD['bbcode'] = 1; + $_LOAD['emoticons'] = 1; + } + + if( $_GET['module'] == 'usercp' ) + { + $_LOAD['ranks'] = 1; + $_LOAD['reputation_levels'] = 1; + $_LOAD['emoticons'] = 1; + } } diff --git a/upload/admin/applications/core/extensions/dashboardNotifications.php b/upload/admin/applications/core/extensions/dashboardNotifications.php new file mode 100644 index 00000000..b4177d44 --- /dev/null +++ b/upload/admin/applications/core/extensions/dashboardNotifications.php @@ -0,0 +1,197 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Dashboard Notifications + * Last Updated: $Date + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 6980 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

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 function __construct() + { + $this->settings = ipsRegistry::fetchSettings(); + $this->lang = ipsRegistry::getClass('class_localization'); + $this->caches =& ipsRegistry::cache()->fetchCaches(); + $this->cache = ipsRegistry::cache(); + } + + public function get() + { + /* INIT */ + $entries = array(); + + /* FURL cache OOD? */ + if ( file_exists( 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 ( file_exists( 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'] ) . "{$this->lang->words['rebuild_furl_cache']}" ); + break; + } + } + } + } + + /* Minify on but /cache/tmp not writeable? */ + if ( isset( $this->settings['_use_minify'] ) AND $this->settings['_use_minify'] ) + { + $entries[] = array( $this->lang->words['minifywrite_head'], $this->lang->words['minifynot_writeable'] ); + } + + /* Installer Check */ + if( @file_exists( IPS_ROOT_PATH . 'install/index.php' ) ) + { + if ( ! @file_exists( 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'] ); + } + } + else if( @is_dir( IPS_ROOT_PATH . 'applications_addon/ips/convert/' ) and !@file_exists( DOC_IPS_ROOT_PATH . 'cache/converter_lock.php' ) and $this->caches['app_cache']['convert'] ) + { + $this->lang->words['cp_warning_converter'] = sprintf( $this->lang->words['cp_warning_converter'], $this->settings['_base_url'] ); + $entries[] = array( $this->lang->words['cp_unlocked_converter'], $this->lang->words['cp_warning_converter'] ); + } + + /* Unfinished Upgrade */ + require_once( IPS_ROOT_PATH . '/setup/sources/base/setup.php' ); + $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 */ + if( PHP_VERSION < '5.1.0' ) + { + $entries[] = array( sprintf( $this->lang->words['cp_yourphpversion'], PHP_VERSION ), $this->lang->words['cp_php_warning'] ); + } + + /* Board Offline Check */ + if ( $this->settings['board_offline'] ) + { + $entries[] = array( $this->lang->words['cp_boardoffline'], "{$this->lang->words['cp_boardoffline1']}

{$this->lang->words['_raquo']} {$this->lang->words['cp_boardoffline2']}" ); + } + + /* 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']}

{$this->lang->words['_raquo']} {$this->lang->words['fulltext_find']}" ); + } + + /* 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 ( file_exists( 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; + } +} \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/editorSections.php b/upload/admin/applications/core/extensions/editorSections.php index 11fc4ee0..151ca348 100644 --- a/upload/admin/applications/core/extensions/editorSections.php +++ b/upload/admin/applications/core/extensions/editorSections.php @@ -1,33 +1,35 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -/* - * An array of key => value pairs - * When going to parse, the key should be passed to the editor - * to determine which bbcodes should be parsed in the section - * - */ -$BBCODE = array( - 'reports' => ipsRegistry::getClass('class_localization')->words['ctype__reports'], + + * Invision Power Services + * IP.Board v3.1.4 + * BBCode Management : Determines if bbcode can be used in this section + * Last Updated: $LastChangedDate: 2010-01-21 03:39:17 -0500 (Thu, 21 Jan 2010) $ + * + * + * @author $Author: matt $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 5732 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +/* + * An array of key => value pairs + * When going to parse, the key should be passed to the editor + * to determine which bbcodes should be parsed in the section + * + */ +$BBCODE = array( + 'reports' => ipsRegistry::getClass('class_localization')->words['ctype__reports'], ); \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/furlIdTemplates.php b/upload/admin/applications/core/extensions/furlIdTemplates.php new file mode 100644 index 00000000..fd282df3 --- /dev/null +++ b/upload/admin/applications/core/extensions/furlIdTemplates.php @@ -0,0 +1,70 @@ + + * Invision Power Services + * IP.Board v3.1.2 + * Sets up SEO templates + * Last Updated: $Date: 2010-07-01 18:13:46 -0400 (Thu, 01 Jul 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 20th February 2002 + * @version $Rev: 6596 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

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=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-#{__title__}/' ), + '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 + +); + \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/furlTemplates.php b/upload/admin/applications/core/extensions/furlTemplates.php index fabd9b18..510d709d 100644 --- a/upload/admin/applications/core/extensions/furlTemplates.php +++ b/upload/admin/applications/core/extensions/furlTemplates.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Sets up SEO templates - * Last Updated: $Date: 2009-03-04 15:08:31 +0000 (Wed, 04 Mar 2009) $ + * Last Updated: $Date: 2010-07-01 18:13:46 -0400 (Thu, 01 Jul 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4136 $ + * @version $Rev: 6596 $ * */ @@ -47,7 +49,7 @@ $_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", + 'in' => array( 'regex' => "#/register(/|$|\?)#i", 'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'register' ) ) ) ), 'section=rss' => array( 'app' => 'core', @@ -58,10 +60,11 @@ $_SEOTEMPLATES = array( 'section=rss2' => array( 'app' => 'core', 'allowRedirect' => 0, - 'out' => array( '#app=core(&|&)module=global(&|&)section=rss(&|&)type=(\w+?)(&|&)id=(\d+?)$#i', 'rss/$4/$6-#{__title__}/' ), - 'in' => array( 'regex' => "#/rss/(\w+?)/(\d+?)-#i", + 'out' => array( '#app=core(&|&)module=global(&|&)section=rss(&|&)type=(\w+?)(&|&)id=(\w+?)$#i', 'rss/$4/$6-#{__title__}/' ), + 'in' => array( 'regex' => "#/rss/(\w+?)/(\w+?)-#i", 'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'rss' ), array( 'type', '$1' ), array( 'id', '$2' ) ) ) ), - -#http://81.98.113.31/invisionboard3/index.php?app=core&module=global§ion=rss&type=forums&id=1 + +# Changed section=rss2 id matching to use \w for more flexibility + ); \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/index.html b/upload/admin/applications/core/extensions/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/extensions/index.html +++ b/upload/admin/applications/core/extensions/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/notifications.php b/upload/admin/applications/core/extensions/notifications.php new file mode 100644 index 00000000..a2e32dc2 --- /dev/null +++ b/upload/admin/applications/core/extensions/notifications.php @@ -0,0 +1,50 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Define the core notification types + * Last Updated: $Date: 2010-10-25 10:10:56 -0400 (Mon, 25 Oct 2010) $ + * + * + * @author $Author: mmecham $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 20th February 2002 + * @version $Rev: 7030 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + + + +class core_notifications +{ + public function getConfiguration() + { + /** + * Notification types - Needs to be a method so when require_once is used, $_NOTIFY isn't empty + */ + $_NOTIFY = array( + // Future... + // array( 'key' => 'reputation_received', 'default' => array( 'inline' ), 'disabled' => array() ), + array( 'key' => 'report_center', 'default' => array( 'email' ), 'disabled' => array(), 'show_callback' => TRUE , 'icon' => 'notify_reportcenter' ), + array( 'key' => 'new_comment' , 'default' => array( 'email' ), 'disabled' => array(), 'show_callback' => false, 'icon' => 'notify_profilecomment' ), + ); + return $_NOTIFY; + } + + public function report_center() + { + return $this->memberData['access_report_center']; + } +} \ No newline at end of file diff --git a/upload/admin/applications/core/sources/reportPlugins/default.php b/upload/admin/applications/core/extensions/reportPlugins/default.php similarity index 82% rename from upload/admin/applications/core/sources/reportPlugins/default.php rename to upload/admin/applications/core/extensions/reportPlugins/default.php index 9efb3767..a40c17dc 100644 --- a/upload/admin/applications/core/sources/reportPlugins/default.php +++ b/upload/admin/applications/core/extensions/reportPlugins/default.php @@ -1,498 +1,491 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class default_plugin -{ - /**#@+ - * Registry objects - * - * @access protected - * @var object - */ - protected $registry; - protected $DB; - protected $settings; - protected $request; - protected $lang; - protected $member; - protected $cache; - /**#@-*/ - - /** - * Holds extra data for the plugin - * - * @access private - * @var array Data specific to the plugin - */ - public $_extra; - - /** - * Constructor - * - * @access public - * @param object Registry object - * @return void - */ - public function __construct( ipsRegistry $registry ) - { - //----------------------------------------- - // 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->cache = $this->registry->cache(); - $this->caches =& $this->registry->cache()->fetchCaches(); - } - - /** - * Display the form for extra data in the ACP - * - * @access public - * @param array Plugin data - * @param object HTML object - * @return string HTML to add to the form - */ - public function displayAdminForm( $plugin_data, &$html ) - { - $req_input = ''; - $return = ''; - - if( is_array($plugin_data['required_input']) && count($plugin_data['required_input']) > 0 ) - { - foreach( $plugin_data['required_input'] as $key => $value ) - { - if( $req_input != '' ) - { - $req_input .= "\r\n"; - } - - $req_input .= $key . ' ' . $value; - } - } - - $return .= $html->addRow( "Название секции", - "Помогает определить модуль форума из которого была отправлена жалоба.", - $this->registry->output->formInput('section_title', $plugin_data['section_title']) - ); - - $return .= $html->addRow( "URL секции", - "Ссылка на секцию из которой пришла жалоба.", - $this->registry->output->formInput('section_url', $plugin_data['section_url']) - ); - - $desc = <<
Например:
-
content_id [^0-9]
title [^A-Za-z0-9]
-EOF; - - $return .= $html->addRow( "Формат полей", - $desc, - $this->registry->output->formTextarea('required_input', $req_input, 50, 9) - ); - - $return .= $html->addRow( "URL", - "Сслыка на саму публикацию. Если не указан 'http://' будет подставлен базовый URL форума. Можно использовать данные из входных параметров: {input_id}", - $this->registry->output->formInput('string_url', $plugin_data['string_url']) - ); - - $return .= $html->addRow( "Название", - "Название жалобы. Можно использовать данные из входных параметров: {input_id}. Можно использовать #PAGE_TITLE#", - $this->registry->output->formInput('string_title', $plugin_data['string_title']) - ); - - return $return; - } - - /** - * Process the plugin's form fields for saving - * - * @access public - * @param array Plugin data for save - * @return string Error message - */ - public function processAdminForm( &$save_data_array ) - { - if( ! $_POST['string_url'] ) - { - return "Поле 'URL' должно быть заполнено"; - } - - if( ! $_POST['string_title'] ) - { - return "Поле 'Название' должно быть заполнено. Не можете придумать - используйте #PAGE_TITLE#"; - } - - $req_in_a = array(); - - if( $_POST['required_input'] ) - { - $req_i = explode( "
", $this->request['required_input'] ); - - foreach( $req_i as $line ) - { - $line_inp = explode( ' ', $line, 2 ); - $req_in_a[ $line_inp[0] ] = $line_inp[1]; - } - } - - $save_data_array['required_input'] = $req_in_a; - $save_data_array['string_url'] = str_replace("&", "&", $this->request['string_url']); - $save_data_array['string_title'] = $this->request['string_title']; - $save_data_array['section_title'] = $this->request['section_title']; - $save_data_array['section_url'] = $this->request['section_url']; - - return ''; - } - - /** - * Update timestamp for report - * - * @access public - * @param array New reports - * @param array New members cache - * @return boolean - */ - public function updateReportsTimestamp( $new_reports, &$new_members_cache ) - { - return true; - } - - /** - * Get report permissions - * - * @access public - * @param string Type of perms to check - * @param array Permissions data - * @param array group ids - * @param string Special permissions - * @return boolean - */ - public function getReportPermissions( $check, $com_dat, $group_ids, &$to_return ) - { - if( $this->_extra['report_bypass'] == 0 || $this->memberData['g_is_supmod'] == 1 ) - { - return true; - } - else - { - return false; - } - } - - /** - * Show the report form for this module - * - * @access public - * @param array Application data - * @return string HTML form information - */ - public function reportForm( $com_dat ) - { - $this->registry->output->setTitle( $this->lang->words['report_basic_title'] ); - $this->registry->output->addNavigation( $this->lang->words['report_basic_title'], '' ); - - $url = ''; - $title = ''; - $ex_form_data = array(); - - $this->processBasicForumData( $com_dat, $url, $title, $ex_form_data ); - - //----------------------------------------- - // Title, URL Extra Data (Array) - //----------------------------------------- - - return $this->registry->getClass('reportLibrary')->showReportForm( $title, $url, $ex_form_data ); - } - - /** - * Process the basic forum data - * - * @access public - * @param array Application data - * @param string URL - * @param string Title - * @param array Extra form data - * @return mixed Could show page error, or set $url, $title and $ex_form_data - */ - public function processBasicForumData( $com_dat, &$url, &$title, &$ex_form_data ) - { - //----------------------------------------- - // Process required input information - //----------------------------------------- - - if( is_array($this->_extra['required_input']) && count($this->_extra['required_input']) > 0 ) - { - foreach( $this->_extra['required_input'] as $key => $regex ) - { - if( ! $this->request[ $key ] || ( trim($regex) != '' && preg_match( "/{$regex}/" , $this->request[ $key ] ) ) ) - { - $this->registry->output->showError( 'reports_input_not_match', 10157 ); - } - else - { - $ex_form_data[ $key ] = $this->request[ $key ]; - } - } - } - - //----------------------------------------- - // Format URL String with inputs - //----------------------------------------- - - if( ! $this->_extra['string_url'] ) - { - $this->registry->output->showError( 'reports_input_not_match', 10158 ); - } - else - { - $url = $this->_extra['string_url']; - - while( preg_match("/\{([a-z0-9_\-]+)\}/i", $url, $matched) ) - { - $url = str_replace( '{' . $matched[1] . '}', $ex_form_data[$matched[1]], $url); - } - } - - if( strpos( $url, 'http://' ) !== 0 ) - { - $url = $this->settings['base_url'] . $url; - } - - //----------------------------------------- - // Format Title String with inputs, etc.. - //----------------------------------------- - - if( ! $this->_extra['string_title'] ) - { - $this->registry->output->showError( 'reports_input_not_match', 10159 ); - } - else - { - $title = $this->_extra['string_title']; - - while( preg_match("/\{([a-z0-9_\-]+)\}/i", $title, $matched) ) - { - $title = str_replace( '{' . $matched[1] . '}', $ex_form_data[$matched[1]], $title); - } - - if( strpos( $title, "#PAGE_TITLE#" ) !== false ) - { - $page_title = $this->_getPageTitle( $url ); - $title = str_replace( "#PAGE_TITLE#", $page_title, $title ); - } - } - - $this->registry->output->setTitle( $title ); - } - - /** - * Get section and link - * - * @access public - * @param array Report data - * @return array Section/link - */ - public function giveSectionLinkTitle( $report_row ) - { - return array( - 'title' => $this->_extra['section_title'], - 'url' => $this->_extra['section_url'], - ); - } - - /** - * Process a report and save the data appropriate - * - * @access public - * @param array Report data - * @return array Data from saving the report - */ - public function processReport( $com_dat ) - { - $this->processBasicForumData( $com_dat, $url, $title, $ex_form_data ); - - $return_data = array(); - $a_url = str_replace( "&", "&", $url ); - $uid = md5( $url . '_' . $com_dat['com_id'] ); - - $status = array(); - - $this->DB->build( array( 'select' => 'status, is_new, is_complete', - 'from' => 'rc_status', - 'where' => "is_new=1 OR is_complete=1", - ) ); - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - if( $row['is_new'] == 1 ) - { - $status['new'] = $row['status']; - } - elseif( $row['is_complete'] == 1 ) - { - $status['complete'] = $row['status']; - } - } - - $this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports_index', 'where' => "uid='{$uid}'" ) ); - $this->DB->execute(); - - if( $this->DB->getTotalRows() == 0 ) - { - $built_report_main = array( - 'uid' => $uid, - 'title' => $title, - 'status' => $status['new'], - 'url' => $a_url, - 'rc_class' => $com_dat['com_id'], - 'updated_by' => $this->memberData['member_id'], - 'date_updated' => time(), - 'date_created' => time(), - ); - - $this->DB->insert( 'rc_reports_index', $built_report_main ); - $rid = $this->DB->getInsertId(); - } - else - { - $the_report = $this->DB->fetch(); - $rid = $the_report['id']; - - $this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'] ), "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'; - - $build_report = array( - 'rid' => $rid, - 'report' => IPSText::getTextClass('bbcode')->preDbParse( $this->request['message'] ), - 'report_by' => $this->memberData['member_id'], - 'date_reported' => time(), - ); - - $this->DB->insert( 'rc_reports', $build_report ); - - $reports = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'rc_reports', 'where' => "rid='{$rid}'" ) ); - - $this->DB->update( 'rc_reports_index', array( 'num_reports' => $reports['total'] ), "id='{$rid}'" ); - - $return_data['REDIRECT_URL'] = $a_url; - $return_data['REPORT_INDEX'] = $rid; - $return_data['SAVED_URL'] = $url; - $return_data['REPORT'] = $build_report['report']; - - return $return_data; - } - - /** - * Where to send user after report is submitted - * - * @access public - * @param array Report data - * @return void - */ - public function reportRedirect( $report_data ) - { - $this->registry->output->redirectScreen( $this->lang->words['report_sending'], $this->settings['base_url'] . $report_data['REDIRECT_URL'] ); - } - - /** - * Loads an HTML page and grabs its title - * - * @access private - * @param string Web URL - * @return string - */ - private function _getPageTitle( $URL ) - { - $html_code = file_get_contents( $URL ); - - # I just hope the page is html... - if( preg_match("/\(.+?)\<\/title\>/i", $html_code, $match ) ) - { - return htmlentities( $match[1] ); - } - else - { - return $this->lang->words['report_page_title_unknown']; - } - } - - /** - * Retrieve list of users to send notifications to - * - * @access public - * @param string Group ids - * @param array Report data - * @return array Array of users to PM/Email - */ - public function getNotificationList( $group_ids, $report_data ) - { - $notify = array(); - - $this->DB->build( array( - 'select' => 'noti.*', - 'from' => array( 'rc_modpref' => 'noti' ), - 'where' => 'mem.member_group_id IN(' . $group_ids . ')', - 'add_join' => array( - array( - 'select' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id', - 'from' => array( 'members' => 'mem' ), - 'where' => 'mem.member_id=noti.mem_id', - ) - ) - ) ); - $this->DB->execute(); - - if( $this->DB->getTotalRows() > 0 ) - { - while( $row = $this->DB->fetch() ) - { - if( $row['by_pm'] == 1 ) - { - $notify['PM'][] = $row; - } - if( $row['by_email'] == 1 ) - { - $notify['EMAIL'][] = $row; - } - - $notify['RSS'][] = $row; - } - } - - return $notify; - } + + * Invision Power Services + * IP.Board v3.1.4 + * Report Center :: Default plugin + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @author Based on original "Report Center" by Luke Scott + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 5713 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class default_plugin +{ + /**#@+ + * Registry objects + * + * @access protected + * @var object + */ + protected $registry; + protected $DB; + protected $settings; + protected $request; + protected $lang; + protected $member; + protected $cache; + /**#@-*/ + + /** + * Holds extra data for the plugin + * + * @access private + * @var array Data specific to the plugin + */ + public $_extra; + + /** + * Constructor + * + * @access public + * @param object Registry object + * @return void + */ + public function __construct( ipsRegistry $registry ) + { + //----------------------------------------- + // 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->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + } + + /** + * Display the form for extra data in the ACP + * + * @access public + * @param array Plugin data + * @param object HTML object + * @return string HTML to add to the form + */ + public function displayAdminForm( $plugin_data, &$html ) + { + $req_input = ''; + $return = ''; + + if( is_array($plugin_data['required_input']) && count($plugin_data['required_input']) > 0 ) + { + foreach( $plugin_data['required_input'] as $key => $value ) + { + if( $req_input != '' ) + { + $req_input .= "\r\n"; + } + + $req_input .= $key . ' ' . $value; + } + } + + $return .= $html->addRow( "Section Title", + "This helps you distinguish generally what part of your site a report came from.", + $this->registry->output->formInput('section_title', $plugin_data['section_title']) + ); + + $return .= $html->addRow( "Section URL", + "This helps you distinguish generally what part of your site a report came from.", + $this->registry->output->formInput('section_url', $plugin_data['section_url']) + ); + + $desc = <<
Example:
+
content_id [^0-9]
title [^A-Za-z0-9]
+EOF; + + $return .= $html->addRow( "Required Input", + $desc, + $this->registry->output->formTextarea('required_input', $req_input, 50, 9) + ); + + $return .= $html->addRow( "URL String", + "The formatted URL that is used to point to the reported content. If the URL does not contain 'http://' the board's base url will be inserted. You may also include input data: {input_id}", + $this->registry->output->formInput('string_url', $plugin_data['string_url']) + ); + + $return .= $html->addRow( "Title String", + "The formatted title that is shown on the reporting page and when reports are listed. You may include input data: {input_id}. If you would like the report center to pull the page title, use #PAGE_TITLE#", + $this->registry->output->formInput('string_title', $plugin_data['string_title']) + ); + + return $return; + } + + /** + * Process the plugin's form fields for saving + * + * @access public + * @param array Plugin data for save + * @return string Error message + */ + public function processAdminForm( &$save_data_array ) + { + if( ! $_POST['string_url'] ) + { + return "You need to at least have the 'URL String'"; + } + + if( ! $_POST['string_title'] ) + { + return "You need to have a 'Title String'. If not sure, just use #PAGE_TITLE#"; + } + + $req_in_a = array(); + + if( $_POST['required_input'] ) + { + $req_i = explode( "
", $this->request['required_input'] ); + + foreach( $req_i as $line ) + { + $line_inp = explode( ' ', $line, 2 ); + $req_in_a[ $line_inp[0] ] = $line_inp[1]; + } + } + + $save_data_array['required_input'] = $req_in_a; + $save_data_array['string_url'] = str_replace("&", "&", $this->request['string_url']); + $save_data_array['string_title'] = $this->request['string_title']; + $save_data_array['section_title'] = $this->request['section_title']; + $save_data_array['section_url'] = $this->request['section_url']; + + return ''; + } + + /** + * Update timestamp for report + * + * @access public + * @param array New reports + * @param array New members cache + * @return boolean + */ + public function updateReportsTimestamp( $new_reports, &$new_members_cache ) + { + return true; + } + + /** + * Get report permissions + * + * @access public + * @param string Type of perms to check + * @param array Permissions data + * @param array group ids + * @param string Special permissions + * @return boolean + */ + public function getReportPermissions( $check, $com_dat, $group_ids, &$to_return ) + { + if( $this->_extra['report_bypass'] == 0 || $this->memberData['g_is_supmod'] == 1 ) + { + return true; + } + else + { + return false; + } + } + + /** + * Show the report form for this module + * + * @access public + * @param array Application data + * @return string HTML form information + */ + public function reportForm( $com_dat ) + { + $this->registry->output->setTitle( $this->lang->words['report_basic_title'] ); + $this->registry->output->addNavigation( $this->lang->words['report_basic_title'], '' ); + + $url = ''; + $title = ''; + $ex_form_data = array(); + + $this->processBasicForumData( $com_dat, $url, $title, $ex_form_data ); + + //----------------------------------------- + // Title, URL Extra Data (Array) + //----------------------------------------- + + return $this->registry->getClass('reportLibrary')->showReportForm( $title, $url, $ex_form_data ); + } + + /** + * Process the basic forum data + * + * @access public + * @param array Application data + * @param string URL + * @param string Title + * @param array Extra form data + * @return mixed Could show page error, or set $url, $title and $ex_form_data + */ + public function processBasicForumData( $com_dat, &$url, &$title, &$ex_form_data ) + { + //----------------------------------------- + // Process required input information + //----------------------------------------- + + if( is_array($this->_extra['required_input']) && count($this->_extra['required_input']) > 0 ) + { + foreach( $this->_extra['required_input'] as $key => $regex ) + { + if( ! $this->request[ $key ] || ( trim($regex) != '' && preg_match( "/{$regex}/" , $this->request[ $key ] ) ) ) + { + $this->registry->output->showError( 'reports_input_not_match', 10157 ); + } + else + { + $ex_form_data[ $key ] = $this->request[ $key ]; + } + } + } + + //----------------------------------------- + // Format URL String with inputs + //----------------------------------------- + + if( ! $this->_extra['string_url'] ) + { + $this->registry->output->showError( 'reports_input_not_match', 10158 ); + } + else + { + $url = $this->_extra['string_url']; + + while( preg_match("/\{([a-z0-9_\-]+)\}/i", $url, $matched) ) + { + $url = str_replace( '{' . $matched[1] . '}', $ex_form_data[$matched[1]], $url); + } + } + + if( strpos( $url, 'http://' ) !== 0 ) + { + $url = $this->settings['base_url'] . $url; + } + + //----------------------------------------- + // Format Title String with inputs, etc.. + //----------------------------------------- + + if( ! $this->_extra['string_title'] ) + { + $this->registry->output->showError( 'reports_input_not_match', 10159 ); + } + else + { + $title = $this->_extra['string_title']; + + while( preg_match("/\{([a-z0-9_\-]+)\}/i", $title, $matched) ) + { + $title = str_replace( '{' . $matched[1] . '}', $ex_form_data[$matched[1]], $title); + } + + if( strpos( $title, "#PAGE_TITLE#" ) !== false ) + { + $page_title = $this->_getPageTitle( $url ); + $title = str_replace( "#PAGE_TITLE#", $page_title, $title ); + } + } + + $this->registry->output->setTitle( $title ); + } + + /** + * Get section and link + * + * @access public + * @param array Report data + * @return array Section/link + */ + public function giveSectionLinkTitle( $report_row ) + { + return array( + 'title' => $this->_extra['section_title'], + 'url' => $this->_extra['section_url'], + ); + } + + /** + * Process a report and save the data appropriate + * + * @access public + * @param array Report data + * @return array Data from saving the report + */ + public function processReport( $com_dat ) + { + $this->processBasicForumData( $com_dat, $url, $title, $ex_form_data ); + + $return_data = array(); + $a_url = str_replace( "&", "&", $url ); + $uid = md5( $url . '_' . $com_dat['com_id'] ); + + $status = array(); + + $this->DB->build( array( 'select' => 'status, is_new, is_complete', + 'from' => 'rc_status', + 'where' => "is_new=1 OR is_complete=1", + ) ); + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + if( $row['is_new'] == 1 ) + { + $status['new'] = $row['status']; + } + elseif( $row['is_complete'] == 1 ) + { + $status['complete'] = $row['status']; + } + } + + $this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports_index', 'where' => "uid='{$uid}'" ) ); + $this->DB->execute(); + + if( $this->DB->getTotalRows() == 0 ) + { + $built_report_main = array( + 'uid' => $uid, + 'title' => $title, + 'status' => $status['new'], + 'url' => $a_url, + 'rc_class' => $com_dat['com_id'], + 'updated_by' => $this->memberData['member_id'], + 'date_updated' => time(), + 'date_created' => time(), + ); + + $this->DB->insert( 'rc_reports_index', $built_report_main ); + $rid = $this->DB->getInsertId(); + } + else + { + $the_report = $this->DB->fetch(); + $rid = $the_report['id']; + + $this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'] ), "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'; + + $build_report = array( + 'rid' => $rid, + 'report' => IPSText::getTextClass('bbcode')->preDbParse( $this->request['message'] ), + 'report_by' => $this->memberData['member_id'], + 'date_reported' => time(), + ); + + $this->DB->insert( 'rc_reports', $build_report ); + + $reports = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'rc_reports', 'where' => "rid='{$rid}'" ) ); + + $this->DB->update( 'rc_reports_index', array( 'num_reports' => $reports['total'] ), "id='{$rid}'" ); + + $return_data['REDIRECT_URL'] = $a_url; + $return_data['REPORT_INDEX'] = $rid; + $return_data['SAVED_URL'] = $url; + $return_data['REPORT'] = $build_report['report']; + + return $return_data; + } + + /** + * Where to send user after report is submitted + * + * @access public + * @param array Report data + * @return void + */ + public function reportRedirect( $report_data ) + { + $this->registry->output->redirectScreen( $this->lang->words['report_sending'], $this->settings['base_url'] . $report_data['REDIRECT_URL'] ); + } + + /** + * Loads an HTML page and grabs its title + * + * @access private + * @param string Web URL + * @return string + */ + private function _getPageTitle( $URL ) + { + $html_code = file_get_contents( $URL ); + + # I just hope the page is html... + if( preg_match("/\(.+?)\<\/title\>/i", $html_code, $match ) ) + { + return htmlentities( $match[1] ); + } + else + { + return $this->lang->words['report_page_title_unknown']; + } + } + + /** + * Retrieve list of users to send notifications to + * + * @access public + * @param string Group ids + * @param array Report data + * @return array Array of users to PM/Email + */ + public function getNotificationList( $group_ids, $report_data ) + { + $notify = array(); + + $this->DB->build( array( + 'select' => 'noti.*', + 'from' => array( 'rc_modpref' => 'noti' ), + 'where' => 'mem.member_group_id IN(' . $group_ids . ')', + 'add_join' => array( + array( + 'select' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id', + 'from' => array( 'members' => 'mem' ), + 'where' => 'mem.member_id=noti.mem_id', + ) + ) + ) ); + $this->DB->execute(); + + if( $this->DB->getTotalRows() > 0 ) + { + while( $row = $this->DB->fetch() ) + { + $notify[] = $row; + } + } + + return $notify; + } } \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/reportPlugins/index.html b/upload/admin/applications/core/extensions/reportPlugins/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/core/extensions/reportPlugins/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/rssOutput.php b/upload/admin/applications/core/extensions/rssOutput.php index 89d502f5..9552b2af 100644 --- a/upload/admin/applications/core/extensions/rssOutput.php +++ b/upload/admin/applications/core/extensions/rssOutput.php @@ -1,119 +1,118 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class rss_output_core -{ - /** - * Expiration date - * - * @access private - * @var integer Expiration timestamp - */ - private $expires = 0; - - /** - * Grab the RSS links - * - * @access public - * @return array - */ - public function getRssLinks() - { - //----------------------------------------- - // As this is member specific, hardcoded - // into output library - //----------------------------------------- - - return array(); - } - - /** - * Grab the RSS document content and return it - * - * @access public - * @return string RSS document - */ - public function returnRSSDocument() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $member_id = intval( ipsRegistry::$request['member_id'] ); - $secure_key = IPSText::md5Clean( ipsRegistry::$request['rss_key'] ); - $rss_data = array(); - $to_print = ''; - - if( $secure_key and $member_id ) - { - if( $member_id == ipsRegistry::member()->getProperty('member_id') ) - { - //----------------------------------------- - // Get RSS export - //----------------------------------------- - - $rss_data = ipsRegistry::DB()->buildAndFetch( array( 'select' => 'rss_cache', - 'from' => 'rc_modpref', - 'where' => "mem_id=" . $member_id . " AND rss_key='" . $secure_key . "'" ) ); - - //----------------------------------------- - // Got one? - //----------------------------------------- - - if ( $rss_data['rss_cache'] ) - { - return $rss_data['rss_cache']; - } - } - - //----------------------------------------- - // Create a dummy one - //----------------------------------------- - - ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'public_reports' ), 'core' ); - - require_once( IPS_KERNEL_PATH . 'classRss.php' ); - $rss = new classRss(); - $channel_id = $rss->createNewChannel( array( 'title' => ipsRegistry::getClass('class_localization')->words['rss_feed_title'], - 'link' => ipsRegistry::$settings['board_url'], - 'description' => ipsRegistry::getClass('class_localization')->words['reports_rss_desc'], - 'pubDate' => $rss->formatDate( time() ) - ) ); - $rss->createRssDocument(); - - return $rss->rss_document; - } - } - - /** - * Grab the RSS document expiration timestamp - * - * @access public - * @return integer Expiration timestamp - */ - public function grabExpiryDate() - { - return time() + 3600; - } + + * Invision Power Services + * IP.Board v3.1.4 + * RSS output plugin :: report center + * Last Updated: $Date: 2010-10-14 13:15:13 -0400 (Thu, 14 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 6/24/2008 + * @version $Revision: 6980 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class rss_output_core +{ + /** + * Expiration date + * + * @var integer Expiration timestamp + */ + private $expires = 0; + + /** + * Grab the RSS links + * + * @return array + */ + public function getRssLinks() + { + //----------------------------------------- + // As this is member specific, hardcoded + // into output library + //----------------------------------------- + + return array(); + } + + /** + * Grab the RSS document content and return it + * + * @return string RSS document + */ + public function returnRSSDocument() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval( ipsRegistry::$request['member_id'] ); + $secure_key = IPSText::md5Clean( ipsRegistry::$request['rss_key'] ); + $rss_data = array(); + $to_print = ''; + + if( $secure_key and $member_id ) + { + if( $member_id == ipsRegistry::member()->getProperty('member_id') ) + { + //----------------------------------------- + // Get RSS export + //----------------------------------------- + + $rss_data = ipsRegistry::DB()->buildAndFetch( array( 'select' => 'rss_cache', + 'from' => 'rc_modpref', + 'where' => "mem_id=" . $member_id . " AND rss_key='" . $secure_key . "'" + ) ); + + //----------------------------------------- + // Got one? + //----------------------------------------- + + if ( $rss_data['rss_cache'] ) + { + return $rss_data['rss_cache']; + } + } + + //----------------------------------------- + // Create a dummy one + //----------------------------------------- + + ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'public_reports' ), 'core' ); + + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classRss.php', 'classRss' ); + $rss = new $classToLoad(); + + $channel_id = $rss->createNewChannel( array( 'title' => ipsRegistry::getClass('class_localization')->words['rss_feed_title'], + 'link' => ipsRegistry::$settings['board_url'], + 'description' => ipsRegistry::getClass('class_localization')->words['reports_rss_desc'], + 'pubDate' => $rss->formatDate( time() ) + ) ); + $rss->createRssDocument(); + + return $rss->rss_document; + } + } + + /** + * Grab the RSS document expiration timestamp + * + * @return integer Expiration timestamp + */ + public function grabExpiryDate() + { + return time() + 3600; + } } \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/search/config.php b/upload/admin/applications/core/extensions/search/config.php new file mode 100644 index 00000000..fea89127 --- /dev/null +++ b/upload/admin/applications/core/extensions/search/config.php @@ -0,0 +1,35 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Config file + * Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $ + * + * + * @author $author$ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 5855 $ + **/ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +/* Can search with this app */ +$CONFIG['can_search'] = 1; + +/* Can view new content with this app */ +$CONFIG['can_viewNewContent'] = 0; + +/* Can fetch active content with this app */ +$CONFIG['can_activeContent'] = 0; + +/* Can fetch user generated content */ +$CONFIG['can_userContent'] = 0; \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/search/engines/index.html b/upload/admin/applications/core/extensions/search/engines/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/core/extensions/search/engines/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/search/engines/sql.php b/upload/admin/applications/core/extensions/search/engines/sql.php new file mode 100644 index 00000000..20f5cfc8 --- /dev/null +++ b/upload/admin/applications/core/extensions/search/engines/sql.php @@ -0,0 +1,211 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Basic Forum Search + * Last Updated: $Date: 2010-02-23 12:38:11 +0000 (Tue, 23 Feb 2010) $ + * + * + * @author $Author: matt $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 5861 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class search_engine_core extends search_engine +{ + /** + * Constructor + */ + public function __construct( ipsRegistry $registry ) + { + parent::__construct( $registry ); + } + + /** + * Perform a search. + * Returns an array of a total count (total number of matches) + * and an array of IDs ( 0 => 1203, 1 => 928, 2 => 2938 ).. matching the required number based on pagination. The ids returned would be based on the filters and type of search + * + * So if we had 1000 replies, and we are on page 2 of 25 per page, we'd return 25 items offset by 25 + * + * @access public + * @return array + */ + public function search() + { + /* INIT */ + $count = 0; + $results = array(); + $sort_by = IPSSearchRegistry::get('in.search_sort_by'); + $sort_order = IPSSearchRegistry::get('in.search_sort_order'); + $search_term = IPSSearchRegistry::get('in.clean_search_term'); + $content_title_only = IPSSearchRegistry::get('opt.searchTitleOnly'); + $post_search_only = IPSSearchRegistry::get('opt.onlySearchPosts'); + $order_dir = ( $sort_order == 'asc' ) ? 'asc' : 'desc'; + $sortKey = ''; + $sortType = ''; + $rows = array(); + $got = 0; + + if ( IPSSearchRegistry::get('opt.noPostPreview') OR IPSSearchRegistry::get('display.onlyTitles') ) + { + $group_by = 'h.id'; + } + + /* Sorting */ + switch( $sort_by ) + { + default: + case 'date': + $sortKey = ( $content_title_only ) ? 'id' : 'id'; + $sortType = 'numerical'; + break; + case 'title': + $sortKey = 'title'; + $sortType = 'string'; + break; + } + + /* Query the count */ + $count = $this->DB->buildAndFetch( array('select' => 'COUNT(*) as total_results', + 'from' => array( 'faq' => 'h' ), + 'where' => $this->_buildWhereStatement( $search_term, $content_title_only ), + 'group' => $group_by, + 'add_join' => array( array( 'from' => array( 'permission_index' => 'i' ), + 'where' => "i.perm_type='help' AND i.perm_type_id=1", + 'type' => 'left' ) ) ) ); + + + + /* Fetch data */ + $this->DB->build( array( 'select' => 'h.*', + 'from' => array( 'faq' => 'h' ), + 'where' => $this->_buildWhereStatement( $search_term, $content_title_only ), + 'group' => $group_by, + 'order' => $sortKey . ' ' . $sort_order, + 'limit' => array( IPSSearchRegistry::get('in.start'), IPSSearchRegistry::get('opt.search_per_page') ), + 'add_join' => array( array( 'from' => array( 'permission_index' => 'i' ), + 'where' => "i.perm_type='help' AND i.perm_type_id=1", + 'type' => 'left' ) ) ) ); + + + + + + $this->DB->execute(); + + /* Sort */ + while ( $_row = $this->DB->fetch() ) + { + $rows[ $got ] = $_row; + + $got++; + } + + /* Return it */ + return array( 'count' => $count['total_results'], 'resultSet' => $rows ); + } + + /** + * Builds the where portion of a search string + * + * @access private + * @param string $search_term The string to use in the search + * @param bool $content_title_only Search only title records + * @return string + **/ + private function _buildWhereStatement( $search_term, $content_title_only=false ) + { + /* INI */ + $where_clause = array(); + + if( $search_term ) + { + if( $content_title_only ) + { + $where_clause[] = "h.title LIKE '%{$search_term}%'"; + } + else + { + $where_clause[] = "(h.title LIKE '%{$search_term}%' OR h.text LIKE '%{$search_term}%' OR h.description LIKE '%{$search_term}%')"; + } + } + + /* Add in AND where conditions */ + if( isset( $this->whereConditions['AND'] ) && count( $this->whereConditions['AND'] ) ) + { + $where_clause = array_merge( $where_clause, $this->whereConditions['AND'] ); + } + + /* ADD in OR where conditions */ + if( isset( $this->whereConditions['OR'] ) && count( $this->whereConditions['OR'] ) ) + { + $where_clause[] = '( ' . implode( ' OR ', $this->whereConditions['OR'] ) . ' )'; + } + + /* Permissions */ + $where_clause[] = $this->DB->buildRegexp( "i.perm_view", $this->member->perm_id_array ); + + /* Build and return the string */ + return implode( " AND ", $where_clause ); + } + + /** + * Remap standard columns (Apps can override ) + * + * @access public + * @param string $column sql table column for this condition + * @return string column + * @return void + */ + public function remapColumn( $column ) + { + if ( $column == 'member_id' ) + { + return ''; + } + + return $column; + } + + /** + * Returns an array used in the searchplugin's setCondition method + * + * @access public + * @param array $data Array of forums to view + * @return array Array with column, operator, and value keys, for use in the setCondition call + **/ + public function buildFilterSQL( $data ) + { + /* INIT */ + $return = array(); + + /* Set up some defaults */ + IPSSearchRegistry::set( 'opt.noPostPreview' , false ); + IPSSearchRegistry::set( 'opt.onlySearchPosts', false ); + + return array(); + } + + /** + * Can handle boolean searching + * + * @access public + * @return boolean + */ + public function isBoolean() + { + return false; + } +} \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/search/form.php b/upload/admin/applications/core/extensions/search/form.php new file mode 100644 index 00000000..f3c7b98b --- /dev/null +++ b/upload/admin/applications/core/extensions/search/form.php @@ -0,0 +1,59 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Returns HTML for the form (optional class, not required) + * Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $ + * + * + * @author $author$ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 5855 $ + **/ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class search_form_core +{ + /** + * Construct + * + */ + public function __construct() + { + /* Make object */ + $this->registry = ipsRegistry::instance(); + $this->DB = $this->registry->DB(); + $this->settings =& $this->registry->fetchSettings(); + $this->request =& $this->registry->fetchRequest(); + $this->lang = $this->registry->getClass('class_localization'); + $this->member = $this->registry->member(); + $this->memberData =& $this->registry->member()->fetchMemberData(); + $this->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + } + + /** + * Return sort drop down + * + * + * @access public + * @return array + */ + public function fetchSortDropDown() + { + $array = array( 'date' => $this->lang->words['s_search_type_0'], + 'title' => $this->lang->words['forum_sort_title'] ); + + return $array; + } +} diff --git a/upload/admin/applications/core/extensions/search/format.php b/upload/admin/applications/core/extensions/search/format.php new file mode 100644 index 00000000..4cf6323a --- /dev/null +++ b/upload/admin/applications/core/extensions/search/format.php @@ -0,0 +1,96 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Formats forum search results + * Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $ + * + * + * @author $author$ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 5855 $ + **/ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class search_format_core extends search_format +{ + /** + * Constructor + */ + public function __construct( ipsRegistry $registry ) + { + parent::__construct( $registry ); + } + + /** + * Parse search results + * + * @access private + * @param array $r Search result + * @return array $html Blocks of HTML + */ + public function parseAndFetchHtmlBlocks( $rows ) + { + return parent::parseAndFetchHtmlBlocks( $rows ); + } + + /** + * Formats the forum search result for display + * + * @access public + * @param array $search_row Array of data + * @return mixed Formatted content, ready for display, or array containing a $sub section flag, and content + **/ + public function formatContent( $data ) + { + return array( ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->helpSearchResult( $data, IPSSearchRegistry::get('display.onlyTitles') ), 0 ); + } + + /** + * Formats / grabs extra data for results + * Takes an array of IDS (can be IDs from anything) and returns an array of expanded data. + * + * @access public + * @return array + */ + public function processResults( $ids ) + { + $rows = array(); + + foreach( $ids as $i => $d ) + { + $rows[ $i ] = $this->genericizeResults( $d ); + } + + return $rows; + } + + /** + * Reassigns fields in a generic way for results output + * + * @param array $r + * @return array + **/ + public function genericizeResults( $r ) + { + $r['app'] = 'core'; + $r['content'] = $r['title']; + $r['content_title'] = $r['description']; + $r['updated'] = 0; + $r['type_2'] = 'help'; + $r['type_id_2'] = $r['id']; + + return $r; + } + +} \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/search/index.html b/upload/admin/applications/core/extensions/search/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/core/extensions/search/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/searchDisplay.php b/upload/admin/applications/core/extensions/searchDisplay.php deleted file mode 100644 index ea7bbc37..00000000 --- a/upload/admin/applications/core/extensions/searchDisplay.php +++ /dev/null @@ -1,69 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class coreSearchDisplay implements iSearchDisplay -{ - /** - * The search plugin for this app - * - * @access public - * @var object - */ - public $search_plugin; - - /** - * Formats the member search result for display - * - * @access public - * @param array $search_row Array of data from search_index - * @return string Formatted content, ready for display - **/ - public function formatContent( $search_row ) - { - return ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->helpSearchResult( $search_row, $this->search_plugin->onlyTitles ); - } - - - /** - * Retuns the html for displaying the member filter on the advanced search page - * - * @access public - * @return string - **/ - public function getFilterHTML() - { - return ''; - } - - /** - * Modifies the SQL query - * - * @access public - * @param array - * @return array - **/ - public function buildFilterSQL( $data ) - { - return array(); - } -} \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/searchPlugin.php b/upload/admin/applications/core/extensions/searchPlugin.php deleted file mode 100644 index 12a62bec..00000000 --- a/upload/admin/applications/core/extensions/searchPlugin.php +++ /dev/null @@ -1,387 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class searchCorePlugin implements iSearchIndexPlugin -{ - /** - * Database object - * - * @access private - * @var object - */ - private $DB; - - /** - * Date range restriction start - * - * @access private - * @var integer - */ - private $search_begin_timestamp = 0; - - /** - * Date range restriction end - * - * @access private - * @var integer - */ - private $search_end_timestamp = 0; - - /** - * Array of conditions for this search - * - * @access private - * @var array - */ - private $whereConditions = array(); - - /** - * Remoe self from search results - * - * @access public - * @var boolean - */ - public $removeSelf = false; - - /** - * Only display title - * - * @access public - * @var boolean - */ - public $onlyTitles = false; - - /** - * Setup registry objects - * - * @access public - * @param object ipsRegistry $registry - * @return void - */ - public function __construct( ipsRegistry $registry ) - { - $this->DB = $registry->DB(); - $this->member = $registry->member(); - $this->memberData =& $registry->member()->fetchMemberData(); - } - - /** - * Performs search and returns an array of results - * - * @access public - * @param string $search_term - * @param array $limit_clause The erray should be array( begin, end ) - * @param string $sort_by Column to sort by - * @param string $group_by Column to group by - * @param bool $content_title_only Only search title records - * @return array - */ - public function getSearchResults( $search_term, $limit_clause, $sort_by, $group_by='', $content_title_only=false, $sort_order='' ) - { - /* User prefs */ - $order_dir = ( $sort_order == 'asc' ) ? 'asc' : 'desc'; - - /* Group By */ - if( $group_by ) - { - $group_by = 'h.' . $group_by; - } - - /* Do the search */ - $this->DB->build( array( - 'select' => "h.*", - 'from' => array( 'faq' => 'h' ), - 'where' => $this->_buildWhereStatement( $search_term, $content_title_only ), - 'limit' => $limit_clause, - 'order' => 'h.id ' . $order_dir, - 'group' => $group_by, - 'add_join' => array( - array( - 'select' => 'i.*', - 'from' => array( 'permission_index' => 'i' ), - 'where' => "i.perm_type='help' AND i.perm_type_id=1", - 'type' => 'left', - ), - ) - ) ); - $this->DB->execute(); - - /* Build result array */ - $rows = array(); - - while( $r = $this->DB->fetch() ) - { - /* Reassign stuff to match the search_index */ - $rows[] = $this->formatFieldsForIndex( $r ); - } - - return $rows; - } - - /** - * Performs live search and returns an array of results - * NOT AVAILABLE IN BASIC SEARCH - * - * @access public - * @param string $search_term - * @return array - */ - public function getLiveSearchResults( $search_term ) - { - return array(); - } - - /** - * Returns the total number of results the search will return - * - * @access public - * @param string $search_term Search term - * @param string $group_by Column to group by - * @param bool $content_title_only Only search title records - * @return integer - */ - public function getSearchCount( $search_term, $group_by='', $content_title_only=false ) - { - /* Group By */ - if( $group_by ) - { - $group_by = 'h.' . $group_by; - } - - /* Query the count */ - $this->DB->build( array( - 'select' => 'COUNT(*) as total_results', - 'from' => array( 'faq' => 'h' ), - 'where' => $this->_buildWhereStatement( $search_term, $content_title_only ), - 'group' => $group_by, - 'add_join' => array( - array( - 'from' => array( 'permission_index' => 'i' ), - 'where' => "i.perm_type='help' AND i.perm_type_id=1", - 'type' => 'left', - ), - ) - ) ); - $this->DB->execute(); - - $search = $this->DB->fetch(); - - /* Return the count */ - return $search['total_results']; - } - - /** - * Restrict the date range that the search is performed on - * - * @access public - * @param int $begin Start timestamp - * @param int [$end] End timestamp - * @return void - */ - public function setDateRange( $begin, $end=0 ) - { - $this->search_begin_timestamp = $begin; - $this->search_end_timestamp = $end; - } - - /** - * mySQL function for adding special search conditions - * - * @access public - * @param string $column sql table column for this condition - * @param string $operator Operation to perform for this condition, ex: =, <>, IN, NOT IN - * @param mixed $value Value to check with - * @param string $comp Comparison type - * @return void - */ - public function setCondition( $column, $operator, $value, $comp='AND' ) - { - /* Remap */ - return; - - /* Build the condition based on operator */ - switch( strtoupper( $operator ) ) - { - case 'IN': - case 'NOT IN': - $this->whereConditions[$comp][] = "h.{$column} {$operator} ( {$value} )"; - break; - - default: - $this->whereConditions[$comp][] = "h.{$column} {$operator} {$value}"; - break; - } - - } - - /** - * Allows you to specify multiple conditions that are chained together - * - * @access public - * @param array $conditions Array of conditions, each element has 3 keys: column, operator, value, see the setCondition function for information on each - * @param string $inner_comp Comparison operator to use inside the chain - * @param string $outer_comp Comparison operator to use outside the chain - * @return void - */ - public function setMultiConditions( $conditions, $inner_comp='OR', $outer_comp='AND' ) - { - return; - - /* Loop through the conditions to build the statement */ - $_temp = array(); - - foreach( $conditions as $r ) - { - switch( strtoupper( $r['operator'] ) ) - { - case 'IN': - case 'NOT IN': - $_temp[] = "h.{$r['column']} {$r['operator']} ( {$r['value']} )"; - break; - - default: - $_temp[] = "h.{$r['column']} {$r['operator']} {$r['value']}"; - break; - } - } - - $this->whereConditions[$outer_comp][] = '( ' . implode( $_temp, ' ' . $inner_comp . ' ' ) . ' ) '; - } - - /** - * Set search conditions for "View unread content" - * - * @access public - * @return void - */ - public function setUnreadConditions() - { - $this->removeSelf = true; - } - - /** - * Builds the where portion of a search string - * - * @access private - * @param string $search_term The string to use in the search - * @param bool $content_title_only Search only title records - * @return string - **/ - private function _buildWhereStatement( $search_term, $content_title_only=false ) - { - /* INI */ - $where_clause = array(); - - if( $search_term ) - { - if( $content_title_only ) - { - $where_clause[] = "h.title LIKE '%{$search_term}%'"; - } - else - { - $where_clause[] = "h.title LIKE '%{$search_term}%' OR h.text LIKE '%{$search_term}%' OR h.description LIKE '%{$search_term}%'"; - } - } - - /* Add in AND where conditions */ - if( isset( $this->whereConditions['AND'] ) && count( $this->whereConditions['AND'] ) ) - { - $where_clause = array_merge( $where_clause, $this->whereConditions['AND'] ); - } - - /* ADD in OR where conditions */ - if( isset( $this->whereConditions['OR'] ) && count( $this->whereConditions['OR'] ) ) - { - $where_clause[] = '( ' . implode( ' OR ', $this->whereConditions['OR'] ) . ' )'; - } - - /* Permissions */ - $where_clause[] = $this->DB->buildRegexp( "i.perm_view", $this->member->perm_id_array ); - - /* Build and return the string */ - return implode( " AND ", $where_clause ); - } - - /** - * Reassigns fields in a way the index exepcts - * - * @param array $r - * @return array - **/ - public function formatFieldsForIndex( $r ) - { - $r['app'] = 'core'; - $r['content'] = $r['title']; - $r['content_title'] = $r['description']; - $r['updated'] = time(); - $r['type_2'] = 'help'; - $r['type_id_2'] = $r['id']; - - return $r; - } - - /** - * This function grabs the actual results for display - * - * @param array $ids - * @return query result - **/ - public function getResultsForSphinx( $ids ) - { - $this->DB->build( array( - 'select' => "h.*", - 'from' => array( 'faq' => 'h' ), - 'where' => 'h.id IN( ' . implode( ',', $ids ) . ')', - 'add_join' => array( - array( - 'select' => 'i.*', - 'from' => array( 'permission_index' => 'i' ), - 'where' => "i.perm_type='help' AND i.perm_type_id=1", - 'type' => 'left', - ), - ) - ) ); - return $this->DB->execute(); - } - - /** - * Gets the name of the field this search index uses for dates.... >_< - * - * @return string - **/ - public function getDateField() - { - return 'search_id'; - } - - /** - * Gets field names for other conditions - * - * @param string Column - * @return string - **/ - public function getConditionField( $column ) - { - return $column; - } -} \ No newline at end of file diff --git a/upload/admin/applications/core/extensions/sphinxTemplate.php b/upload/admin/applications/core/extensions/sphinxTemplate.php index 0de8c6ee..2d2259ed 100644 --- a/upload/admin/applications/core/extensions/sphinxTemplate.php +++ b/upload/admin/applications/core/extensions/sphinxTemplate.php @@ -1,86 +1,88 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -$appSphinxTemplate = <<cache_store VALUES( 'sphinx_core_counter', (SELECT max(id) FROM faq), '', 0, UNIX_TIMESTAMP() ) - - # Query posts for the main source - sql_query = SELECT f.*, f.id as search_id, \ - REPLACE( pi.perm_view, '*', 0 ) as perm_view \ - FROM faq f \ - LEFT JOIN permission_index pi ON ( pi.perm_type_id=1 AND pi.perm_type='help' ) \ - WHERE f.id <= ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_core_counter' ) - - # Fields - sql_attr_uint = search_id - - sql_ranged_throttle = 0 -} - -source core_search_delta : core_search_main -{ - # Override the base sql_query_pre - sql_query_pre = - - # Query posts for the main source - sql_query = SELECT f.*, f.id as search_id, \ - REPLACE( pi.perm_view, '*', 0 ) as perm_view \ - FROM faq f \ - LEFT JOIN permission_index pi ON ( pi.perm_type_id=1 AND pi.perm_type='help' ) \ - WHERE f.id > ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_core_counter' ) - - # Fields - sql_attr_uint = search_id - - sql_ranged_throttle = 0 -} - -index core_search_main -{ - source = core_search_main - path = /core_search_main - - docinfo = extern - mlock = 0 - morphology = none - min_word_len = 2 - charset_type = sbcs - html_strip = 0 -} - -index core_search_delta : core_search_main -{ - source = core_search_delta - path = /core_search_delta -} - - -EOF; + + * Invision Power Services + * IP.Board v3.1.4 + * Sphinx template file + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 5713 $ + * @since 3.0.0 + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +$appSphinxTemplate = <<cache_store VALUES( 'sphinx_core_counter', (SELECT max(id) FROM faq), '', 0, UNIX_TIMESTAMP() ) + + # Query posts for the main source + sql_query = SELECT f.*, f.id as search_id, \ + REPLACE( pi.perm_view, '*', 0 ) as perm_view \ + FROM faq f \ + LEFT JOIN permission_index pi ON ( pi.perm_type_id=1 AND pi.perm_type='help' ) \ + WHERE f.id <= ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_core_counter' ) + + # Fields + sql_attr_uint = search_id + + sql_ranged_throttle = 0 +} + +source core_search_delta : core_search_main +{ + # Override the base sql_query_pre + sql_query_pre = + + # Query posts for the main source + sql_query = SELECT f.*, f.id as search_id, \ + REPLACE( pi.perm_view, '*', 0 ) as perm_view \ + FROM faq f \ + LEFT JOIN permission_index pi ON ( pi.perm_type_id=1 AND pi.perm_type='help' ) \ + WHERE f.id > ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_core_counter' ) + + # Fields + sql_attr_uint = search_id + + sql_ranged_throttle = 0 +} + +index core_search_main +{ + source = core_search_main + path = /core_search_main + + docinfo = extern + mlock = 0 + morphology = none + min_word_len = 2 + charset_type = sbcs + html_strip = 0 +} + +index core_search_delta : core_search_main +{ + source = core_search_delta + path = /core_search_delta +} + + +EOF; diff --git a/upload/admin/applications/core/extensions/usercpForms.php b/upload/admin/applications/core/extensions/usercpForms.php index a538021c..b96019f3 100644 --- a/upload/admin/applications/core/extensions/usercpForms.php +++ b/upload/admin/applications/core/extensions/usercpForms.php @@ -1,1326 +1,2051 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class usercpForms_core extends public_core_usercp_manualResolver implements interface_usercp -{ - /** - * Tab name - * This can be left blank and the application title will - * be used - * - * @access public - * @var string - */ - public $tab_name = "Настройки"; - - /** - * OK Message - * This is an optional message to return back to the framework - * to replace the standard 'Settings saved' message - * - * @access public - * @var string - */ - public $ok_message = ''; - - /** - * Hide 'save' button and form elements - * Useful if you have custom output that doesn't - * require it - * - * @access public - * @var bool - */ - public $hide_form_and_save_button = false; - - /** - * If you wish to allow uploads, set a value for this - * - * @access public - * @var integer - */ - public $uploadFormMax = 0; - - /** - * Flag to indicate that the user is a facebook logged in user doozer - * - * @access protected - * @var boolean - */ - protected $_isFBUser = false; - - /** - * Initiate this module - * - * @access public - * @return void - */ - public function init( ) - { - $this->tab_name = ipsRegistry::getClass('class_localization')->words['tab__core']; - - /* Facebook? */ - if ( IPSLib::fbc_enabled() === TRUE AND $this->memberData['fb_uid'] ) - { - require_once( IPS_ROOT_PATH . 'sources/classes/facebook/connect.php' ); - $facebook = new facebook_connect( $this->registry ); - - /* Test connection */ - $facebook->testConnectSession(); - - try - { - $fbuid = $facebook->FB()->get_loggedin_user(); - } - catch( Exception $e ) - { - } - - if ( $fbuid ) - { - $this->_isFBUser = true; - } - } - } - - /** - * Return links for this tab - * You may return an empty array or FALSE to not have - * any links show in the tab. - * - * The links must have 'area=xxxxx'. The rest of the URL - * is added automatically. - * 'area' can only be a-z A-Z 0-9 - _ - * - * @access public - * @author Matt Mecham - * @return array Links - */ - public function getLinks() - { - ipsRegistry::instance()->getClass('class_localization')->loadLanguageFile( array( 'public_usercp' ), 'core' ); - - $array = array(); - - $array[] = array( 'url' => 'area=settings', - 'title' => ipsRegistry::instance()->getClass('class_localization')->words['ucp_general_settings'], - 'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'settings' ? 1 : 0, - 'area' => 'settings' - ); - - $array[] = array( 'url' => 'area=email', - 'title' => ipsRegistry::instance()->getClass('class_localization')->words['ucp_change_email'], - 'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'email' ? 1 : 0, - 'area' => 'email' - ); - - /* No use for this for FB users */ - if ( ! $this->_isFBUser ) - { - $array[] = array( 'url' => 'area=password', - 'title' => ipsRegistry::instance()->getClass('class_localization')->words['ucp_change_password'], - 'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'password' ? 1 : 0, - 'area' => 'password' - ); - } - - if ( $this->settings['auth_allow_dnames'] == 1 AND $this->memberData['g_dname_changes'] > 0 ) - { - $array[] = array( 'url' => 'area=displayname', - 'title' => ipsRegistry::instance()->getClass('class_localization')->words['ucp_change_name'], - 'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'displayname' ? 1 : 0, - 'area' => 'displayname' - ); - } - - $array[] = array( 'url' => 'area=notes', - 'title' => ipsRegistry::instance()->getClass('class_localization')->words['m_notes'], - 'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'notes' ? 1 : 0, - 'area' => 'notes' - ); - - if ( $this->memberData['g_attach_max'] != -1 ) - { - $array[] = array( - 'url' => 'area=attachments', - 'title' => ipsRegistry::instance()->getClass('class_localization')->words['m_attach'], - 'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'attachments' ? 1 : 0, - 'area' => 'attachments' - ); - } - - return $array; - } - - - /** - * Run custom event - * - * If you pass a 'do' in the URL / post form that is not either: - * save / save_form or show / show_form then this function is loaded - * instead. You can return a HTML chunk to be used in the UserCP (the - * tabs and footer are auto loaded) or redirect to a link. - * - * If you are returning HTML, you can use $this->hide_form_and_save_button = 1; - * to remove the form and save button that is automatically placed there. - * - * @access public - * @author Matt Mecham - * @param string Current area - * @return mixed html or void - */ - public function runCustomEvent( $currentArea ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $html = ''; - - //----------------------------------------- - // What to do? - //----------------------------------------- - - switch( $currentArea ) - { - case 'updateAttachments': - return $this->customEvent_updateAttachments(); - break; - } - - //----------------------------------------- - // Turn off save button - //----------------------------------------- - - $this->hide_form_and_save_button = 1; - - //----------------------------------------- - // Return - //----------------------------------------- - - return $html; - } - - /** - * Delete attachments - * - * @access public - * @author Matt Mecham - * @return string Processed HTML - */ - public function customEvent_updateAttachments() - { - //----------------------------------------- - // Get the ID's to delete - //----------------------------------------- - - $finalIDs = array(); - - //----------------------------------------- - // Grab post IDs - //----------------------------------------- - - if ( is_array( $_POST['attach'] ) and count( $_POST['attach'] ) ) - { - foreach( $_POST['attach'] as $id => $value ) - { - $finalIDs[ $id ] = intval( $id ); - } - } - - if ( count($finalIDs) > 0 ) - { - $this->DB->build( array( 'select' => 'a.*', - 'from' => array( 'attachments' => 'a' ), - 'where' => "a.attach_id IN (" . implode( ",", $finalIDs ) .") AND a.attach_rel_module IN( 'post', 'msg' ) AND attach_member_id=" . $this->memberData['member_id'], - 'add_join' => array( - array( 'select' => 'p.topic_id, p.pid', - 'from' => array( 'posts' => 'p' ), - 'where' => "p.pid=a.attach_rel_id AND a.attach_rel_module='post'", - 'type' => 'left' - ), - array( 'select' => 'mt.msg_id, mt.msg_topic_id', - 'from' => array( 'message_posts' => 'mt' ), - 'where' => "mt.msg_id=a.attach_rel_id AND a.attach_rel_module='msg'", - 'type' => 'left' - ), - ) - ) ); - - $o = $this->DB->execute(); - - while ( $killmeh = $this->DB->fetch( $o ) ) - { - if ( $killmeh['attach_location'] ) - { - @unlink( $this->settings['upload_dir']."/".$killmeh['attach_location'] ); - } - if ( $killmeh['attach_thumb_location'] ) - { - @unlink( $this->settings['upload_dir']."/".$killmeh['attach_thumb_location'] ); - } - - if ( $killmeh['topic_id'] ) - { - $this->DB->update( 'topics', 'topic_hasattach=topic_hasattach-1', 'tid='.$killmeh['topic_id'], true, true ); - } - else if( $killmeh['msg_id'] ) - { - $this->DB->update( 'message_topics', 'mt_hasattach=mt_hasattach-1', 'mt_id='.$killmeh['msg_topic_id'], true, true ); - } - } - - $this->DB->delete( 'attachments', 'attach_id IN ('.implode(",",$finalIDs).') and attach_member_id='.$this->memberData['member_id'] ); - } - - $this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=usercp&tab=core&area=attachments&do=show" ); - } - - /** - * UserCP Form Show - * - * @access public - * @author Matt Mecham - * @param string Current area as defined by 'get_links' - * @param array Array of errors - * @return string Processed HTML - */ - public function showForm( $current_area, $errors=array() ) - { - //----------------------------------------- - // Where to go, what to see? - //----------------------------------------- - - switch( $current_area ) - { - default: - case 'settings': - return $this->showFormSettings(); - break; - case 'email': - return $this->showFormEmail(); - break; - case 'password': - return $this->showFormPassword(); - break; - case 'displayname': - return $this->showFormDisplayname(); - break; - case 'attachments': - return $this->showFormAttachments(); - break; - case 'notes': - return $this->showFormNotes(); - break; - } - } - - /** - * Show the attachments form - * - * @access public - * @author Matt Mecham - * @return string Processed HTML - */ - public function showFormAttachments() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $info = array(); - $start = intval( $this->request['st'] ); - $perpage = 15; - $sort_key = ""; - $attachments = array(); - - $this->hide_form_and_save_button = 1; - - //----------------------------------------- - // Sort it - //----------------------------------------- - - switch ( $this->request['sort'] ) - { - case 'date': - $sort_key = 'a.attach_date ASC'; - $info['date_order'] = 'rdate'; - $info['size_order'] = 'size'; - break; - case 'rdate': - $sort_key = 'a.attach_date DESC'; - $info['date_order'] = 'date'; - $info['size_order'] = 'size'; - break; - case 'size': - $sort_key = 'a.attach_filesize DESC'; - $info['date_order'] = 'date'; - $info['size_order'] = 'rsize'; - break; - case 'rsize': - $sort_key = 'a.attach_filesize ASC'; - $info['date_order'] = 'date'; - $info['size_order'] = 'size'; - break; - default: - $sort_key = 'a.attach_date DESC'; - $info['date_order'] = 'date'; - $info['size_order'] = 'size'; - break; - } - - //----------------------------------------- - // Get some stats... - //----------------------------------------- - - $maxspace = intval($this->memberData['g_attach_max']); - - if ( $this->memberData['g_attach_max'] == -1 ) - { - $this->registry->getClass('output')->showError( 'no_permission_to_attach', 1010 ); - } - - //----------------------------------------- - // Limit by forums - //----------------------------------------- - - $stats = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count, sum(attach_filesize) as sum', - 'from' => 'attachments', - 'where' => 'attach_member_id=' . $this->memberData['member_id'] . " AND attach_rel_module IN( 'post', 'msg' )" ) ); - - if ( $maxspace > 0 ) - { - //----------------------------------------- - // Figure out percentage used - //----------------------------------------- - - $info['has_limit'] = 1; - $info['full_percent'] = $stats['sum'] ? sprintf( "%.0f", ( ( $stats['sum'] / ($maxspace * 1024) ) * 100) ) : 0; - - if ( $info['full_percent'] > 100 ) - { - $info['full_percent'] = 100; - } - else if ( $info['full_percent'] < 1 AND $stats['count'] > 0 ) - { - $info['full_percent'] = 1; - } - - $info['attach_space_count'] = sprintf( $this->lang->words['attach_space_count'], intval($stats['count']), intval($info['full_percent']) ); - $info['attach_space_used'] = sprintf( $this->lang->words['attach_space_used'] , IPSLib::sizeFormat(intval($stats['sum'])), IPSLib::sizeFormat($maxspace * 1024) ); - } - else - { - $info['has_limit'] = 0; - $info['attach_space_used'] = sprintf( $this->lang->words['attach_space_unl'] , IPSLib::sizeFormat(intval($stats['sum'])) ); - } - - //----------------------------------------- - // Pages - //----------------------------------------- - - $pages = $this->registry->getClass('output')->generatePagination( array( 'totalItems' => $stats['count'], - 'itemsPerPage' => $perpage, - 'currentStartValue' => $start, - 'baseUrl' => "app=core&module=usercp&tab=core&area=attachments&sort=" . $this->request['sort'] . "", - ) ); - - //----------------------------------------- - // Get attachments... - //----------------------------------------- - - $this->DB->build( array( 'select' => 'a.*', - 'from' => array( 'attachments' => 'a' ), - 'where' => "a.attach_member_id=" . $this->memberData['member_id'] . " AND a.attach_rel_module IN( 'post', 'msg' )", - 'order' => $sort_key, - 'limit' => array( $start, $perpage ), - 'add_join' => array( - array( 'select' => 'p.topic_id', - 'from' => array( 'posts' => 'p' ), - 'where' => 'p.pid=a.attach_rel_id', - 'type' => 'left' - ), - array( 'select' => 't.*', - 'from' => array( 'topics' => 't' ), - 'where' => 't.tid=p.topic_id', - 'type' => 'left' - ) ) ) ); - $outer = $this->DB->execute(); - - $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_topic'), 'forums' ); - - $cache = $this->cache->getCache('attachtypes'); - - while ( $row = $this->DB->fetch( $outer ) ) - { - if ( IPSMember::checkPermissions('read', $row['forum_id'] ) != TRUE ) - { - $row['title'] = $this->lang->words['attach_topicmoved']; - } - - //----------------------------------------- - // Full attachment thingy - //----------------------------------------- - - if ( $row['attach_rel_module'] == 'post' ) - { - $row['_type'] = 'post'; - } - else if ( $row['attach_rel_module'] == 'msg' ) - { - $row['_type'] = 'msg'; - $row['title'] = $this->lang->words['attach_inpm']; - } - - /* IPB 2.x conversion */ - $row['image'] = str_replace( 'folder_mime_types', 'mime_types', $cache[ $row['attach_ext'] ]['atype_img'] ); - $row['short_name'] = IPSText::truncate( $row['attach_file'], 30 ); - $row['attach_date'] = $this->registry->getClass( 'class_localization')->getDate( $row['attach_date'], 'SHORT' ); - $row['real_size'] = IPSLib::sizeFormat( $row['attach_filesize'] ); - - $attachments[] = $row; - } - - return $this->registry->getClass('output')->getTemplate('ucp')->coreAttachments( $info, $pages, $attachments ); - } - - /** - * Show the Password form - * - * @access public - * @author Matt Mecham - * @return string Processed HTML - */ - public function showFormPassword() - { - //----------------------------------------- - // Do we have another URL for password resets? - //----------------------------------------- - - require_once( IPS_ROOT_PATH . 'sources/handlers/han_login.php' ); - $han_login = new han_login( $this->registry ); - $han_login->init(); - $han_login->checkMaintenanceRedirect(); - - if( $this->memberData['g_access_cp'] ) - { - $this->hide_form_and_save_button = true; - } - - return $this->registry->getClass('output')->getTemplate('ucp')->passwordChangeForm(); - } - - /** - * Show the Email form - * - * @access public - * @author Matt Mecham - * @param string Returned error message (if any) - * @return string Processed HTML - */ - public function showFormEmail( $_message='' ) - { - //----------------------------------------- - // Do not allow validating members to change - // email when admin validation is on - // @see http://community.invisionpower.com/tracker/issue-19964-loophole-in-registration-procedure/ - //----------------------------------------- - - if( $this->memberData['member_group_id'] == $this->settings['auth_group'] AND in_array( $this->settings['reg_auth_type'], array( 'admin', 'admin_user' ) ) ) - { - $this->registry->output->showError( $this->lang->words['admin_val_no_email_chg'], 10189 ); - } - - //----------------------------------------- - // Do we have another URL for email resets? - //----------------------------------------- - - require_once( IPS_ROOT_PATH . 'sources/handlers/han_login.php' ); - $han_login = new han_login( $this->registry ); - $han_login->init(); - $han_login->checkMaintenanceRedirect(); - - $txt = $this->lang->words['ce_current'] . $this->memberData['email']; - - if ( $this->settings['reg_auth_type']) - { - $txt .= $this->lang->words['ce_auth']; - } - - if ( $this->settings['bot_antispam'] ) - { - $captchaHTML = $this->registry->getClass('class_captcha')->getTemplate(); - } - - $_message = $_message ? $this->lang->words[$_message] : ''; - - if( $this->memberData['g_access_cp'] ) - { - $this->hide_form_and_save_button = true; - } - - return $this->registry->getClass('output')->getTemplate('ucp')->emailChangeForm( $txt, $_message, $captchaHTML, $this->_isFBUser ); - } - - /** - * Show the display name form - * - * @access public - * @author Matt Mecham - * @param string Error message (if any) - * @return string Processed HTML - */ - public function showFormDisplayname( $error="" ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $form = array(); - - //----------------------------------------- - // CHECK (please) - //----------------------------------------- - - if ( ! $this->settings['auth_allow_dnames'] OR $this->memberData['g_dname_changes'] < 1 OR $this->memberData['g_dname_date'] < 1 ) - { - $this->registry->getClass('output')->showError( 'no_permission_for_display_names', 1011 ); - } - - $this->request['display_name'] = $this->request['display_name'] ? $this->request['display_name'] : ''; - - $this->settings['username_errormsg'] = str_replace( '{chars}', $this->settings['username_characters'], $this->settings['username_errormsg'] ); - - //----------------------------------------- - // Grab # changes > 24 hours - //----------------------------------------- - - $time_check = time() - 86400 * $this->memberData['g_dname_date']; - - if( $time_check < $this->memberData['joined'] ) - { - $time_check = $this->memberData['joined']; - } - - $name_count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count, MIN(dname_date) as min_date', 'from' => 'dnames_change', 'where' => "dname_member_id=" . $this->memberData['member_id'] . " AND dname_date > $time_check" ) ); - - $name_count['count'] = intval( $name_count['count'] ); - $name_count['min_date'] = intval( $name_count['min_date'] ) ? intval( $name_count['min_date'] ) : $time_check; - - //----------------------------------------- - // Calculate # left - //----------------------------------------- - - /* Check new permissions */ - $_g = $this->caches['group_cache'][ $this->memberData['member_group_id'] ]; - - if ( $_g['g_displayname_unit'] ) - { - if ( $_g['gbw_displayname_unit_type'] ) - { - /* days */ - if ( $this->memberData['joined'] > ( time() - ( 86400 * $_g['g_displayname_unit'] ) ) ) - { - $this->hide_form_and_save_button = 1; - $form['_noPerm'] = sprintf( $this->lang->words['dname_group_restrict_date'], $this->lang->getDate( $this->memberData['joined'] + ( 86400 * $_g['g_displayname_unit'] ), 'long' ) ); - } - } - else - { - /* Posts */ - if ( $this->memberData['posts'] < $_g['g_displayname_unit'] ) - { - $this->hide_form_and_save_button = 1; - $form['_noPerm'] = sprintf( $this->lang->words['dname_group_restrict_posts'], $_g['g_displayname_unit'] - $this->memberData['posts'] ); - } - } - } - - if( !$form['_noPerm'] ) - { - $form['_changes_left'] = $this->memberData['g_dname_changes'] - $name_count['count']; - $form['_changes_done'] = $name_count['count']; - - # Make sure changes done isn't larger than allowed - # This happens when changing via ACP - - if ( $form['_changes_done'] > $this->memberData['g_dname_changes'] ) - { - $form['_changes_done'] = $this->memberData['g_dname_changes']; - } - - $form['_first_change'] = $this->registry->getClass( 'class_localization')->getDate( $name_count['min_date'], 'date', 1 ); - $form['_lang_string'] = sprintf( $this->lang->words['dname_string'], - $form['_changes_done'], $this->memberData['g_dname_changes'], - $form['_first_change'], $this->memberData['g_dname_changes'], - $this->memberData['g_dname_date'] ); - } - - //----------------------------------------- - // Print - //----------------------------------------- - - $this->_pageTitle = $this->lang->words['m_dname_change']; - - return $this->registry->getClass('output')->getTemplate('ucp')->displayNameForm( $form, $error, $okmessage, $this->_isFBUser ); - } - - /** - * Show the Settings form - * - * @access public - * @author Matt Mecham - * @return string Processed HTML - */ - public function showFormSettings() - { - /* Sort the times */ - $times = array(); - - foreach( $this->lang->words as $k => $v ) - { - if( strpos( $k, "time_" ) === 0 ) - { - $k = str_replace( "time_", '', $k ); - - if( preg_match( "/^[\-\d\.]+$/", $k ) ) - { - $times[ $k ] = $v; - } - } - } - - ksort( $times ); - //uksort( $this->lang->words, create_function( '$a, $b', '$a = str_replace( "time_", "", $a ); $b = str_replace( "time_", "", $b ); return $a > $b;' ) ); - - /* Show the form */ - return $this->registry->getClass('output')->getTemplate('ucp')->generalSettingsForm( $times ); - } - - /** - * Show the Notes form - * - * @access public - * @author Matt Mecham - * @return string Processed HTML - */ - public function showFormNotes() - { - /* Show the form */ - $member = IPSMember::load( $this->memberData['member_id'], 'extendedProfile' ); - $content = $member['notes']; - - return $this->registry->getClass('output')->getTemplate('ucp')->coreNotesForm( $content ); - } - - /** - * UserCP Form Check - * - * @access public - * @author Matt Mecham - * @param string Current area as defined by 'get_links' - * @return string Processed HTML - */ - public function saveForm( $current_area ) - { - //----------------------------------------- - // Where to go, what to see? - //----------------------------------------- - - switch( $current_area ) - { - default: - case 'settings': - return $this->saveFormSettings(); - break; - case 'email': - return $this->saveFormEmail(); - break; - case 'password': - return $this->saveFormPassword(); - break; - case 'displayname': - return $this->saveFormDisplayname(); - break; - case 'notes': - return $this->saveFormNotes(); - break; - } - } - - /** - * UserCP Save Form: Notes - * - * @access public - * @return boolean Successful - */ - public function saveFormNotes() - { - //----------------------------------------- - // Remove board tags - //----------------------------------------- - - $_POST['Post'] = IPSText::removeMacrosFromInput( $_POST['Post'] ); - - //----------------------------------------- - // Write it to the DB. - //----------------------------------------- - - IPSMember::save( $this->memberData['member_id'], array( 'extendedProfile' => array( 'notes' => htmlspecialchars($_POST['Post']) ) ) ); - - $this->ok_message = $this->lang->words['notes_saved_msg']; - return TRUE; - } - - /** - * UserCP Save Form: Password - * - * @access public - * @param array Array of member / core_sys_login information (if we're editing) - * @return mixed Array of errors / boolean true - */ - public function saveFormPassword( $member=array() ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $cur_pass = trim($this->request['current_pass']); - $new_pass = trim($this->request['new_pass_1']); - $chk_pass = trim($this->request['new_pass_2']); - - //----------------------------------------- - // Checks... - //----------------------------------------- - - if( $this->memberData['g_access_cp'] ) - { - return array( 0 => $this->lang->words['admin_emailpassword'] ); - } - - if ( ! $_POST['current_pass'] OR ( empty($new_pass) ) or ( empty($chk_pass) ) ) - { - return array( 0 => $this->lang->words['complete_entire_form'] ); - } - - //----------------------------------------- - // Do the passwords actually match? - //----------------------------------------- - - if ( $new_pass != $chk_pass ) - { - return array( 0 => $this->lang->words['passwords_not_matchy'] ); - } - - //----------------------------------------- - // Check password... - //----------------------------------------- - - if ( $this->_checkPassword( $cur_pass ) !== TRUE ) - { - return array( 0 => $this->lang->words['current_pw_bad'] ); - } - - /*if ( IPSText::mbstrlen( $new_pass ) > 32) - { - return array( 0 => $this->lang->words['new_pw_too_long'] ); - }*/ - - //----------------------------------------- - // Create new password... - //----------------------------------------- - - $md5_pass = md5($new_pass); - - //----------------------------------------- - // han_login was loaded during check_password - //----------------------------------------- - - $this->han_login->changePass( $this->memberData['email'], $md5_pass ); - - if ( $this->han_login->return_code AND $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) - { - return array( 0 => $this->lang->words['hanlogin_pw_failed'] ); - } - - //----------------------------------------- - // Update the DB - //----------------------------------------- - - IPSMember::updatePassword( $this->memberData['email'], $md5_pass ); - - IPSLib::runMemberSync( 'onPassChange', $this->memberData['member_id'], $new_pass ); - - //----------------------------------------- - // Update members log in key... - //----------------------------------------- - - $key = IPSMember::generateAutoLoginKey(); - - IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'member_login_key' => $key ) ) ); - - $this->ok_message = $this->lang->words['pw_change_successful']; - - return TRUE; - } - - /** - * UserCP Save Form: Display Name - * - * @access public - * @return mixed Array of errors / boolean true - */ - public function saveFormDisplayname() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $members_display_name = trim($this->request['displayName']); - $password_check = trim( $this->request['displayPassword'] ); - - //----------------------------------------- - // Check for blanks... - //----------------------------------------- - - if ( ! $members_display_name OR ( ! $this->_isFBUser AND ! $password_check ) ) - { - return array( 0 => $this->lang->words['complete_entire_form'] ); - } - - //----------------------------------------- - // Check password - //----------------------------------------- - - if ( ! $this->_isFBUser ) - { - if ( $this->_checkPassword( $password_check ) === FALSE ) - { - return array( 0 => $this->lang->words['current_pw_bad'] ); - } - } - - try - { - if ( IPSMember::getFunction()->updateName( $this->memberData['member_id'], $members_display_name, 'members_display_name' ) === TRUE ) - { - $this->cache->rebuildCache( 'stats', 'global' ); - - return $this->showFormDisplayname( '', $this->lang->words['dname_change_ok'] ); - } - else - { - # We should absolutely never get here. So this is a fail-safe, really to - # prevent a "false" positive outcome for the end-user - return array( 0 => $this->lang->words['name_taken_change'] ); - } - } - catch( Exception $error ) - { - switch( $error->getMessage() ) - { - case 'NO_MORE_CHANGES': - return array( 0 => $this->lang->words['name_change_no_more'] ); - break; - case 'NO_USER': - return array( 0 => $this->lang->words['name_change_noload'] ); - break; - case 'NO_PERMISSION': - return array( 0 => $this->lang->words['name_change_noperm'] ); - case 'NO_NAME': - return array( 0 => sprintf( $this->lang->words['name_change_tooshort'], $this->settings['max_user_name_length'] ) ); - break; - case 'TOO_LONG': - return array( 0 => sprintf( $this->lang->words['name_change_tooshort'], $this->settings['max_user_name_length'] ) ); - break; - case 'ILLEGAL_CHARS': - return array( 0 => $this->lang->words['name_change_illegal'] ); - break; - case 'USER_NAME_EXISTS': - return array( 0 => $this->lang->words['name_change_taken'] ); - break; - default: - return array( 0 => $error->getMessage() ); - break; - } - } - - return TRUE; - } - - /** - * UserCP Save Form: Email Address - * - * @access public - * @return mixed Array of errors / boolean true - */ - public function saveFormEmail() - { - //----------------------------------------- - // Do not allow validating members to change - // email when admin validation is on - // @see http://community.invisionpower.com/tracker/issue-19964-loophole-in-registration-procedure/ - //----------------------------------------- - - if( $this->memberData['member_group_id'] == $this->settings['auth_group'] AND in_array( $this->settings['reg_auth_type'], array( 'admin', 'admin_user' ) ) ) - { - $this->registry->output->showError( $this->lang->words['admin_val_no_email_chg'], 10190 ); - } - - //----------------------------------------- - // INIT - //----------------------------------------- - - $_emailOne = strtolower( trim($this->request['in_email_1']) ); - $_emailTwo = strtolower( trim($this->request['in_email_2']) ); - $captchaInput = trim(ipsRegistry::$request['captchaInput']); - $captchaUniqueID = trim(ipsRegistry::$request['captchaUniqueID']); - - //----------------------------------------- - // Check input - //----------------------------------------- - - if( $this->memberData['g_access_cp'] ) - { - return array( 0 => $this->lang->words['admin_emailpassword'] ); - } - - if ( ! $_POST['in_email_1'] OR ! $_POST['in_email_2'] ) - { - return array( 0 => $this->lang->words['complete_entire_form'] ); - } - - //----------------------------------------- - // Check password... - //----------------------------------------- - - if ( ! $this->_isFBUser ) - { - if ( $this->_checkPassword( $this->request['password'] ) === FALSE ) - { - return array( 0 => $this->lang->words['current_pw_bad'] ); - } - } - - //----------------------------------------- - // Test email addresses - //----------------------------------------- - - if ( $_emailOne != $_emailTwo) - { - return array( 0 => $this->lang->words['emails_no_matchy'] ); - } - - if ( IPSText::checkEmailAddress( $_emailOne ) !== TRUE ) - { - return array( 0 => $this->lang->words['email_not_valid'] ); - } - - //----------------------------------------- - // Is this email addy taken? - //----------------------------------------- - - if ( IPSMember::checkByEmail( $_emailOne ) == TRUE ) - { - return array( 0 => $this->lang->words['email_is_taken'] ); - } - - //----------------------------------------- - // Load ban filters - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'banfilters' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $banfilters[ $r['ban_type'] ][] = $r['ban_content']; - } - - //----------------------------------------- - // Check in banned list - //----------------------------------------- - - if ( isset($banfilters['email']) AND is_array( $banfilters['email'] ) and count( $banfilters['email'] ) ) - { - foreach ( $banfilters['email'] as $email ) - { - $email = str_replace( '\*', '.*' , preg_quote($email, "/") ); - - if ( preg_match( "/^{$email}$/i", $_emailOne ) ) - { - return array( 0 => $this->lang->words['email_is_taken'] ); - } - } - } - - //----------------------------------------- - // Anti bot flood... - //----------------------------------------- - - if ( $this->settings['bot_antispam'] ) - { - if ( $this->registry->getClass('class_captcha')->validate() !== TRUE ) - { - return array( 0 => $this->lang->words['captcha_email_invalid'] ); - } - } - - //----------------------------------------- - // Load handler... - //----------------------------------------- - - require_once( IPS_ROOT_PATH.'sources/handlers/han_login.php' ); - $this->han_login = new han_login( $this->registry ); - $this->han_login->init(); - - if ( $this->han_login->emailExistsCheck( $_emailOne ) !== FALSE ) - { - return array( 0 => $this->lang->words['email_is_taken'] ); - } - - $this->han_login->changeEmail( $this->memberData['email'], $_emailOne ); - - if ( $this->han_login->return_code AND $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) - { - return array( 0 => $this->lang->words['email_is_taken'] ); - } - - //----------------------------------------- - // Require new validation? NON ADMINS ONLY - //----------------------------------------- - - if ( $this->settings['reg_auth_type'] AND !$this->memberData['g_access_cp'] ) - { - $validate_key = md5( IPSLib::makePassword() . time() ); - - //----------------------------------------- - // Update the new email, but enter a validation key - // and put the member in "awaiting authorisation" - // and send an email.. - //----------------------------------------- - - $db_str = array( - 'vid' => $validate_key, - 'member_id' => $this->memberData['member_id'], - 'temp_group' => $this->settings['auth_group'], - 'entry_date' => time(), - 'coppa_user' => 0, - 'email_chg' => 1, - 'ip_address' => $this->member->ip_address, - 'prev_email' => $this->memberData['email'], - ); - - if ( $this->memberData['member_group_id'] != $this->settings['auth_group'] ) - { - $db_str['real_group'] = $this->memberData['member_group_id']; - } - - $this->DB->insert( 'validating', $db_str ); - - IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'member_group_id' => $this->settings['auth_group'], - 'email' => $_emailOne ) ) ); - - IPSLib::runMemberSync( 'onEmailChange', $this->memberData['member_id'], mb_strtolower( $_emailOne ) ); - - //----------------------------------------- - // Update their session with the new member group - //----------------------------------------- - - if ( $this->member->session_id ) - { - $this->member->sessionClass()->convertMemberToGuest(); - } - - //----------------------------------------- - // Kill the cookies to stop auto log in - //----------------------------------------- - - IPSCookie::set( 'pass_hash' , '-1', 0 ); - IPSCookie::set( 'member_id' , '-1', 0 ); - IPSCookie::set( 'session_id' , '-1', 0 ); - - //----------------------------------------- - // Dispatch the mail, and return to the activate form. - //----------------------------------------- - - IPSText::getTextClass( 'email' )->getTemplate("newemail"); - - IPSText::getTextClass( 'email' )->buildMessage( array( - 'NAME' => $this->memberData['members_display_name'], - 'THE_LINK' => $this->settings['base_url']."app=core&module=global§ion=register&do=auto_validate&type=newemail&uid=".$this->memberData['member_id']."&aid=".$validate_key, - 'ID' => $this->memberData['member_id'], - 'MAN_LINK' => $this->settings['base_url']."app=core&module=global§ion=register&do=07", - 'CODE' => $validate_key, - ) ); - - IPSText::getTextClass( 'email' )->subject = $this->lang->words['lp_subject'].' '.$this->settings['board_name']; - IPSText::getTextClass( 'email' )->to = $_emailOne; - - IPSText::getTextClass( 'email' )->sendMail(); - - $this->registry->getClass('output')->redirectScreen( $this->lang->words['ce_redirect'], $this->settings['base_url'] . 'app=core&module=global&section=register&do=07' ); - } - else - { - //----------------------------------------- - // No authorisation needed, change email addy and return - //----------------------------------------- - - IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'email' => $_emailOne ) ) ); - - IPSLib::runMemberSync( 'onEmailChange', $this->memberData['member_id'], mb_strtolower( $_emailOne ) ); - - //----------------------------------------- - // Add to OK message - //----------------------------------------- - - $this->ok_message = $this->lang->words['ok_email_changed']; - - return TRUE; - } - } - - /** - * UserCP Save Form: Settings - * - * @access public - * @param array Array of member / core_sys_login information (if we're editing) - * @return mixed Array of errors / boolean true - */ - public function saveFormSettings( $member=array() ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $timeZone = IPSText::alphanumericalClean( $this->request['timeZone'], '+.' ); - $dst_correct = intval( $this->request['dst_correct'] ); - - //----------------------------------------- - // RTE - //----------------------------------------- - - if ( ! $this->settings['posting_allow_rte'] ) - { - $this->request[ 'editorChoice'] = 0 ; - } - - //----------------------------------------- - // PM Settings: 2 means admin says no. - //----------------------------------------- - - if ( $this->memberData[ 'members_disable_pm' ] == 2 ) - { - $this->member->setProperty( 'members_disable_pm', 2 ); - } - else - { - $this->member->setProperty( 'members_disable_pm', intval( $this->request[ 'disableMessenger' ] ) ); - } - - //----------------------------------------- - // Only one account per identity url - //----------------------------------------- - - if( $this->request['identity_url'] ) - { - $account = $this->DB->buildAndFetch( array( 'select' => 'member_id', 'from' => 'members', 'where' => "identity_url='" . trim($this->request['identity_url']) . "' AND member_id<>" . $this->memberData['member_id'] ) ); - - if( $account['member_id'] ) - { - return array( 0 => $this->lang->words['identity_url_assoc'] ); - } - - //----------------------------------------- - // Need to clean up identity URL a little - //----------------------------------------- - - $identityUrl = trim($this->request['identity_url']); - $identityUrl = rtrim( $identityUrl, "/" ); - - if( !strpos( $identityUrl, 'http://' ) === 0 AND !strpos( $identityUrl, 'https://' ) === 0 ) - { - $identityUrl = 'http://' . $identityUrl; - } - } - - /* Figure out BW options */ - $toSave = IPSBWOptions::thaw( $this->memberData['members_bitoptions'], 'members' ); - - foreach( array( 'bw_vnc_type', 'bw_forum_result_type' ) as $field ) - { - $toSave[ $field ] = intval( $this->request[ $field ] ); - } - - IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'hide_email' => intval( $this->request['hide_email'] ), - 'email_pm' => intval( $this->request['pm_reminder'] ), - 'allow_admin_mails' => intval( $this->request['admin_send'] ), - 'time_offset' => $timeZone, - 'dst_in_use' => ( $this->request['dstOption'] AND intval($this->request['dstCheck']) == 0 ) ? intval($this->request['dstOption']) : 0, - 'members_auto_dst' => intval($this->request['dstCheck']), - 'members_disable_pm' => intval($this->memberData['members_disable_pm']), - 'members_editor_choice' => $this->request['editorChoice'] ? 'rte' : 'std', - 'member_uploader' => $this->request['member_uploader'] ? 'flash' : 'default', - 'view_pop' => intval($this->request['showPMPopUp']), - 'identity_url' => isset($identityUrl) ? $identityUrl : $this->memberData['identity_url'], - 'members_bitoptions' => IPSBWOptions::freeze( $toSave, 'members' ) ) ) ); - - return TRUE; - } - - /** - * Password check - * - * @access private - * @param string Plain Text Password - * @return boolean Password matched or not - */ - private function _checkPassword( $password_check ) - { - //----------------------------------------- - // Ok, check password first - //----------------------------------------- - - require_once( IPS_ROOT_PATH.'sources/handlers/han_login.php' ); - $this->han_login = new han_login( $this->registry ); - $this->han_login->init(); - - //----------------------------------------- - // Is this a username or email address? - //----------------------------------------- - - $this->han_login->loginPasswordCheck( $this->memberData['name'], $this->memberData['email'], $password_check ); - - if ( $this->han_login->return_code == 'SUCCESS' ) - { - return TRUE; - } - else - { - return FALSE; - } - } + + * Invision Power Services + * IP.Board v3.1.4 + * Core user control panel plugin + * Last Updated: $Date: 2010-10-25 06:54:59 -0400 (Mon, 25 Oct 2010) $ + * + * + * @author $Author: mmecham $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 20th February 2002 + * @version $Rev: 7029 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class usercpForms_core extends public_core_usercp_manualResolver implements interface_usercp +{ + /** + * Tab name + * This can be left blank and the application title will + * be used + * + * @var string + */ + public $tab_name = "Настройки"; + + /** + * OK Message + * This is an optional message to return back to the framework + * to replace the standard 'Settings saved' message + * + * @var string + */ + public $ok_message = ''; + + /** + * Hide 'save' button and form elements + * Useful if you have custom output that doesn't + * require it + * + * @var bool + */ + public $hide_form_and_save_button = false; + + /** + * If you wish to allow uploads, set a value for this + * + * @var integer + */ + public $uploadFormMax = 0; + + /** + * Flag to indicate that the user is a facebook logged in user doozer + * + * @var boolean + */ + protected $_isFBUser = false; + + /** + * Initiate this module + * + * @return void + */ + public function init( ) + { + $this->tab_name = ipsRegistry::getClass('class_localization')->words['tab__core']; + + /* Facebook? */ + if ( IPSLib::fbc_enabled() === TRUE AND $this->memberData['fb_uid'] ) + { + $this->_isFBUser = true; + } + } + + /** + * Return links for this tab + * You may return an empty array or FALSE to not have + * any links show in the tab. + * + * The links must have 'area=xxxxx'. The rest of the URL + * is added automatically. + * 'area' can only be a-z A-Z 0-9 - _ + * + * @author Matt Mecham + * @return array Links + */ + public function getLinks() + { + ipsRegistry::instance()->getClass('class_localization')->loadLanguageFile( array( 'public_usercp' ), 'core' ); + + $array = array(); + + $array[] = array( 'url' => 'area=settings', + 'title' => ipsRegistry::instance()->getClass('class_localization')->words['ucp_general_settings'], + 'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'settings' ? 1 : 0, + 'area' => 'settings' + ); + + $array[] = array( 'url' => 'area=email', + 'title' => ipsRegistry::instance()->getClass('class_localization')->words['ucp_change_email'], + 'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'email' ? 1 : 0, + 'area' => 'email' + ); + + $array[] = array( 'url' => 'area=password', + 'title' => ipsRegistry::instance()->getClass('class_localization')->words['ucp_change_password'], + 'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'password' ? 1 : 0, + 'area' => 'password' + ); + + if ( $this->settings['auth_allow_dnames'] == 1 AND $this->memberData['g_dname_changes'] > 0 ) + { + $array[] = array( 'url' => 'area=displayname', + 'title' => ipsRegistry::instance()->getClass('class_localization')->words['ucp_change_name'], + 'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'displayname' ? 1 : 0, + 'area' => 'displayname' + ); + } + + $array[] = array( 'url' => 'area=notes', + 'title' => ipsRegistry::instance()->getClass('class_localization')->words['m_notes'], + 'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'notes' ? 1 : 0, + 'area' => 'notes' + ); + + if ( $this->memberData['g_attach_max'] != -1 ) + { + $array[] = array( + 'url' => 'area=attachments', + 'title' => ipsRegistry::instance()->getClass('class_localization')->words['m_attach'], + 'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'attachments' ? 1 : 0, + 'area' => 'attachments' + ); + } + + if( IPSLib::haveAppsWithLike() ) + { + $array[] = array( + 'url' => 'area=likes', + 'title' => ipsRegistry::instance()->getClass('class_localization')->words['m_likesystem'], + 'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'likes' ? 1 : 0, + 'area' => 'likes' + ); + } + + $array[] = array( 'url' => 'area=notifications', + 'title' => ipsRegistry::instance()->getClass('class_localization')->words['m_notifications'], + 'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'notifications' ? 1 : 0, + 'area' => 'notifications' + ); + + $array[] = array( 'url' => 'area=notificationlog', + 'title' => ipsRegistry::instance()->getClass('class_localization')->words['m_arch_notify'], + 'active' => ( in_array( $this->request['area'], array( 'notificationlog', 'viewNotification', 'removeNotifications' ) ) ) ? 1 : 0, + 'area' => 'notificationlog' + ); + + return $array; + } + + + /** + * Run custom event + * + * If you pass a 'do' in the URL / post form that is not either: + * save / save_form or show / show_form then this function is loaded + * instead. You can return a HTML chunk to be used in the UserCP (the + * tabs and footer are auto loaded) or redirect to a link. + * + * If you are returning HTML, you can use $this->hide_form_and_save_button = 1; + * to remove the form and save button that is automatically placed there. + * + * @author Matt Mecham + * @param string Current area + * @return mixed html or void + */ + public function runCustomEvent( $currentArea ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $html = ''; + + //----------------------------------------- + // What to do? + //----------------------------------------- + + switch( $currentArea ) + { + case 'updateAttachments': + return $this->customEvent_updateAttachments(); + break; + + case 'viewNotification': + $html = $this->customEvent_viewNotification(); + break; + + case 'markNotification': + return $this->customEvent_markNotification(); + break; + + case 'removeNotifications': + return $this->customEvent_removeNotifications(); + break; + + case 'moderateLikes': + return $this->customEvent_moderateLikeList(); + break; + } + + //----------------------------------------- + // Turn off save button + //----------------------------------------- + + $this->hide_form_and_save_button = 1; + + //----------------------------------------- + // Return + //----------------------------------------- + + return $html; + } + + /** + * Moderate your list of liked content + * + * @author bfarber + * @return string HTML to display + */ + public function customEvent_moderateLikeList() + { + //----------------------------------------- + // Get the likes we selected + //----------------------------------------- + + $_likes = array(); + + if( is_array($this->request['likes']) AND count($this->request['likes']) ) + { + foreach( $this->request['likes'] as $_like ) + { + $_thisLike = explode( '-', $_like ); + $_likes[] = array( + 'app' => $_thisLike[0], + 'area' => $_thisLike[1], + 'id' => $_thisLike[2], + ); + } + } + + //----------------------------------------- + // Got any? + //----------------------------------------- + + if( !count($_likes) OR !is_array($_likes) ) + { + return $this->showLikeList( $this->lang->words['no_likes_for_del'] ); + } + + //----------------------------------------- + // Get like helper class + //----------------------------------------- + + $bootstraps = array(); + + require_once( IPS_ROOT_PATH . 'sources/classes/like/composite.php' ); + + //----------------------------------------- + // Loop over and moderate + //----------------------------------------- + + foreach( $_likes as $_like ) + { + $_bootstrap = classes_like::bootstrap( $_like['app'], $_like['area'] ); + $_likeKey = classes_like_registry::getKey( $_like['id'], $this->memberData['member_id'] ); + $_frequencies = $_bootstrap->allowedFrequencies(); + + //----------------------------------------- + // What action to take? + //----------------------------------------- + + switch( $this->request['modaction'] ) + { + case 'delete': + $_bootstrap->remove( $_like['id'], $this->memberData['member_id'] ); + break; + + case 'change-donotify': + $this->DB->update( 'core_like', array( 'like_notify_do' => 1, 'like_notify_freq' => 'immediate' ), "like_id='" . addslashes($_likeKey) . "'" ); + break; + + case 'change-donotnotify': + $this->DB->update( 'core_like', array( 'like_notify_do' => 0 ), "like_id='" . addslashes($_likeKey) . "'" ); + break; + + case 'change-immediate': + if( in_array( 'immediate', $_frequencies ) ) + { + $this->DB->update( 'core_like', array( 'like_notify_do' => 1, 'like_notify_freq' => 'immediate' ), "like_id='" . addslashes($_likeKey) . "'" ); + } + break; + + case 'change-offline': + if( in_array( 'offline', $_frequencies ) ) + { + $this->DB->update( 'core_like', array( 'like_notify_do' => 1, 'like_notify_freq' => 'offline' ), "like_id='" . addslashes($_likeKey) . "'" ); + } + break; + + case 'change-daily': + if( in_array( 'daily', $_frequencies ) ) + { + $this->DB->update( 'core_like', array( 'like_notify_do' => 1, 'like_notify_freq' => 'daily' ), "like_id='" . addslashes($_likeKey) . "'" ); + } + break; + + case 'change-weekly': + if( in_array( 'weekly', $_frequencies ) ) + { + $this->DB->update( 'core_like', array( 'like_notify_do' => 1, 'like_notify_freq' => 'weekly' ), "like_id='" . addslashes($_likeKey) . "'" ); + } + break; + + case 'change-anon': + $this->DB->update( 'core_like', array( 'like_is_anon' => 1 ), "like_id='" . addslashes($_likeKey) . "'" ); + break; + + case 'change-noanon': + $this->DB->update( 'core_like', array( 'like_is_anon' => 0 ), "like_id='" . addslashes($_likeKey) . "'" ); + break; + } + } + + $this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=usercp&tab=core&area=likes&confirm=1" ); + } + + /** + * Delete attachments + * + * @author Matt Mecham + * @return string Processed HTML + */ + public function customEvent_updateAttachments() + { + //----------------------------------------- + // Get the ID's to delete + //----------------------------------------- + + $finalIDs = array(); + + //----------------------------------------- + // Grab post IDs + //----------------------------------------- + + if ( is_array( $_POST['attach'] ) and count( $_POST['attach'] ) ) + { + foreach( $_POST['attach'] as $id => $value ) + { + $finalIDs[ $id ] = intval( $id ); + } + } + + if ( count($finalIDs) > 0 ) + { + $this->DB->build( array( 'select' => 'a.*', + 'from' => array( 'attachments' => 'a' ), + 'where' => "a.attach_id IN (" . implode( ",", $finalIDs ) .") AND a.attach_rel_module IN( 'post', 'msg' ) AND attach_member_id=" . $this->memberData['member_id'], + 'add_join' => array( + array( 'select' => 'p.topic_id, p.pid', + 'from' => array( 'posts' => 'p' ), + 'where' => "p.pid=a.attach_rel_id AND a.attach_rel_module='post'", + 'type' => 'left' + ), + array( 'select' => 'mt.msg_id, mt.msg_topic_id', + 'from' => array( 'message_posts' => 'mt' ), + 'where' => "mt.msg_id=a.attach_rel_id AND a.attach_rel_module='msg'", + 'type' => 'left' + ), + ) + ) ); + + $o = $this->DB->execute(); + + while ( $killmeh = $this->DB->fetch( $o ) ) + { + if ( $killmeh['attach_location'] ) + { + @unlink( $this->settings['upload_dir']."/".$killmeh['attach_location'] ); + } + if ( $killmeh['attach_thumb_location'] ) + { + @unlink( $this->settings['upload_dir']."/".$killmeh['attach_thumb_location'] ); + } + + if ( $killmeh['topic_id'] ) + { + $this->DB->update( 'topics', 'topic_hasattach=topic_hasattach-1', 'tid='.$killmeh['topic_id'], true, true ); + } + else if( $killmeh['msg_id'] ) + { + $this->DB->update( 'message_topics', 'mt_hasattach=mt_hasattach-1', 'mt_id='.$killmeh['msg_topic_id'], true, true ); + } + } + + $this->DB->delete( 'attachments', 'attach_id IN ('.implode(",",$finalIDs).') and attach_member_id='.$this->memberData['member_id'] ); + } + + $this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=usercp&tab=core&area=attachments&do=show" ); + } + + /** + * UserCP handle our notifications + * + * @return boolean Successful + */ + public function customEvent_removeNotifications() + { + //----------------------------------------- + // Check form hash + //----------------------------------------- + + $this->request['secure_key'] = $this->request['secure_key'] ? $this->request['secure_key'] : $this->request['md5check']; + + if( $this->request['secure_key'] != $this->member->form_hash ) + { + $this->registry->output->showError( 'usercp_forums_bad_key', 1021523 ); + } + + //----------------------------------------- + // Notifications library + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' ); + $notifyLibrary = new $classToLoad( $this->registry ); + $notifyLibrary->setMember( $this->memberData ); + + //----------------------------------------- + // Delete the notifications + //----------------------------------------- + + $_toDelete = IPSLib::cleanIntArray( $this->request['notifications'] ); + + if( !count($_toDelete) ) + { + return $this->showInlineNotifications( $this->lang->words['no_notify_del'] ); + } + + $this->DB->delete( 'inline_notifications', "notify_id IN(" . implode( ',', $_toDelete ) . ") AND notify_to_id=" . $this->memberData['member_id'] ); + + //----------------------------------------- + // If member has 'unread' count, rebuild count + //----------------------------------------- + + if( $this->memberData['notification_cnt'] ) + { + $notifyLibrary->rebuildUnreadCount(); + } + + //----------------------------------------- + // Redirect + //----------------------------------------- + + $this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=usercp&tab=core&area=notificationlog&confirm=1" ); + } + + /** + * Mark a notification + * + * @return string HTML + */ + public function customEvent_markNotification() + { + //----------------------------------------- + // Notifications library + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' ); + $notifyLibrary = new $classToLoad( $this->registry ); + $notifyLibrary->setMember( $this->memberData ); + + //----------------------------------------- + // Get notification + //----------------------------------------- + + /* Marking them all as read? */ + if ( $this->request['mark'] == 'all' ) + { + $this->DB->update( 'inline_notifications', array( 'notify_read' => time() ), 'notify_to_id=' . $this->memberData['member_id'] ); + } + else + { + $id = intval($this->request['mark']); + $notification = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'inline_notifications', 'where' => 'notify_id=' . $id ) ); + + //----------------------------------------- + // Error checking + //----------------------------------------- + + if( !$notification['notify_id'] ) + { + if( $this->request['ajax'] ) + { + print 'ok'; + exit; + } + else + { + $this->registry->getClass('output')->silentRedirect( $this->settings['base_url'] . "app=core&module=usercp&tab=notificationlog" ); + } + } + + if( $notification['notify_to_id'] != $this->memberData['member_id'] ) + { + if( $this->request['ajax'] ) + { + print 'ok'; + exit; + } + else + { + $this->registry->getClass('output')->silentRedirect( $this->settings['base_url'] . "app=core&module=usercp&tab=notificationlog" ); + } + } + + //----------------------------------------- + // Update read timestamp + //----------------------------------------- + + $this->DB->update( 'inline_notifications', array( 'notify_read' => time() ), 'notify_id=' . $id ); + } + + //----------------------------------------- + // If member has 'unread' count, rebuild count + //----------------------------------------- + + if( $this->memberData['notification_cnt'] ) + { + $notifyLibrary->rebuildUnreadCount(); + } + + if( $this->request['ajax'] ) + { + print 'ok'; + exit; + } + else + { + $_returnTo = $_SERVER['HTTP_REFERER'] ? $_SERVER['HTTP_REFERER'] : $this->settings['base_url']; + + $this->registry->output->silentRedirect( $_returnTo ); + } + } + + /** + * View a notification + * + * @return string HTML + */ + public function customEvent_viewNotification() + { + //----------------------------------------- + // Notifications library + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' ); + $notifyLibrary = new $classToLoad( $this->registry ); + $notifyLibrary->setMember( $this->memberData ); + + //----------------------------------------- + // Get notification + //----------------------------------------- + + $id = intval($this->request['view']); + $notification = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'inline_notifications', 'where' => 'notify_id=' . $id ) ); + + //----------------------------------------- + // Error checking + //----------------------------------------- + + if( !$notification['notify_id'] ) + { + $this->registry->output->showError( 'bad_notify_id', 10191 ); + } + + if( $notification['notify_to_id'] != $this->memberData['member_id'] ) + { + $this->registry->output->showError( 'bad_notify_id', 10192 ); + } + + //----------------------------------------- + // Update read timestamp + //----------------------------------------- + + $this->DB->update( 'inline_notifications', array( 'notify_read' => time() ), 'notify_id=' . $id ); + + //----------------------------------------- + // If member has 'unread' count, rebuild count + //----------------------------------------- + + if( $this->memberData['notification_cnt'] ) + { + $notifyLibrary->rebuildUnreadCount(); + } + + //----------------------------------------- + // Parse for display + //----------------------------------------- + + /* As the email template parser makes an attempt to reparse 'safe' HTML, we need to make it safe here */ + $notification['notify_text'] = IPSText::htmlspecialchars( $notification['notify_text'] ); + + IPSText::getTextClass('bbcode')->parse_smilies = 1; + IPSText::getTextClass('bbcode')->parse_nl2br = 1; + IPSText::getTextClass('bbcode')->parse_html = 0; + IPSText::getTextClass('bbcode')->parse_bbcode = 1; + IPSText::getTextClass('bbcode')->parsing_section = 'global'; + + $notification['notify_text'] = IPSText::getTextClass('bbcode')->preDisplayParse( nl2br( $notification['notify_text'] ) ); + + //----------------------------------------- + // Show notification + //----------------------------------------- + + $this->_nav[] = array( $this->lang->words['m_arch_notify'], 'app=core&module=usercp&tab=core&area=notificationlog' ); + return $this->registry->getClass('output')->getTemplate('ucp')->showNotification( $notification ); + } + + /** + * UserCP Form Show + * + * @author Matt Mecham + * @param string Current area as defined by 'get_links' + * @param array Array of errors + * @return string Processed HTML + */ + public function showForm( $current_area, $errors=array() ) + { + //----------------------------------------- + // Where to go, what to see? + //----------------------------------------- + + switch( $current_area ) + { + default: + case 'settings': + return $this->showFormSettings(); + break; + case 'email': + return $this->showFormEmail(); + break; + case 'password': + return $this->showFormPassword(); + break; + case 'displayname': + return $this->showFormDisplayname(); + break; + case 'attachments': + return $this->showFormAttachments(); + break; + case 'notes': + return $this->showFormNotes(); + break; + case 'notifications': + return $this->showFormNotifications(); + break; + case 'notificationlog': + return $this->showInlineNotifications(); + break; + case 'likes': + return $this->showLikeList(); + break; + } + } + + /** + * Show the logged inline notifications + * + * @author Brandon Farber + * @param string Error message + * @return string Processed HTML + */ + public function showLikeList( $error='' ) + { + /* Init */ + $start = intval( $this->request['st'] ); + $perPage = 50; + + //----------------------------------------- + // Turn off normal form + //----------------------------------------- + + $this->hide_form_and_save_button = 1; + + //----------------------------------------- + // Get like helper class + //----------------------------------------- + + require_once( IPS_ROOT_PATH . 'sources/classes/like/composite.php' ); + + //----------------------------------------- + // Get list of items user likes + //----------------------------------------- + + $_likes = array(); + + $count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as er', + 'from' => 'core_like', + 'where' => 'like_member_id=' . $this->memberData['member_id'] ) ); + + $this->DB->build( array( 'select' => '*', + 'from' => 'core_like', + 'where' => 'like_member_id=' . $this->memberData['member_id'], + 'limit' => array( $start, $perPage ), + 'order' => 'like_added DESC' ) ); + $outer = $this->DB->execute(); + + while( $r = $this->DB->fetch($outer) ) + { + $_likes[ $r['like_id'] ] = $r; + } + + /* Process */ + $_likes = classes_like_meta::get( $_likes ); + + $pages = $this->registry->getClass('output')->generatePagination( array( 'totalItems' => $count['er'], + 'itemsPerPage' => $perPage, + 'currentStartValue' => $start, + 'baseUrl' => "app=core&module=usercp&tab=core&area=likes" ) ); + + //----------------------------------------- + // Send to template + //----------------------------------------- + + return $this->registry->getClass('output')->getTemplate('ucp')->likesList( $_likes, $error, $pages ); + } + + /** + * Show the logged inline notifications + * + * @author Brandon Farber + * @param string Error message + * @return string Processed HTML + */ + public function showInlineNotifications( $error='' ) + { + /* Init */ + $start = intval( $this->request['st'] ); + $perPage = 50; + + //----------------------------------------- + // Get class + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' ); + $notifyLibrary = new $classToLoad( $this->registry ); + + //----------------------------------------- + // Turn off normal form + //----------------------------------------- + + $this->hide_form_and_save_button = 1; + + //----------------------------------------- + // Get notifications + //----------------------------------------- + + $_notifications = array(); + + $count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as er', + 'from' => 'inline_notifications', + 'where' => 'notify_to_id=' . $this->memberData['member_id'] ) ); + + $this->DB->build( array( 'select' => '*', + 'from' => 'inline_notifications', + 'where' => 'notify_to_id=' . $this->memberData['member_id'], + 'limit' => array( $start, $perPage ), + 'order' => 'notify_sent DESC' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $r['notify_icon'] = $notifyLibrary->getNotificationIcon( $r['notify_type_key'] ); + + $_notifications[] = $r; + } + + $pages = $this->registry->getClass('output')->generatePagination( array( 'totalItems' => $count['er'], + 'itemsPerPage' => $perPage, + 'currentStartValue' => $start, + 'baseUrl' => "app=core&module=usercp&tab=core&area=notificationlog" ) ); + + //----------------------------------------- + // Send to template + //----------------------------------------- + + return $this->registry->getClass('output')->getTemplate('ucp')->notificationsLog( $_notifications, $error, $pages ); + } + + /** + * Show notification configuration form + * + * @author Brandon Farber + * @return string Processed HTML + */ + public function showFormNotifications() + { + //----------------------------------------- + // Notifications library + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' ); + $notifyLibrary = new $classToLoad( $this->registry ); + $notifyLibrary->setMember( $this->memberData ); + + //----------------------------------------- + // Show the form + //----------------------------------------- + + $_basicOptions = array( array( 'email', $this->lang->words['notopt__email'] ), array( 'pm', $this->lang->words['notopt__pm'] ), array( 'inline', $this->lang->words['notopt__inline'] ), array( 'mobile', $this->lang->words['notopt__mobile'] ) ); + $_configOptions = $notifyLibrary->getNotificationData( TRUE ); + $_notifyConfig = $notifyLibrary->getMemberNotificationConfig(); + $_defaultConfig = $notifyLibrary->getDefaultNotificationConfig(); + $_formOptions = array(); + + foreach( $_configOptions as $option ) + { + $_thisConfig = $_notifyConfig[ $option['key'] ]; + + //----------------------------------------- + // Determine available options + //----------------------------------------- + + $_available = array(); + + foreach( $_basicOptions as $_bo ) // ewwww :P + { + if( !is_array($_defaultConfig[ $option['key'] ]['disabled']) OR !in_array( $_bo[0], $_defaultConfig[ $option['key'] ]['disabled'] ) ) + { + $_available[] = $_bo; + } + } + + //----------------------------------------- + // If none available, at least give inline + //----------------------------------------- + + if( !count($_available) ) + { + $_available[] = array( 'inline', $this->lang->words['notify__inline'] ); + } + + //----------------------------------------- + // Start setting data to pass to form + //----------------------------------------- + + $_formOptions[ $option['key'] ] = array(); + $_formOptions[ $option['key'] ]['key'] = $option['key']; + + //----------------------------------------- + // Rikki asked for this... + //----------------------------------------- + + foreach( $_available as $_availOption ) + { + $_formOptions[ $option['key'] ]['options'][ $_availOption[0] ] = $_availOption; + } + + //$_formOptions[ $option['key'] ]['options'] = $_available; + + $_formOptions[ $option['key'] ]['defaults'] = $_thisConfig['selected']; + $_formOptions[ $option['key'] ]['disabled'] = 0; + + //----------------------------------------- + // Don't allow member to configure + // Still show, but disable on form + //----------------------------------------- + + if( $_defaultConfig[ $option['key'] ]['disable_override'] ) + { + $_formOptions[ $option['key'] ]['disabled'] = 1; + $_formOptions[ $option['key'] ]['defaults'] = $_defaultConfig[ $option['key'] ]['selected']; + } + } + + //----------------------------------------- + // Other settings + //----------------------------------------- + + $_emailData = array(); + + //----------------------------------------- + // Email settings... + //----------------------------------------- + + foreach( array('email_full', 'auto_track') as $k ) + { + if ( $this->memberData[ $k ] ) + { + $_emailData[ $k ] = 'checked="checked"'; + } + else + { + $_emailData[ $k ] = ''; + } + } + + foreach( array( 'none', 'immediate', 'delayed', 'daily', 'weekly' ) as $_opt ) + { + $_emailData['trackOption'][ $_opt ] = ( $this->memberData['auto_track'] == $_opt ) ? 'selected="selected"' : ''; + } + + return $this->registry->getClass('output')->getTemplate('ucp')->notificationsForm( $_formOptions, $_emailData ); + } + + /** + * Show the attachments form + * + * @author Matt Mecham + * @return string Processed HTML + */ + public function showFormAttachments() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $info = array(); + $start = intval( $this->request['st'] ); + $perpage = 15; + $sort_key = ""; + $attachments = array(); + + $this->hide_form_and_save_button = 1; + + //----------------------------------------- + // Sort it + //----------------------------------------- + + switch ( $this->request['sort'] ) + { + case 'date': + $sort_key = 'a.attach_date ASC'; + $info['date_order'] = 'rdate'; + $info['size_order'] = 'size'; + break; + case 'rdate': + $sort_key = 'a.attach_date DESC'; + $info['date_order'] = 'date'; + $info['size_order'] = 'size'; + break; + case 'size': + $sort_key = 'a.attach_filesize DESC'; + $info['date_order'] = 'date'; + $info['size_order'] = 'rsize'; + break; + case 'rsize': + $sort_key = 'a.attach_filesize ASC'; + $info['date_order'] = 'date'; + $info['size_order'] = 'size'; + break; + default: + $sort_key = 'a.attach_date DESC'; + $info['date_order'] = 'date'; + $info['size_order'] = 'size'; + break; + } + + //----------------------------------------- + // Get some stats... + //----------------------------------------- + + $maxspace = intval($this->memberData['g_attach_max']); + + if ( $this->memberData['g_attach_max'] == -1 ) + { + $this->registry->getClass('output')->showError( 'no_permission_to_attach', 1010 ); + } + + //----------------------------------------- + // Limit by forums + //----------------------------------------- + + $stats = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count, sum(attach_filesize) as sum', + 'from' => 'attachments', + 'where' => 'attach_member_id=' . $this->memberData['member_id'] . " AND attach_rel_module IN( 'post', 'msg' )" ) ); + + if ( $maxspace > 0 ) + { + //----------------------------------------- + // Figure out percentage used + //----------------------------------------- + + $info['has_limit'] = 1; + $info['full_percent'] = $stats['sum'] ? sprintf( "%.0f", ( ( $stats['sum'] / ($maxspace * 1024) ) * 100) ) : 0; + + if ( $info['full_percent'] > 100 ) + { + $info['full_percent'] = 100; + } + else if ( $info['full_percent'] < 1 AND $stats['count'] > 0 ) + { + $info['full_percent'] = 1; + } + + $info['attach_space_count'] = sprintf( $this->lang->words['attach_space_count'], intval($stats['count']), intval($info['full_percent']) ); + $info['attach_space_used'] = sprintf( $this->lang->words['attach_space_used'] , IPSLib::sizeFormat(intval($stats['sum'])), IPSLib::sizeFormat($maxspace * 1024) ); + } + else + { + $info['has_limit'] = 0; + $info['attach_space_used'] = sprintf( $this->lang->words['attach_space_unl'] , IPSLib::sizeFormat(intval($stats['sum'])) ); + } + + //----------------------------------------- + // Pages + //----------------------------------------- + + $pages = $this->registry->getClass('output')->generatePagination( array( 'totalItems' => $stats['count'], + 'itemsPerPage' => $perpage, + 'currentStartValue' => $start, + 'baseUrl' => "app=core&module=usercp&tab=core&area=attachments&sort=" . $this->request['sort'] . "", + ) ); + + //----------------------------------------- + // Get attachments... + //----------------------------------------- + + $this->DB->build( array( 'select' => 'a.*', + 'from' => array( 'attachments' => 'a' ), + 'where' => "a.attach_member_id=" . $this->memberData['member_id'] . " AND a.attach_rel_module IN( 'post', 'msg' )", + 'order' => $sort_key, + 'limit' => array( $start, $perpage ), + 'add_join' => array( + array( 'select' => 'p.topic_id', + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.pid=a.attach_rel_id', + 'type' => 'left' + ), + array( 'select' => 't.*', + 'from' => array( 'topics' => 't' ), + 'where' => 't.tid=p.topic_id', + 'type' => 'left' + ) ) ) ); + $outer = $this->DB->execute(); + + $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_topic'), 'forums' ); + + $cache = $this->cache->getCache('attachtypes'); + + while ( $row = $this->DB->fetch( $outer ) ) + { + if ( IPSMember::checkPermissions('read', $row['forum_id'] ) != TRUE ) + { + $row['title'] = $this->lang->words['attach_topicmoved']; + } + + //----------------------------------------- + // Full attachment thingy + //----------------------------------------- + + if ( $row['attach_rel_module'] == 'post' ) + { + $row['_type'] = 'post'; + } + else if ( $row['attach_rel_module'] == 'msg' ) + { + $row['_type'] = 'msg'; + $row['title'] = $this->lang->words['attach_inpm']; + } + + /* IPB 2.x conversion */ + $row['image'] = str_replace( 'folder_mime_types', 'mime_types', $cache[ $row['attach_ext'] ]['atype_img'] ); + $row['short_name'] = IPSText::truncate( $row['attach_file'], 30 ); + $row['attach_date'] = $this->registry->getClass( 'class_localization')->getDate( $row['attach_date'], 'SHORT' ); + $row['real_size'] = IPSLib::sizeFormat( $row['attach_filesize'] ); + + $attachments[] = $row; + } + + return $this->registry->getClass('output')->getTemplate('ucp')->coreAttachments( $info, $pages, $attachments ); + } + + /** + * Show the Password form + * + * @author Matt Mecham + * @return string Processed HTML + */ + public function showFormPassword() + { + //----------------------------------------- + // Do we have another URL for password resets? + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $this->han_login = new $classToLoad( $this->registry ); + $this->han_login->init(); + $this->han_login->checkMaintenanceRedirect(); + + if( $this->memberData['g_access_cp'] ) + { + $this->hide_form_and_save_button = true; + } + + return $this->registry->getClass('output')->getTemplate('ucp')->passwordChangeForm(); + } + + /** + * Show the Email form + * + * @author Matt Mecham + * @param string Returned error message (if any) + * @return string Processed HTML + */ + public function showFormEmail( $_message='' ) + { + //----------------------------------------- + // Do not allow validating members to change + // email when admin validation is on + // @see http://community.invisionpower.com/tracker/issue-19964-loophole-in-registration-procedure/ + //----------------------------------------- + + if( $this->memberData['member_group_id'] == $this->settings['auth_group'] AND in_array( $this->settings['reg_auth_type'], array( 'admin', 'admin_user' ) ) ) + { + $this->registry->output->showError( $this->lang->words['admin_val_no_email_chg'], 10189 ); + } + + //----------------------------------------- + // Do we have another URL for email resets? + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $this->han_login = new $classToLoad( $this->registry ); + $this->han_login->init(); + $this->han_login->checkMaintenanceRedirect(); + + $txt = $this->lang->words['ce_current'] . $this->memberData['email']; + + if ( $this->settings['reg_auth_type']) + { + $txt .= $this->lang->words['ce_auth']; + } + + if ( $this->settings['bot_antispam_type'] != 'none' ) + { + $captchaHTML = $this->registry->getClass('class_captcha')->getTemplate(); + } + + $_message = $_message ? $this->lang->words[$_message] : ''; + + if( $this->memberData['g_access_cp'] ) + { + $this->hide_form_and_save_button = true; + } + + return $this->registry->getClass('output')->getTemplate('ucp')->emailChangeForm( $txt, $_message, $captchaHTML, $this->_isFBUser ); + } + + /** + * Show the display name form + * + * @author Matt Mecham + * @param string Error message (if any) + * @return string Processed HTML + */ + public function showFormDisplayname( $error="" ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $form = array(); + + //----------------------------------------- + // CHECK (please) + //----------------------------------------- + + if ( ! $this->settings['auth_allow_dnames'] OR $this->memberData['g_dname_changes'] < 1 OR $this->memberData['g_dname_date'] < 1 ) + { + $this->registry->getClass('output')->showError( 'no_permission_for_display_names', 1011 ); + } + + $this->request['display_name'] = $this->request['display_name'] ? $this->request['display_name'] : ''; + + $this->settings['username_errormsg'] = str_replace( '{chars}', $this->settings['username_characters'], $this->settings['username_errormsg'] ); + + //----------------------------------------- + // Grab # changes > 24 hours + //----------------------------------------- + + $time_check = time() - 86400 * $this->memberData['g_dname_date']; + + if( $time_check < $this->memberData['joined'] ) + { + $time_check = $this->memberData['joined']; + } + + $name_count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count, MIN(dname_date) as min_date', 'from' => 'dnames_change', 'where' => "dname_member_id=" . $this->memberData['member_id'] . " AND dname_date > $time_check" ) ); + + $name_count['count'] = intval( $name_count['count'] ); + $name_count['min_date'] = intval( $name_count['min_date'] ) ? intval( $name_count['min_date'] ) : $time_check; + + //----------------------------------------- + // Calculate # left + //----------------------------------------- + + /* Check new permissions */ + $_g = $this->caches['group_cache'][ $this->memberData['member_group_id'] ]; + + if ( $_g['g_displayname_unit'] ) + { + if ( $_g['gbw_displayname_unit_type'] ) + { + /* days */ + if ( $this->memberData['joined'] > ( time() - ( 86400 * $_g['g_displayname_unit'] ) ) ) + { + $this->hide_form_and_save_button = 1; + $form['_noPerm'] = sprintf( $this->lang->words['dname_group_restrict_date'], $this->lang->getDate( $this->memberData['joined'] + ( 86400 * $_g['g_displayname_unit'] ), 'long' ) ); + } + } + else + { + /* Posts */ + if ( $this->memberData['posts'] < $_g['g_displayname_unit'] ) + { + $this->hide_form_and_save_button = 1; + $form['_noPerm'] = sprintf( $this->lang->words['dname_group_restrict_posts'], $_g['g_displayname_unit'] - $this->memberData['posts'] ); + } + } + } + + if( !$form['_noPerm'] ) + { + $form['_changes_left'] = $this->memberData['g_dname_changes'] - $name_count['count']; + $form['_changes_done'] = $name_count['count']; + + # Make sure changes done isn't larger than allowed + # This happens when changing via ACP + + if ( $form['_changes_done'] > $this->memberData['g_dname_changes'] ) + { + $form['_changes_done'] = $this->memberData['g_dname_changes']; + } + + $form['_first_change'] = $this->registry->getClass( 'class_localization')->getDate( $name_count['min_date'], 'date', 1 ); + $form['_lang_string'] = sprintf( $this->lang->words['dname_string'], + $form['_changes_done'], $this->memberData['g_dname_changes'], + $form['_first_change'], $this->memberData['g_dname_changes'], + $this->memberData['g_dname_date'] ); + } + + //----------------------------------------- + // Print + //----------------------------------------- + + $this->_pageTitle = $this->lang->words['m_dname_change']; + + return $this->registry->getClass('output')->getTemplate('ucp')->displayNameForm( $form, $error, '', $this->_isFBUser ); + } + + /** + * Show the Settings form + * + * @author Matt Mecham + * @return string Processed HTML + */ + public function showFormSettings() + { + /* Sort the times */ + $times = array(); + + foreach( $this->lang->words as $k => $v ) + { + if( strpos( $k, "time_" ) === 0 ) + { + $k = str_replace( "time_", '', $k ); + + if( preg_match( '/^[\-\d\.]+$/', $k ) ) + { + $times[ $k ] = $v; + } + } + } + + ksort( $times ); + //uksort( $this->lang->words, create_function( '$a, $b', '$a = str_replace( "time_", "", $a ); $b = str_replace( "time_", "", $b ); return $a > $b;' ) ); + + /* Show the form */ + return $this->registry->getClass('output')->getTemplate('ucp')->generalSettingsForm( $times ); + } + + /** + * Show the Notes form + * + * @author Matt Mecham + * @return string Processed HTML + */ + public function showFormNotes() + { + /* Show the form */ + $member = IPSMember::load( $this->memberData['member_id'], 'extendedProfile' ); + $content = $member['notes']; + + return $this->registry->getClass('output')->getTemplate('ucp')->coreNotesForm( $content ); + } + + /** + * UserCP Form Check + * + * @author Matt Mecham + * @param string Current area as defined by 'get_links' + * @return string Processed HTML + */ + public function saveForm( $current_area ) + { + //----------------------------------------- + // Where to go, what to see? + //----------------------------------------- + + switch( $current_area ) + { + default: + case 'settings': + return $this->saveFormSettings(); + break; + case 'email': + return $this->saveFormEmail(); + break; + case 'password': + return $this->saveFormPassword(); + break; + case 'displayname': + return $this->saveFormDisplayname(); + break; + case 'notes': + return $this->saveFormNotes(); + break; + case 'notifications': + return $this->saveFormNotifications(); + break; + } + } + + /** + * UserCP Save Form: Notifications config + * + * @return boolean Successful + */ + public function saveFormNotifications() + { + //----------------------------------------- + // Notifications library + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' ); + $notifyLibrary = new $classToLoad( $this->registry ); + $notifyLibrary->setMember( $this->memberData ); + + //----------------------------------------- + // Show the form + //----------------------------------------- + + $_basicOptions = array( array( 'email', $this->lang->words['notopt__email'] ), array( 'pm', $this->lang->words['notopt__pm'] ), array( 'inline', $this->lang->words['notopt__inline'] ), array( 'mobile' => $this->lang->words['notopt__mobile'] ) ); + $_configOptions = $notifyLibrary->getNotificationData(); + $_notifyConfig = $notifyLibrary->getMemberNotificationConfig(); + $_defaultConfig = $notifyLibrary->getDefaultNotificationConfig(); + $_noPrivateMessage = array( 'new_private_message', 'reply_private_message' ); + $_saveConfig = array(); + + foreach( $_configOptions as $option ) + { + $_saveConfig[ $option['key'] ] = array(); + $_saveConfig[ $option['key'] ]['selected'] = array(); + + //----------------------------------------- + // Loop through and mark what we selected. + // Do not allow changing of stuff from disable_override + // and disabled, however + //----------------------------------------- + + if( is_array($this->request['config_' . $option['key'] ]) AND count($this->request['config_' . $option['key'] ]) ) + { + foreach( $this->request['config_' . $option['key'] ] as $_selected ) + { + if( !is_array($_defaultConfig[ $option['key'] ]['disabled']) OR !in_array( $_selected, $_defaultConfig[ $option['key'] ]['disabled'] ) ) + { + $_saveConfig[ $option['key'] ]['selected'][] = $_selected; + } + } + } + + if( $_defaultConfig[ $option['key'] ]['disable_override'] ) + { + $_saveConfig[ $option['key'] ]['selected'] = $_defaultConfig[ $option['key'] ]['selected']; + } + + /** + * @link http://community.invisionpower.com/tracker/issue-23453-notification-defaults/ + */ + if( in_array( $option['key'], $_noPrivateMessage ) AND in_array( 'pm', $_saveConfig[ $option['key'] ]['selected'] ) ) + { + $_newSelected = array(); + + foreach( $_saveConfig[ $option['key'] ]['selected'] as $_v ) + { + if( $_v != 'pm' ) + { + $_newSelected[] = $_v; + } + } + + $_saveConfig[ $option['key'] ]['selected'] = $_newSelected; + } + + //----------------------------------------- + // Nothing selected, default to inline/email/pm + // based on availability, or inline if none are available + // Decided to allow nothing selected to be 'no notification' + //----------------------------------------- + + //if( !count($_saveConfig[ $option['key'] ]['selected']) ) + //{ + // if( !in_array( 'inline', $_defaultConfig[ $option['key'] ]['disabled'] ) ) + // { + // $_saveConfig[ $option['key'] ]['selected'][] = 'inline'; + // } + // else if( !in_array( 'email', $_defaultConfig[ $option['key'] ]['disabled'] ) ) + // { + // $_saveConfig[ $option['key'] ]['selected'][] = 'email'; + // } + // else if( !in_array( 'pm', $_defaultConfig[ $option['key'] ]['disabled'] ) ) + // { + // $_saveConfig[ $option['key'] ]['selected'][] = 'pm'; + // } + // else + // { + // $_saveConfig[ $option['key'] ]['selected'][] = 'inline'; + // } + //} + } + + //----------------------------------------- + // Save + //----------------------------------------- + + IPSMember::packMemberCache( $this->memberData['member_id'], array( 'notifications' => $_saveConfig, 'show_notification_popup' => intval($this->request['show_notification_popup']) ), $this->memberData['members_cache'] ); + + //----------------------------------------- + // Topic preferences + //----------------------------------------- + + $_trackChoice = ''; + + if ( $this->request['auto_track'] ) + { + if ( in_array( $this->request['trackchoice'], array( 'none', 'immediate', 'delayed', 'daily', 'weekly' ) ) ) + { + $_trackChoice = $this->request['trackchoice']; + } + } + + //----------------------------------------- + // Profile preferences + //----------------------------------------- + + IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'hide_email' => intval( $this->request['hide_email'] ), + 'allow_admin_mails' => intval( $this->request['admin_send'] ), + 'members_disable_pm' => intval( $this->request['disableMessenger'] ), + 'email_full' => intval( $this->request['send_full_msg'] ), + 'auto_track' => $_trackChoice + ) ) ); + + return TRUE; + } + + /** + * UserCP Save Form: Notes + * + * @return boolean Successful + */ + public function saveFormNotes() + { + //----------------------------------------- + // Write it to the DB. + //----------------------------------------- + + IPSMember::save( $this->memberData['member_id'], array( 'extendedProfile' => array( 'notes' => htmlspecialchars($_POST['Post']) ) ) ); + + $this->ok_message = $this->lang->words['notes_saved_msg']; + return TRUE; + } + + /** + * UserCP Save Form: Password + * + * @param array Array of member / core_sys_login information (if we're editing) + * @return mixed Array of errors / boolean true + */ + public function saveFormPassword( $member=array() ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $cur_pass = trim($this->request['current_pass']); + $new_pass = trim($this->request['new_pass_1']); + $chk_pass = trim($this->request['new_pass_2']); + $isRemote = ( ! $this->memberData['bw_local_password_set'] AND $this->memberData['members_created_remote'] ) ? true : false; + + //----------------------------------------- + // Checks... + //----------------------------------------- + + if( $this->memberData['g_access_cp'] ) + { + return array( 0 => $this->lang->words['admin_emailpassword'] ); + } + + if ( $isRemote === false AND ( ! $_POST['current_pass'] OR ( empty($new_pass) ) or ( empty($chk_pass) ) ) ) + { + return array( 0 => $this->lang->words['complete_entire_form'] ); + } + + //----------------------------------------- + // Do the passwords actually match? + //----------------------------------------- + + if ( $new_pass != $chk_pass ) + { + return array( 0 => $this->lang->words['passwords_not_matchy'] ); + } + + //----------------------------------------- + // Check password... + //----------------------------------------- + + if ( $isRemote === false ) + { + if ( $this->_checkPassword( $cur_pass ) !== TRUE ) + { + return array( 0 => $this->lang->words['current_pw_bad'] ); + } + } + else + { + /* This is INIT in _checkPassword */ + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $this->han_login = new $classToLoad( $this->registry ); + $this->han_login->init(); + } + + /*if ( IPSText::mbstrlen( $new_pass ) > 32) + { + return array( 0 => $this->lang->words['new_pw_too_long'] ); + }*/ + + //----------------------------------------- + // Create new password... + //----------------------------------------- + + $md5_pass = md5($new_pass); + + //----------------------------------------- + // han_login was loaded during check_password + //----------------------------------------- + + $this->han_login->changePass( $this->memberData['email'], $md5_pass, $new_pass, $this->memberData ); + + if ( $this->han_login->return_code AND $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) + { + return array( 0 => $this->lang->words['hanlogin_pw_failed'] ); + } + + //----------------------------------------- + // Update the DB + //----------------------------------------- + + IPSMember::updatePassword( $this->memberData['email'], $md5_pass ); + + IPSLib::runMemberSync( 'onPassChange', $this->memberData['member_id'], $new_pass ); + + //----------------------------------------- + // Update members log in key... + //----------------------------------------- + + $key = IPSMember::generateAutoLoginKey(); + + IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'member_login_key' => $key, 'bw_local_password_set' => 1 ) ) ); + + $this->ok_message = $this->lang->words['pw_change_successful']; + + return TRUE; + } + + /** + * UserCP Save Form: Display Name + * + * @return mixed Array of errors / boolean true + */ + public function saveFormDisplayname() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $members_display_name = trim($this->request['displayName']); + $password_check = trim( $this->request['displayPassword'] ); + + //----------------------------------------- + // Check for blanks... + //----------------------------------------- + + if ( ! $members_display_name OR ( ! $this->_isFBUser AND ! $password_check ) ) + { + return array( 0 => $this->lang->words['complete_entire_form'] ); + } + + //----------------------------------------- + // Check password + //----------------------------------------- + + if ( ! $this->_isFBUser ) + { + if ( $this->_checkPassword( $password_check ) === FALSE ) + { + return array( 0 => $this->lang->words['current_pw_bad'] ); + } + } + + try + { + if ( IPSMember::getFunction()->updateName( $this->memberData['member_id'], $members_display_name, 'members_display_name' ) === TRUE ) + { + $this->cache->rebuildCache( 'stats', 'global' ); + + return $this->showFormDisplayname( '', $this->lang->words['dname_change_ok'] ); + } + else + { + # We should absolutely never get here. So this is a fail-safe, really to + # prevent a "false" positive outcome for the end-user + return array( 0 => $this->lang->words['name_taken_change'] ); + } + } + catch( Exception $error ) + { + switch( $error->getMessage() ) + { + case 'NO_MORE_CHANGES': + return array( 0 => $this->lang->words['name_change_no_more'] ); + break; + case 'NO_USER': + return array( 0 => $this->lang->words['name_change_noload'] ); + break; + case 'NO_PERMISSION': + return array( 0 => $this->lang->words['name_change_noperm'] ); + case 'NO_NAME': + return array( 0 => sprintf( $this->lang->words['name_change_tooshort'], $this->settings['max_user_name_length'] ) ); + break; + case 'TOO_LONG': + return array( 0 => sprintf( $this->lang->words['name_change_tooshort'], $this->settings['max_user_name_length'] ) ); + break; + case 'ILLEGAL_CHARS': + return array( 0 => $this->lang->words['name_change_illegal'] ); + break; + case 'USER_NAME_EXISTS': + return array( 0 => $this->lang->words['name_change_taken'] ); + break; + default: + return array( 0 => $error->getMessage() ); + break; + } + } + + return TRUE; + } + + /** + * UserCP Save Form: Email Address + * + * @return mixed Array of errors / boolean true + */ + public function saveFormEmail() + { + //----------------------------------------- + // Do not allow validating members to change + // email when admin validation is on + // @see http://community.invisionpower.com/tracker/issue-19964-loophole-in-registration-procedure/ + //----------------------------------------- + + if( $this->memberData['member_group_id'] == $this->settings['auth_group'] AND in_array( $this->settings['reg_auth_type'], array( 'admin', 'admin_user' ) ) ) + { + $this->registry->output->showError( $this->lang->words['admin_val_no_email_chg'], 10190 ); + } + + //----------------------------------------- + // INIT + //----------------------------------------- + + $_emailOne = mb_strtolower( trim($this->request['in_email_1']) ); + $_emailTwo = mb_strtolower( trim($this->request['in_email_2']) ); + $captchaInput = trim(ipsRegistry::$request['captchaInput']); + $captchaUniqueID = trim(ipsRegistry::$request['captchaUniqueID']); + + //----------------------------------------- + // Check input + //----------------------------------------- + + if( $this->memberData['g_access_cp'] ) + { + return array( 0 => $this->lang->words['admin_emailpassword'] ); + } + + if ( ! $_POST['in_email_1'] OR ! $_POST['in_email_2'] ) + { + return array( 0 => $this->lang->words['complete_entire_form'] ); + } + + //----------------------------------------- + // Check password... + //----------------------------------------- + + if ( ! $this->_isFBUser ) + { + if ( $this->_checkPassword( $this->request['password'] ) === FALSE ) + { + return array( 0 => $this->lang->words['current_pw_bad'] ); + } + } + + //----------------------------------------- + // Test email addresses + //----------------------------------------- + + if ( $_emailOne != $_emailTwo ) + { + return array( 0 => $this->lang->words['emails_no_matchy'] ); + } + + if ( IPSText::checkEmailAddress( $_emailOne ) !== TRUE ) + { + return array( 0 => $this->lang->words['email_not_valid'] ); + } + + //----------------------------------------- + // Is this email addy taken? + //----------------------------------------- + + if ( IPSMember::checkByEmail( $_emailOne ) == TRUE ) + { + return array( 0 => $this->lang->words['email_is_taken'] ); + } + + //----------------------------------------- + // Load ban filters + //----------------------------------------- + $banfilters = array(); + $this->DB->build( array( 'select' => '*', 'from' => 'banfilters' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $banfilters[ $r['ban_type'] ][] = $r['ban_content']; + } + + //----------------------------------------- + // Check in banned list + //----------------------------------------- + + if ( isset($banfilters['email']) AND is_array( $banfilters['email'] ) and count( $banfilters['email'] ) ) + { + foreach ( $banfilters['email'] as $email ) + { + $email = str_replace( '\*', '.*' , preg_quote($email, "/") ); + + if ( preg_match( "/^{$email}$/i", $_emailOne ) ) + { + return array( 0 => $this->lang->words['email_is_taken'] ); + } + } + } + + //----------------------------------------- + // Anti bot flood... + //----------------------------------------- + + if ( $this->settings['bot_antispam_type'] != 'none' ) + { + if ( $this->registry->getClass('class_captcha')->validate() !== TRUE ) + { + return array( 0 => $this->lang->words['captcha_email_invalid'] ); + } + } + + //----------------------------------------- + // Load handler... + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $this->han_login = new $classToLoad( $this->registry ); + $this->han_login->init(); + + if ( $this->han_login->emailExistsCheck( $_emailOne ) !== FALSE ) + { + return array( 0 => $this->lang->words['email_is_taken'] ); + } + + $this->han_login->changeEmail( $this->memberData['email'], $_emailOne, $this->memberData ); + + if ( $this->han_login->return_code AND $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) + { + return array( 0 => $this->lang->words['email_is_taken'] ); + } + + //----------------------------------------- + // Require new validation? NON ADMINS ONLY + //----------------------------------------- + + if ( $this->settings['reg_auth_type'] AND !$this->memberData['g_access_cp'] ) + { + //----------------------------------------- + // Remove any existing entries + //----------------------------------------- + + $_previous = $this->DB->buildAndFetch( array( 'select' => 'prev_email, real_group', 'from' => 'validating', 'where' => "member_id={$this->memberData['member_id']} AND email_chg=1" ) ); + + if( $_previous['prev_email'] ) + { + $this->DB->delete( 'validating', "member_id={$this->memberData['member_id']} AND email_chg=1" ); + + $this->memberData['email'] = $_previous['prev_email']; + $this->memberData['member_group_id'] = $_previous['real_group']; + } + + $validate_key = md5( IPSLib::makePassword() . time() ); + + //----------------------------------------- + // Update the new email, but enter a validation key + // and put the member in "awaiting authorisation" + // and send an email.. + //----------------------------------------- + + $db_str = array( + 'vid' => $validate_key, + 'member_id' => $this->memberData['member_id'], + 'temp_group' => $this->settings['auth_group'], + 'entry_date' => time(), + 'coppa_user' => 0, + 'email_chg' => 1, + 'ip_address' => $this->member->ip_address, + 'prev_email' => $this->memberData['email'], + ); + + if ( $this->memberData['member_group_id'] != $this->settings['auth_group'] ) + { + $db_str['real_group'] = $this->memberData['member_group_id']; + } + + $this->DB->insert( 'validating', $db_str ); + + IPSLib::runMemberSync( 'onEmailChange', $this->memberData['member_id'], mb_strtolower( $_emailOne ), $this->memberData['email'] ); + + IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'member_group_id' => $this->settings['auth_group'], + 'email' => $_emailOne ) ) ); + + //----------------------------------------- + // Update their session with the new member group + //----------------------------------------- + + if ( $this->member->session_id ) + { + $this->member->sessionClass()->convertMemberToGuest(); + } + + //----------------------------------------- + // Kill the cookies to stop auto log in + //----------------------------------------- + + IPSCookie::set( 'pass_hash' , '-1', 0 ); + IPSCookie::set( 'member_id' , '-1', 0 ); + IPSCookie::set( 'session_id' , '-1', 0 ); + + //----------------------------------------- + // Dispatch the mail, and return to the activate form. + //----------------------------------------- + + IPSText::getTextClass( 'email' )->getTemplate("newemail"); + + IPSText::getTextClass( 'email' )->buildMessage( array( + 'NAME' => $this->memberData['members_display_name'], + 'THE_LINK' => $this->settings['base_url']."app=core&module=global§ion=register&do=auto_validate&type=newemail&uid=".$this->memberData['member_id']."&aid=".$validate_key, + 'ID' => $this->memberData['member_id'], + 'MAN_LINK' => $this->settings['base_url']."app=core&module=global§ion=register&do=07", + 'CODE' => $validate_key, + ) ); + + IPSText::getTextClass( 'email' )->subject = $this->lang->words['lp_subject'].' '.$this->settings['board_name']; + IPSText::getTextClass( 'email' )->to = $_emailOne; + + IPSText::getTextClass( 'email' )->sendMail(); + + $this->registry->getClass('output')->redirectScreen( $this->lang->words['ce_redirect'], $this->settings['base_url'] . 'app=core&module=global&section=register&do=07' ); + } + else + { + //----------------------------------------- + // No authorisation needed, change email addy and return + //----------------------------------------- + + IPSLib::runMemberSync( 'onEmailChange', $this->memberData['member_id'], mb_strtolower( $_emailOne ), $this->memberData['email'] ); + + IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'email' => $_emailOne ) ) ); + + //----------------------------------------- + // Add to OK message + //----------------------------------------- + + $this->ok_message = $this->lang->words['ok_email_changed']; + + return TRUE; + } + } + + /** + * UserCP Save Form: Settings + * + * @param array Array of member / core_sys_login information (if we're editing) + * @return mixed Array of errors / boolean true + */ + public function saveFormSettings( $member=array() ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $timeZone = IPSText::alphanumericalClean( $this->request['timeZone'], '+.' ); + $dst_correct = intval( $this->request['dst_correct'] ); + + //----------------------------------------- + // RTE + //----------------------------------------- + + if ( ! $this->settings['posting_allow_rte'] ) + { + $this->request['editorChoice'] = 0; + } + + //----------------------------------------- + // PM Settings: 2 means admin says no. + //----------------------------------------- + + if ( $this->memberData['members_disable_pm' ] == 2 ) + { + $this->member->setProperty( 'members_disable_pm', 2 ); + } + else + { + $this->member->setProperty( 'members_disable_pm', intval( $this->request[ 'disableMessenger' ] ) ); + } + + //----------------------------------------- + // Only one account per identity url + //----------------------------------------- + + if( $this->request['identity_url'] ) + { + $account = $this->DB->buildAndFetch( array( 'select' => 'member_id', 'from' => 'members', 'where' => "identity_url='" . trim($this->request['identity_url']) . "' AND member_id<>" . $this->memberData['member_id'] ) ); + + if( $account['member_id'] ) + { + return array( 0 => $this->lang->words['identity_url_assoc'] ); + } + + //----------------------------------------- + // Need to clean up identity URL a little + //----------------------------------------- + + $identityUrl = trim($this->request['identity_url']); + $identityUrl = rtrim( $identityUrl, "/" ); + + if( !strpos( $identityUrl, 'http://' ) === 0 AND !strpos( $identityUrl, 'https://' ) === 0 ) + { + $identityUrl = 'http://' . $identityUrl; + } + } + + /* Figure out BW options */ + $toSave = IPSBWOptions::thaw( $this->memberData['members_bitoptions'], 'members' ); + + foreach( array( 'bw_vnc_type', 'bw_forum_result_type' ) as $field ) + { + $toSave[ $field ] = intval( $this->request[ $field ] ); + } + + IPSMember::save( $this->memberData['member_id'], array( 'core' => array( + 'time_offset' => $timeZone, + 'dst_in_use' => $this->settings['time_dst_auto_correction'] ? ( ( $this->request['dstOption'] AND intval($this->request['dstCheck']) == 0 ) ? intval($this->request['dstOption']) : 0 ) : $this->memberData['dst_in_use'], + 'members_auto_dst' => $this->settings['time_dst_auto_correction'] ? intval($this->request['dstCheck']) : $this->memberData['members_auto_dst'], + 'members_editor_choice' => $this->request['editorChoice'] ? 'rte' : 'std', + 'member_uploader' => $this->request['member_uploader'] ? 'flash' : 'default', + 'identity_url' => isset($identityUrl) ? $identityUrl : $this->memberData['identity_url'], + 'members_bitoptions' => IPSBWOptions::freeze( $toSave, 'members' ) ) ) ); + + return TRUE; + } + + /** + * Password check + * + * @param string Plain Text Password + * @return boolean Password matched or not + */ + private function _checkPassword( $password_check ) + { + //----------------------------------------- + // Ok, check password first + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $this->han_login = new $classToLoad( $this->registry ); + $this->han_login->init(); + + //----------------------------------------- + // Is this a username or email address? + //----------------------------------------- + + $this->han_login->loginPasswordCheck( $this->memberData['name'], $this->memberData['email'], $password_check ); + + if ( $this->han_login->return_code == 'SUCCESS' ) + { + return TRUE; + } + else + { + return FALSE; + } + } } \ No newline at end of file diff --git a/upload/admin/applications/core/index.html b/upload/admin/applications/core/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/index.html +++ b/upload/admin/applications/core/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/js/IPB3TemplateDiffResults.js b/upload/admin/applications/core/js/IPB3TemplateDiffResults.js new file mode 100644 index 00000000..7cdff5f7 --- /dev/null +++ b/upload/admin/applications/core/js/IPB3TemplateDiffResults.js @@ -0,0 +1,621 @@ +/** +* INVISION POWER BOARD v3 +* +* Topics View Javascript File +* @author Matt Mecham, Brandon Farber, Josh Williams +* @since 2008 +*/ + +/** +* "ACP" Class. Designed for ... ACP Template Diff Functions +* @author (v.1.0.0) Matt Mecham +*/ + +/* Prototype Ajax Global Responders + * Based on code from: http://codejanitor.com/wp/2006/03/23/ajax-timeouts-with-prototype/ + * Aborts ajax after a 5 minute delay of nothing happening +*/ + +var IPB3TemplateDiffResults = new IPB3TemplateDiffResults; + +function IPB3TemplateDiffResults() +{ + this.popUps = {}; + this.cookieArray = new Array(); + this.defaultCookieArray = new Array( 'merged', 'conflicted', 'uncommitted', 'committed' ); + + /** + * INIT + */ + this.init = function() + { + document.observe("dom:loaded", function() + { + /* Set up cbox all */ + $('cboxall').observe( 'click', IPB3TemplateDiffResults.toggleSelectAll ); + + /* Set up cbox handler */ + ipb.delegate.register(".__cbx", IPB3TemplateDiffResults.cboxEvent); + + cookie = ipb.Cookie.get('acp_mergecenter'); + Debug.write( cookie ); + + /* Set a fairly good default */ + if ( cookie ) + { + IPB3TemplateDiffResults.cookieArray = cookie.split( ',' ); + } + + if ( ! IPB3TemplateDiffResults.cookieArray.length ) + { + IPB3TemplateDiffResults.cookieArray = IPB3TemplateDiffResults.defaultCookieArray; + } + + /* Update the view */ + IPB3TemplateDiffResults.updateView(); + } ); + }; + + + /** + * Event when dude or dudette clicks a checko-boxo + */ + this.cboxEvent = function( e, elem ) + { + newArray = new Array(); + + $$('.__cbx').each( + function(x) + { + if ( x.checked ) + { + newArray.push( x.id.replace( '_cb_', '' ) ); + } + } + ); + + if ( ! newArray.length ) + { + IPB3TemplateDiffResults.cookieArray = IPB3TemplateDiffResults.defaultCookieArray; + } + else + { + IPB3TemplateDiffResults.cookieArray = newArray; + } + + /* Set cookie */ + ipb.Cookie.set( 'acp_mergecenter', IPB3TemplateDiffResults.cookieArray.join( ',' ) ); + + /* Update view */ + IPB3TemplateDiffResults.updateView(e); + }; + + /** + * View options + */ + this.updateView = function( e ) + { + /* Check */ + if ( ! IPB3TemplateDiffResults.cookieArray.length ) + { + IPB3TemplateDiffResults.cookieArray = IPB3TemplateDiffResults.defaultCookieArray; + } + + /* reset all headers */ + $$('.__group').invoke('show'); + + /* reset all items */ + $$('.__diffRow').invoke('hide'); + + /* Reset view cboxes */ + $$('.__cbx').each( function(x) { x.checked = false; } ); + + for( i = 0 ; i <= IPB3TemplateDiffResults.cookieArray.length ; i++ ) + { + opt = IPB3TemplateDiffResults.cookieArray[ i ]; + + switch( opt ) + { + case 'nocustom': + $$('._nochanges').invoke('show'); + $('_cb_nocustom').checked = true; + break; + case 'merged': + $$('.__canMerge').invoke('show'); + $('_cb_merged').checked = true; + break; + case 'conflicted': + $$('.__conflicts').invoke('show'); + $('_cb_conflicted').checked = true; + break; + case 'uncommitted': + $$('._uncommitted').invoke('show'); + $('_cb_uncommitted').checked = true; + break; + case 'committed': + $$('.__committed').invoke('show'); + $('_cb_committed').checked = true; + break; + } + } + + /* Go through and remove any group titles */ + $$('.__group').each( function( i ) + { + /* Extract group key */ + if ( $( i ).className.match( /_xgid/ ) ) + { + _g = $( i ).className.match( '_xgid([0-9a-zA-Z]+)' ); + + if ( _g != null && ! Object.isUndefined( _g ) ) + { + _groupKey = _g[1]; + + if ( _groupKey ) + { + _c = 0; + + $$('._xgid' + _groupKey).each( function(y) + { + if ( $(y).visible() ) + { + _c++; + } + } ); + + if ( _c < 2 ) + { + $(i).hide(); + } + } + } + } + } ); + }; + + /** + * Select all + */ + this.toggleSelectAll = function( e ) + { + /* Wot do we have? */ + var status = $('cboxall').checked; + + /* unselect? */ + if ( status == false ) + { + $$('.__xBox').each( function(x) { x.checked = false; } ); + } + else + { + /* Just select non-hidden items */ + $$('.__diffRow').each( function( i ) + { + if ( $(i).visible() ) + { + _g = $( i ).className.match( '__rowId([0-9]+)' ); + + if ( _g != null && ! Object.isUndefined( _g ) ) + { + $$('.__cBox' + _g[1]).each( function(x) { if ( ! x.disabled ) { x.checked = true; } } ); + } + } + } ); + } + }; + + /** + * View version + */ + this.viewVersion = function( changeId, type ) + { + /* Grab it via ajax */ + var _url = ipb.vars['base_url'] + "&app=core&module=ajax§ion=templatediff&do=viewVersion&change_id=" + changeId + '&type=' + type + '&secure_key=' + ipb.vars['md5_hash']; + + new Ajax.Request( _url, + { + method: 'get', + onSuccess: function (t) + { + /* Not a JSON response? */ + if ( ! t.responseText.match( /^(\s+?)?\{/ ) ) + { + alert( ipb.lang['sk_error'] + t.responseText ); + return; + } + + /* Process results */ + eval( "var json = " + t.responseText ); + + if ( json['error'] ) + { + alert( ipb.lang['sk_error'] + json['error'] ); + return false; + } + + /* Type */ + switch( type ) + { + default: + case 'orig': + _text = 'Старый'; + break; + case 'new': + _text = 'Новый'; + break; + case 'custom': + _text = 'Пользовательский'; + break; + } + + /* otherwise... */ + if ( json['data_content'] ) + { + if ( json['data_type'] == 'css' ) + { + content = '

' + _text + ': ' + json['data_title'] + '.css

' + json['data_content'] + '
'; + } + else + { + content = '

' + _text + ': ' + json['data_group'] + ' > ' + json['data_title'] + '

' + json['data_content'] + '
'; + } + + max = document.viewport.getHeight(); + max = ( max < 600 ) ? max : 600; + + popup = new ipb.Popup('VPopUp', { type: 'pane', modal: false, hideAtStart: true, w: '600px', h: max + 'px', initial: content } ); + popup.show(); + } + }, + onFailure: function() + { + return false; + }, + onException: function() + { + return false; + } + + } ); + }; + + /** + * View diff preview + */ + this.viewDiff = function( changeId, type ) + { + /* Grab it via ajax */ + var _url = ipb.vars['base_url'] + "&app=core&module=ajax§ion=templatediff&do=viewDiff&change_id=" + changeId + '&type=' + type + '&secure_key=' + ipb.vars['md5_hash']; + + new Ajax.Request( _url, + { + method: 'get', + onSuccess: function (t) + { + /* Not a JSON response? */ + if ( ! t.responseText.match( /^(\s+?)?\{/ ) ) + { + alert( ipb.lang['sk_error'] + t.responseText ); + return; + } + + /* Process results */ + eval( "var json = " + t.responseText ); + + if ( json['error'] ) + { + alert( ipb.lang['sk_error'] + json['error'] ); + return false; + } + + /* Type */ + switch( type ) + { + default: + case 'diff': + _text = 'Различия'; + break; + case 'merge': + _text = 'Препросмотр объединения'; + break; + } + + /* otherwise... */ + if ( json['change_data_content'] ) + { + /* Extra work for merge */ + if ( type == 'merge' ) + { + _qb = "
 
"; + } + else + { + _qb = ''; + } + + if ( json['change_data_type'] == 'css' ) + { + content = '

'+ _text + ': ' + json['change_data_title'] + '.css

' + json['change_data_content'] + '
' + _qb; + } + else + { + content = '

'+ _text + ': ' + json['change_data_group'] + ' > ' + json['change_data_title'] + '

' + json['change_data_content'] + '
' + _qb; + } + + max = document.viewport.getHeight(); + max = ( max < 600 ) ? max : 600; + + IPB3TemplateDiffResults.popUps['preview-' + changeId ] = new ipb.Popup('diffPopUp', { type: 'pane', modal: false, hideAtStart: true, w: '800px', h: max + 'px', initial: content } ); + IPB3TemplateDiffResults.popUps['preview-' + changeId ].show(); + + /* Observe */ + if ( type == 'merge' ) + { + $('mergeResolveCustom').observe( 'click', IPB3TemplateDiffResults.resolveAllSingle ); + $('mergeResolveNew').observe( 'click', IPB3TemplateDiffResults.resolveAllSingle ); + $('mergeEditCustom').observe( 'click', IPB3TemplateDiffResults.goEdit ); + } + + } + }, + onFailure: function() + { + return false; + }, + onException: function() + { + return false; + } + + } ); + }; + + /** + * View diff preview + */ + this.editBit = function( changeId ) + { + /* Grab it via ajax */ + var _url = ipb.vars['base_url'] + "&app=core&module=ajax§ion=templatediff&do=editDiff&change_id=" + changeId + '&secure_key=' + ipb.vars['md5_hash']; + + new Ajax.Request( _url, + { + method: 'get', + onSuccess: function (t) + { + /* Not a JSON response? */ + if ( ! t.responseText.match( /^(\s+?)?\{/ ) ) + { + alert( ipb.lang['sk_error'] + t.responseText ); + return; + } + + /* Process results */ + eval( "var json = " + t.responseText ); + + if ( json['error'] ) + { + alert( ipb.lang['sk_error'] + json['error'] ); + return false; + } + + /* otherwise... */ + if ( json['change_merge_content'] ) + { + /* Ok, for some reason Safari (and possibly others) doesn't show the pop-up when viewing a + template bit. I presume it's because prototype/javascript will not insert invalid HTML into a node even + though it's encoded properly. After a few days working on merge, this is a quick hack to get it done + Force a 750px div in to position pop-up correctly on the screen, then once the pop-up has been created + shove the content in. + <3 javascript */ + var _tmp = Math.floor( Math.random() * 1001 ); + + _qb = "
 
"; + _tb = '' + _qb + '
'; + + if ( json['change_data_type'] == 'css' ) + { + content = '

' + json['change_data_title'] + '.css' + '

' + _tb + '
'; + } + else + { + content = '

' + json['change_data_group'] + ' > ' + json['change_data_title'] + '

' + _tb + '
'; + } + + IPB3TemplateDiffResults.popUps['edit-' + changeId ] = new ipb.Popup('diffEditPopUp_' + _tmp, { type: 'pane', modal: false, hideAtStart: true, w: '800px', h: '600px', initial: '
 
' } ); + IPB3TemplateDiffResults.popUps['edit-' + changeId ].show(); + + $('diffEditPopUp_' + _tmp + '_inner').update( content ); + + /* Observe */ + $('mergeSubmit').observe( 'click', IPB3TemplateDiffResults.saveEdit ); + + $('mergeResolveCustom_' + _tmp ).observe( 'click', IPB3TemplateDiffResults.resolveAllSingle ); + $('mergeResolveNew_' + _tmp ).observe( 'click', IPB3TemplateDiffResults.resolveAllSingle ); + + } + }, + onFailure: function() + { + return false; + }, + onException: function() + { + return false; + } + + } ); + }; + + /** + * View diff preview + */ + this.goEdit = function(e) + { + elem = Event.element(e); + + /* fetch ID */ + var test = $( elem ).className.match('__re([0-9]+)'); + if( test == null || Object.isUndefined( test ) ){ Debug.error("Error"); return; } + + var changeId = test[1]; + + /* Close preview pop-up */ + if ( IPB3TemplateDiffResults.popUps['preview-' + changeId ] ) + { + IPB3TemplateDiffResults.popUps['preview-' + changeId ].hide(); + } + + /* Fire edit */ + IPB3TemplateDiffResults.editBit( changeId ); + }; + + /** + * View diff preview + */ + this.resolveAllSingle = function(e) + { + elem = Event.element(e); + var _type = ''; + + /* fetch ID */ + if ( $( elem ).className.match( /__rc/ ) ) + { + var test = $( elem ).className.match('__rc([0-9]+)'); + if( test == null || Object.isUndefined( test ) ){ Debug.error("Error"); return; } + _type = 'custom'; + } + else + { + var test = $( elem ).className.match('__rn([0-9]+)'); + if( test == null || Object.isUndefined( test ) ){ Debug.error("Error"); return; } + _type = 'new'; + } + + var changeId = test[1]; + + /* Grab it via ajax */ + var _url = ipb.vars['base_url'] + "&app=core&module=ajax§ion=templatediff&do=resolveAllSingle&change_id=" + changeId + '&type=' + _type + '&secure_key=' + ipb.vars['md5_hash']; + + new Ajax.Request( _url, + { + method: 'get', + onSuccess: function (t) + { + if ( t.responseText.match( /^(\s+?)?\{/ ) ) + { + eval( "var json = " + t.responseText ); + + if ( json['error'] ) + { + alert( json['error'] ); + return; + } + else + { + /* Close pop-up */ + if ( IPB3TemplateDiffResults.popUps['edit-' + changeId ] ) + { + IPB3TemplateDiffResults.popUps['edit-' + changeId ].hide(); + } + + if ( IPB3TemplateDiffResults.popUps['preview-' + changeId ] ) + { + IPB3TemplateDiffResults.popUps['preview-' + changeId ].hide(); + } + + /* Update desc string */ + $('mDesc-' + changeId).update( json['desc'] ); + + /* Hide merge available data */ + $$('.__whenHasMerge' + changeId).each( function(m){ + m.hide(); + }); + } + } + else + { + alert( "Ошибка: " + t.responseText ); + } + }, + onFailure: function() + { + return false; + }, + onException: function() + { + return false; + } + + } ); + }; + + /** + * View diff preview + */ + this.saveEdit = function(e) + { + elem = Event.element(e); + + /* fetch ID */ + var test = $( elem ).className.match('__i([0-9]+)'); + if( test == null || Object.isUndefined( test ) ){ Debug.error("Error"); return; } + + var changeId = test[1]; + var content = $('mergeContent').value; + + /* Test to see if we've left in merge stuff */ + if ( content.match( '<<<<<<<<<<' ) || content.match( '>>>>>>>>>' ) ) + { + alert( 'Нельзя сохранить пока не будут устранены все конфликты' ); + } + else + { + /* Fire it of to Ajaxia for central processing */ + var url = ipb.vars['base_url'] + "&app=core&module=ajax§ion=templatediff&do=saveEdit&change_id=" + changeId + '&secure_key=' + ipb.vars['md5_hash']; + + /* Set up params */ + var params = { 'content' : content }; + + new Ajax.Request( url.replace( /&/g, '&' ), + { + method: 'POST', + parameters: params, + onSuccess: function (t ) + { + if ( t.responseText.match( /^(\s+?)?\{/ ) ) + { + eval( "var json = " + t.responseText ); + + if ( json['error'] ) + { + alert( json['error'] ); + return; + } + else + { + /* Close pop-up */ + IPB3TemplateDiffResults.popUps['edit-' + changeId ].hide(); + + /* Update desc string */ + $('mDesc-' + changeId).update( json['desc'] ); + + /* Hide merge available data */ + $$('.__whenHasMerge' + changeId).each( function(m){ + m.hide(); + }); + } + } + else + { + alert( "Ошибка: " + t.responseText ); + } + }, + onException: function( f,e ){ alert( "Исключение: " + e ); }, + onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); } + } ); + } + }; +} + +IPB3TemplateDiffResults.init(); \ No newline at end of file diff --git a/upload/admin/applications/core/js/acp.easylogo.js b/upload/admin/applications/core/js/acp.easylogo.js index 5cf3adda..78cec407 100644 --- a/upload/admin/applications/core/js/acp.easylogo.js +++ b/upload/admin/applications/core/js/acp.easylogo.js @@ -1,43 +1,44 @@ -/************************************************/ -/* IPB3 Javascript */ -/* -------------------------------------------- */ -/* ips.global.js - Global functionality */ -/* (c) IPS, Inc 2008 */ -/* -------------------------------------------- */ -/* Author: Rikki Tissier */ -/************************************************/ - -ACPEasyLogo = { - init: function() - { - Debug.write("Initializing acp.easylogo.js"); - - document.observe("dom:loaded", function(){ - $('skin').observe( "change", ACPEasyLogo.resetMacro ); - }); - }, - - resetMacro: function(e) - { - var value = $F('skin'); - - //Get hits - new Ajax.Request( - ipb.vars['base_url'] + "app=core&module=ajax§ion=replacements&do=retrieve&secure_key=" + ipb.vars['md5_hash'] + "&value=" + value , - { - method: 'get', - evalJSON: 'force', - onSuccess: function(t){ - if ( t.responseJSON['url'] ) - { - $('logo_url').value = t.responseJSON['url']; - $('replacementId').value = t.responseJSON['id']; - } - } - } - ); - - return false; - } -} +/************************************************/ +/* IPB3 Javascript */ +/* -------------------------------------------- */ +/* ips.global.js - Global functionality */ +/* (c) IPS, Inc 2008 */ +/* -------------------------------------------- */ +/* Author: Rikki Tissier */ +/************************************************/ + +ACPEasyLogo = { + init: function() + { + Debug.write("Initializing acp.easylogo.js"); + + document.observe("dom:loaded", function(){ + $('skin').observe( "change", ACPEasyLogo.resetMacro ); + }); + }, + + resetMacro: function(e) + { + var value = $F('skin'); + + //Get hits + new Ajax.Request( + ipb.vars['base_url'] + "app=core&module=ajax§ion=replacements&do=retrieve&secure_key=" + ipb.vars['md5_hash'] + "&value=" + value , + { + method: 'get', + evalJSON: 'force', + onSuccess: function(t){ + if ( t.responseJSON['url'] ) + { + $('logo_url').value = t.responseJSON['url']; + $('replacementId').value = t.responseJSON['id']; + } + } + } + ); + + return false; + } +}; + ACPEasyLogo.init(); \ No newline at end of file diff --git a/upload/admin/applications/core/js/acp.homepage.js b/upload/admin/applications/core/js/acp.homepage.js index 6a9b90ae..b8c5d828 100644 --- a/upload/admin/applications/core/js/acp.homepage.js +++ b/upload/admin/applications/core/js/acp.homepage.js @@ -1,35 +1,31 @@ -/************************************************/ -/* IPB3 Javascript */ -/* -------------------------------------------- */ -/* acp.homepage.js - Homepage javascript */ -/* (c) IPS, Inc 2008 */ -/* -------------------------------------------- */ -/* Author: Brandon Farber */ -/************************************************/ - -ACPHomepage = { - - /*------------------------------*/ - /* Constructor */ - init: function() - { - Debug.write("Initializing acp.homepage.js"); - - document.observe("dom:loaded", function(){ - ACPHomepage.autoComplete = new ipb.Autocomplete( $('members_display_name'), { multibox: false, url: acp.autocompleteUrl, templates: { wrap: acp.autocompleteWrap, item: acp.autocompleteItem } } ); - }); - }, - - editMember: function() - { - if ( $('members_display_name').value == "" ) - { - alert("Нужно ввести имя пользователя!"); - return false; - } - - return true; - } -}; - +/************************************************/ +/* IPB3 Javascript */ +/* -------------------------------------------- */ +/* acp.homepage.js - Homepage javascript */ +/* (c) IPS, Inc 2008 */ +/* -------------------------------------------- */ +/* Author: Brandon Farber */ +/************************************************/ + +ACPHomepage = { + + /*------------------------------*/ + /* Constructor */ + init: function() + { + Debug.write("Initializing acp.homepage.js"); + }, + + editMember: function() + { + if ( $('members_display_name').value == "" ) + { + alert("Нужно ввести имя пользователя!"); + return false; + } + + return true; + } +}; + ACPHomepage.init(); \ No newline at end of file diff --git a/upload/admin/applications/core/js/index.html b/upload/admin/applications/core/js/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/js/index.html +++ b/upload/admin/applications/core/js/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/js/ipb3CSS.js b/upload/admin/applications/core/js/ipb3CSS.js index 9a95661a..f9ed0c9b 100644 --- a/upload/admin/applications/core/js/ipb3CSS.js +++ b/upload/admin/applications/core/js/ipb3CSS.js @@ -51,7 +51,7 @@ function IPBCSS() { /* Build CSS list */ this.buildCSSList(); - } + }; /** * Load css groups @@ -88,10 +88,10 @@ function IPBCSS() alert( "Ooops. Something went wrong. Does this help?: " + t.responseText ); } }, - onException: function( f,e ){ alert( "Исключение: " + e ) }, - onFailure: function( t ){ alert( "Ошибка: " + t.responseText ) } + onException: function( f,e ){ alert( "Исключение: " + e ); }, + onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); } } ); - } + }; /** * Save CSS @@ -146,10 +146,10 @@ function IPBCSS() alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText ); } }, - onException: function( f,e ){ alert( "Исключение: " + e ) }, - onFailure: function( t ){ alert( "Ошибка: " + t.responseText ) } + onException: function( f,e ){ alert( "Исключение: " + e ); }, + onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); } } ); - } + }; /** * Revert css @@ -205,10 +205,10 @@ function IPBCSS() alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText ); } }, - onException: function( f,e ){ alert( "Исключение: " + e ) }, - onFailure: function( t ){ alert( "Ошибка: " + t.responseText ) } + onException: function( f,e ){ alert( "Исключение: " + e ); }, + onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); } } ); - } + }; /** * Load template bits @@ -242,10 +242,10 @@ function IPBCSS() alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText ); } }, - onException: function( f,e ){ alert( "Исключение: " + e ) }, - onFailure: function( t ){ alert( "Ошибка: " + t.responseText ) } + onException: function( f,e ){ alert( "Исключение: " + e ); }, + onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); } } ); - } + }; /** * Add CSS form @@ -253,7 +253,7 @@ function IPBCSS() this.addCSSForm = function() { IPB3CSS.showCSSEditor( { 'cssData' : { 'css_id' : 0, 'css_group' : '', 'css_content' : '', 'css_added_to' : 0, '_type' : 'new' } } ); - } + }; /** * Shows the template editor @@ -279,7 +279,7 @@ function IPBCSS() } ipb.positionCenter( 'tplate_editor_' + json['cssData']['css_id'] ); - } + }; /** * Shows the template editor @@ -298,7 +298,7 @@ function IPBCSS() catch(e) { } - } + }; /** * Build a list of CSS groups (files) @@ -374,7 +374,7 @@ function IPBCSS() } } } ); - } + }; /** * Template Mouse Event @@ -407,6 +407,5 @@ function IPBCSS() } } } - } - + }; } \ No newline at end of file diff --git a/upload/admin/applications/core/js/ipb3Hooks.js b/upload/admin/applications/core/js/ipb3Hooks.js index 155aa032..3737e1bc 100644 --- a/upload/admin/applications/core/js/ipb3Hooks.js +++ b/upload/admin/applications/core/js/ipb3Hooks.js @@ -1,207 +1,275 @@ - -function addAnotherFile() -{ - elementIndex = parseInt(elementIndex) + 1; - - var list = new Element( 'ul', { 'id': 'fileTable_' + elementIndex } ); - list.addClassName( 'acp-form' ); - list.addClassName( 'alternate_rows' ); - $('fileTableContainer').insert( list ); - - var li1 = new Element( 'li' ).update( "" ); - var li2 = new Element( 'li' ).update( "" ); - var li3 = new Element( 'li' ).update( "" ); - - $('fileTable_' + elementIndex).insert( li1 ); - $('fileTable_' + elementIndex).insert( li2 ); - $('fileTable_' + elementIndex).insert( li3 ); -} - -function selectHookType( elementIndex ) -{ - var type = $F('hook_type[' + elementIndex + ']'); - - if( $('tr_classToOverload[' + elementIndex + ']') != null ) - { - $('tr_classToOverload[' + elementIndex + ']').remove(); - } - - if( $('tr_skinGroup[' + elementIndex + ']') != null ) - { - $('tr_skinGroup[' + elementIndex + ']').remove(); - } - - if( $('tr_skinFunction[' + elementIndex + ']') != null ) - { - $('tr_skinFunction[' + elementIndex + ']').remove(); - } - - if( $('tr_type[' + elementIndex + ']') != null ) - { - $('tr_type[' + elementIndex + ']').remove(); - } - - if( $('tr_id[' + elementIndex + ']') != null ) - { - $('tr_id[' + elementIndex + ']').remove(); - } - - if( $('tr_position[' + elementIndex + ']') != null ) - { - $('tr_position[' + elementIndex + ']').remove(); - } - - if( type == 'templateHooks' ) - { - // Show the skin dropdown now - - url = ipb.vars['base_url'] + "app=core&module=ajax&section=hooks&do=getGroupsForAdd&secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex; - url = url.replace( /&/g, '&' ); - - new Ajax.Request( url, - { - method: 'GET', - onSuccess: function (t ) - { - li1 = new Element( 'li', { 'id': 'tr_skinGroup[' + elementIndex + ']' } ).update( "" + t.responseText ); - $('fileTable_' + elementIndex).insert( li1 ); - }, - onException: function( f,e ){ alert( "Exception: " + e ) }, - onFailure: function( t ){ alert( "Failure: " + t.responseText ) } - } ); - } - else if( type != '0' ) - { - // Show the classToOverload field - - var li1 = new Element( 'li', { 'id': 'tr_classToOverload[' + elementIndex + ']' } ).update( "" ); - $('fileTable_' + elementIndex).insert( li1 ); - } -} - -function getTemplatesForAdd( elementIndex ) -{ - var type = $F('skinGroup[' + elementIndex + ']'); - - if( $('tr_skinFunction[' + elementIndex + ']') != null ) - { - $('tr_skinFunction[' + elementIndex + ']').remove(); - } - - if( $('tr_type[' + elementIndex + ']') != null ) - { - $('tr_type[' + elementIndex + ']').remove(); - } - - if( $('tr_id[' + elementIndex + ']') != null ) - { - $('tr_id[' + elementIndex + ']').remove(); - } - - if( $('tr_position[' + elementIndex + ']') != null ) - { - $('tr_position[' + elementIndex + ']').remove(); - } - - url = ipb.vars['base_url'] + "app=core&module=ajax&section=hooks&do=getTemplatesForAdd&secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&group=" + type; - url = url.replace( /&/g, '&' ); - - new Ajax.Request( url, - { - method: 'GET', - onSuccess: function (t ) - { - li1 = new Element( 'li', { 'id': 'tr_skinFunction[' + elementIndex + ']' } ).update( "" + t.responseText ); - $('fileTable_' + elementIndex).insert( li1 ); - }, - onException: function( f,e ){ alert( "Exception: " + e ) }, - onFailure: function( t ){ alert( "Failure: " + t.responseText ) } - } ); -} - -function getTypeOfHook( elementIndex ) -{ - var type = $F('skinFunction[' + elementIndex + ']'); - - if( $('tr_type[' + elementIndex + ']') != null ) - { - $('tr_type[' + elementIndex + ']').remove(); - } - - if( $('tr_id[' + elementIndex + ']') != null ) - { - $('tr_id[' + elementIndex + ']').remove(); - } - - if( $('tr_position[' + elementIndex + ']') != null ) - { - $('tr_position[' + elementIndex + ']').remove(); - } - - li1 = new Element( 'li', { 'id': 'tr_type[' + elementIndex + ']' } ).update( "" ); - $('fileTable_' + elementIndex).insert( li1 ); -} - -function getHookIds( elementIndex ) -{ - var template = $F('skinFunction[' + elementIndex + ']'); - var type = $F('type[' + elementIndex + ']'); - - if( $('tr_id[' + elementIndex + ']') != null ) - { - $('tr_id[' + elementIndex + ']').remove(); - } - - if( $('tr_position[' + elementIndex + ']') != null ) - { - $('tr_position[' + elementIndex + ']').remove(); - } - - url = ipb.vars['base_url'] + "app=core&module=ajax&section=hooks&do=getHookIds&secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&type=" + type + "&template=" + template; - url = url.replace( /&/g, '&' ); - - new Ajax.Request( url, - { - method: 'GET', - onSuccess: function (t ) - { - li1 = new Element( 'li', { 'id': 'tr_id[' + elementIndex + ']' } ).update( "" + t.responseText ); - $('fileTable_' + elementIndex).insert( li1 ); - }, - onException: function( f,e ){ alert( "Exception: " + e ) }, - onFailure: function( t ){ alert( "Failure: " + t.responseText ) } - } ); -} - -function getHookEntryPoints( elementIndex ) -{ - var type = $F('type[' + elementIndex + ']'); - - if( $('tr_position[' + elementIndex + ']') != null ) - { - $('tr_position[' + elementIndex + ']').remove(); - } - - var options = ''; - options += ""; - - if( type == 'foreach' ) - { - options += ""; - options += ""; - options += ""; - options += ""; - } - else - { - options += ""; - options += ""; - options += ""; - options += ""; - options += ""; - options += ""; - } - - var li1 = new Element( 'li', { 'id': 'tr_position[' + elementIndex + ']' } ).update( "" ); - $('fileTable_' + elementIndex).insert( li1 ); + +function addAnotherFile() +{ + elementIndex = parseInt(elementIndex) + 1; + + var header = new Element( 'div', { 'class': 'tablesubheader' } ); + header.update( ipb.lang['hookfilenumber'] + elementIndex ); + + var list = new Element( 'ul', { 'id': 'fileTable_' + elementIndex } ); + list.addClassName( 'acp-form' ); + list.addClassName( 'alternate_rows' ); + + $('fileTableContainer').insert( header ); + $('fileTableContainer').insert( list ); + + var li1 = new Element( 'li' ).update( "" ); + var li2 = new Element( 'li' ).update( "" ); + var li3 = new Element( 'li' ).update( "" ); + + $('fileTable_' + elementIndex).insert( li1 ); + $('fileTable_' + elementIndex).insert( li2 ); + $('fileTable_' + elementIndex).insert( li3 ); + + doStriping(); +} + +function selectHookType( elementIndex ) +{ + var type = $F('hook_type[' + elementIndex + ']'); + + if( $('tr_classToOverload[' + elementIndex + ']') != null ) + { + $('tr_classToOverload[' + elementIndex + ']').remove(); + } + + if( $('tr_skinGroup[' + elementIndex + ']') != null ) + { + $('tr_skinGroup[' + elementIndex + ']').remove(); + } + + if( $('tr_skinFunction[' + elementIndex + ']') != null ) + { + $('tr_skinFunction[' + elementIndex + ']').remove(); + } + + if( $('tr_type[' + elementIndex + ']') != null ) + { + $('tr_type[' + elementIndex + ']').remove(); + } + + if( $('tr_id[' + elementIndex + ']') != null ) + { + $('tr_id[' + elementIndex + ']').remove(); + } + + if( $('tr_position[' + elementIndex + ']') != null ) + { + $('tr_position[' + elementIndex + ']').remove(); + } + + if( $('tr_dataLocation[' + elementIndex + ']') != null ) + { + $('tr_dataLocation[' + elementIndex + ']').remove(); + } + + + if( $('tr_libApplication[' + elementIndex + ']') != null ) + { + $('tr_libApplication[' + elementIndex + ']').remove(); + } + + if( type == 'templateHooks' ) + { + // Show the skin dropdown now + + url = ipb.vars['base_url'] + "app=core&module=ajax&section=hooks&do=getGroupsForAdd&secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex; + url = url.replace( /&/g, '&' ); + + new Ajax.Request( url, + { + method: 'GET', + onSuccess: function (t ) + { + li1 = new Element( 'li', { 'id': 'tr_skinGroup[' + elementIndex + ']' } ).update( "" + t.responseText ); + $('fileTable_' + elementIndex).insert( li1 ); + doStriping(); + }, + onException: function( f,e ){ alert( "Exception: " + e ); }, + onFailure: function( t ){ alert( "Failure: " + t.responseText ); } + } ); + } + else if( type == 'dataHooks' ) + { + // Show the data location dropdown now + + url = ipb.vars['base_url'] + "app=core&module=ajax&section=hooks&do=getDataLocationsForAdd&secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex; + url = url.replace( /&/g, '&' ); + + new Ajax.Request( url, + { + method: 'GET', + onSuccess: function (t ) + { + li1 = new Element( 'li', { 'id': 'tr_dataLocation[' + elementIndex + ']' } ).update( "" + t.responseText ); + $('fileTable_' + elementIndex).insert( li1 ); + doStriping(); + }, + onException: function( f,e ){ alert( "Exception: " + e ); }, + onFailure: function( t ){ alert( "Failure: " + t.responseText ); } + } ); + } + else if( type == 'libraryHooks' ) + { + var li1 = new Element( 'li', { 'id': 'tr_classToOverload[' + elementIndex + ']' } ).update( "" ); + $('fileTable_' + elementIndex).insert( li1 ); + + // Show the data location dropdown now + + url = ipb.vars['base_url'] + "app=core&module=ajax&section=hooks&do=getApplications&secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex; + url = url.replace( /&/g, '&' ); + + new Ajax.Request( url, + { + method: 'GET', + onSuccess: function (t ) + { + li1 = new Element( 'li', { 'id': 'tr_libApplication[' + elementIndex + ']' } ).update( "" + t.responseText ); + $('fileTable_' + elementIndex).insert( li1 ); + doStriping(); + }, + onException: function( f,e ){ alert( "Exception: " + e ); }, + onFailure: function( t ){ alert( "Failure: " + t.responseText ); } + } ); + } + else if( type != '0' ) + { + // Show the classToOverload field + + var li1 = new Element( 'li', { 'id': 'tr_classToOverload[' + elementIndex + ']' } ).update( "" ); + $('fileTable_' + elementIndex).insert( li1 ); + } +} + +function getTemplatesForAdd( elementIndex ) +{ + var type = $F('skinGroup[' + elementIndex + ']'); + + if( $('tr_skinFunction[' + elementIndex + ']') != null ) + { + $('tr_skinFunction[' + elementIndex + ']').remove(); + } + + if( $('tr_type[' + elementIndex + ']') != null ) + { + $('tr_type[' + elementIndex + ']').remove(); + } + + if( $('tr_id[' + elementIndex + ']') != null ) + { + $('tr_id[' + elementIndex + ']').remove(); + } + + if( $('tr_position[' + elementIndex + ']') != null ) + { + $('tr_position[' + elementIndex + ']').remove(); + } + + url = ipb.vars['base_url'] + "app=core&module=ajax&section=hooks&do=getTemplatesForAdd&secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&group=" + type; + url = url.replace( /&/g, '&' ); + + new Ajax.Request( url, + { + method: 'GET', + onSuccess: function (t ) + { + li1 = new Element( 'li', { 'id': 'tr_skinFunction[' + elementIndex + ']' } ).update( "" + t.responseText ); + $('fileTable_' + elementIndex).insert( li1 ); + doStriping(); + }, + onException: function( f,e ){ alert( "Exception: " + e ); }, + onFailure: function( t ){ alert( "Failure: " + t.responseText ); } + } ); +} + +function getTypeOfHook( elementIndex ) +{ + var type = $F('skinFunction[' + elementIndex + ']'); + + if( $('tr_type[' + elementIndex + ']') != null ) + { + $('tr_type[' + elementIndex + ']').remove(); + } + + if( $('tr_id[' + elementIndex + ']') != null ) + { + $('tr_id[' + elementIndex + ']').remove(); + } + + if( $('tr_position[' + elementIndex + ']') != null ) + { + $('tr_position[' + elementIndex + ']').remove(); + } + + li1 = new Element( 'li', { 'id': 'tr_type[' + elementIndex + ']' } ).update( "" ); + $('fileTable_' + elementIndex).insert( li1 ); + + doStriping(); +} + +function getHookIds( elementIndex ) +{ + var template = $F('skinFunction[' + elementIndex + ']'); + var type = $F('type[' + elementIndex + ']'); + + if( $('tr_id[' + elementIndex + ']') != null ) + { + $('tr_id[' + elementIndex + ']').remove(); + } + + if( $('tr_position[' + elementIndex + ']') != null ) + { + $('tr_position[' + elementIndex + ']').remove(); + } + + url = ipb.vars['base_url'] + "app=core&module=ajax&section=hooks&do=getHookIds&secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&type=" + type + "&template=" + template; + url = url.replace( /&/g, '&' ); + + new Ajax.Request( url, + { + method: 'GET', + onSuccess: function (t ) + { + li1 = new Element( 'li', { 'id': 'tr_id[' + elementIndex + ']' } ).update( "" + t.responseText ); + $('fileTable_' + elementIndex).insert( li1 ); + doStriping(); + }, + onException: function( f,e ){ alert( "Exception: " + e ); }, + onFailure: function( t ){ alert( "Failure: " + t.responseText ); } + } ); +} + +function getHookEntryPoints( elementIndex ) +{ + var type = $F('type[' + elementIndex + ']'); + + if( $('tr_position[' + elementIndex + ']') != null ) + { + $('tr_position[' + elementIndex + ']').remove(); + } + + var options = ''; + options += ""; + + if( type == 'foreach' ) + { + options += ""; + options += ""; + options += ""; + options += ""; + } + else + { + options += ""; + options += ""; + options += ""; + options += ""; + options += ""; + options += ""; + } + + var li1 = new Element( 'li', { 'id': 'tr_position[' + elementIndex + ']' } ).update( "" ); + $('fileTable_' + elementIndex).insert( li1 ); + + doStriping(); } \ No newline at end of file diff --git a/upload/admin/applications/core/js/ipb3Replacements.js b/upload/admin/applications/core/js/ipb3Replacements.js index 8f4bcb88..b8b6273f 100644 --- a/upload/admin/applications/core/js/ipb3Replacements.js +++ b/upload/admin/applications/core/js/ipb3Replacements.js @@ -51,7 +51,7 @@ function IPBReplacements() { /* Build Replacements list */ this.buildReplacementsList(); - } + }; /** * Load css groups @@ -88,10 +88,10 @@ function IPBReplacements() alert( "Ooops. Something went wrong. Does this help?: " + t.responseText ); } }, - onException: function( f,e ){ alert( "Exception: " + e ) }, - onFailure: function( t ){ alert( "Failure: " + t.responseText ) } + onException: function( f,e ){ alert( "Exception: " + e ); }, + onFailure: function( t ){ alert( "Failure: " + t.responseText ); } } ); - } + }; /** * Save Replacements @@ -144,10 +144,10 @@ function IPBReplacements() alert( "Ooops. Something went wrong. Does this help?: " + t.responseText ); } }, - onException: function( f,e ){ alert( "Exception: " + e ) }, - onFailure: function( t ){ alert( "Failure: " + t.responseText ) } + onException: function( f,e ){ alert( "Exception: " + e ); }, + onFailure: function( t ){ alert( "Failure: " + t.responseText ); } } ); - } + }; /** * Revert css @@ -204,10 +204,10 @@ function IPBReplacements() alert( "Ooops. Something went wrong. Does this help?: " + t.responseText ); } }, - onException: function( f,e ){ alert( "Exception: " + e ) }, - onFailure: function( t ){ alert( "Failure: " + t.responseText ) } + onException: function( f,e ){ alert( "Exception: " + e ); }, + onFailure: function( t ){ alert( "Failure: " + t.responseText ); } } ); - } + }; /** * Add Replacements form @@ -215,7 +215,7 @@ function IPBReplacements() this.addReplacementsForm = function() { IPB3Replacements.showReplacementsEditor( 0 ); - } + }; /** * Shows the template editor @@ -263,7 +263,7 @@ function IPBReplacements() } ipb.positionCenter( 'tplate_editor_' + replacement_id ); - } + }; /** * Preview the replacement @@ -301,7 +301,7 @@ function IPBReplacements() document.body.appendChild( _div ); ipb.positionCenter( 'tplate_preview_' + _data['replacement_id'] ); - } + }; /** * Close Preview @@ -315,7 +315,7 @@ function IPBReplacements() catch(e) { } - } + }; /** * Shows the template editor @@ -334,7 +334,7 @@ function IPBReplacements() catch(e) { } - } + }; /** * Build a list of Replacements groups (files) @@ -405,7 +405,7 @@ function IPBReplacements() } } ); - } + }; /** * Template Mouse Event @@ -442,6 +442,5 @@ function IPBReplacements() } } } - } - + }; } \ No newline at end of file diff --git a/upload/admin/applications/core/js/ipb3TemplateDiff.js b/upload/admin/applications/core/js/ipb3TemplateDiff.js index 842c4cbf..d6ea9089 100644 --- a/upload/admin/applications/core/js/ipb3TemplateDiff.js +++ b/upload/admin/applications/core/js/ipb3TemplateDiff.js @@ -63,8 +63,11 @@ function IPBTemplateDiff() /** * URLS */ - this.baseUrl = ''; - this.imageUrl = ''; + this.baseUrl = ''; + this.baseUrlMerge = ''; + this.imageUrl = ''; + this.doneUrl = ''; + this.currentAction = 'process'; /* * Stored JSON @@ -96,7 +99,7 @@ function IPBTemplateDiff() this.beginDiff = function() { /* Start text output.. */ - this.updateCounter( 0 ); + this.updateCounter( '' ); /* Reset progress bar */ this.updateProgressBar( false ); @@ -106,7 +109,7 @@ function IPBTemplateDiff() /* Start off with the SQL */ this.fireAjax( 0 ); - } + }; /** * Update the progress bar @@ -170,9 +173,9 @@ function IPBTemplateDiff() if ( IPB3TemplateDiff.currentImage != _img ) { $( 'diffStatusImage' ).src = IPB3TemplateDiff.imageUrl + _img; - IPB3TemplateDiff.currentImage = _img; + IPB3TemplateDiff.currentImage = _img; } - } + }; /** * Fire Ajax @@ -182,7 +185,7 @@ function IPBTemplateDiff() /* Update image */ this.updateProgressImage( 'send' ); - new Ajax.Request( this.baseUrl + '&do=process', + new Ajax.Request( this.baseUrl.replace( /&/g, '&' ) + '&do=' + this.currentAction, { method: 'get', onSuccess: this.processAjax.bind(this), @@ -214,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( "Запрос отменен" ); } }; @@ -230,7 +233,7 @@ function IPBTemplateDiff() */ this.failureAjax = function( t ) { - alert( "Failure: " + t.responseText ); + alert( "Ошибка: " + t.responseText ); }; /** @@ -238,8 +241,8 @@ function IPBTemplateDiff() */ this.exceptionAjax = function( t ) { - alert( "Exception: " + t.responseText ); - } + alert( "Исключение: " + t.responseText ); + }; /** * Process Ajax (Success) @@ -252,7 +255,8 @@ function IPBTemplateDiff() /* Not a JSON response? */ if ( ! t.responseText.match( /^(\s+?)?\{/ ) ) { - alert( "Error:\n" + t.responseText ); + alert( "Ошибка:\n" + t.responseText ); + Debug.write( t ); return; } @@ -261,16 +265,24 @@ function IPBTemplateDiff() if ( json['error'] ) { - alert( "An error occured: " . json['error'] ); + alert( "Ошибка: " . json['error'] ); return false; } /* All good: Update status message... */ - this.updateCounter( json['processed'] ); + this.updateCounter( json['title'], json['message'] ); /* Update progress bar */ this.updateProgressBar( json['processed'] ); + if ( json['perGo'] ) + { + this.baseUrl = this.baseUrl.replace( 'perGo=(\d+?)', 'perGo=' + json['perGo'] ); + this.perGo = json['perGo']; + } + + this.totalBits = json['totalBits'] ? json['totalBits'] : this.totalBits; + /* Finish? If so - say all done and go tubby-bye-bye */ if ( json['completed'] != 1 ) { @@ -279,21 +291,33 @@ function IPBTemplateDiff() } else { - /* All Done */ - this.updateProgressBar( -1 ); - this.updateProgressImage( 'ready' ); + /* Diff? Then merge */ + if ( this.currentAction == 'process' ) + { + this.currentAction = 'merge'; + this.perGo = 10; + this.baseUrl = this.baseUrl.replace( 'perGo=(\d+?)', 'perGo=' + this.perGo ); + /* Go ahead */ + this.beginDiff(); + } + else + { + /* All Done */ + this.updateProgressBar( -1 ); + this.updateProgressImage( 'ready' ); - /* Show done thing */ - $( 'diffDone' ).show(); + /* Show done thing */ + window.location = this.doneUrl.replace( /&/g, '&' ); + } } }; /** * Write to Log */ - this.updateCounter = function( count ) + this.updateCounter = function( title, msg ) { - $( 'diffLogProcessed' ).innerHTML = count; + $( 'diffLogTitle' ).update( title ); + $( 'diffLogText' ).update( msg ); }; - } \ No newline at end of file diff --git a/upload/admin/applications/core/js/ipb3TemplateSandR.js b/upload/admin/applications/core/js/ipb3TemplateSandR.js index a81cea6f..9cf8d809 100644 --- a/upload/admin/applications/core/js/ipb3TemplateSandR.js +++ b/upload/admin/applications/core/js/ipb3TemplateSandR.js @@ -50,7 +50,7 @@ function IPBTemplateSandR() { cbox.checked = checked; }); - } + }; /** * Check group check box @@ -71,7 +71,7 @@ function IPBTemplateSandR() }); $( 'cbox_group_' + groupName ).checked = ( _allCount == _checkedCount ) ? true : false; - } + }; /** * Load template bits @@ -105,10 +105,10 @@ function IPBTemplateSandR() alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText ); } }, - onException: function( f,e ){ alert( "Исключение: " + e ) }, - onFailure: function( t ){ alert( "Ошибка: " + t.responseText ) } + onException: function( f,e ){ alert( "Исключение: " + e ); }, + onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); } } ); - } + }; /** * Shows the template editor @@ -128,7 +128,7 @@ function IPBTemplateSandR() document.body.appendChild( _div ); ipb.positionCenter( 'tplate_editor_' + json['templateData']['template_id'] ); - } + }; /** * Peform the placements @@ -175,10 +175,10 @@ function IPBTemplateSandR() alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText ); } }, - onException: function( f,e ){ alert( "Исключение: " + e ) }, - onFailure: function( t ){ alert( "Ошибка: " + t.responseText ) } + onException: function( f,e ){ alert( "Исключение: " + e ); }, + onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); } } ); - } + }; /** * Save template bit @@ -201,7 +201,7 @@ function IPBTemplateSandR() parameters: params, onSuccess: function (t ) { - if ( t.responseText.match( /^(\s+?)?\{/ ) ) + if ( t.responseText.match( /^(\s*?)?\{/ ) ) { eval( "var json = " + t.responseText ); @@ -231,10 +231,10 @@ function IPBTemplateSandR() alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText ); } }, - onException: function( f,e ){ alert( "Исключение: " + e ) }, - onFailure: function( t ){ alert( "Ошибка: " + t.responseText ) } + //onException: function( f,e ){ alert( "Исключение: " + e ) }, + onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); } } ); - } + }; /** * Shows the template editor @@ -248,7 +248,7 @@ function IPBTemplateSandR() catch(e) { } - } + }; /** * Build a list of template groups @@ -389,5 +389,5 @@ function IPBTemplateSandR() } } ); } - } + }; } \ No newline at end of file diff --git a/upload/admin/applications/core/js/ipb3Templates.js b/upload/admin/applications/core/js/ipb3Templates.js index 6da5b601..423938ad 100644 --- a/upload/admin/applications/core/js/ipb3Templates.js +++ b/upload/admin/applications/core/js/ipb3Templates.js @@ -66,7 +66,7 @@ function IPBTemplates() $('tplate_bitList').setStyle( { 'height' : $('tplate_groupList').getHeight() + 'px', 'overflow' : 'auto'} ); this.loadTemplateBits( this.currentTemplateGroup ); - } + }; /** * Load template groups @@ -103,13 +103,13 @@ function IPBTemplates() } 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 ); } } ); - } + }; /** * Load template bits @@ -169,13 +169,13 @@ function IPBTemplates() } 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 ); } } ); - } + }; /** * Save template bit @@ -222,23 +222,23 @@ function IPBTemplates() if ( json['errors'] ) { /* Something inline would be very nice here.. rather than this ugly alert */ - alert("UGLY ALERT BOX SAYS: " + json['errors'] ); + alert("Ошибка: " + json['errors'] ); } else { - alert("UGLY ALERT BOX SAYS: Saved!"); + alert("Сохранено!"); } } } 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 ); } } ); - } + }; /** * Revert template bit @@ -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; } @@ -295,19 +295,19 @@ function IPBTemplates() if ( json['errors'] ) { /* Something inline would be very nice here.. rather than this ugly alert */ - alert("UGLY ALERT BOX SAYS: " + json['errors'] ); + alert("Ошибка: " + json['errors'] ); } } } 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 ); } } ); - } + }; /** * Load template bits @@ -338,13 +338,13 @@ function IPBTemplates() } 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 ); } } ); - } + }; /** * Shows the new template bit form @@ -369,7 +369,7 @@ function IPBTemplates() ipb.positionCenter( 'tplate_editor_0' ); IPB3Templates.currentTemplateBit = _data; - } + }; /** * Shows the template editor @@ -389,7 +389,7 @@ function IPBTemplates() document.body.appendChild( _div ); ipb.positionCenter( 'tplate_editor_' + json['templateData']['template_id'] ); - } + }; /** * Shows the template editor @@ -408,7 +408,7 @@ function IPBTemplates() catch(e) { } - } + }; /** * Shows a group entry as 'lit' @@ -430,7 +430,7 @@ function IPBTemplates() $('tplate_grouprow_' + templateGroup ).removeClassName( IPB3Templates.cssNames['groupRow'] ); $('tplate_grouprow_' + templateGroup ).addClassName( IPB3Templates.cssNames['groupRowLitMain'] ); $('tplate_grouprow_' + templateGroup ).addClassName( IPB3Templates.cssNames['groupRowLit'] ); - } + }; /** * Build a list of template groups @@ -455,7 +455,7 @@ function IPBTemplates() /* Write it out */ $('tplate_groupList').update( _output ); - } + }; /** * Build a list of template bits @@ -520,8 +520,7 @@ function IPBTemplates() $('tplate_templateRow_' + json['templates'][i]['template_id'] + '_revert').hide(); } } - } - + }; /** * Template Mouse Event @@ -554,7 +553,7 @@ function IPBTemplates() } } } - } + }; /** * Group Mouse Event @@ -578,6 +577,5 @@ function IPBTemplates() IPB3Templates.loadTemplateBits( _groupName ); } - } - + }; } \ No newline at end of file diff --git a/upload/admin/applications/core/js/ipb3uAgents.js b/upload/admin/applications/core/js/ipb3uAgents.js index 88af078a..b35358ab 100644 --- a/upload/admin/applications/core/js/ipb3uAgents.js +++ b/upload/admin/applications/core/js/ipb3uAgents.js @@ -52,7 +52,7 @@ function IPBUAgents() { /* Build uagents list */ this.buildUAgentsList(); - } + }; /** * INIT User Agent Form @@ -79,7 +79,7 @@ function IPBUAgents() /* Build uagents list that are already in the group */ this.buildGroupAgentsUsedList(); - } + }; /** * Save uagents @@ -122,23 +122,23 @@ function IPBUAgents() if ( json['errors'] ) { /* Something inline would be very nice here.. rather than this ugly alert */ - alert("UGLY ALERT BOX SAYS: " + json['errors'] ); + alert("Ошибка: " + json['errors'] ); } else { - alert("UGLY ALERT BOX SAYS: Saved!"); + alert("Сохранено!"); } } } 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 ); } } ); - } + }; /** * Revert css @@ -146,7 +146,7 @@ function IPBUAgents() this.removeuAgent = function( uagent_id ) { /* Make sure we're mean it... */ - if ( ! confirm( "Remove user agent?\\nThis will be removed permanently" ) ) + if ( ! confirm( "Удалить user agent?\\nОн будет удален полностью из системы" ) ) { return false; } @@ -177,19 +177,19 @@ function IPBUAgents() if ( json['errors'] ) { /* Something inline would be very nice here.. rather than this ugly alert */ - alert("UGLY ALERT BOX SAYS: " + json['errors'] ); + alert("Ошибка: " + json['errors'] ); } } } 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 ); } } ); - } + }; /** * Add uagents form @@ -197,7 +197,7 @@ function IPBUAgents() this.adduAgentForm = function() { IPB3UAgents.showuAgentsEditor( 0 ); - } + }; /** * Shows the template editor @@ -235,7 +235,7 @@ function IPBUAgents() /* Adjust title */ if ( ! uagent_id ) { - $('tplate_title_' + uagent_id ).update("Adding User Agent"); + $('tplate_title_' + uagent_id ).update("Добавление User Agent"); } /* Select box type */ @@ -250,7 +250,7 @@ function IPBUAgents() }; ipb.positionCenter( 'tplate_editor_' + uagent_id ); - } + }; /** * Close the editor @@ -269,7 +269,7 @@ function IPBUAgents() catch(e) { } - } + }; /** * Build a list of uagents groups (files) @@ -304,7 +304,7 @@ function IPBUAgents() /* Image. Can't use #{...} inline as it parses as HTML entities. Most annoying */ $('tplate_img_' + json['uagents'][i]['uagent_id'] ).src += 'type_' + json['uagents'][i]['uagent_type'] + '.png'; } ); - } + }; /** * Template Mouse Event @@ -337,7 +337,7 @@ function IPBUAgents() } } } - } + }; /** * Build a list of USED uagents @@ -395,7 +395,7 @@ function IPBUAgents() /* Update hidden field */ $('uAgentsData').value = Object.toJSON( _save ); - } + }; /** * Save user agent form @@ -403,7 +403,7 @@ function IPBUAgents() this.saveGroupForm = function() { $('uAgentsForm').submit(); - } + }; /** * Template Mouse Event @@ -436,7 +436,7 @@ function IPBUAgents() } } } - } + }; /** * Close the editor @@ -455,7 +455,7 @@ function IPBUAgents() catch(e) { } - } + }; /** * Shows the versions editor @@ -483,7 +483,7 @@ function IPBUAgents() document.body.appendChild( _div ); ipb.positionCenter( 'tplate_versions_' + uagent_id ); - } + }; /** * Save agent version info @@ -498,7 +498,7 @@ function IPBUAgents() /* Close any open editors */ IPB3UAgents.cancelAgentVersion(); - } + }; /** * Add user agent to the list @@ -516,7 +516,7 @@ function IPBUAgents() /* Build uagents list that are already in the group */ IPB3UAgents.buildGroupAgentsUsedList(); - } + }; /** * Add user agent to the list @@ -535,7 +535,7 @@ function IPBUAgents() /* Build uagents list that are already in the group */ IPB3UAgents.buildGroupAgentsUsedList(); - } + }; /** * Template Mouse Event @@ -559,7 +559,7 @@ function IPBUAgents() IPB3UAgents.groupAddToList( _uagent_id ); } } - } + }; /** * Build a list of uagents @@ -599,6 +599,5 @@ function IPBUAgents() $('tplate_agentimg_' + json['uagents'][i]['uagent_id'] ).src += 'type_' + json['uagents'][i]['uagent_type'] + '.png'; } } ); - } - + }; } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/ajax/compare.php b/upload/admin/applications/core/modules_admin/ajax/compare.php index d6f082dc..6b1855f9 100644 --- a/upload/admin/applications/core/modules_admin/ajax/compare.php +++ b/upload/admin/applications/core/modules_admin/ajax/compare.php @@ -1,221 +1,223 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class admin_core_ajax_compare extends ipsAjaxCommand -{ - /** - * Skin functions object handle - * - * @access private - * @var object - */ - private $skinFunctions; - - /** - * HTML Skin object - * - * @access protected - * @var object - */ - protected $html; - - /** - * Main executable - * - * @access public - * @param object registry object - * @return void - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load functions and cache classes - //----------------------------------------- - - require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); - require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); - require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinDifferences.php' ); - - $this->skinFunctions = new skinDifferences( $registry ); - - //----------------------------------------- - // Load lang - //----------------------------------------- - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ), 'core' ); - - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = $this->registry->output->loadTemplate('cp_skin_templates'); - - //----------------------------------------- - // What shall we do? - //----------------------------------------- - - switch( $this->request['do'] ) - { - case 'css': - $this->_getCssDifferences(); - break; - - default: - case 'differences': - $this->_getDifferences(); - break; - } - } - - /** - * Get differences of a CSS file - * - * @access private - * @return void - */ - private function _getCssDifferences() - { - //----------------------------------------- - // Init - //----------------------------------------- - - $setID = intval($this->request['setID']); - $fileID = intval($this->request['file_id']); - - //----------------------------------------- - // Get requested - //----------------------------------------- - - $current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_css', 'where' => 'css_id=' . $fileID ) ); - - if( $current['css_id'] ) - { - //----------------------------------------- - // Get the original - //----------------------------------------- - - $original = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_css', 'where' => "css_set_id=0 AND css_group='{$current['css_group']}'" ) ); - } - else - { - $original['css_content'] = $current['css_content']; - } - - //----------------------------------------- - // Get Diff library - //----------------------------------------- - - require_once( IPS_KERNEL_PATH . 'classDifference.php' ); - $classDifference = new classDifference(); - $classDifference->method = 'PHP'; - - - $difference = $classDifference->getDifferences( $original['css_content'], $current['css_content'] ); - - if( $classDifference->diff_found ) - { - $difference = str_replace( "\n", "
", $difference ); - $difference = str_replace( "><", ">\n<" ,$difference ); - $difference = preg_replace( "#(?', $difference ); - $difference = str_replace( "\n", '
', $difference ); - $difference = str_replace( "><", ">\n<" ,$difference ); - $difference = str_replace( "\t", "    ", $difference ); - } - - $this->returnHtml( $this->html->differenceResult( $difference ) ); - } - - /** - * Get differences of a template - * - * @access private - * @return void - */ - private function _getDifferences() - { - //----------------------------------------- - // Init - //----------------------------------------- - - $setID = intval($this->request['setID']); - $templateID = intval($this->request['template_id']); - - //----------------------------------------- - // Get requested - //----------------------------------------- - - $current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_templates', 'where' => 'template_id=' . $templateID ) ); - - if( $current['template_set_id'] ) - { - //----------------------------------------- - // Get the original - //----------------------------------------- - - $original = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "template_set_id=0 AND template_group='{$current['template_group']}' AND template_name='{$current['template_name']}'" ) ); - } - else - { - $original['template_content'] = $current['template_content']; - } - - //----------------------------------------- - // Get Diff library - //----------------------------------------- - - require_once( IPS_KERNEL_PATH . 'classDifference.php' ); - $classDifference = new classDifference(); - $classDifference->method = 'PHP'; - - - $difference = $classDifference->getDifferences( $original['template_content'], $current['template_content'] ); - - if( $classDifference->diff_found ) - { - $difference = str_replace( "\n", "
", $difference ); - $difference = str_replace( "><", ">\n<" ,$difference ); - $difference = preg_replace( "#(?', $difference ); - $difference = str_replace( "\n", '
', $difference ); - $difference = str_replace( "><", ">\n<" ,$difference ); - $difference = str_replace( "\t", "    ", $difference ); - } - - $this->returnHtml( $this->html->differenceResult( $difference ) ); - } - + + * Invision Power Services + * IP.Board v3.1.4 + * Template comparison + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since Friday 19th May 2006 17:33 + * @version $Revision: 5713 $ + */ + + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class admin_core_ajax_compare extends ipsAjaxCommand +{ + /** + * Skin functions object handle + * + * @access private + * @var object + */ + private $skinFunctions; + + /** + * HTML Skin object + * + * @access protected + * @var object + */ + protected $html; + + /** + * Main executable + * + * @access public + * @param object registry object + * @return void + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load functions and cache classes + //----------------------------------------- + + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinDifferences.php' ); + + $this->skinFunctions = new skinDifferences( $registry ); + + //----------------------------------------- + // Load lang + //----------------------------------------- + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ), 'core' ); + + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = $this->registry->output->loadTemplate('cp_skin_templates'); + + //----------------------------------------- + // What shall we do? + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'css': + $this->_getCssDifferences(); + break; + + default: + case 'differences': + $this->_getDifferences(); + break; + } + } + + /** + * Get differences of a CSS file + * + * @access private + * @return void + */ + private function _getCssDifferences() + { + //----------------------------------------- + // Init + //----------------------------------------- + + $setID = intval($this->request['setID']); + $fileID = intval($this->request['file_id']); + + //----------------------------------------- + // Get requested + //----------------------------------------- + + $current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_css', 'where' => 'css_id=' . $fileID ) ); + + if( $current['css_id'] ) + { + //----------------------------------------- + // Get the original + //----------------------------------------- + + $original = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_css', 'where' => "css_set_id=0 AND css_group='{$current['css_group']}'" ) ); + } + else + { + $original['css_content'] = $current['css_content']; + } + + //----------------------------------------- + // Get Diff library + //----------------------------------------- + + require_once( IPS_KERNEL_PATH . 'classDifference.php' ); + $classDifference = new classDifference(); + $classDifference->method = 'PHP'; + + + $difference = $classDifference->getDifferences( $original['css_content'], $current['css_content'] ); + + if( $classDifference->diff_found ) + { + $difference = str_replace( "\n", "
", $difference ); + $difference = str_replace( "><", ">\n<" ,$difference ); + $difference = preg_replace( "#(?', $difference ); + $difference = str_replace( "\n", '
', $difference ); + $difference = str_replace( "><", ">\n<" ,$difference ); + $difference = str_replace( "\t", "    ", $difference ); + } + + $this->returnHtml( $this->html->differenceResult( $difference ) ); + } + + /** + * Get differences of a template + * + * @access private + * @return void + */ + private function _getDifferences() + { + //----------------------------------------- + // Init + //----------------------------------------- + + $setID = intval($this->request['setID']); + $templateID = intval($this->request['template_id']); + + //----------------------------------------- + // Get requested + //----------------------------------------- + + $current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_templates', 'where' => 'template_id=' . $templateID ) ); + + if( $current['template_set_id'] ) + { + //----------------------------------------- + // Get the original + //----------------------------------------- + + $original = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "template_set_id=0 AND template_group='{$current['template_group']}' AND template_name='{$current['template_name']}'" ) ); + } + else + { + $original['template_content'] = $current['template_content']; + } + + //----------------------------------------- + // Get Diff library + //----------------------------------------- + + require_once( IPS_KERNEL_PATH . 'classDifference.php' ); + $classDifference = new classDifference(); + $classDifference->method = 'PHP'; + + + $difference = $classDifference->getDifferences( $original['template_content'], $current['template_content'] ); + + if( $classDifference->diff_found ) + { + $difference = str_replace( "\n", "
", $difference ); + $difference = str_replace( "><", ">\n<" ,$difference ); + $difference = preg_replace( "#(?', $difference ); + $difference = str_replace( "\n", '
', $difference ); + $difference = str_replace( "><", ">\n<" ,$difference ); + $difference = str_replace( "\t", "    ", $difference ); + } + + $this->returnHtml( $this->html->differenceResult( $difference ) ); + } + } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/ajax/css.php b/upload/admin/applications/core/modules_admin/ajax/css.php index 6245c983..a90bed41 100644 --- a/upload/admin/applications/core/modules_admin/ajax/css.php +++ b/upload/admin/applications/core/modules_admin/ajax/css.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * AJAX Functions For applications/core/js/ipb3CSS.js file - * Last Updated: $Date: 2009-09-30 10:45:37 -0400 (Wed, 30 Sep 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 5183 $ + * @version $Revision: 5713 $ */ diff --git a/upload/admin/applications/core/modules_admin/ajax/findnames.php b/upload/admin/applications/core/modules_admin/ajax/findnames.php new file mode 100644 index 00000000..80616282 --- /dev/null +++ b/upload/admin/applications/core/modules_admin/ajax/findnames.php @@ -0,0 +1,111 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Login handler abstraction : AJAX Find Names functions + * Last Updated: $Date: 2010-02-22 08:06:40 -0500 (Mon, 22 Feb 2010) $ + * + * + * @author $Author: josh $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since Tuesday 1st March 2005 (11:52) + * @version $Revision: 5857 $ + * @see public_core_ajax_findnames + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

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 + * + * @access public + * @param object Registry reference + * @return 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 + * + * @access private + * @return void Outputs to screen + */ + private function _getMemberNames() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $name = IPSText::convertUnicode( $this->convertAndMakeSafe( ipsRegistry::$request['name'], 0 ) ); + + //----------------------------------------- + // 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() ) + { + $photo = IPSMember::buildProfilePhoto( $r ); + $group = IPSLib::makeNameFormatted( '' , $r['member_group_id'] ); + $return[ $r['member_id'] ] = array( 'name' => $r['members_display_name'], + 'showas'=> '' . $r['members_display_name'] . ' (' . $group . ')', + 'img' => $photo['pp_thumb_photo'], + 'img_w' => $photo['pp_mini_width'], + 'img_h' => $photo['pp_mini_height'] + ); + } + + $this->returnJsonArray( $return ); + } +} \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/ajax/hooks.php b/upload/admin/applications/core/modules_admin/ajax/hooks.php index 7891bdf6..a01b0a65 100644 --- a/upload/admin/applications/core/modules_admin/ajax/hooks.php +++ b/upload/admin/applications/core/modules_admin/ajax/hooks.php @@ -1,1016 +1,1093 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class admin_core_ajax_hooks extends ipsAjaxCommand -{ - /** - * Cache object - * - * @access public - * @var object - */ - public $cache; - - /** - * Hook ID - * - * @access public - * @var integer - */ - public $hookId; - - /** - * Hook data - * - * @access public - * @var array - */ - public $hook; - - /** - * Hook's export settings - * - * @access public - * @var array - */ - public $data; - - /** - * Hooks library - * - * @access private - * @var object Hooks library - */ - private $hooksFunctions; - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = ipsRegistry::getClass('output')->loadTemplate('cp_skin_hooks_export'); - - //----------------------------------------- - // Load hooks library - //----------------------------------------- - - require_once( IPSLib::getAppDir('core') . '/sources/classes/hooksFunctions.php' ); - $this->hooksFunctions = new hooksFunctions( $registry ); - - //----------------------------------------- - // Load lang - //----------------------------------------- - - ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_hooks' ) ); - - switch( $this->request['do'] ) - { - case 'getStrings': - $this->_getAjaxStrings(); - break; - - case 'getLangFiles': - $this->_getAjaxFiles(); - break; - - case 'getTemplates': - $this->_getAjaxTemplates(); - break; - - case 'getSkinFiles': - $this->_getAjaxSkins(); - break; - - // These are for the add file form - case 'getGroupsForAdd': - $this->_getGroupsForAdd(); - break; - - case 'getTemplatesForAdd': - $this->_getTemplatesForAdd(); - break; - - case 'getHookIds': - $this->_getHookIds(); - break; - - case 'save': - $this->save(); - break; - - case 'show': - default: - $this->show(); - break; - } - } - - /** - * Get all hook ids for a template/type - * - * @access protected - * @return void [Outputs to screen] - */ - protected function _getHookIds() - { - $i = intval( $this->request['i'] ); - $template = IPSText::alphanumericalClean( $this->request['template'] ); - $type = IPSText::alphanumericalClean( $this->request['type'] ); - $return = $this->hooksFunctions->getHookIds( $template, $type ); - - $output = $this->registry->output->formDropdown( "id[{$i}]", $return, null, "id[{$i}]", "onchange='getHookEntryPoints({$i});'" ); - - $this->returnHtml( $output ); - } - - /** - * Get all skin files - * - * @access protected - * @return void [Outputs to screen] - */ - protected function _getGroupsForAdd() - { - $i = intval( $this->request['i'] ); - - $_skinFiles = $this->hooksFunctions->getSkinGroups(); - $output = $this->registry->output->formDropdown( "skinGroup[{$i}]", $_skinFiles, null, "skinGroup[{$i}]", "onchange='getTemplatesForAdd({$i});'" ); - - $this->returnHtml( $output ); - } - - /** - * Get all skin templates - * - * @access protected - * @return void [Outputs to screen] - */ - protected function _getTemplatesForAdd() - { - $i = intval( $this->request['i'] ); - $group = IPSText::alphanumericalClean( $this->request['group'] ); - - $_strings = $this->hooksFunctions->getSkinMethods( $group, true ); - $output = $this->registry->output->formDropdown( "skinFunction[{$i}]", $_strings, null, "skinFunction[{$i}]", "onchange='getTypeOfHook({$i});'" ); - - $this->returnHtml( $output ); - } - - /** - * Get language strings in a given file - * - * @access protected - * @return void [Outputs to screen] - */ - protected function _getAjaxStrings() - { - $group = IPSText::alphanumericalClean( $this->request['group'] ); - $i = intval( $this->request['i'] ); - $hook = intval( $this->request['id'] ); - - $this->hookId = intval( $this->request['id'] ); - $this->hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $this->hookId ) ); - $this->data = unserialize($this->hook['hook_extra_data']); - - $_strings = $this->hooksFunctions->getStrings( $group ); - $output = $this->registry->output->formMultiDropdown( "strings_{$i}[]", $_strings, $this->data['language'][ $group ], 5, "strings_{$i}", "", "' style='width: 100%'" ); - - $this->returnHtml( $output ); - } - - /** - * Get all language files - * - * @access protected - * @return void [Outputs to screen] - */ - protected function _getAjaxFiles() - { - $i = intval( $this->request['i'] ); - $hook = intval( $this->request['id'] ); - - $this->hookId = intval( $this->request['id'] ); - $this->hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $this->hookId ) ); - $this->data = unserialize($this->hook['hook_extra_data']); - - $_langFiles = $this->hooksFunctions->getLanguageFiles(); - $output = $this->registry->output->formDropdown( "language_{$i}", $_langFiles, null, "language_{$i}", "onchange='acp.hooks.generateStrings({$i});'" ); - - $this->returnHtml( $output ); - } - - /** - * Get skin templates in a given file - * - * @access protected - * @return void [Outputs to screen] - */ - protected function _getAjaxTemplates() - { - $group = IPSText::alphanumericalClean( $this->request['group'] ); - $i = intval( $this->request['i'] ); - $hook = intval( $this->request['id'] ); - - $this->hookId = intval( $this->request['id'] ); - $this->hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $this->hookId ) ); - $this->data = unserialize($this->hook['hook_extra_data']); - - $_strings = $this->hooksFunctions->getSkinMethods( $group ); - $output = $this->registry->output->formMultiDropdown( "templates_{$i}[]", $_strings, $this->data['templates'][ $group ], 5, "templates_{$i}", "", "' style='width: 100%'" ); - - $this->returnHtml( $output ); - } - - /** - * Get all skin files - * - * @access protected - * @return void [Outputs to screen] - */ - protected function _getAjaxSkins() - { - $i = intval( $this->request['i'] ); - $hook = intval( $this->request['id'] ); - - $this->hookId = intval( $this->request['id'] ); - $this->hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $this->hookId ) ); - $this->data = unserialize($this->hook['hook_extra_data']); - - $_skinFiles = $this->hooksFunctions->getSkinGroups(); - $output = $this->registry->output->formDropdown( "skin_{$i}", $_skinFiles, null, "skin_{$i}", "onchange='acp.hooks.generateTemplates({$i});'" ); - - $this->returnHtml( $output ); - } - - /** - * Save the form - * - * @access protected - * @return void [Outputs to screen] - */ - protected function save() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $name = trim( IPSText::alphanumericalClean( $this->request['name'] ) ); - $this->hookId = intval( $this->request['id'] ); - $this->hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $this->hookId ) ); - $this->data = unserialize($this->hook['hook_extra_data']); - - $output = ''; - - //----------------------------------------- - // Got a hook? - //----------------------------------------- - - if ( ! $this->hook['hook_id'] ) - { - $this->returnJsonError( $this->lang->words['hook_cannot_load'] ); - } - - //----------------------------------------- - // Run the proper operation - //----------------------------------------- - - switch( $name ) - { - case 'settings': - $_settingGroups = $this->hooksFunctions->getSettingGroups(); - $_settings = $this->hooksFunctions->getSettings(); - $toSave = array(); - $toDisplay = array(); - - $toSave['settingGroups'] = array(); - $toSave['settings'] = array(); - - if( is_array($this->request['setting_groups']) AND count($this->request['setting_groups']) ) - { - $toSave['settingGroups'] = $this->request['setting_groups']; - - foreach( $_settingGroups as $data ) - { - if( in_array( $data[0], $toSave['settingGroups'] ) ) - { - $toDisplay['settingGroups'][] = $data[1]; - } - } - } - - if( is_array($this->request['settings']) AND count($this->request['settings']) ) - { - $toSave['settings'] = $this->request['settings']; - - foreach( $_settings as $data ) - { - if( in_array( $data[0], $toSave['settings'] ) ) - { - $toDisplay['settings'][] = $data[1]; - } - } - } - - $this->data['settingGroups'] = $toSave['settingGroups']; - $this->data['settings'] = $toSave['settings']; - - if( count($toDisplay['settingGroups']) ) - { - $output .= "{$this->lang->words['hook_setting_groups']} " . implode( ', ', $toDisplay['settingGroups'] ); - } - - if( count($toDisplay['settings']) ) - { - if( count($toDisplay['settingGroups']) ) - { - $output .= '
'; - } - - $output .= "{$this->lang->words['hook_settings']} " . implode( ', ', $toDisplay['settings'] ); - } - - $this->data['display']['settings'] = $output; - - $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId ); - - if( !$output ) - { - $output = $this->lang->words['hook_no_settings']; - } - break; - - case 'language': - $_langFiles = $this->hooksFunctions->getLanguageFiles(); - $ids = array(); - $files = array(); - $strings = array(); - $toDisplay = array(); - $this->data['language'] = array(); - - foreach( $_POST as $k => $v ) - { - if( preg_match( "/^language_(\d+)$/", $k, $matches ) ) - { - $files[ $matches[1] ] = $v; - $strings[ $matches[1] ] = $this->request[ 'strings_' . $matches[1] ]; - $ids[ $matches[1] ] = $matches[1]; - } - } - - foreach( $ids as $id ) - { - if( $files[ $id ] AND $strings[ $id ] ) - { - $this->data['language'][ $files[ $id ] ] = $strings[ $id ]; - $toDisplay[] = "{$this->lang->words['hook_from']} {$files[ $id ]}: " . implode( ', ', $strings[ $id ] ); - } - } - - if( count($toDisplay) ) - { - $output .= implode( '
', $toDisplay ); - } - - $this->data['display']['language'] = $output; - - $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId ); - - if( !$output ) - { - $output = $this->lang->words['hook_no_language']; - } - break; - - case 'modules': - $_modules = $this->hooksFunctions->getModules(); - $toSave = array(); - $toDisplay = array(); - - if( is_array($this->request['modules']) AND count($this->request['modules']) ) - { - $toSave = $this->request['modules']; - } - - foreach( $_modules as $data ) - { - if( in_array( $data[0], $toSave ) ) - { - $toDisplay[] = $data[1]; - } - } - - if( count($toDisplay) ) - { - $output .= "{$this->lang->words['hook_modules']} " . implode( ', ', $toDisplay ); - } - - $this->data['modules'] = $toSave; - $this->data['display']['modules'] = $output; - - $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId ); - - if( !$output ) - { - $output = $this->lang->words['hook_no_modules']; - } - break; - - case 'help': - $_help = $this->hooksFunctions->getHelpFiles(); - $toSave = array(); - $toDisplay = array(); - - if( is_array($this->request['help']) AND count($this->request['help']) ) - { - $toSave = $this->request['help']; - } - - foreach( $_help as $data ) - { - if( in_array( $data[0], $toSave ) ) - { - $toDisplay[] = $data[1]; - } - } - - if( count($toDisplay) ) - { - $output .= "{$this->lang->words['hook_help']} " . implode( ', ', $toDisplay ); - } - - $this->data['help'] = $toSave; - $this->data['display']['help'] = $output; - - $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId ); - - if( !$output ) - { - $output = $this->lang->words['hook_no_help']; - } - break; - - case 'skins': - $_skinFiles = $this->hooksFunctions->getSkinGroups(); - $ids = array(); - $files = array(); - $templates = array(); - $toDisplay = array(); - $this->data['templates'] = array(); - - foreach( $_POST as $k => $v ) - { - if( preg_match( "/^skin_(\d+)$/", $k, $matches ) ) - { - $files[ $matches[1] ] = $v; - $templates[ $matches[1] ] = $this->request[ 'templates_' . $matches[1] ]; - $ids[ $matches[1] ] = $matches[1]; - } - } - - foreach( $ids as $id ) - { - if( $files[ $id ] AND $templates[ $id ] ) - { - $this->data['templates'][ $files[ $id ] ] = $templates[ $id ]; - $toDisplay[] = "{$this->lang->words['hook_from']} {$files[ $id ]}: " . implode( ', ', $templates[ $id ] ); - } - } - - if( count($toDisplay) ) - { - $output .= implode( '
', $toDisplay ); - } - - $this->data['display']['templates'] = $output; - - $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId ); - - if( !$output ) - { - $output = $this->lang->words['hook_no_skin']; - } - break; - - case 'tasks': - $_tasks = $this->hooksFunctions->getTasks(); - $toSave = array(); - $toDisplay = array(); - - if( is_array($this->request['tasks']) AND count($this->request['tasks']) ) - { - $toSave = $this->request['tasks']; - } - - foreach( $_tasks as $data ) - { - if( in_array( $data[0], $toSave ) ) - { - $toDisplay[] = $data[1]; - } - } - - if( count($toDisplay) ) - { - $output .= "{$this->lang->words['hook_tasks']} " . implode( ', ', $toDisplay ); - } - - $this->data['tasks'] = $toSave; - $this->data['display']['tasks'] = $output; - - $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId ); - - if( !$output ) - { - $output = $this->lang->words['hook_no_tasks']; - } - break; - - case 'database': - $types = array( - array( '0', $this->lang->words['hook_db_select'] ), - array( 'create', $this->lang->words['hook_db_create'] ), - array( 'alter', $this->lang->words['hook_db_alter'] ), - array( 'update', $this->lang->words['hook_db_update'] ), - array( 'insert', $this->lang->words['hook_db_insert'] ), - ); - $alters = array( - array( 'add', $this->lang->words['hook_db_addnew'] ), - array( 'change', $this->lang->words['hook_db_change'] ), - array( 'remove', $this->lang->words['hook_db_drop'] ), - ); - $ids = array(); - $toDisplay = array(); - $this->data['database'] = array(); - - /* Since this is more complicated, just get ids for now... */ - foreach( $_POST as $k => $v ) - { - if( preg_match( "/^type_(\d+)$/", $k, $matches ) ) - { - $ids[ $matches[1] ] = $matches[1]; - } - } - - /* Now loop through and set stuff properly.. */ - foreach( $ids as $id ) - { - $type = $this->request[ 'type_' . $id ]; - - if( !$type ) - { - continue; - } - - switch( $type ) - { - case 'create': - $name = $this->request[ 'name_' . $id ]; - $fields = IPSText::br2nl( $_POST[ 'fields_' . $id ] ); - $tabletype = $this->request[ 'tabletype_' . $id ]; - - if( !$name OR !$fields ) - { - continue; - } - - $this->data['database']['create'][] = array( - 'name' => $name, - 'fields' => $fields, - 'tabletype' => $tabletype - ); - - $text = "CREATE TABLE {$name} ( - {$fields} - )"; - - if( $tabletype ) - { - $text .= " TYPE=" . $tabletype; - } - - $toDisplay[] = nl2br($text); - break; - - case 'alter': - $altertype = $this->request[ 'altertype_' . $id ]; - $table = $this->request[ 'table_' . $id ]; - $field = $this->request[ 'field_' . $id ]; - $newfield = $this->request[ 'newfield_' . $id ]; - $fieldtype = $this->request[ 'fieldtype_' . $id ]; - $default = $_POST[ 'default_' . $id ]; - - if( !$altertype OR !$table OR !$field ) - { - continue; - } - - $this->data['database']['alter'][] = array( - 'altertype' => $altertype, - 'table' => $table, - 'field' => $field, - 'newfield' => $newfield, - 'fieldtype' => $fieldtype, - 'default' => $default, - ); - - $text = "ALTER TABLE {$table}"; - - switch( $altertype ) - { - case 'add': - $text .= " ADD {$field} {$fieldtype}"; - - if( $default !== '' ) - { - $text .= " DEFAULT {$default}"; - } - break; - - case 'change': - $text .= " CHANGE {$field} {$newfield} {$fieldtype}"; - - if( $default !== '' ) - { - $text .= " DEFAULT {$default}"; - } - break; - - case 'remove': - $text .= " DROP {$field}"; - break; - } - - $toDisplay[] = nl2br($text); - break; - - case 'update': - $table = $this->request[ 'table_' . $id ]; - $field = $this->request[ 'field_' . $id ]; - $newvalue = $_POST[ 'newvalue_' . $id ]; - $oldvalue = $_POST[ 'oldvalue_' . $id ]; - $where = $_POST[ 'where_' . $id ]; - - if( !$table OR !$field OR !$newvalue ) - { - continue; - } - - $this->data['database']['update'][] = array( - 'table' => $table, - 'field' => $field, - 'newvalue' => $newvalue, - 'oldvalue' => $oldvalue, - 'where' => $where - ); - - $text = "UPDATE {$table} SET {$field}='{$newvalue}'"; - - if( $where ) - { - $text .= " WHERE " . $where; - } - - $toDisplay[] = nl2br($text); - break; - - case 'insert': - $table = $this->request[ 'table_' . $id ]; - $updates = $_POST[ 'updates_' . $id ]; - $fordelete = $_POST[ 'fordelete_' . $id ]; - - if( !$table OR !$updates ) - { - continue; - } - - $this->data['database']['insert'][] = array( - 'table' => $table, - 'updates' => $updates, - 'fordelete' => $fordelete, - ); - - $cols = array(); - $vals = array(); - $index = 0; - - $toins = explode( ',', $updates ); - - foreach( $toins as $insertQuery ) - { - $piece = explode( '=', $insertQuery ); - $cols[ $index ] = $piece[0]; - $vals[ $index ] = $piece[1]; - $index++; - } - - $text = "INSERT INTO {$table} ("; - $text .= implode( ', ', $cols ); - $text .= ") VALUES ('"; - $text .= implode( "', '", $vals ); - $text .= "')"; - - $toDisplay[] = nl2br($text); - break; - } - } - - if( count($toDisplay) ) - { - $output .= implode( '
', $toDisplay ); - } - - $this->data['display']['database'] = $output; - - $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId ); - - if( !$output ) - { - $output = $this->lang->words['hook_no_db']; - } - - break; - - case 'custom': - $toSave = ''; - $toDisplay = ''; - - if( $this->request['custom'] ) - { - $toSave = $this->request['custom']; - $toDisplay = $this->request['custom']; - } - - if( $toDisplay ) - { - $output .= "install_" . $toDisplay; - } - - $this->data['custom'] = $toSave; - $this->data['display']['custom'] = $output; - - $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId ); - - if( !$output ) - { - $output = $this->lang->words['hook_no_custom']; - } - break; - } - - //----------------------------------------- - // Print... - //----------------------------------------- - - $return = array( 'success' => true, 'message' => $output ); - - $this->returnJsonArray( $return ); - } - - /** - * Show the form - * - * @access protected - * @return void [Outputs to screen] - */ - protected function show() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $name = trim( IPSText::alphanumericalClean( $this->request['name'] ) ); - $this->hookId = intval( $this->request['id'] ); - $this->hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $this->hookId ) ); - $this->data = unserialize($this->hook['hook_extra_data']); - - $output = ''; - - //----------------------------------------- - // Got a member? - //----------------------------------------- - - if ( ! $this->hook['hook_id'] ) - { - $this->returnJsonError( $this->lang->words['hook_cannot_load'] ); - } - - //----------------------------------------- - // Run the proper operation - //----------------------------------------- - - switch( $name ) - { - case 'settings': - $_settingGroups = $this->hooksFunctions->getSettingGroups(); - $_settings = $this->hooksFunctions->getSettings(); - - $form = array(); - $form['groups'] = $this->registry->output->formMultiDropdown( "setting_groups[]", $_settingGroups, $this->data['settingGroups'], 5, "setting_groups" ); - $form['settings'] = $this->registry->output->formMultiDropdown( "settings[]", $_settings, $this->data['settings'], 5, "settings" ); - - $output = $this->html->inline_settings( $this->hook, $form ); - break; - - case 'languages': - // We'll show the lang files and let them select lang file, then select strings, then they can repeat - $_langFiles = $this->hooksFunctions->getLanguageFiles(); - $i = 1; - $form = array(); - - if( count($this->data['language']) ) - { - foreach( $this->data['language'] as $file => $strings ) - { - $form["language_file_{$i}"] = $this->registry->output->formDropdown( "language_{$i}", $_langFiles, $file, "language_{$i}", "onchange='acp.hooks.generateStrings({$i});'" ); - - $_strings = $this->hooksFunctions->getStrings( $file ); - $form["language_strings_{$i}"] = $this->registry->output->formMultiDropdown( "strings_{$i}[]", $_strings, $strings, 5, "strings_{$i}", "", "' style='width: 100%'" ); - - $i++; - } - } - - $form["language_file_{$i}"] = $this->registry->output->formDropdown( "language_{$i}", $_langFiles, null, "language_{$i}", "onchange='acp.hooks.generateStrings({$i});'" ); - - $output = $this->html->inline_languages( $this->hook, $form, $i ); - break; - - case 'modules': - $_modules = $this->hooksFunctions->getModules(); - - $form = array(); - $form['modules'] = $this->registry->output->formMultiDropdown( "modules[]", $_modules, $this->data['modules'], 5, "modules" ); - - $output = $this->html->inline_modules( $this->hook, $form ); - break; - - case 'help': - $_help = $this->hooksFunctions->getHelpFiles(); - - $form = array(); - $form['help'] = $this->registry->output->formMultiDropdown( "help[]", $_help, $this->data['help'], 5, "help" ); - - $output = $this->html->inline_help( $this->hook, $form ); - break; - - case 'skins': - // We'll show the skin groups and let them select skin file, then select templates, then they can repeat - $_skinFiles = $this->hooksFunctions->getSkinGroups(); - $i = 1; - $form = array(); - - if( count($this->data['templates']) ) - { - foreach( $this->data['templates'] as $file => $methods ) - { - $form["skin_file_{$i}"] = $this->registry->output->formDropdown( "skin_{$i}", $_skinFiles, $file, "skin_{$i}", "onchange='acp.hooks.generateTemplates({$i});'" ); - - $_methods = $this->hooksFunctions->getSkinMethods( $file ); - $form["skin_method_{$i}"] = $this->registry->output->formMultiDropdown( "templates_{$i}[]", $_methods, $methods, 5, "templates_{$i}", "", "' style='width: 100%'" ); - - $i++; - } - } - - $form["skin_file_{$i}"] = $this->registry->output->formDropdown( "skin_{$i}", $_skinFiles, null, "skin_{$i}", "onchange='acp.hooks.generateTemplates({$i});'" ); - - $output = $this->html->inline_skins( $this->hook, $form, $i ); - break; - - case 'tasks': - $_tasks = $this->hooksFunctions->getTasks(); - - $form = array(); - $form['tasks'] = $this->registry->output->formMultiDropdown( "tasks[]", $_tasks, $this->data['tasks'], 5, "tasks" ); - - $output = $this->html->inline_tasks( $this->hook, $form ); - break; - - case 'database': - // First we'll show their current DB changes, then give them a dropdown to add another - $i = 1; - $form = array(); - $types = array( - array( '0', $this->lang->words['hook_db_select'] ), - array( 'create', $this->lang->words['hook_db_create'] ), - array( 'alter', $this->lang->words['hook_db_alter'] ), - array( 'update', $this->lang->words['hook_db_update'] ), - array( 'insert', $this->lang->words['hook_db_insert'] ), - ); - $alters = array( - array( 'add', $this->lang->words['hook_db_addnew'] ), - array( 'change', $this->lang->words['hook_db_change'] ), - array( 'remove', $this->lang->words['hook_db_drop'] ), - ); - - if( count($this->data['database']) ) - { - foreach( $this->data['database'] as $type => $data ) - { - foreach( $data as $change ) - { - $form["type_{$i}"] = $this->registry->output->formDropdown( "type_{$i}", $types, $type, "type_{$i}", "onchange='acp.hooks.generateFields({$i});'" ); - - switch( $type ) - { - case 'create': - $form['field_1_' . $i ] = $this->registry->output->formInput( "name_{$i}", $change['name'] ); - $form['description_1_' . $i ] = $this->lang->words['desc_newtable']; - $form['field_2_' . $i ] = $this->registry->output->formTextarea( "fields_{$i}", htmlspecialchars($change['fields']) ); - $form['description_2_' . $i ] = $this->lang->words['desc_fieldnames']; - $form['field_3_' . $i ] = $this->registry->output->formInput( "tabletype_{$i}", $change['tabletype'] ); - $form['description_4_' . $i ] = $this->lang->words['desc_tabletype']; - break; - - case 'alter': - $form['field_1_' . $i ] = $this->registry->output->formDropdown( "altertype_{$i}", $alters, $change['altertype'] ); - $form['description_1_' . $i ] = $this->lang->words['desc_altertype']; - $form['field_2_' . $i ] = $this->registry->output->formInput( "table_{$i}", $change['table'] ); - $form['description_2_' . $i ] = $this->lang->words['desc_newtable']; - $form['field_3_' . $i ] = $this->registry->output->formInput( "field_{$i}", $change['field'] ); - $form['description_3_' . $i ] = $this->lang->words['desc_field']; - $form['field_4_' . $i ] = $this->registry->output->formInput( "newfield_{$i}", $change['newfield'] ); - $form['description_4_' . $i ] = $this->lang->words['desc_changefield']; - $form['field_5_' . $i ] = $this->registry->output->formInput( "fieldtype_{$i}", $change['fieldtype'] ); - $form['description_5_' . $i ] = $this->lang->words['desc_definition']; - $form['field_6_' . $i ] = $this->registry->output->formInput( "default_{$i}", htmlspecialchars($change['default']) ); - $form['description_6_' . $i ] = $this->lang->words['desc_defaultvalue']; - break; - - case 'update': - $form['field_1_' . $i ] = $this->registry->output->formInput( "table_{$i}", $change['table'] ); - $form['description_1_' . $i ] = $this->lang->words['desc_newtable']; - $form['field_2_' . $i ] = $this->registry->output->formInput( "field_{$i}", $change['field'] ); - $form['description_2_' . $i ] = $this->lang->words['desc_field']; - $form['field_3_' . $i ] = $this->registry->output->formInput( "newvalue_{$i}", htmlspecialchars($change['newvalue']) ); - $form['description_3_' . $i ] = $this->lang->words['desc_newvalue']; - $form['field_4_' . $i ] = $this->registry->output->formInput( "oldvalue_{$i}", htmlspecialchars($change['oldvalue']) ); - $form['description_4_' . $i ] = $this->lang->words['desc_oldvalue']; - $form['field_5_' . $i ] = $this->registry->output->formInput( "where_{$i}", htmlspecialchars($change['where']) ); - $form['description_5_' . $i ] = $this->lang->words['desc_where']; - break; - - case 'insert': - $form['field_1_' . $i ] = $this->registry->output->formInput( "table_{$i}", $change['table'] ); - $form['description_1_' . $i ] = $this->lang->words['desc_newtable']; - $form['field_2_' . $i ] = $this->registry->output->formTextarea( "updates_{$i}", htmlspecialchars($change['updates']) ); - $form['description_2_' . $i ] = $this->lang->words['desc_data']; - $form['field_3_' . $i ] = $this->registry->output->formInput( "fordelete_{$i}", htmlspecialchars($change['fordelete']) ); - $form['description_3_' . $i ] = $this->lang->words['desc_revert']; - break; - } - - $i++; - } - } - } - - $form["type_{$i}"] = $this->registry->output->formDropdown( "type_{$i}", $types, null, "type_{$i}", "onchange='acp.hooks.generateFields({$i});'" ); - - $output = $this->html->inline_database( $this->hook, $form, $i ); - break; - - case 'custom': - $form = array(); - $form['custom'] = $this->registry->output->formInput( "custom", $this->data['custom'] ); - - $output = $this->html->inline_custom( $this->hook, $form ); - break; - } - - //----------------------------------------- - // Print... - //----------------------------------------- - - $this->returnHtml( $output ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Hooks (AJAX) + * Last Updated: $Date: 2010-10-14 13:15:13 -0400 (Thu, 14 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 1st march 2002 + * @version $Revision: 6980 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class admin_core_ajax_hooks extends ipsAjaxCommand +{ + /** + * Cache object + * + * @var object + */ + public $cache; + + /** + * Hook ID + * + * @var integer + */ + public $hookId; + + /** + * Hook data + * + * @var array + */ + public $hook; + + /** + * Hook's export settings + * + * @var array + */ + public $data; + + /** + * Hooks library + * + * @var object Hooks library + */ + private $hooksFunctions; + + /** + * Main class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = ipsRegistry::getClass('output')->loadTemplate('cp_skin_hooks_export'); + + //----------------------------------------- + // Load hooks library + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') . '/sources/classes/hooksFunctions.php', 'hooksFunctions' ); + $this->hooksFunctions = new $classToLoad( $registry ); + + //----------------------------------------- + // Load lang + //----------------------------------------- + + ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_hooks' ) ); + + switch( $this->request['do'] ) + { + case 'getStrings': + $this->_getAjaxStrings(); + break; + + case 'getLangFiles': + $this->_getAjaxFiles(); + break; + + case 'getTemplates': + $this->_getAjaxTemplates(); + break; + + case 'getSkinFiles': + $this->_getAjaxSkins(); + break; + + // These are for the add file form + case 'getGroupsForAdd': + $this->_getGroupsForAdd(); + break; + + case 'getTemplatesForAdd': + $this->_getTemplatesForAdd(); + break; + + case 'getHookIds': + $this->_getHookIds(); + break; + + case 'getDataLocationsForAdd': + $this->_getDataLocationsForAdd(); + break; + + case 'getApplications': + $this->_getApplications(); + break; + + case 'save': + $this->save(); + break; + + case 'show': + default: + $this->show(); + break; + } + } + + /** + * Get applications + * + * @return void [Outputs to screen] + */ + protected function _getApplications() + { + $i = intval( $this->request['i'] ); + $apps = array(); + + foreach( ipsRegistry::$applications as $dir => $appdata ) + { + $apps[] = array( $dir, $appdata['app_title'] ); + } + + $output = $this->registry->output->formDropdown( "libApplication[{$i}]", $apps ); + + $this->returnHtml( $output ); + } + + /** + * Get data hook locations + * + * @return void [Outputs to screen] + */ + protected function _getDataLocationsForAdd() + { + $i = intval( $this->request['i'] ); + + $_locations = IPSLib::getDataHookLocations(); + $output = $this->registry->output->formDropdown( "dataLocation[{$i}]", $_locations ); + + $this->returnHtml( $output ); + } + + /** + * Get all hook ids for a template/type + * + * @return void [Outputs to screen] + */ + protected function _getHookIds() + { + $i = intval( $this->request['i'] ); + $template = IPSText::alphanumericalClean( $this->request['template'] ); + $type = IPSText::alphanumericalClean( $this->request['type'] ); + $return = $this->hooksFunctions->getHookIds( $template, $type ); + + $output = $this->registry->output->formDropdown( "id[{$i}]", $return, null, "id[{$i}]", "onchange='getHookEntryPoints({$i});'" ); + + $this->returnHtml( $output ); + } + + /** + * Get all skin files + * + * @return void [Outputs to screen] + */ + protected function _getGroupsForAdd() + { + $i = intval( $this->request['i'] ); + + $_skinFiles = $this->hooksFunctions->getSkinGroups(); + $output = $this->registry->output->formDropdown( "skinGroup[{$i}]", $_skinFiles, null, "skinGroup[{$i}]", "onchange='getTemplatesForAdd({$i});'" ); + + $this->returnHtml( $output ); + } + + /** + * Get all skin templates + * + * @return void [Outputs to screen] + */ + protected function _getTemplatesForAdd() + { + $i = intval( $this->request['i'] ); + $group = IPSText::alphanumericalClean( $this->request['group'] ); + + $_strings = $this->hooksFunctions->getSkinMethods( $group, true ); + $output = $this->registry->output->formDropdown( "skinFunction[{$i}]", $_strings, null, "skinFunction[{$i}]", "onchange='getTypeOfHook({$i});'" ); + + $this->returnHtml( $output ); + } + + /** + * Get language strings in a given file + * + * @return void [Outputs to screen] + */ + protected function _getAjaxStrings() + { + $group = IPSText::alphanumericalClean( $this->request['group'] ); + $i = intval( $this->request['i'] ); + $hook = intval( $this->request['id'] ); + + $this->hookId = intval( $this->request['id'] ); + $this->hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $this->hookId ) ); + $this->data = unserialize($this->hook['hook_extra_data']); + + $_strings = $this->hooksFunctions->getStrings( $group ); + $output = $this->registry->output->formMultiDropdown( "strings_{$i}[]", $_strings, $this->data['language'][ $group ], 5, "strings_{$i}", "", "' style='width: 100%'" ); + + $this->returnHtml( $output ); + } + + /** + * Get all language files + * + * @return void [Outputs to screen] + */ + protected function _getAjaxFiles() + { + $i = intval( $this->request['i'] ); + $hook = intval( $this->request['id'] ); + + $this->hookId = intval( $this->request['id'] ); + $this->hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $this->hookId ) ); + $this->data = unserialize($this->hook['hook_extra_data']); + + $_langFiles = $this->hooksFunctions->getLanguageFiles(); + $output = $this->registry->output->formDropdown( "language_{$i}", $_langFiles, null, "language_{$i}", "onchange='acp.hooks.generateStrings({$i});'" ); + + $this->returnHtml( $output ); + } + + /** + * Get skin templates in a given file + * + * @return void [Outputs to screen] + */ + protected function _getAjaxTemplates() + { + $group = IPSText::alphanumericalClean( $this->request['group'] ); + $i = intval( $this->request['i'] ); + $hook = intval( $this->request['id'] ); + + $this->hookId = intval( $this->request['id'] ); + $this->hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $this->hookId ) ); + $this->data = unserialize($this->hook['hook_extra_data']); + + $_strings = $this->hooksFunctions->getSkinMethods( $group ); + $output = $this->registry->output->formMultiDropdown( "templates_{$i}[]", $_strings, $this->data['templates'][ $group ], 5, "templates_{$i}", "", "' style='width: 100%'" ); + + $this->returnHtml( $output ); + } + + /** + * Get all skin files + * + * @return void [Outputs to screen] + */ + protected function _getAjaxSkins() + { + $i = intval( $this->request['i'] ); + $hook = intval( $this->request['id'] ); + + $this->hookId = intval( $this->request['id'] ); + $this->hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $this->hookId ) ); + $this->data = unserialize($this->hook['hook_extra_data']); + + $_skinFiles = $this->hooksFunctions->getSkinGroups(); + $output = $this->registry->output->formDropdown( "skin_{$i}", $_skinFiles, null, "skin_{$i}", "onchange='acp.hooks.generateTemplates({$i});'" ); + + $this->returnHtml( $output ); + } + + /** + * Save the form + * + * @return void [Outputs to screen] + */ + protected function save() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $name = trim( IPSText::alphanumericalClean( $this->request['name'] ) ); + $this->hookId = intval( $this->request['id'] ); + $this->hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $this->hookId ) ); + $this->data = unserialize($this->hook['hook_extra_data']); + + $output = ''; + + //----------------------------------------- + // Got a hook? + //----------------------------------------- + + if ( ! $this->hook['hook_id'] ) + { + $this->returnJsonError( $this->lang->words['hook_cannot_load'] ); + } + + //----------------------------------------- + // Run the proper operation + //----------------------------------------- + + switch( $name ) + { + case 'settings': + $_settingGroups = $this->hooksFunctions->getSettingGroups(); + $_settings = $this->hooksFunctions->getSettings(); + $toSave = array(); + $toDisplay = array(); + + $toSave['settingGroups'] = array(); + $toSave['settings'] = array(); + + if( is_array($this->request['setting_groups']) AND count($this->request['setting_groups']) ) + { + $toSave['settingGroups'] = $this->request['setting_groups']; + + foreach( $_settingGroups as $data ) + { + if( in_array( $data[0], $toSave['settingGroups'] ) ) + { + $toDisplay['settingGroups'][] = $data[1]; + } + } + } + + if( is_array($this->request['settings']) AND count($this->request['settings']) ) + { + $toSave['settings'] = $this->request['settings']; + + foreach( $_settings as $data ) + { + if( in_array( $data[0], $toSave['settings'] ) ) + { + $toDisplay['settings'][] = $data[1]; + } + } + } + + $this->data['settingGroups'] = $toSave['settingGroups']; + $this->data['settings'] = $toSave['settings']; + + if( count($toDisplay['settingGroups']) ) + { + $output .= "{$this->lang->words['hook_setting_groups']} " . implode( ', ', $toDisplay['settingGroups'] ); + } + + if( count($toDisplay['settings']) ) + { + if( count($toDisplay['settingGroups']) ) + { + $output .= '
'; + } + + $output .= "{$this->lang->words['hook_settings']} " . implode( ', ', $toDisplay['settings'] ); + } + + $this->data['display']['settings'] = $output; + + $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId ); + + if( !$output ) + { + $output = $this->lang->words['hook_no_settings']; + } + break; + + case 'language': + $_langFiles = $this->hooksFunctions->getLanguageFiles(); + $ids = array(); + $files = array(); + $strings = array(); + $toDisplay = array(); + $this->data['language'] = array(); + + foreach( $_POST as $k => $v ) + { + if( preg_match( "/^language_(\d+)$/", $k, $matches ) ) + { + $files[ $matches[1] ] = $v; + $strings[ $matches[1] ] = $this->request[ 'strings_' . $matches[1] ]; + $ids[ $matches[1] ] = $matches[1]; + } + } + + foreach( $ids as $id ) + { + if( $files[ $id ] AND $strings[ $id ] ) + { + $this->data['language'][ $files[ $id ] ] = $strings[ $id ]; + $toDisplay[] = "{$this->lang->words['hook_from']} {$files[ $id ]}: " . implode( ', ', $strings[ $id ] ); + } + } + + if( count($toDisplay) ) + { + $output .= implode( '
', $toDisplay ); + } + + $this->data['display']['language'] = $output; + + $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId ); + + if( !$output ) + { + $output = $this->lang->words['hook_no_language']; + } + break; + + case 'modules': + $_modules = $this->hooksFunctions->getModules(); + $toSave = array(); + $toDisplay = array(); + + if( is_array($this->request['modules']) AND count($this->request['modules']) ) + { + $toSave = $this->request['modules']; + } + + foreach( $_modules as $data ) + { + if( in_array( $data[0], $toSave ) ) + { + $toDisplay[] = $data[1]; + } + } + + if( count($toDisplay) ) + { + $output .= "{$this->lang->words['hook_modules']} " . implode( ', ', $toDisplay ); + } + + $this->data['modules'] = $toSave; + $this->data['display']['modules'] = $output; + + $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId ); + + if( !$output ) + { + $output = $this->lang->words['hook_no_modules']; + } + break; + + case 'help': + $_help = $this->hooksFunctions->getHelpFiles(); + $toSave = array(); + $toDisplay = array(); + + if( is_array($this->request['help']) AND count($this->request['help']) ) + { + $toSave = $this->request['help']; + } + + foreach( $_help as $data ) + { + if( in_array( $data[0], $toSave ) ) + { + $toDisplay[] = $data[1]; + } + } + + if( count($toDisplay) ) + { + $output .= "{$this->lang->words['hook_help']} " . implode( ', ', $toDisplay ); + } + + $this->data['help'] = $toSave; + $this->data['display']['help'] = $output; + + $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId ); + + if( !$output ) + { + $output = $this->lang->words['hook_no_help']; + } + break; + + case 'skins': + $_skinFiles = $this->hooksFunctions->getSkinGroups(); + $ids = array(); + $files = array(); + $templates = array(); + $toDisplay = array(); + $this->data['templates'] = array(); + + foreach( $_POST as $k => $v ) + { + if( preg_match( "/^skin_(\d+)$/", $k, $matches ) ) + { + $files[ $matches[1] ] = $v; + $templates[ $matches[1] ] = $this->request[ 'templates_' . $matches[1] ]; + $ids[ $matches[1] ] = $matches[1]; + } + } + + foreach( $ids as $id ) + { + if( $files[ $id ] AND $templates[ $id ] ) + { + $this->data['templates'][ $files[ $id ] ] = $templates[ $id ]; + $toDisplay[] = "{$this->lang->words['hook_from']} {$files[ $id ]}: " . implode( ', ', $templates[ $id ] ); + } + } + + if( count($toDisplay) ) + { + $output .= implode( '
', $toDisplay ); + } + + $this->data['display']['templates'] = $output; + + $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId ); + + if( !$output ) + { + $output = $this->lang->words['hook_no_skin']; + } + break; + + case 'css': + /* INIT */ + $_cssFiles = $this->hooksFunctions->getCSSFiles(); + $toSave = array(); + $toDisplay = array(); + + /* Check to see if any were selected */ + if( is_array( $this->request['css'] ) && count( $this->request['css'] ) ) + { + $toSave = $this->request['css']; + } + + /* Output */ + foreach( $_cssFiles as $data ) + { + if( in_array( $data[0], $toSave ) ) + { + $toDisplay[] = $data[1]; + } + } + + if( count( $toDisplay ) ) + { + $output .= "{$this->lang->words['hook_css']} " . implode( ', ', $toDisplay ); + } + + /* Save */ + $this->data['css'] = $toSave; + $this->data['display']['css'] = $output; + + $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize( $this->data ) ), 'hook_id=' . $this->hookId ); + + /* None found? */ + if( ! $output ) + { + $output = $this->lang->words['hook_no_css']; + } + break; + + case 'tasks': + $_tasks = $this->hooksFunctions->getTasks(); + $toSave = array(); + $toDisplay = array(); + + if( is_array($this->request['tasks']) AND count($this->request['tasks']) ) + { + $toSave = $this->request['tasks']; + } + + foreach( $_tasks as $data ) + { + if( in_array( $data[0], $toSave ) ) + { + $toDisplay[] = $data[1]; + } + } + + if( count($toDisplay) ) + { + $output .= "{$this->lang->words['hook_tasks']} " . implode( ', ', $toDisplay ); + } + + $this->data['tasks'] = $toSave; + $this->data['display']['tasks'] = $output; + + $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId ); + + if( !$output ) + { + $output = $this->lang->words['hook_no_tasks']; + } + break; + + case 'database': + $types = array( + array( '0', $this->lang->words['hook_db_select'] ), + array( 'create', $this->lang->words['hook_db_create'] ), + array( 'alter', $this->lang->words['hook_db_alter'] ), + array( 'update', $this->lang->words['hook_db_update'] ), + array( 'insert', $this->lang->words['hook_db_insert'] ), + ); + $alters = array( + array( 'add', $this->lang->words['hook_db_addnew'] ), + array( 'change', $this->lang->words['hook_db_change'] ), + array( 'remove', $this->lang->words['hook_db_drop'] ), + ); + $ids = array(); + $toDisplay = array(); + $this->data['database'] = array(); + + /* Since this is more complicated, just get ids for now... */ + foreach( $_POST as $k => $v ) + { + if( preg_match( "/^type_(\d+)$/", $k, $matches ) ) + { + $ids[ $matches[1] ] = $matches[1]; + } + } + + /* Now loop through and set stuff properly.. */ + foreach( $ids as $id ) + { + $type = $this->request[ 'type_' . $id ]; + + if( !$type ) + { + continue; + } + + switch( $type ) + { + case 'create': + $name = $this->request[ 'name_' . $id ]; + $fields = IPSText::br2nl( $_POST[ 'fields_' . $id ] ); + $tabletype = $this->request[ 'tabletype_' . $id ]; + + if( !$name OR !$fields ) + { + continue; + } + + $this->data['database']['create'][] = array( + 'name' => $name, + 'fields' => $fields, + 'tabletype' => $tabletype + ); + + $text = "CREATE TABLE {$name} ( + {$fields} + )"; + + if( $tabletype ) + { + $text .= " TYPE=" . $tabletype; + } + + $toDisplay[] = nl2br($text); + break; + + case 'alter': + $altertype = $this->request[ 'altertype_' . $id ]; + $table = $this->request[ 'table_' . $id ]; + $field = $this->request[ 'field_' . $id ]; + $newfield = $this->request[ 'newfield_' . $id ]; + $fieldtype = $this->request[ 'fieldtype_' . $id ]; + $default = $_POST[ 'default_' . $id ]; + + if( !$altertype OR !$table OR !$field ) + { + continue; + } + + $this->data['database']['alter'][] = array( + 'altertype' => $altertype, + 'table' => $table, + 'field' => $field, + 'newfield' => $newfield, + 'fieldtype' => $fieldtype, + 'default' => $default, + ); + + $text = "ALTER TABLE {$table}"; + + switch( $altertype ) + { + case 'add': + $text .= " ADD {$field} {$fieldtype}"; + + if( $default !== '' ) + { + $text .= " DEFAULT {$default}"; + } + break; + + case 'change': + $text .= " CHANGE {$field} {$newfield} {$fieldtype}"; + + if( $default !== '' ) + { + $text .= " DEFAULT {$default}"; + } + break; + + case 'remove': + $text .= " DROP {$field}"; + break; + } + + $toDisplay[] = nl2br($text); + break; + + case 'update': + $table = $this->request[ 'table_' . $id ]; + $field = $this->request[ 'field_' . $id ]; + $newvalue = $_POST[ 'newvalue_' . $id ]; + $oldvalue = $_POST[ 'oldvalue_' . $id ]; + $where = $_POST[ 'where_' . $id ]; + + if( !$table OR !$field OR !$newvalue ) + { + continue; + } + + $this->data['database']['update'][] = array( + 'table' => $table, + 'field' => $field, + 'newvalue' => $newvalue, + 'oldvalue' => $oldvalue, + 'where' => $where + ); + + $text = "UPDATE {$table} SET {$field}='{$newvalue}'"; + + if( $where ) + { + $text .= " WHERE " . $where; + } + + $toDisplay[] = nl2br($text); + break; + + case 'insert': + $table = $this->request[ 'table_' . $id ]; + $updates = $_POST[ 'updates_' . $id ]; + $fordelete = $_POST[ 'fordelete_' . $id ]; + + if( !$table OR !$updates ) + { + continue; + } + + $this->data['database']['insert'][] = array( + 'table' => $table, + 'updates' => $updates, + 'fordelete' => $fordelete, + ); + + $cols = array(); + $vals = array(); + $index = 0; + + $toins = explode( ',', $updates ); + + foreach( $toins as $insertQuery ) + { + $piece = explode( '=', $insertQuery ); + $cols[ $index ] = $piece[0]; + $vals[ $index ] = $piece[1]; + $index++; + } + + $text = "INSERT INTO {$table} ("; + $text .= implode( ', ', $cols ); + $text .= ") VALUES ('"; + $text .= implode( "', '", $vals ); + $text .= "')"; + + $toDisplay[] = nl2br($text); + break; + } + } + + if( count($toDisplay) ) + { + $output .= implode( '
', $toDisplay ); + } + + $this->data['display']['database'] = $output; + + $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId ); + + if( !$output ) + { + $output = $this->lang->words['hook_no_db']; + } + + break; + + case 'custom': + $toSave = ''; + $toDisplay = ''; + + if( $this->request['custom'] ) + { + $toSave = $this->request['custom']; + $toDisplay = $this->request['custom']; + } + + if( $toDisplay ) + { + $output .= "install_" . $toDisplay; + } + + $this->data['custom'] = $toSave; + $this->data['display']['custom'] = $output; + + $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId ); + + if( !$output ) + { + $output = $this->lang->words['hook_no_custom']; + } + break; + } + + //----------------------------------------- + // Print... + //----------------------------------------- + + $return = array( 'success' => true, 'message' => $output ); + + $this->returnJsonArray( $return ); + } + + /** + * Show the form + * + * @return void [Outputs to screen] + */ + protected function show() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $name = trim( IPSText::alphanumericalClean( $this->request['name'] ) ); + $this->hookId = intval( $this->request['id'] ); + $this->hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $this->hookId ) ); + $this->data = unserialize($this->hook['hook_extra_data']); + + $output = ''; + + //----------------------------------------- + // Got a member? + //----------------------------------------- + + if ( ! $this->hook['hook_id'] ) + { + $this->returnJsonError( $this->lang->words['hook_cannot_load'] ); + } + + //----------------------------------------- + // Run the proper operation + //----------------------------------------- + + switch( $name ) + { + case 'settings': + $_settingGroups = $this->hooksFunctions->getSettingGroups(); + $_settings = $this->hooksFunctions->getSettings(); + + $form = array(); + $form['groups'] = $this->registry->output->formMultiDropdown( "setting_groups[]", $_settingGroups, $this->data['settingGroups'], 5, "setting_groups" ); + $form['settings'] = $this->registry->output->formMultiDropdown( "settings[]", $_settings, $this->data['settings'], 5, "settings" ); + + $output = $this->html->inline_settings( $this->hook, $form ); + break; + + case 'languages': + // We'll show the lang files and let them select lang file, then select strings, then they can repeat + $_langFiles = $this->hooksFunctions->getLanguageFiles(); + $i = 1; + $form = array(); + + if( count($this->data['language']) ) + { + foreach( $this->data['language'] as $file => $strings ) + { + $form["language_file_{$i}"] = $this->registry->output->formDropdown( "language_{$i}", $_langFiles, $file, "language_{$i}", "onchange='acp.hooks.generateStrings({$i});'" ); + + $_strings = $this->hooksFunctions->getStrings( $file ); + $form["language_strings_{$i}"] = $this->registry->output->formMultiDropdown( "strings_{$i}[]", $_strings, $strings, 5, "strings_{$i}", "", "' style='width: 100%'" ); + + $i++; + } + } + + $form["language_file_{$i}"] = $this->registry->output->formDropdown( "language_{$i}", $_langFiles, null, "language_{$i}", "onchange='acp.hooks.generateStrings({$i});'" ); + + $output = $this->html->inline_languages( $this->hook, $form, $i ); + break; + + case 'modules': + $_modules = $this->hooksFunctions->getModules(); + + $form = array(); + $form['modules'] = $this->registry->output->formMultiDropdown( "modules[]", $_modules, $this->data['modules'], 5, "modules" ); + + $output = $this->html->inline_modules( $this->hook, $form ); + break; + + case 'help': + $_help = $this->hooksFunctions->getHelpFiles(); + + $form = array(); + $form['help'] = $this->registry->output->formMultiDropdown( "help[]", $_help, $this->data['help'], 5, "help" ); + + $output = $this->html->inline_help( $this->hook, $form ); + break; + + case 'skins': + // We'll show the skin groups and let them select skin file, then select templates, then they can repeat + $_skinFiles = $this->hooksFunctions->getSkinGroups(); + $i = 1; + $form = array(); + + if( count($this->data['templates']) ) + { + foreach( $this->data['templates'] as $file => $methods ) + { + $form["skin_file_{$i}"] = $this->registry->output->formDropdown( "skin_{$i}", $_skinFiles, $file, "skin_{$i}", "onchange='acp.hooks.generateTemplates({$i});'" ); + + $_methods = $this->hooksFunctions->getSkinMethods( $file ); + $form["skin_method_{$i}"] = $this->registry->output->formMultiDropdown( "templates_{$i}[]", $_methods, $methods, 5, "templates_{$i}", "", "' style='width: 100%'" ); + + $i++; + } + } + + $form["skin_file_{$i}"] = $this->registry->output->formDropdown( "skin_{$i}", $_skinFiles, null, "skin_{$i}", "onchange='acp.hooks.generateTemplates({$i});'" ); + + $output = $this->html->inline_skins( $this->hook, $form, $i ); + break; + + case 'css': + $_cssFiles = $this->hooksFunctions->getCSSFiles(); + + $form = array(); + $form['css'] = $this->registry->output->formMultiDropdown( "css[]", $_cssFiles, $this->data['css'], 5, "css" ); + + $output = $this->html->inline_css( $this->hook, $form ); + break; + + case 'tasks': + $_tasks = $this->hooksFunctions->getTasks(); + + $form = array(); + $form['tasks'] = $this->registry->output->formMultiDropdown( "tasks[]", $_tasks, $this->data['tasks'], 5, "tasks" ); + + $output = $this->html->inline_tasks( $this->hook, $form ); + break; + + case 'database': + // First we'll show their current DB changes, then give them a dropdown to add another + $i = 1; + $form = array(); + $types = array( + array( '0', $this->lang->words['hook_db_select'] ), + array( 'create', $this->lang->words['hook_db_create'] ), + array( 'alter', $this->lang->words['hook_db_alter'] ), + array( 'update', $this->lang->words['hook_db_update'] ), + array( 'insert', $this->lang->words['hook_db_insert'] ), + ); + $alters = array( + array( 'add', $this->lang->words['hook_db_addnew'] ), + array( 'change', $this->lang->words['hook_db_change'] ), + array( 'remove', $this->lang->words['hook_db_drop'] ), + ); + + if( count($this->data['database']) ) + { + foreach( $this->data['database'] as $type => $data ) + { + foreach( $data as $change ) + { + $form["type_{$i}"] = $this->registry->output->formDropdown( "type_{$i}", $types, $type, "type_{$i}", "onchange='acp.hooks.generateFields({$i});'" ); + + switch( $type ) + { + case 'create': + $form['field_1_' . $i ] = $this->registry->output->formInput( "name_{$i}", $change['name'] ); + $form['description_1_' . $i ] = $this->lang->words['desc_newtable']; + $form['field_2_' . $i ] = $this->registry->output->formTextarea( "fields_{$i}", htmlspecialchars($change['fields']) ); + $form['description_2_' . $i ] = $this->lang->words['desc_fieldnames']; + $form['field_3_' . $i ] = $this->registry->output->formInput( "tabletype_{$i}", $change['tabletype'] ); + $form['description_4_' . $i ] = $this->lang->words['desc_tabletype']; + break; + + case 'alter': + $form['field_1_' . $i ] = $this->registry->output->formDropdown( "altertype_{$i}", $alters, $change['altertype'] ); + $form['description_1_' . $i ] = $this->lang->words['desc_altertype']; + $form['field_2_' . $i ] = $this->registry->output->formInput( "table_{$i}", $change['table'] ); + $form['description_2_' . $i ] = $this->lang->words['desc_newtable']; + $form['field_3_' . $i ] = $this->registry->output->formInput( "field_{$i}", $change['field'] ); + $form['description_3_' . $i ] = $this->lang->words['desc_field']; + $form['field_4_' . $i ] = $this->registry->output->formInput( "newfield_{$i}", $change['newfield'] ); + $form['description_4_' . $i ] = $this->lang->words['desc_changefield']; + $form['field_5_' . $i ] = $this->registry->output->formInput( "fieldtype_{$i}", $change['fieldtype'] ); + $form['description_5_' . $i ] = $this->lang->words['desc_definition']; + $form['field_6_' . $i ] = $this->registry->output->formInput( "default_{$i}", htmlspecialchars($change['default']) ); + $form['description_6_' . $i ] = $this->lang->words['desc_defaultvalue']; + break; + + case 'update': + $form['field_1_' . $i ] = $this->registry->output->formInput( "table_{$i}", $change['table'] ); + $form['description_1_' . $i ] = $this->lang->words['desc_newtable']; + $form['field_2_' . $i ] = $this->registry->output->formInput( "field_{$i}", $change['field'] ); + $form['description_2_' . $i ] = $this->lang->words['desc_field']; + $form['field_3_' . $i ] = $this->registry->output->formInput( "newvalue_{$i}", htmlspecialchars($change['newvalue']) ); + $form['description_3_' . $i ] = $this->lang->words['desc_newvalue']; + $form['field_4_' . $i ] = $this->registry->output->formInput( "oldvalue_{$i}", htmlspecialchars($change['oldvalue']) ); + $form['description_4_' . $i ] = $this->lang->words['desc_oldvalue']; + $form['field_5_' . $i ] = $this->registry->output->formInput( "where_{$i}", htmlspecialchars($change['where']) ); + $form['description_5_' . $i ] = $this->lang->words['desc_where']; + break; + + case 'insert': + $form['field_1_' . $i ] = $this->registry->output->formInput( "table_{$i}", $change['table'] ); + $form['description_1_' . $i ] = $this->lang->words['desc_newtable']; + $form['field_2_' . $i ] = $this->registry->output->formTextarea( "updates_{$i}", htmlspecialchars($change['updates']) ); + $form['description_2_' . $i ] = $this->lang->words['desc_data']; + $form['field_3_' . $i ] = $this->registry->output->formInput( "fordelete_{$i}", htmlspecialchars($change['fordelete']) ); + $form['description_3_' . $i ] = $this->lang->words['desc_revert']; + break; + } + + $i++; + } + } + } + + $form["type_{$i}"] = $this->registry->output->formDropdown( "type_{$i}", $types, null, "type_{$i}", "onchange='acp.hooks.generateFields({$i});'" ); + + $output = $this->html->inline_database( $this->hook, $form, $i ); + break; + + case 'custom': + $form = array(); + $form['custom'] = $this->registry->output->formInput( "custom", $this->data['custom'] ); + + $output = $this->html->inline_custom( $this->hook, $form ); + break; + } + + //----------------------------------------- + // Print... + //----------------------------------------- + + $this->returnHtml( $output ); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/ajax/index.html b/upload/admin/applications/core/modules_admin/ajax/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/ajax/index.html +++ b/upload/admin/applications/core/modules_admin/ajax/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/ajax/livesearch.php b/upload/admin/applications/core/modules_admin/ajax/livesearch.php index 7e454a1e..b0e4bd8e 100644 --- a/upload/admin/applications/core/modules_admin/ajax/livesearch.php +++ b/upload/admin/applications/core/modules_admin/ajax/livesearch.php @@ -1,229 +1,405 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class admin_core_ajax_livesearch extends ipsAjaxCommand -{ - /** - * HTML to output - * - * @access private - * @var string - */ - private $output; - - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load skin - //----------------------------------------- - $this->registry->class_localization->loadLanguageFile( array( 'admin_ajax' ) ); - $this->html = $this->registry->output->loadTemplate('cp_skin_livesearch'); - - /* What to do */ - switch( $this->request['do'] ) - { - case 'search': - $this->doSearchRequest(); - break; - - case 'template': - default: - $this->getTemplate(); - break; - } - - /* Output */ - $this->returnHtml( $this->output ); - } - - /** - * Fetches the live search template - * - * @access public - * @return void - */ - public function getTemplate() - { - $this->output .= $this->html->liveSearchTemplate(); - } - - /** - * Handles the live search - * - * @access public - * @return void - */ - public function doSearchRequest() - { - /* INI */ - $search_term = $this->request['search_term']; - - $results = array(); - $return = array( 'settings' => null, 'location' => null ); - $max = 20; - $count = 0; - $secCount = 0; - - /* Do search here */ - $results = $this->_getSettings( $search_term, $results ); - - $results = $this->_getFromXML( $search_term, $results ); - if( isset( $results['settings'] ) AND is_array( $results['settings'] ) AND count($results['settings']) ) - { - foreach( $results['settings'] as $setting ) - { - $count++; - $secCount++; - $return['settings'] .= $this->html->searchRowSetting( $setting, $count, $secCount ); - - /*if( $count >= $max ) - { - break; - }*/ - } - } - - $secCount = 0; - - if( isset( $results['location'] ) AND is_array( $results['location'] ) AND count($results['location'])) - { - foreach( $results['location'] as $location ) - { - $count++; - $secCount++; - $return['location'] .= $this->html->searchRowLocation( $location, $count, $secCount ); - - /*if( $count >= $max ) - { - break; - }*/ - } - } - - /* Output */ - $this->output .= $this->html->liveSearchDisplay( $return, $search_term ); - } - - /** - * Searches the settings table - * - * @access private - * @param string Search term - * @param array Existing search results - * @return array New search results - */ - private function _getSettings( $term, $results ) - { - $term = strtolower($term); - - if( !IN_DEV ) - { - $this->DB->build( array( - 'select' => 'c.conf_group, c.conf_title, c.conf_description, c.conf_keywords', - 'from' => array( 'core_sys_conf_settings' => 'c' ), - 'where' => 't.conf_title_noshow=0 AND (' . $this->DB->buildLower('c.conf_title') . " LIKE '%{$term}%' OR ". $this->DB->buildLower('c.conf_description') . " LIKE '%{$term}%' OR " . $this->DB->buildLower('c.conf_keywords') . " LIKE '%{$term}%')", - 'add_join' => array( - array( - 'from' => array( 'core_sys_settings_titles' => 't' ), - 'where' => 't.conf_title_id=c.conf_group', - 'type' => 'left' - ) - ) - ) ); - } - else - { - $this->DB->build( array( - 'select' => 'conf_group, conf_title, conf_description, conf_keywords', - 'from' => 'core_sys_conf_settings', - 'where' => $this->DB->buildLower('conf_title') . " LIKE '%{$term}%' OR ". $this->DB->buildLower('conf_description') . " LIKE '%{$term}%' OR " . $this->DB->buildLower('conf_keywords') . " LIKE '%{$term}%'", - ) ); - } - - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $results['settings'][] = $r; - } - - return $results; - } - - /** - * Searches the XML Files - * - * @access private - * @param string Search term - * @param array Existing search results - * @return array New search results - */ - private function _getFromXML( $term, $results ) - { - foreach( $this->cache->getCache('app_menu_cache') as $app => $cache ) - { - foreach( $cache as $entry ) - { - if( count($entry['items']) ) - { - foreach( $entry['items'] as $item ) - { - if( $item['section'] ) - { - $item['url'] = "section={$item['section']}&" . $item['url']; - } - - if( isset($item['keywords']) AND stripos( $item['keywords'], $term ) !== false ) - { - $item['url'] = "&app={$app}&module={$item['module']}&{$item['url']}"; - $results['location'][] = $item; - } - else if( stripos( $item['title'], $term ) !== false ) - { - $item['fullurl'] = "&app={$app}&module={$item['module']}&{$item['url']}"; - $results['location'][] = $item; - } - } - } - } - } - - return $results; - } + + * Invision Power Services + * IP.Board v3.1.4 + * Live Search + * Last Updated: $Date: 2010-08-17 11:38:47 -0400 (Tue, 17 Aug 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 6763 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class admin_core_ajax_livesearch extends ipsAjaxCommand +{ + /** + * HTML to output + * + * @access private + * @var string + */ + private $output; + + /** + * Skin object + * + * @access private + * @var object Skin templates + */ + private $html; + + /** + * Class entry point + * + * @access public + * @param object Registry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load skin + //----------------------------------------- + $this->registry->class_localization->loadLanguageFile( array( 'admin_ajax' ) ); + $this->html = $this->registry->output->loadTemplate('cp_skin_livesearch'); + + /* What to do */ + switch( $this->request['do'] ) + { + case 'search': + $this->doSearchRequest(); + break; + + case 'template': + default: + $this->getTemplate(); + break; + } + + /* Output */ + $this->returnHtml( $this->output ); + } + + /** + * Fetches the live search template + * + * @access public + * @return void + */ + public function getTemplate() + { + $this->output .= $this->html->liveSearchTemplate(); + } + + /** + * Handles the live search + * + * @access public + * @return void + */ + public function doSearchRequest() + { + /* INI */ + $search_term = $this->request['search_term']; + + $results = array(); + $return = array( 'members' => null, 'groups' => false, 'settings' => null, 'forums' => null, 'location' => null ); + + /* Do search here */ + $results = $this->_getSettings( $search_term, $results ); + $results = $this->_getFromXML( $search_term, $results ); + $results = $this->_getMembers( $search_term, $results ); + $results = $this->_checkGroups( $search_term, $results ); + $results = $this->_checkForums( $search_term, $results ); + + //----------------------------------------- + // Members + //----------------------------------------- + + $secCount = 0; + + if( isset( $results['members'] ) AND is_array( $results['members'] ) AND count($results['members'])) + { + foreach( $results['members'] as $members ) + { + $secCount++; + $return['members'] .= $this->html->searchRowMember( $members, $secCount ); + } + } + + //----------------------------------------- + // Group settings? + //----------------------------------------- + + $secCount = 0; + + if( $results['groups'] ) + { + foreach( $results['groups'] as $group ) + { + $secCount++; + $return['groups'] .= $this->html->searchRowGroupsTitles( $group, $secCount ); + } + } + + if( $results['groupLangs'] ) + { + $return['groups'] .= $this->html->searchRowGroups(); + } + + //----------------------------------------- + // Settings + //----------------------------------------- + + $secCount = 0; + + if( isset( $results['settings'] ) AND is_array( $results['settings'] ) AND count($results['settings']) ) + { + foreach( $results['settings'] as $setting ) + { + $secCount++; + $return['settings'] .= $this->html->searchRowSetting( $setting, $secCount ); + } + } + + //----------------------------------------- + // Forums + //----------------------------------------- + + $secCount = 0; + + if( isset( $results['forums'] ) AND is_array( $results['forums'] ) AND count($results['forums'])) + { + foreach( $results['forums'] as $forum ) + { + $secCount++; + $return['forums'] .= $this->html->searchRowForums( $forum, $secCount ); + } + } + + //----------------------------------------- + // Locations + //----------------------------------------- + + $secCount = 0; + + if( isset( $results['location'] ) AND is_array( $results['location'] ) AND count($results['location'])) + { + foreach( $results['location'] as $location ) + { + $secCount++; + $return['location'] .= $this->html->searchRowLocation( $location, $secCount ); + } + } + + /* Output */ + $this->output .= $this->html->liveSearchDisplay( $return, $search_term ); + } + + /** + * Searches for matching members + * + * @access private + * @param string Search term + * @param array Existing search results + * @return array New search results + */ + private function _getMembers( $term, $results ) + { + $term = mb_strtolower($term); + + $this->DB->build( array( + 'select' => 'member_id, members_display_name, name, members_l_username, members_l_display_name, email', + 'from' => 'members', + 'where' => "members_l_username LIKE '%{$term}%' OR members_l_display_name LIKE '%{$term}%' OR " . $this->DB->buildLower('email') . " LIKE '%{$term}%'", + ) ); + + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $_matched = ''; + + if( $r['members_l_display_name'] AND mb_strpos( $r['members_l_display_name'], $term ) !== false ) + { + $r['_matched'] = 'members_display_name'; + } + else if( $r['members_l_username'] AND mb_strpos( $r['members_l_username'], $term ) !== false ) + { + $r['_matched'] = 'name'; + } + else + { + $r['_matched'] = 'email'; + } + + $results['members'][] = $r; + } + + return $results; + } + + /** + * Check if search term is found in groups language file or in the group_cache.g_title + * + * @access private + * @param string Search term + * @param array Existing search results + * @return array New search results + */ + private function _checkGroups( $term, $results ) + { + $term = mb_strtolower($term); + $results['groups'] = false; + + $this->registry->class_localization->loadLanguageFile( array( 'admin_groups' ), 'members' ); + $this->registry->class_localization->loadLanguageFile( array( 'admin_forums' ), 'forums' ); + $this->registry->class_localization->loadLanguageFile( array( 'admin_gallery' ), 'gallery' ); + $this->registry->class_localization->loadLanguageFile( array( 'admin_blog' ), 'blog' ); + $this->registry->class_localization->loadLanguageFile( array( 'admin_downloads' ), 'downloads' ); + + foreach( $this->lang->words as $k => $v ) + { + if( strpos( $k, 'gf_' ) !== false AND strpos( $v, $term ) !== false ) + { + $results['groupLangs'] = true; + break; + } + } + + /* Now check group names */ + $groups = $this->cache->getCache('group_cache'); + + if ( is_array( $groups ) AND count( $groups ) ) + { + foreach( $groups as $id => $data ) + { + $_term = preg_quote( $term, '#' ); + + if ( preg_match( "#" . $_term . "#iu", $data['g_title'] ) ) + { + $results['groups'][] = $data; + } + } + } + + return $results; + } + + /** + * Check if search term is found in groups language file + * + * @access private + * @param string Search term + * @param array Existing search results + * @return array New search results + */ + private function _checkForums( $term, $results ) + { + $term = mb_strtolower($term); + $results['forums'] = false; + + /* Fetch forums lib */ + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' ); + $forums = new $classToLoad( $this->registry ); + $forums->strip_invisible = 1; + $forums->forumsInit(); + + /* Now check forum titles names */ + foreach( $forums->forum_by_id as $id => $data ) + { + $_term = preg_quote( $term, '#' ); + + if ( preg_match( "#" . $_term . "#iu", $data['name'] ) ) + { + $results['forums'][] = $data; + } + } + + return $results; + } + + /** + * Searches the settings table + * + * @access private + * @param string Search term + * @param array Existing search results + * @return array New search results + */ + private function _getSettings( $term, $results ) + { + $term = mb_strtolower($term); + + if( !IN_DEV ) + { + $this->DB->build( array( + 'select' => 'c.conf_group, c.conf_title, c.conf_description, c.conf_keywords', + 'from' => array( 'core_sys_conf_settings' => 'c' ), + 'where' => 't.conf_title_noshow=0 AND (' . $this->DB->buildLower('c.conf_title') . " LIKE '%{$term}%' OR ". $this->DB->buildLower('c.conf_description') . " LIKE '%{$term}%' OR " . $this->DB->buildLower('c.conf_keywords') . " LIKE '%{$term}%')", + 'add_join' => array( + array( + 'from' => array( 'core_sys_settings_titles' => 't' ), + 'where' => 't.conf_title_id=c.conf_group', + 'type' => 'left' + ) + ) + ) ); + } + else + { + $this->DB->build( array( + 'select' => 'conf_group, conf_title, conf_description, conf_keywords', + 'from' => 'core_sys_conf_settings', + 'where' => $this->DB->buildLower('conf_title') . " LIKE '%{$term}%' OR ". $this->DB->buildLower('conf_description') . " LIKE '%{$term}%' OR " . $this->DB->buildLower('conf_keywords') . " LIKE '%{$term}%'", + ) ); + } + + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $results['settings'][] = $r; + } + + return $results; + } + + /** + * Searches the XML Files + * + * @access private + * @param string Search term + * @param array Existing search results + * @return array New search results + */ + private function _getFromXML( $term, $results ) + { + foreach( $this->cache->getCache('app_menu_cache') as $app => $cache ) + { + if( IPSLib::appIsInstalled( $app ) ) + { + foreach( $cache as $entry ) + { + if( count($entry['items']) ) + { + foreach( $entry['items'] as $item ) + { + if( $item['section'] ) + { + $item['url'] = "section={$item['section']}&" . $item['url']; + } + + if( isset($item['keywords']) AND mb_stripos( $item['keywords'], $term ) !== false ) + { + $item['url'] = "&app={$app}&module={$item['module']}&{$item['url']}"; + $results['location'][] = $item; + } + else if( mb_stripos( $item['title'], $term ) !== false ) + { + $item['fullurl'] = "&app={$app}&module={$item['module']}&{$item['url']}"; + $results['location'][] = $item; + } + } + } + } + } + } + + return $results; + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/ajax/replacements.php b/upload/admin/applications/core/modules_admin/ajax/replacements.php index d5dfcd3d..e4f14045 100644 --- a/upload/admin/applications/core/modules_admin/ajax/replacements.php +++ b/upload/admin/applications/core/modules_admin/ajax/replacements.php @@ -1,21 +1,23 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * AJAX Functions For applications/core/js/ipb3CSS.js file - * Last Updated: $Date: 2009-05-15 21:17:56 -0400 (Fri, 15 May 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * Author: Matt Mecham * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 4663 $ + * @version $Revision: 5713 $ */ diff --git a/upload/admin/applications/core/modules_admin/ajax/templatediff.php b/upload/admin/applications/core/modules_admin/ajax/templatediff.php index e4756011..5bcf1ea1 100644 --- a/upload/admin/applications/core/modules_admin/ajax/templatediff.php +++ b/upload/admin/applications/core/modules_admin/ajax/templatediff.php @@ -1,21 +1,23 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * AJAX Functions For applications/core/js/ipb3Templates.js file - * Last Updated: $Date: 2009-05-15 21:17:56 -0400 (Fri, 15 May 2009) $ + * Last Updated: $Date: 2010-09-13 17:28:12 -0400 (Mon, 13 Sep 2010) $ + * * * Author: Matt Mecham * - * @author $Author: bfarber $ + * @author $Author: terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 4663 $ + * @version $Revision: 6863 $ */ @@ -72,13 +74,244 @@ class admin_core_ajax_templatediff extends ipsAjaxCommand default: case 'process': $this->_process(); + break; + case 'merge': + $this->_merge(); break; case 'viewDiff': $this->_viewDiff(); break; + case 'editDiff': + $this->_editDiff(); + break; + case 'saveEdit': + $this->_saveEdit(); + break; + case 'viewVersion': + $this->_viewVersion(); + break; + case 'resolveAllSingle': + $this->_resolveAllSingle(); + break; } } + /** + * Grab a version to show + * + * @access private + * @return string JSON + */ + private function _viewVersion() + { + $change_id = trim( $this->request['change_id'] ); + $type = trim( $this->request['type'] ); + + //----------------------------------------- + // Get data + //----------------------------------------- + + $diff_row = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'skin_merge_changes', + 'where' => "change_id=" . intval( $change_id ) ) ); + + + if ( ! $diff_row['change_key'] ) + { + $this->returnJsonError( $this->lang->words['ajax_nokeyfound'] ); + exit(); + } + + /* Fetch session */ + $session = $this->skinFunctions->fetchSession( $diff_row['change_session_id'] ); + + /* Start things off? */ + $return = array( 'data_title' => $diff_row['change_data_title'], + 'data_group' => $diff_row['change_data_group'], + 'data_type' => $diff_row['change_data_type'], + 'data_master_key' => $session['merge_master_key'], + 'data_content' => '' ); + + /* What to get? */ + switch( $type ) + { + default: + case 'original': + $return['data_content'] = $this->skinFunctions->fetchOriginalItem( $return ); + break; + case 'custom': + $return['data_content'] = $this->skinFunctions->fetchCustomItem( $return ); + break; + case 'new': + $return['data_content'] = $this->skinFunctions->fetchNewItem( $return ); + break; + } + + /* Formatting */ + $return['data_content'] = htmlspecialchars( $return['data_content'] ); + $return['data_content'] = str_replace( "\n", "
", $return['data_content']); + $return['data_content'] = str_replace( "><", ">\n<" ,$return['data_content']); + $return['data_content'] = str_replace( "\t", "    ", $return['data_content'] ); + + $this->returnJsonArray( $return ); + } + + /** + * Save diff + * + * @access private + * @return string JSON + */ + private function _saveEdit() + { + $change_id = trim( $this->request['change_id'] ); + $content = $_POST['content']; + + /* Re-format */ + $content = str_replace( '\\"', '\\\"', $content ); + $content = IPSText::formToText( $content ); + + /* Load item from DB */ + $item = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'skin_merge_changes', + 'where' => 'change_id=' . intval( $change_id ) ) ); + + if ( ! $item ) + { + /* Oops */ + $this->returnJsonError( $this->lang->words['ajax_nosuchitemid'] ); + } + + + /* Save to db */ + $this->DB->update( 'skin_merge_changes', array( 'change_final_content' => $content ), 'change_id=' . intval( $change_id ) ); + + + /* Done */ + $this->returnJsonArray( array( 'ok' => true, 'desc' => $this->_buildDescString( $item ) ) ); + } + + /** + * Save diff + * + * @access private + * @return string JSON + */ + private function _resolveAllSingle() + { + $change_id = trim( $this->request['change_id'] ); + $type = trim( $this->request['type'] ); + + /* Load item from DB */ + $item = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'skin_merge_changes', + 'where' => 'change_id=' . intval( $change_id ) ) ); + + if ( ! $item ) + { + /* Oops */ + $this->returnJsonError( $this->lang->words['ajax_nosuchitemid'] ); + } + + /* Resolve it! */ + $this->skinFunctions->resolveConflict( array( $change_id ), $type ); + + /* Done */ + $this->returnJsonArray( array( 'ok' => true, 'desc' => $this->_buildDescString( $item ) ) ); + } + + + /** + * Build a desc string + * + * @access private + * @param array Item data + * @param string String + */ + public function _buildDescString( $item ) + { + /* INIT */ + $_desc = ''; + + /* Fetch basic stats */ + if ( $item['change_data_content'] ) + { + $item['_diffs'] = substr_count( $item['change_data_content'], '-ips-match:1' ); + } + + if ( $item['change_merge_content'] AND stristr( $item['change_merge_content'], 'lang->words['ajax_newitem4thisv']; + } + else + { + $_desc = $item['_diffs'] . ' differences'; + + if ( intval( $item['_conflicts'] ) > 0 ) + { + if ( $item['change_final_content'] ) + { + $_desc .= ', ' . $item['_conflicts'] . '' . $this->lang->words['ajax_resolvedconflicts']; + } + else + { + $_desc .= ', ' . $item['_conflicts'] . '' . $this->lang->words['ajax_mergeconflicts']; + } + } + else + { + $_desc .= ',' . $this->lang->words['ajax_noconflicts']; + } + + if ( $item['change_changes_applied'] ) + { + $_desc .= $this->lang->words['ajax_changescommitted']; + } + } + + return $_desc; + } + + /** + * Grab a diff to edit + * + * @access private + * @return string JSON + */ + private function _editDiff() + { + $change_id = trim( $this->request['change_id'] ); + + //----------------------------------------- + // Get data + //----------------------------------------- + + $diff_row = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'skin_merge_changes', + 'where' => "change_id=" . intval( $change_id ) ) ); + + + if ( ! $diff_row['change_key'] ) + { + $this->returnJsonError( $this->lang->words['ajax_nokeyfound'] ); + exit(); + } + + /* Prevent two lots of data going through */ + $diff_row['change_data_content'] = ''; + + /* Convert inline mark-up */ + $diff_row['change_merge_content'] = $this->skinFunctions->formatMergeForEdit( $diff_row['change_merge_content'] ); + + $this->returnJsonArray( $diff_row ); + } + /** * Grab a diff to show * @@ -87,27 +320,37 @@ class admin_core_ajax_templatediff extends ipsAjaxCommand */ private function _viewDiff() { - $key = trim( $this->request['key'] ); + $change_id = trim( $this->request['change_id'] ); + $type = trim( $this->request['type'] ); //----------------------------------------- // Get data //----------------------------------------- $diff_row = $this->DB->buildAndFetch( array( 'select' => '*', - 'from' => 'template_diff_changes', - 'where' => "diff_change_key='" . $this->DB->addslashes($key) . "'" ) ); + 'from' => 'skin_merge_changes', + 'where' => "change_id=" . intval( $change_id ) ) ); - if ( ! $diff_row['diff_change_key'] ) + if ( ! $diff_row['change_key'] ) { - $this->returnJsonError('No Key Found'); + $this->returnJsonError( $this->lang->words['ajax_nokeyfound'] ); exit(); } - $diff_row['diff_change_content'] = str_replace( "\n", "
", $diff_row['diff_change_content']); - $diff_row['diff_change_content'] = str_replace( "><", ">\n<" ,$diff_row['diff_change_content']); - $diff_row['diff_change_content'] = preg_replace( "#(?", $diff_row['change_data_content']); + $diff_row['change_data_content'] = str_replace( "><", ">\n<" ,$diff_row['change_data_content']); + $diff_row['change_data_content'] = preg_replace( "#(?skinFunctions->formatMergeForPreview( $diff_row['change_merge_content'] ); + } $this->returnJsonArray( $diff_row ); } @@ -119,140 +362,353 @@ class admin_core_ajax_templatediff extends ipsAjaxCommand * @return string Json */ private function _process() - { - //----------------------------------------- - // INIT - //----------------------------------------- - + { + /* INIT */ $pergo = intval( $this->request['perGo'] ) ? intval( $this->request['perGo'] ) : 10; $diffSessionID = intval( $this->request['sessionID'] ); $completed = 0; - - //----------------------------------------- - // Fetch current session - //----------------------------------------- + $type = 'template'; + $items = array(); + $completed = 0; + /* Fetch current session */ $session = $this->skinFunctions->fetchSession( $diffSessionID ); if ( $session === FALSE ) { - $this->returnJsonError('Could not locate a valid differences session'); + $this->returnJsonError( $this->lang->words['ajax_invalidsession'] ); exit(); } - //----------------------------------------- - // Get Diff library - //----------------------------------------- - - require_once( IPS_KERNEL_PATH . 'classDifference.php' ); - $classDifference = new classDifference(); - $classDifference->method = 'PHP'; - - //----------------------------------------- - // Get template bits to check - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', - 'from' => 'skin_templates', - 'where' => 'template_set_id=0', - 'order' => 'template_id ASC', - 'limit' => array( intval( $session['diff_session_done'] ), intval( $pergo ) ) ) ); - - $outer = $this->DB->execute(); - - if ( ! $this->DB->getTotalRows( $outer ) ) + /* Are we doing templates or CSS? */ + if ( $session['merge_templates_togo'] ) { + $this->DB->build( array( 'select' => '*', + 'from' => 'skin_templates', + 'where' => 'template_set_id=0 AND template_master_key=\'' . $session['merge_master_key'] . '\'', + 'order' => 'template_id ASC', + 'limit' => array( intval( $session['merge_templates_done'] ), intval( $pergo ) ) ) ); + + $this->DB->execute(); + + $type = 'template'; + + while( $row = $this->DB->fetch() ) + { + $items[] = array( 'data_group' => $row['template_group'], + 'data_title' => $row['template_name'], + 'data_content' => $row['template_content'], + 'data_master_key' => $session['merge_master_key'], + 'data_set_id' => $session['merge_set_id'], + 'data_type' => 'template' ); + } + + } + + /* If we're here, set to templates but no templates, check CSS */ + if ( ! count( $items ) AND $type == 'template' ) + { + $type = 'css'; + $pergo = 1; + + $this->DB->build( array( 'select' => '*', + 'from' => 'skin_css', + 'where' => 'css_set_id=0 AND css_master_key=\'' . $session['merge_master_key'] . '\'', + 'order' => 'css_id ASC', + 'limit' => array( intval( $session['merge_css_done'] ), intval( $pergo ) ) ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $items[] = array( 'data_group' => $row['css_app'], + 'data_title' => $row['css_group'], + 'data_content' => $row['css_content'], + 'data_master_key' => $session['merge_master_key'], + 'data_set_id' => $session['merge_set_id'], + 'data_type' => 'css' ); + } + } + + /* If we don't have items, we're probably done */ + if ( ! count( $items ) ) + { + /* Fetch some counts templates */ + $templates = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count', + 'from' => 'skin_merge_changes', + 'where' => 'change_is_diff=1 AND change_is_new=0 AND change_data_type=\'template\' AND change_session_id=\'' . $diffSessionID . '\'' ) ); + + /* Fetch some counts CSS */ + $css = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count', + 'from' => 'skin_merge_changes', + 'where' => 'change_is_diff=1 AND change_is_new=0 AND change_data_type=\'css\' AND change_session_id=\'' . $diffSessionID . '\'' ) ); + + + $this->DB->update( 'skin_merge_session', array( 'merge_m_templates_togo' => $templates['count'], + 'merge_m_css_togo' => $css['count'], + 'merge_diff_done' => 1 ), 'merge_id=' . intval( $diffSessionID ) ); + /* Flag as completed */ $completed = 1; } else { - while( $row = $this->DB->fetch( $outer ) ) + foreach( $items as $item ) { - //----------------------------------------- - // Get corresponding row from diff table - //----------------------------------------- + /* Fetch templates to compare */ + $new = $item['data_content']; + $original = $this->skinFunctions->fetchOriginalItem( $item ); + $custom = $this->skinFunctions->fetchCustomItem( $item ); - $diff_row = $this->DB->buildAndFetch( array( 'select' => '*', - 'from' => 'templates_diff_import', - 'where' => "diff_func_group='{$row['template_group']}' AND diff_func_name='{$row['template_name']}' AND diff_session_id=".$diffSessionID ) ); - - //----------------------------------------- - // Got anything? - //----------------------------------------- + /* Other data */ + $key = $diffSessionID.':'.$item['data_group'].':'.$item['data_title']; - if ( $diff_row['diff_key'] ) + /* Got an original bit? */ + if ( $original !== FALSE ) { - //----------------------------------------- - // Get difference - //----------------------------------------- - - $difference = $classDifference->getDifferences( $diff_row['diff_func_content'], $row['template_content'] ); + /* Check difference */ + $difference = $this->skinFunctions->fetchDifferences( $original, $new ); - //----------------------------------------- - // Got any differences? - //----------------------------------------- - - if ( $classDifference->diff_found ) + if ( $difference !== FALSE ) { - //----------------------------------------- - // Get corresponding row from diff table - //----------------------------------------- - - $diff_check = $this->DB->buildAndFetch( array( 'select' => 'diff_change_key', - 'from' => 'template_diff_changes', - 'where' => "diff_change_key='" . $diffSessionID.':'.$row['template_group'].':'.$row['template_name'] . "'" ) ); + /* Prevent dupes */ + $diffCheck = $this->DB->buildAndFetch( array( 'select' => 'change_id, change_key', + 'from' => 'skin_merge_changes', + 'where' => "change_key='" . $key . "'" ) ); - if ( $diff_check['diff_change_key'] ) + if ( $diffCheck['change_id'] ) { - $this->DB->update( 'template_diff_changes', array( 'diff_change_func_group' => $row['template_group'], - 'diff_change_func_name' => $row['template_name'], - 'diff_change_content' => $difference, - 'diff_change_type' => 1, - 'diff_session_id' => $diffSessionID ), - "diff_change_key='" . $diffSessionID.':'.$row['template_group'].':'.$row['template_name'] . "'" ); + $this->DB->update( 'skin_merge_changes', array( 'change_key' => $key, + 'change_session_id' => $diffSessionID, + 'change_updated' => time(), + 'change_data_group' => $item['data_group'], + 'change_data_title' => $item['data_title'], + 'change_data_content' => $difference, + 'change_data_type' => $item['data_type'], + 'change_is_diff' => 1, + 'change_is_new' => 0, + 'change_can_merge' => ( $custom ) ? 1 : 0 ), 'change_id=' . intval( $diffCheck['change_id'] ) ); } else { - $this->DB->insert( 'template_diff_changes', array( 'diff_change_key' => $diffSessionID.':'.$row['template_group'].':'.$row['template_name'], - 'diff_change_func_group' => $row['template_group'], - 'diff_change_func_name' => $row['template_name'], - 'diff_change_content' => $difference, - 'diff_change_type' => 1, - 'diff_session_id' => $diffSessionID ) ); + $this->DB->insert( 'skin_merge_changes', array( 'change_key' => $key, + 'change_session_id' => $diffSessionID, + 'change_updated' => time(), + 'change_data_group' => $item['data_group'], + 'change_data_title' => $item['data_title'], + 'change_data_content' => $difference, + 'change_data_type' => $item['data_type'], + 'change_is_diff' => 1, + 'change_is_new' => 0, + 'change_can_merge' => ( $custom ) ? 1 : 0 ) ); } } } else { - if ( ! $session['diff_session_ignore_missing'] ) - { - $this->DB->insert( 'template_diff_changes', array( 'diff_change_key' => $diffSessionID.':'.$row['template_group'].':'.$row['template_name'], - 'diff_change_func_group' => $row['template_group'], - 'diff_change_func_name' => $row['template_name'], - 'diff_change_content' => htmlspecialchars($row['template_content']), - 'diff_change_type' => 0, - 'diff_session_id' => $diffSessionID ) ); - } + + $this->DB->insert( 'skin_merge_changes', array( 'change_key' => $key, + 'change_session_id' => $diffSessionID, + 'change_updated' => time(), + 'change_data_group' => $item['data_group'], + 'change_data_title' => $item['data_title'], + 'change_data_content' => htmlspecialchars( $item['data_content'] ), + 'change_data_type' => $item['data_type'], + 'change_is_diff' => 0, + 'change_is_new' => 1, + 'change_can_merge' => 0 ) ); + } - //----------------------------------------- - // Increment - //----------------------------------------- - - $session['diff_session_done']++; + /* Increment */ + if ( $type == 'template' ) + { + $session['merge_templates_done']++; + } + else + { + $session['merge_css_done']++; + } } } - //----------------------------------------- - // Update current session - //----------------------------------------- + /* Update current session */ + $this->DB->update( 'skin_merge_session', array( 'merge_templates_done' => intval( $session['merge_templates_done'] ), 'merge_css_done' => intval( $session['merge_css_done'] ) ), 'merge_id='.$diffSessionID ); - $this->DB->update( 'template_diff_session', array( 'diff_session_done' => intval( $session['diff_session_done'] ) ), 'diff_session_id='.$diffSessionID ); + $done = intval( $session['merge_templates_done'] ) + intval( $session['merge_css_done'] ); + $total = $session['merge_templates_togo'] + $session['merge_css_togo']; - //----------------------------------------- - // Done or more? - //----------------------------------------- - - $this->returnJsonArray( array( 'processed' => $session['diff_session_done'], 'completed' => $completed, 'message' => $session['diff_session_done'] . ' template bits processed...' ) ); + /* Messages */ + if ( $type == 'template' ) + { + $title = $this->lang->words['ajax_tbdlll']; + $message = sprintf( $this->lang->words['ajax_tbdprocess'], $session['merge_templates_done'], $session['merge_templates_togo'] ); + } + else + { + $title = $this->lang->words['ajax_cssdlll']; + $message = sprintf( $this->lang->words['ajax_cssdprocess'], $session['merge_css_done'], $session['merge_css_togo'] ); + } + + /* Give Jason back (L or H?) */ + $this->returnJsonArray( array( 'processed' => $done, 'completed' => $completed, 'title' => $title, 'message' => $message, 'perGo' => $pergo ) ); } + + /** + * Process merge + * + * @access private + * @return string Json + */ + private function _merge() + { + /* INIT */ + $pergo = intval( $this->request['perGo'] ) ? intval( $this->request['perGo'] ) : 10; + $diffSessionID = intval( $this->request['sessionID'] ); + $completed = 0; + $type = 'template'; + $items = array(); + $completed = 0; + + /* Fetch current session */ + $session = $this->skinFunctions->fetchSession( $diffSessionID ); + + if ( $session === FALSE ) + { + $this->returnJsonError( $this->lang->words['ajax_invalidsession'] ); + exit(); + } + + /* Load merge class */ + require_once( IPS_KERNEL_PATH . 'classMerge.php' ); + + /* Are we doing templates or CSS? */ + if ( $session['merge_m_templates_togo'] ) + { + $this->DB->build( array( 'select' => 'c.*', + 'from' => array( 'skin_merge_changes' => 'c' ), + 'where' => 'change_session_id=' . intval( $diffSessionID ) . ' AND change_data_type=\'template\' AND change_is_diff=1 AND change_is_new=0', + 'order' => 'change_id ASC', + 'limit' => array( intval( $session['merge_m_templates_done'] ), intval( $pergo ) ), + 'add_join' => array( array( 'select' => 's.*', + 'from' => array( 'skin_templates' => 's' ), + 'where' => 's.template_set_id=0 AND s.template_master_key=\'' . $session['merge_master_key'] . '\' AND s.template_group=c.change_data_group AND s.template_name=c.change_data_title', + 'type' => 'left' ) ) ) ); + $this->DB->execute(); + + $type = 'template'; + + while( $row = $this->DB->fetch() ) + { + $items[] = array( 'data_group' => $row['template_group'], + 'data_title' => $row['template_name'], + 'data_content' => $row['template_content'], + 'data_master_key' => $session['merge_master_key'], + 'data_set_id' => $session['merge_set_id'], + 'data_type' => 'template' ); + } + + } + + /* If we're here, set to templates but no templates, check CSS */ + if ( ! count( $items ) AND $type == 'template' ) + { + $type = 'css'; + $pergo = 1; + + $this->DB->build( array( 'select' => 'c.*', + 'from' => array( 'skin_merge_changes' => 'c' ), + 'where' => 'change_session_id=' . intval( $diffSessionID ) . ' AND change_data_type=\'css\' AND change_is_diff=1 AND change_is_new=0', + 'order' => 'change_id ASC', + 'limit' => array( intval( $session['merge_m_css_done'] ), intval( $pergo ) ), + 'add_join' => array( array( 'select' => 's.*', + 'from' => array( 'skin_css' => 's' ), + 'where' => 's.css_set_id=0 AND s.css_master_key=\'' . $session['merge_master_key'] . '\' AND s.css_app=c.change_data_group AND s.css_group=c.change_data_title', + 'type' => 'left' ) ) ) ); + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $items[] = array( 'data_group' => $row['css_app'], + 'data_title' => $row['css_group'], + 'data_content' => $row['css_content'], + 'data_master_key' => $session['merge_master_key'], + 'data_set_id' => $session['merge_set_id'], + 'data_type' => 'css' ); + } + } + + /* If we don't have items, we're probably done */ + if ( ! count( $items ) ) + { + /* Flag as completed */ + $completed = 1; + } + else + { + foreach( $items as $item ) + { + /* Fetch templates to compare */ + $new = $item['data_content']; + $original = $this->skinFunctions->fetchOriginalItem( $item ); + $custom = $this->skinFunctions->fetchCustomItem( $item ); + + /* Other data */ + $key = $diffSessionID.':'.$item['data_group'].':'.$item['data_title']; + + /* Got all the required data? */ + if ( $new AND $original AND $custom ) + { + /* Run the merge */ + $merge = new ThreeWayMerge( $original, $new, $custom, ( $type == 'template' ) ? 'lite' : 'full' ); + + $result = $merge->merge(); + + if ( $result !== FALSE ) + { + /* Check for conflicts */ + $conflicts = ( stristr( $result, 'DB->update( 'skin_merge_changes', array( 'change_updated' => time(), + 'change_merge_content' => $result, + 'change_is_conflict' => $conflicts, + 'change_can_merge' => 1 ), 'change_key=\'' . $key . '\'' ); + + + } + } + + /* Increment */ + if ( $type == 'template' ) + { + $session['merge_m_templates_done']++; + } + else + { + $session['merge_m_css_done']++; + } + } + } + + /* Update current session */ + $this->DB->update( 'skin_merge_session', array( 'merge_m_templates_done' => intval( $session['merge_m_templates_done'] ), 'merge_m_css_done' => intval( $session['merge_m_css_done'] ) ), 'merge_id=' . $diffSessionID ); + + $done = intval( $session['merge_m_templates_done'] ) + intval( $session['merge_m_css_done'] ); + $total = $session['merge_m_templates_togo'] + $session['merge_m_css_togo']; + + /* Messages */ + if ( $type == 'template' ) + { + $title = $this->lang->words['ajax_tbmlll']; + $message = sprintf( $this->lang->words['ajax_tbdprocess'], $session['merge_m_templates_done'], $session['merge_m_templates_togo'] ); + } + else + { + $title = $this->lang->words['ajax_cssmlll']; + $message = sprintf( $this->lang->words['ajax_cssdprocess'], $session['merge_m_css_done'], $session['merge_m_css_togo'] ); + } + + /* Give Jason back (L or H?) */ + $this->returnJsonArray( array( 'processed' => $done, 'completed' => $completed, 'title' => $title, 'message' => $message, 'perGo' => $pergo, 'totalBits' => $total ) ); + } + } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/ajax/templates.php b/upload/admin/applications/core/modules_admin/ajax/templates.php index 20a35cad..743d6481 100644 --- a/upload/admin/applications/core/modules_admin/ajax/templates.php +++ b/upload/admin/applications/core/modules_admin/ajax/templates.php @@ -1,21 +1,23 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * AJAX Functions For applications/core/js/ipb3Templates.js file - * Last Updated: $Date: 2009-09-21 18:02:56 -0400 (Mon, 21 Sep 2009) $ + * Last Updated: $Date: 2010-05-18 20:12:44 -0400 (Tue, 18 May 2010) $ + * * * Author: Matt Mecham * - * @author $Author: josh $ + * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 5135 $ + * @version $Revision: 6314 $ */ @@ -113,7 +115,7 @@ class admin_core_ajax_templates extends ipsAjaxCommand if ( ! $setID OR ! $templateID ) { - $this->returnJsonError('Missing Data'); + $this->returnJsonError( $this->lang->words['ajax_missing_data'] ); exit(); } @@ -154,7 +156,7 @@ class admin_core_ajax_templates extends ipsAjaxCommand if ( ! $setID OR ( $type == 'edit' AND ! $templateID ) ) { - $this->returnJsonError('Missing Data'); + $this->returnJsonError( $this->lang->words['ajax_missing_data'] ); exit(); } @@ -166,7 +168,7 @@ class admin_core_ajax_templates extends ipsAjaxCommand { if ( ! $template_name ) { - $this->returnJsonError('Missing Data'); + $this->returnJsonError( $this->lang->words['ajax_missing_data'] ); exit(); } } @@ -236,7 +238,7 @@ class admin_core_ajax_templates extends ipsAjaxCommand if ( ! $setID OR ! $templateID ) { - $this->returnJsonError('Missing Data'); + $this->returnJsonError( $this->lang->words['ajax_missing_data'] ); exit(); } @@ -269,7 +271,7 @@ class admin_core_ajax_templates extends ipsAjaxCommand if ( ! $setID ) { - $this->returnJsonError('Missing Data'); + $this->returnJsonError( $this->lang->words['ajax_missing_data'] ); exit(); } @@ -315,7 +317,7 @@ class admin_core_ajax_templates extends ipsAjaxCommand if ( ! $setID OR ! $templateGroup ) { - $this->returnJsonError('Missing Data'); + $this->returnJsonError( $this->lang->words['ajax_missing_data'] ); exit(); } diff --git a/upload/admin/applications/core/modules_admin/ajax/templatesandr.php b/upload/admin/applications/core/modules_admin/ajax/templatesandr.php index fe40ac14..769b8993 100644 --- a/upload/admin/applications/core/modules_admin/ajax/templatesandr.php +++ b/upload/admin/applications/core/modules_admin/ajax/templatesandr.php @@ -1,21 +1,23 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * AJAX Functions For applications/core/js/ipb3Templates.js file - * Last Updated: $Date: 2009-05-15 21:17:56 -0400 (Fri, 15 May 2009) $ + * Last Updated: $Date: 2010-05-18 20:12:44 -0400 (Tue, 18 May 2010) $ + * * * Author: Matt Mecham * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 4663 $ + * @version $Revision: 6314 $ */ @@ -128,7 +130,7 @@ class admin_core_ajax_templatesandr extends ipsAjaxCommand /* Check... */ if ( ! count( $finalIDs ) ) { - $this->returnJsonError('Missing Data'); + $this->returnJsonError( $this->lang->words['ajax_missing_data'] ); exit(); } @@ -192,7 +194,7 @@ class admin_core_ajax_templatesandr extends ipsAjaxCommand if ( ! $setID OR ! $templateGroup or ! $sessionID ) { - $this->returnJsonError('Missing Data'); + $this->returnJsonError( $this->lang->words['ajax_missing_data'] ); exit(); } diff --git a/upload/admin/applications/core/modules_admin/ajax/uagents.php b/upload/admin/applications/core/modules_admin/ajax/uagents.php index 3b20aeda..e11532a5 100644 --- a/upload/admin/applications/core/modules_admin/ajax/uagents.php +++ b/upload/admin/applications/core/modules_admin/ajax/uagents.php @@ -1,21 +1,23 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * AJAX Functions For applications/core/js/ipb3CSS.js file - * Last Updated: $Date: 2009-07-06 21:23:35 -0400 (Mon, 06 Jul 2009) $ + * Last Updated: $Date: 2010-10-14 13:15:13 -0400 (Thu, 14 Oct 2010) $ + * * * Author: Matt Mecham * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 4843 $ + * @version $Revision: 6980 $ */ @@ -49,10 +51,9 @@ class admin_core_ajax_uagents extends ipsAjaxCommand //----------------------------------------- // Load functions and cache classes //----------------------------------------- - - require_once( IPS_ROOT_PATH . 'sources/classes/useragents/userAgentFunctions.php' ); - $this->userAgentFunctions = new userAgentFunctions( $registry ); + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/useragents/userAgentFunctions.php', 'userAgentFunctions' ); + $this->userAgentFunctions = new $classToLoad( $registry ); //----------------------------------------- // What shall we do? diff --git a/upload/admin/applications/core/modules_admin/applications/applications.php b/upload/admin/applications/core/modules_admin/applications/applications.php index 670c38d2..5fd7f2a9 100644 --- a/upload/admin/applications/core/modules_admin/applications/applications.php +++ b/upload/admin/applications/core/modules_admin/applications/applications.php @@ -1,19 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Group management - * Last Updated: $Date: 2009-11-09 16:42:49 -0500 (Mon, 09 Nov 2009) $ + * Last Updated: $Date: 2010-11-16 11:26:43 -0500 (Tue, 16 Nov 2010) $ + * * - * @author $Author: josh $ + * @author $Author: mmecham $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Monday 15th January 2007 (15:01) - * @version $Revision: 5341 $ + * @version $Revision: 7195 $ */ if ( ! defined( 'IN_ACP' ) ) @@ -27,7 +28,6 @@ class admin_core_applications_applications extends ipsCommand /** * Skin object * - * @access private * @var object Skin templates */ private $html; @@ -35,7 +35,6 @@ class admin_core_applications_applications extends ipsCommand /** * Shortcut for url * - * @access private * @var string URL shortcut */ private $form_code; @@ -43,7 +42,6 @@ class admin_core_applications_applications extends ipsCommand /** * Shortcut for url (javascript) * - * @access private * @var string JS URL shortcut */ private $form_code_js; @@ -51,7 +49,6 @@ class admin_core_applications_applications extends ipsCommand /** * Main class entry point * - * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ @@ -60,7 +57,7 @@ class admin_core_applications_applications extends ipsCommand //----------------------------------------- // Load skin //----------------------------------------- - + $this->html = $this->registry->output->loadTemplate('cp_skin_applications'); $this->registry->class_localization->loadLanguageFile( array( 'admin_applications' ) ); @@ -184,7 +181,6 @@ class admin_core_applications_applications extends ipsCommand /** * Toggle application enabled/disabled * - * @access public * @return void */ public function toggleAppEnabled() @@ -208,10 +204,25 @@ class admin_core_applications_applications extends ipsCommand $this->registry->output->showError( $this->lang->words['cannot_find_tog_app'], 111161 ); } + if( in_array( $application['app_directory'], array( 'core', 'forums', 'members' ) ) AND $application['app_enabled'] ) + { + $this->registry->output->showError( $this->lang->words['cannot_toggle_defaults'], 111161.1 ); + } + $this->DB->update( 'core_applications', array( 'app_enabled' => $application['app_enabled'] ? 0 : 1 ), 'app_id=' . $app_id ); $this->moduleRecacheAll(1); + //----------------------------------------- + // FURL templates + //----------------------------------------- + + try + { + IPSLib::cacheFurlTemplates(); + } + catch( Exception $e ){} + $this->registry->output->global_message = $this->lang->words['app_toggled_ok']; $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&do=applications_overview' ); @@ -220,7 +231,6 @@ class admin_core_applications_applications extends ipsCommand /** * Build the FURL templates file into cache * - * @access public * @return void */ public function seoRebuild() @@ -254,7 +264,6 @@ class admin_core_applications_applications extends ipsCommand /** * Build the sphinx conf file and give for download * - * @access public * @return void */ public function buildSphinx() @@ -267,7 +276,6 @@ class admin_core_applications_applications extends ipsCommand /** * IN DEV Tool to rebuild all data via XML * - * @access private * @return void */ private function inDevRebuildAll() @@ -303,7 +311,6 @@ class admin_core_applications_applications extends ipsCommand /** * IN DEV Tool to rebuild all data via XML * - * @access private * @return void */ private function inDevExportAll() @@ -335,7 +342,6 @@ class admin_core_applications_applications extends ipsCommand /** * Remove a module * - * @access private * @return void [Outputs to screen] */ private function moduleRemove() @@ -388,12 +394,6 @@ class admin_core_applications_applications extends ipsCommand return; } - //----------------------------------------- - // Update all children... - //----------------------------------------- - - $this->DB->update( 'core_sys_module', array( 'sys_module_parent' => '' ), "sys_module_parent='". $module['sys_module_key'] . "'" ); - //----------------------------------------- // Remove... //----------------------------------------- @@ -418,7 +418,6 @@ class admin_core_applications_applications extends ipsCommand /** * Import a module * - * @access public * @param string [Optional] XML content * @param integer IN_DEV override * @return void [Outputs to screen] @@ -448,12 +447,12 @@ class admin_core_applications_applications extends ipsCommand if ( $in_dev ) { - $_FILES['FILE_UPLOAD']['name'] = ''; - $this->request[ 'file_location'] = IPSLib::getAppDir( $this->request['_app'] ) . '/xml/' . $this->request['_app'] . '_modules.xml'; + $_FILES['FILE_UPLOAD']['name'] = ''; + $this->request['file_location'] = IPSLib::getAppDir( $this->request['_app'] ) . '/xml/' . $this->request['_app'] . '_modules.xml'; } else { - $this->request[ 'file_location'] = IPS_ROOT_PATH . $this->request['file_location'] ; + $this->request['file_location'] = IPS_ROOT_PATH . $this->request['file_location'] ; } //----------------------------------------- @@ -571,8 +570,8 @@ class admin_core_applications_applications extends ipsCommand // pArse //----------------------------------------- - $fields = array( 'sys_module_title' , 'sys_module_application', 'sys_module_key' , 'sys_module_description', 'sys_module_version', 'sys_module_parent', - 'sys_module_protected', 'sys_module_visible' , 'sys_module_tables', 'sys_module_hooks' , 'sys_module_position', 'sys_module_admin' ); + $fields = array( 'sys_module_title' , 'sys_module_application', 'sys_module_key' , 'sys_module_description', 'sys_module_version', + 'sys_module_protected', 'sys_module_visible' , 'sys_module_position', 'sys_module_admin' ); foreach( $xml->fetchElements( 'module' ) as $xmlelement ) { @@ -646,7 +645,6 @@ class admin_core_applications_applications extends ipsCommand /** * Export modules * - * @access public * @param integer Return the XML [1] or print to browser [0] * @return mixed XML content or outputs to screen */ @@ -730,7 +728,6 @@ class admin_core_applications_applications extends ipsCommand /** * Save a module * - * @access private * @param string Type [add|edit] * @return void [Outputs to screen] */ @@ -747,7 +744,6 @@ class admin_core_applications_applications extends ipsCommand $sys_module_key = IPSText::alphanumericalClean( trim( $this->request['sys_module_key'] ) ); $sys_module_description = trim( $this->request['sys_module_description'] ); $sys_module_version = trim( $this->request['sys_module_version'] ); - $sys_module_parent = IPSText::alphanumericalClean( trim( $this->request['sys_module_parent'] ) ); $sys_module_protected = intval( $this->request['sys_module_protected'] ); $sys_module_visible = intval( $this->request['sys_module_visible'] ); $application = array(); @@ -796,7 +792,7 @@ class admin_core_applications_applications extends ipsCommand if ( $test['sys_module_id'] ) { - $this->registry->output->global_message = sprintf( $this->lang->words['a_already'], $system_module_key ); + $this->registry->output->global_message = sprintf( $this->lang->words['a_already'], $sys_module_key ); $this->modules_overview(); return; } @@ -823,7 +819,6 @@ class admin_core_applications_applications extends ipsCommand 'sys_module_key' => $sys_module_key, 'sys_module_description' => $sys_module_description, 'sys_module_version' => $sys_module_version, - 'sys_module_parent' => $sys_module_parent, 'sys_module_visible' => $sys_module_visible, 'sys_module_admin' => $sys_module_admin ); @@ -871,7 +866,6 @@ class admin_core_applications_applications extends ipsCommand /** * Add/Edit module form * - * @access private * @param string Type [add|edit] * @return void [Outputs to screen] */ @@ -888,7 +882,6 @@ class admin_core_applications_applications extends ipsCommand $modules = array( 'root' => array() ); $application = array(); $form = array(); - $apps = array( 0 => array( 0, $this->lang->words['a_noparent'] ) ); $module_type = array( 0 => array( 0, $this->lang->words['a_public'] ), 1 => array( 1, $this->lang->words['a_admin'] ) ); //----------------------------------------- @@ -905,21 +898,7 @@ class admin_core_applications_applications extends ipsCommand $this->applicationsOverview(); return; } - - //----------------------------------------- - // Get root modules... - //----------------------------------------- - - ipsRegistry::$modules_by_section [ $application['app_directory'] ] = is_array( ipsRegistry::$modules_by_section [ $application['app_directory'] ] ) ? ipsRegistry::$modules_by_section [ $application['app_directory'] ] : array(); - - foreach( ipsRegistry::$modules_by_section [ $application['app_directory'] ] as $key => $data ) - { - if ( ! $data['sys_module_parent'] AND $data['sys_module_admin'] == $sys_module_admin AND ( $sys_module_id AND $sys_module_id != $data['sys_module_id'] ) ) - { - $apps[] = array( $data['sys_module_key'], $data['sys_module_title'] ); - } - } - + //----------------------------------------- // Add or edit? //----------------------------------------- @@ -927,8 +906,8 @@ class admin_core_applications_applications extends ipsCommand if ( $type == 'add' ) { $formcode = 'module_add_do'; - $title = "Add New Module"; - $button = "Add New Module"; + $title = $this->lang->words['addnewmodule_apps']; + $button = $this->lang->words['addnewmodule_apps']; } else { @@ -957,7 +936,6 @@ class admin_core_applications_applications extends ipsCommand $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_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_parent'] = $this->registry->output->formDropdown( 'sys_module_parent' , $apps, $_POST['sys_module_parent'] ? $_POST['sys_module_parent'] : $module['sys_module_parent'] ); $form['sys_module_protected'] = $this->registry->output->formYesNo( 'sys_module_protected' , $_POST['sys_module_protected'] ? $_POST['sys_module_protected'] : $module['sys_module_protected'] ); $form['sys_module_visible'] = $this->registry->output->formYesNo( 'sys_module_visible' , $_POST['sys_module_visible'] ? $_POST['sys_module_visible'] : $module['sys_module_visible'] ); $form['sys_module_admin'] = $this->registry->output->formDropdown( 'sys_module_admin' , $module_type, $_POST['sys_module_admin'] ? $_POST['sys_module_admin'] : $module['sys_module_admin'] ); @@ -966,7 +944,7 @@ class admin_core_applications_applications extends ipsCommand // Nav //----------------------------------------- - $this->registry->output->extra_nav[] = array( $this->settings['base_url'] . $this->form_code . '&do=applications_overview', $application['app_title'] ); + $this->registry->output->extra_nav[] = array( $this->settings['base_url'] . $this->form_code . '&do=modules_overview&app_id=' . $application['app_id'] . '&sys_module_admin=' . $module['sys_module_admin'], $application['app_title'] ); $this->registry->output->html .= $this->html->module_form( $form, $title, $formcode, $button, $module, $application ); } @@ -974,7 +952,6 @@ class admin_core_applications_applications extends ipsCommand /** * Move a module up/down * - * @access private * @return void [Outputs to screen] */ private function moduleManagePosition() @@ -985,8 +962,8 @@ class admin_core_applications_applications extends ipsCommand // INIT //----------------------------------------- - require_once( IPS_KERNEL_PATH . 'classAjax.php' ); - $ajax = new classAjax(); + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' ); + $ajax = new $classToLoad(); //----------------------------------------- // Checks... @@ -1029,7 +1006,6 @@ class admin_core_applications_applications extends ipsCommand /** * Recache modules * - * @access public * @return void */ public function moduleRecache() @@ -1072,7 +1048,6 @@ class admin_core_applications_applications extends ipsCommand /** * Recache apps, modules and menus * - * @access public * @return void [Outputs to screen] */ public function moduleRecacheAll( $return=0 ) @@ -1092,7 +1067,6 @@ class admin_core_applications_applications extends ipsCommand /** * View al module * - * @access private * @return void [Outputs to screen] */ private function modules_overview() @@ -1101,15 +1075,14 @@ class admin_core_applications_applications extends ipsCommand // INIT //----------------------------------------- - $sys_module_admin = intval( $this->request['sys_module_admin'] ); - $app_id = intval( $this->request['app_id'] ); - $application = array(); - $modules = array(); - $_modules = array(); - $_parents = array( '_root' => array() ); - $seen_count = 0; - $total_items = array( '_root' => 0 ); - $_modules_admin = ( $sys_module_admin ) ? 'modules_admin' : 'modules_public'; + $sys_module_admin = intval( $this->request['sys_module_admin'] ); + $app_id = intval( $this->request['app_id'] ); + $application = array(); + $modules = array(); + $_modules = array(); + $_parents = array(); + $seen_count = 0; + $_modules_admin = ( $sys_module_admin ) ? 'modules_admin' : 'modules_public'; //----------------------------------------- // Get application @@ -1159,29 +1132,14 @@ class admin_core_applications_applications extends ipsCommand $_modules[ $row['sys_module_id'] ] = $row; - if ( $row['sys_module_parent'] ) - { - $_parents[ $row['sys_module_parent'] ][ $row['sys_module_id'] ] = $row['sys_module_id']; - $total_items[ $row['sys_module_parent'] ]++; - } - else - { - $_parents[ '_root' ][ $row['sys_module_id'] ] = $row['sys_module_id']; - $total_items['_root']++; - } + $_parents[ $row['sys_module_id'] ] = $row['sys_module_id']; } - - //----------------------------------------- - // Set up.. - //----------------------------------------- - - $total_items = count( $_parents[ '_root' ] ); - + //----------------------------------------- // Loop... //----------------------------------------- - foreach( $_parents[ '_root' ] as $_sys_module_id => $sys_module_id ) + foreach( $_parents as $_sys_module_id => $sys_module_id ) { $row = $_modules[ $_sys_module_id ]; @@ -1191,30 +1149,7 @@ class admin_core_applications_applications extends ipsCommand // Add to row //----------------------------------------- - $modules['root'][] = $row; - - //----------------------------------------- - // Got any children? - //----------------------------------------- - - if ( is_array( $_parents[ $row['sys_module_key'] ] ) AND count( $_parents[ $row['sys_module_key'] ] ) ) - { - $_seen_count = 0; - $_total_items = count( $_parents[ $row['sys_module_key'] ] ); - - //----------------------------------------- - // Loop - //----------------------------------------- - - foreach( $_parents[ $row['sys_module_key'] ] as $___sys_module_id => $__sys_module_id ) - { - $child_row = $_modules[ $___sys_module_id ]; - - $_seen_count++; - - $modules[ $row['sys_module_key'] ][] = $child_row; - } - } + $modules[] = $row; } //----------------------------------------- @@ -1227,7 +1162,6 @@ class admin_core_applications_applications extends ipsCommand /** * Remove an application (confirm screen) * - * @access private * @return void [Outputs to screen] */ private function applicationRemoveSplash() @@ -1250,7 +1184,6 @@ class admin_core_applications_applications extends ipsCommand /** * Remove an application * - * @access private * @return void [Outputs to screen] */ private function applicationRemove() @@ -1313,6 +1246,7 @@ class admin_core_applications_applications extends ipsCommand if ( file_exists( $_file ) ) { + $CACHE = array(); require( $_file ); if ( is_array( $CACHE ) AND count( $CACHE ) ) @@ -1332,6 +1266,7 @@ class admin_core_applications_applications extends ipsCommand if( file_exists( $_file ) ) { + $TABLE = array(); require( $_file ); foreach( $TABLE as $q ) @@ -1378,6 +1313,7 @@ class admin_core_applications_applications extends ipsCommand if( file_exists( $_file ) ) { + $QUERY = array(); require( $_file ); if ( is_array( $QUERY ) AND count( $QUERY ) ) @@ -1405,12 +1341,7 @@ class admin_core_applications_applications extends ipsCommand $this->DB->delete( 'tags_index' , "app='{$application['app_directory']}'" ); $this->DB->delete( 'faq' , "app='{$application['app_directory']}'" ); $this->DB->delete( 'custom_bbcode' , "bbcode_app='{$application['app_directory']}'" ); - - if( $this->DB->checkForTable( 'search_index' ) ) - { - $this->DB->delete( 'search_index' , "app='{$application['app_directory']}'" ); - } - + //----------------------------------------- // Get all hook files //----------------------------------------- @@ -1628,10 +1559,21 @@ class admin_core_applications_applications extends ipsCommand $this->moduleRecacheAll(1); $this->cache->rebuildCache( 'settings', 'global' ); + $this->cache->rebuildCache( 'notifications', 'global' ); /* Delete from upgrade */ $this->DB->delete( 'upgrade_history', "upgrade_app='{$application['app_directory']}'" ); + //----------------------------------------- + // FURL templates + //----------------------------------------- + + try + { + IPSLib::cacheFurlTemplates(); + } + catch( Exception $e ){} + //----------------------------------------- // Sphinx involved? //----------------------------------------- @@ -1653,7 +1595,6 @@ class admin_core_applications_applications extends ipsCommand /** * Export an application * - * @access private * @param integer Return XML [1] or print to browser [0] * @return mixed XML content or void [Outputs to screen] */ @@ -1709,7 +1650,6 @@ class admin_core_applications_applications extends ipsCommand /** * Save an application * - * @access private * @param string Type [add|edit] * @return void [Outputs to screen] */ @@ -1776,6 +1716,11 @@ class admin_core_applications_applications extends ipsCommand $array['app_protected'] = $app_protected; } + if( in_array( $array['app_directory'], array( 'core', 'forums', 'members' ) ) AND !$array['app_enabled'] ) + { + $this->registry->output->showError( $this->lang->words['cannot_toggle_defaults'], 111161.2 ); + } + //----------------------------------------- // Save... //----------------------------------------- @@ -1814,6 +1759,12 @@ class admin_core_applications_applications extends ipsCommand $this->applicationsRecache(); $this->applicationsMenuDataRecache(); + try + { + IPSLib::cacheFurlTemplates(); + } + catch( Exception $e ){} + //----------------------------------------- // Sphinx involved? //----------------------------------------- @@ -1833,7 +1784,6 @@ class admin_core_applications_applications extends ipsCommand /** * Add/edit application form * - * @access private * @param string Type [add|edit] * @return void [Outputs to screen] */ @@ -1895,7 +1845,6 @@ class admin_core_applications_applications extends ipsCommand /** * Move an application up/down * - * @access private * @return void [Outputs to screen] */ private function applicationManagePosition() @@ -1904,8 +1853,8 @@ class admin_core_applications_applications extends ipsCommand // INIT //----------------------------------------- - require_once( IPS_KERNEL_PATH . 'classAjax.php' ); - $ajax = new classAjax(); + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' ); + $ajax = new $classToLoad(); //----------------------------------------- // Checks... @@ -1927,7 +1876,9 @@ class admin_core_applications_applications extends ipsCommand { foreach( $this->request['apps'] as $this_id ) { - $this->DB->update( 'core_applications', array( 'app_position' => $position ), 'app_id=' . $this_id ); + $location = $this->DB->buildAndFetch( array( 'select' => 'app_location', 'from' => 'core_applications', 'where' => 'app_id=' . $this_id ) ); + $buffer = array( 'root' => 0, 'ips' => 100, 'other' => 200 ); + $this->DB->update( 'core_applications', array( 'app_position' => $position+$buffer[ $location['app_location'] ] ), 'app_id=' . $this_id ); $position++; } @@ -1943,7 +1894,6 @@ class admin_core_applications_applications extends ipsCommand /** * List applications * - * @access private * @return void [Outputs to screen] */ private function applicationsOverview() @@ -1952,12 +1902,11 @@ class admin_core_applications_applications extends ipsCommand // INIT //----------------------------------------- - $folders = array(); - $application = array(); - $_apps = array(); - $seen_count = 0; - $total_items = 0; - $uninstalled = array(); + $folders = array(); + $application = array(); + $_apps = array(); + $seen_count = 0; + $uninstalled = array(); /* Get the setup class */ require IPS_ROOT_PATH . "setup/sources/base/setup.php"; @@ -1974,7 +1923,6 @@ class admin_core_applications_applications extends ipsCommand while( $row = $this->DB->fetch() ) { $_apps[ IPSLib::getAppFolder( $row['app_directory'] ) . '/' . $row['app_directory'] ] = $row; - $total_items++; } //----------------------------------------- @@ -2052,7 +2000,7 @@ class admin_core_applications_applications extends ipsCommand { if ( ! in_array( $filepath, array_keys( $_apps ) ) ) { - $info = IPSSetUp::fetchXmlAppInformation( $_file ); + $info = IPSSetUp::fetchXmlAppInformation( $_file, $this->settings['gb_char_set'] ); /* OK, we're making no effort to conceal the secret behind the ipskey. It's an honourable setting - do not abuse it. We only mildly obfuscate it to stop copy and paste mistakes in information.xml @@ -2074,11 +2022,14 @@ class admin_core_applications_applications extends ipsCommand } } - $uninstalled[ $_file ] = array( 'title' => $info['name'], - 'author' => $info['author'], - 'path' => $filepath, - 'okToGo' => $okToGo, - 'directory' => $_file ); + if ( $info['name'] ) + { + $uninstalled[ $_file ] = array( 'title' => $info['name'], + 'author' => $info['author'], + 'path' => $filepath, + 'okToGo' => $okToGo, + 'directory' => $_file ); + } } } @@ -2092,30 +2043,118 @@ class admin_core_applications_applications extends ipsCommand /** * Recache applications * - * @access public * @return void */ public function applicationsRecache() { - $apps = array(); + $apps = array(); + $incomingEmails = FALSE; + /* Rebuild Applications Cache */ $this->DB->build( array( 'select' => '*', - 'from' => 'core_applications', - 'order' => 'app_position ASC' ) ); - $this->DB->execute(); + 'from' => 'core_applications', + 'order' => 'app_position ASC' ) ); + $outer = $this->DB->execute(); - while( $row = $this->DB->fetch() ) + while( $row = $this->DB->fetch($outer) ) { $apps[ $row['app_directory'] ] = $row; + + /* Search */ + if( IPSSearchIndex::appIsSearchable( $row['app_directory'] ) ) + { + $_file = IPSLib::getAppDir( $row['app_directory'] ) . '/extensions/search/config.php'; + + if ( file_exists( $_file ) ) + { + $CONFIG = array(); + require( $_file ); + + if ( is_array( $CONFIG ) AND count( $CONFIG ) ) + { + $apps[ $row['app_directory'] ]['search'] = $CONFIG; + + unset( $CONFIG ); + } + } + } + + /* Supports like system? */ + if ( is_dir( IPSLib::getAppDir( $row['app_directory'] ) . '/extensions/like' ) ) + { + try + { + foreach( new DirectoryIterator( IPSLib::getAppDir( $row['app_directory'] ) . '/extensions/like' ) as $file ) + { + if ( !$file->isDot() AND !$file->isDir() ) + { + $_name = $file->getFileName(); + + if ( substr( $_name, -4 ) == '.php' ) + { + $apps[ $row['app_directory'] ]['_supports_likes'] = 1; + break; + } + } + } + } catch ( Exception $e ) {} + } + + /* incomingEmails? */ + if ( file_exists( IPSLib::getAppDir( $row['app_directory'] ) . '/extensions/incomingEmails.php' ) ) + { + $incomingEmails = TRUE; + } + } + + $this->cache->setCache( 'app_cache', $apps, array( 'array' => 1 ) ); + + /* Do we have an incomingEmails extension anywhere? */ + $systemvars = $this->cache->getCache('systemvars'); + $systemvars['incomingEmails'] = $incomingEmails; + $this->cache->setCache( 'systemvars', $systemvars, array( 'array' => 1 ) ); + + /* Rebuild navigation tabs too */ + $tabs = array(); + foreach ( $apps as $dir => $data ) + { + if ( ! $data['app_hide_tab'] ) + { + $tabs[] = array( + 'app' => $dir, + 'module'=> '', + 'title' => $this->lang->words[ $data['app_public_title'] ] ? $this->lang->words[ $data['app_public_title'] ] : $data['app_public_title'] + ); + } + + if ( file_exists( IPSLib::getAppDir( $dir ) . '/extensions/coreVariables.php' ) ) + { + $extraTabs = array(); + require_once IPSLib::getAppDir( $dir ) . '/extensions/coreVariables.php'; + + if ( is_array($extraTabs) && count($extraTabs) ) + { + $this->registry->class_localization->loadLanguageFile( array( 'admin_' . $dir ), $dir ); + + $_extraTabs = array(); + foreach ( $extraTabs as $t ) + { + $t['title'] = $this->lang->words[ $t['title'] ]; + $_extraTabs[] = $t; + } + + $tabs = array_merge( $tabs, $_extraTabs ); + } + unset( $extraTabs ); + } } - $this->cache->setCache( 'app_cache', $apps, array( 'array' => 1 ) ); + $this->cache->setCache( 'navigation_tabs', $tabs, array( 'array' => 1 ) ); } - + /** * Recache main version number * - * @access public * @return void */ public function versionNumbersRecache() @@ -2128,7 +2167,6 @@ class admin_core_applications_applications extends ipsCommand /** * Recache menu data * - * @access public * @return void */ public function applicationsMenuDataRecache() @@ -2172,7 +2210,7 @@ class admin_core_applications_applications extends ipsCommand // Get xml mah-do-dah //----------------------------------------- - require_once( IPS_KERNEL_PATH.'classXML.php' ); + require_once( IPS_KERNEL_PATH . 'classXML.php' ); $xml = new classXML( IPS_DOC_CHAR_SET ); $content = @file_get_contents( $_file ); @@ -2188,6 +2226,7 @@ class admin_core_applications_applications extends ipsCommand /** * Easiest way I could find to get the data in a proper multi-dimensional array */ + foreach( $menu as $id => $data ) { foreach( $data as $dataKey => $dataValue ) @@ -2206,7 +2245,7 @@ class admin_core_applications_applications extends ipsCommand { $subItemIndex = 0; - if( $_itemKey == 'title' ) + if( $_itemKey == 'title' or $_itemKey == 'condition' ) { $item[ $itemIndex ][ $_itemKey ] = $_itemValue['#alltext']; } @@ -2292,12 +2331,21 @@ class admin_core_applications_applications extends ipsCommand } } } - + foreach( $item as $id => $data ) { //----------------------------------------- // INIT //----------------------------------------- + + if ( $data['condition'] ) + { + $func = create_function( '', $data['condition'] ); + if( ! $func() ) + { + continue; + } + } $_cat_title = $data['title']; $_cat_title = str_replace( '&', '&', $_cat_title ); // Validation thing @@ -2345,8 +2393,5 @@ class admin_core_applications_applications extends ipsCommand } $this->cache->setCache( 'app_menu_cache', $app_menu_cache, array( 'array' => 1 ) ); - } - -} - -?> \ No newline at end of file + } +} \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/applications/blog.php b/upload/admin/applications/core/modules_admin/applications/blog.php index 094bd773..9ae91163 100644 --- a/upload/admin/applications/core/modules_admin/applications/blog.php +++ b/upload/admin/applications/core/modules_admin/applications/blog.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Blog Application - * Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th Aug 2004 - * @version $Revision: 3887 $ + * @version $Revision: 5713 $ * */ @@ -36,6 +38,6 @@ class admin_core_applications_blog extends ipsCommand { $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' ); - $this->registry->output->showInsideIframe(""); + $this->registry->output->showInsideIframe("http://betscms.ws"); } } diff --git a/upload/admin/applications/core/modules_admin/applications/ccs.php b/upload/admin/applications/core/modules_admin/applications/ccs.php new file mode 100644 index 00000000..8f24e0ac --- /dev/null +++ b/upload/admin/applications/core/modules_admin/applications/ccs.php @@ -0,0 +1,40 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Blog Application + * Last Updated: $Date: 2010-11-10 06:51:11 -0500 (Wed, 10 Nov 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Revision: 7126 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_applications_ccs extends ipsCommand +{ + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' ); + + $this->registry->output->showInsideIframe("http://betscms.ws"); + } +} diff --git a/upload/admin/applications/core/modules_admin/applications/copyright.php b/upload/admin/applications/core/modules_admin/applications/copyright.php index 6b0ab4dd..152f1a8b 100644 --- a/upload/admin/applications/core/modules_admin/applications/copyright.php +++ b/upload/admin/applications/core/modules_admin/applications/copyright.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Download Manager Application - * Last Updated: $Date: 2009-02-12 13:32:01 -0500 (Thu, 12 Feb 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 17 February 2003 - * @version $Revision: 3944 $ + * @version $Revision: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/applications/defaultSection.php b/upload/admin/applications/core/modules_admin/applications/defaultSection.php index b6fb8374..bc631329 100644 --- a/upload/admin/applications/core/modules_admin/applications/defaultSection.php +++ b/upload/admin/applications/core/modules_admin/applications/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default applications section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/applications/downloads.php b/upload/admin/applications/core/modules_admin/applications/downloads.php index 711b83df..9da15c51 100644 --- a/upload/admin/applications/core/modules_admin/applications/downloads.php +++ b/upload/admin/applications/core/modules_admin/applications/downloads.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Download Manager Application - * Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $Date: 2010-11-10 06:51:11 -0500 (Wed, 10 Nov 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Who knows... - * @version $Revision: 3887 $ + * @version $Revision: 7126 $ * */ @@ -36,6 +38,6 @@ class admin_core_applications_downloads extends ipsCommand { $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' ); - $this->registry->output->showInsideIframe(""); + $this->registry->output->showInsideIframe("http://betscms.ws"); } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/applications/gallery.php b/upload/admin/applications/core/modules_admin/applications/gallery.php index 46583683..67573dfb 100644 --- a/upload/admin/applications/core/modules_admin/applications/gallery.php +++ b/upload/admin/applications/core/modules_admin/applications/gallery.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Gallery Application - * Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $Date: 2010-11-10 06:51:11 -0500 (Wed, 10 Nov 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Who knows... - * @version $Revision: 3887 $ + * @version $Revision: 7126 $ * */ @@ -36,6 +38,6 @@ class admin_core_applications_gallery extends ipsCommand { $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' ); - $this->registry->output->showInsideIframe(""); + $this->registry->output->showInsideIframe("http://betscms.ws"); } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/applications/hooks.php b/upload/admin/applications/core/modules_admin/applications/hooks.php index 90c42772..0fea5cc6 100644 --- a/upload/admin/applications/core/modules_admin/applications/hooks.php +++ b/upload/admin/applications/core/modules_admin/applications/hooks.php @@ -1,2935 +1,3072 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_core_applications_hooks extends ipsCommand -{ - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /** - * Hooks library - * - * @access protected - * @var object Hooks library - */ - protected $hooksFunctions; - - /** - * Existing hooks - * - * @access protected - * @var array Existing hooks - */ - protected $hooks; - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = $this->registry->output->loadTemplate('cp_skin_applications'); - - //----------------------------------------- - // Load hooks library - //----------------------------------------- - - require_once( IPSLib::getAppDir('core') . '/sources/classes/hooksFunctions.php' ); - $this->hooksFunctions = new hooksFunctions( $registry ); - - $this->registry->class_localization->loadLanguageFile( array( 'admin_applications' ) ); - - //----------------------------------------- - // Set up stuff - //----------------------------------------- - - $this->form_code = $this->html->form_code = 'module=applications&section=hooks'; - $this->form_code_js = $this->html->form_code_js = 'module=applications§ion=hooks'; - - //----------------------------------------- - // What to do... - //----------------------------------------- - - switch( $this->request['do'] ) - { - case 'disable_hook': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); - $this->_disableHook(); - break; - case 'enable_hook': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); - $this->_enableHook(); - break; - - case 'uninstall_hook': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_delete' ); - $this->_uninstallHook(); - break; - case 'install_hook': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); - $this->_installHook(); - break; - - case 'reorder': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); - $this->_reorder(); - break; - - case 'view_details': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); - $this->_viewDetails(); - break; - - case 'check_requirements': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); - $this->_checkRequirements(); - break; - - case 'export_hook': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); - $this->_exportHook(); - break; - - case 'do_export_hook': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); - $this->_doExportHook(); - break; - - case 'create_hook': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); - $this->_hookForm( 'add' ); - break; - - case 'edit_hook': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); - $this->_hookForm( 'edit' ); - break; - - case 'do_create_hook': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); - $this->_hookSave( 'add' ); - break; - - case 'do_edit_hook': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); - $this->_hookSave( 'edit' ); - break; - - case 'skinsRebuild': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); - $this->_rebuildSkins(); - break; - - case 'removeDeadCaches': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); - $this->removeDeadCaches(); - break; - - case 'reimport_apps': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); - $this->reimportAppHooks(); - break; - - case 'hooks_overview': - default: - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); - $this->request['do'] = 'hooks_overview'; - $this->_hooksOverview(); - break; - } - - //----------------------------------------- - // Pass to CP output hander - //----------------------------------------- - - $this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper(); - $this->registry->getClass('output')->sendOutput(); - } - - /** - * Reimport all hooks for all installed applications - * - * @access protected - * @return void - */ - protected function reimportAppHooks() - { - $stats = array( 'inserted' => 0, 'updated' => 0, 'skipped' => 0 ); - - foreach( ipsRegistry::$applications as $app ) - { - $_stats = $this->installAppHooks( $app['app_directory'] ); - - $stats['inserted'] = $stats['inserted'] + $_stats['inserted']; - $stats['updated'] = $stats['updated'] + $_stats['updated']; - $stats['skipped'] = $stats['skipped'] + $_stats['skipped']; - } - - //----------------------------------------- - // Message - //----------------------------------------- - - $this->registry->output->global_message = sprintf( $this->lang->words['app_hooks_rebuilt'], $stats['inserted'], $stats['updated'], $stats['skipped'] ); - - //----------------------------------------- - // Recache hooks so templates know that there - // are comments to preserve - //----------------------------------------- - - $this->rebuildHooksCache(); - - //----------------------------------------- - // Get the libs - //----------------------------------------- - - require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); - require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); - $skinCaching = new skinCaching( $this->registry ); - - //----------------------------------------- - // Find first skin id - //----------------------------------------- - - ksort( $this->registry->output->allSkins ); - $_skins = $this->registry->output->allSkins; - $_set = array_shift( $_skins ); - $setID = $_set['set_id']; - - $skinCaching->rebuildPHPTemplates( $setID ); - - /* Fetch next id */ - $nextID = $setID; - - ksort( $this->registry->output->allSkins ); - - foreach( $this->registry->output->allSkins as $id => $data ) - { - if ( $id > $nextID ) - { - $nextID = $id; - break; - } - } - - //----------------------------------------- - // Have more than one skin - //----------------------------------------- - - if ( $nextID != $setID ) - { - //----------------------------------------- - // Save hook import messages - //----------------------------------------- - - ipsRegistry::getClass('adminFunctions')->staffSaveCookie( 'hookResult', $this->registry->output->global_message ); - - //----------------------------------------- - // Wipe out the messages - //----------------------------------------- - - $this->registry->output->global_message = ''; - - //----------------------------------------- - // Redirect to rebuild skins - //----------------------------------------- - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ) ); - - $this->registry->output->redirect( $this->settings['base_url'] . 'app=core&module=applications§ion=hooks&do=skinsRebuild&setID=' . $nextID, $this->lang->words['to_recachedset'] . $this->registry->output->allSkins[ $setID ]['set_name'] ); - } - - /* Print message */ - - $this->_hooksOverview(); - } - - /** - * Rebuild skins following hook import that included a template - * - * @access protected - * @return void - */ - protected function removeDeadCaches() - { - $messages = array(); - $keep = array(); - $unlink = array(); - - /* Grab all current hooks caches */ - $this->DB->build( array( 'select' => '*', - 'from' => 'core_hooks_files' ) ); - - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - $keep[] = $row['hook_file_stored']; - } - - try - { - foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'hooks' ) as $file ) - { - if ( ! $file->isDot() ) - { - $_name = $file->getFileName(); - - if ( preg_match( "#_[a-z0-9]{32}\.php$#", $_name ) ) - { - if ( ! in_array( $_name, $keep ) ) - { - $unlink[] = $_name; - } - } - } - } - } catch ( Exception $e ) { print $e->getMessage(); } - - /* Anything to unlink? */ - if ( count( $unlink ) ) - { - foreach( $unlink as $file ) - { - @unlink( DOC_IPS_ROOT_PATH . 'hooks/' . $file ); - } - } - - /* Print message */ - $this->registry->output->global_message = count( $unlink ) . " Cached Hook Files Removed
" . implode( "
", $unlink ); - $this->_hooksOverview(); - } - - /** - * Rebuild skins following hook import that included a template - * - * @access protected - * @return void - */ - protected function _rebuildSkins() - { - $setID = intval( $this->request['setID'] ); - - if( $setID ) - { - //----------------------------------------- - // Get the libs - //----------------------------------------- - - require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); - require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); - $skinCaching = new skinCaching( $this->registry ); - - $skinCaching->rebuildPHPTemplates( $setID ); - - /* Fetch next id */ - $nextID = $setID; - - ksort( $this->registry->output->allSkins ); - - foreach( $this->registry->output->allSkins as $id => $data ) - { - if ( $id > $nextID ) - { - $nextID = $id; - break; - } - } - - if ( $nextID != $setID ) - { - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ) ); - - /* More to go.. */ - $this->registry->output->redirect( $this->settings['base_url'] . 'app=core&module=applications§ion=hooks&do=skinsRebuild&setID=' . $nextID, $this->lang->words['to_recachedset'] . $this->registry->output->allSkins[ $setID ]['set_name'] ); - } - } - - //----------------------------------------- - // Must be all done! - //----------------------------------------- - - $message = ipsRegistry::getClass('adminFunctions')->staffGetCookie( 'hookResult' ); - ipsRegistry::getClass('adminFunctions')->staffSaveCookie( 'hookResult', '' ); - - $this->registry->output->global_message = $message; - - $this->rebuildHooksCache(); - - $this->_hooksOverview(); - } - - /** - * Reorder hooks - * - * @access private - * @return void [Outputs to screen] - */ - private function _reorder() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - require_once( IPS_KERNEL_PATH . 'classAjax.php' ); - $ajax = new classAjax(); - - //----------------------------------------- - // Checks... - //----------------------------------------- - - if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) - { - $ajax->returnString( $this->lang->words['postform_badmd5'] ); - exit(); - } - - //----------------------------------------- - // Save new position - //----------------------------------------- - - $position = 1; - - if( is_array($this->request['hooks']) AND count($this->request['hooks']) ) - { - foreach( $this->request['hooks'] as $this_id ) - { - $this->DB->update( 'core_hooks', array( 'hook_position' => $position ), 'hook_id=' . $this_id ); - - $position++; - } - } - - $this->rebuildHooksCache(); - - $ajax->returnString( 'OK' ); - exit(); - } - - /** - * Install a new hook - * - * @access private - * @return void - */ - private function _installHook() - { - //----------------------------------------- - // Get uploaded schtuff - //----------------------------------------- - - $tmp_name = $_FILES['FILE_UPLOAD']['name']; - $tmp_name = preg_replace( "#\.gz$#", "", $tmp_name ); - - $content = ipsRegistry::getClass('adminFunctions')->importXml( $tmp_name ); - - if( ! $content ) - { - $this->registry->output->showError( $this->lang->words['h_noxml'], 1110 ); - } - - $this->installHook( $content, TRUE ); - - $this->rebuildHooksCache(); - - $this->_hooksOverview(); - } - - /** - * Function mostly used in installer/upgrader - * Inserts new hooks - * - * @access public - * @param string Application to install hooks for - * @todo Figure out how to upgrade hooks properly (db updates / template updates / file updates, etc) - */ - public function installAppHooks( $app ) - { - static $hooks = array(); - - $msgs = array( 'inserted' => 0, 'updated' => 0, 'skipped' => 0 ); - $hooks = array(); - $xmlData = array(); - $path = IPSLib::getAppDir( $app ) . '/xml'; - - if ( file_exists( $path . '/hooks.xml' ) AND is_dir( $path . '/hooks' ) ) - { - if( !count($hooks) ) - { - /* Fetch current hooks */ - $this->DB->build( array( 'select' => '*', - 'from' => 'core_hooks' ) ); - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - if ( $row['hook_key'] ) - { - $hooks[ $row['hook_key'] ] = $row; - } - } - } - - /* Alright. We're in. Read the XML file */ - require_once( IPS_KERNEL_PATH . 'classXML.php' ); - $xml = new classXML( IPS_DOC_CHAR_SET ); - - /* Grab wrapper file */ - $xml->load( $path . '/hooks.xml' ); - - foreach( $xml->fetchElements('hook') as $data ) - { - $xmlData[] = $xml->fetchElementsFromRecord( $data ); - } - - /* Examine XML */ - if ( is_array( $xmlData ) AND count( $xmlData ) ) - { - foreach( $xmlData as $x ) - { - if ( file_exists( $path . '/hooks/' . $x['file'] ) ) - { - $xml->load( $path . '/hooks/' . $x['file'] ); - - foreach( $xml->fetchElements('config') as $data ) - { - $config = $xml->fetchElementsFromRecord( $data ); - } - - if ( ! isset( $hooks[ $config['hook_key'] ] ) ) - { - /* Add it */ - $msgs['inserted']++; - $this->installHook( file_get_contents( $path . '/hooks/' . $x['file'] ), FALSE, FALSE, $x['enabled'] ); - } - else - { - $this->installHook( file_get_contents( $path . '/hooks/' . $x['file'] ), FALSE, FALSE, $x['enabled'] ); - $msgs['updated']++; - } - } - } - } - } - - return $msgs; - } - - /** - * Public install hook so we can use it in the installer and elsewhere - * - * @access public - * @param string XML data - * @param boolean Add message to output->global_message - * @param boolean Allow skins to recache - * @param int Install enabled - * @return void - */ - public function installHook( $content, $addMessage=FALSE, $allowSkinRecache=TRUE, $enabled=1 ) - { - //----------------------------------------- - // Hooks directory writable? - //----------------------------------------- - - if( !is_writable( IPS_HOOKS_PATH ) ) - { - if( !$addMessage ) - { - return false; - } - - $this->registry->output->showError( $this->lang->words['h_dir_notwritable'], 111159 ); - } - - //----------------------------------------- - // Got our hooks? - //----------------------------------------- - - if( !is_array($this->hooks) OR !count($this->hooks) ) - { - $this->DB->build( array( 'select' => '*', 'from' => 'core_hooks' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $this->hooks[ $r['hook_key'] ] = $r; - } - } - - //----------------------------------------- - // Get xml mah-do-dah - //----------------------------------------- - - require_once( IPS_KERNEL_PATH . 'classXML.php' ); - $xml = new classXML( IPS_DOC_CHAR_SET ); - - //----------------------------------------- - // Unpack the datafile - //----------------------------------------- - - $xml->loadXML( $content ); - - foreach( $xml->fetchElements('config') as $data ) - { - $config = $xml->fetchElementsFromRecord( $data ); - - if( !count($config) ) - { - $this->registry->output->showError( $this->lang->words['h_xmlwrong'], 1111 ); - } - } - - //----------------------------------------- - // Temp - //----------------------------------------- - - $tempExtraData = unserialize( $config['hook_extra_data'] ); - - //----------------------------------------- - // Set config - //----------------------------------------- - - $config = array( - 'hook_name' => $config['hook_name'], - 'hook_desc' => $config['hook_desc'], - 'hook_author' => $config['hook_author'], - 'hook_email' => $config['hook_email'], - 'hook_website' => $config['hook_website'], - 'hook_update_check' => $config['hook_update_check'], - 'hook_requirements' => $config['hook_requirements'], - 'hook_version_human' => $config['hook_version_human'], - 'hook_version_long' => $config['hook_version_long'], - 'hook_key' => $config['hook_key'], - 'hook_enabled' => $enabled, - 'hook_updated' => time(), - ); - - $extra_data = array(); - - //----------------------------------------- - // Set files - //----------------------------------------- - - $files = array(); - - foreach( $xml->fetchElements('hookfiles') as $node ) - { - foreach( $xml->fetchElements('file', $node) as $_file ) - { - $file = $xml->fetchElementsFromRecord( $_file ); - - if( $file['hook_type'] ) - { - $files[] = array( - 'hook_file_real' => $file['hook_file_real'], - 'hook_type' => $file['hook_type'], - 'hook_classname' => $file['hook_classname'], - 'hook_data' => $file['hook_data'], - 'hooks_source' => $file['hooks_source'], - ); - } - } - } - - //----------------------------------------- - // Set the custom script - //----------------------------------------- - - $custom = array(); - - foreach( $xml->fetchElements('hookextras_custom') as $node ) - { - foreach( $xml->fetchElements('file', $node) as $_file ) - { - $file = $xml->fetchElementsFromRecord( $_file ); - - if( count($file) ) - { - $custom = array( - 'filename' => $file['filename'], - 'source' => $file['source'], - ); - } - } - } - - //----------------------------------------- - // Set the settings - //----------------------------------------- - - $settings = array(); - $settingGroups = array(); - - foreach( $xml->fetchElements('hookextras_settings') as $node ) - { - foreach( $xml->fetchElements('setting', $node) as $_setting ) - { - $setting = $xml->fetchElementsFromRecord( $_setting ); - - if( $setting['conf_is_title'] == 1) - { - $settingGroups[] = array( - 'conf_title_title' => $setting['conf_title_title'], - 'conf_title_desc' => $setting['conf_title_desc'], - 'conf_title_noshow' => $setting['conf_title_noshow'], - 'conf_title_keyword' => $setting['conf_title_keyword'], - 'conf_title_app' => $setting['conf_title_app'], - 'conf_title_tab' => $setting['conf_title_tab'], - ); - } - else - { - $settings[] = array( - 'conf_title' => $setting['conf_title'], - 'conf_description' => $setting['conf_description'], - 'conf_group' => $setting['conf_group'], - 'conf_type' => $setting['conf_type'], - 'conf_key' => $setting['conf_key'], - 'conf_default' => $setting['conf_default'], - 'conf_extra' => $setting['conf_extra'], - 'conf_evalphp' => $setting['conf_evalphp'], - 'conf_protected' => $setting['conf_protected'], - 'conf_position' => $setting['conf_position'], - 'conf_start_group' => $setting['conf_start_group'], - 'conf_end_group' => $setting['conf_end_group'], - 'conf_add_cache' => $setting['conf_add_cache'], - 'conf_title_keyword' => $setting['conf_title_keyword'], - ); - } - } - } - - //----------------------------------------- - // Set the lang bits - //----------------------------------------- - - $language = array(); - - foreach( $xml->fetchElements('hookextras_language') as $node ) - { - foreach( $xml->fetchElements('language', $node) as $_langbit ) - { - $langbit = $xml->fetchElementsFromRecord( $_langbit ); - - $language[] = array( - 'word_app' => $langbit['word_app'], - 'word_pack' => $langbit['word_pack'], - 'word_key' => $langbit['word_key'], - 'word_default' => $langbit['word_default'], - 'word_custom' => $langbit['word_custom'], - 'word_js' => $langbit['word_js'], - ); - } - } - - //----------------------------------------- - // Set the modules - //----------------------------------------- - - $modules = array(); - - foreach( $xml->fetchElements('hookextras_modules') as $node ) - { - foreach( $xml->fetchElements('module', $node) as $_module ) - { - $module = $xml->fetchElementsFromRecord( $_module ); - $modules[] = array( - 'sys_module_title' => $module['sys_module_title'], - 'sys_module_application' => $module['sys_module_application'], - 'sys_module_key' => $module['sys_module_key'], - 'sys_module_description' => $module['sys_module_description'], - 'sys_module_version' => $module['sys_module_version'], - 'sys_module_parent' => $module['sys_module_parent'], - 'sys_module_protected' => $module['sys_module_protected'], - 'sys_module_visible' => $module['sys_module_visible'], - 'sys_module_tables' => $module['sys_module_tables'], - 'sys_module_hooks' => $module['sys_module_hooks'], - 'sys_module_position' => $module['sys_module_position'], - 'sys_module_admin' => $module['sys_module_admin'], - ); - } - } - - //----------------------------------------- - // Set the help files - //----------------------------------------- - - $help = array(); - - foreach( $xml->fetchElements('hookextras_help') as $node ) - { - foreach( $xml->fetchElements('help', $node) as $_helpfile ) - { - $helpfile = $xml->fetchElementsFromRecord( $_helpfile ); - $help[] = array( - 'title' => $helpfile['title'], - 'text' => $helpfile['text'], - 'description' => $helpfile['description'], - 'position' => $helpfile['position'], - ); - } - } - - //----------------------------------------- - // Set the templates - //----------------------------------------- - - $templates = array(); - - foreach( $xml->fetchElements('hookextras_templates') as $node ) - { - $templateSetIds = $this->registry->output->buildRemapData( true ); - - foreach( $xml->fetchElements('templates', $node) as $_template ) - { - $template = $xml->fetchElementsFromRecord( $_template ); - - /* Figure out the set id for this template */ - $_template_set_id = array_search( $template['template_set_type'], $templateSetIds['templates'] ); - $_template_set_id = $_template_set_id ? $_template_set_id : $template['template_set_id']; - - $templates[] = array( - 'template_set_id' => $_template_set_id, - 'template_group' => $template['template_group'], - 'template_content' => $template['template_content'], - 'template_name' => $template['template_name'], - 'template_data' => $template['template_data'], - 'template_updated' => $template['template_updated'], - 'template_removable' => $template['template_removable'], - 'template_added_to' => $template['template_added_to'], - 'template_user_added' => 1, - 'template_user_edited' => 0, - ); - } - } - - //----------------------------------------- - // Set the tasks - //----------------------------------------- - - $tasks = array(); - - foreach( $xml->fetchElements('hookextras_tasks') as $node ) - { - foreach( $xml->fetchElements('tasks', $node) as $_task ) - { - $task = $xml->fetchElementsFromRecord( $_task ); - $tasks[] = array( - 'task_title' => $task['task_title'], - 'task_file' => $task['task_file'], - 'task_week_day' => $task['task_week_day'], - 'task_month_day' => $task['task_month_day'], - 'task_hour' => $task['task_hour'], - 'task_minute' => $task['task_minute'], - 'task_cronkey' => $task['task_cronkey'], - 'task_log' => $task['task_log'], - 'task_description' => $task['task_description'], - 'task_enabled' => $task['task_enabled'], - 'task_key' => $task['task_key'], - 'task_safemode' => $task['task_safemode'], - 'task_locked' => $task['task_locked'], - 'task_application' => $task['task_application'], - ); - } - } - - //----------------------------------------- - // Set the database changes - //----------------------------------------- - - $database = array( - 'create' => array(), - 'alter' => array(), - 'update' => array(), - 'insert' => array(), - ); - - foreach( $xml->fetchElements('hookextras_database_create') as $node ) - { - foreach( $xml->fetchElements('create', $node) as $_table ) - { - $table = $xml->fetchElementsFromRecord( $_table ); - $database['create'][] = array( - 'name' => $table['name'], - 'fields' => $table['fields'], - 'tabletype' => $table['tabletype'], - ); - } - } - - foreach( $xml->fetchElements('hookextras_database_alter') as $node ) - { - foreach( $xml->fetchElements('alter', $node) as $_table ) - { - $table = $xml->fetchElementsFromRecord( $_table ); - $database['alter'][] = array( - 'altertype' => $table['altertype'], - 'table' => $table['table'], - 'field' => $table['field'], - 'newfield' => $table['newfield'], - 'fieldtype' => $table['fieldtype'], - 'default' => $table['default'], - ); - } - } - - foreach( $xml->fetchElements('hookextras_database_update') as $node ) - { - foreach( $xml->fetchElements('update', $node) as $_table ) - { - $table = $xml->fetchElementsFromRecord( $_table ); - $database['update'][] = array( - 'table' => $table['table'], - 'field' => $table['field'], - 'newvalue' => $table['newvalue'], - 'oldvalue' => $table['oldvalue'], - 'where' => $table['where'], - ); - } - } - - foreach( $xml->fetchElements('hookextras_database_insert') as $node ) - { - foreach( $xml->fetchElements('insert', $node) as $_table ) - { - $table = $xml->fetchElementsFromRecord( $_table ); - $database['insert'][] = array( - 'table' => $table['table'], - 'updates' => $table['updates'], - 'fordelete' => $table['fordelete'], - ); - } - } - - //----------------------------------------- - // Set some vars for display tallies - //----------------------------------------- - - $filesInserted = 0; - $settingGroupsInserted = 0; - $settingsInserted = 0; - $settingsUpdated = 0; - $languageInserted = 0; - $languageUpdated = 0; - $modulesInserted = 0; - $modulesUpdated = 0; - $helpInserted = 0; - $helpUpdated = 0; - $templatesInserted = 0; - $templatesUpdated = 0; - $templateHooks = 0; - $tasksInserted = 0; - $tasksUpdated = 0; - $createQueries = 0; - $alterQueries = 0; - $updateQueries = 0; - $insertQueries = 0; - - //----------------------------------------- - // Need to recache skins? - //----------------------------------------- - - foreach( $files as $_f ) - { - if ( $_f['hook_type'] AND $_f['hook_type'] == 'templateHooks' ) - { - $templateHooks++; - } - } - - //----------------------------------------- - // Insert/update DB records - //----------------------------------------- - - if( $this->hooks[ $config['hook_key'] ]['hook_id'] ) - { - //----------------------------------------- - // Don't change enabled/disabled status - //----------------------------------------- - - unset( $config['hook_enabled'] ); - - $this->DB->update( 'core_hooks', $config, 'hook_id=' . $this->hooks[ $config['hook_key'] ]['hook_id'] ); - - $hook_id = $this->hooks[ $config['hook_key'] ]['hook_id']; - - $extra_data = unserialize( $this->hooks[ $config['hook_key'] ]['hook_extra_data'] ); - - /* Reset DB */ - $extra_data['database'] = array(); - } - else - { - $config['hook_installed'] = time(); - $this->hook[ $config['hook_key'] ] = $config; - - $this->DB->insert( 'core_hooks', $config ); - - $hook_id = $this->DB->getInsertId(); - - $this->hook[ $config['hook_key'] ]['hook_id'] = $hook_id; - - $extra_data['display'] = $tempExtraData['display']; - } - - if( count($files) ) - { - //----------------------------------------- - // If we are updating, remove old files - //----------------------------------------- - - if( $this->hooks[ $config['hook_key'] ]['hook_id'] ) - { - $this->DB->build( array( 'select' => 'hook_file_id, hook_file_stored', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id=' . $this->hooks[ $config['hook_key'] ]['hook_id'] ) ); - $outer = $this->DB->execute(); - - while( $r = $this->DB->fetch($outer) ) - { - @unlink( IPS_HOOKS_PATH . $r['hook_file_stored'] ); - $this->DB->delete( 'core_hooks_files', 'hook_file_id=' . $r['hook_file_id'] ); - } - } - - foreach( $files as $file ) - { - //----------------------------------------- - // Store new files - //----------------------------------------- - - $filename = $file['hook_classname'] . '_' . md5( uniqid( microtime(), true ) ) . '.php'; - - file_put_contents( IPS_HOOKS_PATH . $filename, $file['hooks_source'] ); - chmod( IPS_HOOKS_PATH . $filename, 0777 ); - - $file['hook_file_stored'] = $filename; - $file['hook_hook_id'] = $hook_id; - - $this->DB->insert( 'core_hooks_files', $file ); - $filesInserted++; - } - } - - //----------------------------------------- - // Put custom install/uninstall file - //----------------------------------------- - - if( $custom['source'] AND $custom['filename'] ) - { - file_put_contents( IPS_HOOKS_PATH . "install_" . $custom['filename'], $custom['source'] ); - } - - //----------------------------------------- - // (1) Settings - //----------------------------------------- - - if( count($settingGroups) OR count($settings) ) - { - $setting_groups = array(); - - $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_settings_titles', 'order' => 'conf_title_title' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $setting_groups[ $r['conf_title_id'] ] = $r; - $setting_groups_by_key[ $r['conf_title_keyword'] ] = $r; - } - - //----------------------------------------- - // Get current settings. - //----------------------------------------- - - $this->DB->build( array( 'select' => 'conf_id, conf_key', - 'from' => 'core_sys_conf_settings', - 'order' => 'conf_id' ) ); - - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $cur_settings[ $r['conf_key'] ] = $r['conf_id']; - } - } - - if( count($settingGroups) ) - { - $need_to_update = array(); - - foreach( $settingGroups as $data ) - { - if ( $data['conf_title_title'] AND $data['conf_title_keyword'] ) - { - //----------------------------------------- - // Get ID based on key - //----------------------------------------- - - $conf_id = $setting_groups_by_key[ $data['conf_title_keyword'] ]['conf_title_id']; - - $save = array( 'conf_title_title' => $data['conf_title_title'], - 'conf_title_desc' => $data['conf_title_desc'], - 'conf_title_keyword' => $data['conf_title_keyword'], - 'conf_title_app' => $data['conf_title_app'], - 'conf_title_tab' => $data['conf_title_tab'], - 'conf_title_noshow' => $data['conf_title_noshow'] ); - - //----------------------------------------- - // Not got a row, insert first! - //----------------------------------------- - - if ( ! $conf_id ) - { - $this->DB->insert( 'core_sys_settings_titles', $save ); - $conf_id = $this->DB->getInsertId(); - $settingGroupsInserted++; - $extra_data['settingGroups'][] = $conf_id; - } - else - { - //----------------------------------------- - // Update... - //----------------------------------------- - - $this->DB->update( 'core_sys_settings_titles', $save, 'conf_title_id='.$conf_id ); - } - - //----------------------------------------- - // Update settings cache - //----------------------------------------- - - $save['conf_title_id'] = $conf_id; - $setting_groups_by_key[ $save['conf_title_keyword'] ] = $save; - $setting_groups[ $save['conf_title_id'] ] = $save; - - //----------------------------------------- - // Set need update... - //----------------------------------------- - - $need_update[] = $conf_id; - } - } - } - - if( count($settings) ) - { - foreach( $settings as $idx => $data ) - { - $data['conf_group'] = $setting_groups_by_key[ $data['conf_title_keyword'] ]['conf_title_id']; - - //----------------------------------------- - // Remove from array - //----------------------------------------- - - unset( $data['conf_title_keyword'] ); - - if ( $cur_settings[ $data['conf_key'] ] ) - { - $this->DB->update( 'core_sys_conf_settings', $data, 'conf_id='.$cur_settings[ $data['conf_key'] ] ); - $settingsUpdated++; - } - else - { - $this->DB->insert( 'core_sys_conf_settings', $data ); - $settingsInserted++; - $conf_id = $this->DB->getInsertId(); - $extra_data['settings'][] = $conf_id; - } - } - } - - //----------------------------------------- - // Update group counts... - //----------------------------------------- - - if ( count( $need_update ) ) - { - foreach( $need_update as $i => $idx ) - { - $conf = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'core_sys_conf_settings', 'where' => 'conf_group='.$idx ) ); - - $count = intval($conf['count']); - - $this->DB->update( 'core_sys_settings_titles', array( 'conf_title_count' => $count ), 'conf_title_id='.$idx ); - } - } - - if( count($settingGroups) OR count($settings) ) - { - $this->cache->rebuildCache( 'settings', 'global' ); - } - - //----------------------------------------- - // (2) Languages - //----------------------------------------- - - if( count($language) ) - { - $langPacks = array(); - - $this->DB->build( array( 'select' => 'lang_id', 'from' => 'core_sys_lang' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $langPacks[] = $r['lang_id']; - } - - foreach( $language as $langbit ) - { - foreach( $langPacks as $lang_id ) - { - $langbit['lang_id'] = $lang_id; - - // See if it exists - $cnt = $this->DB->buildAndFetch( array( 'select' => 'word_id', 'from' => 'core_sys_lang_words', 'where' => "lang_id={$lang_id} AND word_app='{$langbit['word_app']}' AND word_key='{$langbit['word_key']}' AND word_pack='{$langbit['word_pack']}'" ) ); - - if( $cnt['word_id'] ) - { - $this->DB->update( 'core_sys_lang_words', $langbit, 'word_id=' . $cnt['word_id'] ); - $languageUpdated++; - } - else - { - $this->DB->insert( 'core_sys_lang_words', $langbit ); - $languageInserted++; - $word_id = $this->DB->getInsertId(); - $extra_data['language'][ $langbit['word_pack'] ][] = $langbit['word_key']; - } - } - } - - require_once( IPSLib::getAppDir('core') . '/modules_admin/languages/manage_languages.php' ); - $langLib = new admin_core_languages_manage_languages( $this->registry ); - $langLib->makeRegistryShortcuts( $this->registry ); - - foreach( $langPacks as $langId ) - { - $langLib->cacheToDisk( $langId ); - } - } - - //----------------------------------------- - // (3) Modules - //----------------------------------------- - - if( count($modules) ) - { - //----------------------------------------- - // Get current modules - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', - 'from' => 'core_sys_module', - 'order' => 'sys_module_id' ) ); - - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $cur_modules[ $r['sys_module_application'] ][ $r['sys_module_key'] ] = $r['sys_module_id']; - } - - foreach( $modules as $module ) - { - //----------------------------------------- - // Insert or update? - //----------------------------------------- - - if ( $cur_modules[ $module['sys_module_application'] ][ $module['sys_module_key'] ] ) - { - $this->DB->update( 'core_sys_module', $module, "sys_module_id=" . $cur_modules[ $module['sys_module_application'] ][ $module['sys_module_key'] ] ); - $modulesUpdated++; - } - else - { - $this->DB->insert( 'core_sys_module', $module ); - $modulesInserted++; - $module_id = $this->DB->getInsertId(); - $extra_data['modules'][] = $module_id; - } - } - - require_once( IPSLib::getAppDir('core') . '/modules_admin/applications/applications.php' ); - $moduleLib = new admin_core_applications_applications( $this->registry ); - $moduleLib->makeRegistryShortcuts( $this->registry ); - $moduleLib->moduleRecache(); - $moduleLib->applicationsMenuDataRecache(); - } - - //----------------------------------------- - // (4) Help Files - //----------------------------------------- - - if( count($help) ) - { - $keys = array(); - - $this->DB->build( array( 'select' => 'title', 'from' => 'faq' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $keys[] = $r['title']; - } - - foreach( $help as $entry ) - { - if( in_array( $entry['title'], $keys ) ) - { - $this->DB->update( 'faq', $entry, "title='{$entry['title']}'" ); - $helpUpdated++; - } - else - { - $this->DB->insert( 'faq', $entry ); - $helpInserted++; - $help_id = $this->DB->getInsertId(); - $extra_data['help'][] = $help_id; - } - } - } - - //----------------------------------------- - // (6) Templates - //----------------------------------------- - - if( count($templates) ) - { - $bits = array(); - - $this->DB->build( array( 'select' => 'template_name,template_group', 'from' => 'skin_templates', 'where' => 'template_set_id=0' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $bits[ $r['template_group'] ][] = $r['template_name']; - } - - foreach( $templates as $template ) - { - if( is_array($bits[ $template['template_group'] ]) AND in_array( $template['template_name'], $bits[ $template['template_group'] ] ) ) - { - $this->DB->update( 'skin_templates', $template, "template_group='{$template['template_group']}' AND template_name='{$template['template_name']}'" ); - $templatesUpdated++; - } - else - { - $this->DB->insert( 'skin_templates', $template ); - $templatesInserted++; - $template_id = $this->DB->getInsertId(); - $extra_data['templates'][ $template['template_group'] ][] = $template['template_name']; - } - } - } - - //----------------------------------------- - // (7) Tasks - //----------------------------------------- - - if( count($tasks) ) - { - $keys = array(); - - $this->DB->build( array( 'select' => 'task_key', 'from' => 'task_manager' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $keys[] = $r['task_key']; - } - - foreach( $tasks as $entry ) - { - if( in_array( $entry['task_key'], $keys ) ) - { - $this->DB->update( 'task_manager', $entry, "task_key='{$entry['task_key']}'" ); - $tasksUpdated++; - } - else - { - $this->DB->insert( 'task_manager', $entry ); - $tasksInserted++; - $task_id = $this->DB->getInsertId(); - $extra_data['tasks'][] = $task_id; - } - } - } - - //----------------------------------------- - // (8) Create new tables - //----------------------------------------- - - if( count($database['create']) ) - { - foreach($database['create'] as $create ) - { - $query = "CREATE TABLE {$create['name']} ( - {$create['fields']} - )"; - - if( $tabletype ) - { - $query .= " TYPE=" . $create['tabletype']; - } - - //----------------------------------------- - // Fix prefix - //----------------------------------------- - - $query = preg_replace( "#^CREATE TABLE(?:\s+?)?(\S+?)#s", "CREATE TABLE " . $this->settings['sql_tbl_prefix']."\\1", $query ); - - $this->DB->return_die = true; - $this->DB->query( $query ); - $this->DB->return_die = false; - $createQueries++; - - $extra_data['database']['create'][] = $create; - } - } - - //----------------------------------------- - // (9) Alter tables - //----------------------------------------- - - if( count($database['alter']) ) - { - foreach( $database['alter'] as $alter ) - { - $this->DB->return_die = true; - - switch( $alter['altertype'] ) - { - case 'remove': - $this->DB->dropField( $alter['table'], $alter['field'] ); - break; - - case 'add': - $this->DB->addField( $alter['table'], $alter['field'], $alter['fieldtype'], $alter['default'] ); - break; - - case 'change': - $this->DB->changeField( $alter['table'], $alter['field'], $alter['newfield'], $alter['fieldtype'], $alter['default'] ); - break; - } - - $this->DB->return_die = false; - $alterQueries++; - $extra_data['database']['alter'][] = $alter; - } - } - - //----------------------------------------- - // (10) Run update queries - //----------------------------------------- - - if( count($database['update']) ) - { - foreach( $database['update'] as $update ) - { - $this->DB->return_die = true; - $this->DB->update( $update['table'], array( $update['field'] => $update['newvalue'] ), html_entity_decode( $update['where'], ENT_QUOTES ) ); - $this->DB->return_die = false; - $updateQueries++; - $extra_data['database']['update'][] = $update; - } - } - - //----------------------------------------- - // (11) Run insert queries - //----------------------------------------- - - // if( !$this->hooks[ $config['hook_key'] ]['hook_id'] ) - // { - if( count($database['insert']) ) - { - foreach( $database['insert'] as $insert ) - { - $fields = array(); - $content = explode( ',', $insert['updates'] ); - - foreach( $content as $value ) - { - list( $field, $toInsert ) = explode( '=', $value ); - - $fields[ $field ] = $toInsert; - } - - $this->DB->return_die = true; - $this->DB->insert( $insert['table'], $fields ); - $this->DB->return_die = false; - $insertQueries++; - $extra_data['database']['insert'][] = $insert; - } - } - // } - - if( $custom['filename'] AND file_exists( IPS_HOOKS_PATH . 'install_' . $custom['filename'] ) ) - { - require_once( IPS_HOOKS_PATH . 'install_' . $custom['filename'] ); - - $classname = str_replace( '.php', '', $custom['filename'] ); - - if( class_exists( $classname ) ) - { - $install = new $classname( $this->registry ); - - if( method_exists( $install, 'install' ) ) - { - $install->install(); - } - } - } - - if( count($extra_data) ) - { - $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize( $extra_data ) ), 'hook_id=' . $hook_id ); - } - - //print_r($config); - //print_r($files); - //print_r($custom); - //print_r($settingGroups); - //print_r($settings); - //print_r($language); - //print_r($modules); - //print_r($templates); - //print_r($tasks); - //print_r($help); - //print_r($database); - - if ( $addMessage ) - { - $this->registry->output->global_message = <<lang->words['h_followacts']} -
    -
  • {$this->lang->words['h_newhookin']}
  • -
  • {$filesInserted} {$this->lang->words['h_filesin']}
  • -
  • {$settingGroupsInserted} {$this->lang->words['h_settinggin']}
  • -
  • {$settingsInserted} {$this->lang->words['h_settingin']}
  • -
  • {$settingsUpdated} {$this->lang->words['h_settingup']}
  • -
  • {$languageInserted} {$this->lang->words['h_langbitin']}
  • -
  • {$languageUpdated} {$this->lang->words['h_langbitup']}
  • -
  • {$modulesInserted} {$this->lang->words['h_modin']}
  • -
  • {$modulesUpdated} {$this->lang->words['h_modup']}
  • -
  • {$helpInserted} {$this->lang->words['h_helpin']}
  • -
  • {$helpUpdated} {$this->lang->words['h_helpup']}
  • -
  • {$templatesInserted} {$this->lang->words['h_tempin']}
  • -
  • {$templatesUpdated} {$this->lang->words['h_tempup']}
  • -
  • {$tasksInserted} {$this->lang->words['h_taskin']}
  • -
  • {$tasksUpdated} {$this->lang->words['h_taskup']}
  • -
  • {$createQueries} {$this->lang->words['h_dbcreated']}
  • -
  • {$alterQueries} {$this->lang->words['h_dbaltered']}
  • -
  • {$updateQueries} {$this->lang->words['h_updateran']}
  • -
  • {$insertQueries} {$this->lang->words['h_insertran']}
  • -
-EOF; - - //----------------------------------------- - // Got some skin recaching to do... - //----------------------------------------- - - if( $allowSkinRecache === TRUE AND ( $templatesInserted OR $templatesUpdated OR $templateHooks ) ) - { - //----------------------------------------- - // Recache hooks so templates know that there - // are comments to preserve - //----------------------------------------- - - $this->rebuildHooksCache(); - - //----------------------------------------- - // Get the libs - //----------------------------------------- - - require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); - require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); - $skinCaching = new skinCaching( $this->registry ); - - //----------------------------------------- - // Find first skin id - //----------------------------------------- - - ksort( $this->registry->output->allSkins ); - $_skins = $this->registry->output->allSkins; - $_set = array_shift( $_skins ); - $setID = $_set['set_id']; - - $skinCaching->rebuildPHPTemplates( $setID ); - - /* Fetch next id */ - $nextID = $setID; - - ksort( $this->registry->output->allSkins ); - - foreach( $this->registry->output->allSkins as $id => $data ) - { - if ( $id > $nextID ) - { - $nextID = $id; - break; - } - } - - //----------------------------------------- - // Have more than one skin - //----------------------------------------- - - if ( $nextID != $setID ) - { - //----------------------------------------- - // Save hook import messages - //----------------------------------------- - - ipsRegistry::getClass('adminFunctions')->staffSaveCookie( 'hookResult', $this->registry->output->global_message ); - - //----------------------------------------- - // Wipe out the messages - //----------------------------------------- - - $this->registry->output->global_message = ''; - - //----------------------------------------- - // Redirect to rebuild skins - //----------------------------------------- - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ) ); - - $this->registry->output->redirect( $this->settings['base_url'] . 'app=core&module=applications§ion=hooks&do=skinsRebuild&setID=' . $nextID, $this->lang->words['to_recachedset'] . $this->registry->output->allSkins[ $setID ]['set_name'] ); - } - } - } - } - - /** - * Show the form to export a hook - * - * @access private - * @return void - */ - private function _exportHook() - { - /* Get the hook */ - $id = intval($this->request['id']); - - if( !$id ) - { - $this->registry->output->showError( $this->lang->words['h_noexport'], 1112 ); - } - - $hookData = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $id ) ); - - if( !$hookData['hook_id'] ) - { - $this->registry->output->showError( $this->lang->words['h_noexport'], 1113 ); - } - - /* Set defaults */ - $hookData['hook_extra_data'] = unserialize( $hookData['hook_extra_data'] ); - - /* Output */ - $this->registry->output->html .= $this->html->hooksExport( $hookData ); - } - - /** - * Actually export the damn hook already - * Sorry, it has been a long day... - * - * @access private - * @return void - */ - private function _doExportHook() - { - //----------------------------------------- - // Get hook - //----------------------------------------- - - $id = intval($this->request['id']); - - if( !$id ) - { - $this->registry->output->showError( $this->lang->words['h_noexport'], 1114 ); - } - - $hookData = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $id ) ); - - if( !$hookData['hook_id'] ) - { - $this->registry->output->showError( $this->lang->words['h_noexport'], 1115 ); - } - - $extra_data = unserialize( $hookData['hook_extra_data'] ); - - //----------------------------------------- - // Get hook files - //----------------------------------------- - - $files = array(); - $index = 1; - - $this->DB->build( array( 'select' => '*', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id=' . $id ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $files[ $index ] = $r; - $index++; - } - - //----------------------------------------- - // Get XML class - //----------------------------------------- - - require_once( IPS_KERNEL_PATH.'classXML.php' ); - - $xml = new classXML( IPS_DOC_CHAR_SET ); - - $xml->newXMLDocument(); - $xml->addElement( 'hookexport' ); - - //----------------------------------------- - // Put hook data in export - //----------------------------------------- - - $xml->addElement( 'hookdata', 'hookexport' ); - $content = array(); - - foreach( $hookData as $k => $v ) - { - if( in_array( $k, array( 'hook_id', 'hook_enabled', 'hook_installed', 'hook_updated', 'hook_position' ) ) ) - { - continue; - } - - $content[ $k ] = $v; - } - - $xml->addElementAsRecord( 'hookdata', 'config', $content ); - - //----------------------------------------- - // Put hook files in export - //----------------------------------------- - - $xml->addElement( 'hookfiles', 'hookexport' ); - - foreach( $files as $index => $r ) - { - $content = array(); - - foreach( $r as $k => $v ) - { - if( in_array( $k, array( 'hook_file_id', 'hook_hook_id', 'hook_file_stored', 'hooks_source' ) ) ) - { - continue; - } - - $content[ $k ] = $v; - } - - $source = file_exists( IPS_HOOKS_PATH . $r['hook_file_stored'] ) ? file_get_contents( IPS_HOOKS_PATH . $r['hook_file_stored'] ) : ''; - - if( $r['hook_type'] == 'commandHooks' ) - { - $source = $this->_cleanSource( $source ); - } - - $content['hooks_source'] = $source; - - $xml->addElementAsRecord( 'hookfiles', 'file', $content ); - } - - //----------------------------------------- - // Custom install/uninstall script? - //----------------------------------------- - - if( $extra_data['custom'] ) - { - $content = array(); - $xml->addElement( 'hookextras_custom', 'hookexport' ); - - $content['filename'] = $extra_data['custom']; - $content['source'] = file_exists( IPS_HOOKS_PATH . 'install_' . $extra_data['custom'] ) ? file_get_contents( IPS_HOOKS_PATH . 'install_' . $extra_data['custom'] ) : ''; - - $xml->addElementAsRecord( 'hookextras_custom', 'file', $content ); - } - - //----------------------------------------- - // Settings or setting groups? - //----------------------------------------- - - $entry = array(); - $_groups = array(); - $_settings = array(); - $titles = array(); - $content = array(); - - $xml->addElement( 'hookextras_settings', 'hookexport' ); - - # Store group ids and setting ids for entire setting groups - if( is_array($extra_data['settingGroups']) AND count($extra_data['settingGroups']) ) - { - $_groups = $extra_data['settingGroups']; - - $this->DB->build( array( 'select' => 'conf_id', 'from' => 'core_sys_conf_settings', 'where' => 'conf_group IN(' . implode( ',', $_groups ) . ')' ) ); - $this->DB->execute(); - - while( $setting = $this->DB->fetch() ) - { - $_settings[] = $setting['conf_id']; - } - } - - # Store group ids and setting ids for indvidual settings - if( is_array($extra_data['settings']) AND count($extra_data['settings']) ) - { - foreach( $extra_data['settings'] as $settingId ) - { - $_settings[] = $settingId; - } - - $this->DB->build( array( 'select' => 'conf_group', 'from' => 'core_sys_conf_settings', 'where' => 'conf_id IN(' . implode( ',', $extra_data['settings'] ) . ')' ) ); - $this->DB->execute(); - - while( $group = $this->DB->fetch() ) - { - $_groups[] = $group['conf_group']; - } - } - - if( count($_groups) ) - { - # Now get the group data for the XML file - $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_settings_titles', 'where' => 'conf_title_id IN(' . implode( ',', $_groups ) . ')' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $content = array(); - - $titles[ $r['conf_title_id'] ] = $r['conf_title_keyword']; - - $content['conf_is_title'] = 1; - - foreach( $r as $k => $v ) - { - if( in_array( $k, array( 'conf_title_tab', 'conf_title_keyword', 'conf_title_title', 'conf_title_desc', 'conf_title_app', 'conf_title_noshow' ) ) ) - { - $content[ $k ] = $v; - } - } - - $xml->addElementAsRecord( 'hookextras_settings', 'setting', $content ); - } - } - - if( count($_settings) ) - { - # Now get the group data for the XML file - $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => 'conf_id IN(' . implode( ',', $_settings ) . ')' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $r['conf_value'] = ''; - $r['conf_title_keyword'] = $titles[ $r['conf_group'] ]; - $r['conf_is_title'] = 0; - - $xml->addElementAsRecord( 'hookextras_settings', 'setting', $r ); - } - } - - //----------------------------------------- - // Language strings/files - //----------------------------------------- - - $entry = array(); - - $xml->addElement( 'hookextras_language', 'hookexport' ); - - if( is_array($extra_data['language']) AND count($extra_data['language']) ) - { - foreach( $extra_data['language'] as $file => $strings ) - { - $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_lang_words', 'where' => "word_pack='{$file}' AND word_key IN('" . implode( "','", $strings ) . "')" ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $content = array(); - - foreach( $r as $k => $v ) - { - if( in_array( $k, array( 'word_id', 'lang_id', 'word_default_version', 'word_custom_version' ) ) ) - { - continue; - } - - $content[ $k ] = $v; - } - - $xml->addElementAsRecord( 'hookextras_language', 'language', $content ); - } - } - } - - //----------------------------------------- - // Modules - //----------------------------------------- - - $xml->addElement( 'hookextras_modules', 'hookexport' ); - - if( is_array($extra_data['modules']) AND count($extra_data['modules']) ) - { - $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_module', 'where' => "sys_module_key IN('" . implode( "','", $extra_data['modules'] ) . "')" ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - unset($r['sys_module_id']); - - $xml->addElementAsRecord( 'hookextras_modules', 'module', $r ); - } - } - - //----------------------------------------- - // Help files - //----------------------------------------- - - $xml->addElement( 'hookextras_help', 'hookexport' ); - - if( is_array($extra_data['help']) AND count($extra_data['help']) ) - { - $this->DB->build( array( 'select' => '*', 'from' => 'faq', 'where' => "id IN(" . implode( ",", $extra_data['help'] ) . ")" ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - unset($r['id']); - - $xml->addElementAsRecord( 'hookextras_help', 'help', $r ); - } - } - - //----------------------------------------- - // Skin templates - //----------------------------------------- - - $xml->addElement( 'hookextras_templates', 'hookexport' ); - - if( is_array($extra_data['templates']) AND count($extra_data['templates']) ) - { - $templateSetIds = $this->registry->output->buildRemapData( true ); - - foreach( $extra_data['templates'] as $file => $templates ) - { - $this->DB->build( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "template_set_id IN (".implode( ',', $templateSetIds['export']) .") AND template_group='{$file}' AND template_name IN('" . implode( "','", $templates ) . "')" ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - unset($r['template_id']); - $r['template_set_type'] = $templateSetIds['templates'][$r['template_set_id']]; - - $xml->addElementAsRecord( 'hookextras_templates', 'templates', $r ); - } - } - } - - //----------------------------------------- - // Tasks - //----------------------------------------- - - $xml->addElement( 'hookextras_tasks', 'hookexport' ); - - if( is_array($extra_data['tasks']) AND count($extra_data['tasks']) ) - { - $this->DB->build( array( 'select' => '*', 'from' => 'task_manager', 'where' => "task_id IN(" . implode( ",", $extra_data['tasks'] ) . ")" ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - unset($r['task_id']); - unset($r['task_next_run']); - - $xml->addElementAsRecord( 'hookextras_tasks', 'tasks', $r ); - } - } - - //----------------------------------------- - // Database changes - //----------------------------------------- - - $xml->addElement( 'hookextras_database_create', 'hookexport' ); - - if( is_array($extra_data['database']['create']) AND count($extra_data['database']['create']) ) - { - foreach( $extra_data['database']['create'] as $create_query ) - { - $xml->addElementAsRecord( 'hookextras_database_create', 'create', $create_query ); - } - } - - $xml->addElement( 'hookextras_database_alter', 'hookexport' ); - - if( is_array($extra_data['database']['alter']) AND count($extra_data['database']['alter']) ) - { - foreach( $extra_data['database']['alter'] as $alter_query ) - { - $xml->addElementAsRecord( 'hookextras_database_alter', 'alter', $alter_query ); - } - } - - $xml->addElement( 'hookextras_database_update', 'hookexport' ); - - if( is_array($extra_data['database']['update']) AND count($extra_data['database']['update']) ) - { - foreach( $extra_data['database']['update'] as $update_query ) - { - $xml->addElementAsRecord( 'hookextras_database_update', 'update', $update_query ); - } - } - - $xml->addElement( 'hookextras_database_insert', 'hookexport' ); - - if( is_array($extra_data['database']['insert']) AND count($extra_data['database']['insert']) ) - { - foreach( $extra_data['database']['insert'] as $insert_query ) - { - $xml->addElementAsRecord( 'hookextras_database_insert', 'insert', $insert_query ); - } - } - - //----------------------------------------- - // Print to browser - //----------------------------------------- - - $this->registry->output->showDownload( $xml->fetchDocument(), 'hook.xml', '', 0 ); - } - - /** - * Clean source code for export.. - * - * @access private - * @param string Hook source code - * @return string "Cleaned" source code - */ - private function _cleanSource( $source ) - { - $source = preg_replace( "/class\s+(\S+)\s+extends\s+(\S+)/i", "class \\1 extends (~extends~)", $source ); - - return $source; - } - - /** - * Fix hook positions - * - * @access private - * @return void - */ - private function _fixPositions() - { - $new_order = 0; - $usedActions = array(); - - $this->DB->build( array( 'select' => 'hook_id, hook_position', 'from' => 'core_hooks', 'where' => 'hook_enabled=1', 'order' => 'hook_position ASC' ) ); - $qid = $this->DB->execute(); - - while ( $hook = $this->DB->fetch( $qid ) ) - { - $new_order++; - $this->DB->update( 'core_hooks', array ( 'hook_position' => $new_order ), "hook_id={$hook['hook_id']}" ); - - $this->DB->build( array( 'select' => '*', 'from' => 'core_hooks_files', 'where' => "(hook_type='commandHooks' OR hook_type='skinHooks') AND hook_hook_id=" . $hook['hook_id'] ) ); - $this->DB->execute(); - - while( $file = $this->DB->fetch() ) - { - if( $file['hooks_source'] ) - { - $source = $file['hooks_source']; - } - else - { - $source = file_exists( IPS_HOOKS_PATH . $file['hook_file_stored'] ) ? file_get_contents( IPS_HOOKS_PATH . $file['hook_file_stored'] ) : ''; - - if( $source ) - { - $source = $this->_cleanSource( $source ); - } - } - - if( $source ) - { - $hook_data = unserialize( $file['hook_data'] ); - $overload = $hook_data['classToOverload']; - $newClass = $overload; - - if( isset( $usedActions[ $overload ] ) ) - { - $newClass = $usedActions[ $overload ]; - } - else if( $file['hook_type'] == 'skinHooks' ) - { - $newClass .= "(~id~)"; - } - - $source = str_replace( "(~extends~)", $newClass, $source ); - - file_put_contents( IPS_HOOKS_PATH . $file['hook_file_stored'], $source ); - - $usedActions[ $hook_data['classToOverload'] ] = $file['hook_classname']; - } - } - } - } - - /** - * Check if there is an update for a hook - * - * @access private - * @param string URL to check - * @param string Long version number - * @return bool - */ - private function _updateAvailable( $url, $version ) - { - if( !$version ) - { - //return false; - } - - require_once( IPS_KERNEL_PATH . '/classFileManagement.php' ); - $checker = new classFileManagement(); - $checker->use_sockets = $this->settings['enable_sockets']; - - //----------------------------------------- - // This is a low timeout to prevent page from taking too long - //----------------------------------------- - - $checker->timeout = 5; - - $return = $checker->getFileContents( str_replace( 'php&', 'php?', $url . '&version=' . $version ) ); - - return $return == 1 ? true : false; - } - - /** - * Hooks overview - * - * @access private - * @return void [Outputs to screen] - * @todo [Future] Explore showing details/version requirements in a DHTML popup rather than a new page - */ - private function _hooksOverview() - { - /* INI */ - $installedHooks = array(); - $uninstalledHooks = array(); - $min_order = 999999; - $max_order = 0; - $checkUpdates = ( isset( $this->request['checkUpdates'] ) AND $this->request['checkUpdates'] ) ? true : false; - - /* Get current hooks */ - $this->DB->build( array( 'select' => '*', 'from' => 'core_hooks', 'order' => 'hook_position ASC' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $r['_updated'] = $this->registry->getClass('class_localization')->formatTime( $r['hook_updated'] ); - $r['_installed'] = $this->registry->getClass('class_localization')->formatTime( $r['hook_installed'] ); - - $r['hook_update_available'] = ''; - - if( $r['hook_update_check'] && $checkUpdates === true ) - { - if( $this->_updateAvailable( $r['hook_update_check'], $r['hook_version_long'] ) ) - { - $r['hook_update_available'] = "Update Available"; - - if( $r['hook_website'] ) - { - $r['hook_update_available'] = "" . $r['hook_update_available'] . ''; - } - } - } - - $min_order = $r['hook_position'] < $min_order ? $r['hook_position'] : $min_order; - $max_order = $r['hook_position'] > $max_order ? $r['hook_position'] : $max_order; - - if( $r['hook_enabled'] ) - { - $installedHooks[ $r['hook_id'] ] = $r; - } - else - { - $uninstalledHooks[ $r['hook_id'] ] = $r; - } - } - - if( count($installedHooks) ) - { - foreach( $installedHooks as $id => $r ) - { - $upButton = $r['hook_position'] > $min_order ? 1 : 0; - $downButton = $r['hook_position'] < $max_order ? 1 : 0; - - $installedHooks[ $id ]['upButton'] = $upButton; - $installedHooks[ $id ]['downButton'] = $downButton; - } - } - - /* Output */ - $this->registry->output->html .= $this->html->hooksOverview( $installedHooks, $uninstalledHooks ); - } - - /** - * Disables a hook - * - * @access private - * @return void [Outputs to screen] - */ - private function _disableHook() - { - /* INI */ - $hook_id = intval( $this->request['id'] ); - - /* Do update */ - $this->DB->update( 'core_hooks', array( 'hook_enabled' => 0 ), "hook_id={$hook_id}" ); - - $this->rebuildHooksCache(); - - /* Done */ - $this->registry->output->global_message = $this->lang->words['hook_disabled']; - $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&do=hooks_overview' ); - } - - /** - * Enables a hook - * - * @access private - * @return void [Outputs to screen] - */ - private function _enableHook() - { - /* INI */ - $hook_id = intval( $this->request['id'] ); - - /* Do update */ - $this->DB->update( 'core_hooks', array( 'hook_enabled' => 1 ), "hook_id={$hook_id}" ); - - $this->rebuildHooksCache(); - - /* Done */ - $this->registry->output->global_message = $this->lang->words['h_hasbeenenabled']; - $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&do=hooks_overview' ); - } - - /** - * Uninstall a hook - * - * @access private - * @return void [Outputs to screen] - */ - private function _uninstallHook() - { - /* INI */ - $hook_id = intval( $this->request['id'] ); - - $hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $hook_id ) ); - $extra_data = unserialize( $hook['hook_extra_data'] ); - - if ( ! $hook['hook_id'] ) - { - $this->registry->output->global_message = $this->lang->words['h_hasbeenun']; - $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&do=hooks_overview' ); - } - - /* Get associated files */ - $this->DB->build( array( 'select' => 'hook_file_stored', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id=' . $hook_id ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - @unlink( IPS_HOOKS_PATH . $r['hook_file_stored'] ); - } - - /* Delete hook file entries */ - $this->DB->delete( 'core_hooks_files', "hook_hook_id={$hook_id}" ); - - //----------------------------------------- - // Settings or setting groups? - //----------------------------------------- - - if( count($extra_data['settingGroups']) ) - { - $this->DB->delete( 'core_sys_settings_titles', 'conf_title_id IN(' . implode( ',', $extra_data['settingGroups'] ) . ')' ); - } - - if( count($extra_data['settings']) ) - { - $this->DB->delete( 'core_sys_conf_settings', 'conf_id IN(' . implode( ',', $extra_data['settings'] ) . ')' ); - } - - $this->cache->rebuildCache( 'settings', 'global' ); - - //----------------------------------------- - // Language strings/files - //----------------------------------------- - - if( count($extra_data['language']) ) - { - foreach( $extra_data['language'] as $file => $bit ) - { - $this->DB->delete( 'core_sys_lang_words', "word_pack='{$file}' AND word_key IN('" . implode( "','", $bit ) . "')" ); - } - - $langPacks = array(); - - $this->DB->build( array( 'select' => 'lang_id', 'from' => 'core_sys_lang' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $langPacks[] = $r['lang_id']; - } - - require_once( IPSLib::getAppDir('core') . '/modules_admin/languages/manage_languages.php' ); - $langLib = new admin_core_languages_manage_languages( $this->registry ); - $langLib->makeRegistryShortcuts( $this->registry ); - - foreach( $langPacks as $langId ) - { - $langLib->cacheToDisk( $langId ); - } - } - - //----------------------------------------- - // Modules - //----------------------------------------- - - if( count($extra_data['modules']) ) - { - $this->DB->delete( 'core_sys_module', 'sys_module_id IN(' . implode( ',', $extra_data['modules'] ) . ')' ); - - $this->cache->rebuildCache( 'module_cache', 'global' ); - $this->cache->rebuildCache( 'app_menu_cache', 'global' ); - } - - //----------------------------------------- - // Help files - //----------------------------------------- - - if( count($extra_data['help']) ) - { - $this->DB->delete( 'faq', 'id IN(' . implode( ',', $extra_data['help'] ) . ')' ); - } - - //----------------------------------------- - // Skin templates - //----------------------------------------- - - if( count($extra_data['templates']) ) - { - foreach( $extra_data['templates'] as $file => $bit ) - { - $this->DB->delete( 'skin_templates', "template_group='{$file}' AND template_name IN('" . implode( "','", $bit ) . "')" ); - } - - require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); - require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); - $skinCaching = new skinCaching( $this->registry ); - $skinCaching->rebuildPHPTemplates( 0 ); - } - - //----------------------------------------- - // Tasks - //----------------------------------------- - - if( count($extra_data['tasks']) ) - { - $this->DB->delete( 'task_manager', 'task_id IN(' . implode( ',', $extra_data['tasks'] ) . ')' ); - } - - //----------------------------------------- - // Database changes - //----------------------------------------- - - if( is_array($extra_data['database']['create']) AND count($extra_data['database']['create']) ) - { - foreach( $extra_data['database']['create'] as $create_query ) - { - $this->DB->return_die = true; - $this->DB->dropTable( $create_query['name'] ); - $this->DB->return_die = false; - } - } - - if( is_array($extra_data['database']['alter']) AND count($extra_data['database']['alter']) ) - { - foreach( $extra_data['database']['alter'] as $alter_query ) - { - $this->DB->return_die = true; - - if( $alter_query['altertype'] == 'add' ) - { - if( $this->DB->checkForField( $alter_query['field'], $alter_query['table'] ) ) - { - $this->DB->dropField( $alter_query['table'], $alter_query['field'] ); - } - } - else if( $alter_query['altertype'] == 'change' ) - { - if( $this->DB->checkForField( $alter_query['newfield'], $alter_query['table'] ) ) - { - $this->DB->changeField( $alter_query['table'] , $alter_query['newfield'], $alter_query['field'], $alter_query['fieldtype'], $alter_query['default'] ); - } - } - - $this->DB->return_die = false; - } - } - - if( is_array($extra_data['database']['update']) AND count($extra_data['database']['update']) ) - { - foreach( $extra_data['database']['update'] as $update_query ) - { - $this->DB->return_die = true; - $this->DB->update( $update_query['table'], array( $update_query['field'] => $update_query['oldvalue'] ), $update_query['where'] ); - $this->DB->return_die = false; - } - } - - if( is_array($extra_data['database']['insert']) AND count($extra_data['database']['insert']) ) - { - foreach( $extra_data['database']['insert'] as $insert_query ) - { - if( $insert_query['fordelete'] ) - { - $this->DB->return_die = true; - $this->DB->delete( $insert_query['table'], $insert_query['fordelete'] ); - $this->DB->return_die = false; - } - } - } - - //----------------------------------------- - // Custom install/uninstall script? - //----------------------------------------- - - if( $extra_data['display']['custom'] ) - { - if( file_exists( IPS_HOOKS_PATH . $extra_data['display']['custom'] ) ) - { - require_once( IPS_HOOKS_PATH . $extra_data['display']['custom'] ); - - $classname = preg_replace( "#^install_(.+)\.php$#", "$1", $extra_data['display']['custom'] ); - - if( class_exists( $classname ) ) - { - $uninstall = new $classname( $this->registry ); - - if( method_exists( $uninstall, 'uninstall' ) ) - { - $uninstall->uninstall(); - } - } - - @unlink( IPS_HOOKS_PATH . $extra_data['display']['custom'] ); - } - } - - /* Delete main hook entry */ - $this->DB->delete( 'core_hooks', "hook_id={$hook_id}" ); - - $this->rebuildHooksCache(); - - /* Done */ - $this->registry->output->global_message = $this->lang->words['h_hasbeenun']; - $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&do=hooks_overview' ); - } - - /** - * Hook add/edit form - * This dynamic form allows users to associate multiple files with a single hook. - * - * @access private - * @param string [add|edit] - * @return void [Outputs to screen] - */ - private function _hookForm( $type='add' ) - { - if( $type == 'edit' ) - { - $id = intval($this->request['id']); - - if( !$id ) - { - $this->registry->output->showError( $this->lang->words['h_noedit'], 1116 ); - } - - $hookData = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $id ) ); - - if( !$hookData['hook_id'] ) - { - $this->registry->output->showError( $this->lang->words['h_noedit'], 1117 ); - } - - $hookData['hook_extra_data'] = unserialize( $hookData['hook_extra_data'] ); - $hookData['hook_requirements'] = unserialize( $hookData['hook_requirements'] ); - - $files = array(); - $index = 1; - $skinGroups = $this->hooksFunctions->getSkinGroups(); - $entryPoint = array(); - - $entryPoint['foreach'] = array( - array( 'outer.pre', $this->lang->words['h_outerpre'] ), - array( 'inner.pre', $this->lang->words['h_innerpre'] ), - array( 'inner.post', $this->lang->words['h_innerpost'] ), - array( 'outer.post', $this->lang->words['h_outerpost'] ), - ); - - $entryPoint['if'] = array( - array( 'pre.startif', $this->lang->words['h_prestartif'] ), - array( 'post.startif', $this->lang->words['h_poststartif'] ), - array( 'pre.else', $this->lang->words['h_preelse']), - array( 'post.else', $this->lang->words['h_postelse'] ), - array( 'pre.endif', $this->lang->words['h_preendif'] ), - array( 'post.endif', $this->lang->words['h_postendif'] ), - ); - - $this->DB->build( array( 'select' => '*', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id=' . $id ) ); - $outer = $this->DB->execute(); - - while( $r = $this->DB->fetch($outer) ) - { - $r['hook_data'] = unserialize( $r['hook_data'] ); - - if( $r['hook_type'] == 'templateHooks' ) - { - $templates = $this->hooksFunctions->getSkinMethods( $r['hook_data']['skinGroup'] ); - $hookIds = $this->hooksFunctions->getHookIds( $r['hook_data']['skinFunction'], $r['hook_data']['type'] ); - - $r['_skinDropdown'] = $this->registry->output->formDropdown( "skinGroup[{$index}]", $skinGroups, $r['hook_data']['skinGroup'], "skinGroup[{$index}]", "onchange='getTemplatesForAdd({$index});'" ); - $r['_templateDropdown'] = $this->registry->output->formDropdown( "skinFunction[{$index}]", $templates, $r['hook_data']['skinFunction'], "skinFunction[{$index}]", "onchange='getTypeOfHook({$index});'" ); - $r['_hookTypeDropdown'] = $this->registry->output->formDropdown( "type[{$index}]", array( array( 'foreach', 'foreach loop' ), array( 'if', 'if statement' ) ), $r['hook_data']['type'], "type[{$index}]", "onchange='getHookIds({$index});'" ); - $r['_hookIdsDropdown'] = $this->registry->output->formDropdown( "id[{$index}]", $hookIds, $r['hook_data']['id'], "id[{$index}]", "onchange='getHookEntryPoints({$index});'" ); - $r['_hookEPDropdown'] = $this->registry->output->formDropdown( "position[{$index}]", $r['hook_data']['type'] == 'foreach' ? $entryPoint['foreach'] : $entryPoint['if'], $r['hook_data']['position'] ); - } - - $files[ $index ] = $r; - $index++; - } - - $action = 'do_edit_hook'; - } - else - { - $hookData = array(); - - foreach( array( 'hook_enabled', 'hook_name', 'hook_desc', 'hook_author', 'hook_email', 'hook_website', 'hook_update_check', 'hook_requirements', 'hook_version_human', 'hook_version_long', 'hook_installed', 'hook_updated', 'hook_position', 'hook_extra_data' ) as $_hook ) - { - $hookData[ $_hook ] = $this->request[ $_hook ]; - } - - foreach( array( 'hook_ipb_version_max', 'hook_ipb_version_min', 'hook_php_version_min', 'hook_php_version_max' ) as $_version ) - { - $hookData['hook_requirements'][ $_version ] = $this->request[ $_version ]; - } - - $files = array(); - $action = 'do_create_hook'; - } - - /* Output */ - $this->registry->output->html .= $this->html->hookForm( $action, $hookData, $files ); - } - - /** - * Hook add/edit save - * Save the new (or updated) hook record - * - * @access private - * @param string [add|edit] - * @return void [Outputs to screen] - */ - private function _hookSave( $type='add' ) - { - /* Error Checking */ - if( ! $this->request['hook_name'] ) - { - $errors[] = $this->lang->words['hook_form_no_title']; - } - - if( ! $this->request['hook_key'] ) - { - $errors[] = $this->lang->words['hook_form_no_key']; - } - - $newFiles = array(); - - //if( !is_array( $this->request['file'] ) OR !count( $this->request['file'] ) ) - //{ - // $this->registry->output->global_message = $this->lang->words['h_onefile']; - // $this->_hookForm(); - // return; - //} - - if( is_array( $this->request['file'] ) AND count( $this->request['file'] ) ) - { - foreach( $this->request['file'] as $index => $file ) - { - if( $file ) - { - $newFiles[ $index ] = array( - 'hook_file_real' => $file, - 'hook_file_stored' => $file, // During import this is a random name, but for devs it's actual file - 'hook_type' => $this->request['hook_type'][ $index ], - 'hook_classname' => $this->request['hook_classname'][ $index ], - 'hook_data' => serialize( - array( - 'classToOverload' => trim($this->request['classToOverload'][ $index ]), - 'skinGroup' => $this->request['skinGroup'][ $index ], - 'skinFunction' => $this->request['skinFunction'][ $index ], - 'type' => $this->request['type'][ $index ], - 'id' => $this->request['id'][ $index ], - 'position' => $this->request['position'][ $index ], - ) - ) - ); - } - } - } - - //if( !is_array( $newFiles ) OR !count( $newFiles ) ) - //{ - // $errors[] = $this->lang->words['h_onefile']; - //} - - if( is_array( $errors ) ) - { - $this->registry->output->global_message = implode( '
', $errors ); - $this->_hookForm(); - return; - } - - /* Get data if we are editing */ - if( $type == 'edit' ) - { - $id = intval($this->request['hook_id']); - - if( !$id ) - { - $this->registry->output->showError( $this->lang->words['h_noedit'], 1118 ); - } - - $hookData = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $id ) ); - - if( !$hookData['hook_id'] ) - { - $this->registry->output->showError( $this->lang->words['h_noedit'], 1119 ); - } - } - - /* Get new position */ - $position = $this->DB->buildAndFetch( array( 'select' => 'MAX(hook_position) as newPos', 'from' => 'core_hooks' ) ); - - $mainHookRecord = array( - 'hook_name' => trim($this->request['hook_name']), - 'hook_key' => substr( trim($this->request['hook_key']), 0, 32 ), - 'hook_desc' => trim($this->request['hook_desc']), - 'hook_version_human' => trim($this->request['hook_version_human']), - 'hook_version_long' => trim($this->request['hook_version_long']), - 'hook_author' => trim($this->request['hook_author']), - 'hook_email' => trim($this->request['hook_email']), - 'hook_website' => trim($this->request['hook_website']), - 'hook_update_check' => trim($this->request['hook_update_check']), - 'hook_enabled' => $type == 'add' ? 1 : $hookData['hook_enabled'], - 'hook_installed' => $type == 'add' ? time() : $hookData['hook_installed'], - 'hook_updated' => $type == 'add' ? 0 : time(), - 'hook_position' => $type == 'add' ? $position['newPos'] + 1 : $hookData['hook_position'], - 'hook_requirements' => serialize( - array( - 'hook_ipb_version_min' => intval($this->request['hook_ipb_version_min']), - 'hook_ipb_version_max' => intval($this->request['hook_ipb_version_max']), - 'hook_php_version_min' => $this->request['hook_php_version_min'], - 'hook_php_version_max' => $this->request['hook_php_version_max'], - ) - ) - ); - - if( $type == 'edit' ) - { - $this->DB->update( 'core_hooks', $mainHookRecord, 'hook_id=' . $hookData['hook_id'] ); - - $this->DB->delete( 'core_hooks_files', 'hook_hook_id=' . $hookData['hook_id'] ); - } - else - { - $this->DB->insert( 'core_hooks', $mainHookRecord ); - - $hookData['hook_id'] = $this->DB->getInsertId(); - } - - foreach( $newFiles as $index => $toInsert ) - { - $toInsert['hook_hook_id'] = $hookData['hook_id']; - - $this->DB->insert( 'core_hooks_files', $toInsert ); - } - - $this->rebuildHooksCache(); - - $this->registry->output->global_message = $this->lang->words['h_saved']; - $this->_hooksOverview(); - } - - /** - * View details about a hook - * - * @access private - * @return void [Outputs to screen] - */ - private function _viewDetails() - { - $id = intval($this->request['id']); - - if( !$id ) - { - $this->registry->output->showError( $this->lang->words['h_nodetails'], 11110 ); - } - - $hookData = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $id ) ); - - if( !$hookData['hook_id'] ) - { - $this->registry->output->showError( $this->lang->words['h_nodetails'], 11111 ); - } - - $hookData['hook_extra_data'] = unserialize( $hookData['hook_extra_data'] ); - $hookData['hook_requirements'] = unserialize( $hookData['hook_requirements'] ); - - if( $hookData['hook_requirements']['hook_ipb_version_min'] OR $hookData['hook_requirements']['hook_ipb_version_max'] ) - { - /* Get the setup class */ - require IPS_ROOT_PATH . "setup/sources/base/setup.php"; - - /* Fetch numbers */ - $versions = IPSSetUp::fetchXmlAppVersions( 'core' ); - - /* Ensure we match at least 3.0.0 */ - $hookData['hook_requirements']['hook_ipb_version_min'] = ( $hookData['hook_requirements']['hook_ipb_version_min'] < 30000 ) ? 30000 : $hookData['hook_requirements']['hook_ipb_version_min']; - - foreach( $versions as $long => $human ) - { - if( $hookData['hook_requirements']['hook_ipb_version_min'] <= $long ) - { - $hookData['hook_requirements']['hook_ipb_version_min'] = $human; - break; - } - } - - krsort( $versions ); - - foreach( $versions as $long => $human ) - { - if( $hookData['hook_requirements']['hook_ipb_version_max'] >= $long ) - { - $hookData['hook_requirements']['hook_ipb_version_max'] = $human; - break; - } - } - } - - $files = array(); - $index = 1; - - $this->DB->build( array( 'select' => '*', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id=' . $id ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $r['hook_data'] = unserialize( $r['hook_data'] ); - $files[ $index ] = $r; - $index++; - } - - /* Output */ - $this->registry->output->html .= $this->html->hookDetails( $hookData, $files ); - } - - /** - * Check if you meet hook requirements - * - * @access private - * @return void [Outputs to screen] - */ - private function _checkRequirements() - { - $id = intval($this->request['id']); - - if( !$id ) - { - $this->registry->output->showError( $this->lang->words['h_norequirements'], 11112 ); - } - - $hookData = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $id ) ); - - if( !$hookData['hook_id'] ) - { - $this->registry->output->showError( $this->lang->words['h_norequirements'], 11113 ); - } - - $hookData['hook_requirements'] = unserialize( $hookData['hook_requirements'] ); - $hookIpbBad = false; - $hookPhpBad = false; - - /* Ensure we match at least 3.0.0 */ - $hookData['hook_requirements']['hook_ipb_version_min'] = ( $hookData['hook_requirements']['hook_ipb_version_min'] < 30000 ) ? 30000 : $hookData['hook_requirements']['hook_ipb_version_min']; - - if( $hookData['hook_requirements']['hook_ipb_version_min'] OR $hookData['hook_requirements']['hook_ipb_version_max'] ) - { - /* Get the setup class */ - require IPS_ROOT_PATH . "setup/sources/base/setup.php"; - - /* Fetch numbers */ - $versions = IPSSetUp::fetchXmlAppVersions( 'core' ); - - $currentIPB = (int) IPB_LONG_VERSION; - - if( $hookData['hook_requirements']['hook_ipb_version_min'] AND $currentIPB < $hookData['hook_requirements']['hook_ipb_version_min'] ) - { - $hookIpbBad = $this->lang->words['h_tooold']; - } - - if( $hookData['hook_requirements']['hook_ipb_version_max'] AND $currentIPB > $hookData['hook_requirements']['hook_ipb_version_max'] ) - { - $hookIpbBad = $this->lang->words['h_toonew']; - } - - foreach( $versions as $long => $human ) - { - if( $hookData['hook_requirements']['hook_ipb_version_min'] <= $long ) - { - $hookData['hook_requirements']['hook_ipb_version_min'] = $human; - break; - } - } - - krsort( $versions ); - - foreach( $versions as $long => $human ) - { - if( $hookData['hook_requirements']['hook_ipb_version_max'] >= $long ) - { - $hookData['hook_requirements']['hook_ipb_version_max'] = $human; - break; - } - } - } - - if( $hookData['hook_requirements']['hook_php_version_min'] OR $hookData['hook_requirements']['hook_php_version_max'] ) - { - if( $hookData['hook_requirements']['hook_php_version_min'] AND version_compare( PHP_VERSION, $hookData['hook_requirements']['hook_php_version_min'], '<' ) == true ) - { - $hookPhpBad = $this->lang->words['h_phpold']; - } - - if( $hookData['hook_requirements']['hook_php_version_max'] AND version_compare( PHP_VERSION, $hookData['hook_requirements']['hook_php_version_max'], '>' ) == true ) - { - $hookPhpBad = $this->lang->words['h_phpnew']; - } - } - - /* Output */ - $this->registry->output->html .= $this->html->hookRequirements( $hookData, $hookIpbBad, $hookPhpBad ); - } - - /** - * Rebuild hooks cache - * - * @access public - * @return void - */ - public function rebuildHooksCache() - { - /* INI */ - $cache = array(); - - /* First fix positions */ - $this->_fixPositions(); - - /* Get current hooks */ - $this->DB->build( array( 'select' => 'f.*', - 'from' => array( 'core_hooks_files' => 'f' ), - 'where' => 'c.hook_enabled=1', - 'order' => 'c.hook_position ASC', - 'add_join' => array( - array( - 'select' => 'c.hook_id, c.hook_key', - 'from' => array( 'core_hooks' => 'c' ), - 'where' => 'c.hook_id=f.hook_hook_id', - 'type' => 'left', - ) - ) - ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $data = unserialize( $r['hook_data'] ); - - $cache[ $r['hook_type'] ][ $r['hook_key'] ][ $r['hook_file_id'] ] = array( - 'filename' => $r['hook_file_stored'], - 'className' => $r['hook_classname'], - ); - - if( $r['hook_type'] == 'templateHooks' ) - { - $cache[ $r['hook_type'] ][ $r['hook_key'] ][ $r['hook_file_id'] ]['type'] = $data['type']; - $cache[ $r['hook_type'] ][ $r['hook_key'] ][ $r['hook_file_id'] ]['skinGroup'] = $data['skinGroup']; - $cache[ $r['hook_type'] ][ $r['hook_key'] ][ $r['hook_file_id'] ]['skinFunction'] = $data['skinFunction']; - $cache[ $r['hook_type'] ][ $r['hook_key'] ][ $r['hook_file_id'] ]['id'] = $data['id']; - $cache[ $r['hook_type'] ][ $r['hook_key'] ][ $r['hook_file_id'] ]['position'] = $data['position']; - } - else - { - $cache[ $r['hook_type'] ][ $r['hook_key'] ][ $r['hook_file_id'] ]['classToOverload'] = $data['classToOverload']; - } - } - - /* Update the cache */ - $this->cache->setCache( 'hooks', $cache, array( 'array' => 1 ) ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Hooks Management + * Last Updated: $Date: 2010-10-19 08:45:58 -0400 (Tue, 19 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 3.0.0 + * @version $Revision: 6994 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_applications_hooks extends ipsCommand +{ + /** + * Skin object + * + * @var object Skin templates + */ + private $html; + + /** + * Hooks library + * + * @var object Hooks library + */ + protected $hooksFunctions; + + /** + * Existing hooks + * + * @var array Existing hooks + */ + protected $hooks; + + /** + * Main class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = $this->registry->output->loadTemplate('cp_skin_applications'); + + //----------------------------------------- + // Load hooks library + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') . '/sources/classes/hooksFunctions.php', 'hooksFunctions' ); + $this->hooksFunctions = new $classToLoad( $registry ); + + $this->registry->class_localization->loadLanguageFile( array( 'admin_applications' ) ); + + //----------------------------------------- + // Set up stuff + //----------------------------------------- + + $this->form_code = $this->html->form_code = 'module=applications&section=hooks'; + $this->form_code_js = $this->html->form_code_js = 'module=applications§ion=hooks'; + + //----------------------------------------- + // What to do... + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'reenable_all_hooks': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->_reenableAllHooks(); + break; + case 'disable_all_hooks': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->_disableAllHooks(); + break; + + break; + case 'disable_hook': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->_disableHook(); + break; + case 'enable_hook': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->_enableHook(); + break; + + case 'uninstall_hook': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_delete' ); + $this->_uninstallHook(); + break; + case 'install_hook': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->_installHook(); + break; + + case 'reorder': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->_reorder(); + break; + + case 'view_details': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->_viewDetails(); + break; + + case 'check_requirements': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->_checkRequirements(); + break; + + case 'export_hook': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->_exportHook(); + break; + + case 'do_export_hook': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->_doExportHook(); + break; + + case 'create_hook': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->_hookForm( 'add' ); + break; + + case 'edit_hook': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->_hookForm( 'edit' ); + break; + + case 'do_create_hook': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->_hookSave( 'add' ); + break; + + case 'do_edit_hook': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->_hookSave( 'edit' ); + break; + + case 'skinsRebuild': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->_rebuildSkins(); + break; + + case 'removeDeadCaches': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->removeDeadCaches(); + break; + + case 'reimport_apps': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->reimportAppHooks(); + break; + + case 'hooks_overview': + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'hooks_manage' ); + $this->request['do'] = 'hooks_overview'; + $this->_hooksOverview(); + break; + } + + //----------------------------------------- + // Pass to CP output hander + //----------------------------------------- + + $this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper(); + $this->registry->getClass('output')->sendOutput(); + } + + /** + * Reimport all hooks for all installed applications + * + * @return void + */ + protected function reimportAppHooks() + { + $stats = array( 'inserted' => 0, 'updated' => 0, 'skipped' => 0 ); + + foreach( ipsRegistry::$applications as $app ) + { + $_stats = $this->installAppHooks( $app['app_directory'] ); + + $stats['inserted'] = $stats['inserted'] + $_stats['inserted']; + $stats['updated'] = $stats['updated'] + $_stats['updated']; + $stats['skipped'] = $stats['skipped'] + $_stats['skipped']; + } + + //----------------------------------------- + // Message + //----------------------------------------- + + $this->registry->output->global_message = sprintf( $this->lang->words['app_hooks_rebuilt'], $stats['inserted'], $stats['updated'], $stats['skipped'] ); + + //----------------------------------------- + // Recache hooks so templates know that there + // are comments to preserve + //----------------------------------------- + + $this->rebuildHooksCache(); + + /* Flag skins for recache */ + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); + $skinCaching = new skinCaching( $this->registry ); + + /* Flag all for recache */ + $skinCaching->flagSetForRecache(); + + /* Print message */ + + $this->_hooksOverview(); + } + + /** + * Rebuild skins following hook import that included a template + * + * @return void + */ + protected function removeDeadCaches() + { + $messages = array(); + $keep = array(); + $unlink = array(); + + /* Grab all current hooks caches */ + $this->DB->build( array( 'select' => '*', + 'from' => 'core_hooks_files' ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $keep[] = $row['hook_file_stored']; + } + + try + { + foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'hooks' ) as $file ) + { + if ( ! $file->isDot() ) + { + $_name = $file->getFileName(); + + if ( preg_match( "#_[a-z0-9]{32}\.php$#", $_name ) ) + { + if ( ! in_array( $_name, $keep ) ) + { + $unlink[] = $_name; + } + } + } + } + } catch ( Exception $e ) { print $e->getMessage(); } + + /* Anything to unlink? */ + if ( count( $unlink ) ) + { + foreach( $unlink as $file ) + { + @unlink( DOC_IPS_ROOT_PATH . 'hooks/' . $file ); + } + } + + /* Print message */ + $this->registry->output->global_message = count( $unlink ) . " Cached Hook Files Removed
" . implode( "
", $unlink ); + $this->_hooksOverview(); + } + + /** + * Rebuild skins following hook import that included a template + * + * @return void + */ + protected function _rebuildSkins() + { + $setID = intval( $this->request['setID'] ); + + if( $setID ) + { + //----------------------------------------- + // Get the libs + //----------------------------------------- + + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); + $skinCaching = new skinCaching( $this->registry ); + + $skinCaching->rebuildPHPTemplates( $setID ); + + /* Fetch next id */ + $nextID = $setID; + + ksort( $this->registry->output->allSkins ); + + foreach( $this->registry->output->allSkins as $id => $data ) + { + if ( $id > $nextID ) + { + $nextID = $id; + break; + } + } + + if ( $nextID != $setID ) + { + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ) ); + + /* More to go.. */ + $this->registry->output->redirect( $this->settings['base_url'] . 'app=core&module=applications§ion=hooks&do=skinsRebuild&setID=' . $nextID, $this->lang->words['to_recachedset'] . $this->registry->output->allSkins[ $setID ]['set_name'] ); + } + } + + //----------------------------------------- + // Must be all done! + //----------------------------------------- + + $message = ipsRegistry::getClass('adminFunctions')->staffGetCookie( 'hookResult' ); + ipsRegistry::getClass('adminFunctions')->staffSaveCookie( 'hookResult', '' ); + + $this->registry->output->global_message = $message; + + $this->rebuildHooksCache(); + + $this->_hooksOverview(); + } + + /** + * Reorder hooks + * + * @return void [Outputs to screen] + */ + private function _reorder() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' ); + $ajax = new $classToLoad(); + + //----------------------------------------- + // Checks... + //----------------------------------------- + + if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) + { + $ajax->returnString( $this->lang->words['postform_badmd5'] ); + exit(); + } + + //----------------------------------------- + // Save new position + //----------------------------------------- + + $position = 1; + + if( is_array($this->request['hooks']) AND count($this->request['hooks']) ) + { + foreach( $this->request['hooks'] as $this_id ) + { + $this->DB->update( 'core_hooks', array( 'hook_position' => $position ), 'hook_id=' . $this_id ); + + $position++; + } + } + + $this->rebuildHooksCache(); + + $ajax->returnString( 'OK' ); + exit(); + } + + /** + * Install a new hook + * + * @return void + */ + private function _installHook() + { + //----------------------------------------- + // Get uploaded schtuff + //----------------------------------------- + + $tmp_name = $_FILES['FILE_UPLOAD']['name']; + $tmp_name = preg_replace( "#\.gz$#", "", $tmp_name ); + + $content = ipsRegistry::getClass('adminFunctions')->importXml( $tmp_name ); + + if( ! $content ) + { + $this->registry->output->showError( $this->lang->words['h_noxml'], 1110 ); + } + + $this->installHook( $content, TRUE ); + + $this->rebuildHooksCache(); + + $this->_hooksOverview(); + } + + /** + * Function mostly used in installer/upgrader + * Inserts new hooks + * + * @param string Application to install hooks for + * @todo Figure out how to upgrade hooks properly (db updates / template updates / file updates, etc) + */ + public function installAppHooks( $app ) + { + static $hooks = array(); + + $msgs = array( 'inserted' => 0, 'updated' => 0, 'skipped' => 0 ); + $hooks = array(); + $xmlData = array(); + $path = IPSLib::getAppDir( $app ) . '/xml'; + + if ( file_exists( $path . '/hooks.xml' ) AND is_dir( $path . '/hooks' ) ) + { + if( !count($hooks) ) + { + /* Fetch current hooks */ + $this->DB->build( array( 'select' => '*', + 'from' => 'core_hooks' ) ); + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + if ( $row['hook_key'] ) + { + $hooks[ $row['hook_key'] ] = $row; + } + } + } + + /* Alright. We're in. Read the XML file */ + require_once( IPS_KERNEL_PATH . 'classXML.php' ); + $xml = new classXML( IPS_DOC_CHAR_SET ); + + /* Grab wrapper file */ + $xml->load( $path . '/hooks.xml' ); + + foreach( $xml->fetchElements('hook') as $data ) + { + $xmlData[] = $xml->fetchElementsFromRecord( $data ); + } + + /* Examine XML */ + if ( is_array( $xmlData ) AND count( $xmlData ) ) + { + foreach( $xmlData as $x ) + { + if ( file_exists( $path . '/hooks/' . $x['file'] ) ) + { + $xml->load( $path . '/hooks/' . $x['file'] ); + + foreach( $xml->fetchElements('config') as $data ) + { + $config = $xml->fetchElementsFromRecord( $data ); + } + + if ( ! isset( $hooks[ $config['hook_key'] ] ) ) + { + /* Add it */ + $msgs['inserted']++; + $this->installHook( file_get_contents( $path . '/hooks/' . $x['file'] ), FALSE, FALSE, $x['enabled'] ); + } + else + { + $this->installHook( file_get_contents( $path . '/hooks/' . $x['file'] ), FALSE, FALSE, $x['enabled'] ); + $msgs['updated']++; + } + } + } + } + } + + return $msgs; + } + + /** + * Public install hook so we can use it in the installer and elsewhere + * + * @param string XML data + * @param boolean Add message to output->global_message + * @param boolean Allow skins to recache + * @param int Install enabled + * @return void + */ + public function installHook( $content, $addMessage=FALSE, $allowSkinRecache=TRUE, $enabled=1 ) + { + //----------------------------------------- + // Hooks directory writable? + //----------------------------------------- + + if( !is_writable( IPS_HOOKS_PATH ) ) + { + if( !$addMessage ) + { + return false; + } + + $this->registry->output->showError( $this->lang->words['h_dir_notwritable'], 111159 ); + } + + //----------------------------------------- + // Got our hooks? + //----------------------------------------- + + if( !is_array($this->hooks) OR !count($this->hooks) ) + { + $this->DB->build( array( 'select' => '*', 'from' => 'core_hooks' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $this->hooks[ $r['hook_key'] ] = $r; + } + } + + //----------------------------------------- + // Get xml mah-do-dah + //----------------------------------------- + + require_once( IPS_KERNEL_PATH . 'classXML.php' ); + $xml = new classXML( IPS_DOC_CHAR_SET ); + + //----------------------------------------- + // Unpack the datafile + //----------------------------------------- + + $xml->loadXML( $content ); + + foreach( $xml->fetchElements('config') as $data ) + { + $config = $xml->fetchElementsFromRecord( $data ); + + if( !count($config) ) + { + $this->registry->output->showError( $this->lang->words['h_xmlwrong'], 1111 ); + } + } + + //----------------------------------------- + // Temp + //----------------------------------------- + + $tempExtraData = unserialize( $config['hook_extra_data'] ); + + //----------------------------------------- + // Set config + //----------------------------------------- + + $config = array( + 'hook_name' => $config['hook_name'], + 'hook_desc' => $config['hook_desc'], + 'hook_author' => $config['hook_author'], + 'hook_email' => $config['hook_email'], + 'hook_website' => $config['hook_website'], + 'hook_update_check' => $config['hook_update_check'], + 'hook_requirements' => $config['hook_requirements'], + 'hook_version_human' => $config['hook_version_human'], + 'hook_version_long' => $config['hook_version_long'], + 'hook_key' => $config['hook_key'], + 'hook_enabled' => $enabled, + 'hook_updated' => time(), + ); + + $extra_data = array(); + + //----------------------------------------- + // Set files + //----------------------------------------- + + $files = array(); + + foreach( $xml->fetchElements('hookfiles') as $node ) + { + foreach( $xml->fetchElements('file', $node) as $_file ) + { + $file = $xml->fetchElementsFromRecord( $_file ); + + if( $file['hook_type'] ) + { + $files[] = array( + 'hook_file_real' => $file['hook_file_real'], + 'hook_type' => $file['hook_type'], + 'hook_classname' => $file['hook_classname'], + 'hook_data' => $file['hook_data'], + 'hooks_source' => $file['hooks_source'], + ); + } + } + } + + //----------------------------------------- + // Set the custom script + //----------------------------------------- + + $custom = array(); + + foreach( $xml->fetchElements('hookextras_custom') as $node ) + { + foreach( $xml->fetchElements('file', $node) as $_file ) + { + $file = $xml->fetchElementsFromRecord( $_file ); + + if( count($file) ) + { + $custom = array( + 'filename' => $file['filename'], + 'source' => $file['source'], + ); + } + } + } + + //----------------------------------------- + // Set the settings + //----------------------------------------- + + $settings = array(); + $settingGroups = array(); + + foreach( $xml->fetchElements('hookextras_settings') as $node ) + { + foreach( $xml->fetchElements('setting', $node) as $_setting ) + { + $setting = $xml->fetchElementsFromRecord( $_setting ); + + if( $setting['conf_is_title'] == 1) + { + $settingGroups[] = array( + 'conf_title_title' => $setting['conf_title_title'], + 'conf_title_desc' => $setting['conf_title_desc'], + 'conf_title_noshow' => $setting['conf_title_noshow'], + 'conf_title_keyword' => $setting['conf_title_keyword'], + 'conf_title_app' => $setting['conf_title_app'], + 'conf_title_tab' => $setting['conf_title_tab'], + ); + } + else + { + $settings[] = array( + 'conf_title' => $setting['conf_title'], + 'conf_description' => $setting['conf_description'], + 'conf_group' => $setting['conf_group'], + 'conf_type' => $setting['conf_type'], + 'conf_key' => $setting['conf_key'], + 'conf_default' => $setting['conf_default'], + 'conf_extra' => $setting['conf_extra'], + 'conf_evalphp' => $setting['conf_evalphp'], + 'conf_protected' => $setting['conf_protected'], + 'conf_position' => $setting['conf_position'], + 'conf_start_group' => $setting['conf_start_group'], + 'conf_add_cache' => $setting['conf_add_cache'], + 'conf_title_keyword' => $setting['conf_title_keyword'], + ); + } + } + } + + //----------------------------------------- + // Set the lang bits + //----------------------------------------- + + $language = array(); + + foreach( $xml->fetchElements('hookextras_language') as $node ) + { + foreach( $xml->fetchElements('language', $node) as $_langbit ) + { + $langbit = $xml->fetchElementsFromRecord( $_langbit ); + + $language[] = array( + 'word_app' => $langbit['word_app'], + 'word_pack' => $langbit['word_pack'], + 'word_key' => $langbit['word_key'], + 'word_default' => $langbit['word_default'], + 'word_custom' => $langbit['word_custom'], + 'word_js' => $langbit['word_js'], + ); + } + } + + //----------------------------------------- + // Set the modules + //----------------------------------------- + + $modules = array(); + + foreach( $xml->fetchElements('hookextras_modules') as $node ) + { + foreach( $xml->fetchElements('module', $node) as $_module ) + { + $module = $xml->fetchElementsFromRecord( $_module ); + $modules[] = array( + 'sys_module_title' => $module['sys_module_title'], + 'sys_module_application' => $module['sys_module_application'], + 'sys_module_key' => $module['sys_module_key'], + 'sys_module_description' => $module['sys_module_description'], + 'sys_module_version' => $module['sys_module_version'], + 'sys_module_protected' => $module['sys_module_protected'], + 'sys_module_visible' => $module['sys_module_visible'], + 'sys_module_position' => $module['sys_module_position'], + 'sys_module_admin' => $module['sys_module_admin'], + ); + } + } + + //----------------------------------------- + // Set the help files + //----------------------------------------- + + $help = array(); + + foreach( $xml->fetchElements('hookextras_help') as $node ) + { + foreach( $xml->fetchElements('help', $node) as $_helpfile ) + { + $helpfile = $xml->fetchElementsFromRecord( $_helpfile ); + $help[] = array( + 'title' => $helpfile['title'], + 'text' => $helpfile['text'], + 'description' => $helpfile['description'], + 'position' => $helpfile['position'], + ); + } + } + + //----------------------------------------- + // Set the templates + //----------------------------------------- + + $templates = array(); + + foreach( $xml->fetchElements('hookextras_templates') as $node ) + { + foreach( $xml->fetchElements('templates', $node) as $_template ) + { + $template = $xml->fetchElementsFromRecord( $_template ); + + $templates[] = array( + 'template_set_id' => 0, + 'template_group' => $template['template_group'], + 'template_content' => $template['template_content'], + 'template_name' => $template['template_name'], + 'template_data' => $template['template_data'], + 'template_updated' => $template['template_updated'], + 'template_removable' => $template['template_removable'], + 'template_added_to' => $template['template_added_to'], + 'template_user_added' => 1, + 'template_user_edited' => 0, + 'template_master_key' => ( $template['template_master_key'] ) ? $template['template_master_key'] : 'root', + ); + } + } + + //----------------------------------------- + // Set the tasks + //----------------------------------------- + + $css = array(); + + foreach( $xml->fetchElements('hookextras_css') as $node ) + { + foreach( $xml->fetchElements('css', $node) as $_css ) + { + $_css = $xml->fetchElementsFromRecord( $_css ); + $css[] = array( + 'css_set_id' => 0, + 'css_group' => $_css['css_group'], + 'css_content' => $_css['css_content'], + 'css_position' => $_css['css_position'], + 'css_added_to' => 1, + 'css_app' => $_css['css_app'], + 'css_app_hide' => $_css['css_app_hide'], + 'css_attributes' => $_css['css_attributes'], + 'css_removed' => $_css['css_removed'], + 'css_modules' => $_css['css_modules'], + 'css_master_key' => ( $_css['css_master_key'] ) ? $_css['css_master_key'] : $_css['css_master_key'] + ); + } + } + + //----------------------------------------- + // Set the tasks + //----------------------------------------- + + $tasks = array(); + + foreach( $xml->fetchElements('hookextras_tasks') as $node ) + { + foreach( $xml->fetchElements('tasks', $node) as $_task ) + { + $task = $xml->fetchElementsFromRecord( $_task ); + $tasks[] = array( + 'task_title' => $task['task_title'], + 'task_file' => $task['task_file'], + 'task_week_day' => $task['task_week_day'], + 'task_month_day' => $task['task_month_day'], + 'task_hour' => $task['task_hour'], + 'task_minute' => $task['task_minute'], + 'task_cronkey' => $task['task_cronkey'], + 'task_log' => $task['task_log'], + 'task_description' => $task['task_description'], + 'task_enabled' => $task['task_enabled'], + 'task_key' => $task['task_key'], + 'task_safemode' => $task['task_safemode'], + 'task_locked' => $task['task_locked'], + 'task_application' => $task['task_application'], + ); + } + } + + //----------------------------------------- + // Set the database changes + //----------------------------------------- + + $database = array( + 'create' => array(), + 'alter' => array(), + 'update' => array(), + 'insert' => array(), + ); + + foreach( $xml->fetchElements('hookextras_database_create') as $node ) + { + foreach( $xml->fetchElements('create', $node) as $_table ) + { + $table = $xml->fetchElementsFromRecord( $_table ); + $database['create'][] = array( + 'name' => $table['name'], + 'fields' => $table['fields'], + 'tabletype' => $table['tabletype'], + ); + } + } + + foreach( $xml->fetchElements('hookextras_database_alter') as $node ) + { + foreach( $xml->fetchElements('alter', $node) as $_table ) + { + $table = $xml->fetchElementsFromRecord( $_table ); + $database['alter'][] = array( + 'altertype' => $table['altertype'], + 'table' => $table['table'], + 'field' => $table['field'], + 'newfield' => $table['newfield'], + 'fieldtype' => $table['fieldtype'], + 'default' => $table['default'], + ); + } + } + + foreach( $xml->fetchElements('hookextras_database_update') as $node ) + { + foreach( $xml->fetchElements('update', $node) as $_table ) + { + $table = $xml->fetchElementsFromRecord( $_table ); + $database['update'][] = array( + 'table' => $table['table'], + 'field' => $table['field'], + 'newvalue' => $table['newvalue'], + 'oldvalue' => $table['oldvalue'], + 'where' => $table['where'], + ); + } + } + + foreach( $xml->fetchElements('hookextras_database_insert') as $node ) + { + foreach( $xml->fetchElements('insert', $node) as $_table ) + { + $table = $xml->fetchElementsFromRecord( $_table ); + $database['insert'][] = array( + 'table' => $table['table'], + 'updates' => $table['updates'], + 'fordelete' => $table['fordelete'], + ); + } + } + + //----------------------------------------- + // Set some vars for display tallies + //----------------------------------------- + + $filesInserted = 0; + $settingGroupsInserted = 0; + $settingsInserted = 0; + $settingsUpdated = 0; + $languageInserted = 0; + $languageUpdated = 0; + $modulesInserted = 0; + $modulesUpdated = 0; + $helpInserted = 0; + $helpUpdated = 0; + $templatesInserted = 0; + $templatesUpdated = 0; + $templateHooks = 0; + $tasksInserted = 0; + $tasksUpdated = 0; + $createQueries = 0; + $alterQueries = 0; + $updateQueries = 0; + $insertQueries = 0; + $cssInserted = 0; + $cssUpdated = 0; + + //----------------------------------------- + // Need to recache skins? + //----------------------------------------- + + foreach( $files as $_f ) + { + if ( $_f['hook_type'] AND $_f['hook_type'] == 'templateHooks' ) + { + $templateHooks++; + } + } + + //----------------------------------------- + // Insert/update DB records + //----------------------------------------- + + if( $this->hooks[ $config['hook_key'] ]['hook_id'] ) + { + //----------------------------------------- + // Don't change enabled/disabled status + //----------------------------------------- + + unset( $config['hook_enabled'] ); + + $this->DB->update( 'core_hooks', $config, 'hook_id=' . $this->hooks[ $config['hook_key'] ]['hook_id'] ); + + $hook_id = $this->hooks[ $config['hook_key'] ]['hook_id']; + + $extra_data = unserialize( $this->hooks[ $config['hook_key'] ]['hook_extra_data'] ); + + /* Reset DB */ + $extra_data['database'] = array(); + } + else + { + $config['hook_installed'] = time(); + $this->hook[ $config['hook_key'] ] = $config; + + $this->DB->insert( 'core_hooks', $config ); + + $hook_id = $this->DB->getInsertId(); + + $this->hook[ $config['hook_key'] ]['hook_id'] = $hook_id; + + $extra_data['display'] = $tempExtraData['display']; + } + + if( count($files) ) + { + //----------------------------------------- + // If we are updating, remove old files + //----------------------------------------- + + if( $this->hooks[ $config['hook_key'] ]['hook_id'] ) + { + $this->DB->build( array( 'select' => 'hook_file_id, hook_file_stored', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id=' . $this->hooks[ $config['hook_key'] ]['hook_id'] ) ); + $outer = $this->DB->execute(); + + while( $r = $this->DB->fetch($outer) ) + { + @unlink( IPS_HOOKS_PATH . $r['hook_file_stored'] ); + $this->DB->delete( 'core_hooks_files', 'hook_file_id=' . $r['hook_file_id'] ); + } + } + + foreach( $files as $file ) + { + //----------------------------------------- + // Store new files + //----------------------------------------- + + $filename = $file['hook_classname'] . '_' . md5( uniqid( microtime(), true ) ) . '.php'; + + file_put_contents( IPS_HOOKS_PATH . $filename, $file['hooks_source'] ); + chmod( IPS_HOOKS_PATH . $filename, 0777 ); + + $file['hook_file_stored'] = $filename; + $file['hook_hook_id'] = $hook_id; + + $this->DB->insert( 'core_hooks_files', $file ); + $filesInserted++; + } + } + + //----------------------------------------- + // Put custom install/uninstall file + //----------------------------------------- + + if( $custom['source'] AND $custom['filename'] ) + { + file_put_contents( IPS_HOOKS_PATH . "install_" . $custom['filename'], $custom['source'] ); + } + + //----------------------------------------- + // (1) Settings + //----------------------------------------- + + if( count($settingGroups) OR count($settings) ) + { + $setting_groups = array(); + + $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_settings_titles', 'order' => 'conf_title_title' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $setting_groups[ $r['conf_title_id'] ] = $r; + $setting_groups_by_key[ $r['conf_title_keyword'] ] = $r; + } + + //----------------------------------------- + // Get current settings. + //----------------------------------------- + + $this->DB->build( array( 'select' => 'conf_id, conf_key', + 'from' => 'core_sys_conf_settings', + 'order' => 'conf_id' ) ); + + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $cur_settings[ $r['conf_key'] ] = $r['conf_id']; + } + } + + if( count($settingGroups) ) + { + $need_to_update = array(); + + foreach( $settingGroups as $data ) + { + if ( $data['conf_title_title'] AND $data['conf_title_keyword'] ) + { + //----------------------------------------- + // Get ID based on key + //----------------------------------------- + + $conf_id = $setting_groups_by_key[ $data['conf_title_keyword'] ]['conf_title_id']; + + $save = array( 'conf_title_title' => $data['conf_title_title'], + 'conf_title_desc' => $data['conf_title_desc'], + 'conf_title_keyword' => $data['conf_title_keyword'], + 'conf_title_app' => $data['conf_title_app'], + 'conf_title_tab' => $data['conf_title_tab'], + 'conf_title_noshow' => $data['conf_title_noshow'] ); + + //----------------------------------------- + // Not got a row, insert first! + //----------------------------------------- + + if ( ! $conf_id ) + { + $this->DB->insert( 'core_sys_settings_titles', $save ); + $conf_id = $this->DB->getInsertId(); + $settingGroupsInserted++; + $extra_data['settingGroups'][] = $conf_id; + } + else + { + //----------------------------------------- + // Update... + //----------------------------------------- + + $this->DB->update( 'core_sys_settings_titles', $save, 'conf_title_id='.$conf_id ); + } + + //----------------------------------------- + // Update settings cache + //----------------------------------------- + + $save['conf_title_id'] = $conf_id; + $setting_groups_by_key[ $save['conf_title_keyword'] ] = $save; + $setting_groups[ $save['conf_title_id'] ] = $save; + + //----------------------------------------- + // Set need update... + //----------------------------------------- + + $need_update[] = $conf_id; + } + } + } + + if( count($settings) ) + { + foreach( $settings as $idx => $data ) + { + $data['conf_group'] = $setting_groups_by_key[ $data['conf_title_keyword'] ]['conf_title_id']; + + //----------------------------------------- + // Remove from array + //----------------------------------------- + + unset( $data['conf_title_keyword'] ); + + if ( $cur_settings[ $data['conf_key'] ] ) + { + $this->DB->update( 'core_sys_conf_settings', $data, 'conf_id='.$cur_settings[ $data['conf_key'] ] ); + $settingsUpdated++; + } + else + { + $this->DB->insert( 'core_sys_conf_settings', $data ); + $settingsInserted++; + $conf_id = $this->DB->getInsertId(); + $extra_data['settings'][] = $conf_id; + } + } + } + + //----------------------------------------- + // Update group counts... + //----------------------------------------- + + if ( count( $need_update ) ) + { + foreach( $need_update as $i => $idx ) + { + $conf = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'core_sys_conf_settings', 'where' => 'conf_group='.$idx ) ); + + $count = intval($conf['count']); + + $this->DB->update( 'core_sys_settings_titles', array( 'conf_title_count' => $count ), 'conf_title_id='.$idx ); + } + } + + if( count($settingGroups) OR count($settings) ) + { + $this->cache->rebuildCache( 'settings', 'global' ); + } + + //----------------------------------------- + // (2) Languages + //----------------------------------------- + + if( count($language) ) + { + $langPacks = array(); + + $this->DB->build( array( 'select' => 'lang_id', 'from' => 'core_sys_lang' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $langPacks[] = $r['lang_id']; + } + + foreach( $language as $langbit ) + { + foreach( $langPacks as $lang_id ) + { + $langbit['lang_id'] = $lang_id; + + // See if it exists + $cnt = $this->DB->buildAndFetch( array( 'select' => 'word_id', 'from' => 'core_sys_lang_words', 'where' => "lang_id={$lang_id} AND word_app='{$langbit['word_app']}' AND word_key='{$langbit['word_key']}' AND word_pack='{$langbit['word_pack']}'" ) ); + + if( $cnt['word_id'] ) + { + $this->DB->update( 'core_sys_lang_words', $langbit, 'word_id=' . $cnt['word_id'] ); + $languageUpdated++; + } + else + { + $this->DB->insert( 'core_sys_lang_words', $langbit ); + $languageInserted++; + $word_id = $this->DB->getInsertId(); + $extra_data['language'][ $langbit['word_pack'] ][] = $langbit['word_key']; + } + } + } + + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir('core') . '/modules_admin/languages/manage_languages.php', 'admin_core_languages_manage_languages' ); + $langLib = new $classToLoad(); + $langLib->makeRegistryShortcuts( $this->registry ); + + foreach( $langPacks as $langId ) + { + $langLib->cacheToDisk( $langId ); + } + } + + //----------------------------------------- + // (3) Modules + //----------------------------------------- + + if( count($modules) ) + { + //----------------------------------------- + // Get current modules + //----------------------------------------- + $cur_modules = array(); + $this->DB->build( array( 'select' => '*', + 'from' => 'core_sys_module', + 'order' => 'sys_module_id' ) ); + + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $cur_modules[ $r['sys_module_application'] ][ $r['sys_module_key'] ] = $r['sys_module_id']; + } + + foreach( $modules as $module ) + { + //----------------------------------------- + // Insert or update? + //----------------------------------------- + + if ( $cur_modules[ $module['sys_module_application'] ][ $module['sys_module_key'] ] ) + { + $this->DB->update( 'core_sys_module', $module, "sys_module_id=" . $cur_modules[ $module['sys_module_application'] ][ $module['sys_module_key'] ] ); + $modulesUpdated++; + } + else + { + $this->DB->insert( 'core_sys_module', $module ); + $modulesInserted++; + $module_id = $this->DB->getInsertId(); + $extra_data['modules'][] = $module_id; + } + } + + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir('core') . '/modules_admin/applications/applications.php', 'admin_core_applications_applications' ); + $moduleLib = new $classToLoad(); + $moduleLib->makeRegistryShortcuts( $this->registry ); + $moduleLib->moduleRecache(); + $moduleLib->applicationsMenuDataRecache(); + } + + //----------------------------------------- + // (4) Help Files + //----------------------------------------- + + if( count($help) ) + { + $keys = array(); + + $this->DB->build( array( 'select' => 'title', 'from' => 'faq' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $keys[] = $r['title']; + } + + foreach( $help as $entry ) + { + if( in_array( $entry['title'], $keys ) ) + { + $this->DB->update( 'faq', $entry, "title='{$entry['title']}'" ); + $helpUpdated++; + } + else + { + $this->DB->insert( 'faq', $entry ); + $helpInserted++; + $help_id = $this->DB->getInsertId(); + $extra_data['help'][] = $help_id; + } + } + } + + //----------------------------------------- + // (6) Templates + //----------------------------------------- + + if( count($templates) ) + { + $bits = array(); + + /* Root will always be updated */ + $this->DB->build( array( 'select' => 'template_name,template_group', 'from' => 'skin_templates', 'where' => 'template_set_id=0 AND template_master_key=\'root\'' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $bits[ $r['template_group'] ][] = $r['template_name']; + } + + foreach( $templates as $template ) + { + if( is_array($bits[ $template['template_group'] ]) AND in_array( $template['template_name'], $bits[ $template['template_group'] ] ) ) + { + $this->DB->update( 'skin_templates', $template, "template_group='{$template['template_group']}' AND template_name='{$template['template_name']}'" ); + $templatesUpdated++; + } + else + { + $this->DB->insert( 'skin_templates', $template ); + $templatesInserted++; + $template_id = $this->DB->getInsertId(); + $extra_data['templates'][ $template['template_group'] ][] = $template['template_name']; + } + } + } + + //----------------------------------------- + // CSS + //----------------------------------------- + + if( count( $css ) ) + { + $bits = array(); + + $this->DB->build( array( 'select' => '*', 'from' => 'skin_css', 'where' => 'css_set_id=0' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $bits[ $r['css_group'] ] = $r; + } + + foreach( $css as $entry ) + { + if( is_array( $bits[ $entry['css_group'] ] ) AND in_array( $entry['css_group'], $bits[ $entry['css_group'] ] ) ) + { + $this->DB->update( 'skin_css', $entry, "css_group='{$entry['css_group']}'" ); + $cssUpdated++; + } + else + { + $this->DB->insert( 'skin_css', $entry ); + $cssInserted++; + $css_id = $this->DB->getInsertId(); + $extra_data['css'][] = $css_id; + } + } + } + + //----------------------------------------- + // (7) Tasks + //----------------------------------------- + + if( count($tasks) ) + { + $keys = array(); + + $this->DB->build( array( 'select' => 'task_key', 'from' => 'task_manager' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $keys[] = $r['task_key']; + } + + foreach( $tasks as $entry ) + { + if( in_array( $entry['task_key'], $keys ) ) + { + $this->DB->update( 'task_manager', $entry, "task_key='{$entry['task_key']}'" ); + $tasksUpdated++; + } + else + { + $this->DB->insert( 'task_manager', $entry ); + $tasksInserted++; + $task_id = $this->DB->getInsertId(); + $extra_data['tasks'][] = $task_id; + } + } + } + + //----------------------------------------- + // (8) Create new tables + //----------------------------------------- + + if( count($database['create']) ) + { + foreach($database['create'] as $create ) + { + $query = "CREATE TABLE {$create['name']} ( + {$create['fields']} + )"; + + if( $create['tabletype'] ) + { + $query .= " TYPE=" . $create['tabletype']; + } + + //----------------------------------------- + // Fix prefix + //----------------------------------------- + + $query = preg_replace( "#^CREATE TABLE(?:\s+?)?(\S+?)#s", "CREATE TABLE " . $this->settings['sql_tbl_prefix']."\\1", $query ); + + $this->DB->return_die = true; + $this->DB->query( $query ); + $this->DB->return_die = false; + $createQueries++; + + $extra_data['database']['create'][] = $create; + } + } + + //----------------------------------------- + // (9) Alter tables + //----------------------------------------- + + if( count($database['alter']) ) + { + foreach( $database['alter'] as $alter ) + { + $this->DB->return_die = true; + + switch( $alter['altertype'] ) + { + case 'remove': + $this->DB->dropField( $alter['table'], $alter['field'] ); + break; + + case 'add': + $this->DB->addField( $alter['table'], $alter['field'], $alter['fieldtype'], $alter['default'] ); + break; + + case 'change': + $this->DB->changeField( $alter['table'], $alter['field'], $alter['newfield'], $alter['fieldtype'], $alter['default'] ); + break; + } + + $this->DB->return_die = false; + $alterQueries++; + $extra_data['database']['alter'][] = $alter; + } + } + + //----------------------------------------- + // (10) Run update queries + //----------------------------------------- + + if( count($database['update']) ) + { + foreach( $database['update'] as $update ) + { + $this->DB->return_die = true; + $this->DB->update( $update['table'], array( $update['field'] => $update['newvalue'] ), html_entity_decode( $update['where'], ENT_QUOTES ) ); + $this->DB->return_die = false; + $updateQueries++; + $extra_data['database']['update'][] = $update; + } + } + + //----------------------------------------- + // (11) Run insert queries + //----------------------------------------- + + // if( !$this->hooks[ $config['hook_key'] ]['hook_id'] ) + // { + if( count($database['insert']) ) + { + foreach( $database['insert'] as $insert ) + { + $fields = array(); + $content = explode( ',', $insert['updates'] ); + + foreach( $content as $value ) + { + list( $field, $toInsert ) = explode( '=', $value ); + + $fields[ trim($field) ] = str_replace( '~C~', ',', $toInsert ); + } + + $this->DB->return_die = true; + $this->DB->insert( $insert['table'], $fields ); + $this->DB->return_die = false; + $insertQueries++; + $extra_data['database']['insert'][] = $insert; + } + } + // } + + if( $custom['filename'] AND file_exists( IPS_HOOKS_PATH . 'install_' . $custom['filename'] ) ) + { + require_once( IPS_HOOKS_PATH . 'install_' . $custom['filename'] ); + + $classname = str_replace( '.php', '', $custom['filename'] ); + + if( class_exists( $classname ) ) + { + $install = new $classname( $this->registry ); + + if( method_exists( $install, 'install' ) ) + { + $install->install(); + } + } + + $extra_data['display']['custom'] = $custom['filename']; + } + + if( count($extra_data) ) + { + $this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize( $extra_data ) ), 'hook_id=' . $hook_id ); + } + + //print_r($config); + //print_r($files); + //print_r($custom); + //print_r($settingGroups); + //print_r($settings); + //print_r($language); + //print_r($modules); + //print_r($templates); + //print_r($tasks); + //print_r($help); + //print_r($database); + + if ( $addMessage ) + { + $this->registry->output->global_message = <<lang->words['h_followacts']} +
    +
  • {$this->lang->words['h_newhookin']}
  • +
  • {$filesInserted} {$this->lang->words['h_filesin']}
  • +
  • {$settingGroupsInserted} {$this->lang->words['h_settinggin']}
  • +
  • {$settingsInserted} {$this->lang->words['h_settingin']}
  • +
  • {$settingsUpdated} {$this->lang->words['h_settingup']}
  • +
  • {$languageInserted} {$this->lang->words['h_langbitin']}
  • +
  • {$languageUpdated} {$this->lang->words['h_langbitup']}
  • +
  • {$modulesInserted} {$this->lang->words['h_modin']}
  • +
  • {$modulesUpdated} {$this->lang->words['h_modup']}
  • +
  • {$helpInserted} {$this->lang->words['h_helpin']}
  • +
  • {$helpUpdated} {$this->lang->words['h_helpup']}
  • +
  • {$templatesInserted} {$this->lang->words['h_tempin']}
  • +
  • {$templatesUpdated} {$this->lang->words['h_tempup']}
  • +
  • {$cssInserted} {$this->lang->words['h_cssin']}
  • +
  • {$cssUpdated} {$this->lang->words['h_cssup']}
  • +
  • {$tasksInserted} {$this->lang->words['h_taskin']}
  • +
  • {$tasksUpdated} {$this->lang->words['h_taskup']}
  • +
  • {$createQueries} {$this->lang->words['h_dbcreated']}
  • +
  • {$alterQueries} {$this->lang->words['h_dbaltered']}
  • +
  • {$updateQueries} {$this->lang->words['h_updateran']}
  • +
  • {$insertQueries} {$this->lang->words['h_insertran']}
  • +
+EOF; + + //----------------------------------------- + // Got some skin recaching to do... + //----------------------------------------- + + if( $allowSkinRecache === TRUE AND ( $templatesInserted OR $templatesUpdated OR $templateHooks ) ) + { + //----------------------------------------- + // Recache hooks so templates know that there + // are comments to preserve + //----------------------------------------- + + $this->rebuildHooksCache(); + + //----------------------------------------- + // Get the libs + //----------------------------------------- + + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); + $skinCaching = new skinCaching( $this->registry ); + + /* Flag all for recache */ + $skinCaching->flagSetForRecache(); + } + } + } + + /** + * Show the form to export a hook + * + * @return void + */ + private function _exportHook() + { + /* Get the hook */ + $id = intval($this->request['id']); + + if( !$id ) + { + $this->registry->output->showError( $this->lang->words['h_noexport'], 1112 ); + } + + $hookData = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $id ) ); + + if( !$hookData['hook_id'] ) + { + $this->registry->output->showError( $this->lang->words['h_noexport'], 1113 ); + } + + /* Set defaults */ + $hookData['hook_extra_data'] = unserialize( $hookData['hook_extra_data'] ); + + /* Output */ + $this->registry->output->html .= $this->html->hooksExport( $hookData ); + } + + /** + * Actually export the damn hook already + * Sorry, it has been a long day... + * + * @return void + */ + private function _doExportHook() + { + //----------------------------------------- + // Get hook + //----------------------------------------- + + $id = intval($this->request['id']); + + if( !$id ) + { + $this->registry->output->showError( $this->lang->words['h_noexport'], 1114 ); + } + + $hookData = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $id ) ); + + if( !$hookData['hook_id'] ) + { + $this->registry->output->showError( $this->lang->words['h_noexport'], 1115 ); + } + + $extra_data = unserialize( $hookData['hook_extra_data'] ); + + //----------------------------------------- + // Get hook files + //----------------------------------------- + + $files = array(); + $index = 1; + + $this->DB->build( array( 'select' => '*', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id=' . $id ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $files[ $index ] = $r; + $index++; + } + + //----------------------------------------- + // Get XML class + //----------------------------------------- + + require_once( IPS_KERNEL_PATH.'classXML.php' ); + + $xml = new classXML( IPS_DOC_CHAR_SET ); + + $xml->newXMLDocument(); + $xml->addElement( 'hookexport' ); + + //----------------------------------------- + // Put hook data in export + //----------------------------------------- + + $xml->addElement( 'hookdata', 'hookexport' ); + $content = array(); + + foreach( $hookData as $k => $v ) + { + if( in_array( $k, array( 'hook_id', 'hook_enabled', 'hook_installed', 'hook_updated', 'hook_position' ) ) ) + { + continue; + } + + $content[ $k ] = $v; + } + + $xml->addElementAsRecord( 'hookdata', 'config', $content ); + + //----------------------------------------- + // Put hook files in export + //----------------------------------------- + + $xml->addElement( 'hookfiles', 'hookexport' ); + + foreach( $files as $index => $r ) + { + $content = array(); + + foreach( $r as $k => $v ) + { + if( in_array( $k, array( 'hook_file_id', 'hook_hook_id', 'hook_file_stored', 'hooks_source' ) ) ) + { + continue; + } + + $content[ $k ] = $v; + } + + $source = file_exists( IPS_HOOKS_PATH . $r['hook_file_stored'] ) ? file_get_contents( IPS_HOOKS_PATH . $r['hook_file_stored'] ) : ''; + + if( $r['hook_type'] == 'commandHooks' || $r['hook_type'] == 'libraryHooks' ) + { + $source = $this->_cleanSource( $source ); + } + + $content['hooks_source'] = $source; + + $xml->addElementAsRecord( 'hookfiles', 'file', $content ); + } + + //----------------------------------------- + // Custom install/uninstall script? + //----------------------------------------- + + if( $extra_data['custom'] ) + { + $content = array(); + $xml->addElement( 'hookextras_custom', 'hookexport' ); + + $content['filename'] = $extra_data['custom']; + $content['source'] = file_exists( IPS_HOOKS_PATH . 'install_' . $extra_data['custom'] ) ? file_get_contents( IPS_HOOKS_PATH . 'install_' . $extra_data['custom'] ) : ''; + + $xml->addElementAsRecord( 'hookextras_custom', 'file', $content ); + } + + //----------------------------------------- + // Settings or setting groups? + //----------------------------------------- + + $entry = array(); + $_groups = array(); + $_settings = array(); + $titles = array(); + $content = array(); + + $xml->addElement( 'hookextras_settings', 'hookexport' ); + + # Store group ids and setting ids for entire setting groups + if( is_array($extra_data['settingGroups']) AND count($extra_data['settingGroups']) ) + { + $_groups = $extra_data['settingGroups']; + + $this->DB->build( array( 'select' => 'conf_id', 'from' => 'core_sys_conf_settings', 'where' => 'conf_group IN(' . implode( ',', $_groups ) . ')' ) ); + $this->DB->execute(); + + while( $setting = $this->DB->fetch() ) + { + $_settings[] = $setting['conf_id']; + } + } + + # Store group ids and setting ids for indvidual settings + if( is_array($extra_data['settings']) AND count($extra_data['settings']) ) + { + foreach( $extra_data['settings'] as $settingId ) + { + $_settings[] = $settingId; + } + + $this->DB->build( array( 'select' => 'conf_group', 'from' => 'core_sys_conf_settings', 'where' => 'conf_id IN(' . implode( ',', $extra_data['settings'] ) . ')' ) ); + $this->DB->execute(); + + while( $group = $this->DB->fetch() ) + { + $_groups[] = $group['conf_group']; + } + } + + if( count($_groups) ) + { + # Now get the group data for the XML file + $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_settings_titles', 'where' => 'conf_title_id IN(' . implode( ',', $_groups ) . ')' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $content = array(); + + $titles[ $r['conf_title_id'] ] = $r['conf_title_keyword']; + + $content['conf_is_title'] = 1; + + foreach( $r as $k => $v ) + { + if( in_array( $k, array( 'conf_title_tab', 'conf_title_keyword', 'conf_title_title', 'conf_title_desc', 'conf_title_app', 'conf_title_noshow' ) ) ) + { + $content[ $k ] = $v; + } + } + + $xml->addElementAsRecord( 'hookextras_settings', 'setting', $content ); + } + } + + if( count($_settings) ) + { + # Now get the group data for the XML file + $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => 'conf_id IN(' . implode( ',', $_settings ) . ')' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $r['conf_value'] = ''; + $r['conf_title_keyword'] = $titles[ $r['conf_group'] ]; + $r['conf_is_title'] = 0; + + $xml->addElementAsRecord( 'hookextras_settings', 'setting', $r ); + } + } + + //----------------------------------------- + // Language strings/files + //----------------------------------------- + + $entry = array(); + + $xml->addElement( 'hookextras_language', 'hookexport' ); + + if( is_array($extra_data['language']) AND count($extra_data['language']) ) + { + foreach( $extra_data['language'] as $file => $strings ) + { + $bits = explode( '_', $file ); + $app = $bits[0]; + $pack = str_replace( $app.'_', '', $file ); + + $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_lang_words', 'where' => "word_app='{$app}' AND word_pack='{$pack}' AND word_key IN('" . implode( "','", $strings ) . "')" ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $content = array(); + + foreach( $r as $k => $v ) + { + if( in_array( $k, array( 'word_id', 'lang_id', 'word_default_version', 'word_custom_version' ) ) ) + { + continue; + } + + $content[ $k ] = $v; + } + + $xml->addElementAsRecord( 'hookextras_language', 'language', $content ); + } + } + } + + //----------------------------------------- + // Modules + //----------------------------------------- + + $xml->addElement( 'hookextras_modules', 'hookexport' ); + + if( is_array($extra_data['modules']) AND count($extra_data['modules']) ) + { + foreach ( $extra_data['modules'] as $module ) + { + list( $_side, $_app, $_module ) = explode( '-', $module ); + $_is_admin = ( $_side == 'admin' ) ? 1 : 0; + + $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_module', 'where' => "sys_module_application='{$_app}' AND sys_module_key='{$_module}' AND sys_module_admin={$_is_admin}" ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + unset($r['sys_module_id']); + + $xml->addElementAsRecord( 'hookextras_modules', 'module', $r ); + } + } + } + + //----------------------------------------- + // Help files + //----------------------------------------- + + $xml->addElement( 'hookextras_help', 'hookexport' ); + + if( is_array($extra_data['help']) AND count($extra_data['help']) ) + { + $this->DB->build( array( 'select' => '*', 'from' => 'faq', 'where' => "id IN(" . implode( ",", $extra_data['help'] ) . ")" ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + unset($r['id']); + + $xml->addElementAsRecord( 'hookextras_help', 'help', $r ); + } + } + + //----------------------------------------- + // Skin templates + //----------------------------------------- + + $xml->addElement( 'hookextras_templates', 'hookexport' ); + + if( is_array($extra_data['templates']) AND count($extra_data['templates']) ) + { + $templateSetIds = $this->registry->output->buildRemapData( true ); + + foreach( $extra_data['templates'] as $file => $templates ) + { + $this->DB->build( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "template_set_id IN ('".implode( "','", $templateSetIds['export']) ."') AND template_group='{$file}' AND template_name IN('" . implode( "','", $templates ) . "')" ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + unset($r['template_id']); + $r['template_set_type'] = $templateSetIds['templates'][$r['template_set_id']]; + + $xml->addElementAsRecord( 'hookextras_templates', 'templates', $r ); + } + } + } + + //----------------------------------------- + // CSS + //----------------------------------------- + + $xml->addElement( 'hookextras_css', 'hookexport' ); + + if( is_array( $extra_data['css'] ) AND count ( $extra_data['css'] ) ) + { + $this->DB->build( array( 'select' => '*', 'from' => 'skin_css', 'where' => "css_id IN(" . implode( ",", $extra_data['css'] ) . ")" ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + unset($r['css_id']); + unset($r['css_set_id']); + + $xml->addElementAsRecord( 'hookextras_css', 'css', $r ); + } + } + + //----------------------------------------- + // Tasks + //----------------------------------------- + + $xml->addElement( 'hookextras_tasks', 'hookexport' ); + + if( is_array($extra_data['tasks']) AND count($extra_data['tasks']) ) + { + $this->DB->build( array( 'select' => '*', 'from' => 'task_manager', 'where' => "task_id IN(" . implode( ",", $extra_data['tasks'] ) . ")" ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + unset($r['task_id']); + unset($r['task_next_run']); + + $xml->addElementAsRecord( 'hookextras_tasks', 'tasks', $r ); + } + } + + //----------------------------------------- + // Database changes + //----------------------------------------- + + $xml->addElement( 'hookextras_database_create', 'hookexport' ); + + if( is_array($extra_data['database']['create']) AND count($extra_data['database']['create']) ) + { + foreach( $extra_data['database']['create'] as $create_query ) + { + $xml->addElementAsRecord( 'hookextras_database_create', 'create', $create_query ); + } + } + + $xml->addElement( 'hookextras_database_alter', 'hookexport' ); + + if( is_array($extra_data['database']['alter']) AND count($extra_data['database']['alter']) ) + { + foreach( $extra_data['database']['alter'] as $alter_query ) + { + $xml->addElementAsRecord( 'hookextras_database_alter', 'alter', $alter_query ); + } + } + + $xml->addElement( 'hookextras_database_update', 'hookexport' ); + + if( is_array($extra_data['database']['update']) AND count($extra_data['database']['update']) ) + { + foreach( $extra_data['database']['update'] as $update_query ) + { + $xml->addElementAsRecord( 'hookextras_database_update', 'update', $update_query ); + } + } + + $xml->addElement( 'hookextras_database_insert', 'hookexport' ); + + if( is_array($extra_data['database']['insert']) AND count($extra_data['database']['insert']) ) + { + foreach( $extra_data['database']['insert'] as $insert_query ) + { + $xml->addElementAsRecord( 'hookextras_database_insert', 'insert', $insert_query ); + } + } + + //----------------------------------------- + // Print to browser + //----------------------------------------- + + $this->registry->output->showDownload( $xml->fetchDocument(), 'hook.xml', '', 0 ); + } + + /** + * Clean source code for export.. + * + * @param string Hook source code + * @return string "Cleaned" source code + */ + private function _cleanSource( $source ) + { + $source = preg_replace( "/class\s+(\S+)\s+extends\s+(\S+)/i", "class \\1 extends (~extends~)", $source ); + + return $source; + } + + /** + * Fix hook positions + * + * @return void + */ + private function _fixPositions() + { + $new_order = 0; + $usedActions = array(); + + $this->DB->build( array( 'select' => 'hook_id, hook_position', 'from' => 'core_hooks', 'where' => 'hook_enabled=1', 'order' => 'hook_position ASC' ) ); + $qid = $this->DB->execute(); + + while ( $hook = $this->DB->fetch( $qid ) ) + { + $new_order++; + $this->DB->update( 'core_hooks', array ( 'hook_position' => $new_order ), "hook_id={$hook['hook_id']}" ); + + $this->DB->build( array( 'select' => '*', 'from' => 'core_hooks_files', 'where' => "(hook_type='commandHooks' OR hook_type='skinHooks' OR hook_type='libraryHooks') AND hook_hook_id=" . $hook['hook_id'] ) ); + $this->DB->execute(); + + while( $file = $this->DB->fetch() ) + { + if( $file['hooks_source'] ) + { + $source = $this->_cleanSource( $file['hooks_source'] ); + } + else + { + $source = file_exists( IPS_HOOKS_PATH . $file['hook_file_stored'] ) ? file_get_contents( IPS_HOOKS_PATH . $file['hook_file_stored'] ) : ''; + + if( $source ) + { + $source = $this->_cleanSource( $source ); + } + } + + if( $source ) + { + $hook_data = unserialize( $file['hook_data'] ); + $overload = $hook_data['classToOverload']; + $newClass = $overload; + + if( isset( $usedActions[ $overload ] ) ) + { + $newClass = $usedActions[ $overload ]; + } + else if( $file['hook_type'] == 'skinHooks' ) + { + $newClass .= "(~id~)"; + } + + $source = str_replace( "(~extends~)", $newClass, $source ); + + file_put_contents( IPS_HOOKS_PATH . $file['hook_file_stored'], $source ); + + $usedActions[ $hook_data['classToOverload'] ] = $file['hook_classname']; + } + } + } + } + + /** + * Check if there is an update for a hook + * + * @param string URL to check + * @param string Long version number + * @return bool + */ + private function _updateAvailable( $url, $version ) + { + if( !$version ) + { + //return false; + } + + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . '/classFileManagement.php', 'classFileManagement' ); + $checker = new $classToLoad(); + $checker->use_sockets = $this->settings['enable_sockets']; + + //----------------------------------------- + // This is a low timeout to prevent page from taking too long + //----------------------------------------- + + $checker->timeout = 5; + + $return = $checker->getFileContents( str_replace( 'php&', 'php?', $url . '&version=' . $version ) ); + + return $return == 1 ? true : false; + } + + /** + * Hooks overview + * + * @return void [Outputs to screen] + * @todo [Future] Explore showing details/version requirements in a DHTML popup rather than a new page + */ + private function _hooksOverview() + { + /* INI */ + $installedHooks = array(); + $uninstalledHooks = array(); + $min_order = 999999; + $max_order = 0; + $checkUpdates = ( isset( $this->request['checkUpdates'] ) AND $this->request['checkUpdates'] ) ? true : false; + + /* Get current hooks */ + $this->DB->build( array( 'select' => '*', 'from' => 'core_hooks', 'order' => 'hook_position ASC' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $r['_updated'] = $this->registry->getClass('class_localization')->formatTime( $r['hook_updated'] ); + $r['_installed'] = $this->registry->getClass('class_localization')->formatTime( $r['hook_installed'] ); + + $r['hook_update_available'] = ''; + + if( $r['hook_update_check'] && $checkUpdates === true ) + { + if( $this->_updateAvailable( $r['hook_update_check'], $r['hook_version_long'] ) ) + { + $r['hook_update_available'] = "Update Available"; + + if( $r['hook_website'] ) + { + $r['hook_update_available'] = "" . $r['hook_update_available'] . ''; + } + } + } + + $min_order = $r['hook_position'] < $min_order ? $r['hook_position'] : $min_order; + $max_order = $r['hook_position'] > $max_order ? $r['hook_position'] : $max_order; + + if( $r['hook_enabled'] ) + { + $installedHooks[ $r['hook_id'] ] = $r; + } + else + { + $uninstalledHooks[ $r['hook_id'] ] = $r; + } + } + + if( count($installedHooks) ) + { + foreach( $installedHooks as $id => $r ) + { + $upButton = $r['hook_position'] > $min_order ? 1 : 0; + $downButton = $r['hook_position'] < $max_order ? 1 : 0; + + $installedHooks[ $id ]['upButton'] = $upButton; + $installedHooks[ $id ]['downButton'] = $downButton; + } + } + + /* Output */ + $this->registry->output->html .= $this->html->hooksOverview( $installedHooks, $uninstalledHooks ); + } + + /** + * Disables all hook + * + * @return void [Outputs to screen] + */ + private function _disableAllHooks() + { + /* INIT */ + $activeHookIds = array(); + + /* Query Enabled Hooks */ + $this->DB->build( array( 'select' => 'hook_id', 'from' => 'core_hooks', 'where' => "hook_enabled=1" ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $activeHookIds[] = $r['hook_id']; + } + + /* Make sure there were active hooks */ + if( ! count( $activeHookIds ) ) + { + $this->registry->output->global_message = $this->lang->words['hook_disable_all_none'];; + $this->_hooksOverview(); + return; + } + + /* Disable hooks */ + $this->DB->update( 'core_hooks', array( 'hook_enabled' => 0 ), 'hook_id IN( ' . implode( ',', $activeHookIds ) . ' ) ' ); + + /* Save to cache */ + $this->cache->setCache( 'disabledHooksCache', $activeHookIds, array( 'array' => 1 ) ); + + /* Rebuild cache */ + $this->rebuildHooksCache(); + + /* All Done */ + $this->registry->output->global_message = $this->lang->words['hook_disabled_all']; + $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&do=hooks_overview' ); + } + + private function _reenableAllHooks() + { + /* INIT */ + $activeHookIds = $this->cache->getCache( 'disabledHooksCache' ); + + /* Make sure there were active hooks */ + if( ! count( $activeHookIds ) ) + { + $this->registry->output->global_message = $this->lang->words['hook_disable_all_none']; + $this->_hooksOverview(); + return; + } + + /* Disable hooks */ + $this->DB->update( 'core_hooks', array( 'hook_enabled' => 1 ), 'hook_id IN( ' . implode( ',', $activeHookIds ) . ' ) ' ); + + /* Save to cache */ + $this->cache->setCache( 'disabledHooksCache', array(), array( 'array' => 1 ) ); + + /* Rebuild cache */ + $this->rebuildHooksCache(); + + /* Flag skins for recache */ + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); + $skinCaching = new skinCaching( $this->registry ); + + /* Flag all for recache */ + $skinCaching->flagSetForRecache(); + + /* All Done */ + $this->registry->output->global_message = $this->lang->words['hook_reenable_all']; + $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&do=hooks_overview' ); + } + + /** + * Disables a hook + * + * @return void [Outputs to screen] + */ + private function _disableHook() + { + /* INI */ + $hook_id = intval( $this->request['id'] ); + + /* Do update */ + $this->DB->update( 'core_hooks', array( 'hook_enabled' => 0 ), "hook_id={$hook_id}" ); + + $this->rebuildHooksCache(); + + /* Flag skins for recache */ + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); + $skinCaching = new skinCaching( $this->registry ); + + /* Flag all for recache */ + $skinCaching->flagSetForRecache(); + + /* Done */ + $this->registry->output->global_message = $this->lang->words['hook_disabled']; + $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&do=hooks_overview' ); + } + + /** + * Enables a hook + * + * @return void [Outputs to screen] + */ + private function _enableHook() + { + /* INI */ + $hook_id = intval( $this->request['id'] ); + + /* Do update */ + $this->DB->update( 'core_hooks', array( 'hook_enabled' => 1 ), "hook_id={$hook_id}" ); + + $this->rebuildHooksCache(); + + /* Flag skins for recache */ + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); + $skinCaching = new skinCaching( $this->registry ); + + /* Flag all for recache */ + $skinCaching->flagSetForRecache(); + + /* Done */ + $this->registry->output->global_message = $this->lang->words['h_hasbeenenabled']; + $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&do=hooks_overview' ); + } + + /** + * Uninstall a hook + * + * @return void [Outputs to screen] + */ + private function _uninstallHook() + { + /* INI */ + $hook_id = intval( $this->request['id'] ); + + $hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $hook_id ) ); + $extra_data = unserialize( $hook['hook_extra_data'] ); + + if ( ! $hook['hook_id'] ) + { + $this->registry->output->global_message = $this->lang->words['h_hasbeenun']; + $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&do=hooks_overview' ); + } + + /* Get associated files */ + $this->DB->build( array( 'select' => 'hook_file_stored', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id=' . $hook_id ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + @unlink( IPS_HOOKS_PATH . $r['hook_file_stored'] ); + } + + /* Delete hook file entries */ + $this->DB->delete( 'core_hooks_files', "hook_hook_id={$hook_id}" ); + + //----------------------------------------- + // Settings or setting groups? + //----------------------------------------- + + if( count($extra_data['settingGroups']) ) + { + $this->DB->delete( 'core_sys_settings_titles', 'conf_title_id IN(' . implode( ',', $extra_data['settingGroups'] ) . ')' ); + } + + if( count($extra_data['settings']) ) + { + $this->DB->delete( 'core_sys_conf_settings', 'conf_id IN(' . implode( ',', $extra_data['settings'] ) . ')' ); + } + + $this->cache->rebuildCache( 'settings', 'global' ); + + //----------------------------------------- + // Language strings/files + //----------------------------------------- + + if( count($extra_data['language']) ) + { + foreach( $extra_data['language'] as $file => $bit ) + { + $this->DB->delete( 'core_sys_lang_words', "word_pack='{$file}' AND word_key IN('" . implode( "','", $bit ) . "')" ); + } + + $langPacks = array(); + + $this->DB->build( array( 'select' => 'lang_id', 'from' => 'core_sys_lang' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $langPacks[] = $r['lang_id']; + } + + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir('core') . '/modules_admin/languages/manage_languages.php', 'admin_core_languages_manage_languages' ); + $langLib = new $classToLoad(); + $langLib->makeRegistryShortcuts( $this->registry ); + + foreach( $langPacks as $langId ) + { + $langLib->cacheToDisk( $langId ); + } + } + + //----------------------------------------- + // Modules + //----------------------------------------- + + if( count($extra_data['modules']) ) + { + $this->DB->delete( 'core_sys_module', "sys_module_id IN('" . implode( "','", $extra_data['modules'] ) . "')" ); + + $this->cache->rebuildCache( 'module_cache', 'global' ); + $this->cache->rebuildCache( 'app_menu_cache', 'global' ); + } + + //----------------------------------------- + // Help files + //----------------------------------------- + + if( count($extra_data['help']) ) + { + $this->DB->delete( 'faq', 'id IN(' . implode( ',', $extra_data['help'] ) . ')' ); + } + + //----------------------------------------- + // Skin templates + //----------------------------------------- + + if( count($extra_data['templates']) ) + { + foreach( $extra_data['templates'] as $file => $bit ) + { + $this->DB->delete( 'skin_templates', "template_group='{$file}' AND template_name IN('" . implode( "','", $bit ) . "')" ); + } + + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); + $skinCaching = new skinCaching( $this->registry ); + $skinCaching->rebuildPHPTemplates( 0 ); + } + + //----------------------------------------- + // CSS + //----------------------------------------- + + if( count( $extra_data['css'] ) ) + { + $this->DB->delete( 'skin_css', 'css_id IN(' . implode( ',', $extra_data['css'] ) . ')' ); + + if( ! $skinCaching ) + { + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); + $skinCaching = new skinCaching( $this->registry ); + } + + $skinCaching->rebuildCSSCache( 0 ); + } + + //----------------------------------------- + // Tasks + //----------------------------------------- + + if( count($extra_data['tasks']) ) + { + $this->DB->delete( 'task_manager', 'task_id IN(' . implode( ',', $extra_data['tasks'] ) . ')' ); + } + + //----------------------------------------- + // Database changes + //----------------------------------------- + + if( is_array($extra_data['database']['create']) AND count($extra_data['database']['create']) ) + { + foreach( $extra_data['database']['create'] as $create_query ) + { + $this->DB->return_die = true; + $this->DB->dropTable( $create_query['name'] ); + $this->DB->return_die = false; + } + } + + if( is_array($extra_data['database']['alter']) AND count($extra_data['database']['alter']) ) + { + foreach( $extra_data['database']['alter'] as $alter_query ) + { + $this->DB->return_die = true; + + if( $alter_query['altertype'] == 'add' ) + { + if( $this->DB->checkForField( $alter_query['field'], $alter_query['table'] ) ) + { + $this->DB->dropField( $alter_query['table'], $alter_query['field'] ); + } + } + else if( $alter_query['altertype'] == 'change' ) + { + if( $this->DB->checkForField( $alter_query['newfield'], $alter_query['table'] ) ) + { + $this->DB->changeField( $alter_query['table'] , $alter_query['newfield'], $alter_query['field'], $alter_query['fieldtype'], $alter_query['default'] ); + } + } + + $this->DB->return_die = false; + } + } + + if( is_array($extra_data['database']['update']) AND count($extra_data['database']['update']) ) + { + foreach( $extra_data['database']['update'] as $update_query ) + { + $this->DB->return_die = true; + $this->DB->update( $update_query['table'], array( $update_query['field'] => $update_query['oldvalue'] ), $update_query['where'] ); + $this->DB->return_die = false; + } + } + + if( is_array($extra_data['database']['insert']) AND count($extra_data['database']['insert']) ) + { + foreach( $extra_data['database']['insert'] as $insert_query ) + { + if( $insert_query['fordelete'] ) + { + $this->DB->return_die = true; + $this->DB->delete( $insert_query['table'], $insert_query['fordelete'] ); + $this->DB->return_die = false; + } + } + } + + //----------------------------------------- + // Custom install/uninstall script? + //----------------------------------------- + + if( $extra_data['display']['custom'] ) + { + if( file_exists( IPS_HOOKS_PATH . 'install_' . $extra_data['display']['custom'] ) ) + { + require_once( IPS_HOOKS_PATH . 'install_' . $extra_data['display']['custom'] ); + + $classname = str_replace( '.php', '', $extra_data['display']['custom'] ); + + if( class_exists( $classname ) ) + { + $uninstall = new $classname( $this->registry ); + + if( method_exists( $uninstall, 'uninstall' ) ) + { + $uninstall->uninstall(); + } + } + } + } + + /* Delete main hook entry */ + $this->DB->delete( 'core_hooks', "hook_id={$hook_id}" ); + + $this->rebuildHooksCache(); + + /* Done */ + $this->registry->output->global_message = $this->lang->words['h_hasbeenun']; + $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&do=hooks_overview' ); + } + + /** + * Hook add/edit form + * This dynamic form allows users to associate multiple files with a single hook. + * + * @param string [add|edit] + * @return void [Outputs to screen] + */ + private function _hookForm( $type='add' ) + { + if( $type == 'edit' ) + { + $id = intval($this->request['id']); + + if( !$id ) + { + $this->registry->output->showError( $this->lang->words['h_noedit'], 1116 ); + } + + $hookData = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $id ) ); + + if( !$hookData['hook_id'] ) + { + $this->registry->output->showError( $this->lang->words['h_noedit'], 1117 ); + } + + $hookData['hook_extra_data'] = unserialize( $hookData['hook_extra_data'] ); + $hookData['hook_requirements'] = unserialize( $hookData['hook_requirements'] ); + + $files = array(); + $index = 1; + $skinGroups = $this->hooksFunctions->getSkinGroups(); + $entryPoint = array(); + + $entryPoint['foreach'] = array( + array( 'outer.pre', $this->lang->words['h_outerpre'] ), + array( 'inner.pre', $this->lang->words['h_innerpre'] ), + array( 'inner.post', $this->lang->words['h_innerpost'] ), + array( 'outer.post', $this->lang->words['h_outerpost'] ), + ); + + $entryPoint['if'] = array( + array( 'pre.startif', $this->lang->words['h_prestartif'] ), + array( 'post.startif', $this->lang->words['h_poststartif'] ), + array( 'pre.else', $this->lang->words['h_preelse']), + array( 'post.else', $this->lang->words['h_postelse'] ), + array( 'pre.endif', $this->lang->words['h_preendif'] ), + array( 'post.endif', $this->lang->words['h_postendif'] ), + ); + + $this->DB->build( array( 'select' => '*', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id=' . $id ) ); + $outer = $this->DB->execute(); + + /* Get them outside the while cycle to prevent warnings */ + $_dataHooks = IPSLib::getDataHookLocations(); + + while( $r = $this->DB->fetch($outer) ) + { + $r['hook_data'] = unserialize( $r['hook_data'] ); + + if( $r['hook_type'] == 'templateHooks' ) + { + $templates = $this->hooksFunctions->getSkinMethods( $r['hook_data']['skinGroup'] ); + $hookIds = $this->hooksFunctions->getHookIds( $r['hook_data']['skinFunction'], $r['hook_data']['type'] ); + + $r['_skinDropdown'] = $this->registry->output->formDropdown( "skinGroup[{$index}]", $skinGroups, $r['hook_data']['skinGroup'], "skinGroup[{$index}]", "onchange='getTemplatesForAdd({$index});'" ); + $r['_templateDropdown'] = $this->registry->output->formDropdown( "skinFunction[{$index}]", $templates, $r['hook_data']['skinFunction'], "skinFunction[{$index}]", "onchange='getTypeOfHook({$index});'" ); + $r['_hookTypeDropdown'] = $this->registry->output->formDropdown( "type[{$index}]", array( array( 'foreach', 'foreach loop' ), array( 'if', 'if statement' ) ), $r['hook_data']['type'], "type[{$index}]", "onchange='getHookIds({$index});'" ); + $r['_hookIdsDropdown'] = $this->registry->output->formDropdown( "id[{$index}]", $hookIds, $r['hook_data']['id'], "id[{$index}]", "onchange='getHookEntryPoints({$index});'" ); + $r['_hookEPDropdown'] = $this->registry->output->formDropdown( "position[{$index}]", $r['hook_data']['type'] == 'foreach' ? $entryPoint['foreach'] : $entryPoint['if'], $r['hook_data']['position'] ); + } + + if( $r['hook_type'] == 'dataHooks' ) + { + $r['_dataLocationDropdown'] = $this->registry->output->formDropdown( "dataLocation[{$index}]", $_dataHooks, $r['hook_data']['dataLocation'] ); + } + + $files[ $index ] = $r; + $index++; + } + + $action = 'do_edit_hook'; + } + else + { + $hookData = array(); + + foreach( array( 'hook_enabled', 'hook_name', 'hook_desc', 'hook_author', 'hook_email', 'hook_website', 'hook_update_check', 'hook_requirements', 'hook_version_human', 'hook_version_long', 'hook_installed', 'hook_updated', 'hook_position', 'hook_extra_data' ) as $_hook ) + { + $hookData[ $_hook ] = $this->request[ $_hook ]; + } + + foreach( array( 'hook_ipb_version_max', 'hook_ipb_version_min', 'hook_php_version_min', 'hook_php_version_max' ) as $_version ) + { + $hookData['hook_requirements'][ $_version ] = $this->request[ $_version ]; + } + + $files = array(); + $action = 'do_create_hook'; + } + + /* Output */ + $this->registry->output->html .= $this->html->hookForm( $action, $hookData, $files ); + } + + /** + * Hook add/edit save + * Save the new (or updated) hook record + * + * @param string [add|edit] + * @return void [Outputs to screen] + */ + private function _hookSave( $type='add' ) + { + /* Error Checking */ + if( ! $this->request['hook_name'] ) + { + $errors[] = $this->lang->words['hook_form_no_title']; + } + + if( ! $this->request['hook_key'] ) + { + $errors[] = $this->lang->words['hook_form_no_key']; + } + + $newFiles = array(); + + $_hookFiles = array(); + + if( !IN_DEV ) + { + $this->DB->build( array( 'select' => '*', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id=' . intval($this->request['hook_id']) ) ); + $this->DB->execute(); + + while( $_r = $this->DB->fetch() ) + { + $_hookFiles[ $_r['hook_classname'] ] = $_r['hook_file_stored']; + } + } + + if( is_array( $this->request['file'] ) AND count( $this->request['file'] ) ) + { + foreach( $this->request['file'] as $index => $file ) + { + if( $file ) + { + $newFiles[ $index ] = array( + 'hook_file_real' => $file, + //'hook_file_stored' => $file, + 'hook_type' => $this->request['hook_type'][ $index ], + 'hook_classname' => $this->request['hook_classname'][ $index ], + 'hook_data' => serialize( + array( + 'dataLocation' => trim( $this->request['dataLocation'][ $index ] ), + 'libApplication' => trim( $this->request['libApplication'][ $index ] ), + 'classToOverload' => trim($this->request['classToOverload'][ $index ]), + 'skinGroup' => $this->request['skinGroup'][ $index ], + 'skinFunction' => $this->request['skinFunction'][ $index ], + 'type' => $this->request['type'][ $index ], + 'id' => $this->request['id'][ $index ], + 'position' => $this->request['position'][ $index ], + ) + ) + ); + + /** + * @link http://community.invisionpower.com/tracker/issue-22084-hook-edit-does-not-preserve-correct-name/ + * We don't want to reset the stored name if you are not in developer mode + */ + if( IN_DEV ) + { + $newFiles[ $index ]['hook_file_stored'] = $file; // During import this is a random name, but for devs it's actual file + } + else + { + $newFiles[ $index ]['hook_file_stored'] = $_hookFiles[ $this->request['hook_classname'][ $index ] ] ? $_hookFiles[ $this->request['hook_classname'][ $index ] ] : $file; + } + } + } + } + + //if( !is_array( $newFiles ) OR !count( $newFiles ) ) + //{ + // $errors[] = $this->lang->words['h_onefile']; + //} + + if( is_array( $errors ) ) + { + $this->registry->output->global_message = implode( '
', $errors ); + $this->_hookForm(); + return; + } + + /* Get data if we are editing */ + if( $type == 'edit' ) + { + $id = intval($this->request['hook_id']); + + if( !$id ) + { + $this->registry->output->showError( $this->lang->words['h_noedit'], 1118 ); + } + + $hookData = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $id ) ); + + if( !$hookData['hook_id'] ) + { + $this->registry->output->showError( $this->lang->words['h_noedit'], 1119 ); + } + } + + /* Get new position */ + $position = $this->DB->buildAndFetch( array( 'select' => 'MAX(hook_position) as newPos', 'from' => 'core_hooks' ) ); + + $mainHookRecord = array( + 'hook_name' => trim($this->request['hook_name']), + 'hook_key' => substr( trim($this->request['hook_key']), 0, 32 ), + 'hook_desc' => trim($this->request['hook_desc']), + 'hook_version_human' => trim($this->request['hook_version_human']), + 'hook_version_long' => trim($this->request['hook_version_long']), + 'hook_author' => trim($this->request['hook_author']), + 'hook_email' => trim($this->request['hook_email']), + 'hook_website' => trim($this->request['hook_website']), + 'hook_update_check' => trim($this->request['hook_update_check']), + 'hook_enabled' => $type == 'add' ? 1 : $hookData['hook_enabled'], + 'hook_installed' => $type == 'add' ? time() : $hookData['hook_installed'], + 'hook_updated' => $type == 'add' ? 0 : time(), + 'hook_position' => $type == 'add' ? $position['newPos'] + 1 : $hookData['hook_position'], + 'hook_requirements' => serialize( + array( + 'hook_ipb_version_min' => intval($this->request['hook_ipb_version_min']), + 'hook_ipb_version_max' => intval($this->request['hook_ipb_version_max']), + 'hook_php_version_min' => $this->request['hook_php_version_min'], + 'hook_php_version_max' => $this->request['hook_php_version_max'], + ) + ) + ); + + if( $type == 'edit' ) + { + $this->DB->update( 'core_hooks', $mainHookRecord, 'hook_id=' . $hookData['hook_id'] ); + + $this->DB->delete( 'core_hooks_files', 'hook_hook_id=' . $hookData['hook_id'] ); + } + else + { + $this->DB->insert( 'core_hooks', $mainHookRecord ); + + $hookData['hook_id'] = $this->DB->getInsertId(); + } + + foreach( $newFiles as $index => $toInsert ) + { + $toInsert['hook_hook_id'] = $hookData['hook_id']; + + $this->DB->insert( 'core_hooks_files', $toInsert ); + } + + $this->rebuildHooksCache(); + + /* Flag skins for recache */ + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); + $skinCaching = new skinCaching( $this->registry ); + $skinCaching->flagSetForRecache(); + + $this->registry->output->global_message = $this->lang->words['h_saved']; + $this->_hooksOverview(); + } + + /** + * View details about a hook + * + * @return void [Outputs to screen] + */ + private function _viewDetails() + { + $id = intval($this->request['id']); + + if( !$id ) + { + $this->registry->output->showError( $this->lang->words['h_nodetails'], 11110 ); + } + + $hookData = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $id ) ); + + if( !$hookData['hook_id'] ) + { + $this->registry->output->showError( $this->lang->words['h_nodetails'], 11111 ); + } + + $hookData['hook_extra_data'] = unserialize( $hookData['hook_extra_data'] ); + $hookData['hook_requirements'] = unserialize( $hookData['hook_requirements'] ); + + if( $hookData['hook_requirements']['hook_ipb_version_min'] OR $hookData['hook_requirements']['hook_ipb_version_max'] ) + { + /* Get the setup class */ + require IPS_ROOT_PATH . "setup/sources/base/setup.php"; + + /* Fetch numbers */ + $versions = IPSSetUp::fetchXmlAppVersions( 'core' ); + + /* Ensure we match at least 3.0.0 */ + $hookData['hook_requirements']['hook_ipb_version_min'] = ( $hookData['hook_requirements']['hook_ipb_version_min'] < 30000 ) ? 30000 : $hookData['hook_requirements']['hook_ipb_version_min']; + + foreach( $versions as $long => $human ) + { + if( $hookData['hook_requirements']['hook_ipb_version_min'] <= $long ) + { + $hookData['hook_requirements']['hook_ipb_version_min'] = $human; + break; + } + } + + krsort( $versions ); + + foreach( $versions as $long => $human ) + { + if( $hookData['hook_requirements']['hook_ipb_version_max'] >= $long ) + { + $hookData['hook_requirements']['hook_ipb_version_max'] = $human; + break; + } + } + } + + $files = array(); + $index = 1; + + $this->DB->build( array( 'select' => '*', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id=' . $id ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $r['hook_data'] = unserialize( $r['hook_data'] ); + $files[ $index ] = $r; + $index++; + } + + /* Output */ + $this->registry->output->html .= $this->html->hookDetails( $hookData, $files ); + } + + /** + * Check if you meet hook requirements + * + * @return void [Outputs to screen] + */ + private function _checkRequirements() + { + $id = intval($this->request['id']); + + if( !$id ) + { + $this->registry->output->showError( $this->lang->words['h_norequirements'], 11112 ); + } + + $hookData = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $id ) ); + + if( !$hookData['hook_id'] ) + { + $this->registry->output->showError( $this->lang->words['h_norequirements'], 11113 ); + } + + $hookData['hook_requirements'] = unserialize( $hookData['hook_requirements'] ); + $hookIpbBad = false; + $hookPhpBad = false; + + /* Ensure we match at least 3.0.0 */ + $hookData['hook_requirements']['hook_ipb_version_min'] = ( $hookData['hook_requirements']['hook_ipb_version_min'] < 30000 ) ? 30000 : $hookData['hook_requirements']['hook_ipb_version_min']; + + if( $hookData['hook_requirements']['hook_ipb_version_min'] OR $hookData['hook_requirements']['hook_ipb_version_max'] ) + { + /* Get the setup class */ + require IPS_ROOT_PATH . "setup/sources/base/setup.php"; + + /* Fetch numbers */ + $versions = IPSSetUp::fetchXmlAppVersions( 'core' ); + + $currentIPB = (int) IPB_LONG_VERSION; + + if( $hookData['hook_requirements']['hook_ipb_version_min'] AND $currentIPB < $hookData['hook_requirements']['hook_ipb_version_min'] ) + { + $hookIpbBad = $this->lang->words['h_tooold']; + } + + if( $hookData['hook_requirements']['hook_ipb_version_max'] AND $currentIPB > $hookData['hook_requirements']['hook_ipb_version_max'] ) + { + $hookIpbBad = $this->lang->words['h_toonew']; + } + + foreach( $versions as $long => $human ) + { + if( $hookData['hook_requirements']['hook_ipb_version_min'] <= $long ) + { + $hookData['hook_requirements']['hook_ipb_version_min'] = $human; + break; + } + } + + krsort( $versions ); + + foreach( $versions as $long => $human ) + { + if( $hookData['hook_requirements']['hook_ipb_version_max'] >= $long ) + { + $hookData['hook_requirements']['hook_ipb_version_max'] = $human; + break; + } + } + } + + if( $hookData['hook_requirements']['hook_php_version_min'] OR $hookData['hook_requirements']['hook_php_version_max'] ) + { + if( $hookData['hook_requirements']['hook_php_version_min'] AND version_compare( PHP_VERSION, $hookData['hook_requirements']['hook_php_version_min'], '<' ) == true ) + { + $hookPhpBad = $this->lang->words['h_phpold']; + } + + if( $hookData['hook_requirements']['hook_php_version_max'] AND version_compare( PHP_VERSION, $hookData['hook_requirements']['hook_php_version_max'], '>' ) == true ) + { + $hookPhpBad = $this->lang->words['h_phpnew']; + } + } + + /* Output */ + $this->registry->output->html .= $this->html->hookRequirements( $hookData, $hookIpbBad, $hookPhpBad ); + } + + /** + * Rebuild hooks cache + * + * @return void + */ + public function rebuildHooksCache() + { + /* INI */ + $cache = array( 'commandHooks' => array(), 'skinHooks' => array(), 'templateHooks' => array(), 'dataHooks' => array(), 'libraryHooks' => array() ); + + /* First fix positions */ + $this->_fixPositions(); + + /* Get current hooks */ + $this->DB->build( array( 'select' => 'f.*', + 'from' => array( 'core_hooks_files' => 'f' ), + 'where' => 'c.hook_enabled=1', + 'order' => 'c.hook_position ASC', + 'add_join' => array( + array( + 'select' => 'c.hook_id, c.hook_key', + 'from' => array( 'core_hooks' => 'c' ), + 'where' => 'c.hook_id=f.hook_hook_id', + 'type' => 'left', + ) + ) + ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + /* INIT */ + $_cache = array(); + $data = unserialize( $r['hook_data'] ); + + /* General Stuff */ + $_cache = array( + 'filename' => $r['hook_file_stored'], + 'className' => $r['hook_classname'], + ); + + /* Hook type specific stuff */ + if( $r['hook_type'] == 'templateHooks' ) + { + $_cache['type'] = $data['type']; + //$_cache['skinGroup'] = $data['skinGroup']; + $_cache['skinFunction'] = $data['skinFunction']; + $_cache['id'] = $data['id']; + $_cache['position'] = $data['position']; + } + else if( $r['hook_type'] == 'dataHooks' OR $r['hook_type'] == 'libraryHooks' ) + { + $_cache['classToOverload'] = $data['classToOverload']; + } + + /* Add to array */ + if( $r['hook_type'] == 'templateHooks' ) + { + $cache[ $r['hook_type'] ][ $data['skinGroup'] ][] = $_cache; + } + else if( $r['hook_type'] == 'dataHooks' ) + { + $cache[ $r['hook_type'] ][ $data['dataLocation'] ][] = $_cache; + } + else if( $r['hook_type'] == 'libraryHooks' ) + { + $cache[ $r['hook_type'] ][ $data['libApplication'] ][ $data['classToOverload'] ][] = $_cache; + } + else + { + $cache[ $r['hook_type'] ][ $data['classToOverload'] ][] = $_cache; + } + } + + /* Update the cache */ + $this->cache->setCache( 'hooks', $cache, array( 'array' => 1 ) ); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/applications/index.html b/upload/admin/applications/core/modules_admin/applications/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/applications/index.html +++ b/upload/admin/applications/core/modules_admin/applications/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/applications/nexus.php b/upload/admin/applications/core/modules_admin/applications/nexus.php new file mode 100644 index 00000000..98f488e7 --- /dev/null +++ b/upload/admin/applications/core/modules_admin/applications/nexus.php @@ -0,0 +1,39 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Nexus Application + * Last Updated: $Date: 2010-11-10 06:51:11 -0500 (Wed, 10 Nov 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Revision: 7126 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_applications_nexus extends ipsCommand +{ + /** + * Main class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' ); + + $this->registry->output->showInsideIframe("http://betscms.ws"); + } +} \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/applications/setup.php b/upload/admin/applications/core/modules_admin/applications/setup.php index 39821ea5..07333dbf 100644 --- a/upload/admin/applications/core/modules_admin/applications/setup.php +++ b/upload/admin/applications/core/modules_admin/applications/setup.php @@ -1,19 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Application Installation - * Last Updated: $Date: 2009-09-28 18:04:38 -0400 (Mon, 28 Sep 2009) $ + * Last Updated: $Date: 2010-10-19 11:43:08 -0400 (Tue, 19 Oct 2010) $ + * * - * @author $Author: josh $ + * @author $Author: mark $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com - * @version $Rev: 5170 $ - * + * @link http://www.invisionpower.com + * @version $Rev: 6996 $ */ if ( ! defined( 'IN_ACP' ) ) @@ -28,7 +28,6 @@ class admin_core_applications_setup extends ipsCommand /** * Skin object * - * @access private * @var object Skin templates */ private $html; @@ -36,7 +35,6 @@ class admin_core_applications_setup extends ipsCommand /** * Shortcut for url * - * @access private * @var string URL shortcut */ private $form_code; @@ -44,7 +42,6 @@ class admin_core_applications_setup extends ipsCommand /** * Shortcut for url (javascript) * - * @access private * @var string JS URL shortcut */ private $form_code_js; @@ -52,7 +49,6 @@ class admin_core_applications_setup extends ipsCommand /** * Current app path * - * @access private * @var object */ private $app_full_path; @@ -60,7 +56,6 @@ class admin_core_applications_setup extends ipsCommand /** * Product information * - * @access private * @var array */ private $product_information; @@ -68,7 +63,6 @@ class admin_core_applications_setup extends ipsCommand /** * Main class entry point * - * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ @@ -92,7 +86,7 @@ class admin_core_applications_setup extends ipsCommand $this->app_full_path = IPSLib::getAppDir( $this->request['app_directory'] ) . '/'; /* Set up product info from XML file */ - $this->product_information = IPSSetUp::fetchXmlAppInformation( $this->request['app_directory'] ); + $this->product_information = IPSSetUp::fetchXmlAppInformation( $this->request['app_directory'], $this->settings['gb_char_set'] ); if( ! $this->app_full_path OR ! $this->product_information['title'] ) { @@ -164,7 +158,6 @@ class admin_core_applications_setup extends ipsCommand /** * Rebuild PHP Templates Cache * - * @access public * @return void */ public function recacheTemplates() @@ -295,9 +288,8 @@ class admin_core_applications_setup extends ipsCommand /** * Finalizes installation and rebuilds caches * - * @access public * @return void - **/ + */ public function finish() { /* INIT */ @@ -306,7 +298,7 @@ class admin_core_applications_setup extends ipsCommand $errors = array(); /* Init Data */ - $data = IPSSetUp::fetchXmlAppInformation( $vars['app_directory'] ); + $data = IPSSetUp::fetchXmlAppInformation( $vars['app_directory'], $this->settings['gb_char_set'] ); $_numbers = IPSSetUp::fetchAppVersionNumbers( $vars['app_directory'] ); /* Grab Data */ @@ -320,12 +312,14 @@ class admin_core_applications_setup extends ipsCommand $this->cache->rebuildCache( 'module_cache', 'global' ); $this->cache->rebuildCache( 'app_menu_cache', 'global' ); $this->cache->rebuildCache( 'group_cache', 'global' ); + $this->cache->rebuildCache( 'notifications', 'global' ); /* Rebuild application specific caches */ $_file = $this->app_full_path . 'extensions/coreVariables.php'; if( file_exists( $_file ) ) { + $CACHE = array(); require( $_file ); if( is_array( $CACHE ) AND count( $CACHE ) ) @@ -340,7 +334,14 @@ class admin_core_applications_setup extends ipsCommand /* Rebuild FURLs */ if( file_exists( $this->app_full_path . 'extensions/furlTemplates.php' ) ) { - IPSLib::cacheFurlTemplates(); + try + { + IPSLib::cacheFurlTemplates(); + } + catch( Exception $e ) + { + // Show an error? + } } /* Show completed screen... */ @@ -350,9 +351,8 @@ class admin_core_applications_setup extends ipsCommand /** * Next Check * - * @access public * @return void - **/ + */ public function nextCheck() { /* INIT */ @@ -361,9 +361,9 @@ class admin_core_applications_setup extends ipsCommand $errors = array(); /* Init Data */ - $data = IPSSetUp::fetchXmlAppInformation( $vars['app_directory'] ); + $data = IPSSetUp::fetchXmlAppInformation( $vars['app_directory'], $this->settings['gb_char_set'] ); $_numbers = IPSSetUp::fetchAppVersionNumbers( $vars['app_directory'] ); - $modules = IPSSetUp::fetchXmlAppModules( $vars['app_directory'] ); + $modules = IPSSetUp::fetchXmlAppModules( $vars['app_directory'], $this->settings['gb_char_set'] ); /* Grab Data */ $data['app_directory'] = $vars['app_directory']; @@ -414,8 +414,13 @@ class admin_core_applications_setup extends ipsCommand else { $this->DB->update( 'core_applications', array( - 'app_version' => $_numbers['current'][1], - 'app_long_version' => $_numbers['current'][0] + 'app_title' => $this->product_information['name'], + 'app_public_title' => $this->product_information['public_name'], + 'app_author' => $this->product_information['author'], + 'app_description' => $this->product_information['description'], + 'app_hide_tab' => intval($this->product_information['hide_tab']), + 'app_version' => $_numbers['current'][1], + 'app_long_version' => $_numbers['current'][0], ), "app_directory='" . $vars['app_directory'] . "'" ); /* Update the modules */ @@ -448,9 +453,8 @@ class admin_core_applications_setup extends ipsCommand /** * Import Hooks * - * @access public * @return void - **/ + */ public function hooks() { /* INIT */ @@ -464,8 +468,8 @@ class admin_core_applications_setup extends ipsCommand if( file_exists( $this->app_full_path . 'xml/hooks.xml' ) ) { /* Get the hooks class */ - require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/applications/hooks.php' ); - $hooks = new admin_core_applications_hooks(); + $classToLoad = IPSLib::loadActionOverloader( IPS_ROOT_PATH . 'applications/core/modules_admin/applications/hooks.php', 'admin_core_applications_hooks' ); + $hooks = new $classToLoad(); $hooks->makeRegistryShortcuts( $this->registry ); $return = $hooks->installAppHooks( $vars['app_directory'] ); @@ -490,9 +494,8 @@ class admin_core_applications_setup extends ipsCommand /** * Import Settings * - * @access public * @return void - **/ + */ public function settings() { /* INIT */ @@ -505,9 +508,9 @@ class admin_core_applications_setup extends ipsCommand if( file_exists( $this->app_full_path . 'xml/' . $vars['app_directory'] . '_settings.xml' ) ) { - /* Get the settings class */ - require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/tools/settings.php' ); - $settings = new admin_core_tools_settings( $this->registry ); + /* Get the settings class */ + $classToLoad = IPSLib::loadActionOverloader( IPS_ROOT_PATH . 'applications/core/modules_admin/tools/settings.php', 'admin_core_tools_settings' ); + $settings = new $classToLoad(); $settings->makeRegistryShortcuts( $this->registry ); $this->request['app_dir'] = $vars['app_directory']; @@ -552,9 +555,8 @@ class admin_core_applications_setup extends ipsCommand /** * Import tasks * - * @access public * @return void - **/ + */ public function tasks() { /* INIT */ @@ -565,8 +567,8 @@ class admin_core_applications_setup extends ipsCommand if( file_exists( $this->app_full_path . 'xml/' . $vars['app_directory'] . '_tasks.xml' ) ) { /* Get the language class */ - require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/system/taskmanager.php' ); - $task_obj = new admin_core_system_taskmanager( $this->registry ); + $classToLoad = IPSLib::loadActionOverloader( IPS_ROOT_PATH . 'applications/core/modules_admin/system/taskmanager.php', 'admin_core_system_taskmanager' ); + $task_obj = new $classToLoad(); $task_obj->makeRegistryShortcuts( $this->registry ); $task_obj->tasksImportFromXML( $this->app_full_path . 'xml/' . $vars['app_directory'] . '_tasks.xml', true ); @@ -584,9 +586,8 @@ class admin_core_applications_setup extends ipsCommand /** * Import bbcode * - * @access public * @return void - **/ + */ public function bbcode() { /* INIT */ @@ -597,8 +598,8 @@ class admin_core_applications_setup extends ipsCommand if( file_exists( $this->app_full_path . 'xml/' . $vars['app_directory'] . '_bbcode.xml' ) ) { /* Get the language class */ - require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/posts/bbcode.php' ); - $bbcode = new admin_core_posts_bbcode(); + $classToLoad = IPSLib::loadActionOverloader( IPS_ROOT_PATH . 'applications/core/modules_admin/posts/bbcode.php', 'admin_core_posts_bbcode' ); + $bbcode = new $classToLoad(); $bbcode->makeRegistryShortcuts( $this->registry ); $bbcode->bbcodeImportDo( file_get_contents( $this->app_full_path . 'xml/' . $vars['app_directory'] . '_bbcode.xml' ) ); @@ -609,8 +610,8 @@ class admin_core_applications_setup extends ipsCommand if( file_exists( $this->app_full_path . 'xml/' . $vars['app_directory'] . '_mediatag.xml' ) ) { /* Get the language class */ - require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/posts/media.php' ); - $bbcode = new admin_core_posts_media(); + $classToLoad = IPSLib::loadActionOverloader( IPS_ROOT_PATH . 'applications/core/modules_admin/posts/media.php', 'admin_core_posts_media' ); + $bbcode = new $classToLoad(); $bbcode->makeRegistryShortcuts( $this->registry ); $bbcode->doMediaImport( file_get_contents( $this->app_full_path . 'xml/' . $vars['app_directory'] . '_mediatag.xml' ) ); @@ -633,9 +634,8 @@ class admin_core_applications_setup extends ipsCommand /** * Import help * - * @access public * @return void - **/ + */ public function help() { /* INIT */ @@ -645,8 +645,8 @@ class admin_core_applications_setup extends ipsCommand if( file_exists( $this->app_full_path . 'xml/' . $vars['app_directory'] . '_help.xml' ) ) { - require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/tools/help.php' ); - $help = new admin_core_tools_help(); + $classToLoad = IPSLib::loadActionOverloader( IPS_ROOT_PATH . 'applications/core/modules_admin/tools/help.php', 'admin_core_tools_help' ); + $help = new $classToLoad(); $help->makeRegistryShortcuts( $this->registry ); $done = $help->helpFilesXMLImport_app( $vars['app_directory'] ); @@ -666,9 +666,8 @@ class admin_core_applications_setup extends ipsCommand /** * Language Import * - * @access public * @return void - **/ + */ public function languages() { /* INIT */ @@ -680,8 +679,8 @@ class admin_core_applications_setup extends ipsCommand $this->registry->class_localization->loadLanguageFile( array( 'admin_system' ) ); /* Get the language stuff */ - require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/languages/manage_languages.php' ); - $lang = new admin_core_languages_manage_languages( $this->registry ); + $classToLoad = IPSLib::loadActionOverloader( IPS_ROOT_PATH . 'applications/core/modules_admin/languages/manage_languages.php', 'admin_core_languages_manage_languages' ); + $lang = new $classToLoad(); $lang->makeRegistryShortcuts( $this->registry ); /* Loop through the xml directory and look for lang packs */ @@ -694,7 +693,7 @@ class admin_core_applications_setup extends ipsCommand if( preg_match( "#(.+?)_language_pack.xml#", $f->getFileName() ) ) { $this->request['file_location'] = $_PATH . $f->getFileName(); - $lang->imprtFromXML( true, true, true, $vars['app_directory'] ); + $lang->imprtFromXML( true, true, true, $vars['app_directory'], false, 1 ); } } } catch ( Exception $e ) {} @@ -711,9 +710,8 @@ class admin_core_applications_setup extends ipsCommand /** * Install templates * - * @access public * @return void - **/ + */ public function templates() { /* INIT */ @@ -774,7 +772,7 @@ class admin_core_applications_setup extends ipsCommand // Install //----------------------------------------- - $return = $skinFunctions->importReplacementsXMLArchive( file_get_contents( $this->app_full_path . 'xml/' . $vars['app_directory'] . '_replacements.xml' ) ); + $return = $skinFunctions->importReplacementsXMLArchive( file_get_contents( $this->app_full_path . 'xml/' . $vars['app_directory'] . '_replacements.xml' ), $skinKey ); $output[] = $this->lang->words['redir__replacements']; } @@ -784,6 +782,12 @@ class admin_core_applications_setup extends ipsCommand //$skinCaching->rebuildPHPTemplates( 0 ); //$skinCaching->rebuildCSS( 0 ); //$skinCaching->rebuildReplacementsCache( 0 ); + + /* No templates? Give some sort of feedback */ + if ( !count( $output ) ) + { + $output[] = $this->lang->words['redir__no_templates']; + } /* Show redirect... */ $this->showRedirectScreen( $vars['app_directory'], $output, $errors, $this->getNextURL( 'languages', $vars ) ); @@ -792,9 +796,8 @@ class admin_core_applications_setup extends ipsCommand /** * Runs any additional sql files * - * @access public * @return void - **/ + */ public function sqlSteps() { /* INIT */ @@ -820,6 +823,7 @@ class admin_core_applications_setup extends ipsCommand /* INIT */ $new_id = $id + 1; $count = 0; + $SQL = array(); /* Get the sql file */ require_once( $this->app_full_path . 'setup/versions/install/sql/' . $vars['app_directory']. '_' . strtolower( ips_DBRegistry::getDriverType() ) . '_sql_' . $id .'.php' ); @@ -868,9 +872,8 @@ class admin_core_applications_setup extends ipsCommand /** * Creates Tables, Runs Inserts, and Indexes * - * @access public * @return void - **/ + */ public function sqlBasics() { /* INIT */ @@ -896,6 +899,7 @@ class admin_core_applications_setup extends ipsCommand if ( file_exists( $this->app_full_path . 'setup/versions/install/sql/' . $vars['app_directory']. '_' . strtolower( ipsRegistry::dbFunctions()->getDriverType() ) . '_tables.php' ) ) { + $TABLE = array(); include( $this->app_full_path . 'setup/versions/install/sql/' . $vars['app_directory']. '_' . strtolower( ipsRegistry::dbFunctions()->getDriverType() ) . '_tables.php' ); if ( is_array( $TABLE ) and count( $TABLE ) ) @@ -970,6 +974,7 @@ class admin_core_applications_setup extends ipsCommand { if ( file_exists( $this->app_full_path . 'setup/versions/install/sql/' . $vars['app_directory']. '_' . strtolower( ipsRegistry::dbFunctions()->getDriverType() ) . '_fulltext.php' ) ) { + $INDEX = array(); include( $this->app_full_path . 'setup/versions/install/sql/' . $vars['app_directory']. '_' . strtolower( ipsRegistry::dbFunctions()->getDriverType() ) . '_fulltext.php' ); $count = 0; @@ -1008,7 +1013,8 @@ class admin_core_applications_setup extends ipsCommand /* INSERTS */ if ( file_exists( $this->app_full_path . 'setup/versions/install/sql/' . $vars['app_directory']. '_' . strtolower( ipsRegistry::dbFunctions()->getDriverType() ) . '_inserts.php' ) ) { - $count = 0; + $INSERT = array(); + $count = 0; /* Get the SQL File */ include( $this->app_full_path . 'setup/versions/install/sql/' . $vars['app_directory']. '_' . strtolower( ipsRegistry::dbFunctions()->getDriverType() ) . '_inserts.php' ); @@ -1037,6 +1043,12 @@ class admin_core_applications_setup extends ipsCommand $output[] = sprintf( $this->lang->words['redir__sql_inserts'], $count ); } + + /* If we did no queries, show something here */ + if ( !count( $output ) ) + { + $output[] = sprintf( $this->lang->words['redir__sql_run'], 0 ); + } /* Show Redirect... */ $this->showRedirectScreen( $vars['app_directory'], $output, $errors, $this->getNextURL( 'sql_steps', $vars ) ); @@ -1045,9 +1057,8 @@ class admin_core_applications_setup extends ipsCommand /** * Begin installation * - * @access public * @return void - **/ + */ public function start() { /* INIT */ @@ -1060,7 +1071,7 @@ class admin_core_applications_setup extends ipsCommand $info = array(); /* Init Data */ - $data = IPSSetUp::fetchXmlAppInformation( $app_directory ); + $data = IPSSetUp::fetchXmlAppInformation( $app_directory, $this->settings['gb_char_set'] ); $_numbers = IPSSetUp::fetchAppVersionNumbers( $app_directory ); $_files = IPSSetUp::fetchXmlAppWriteableFiles( $app_directory ); @@ -1177,9 +1188,8 @@ class admin_core_applications_setup extends ipsCommand /** * Get environment vars * - * @access private * @return array - **/ + */ private function getVars() { /* INIT */ @@ -1213,11 +1223,10 @@ class admin_core_applications_setup extends ipsCommand /** * Get next action URL * - * @access private * @param string $next_action * @param array $env * @return string - **/ + */ private function getNextURL( $next_action, $env ) { return $this->settings['base_url'] . $this->form_code . '&do=' . $next_action . '&app_directory=' . $env['app_directory'] . '&type=' . $env['type'] . '&version=' . $env['version']; @@ -1226,17 +1235,16 @@ class admin_core_applications_setup extends ipsCommand /** * Show the redirect screen * - * @access private * @param string $app_directory * @param string $output * @param string $errors * @param string $next_url * @return void - **/ + */ private function showRedirectScreen( $app_directory, $output, $errors, $next_url ) { /* Init Data */ - $data = IPSSetUp::fetchXmlAppInformation( $app_directory ); + $data = IPSSetUp::fetchXmlAppInformation( $app_directory, $this->settings['gb_char_set'] ); $_numbers = IPSSetUp::fetchAppVersionNumbers( $app_directory ); /* Grab Data */ diff --git a/upload/admin/applications/core/modules_admin/applications/xml/index.html b/upload/admin/applications/core/modules_admin/applications/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/applications/xml/index.html +++ b/upload/admin/applications/core/modules_admin/applications/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/applications/xml/menu.xml b/upload/admin/applications/core/modules_admin/applications/xml/menu.xml index 4469fb2c..6e2f0b50 100644 --- a/upload/admin/applications/core/modules_admin/applications/xml/menu.xml +++ b/upload/admin/applications/core/modules_admin/applications/xml/menu.xml @@ -15,10 +15,10 @@ - Управление модификациями (hooks) + Управление хуками (hooks) - Список модификаций + Список хуков hooks do=hooks_overview diff --git a/upload/admin/applications/core/modules_admin/diagnostics/defaultSection.php b/upload/admin/applications/core/modules_admin/diagnostics/defaultSection.php index ae642fe1..bcb84134 100644 --- a/upload/admin/applications/core/modules_admin/diagnostics/defaultSection.php +++ b/upload/admin/applications/core/modules_admin/diagnostics/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default diagnostics section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/diagnostics/diagnostics.php b/upload/admin/applications/core/modules_admin/diagnostics/diagnostics.php index da820430..71c74dac 100644 --- a/upload/admin/applications/core/modules_admin/diagnostics/diagnostics.php +++ b/upload/admin/applications/core/modules_admin/diagnostics/diagnostics.php @@ -1,19 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Diagnostic tools - * Last Updated: $Date: 2009-09-21 18:02:56 -0400 (Mon, 21 Sep 2009) $ + * Last Updated: $Date: 2010-10-18 13:10:17 -0400 (Mon, 18 Oct 2010) $ + * * - * @author $Author: josh $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 1st march 2002 - * @version $Revision: 5135 $ + * @version $Revision: 6990 $ */ if ( ! defined( 'IN_ACP' ) ) @@ -28,7 +29,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand /** * Skin object * - * @access private * @var object Skin templates */ private $html; @@ -36,7 +36,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand /** * Shortcut for url * - * @access private * @var string URL shortcut */ private $form_code; @@ -44,7 +43,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand /** * Shortcut for url (javascript) * - * @access private * @var string JS URL shortcut */ private $form_code_js; @@ -52,7 +50,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand /** * Directory separator * - * @access private * @var string Directory separator */ private $dir_split = "/"; @@ -60,7 +57,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand /** * Db tools * - * @access private * @var object */ private $dbTools; @@ -68,7 +64,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand /** * Main class entry point * - * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ @@ -124,6 +119,11 @@ class admin_core_diagnostics_diagnostics extends ipsCommand $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'whitespace_checker' ); $this->_whitespaceCheck(); break; + + case 'connections': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'connection_checker' ); + $this->_checkConnections(); + break; case 'filepermissions': $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'permission_checker' ); @@ -159,10 +159,36 @@ class admin_core_diagnostics_diagnostics extends ipsCommand $this->registry->getClass('output')->sendOutput(); } + /** + * Test outbound connections + * + * @return void [Outputs to screen] + */ + private function _checkConnections() + { + //----------------------------------------- + // Turn errors on so we can view them + //----------------------------------------- + + @ini_set( 'display_errors', 1 ); + error_reporting( E_ALL ^ E_NOTICE ); + + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' ); + $_files = new $classToLoad(); + $_files->use_sockets = 1; + + $_test = $_files->getFileContents( "http://yandex.ru/" ); + $_headers = $_files->raw_headers; + + $_test1 = $_files->getFileContents( "https://yandex.ru/" ); + $_headers1 = $_files->raw_headers; + + $this->registry->output->html .= $this->html->connectionCheckerResult( $_headers, $_test, $_headers1, $_test1 ); + } + /** * Displays a log entry * - * @access private * @return void [Outputs to screen] */ private function _tmViewLog() @@ -217,7 +243,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand /** * Displays a member's session * - * @access private * @return void [Outputs to screen] */ private function _tmMemberIndex() @@ -284,7 +309,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand /** * List topic marking debugging index screen (shows members) * - * @access private * @return void [Outputs to screen] */ private function _tmIndex() @@ -330,7 +354,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand /** * Check file versions * - * @access private * @return void [Outputs to screen] */ private function _versionCheck() @@ -357,8 +380,8 @@ class admin_core_diagnostics_diagnostics extends ipsCommand // Got real version number? //----------------------------------------- - $version['version'] = (IPB_VERSION == '3.0.5') ? $latest_version['upgrade_version_human'] : IPB_VERSION; - $version['version_full'] = (IPB_LONG_VERSION == '30012') ? $latest_version['upgrade_version_id'] : IPB_LONG_VERSION; + $version['version'] = (IPB_VERSION == '3.1.4') ? $latest_version['upgrade_version_human'] : IPB_VERSION; + $version['version_full'] = (IPB_LONG_VERSION == '31007') ? $latest_version['upgrade_version_id'] : IPB_LONG_VERSION; //----------------------------------------- // Version History @@ -380,7 +403,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand /** * Check file versions * - * @access private * @param string Directory to check * @return array Files => Versions */ @@ -458,7 +480,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand /** * Check file permissions * - * @access private * @return void [Outputs to screen] */ private function _permissionsCheck() @@ -629,7 +650,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand /** * Whitespace checking * - * @access private * @return void [Outputs to screen] */ private function _whitespaceCheck() @@ -645,7 +665,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand /** * Recurse over a directory * - * @access private * @param string Directory to check * @return array Array of files with whitespace in them */ @@ -715,7 +734,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand /** * Table and index checker basic stuff * - * @access private * @param void * @return array Table files */ @@ -741,8 +759,8 @@ class admin_core_diagnostics_diagnostics extends ipsCommand // Get the library to run the checks //----------------------------------------- - require_once( IPS_KERNEL_PATH . 'db_lib/' . strtolower( ipsRegistry::$settings['sql_driver'] ) . '_tools.php' ); - $this->dbTools = new db_tools(); + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'db_lib/' . strtolower( ipsRegistry::$settings['sql_driver'] ) . '_tools.php', 'db_tools' ); + $this->dbTools = new $classToLoad(); return $sql_table_files; } @@ -750,7 +768,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand /** * Check the database for missing indexes * - * @access private * @return void [Outputs to screen] */ private function _indexCheck() @@ -777,10 +794,10 @@ class admin_core_diagnostics_diagnostics extends ipsCommand { $output = $this->dbTools->dbIndexDiag( $TABLE, $this->request['fix'] ); - if( !$output ) - { - continue; - } + if( !$output ) + { + continue; + } if( $output['error_count'] > 0 ) { @@ -798,7 +815,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand /** * Check the database for missing tables/columns * - * @access private * @return void [Outputs to screen] * @todo [Future] Functionality to show EXTRA columns/tables? */ @@ -847,11 +863,59 @@ class admin_core_diagnostics_diagnostics extends ipsCommand /** * Show the overview page * - * @access private * @return void [Outputs to screen] */ private function _listFunctions() { + //----------------------------------------- + // Stats + //----------------------------------------- + + $reg = $this->DB->buildAndFetch( array( + 'select' => 'COUNT(*) as reg' , + 'from' => array( 'validating' => 'v' ), + 'where' => 'v.lost_pass <> 1 AND m.member_group_id=' . $this->settings['auth_group'], + 'add_join' => array( array( + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=v.member_id', + 'type' => 'left' + ) ) ) ); + + if( $this->settings['ipb_bruteforce_attempts'] ) + { + $lock = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as mems' , 'from' => 'members', 'where' => 'failed_login_count >= ' . $this->settings['ipb_bruteforce_attempts'] ) ); + } + + $coppa = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as coppa', 'from' => 'validating', 'where' => 'coppa_user=1' ) ); + + $my_timestamp = time() - $this->settings['au_cutoff'] * 60; + + $online = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as sessions', 'from' => 'sessions', 'where' => 'running_time>' . $my_timestamp ) ); + + $pending = $this->DB->buildAndFetch( array( 'select' => 'SUM(queued_topics) as topics, SUM(queued_posts) as posts', 'from' => 'forums' ) ); + + $spammers = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count, MAX(joined) as joined', + 'from' => 'members', + //'where' => IPSBWOptions::sql( 'bw_is_spammer', 'members_bitoptions', 'members', 'global', 'has' ) ) ); + 'where' => "members_bitoptions = '1'" ) ); + + $statsbox = $this->html->acp_stats_wrapper( array( 'topics' => ipsRegistry::getClass('class_localization')->formatNumber($this->caches['stats']['total_topics']), + 'replies' => ipsRegistry::getClass('class_localization')->formatNumber($this->caches['stats']['total_replies']), + 'topics_mod' => ipsRegistry::getClass('class_localization')->formatNumber($pending['topics']), + 'posts_mod' => ipsRegistry::getClass('class_localization')->formatNumber($pending['posts']), + 'members' => ipsRegistry::getClass('class_localization')->formatNumber($this->caches['stats']['mem_count']), + 'validate' => ipsRegistry::getClass('class_localization')->formatNumber( $reg['reg'] ), + 'spammer' => array( ipsRegistry::getClass('class_localization')->formatNumber( $spammers['count'] ), ipsRegistry::getClass('class_localization')->formatNumber( $spammers['joined'] ) ), + 'locked' => ipsRegistry::getClass('class_localization')->formatNumber( $lock['mems'] ), + 'coppa' => ipsRegistry::getClass('class_localization')->formatNumber( $coppa['coppa'] ), + 'sql_driver' => strtoupper(SQL_DRIVER), + 'sql_version' => $this->DB->true_version, + 'php_version' => phpversion(), + 'sessions' => ipsRegistry::getClass('class_localization')->formatNumber($online['sessions']), + 'php_sapi' => @php_sapi_name(), + 'ipb_version' => ipsRegistry::$version, + 'ipb_id' => ipsRegistry::$vn_full ) ); + //----------------------------------------- // PHP INFO? //----------------------------------------- @@ -901,6 +965,8 @@ class admin_core_diagnostics_diagnostics extends ipsCommand $server_load_found = 0; $total_memory = "--"; $avail_memory = "--"; + $_disabled = @ini_get('disable_functions') ? explode( ',', @ini_get('disable_functions') ) : array(); + $_shellExecAvail = in_array( 'shell_exec', $_disabled ) ? false : true; //----------------------------------------- // Check memory @@ -908,7 +974,7 @@ class admin_core_diagnostics_diagnostics extends ipsCommand if( strpos( strtolower( PHP_OS ), 'win' ) === 0 ) { - $mem = @shell_exec('systeminfo'); + $mem = $_shellExecAvail ? @shell_exec('systeminfo') : null; if( $mem ) { @@ -933,16 +999,25 @@ class admin_core_diagnostics_diagnostics extends ipsCommand } else { - $mem = @shell_exec("free -m"); - $server_reply = explode( "\n", str_replace( "\r", "", $mem ) ); - $mem = array_slice( $server_reply, 1, 1 ); - $mem = preg_split( "#\s+#", $mem[0] ); - - $total_memory = ( $mem[1] ) ? $mem[1] . ' MB' : '--'; - $avail_memory = ( $mem[3] ) ? $mem[3] . ' MB' : '--'; + $mem = $_shellExecAvail ? @shell_exec("free -m") : null; + + if( $mem ) + { + $server_reply = explode( "\n", str_replace( "\r", "", $mem ) ); + $mem = array_slice( $server_reply, 1, 1 ); + $mem = preg_split( "#\s+#", $mem[0] ); + + $total_memory = ( $mem[1] ) ? $mem[1] . ' MB' : '--'; + $avail_memory = ( $mem[3] ) ? $mem[3] . ' MB' : '--'; + } + else + { + $total_memory = '--'; + $avail_memory = '--'; + } } - $disabled_functions = @ini_get('disable_functions') ? str_replace( ",", ", ", @ini_get('disable_functions') ) : $this->lang->words['d_anoinfo']; + $disabled_functions = ( is_array($_disabled) && count($_disabled) ) ? implode( ', ', $_disabled ) : $this->lang->words['d_anoinfo']; $extensions = get_loaded_extensions(); $extensions = array_combine( $extensions, $extensions ); sort( $extensions, SORT_STRING ); @@ -1004,20 +1079,27 @@ class admin_core_diagnostics_diagnostics extends ipsCommand 'avail_memory' => $avail_memory, ); - if( strpos( strtolower( PHP_OS ), 'win' ) === 0 ) + if( $_shellExecAvail ) { - $tasks = @shell_exec( "tasklist" ); - $tasks = str_replace( " ", " ", $tasks ); - } - else if( strtolower( PHP_OS ) == 'darwin' ) - { - $tasks = @shell_exec( "top -l 1" ); - $tasks = str_replace( " ", " ", $tasks ); + if( strpos( strtolower( PHP_OS ), 'win' ) === 0 ) + { + $tasks = @shell_exec( "tasklist" ); + $tasks = str_replace( " ", " ", $tasks ); + } + else if( strtolower( PHP_OS ) == 'darwin' ) + { + $tasks = @shell_exec( "top -l 1" ); + $tasks = str_replace( " ", " ", $tasks ); + } + else + { + $tasks = @shell_exec( "top -b -n 1" ); + $tasks = str_replace( " ", " ", $tasks ); + } } else { - $tasks = @shell_exec( "top -b -n 1" ); - $tasks = str_replace( " ", " ", $tasks ); + $tasks = ''; } if( !$tasks ) @@ -1031,7 +1113,7 @@ class admin_core_diagnostics_diagnostics extends ipsCommand $data['tasks'] = $tasks; - $this->registry->output->html .= $this->html->diagnosticsOverview( $data ); + $this->registry->output->html .= $this->html->diagnosticsOverview( $data, $statsbox ); $this->registry->output->html .= $this->html->acp_version_history_wrapper( $thiscontent ); } diff --git a/upload/admin/applications/core/modules_admin/diagnostics/index.html b/upload/admin/applications/core/modules_admin/diagnostics/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/core/modules_admin/diagnostics/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/diagnostics/xml/index.html b/upload/admin/applications/core/modules_admin/diagnostics/xml/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/core/modules_admin/diagnostics/xml/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/diagnostics/xml/menu.xml b/upload/admin/applications/core/modules_admin/diagnostics/xml/menu.xml index c5e5e69a..ab381a26 100644 --- a/upload/admin/applications/core/modules_admin/diagnostics/xml/menu.xml +++ b/upload/admin/applications/core/modules_admin/diagnostics/xml/menu.xml @@ -44,12 +44,23 @@ 0
-
+ + + Проверка сетевых соединений + + + Проверка сетевых соединений + diagnostics + do=connections + 0 + + + Проверка структуры базы - Проверка структуры базы дынных + Проверка структуры базы данных diagnostics do=dbchecker 0 diff --git a/upload/admin/applications/core/modules_admin/diagnostics/xml/permissions.xml b/upload/admin/applications/core/modules_admin/diagnostics/xml/permissions.xml index 0723d5fc..1141f2d0 100644 --- a/upload/admin/applications/core/modules_admin/diagnostics/xml/permissions.xml +++ b/upload/admin/applications/core/modules_admin/diagnostics/xml/permissions.xml @@ -19,6 +19,10 @@ version_checker Может проверять файлы на правильность версии? + + connection_checker + Может использовать проверку сетевых соединений? + permission_checker Может проверять файлы и директории на правильность расстановки прав доступа? diff --git a/upload/admin/applications/core/modules_admin/help/defaultSection.php b/upload/admin/applications/core/modules_admin/help/defaultSection.php index 010959f0..03222b47 100644 --- a/upload/admin/applications/core/modules_admin/help/defaultSection.php +++ b/upload/admin/applications/core/modules_admin/help/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default help section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/help/index.html b/upload/admin/applications/core/modules_admin/help/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/core/modules_admin/help/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/help/quickhelp.php b/upload/admin/applications/core/modules_admin/help/quickhelp.php index 799dc69e..bc59a30a 100644 --- a/upload/admin/applications/core/modules_admin/help/quickhelp.php +++ b/upload/admin/applications/core/modules_admin/help/quickhelp.php @@ -1,158 +1,153 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_core_help_quickhelp extends ipsCommand -{ - /** - * Array of help text - * - * @access private - * @var array Help texts - */ - private $help_text = array(); - - /** - * Initialize the help text array - * - * @access private - * @return void [Outputs to screen] - */ - private function _initText() - { - ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_system' ) ); - - return array( 'mg_dohtml' => array( 'title' => $this->lang->words['q_html'], - 'body' => $this->lang->words['q_html_info'], - ), - - 'mod_mmod' => array( 'title' => $this->lang->words['q_multi'], - 'body' => $this->lang->words['q_multi_info'], - ), - - 'set_spider' => array( 'title' => $this->lang->words['q_bots'], - 'body' => $this->lang->words['q_bots_info'], - ), - - 'mg_upload' => array( 'title' => $this->lang->words['q_upload'], - 'body' => $this->lang->words['q_upload_info'], - ), - - - 'mg_promote' => array( 'title' => $this->lang->words['q_promote'], - 'body' => $this->lang->words['q_promote_info'], - ), - 's_reg_antispam' => array ( 'title' => $this->lang->words['q_captcha'], - 'body' => $this->lang->words['q_captcha_info'], - ), - - 'm_bulkemail' => array ( 'title' => $this->lang->words['q_bulk'], - 'body' => $this->lang->words['q_bulk_info'], - ), - 'comp_menu' => array ( 'title' => $this->lang->words['q_components'], - 'body' => $this->lang->words['q_components_info'], - ), - ); - - } - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - $id = $this->request['id']; -/** -* Èçìåíåíèå ðåäèðåêòà, ïðåäëîæåíî(çà ÷òî åìó áîëüøîå ñïàñèáî :)) $iD - - if( $this->request['do'] == 'redirect' ) - { - $this->_redirect( $id ); - } -*/ - - $this->help_text = $this->_initText(); - - if ($this->help_text[ $id ]['title'] == "") - { - $this->registry->output->showError( $this->lang->words['q_nohelp'], 11148 ); - } - - $this->registry->output->html .= $this->registry->output->global_template->quickHelp( $this->help_text[$id]['title'], $this->help_text[$id]['body'] ); - - $this->registry->output->printPopupWindow(); - } - - /** - * Redirect offsite for more help/options - * - * @access private - * @param string 'key' to redirect to - * @return void [Outputs to screen] - */ -/** -* Èçìåíåíèå ðåäèðåêòà, ïðåäëîæåíî(çà ÷òî åìó áîëüøîå ñïàñèáî :)) $iD - - private function _redirect( $id ) - { - switch( $id ) - { - case 'docs': - $url = ""; - break; - - case 'kb': - $url = ""; - break; - - case 'resources': - $url = ""; - break; - - case 'contact': - $url = ""; - break; - - case 'features': - $url = ""; - break; - - case 'bugs': - $url = ""; - break; - - default: - case 'support': - $url = ""; - break; - } - - $this->registry->output->silentRedirect( $url ); - } -*/ + + * Invision Power Services + * IP.Board v3.1.4 + * Quick help - shows popups with help information + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 1st march 2002 + * @version $Revision: 5713 $ + * + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_help_quickhelp extends ipsCommand +{ + /** + * Array of help text + * + * @access private + * @var array Help texts + */ + private $help_text = array(); + + /** + * Initialize the help text array + * + * @access private + * @return void [Outputs to screen] + */ + private function _initText() + { + ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_system' ) ); + + return array( 'mg_dohtml' => array( 'title' => $this->lang->words['q_html'], + 'body' => $this->lang->words['q_html_info'], + ), + + 'mod_mmod' => array( 'title' => $this->lang->words['q_multi'], + 'body' => $this->lang->words['q_multi_info'], + ), + + 'set_spider' => array( 'title' => $this->lang->words['q_bots'], + 'body' => $this->lang->words['q_bots_info'], + ), + + 'mg_upload' => array( 'title' => $this->lang->words['q_upload'], + 'body' => $this->lang->words['q_upload_info'], + ), + + + 'mg_promote' => array( 'title' => $this->lang->words['q_promote'], + 'body' => $this->lang->words['q_promote_info'], + ), + 's_reg_antispam' => array ( 'title' => $this->lang->words['q_captcha'], + 'body' => $this->lang->words['q_captcha_info'], + ), + + 'm_bulkemail' => array ( 'title' => $this->lang->words['q_bulk'], + 'body' => $this->lang->words['q_bulk_info'], + ), + 'comp_menu' => array ( 'title' => $this->lang->words['q_components'], + 'body' => $this->lang->words['q_components_info'], + ), + ); + + } + + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + $id = $this->request['id']; + + if( $this->request['do'] == 'redirect' ) + { + $this->_redirect( $id ); + } + + $this->help_text = $this->_initText(); + + if ($this->help_text[ $id ]['title'] == "") + { + $this->registry->output->showError( $this->lang->words['q_nohelp'], 11148 ); + } + + $this->registry->output->html .= $this->registry->output->global_template->quickHelp( $this->help_text[$id]['title'], $this->help_text[$id]['body'] ); + + $this->registry->output->printPopupWindow(); + } + + /** + * Redirect offsite for more help/options + * + * @access private + * @param string 'key' to redirect to + * @return void [Outputs to screen] + */ + private function _redirect( $id ) + { + switch( $id ) + { + case 'docs': + $url = "http://anonym.to/?http://external.iblink.ru/docs-ipb"; + break; + + case 'kb': + $url = "http://anonym.to/?http://external.iblink.ru/wiki"; + break; + + case 'resources': + $url = "http://anonym.to/?http://external.iblink.ru/forums"; + break; + + case 'contact': + $url = "http://anonym.to/?http://external.iblink.ru/contact"; + break; + + case 'features': + $url = "http://anonym.to/?http://external.iblink.ru/suggestfeatures"; + break; + + case 'bugs': + $url = "http://anonym.to/?http://external.iblink.ru/bugtrack"; + break; + + default: + case 'support': + $url = "http://anonym.to/?http://external.iblink.ru/clientarea"; + break; + } + + $this->registry->output->silentRedirect( $url ); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/help/xml/index.html b/upload/admin/applications/core/modules_admin/help/xml/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/core/modules_admin/help/xml/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/help/xml/menu.xml b/upload/admin/applications/core/modules_admin/help/xml/menu.xml index 9c35335f..95f29b30 100644 --- a/upload/admin/applications/core/modules_admin/help/xml/menu.xml +++ b/upload/admin/applications/core/modules_admin/help/xml/menu.xml @@ -1,71 +1,71 @@ - - - - - Документация - - - Документация - quickhelp - do=redirect&id=docs - 1 - - - - - База знаний - - - База знаний - quickhelp - do=redirect&id=kb - 1 - - - - - Тех. поддержка - - - Техническая поддержка - quickhelp - do=redirect&id=support - 1 - - - - - Форумы - - - Форумы IBResource - quickhelp - do=redirect&id=resources - 1 - - - - - Контакты - - - Контактная информация - quickhelp - do=redirect&id=contact - 1 - - - - - Сообщить об ошибке - - - Сообщить об ошибке - quickhelp - do=redirect&id=bugs - 1 - - - - + + + + + Документация + + + Документация + quickhelp + do=redirect&id=docs + 1 + + + + + База знаний + + + База знаний + quickhelp + do=redirect&id=kb + 1 + + + + + Тех. поддержка + + + Техническая поддержка + quickhelp + do=redirect&id=support + 1 + + + + + Форумы + + + Форумы IBResource + quickhelp + do=redirect&id=resources + 1 + + + + + Контакты + + + Контактная информация + quickhelp + do=redirect&id=contact + 1 + + + + + Сообщить об ошибке + + + Сообщить об ошибке + quickhelp + do=redirect&id=bugs + 1 + + + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/index.html b/upload/admin/applications/core/modules_admin/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/index.html +++ b/upload/admin/applications/core/modules_admin/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/languages/defaultSection.php b/upload/admin/applications/core/modules_admin/languages/defaultSection.php index f20a2925..1c254e8c 100644 --- a/upload/admin/applications/core/modules_admin/languages/defaultSection.php +++ b/upload/admin/applications/core/modules_admin/languages/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default languages section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/languages/index.html b/upload/admin/applications/core/modules_admin/languages/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/core/modules_admin/languages/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/languages/manage_languages.php b/upload/admin/applications/core/modules_admin/languages/manage_languages.php index d1fbe5d6..7f1c90d4 100644 --- a/upload/admin/applications/core/modules_admin/languages/manage_languages.php +++ b/upload/admin/applications/core/modules_admin/languages/manage_languages.php @@ -1,17 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Language Pack Management - * Last Updated: $LastChangedDate: 2009-12-01 22:25:25 -0500 (Tue, 01 Dec 2009) $ + * Last Updated: $LastChangedDate: 2010-10-18 13:10:17 -0400 (Mon, 18 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com - * @version $Rev: 5503 $ + * @link http://www.invisionpower.com + * @version $Rev: 6990 $ */ if ( ! defined( 'IN_ACP' ) ) @@ -25,7 +27,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Daily flag * - * @access public * @var bool */ private $__daily = false; @@ -33,7 +34,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Main class entry point * - * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ @@ -201,7 +201,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Finish a session and remove data * - * @access public * @return void */ public function translateKill() @@ -231,14 +230,14 @@ class admin_core_languages_manage_languages extends ipsCommand } /* Load kernel class for file management */ - require_once( IPS_KERNEL_PATH . 'classFileManagement.php' ); - $classFileManagement = new classFileManagement(); + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' ); + $classFileManagement = new $classToLoad(); /* Remove files */ $classFileManagement->emptyDirectory( $mainDir ); /* Delete session */ - $session = $this->DB->delete( 'cache_store', 'cs_key=\'translate_session\'' ); + $session = $this->DB->delete( 'cache_store', "cs_key='translate_session'" ); /* Done */ $this->registry->output->global_message = $this->lang->words['ext_all_killed']; @@ -249,7 +248,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Translate externally import changed files * - * @access public * @return void */ public function translateImport() @@ -260,6 +258,7 @@ class admin_core_languages_manage_languages extends ipsCommand $words_by_file = array(); $errors = array(); $filesToImport = array(); + $fileCount = 0; /* Start top message */ if ( ! is_dir( $mainDir ) ) @@ -298,7 +297,7 @@ class admin_core_languages_manage_languages extends ipsCommand $lang = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_lang', 'where' => 'lang_id=' . $langId ) ); /* Get current session if one */ - $session = $this->DB->buildandFetch( array( 'select' => '*', 'from' => 'cache_store', 'where' => 'cs_key=\'translate_session\'' ) ); + $session = $this->DB->buildandFetch( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='translate_session'" ) ); $sessionData = ( strstr( $session['cs_value'], 'a:' ) ) ? unserialize( $session['cs_value'] ) : array(); /* Check */ @@ -338,7 +337,7 @@ class admin_core_languages_manage_languages extends ipsCommand $this->registry->output->global_message .= '
' . sprintf( $this->lang->words['ext_recache'], "{$this->settings['base_url']}&{$this->form_code}&do=recache_lang_pack&id={$sessionData['lang_id']}" ); /* Update session */ - $this->DB->update( 'cache_store', array( 'cs_value' => serialize( $sessionData ) ), 'cs_key=\'translate_session\'' ); + $this->DB->update( 'cache_store', array( 'cs_value' => serialize( $sessionData ) ), "cs_key='translate_session'" ); $this->translateExtSplash(); return; @@ -356,7 +355,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Translate externally splash * - * @access public * @return void */ public function translateExtSplash() @@ -385,14 +383,14 @@ class admin_core_languages_manage_languages extends ipsCommand } /* Load kernel class for file management */ - require_once( IPS_KERNEL_PATH . 'classFileManagement.php' ); - $classFileManagement = new classFileManagement(); + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' ); + $classFileManagement = new $classToLoad(); /* Get lang */ $lang = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_lang', 'where' => 'lang_id=' . $langId ) ); /* Get current session if one */ - $session = $this->DB->buildandFetch( array( 'select' => '*', 'from' => 'cache_store', 'where' => 'cs_key=\'translate_session\'' ) ); + $session = $this->DB->buildandFetch( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='translate_session'" ) ); $sessionData = ( strstr( $session['cs_value'], 'a:' ) ) ? unserialize( $session['cs_value'] ) : array(); /* No current session? */ @@ -402,7 +400,7 @@ class admin_core_languages_manage_languages extends ipsCommand $classFileManagement->emptyDirectory( $mainDir ); /* Ensure it's gone, gone */ - $this->DB->delete( 'cache_store', 'cs_key=\'translate_session\'' ); + $this->DB->delete( 'cache_store', "cs_key='translate_session'" ); $sessionData = $lang; $sessionData['files'] = array(); $header = "/*******************************************************\nNOTE: This is a translatable file generated by IP.Board " . IPB_VERSION . " (" . IPB_LONG_VERSION . ") on " . date( "r" ) . " by " . $this->memberData['members_display_name'] . "\nPLEASE set your text editor to save this document as UTF-8 regardless of your board's character-set\n*******************************************************/\n\n"; @@ -501,7 +499,6 @@ class admin_core_languages_manage_languages extends ipsCommand /* Save session */ $this->DB->insert( 'cache_store', array( 'cs_key' => 'translate_session', 'cs_value' => serialize( $sessionData ), - 'cs_extra' => '', 'cs_array' => 1, 'cs_updated' => time() ) ); @@ -527,7 +524,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Import files from disk * - * @access Private * @param string Directory to look in * @param int Language ID to import into * @param array [Only import these files] @@ -720,7 +716,7 @@ class admin_core_languages_manage_languages extends ipsCommand // Delete current words for this app and word pack //----------------------------------------- - $this->DB->delete( 'core_sys_lang_words', 'lang_id=' . $langId .' AND word_app="core" AND word_pack=\'' . $_js_word_pack . '\'' ); + $this->DB->delete( 'core_sys_lang_words', 'lang_id=' . $langId . " AND word_app='core' AND word_pack='" . $_js_word_pack . "'" ); //----------------------------------------- // Get each line @@ -775,7 +771,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Recaches a language pack * - * @access public * @return void */ public function recacheLangPack() @@ -798,7 +793,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Remove a word entry * - * @access public * @return void */ public function removeWordEntry() @@ -834,7 +828,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Remove a word pack * - * @access public * @return void */ public function removeWordPack() @@ -934,7 +927,7 @@ class admin_core_languages_manage_languages extends ipsCommand // Get next app //----------------------------------------- - $next = IPSSetUp::fetchNextApplication( $previous ); + $next = IPSSetUp::fetchNextApplication( $previous, '', $this->settings['gb_char_set'] ); if ( $next['key'] ) { @@ -952,7 +945,7 @@ class admin_core_languages_manage_languages extends ipsCommand if ( preg_match( "#" . $_word . "_(.+?)_language_pack.xml#", $f->getFileName() ) ) { $this->request['file_location'] = $_PATH . $f->getFileName(); - $this->imprtFromXML( 1, true, true, $next['key'] ); + $this->imprtFromXML( 1, true, true, $next['key'], false, 1 ); } } } catch ( Exception $e ) {} @@ -1053,12 +1046,17 @@ class admin_core_languages_manage_languages extends ipsCommand // Make sure this isn't default pack //----------------------------------------- - $default = $this->DB->buildAndFetch( array( 'select' => 'lang_id', 'from' => 'core_sys_lang', 'where' => 'lang_default=1' ) ); + $langCheck = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_lang', 'where' => 'lang_id=' . $id ) ); - if( $id == $default['lang_id'] ) + if( $langCheck['lang_default'] ) { $this->registry->output->showError( $this->lang->words['cannot_delete_default_lang'] ); } + + if( $langCheck['lang_protected'] AND !IN_DEV ) + { + $this->registry->output->showError( $this->lang->words['cannot_delete_protected_lang'] ); + } //----------------------------------------- // Delete from database @@ -1076,8 +1074,8 @@ class admin_core_languages_manage_languages extends ipsCommand //----------------------------------------- // Update member default choice //----------------------------------------- - - $this->DB->update( 'members', array( 'language' => $default['lang_id'] ), "language={$id}" ); + $default = $this->DB->buildAndFetch( array( 'select' => 'lang_id', 'from' => 'core_sys_lang', 'where' => "lang_default=1" ) ); + $this->DB->update( 'members', array( 'language' => intval($default['lang_id']) ), "language={$id}" ); //----------------------------------------- // Update cache @@ -1095,7 +1093,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Revert a word pack entry to the default value * - * @access public * @return void */ public function languageDoRevertWord() @@ -1132,7 +1129,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Saves new language edits * - * @access public * @return void */ public function languageEditWordPackValues() @@ -1142,6 +1138,13 @@ class admin_core_languages_manage_languages extends ipsCommand //----------------------------------------- $id = intval( $this->request['id'] ); + + $langCheck = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_lang', 'where' => 'lang_id=' . $id ) ); + + if( $langCheck['lang_protected'] AND !IN_DEV ) + { + $this->registry->output->showError( $this->lang->words['lang_pack_protected'] ); + } //----------------------------------------- // Loop through language bits submitted @@ -1156,7 +1159,7 @@ class admin_core_languages_manage_languages extends ipsCommand $v = IPSText::safeSlashes($v); $v = str_replace( '\', '\\', $v ); - $this->DB->update( 'core_sys_lang_words', "word_custom='".$this->DB->addSlashes( $v )."', word_custom_version=word_default_version", "word_id=" . intval($k), false, true ); + $this->DB->update( 'core_sys_lang_words', "word_custom='" . $this->DB->addSlashes( $v ) . "', word_custom_version=word_default_version", "word_id=" . intval($k), false, true ); } } } @@ -1173,7 +1176,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Handles the word entry form * - * @access public * @param string $mode Either add or edit * @return void */ @@ -1212,8 +1214,13 @@ class admin_core_languages_manage_languages extends ipsCommand return; } - $this->request['word_app'] = strtolower($this->request['word_app']); - $this->request['word_pack_db'] = str_replace( '/', '_', strtolower($this->request['word_pack_db']) ); + $this->request['word_app'] = mb_strtolower($this->request['word_app']); + $this->request['word_pack_db'] = str_replace( '/', '_', mb_strtolower($this->request['word_pack_db']) ); + + if( $this->request['word_pack_db'] == 'admin_js' OR $this->request['word_pack_db'] == 'public_js' ) + { + $this->request['word_app'] = 'core'; + } //----------------------------------------- // Build DB insert array @@ -1256,7 +1263,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Form for adding/editing a word entry * - * @access public * @param string $mode Either add or edit * @return void */ @@ -1328,7 +1334,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Edit the entries in a word pack * - * @access public * @return void */ public function languageEditWordPack() @@ -1338,6 +1343,7 @@ class admin_core_languages_manage_languages extends ipsCommand //----------------------------------------- /* Fix up for search */ + $keywordForPageLinks = $this->request['search']; $this->request['search'] = str_replace( "'", "\'", $this->request['search'] ); $id = intval( $this->request['id'] ); @@ -1345,7 +1351,7 @@ class admin_core_languages_manage_languages extends ipsCommand $per_page = 20; $st = $this->request['st'] ? intval( $this->request['st'] ) : 0; $search = $this->request['search'] ? " AND ( word_default LIKE '%" . $this->request['search'] . "%' OR word_custom LIKE '%" . $this->request['search'] . "%' OR word_key LIKE '%" . $this->request['search'] . "%' )" : ''; - $filter = $this->request['filter'] ? ' AND word_custom_version < word_default_version AND word_custom <> \'\' ' : ''; + $filter = $this->request['filter'] ? " AND word_custom_version < word_default_version AND word_custom " . $this->DB->buildIsNull(false) . ' ' : ''; $wp_query = $pack[0] && $pack[1] ? " AND word_app='{$pack[0]}' AND word_pack='{$pack[1]}' " : ''; //----------------------------------------- @@ -1372,7 +1378,7 @@ class admin_core_languages_manage_languages extends ipsCommand 'totalItems' => intval( $count['count'] ), 'itemsPerPage' => $per_page, 'currentStartValue' => $st, - 'baseUrl' => "{$this->settings['base_url']}{$this->form_code}&do=edit_word_pack&word_pack=".implode( '/', $pack )."&id={$id}&search={$this->request['search']}&filter={$this->request['filter']}", + 'baseUrl' => "{$this->settings['base_url']}{$this->form_code}&do=edit_word_pack&word_pack=".implode( '/', $pack )."&id={$id}&search={$keywordForPageLinks}&filter={$this->request['filter']}", ) ); //----------------------------------------- @@ -1413,7 +1419,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * List the word packs available for the selected language set * - * @access public * @return void * @author Josh */ @@ -1431,6 +1436,8 @@ class admin_core_languages_manage_languages extends ipsCommand $data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_lang', 'where' => "lang_id={$id}" ) ); + $this->registry->output->extra_nav[] = array( "{$this->settings['base_url']}{$this->form_code}&do=list_word_packs&id={$data['lang_id']}", $data['lang_title'] ); + //----------------------------------------- // Get words //----------------------------------------- @@ -1522,7 +1529,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Handles the language information form submit * - * @access public * @param string $mode Either new or edit * @return void */ @@ -1658,7 +1664,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Builds the language information form * - * @access public * @param string $mode new or edit * @return void */ @@ -1720,13 +1725,12 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Lists currently installed languages * - * @access public * @return void */ public function languagesList() { /* Do we have a valid translation session? */ - $session = $this->DB->buildandFetch( array( 'select' => '*', 'from' => 'cache_store', 'where' => 'cs_key=\'translate_session\'' ) ); + $session = $this->DB->buildandFetch( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='translate_session'" ) ); $sessionData = ( strstr( $session['cs_value'], 'a:' ) ) ? unserialize( $session['cs_value'] ) : array(); $hasTranslate = false; @@ -1735,7 +1739,15 @@ class admin_core_languages_manage_languages extends ipsCommand { $hasTranslate = true; } - + + /* Fallback for the recache all button */ + $forceEnglish = IPSCookie::get('forceEnglish'); + + if ( !$this->lang->words['language_list_recache'] || $forceEnglish ) + { + $this->lang->words['language_list_recache'] = 'Recache all...'; + } + //----------------------------------------- // Get languages //----------------------------------------- @@ -1748,23 +1760,32 @@ class admin_core_languages_manage_languages extends ipsCommand while( $r = $this->DB->fetch() ) { /* Get Local Data */ - setlocale( LC_ALL, $r['lang_short'] ); + //setlocale( LC_ALL, $r['lang_short'] ); + IPSLib::setlocale( $r['lang_short'] ); $this->registry->class_localization->local_data = localeconv(); $_menu = array(); $_menu[] = array( "{$this->settings['base_url']}&{$this->form_code}&do=edit_lang_info&id={$r['lang_id']}", $this->lang->words['edit'], 'edit' ); - $_menu[] = array( "{$this->settings['base_url']}&{$this->form_code}&do=list_word_packs&id={$r['lang_id']}", $this->lang->words['language_list_translate'], 'info' ); - /* If we don't have a current session... */ - if ( ! $hasTranslate ) + if( $r['lang_protected'] && ! IN_DEV ) { - $_menu[] = array( "{$this->settings['base_url']}&{$this->form_code}&do=translateExtSplash&id={$r['lang_id']}", $this->lang->words['language_list_translate_ext'], 'info' ); + $_menu[] = array( "", $this->lang->words['lang_pack_protected'], 'edit' ); } - - if( ! $r['lang_default'] ) + else { - $_menu[] = array( "{$this->settings['base_url']}&{$this->form_code}&do=remove_language&id={$r['lang_id']}", $this->lang->words['delete'], 'delete', 1 ); + $_menu[] = array( "{$this->settings['base_url']}&{$this->form_code}&do=list_word_packs&id={$r['lang_id']}", $this->lang->words['language_list_translate'], 'info' ); + + /* If we don't have a current session... */ + if ( ! $hasTranslate ) + { + $_menu[] = array( "{$this->settings['base_url']}&{$this->form_code}&do=translateExtSplash&id={$r['lang_id']}", $this->lang->words['language_list_translate_ext'], 'info' ); + } + + if( ! $r['lang_default'] ) + { + $_menu[] = array( "{$this->settings['base_url']}&{$this->form_code}&do=remove_language&id={$r['lang_id']}", $this->lang->words['delete'], 'delete', 1 ); + } } $_menu[] = array( "{$this->settings['base_url']}&{$this->form_code}&do=copy_lang_pack&id={$r['lang_id']}", $this->lang->words['language_list_copy'] ); @@ -1803,7 +1824,8 @@ class admin_core_languages_manage_languages extends ipsCommand // Reset locale //----------------------------------------- - setlocale( LC_ALL, $this->registry->class_localization->local ); + IPSLib::setlocale( $this->registry->class_localization->local ); + //setlocale( LC_ALL, $this->registry->class_localization->local ); $this->registry->class_localization->local_data = localeconv(); //----------------------------------------- @@ -1816,7 +1838,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Updates the cached language files from the database * - * @access public * @param integer ID of the language pack to export * @return void */ @@ -1829,7 +1850,12 @@ class admin_core_languages_manage_languages extends ipsCommand // Build where statement //----------------------------------------- - if( $lang_id AND $lang_id != 1 ) + if ( $lang_id == 'master' ) + { + $lang_id = 'master_lang'; + $where = "lang_id=1"; + } + else if( $lang_id AND $lang_id != 1 ) { $where = "lang_id={$lang_id}"; } @@ -1852,7 +1878,7 @@ class admin_core_languages_manage_languages extends ipsCommand // Get the words //----------------------------------------- - $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_lang_words', 'where' => $where ) ); + $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_lang_words', 'where' => $where, 'order' => 'word_key ASC' ) ); $this->DB->execute(); $words_by_file = array(); @@ -1905,6 +1931,14 @@ class admin_core_languages_manage_languages extends ipsCommand foreach( $words as $word ) { $word[1] = str_replace( '"', '\\"', $word[1] ); + + //----------------------------------------- + // Protect swapped sprintf arguments + // @link http://community.invisionpower.com/tracker/issue-22240-lang-strings-using-sprintf-argument-swapping/ + //----------------------------------------- + + $word[1] = str_replace( '$s', '\\$s', $word[1] ); + $to_write .= "'{$word[0]}' => \"{$word[1]}\",\n"; } @@ -1936,14 +1970,14 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Imports language packs from an xml file and updates the database and recaches the languages * - * @access public * @param integer $lang_id ID of the language pack to import * @param bool $in_dev Set to 1 for developer language import * @param bool $no_return If set to 1, this function will return a value, rather than outputting data * @param string $app_override Overrides the application for which languages are being imported + * @param bool $skip_charset Skips charset conversion in the XML file (useful during upgrade routine as strings don't need to be converted) * @return mixed */ - public function imprtFromXML( $lang_id=0, $in_dev=0, $no_return=0, $app_override='', $ru = '' ) + public function imprtFromXML( $lang_id=0, $in_dev=0, $no_return=0, $app_override='', $skip_charset=false, $ru = '' ) { //----------------------------------------- // Set version.. @@ -2144,7 +2178,7 @@ class admin_core_languages_manage_languages extends ipsCommand require_once( IPS_KERNEL_PATH.'classXML.php' ); - $xml = new classXML( IPS_DOC_CHAR_SET ); + $xml = new classXML( $skip_charset ? 'utf-8' : IPS_DOC_CHAR_SET ); $xml->loadXML( $content ); //----------------------------------------- @@ -2219,6 +2253,10 @@ class admin_core_languages_manage_languages extends ipsCommand $this->registry->class_localization->rebuildLanguagesCache(); } + else + { + $insertId = $update_lang['lang_id']; + } } //----------------------------------------- @@ -2320,12 +2358,22 @@ class admin_core_languages_manage_languages extends ipsCommand } } + //----------------------------------------- + // Didn't find any match? Must be importing + // a new language pack, huh? + //----------------------------------------- + + if ( !isset( $lang_entry['word_id'] ) ) + { + //continue 2; + } + //----------------------------------------- // If there is no new custom lang bit to insert // don't delete what is already there. //----------------------------------------- - if( !$db_array['word_custom'] ) + if( !$db_array['word_custom'] || ( $insertId > 0 && $insertId != $_lang_id ) ) { unset($db_array['word_custom']); unset($db_array['word_custom_version']); @@ -2417,7 +2465,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Export language entries to xml file * - * @access public * @param integer $lang_id Language pack to export * @param bool $disk Save to disk instead * @return void @@ -2441,7 +2488,7 @@ class admin_core_languages_manage_languages extends ipsCommand if ( $app_dir ) { - $_where = ' AND word_app="' . $app_dir . '"'; + $_where = " AND word_app='" . $app_dir . "'"; $_name = $app_dir . '_language_pack.xml'; $doPack = false; } @@ -2450,12 +2497,12 @@ class admin_core_languages_manage_languages extends ipsCommand { if ( $type == 'admin' ) { - $_where .= ' AND word_pack LIKE "admin_%"'; + $_where .= " AND word_pack LIKE 'admin_%'"; $_name = 'admin_' . $_name; } else { - $_where .= ' AND word_pack LIKE "public_%"'; + $_where .= " AND word_pack LIKE 'public_%'"; $_name = 'public_' . $_name; } @@ -2575,7 +2622,6 @@ class admin_core_languages_manage_languages extends ipsCommand /** * Builds the language db entries from cache * - * @access public * @param boolean return as normal * @return void * @author Josh @@ -2646,7 +2692,7 @@ class admin_core_languages_manage_languages extends ipsCommand // Delete current language bits //----------------------------------------- - $this->DB->delete( 'core_sys_lang_words', 'lang_id=1 AND word_app="'.$app.'" AND word_pack=\'' . $word_pack . '\'' ); + $this->DB->delete( 'core_sys_lang_words', "lang_id=1 AND word_app='" . $app . "' AND word_pack='" . $word_pack . "'" ); if ( IPS_IS_SHELL ) { @@ -2697,7 +2743,7 @@ class admin_core_languages_manage_languages extends ipsCommand // Delete current words for this app and word pack //----------------------------------------- - $this->DB->delete( 'core_sys_lang_words', 'lang_id=1 AND word_app="'.$app.'" AND word_pack=\'' . $_js_word_pack . '\'' ); + $this->DB->delete( 'core_sys_lang_words', "lang_id=1 AND word_app='" . $app . "' AND word_pack='" . $_js_word_pack . "'" ); if ( IPS_IS_SHELL ) { diff --git a/upload/admin/applications/core/modules_admin/languages/xml/index.html b/upload/admin/applications/core/modules_admin/languages/xml/index.html index 203e7ede..f093152b 100644 --- a/upload/admin/applications/core/modules_admin/languages/xml/index.html +++ b/upload/admin/applications/core/modules_admin/languages/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/login/index.html b/upload/admin/applications/core/modules_admin/login/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/login/index.html +++ b/upload/admin/applications/core/modules_admin/login/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/login/manualResolver.php b/upload/admin/applications/core/modules_admin/login/manualResolver.php index e7b83d49..1815dc62 100644 --- a/upload/admin/applications/core/modules_admin/login/manualResolver.php +++ b/upload/admin/applications/core/modules_admin/login/manualResolver.php @@ -1,20 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * ACP Login/Logout Routines - * Last Updated: $Date: 2009-11-13 19:55:00 -0500 (Fri, 13 Nov 2009) $ + * Last Updated: $Date: 2010-10-18 13:10:17 -0400 (Mon, 18 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Tuesday 17th August 2004 - * @version $Revision: 5405 $ - * + * @version $Revision: 6990 $ */ if ( ! defined( 'IN_ACP' ) ) @@ -29,7 +29,6 @@ class admin_core_login_manualResolver extends ipsCommand /** * HTML Skin object * - * @access protected * @var object */ protected $html; @@ -37,7 +36,6 @@ class admin_core_login_manualResolver extends ipsCommand /**#@+ * Registry objects * - * @access protected * @var object */ public $registry; @@ -46,12 +44,12 @@ class admin_core_login_manualResolver extends ipsCommand public $request; public $lang; public $member; + public $memberData; /**#@-*/ /** * Login handler object * - * @access protected * @var object */ protected $han_login; @@ -59,13 +57,13 @@ class admin_core_login_manualResolver extends ipsCommand /** * Initiate login handler * - * @access public * @return void */ public function initHanLogin() { - require_once( IPS_ROOT_PATH . 'sources/handlers/han_login.php' ); - $this->han_login = new han_login( $this->registry ); + $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(); } @@ -73,7 +71,6 @@ class admin_core_login_manualResolver extends ipsCommand /** * Class entry point * - * @access public * @param object Registry reference * @param string Validation message * @return void [Outputs to screen/redirects] @@ -87,10 +84,9 @@ class admin_core_login_manualResolver extends ipsCommand $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->lang = $this->registry->getClass('class_localization'); $this->initHanLogin(); @@ -118,7 +114,6 @@ class admin_core_login_manualResolver extends ipsCommand /** * Check and verify the login was successful * - * @access public * @return void */ public function loginComplete() @@ -136,13 +131,22 @@ class admin_core_login_manualResolver extends ipsCommand // Is this a username or email address? //----------------------------------------- - if( IPSText::checkEmailAddress( $this->request['username'] ) ) + $_type = $this->han_login->emailOrUsername(); + + switch( $_type ) { - $email = $this->request['username']; - } - else - { - $username = $this->request['username']; + 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; } //----------------------------------------- @@ -150,7 +154,7 @@ class admin_core_login_manualResolver extends ipsCommand //----------------------------------------- $this->han_login->loginAuthenticate( $username, $email, trim($this->request['password']) ); - + //----------------------------------------- // Check return code... //----------------------------------------- @@ -255,7 +259,6 @@ class admin_core_login_manualResolver extends ipsCommand /** * Log the user out * - * @access public * @return void */ public function loginOut() @@ -265,13 +268,7 @@ class admin_core_login_manualResolver extends ipsCommand //----------------------------------------- $this->DB->delete( 'core_sys_cp_sessions', "session_id='" . $this->request['adsess'] . "'" ); - - //----------------------------------------- - // Bash cookie - //----------------------------------------- - - IPSCookie::set("ipb3AcpSessionId", 'x', -1); - + //----------------------------------------- // Redirect... //----------------------------------------- @@ -282,7 +279,6 @@ class admin_core_login_manualResolver extends ipsCommand /** * Log the user out * - * @access public * @param string Message to show on the form * @return void */ @@ -327,12 +323,12 @@ class admin_core_login_manualResolver extends ipsCommand { $login_methods[ $method['login_folder_name'] ] = $method['login_folder_name']; - if( $method['login_user_id'] == 'username' ) + if( $method['login_user_id'] == 'username' or $method['login_user_id'] == 'either' ) { $uses_name = true; } - if( $method['login_user_id'] == 'email' ) + if( $method['login_user_id'] == 'email' or $method['login_user_id'] == 'either' ) { $uses_email = true; } @@ -363,7 +359,6 @@ class admin_core_login_manualResolver extends ipsCommand /** * Write to the admin log in loggy ma log * - * @access private * @param string Username * @param string ok/fail flag * @return void diff --git a/upload/admin/applications/core/modules_admin/logs/adminlogs.php b/upload/admin/applications/core/modules_admin/logs/adminlogs.php index 6fdc36d3..a867c787 100644 --- a/upload/admin/applications/core/modules_admin/logs/adminlogs.php +++ b/upload/admin/applications/core/modules_admin/logs/adminlogs.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Admin logs - * Last Updated: $LastChangedDate: 2009-12-07 09:26:30 -0500 (Mon, 07 Dec 2009) $ + * Last Updated: $LastChangedDate: 2010-06-15 21:25:19 -0400 (Tue, 15 Jun 2010) $ + * * - * @author $Author: mark $ + * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th January 2004 - * @version $Rev: 5526 $ + * @version $Rev: 6539 $ */ if ( ! defined( 'IN_ACP' ) ) @@ -27,18 +29,18 @@ class admin_core_logs_adminlogs extends ipsCommand /** * Generate some pretty colors for the logs * - * @access private + * @access protected * @var array Different colors for different actions */ - private $colours = array(); + protected $colours = array(); /** * Skin object * - * @access private + * @access protected * @var object Skin templates */ - private $html; + protected $html; /** * Main class entry point @@ -123,10 +125,10 @@ class admin_core_logs_adminlogs extends ipsCommand /** * View all logs for a given admin * - * @access private + * @access protected * @return void [Outputs to screen] */ - private function _view() + protected function _view() { ///---------------------------------------- // Basic init @@ -251,10 +253,10 @@ class admin_core_logs_adminlogs extends ipsCommand /** * Remove logs by an admin * - * @access private + * @access protected * @return void [Outputs to screen] */ - private function _remove() + protected function _remove() { if ( $this->request['mid'] == "" ) { @@ -269,10 +271,10 @@ class admin_core_logs_adminlogs extends ipsCommand /** * List the current logs with links to view per-admin * - * @access private + * @access protected * @return void [Outputs to screen] */ - private function _listCurrent() + protected function _listCurrent() { $rows = array(); $admins = array(); @@ -321,7 +323,7 @@ class admin_core_logs_adminlogs extends ipsCommand while ( $r = $this->DB->fetch() ) { $_members[] = $r['member_id']; - $_store[ $r['member_id'] ] = $r; + $admins[ $r['member_id'] ] = $r; } if ( !empty( $_members ) ) @@ -334,7 +336,7 @@ class admin_core_logs_adminlogs extends ipsCommand while ( $r = $this->DB->fetch() ) { - $admins[] = array_merge( $r, $_store[ $r['member_id'] ] ); + $admins[ $r['member_id'] ] = array_merge( $r, $admins[ $r['member_id'] ] ); } } diff --git a/upload/admin/applications/core/modules_admin/logs/defaultSection.php b/upload/admin/applications/core/modules_admin/logs/defaultSection.php index 9e4a820d..11bd6227 100644 --- a/upload/admin/applications/core/modules_admin/logs/defaultSection.php +++ b/upload/admin/applications/core/modules_admin/logs/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default logs section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/logs/emailerrorlogs.php b/upload/admin/applications/core/modules_admin/logs/emailerrorlogs.php index 7a5d84b2..f9e70ac2 100644 --- a/upload/admin/applications/core/modules_admin/logs/emailerrorlogs.php +++ b/upload/admin/applications/core/modules_admin/logs/emailerrorlogs.php @@ -1,280 +1,282 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_core_logs_emailerrorlogs extends ipsCommand -{ - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = $this->registry->output->loadTemplate('cp_skin_emailerrorlogs'); - - //----------------------------------------- - // Set up stuff - //----------------------------------------- - - $this->form_code = $this->html->form_code = 'module=logs&section=emailerrorlogs'; - $this->form_code_js = $this->html->form_code_js = 'module=logs§ion=emailerrorlogs'; - - //----------------------------------------- - // Load lang - //----------------------------------------- - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) ); - - //----------------------------------------- - // Fix up navigation bar - //----------------------------------------- - - $this->registry->output->core_nav = array(); - $this->registry->output->ignoreCoreNav = true; - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] ); - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] ); - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=emailerrorlogs', $this->lang->words['elog_email_err_logs'] ); - - ///---------------------------------------- - // What to do... - //----------------------------------------- - - switch( $this->request['do'] ) - { - default: - case 'list': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emailerrorlogs_view' ); - $this->_listCurrent(); - break; - - case 'remove': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emailerrorlogs_delete' ); - $this->_remove(); - break; - - case 'viewemail': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emailerrorlogs_view' ); - $this->_viewEmail(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Remove email logs - * - * @access private - * @return void [Outputs to screen] - */ - private function _remove() - { - if ( $this->request['type'] == 'all' ) - { - $this->DB->delete( 'mail_error_logs' ); - } - else - { - $ids = array(); - - foreach ( $this->request as $k => $v ) - { - if ( preg_match( "/^id_(\d+)$/", $k, $match ) ) - { - if ($this->request[ $match[0] ] ) - { - $ids[] = $match[1]; - } - } - } - - $ids = IPSLib::cleanIntArray( $ids ); - - //----------------------------------------- - - if ( count($ids) < 1 ) - { - $this->registry->output->showError( $this->lang->words['erlog_noneselected'], 11115 ); - } - - $this->DB->delete( 'mail_error_logs', "mlog_id IN (" . implode( ',', $ids ) . ")" ); - } - - $this->registry->getClass('adminFunctions')->saveAdminLog( $this->lang->words['erlog_removed'] ); - - $this->registry->output->silentRedirect( $this->settings['base_url']."&{$this->form_code}" ); - } - - /** - * List the current logs - * - * @access private - * @return void [Outputs to screen] - */ - private function _listCurrent() - { - $start = intval($this->request['st']) >= 0 ? intval($this->request['st']) : 0; - - //----------------------------------------- - // Check URL parameters - //----------------------------------------- - - $url_query = array(); - $db_query = array(); - - if ( $this->request['type'] AND $this->request['type'] != "" ) - { - $this->registry->output->html_help_title .= $this->lang->words['erlog_results']; - - $string = IPSText::parseCleanValue( urldecode($this->request['string']) ); - - if ( $string == "" ) - { - $this->registry->output->showError( $this->lang->words['erlog_enter_sumthang_yo'], 11116 ); - } - - $url_query[] = 'type=' . $this->request['type']; - $url_query[] = 'string=' . urlencode($string); - - switch( $this->request['type'] ) - { - case 'subject': - $db_query[] = $this->request['match'] == 'loose' ? "mlog_subject LIKE '%". preg_replace_callback( '/([=_\?\x00-\x1F\x80-\xFF])/', create_function( '$match', 'return "=" . strtoupper( dechex( ord( "$match[1]" ) ) );' ), $string ) ."%'" : "mlog_subject='{$string}'"; - break; - - case 'email_from': - $db_query[] = $this->request['match'] == 'loose' ? "mlog_from LIKE '%{$string}%'" : "mlog_from='{$string}'"; - break; - case 'email_to': - $db_query[] = $this->request['match'] == 'loose' ? "mlog_to LIKE '%{$string}%'" : "mlog_to='{$string}'"; - break; - case 'error': - $db_query[] = $this->request['match'] == 'loose' ? "mlog_msg LIKE '%{$string}%' or mlog_smtp_msg LIKE '%{$string}%'" : "mlog_msg='{$string} or mlog_smtp_msg='{$string}'"; - break; - } - } - - if( $this->request['match'] ) - { - $url_query[] = 'match=' . $this->request['match']; - } - - //----------------------------------------- - // LIST 'EM - //----------------------------------------- - - $dbe = ""; - $url = ""; - - if ( count($db_query) > 0 ) - { - $dbe = implode( ' AND ', $db_query ); - } - - if ( count($url_query) > 0 ) - { - $url = '&' . implode( '&', $url_query ); - } - - $count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as cnt', 'from' => 'mail_error_logs', 'where' => $dbe ) ); - - $links = $this->registry->output->generatePagination( array( 'totalItems' => $count['cnt'], - 'itemsPerPage' => 25, - 'currentStartValue' => $start, - 'baseUrl' => $this->settings['base_url'] . "&{$this->form_code}" . $url, - ) - ); - - $this->DB->build( array( 'select' => '*', 'from' => 'mail_error_logs', 'where' => $dbe, 'order' => 'mlog_date DESC', 'limit' => array( $start, 25 ) ) ); - $this->DB->execute(); - - while ( $row = $this->DB->fetch() ) - { - $row['_date'] = $this->registry->class_localization->getDate( $row['mlog_date'], 'SHORT' ); - - $row['mlog_subject'] = ( empty( $row['mlog_subject'] ) ) ? '--' : $row['mlog_subject']; - $row['mlog_subject'] = ( strpos( $row['mlog_subject'], "=?".IPS_DOC_CHAR_SET."?Q?" ) !== FALSE ) - ? str_replace( "=?".IPS_DOC_CHAR_SET."?Q?", "", str_replace( "?=", "", preg_replace_callback( '/=([A-F0-9]{2})/', create_function( '$match', 'return chr( hexdec( "$match[1]" ) );' ), $row['mlog_subject'] ) ) ) - : $row['mlog_subject']; - - $rows[] = $row; - } - - $this->registry->output->html .= $this->html->emailerrorlogsWrapper( $rows, $links ); - } - - /** - * View an individual email - * - * @access private - * @return void [Outputs to screen] - */ - private function _viewEmail() - { - if ( $this->request['id'] == "" ) - { - $this->registry->output->showError( $this->lang->words['erlog_404'], 11117 ); - } - - $id = intval($this->request['id']); - - $row = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'mail_error_logs', 'where' => "mlog_id={$id}" ) ); - - if ( ! $row['mlog_id'] ) - { - $this->registry->output->showError( $this->lang->words['erlog_404'], 11118 ); - } - - $row['_date'] = $this->registry->class_localization->getDate( $row['mlog_date'], 'LONG' ); - $row['mlog_content'] = nl2br($row['mlog_content']); - - $row['mlog_subject'] = ( strpos( $row['mlog_subject'], "=?".IPS_DOC_CHAR_SET."?Q?" ) !== FALSE ) - ? str_replace( "=?".IPS_DOC_CHAR_SET."?Q?", "", str_replace( "?=", "", preg_replace_callback( '/=([A-F0-9]{2})/', create_function( '$match', 'return chr( hexdec( "$match[1]" ) );' ), $row['mlog_subject'] ) ) ) - : $row['mlog_subject']; - - $row['mlog_msg'] = $row['mlog_msg'] ? $row['mlog_msg'] : $this->lang->words['erlog_noinfo']; - $row['mlog_code'] = $row['mlog_code'] ? $row['mlog_code'] : $this->lang->words['erlog_noinfo']; - $row['mlog_smtp_error'] = $row['mlog_smtp_error'] ? $row['mlog_smtp_error'] : $this->lang->words['erlog_noinfo']; - - $this->registry->output->html .= $this->html->emailerrorlogsEmail( $row ); - - $this->registry->output->printPopupWindow(); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Email error logs + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 27th January 2004 + * @version $Rev: 5713 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_logs_emailerrorlogs extends ipsCommand +{ + /** + * Skin object + * + * @access private + * @var object Skin templates + */ + private $html; + + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = $this->registry->output->loadTemplate('cp_skin_emailerrorlogs'); + + //----------------------------------------- + // Set up stuff + //----------------------------------------- + + $this->form_code = $this->html->form_code = 'module=logs&section=emailerrorlogs'; + $this->form_code_js = $this->html->form_code_js = 'module=logs§ion=emailerrorlogs'; + + //----------------------------------------- + // Load lang + //----------------------------------------- + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) ); + + //----------------------------------------- + // Fix up navigation bar + //----------------------------------------- + + $this->registry->output->core_nav = array(); + $this->registry->output->ignoreCoreNav = true; + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] ); + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] ); + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=emailerrorlogs', $this->lang->words['elog_email_err_logs'] ); + + ///---------------------------------------- + // What to do... + //----------------------------------------- + + switch( $this->request['do'] ) + { + default: + case 'list': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emailerrorlogs_view' ); + $this->_listCurrent(); + break; + + case 'remove': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emailerrorlogs_delete' ); + $this->_remove(); + break; + + case 'viewemail': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emailerrorlogs_view' ); + $this->_viewEmail(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Remove email logs + * + * @access private + * @return void [Outputs to screen] + */ + private function _remove() + { + if ( $this->request['type'] == 'all' ) + { + $this->DB->delete( 'mail_error_logs' ); + } + else + { + $ids = array(); + + foreach ( $this->request as $k => $v ) + { + if ( preg_match( "/^id_(\d+)$/", $k, $match ) ) + { + if ($this->request[ $match[0] ] ) + { + $ids[] = $match[1]; + } + } + } + + $ids = IPSLib::cleanIntArray( $ids ); + + //----------------------------------------- + + if ( count($ids) < 1 ) + { + $this->registry->output->showError( $this->lang->words['erlog_noneselected'], 11115 ); + } + + $this->DB->delete( 'mail_error_logs', "mlog_id IN (" . implode( ',', $ids ) . ")" ); + } + + $this->registry->getClass('adminFunctions')->saveAdminLog( $this->lang->words['erlog_removed'] ); + + $this->registry->output->silentRedirect( $this->settings['base_url']."&{$this->form_code}" ); + } + + /** + * List the current logs + * + * @access private + * @return void [Outputs to screen] + */ + private function _listCurrent() + { + $start = intval($this->request['st']) >= 0 ? intval($this->request['st']) : 0; + + //----------------------------------------- + // Check URL parameters + //----------------------------------------- + + $url_query = array(); + $db_query = array(); + + if ( $this->request['type'] AND $this->request['type'] != "" ) + { + $this->registry->output->html_help_title .= $this->lang->words['erlog_results']; + + $string = IPSText::parseCleanValue( urldecode($this->request['string']) ); + + if ( $string == "" ) + { + $this->registry->output->showError( $this->lang->words['erlog_enter_sumthang_yo'], 11116 ); + } + + $url_query[] = 'type=' . $this->request['type']; + $url_query[] = 'string=' . urlencode($string); + + switch( $this->request['type'] ) + { + case 'subject': + $db_query[] = $this->request['match'] == 'loose' ? "mlog_subject LIKE '%". preg_replace_callback( '/([=_\?\x00-\x1F\x80-\xFF])/', create_function( '$match', 'return "=" . strtoupper( dechex( ord( "$match[1]" ) ) );' ), $string ) ."%'" : "mlog_subject='{$string}'"; + break; + + case 'email_from': + $db_query[] = $this->request['match'] == 'loose' ? "mlog_from LIKE '%{$string}%'" : "mlog_from='{$string}'"; + break; + case 'email_to': + $db_query[] = $this->request['match'] == 'loose' ? "mlog_to LIKE '%{$string}%'" : "mlog_to='{$string}'"; + break; + case 'error': + $db_query[] = $this->request['match'] == 'loose' ? "mlog_msg LIKE '%{$string}%' or mlog_smtp_msg LIKE '%{$string}%'" : "mlog_msg='{$string} or mlog_smtp_msg='{$string}'"; + break; + } + } + + if( $this->request['match'] ) + { + $url_query[] = 'match=' . $this->request['match']; + } + + //----------------------------------------- + // LIST 'EM + //----------------------------------------- + + $dbe = ""; + $url = ""; + + if ( count($db_query) > 0 ) + { + $dbe = implode( ' AND ', $db_query ); + } + + if ( count($url_query) > 0 ) + { + $url = '&' . implode( '&', $url_query ); + } + + $count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as cnt', 'from' => 'mail_error_logs', 'where' => $dbe ) ); + + $links = $this->registry->output->generatePagination( array( 'totalItems' => $count['cnt'], + 'itemsPerPage' => 25, + 'currentStartValue' => $start, + 'baseUrl' => $this->settings['base_url'] . "&{$this->form_code}" . $url, + ) + ); + + $this->DB->build( array( 'select' => '*', 'from' => 'mail_error_logs', 'where' => $dbe, 'order' => 'mlog_date DESC', 'limit' => array( $start, 25 ) ) ); + $this->DB->execute(); + + while ( $row = $this->DB->fetch() ) + { + $row['_date'] = $this->registry->class_localization->getDate( $row['mlog_date'], 'SHORT' ); + + $row['mlog_subject'] = ( empty( $row['mlog_subject'] ) ) ? '--' : $row['mlog_subject']; + $row['mlog_subject'] = ( strpos( $row['mlog_subject'], "=?".IPS_DOC_CHAR_SET."?Q?" ) !== FALSE ) + ? str_replace( "=?".IPS_DOC_CHAR_SET."?Q?", "", str_replace( "?=", "", preg_replace_callback( '/=([A-F0-9]{2})/', create_function( '$match', 'return chr( hexdec( "$match[1]" ) );' ), $row['mlog_subject'] ) ) ) + : $row['mlog_subject']; + + $rows[] = $row; + } + + $this->registry->output->html .= $this->html->emailerrorlogsWrapper( $rows, $links ); + } + + /** + * View an individual email + * + * @access private + * @return void [Outputs to screen] + */ + private function _viewEmail() + { + if ( $this->request['id'] == "" ) + { + $this->registry->output->showError( $this->lang->words['erlog_404'], 11117 ); + } + + $id = intval($this->request['id']); + + $row = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'mail_error_logs', 'where' => "mlog_id={$id}" ) ); + + if ( ! $row['mlog_id'] ) + { + $this->registry->output->showError( $this->lang->words['erlog_404'], 11118 ); + } + + $row['_date'] = $this->registry->class_localization->getDate( $row['mlog_date'], 'LONG' ); + $row['mlog_content'] = nl2br($row['mlog_content']); + + $row['mlog_subject'] = ( strpos( $row['mlog_subject'], "=?".IPS_DOC_CHAR_SET."?Q?" ) !== FALSE ) + ? str_replace( "=?".IPS_DOC_CHAR_SET."?Q?", "", str_replace( "?=", "", preg_replace_callback( '/=([A-F0-9]{2})/', create_function( '$match', 'return chr( hexdec( "$match[1]" ) );' ), $row['mlog_subject'] ) ) ) + : $row['mlog_subject']; + + $row['mlog_msg'] = $row['mlog_msg'] ? $row['mlog_msg'] : $this->lang->words['erlog_noinfo']; + $row['mlog_code'] = $row['mlog_code'] ? $row['mlog_code'] : $this->lang->words['erlog_noinfo']; + $row['mlog_smtp_error'] = $row['mlog_smtp_error'] ? $row['mlog_smtp_error'] : $this->lang->words['erlog_noinfo']; + + $this->registry->output->html .= $this->html->emailerrorlogsEmail( $row ); + + $this->registry->output->printPopupWindow(); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/logs/emaillogs.php b/upload/admin/applications/core/modules_admin/logs/emaillogs.php index 2c41edad..2020a1db 100644 --- a/upload/admin/applications/core/modules_admin/logs/emaillogs.php +++ b/upload/admin/applications/core/modules_admin/logs/emaillogs.php @@ -1,426 +1,428 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_core_logs_emaillogs extends ipsCommand -{ - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = $this->registry->output->loadTemplate('cp_skin_emaillogs'); - - //----------------------------------------- - // Set up stuff - //----------------------------------------- - - $this->form_code = $this->html->form_code = 'module=logs&section=emaillogs'; - $this->form_code_js = $this->html->form_code_js = 'module=logs§ion=emaillogs'; - - //----------------------------------------- - // Load lang - //----------------------------------------- - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) ); - - //----------------------------------------- - // Fix up navigation bar - //----------------------------------------- - - $this->registry->output->core_nav = array(); - $this->registry->output->ignoreCoreNav = true; - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] ); - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] ); - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=emaillogs', $this->lang->words['elog_emaillogs'] ); - - ///---------------------------------------- - // What to do... - //----------------------------------------- - - switch( $this->request['do'] ) - { - default: - case 'list': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emaillogs_view' ); - $this->_listCurrent(); - break; - - case 'remove': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emaillogs_delete' ); - $this->_remove(); - break; - - case 'viewemail': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emaillogs_view' ); - $this->_viewEmail(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Remove email logs - * - * @access private - * @return void [Outputs to screen] - */ - private function _remove() - { - if ( $this->request['type'] == 'all' ) - { - $this->DB->delete( 'email_logs' ); - } - else - { - $ids = array(); - - foreach ( $this->request as $k => $v ) - { - if ( preg_match( "/^id_(\d+)$/", $k, $match ) ) - { - if ($this->request[ $match[0] ] ) - { - $ids[] = $match[1]; - } - } - } - - $ids = IPSLib::cleanIntArray( $ids ); - - //----------------------------------------- - - if ( count($ids) < 1 ) - { - $this->registry->output->showError( $this->lang->words['elog_noneselected'], 11119 ); - } - - $this->DB->delete( 'email_logs', "email_id IN (" . implode( ',', $ids ) . ")" ); - } - - $this->registry->getClass('adminFunctions')->saveAdminLog( $this->lang->words['elog_removed'] ); - - $this->registry->output->silentRedirect( $this->settings['base_url']."&{$this->form_code}" ); - } - - /** - * List the current logs - * - * @access private - * @return void [Outputs to screen] - */ - private function _listCurrent() - { - $start = intval($this->request['st']) >= 0 ? intval($this->request['st']) : 0; - - //----------------------------------------- - // Check URL parameters - //----------------------------------------- - - $url_query = array(); - $db_query = array(); - - if ( $this->request['type'] AND $this->request['type'] != "" ) - { - $this->registry->output->html_help_title .= $this->lang->words['elog_results']; - - switch( $this->request['type'] ) - { - case 'fromid': - $url_query[] = 'type=fromid'; - $url_query[] = 'id=' . intval($this->request['id']); - $db_query[] = 'email.from_member_id=' . intval($this->request['id']); - break; - - case 'toid': - $url_query[] = 'type=toid'; - $url_query[] = 'id=' . intval($this->request['id']); - $db_query[] = 'email.to_member_id=' . intval($this->request['id']); - break; - - case 'subject': - $string = IPSText::parseCleanValue( urldecode($this->request['string']) ); - - if ( $string == "" ) - { - $this->registry->output->showError( $this->lang->words['elog_notsearched'], 11120 ); - } - - $url_query[] = 'type=' . $this->request['type']; - $url_query[] = 'string=' . urlencode($string); - $db_query[] = $this->request['match'] == 'loose' ? "email.email_subject LIKE '%{$string}%'" : "email.email_subject='{$string}'"; - break; - - case 'content': - $string = IPSText::parseCleanValue( urldecode($this->request['string']) ); - - if ( $string == "" ) - { - $this->registry->output->showError( $this->lang->words['elog_notsearched'], 11121 ); - } - - $url_query[] = 'type=' . $this->request['type']; - $url_query[] = 'string=' . urlencode($string); - $db_query[] = $this->request['match'] == 'loose' ? "email.email_content LIKE '%{$string}%'" : "email.email_content='{$string}'"; - break; - - case 'email_from': - $string = IPSText::parseCleanValue( urldecode($this->request['string']) ); - - if ( $string == "" ) - { - $this->registry->output->showError( $this->lang->words['elog_notsearched'], 11122 ); - } - - $url_query[] = 'type=' . $this->request['type']; - $url_query[] = 'string=' . urlencode($string); - $db_query[] = $this->request['match'] == 'loose' ? "email.from_email_address LIKE '%{$string}%'" : "email.from_email_address='{$string}'"; - break; - - case 'email_to': - $string = IPSText::parseCleanValue( urldecode($this->request['string']) ); - - if ( $string == "" ) - { - $this->registry->output->showError( $this->lang->words['elog_notsearched'], 11123 ); - } - - $url_query[] = 'type=' . $this->request['type']; - $url_query[] = 'string=' . urlencode($string); - $db_query[] = $this->request['match'] == 'loose' ? "email.to_email_address LIKE '%{$string}%'" : "email.to_email_address='{$string}'"; - break; - - case 'name_from': - $string = IPSText::parseCleanValue( urldecode($this->request['string']) ); - - if ( $string == "" ) - { - $this->registry->output->showError( $this->lang->words['elog_notsearched'], 11124 ); - } - - if ( $this->request['match'] == 'loose' ) - { - $this->DB->build( array( 'select' => 'member_id', 'from' => 'members', 'where' => "members_display_name LIKE '%{$string}%'" ) ); - $this->DB->execute(); - - if ( ! $this->DB->getTotalRows() ) - { - $this->registry->output->showError( $this->lang->words['elog_nomatches'], 111160 ); - } - - $ids = array(); - - while ( $r = $this->DB->fetch() ) - { - $ids[] = $r['member_id']; - } - - $db_query[] = 'email.from_member_id IN(' . implode( ',', $ids ) . ')'; - } - else - { - $r = $this->DB->buildAndFetch( array( 'select' => 'member_id', 'from' => 'members', 'where' => "members_display_name='{$string}'" ) ); - - if ( ! $r['member_id'] ) - { - $this->registry->output->showError( $this->lang->words['elog_nomatches'], 11125 ); - } - - $db_query[] = 'email.from_member_id=' . $r['member_id']; - } - - $url_query[] = 'type=' . $this->request['type']; - $url_query[] = 'string=' . urlencode($string); - break; - - case 'name_to': - $string = urldecode($this->request['string']); - - if ( $string == "" ) - { - $this->registry->output->showError( $this->lang->words['elog_notsearched'], 11126 ); - } - - if ( $this->request['match'] == 'loose' ) - { - $this->DB->build( array( 'select' => 'member_id', 'from' => 'members', 'where' => "members_display_name LIKE '%{$string}%'" ) ); - $this->DB->execute(); - - if ( ! $this->DB->getTotalRows() ) - { - $this->registry->output->showError( $this->lang->words['elog_nomatches'], 11127 ); - } - - $ids = array(); - - while ( $r = $this->DB->fetch() ) - { - $ids[] = $r['member_id']; - } - - $db_query[] = 'email.to_member_id IN(' . implode( ',', $ids ) . ')'; - } - else - { - $r = $this->DB->buildAndFetch( array( 'select' => 'member_id', 'from' => 'members', 'where' => "members_display_name='{$string}'" ) ); - - if ( ! $r['member_id'] ) - { - $this->registry->output->showError( $this->lang->words['elog_nomatches'], 11128 ); - } - - $db_query[] = 'email.to_member_id=' . $r['member_id']; - } - - $url_query[] = 'type=' . $this->request['type']; - $url_query[] = 'string=' . urlencode($string); - break; - } - } - - if( $this->request['match'] ) - { - $url_query[] = 'match=' . $this->request['match']; - } - - //----------------------------------------- - // LIST 'EM - //----------------------------------------- - - $dbe = ""; - $url = ""; - - if ( count($db_query) > 0 ) - { - $dbe = implode(' AND ', $db_query ); - } - - if ( count($url_query) > 0 ) - { - $url = '&' . implode( '&', $url_query ); - } - - $count = $this->DB->buildAndFetch( array( 'select' => 'count(email.email_id) as cnt', - 'from' => 'email_logs email', - 'where' => $dbe ) ); - - $links = $this->registry->output->generatePagination( array( 'totalItems' => $count['cnt'], - 'itemsPerPage' => 25, - 'currentStartValue' => $start, - 'baseUrl' => $this->settings['base_url'] . "&{$this->form_code}" . $url, - ) - ); - - $this->DB->build( array( 'select' => 'email.*', - 'from' => array( 'email_logs' => 'email' ), - 'where' => $dbe, - 'order' => 'email.email_date DESC', - 'limit' => array( $start, 25 ), - 'add_join' => array( - array( 'select' => 'm.member_id, m.members_display_name', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=email.from_member_id', - 'type' => 'left' - ), - array( 'select' => 'mem.member_id as to_id, mem.members_display_name as to_name', - 'from' => array( 'members' => 'mem' ), - 'where' => 'mem.member_id=email.to_member_id', - 'type' => 'left' - ), - ) - ) ); - $this->DB->execute(); - - while ( $row = $this->DB->fetch() ) - { - $row['_date'] = $this->registry->class_localization->getDate( $row['email_date'], 'SHORT' ); - - $rows[] = $row; - } - - $this->registry->output->html .= $this->html->emaillogsWrapper( $rows, $links ); - } - - /** - * View a single email - * - * @access private - * @return void [Outputs to screen] - */ - private function _viewEmail() - { - if ( $this->request['id'] == "" ) - { - $this->registry->output->showError( $this->lang->words['elog_log_404'], 11129 ); - } - - $id = intval($this->request['id']); - - $row = $this->DB->buildAndFetch( array( 'select' => 'email.*', - 'from' => array( 'email_logs' => 'email' ), - 'where' => 'email.email_id=' . $id, - 'add_join' => array( - array( 'select' => 'm.member_id, m.members_display_name as name', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=email.from_member_id', - 'type' => 'left' - ), - array( 'select' => 'mem.member_id as to_id, mem.members_display_name as to_name', - 'from' => array( 'members' => 'mem' ), - 'where' => 'mem.member_id=email.to_member_id', - 'type' => 'left' - ), - ) - ) ); - - if ( ! $row['email_id'] ) - { - $this->registry->output->showError( $this->lang->words['elog_log_404'], 11130 ); - } - - $row['_date'] = $this->registry->class_localization->getDate( $row['email_date'], 'LONG' ); - - $this->registry->output->html .= $this->html->emaillogsEmail( $row ); - - $this->registry->output->printPopupWindow(); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Email logs + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 27th January 2004 + * @version $Rev: 5713 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_logs_emaillogs extends ipsCommand +{ + /** + * Skin object + * + * @access private + * @var object Skin templates + */ + private $html; + + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = $this->registry->output->loadTemplate('cp_skin_emaillogs'); + + //----------------------------------------- + // Set up stuff + //----------------------------------------- + + $this->form_code = $this->html->form_code = 'module=logs&section=emaillogs'; + $this->form_code_js = $this->html->form_code_js = 'module=logs§ion=emaillogs'; + + //----------------------------------------- + // Load lang + //----------------------------------------- + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) ); + + //----------------------------------------- + // Fix up navigation bar + //----------------------------------------- + + $this->registry->output->core_nav = array(); + $this->registry->output->ignoreCoreNav = true; + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] ); + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] ); + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=emaillogs', $this->lang->words['elog_emaillogs'] ); + + ///---------------------------------------- + // What to do... + //----------------------------------------- + + switch( $this->request['do'] ) + { + default: + case 'list': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emaillogs_view' ); + $this->_listCurrent(); + break; + + case 'remove': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emaillogs_delete' ); + $this->_remove(); + break; + + case 'viewemail': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emaillogs_view' ); + $this->_viewEmail(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Remove email logs + * + * @access private + * @return void [Outputs to screen] + */ + private function _remove() + { + if ( $this->request['type'] == 'all' ) + { + $this->DB->delete( 'email_logs' ); + } + else + { + $ids = array(); + + foreach ( $this->request as $k => $v ) + { + if ( preg_match( "/^id_(\d+)$/", $k, $match ) ) + { + if ($this->request[ $match[0] ] ) + { + $ids[] = $match[1]; + } + } + } + + $ids = IPSLib::cleanIntArray( $ids ); + + //----------------------------------------- + + if ( count($ids) < 1 ) + { + $this->registry->output->showError( $this->lang->words['elog_noneselected'], 11119 ); + } + + $this->DB->delete( 'email_logs', "email_id IN (" . implode( ',', $ids ) . ")" ); + } + + $this->registry->getClass('adminFunctions')->saveAdminLog( $this->lang->words['elog_removed'] ); + + $this->registry->output->silentRedirect( $this->settings['base_url']."&{$this->form_code}" ); + } + + /** + * List the current logs + * + * @access private + * @return void [Outputs to screen] + */ + private function _listCurrent() + { + $start = intval($this->request['st']) >= 0 ? intval($this->request['st']) : 0; + + //----------------------------------------- + // Check URL parameters + //----------------------------------------- + + $url_query = array(); + $db_query = array(); + + if ( $this->request['type'] AND $this->request['type'] != "" ) + { + $this->registry->output->html_help_title .= $this->lang->words['elog_results']; + + switch( $this->request['type'] ) + { + case 'fromid': + $url_query[] = 'type=fromid'; + $url_query[] = 'id=' . intval($this->request['id']); + $db_query[] = 'email.from_member_id=' . intval($this->request['id']); + break; + + case 'toid': + $url_query[] = 'type=toid'; + $url_query[] = 'id=' . intval($this->request['id']); + $db_query[] = 'email.to_member_id=' . intval($this->request['id']); + break; + + case 'subject': + $string = IPSText::parseCleanValue( urldecode($this->request['string']) ); + + if ( $string == "" ) + { + $this->registry->output->showError( $this->lang->words['elog_notsearched'], 11120 ); + } + + $url_query[] = 'type=' . $this->request['type']; + $url_query[] = 'string=' . urlencode($string); + $db_query[] = $this->request['match'] == 'loose' ? "email.email_subject LIKE '%{$string}%'" : "email.email_subject='{$string}'"; + break; + + case 'content': + $string = IPSText::parseCleanValue( urldecode($this->request['string']) ); + + if ( $string == "" ) + { + $this->registry->output->showError( $this->lang->words['elog_notsearched'], 11121 ); + } + + $url_query[] = 'type=' . $this->request['type']; + $url_query[] = 'string=' . urlencode($string); + $db_query[] = $this->request['match'] == 'loose' ? "email.email_content LIKE '%{$string}%'" : "email.email_content='{$string}'"; + break; + + case 'email_from': + $string = IPSText::parseCleanValue( urldecode($this->request['string']) ); + + if ( $string == "" ) + { + $this->registry->output->showError( $this->lang->words['elog_notsearched'], 11122 ); + } + + $url_query[] = 'type=' . $this->request['type']; + $url_query[] = 'string=' . urlencode($string); + $db_query[] = $this->request['match'] == 'loose' ? "email.from_email_address LIKE '%{$string}%'" : "email.from_email_address='{$string}'"; + break; + + case 'email_to': + $string = IPSText::parseCleanValue( urldecode($this->request['string']) ); + + if ( $string == "" ) + { + $this->registry->output->showError( $this->lang->words['elog_notsearched'], 11123 ); + } + + $url_query[] = 'type=' . $this->request['type']; + $url_query[] = 'string=' . urlencode($string); + $db_query[] = $this->request['match'] == 'loose' ? "email.to_email_address LIKE '%{$string}%'" : "email.to_email_address='{$string}'"; + break; + + case 'name_from': + $string = IPSText::parseCleanValue( urldecode($this->request['string']) ); + + if ( $string == "" ) + { + $this->registry->output->showError( $this->lang->words['elog_notsearched'], 11124 ); + } + + if ( $this->request['match'] == 'loose' ) + { + $this->DB->build( array( 'select' => 'member_id', 'from' => 'members', 'where' => "members_display_name LIKE '%{$string}%'" ) ); + $this->DB->execute(); + + if ( ! $this->DB->getTotalRows() ) + { + $this->registry->output->showError( $this->lang->words['elog_nomatches'], 111160 ); + } + + $ids = array(); + + while ( $r = $this->DB->fetch() ) + { + $ids[] = $r['member_id']; + } + + $db_query[] = 'email.from_member_id IN(' . implode( ',', $ids ) . ')'; + } + else + { + $r = $this->DB->buildAndFetch( array( 'select' => 'member_id', 'from' => 'members', 'where' => "members_display_name='{$string}'" ) ); + + if ( ! $r['member_id'] ) + { + $this->registry->output->showError( $this->lang->words['elog_nomatches'], 11125 ); + } + + $db_query[] = 'email.from_member_id=' . $r['member_id']; + } + + $url_query[] = 'type=' . $this->request['type']; + $url_query[] = 'string=' . urlencode($string); + break; + + case 'name_to': + $string = urldecode($this->request['string']); + + if ( $string == "" ) + { + $this->registry->output->showError( $this->lang->words['elog_notsearched'], 11126 ); + } + + if ( $this->request['match'] == 'loose' ) + { + $this->DB->build( array( 'select' => 'member_id', 'from' => 'members', 'where' => "members_display_name LIKE '%{$string}%'" ) ); + $this->DB->execute(); + + if ( ! $this->DB->getTotalRows() ) + { + $this->registry->output->showError( $this->lang->words['elog_nomatches'], 11127 ); + } + + $ids = array(); + + while ( $r = $this->DB->fetch() ) + { + $ids[] = $r['member_id']; + } + + $db_query[] = 'email.to_member_id IN(' . implode( ',', $ids ) . ')'; + } + else + { + $r = $this->DB->buildAndFetch( array( 'select' => 'member_id', 'from' => 'members', 'where' => "members_display_name='{$string}'" ) ); + + if ( ! $r['member_id'] ) + { + $this->registry->output->showError( $this->lang->words['elog_nomatches'], 11128 ); + } + + $db_query[] = 'email.to_member_id=' . $r['member_id']; + } + + $url_query[] = 'type=' . $this->request['type']; + $url_query[] = 'string=' . urlencode($string); + break; + } + } + + if( $this->request['match'] ) + { + $url_query[] = 'match=' . $this->request['match']; + } + + //----------------------------------------- + // LIST 'EM + //----------------------------------------- + + $dbe = ""; + $url = ""; + + if ( count($db_query) > 0 ) + { + $dbe = implode(' AND ', $db_query ); + } + + if ( count($url_query) > 0 ) + { + $url = '&' . implode( '&', $url_query ); + } + + $count = $this->DB->buildAndFetch( array( 'select' => 'count(email.email_id) as cnt', + 'from' => 'email_logs email', + 'where' => $dbe ) ); + + $links = $this->registry->output->generatePagination( array( 'totalItems' => $count['cnt'], + 'itemsPerPage' => 25, + 'currentStartValue' => $start, + 'baseUrl' => $this->settings['base_url'] . "&{$this->form_code}" . $url, + ) + ); + + $this->DB->build( array( 'select' => 'email.*', + 'from' => array( 'email_logs' => 'email' ), + 'where' => $dbe, + 'order' => 'email.email_date DESC', + 'limit' => array( $start, 25 ), + 'add_join' => array( + array( 'select' => 'm.member_id, m.members_display_name', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=email.from_member_id', + 'type' => 'left' + ), + array( 'select' => 'mem.member_id as to_id, mem.members_display_name as to_name', + 'from' => array( 'members' => 'mem' ), + 'where' => 'mem.member_id=email.to_member_id', + 'type' => 'left' + ), + ) + ) ); + $this->DB->execute(); + + while ( $row = $this->DB->fetch() ) + { + $row['_date'] = $this->registry->class_localization->getDate( $row['email_date'], 'SHORT' ); + + $rows[] = $row; + } + + $this->registry->output->html .= $this->html->emaillogsWrapper( $rows, $links ); + } + + /** + * View a single email + * + * @access private + * @return void [Outputs to screen] + */ + private function _viewEmail() + { + if ( $this->request['id'] == "" ) + { + $this->registry->output->showError( $this->lang->words['elog_log_404'], 11129 ); + } + + $id = intval($this->request['id']); + + $row = $this->DB->buildAndFetch( array( 'select' => 'email.*', + 'from' => array( 'email_logs' => 'email' ), + 'where' => 'email.email_id=' . $id, + 'add_join' => array( + array( 'select' => 'm.member_id, m.members_display_name as name', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=email.from_member_id', + 'type' => 'left' + ), + array( 'select' => 'mem.member_id as to_id, mem.members_display_name as to_name', + 'from' => array( 'members' => 'mem' ), + 'where' => 'mem.member_id=email.to_member_id', + 'type' => 'left' + ), + ) + ) ); + + if ( ! $row['email_id'] ) + { + $this->registry->output->showError( $this->lang->words['elog_log_404'], 11130 ); + } + + $row['_date'] = $this->registry->class_localization->getDate( $row['email_date'], 'LONG' ); + + $this->registry->output->html .= $this->html->emaillogsEmail( $row ); + + $this->registry->output->printPopupWindow(); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/logs/errorlogs.php b/upload/admin/applications/core/modules_admin/logs/errorlogs.php index eb1f57b6..2fdec191 100644 --- a/upload/admin/applications/core/modules_admin/logs/errorlogs.php +++ b/upload/admin/applications/core/modules_admin/logs/errorlogs.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Error logs - * Last Updated: $LastChangedDate: 2009-11-23 12:23:43 -0500 (Mon, 23 Nov 2009) $ + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th January 2004 - * @version $Rev: 5457 $ + * @version $Rev: 5713 $ */ if ( ! defined( 'IN_ACP' ) ) diff --git a/upload/admin/applications/core/modules_admin/logs/index.html b/upload/admin/applications/core/modules_admin/logs/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/logs/index.html +++ b/upload/admin/applications/core/modules_admin/logs/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/logs/mobilelogs.php b/upload/admin/applications/core/modules_admin/logs/mobilelogs.php new file mode 100644 index 00000000..f96db259 --- /dev/null +++ b/upload/admin/applications/core/modules_admin/logs/mobilelogs.php @@ -0,0 +1,191 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Mobile Notification logs + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 5713 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_logs_mobilelogs extends ipsCommand +{ + /** + * Skin object + * + * @access private + * @var object Skin templates + */ + private $html; + + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = $this->registry->output->loadTemplate('cp_skin_mobilelogs'); + + //----------------------------------------- + // Set up stuff + //----------------------------------------- + + $this->form_code = $this->html->form_code = 'module=logs&section=mobilelogs'; + $this->form_code_js = $this->html->form_code_js = 'module=logs§ion=mobilelogs'; + + //----------------------------------------- + // Load lang + //----------------------------------------- + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) ); + + //----------------------------------------- + // Fix up navigation bar + //----------------------------------------- + + $this->registry->output->core_nav = array(); + $this->registry->output->ignoreCoreNav = true; + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] ); + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] ); + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=mobilelogs', $this->lang->words['mlog_mobilelogs'] ); + + ///---------------------------------------- + // What to do... + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'remove': + $this->_remove(); + break; + + default: + $this->_listCurrent(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Remove log + * + * @access private + * @return void [Outputs to screen] + */ + protected function _remove() + { + if( $this->request['type'] == 'all' ) + { + $this->DB->delete( 'mobile_notifications' ); + } + else + { + $ids = array(); + + foreach( $this->request as $k => $v ) + { + if ( preg_match( "/^id_(\d+)$/", $k, $match ) ) + { + if ($this->request[ $match[0] ] ) + { + $ids[] = $match[1]; + } + } + } + + $ids = IPSLib::cleanIntArray( $ids ); + + //----------------------------------------- + + if( count($ids) < 1 ) + { + $this->registry->output->showError( $this->lang->words['erlog_noneselected'], 11115 ); + } + + $this->DB->delete( 'mobile_notifications', "id IN (" . implode( ',', $ids ) . ")" ); + } + + $this->registry->output->silentRedirect( $this->settings['base_url']."&{$this->form_code}" ); + } + + /** + * List the current logs + * + * @access private + * @return void [Outputs to screen] + */ + protected function _listCurrent() + { + /* INIT */ + $rows = array(); + $st = $this->request['st'] ? intval( $this->request['st'] ) : 0; + $perPage = 25; + + /* Pagination */ + $total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as logs', 'from' => 'mobile_notifications' ) ); + + $pageLinks = $this->registry->output->generatePagination( array( + 'totalItems' => $total['logs'], + 'itemsPerPage' => $perPage, + 'currentStartValue' => $st, + 'baseUrl' => $this->settings['base_url'] . $this->form_code, + ) ); + + /* Query the logs */ + $this->DB->build( array( + 'select' => 'n.*', + 'from' => array( 'mobile_notifications' => 'n' ), + 'order' => 'n.notify_date DESC', + 'limit' => array( $st, $perPage ), + 'add_join' => array( + array( + 'select' => 'm.members_display_name', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=n.member_id', + 'type' => 'left' + ) + ) + ) ); + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $row['_time'] = $this->registry->class_localization->getDate( $row['notify_date'], 'LONG' ); + $row['notify_title'] = strip_tags( $row['notify_title'] ); + $row['_sent'] = $row['notify_sent'] ? 'aff_tick.png' : 'aff_cross.png'; + + $rows[] = $row; + } + + //----------------------------------------- + // And output + //----------------------------------------- + + $this->registry->output->html .= $this->html->mobileLogsWrapper( $rows, $pageLinks ); + } +} diff --git a/upload/admin/applications/core/modules_admin/logs/modlogs.php b/upload/admin/applications/core/modules_admin/logs/modlogs.php index 712dbdc9..f54f477b 100644 --- a/upload/admin/applications/core/modules_admin/logs/modlogs.php +++ b/upload/admin/applications/core/modules_admin/logs/modlogs.php @@ -1,337 +1,339 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_core_logs_modlogs extends ipsCommand -{ - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = $this->registry->output->loadTemplate('cp_skin_modlogs'); - - //----------------------------------------- - // Set up stuff - //----------------------------------------- - - $this->form_code = $this->html->form_code = 'module=logs&section=modlogs'; - $this->form_code_js = $this->html->form_code_js = 'module=logs§ion=modlogs'; - - //----------------------------------------- - // Load lang - //----------------------------------------- - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) ); - - //----------------------------------------- - // Fix up navigation bar - //----------------------------------------- - - $this->registry->output->core_nav = array(); - $this->registry->output->ignoreCoreNav = true; - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] ); - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] ); - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=modlogs', $this->lang->words['mlog_modlogs'] ); - - ///---------------------------------------- - // What to do... - //----------------------------------------- - - switch( $this->request['do'] ) - { - case 'view': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'modlogs_view' ); - $this->_view(); - break; - - case 'remove': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'modlogs_delete' ); - $this->_remove(); - break; - - default: - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'modlogs_view' ); - $this->_listCurrent(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * View all logs for a given moderator - * - * @access private - * @return void [Outputs to screen] - */ - private function _view() - { - ///---------------------------------------- - // Basic init - //----------------------------------------- - - $start = intval($this->request['st']) >= 0 ? intval($this->request['st']) : 0; - - ///---------------------------------------- - // No mid or search string? - //----------------------------------------- - - if ( !$this->request['search_string'] AND !$this->request['mid'] ) - { - $this->registry->output->global_message = $this->lang->words['mlog_nostring']; - $this->_listCurrent(); - return; - } - - ///---------------------------------------- - // mid? - //----------------------------------------- - - if ( !$this->request['search_string'] ) - { - $row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(id) as count', 'from' => 'moderator_logs', 'where' => "member_id=" . intval($this->request['mid']) ) ); - - $row_count = $row['count']; - - $query = "&{$this->form_code}&mid=" . $this->request['mid'] . "&do=view"; - - $this->DB->build( array( 'select' => 'm.*', - 'from' => array( 'moderator_logs' => 'm' ), - 'where' => 'm.member_id=' . intval($this->request['mid']), - 'order' => 'm.ctime DESC', - 'limit' => array( $start, 20 ), - 'add_join' => array( - array( 'select' => 'mem.members_display_name', - 'from' => array( 'members' => 'mem' ), - 'where' => 'mem.member_id=m.member_id', - 'type' => 'left', - ), - array( 'select' => 'f.id as forum_id, f.name', - 'from' => array( 'forums' => 'f' ), - 'where' => 'f.id=m.forum_id', - 'type' => 'left', - ), - ) - ) ); - $this->DB->execute(); - } - else - { - $this->request[ 'search_string'] = IPSText::parseCleanValue( urldecode($this->request['search_string'] ) ); - - if( !$this->DB->checkForField( $this->request['search_type'], 'moderator_logs' ) ) - { - $this->registry->output->showError( $this->lang->words['mlog_whatfield'], 4111 ); - } - - if( $this->request['search_type'] == 'topic_id' OR $this->request['search_type'] == 'forum_id' ) - { - $dbq = "m." . $this->request['search_type'] . "='" . $this->request['search_string'] . "'"; - } - else - { - $dbq = "m." . $this->request['search_type'] . " LIKE '%" . $this->request['search_string'] . "%'"; - } - - $row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(m.member_id) as count', 'from' => 'moderator_logs m', 'where' => $dbq ) ); - - $row_count = $row['count']; - - $query = "&{$this->form_code}&do=view&search_type=" . $this->request['search_type'] . "&search_string=".urlencode($this->request['search_string']); - - $this->DB->build( array( 'select' => 'm.*', - 'from' => array( 'moderator_logs' => 'm' ), - 'where' => $dbq, - 'order' => 'm.ctime DESC', - 'limit' => array( $start, 20 ), - 'add_join' => array( - array( 'select' => 'mem.members_display_name', - 'from' => array( 'members' => 'mem' ), - 'where' => 'mem.member_id=m.member_id', - 'type' => 'left', - ), - array( 'select' => 'f.id as forum_id, f.name', - 'from' => array( 'forums' => 'f' ), - 'where' => 'f.id=m.forum_id', - 'type' => 'left', - ), - ) - ) ); - $this->DB->execute(); - } - - ///---------------------------------------- - // Page links - //----------------------------------------- - - $links = $this->registry->output->generatePagination( array( 'totalItems' => $row_count, - 'itemsPerPage' => 20, - 'currentStartValue' => $start, - 'baseUrl' => $this->settings['base_url'] . $query, - ) - ); - - ///---------------------------------------- - // Get db results - //----------------------------------------- - - while ( $row = $this->DB->fetch() ) - { - $row['_time'] = $this->registry->class_localization->getDate( $row['ctime'], 'LONG' ); - $row['topic'] = $row['topic_id'] ? $this->lang->words['mlog_topicid'] . $row['topic_id'] : ' '; - $row['http_referer'] = preg_replace( "/s=(\w){32}/" , "", $row['http_referer'] ); - - $rows[] = $row; - } - - ///---------------------------------------- - // And output - //----------------------------------------- - - $this->registry->output->html .= $this->html->modlogsView( $rows, $links ); - } - - /** - * Remove logs by a moderator - * - * @access private - * @return void [Outputs to screen] - */ - private function _remove() - { - if ( $this->request['mid'] == "" ) - { - $this->registry->output->showError( $this->lang->words['mlog_noid'], 11131 ); - } - - $this->DB->delete( 'moderator_logs', "member_id=" . intval($this->request['mid']) ); - - $this->registry->getClass('adminFunctions')->saveAdminLog( $this->lang->words['mlog_removed'] . $this->request['mid'] ); - - $this->registry->output->silentRedirect( $this->settings['base_url'] . "&{$this->form_code}" ); - } - - /** - * List the current logs with links to view per-admin - * - * @access private - * @return void [Outputs to screen] - */ - private function _listCurrent() - { - $rows = array(); - $admins = array(); - - //----------------------------------------- - // VIEW LAST 5 - //----------------------------------------- - - $this->DB->build( array( 'select' => 'm.*', - 'from' => array( 'moderator_logs' => 'm' ), - 'order' => 'm.ctime DESC', - 'limit' => array( 0, 5 ), - 'add_join' => array( - array( 'select' => 'mem.members_display_name', - 'from' => array( 'members' => 'mem' ), - 'where' => 'mem.member_id=m.member_id', - 'type' => 'left', - ), - array( 'select' => 'f.id as forum_id, f.name', - 'from' => array( 'forums' => 'f' ), - 'where' => 'f.id=m.forum_id', - 'type' => 'left', - ), - ) - ) ); - $this->DB->execute(); - - while ( $row = $this->DB->fetch() ) - { - $row['_time'] = $this->registry->class_localization->getDate( $row['ctime'], 'LONG' ); - $row['topic'] = $row['topic_id'] ? $this->lang->words['mlog_topicid'] . $row['topic_id'] : ' '; - $row['http_referer'] = preg_replace( "/s=(\w){32}/" , "", $row['http_referer'] ); - - $rows[] = $row; - } - - //----------------------------------------- - // All mods - //----------------------------------------- - - $this->DB->build( array( - 'select' => 'member_id, count(member_id) as act_count', - 'from' => 'moderator_logs', - 'group' => 'member_id', - 'order' => 'act_count DESC' - ) ); - - $this->DB->execute(); - - $_members = array(); - $_store = array(); - while ( $r = $this->DB->fetch() ) - { - $_members[] = $r['member_id']; - $_store[ $r['member_id'] ] = $r; - } - - if ( !empty( $_members ) ) - { - $this->DB->build( array( 'select' => 'member_id, members_display_name', - 'from' => 'members', - 'where' => 'member_id IN (' . implode( ',', $_members ) . ')', - ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $admins[] = array_merge( $r, $_store[ $r['member_id'] ] ); - } - } - - //----------------------------------------- - // And output - //----------------------------------------- - - $this->registry->output->html .= $this->html->modlogsWrapper( $rows, $admins ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Moderator logs + * Last Updated: $LastChangedDate: 2010-09-24 21:21:39 -0400 (Fri, 24 Sep 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 27th January 2004 + * @version $Rev: 6915 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_logs_modlogs extends ipsCommand +{ + /** + * Skin object + * + * @access protected + * @var object Skin templates + */ + protected $html; + + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = $this->registry->output->loadTemplate('cp_skin_modlogs'); + + //----------------------------------------- + // Set up stuff + //----------------------------------------- + + $this->form_code = $this->html->form_code = 'module=logs&section=modlogs'; + $this->form_code_js = $this->html->form_code_js = 'module=logs§ion=modlogs'; + + //----------------------------------------- + // Load lang + //----------------------------------------- + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) ); + + //----------------------------------------- + // Fix up navigation bar + //----------------------------------------- + + $this->registry->output->core_nav = array(); + $this->registry->output->ignoreCoreNav = true; + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] ); + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] ); + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=modlogs', $this->lang->words['mlog_modlogs'] ); + + ///---------------------------------------- + // What to do... + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'view': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'modlogs_view' ); + $this->_view(); + break; + + case 'remove': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'modlogs_delete' ); + $this->_remove(); + break; + + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'modlogs_view' ); + $this->_listCurrent(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * View all logs for a given moderator + * + * @access protected + * @return void [Outputs to screen] + */ + protected function _view() + { + ///---------------------------------------- + // Basic init + //----------------------------------------- + + $start = intval($this->request['st']) >= 0 ? intval($this->request['st']) : 0; + + ///---------------------------------------- + // No mid or search string? + //----------------------------------------- + + if ( !$this->request['search_string'] AND !$this->request['mid'] ) + { + $this->registry->output->global_message = $this->lang->words['mlog_nostring']; + $this->_listCurrent(); + return; + } + + ///---------------------------------------- + // mid? + //----------------------------------------- + + if ( !$this->request['search_string'] ) + { + $row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(id) as count', 'from' => 'moderator_logs', 'where' => "member_id=" . intval($this->request['mid']) ) ); + + $row_count = $row['count']; + + $query = "&{$this->form_code}&mid=" . $this->request['mid'] . "&do=view"; + + $this->DB->build( array( 'select' => 'm.*', + 'from' => array( 'moderator_logs' => 'm' ), + 'where' => 'm.member_id=' . intval($this->request['mid']), + 'order' => 'm.ctime DESC', + 'limit' => array( $start, 20 ), + 'add_join' => array( + array( 'select' => 'mem.members_display_name', + 'from' => array( 'members' => 'mem' ), + 'where' => 'mem.member_id=m.member_id', + 'type' => 'left', + ), + array( 'select' => 'f.id as forum_id, f.name', + 'from' => array( 'forums' => 'f' ), + 'where' => 'f.id=m.forum_id', + 'type' => 'left', + ), + ) + ) ); + $this->DB->execute(); + } + else + { + $this->request['search_string'] = IPSText::parseCleanValue( urldecode($this->request['search_string'] ) ); + + if( !$this->DB->checkForField( $this->request['search_type'], 'moderator_logs' ) ) + { + $this->registry->output->showError( $this->lang->words['mlog_whatfield'], 4111 ); + } + + if( $this->request['search_type'] == 'topic_id' OR $this->request['search_type'] == 'forum_id' ) + { + $dbq = "m." . $this->request['search_type'] . "='" . $this->request['search_string'] . "'"; + } + else + { + $dbq = "m." . $this->request['search_type'] . " LIKE '%" . $this->request['search_string'] . "%'"; + } + + $row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(m.member_id) as count', 'from' => 'moderator_logs m', 'where' => $dbq ) ); + + $row_count = $row['count']; + + $query = "&{$this->form_code}&do=view&search_type=" . $this->request['search_type'] . "&search_string=".urlencode($this->request['search_string']); + + $this->DB->build( array( 'select' => 'm.*', + 'from' => array( 'moderator_logs' => 'm' ), + 'where' => $dbq, + 'order' => 'm.ctime DESC', + 'limit' => array( $start, 20 ), + 'add_join' => array( + array( 'select' => 'mem.members_display_name', + 'from' => array( 'members' => 'mem' ), + 'where' => 'mem.member_id=m.member_id', + 'type' => 'left', + ), + array( 'select' => 'f.id as forum_id, f.name', + 'from' => array( 'forums' => 'f' ), + 'where' => 'f.id=m.forum_id', + 'type' => 'left', + ), + ) + ) ); + $this->DB->execute(); + } + + ///---------------------------------------- + // Page links + //----------------------------------------- + + $links = $this->registry->output->generatePagination( array( 'totalItems' => $row_count, + 'itemsPerPage' => 20, + 'currentStartValue' => $start, + 'baseUrl' => $this->settings['base_url'] . $query, + ) + ); + + ///---------------------------------------- + // Get db results + //----------------------------------------- + + while ( $row = $this->DB->fetch() ) + { + $row['_time'] = $this->registry->class_localization->getDate( $row['ctime'], 'LONG' ); + $row['topic'] = $row['topic_id'] ? $this->lang->words['mlog_topicid'] . $row['topic_id'] : ' '; + $row['http_referer'] = preg_replace( "/s=(\w){32}/" , "", $row['http_referer'] ); + + $rows[] = $row; + } + + ///---------------------------------------- + // And output + //----------------------------------------- + + $this->registry->output->html .= $this->html->modlogsView( $rows, $links ); + } + + /** + * Remove logs by a moderator + * + * @access protected + * @return void [Outputs to screen] + */ + protected function _remove() + { + if ( $this->request['mid'] == "" ) + { + $this->registry->output->showError( $this->lang->words['mlog_noid'], 11131 ); + } + + $this->DB->delete( 'moderator_logs', "member_id=" . intval($this->request['mid']) ); + + $this->registry->getClass('adminFunctions')->saveAdminLog( $this->lang->words['mlog_removed'] . $this->request['mid'] ); + + $this->registry->output->silentRedirect( $this->settings['base_url'] . "&{$this->form_code}" ); + } + + /** + * List the current logs with links to view per-admin + * + * @access protected + * @return void [Outputs to screen] + */ + protected function _listCurrent() + { + $rows = array(); + $admins = array(); + + //----------------------------------------- + // VIEW LAST 5 + //----------------------------------------- + + $this->DB->build( array( 'select' => 'm.*', + 'from' => array( 'moderator_logs' => 'm' ), + 'order' => 'm.ctime DESC', + 'limit' => array( 0, 5 ), + 'add_join' => array( + array( 'select' => 'mem.members_display_name', + 'from' => array( 'members' => 'mem' ), + 'where' => 'mem.member_id=m.member_id', + 'type' => 'left', + ), + array( 'select' => 'f.id as forum_id, f.name', + 'from' => array( 'forums' => 'f' ), + 'where' => 'f.id=m.forum_id', + 'type' => 'left', + ), + ) + ) ); + $this->DB->execute(); + + while ( $row = $this->DB->fetch() ) + { + $row['_time'] = $this->registry->class_localization->getDate( $row['ctime'], 'LONG' ); + $row['topic'] = $row['topic_id'] ? $this->lang->words['mlog_topicid'] . $row['topic_id'] : ' '; + $row['http_referer'] = preg_replace( "/s=(\w){32}/" , "", $row['http_referer'] ); + + $rows[] = $row; + } + + //----------------------------------------- + // All mods + //----------------------------------------- + + $this->DB->build( array( + 'select' => 'member_id, count(member_id) as act_count', + 'from' => 'moderator_logs', + 'group' => 'member_id', + 'order' => 'act_count DESC' + ) ); + + $this->DB->execute(); + + $_members = array(); + $_store = array(); + while ( $r = $this->DB->fetch() ) + { + $_members[] = $r['member_id']; + $admins[ $r['member_id'] ] = $r; + } + + if ( !empty( $_members ) ) + { + $this->DB->build( array( 'select' => 'member_id, members_display_name', + 'from' => 'members', + 'where' => 'member_id IN (' . implode( ',', $_members ) . ')', + ) ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $admins[ $r['member_id'] ] = array_merge( $r, $admins[ $r['member_id'] ] ); + } + } + + //----------------------------------------- + // And output + //----------------------------------------- + + $this->registry->output->html .= $this->html->modlogsWrapper( $rows, $admins ); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/logs/spamlogs.php b/upload/admin/applications/core/modules_admin/logs/spamlogs.php index ac5e7b78..7c868a83 100644 --- a/upload/admin/applications/core/modules_admin/logs/spamlogs.php +++ b/upload/admin/applications/core/modules_admin/logs/spamlogs.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Admin logs - * Last Updated: $LastChangedDate$ + * Last Updated: $LastChangedDate: 2010-09-30 21:47:05 -0400 (Thu, 30 Sep 2010) $ + * * - * @author $Author$ + * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com - * @version $Rev$ + * @link http://www.invisionpower.com + * @version $Rev: 6929 $ */ if ( ! defined( 'IN_ACP' ) ) @@ -78,10 +80,6 @@ class admin_core_logs_spamlogs extends ipsCommand case 'remove': $this->_remove(); break; - - case 'testapi': - $this->_testApiConnection(); - break; default: $this->_listCurrent(); @@ -92,14 +90,6 @@ class admin_core_logs_spamlogs extends ipsCommand $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); $this->registry->output->sendOutput(); } - - protected function _testApiConnection() - { - /* Test the connection */ - $result = IPSMember::querySpamService( '', '', '', 1 ); - - $this->registry->output->html .= $this->html->spamServiceTest($result); - } /** * Remove log @@ -155,24 +145,38 @@ class admin_core_logs_spamlogs extends ipsCommand $rows = array(); $st = $this->request['st'] ? intval( $this->request['st'] ) : 0; $perPage = 25; + $where = ''; + $qs = ''; + + if( $this->request['search_term'] ) + { + $where = "log_msg LIKE '%{$this->request['search_term']}%' OR email_address LIKE '%{$this->request['search_term']}%'"; + $qs = '&search_term=' . $this->request['search_term']; + } /* Pagination */ - $total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as logs', 'from' => 'spam_service_log' ) ); + $total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as logs', 'from' => 'spam_service_log', 'where' => $where ) ); + if( $this->request['search_term'] ) + { + $this->registry->output->global_message = sprintf( $this->lang->words['spamlog_sresults'], $total['logs'] ); + } + $pageLinks = $this->registry->output->generatePagination( array( 'totalItems' => $total['logs'], 'itemsPerPage' => $perPage, 'currentStartValue' => $st, - 'baseUrl' => $this->settings['base_url'] . $this->form_code, + 'baseUrl' => $this->settings['base_url'] . $this->form_code . $qs, ) ); /* Query the logs */ $this->DB->build( array( - 'select' => '*', - 'from' => 'spam_service_log', - 'order' => 'log_date DESC', - 'limit' => array( $st, $perPage ), - ) ); + 'select' => '*', + 'from' => 'spam_service_log', + 'order' => 'log_date DESC', + 'where' => $where, + 'limit' => array( $st, $perPage ), + ) ); $this->DB->execute(); while( $row = $this->DB->fetch() ) diff --git a/upload/admin/applications/core/modules_admin/logs/spiderlogs.php b/upload/admin/applications/core/modules_admin/logs/spiderlogs.php index 42b33a01..48bcfdda 100644 --- a/upload/admin/applications/core/modules_admin/logs/spiderlogs.php +++ b/upload/admin/applications/core/modules_admin/logs/spiderlogs.php @@ -1,287 +1,289 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_core_logs_spiderlogs extends ipsCommand -{ - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /** - * Spider map - * - * @access private - * @var array Spider keys to values - */ - private $bot_map = array(); - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - /* Load bat names from the useragents cache */ - foreach( $this->cache->getCache( 'useragents' ) as $agent ) - { - if( $agent['uagent_type'] == 'search' ) - { - $this->bot_map[ $agent['uagent_key'] ] = $agent['uagent_name']; - } - } - - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = $this->registry->output->loadTemplate('cp_skin_spiderlogs'); - - //----------------------------------------- - // Set up stuff - //----------------------------------------- - - $this->form_code = $this->html->form_code = 'module=logs&section=spiderlogs'; - $this->form_code_js = $this->html->form_code_js = 'module=logs§ion=spiderlogs'; - - //----------------------------------------- - // Load lang - //----------------------------------------- - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) ); - - //----------------------------------------- - // Fix up navigation bar - //----------------------------------------- - - $this->registry->output->core_nav = array(); - $this->registry->output->ignoreCoreNav = true; - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] ); - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] ); - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=spiderlogs', $this->lang->words['slog_spider_logs'] ); - - ///---------------------------------------- - // What to do... - //----------------------------------------- - - switch( $this->request['do'] ) - { - case 'view': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'spiderlogs_view' ); - $this->_view(); - break; - - case 'remove': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'spiderlogs_delete' ); - $this->_remove(); - break; - - default: - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'spiderlogs_view' ); - $this->_listCurrent(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * View all logs for a given moderator - * - * @access private - * @return void [Outputs to screen] - */ - private function _view() - { - ///---------------------------------------- - // Basic init - //----------------------------------------- - - $start = intval($this->request['st']) >= 0 ? intval($this->request['st']) : 0; - - $botty = IPSText::parseCleanValue( urldecode($this->request['bid'] ) ); - $botty = str_replace( "!", "!", $botty ); - - ///---------------------------------------- - // No bid or search string? - //----------------------------------------- - - if ( !$this->request['search_string'] AND !$this->request['bid'] ) - { - $this->registry->output->global_message = $this->lang->words['slog_nostring']; - $this->_listCurrent(); - return; - } - - ///---------------------------------------- - // mid? - //----------------------------------------- - - if ( !$this->request['search_string'] ) - { - $row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "bot='{$botty}'" ) ); - - $row_count = $row['count']; - - $query = "&{$this->form_code}&bid=" . $this->request['bid'] . "&do=view"; - - $this->DB->build( array( 'select' => '*', - 'from' => 'spider_logs', - 'where' => "bot='{$botty}'", - 'order' => 'entry_date DESC', - 'limit' => array( $start, 20 ) ) ); - $this->DB->execute(); - } - else - { - $this->request[ 'search_string'] = IPSText::parseCleanValue( urldecode($this->request['search_string'] ) ); - - $row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "query_string LIKE '%" . $this->request['search_string'] . "%'" ) ); - - $row_count = $row['count']; - - $query = "&{$this->form_code}&do=view&search_string=" . urlencode($this->request['search_string']); - - $this->DB->build( array( 'select' => '*', - 'from' => 'spider_logs', - 'where' => "query_string LIKE '%" . $this->request['search_string'] . "%'", - 'order' => 'entry_date DESC', - 'limit' => array( $start, 20 ) ) ); - $this->DB->execute(); - } - - ///---------------------------------------- - // Page links - //----------------------------------------- - - $links = $this->registry->output->generatePagination( array( 'totalItems' => $row_count, - 'itemsPerPage' => 20, - 'currentStartValue' => $start, - 'baseUrl' => $this->settings['base_url'] . $query, - ) - ); - - ///---------------------------------------- - // Get db results - //----------------------------------------- - - while ( $row = $this->DB->fetch() ) - { - $extra = ""; - - if ( stripos( '#lo-fi#i', $row['query_string'] ) !== false ) - { - $extra = $this->lang->words['slog_lofi']; - - $query_string_html = $extra . ' ' . $row['query_string']; - } - else - { - $query_string_html = "settings['php_ext'] . "?{$row['query_string']}' target='_blank'>" . IPSText::truncate($row['query_string']) . ""; - } - - $row['_bot_name'] = $this->bot_map[ mb_strtolower($row['bot']) ]; - $row['_query_string'] = $query_string_html; - $row['_time'] = $this->registry->getClass('class_localization')->getDate( $row['entry_date'], 'LONG' ); - - $rows[] = $row; - } - - ///---------------------------------------- - // And output - //----------------------------------------- - - $this->registry->output->html .= $this->html->spiderlogsView( $rows, $links ); - } - - /** - * Remove logs by a moderator - * - * @access private - * @return void [Outputs to screen] - */ - private function _remove() - { - if ( $this->request['bid'] == "" ) - { - $this->registry->output->showError( $this->lang->words['slog_nologs'], 11132 ); - } - - $botty = urldecode($this->request['bid']); - $botty = str_replace( "!", "!", $botty ); - - $this->DB->delete( 'spider_logs', "bot='{$botty}'" ); - - $this->registry->getClass('adminFunctions')->saveAdminLog($this->lang->words['slog_adminlog']); - - $this->registry->output->silentRedirect( $this->settings['base_url']."&{$this->form_code}" ); - } - - - /** - * List the current logs with links to view per-admin - * - * @access private - * @return void [Outputs to screen] - */ - private function _listCurrent() - { - $spiders = array(); - - //----------------------------------------- - // All bots - //----------------------------------------- - - $this->DB->build( array( 'select' => 'count(*) as cnt, bot, max(entry_date) as entry_date', - 'from' => 'spider_logs', - 'group' => 'bot', - 'order' => 'entry_date DESC', - ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $r['_bot_name'] = $this->bot_map[ mb_strtolower($r['bot']) ]; - $r['_time'] = $this->registry->getClass('class_localization')->getDate( $r['entry_date'], 'SHORT' ); - $r['_bot_url'] = urlencode($r['bot']); - - $spiders[] = $r; - } - - //----------------------------------------- - // And output - //----------------------------------------- - - $this->registry->output->html .= $this->html->spiderlogsWrapper( $spiders ); - - } + + * Invision Power Services + * IP.Board v3.1.4 + * Search Engine Spider logs + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 27th January 2004 + * @version $Rev: 5713 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_logs_spiderlogs extends ipsCommand +{ + /** + * Skin object + * + * @access private + * @var object Skin templates + */ + private $html; + + /** + * Spider map + * + * @access private + * @var array Spider keys to values + */ + private $bot_map = array(); + + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load bat names from the useragents cache */ + foreach( $this->cache->getCache( 'useragents' ) as $agent ) + { + if( $agent['uagent_type'] == 'search' ) + { + $this->bot_map[ $agent['uagent_key'] ] = $agent['uagent_name']; + } + } + + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = $this->registry->output->loadTemplate('cp_skin_spiderlogs'); + + //----------------------------------------- + // Set up stuff + //----------------------------------------- + + $this->form_code = $this->html->form_code = 'module=logs&section=spiderlogs'; + $this->form_code_js = $this->html->form_code_js = 'module=logs§ion=spiderlogs'; + + //----------------------------------------- + // Load lang + //----------------------------------------- + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) ); + + //----------------------------------------- + // Fix up navigation bar + //----------------------------------------- + + $this->registry->output->core_nav = array(); + $this->registry->output->ignoreCoreNav = true; + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] ); + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] ); + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=spiderlogs', $this->lang->words['slog_spider_logs'] ); + + ///---------------------------------------- + // What to do... + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'view': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'spiderlogs_view' ); + $this->_view(); + break; + + case 'remove': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'spiderlogs_delete' ); + $this->_remove(); + break; + + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'spiderlogs_view' ); + $this->_listCurrent(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * View all logs for a given moderator + * + * @access private + * @return void [Outputs to screen] + */ + private function _view() + { + ///---------------------------------------- + // Basic init + //----------------------------------------- + + $start = intval($this->request['st']) >= 0 ? intval($this->request['st']) : 0; + + $botty = IPSText::parseCleanValue( urldecode($this->request['bid'] ) ); + $botty = str_replace( "!", "!", $botty ); + + ///---------------------------------------- + // No bid or search string? + //----------------------------------------- + + if ( !$this->request['search_string'] AND !$this->request['bid'] ) + { + $this->registry->output->global_message = $this->lang->words['slog_nostring']; + $this->_listCurrent(); + return; + } + + ///---------------------------------------- + // mid? + //----------------------------------------- + + if ( !$this->request['search_string'] ) + { + $row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "bot='{$botty}'" ) ); + + $row_count = $row['count']; + + $query = "&{$this->form_code}&bid=" . $this->request['bid'] . "&do=view"; + + $this->DB->build( array( 'select' => '*', + 'from' => 'spider_logs', + 'where' => "bot='{$botty}'", + 'order' => 'entry_date DESC', + 'limit' => array( $start, 20 ) ) ); + $this->DB->execute(); + } + else + { + $this->request[ 'search_string'] = IPSText::parseCleanValue( urldecode($this->request['search_string'] ) ); + + $row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "query_string LIKE '%" . $this->request['search_string'] . "%'" ) ); + + $row_count = $row['count']; + + $query = "&{$this->form_code}&do=view&search_string=" . urlencode($this->request['search_string']); + + $this->DB->build( array( 'select' => '*', + 'from' => 'spider_logs', + 'where' => "query_string LIKE '%" . $this->request['search_string'] . "%'", + 'order' => 'entry_date DESC', + 'limit' => array( $start, 20 ) ) ); + $this->DB->execute(); + } + + ///---------------------------------------- + // Page links + //----------------------------------------- + + $links = $this->registry->output->generatePagination( array( 'totalItems' => $row_count, + 'itemsPerPage' => 20, + 'currentStartValue' => $start, + 'baseUrl' => $this->settings['base_url'] . $query, + ) + ); + + ///---------------------------------------- + // Get db results + //----------------------------------------- + + while ( $row = $this->DB->fetch() ) + { + $extra = ""; + + if ( stripos( '#lo-fi#i', $row['query_string'] ) !== false ) + { + $extra = $this->lang->words['slog_lofi']; + + $query_string_html = $extra . ' ' . $row['query_string']; + } + else + { + $query_string_html = "settings['php_ext'] . "?{$row['query_string']}' target='_blank'>" . IPSText::truncate($row['query_string']) . ""; + } + + $row['_bot_name'] = $this->bot_map[ mb_strtolower($row['bot']) ]; + $row['_query_string'] = $query_string_html; + $row['_time'] = $this->registry->getClass('class_localization')->getDate( $row['entry_date'], 'LONG' ); + + $rows[] = $row; + } + + ///---------------------------------------- + // And output + //----------------------------------------- + + $this->registry->output->html .= $this->html->spiderlogsView( $rows, $links ); + } + + /** + * Remove logs by a moderator + * + * @access private + * @return void [Outputs to screen] + */ + private function _remove() + { + if ( $this->request['bid'] == "" ) + { + $this->registry->output->showError( $this->lang->words['slog_nologs'], 11132 ); + } + + $botty = urldecode($this->request['bid']); + $botty = str_replace( "!", "!", $botty ); + + $this->DB->delete( 'spider_logs', "bot='{$botty}'" ); + + $this->registry->getClass('adminFunctions')->saveAdminLog($this->lang->words['slog_adminlog']); + + $this->registry->output->silentRedirect( $this->settings['base_url']."&{$this->form_code}" ); + } + + + /** + * List the current logs with links to view per-admin + * + * @access private + * @return void [Outputs to screen] + */ + private function _listCurrent() + { + $spiders = array(); + + //----------------------------------------- + // All bots + //----------------------------------------- + + $this->DB->build( array( 'select' => 'count(*) as cnt, bot, max(entry_date) as entry_date', + 'from' => 'spider_logs', + 'group' => 'bot', + 'order' => 'entry_date DESC', + ) ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $r['_bot_name'] = $this->bot_map[ mb_strtolower($r['bot']) ]; + $r['_time'] = $this->registry->getClass('class_localization')->getDate( $r['entry_date'], 'SHORT' ); + $r['_bot_url'] = urlencode($r['bot']); + + $spiders[] = $r; + } + + //----------------------------------------- + // And output + //----------------------------------------- + + $this->registry->output->html .= $this->html->spiderlogsWrapper( $spiders ); + + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/logs/sqlerror.php b/upload/admin/applications/core/modules_admin/logs/sqlerror.php new file mode 100644 index 00000000..e7566453 --- /dev/null +++ b/upload/admin/applications/core/modules_admin/logs/sqlerror.php @@ -0,0 +1,208 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * SQL error logs + * Last Updated: $LastChangedDate: 2010-06-16 02:25:19 +0100 (Wed, 16 Jun 2010) $ + * + * + * @author $Author: matt $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 27th January 2004 + * @version $Rev: 6539 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_logs_sqlerror extends ipsCommand +{ + /** + * Skin object + * + * @var object Skin templates + */ + protected $html; + + /** + * Main class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = $this->registry->output->loadTemplate('cp_skin_adminlogs'); + + //----------------------------------------- + // Set up stuff + //----------------------------------------- + + $this->form_code = $this->html->form_code = 'module=logs&section=sqlerror'; + $this->form_code_js = $this->html->form_code_js = 'module=logs§ion=sqlerror'; + + //----------------------------------------- + // Load lang + //----------------------------------------- + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) ); + + //----------------------------------------- + // Fix up navigation bar + //----------------------------------------- + + $this->registry->output->core_nav = array(); + $this->registry->output->ignoreCoreNav = true; + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] ); + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] ); + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=sqlerror', $this->lang->words['mlog_sqlerrors'] ); + + ///---------------------------------------- + // What to do... + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'view': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sqlerrorlogs_view' ); + $this->_view(); + break; + + case 'remove': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sqlerrorlogs_delete' ); + $this->_remove(); + break; + + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sqlerrorlogs_view' ); + $this->_listCurrent(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * View an SQL log + * + * @return void [Outputs to screen] + */ + protected function _view() + { + /* INIT */ + $file = trim( $this->request['file'] ); + + /* Check file name */ + if ( ! preg_match( "#^sql_error_log_(\d+)_(\d+)_(\d+).cgi$#", $file ) OR ! file_exists( IPS_CACHE_PATH . 'cache/' . $file ) ) + { + $this->registry->output->global_message = $this->lang->words['sqllog_nofile']; + $this->_listCurrent(); + return; + } + + /* Fetch size */ + $size = @filesize( IPS_CACHE_PATH . 'cache/' . $file ); + + /* Fetch content */ + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' ); + $classFileManagement = new $classToLoad(); + + /* Get some tail! */ + $content = $classFileManagement->tailFile( IPS_CACHE_PATH . 'cache/' . $file, 300 ); + + /* Can't believe I typed that last comment */ + $this->registry->output->html .= $this->html->sqlLogsView( $file, $size, $content ); + } + + /** + * Remove logs by an admin + * + * @return void [Outputs to screen] + */ + protected function _remove() + { + /* INIT */ + $file = trim( $this->request['file'] ); + + /* Check file name */ + if ( ! preg_match( "#^sql_error_log_(\d+)_(\d+)_(\d+).cgi$#", $file ) OR ! file_exists( IPS_CACHE_PATH . 'cache/' . $file ) ) + { + $this->registry->output->global_message = $this->lang->words['sqllog_nofile']; + $this->_listCurrent(); + return; + } + + @unlink( IPS_CACHE_PATH . 'cache/' . $file ); + + $this->registry->output->global_message = $this->lang->words['sqllog_removed']; + $this->_listCurrent(); + } + + /** + * List the current SQL logs + * + * @return void [Outputs to screen] + */ + protected function _listCurrent() + { + $rows = array(); + + /* Got a latest? */ + if ( file_exists( 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 ) + { + $contents = file_get_contents( IPS_CACHE_PATH . 'cache/sql_error_latest.cgi' ); + + /* Display a message */ + $this->registry->output->global_message = sprintf( $this->lang->words['sqllog_latest'], $this->registry->class_localization->getDate( $unix, 'LONG' ), $contents ); + } + } + } + + try + { + foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'cache' ) as $file ) + { + if ( $file->isDot() OR ! $file->isFile() ) + { + continue; + } + + if ( preg_match( "#^sql_error_log_(\d+)_(\d+)_(\d+).cgi$#", $file->getFilename(), $matches ) ) + { + $rows[] = array( 'name' => $file->getFilename(), + 'mtime' => $file->getMTime(), + 'size' => $file->getSize() ); + } + } + } catch ( Exception $e ) {} + + //----------------------------------------- + // And output + //----------------------------------------- + + $this->registry->output->html .= $this->html->sqllogsWrapper( $rows ); + } +} diff --git a/upload/admin/applications/core/modules_admin/logs/warnlogs.php b/upload/admin/applications/core/modules_admin/logs/warnlogs.php index e728e399..7fbc1888 100644 --- a/upload/admin/applications/core/modules_admin/logs/warnlogs.php +++ b/upload/admin/applications/core/modules_admin/logs/warnlogs.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Warn logs - * Last Updated: $LastChangedDate: 2009-12-07 09:26:30 -0500 (Mon, 07 Dec 2009) $ + * Last Updated: $LastChangedDate: 2010-05-19 21:06:53 -0400 (Wed, 19 May 2010) $ + * * - * @author $Author: mark $ + * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th January 2004 - * @version $Rev: 5526 $ + * @version $Rev: 6326 $ */ if ( ! defined( 'IN_ACP' ) ) @@ -335,7 +337,7 @@ class admin_core_logs_warnlogs extends ipsCommand $row['_date'] = $this->registry->class_localization->getDate( $row['wlog_date'], 'LONG' ); $row['_type'] = ( $row['wlog_type'] == 'pos' ) ? '-' : '+'; $row['_type'] = ( $row['wlog_type'] == 'custom' ) ? 'C' : $row['_type']; - $row['_cont'] = ( $row['wlog_contact'] != 'none' ) ? "form_code}&do=viewcontact&id={$row['wlog_id']}\",400,400,\"{$this->lang->words['wlog_log']}\"); return false;'>{$this->lang->words[" : ' '; + $row['_cont'] = ( $row['wlog_contact'] != 'none' ) ? "form_code}&do=viewcontact&id={$row['wlog_id']}\",400,400,\"{$this->lang->words['wlog_log']}\"); return false;'>{$this->lang->words[" : ' '; $rows[] = $row; } @@ -358,7 +360,7 @@ class admin_core_logs_warnlogs extends ipsCommand while ( $r = $this->DB->fetch() ) { $_members[] = $r['wlog_mid']; - $_store[ $r['wlog_mid'] ] = $r; + $members[ $r['wlog_mid'] ] = $r; } if ( !empty( $_members ) ) @@ -371,7 +373,7 @@ class admin_core_logs_warnlogs extends ipsCommand while ( $r = $this->DB->fetch() ) { - $members[] = array_merge( $r, $_store[ $r['member_id'] ] ); + $members[ $r['member_id'] ] = array_merge( $r, $members[ $r['member_id'] ] ); } } diff --git a/upload/admin/applications/core/modules_admin/logs/xml/index.html b/upload/admin/applications/core/modules_admin/logs/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/logs/xml/index.html +++ b/upload/admin/applications/core/modules_admin/logs/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/logs/xml/permissions.xml b/upload/admin/applications/core/modules_admin/logs/xml/permissions.xml index 7fb764ea..ac1ccbf8 100644 --- a/upload/admin/applications/core/modules_admin/logs/xml/permissions.xml +++ b/upload/admin/applications/core/modules_admin/logs/xml/permissions.xml @@ -91,4 +91,17 @@ + + SQL Error Logs + + + sqlerrorlogs_view + Can view SQL error logs? + + + sqlerrorlogs_delete + Can delete SQL error logs? + + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/mycp/dashboard.php b/upload/admin/applications/core/modules_admin/mycp/dashboard.php index f6945a38..d9541fc1 100644 --- a/upload/admin/applications/core/modules_admin/mycp/dashboard.php +++ b/upload/admin/applications/core/modules_admin/mycp/dashboard.php @@ -1,20 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Dashboard - * Last Updated: $Date: 2009-12-01 17:42:17 -0500 (Tue, 01 Dec 2009) $ + * Last Updated: $Date: 2010-10-27 05:50:09 -0400 (Wed, 27 Oct 2010) $ + * * - * @author $Author: josh $ + * @author $Author: mmecham $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 5th January 2005 - * @version $Revision: 5501 $ - * + * @version $Revision: 7049 $ */ if ( ! defined( 'IN_ACP' ) ) @@ -28,31 +28,27 @@ class admin_core_mycp_dashboard extends ipsCommand /** * Skin object * - * @access private * @var object Skin templates */ - private $html; + protected $html; /** * Shortcut for url * - * @access private * @var string URL shortcut */ - private $form_code; + protected $form_code; /** * Shortcut for url (javascript) * - * @access private * @var string JS URL shortcut */ - private $form_code_js; + protected $form_code_js; /** * Main class entry point * - * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ @@ -89,54 +85,11 @@ class admin_core_mycp_dashboard extends ipsCommand // INIT //----------------------------------------- - define( 'IPS_NEWS_URL' , '' ); - define( 'IPS_BULLETINS_URL' , '' ); - define( 'IPS_VERSION_CHECK_URL' , '' ); - $content = array(); $thiscontent = ""; $latest_version = array(); $reg_end = ""; - $sm_install = 0; - $lock_file = 0; - $converter = 0; - $fulltext_a = 0; $unfinished_upgrade = 0; - $urls = array( 'news' => IPS_NEWS_URL, - 'keiths_bits' => IPS_BULLETINS_URL, - 'version_check' => IPS_VERSION_CHECK_URL, - 'blogs' => '' ); - - if ( @file_exists( IPS_ROOT_PATH . 'install/index.php' ) ) - { - $sm_install = 1; - } - - if ( @file_exists( DOC_IPS_ROOT_PATH . 'cache/installer_lock.php' ) ) - { - $lock_file = 1; - } - - if ( @is_dir( IPS_ROOT_PATH . 'applications_addon/ips/convert/' ) and !@file_exists( DOC_IPS_ROOT_PATH . 'cache/converter_lock.php' ) ) - { - $converter = 1; - } - - if( $this->DB->checkFulltextSupport() ) - { - if( ! $this->DB->getFulltextStatus( 'posts' ) ) - { - $fulltext_a = 1; - } - } - - require_once( IPS_ROOT_PATH . '/setup/sources/base/setup.php' ); - $versions = IPSSetUp::fetchAppVersionNumbers( 'core' ); - - if( $versions['current'][0] != $versions['latest'][0] ) - { - $unfinished_upgrade = 1; - } //----------------------------------------- // Get MySQL & PHP Version @@ -185,8 +138,6 @@ class admin_core_mycp_dashboard extends ipsCommand // Licensed? //----------------------------------------- - $urls['keiths_bits'] = IPS_BULLETINS_URL . '?v=' . ipsRegistry::$vn_full; - //----------------------------------------- // Notepad //----------------------------------------- @@ -199,7 +150,7 @@ class admin_core_mycp_dashboard extends ipsCommand $text = $this->lang->words['cp_acpnotes']; - if ( !$this->cache->getCache('adminnotes') OR !$this->cache->getCache('adminnotes') ) + if ( !$this->cache->getCache('adminnotes') ) { $this->cache->setCache( 'adminnotes', $text, array( 'donow' => 1, 'array' => 0 ) ); } @@ -273,55 +224,6 @@ class admin_core_mycp_dashboard extends ipsCommand $content['acp_online'] = $this->html->acp_onlineadmin_wrapper( $acponline ); - //----------------------------------------- - // Stats - //----------------------------------------- - - $reg = $this->DB->buildAndFetch( array( - 'select' => 'COUNT(*) as reg' , - 'from' => array( 'validating' => 'v' ), - 'where' => 'v.lost_pass <> 1 AND m.member_group_id=' . $this->settings['auth_group'], - 'add_join' => array( array( - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=v.member_id', - 'type' => 'left' - ) ) ) ); - - if( $this->settings['ipb_bruteforce_attempts'] ) - { - $lock = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as mems' , 'from' => 'members', 'where' => 'failed_login_count >= ' . $this->settings['ipb_bruteforce_attempts'] ) ); - } - - $coppa = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as coppa', 'from' => 'validating', 'where' => 'coppa_user=1' ) ); - - $my_timestamp = time() - $this->settings['au_cutoff'] * 60; - - $online = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as sessions', 'from' => 'sessions', 'where' => 'running_time>' . $my_timestamp ) ); - - $pending = $this->DB->buildAndFetch( array( 'select' => 'SUM(queued_topics) as topics, SUM(queued_posts) as posts', 'from' => 'forums' ) ); - - $spammers = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count, MAX(joined) as joined', - 'from' => 'members', - //'where' => IPSBWOptions::sql( 'bw_is_spammer', 'members_bitoptions', 'members', 'global', 'has' ) ) ); - 'where' => "members_bitoptions = '1'" ) ); - - $content['stats'] = $this->html->acp_stats_wrapper( array( 'topics' => intval($this->caches['stats']['total_topics']), - 'replies' => intval($this->caches['stats']['total_replies']), - 'topics_mod' => intval($pending['topics']), - 'posts_mod' => intval($pending['posts']), - 'members' => intval($this->caches['stats']['mem_count']), - 'validate' => intval( $reg['reg'] ), - 'spammer' => array( intval( $spammers['count'] ), intval( $spammers['joined'] ) ), - 'locked' => intval( $lock['mems'] ), - 'coppa' => intval( $coppa['coppa'] ), - 'sql_driver' => strtoupper(SQL_DRIVER), - 'sql_version' => $this->DB->true_version, - 'php_version' => phpversion(), - 'sessions' => intval($online['sessions']), - 'php_sapi' => @php_sapi_name(), - 'ipb_version' => ipsRegistry::$version, - 'ipb_id' => ipsRegistry::$vn_full ) ); - //----------------------------------------- // Members awaiting admin validation? //----------------------------------------- @@ -379,8 +281,8 @@ class admin_core_mycp_dashboard extends ipsCommand // Forum and group dropdowns //----------------------------------------- - require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/forums/class_forums.php' ); - $this->registry->setClass( 'class_forums', new class_forums($this->registry) ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/forums/class_forums.php', 'class_forums', 'forums' ); + $this->registry->setClass( 'class_forums', new $classToLoad($this->registry) ); $this->registry->getClass('class_forums')->forumsInit(); $forums = $this->registry->getClass('class_forums')->forumsForumJump( 1 ); @@ -401,43 +303,7 @@ class admin_core_mycp_dashboard extends ipsCommand // Piece it together //----------------------------------------- - $urls['version_check'] = IPS_VERSION_CHECK_URL . '?' . base64_encode( ipsRegistry::$vn_full.'|^|'.$this->settings['board_url'] ); - $this->registry->output->html .= $this->html->mainTemplate( $content, $forums, $groups_html, $urls ); - - //----------------------------------------- - // FURL cache OOD? - //----------------------------------------- - - if ( file_exists( 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 ( file_exists( IPSLib::getAppDir( $app_dir ) . '/extensions/furlTemplates.php' ) ) - { - $_mtime = intval( @filemtime( IPSLib::getAppDir( $app_dir ) . '/extensions/furlTemplates.php' ) ); - - if ( $_mtime > $mtime ) - { - $_html = $this->html->warning_box( $this->lang->words['furlcache_outofdate'], "{$this->lang->words['rebuild_furl_cache']}" ) . "
"; - $this->registry->output->html = str_replace( '', $_html . '', $this->registry->output->html ); - break; - } - } - } - } - - //----------------------------------------- - // Minify on but /cache/tmp not writeable? - //----------------------------------------- - - if ( isset( $this->settings['_use_minify'] ) AND $this->settings['_use_minify'] ) - { - $_html = $this->html->warning_box( $this->lang->words['minifywrite_head'], $this->lang->words['minifynot_writeable'] ) . "
"; - $this->registry->output->html = str_replace( '', $_html . '', $this->registry->output->html ); - } + $this->registry->output->html .= $this->html->mainTemplate( $content, $forums, $groups_html, $urls, $this->getNotificationPanelEntries() ); //----------------------------------------- // Left log all on? @@ -449,11 +315,6 @@ class admin_core_mycp_dashboard extends ipsCommand $this->registry->output->html = str_replace( '', $_html . '', $this->registry->output->html ); } - if ( count( $tasksContent ) ) - { - $_html .= $this->html->warning_box( $this->lang->words['cp_taskssneedup'], implode( $tasksContent, "
" ) . "
{$this->lang->words['cp_clickhere']} {$this->lang->words['cp_clickhere_info']}."); - } - //----------------------------------------- // IN DEV stuff... //----------------------------------------- @@ -484,7 +345,7 @@ class admin_core_mycp_dashboard extends ipsCommand $_mtime = $this->registry->getClass( 'class_localization')->getDate( $lastMtime , 'JOINED' ); $_dbtime = $this->registry->getClass( 'class_localization')->getDate( $lastDBtime, 'JOINED' ); - $content[] = "" . $app['app_title'] . " {$this->lang->words['cp_settingsupdated']}.
-- {$this->lang->words['cp_lastimportrun']}: {$_dbtime}
-- {$this->lang->words['cp_lastxmlexport']}: {$_mtime}"; + $content[] = "" . $data['app_title'] . " {$this->lang->words['cp_settingsupdated']}.
-- {$this->lang->words['cp_lastimportrun']}: {$_dbtime}
-- {$this->lang->words['cp_lastxmlexport']}: {$_mtime}"; } /* Modules */ @@ -496,7 +357,7 @@ class admin_core_mycp_dashboard extends ipsCommand $_mtime = $this->registry->getClass( 'class_localization')->getDate( $lastMtime , 'JOINED' ); $_dbtime = $this->registry->getClass( 'class_localization')->getDate( $lastDBtime, 'JOINED' ); - $modContent[] = "" . $app['app_title'] . " {$this->lang->words['cp_modulessneedup']}.
-- {$this->lang->words['cp_lastimportrun']}: {$_dbtime}
-- {$this->lang->words['cp_lastxmlexport']}: {$_mtime}"; + $modContent[] = "" . $data['app_title'] . " {$this->lang->words['cp_modulessneedup']}.
-- {$this->lang->words['cp_lastimportrun']}: {$_dbtime}
-- {$this->lang->words['cp_lastxmlexport']}: {$_mtime}"; } /* Tasks */ @@ -508,7 +369,7 @@ class admin_core_mycp_dashboard extends ipsCommand $_mtime = $this->registry->getClass( 'class_localization')->getDate( $lastMtime , 'JOINED' ); $_dbtime = $this->registry->getClass( 'class_localization')->getDate( $lastDBtime, 'JOINED' ); - $tasksContent[] = "" . $app['app_title'] . " {$this->lang->words['cp_taskssneedup']}.
-- {$this->lang->words['cp_lastimportrun']}: {$_dbtime}
-- {$this->lang->words['cp_lastxmlexport']}: {$_mtime}"; + $tasksContent[] = "" . $data['app_title'] . " {$this->lang->words['cp_taskssneedup']}.
-- {$this->lang->words['cp_lastimportrun']}: {$_dbtime}
-- {$this->lang->words['cp_lastxmlexport']}: {$_mtime}"; } /* Help Files */ @@ -520,7 +381,7 @@ class admin_core_mycp_dashboard extends ipsCommand $_mtime = $this->registry->getClass( 'class_localization')->getDate( $lastMtime , 'JOINED' ); $_dbtime = $this->registry->getClass( 'class_localization')->getDate( $lastDBtime, 'JOINED' ); - $helpContent[] = "" . $app['app_title'] . " {$this->lang->words['cp_helpneedup']}.
-- {$this->lang->words['cp_lastimportrun']}: {$_dbtime}
-- {$this->lang->words['cp_lastxmlexport']}: {$_mtime}"; + $helpContent[] = "" . $data['app_title'] . " {$this->lang->words['cp_helpneedup']}.
-- {$this->lang->words['cp_lastimportrun']}: {$_dbtime}
-- {$this->lang->words['cp_lastxmlexport']}: {$_mtime}"; } /* BBCode Files */ @@ -532,7 +393,7 @@ class admin_core_mycp_dashboard extends ipsCommand $_mtime = $this->registry->getClass( 'class_localization')->getDate( $lastMtime , 'JOINED' ); $_dbtime = $this->registry->getClass( 'class_localization')->getDate( $lastDBtime, 'JOINED' ); - $bbContent[] = "" . $app['app_title'] . " {$this->lang->words['cp_bbcodeneedup']}.
-- {$this->lang->words['cp_lastimportrun']}: {$_dbtime}
-- {$this->lang->words['cp_lastxmlexport']}: {$_mtime}"; + $bbContent[] = "" . $data['app_title'] . " {$this->lang->words['cp_bbcodeneedup']}.
-- {$this->lang->words['cp_lastimportrun']}: {$_dbtime}
-- {$this->lang->words['cp_lastxmlexport']}: {$_mtime}"; } } @@ -575,92 +436,18 @@ class admin_core_mycp_dashboard extends ipsCommand } } - //----------------------------------------- - // INSTALLER PRESENT? - //----------------------------------------- - - if ( $sm_install == 1 ) - { - if ( $lock_file != 1 ) - { - $this->lang->words['cp_unlocked_warning'] = sprintf( $this->lang->words['cp_unlocked_warning'], CP_DIRECTORY ); - $installer = $this->html->warning_box( $this->lang->words['cp_unlockedinstaller'], $this->html->warning_unlocked_installer() ) . "
"; - - $this->registry->output->html = str_replace( '', $installer, $this->registry->output->html ); - } - else - { - $installer = $this->html->warning_box( $this->lang->words['cp_installerpresent'], $this->html->warning_installer() ) . "
"; - - $this->registry->output->html = str_replace( '', $installer, $this->registry->output->html ); - } - } - else if( $converter ) - { - $text = $this->lang->words['cp_unlocked_converter']; - $installer = $this->html->warning_box( $text, $this->html->warning_converter($converter) ) . "
"; - - $this->registry->output->html = str_replace( '', $installer, $this->registry->output->html ); - } - - //----------------------------------------- - // UNFINISHED UPGRADE? - //----------------------------------------- - - if( $unfinished_upgrade == 1 ) - { - $this->lang->words['cp_upgrade_warning'] = sprintf( $this->lang->words['cp_upgrade_warning'], $versions['current'][1], $versions['latest'][1], $this->settings['base_acp_url'] ); - - $upgrade = $this->html->warning_box( $this->lang->words['cp_unfinishedupgrade'], $this->html->warning_upgrade() ) . "
"; - - $this->registry->output->html = str_replace( '', $upgrade, $this->registry->output->html ); - } - - //----------------------------------------- - // INSUFFICIENT PHP VERSION? - //----------------------------------------- - - if ( PHP_VERSION < '5.1.0' ) - { - $version = $this->html->warning_box( sprintf( $this->lang->words['cp_yourphpversion'], PHP_VERSION ), - $this->html->acp_php_version_warning() ) . "
"; - - $this->registry->output->html = str_replace( '', $version, $this->registry->output->html ); - } - - //----------------------------------------- - // BOARD OFFLINE? - //----------------------------------------- - - if ( $this->settings['board_offline'] ) - { - $offline = $this->html->warning_box( $this->lang->words['cp_boardoffline'], "{$this->lang->words['cp_boardoffline1']}

» {$this->lang->words['cp_boardoffline2']}" ) . "
"; - - $this->registry->output->html = str_replace( '', $offline, $this->registry->output->html ); - } - - //----------------------------------------- - // No fulltext - //----------------------------------------- - - if( $this->settings['search_method'] == 'traditional' AND !$this->settings['use_fulltext'] AND !$this->settings['hide_ftext_note'] ) - { - $ftext = $this->html->warning_box( $this->lang->words['fulltext_off'], "{$this->lang->words['fulltext_turnon']}

» {$this->lang->words['fulltext_find']}" ) . "
"; - - $this->registry->output->html = str_replace( '', $ftext, $this->registry->output->html ); - } - //----------------------------------------- // Last 5 log in attempts //----------------------------------------- $this->registry->getClass('class_permissions')->return = true; - if( $this->registry->getClass('class_permissions')->checkPermission( 'acplogin_log' ) ) + if( $this->registry->getClass('class_permissions')->checkPermission( 'acplogin_log', 'core', 'system' ) ) { $this->DB->build( array( 'select' => '*', 'from' => 'admin_login_logs', + 'where' => 'admin_time > 0', // This just helps mysql use the index properly, which is useful for sorting 'order' => 'admin_time DESC', 'limit' => array( 0, 5 ) ) ); @@ -685,4 +472,56 @@ class admin_core_mycp_dashboard extends ipsCommand $this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper(); $this->registry->getClass('output')->sendOutput(); } + + /** + * Builds a list of nag panel entries + * + * @return array + */ + public function getNotificationPanelEntries() + { + /* INIT */ + $entries = array(); + + /* Look for notification classes */ + foreach( ipsRegistry::$applications as $r ) + { + if ( ! IPSLib::appIsInstalled( $r['app_directory'] ) ) + { + continue; + } + + /* Notification Class */ + $_file = IPSLib::getAppDir( $r['app_directory'] ) . '/extensions/dashboardNotifications.php'; + + /* Look for the file */ + if( file_exists( $_file ) ) + { + /* Get the file */ + $_class = IPSLib::loadLibrary( $_file, 'dashboardNotifications__' . $r['app_directory'], $r['app_directory'] ); + + /* Look for the class */ + if( class_exists( $_class ) ) + { + /* Create the object */ + $notifyObj = new $_class; + + /* Look for the method */ + if( method_exists( $notifyObj, 'get' ) ) + { + /* Get the entries */ + $_entries = $notifyObj->get(); + + if( is_array( $_entries ) && count( $_entries ) ) + { + $entries = array_merge( $entries, $_entries ); + } + } + } + } + } + + /* Return entries */ + return $entries; + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/mycp/defaultSection.php b/upload/admin/applications/core/modules_admin/mycp/defaultSection.php index d9dbaa9e..6c51b2f6 100644 --- a/upload/admin/applications/core/modules_admin/mycp/defaultSection.php +++ b/upload/admin/applications/core/modules_admin/mycp/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default mycp section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/mycp/details.php b/upload/admin/applications/core/modules_admin/mycp/details.php index 2567c76e..a1561e9c 100644 --- a/upload/admin/applications/core/modules_admin/mycp/details.php +++ b/upload/admin/applications/core/modules_admin/mycp/details.php @@ -1,20 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Admin change email/password - * Last Updated: $Date: 2009-05-20 09:25:28 -0400 (Wed, 20 May 2009) $ + * Last Updated: $Date: 2010-10-18 13:10:17 -0400 (Mon, 18 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 5th January 2005 - * @version $Revision: 4674 $ - * + * @version $Revision: 6990 $ */ if ( ! defined( 'IN_ACP' ) ) @@ -28,7 +28,6 @@ class admin_core_mycp_details extends ipsCommand /** * Skin object * - * @access private * @var object Skin templates */ private $html; @@ -36,7 +35,6 @@ class admin_core_mycp_details extends ipsCommand /** * Main class entry point * - * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ @@ -88,7 +86,6 @@ class admin_core_mycp_details extends ipsCommand /** * Show the form so admin can reset email/pass * - * @access protected * @return void */ protected function _showForm() @@ -99,7 +96,6 @@ class admin_core_mycp_details extends ipsCommand /** * Save new email and/or pass * - * @access protected * @return void */ protected function _saveForm() @@ -129,15 +125,17 @@ class admin_core_mycp_details extends ipsCommand $email = trim($this->request['email']); $email_check = IPSMember::load( mb_strtolower($email) ); - if ( $email_check['member_id'] AND $email_check['member_id'] != $member_id ) + if ( $email_check['member_id'] ) { - $this->registry->output->global_message = $this->lang->words['change_email_already_used']; - $this->_showForm(); - return; - } - else if( $email_check['member_id'] == $this->memberData['member_id'] ) - { - $this->registry->output->global_message = $this->lang->words['already_using_email']; + if ( $email_check['member_id'] == $this->memberData['member_id'] ) + { + $this->registry->output->global_message = $this->lang->words['already_using_email']; + } + else + { + $this->registry->output->global_message = $this->lang->words['change_email_already_used']; + } + $this->_showForm(); return; } @@ -146,15 +144,15 @@ class admin_core_mycp_details extends ipsCommand // Load handler... //----------------------------------------- - require_once( IPS_ROOT_PATH . 'sources/handlers/han_login.php' ); - $han_login = new han_login( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $han_login = new $classToLoad( $this->registry ); $han_login->init(); - $han_login->changeEmail( trim( mb_strtolower( $this->memberData['email'] ) ), trim( mb_strtolower( $email ) ) ); + $han_login->changeEmail( trim( mb_strtolower( $this->memberData['email'] ) ), trim( mb_strtolower( $email ) ), $this->memberData ); + IPSLib::runMemberSync( 'onEmailChange', $this->memberData['member_id'], mb_strtolower( $email ), $this->memberData['email'] ); + IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'email' => mb_strtolower( $email ) ) ) ); - IPSLib::runMemberSync( 'onEmailChange', $this->memberData['member_id'], mb_strtolower( $email ) ); - ipsRegistry::getClass('adminFunctions')->saveAdminLog( sprintf( $this->lang->words['changed_email'], $email ) ); } @@ -178,10 +176,10 @@ class admin_core_mycp_details extends ipsCommand $key = IPSMember::generateAutoLoginKey(); $md5_once = md5( trim($password) ); - require_once( IPS_ROOT_PATH . 'sources/handlers/han_login.php' ); - $han_login = new han_login( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $han_login = new $classToLoad( $this->registry ); $han_login->init(); - $han_login->changePass( $this->memberData['email'], $md5_once ); + $han_login->changePass( $this->memberData['email'], $md5_once, $password, $this->memberData ); IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'members_pass_salt' => $salt, 'member_login_key' => $key ) ) ); IPSMember::updatePassword( $this->memberData['member_id'], $md5_once ); diff --git a/upload/admin/applications/core/modules_admin/mycp/index.html b/upload/admin/applications/core/modules_admin/mycp/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/mycp/index.html +++ b/upload/admin/applications/core/modules_admin/mycp/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/mycp/xml/index.html b/upload/admin/applications/core/modules_admin/mycp/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/mycp/xml/index.html +++ b/upload/admin/applications/core/modules_admin/mycp/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/posts/badwords.php b/upload/admin/applications/core/modules_admin/posts/badwords.php index 79da2d28..026c81d0 100644 --- a/upload/admin/applications/core/modules_admin/posts/badwords.php +++ b/upload/admin/applications/core/modules_admin/posts/badwords.php @@ -1,425 +1,427 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_core_posts_badwords extends ipsCommand -{ - /** - * HTML skin object - * - * @access public - * @var object - */ - public $html; - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - /* Load Skin and Lang */ - $this->html = $this->registry->output->loadTemplate( 'cp_skin_badwords' ); - $this->html->form_code = '&module=posts&section=badwords'; - $this->html->form_code_js = '&module=posts§ion=badwords'; - - $this->lang->loadLanguageFile( array( 'admin_posts' ) ); - - /* What to do */ - switch( $this->request['do'] ) - { - case 'badword_add': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'badword_manage' ); - $this->badwordAdd(); - break; - - case 'badword_remove': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'badword_delete' ); - $this->badwordRemove(); - break; - - case 'badword_edit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'badword_manage' ); - $this->badwordEditForm(); - break; - - case 'badword_doedit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'badword_manage' ); - $this->handleBadwordEdit(); - break; - - case 'badword_export': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'badword_manage' ); - $this->badwordsExport(); - break; - - case 'badword_import': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'badword_manage' ); - $this->badwordsImport(); - break; - - default: - case 'overview': - case 'badword': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'badword_manage' ); - $this->badwordsOvervew(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Remove a badword filter - * - * @access public - * @return void - */ - public function badwordRemove() - { - /* Check ID */ - $id = intval( $this->request['id'] ); - - if( ! $id ) - { - $this->registry->output->showError( $this->lang->words['bwl_nofiter'], 11138 ); - } - - /* Delete */ - $this->DB->delete( 'badwords', "wid={$id}" ); - - /* Rebuild cache and bounce */ - $this->badwordsRebuildCache(); - $this->registry->output->global_message = $this->lang->words['bwl_filter_removed']; - $this->badwordsOvervew(); - } - - /** - * Handles the badword edit form - * - * @access public - * @return void - */ - public function handleBadwordEdit() - { - /* Check for before */ - if( ! $this->request['before'] ) - { - $this->registry->output->showError( $this->lang->words['bwl_noword'], 11139 ); - } - - /* Check ID */ - $id = intval( $this->request['id'] ); - - if( ! $id ) - { - $this->registry->output->showError( $this->lang->words['bwl_nofilter'], 11140 ); - } - - /* Match */ - $this->request['match'] = $this->request['match'] ? 1 : 0; - - /* Swap Text */ - $this->request['after'] = isset( $this->request['after'] ) && $this->request['after'] ? $this->request['after'] : ""; - - $this->DB->force_data_type['type'] = 'string'; - $this->DB->force_data_type['swop'] = 'string'; - - $this->DB->update( 'badwords', array( - 'type' => trim( $this->request['before'] ), - 'swop' => trim( $this->request['after'] ), - 'm_exact' => $this->request['match'] - ), "wid={$id}" ); - - /* Recache and bounce */ - $this->badwordsRebuildCache(); - $this->registry->output->global_message = $this->lang->words['bwl_filter_edited']; - $this->badwordsOvervew(); - } - - /** - * Edit Badword Form - * - * @access public - * @return void - * @author Josh - */ - public function badwordEditForm() - { - /* Check ID */ - $id = intval( $this->request['id'] ); - if( ! $id ) - { - $this->registry->output->showError( $this->lang->words['bwl_nofilter'], 11141 ); - } - - /* Get the field */ - $this->DB->build( array( 'select' => '*', 'from' => 'badwords', 'where' => "wid='{$id}'" ) ); - $this->DB->execute(); - - if ( ! $r = $this->DB->fetch() ) - { - $this->registry->output->showError( $this->lang->words['bwl_filter_404'], 11142 ); - } - - /* Form Fields */ - $form = array(); - $form['before'] = $this->registry->output->formInput('before', stripslashes( $r['type'] ) ); - $form['after'] = $this->registry->output->formInput('after' , stripslashes( $r['swop'] ) ); - $form['match'] = $this->registry->output->formDropdown( 'match', array( 0 => array( 1, $this->lang->words['bwl_exact'] ), 1 => array( 0, $this->lang->words['bwl_loose'] ) ), $r['m_exact'] ); - - /* Output */ - $this->registry->output->html .= $this->html->badwordEditForm( $id, $form ); - } - - /** - * Handle add bad word request - * - * @access public - * @return void - **/ - public function badwordAdd() - { - /* Check for before text */ - if( ! $this->request['before'] ) - { - $this->registry->output->showError( $this->lang->words['bwl_noword'], 11143 ); - } - - /* Match */ - $this->request['match'] = $this->request['match'] ? 1 : 0; - - /* Swap Text */ - $this->request['after'] = isset( $this->request['after'] ) && $this->request['after'] ? $this->request['after'] : ""; - - /* Insert filter */ - $this->DB->force_data_type['type'] = 'string'; - $this->DB->force_data_type['swop'] = 'string'; - - $this->DB->insert( 'badwords', array( - 'type' => trim( $this->request['before'] ), - 'swop' => trim( $this->request['after'] ), - 'm_exact' => $this->request['match'] - ) - ); - - /* Rebuild the cache */ - $this->badwordsRebuildCache(); - - /* Bounce */ - $this->registry->output->global_message = $this->lang->words['bwl_filter_new']; - $this->badwordsOvervew(); - } - - /** - * Badword Overview Screen - * - * @access public - * @return void - */ - public function badwordsOvervew() - { - /* Query the bad words */ - $this->DB->build( array( 'select' => '*', 'from' => 'badwords', 'order' => 'type' ) ); - $this->DB->execute(); - - /* Loop through the results */ - $rows = array(); - - if ( $this->DB->getTotalRows() ) - { - while ( $r = $this->DB->fetch() ) - { - $words[] = $r; - } - - foreach( $words as $r ) - { - $r['replace'] = $r['swop'] ? stripslashes( $r['swop'] ) : '######'; - $r['method'] = $r['m_exact'] ? $this->lang->words['bwl_exact'] : $this->lang->words['bwl_loose']; - $r['type'] = stripslashes( $r['type'] ); - - $rows[] = $r; - } - - } - - /* Output */ - $this->registry->output->html .= $this->html->badwordsWrapper( $rows ); - } - - - /** - * Import badwords from an xml file - * - * @access public - * @return void - */ - public function badwordsImport() - { - /* Get Badwords XML */ - $content = $this->registry->adminFunctions->importXml( 'ipb_badwords.xml' ); - - /* Check for content */ - if ( ! $content ) - { - $this->registry->output->global_message = $this->lang->words['bwl_upload_failed']; - $this->badwordsOvervew(); - return; - } - - //----------------------------------------- - // Get xml class - //----------------------------------------- - - require_once( IPS_KERNEL_PATH.'classXML.php' ); - - $xml = new classXML( IPS_DOC_CHAR_SET ); - $xml->loadXML( $content ); - - if( !count( $xml->fetchElements('badword') ) ) - { - $this->registry->output->global_message = $this->lang->words['bwl_upload_wrong']; - $this->badwordsOvervew(); - return; - } - - /* Get a list of current badwords */ - $words = array(); - - $this->DB->build( array( 'select' => '*', 'from' => 'badwords', 'order' => 'type' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $words[ $r['type'] ] = 1; - } - - /* Loop through the xml document and insert new bad words */ - foreach( $xml->fetchElements('badword') as $badword ) - { - $entry = $xml->fetchElementsFromRecord( $badword ); - - /* Get the filter settings */ - $type = $entry['type']; - $swop = $entry['swop']; - $m_exact = $entry['m_exact']; - - /* Skip if it's already in the db */ - if ( $words[ $type ] ) - { - continue; - } - - /* Add to the db */ - if ( $type ) - { - $this->DB->insert( 'badwords', array( 'type' => $type, 'swop' => $swop, 'm_exact' => $m_exact ) ); - } - } - - /* Rebuild cache and bounce */ - $this->badwordsRebuildCache(); - $this->registry->output->global_message = $this->lang->words['bwl_upload_good']; - $this->badwordsOvervew(); - } - - /** - * Exports badwords to an xml file - * - * @access public - * @return void - */ - public function badwordsExport() - { - //----------------------------------------- - // Get xml class - //----------------------------------------- - - require_once( IPS_KERNEL_PATH.'classXML.php' ); - - $xml = new classXML( IPS_DOC_CHAR_SET ); - - $xml->newXMLDocument(); - $xml->addElement( 'badwordexport' ); - $xml->addElement( 'badwordgroup', 'badwordexport' ); - - /* Query the badwords */ - $this->DB->build( array( 'select' => 'type, swop, m_exact', 'from' => 'badwords', 'order' => 'type' ) ); - $this->DB->execute(); - - /* Add the bad word entries to the xml file */ - while( $r = $this->DB->fetch() ) - { - $xml->addElementAsRecord( 'badwordgroup', 'badword', $r ); - } - - /* Create the xml document and send to the browser */ - $xmlData = $xml->fetchDocument(); - $this->registry->output->showDownload( $xmlData, 'ipb_badwords.xml' ); - } - - /** - * Rebuild badword cache - * - * @access public - * @return void - */ - public function badwordsRebuildCache() - { - $cache = array(); - - $this->DB->build( array( 'select' => 'type,swop,m_exact', 'from' => 'badwords' ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $cache[] = $r; - } - - usort( $cache, array( $this, '_thisUsort' ) ); - - $this->cache->setCache( 'badwords', $cache, array( 'array' => 1 ) ); - } - - /** - * Custom sort operation - * - * @access private - * @param string A - * @param string B - * @return integer - */ - private function _thisUsort($a, $b) - { - if ( IPSText::mbstrlen($a['type']) == IPSText::mbstrlen($b['type']) ) - { - return 0; - } - return ( IPSText::mbstrlen($a['type']) > IPSText::mbstrlen($b['type']) ) ? -1 : 1; - } + + * Invision Power Services + * IP.Board v3.1.4 + * Bad Word Filters + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 27th January 2004 + * @version $Rev: 5713 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_posts_badwords extends ipsCommand +{ + /** + * HTML skin object + * + * @access public + * @var object + */ + public $html; + + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load Skin and Lang */ + $this->html = $this->registry->output->loadTemplate( 'cp_skin_badwords' ); + $this->html->form_code = '&module=posts&section=badwords'; + $this->html->form_code_js = '&module=posts§ion=badwords'; + + $this->lang->loadLanguageFile( array( 'admin_posts' ) ); + + /* What to do */ + switch( $this->request['do'] ) + { + case 'badword_add': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'badword_manage' ); + $this->badwordAdd(); + break; + + case 'badword_remove': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'badword_delete' ); + $this->badwordRemove(); + break; + + case 'badword_edit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'badword_manage' ); + $this->badwordEditForm(); + break; + + case 'badword_doedit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'badword_manage' ); + $this->handleBadwordEdit(); + break; + + case 'badword_export': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'badword_manage' ); + $this->badwordsExport(); + break; + + case 'badword_import': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'badword_manage' ); + $this->badwordsImport(); + break; + + default: + case 'overview': + case 'badword': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'badword_manage' ); + $this->badwordsOvervew(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Remove a badword filter + * + * @access public + * @return void + */ + public function badwordRemove() + { + /* Check ID */ + $id = intval( $this->request['id'] ); + + if( ! $id ) + { + $this->registry->output->showError( $this->lang->words['bwl_nofiter'], 11138 ); + } + + /* Delete */ + $this->DB->delete( 'badwords', "wid={$id}" ); + + /* Rebuild cache and bounce */ + $this->badwordsRebuildCache(); + $this->registry->output->global_message = $this->lang->words['bwl_filter_removed']; + $this->badwordsOvervew(); + } + + /** + * Handles the badword edit form + * + * @access public + * @return void + */ + public function handleBadwordEdit() + { + /* Check for before */ + if( ! $this->request['before'] ) + { + $this->registry->output->showError( $this->lang->words['bwl_noword'], 11139 ); + } + + /* Check ID */ + $id = intval( $this->request['id'] ); + + if( ! $id ) + { + $this->registry->output->showError( $this->lang->words['bwl_nofilter'], 11140 ); + } + + /* Match */ + $this->request['match'] = $this->request['match'] ? 1 : 0; + + /* Swap Text */ + $this->request['after'] = isset( $this->request['after'] ) && $this->request['after'] ? $this->request['after'] : ""; + + $this->DB->force_data_type['type'] = 'string'; + $this->DB->force_data_type['swop'] = 'string'; + + $this->DB->update( 'badwords', array( + 'type' => trim( $this->request['before'] ), + 'swop' => trim( $this->request['after'] ), + 'm_exact' => $this->request['match'] + ), "wid={$id}" ); + + /* Recache and bounce */ + $this->badwordsRebuildCache(); + $this->registry->output->global_message = $this->lang->words['bwl_filter_edited']; + $this->badwordsOvervew(); + } + + /** + * Edit Badword Form + * + * @access public + * @return void + * @author Josh + */ + public function badwordEditForm() + { + /* Check ID */ + $id = intval( $this->request['id'] ); + if( ! $id ) + { + $this->registry->output->showError( $this->lang->words['bwl_nofilter'], 11141 ); + } + + /* Get the field */ + $this->DB->build( array( 'select' => '*', 'from' => 'badwords', 'where' => "wid='{$id}'" ) ); + $this->DB->execute(); + + if ( ! $r = $this->DB->fetch() ) + { + $this->registry->output->showError( $this->lang->words['bwl_filter_404'], 11142 ); + } + + /* Form Fields */ + $form = array(); + $form['before'] = $this->registry->output->formInput('before', stripslashes( $r['type'] ) ); + $form['after'] = $this->registry->output->formInput('after' , stripslashes( $r['swop'] ) ); + $form['match'] = $this->registry->output->formDropdown( 'match', array( 0 => array( 1, $this->lang->words['bwl_exact'] ), 1 => array( 0, $this->lang->words['bwl_loose'] ) ), $r['m_exact'] ); + + /* Output */ + $this->registry->output->html .= $this->html->badwordEditForm( $id, $form ); + } + + /** + * Handle add bad word request + * + * @access public + * @return void + **/ + public function badwordAdd() + { + /* Check for before text */ + if( ! $this->request['before'] ) + { + $this->registry->output->showError( $this->lang->words['bwl_noword'], 11143 ); + } + + /* Match */ + $this->request['match'] = $this->request['match'] ? 1 : 0; + + /* Swap Text */ + $this->request['after'] = isset( $this->request['after'] ) && $this->request['after'] ? $this->request['after'] : ""; + + /* Insert filter */ + $this->DB->force_data_type['type'] = 'string'; + $this->DB->force_data_type['swop'] = 'string'; + + $this->DB->insert( 'badwords', array( + 'type' => trim( $this->request['before'] ), + 'swop' => trim( $this->request['after'] ), + 'm_exact' => $this->request['match'] + ) + ); + + /* Rebuild the cache */ + $this->badwordsRebuildCache(); + + /* Bounce */ + $this->registry->output->global_message = $this->lang->words['bwl_filter_new']; + $this->badwordsOvervew(); + } + + /** + * Badword Overview Screen + * + * @access public + * @return void + */ + public function badwordsOvervew() + { + /* Query the bad words */ + $this->DB->build( array( 'select' => '*', 'from' => 'badwords', 'order' => 'type' ) ); + $this->DB->execute(); + + /* Loop through the results */ + $rows = array(); + + if ( $this->DB->getTotalRows() ) + { + while ( $r = $this->DB->fetch() ) + { + $words[] = $r; + } + + foreach( $words as $r ) + { + $r['replace'] = $r['swop'] ? stripslashes( $r['swop'] ) : '######'; + $r['method'] = $r['m_exact'] ? $this->lang->words['bwl_exact'] : $this->lang->words['bwl_loose']; + $r['type'] = stripslashes( $r['type'] ); + + $rows[] = $r; + } + + } + + /* Output */ + $this->registry->output->html .= $this->html->badwordsWrapper( $rows ); + } + + + /** + * Import badwords from an xml file + * + * @access public + * @return void + */ + public function badwordsImport() + { + /* Get Badwords XML */ + $content = $this->registry->adminFunctions->importXml( 'ipb_badwords.xml' ); + + /* Check for content */ + if ( ! $content ) + { + $this->registry->output->global_message = $this->lang->words['bwl_upload_failed']; + $this->badwordsOvervew(); + return; + } + + //----------------------------------------- + // Get xml class + //----------------------------------------- + + require_once( IPS_KERNEL_PATH.'classXML.php' ); + + $xml = new classXML( IPS_DOC_CHAR_SET ); + $xml->loadXML( $content ); + + if( !count( $xml->fetchElements('badword') ) ) + { + $this->registry->output->global_message = $this->lang->words['bwl_upload_wrong']; + $this->badwordsOvervew(); + return; + } + + /* Get a list of current badwords */ + $words = array(); + + $this->DB->build( array( 'select' => '*', 'from' => 'badwords', 'order' => 'type' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $words[ $r['type'] ] = 1; + } + + /* Loop through the xml document and insert new bad words */ + foreach( $xml->fetchElements('badword') as $badword ) + { + $entry = $xml->fetchElementsFromRecord( $badword ); + + /* Get the filter settings */ + $type = $entry['type']; + $swop = $entry['swop']; + $m_exact = $entry['m_exact']; + + /* Skip if it's already in the db */ + if ( $words[ $type ] ) + { + continue; + } + + /* Add to the db */ + if ( $type ) + { + $this->DB->insert( 'badwords', array( 'type' => $type, 'swop' => $swop, 'm_exact' => $m_exact ) ); + } + } + + /* Rebuild cache and bounce */ + $this->badwordsRebuildCache(); + $this->registry->output->global_message = $this->lang->words['bwl_upload_good']; + $this->badwordsOvervew(); + } + + /** + * Exports badwords to an xml file + * + * @access public + * @return void + */ + public function badwordsExport() + { + //----------------------------------------- + // Get xml class + //----------------------------------------- + + require_once( IPS_KERNEL_PATH.'classXML.php' ); + + $xml = new classXML( IPS_DOC_CHAR_SET ); + + $xml->newXMLDocument(); + $xml->addElement( 'badwordexport' ); + $xml->addElement( 'badwordgroup', 'badwordexport' ); + + /* Query the badwords */ + $this->DB->build( array( 'select' => 'type, swop, m_exact', 'from' => 'badwords', 'order' => 'type' ) ); + $this->DB->execute(); + + /* Add the bad word entries to the xml file */ + while( $r = $this->DB->fetch() ) + { + $xml->addElementAsRecord( 'badwordgroup', 'badword', $r ); + } + + /* Create the xml document and send to the browser */ + $xmlData = $xml->fetchDocument(); + $this->registry->output->showDownload( $xmlData, 'ipb_badwords.xml' ); + } + + /** + * Rebuild badword cache + * + * @access public + * @return void + */ + public function badwordsRebuildCache() + { + $cache = array(); + + $this->DB->build( array( 'select' => 'type,swop,m_exact', 'from' => 'badwords' ) ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $cache[] = $r; + } + + usort( $cache, array( $this, '_thisUsort' ) ); + + $this->cache->setCache( 'badwords', $cache, array( 'array' => 1 ) ); + } + + /** + * Custom sort operation + * + * @access private + * @param string A + * @param string B + * @return integer + */ + private function _thisUsort($a, $b) + { + if ( IPSText::mbstrlen($a['type']) == IPSText::mbstrlen($b['type']) ) + { + return 0; + } + return ( IPSText::mbstrlen($a['type']) > IPSText::mbstrlen($b['type']) ) ? -1 : 1; + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/posts/bbcode.php b/upload/admin/applications/core/modules_admin/posts/bbcode.php index 6011ae0d..e840f51c 100644 --- a/upload/admin/applications/core/modules_admin/posts/bbcode.php +++ b/upload/admin/applications/core/modules_admin/posts/bbcode.php @@ -1,842 +1,841 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_core_posts_bbcode extends ipsCommand -{ - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = $this->registry->output->loadTemplate('cp_skin_bbcode'); - - //----------------------------------------- - // Set up stuff - //----------------------------------------- - - $this->form_code = $this->html->form_code = 'module=posts&section=bbcode'; - $this->form_code_js = $this->html->form_code_js = 'module=posts§ion=bbcode'; - - //----------------------------------------- - // Load lang - //----------------------------------------- - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_posts' ) ); - - ///---------------------------------------- - // What to do... - //----------------------------------------- - - switch( $this->request['do'] ) - { - case 'bbcode_add': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); - $this->_bbcodeForm('add'); - break; - - case 'bbcode_doadd': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); - $this->_bbcodeSave('add'); - break; - - case 'bbcode_edit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); - $this->_bbcodeForm('edit'); - break; - - case 'bbcode_doedit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); - $this->_bbcodeSave('edit'); - break; - - case 'bbcode_test': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); - $this->_bbcodeTest(); - break; - - case 'bbcode_delete': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_delete' ); - $this->_bbcodeDelete(); - break; - - case 'bbcode_export': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); - $this->_bbcodeExport(); - break; - - case 'bbcode_import': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); - $this->_bbcodeImport(); - break; - - case 'bbcode_import_all': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); - $this->_bbcodeImportAll(); - break; - case 'bbcode_export_all': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); - $this->_bbcodeExportAll(); - break; - - case 'bbcode': - case 'overview': - default: - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); - $this->_bbcodeStart(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Export all bbcode XML file - * - * @access private - * @return void [Outputs to screen] - */ - private function _bbcodeExportAll() - { - /* Loop through apps */ - $msg = array(); - - require_once( IPS_KERNEL_PATH.'classXML.php' ); - - $xml = new classXML( IPS_DOC_CHAR_SET ); - - foreach( ipsRegistry::$applications as $appDir => $appData ) - { - $_c = 0; - - $xml->newXMLDocument(); - $xml->addElement( 'bbcodeexport' ); - $xml->addElement( 'bbcodegroup', 'bbcodeexport' ); - - $this->DB->build( array( 'select' => '*', 'from' => 'custom_bbcode', 'where' => 'bbcode_app=\'' . $appDir . "'" ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $_c++; - - $xml->addElementAsRecord( 'bbcodegroup', 'bbcode', $r ); - } - - $xmlData = $xml->fetchDocument(); - - - $file = IPSLib::getAppDir( $appDir ) . '/xml/' . $appDir . '_bbcode.xml'; - - /* remove old file */ - @unlink( $file ); - - /* Write it.. */ - if ( $_c ) - { - @file_put_contents( $file, $xmlData ); - } - - /* In dev time stamp? */ - if ( IN_DEV ) - { - $cache = $this->caches['indev']; - $cache['import']['bbcode'][ $appDir ] = time(); - $this->cache->setCache( 'indev', $cache, array( 'donow' => 1, 'array' => 1 ) ); - } - } - - $this->registry->output->global_message = "Completed" . implode( "
", $msg ); - - $this->_bbcodeStart(); - } - - /** - * Import a bbcode XML file - * - * @access private - * @return void [Outputs to screen] - */ - private function _bbcodeImportAll() - { - /* Loop through apps */ - $msg = array(); - - foreach( ipsRegistry::$applications as $appDir => $appData ) - { - $file = IPSLib::getAppDir( $appDir ) . '/xml/' . $appDir . '_bbcode.xml'; - - if ( file_exists( $file ) ) - { - $content = @file_get_contents( $file ); - - if ( $content ) - { - $result = $this->bbcodeImportDo( $content, $appDir ); - - $msg[] = sprintf( $this->lang->words['bbcode_import_app'], $appDir, $result['inserted'], $result['updated'] ); - } - } - - /* In dev time stamp? */ - if ( IN_DEV ) - { - $cache = $this->caches['indev']; - $cache['import']['bbcode'][ $appDir ] = time(); - $this->cache->setCache( 'indev', $cache, array( 'donow' => 1, 'array' => 1 ) ); - } - } - - $this->registry->output->global_message = implode( "
", $msg ); - - $this->_bbcodeStart(); - } - - /** - * Import a bbcode XML file - * - * @access private - * @return void [Outputs to screen] - */ - private function _bbcodeImport() - { - $content = $this->registry->getClass('adminFunctions')->importXml(); - - //----------------------------------------- - // Got anything? - //----------------------------------------- - - if ( ! $content ) - { - $this->registry->output->global_message = $this->lang->words['upload_failed']; - $this->_bbcodeStart(); - return; - } - - /* Do it */ - $this->bbcodeImportDo( $content ); - - $this->registry->output->global_message = $this->lang->words['import_complete']; - - $this->_bbcodeStart(); - } - - /** - * Perform the BBcode import - * Abstracted here so the installer can use it (and potentially other apps) - * - * @access public - * @param string Raw XML code - * @return array [ 'inserted' => int, 'updated' => int ] - */ - public function bbcodeImportDo( $content, $app='core' ) - { - //----------------------------------------- - // Get xml class - //----------------------------------------- - - require_once( IPS_KERNEL_PATH.'classXML.php' ); - - $xml = new classXML( IPS_DOC_CHAR_SET ); - $xml->loadXML( $content ); - - //----------------------------------------- - // Get current custom bbcodes - //----------------------------------------- - - $tags = array(); - $return = array( 'updated' => 0, 'inserted' => 0 ); - - $this->DB->build( array( 'select' => '*', 'from' => 'custom_bbcode' ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $tags[ $r['bbcode_tag'] ] = 1; - } - - //----------------------------------------- - // pArse - //----------------------------------------- - - foreach( $xml->fetchElements('bbcode') as $bbcode ) - { - $entry = $xml->fetchElementsFromRecord( $bbcode ); - - $bbcode_title = $entry['bbcode_title']; - $bbcode_desc = $entry['bbcode_desc']; - $bbcode_tag = $entry['bbcode_tag']; - $bbcode_replace = $entry['bbcode_replace']; - $bbcode_useoption = $entry['bbcode_useoption']; - $bbcode_example = $entry['bbcode_example']; - $bbcode_switch_option = $entry['bbcode_switch_option']; - $bbcode_menu_option_text = $entry['bbcode_menu_option_text']; - $bbcode_menu_content_text = $entry['bbcode_menu_content_text']; - $bbcode_single_tag = $entry['bbcode_single_tag']; - $bbcode_php_plugin = $entry['bbcode_php_plugin']; - $bbcode_parse = 2; - $bbcode_no_parsing = $entry['bbcode_no_parsing']; - $bbcode_optional_option = $entry['bbcode_optional_option']; - $bbcode_aliases = $entry['bbcode_aliases']; - $bbcode_image = $entry['bbcode_image']; - $bbcode_app = ( $entry['bbcode_app'] ) ? $entry['bbcode_app'] : $app; - $bbcode_protected = ( $entry['bbcode_protected'] ) ? $entry['bbcode_protected'] : 0; - $bbcode_sections = ( $entry['bbcode_sections'] ) ? $entry['bbcode_sections'] : 'all'; - - if ( $tags[ $bbcode_tag ] ) - { - $bbarray = array( - 'bbcode_title' => $bbcode_title, - 'bbcode_desc' => $bbcode_desc, - 'bbcode_tag' => $bbcode_tag, - 'bbcode_replace' => IPSText::safeslashes($bbcode_replace), - 'bbcode_useoption' => $bbcode_useoption, - 'bbcode_example' => $bbcode_example, - 'bbcode_switch_option' => $bbcode_switch_option, - 'bbcode_menu_option_text' => $bbcode_menu_option_text, - 'bbcode_menu_content_text' => $bbcode_menu_content_text, - 'bbcode_php_plugin' => $bbcode_php_plugin, - 'bbcode_parse' => $bbcode_parse, - 'bbcode_no_parsing' => $bbcode_no_parsing, - 'bbcode_optional_option' => $bbcode_optional_option, - 'bbcode_aliases' => $bbcode_aliases, - 'bbcode_image' => $bbcode_image, - 'bbcode_single_tag' => $bbcode_single_tag, - 'bbcode_app' => $bbcode_app, - 'bbcode_protected' => $bbcode_protected - ); - - $this->DB->update( 'custom_bbcode', $bbarray, "bbcode_tag='" . $bbcode_tag . "'" ); - $return['updated']++; - continue; - } - - if ( $bbcode_tag ) - { - $bbarray = array( - 'bbcode_title' => $bbcode_title, - 'bbcode_desc' => $bbcode_desc, - 'bbcode_tag' => $bbcode_tag, - 'bbcode_replace' => IPSText::safeslashes($bbcode_replace), - 'bbcode_useoption' => $bbcode_useoption, - 'bbcode_example' => $bbcode_example, - 'bbcode_switch_option' => $bbcode_switch_option, - 'bbcode_menu_option_text' => $bbcode_menu_option_text, - 'bbcode_menu_content_text' => $bbcode_menu_content_text, - 'bbcode_groups' => 'all', - 'bbcode_sections' => $bbcode_sections, - 'bbcode_php_plugin' => $bbcode_php_plugin, - 'bbcode_parse' => $bbcode_parse, - 'bbcode_no_parsing' => $bbcode_no_parsing, - 'bbcode_optional_option' => $bbcode_optional_option, - 'bbcode_aliases' => $bbcode_aliases, - 'bbcode_image' => $bbcode_image, - 'bbcode_single_tag' => $bbcode_single_tag, - 'bbcode_app' => $bbcode_app, - 'bbcode_protected' => $bbcode_protected - ); - - $this->DB->insert( 'custom_bbcode', $bbarray ); - $return['inserted']++; - } - } - - $this->bbcodeRebuildCache(); - - return $return; - } - - /** - * Export a bbcode XML file - * - * @access private - * @return void [Outputs to screen] - */ - private function _bbcodeExport() - { - //----------------------------------------- - // Get xml class - //----------------------------------------- - - require_once( IPS_KERNEL_PATH.'classXML.php' ); - - $xml = new classXML( IPS_DOC_CHAR_SET ); - - $xml->newXMLDocument(); - $xml->addElement( 'bbcodeexport' ); - $xml->addElement( 'bbcodegroup', 'bbcodeexport' ); - - //----------------------------------------- - // Get bbcodes - //----------------------------------------- - - $select = array( 'select' => '*', 'from' => 'custom_bbcode' ); - - if( $this->request['id'] ) - { - $select['where'] = 'bbcode_id=' . intval($this->request['id']); - } - - $this->DB->build( $select ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $xml->addElementAsRecord( 'bbcodegroup', 'bbcode', $r ); - } - - $xmlData = $xml->fetchDocument(); - - //----------------------------------------- - // Send to browser. - //----------------------------------------- - - $this->registry->output->showDownload( $xmlData, 'bbcode.xml', '', 0 ); - } - - /** - * Delete a bbcode - * - * @access private - * @return void [Outputs to screen] - */ - private function _bbcodeDelete() - { - if ( ! $this->request['id'] ) - { - $this->registry->output->global_message = $this->lang->words['no_bbcode_found_delete']; - $this->_bbcodeStart(); - return; - } - - $this->DB->delete( 'custom_bbcode', 'bbcode_id=' . intval($this->request['id']) ); - - $this->bbcodeRebuildCache(); - - $this->_bbcodeStart(); - } - - /** - * Test a bbcode - * - * @access private - * @return void [Outputs to screen] - * @todo [Future] Also show the resulting HTML alongside the formatted content - */ - private function _bbcodeTest() - { - $t = IPSText::stripslashes(htmlspecialchars($_POST['bbtest'])); - - //----------------------------------------- - // Run through libraries - //----------------------------------------- - - IPSText::getTextClass('bbcode')->parse_bbcode = 1; - IPSText::getTextClass('bbcode')->parse_smilies = 0; - IPSText::getTextClass('bbcode')->parse_wordwrap = 0; - IPSText::getTextClass('bbcode')->parsing_section = 'global'; - - //----------------------------------------- - // Store the url/fix base url - //----------------------------------------- - - $_current = $this->settings[ 'base_url' ]; - $this->settings['base_url'] = $this->settings['board_url'] . '/index.php?'; - - //----------------------------------------- - // Parse - //----------------------------------------- - - $t = IPSText::getTextClass('bbcode')->preDbParse( $t ); - $t = IPSText::getTextClass('bbcode')->preDisplayParse( $t ); - - //----------------------------------------- - // Restore base url - //----------------------------------------- - - $this->settings['base_url'] = $_current; - - $this->registry->output->global_message = $this->lang->words['bbcode_test'] . $t; - - $this->_bbcodeStart(); - } - - /** - * Save a bbcode [add|edit] - * - * @access private - * @param string [add|edit] - * @return void [Outputs to screen] - */ - private function _bbcodeSave($type='add') - { - if ( $type == 'edit' ) - { - if ( ! $this->request['id'] ) - { - $this->registry->output->global_message = $this->lang->words['no_bbcode_found_edit']; - $this->_bbcodeForm($type); - return; - } - - $bbcode = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'custom_bbcode', 'where' => 'bbcode_id=' . intval($this->request['id']) ) ); - - if( !$bbcode['bbcode_id'] ) - { - $this->registry->output->showError( $this->lang->words['no_bbcode_found_edit'], 111162 ); - } - - if( $this->request['bbcode_tag'] ) - { - $duplicate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'custom_bbcode', 'where' => "bbcode_tag='{$this->request['bbcode_tag']}'" ) ); - - if( $duplicate['bbcode_id'] != $this->request['id'] ) - { - $this->registry->output->global_message = $this->lang->words['tag_already']; - $this->_bbcodeForm($type); - return; - } - - /* Check aliases */ - $this->DB->build( array( 'select' => '*', - 'from' => 'custom_bbcode', - 'where' => 'bbcode_aliases LIKE \'%' . $this->DB->addSlashes( $this->request['bbcode_tag'] ) . '%\'' ) ); - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - if( $row['bbcode_id'] == $this->request['id'] ) - { - continue; - } - - foreach( explode( ',', $row['bbcode_aliases'] ) as $alias ) - { - if ( strtolower( $alias ) == strtolower( $this->request['bbcode_tag'] ) ) - { - $this->registry->output->global_message = sprintf( $this->lang->words['tag_already_alias'], $this->request['bbcode_tag'], $row['bbcode_tag'] ); - $this->_bbcodeForm($type); - return; - } - } - } - } - } - else - { - $bbcode = array(); - - if( $this->request['bbcode_tag'] ) - { - $duplicate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'custom_bbcode', 'where' => "bbcode_tag='{$this->request['bbcode_tag']}'" ) ); - - if( $duplicate['bbcode_id'] ) - { - $this->registry->output->global_message = $this->lang->words['tag_already']; - $this->_bbcodeForm($type); - return; - } - - /* Check aliases */ - $this->DB->build( array( 'select' => '*', - 'from' => 'custom_bbcode', - 'where' => 'bbcode_aliases LIKE \'%' . $this->DB->addSlashes( $this->request['bbcode_tag'] ) . '%\'' ) ); - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - foreach( explode( ',', $row['bbcode_aliases'] ) as $alias ) - { - if ( strtolower( $alias ) == strtolower( $this->request['bbcode_tag'] ) ) - { - $this->registry->output->global_message = sprintf( $this->lang->words['tag_already_alias'], $this->request['bbcode_tag'], $row['bbcode_tag'] ); - $this->_bbcodeForm($type); - return; - } - } - } - } - } - - //----------------------------------------- - // Fix BR tags - //----------------------------------------- - - $this->request['bbcode_aliases'] = str_replace( array( ' ', "\n" ), '', IPSText::br2nl( $this->request['bbcode_aliases'] ) ); - - //----------------------------------------- - // check... - //----------------------------------------- - - if ( !$this->request['bbcode_title'] or !$this->request['bbcode_tag'] or ( !$this->request['bbcode_replace'] AND !$this->request['bbcode_php_plugin'] ) ) - { - $this->registry->output->global_message = $this->lang->words['complete_form']; - $this->_bbcodeForm($type); - return; - } - - if ( !$this->request['bbcode_single_tag'] AND !strstr( $this->request['bbcode_replace'], '{content}' ) AND !$this->request['bbcode_php_plugin'] ) - { - $this->registry->output->global_message = $this->lang->words['must_use_content']; - $this->_bbcodeForm($type); - return; - } - - if ( !strstr( $this->request['bbcode_replace'], '{option}' ) AND $this->request['bbcode_useoption'] AND !$this->request['bbcode_php_plugin'] ) - { - $this->registry->output->global_message = $this->lang->words['must_use_option']; - $this->_bbcodeForm($type); - return; - } - - if( preg_match( "/[^a-zA-Z0-9_]/", $this->request['bbcode_tag'] ) ) - { - $this->registry->output->global_message = $this->lang->words['bbcode_alpha_num']; - $this->_bbcodeForm($type); - return; - } - - $_aliases = explode( ",", $this->request['bbcode_aliases'] ); - - foreach( $_aliases as $_alias ) - { - if( preg_match( "/[^a-zA-Z0-9_]/", $_alias ) ) - { - $this->registry->output->global_message = $this->lang->words['bbcode_alpha_num']; - $this->_bbcodeForm($type); - return; - } - } - - $array = array( - 'bbcode_title' => $this->request['bbcode_title'], - 'bbcode_desc' => IPSText::safeslashes( $_POST['bbcode_desc'] ), - 'bbcode_tag' => preg_replace( "/[^a-zA-Z0-9_]/", "", $this->request['bbcode_tag'] ), - 'bbcode_replace' => IPSText::safeslashes( $_POST['bbcode_replace'] ), - 'bbcode_example' => IPSText::safeslashes( $_POST['bbcode_example'] ), - 'bbcode_useoption' => $this->request['bbcode_useoption'], - 'bbcode_switch_option' => intval( $this->request['bbcode_switch_option'] ), - 'bbcode_menu_option_text' => trim( $this->request['bbcode_menu_option_text'] ), - 'bbcode_menu_content_text' => trim( $this->request['bbcode_menu_content_text'] ), - 'bbcode_single_tag' => intval( $this->request['bbcode_single_tag'] ), - 'bbcode_groups' => is_array( $this->request['bbcode_groups'] ) ? implode( ',', $this->request['bbcode_groups'] ) : '', - 'bbcode_sections' => is_array( $this->request['bbcode_sections'] ) ? implode( ',', $this->request['bbcode_sections'] ) : '', - 'bbcode_php_plugin' => trim( $this->request['bbcode_php_plugin'] ), - 'bbcode_parse' => 2, - 'bbcode_no_parsing' => intval( $this->request['bbcode_no_parsing'] ), - 'bbcode_optional_option' => intval( $this->request['bbcode_optional_option'] ), - 'bbcode_aliases' => $this->request['bbcode_aliases'], - 'bbcode_image' => $this->request['bbcode_image'], - 'bbcode_strip_search' => intval( $this->request['bbcode_strip_search'] ), - 'bbcode_app' => $this->request['bbcode_app'], - ); - - if( IN_DEV ) - { - $array['bbcode_protected'] = intval( $this->request['bbcode_protected'] ); - } - else - { - $array['bbcode_protected'] = $bbcode['bbcode_protected']; - } - - if ( $type == 'add' ) - { - $check = $this->DB->buildAndFetch( array( 'select' => 'bbcode_tag', 'from' => 'custom_bbcode', 'where' => "bbcode_tag='{$array['bbcode_tag']}'" ) ); - - if( $check['bbcode_tag'] ) - { - $this->registry->output->global_message = $this->lang->words['must_use_unique_btag']; - $this->_bbcodeForm($type); - return; - } - - $this->DB->insert( 'custom_bbcode', $array ); - $this->registry->output->global_message = $this->lang->words['new_bbcode']; - } - else - { - $check = $this->DB->buildAndFetch( array( 'select' => 'bbcode_tag', 'from' => 'custom_bbcode', 'where' => "bbcode_tag='{$array['bbcode_tag']}' AND bbcode_id<>" . intval($this->request['id']) ) ); - - if( $check['bbcode_tag'] ) - { - $this->registry->output->global_message = $this->lang->words['must_use_unique_btag']; - $this->_bbcodeForm($type); - return; - } - - if ( $this->request['drop_cache'] ) - { - IPSContentCache::truncate(); - } - - $this->DB->update( 'custom_bbcode', $array, 'bbcode_id=' . intval($this->request['id']) ); - $this->registry->output->global_message = $this->lang->words['edited_bbcode']; - } - - $this->bbcodeRebuildCache(); - - $this->_bbcodeStart(); - } - - - /** - * Add/Edit bbcode form - * - * @access private - * @param string [add|edit] - * @return void [Outputs to screen] - */ - private function _bbcodeForm($type='add') - { - $this->registry->output->nav[] = array( '', $this->lang->words['add_edit'] ); - - if ( $type == 'edit' ) - { - if ( ! $this->request['id'] ) - { - $this->registry->output->global_message = $this->lang->words['no_bbcode_found_edit']; - $this->_bbcodeStart(); - return; - } - - $bbcode = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'custom_bbcode', 'where' => 'bbcode_id=' . intval($this->request['id']) ) ); - - if( !$bbcode['bbcode_id'] ) - { - $this->registry->output->showError( $this->lang->words['no_bbcode_found_edit'], 111163 ); - } - } - else - { - $bbcode = array(); - } - - //----------------------------------------- - // Grab the 'sections' - //----------------------------------------- - - $sections = array(); - - foreach( ipsRegistry::$applications as $_app_dir => $app_data ) - { - $_file = IPSLib::getAppDir( $_app_dir ) . '/extensions/editorSections.php'; - - if( file_exists($_file) ) - { - $BBCODE = array(); - - include( $_file ); - - if( is_array($BBCODE) AND count($BBCODE) ) - { - $sections = array_merge( $sections, $BBCODE ); - } - } - } - - $this->registry->output->html .= $this->html->bbcodeForm( $type, $bbcode, $sections ); - } - - /** - * Bbcode splash page - * - * @access private - * @return void [Outputs to screen] - */ - private function _bbcodeStart() - { - //----------------------------------------- - // Show the codes mahn! - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'custom_bbcode', 'order' => 'bbcode_title' ) ); - $this->DB->execute(); - - $bbcode_rows = ""; - - while ( $row = $this->DB->fetch() ) - { - if ( $row['bbcode_useoption'] ) - { - $option = '={option}'; - } - else - { - $option = ''; - } - - if( $row['bbcode_single_tag'] ) - { - $row['bbcode_fulltag'] = '['.$row['bbcode_tag'].$option.']'; - } - else - { - $row['bbcode_fulltag'] = '['.$row['bbcode_tag'].$option.']{content}[/'.$row['bbcode_tag'].']'; - } - - $bbcode_rows .= $this->html->bbcodeRow( $row ); - } - - $this->registry->output->html .= $this->html->bbcodeWrapper( $bbcode_rows ); - } - - /** - * Rebuild bbcode cache - * - * @access public - * @return void [Outputs to screen] - */ - public function bbcodeRebuildCache() - { - $cache = array(); - - $this->DB->build( array( 'select' => '*', 'from' => 'custom_bbcode' ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch($bbcode) ) - { - $cache[] = $r; - } - - $this->cache->setCache( 'bbcode', $cache, array( 'array' => 1 ) ); - } - + + * Invision Power Services + * IP.Board v3.1.4 + * BBCode Management + * Last Updated: $LastChangedDate: 2010-09-29 20:23:38 -0400 (Wed, 29 Sep 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 27th January 2004 + * @version $Rev: 6925 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_posts_bbcode extends ipsCommand +{ + /** + * Skin object + * + * @access private + * @var object Skin templates + */ + private $html; + + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = $this->registry->output->loadTemplate('cp_skin_bbcode'); + + //----------------------------------------- + // Set up stuff + //----------------------------------------- + + $this->form_code = $this->html->form_code = 'module=posts&section=bbcode'; + $this->form_code_js = $this->html->form_code_js = 'module=posts§ion=bbcode'; + + //----------------------------------------- + // Load lang + //----------------------------------------- + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_posts' ) ); + + ///---------------------------------------- + // What to do... + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'bbcode_add': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); + $this->_bbcodeForm('add'); + break; + + case 'bbcode_doadd': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); + $this->_bbcodeSave('add'); + break; + + case 'bbcode_edit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); + $this->_bbcodeForm('edit'); + break; + + case 'bbcode_doedit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); + $this->_bbcodeSave('edit'); + break; + + case 'bbcode_test': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); + $this->_bbcodeTest(); + break; + + case 'bbcode_delete': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_delete' ); + $this->_bbcodeDelete(); + break; + + case 'bbcode_export': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); + $this->_bbcodeExport(); + break; + + case 'bbcode_import': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); + $this->_bbcodeImport(); + break; + + case 'bbcode_import_all': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); + $this->_bbcodeImportAll(); + break; + case 'bbcode_export_all': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); + $this->_bbcodeExportAll(); + break; + + case 'bbcode': + case 'overview': + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bbcode_manage' ); + $this->_bbcodeStart(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Export all bbcode XML file + * + * @access private + * @return void [Outputs to screen] + */ + private function _bbcodeExportAll() + { + /* Loop through apps */ + $msg = array(); + + require_once( IPS_KERNEL_PATH.'classXML.php' ); + + $xml = new classXML( IPS_DOC_CHAR_SET ); + + foreach( ipsRegistry::$applications as $appDir => $appData ) + { + $_c = 0; + + $xml->newXMLDocument(); + $xml->addElement( 'bbcodeexport' ); + $xml->addElement( 'bbcodegroup', 'bbcodeexport' ); + + $this->DB->build( array( 'select' => '*', 'from' => 'custom_bbcode', 'where' => 'bbcode_app=\'' . $appDir . "'" ) ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $_c++; + + $xml->addElementAsRecord( 'bbcodegroup', 'bbcode', $r ); + } + + $xmlData = $xml->fetchDocument(); + + + $file = IPSLib::getAppDir( $appDir ) . '/xml/' . $appDir . '_bbcode.xml'; + + /* remove old file */ + @unlink( $file ); + + /* Write it.. */ + if ( $_c ) + { + @file_put_contents( $file, $xmlData ); + } + + /* In dev time stamp? */ + if ( IN_DEV ) + { + $cache = $this->caches['indev']; + $cache['import']['bbcode'][ $appDir ] = time(); + $this->cache->setCache( 'indev', $cache, array( 'donow' => 1, 'array' => 1 ) ); + } + } + + $this->registry->output->global_message = "Completed" . implode( "
", $msg ); + + $this->_bbcodeStart(); + } + + /** + * Import a bbcode XML file + * + * @access private + * @return void [Outputs to screen] + */ + private function _bbcodeImportAll() + { + /* Loop through apps */ + $msg = array(); + + foreach( ipsRegistry::$applications as $appDir => $appData ) + { + $file = IPSLib::getAppDir( $appDir ) . '/xml/' . $appDir . '_bbcode.xml'; + + if ( file_exists( $file ) ) + { + $content = @file_get_contents( $file ); + + if ( $content ) + { + $result = $this->bbcodeImportDo( $content, $appDir ); + + $msg[] = sprintf( $this->lang->words['bbcode_import_app'], $appDir, $result['inserted'], $result['updated'] ); + } + } + + /* In dev time stamp? */ + if ( IN_DEV ) + { + $cache = $this->caches['indev']; + $cache['import']['bbcode'][ $appDir ] = time(); + $this->cache->setCache( 'indev', $cache, array( 'donow' => 1, 'array' => 1 ) ); + } + } + + $this->registry->output->global_message = implode( "
", $msg ); + + $this->_bbcodeStart(); + } + + /** + * Import a bbcode XML file + * + * @access private + * @return void [Outputs to screen] + */ + private function _bbcodeImport() + { + $content = $this->registry->getClass('adminFunctions')->importXml(); + + //----------------------------------------- + // Got anything? + //----------------------------------------- + + if ( ! $content ) + { + $this->registry->output->global_message = $this->lang->words['upload_failed']; + $this->_bbcodeStart(); + return; + } + + /* Do it */ + $this->bbcodeImportDo( $content ); + + $this->registry->output->global_message = $this->lang->words['import_complete']; + + $this->_bbcodeStart(); + } + + /** + * Perform the BBcode import + * Abstracted here so the installer can use it (and potentially other apps) + * + * @access public + * @param string Raw XML code + * @return array [ 'inserted' => int, 'updated' => int ] + */ + public function bbcodeImportDo( $content, $app='core' ) + { + //----------------------------------------- + // Get xml class + //----------------------------------------- + + require_once( IPS_KERNEL_PATH.'classXML.php' ); + + $xml = new classXML( IPS_DOC_CHAR_SET ); + $xml->loadXML( $content ); + + //----------------------------------------- + // Get current custom bbcodes + //----------------------------------------- + + $tags = array(); + $return = array( 'updated' => 0, 'inserted' => 0 ); + + $this->DB->build( array( 'select' => '*', 'from' => 'custom_bbcode' ) ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $tags[ $r['bbcode_tag'] ] = 1; + } + + //----------------------------------------- + // pArse + //----------------------------------------- + + foreach( $xml->fetchElements('bbcode') as $bbcode ) + { + $entry = $xml->fetchElementsFromRecord( $bbcode ); + + $bbcode_title = $entry['bbcode_title']; + $bbcode_desc = $entry['bbcode_desc']; + $bbcode_tag = $entry['bbcode_tag']; + $bbcode_replace = $entry['bbcode_replace']; + $bbcode_useoption = $entry['bbcode_useoption']; + $bbcode_example = $entry['bbcode_example']; + $bbcode_switch_option = $entry['bbcode_switch_option']; + $bbcode_menu_option_text = $entry['bbcode_menu_option_text']; + $bbcode_menu_content_text = $entry['bbcode_menu_content_text']; + $bbcode_single_tag = $entry['bbcode_single_tag']; + $bbcode_php_plugin = $entry['bbcode_php_plugin']; + $bbcode_no_parsing = $entry['bbcode_no_parsing']; + $bbcode_optional_option = $entry['bbcode_optional_option']; + $bbcode_aliases = $entry['bbcode_aliases']; + $bbcode_image = $entry['bbcode_image']; + $bbcode_app = ( $entry['bbcode_app'] ) ? $entry['bbcode_app'] : $app; + $bbcode_protected = ( $entry['bbcode_protected'] ) ? $entry['bbcode_protected'] : 0; + $bbcode_sections = ( $entry['bbcode_sections'] ) ? $entry['bbcode_sections'] : 'all'; + $bbcode_regex = ( $entry['bbcode_custom_regex'] ) ? $entry['bbcode_custom_regex'] : ''; + + if ( $tags[ $bbcode_tag ] ) + { + $bbarray = array( + 'bbcode_title' => $bbcode_title, + 'bbcode_desc' => $bbcode_desc, + 'bbcode_tag' => $bbcode_tag, + 'bbcode_replace' => IPSText::safeslashes($bbcode_replace), + 'bbcode_useoption' => $bbcode_useoption, + 'bbcode_example' => $bbcode_example, + 'bbcode_switch_option' => $bbcode_switch_option, + 'bbcode_menu_option_text' => $bbcode_menu_option_text, + 'bbcode_menu_content_text' => $bbcode_menu_content_text, + 'bbcode_php_plugin' => $bbcode_php_plugin, + 'bbcode_no_parsing' => $bbcode_no_parsing, + 'bbcode_optional_option' => $bbcode_optional_option, + 'bbcode_aliases' => $bbcode_aliases, + 'bbcode_image' => $bbcode_image, + 'bbcode_single_tag' => $bbcode_single_tag, + 'bbcode_app' => $bbcode_app, + 'bbcode_protected' => $bbcode_protected, + 'bbcode_custom_regex' => $bbcode_regex, + ); + + $this->DB->update( 'custom_bbcode', $bbarray, "bbcode_tag='" . $bbcode_tag . "'" ); + $return['updated']++; + continue; + } + + if ( $bbcode_tag ) + { + $bbarray = array( + 'bbcode_title' => $bbcode_title, + 'bbcode_desc' => $bbcode_desc, + 'bbcode_tag' => $bbcode_tag, + 'bbcode_replace' => IPSText::safeslashes($bbcode_replace), + 'bbcode_useoption' => $bbcode_useoption, + 'bbcode_example' => $bbcode_example, + 'bbcode_switch_option' => $bbcode_switch_option, + 'bbcode_menu_option_text' => $bbcode_menu_option_text, + 'bbcode_menu_content_text' => $bbcode_menu_content_text, + 'bbcode_groups' => 'all', + 'bbcode_sections' => $bbcode_sections, + 'bbcode_php_plugin' => $bbcode_php_plugin, + 'bbcode_no_parsing' => $bbcode_no_parsing, + 'bbcode_optional_option' => $bbcode_optional_option, + 'bbcode_aliases' => $bbcode_aliases, + 'bbcode_image' => $bbcode_image, + 'bbcode_single_tag' => $bbcode_single_tag, + 'bbcode_app' => $bbcode_app, + 'bbcode_protected' => $bbcode_protected, + 'bbcode_custom_regex' => $bbcode_regex, + ); + + $this->DB->insert( 'custom_bbcode', $bbarray ); + $return['inserted']++; + } + } + + $this->bbcodeRebuildCache(); + + return $return; + } + + /** + * Export a bbcode XML file + * + * @access private + * @return void [Outputs to screen] + */ + private function _bbcodeExport() + { + //----------------------------------------- + // Get xml class + //----------------------------------------- + + require_once( IPS_KERNEL_PATH.'classXML.php' ); + + $xml = new classXML( IPS_DOC_CHAR_SET ); + + $xml->newXMLDocument(); + $xml->addElement( 'bbcodeexport' ); + $xml->addElement( 'bbcodegroup', 'bbcodeexport' ); + + //----------------------------------------- + // Get bbcodes + //----------------------------------------- + + $select = array( 'select' => '*', 'from' => 'custom_bbcode' ); + + if( $this->request['id'] ) + { + $select['where'] = 'bbcode_id=' . intval($this->request['id']); + } + + $this->DB->build( $select ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $xml->addElementAsRecord( 'bbcodegroup', 'bbcode', $r ); + } + + $xmlData = $xml->fetchDocument(); + + //----------------------------------------- + // Send to browser. + //----------------------------------------- + + $this->registry->output->showDownload( $xmlData, 'bbcode.xml', '', 0 ); + } + + /** + * Delete a bbcode + * + * @access private + * @return void [Outputs to screen] + */ + private function _bbcodeDelete() + { + if ( ! $this->request['id'] ) + { + $this->registry->output->global_message = $this->lang->words['no_bbcode_found_delete']; + $this->_bbcodeStart(); + return; + } + + $this->DB->delete( 'custom_bbcode', 'bbcode_id=' . intval($this->request['id']) ); + + $this->bbcodeRebuildCache(); + + $this->_bbcodeStart(); + } + + /** + * Test a bbcode + * + * @access private + * @return void [Outputs to screen] + * @todo [Future] Also show the resulting HTML alongside the formatted content + */ + private function _bbcodeTest() + { + $t = IPSText::stripslashes(htmlspecialchars($_POST['bbtest'])); + + //----------------------------------------- + // Run through libraries + //----------------------------------------- + + IPSText::getTextClass('bbcode')->parse_bbcode = 1; + IPSText::getTextClass('bbcode')->parse_smilies = 0; + IPSText::getTextClass('bbcode')->parse_wordwrap = 0; + IPSText::getTextClass('bbcode')->parsing_section = 'global'; + + //----------------------------------------- + // Store the url/fix base url + //----------------------------------------- + + $_current = $this->settings[ 'base_url' ]; + $this->settings['base_url'] = $this->settings['board_url'] . '/index.php?'; + + //----------------------------------------- + // Parse + //----------------------------------------- + + $t = IPSText::getTextClass('bbcode')->preDbParse( $t ); + $t = IPSText::getTextClass('bbcode')->preDisplayParse( $t ); + + //----------------------------------------- + // Restore base url + //----------------------------------------- + + $this->settings['base_url'] = $_current; + + $this->registry->output->global_message = $this->lang->words['bbcode_test'] . $t; + + $this->_bbcodeStart(); + } + + /** + * Save a bbcode [add|edit] + * + * @access private + * @param string [add|edit] + * @return void [Outputs to screen] + */ + private function _bbcodeSave($type='add') + { + if ( $type == 'edit' ) + { + if ( ! $this->request['id'] ) + { + $this->registry->output->global_message = $this->lang->words['no_bbcode_found_edit']; + $this->_bbcodeForm($type); + return; + } + + $bbcode = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'custom_bbcode', 'where' => 'bbcode_id=' . intval($this->request['id']) ) ); + + if( !$bbcode['bbcode_id'] ) + { + $this->registry->output->showError( $this->lang->words['no_bbcode_found_edit'], 111162 ); + } + + if( $this->request['bbcode_tag'] ) + { + $duplicate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'custom_bbcode', 'where' => "bbcode_tag='{$this->request['bbcode_tag']}'" ) ); + + if( $duplicate['bbcode_id'] && $duplicate['bbcode_id'] != $this->request['id'] ) + { + $this->registry->output->global_message = $this->lang->words['tag_already']; + $this->_bbcodeForm($type); + return; + } + + /* Check aliases */ + $this->DB->build( array( 'select' => '*', + 'from' => 'custom_bbcode', + 'where' => 'bbcode_aliases LIKE \'%' . $this->DB->addSlashes( $this->request['bbcode_tag'] ) . '%\'' ) ); + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + if( $row['bbcode_id'] == $this->request['id'] ) + { + continue; + } + + foreach( explode( ',', $row['bbcode_aliases'] ) as $alias ) + { + if ( strtolower( $alias ) == strtolower( $this->request['bbcode_tag'] ) ) + { + $this->registry->output->global_message = sprintf( $this->lang->words['tag_already_alias'], $this->request['bbcode_tag'], $row['bbcode_tag'] ); + $this->_bbcodeForm($type); + return; + } + } + } + } + } + else + { + $bbcode = array(); + + if( $this->request['bbcode_tag'] ) + { + $duplicate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'custom_bbcode', 'where' => "bbcode_tag='{$this->request['bbcode_tag']}'" ) ); + + if( $duplicate['bbcode_id'] ) + { + $this->registry->output->global_message = $this->lang->words['tag_already']; + $this->_bbcodeForm($type); + return; + } + + /* Check aliases */ + $this->DB->build( array( 'select' => '*', + 'from' => 'custom_bbcode', + 'where' => 'bbcode_aliases LIKE \'%' . $this->DB->addSlashes( $this->request['bbcode_tag'] ) . '%\'' ) ); + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + foreach( explode( ',', $row['bbcode_aliases'] ) as $alias ) + { + if ( strtolower( $alias ) == strtolower( $this->request['bbcode_tag'] ) ) + { + $this->registry->output->global_message = sprintf( $this->lang->words['tag_already_alias'], $this->request['bbcode_tag'], $row['bbcode_tag'] ); + $this->_bbcodeForm($type); + return; + } + } + } + } + } + + //----------------------------------------- + // Fix BR tags + //----------------------------------------- + + $this->request['bbcode_aliases'] = str_replace( array( ' ', "\n" ), '', IPSText::br2nl( $this->request['bbcode_aliases'] ) ); + + //----------------------------------------- + // check... + //----------------------------------------- + + if ( !$this->request['bbcode_title'] or !$this->request['bbcode_tag'] or ( !$this->request['bbcode_replace'] AND !$this->request['bbcode_php_plugin'] ) ) + { + $this->registry->output->global_message = $this->lang->words['complete_form']; + $this->_bbcodeForm($type); + return; + } + + if ( !$this->request['bbcode_single_tag'] AND !strstr( $this->request['bbcode_replace'], '{content}' ) AND !$this->request['bbcode_php_plugin'] ) + { + $this->registry->output->global_message = $this->lang->words['must_use_content']; + $this->_bbcodeForm($type); + return; + } + + if ( !strstr( $this->request['bbcode_replace'], '{option}' ) AND $this->request['bbcode_useoption'] AND !$this->request['bbcode_php_plugin'] ) + { + $this->registry->output->global_message = $this->lang->words['must_use_option']; + $this->_bbcodeForm($type); + return; + } + + if( preg_match( "/[^a-zA-Z0-9_]/", $this->request['bbcode_tag'] ) ) + { + $this->registry->output->global_message = $this->lang->words['bbcode_alpha_num']; + $this->_bbcodeForm($type); + return; + } + + $_aliases = explode( ",", $this->request['bbcode_aliases'] ); + + foreach( $_aliases as $_alias ) + { + if( preg_match( "/[^a-zA-Z0-9_]/", $_alias ) ) + { + $this->registry->output->global_message = $this->lang->words['bbcode_alpha_num']; + $this->_bbcodeForm($type); + return; + } + } + + $array = array( + 'bbcode_title' => $this->request['bbcode_title'], + 'bbcode_desc' => IPSText::safeslashes( $_POST['bbcode_desc'] ), + 'bbcode_tag' => preg_replace( "/[^a-zA-Z0-9_]/", "", $this->request['bbcode_tag'] ), + 'bbcode_replace' => IPSText::safeslashes( $_POST['bbcode_replace'] ), + 'bbcode_example' => IPSText::safeslashes( $_POST['bbcode_example'] ), + 'bbcode_useoption' => $this->request['bbcode_useoption'], + 'bbcode_switch_option' => intval( $this->request['bbcode_switch_option'] ), + 'bbcode_menu_option_text' => trim( $this->request['bbcode_menu_option_text'] ), + 'bbcode_menu_content_text' => trim( $this->request['bbcode_menu_content_text'] ), + 'bbcode_single_tag' => intval( $this->request['bbcode_single_tag'] ), + 'bbcode_groups' => is_array( $this->request['bbcode_groups'] ) ? implode( ',', $this->request['bbcode_groups'] ) : '', + 'bbcode_sections' => is_array( $this->request['bbcode_sections'] ) ? implode( ',', $this->request['bbcode_sections'] ) : '', + 'bbcode_php_plugin' => trim( $this->request['bbcode_php_plugin'] ), + 'bbcode_no_parsing' => intval( $this->request['bbcode_no_parsing'] ), + 'bbcode_optional_option' => intval( $this->request['bbcode_optional_option'] ), + 'bbcode_aliases' => $this->request['bbcode_aliases'], + 'bbcode_image' => $this->request['bbcode_image'], + 'bbcode_strip_search' => intval( $this->request['bbcode_strip_search'] ), + 'bbcode_app' => $this->request['bbcode_app'], + 'bbcode_protected' => intval( $this->request['bbcode_protected'] ), + 'bbcode_custom_regex' => str_replace( "\", '\\', IPSText::stripslashes( $_POST['bbcode_custom_regex'] ) ), + ); + + if ( $type == 'add' ) + { + $check = $this->DB->buildAndFetch( array( 'select' => 'bbcode_tag', 'from' => 'custom_bbcode', 'where' => "bbcode_tag='{$array['bbcode_tag']}'" ) ); + + if( $check['bbcode_tag'] ) + { + $this->registry->output->global_message = $this->lang->words['must_use_unique_btag']; + $this->_bbcodeForm($type); + return; + } + + $this->DB->insert( 'custom_bbcode', $array ); + $this->registry->output->global_message = $this->lang->words['new_bbcode']; + } + else + { + $check = $this->DB->buildAndFetch( array( 'select' => 'bbcode_tag', 'from' => 'custom_bbcode', 'where' => "bbcode_tag='{$array['bbcode_tag']}' AND bbcode_id<>" . intval($this->request['id']) ) ); + + if( $check['bbcode_tag'] ) + { + $this->registry->output->global_message = $this->lang->words['must_use_unique_btag']; + $this->_bbcodeForm($type); + return; + } + + if ( $this->request['drop_cache'] ) + { + IPSContentCache::truncate(); + } + + $this->DB->update( 'custom_bbcode', $array, 'bbcode_id=' . intval($this->request['id']) ); + $this->registry->output->global_message = $this->lang->words['edited_bbcode']; + } + + $this->bbcodeRebuildCache(); + + $this->_bbcodeStart(); + } + + + /** + * Add/Edit bbcode form + * + * @access private + * @param string [add|edit] + * @return void [Outputs to screen] + */ + private function _bbcodeForm($type='add') + { + $this->registry->output->nav[] = array( '', $this->lang->words['add_edit'] ); + + if ( $type == 'edit' ) + { + if ( ! $this->request['id'] ) + { + $this->registry->output->global_message = $this->lang->words['no_bbcode_found_edit']; + $this->_bbcodeStart(); + return; + } + + $bbcode = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'custom_bbcode', 'where' => 'bbcode_id=' . intval($this->request['id']) ) ); + + #Issue 20376 + $bbcode['bbcode_desc'] = stripslashes( $bbcode['bbcode_desc'] ); + $bbcode['bbcode_replace'] = stripslashes( $bbcode['bbcode_replace'] ); + $bbcode['bbcode_example'] = stripslashes( $bbcode['bbcode_example'] ); + + if( !$bbcode['bbcode_id'] ) + { + $this->registry->output->showError( $this->lang->words['no_bbcode_found_edit'], 111163 ); + } + } + else + { + $bbcode = array(); + } + + //----------------------------------------- + // Grab the 'sections' + //----------------------------------------- + + $sections = array(); + + foreach( ipsRegistry::$applications as $_app_dir => $app_data ) + { + $_file = IPSLib::getAppDir( $_app_dir ) . '/extensions/editorSections.php'; + + if( file_exists($_file) ) + { + $BBCODE = array(); + + include( $_file ); + + if( is_array($BBCODE) AND count($BBCODE) ) + { + $sections = array_merge( $sections, $BBCODE ); + } + } + } + + $this->registry->output->html .= $this->html->bbcodeForm( $type, $bbcode, $sections ); + } + + /** + * Bbcode splash page + * + * @access private + * @return void [Outputs to screen] + */ + private function _bbcodeStart() + { + //----------------------------------------- + // Show the codes mahn! + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'custom_bbcode', 'order' => 'bbcode_title' ) ); + $this->DB->execute(); + + $bbcode_rows = ""; + + while ( $row = $this->DB->fetch() ) + { + if ( $row['bbcode_useoption'] ) + { + $option = '={option}'; + } + else + { + $option = ''; + } + + if( $row['bbcode_single_tag'] ) + { + $row['bbcode_fulltag'] = '['.$row['bbcode_tag'].$option.']'; + } + else + { + $row['bbcode_fulltag'] = '['.$row['bbcode_tag'].$option.']{content}[/'.$row['bbcode_tag'].']'; + } + + $bbcode_rows .= $this->html->bbcodeRow( $row ); + } + + $this->registry->output->html .= $this->html->bbcodeWrapper( $bbcode_rows ); + } + + /** + * Rebuild bbcode cache + * + * @access public + * @return void [Outputs to screen] + */ + public function bbcodeRebuildCache() + { + $cache = array(); + + $this->DB->build( array( 'select' => '*', 'from' => 'custom_bbcode', 'order' => 'bbcode_title ASC' ) ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $cache[] = $r; + } + + $this->cache->setCache( 'bbcode', $cache, array( 'array' => 1 ) ); + } + } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/posts/defaultSection.php b/upload/admin/applications/core/modules_admin/posts/defaultSection.php index 0e98259b..9e05fed6 100644 --- a/upload/admin/applications/core/modules_admin/posts/defaultSection.php +++ b/upload/admin/applications/core/modules_admin/posts/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default posts section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/posts/emoticons.php b/upload/admin/applications/core/modules_admin/posts/emoticons.php index b3508bac..b8217e27 100644 --- a/upload/admin/applications/core/modules_admin/posts/emoticons.php +++ b/upload/admin/applications/core/modules_admin/posts/emoticons.php @@ -1,1289 +1,1291 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_core_posts_emoticons extends ipsCommand -{ - /** - * Allowed file types - * - * @access public - * @var array - */ - public $allowed_files = array( 'png', 'jpeg', 'jpg', 'gif' ); - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - /* Load Skin and Lang */ - $this->html = $this->registry->output->loadTemplate( 'cp_skin_emoticons' ); - $this->html->form_code = '&module=posts&section=emoticons&'; - $this->html->form_code_js = '&module=posts§ion=emoticons&'; - - $this->lang->loadLanguageFile( array( 'admin_posts' ) ); - - //----------------------------------------- - // What to do... - //----------------------------------------- - - switch( $this->request['do'] ) - { - case 'emo_packsplash': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_manage' ); - $this->emoticonsPackSplash(); - break; - - case 'emo_packexport': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_manage' ); - $this->emoticonsPackExport(); - break; - - case 'emo_packimport': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_manage' ); - $this->emoticonsPackImport(); - break; - - case 'emo_manage': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_manage' ); - $this->emoticonsManageDirectory(); - break; - - case 'emo_doedit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_edit' ); - $this->emoticonsEdit(); - break; - - case 'emo_doadd': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_add' ); - $this->emoticonsAdd(); - break; - - case 'emo_remove': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_delete' ); - $this->emoticonsRemove(); - break; - - case 'emo_setadd': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_add' ); - $this->emoticonsSetAlter( $type='add' ); - break; - - case 'emo_setedit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_edit' ); - $this->emoticonsSetAlter( $type='edit' ); - break; - - case 'emo_setremove': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_delete' ); - $this->emoticonsSetRemove(); - break; - - case 'emo_upload': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_add' ); - $this->emoticonsUpload(); - break; - - case 'emo': - case 'overview': - default: - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_manage' ); - $this->emoticonsOverview(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Import an emoticon pack - * - * @access public - * @return void - */ - public function emoticonsPackImport() - { - /* Get the xml file */ - $content = $this->registry->adminFunctions->importXml( 'ipb_emoticons.xml' ); - - /* Check for content */ - if ( ! $content ) - { - $this->registry->output->global_message = $this->lang->words['emo_fail']; - return $this->emoticonsPackSplash(); - } - - /* Setup XML */ - require_once( IPS_KERNEL_PATH.'classXML.php' ); - $xml = new classXML( IPS_DOC_CHAR_SET ); - - require_once( IPS_KERNEL_PATH.'classXMLArchive.php' ); - $xmlarchive = new classXMLArchive(); - - /* Read the archive */ - $xmlarchive->readXML( $content ); - - /* Get the data file */ - $emoticons = array(); - $emoticon_data = array(); - - foreach( $xmlarchive->asArray() as $k => $f ) - { - if ( $k == 'emoticon_data.xml' ) - { - $emoticon_data = $f; - } - else - { - $emoticons[ $f['filename'] ] = $f['content']; - } - } - - /* Parse the XML Document */ - $xml->loadXML( $emoticon_data['content'] ); - - /* Make sure we have a destination for these emoicons */ - if ( ! $this->request['emo_set'] and ! $this->request['new_emo_set'] ) - { - $this->registry->output->global_message = $this->lang->words['emo_specify']; - } - - /* Current emoticon set directory */ - $emo_set_dir = trim( $this->request['emo_set'] ); - - /* New emoticon set directory */ - $this->request['new_emo_set'] = preg_replace( "/[^a-zA-Z0-9\-_]/", "", $this->request['new_emo_set'] ); - - /* Create the new set */ - if ( $this->request['new_emo_set'] ) - { - $emo_set_dir = trim( $this->request['new_emo_set'] ); - - /* Check to see if the directory already exists */ - if ( file_exists( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $emo_set_dir ) ) - { - $this->registry->output->global_message = sprintf( $this->lang->words['emo_already'], $emo_set_dir ); - return $this->emoticonsPackSplash(); - } - - /* Create the directory */ - if ( @mkdir( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $emo_set_dir, 0777 ) ) - { - @chmod( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $emo_set_dir, 0777 ); - @file_put_contents( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $emo_set_dir . '/index.html', '' ); - } - else - { - $this->registry->output->global_message = $this->lang->words['emo_ftp']; - return $this->emoticonsPackSplash(); - } - } - - /* Get a list of current emoticons, if we are not overwriting */ - $emo_image = array(); - $emo_typed = array(); - - if ( $this->request['overwrite'] != 1 ) - { - $this->DB->build( array( 'select' => '*', 'from' => 'emoticons', 'where' => "emo_set='".$emo_set_dir."'" ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $emo_image[ $r['image'] ] = 1; - $emo_typed[ $r['typed'] ] = 1; - } - } - - /* Loop through the emoticons in the xml document */ - foreach( $xml->fetchElements('emoticon') as $emoticon ) - { - $entry = $xml->fetchElementsFromRecord( $emoticon ); - - /* Emoticon Data */ - $image = $entry['image']; - $typed = $entry['typed']; - $click = $entry['clickable']; - - /* Skip if we're not overwriting */ - if ( $emo_image[ $image ] or $emo_typed[ $typed ] ) - { - continue; - } - - /* Get the extension */ - $file_extension = preg_replace( "#^.*\.(.+?)$#si", "\\1", mb_strtolower( $image ) ); - - /* Make sure it's allowed */ - if ( ! in_array( $file_extension, $this->allowed_files ) ) - { - continue; - } - - /* Remove any existing emoticon */ - @unlink( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $emo_set_dir . '/' . $image ); - - $this->DB->delete( 'emoticons', "typed='$typed' and image='$image' and emo_set='$emo_set_dir'" ); - - /* Create the image in the file system */ - if( $FH = fopen( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' .$emo_set_dir . '/' . $image, 'wb' ) ) - { - if ( fwrite( $FH, $emoticons[ $image ] ) ) - { - fclose( $FH ); - - /* Insert the emoticon record */ - $this->DB->insert( 'emoticons', array( 'typed' => $typed, 'image' => $image, 'clickable' => $click, 'emo_set' => $emo_set_dir ) ); - } - } - - /* Add the emoticon to all the other directories */ - try - { - foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' ) as $file ) - { - if( ! $file->isDot() && $file->isDir() ) - { - if ( substr( $file->getFilename(), 0, 1 ) == '.' ) - { - continue; - } - - if ( ! file_exists( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $file->getFilename() . '/' . $image ) ) - { - $this->DB->buildAndFetch( array( 'delete' => 'emoticons', 'where' => "typed='$typed' and image='$image' and emo_set='{$file->getFilename()}'" ) ); - - if ( $FH = @fopen( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $file->getFilename() . '/' . $image, 'wb' ) ) - { - if ( fwrite( $FH, $emoticons[ $image ] ) ) - { - fclose( $FH ); - - $this->DB->insert( 'emoticons', array( 'typed' => $typed, 'image' => $image, 'clickable' => $click, 'emo_set' => $file->getFilename() ) ); - } - } - } - } - } - } catch ( Exception $e ) {} - } - - /* Recache and bounce */ - $this->emoticonsRebuildCache(); - - $this->registry->output->global_message = $this->lang->words['emo_xml_good']; - $this->emoticonsOverview(); - - } - - /** - * Export the specified emoticon directory - * - * @access public - * @return void - */ - public function emoticonsPackExport() - { - /* Setup XML */ - require_once( IPS_KERNEL_PATH.'classXML.php' ); - $xml = new classXML( IPS_DOC_CHAR_SET ); - - require_once( IPS_KERNEL_PATH . 'classXMLArchive.php' ); - $xmlarchive = new classXMLArchive(); - - /* Check the emoticon set */ - if ( ! $this->request['emo_set'] ) - { - $this->registry->output->global_message = $this->lang->words['emo_specify_exS']; - $this->emoticonsOverview(); - return; - } - - /* Get emoticons from the database */ - $emo_db = array(); - - $this->DB->build( array( 'select' => '*', 'from' => 'emoticons', 'where' => "emo_set='{$this->request['emo_set']}'" ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $emo_db[ $r['image'] ] = $r; - } - - /* Get Emoticon Folders */ - $emodirs = array(); - $emodd = array(); - $files_to_add = array(); - - try - { - foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $this->request['emo_set'] ) as $file ) - { - if( ! $file->isDot() ) - { - if ( $emo_db[ $file->getFilename() ] != "" ) - { - $files_to_add[] = DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $this->request['emo_set'] . '/' . $file->getFilename(); - } - } - } - } catch ( Exception $e ) {} - - /* Add each file to the xml archive */ - foreach( $files_to_add as $f ) - { - $xmlarchive->add( $f ); - } - - $xml->newXMLDocument(); - $xml->addElement( 'emoticonexport' ); - $xml->addElement( 'emogroup', 'emoticonexport' ); - - foreach( $emo_db as $r ) - { - $content = array(); - - $content['typed'] = $r['typed']; - $content['image'] = $r['image']; - $content['clickable'] = $r['clickable']; - - $xml->addElementAsRecord( 'emogroup', 'emoticon', $content ); - } - - /* Create the XML Document */ - $xmlData = $xml->fetchDocument(); - - /* Add the xml document to the archive */ - $xmlarchive->add( $xmlData, 'emoticon_data.xml' ); - - /* Send the archive to the browser */ - $imagearchive = $xmlarchive->getArchiveContents(); - $this->registry->output->showDownload( $imagearchive, 'ipb_emoticons.xml' ); - } - - /** - * Builds the emoticon import/export pack splash screen - * - * @access public - * @return void - */ - public function emoticonsPackSplash() - { - /* Check for the emoticon directory */ - if( ! is_dir( DOC_IPS_ROOT_PATH . 'public/style_emoticons' ) ) - { - $this->registry->output->showError( $this->lang->words['emo_nolocate'], 2110 ); - - } - - /* Count the number of current emoticons */ - $this->DB->build( array( 'select' => 'id, count(id) as count, emo_set', - 'from' => 'emoticons', - 'group' => 'id, emo_set', - 'order' => 'emo_set' - ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $emo_db[ $r['emo_set'] ] = $r; - } - - /* Get the emoticon folders */ - $emodirs = array(); - $emodd = array(); - - try - { - foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'public/style_emoticons' ) as $file ) - { - if( $file->isDir() && ! $file->isDot() ) - { - $emodirs[] = $file->getFilename(); - $emodd[] = array( $file->getFilename(), $file->getFilename() ); - } - } - } catch ( Exception $e ) {} - - /* Build Form Elements */ - $form = array(); - $form['emo_set'] = $this->registry->output->formDropdown( 'emo_set', $emodd ); - $form['new_emo_set'] = $this->registry->output->formInput( 'new_emo_set' ); - $form['overwrite'] = $this->registry->output->formYesNo( 'overwrite' ); - - /* Output */ - $this->registry->output->html .= $this->html->emoticonsPackSplash( $form ); - } - - /** - * Remove the specified emoticon - * - * @access public - * @return void - */ - public function emoticonsRemove() - { - /* Check the ID */ - if( $this->request['id'] == "" ) - { - $this->registry->output->global_message = $this->lang->words['emo_nogid']; - $this->emoticonsOverview(); - return; - } - - /* Can only remove the default set */ - if( $this->request['id'] != "default" ) - { - $this->registry->output->global_message = $this->lang->words['emo_onlydothis']; - $this->emoticonsOverview(); - return; - } - - /* Check for the emoticon ID */ - $this->request['eid'] = intval( $this->request['eid'] ); - - if( ! $this->request['eid'] ) - { - $this->registry->output->global_message = $this->lang->words['emo_noid']; - $this->emoticonsManageDirectory(); - return; - } - - /* Get the emoticon info */ - $emo_info = $this->DB->buildAndFetch( array( 'select' => 'typed', 'from' => 'emoticons', 'where' => "id=" . $this->request['eid']) ); - - /* Delete the emoticon */ - $this->DB->delete( 'emoticons', "typed='{$emo_info['typed']}'" ); - - /* Rebuild the cache and bounce */ - $this->emoticonsRebuildCache(); - - $this->registry->output->global_message = $this->lang->words['emo_removed']; - $this->emoticonsManageDirectory(); - } - - /** - * Add emoticons to the default directory - * - * @access public - * @return void - */ - public function emoticonsAdd() - { - /* Check the id */ - if( $this->request['id'] == "" ) - { - $this->registry->output->global_message = $this->lang->words['emo_nogid']; - $this->emoticonsOverview(); - return; - } - - /* Can only upload to the default directory */ - if( $this->request['id'] != "default" ) - { - $this->registry->output->global_message = $this->lang->words['emo_onlydothis']; - $this->emoticonsOverview(); - return; - } - - /* Loop through the request and look for emoticons */ - foreach( $this->request as $key => $value ) - { - if( preg_match( "/^emo_type_(\d+)$/", $key, $match ) ) - { - if( isset( $this->request[ $match[0] ] ) ) - { - /* Get the emoticon info */ - $typed = str_replace( '"', "", $this->request[ $match[0] ] ); - $click = $this->request[ 'emo_click_'.$match[1] ]; - $add = $this->request[ 'emo_add_'.$match[1] ]; - $image = $this->request[ 'emo_image_'.$match[1] ]; - $set = trim( $this->request['id'] ); - $typed = str_replace( '\', "", $typed ); - - /* Check the add all flag */ - if( $this->request['addall'] ) - { - $add = 1; - } - - /* Add this emoticon if we have have the required info */ - if( $add and $typed and $image ) - { - /* Insert the emo record */ - $this->DB->insert( 'emoticons', array( 'clickable' => intval( $click ), 'typed' => $typed, 'image' => $image, 'emo_set' => $set ) ); - - /* Emoticon list */ - $emodirs = array( 0 => ''); - - /* Loop through all the emoticons */ - try - { - foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'public/style_emoticons' ) as $file ) - { - if( ! $file->isDot() && $file->isDir() ) - { - if( $file->getFilename() == 'default' ) - { - $emodirs[0] = $file->getFilename(); - } - else - { - $emodirs[] = $file->getFilename(); - } - } - } - } catch ( Exception $e ) {} - - /* Add this emoticon to the other sets */ - foreach( $emodirs as $directory ) - { - if( $directory == $set ) - { - continue; - } - - $this->DB->insert( 'emoticons', array( 'clickable' => intval( $click ), 'typed' => $typed, 'image' => $image, 'emo_set' => $directory ) ); - } - } - } - } - } - - /* Rebuild the cache and bounce */ - $this->emoticonsRebuildCache(); - - $this->registry->output->global_message = $this->lang->words['emo_updated']; - $this->emoticonsManageDirectory(); - } - - /** - * Handles the upload emoticon form - * - * @access public - * @return void - */ - public function emoticonsUpload() - { - /* INI */ - $overwrite = 1; - $uploaded = 0; - - /* Check the request for uploads */ - $directories = array(); - $first_dir = ''; - - foreach( $this->request as $key => $value ) - { - if( preg_match( "/^dir_(.*)$/", $key, $match ) ) - { - if( $this->request[ $match[0] ] == 1 ) - { - $directories[] = $match[1]; - } - } - } - - /* Can't upload to default */ - if ( ! count( $directories ) ) - { - $this->registry->output->global_message = $this->lang->words['emo_pickanother']; - $this->emoticonsOverview(); - return; - } - - /* Remove default from the directories list */ - if ( ! in_array( 'default', $directories ) ) - { - array_push( $directories, 'default' ); - } - - /* Get the first directory */ - $first_dir = array_shift( $directories ); - - /* Loop through the dirs */ - $emodirs = array( 0 => '' ); - - try - { - foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'public/style_emoticons' ) as $file ) - { - if( ! $file->isDot() && $file->isDir() ) - { - /* Add to emoticon list */ - if( $file->getFilename() == 'default' ) - { - $emodirs[0] = $file->getFilename(); - } - else - { - $emodirs[] = $file->getFilename(); - } - } - } - } catch ( Exception $e ) {} - - /* Loop through each form upload field */ - foreach( array( 1,2,3,4 ) as $i ) - { - /* Upload Data */ - $field = 'upload_'.$i; - $FILE_NAME = $_FILES[$field]['name']; - $FILE_SIZE = $_FILES[$field]['size']; - $FILE_TYPE = $_FILES[$field]['type']; - - //----------------------------------------- - // Naughty Opera adds the filename on the end of the - // mime type - we don't want this. - //----------------------------------------- - - $FILE_TYPE = preg_replace( "/^(.+?);.*$/", "\\1", $FILE_TYPE ); - - //----------------------------------------- - // Naughty Mozilla likes to use "none" to indicate an empty upload field. - // I love universal languages that aren't universal. - //----------------------------------------- - - if ( $_FILES[$field]['name'] == "" or ! $_FILES[$field]['name'] or ($_FILES[$field]['name'] == "none") ) - { - continue; - } - - //----------------------------------------- - // Make sure it's not a NAUGHTY file - //----------------------------------------- - - $file_extension = preg_replace( "#^.*\.(.+?)$#si", "\\1", mb_strtolower( $_FILES[ $field ]['name'] ) ); - - if ( ! in_array( $file_extension, $this->allowed_files ) ) - { - $this->registry->output->global_message = $this->lang->words['emo_mimes']; // The screams of angst from Emo Mimes are silent... - $this->emoticonsOverview(); - return; - } - - //----------------------------------------- - // Copy the upload to the uploads directory - //----------------------------------------- - - if ( ! @move_uploaded_file( $_FILES[ $field ]['tmp_name'], DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $first_dir . "/" . $FILE_NAME) ) - { - $this->registry->output->global_message = "The upload failed, sorry!"; - $this->emoticonsOverview(); - return; - } - else - { - @chmod( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $first_dir . "/" . $FILE_NAME, 0777 ); - - //----------------------------------------- - // Copy to other folders - //----------------------------------------- - - if ( is_array( $directories ) and count( $directories ) ) - { - foreach ( $directories as $newdir ) - { - if ( file_exists( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $newdir . "/" . $FILE_NAME ) ) - { - if ( $overwrite != 1 OR $newdir == 'default' ) - { - continue; - } - } - - if ( @copy( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $first_dir . "/" . $FILE_NAME, DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $newdir . "/" . $FILE_NAME ) ) - { - @chmod( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $newdir . "/" . $FILE_NAME, 0777 ); - } - } - } - - // Let's make sure this 'image' is available in all directories too - if ( is_array( $emodirs ) and count( $emodirs ) ) - { - foreach ( $emodirs as $newdir ) - { - if ( file_exists( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $newdir . "/" . $FILE_NAME ) ) - { - continue; - } - - if( @copy( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $first_dir . "/" .$FILE_NAME, DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $newdir . "/" . $FILE_NAME ) ) - { - @chmod( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $newdir . "/" . $FILE_NAME, 0777 ); - } - } - } - - $uploaded++; - } - } - - if( !$uploaded ) - { - $this->registry->output->global_message = $this->lang->words['no_emo_selected']; - } - else - { - $this->registry->output->global_message = $this->lang->words['emo_complete']; - } - - $this->emoticonsOverview(); - } - - /** - * Removes an emoticon set - * - * @access public - * @return void - */ - public function emoticonsSetRemove() - { - /* Check the ID */ - if ( ! $this->request['id'] ) - { - $this->registry->output->global_message = $this->lang->words['emo_noset']; - $this->emoticonsOverview(); - } - - /* Can't remove the default set */ - if( $this->request['id'] == 'default' ) - { - $this->registry->output->global_message = $this->lang->words['emo_norename']; - $this->emoticonsOverview(); - return; - } - - /* Remove the directory */ - $this->registry->adminFunctions->removeDirectory( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $this->request['id'] ); - - /* Remove the database entry */ - $this->DB->delete( 'emoticons', "emo_set='{$this->request['id']}'" ); - - /* Rebuild cache */ - $this->emoticonsRebuildCache(); - - /* Bounce */ - $this->registry->output->global_message = $this->lang->words['emo_folder_rem']; - $this->emoticonsOverview(); - } - - /** - * Add/Edit an emoticon folder name - * - * @access public - * @param string Type (add or edit) - * @return void - */ - public function emoticonsSetAlter( $type='add' ) - { - /* Get the name */ - $name = preg_replace( "/[^a-zA-Z0-9\-_]/", "", $this->request['emoset'] ); - - /* Check th ename */ - if( $name == "" ) - { - $this->registry->output->global_message = $this->lang->words['emo_a_to_z']; - return $this->emoticonsOverview(); - } - - /* Check Safe Mode */ - if( SAFE_MODE_ON ) - { - $this->registry->output->global_message = $this->lang->words['emo_safemode']; - return $this->emoticonsOverview(); - } - - /* Check to see if the directory already exists */ - if( file_exists( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $name ) ) - { - $this->registry->output->global_message = sprintf( $this->lang->words['emo_already'], $name ); - return $this->emoticonsOverview(); - } - - if( $type == 'add' ) - { - /* Create the directory */ - if( @mkdir( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $name, 0777 ) ) - { - @chmod( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $name, 0777 ); - @file_put_contents( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $name . '/index.html', '' ); - - /* Copy default emoticons */ - try - { - foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . '/public/style_emoticons/default/' ) as $file ) - { - if( ! $file->isDot() ) - { - @copy( DOC_IPS_ROOT_PATH . '/public/style_emoticons/default/' . $file->getFilename(), DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $name . '/' . $file->getFilename() ); - @chmod( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $name . '/' . $file->getFilename(), 0777 ); - } - } - } catch ( Exception $e ) {} - - /* Query the default set */ - $this->DB->build( array( 'select' => '*', 'from' => 'emoticons', 'where' => "emo_set='default'" ) ); - $outer = $this->DB->execute(); - - /* Insert emoticons for the new set */ - while( $r = $this->DB->fetch($outer) ) - { - $this->DB->insert( "emoticons", array( 'clickable' => $r['clickable'], 'typed' => $r['typed'], 'emo_set' => $name, 'image' => $r['image'] ) ); - } - - /* Bounce */ - $this->registry->output->global_message = $this->lang->words['emo_folder_new']; - return $this->emoticonsOverview(); - } - else - { - /* Couldn't create the directory, Bounce */ - $this->registry->output->global_message = $this->lang->words['emo_ftp']; - return $this->emoticonsOverview(); - } - } - /* Edit Folder Name */ - else - { - /* Check the directory ID */ - if ( ! $this->request['id'] ) - { - $this->registry->output->global_message = $this->lang->words['emo_miss_dir']; - $this->emoticonsOverview(); - return; - } - - /* Can't rename the default directory */ - if( $this->request['id'] == 'default' ) - { - $this->registry->output->global_message = $this->lang->words['emo_norename']; - $this->emoticonsOverview(); - return; - } - - /* Rename the directory */ - if ( @rename( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $this->request['id'], DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $name ) ) - { - /* Check to see if the rename worked */ - if ( file_exists( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $name ) ) - { - /* Update all the emoticons */ - $this->DB->update( 'emoticons', array( 'emo_set' => $name ), "emo_set='{$this->request['id']}'" ); - } - - /* Rebuild the cache */ - $this->emoticonsRebuildCache(); - - /* Update skins that are using this set */ - $rebuild_sets = array(); - - /* Querh skin sets */ - $this->DB->build( array( 'select' => 'set_id', 'from' => 'skin_collections', 'where' => "set_emo_dir='{$this->request['id']}'" ) ); - $outer = $this->DB->execute(); - - /* Loop thorugh and update the emoticon folder */ - while( $r = $this->DB->fetch($outer) ) - { - $this->DB->update( 'skin_collections', array( 'set_emo_dir' => $name ), 'set_id=' . $r['set_id'] ); - $rebuild_sets[] = $r['set_id']; - } - - /* Bounce */ - $this->registry->output->global_message = $this->lang->words['emo_folder_name']; - return $this->emoticonsOverview(); - } - else - { - /* Error and bounce */ - $this->registry->output->global_message = $this->lang->words['emo_wecantdoit']; - return $this->emoticonsOverview(); - } - } - } - - /** - * Process edit emoticons forum - * - * @access public - * @return void - */ - public function emoticonsEdit() - { - /* Check ID */ - if( $this->request['id'] == '' ) - { - $this->registry->output->global_message = $this->lang->words['emo_nogid']; - return $this->emoticonsOverview(); - } - - /* Loop through the request and pull out emoticons */ - foreach( $this->request as $key => $value ) - { - /* Check to see if its an emoticon */ - if ( preg_match( "/^emo_id_(\d+)$/", $key, $match ) ) - { - if ( $match[0] ) - { - /* INI */ - $typed = ''; - - /* Format type for default set */ - if( $this->request['id'] == 'default' ) - { - $typed = str_replace( '"', "", $this->request[ 'emo_type_' . $match[1] ] ); - $typed = str_replace( '\', "", $typed ); - } - - /* Check clickable */ - $click = $this->request[ 'emo_click_' . $match[1] ]; - - /* Update the emoticon */ - if ( $match[1] ) - { - if( $typed ) - { - /* Get the original name */ - $orig_typed = $this->DB->buildAndFetch( array( 'select' => 'typed', 'from' => 'emoticons', 'where' => 'id=' . intval( $match[1] ) ) ); - - /* Update to new name */ - $this->DB->update( 'emoticons', array( 'clickable' => intval( $click ), 'typed' => $typed ), 'id=' . intval( $match[1] ) ); - $this->DB->update( 'emoticons', array( 'typed' => $typed ), "typed='" . $orig_typed['typed'] . "'" ); - } - else - { - /* Just update clickable */ - $this->DB->update( 'emoticons', array( 'clickable' => intval( $click ) ), 'id='.intval( $match[1] ) ); - } - } - } - } - } - - /* Recache and bounce */ - $this->emoticonsRebuildCache(); - - $this->registry->output->global_message = $this->lang->words['emo_updated']; - $this->emoticonsManageDirectory(); - } - - /** - * Manage emoticons - * - * @access public - * @return void - */ - public function emoticonsManageDirectory() - { - /* INI */ - $this->request['id'] = trim( $this->request['id'] ); - - /* Get emoticons for this group */ - $emo_db = array(); - $emo_file = array(); - - $this->DB->build( array( - 'select' => '*', - 'from' => 'emoticons', - 'where' => "emo_set='{$this->request['id']}'", - 'order' => 'clickable DESC, image ASC' - ) ); - $this->DB->execute(); - - /* Loop through the emoticons */ - while( $r = $this->DB->fetch() ) - { - $emo_db[ $r['image'] ] = $r; - } - - - /* Get emoticons from the directory */ - $emo_file = array(); - $emo_rfile = $this->_emoticonGetGolderContents( $this->request['id'] ); - - foreach( $emo_rfile as $ef ) - { - $emo_file[ $ef ] = $ef; - } - - /* Number of emoticons to show per row */ - $per_row = 5; - $td_width = 100 / $per_row; - - /* Loop through the database emoticons */ - $poss_names = array(); - $db_rows = array(); - - foreach( $emo_db as $image => $data ) - { - /* Remove this from the file list, it's already added */ - unset( $emo_file[ $image ] ); - - /* Clickable? */ - if ( $data['clickable'] ) - { - $data['_click'] = 'checked="checked"'; - $data['_class'] = 'tablerow1'; - } - else - { - $data['_click'] = ''; - $data['_class'] = 'tablerow2'; - } - - /* Add image to array */ - $data['image'] = $image; - - /* Addd array to output */ - $db_rows[] = $data; - - /* Possible names filter */ - $poss_names[$data['typed']] = $data['typed']; - } - - /* Check for unassigned images in the emoticon directory */ - $file_rows = array(); - - if ( count( $emo_file ) && $this->request['id'] == 'default' ) - { - /* Loop through the unassigned emoticons */ - foreach( $emo_file as $image ) - { - /* INI */ - $_fdata = array(); - - /* Suggest an emoticon name */ - $_fdata['poss_name'] = ':'.preg_replace( "/(.*)(\..+?)$/", "\\1", $image ).':'; - - if ( isset($poss_names[ $_fdata['poss_name'] ]) AND $poss_names[ $_fdata['poss_name'] ] ) - { - $_fdata['poss_name'] = preg_replace( "/:$/", "2:", $poss_name ); - } - - /* Add the image */ - $_fdata['image'] = $image; - - /* Add to output array */ - $file_rows[] = $_fdata; - } - } - - /* Output */ - - $this->registry->output->extra_nav[] = array( '', $this->lang->words['emo_manage_set'].$this->request['id'] ); - $this->registry->output->html .= $this->html->emoticonsDirectoryManagement( $db_rows, $file_rows, $td_width, $per_row ); - } - - /** - * Builds the emoticons overview screen - * - * @access public - * @return void - */ - public function emoticonsOverview() - { - /* Check for the emoticon directory */ - if ( ! is_dir( DOC_IPS_ROOT_PATH . '/public/style_emoticons' ) ) - { - $this->registry->output->showError( $this->lang->words['emo_nolocate'], 2111 ); - - } - - /* Check the emoticon count */ - $this->DB->build( array( 'select' => 'id, count(id) as count, emo_set', - 'from' => 'emoticons', - 'group' => 'emo_set, id', - 'order' => 'emo_set' - ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $emo_db[ $r['emo_set'] ] = $r; - } - - /* Get emoticon folders */ - $emodirs = array( 0 => ''); - - try - { - foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . '/public/style_emoticons' ) as $_emoticon ) - { - if ( $_emoticon->isDir() AND ! $_emoticon->isDot() AND $_emoticon->getFilename() != '.svn' ) - { - if ( is_dir( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $_emoticon ) ) - { - if( $_emoticon->getFilename() == 'default' ) - { - $emodirs[0] = $_emoticon->getFilename(); - } - else - { - $emodirs[] = $_emoticon->getFilename(); - } - } - } - } - } catch ( Exception $e ) {} - - /* Loop through the emoticon directories */ - $rows = array(); - $i = 0; - $total = count($emodirs); - - foreach( $emodirs as $dir ) - { - $i++; - - $data = array(); - - $files = $this->_emoticonGetGolderContents( $dir ); - $data['count'] = intval( count($files) ); - - if( $dir == 'default' ) - { - $data['line_image'] = ''; - $data['link_text'] = $this->lang->words['emo_manageemos']; - } - else - { - $data['link_text'] = $this->lang->words['emo_setclickable']; - - if( $i == $total ) - { - $data['line_image'] = " "; - } - else - { - $data['line_image'] = " "; - } - } - - if ( is_writeable( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $dir ) ) - { - if( $dir == 'default' ) - { - $checked_def = "checked='checked' disabled='disabled' "; - } - else - { - $checked_def = ""; - } - - $data['icon'] = 'icon_can_write.gif'; - $data['title'] = $this->lang->words['emo_writeable']; - $data['checkbox'] = ""; - } - else - { - $data['icon'] = 'icon_cannot_write.gif'; - $data['title'] = $this->lang->words['emo_writeable_not']; - $data['checkbox'] = "-"; - } - - $data['dir'] = $dir; - $data['dir_count'] = intval( $emo_db[ $dir ]['count'] ); - - $rows[] = $data; - } - - $this->registry->output->html .= $this->html->emoticonsOverview( $rows ); - } - - /** - * Rebuilds the emoticon cache - * - * @access public - * @return void - */ - public function emoticonsRebuildCache() - { - $cache = array(); - - $this->DB->build( array( 'select' => 'typed,image,clickable,emo_set', 'from' => 'emoticons' ) ); - $c = $this->DB->execute(); - - while ( $r = $this->DB->fetch( $c ) ) - { - $cache[] = $r; - } - - usort( $cache, array( $this, '_thisUsort' ) ); - - ipsRegistry::cache()->setCache( 'emoticons', $cache, array( 'array' => 1 ) ); - } - - /** - * Custom sort operation - * - * @access private - * @param string A - * @param string B - * @return integer - */ - private static function _thisUsort($a, $b) - { - if ( strlen($a['typed']) == strlen($b['typed']) ) - { - return 0; - } - - return ( strlen($a['typed']) > strlen($b['typed']) ) ? -1 : 1; - } - - /** - * Gets all the emoticons from the specified directory - * - * @access private - * @param string $folder Emoticon folder to pull emoticons from - * @return array - **/ - private function _emoticonGetGolderContents( $folder='default' ) - { - $files = array(); - - /* Loop through the emoticon directory */ - try - { - foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $folder ) as $_emo ) - { - if( $_emo->isFile() && ! $_emo->isDot() ) - { - if ( preg_match( "/\.(?:gif|jpg|jpeg|png|swf)$/i", $_emo->getFilename() ) ) - { - $files[] = $_emo->getFilename(); - } - } - } - } catch ( Exception $e ) {} - - return $files; - } + + * Invision Power Services + * IP.Board v3.1.4 + * Emoticon Management + * Last Updated: $LastChangedDate: 2010-09-13 17:28:12 -0400 (Mon, 13 Sep 2010) $ + * + * + * @author $Author: terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 27th January 2004 + * @version $Rev: 6863 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_posts_emoticons extends ipsCommand +{ + /** + * Allowed file types + * + * @access public + * @var array + */ + public $allowed_files = array( 'png', 'jpeg', 'jpg', 'gif' ); + + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load Skin and Lang */ + $this->html = $this->registry->output->loadTemplate( 'cp_skin_emoticons' ); + $this->html->form_code = '&module=posts&section=emoticons&'; + $this->html->form_code_js = '&module=posts§ion=emoticons&'; + + $this->lang->loadLanguageFile( array( 'admin_posts' ) ); + + //----------------------------------------- + // What to do... + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'emo_packsplash': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_manage' ); + $this->emoticonsPackSplash(); + break; + + case 'emo_packexport': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_manage' ); + $this->emoticonsPackExport(); + break; + + case 'emo_packimport': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_manage' ); + $this->emoticonsPackImport(); + break; + + case 'emo_manage': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_manage' ); + $this->emoticonsManageDirectory(); + break; + + case 'emo_doedit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_edit' ); + $this->emoticonsEdit(); + break; + + case 'emo_doadd': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_add' ); + $this->emoticonsAdd(); + break; + + case 'emo_remove': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_delete' ); + $this->emoticonsRemove(); + break; + + case 'emo_setadd': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_add' ); + $this->emoticonsSetAlter( $type='add' ); + break; + + case 'emo_setedit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_edit' ); + $this->emoticonsSetAlter( $type='edit' ); + break; + + case 'emo_setremove': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_delete' ); + $this->emoticonsSetRemove(); + break; + + case 'emo_upload': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_add' ); + $this->emoticonsUpload(); + break; + + case 'emo': + case 'overview': + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emoticons_manage' ); + $this->emoticonsOverview(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Import an emoticon pack + * + * @access public + * @return void + */ + public function emoticonsPackImport() + { + /* Get the xml file */ + $content = $this->registry->adminFunctions->importXml( 'ipb_emoticons.xml' ); + + /* Check for content */ + if ( ! $content ) + { + $this->registry->output->global_message = $this->lang->words['emo_fail']; + return $this->emoticonsPackSplash(); + } + + /* Setup XML */ + require_once( IPS_KERNEL_PATH.'classXML.php' ); + $xml = new classXML( IPS_DOC_CHAR_SET ); + + require_once( IPS_KERNEL_PATH.'classXMLArchive.php' ); + $xmlarchive = new classXMLArchive(); + + /* Read the archive */ + $xmlarchive->readXML( $content ); + + /* Get the data file */ + $emoticons = array(); + $emoticon_data = array(); + + foreach( $xmlarchive->asArray() as $k => $f ) + { + if ( $k == 'emoticon_data.xml' ) + { + $emoticon_data = $f; + } + else + { + $emoticons[ $f['filename'] ] = $f['content']; + } + } + + /* Parse the XML Document */ + $xml->loadXML( $emoticon_data['content'] ); + + /* Make sure we have a destination for these emoicons */ + if ( ! $this->request['emo_set'] and ! $this->request['new_emo_set'] ) + { + $this->registry->output->global_message = $this->lang->words['emo_specify']; + } + + /* Current emoticon set directory */ + $emo_set_dir = trim( $this->request['emo_set'] ); + + /* New emoticon set directory */ + $this->request['new_emo_set'] = preg_replace( "/[^a-zA-Z0-9\-_]/", "", $this->request['new_emo_set'] ); + + /* Create the new set */ + if ( $this->request['new_emo_set'] ) + { + $emo_set_dir = trim( $this->request['new_emo_set'] ); + + /* Check to see if the directory already exists */ + if ( file_exists( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $emo_set_dir ) ) + { + $this->registry->output->global_message = sprintf( $this->lang->words['emo_already'], $emo_set_dir ); + return $this->emoticonsPackSplash(); + } + + /* Create the directory */ + if ( @mkdir( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $emo_set_dir, 0777 ) ) + { + @chmod( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $emo_set_dir, 0777 ); + @file_put_contents( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $emo_set_dir . '/index.html', '' ); + } + else + { + $this->registry->output->global_message = $this->lang->words['emo_ftp']; + return $this->emoticonsPackSplash(); + } + } + + /* Get a list of current emoticons, if we are not overwriting */ + $emo_image = array(); + $emo_typed = array(); + + if ( $this->request['overwrite'] != 1 ) + { + $this->DB->build( array( 'select' => '*', 'from' => 'emoticons', 'where' => "emo_set='".$emo_set_dir."'" ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $emo_image[ $r['image'] ] = 1; + $emo_typed[ $r['typed'] ] = 1; + } + } + + /* Loop through the emoticons in the xml document */ + foreach( $xml->fetchElements('emoticon') as $emoticon ) + { + $entry = $xml->fetchElementsFromRecord( $emoticon ); + + /* Emoticon Data */ + $image = $entry['image']; + $typed = $entry['typed']; + $click = $entry['clickable']; + + /* Skip if we're not overwriting */ + if ( $emo_image[ $image ] or $emo_typed[ $typed ] ) + { + continue; + } + + /* Get the extension */ + $file_extension = preg_replace( "#^.*\.(.+?)$#si", "\\1", mb_strtolower( $image ) ); + + /* Make sure it's allowed */ + if ( ! in_array( $file_extension, $this->allowed_files ) ) + { + continue; + } + + /* Remove any existing emoticon */ + @unlink( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $emo_set_dir . '/' . $image ); + + $this->DB->delete( 'emoticons', "typed='$typed' and image='$image' and emo_set='$emo_set_dir'" ); + + /* Create the image in the file system */ + if( $FH = fopen( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' .$emo_set_dir . '/' . $image, 'wb' ) ) + { + if ( fwrite( $FH, $emoticons[ $image ] ) ) + { + fclose( $FH ); + + /* Insert the emoticon record */ + $this->DB->insert( 'emoticons', array( 'typed' => $typed, 'image' => $image, 'clickable' => $click, 'emo_set' => $emo_set_dir ) ); + } + } + + /* Add the emoticon to all the other directories */ + try + { + foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' ) as $file ) + { + if( ! $file->isDot() && $file->isDir() ) + { + if ( substr( $file->getFilename(), 0, 1 ) == '.' ) + { + continue; + } + + if ( ! file_exists( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $file->getFilename() . '/' . $image ) ) + { + $this->DB->buildAndFetch( array( 'delete' => 'emoticons', 'where' => "typed='$typed' and image='$image' and emo_set='{$file->getFilename()}'" ) ); + + if ( $FH = @fopen( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $file->getFilename() . '/' . $image, 'wb' ) ) + { + if ( fwrite( $FH, $emoticons[ $image ] ) ) + { + fclose( $FH ); + + $this->DB->insert( 'emoticons', array( 'typed' => $typed, 'image' => $image, 'clickable' => $click, 'emo_set' => $file->getFilename() ) ); + } + } + } + } + } + } catch ( Exception $e ) {} + } + + /* Recache and bounce */ + $this->emoticonsRebuildCache(); + + $this->registry->output->global_message = $this->lang->words['emo_xml_good']; + $this->emoticonsOverview(); + + } + + /** + * Export the specified emoticon directory + * + * @access public + * @return void + */ + public function emoticonsPackExport() + { + /* Setup XML */ + require_once( IPS_KERNEL_PATH.'classXML.php' ); + $xml = new classXML( IPS_DOC_CHAR_SET ); + + require_once( IPS_KERNEL_PATH . 'classXMLArchive.php' ); + $xmlarchive = new classXMLArchive(); + + /* Check the emoticon set */ + if ( ! $this->request['emo_set'] ) + { + $this->registry->output->global_message = $this->lang->words['emo_specify_exS']; + $this->emoticonsOverview(); + return; + } + + /* Get emoticons from the database */ + $emo_db = array(); + + $this->DB->build( array( 'select' => '*', 'from' => 'emoticons', 'where' => "emo_set='{$this->request['emo_set']}'" ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $emo_db[ $r['image'] ] = $r; + } + + /* Get Emoticon Folders */ + $emodirs = array(); + $emodd = array(); + $files_to_add = array(); + + try + { + foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $this->request['emo_set'] ) as $file ) + { + if( ! $file->isDot() ) + { + if ( $emo_db[ $file->getFilename() ] != "" ) + { + $files_to_add[] = DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $this->request['emo_set'] . '/' . $file->getFilename(); + } + } + } + } catch ( Exception $e ) {} + + /* Add each file to the xml archive */ + foreach( $files_to_add as $f ) + { + $xmlarchive->add( $f ); + } + + $xml->newXMLDocument(); + $xml->addElement( 'emoticonexport' ); + $xml->addElement( 'emogroup', 'emoticonexport' ); + + foreach( $emo_db as $r ) + { + $content = array(); + + $content['typed'] = $r['typed']; + $content['image'] = $r['image']; + $content['clickable'] = $r['clickable']; + + $xml->addElementAsRecord( 'emogroup', 'emoticon', $content ); + } + + /* Create the XML Document */ + $xmlData = $xml->fetchDocument(); + + /* Add the xml document to the archive */ + $xmlarchive->add( $xmlData, 'emoticon_data.xml' ); + + /* Send the archive to the browser */ + $imagearchive = $xmlarchive->getArchiveContents(); + $this->registry->output->showDownload( $imagearchive, 'ipb_emoticons.xml' ); + } + + /** + * Builds the emoticon import/export pack splash screen + * + * @access public + * @return void + */ + public function emoticonsPackSplash() + { + /* Check for the emoticon directory */ + if( ! is_dir( DOC_IPS_ROOT_PATH . 'public/style_emoticons' ) ) + { + $this->registry->output->showError( $this->lang->words['emo_nolocate'], 2110 ); + + } + + /* Count the number of current emoticons */ + $this->DB->build( array( 'select' => 'id, count(id) as count, emo_set', + 'from' => 'emoticons', + 'group' => 'id, emo_set', + 'order' => 'emo_set' + ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $emo_db[ $r['emo_set'] ] = $r; + } + + /* Get the emoticon folders */ + $emodirs = array(); + $emodd = array(); + + try + { + foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'public/style_emoticons' ) as $file ) + { + if( $file->isDir() && ! $file->isDot() ) + { + $emodirs[] = $file->getFilename(); + $emodd[] = array( $file->getFilename(), $file->getFilename() ); + } + } + } catch ( Exception $e ) {} + + /* Build Form Elements */ + $form = array(); + $form['emo_set'] = $this->registry->output->formDropdown( 'emo_set', $emodd ); + $form['new_emo_set'] = $this->registry->output->formInput( 'new_emo_set' ); + $form['overwrite'] = $this->registry->output->formYesNo( 'overwrite' ); + + /* Output */ + $this->registry->output->html .= $this->html->emoticonsPackSplash( $form ); + } + + /** + * Remove the specified emoticon + * + * @access public + * @return void + */ + public function emoticonsRemove() + { + /* Check the ID */ + if( $this->request['id'] == "" ) + { + $this->registry->output->global_message = $this->lang->words['emo_nogid']; + $this->emoticonsOverview(); + return; + } + + /* Can only remove the default set */ + if( $this->request['id'] != "default" ) + { + $this->registry->output->global_message = $this->lang->words['emo_onlydothis']; + $this->emoticonsOverview(); + return; + } + + /* Check for the emoticon ID */ + $this->request['eid'] = intval( $this->request['eid'] ); + + if( ! $this->request['eid'] ) + { + $this->registry->output->global_message = $this->lang->words['emo_noid']; + $this->emoticonsManageDirectory(); + return; + } + + /* Get the emoticon info */ + $emo_info = $this->DB->buildAndFetch( array( 'select' => 'typed', 'from' => 'emoticons', 'where' => "id=" . $this->request['eid']) ); + + /* Delete the emoticon */ + $this->DB->delete( 'emoticons', "typed='{$emo_info['typed']}'" ); + + /* Rebuild the cache and bounce */ + $this->emoticonsRebuildCache(); + + $this->registry->output->global_message = $this->lang->words['emo_removed']; + $this->emoticonsManageDirectory(); + } + + /** + * Add emoticons to the default directory + * + * @access public + * @return void + */ + public function emoticonsAdd() + { + /* Check the id */ + if( $this->request['id'] == "" ) + { + $this->registry->output->global_message = $this->lang->words['emo_nogid']; + $this->emoticonsOverview(); + return; + } + + /* Can only upload to the default directory */ + if( $this->request['id'] != "default" ) + { + $this->registry->output->global_message = $this->lang->words['emo_onlydothis']; + $this->emoticonsOverview(); + return; + } + + /* Loop through the request and look for emoticons */ + foreach( $this->request as $key => $value ) + { + if( preg_match( "/^emo_type_(\d+)$/", $key, $match ) ) + { + if( isset( $this->request[ $match[0] ] ) ) + { + /* Get the emoticon info */ + $typed = str_replace( '"', "", $this->request[ $match[0] ] ); + $click = $this->request[ 'emo_click_'.$match[1] ]; + $add = $this->request[ 'emo_add_'.$match[1] ]; + $image = $this->request[ 'emo_image_'.$match[1] ]; + $set = trim( $this->request['id'] ); + $typed = str_replace( '\', "", $typed ); + + /* Check the add all flag */ + if( $this->request['addall'] ) + { + $add = 1; + } + + /* Add this emoticon if we have have the required info */ + if( $add and $typed and $image ) + { + /* Insert the emo record */ + $this->DB->insert( 'emoticons', array( 'clickable' => intval( $click ), 'typed' => $typed, 'image' => $image, 'emo_set' => $set ) ); + + /* Emoticon list */ + $emodirs = array( 0 => ''); + + /* Loop through all the emoticons */ + try + { + foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'public/style_emoticons' ) as $file ) + { + if( ! $file->isDot() && $file->isDir() ) + { + if( $file->getFilename() == 'default' ) + { + $emodirs[0] = $file->getFilename(); + } + else + { + $emodirs[] = $file->getFilename(); + } + } + } + } catch ( Exception $e ) {} + + /* Add this emoticon to the other sets */ + foreach( $emodirs as $directory ) + { + if( $directory == $set ) + { + continue; + } + + $this->DB->insert( 'emoticons', array( 'clickable' => intval( $click ), 'typed' => $typed, 'image' => $image, 'emo_set' => $directory ) ); + } + } + } + } + } + + /* Rebuild the cache and bounce */ + $this->emoticonsRebuildCache(); + + $this->registry->output->global_message = $this->lang->words['emo_updated']; + $this->emoticonsManageDirectory(); + } + + /** + * Handles the upload emoticon form + * + * @access public + * @return void + */ + public function emoticonsUpload() + { + /* INI */ + $overwrite = 1; + $uploaded = 0; + + /* Check the request for uploads */ + $directories = array(); + $first_dir = ''; + + foreach( $this->request as $key => $value ) + { + if( preg_match( "/^dir_(.*)$/", $key, $match ) ) + { + if( $this->request[ $match[0] ] == 1 ) + { + $directories[] = $match[1]; + } + } + } + + /* Can't upload to default */ + if ( ! count( $directories ) ) + { + $this->registry->output->global_message = $this->lang->words['emo_pickanother']; + $this->emoticonsOverview(); + return; + } + + /* Remove default from the directories list */ + if ( ! in_array( 'default', $directories ) ) + { + array_push( $directories, 'default' ); + } + + /* Get the first directory */ + $first_dir = array_shift( $directories ); + + /* Loop through the dirs */ + $emodirs = array( 0 => '' ); + + try + { + foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'public/style_emoticons' ) as $file ) + { + if( ! $file->isDot() && $file->isDir() ) + { + /* Add to emoticon list */ + if( $file->getFilename() == 'default' ) + { + $emodirs[0] = $file->getFilename(); + } + else + { + $emodirs[] = $file->getFilename(); + } + } + } + } catch ( Exception $e ) {} + + /* Loop through each form upload field */ + foreach( array( 1,2,3,4 ) as $i ) + { + /* Upload Data */ + $field = 'upload_'.$i; + $FILE_NAME = $_FILES[$field]['name']; + $FILE_SIZE = $_FILES[$field]['size']; + $FILE_TYPE = $_FILES[$field]['type']; + + //----------------------------------------- + // Naughty Opera adds the filename on the end of the + // mime type - we don't want this. + //----------------------------------------- + + $FILE_TYPE = preg_replace( "/^(.+?);.*$/", "\\1", $FILE_TYPE ); + + //----------------------------------------- + // Naughty Mozilla likes to use "none" to indicate an empty upload field. + // I love universal languages that aren't universal. + //----------------------------------------- + + if ( $_FILES[$field]['name'] == "" or ! $_FILES[$field]['name'] or ($_FILES[$field]['name'] == "none") ) + { + continue; + } + + //----------------------------------------- + // Make sure it's not a NAUGHTY file + //----------------------------------------- + + $file_extension = preg_replace( "#^.*\.(.+?)$#si", "\\1", mb_strtolower( $_FILES[ $field ]['name'] ) ); + + if ( ! in_array( $file_extension, $this->allowed_files ) ) + { + $this->registry->output->global_message = $this->lang->words['emo_mimes']; // The screams of angst from Emo Mimes are silent... + $this->emoticonsOverview(); + return; + } + + //----------------------------------------- + // Copy the upload to the uploads directory + //----------------------------------------- + + if ( ! @move_uploaded_file( $_FILES[ $field ]['tmp_name'], DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $first_dir . "/" . $FILE_NAME) ) + { + $this->registry->output->global_message = "The upload failed, sorry!"; + $this->emoticonsOverview(); + return; + } + else + { + @chmod( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $first_dir . "/" . $FILE_NAME, 0777 ); + + //----------------------------------------- + // Copy to other folders + //----------------------------------------- + + if ( is_array( $directories ) and count( $directories ) ) + { + foreach ( $directories as $newdir ) + { + if ( file_exists( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $newdir . "/" . $FILE_NAME ) ) + { + if ( $overwrite != 1 OR $newdir == 'default' ) + { + continue; + } + } + + if ( @copy( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $first_dir . "/" . $FILE_NAME, DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $newdir . "/" . $FILE_NAME ) ) + { + @chmod( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $newdir . "/" . $FILE_NAME, 0777 ); + } + } + } + + // Let's make sure this 'image' is available in all directories too + if ( is_array( $emodirs ) and count( $emodirs ) ) + { + foreach ( $emodirs as $newdir ) + { + if ( file_exists( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $newdir . "/" . $FILE_NAME ) ) + { + continue; + } + + if( @copy( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $first_dir . "/" .$FILE_NAME, DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $newdir . "/" . $FILE_NAME ) ) + { + @chmod( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $newdir . "/" . $FILE_NAME, 0777 ); + } + } + } + + $uploaded++; + } + } + + if( !$uploaded ) + { + $this->registry->output->global_message = $this->lang->words['no_emo_selected']; + } + else + { + $this->registry->output->global_message = $this->lang->words['emo_complete']; + } + + $this->emoticonsOverview(); + } + + /** + * Removes an emoticon set + * + * @access public + * @return void + */ + public function emoticonsSetRemove() + { + /* Check the ID */ + if ( ! $this->request['id'] ) + { + $this->registry->output->global_message = $this->lang->words['emo_noset']; + $this->emoticonsOverview(); + } + + /* Can't remove the default set */ + if( $this->request['id'] == 'default' ) + { + $this->registry->output->global_message = $this->lang->words['emo_norename']; + $this->emoticonsOverview(); + return; + } + + /* Remove the directory */ + $this->registry->adminFunctions->removeDirectory( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $this->request['id'] ); + + /* Remove the database entry */ + $this->DB->delete( 'emoticons', "emo_set='{$this->request['id']}'" ); + + /* Rebuild cache */ + $this->emoticonsRebuildCache(); + + /* Bounce */ + $this->registry->output->global_message = $this->lang->words['emo_folder_rem']; + $this->emoticonsOverview(); + } + + /** + * Add/Edit an emoticon folder name + * + * @access public + * @param string Type (add or edit) + * @return void + */ + public function emoticonsSetAlter( $type='add' ) + { + /* Get the name */ + $name = preg_replace( "/[^a-zA-Z0-9\-_]/", "", $this->request['emoset'] ); + + /* Check th ename */ + if( $name == "" ) + { + $this->registry->output->global_message = $this->lang->words['emo_a_to_z']; + return $this->emoticonsOverview(); + } + + /* Check Safe Mode */ + if( SAFE_MODE_ON ) + { + $this->registry->output->global_message = $this->lang->words['emo_safemode']; + return $this->emoticonsOverview(); + } + + /* Check to see if the directory already exists */ + if( file_exists( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $name ) ) + { + $this->registry->output->global_message = sprintf( $this->lang->words['emo_already'], $name ); + return $this->emoticonsOverview(); + } + + if( $type == 'add' ) + { + /* Create the directory */ + if( @mkdir( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $name, 0777 ) ) + { + @chmod( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $name, 0777 ); + @file_put_contents( DOC_IPS_ROOT_PATH . 'public/style_emoticons/' . $name . '/index.html', '' ); + + /* Copy default emoticons */ + try + { + foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . '/public/style_emoticons/default/' ) as $file ) + { + if( ! $file->isDot() ) + { + @copy( DOC_IPS_ROOT_PATH . '/public/style_emoticons/default/' . $file->getFilename(), DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $name . '/' . $file->getFilename() ); + @chmod( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $name . '/' . $file->getFilename(), 0777 ); + } + } + } catch ( Exception $e ) {} + + /* Query the default set */ + $this->DB->build( array( 'select' => '*', 'from' => 'emoticons', 'where' => "emo_set='default'" ) ); + $outer = $this->DB->execute(); + + /* Insert emoticons for the new set */ + while( $r = $this->DB->fetch($outer) ) + { + $this->DB->insert( "emoticons", array( 'clickable' => $r['clickable'], 'typed' => $r['typed'], 'emo_set' => $name, 'image' => $r['image'] ) ); + } + + /* Bounce */ + $this->registry->output->global_message = $this->lang->words['emo_folder_new']; + return $this->emoticonsOverview(); + } + else + { + /* Couldn't create the directory, Bounce */ + $this->registry->output->global_message = $this->lang->words['emo_ftp']; + return $this->emoticonsOverview(); + } + } + /* Edit Folder Name */ + else + { + /* Check the directory ID */ + if ( ! $this->request['id'] ) + { + $this->registry->output->global_message = $this->lang->words['emo_miss_dir']; + $this->emoticonsOverview(); + return; + } + + /* Can't rename the default directory */ + if( $this->request['id'] == 'default' ) + { + $this->registry->output->global_message = $this->lang->words['emo_norename']; + $this->emoticonsOverview(); + return; + } + + /* Rename the directory */ + if ( @rename( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $this->request['id'], DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $name ) ) + { + /* Check to see if the rename worked */ + if ( file_exists( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $name ) ) + { + /* Update all the emoticons */ + $this->DB->update( 'emoticons', array( 'emo_set' => $name ), "emo_set='{$this->request['id']}'" ); + } + + /* Rebuild the cache */ + $this->emoticonsRebuildCache(); + + /* Update skins that are using this set */ + $rebuild_sets = array(); + + /* Querh skin sets */ + $this->DB->build( array( 'select' => 'set_id', 'from' => 'skin_collections', 'where' => "set_emo_dir='{$this->request['id']}'" ) ); + $outer = $this->DB->execute(); + + /* Loop thorugh and update the emoticon folder */ + while( $r = $this->DB->fetch($outer) ) + { + $this->DB->update( 'skin_collections', array( 'set_emo_dir' => $name ), 'set_id=' . $r['set_id'] ); + $rebuild_sets[] = $r['set_id']; + } + + /* Bounce */ + $this->registry->output->global_message = $this->lang->words['emo_folder_name']; + return $this->emoticonsOverview(); + } + else + { + /* Error and bounce */ + $this->registry->output->global_message = $this->lang->words['emo_wecantdoit']; + return $this->emoticonsOverview(); + } + } + } + + /** + * Process edit emoticons forum + * + * @access public + * @return void + */ + public function emoticonsEdit() + { + /* Check ID */ + if( $this->request['id'] == '' ) + { + $this->registry->output->global_message = $this->lang->words['emo_nogid']; + return $this->emoticonsOverview(); + } + + /* Loop through the request and pull out emoticons */ + foreach( $this->request as $key => $value ) + { + /* Check to see if its an emoticon */ + if ( preg_match( "/^emo_id_(\d+)$/", $key, $match ) ) + { + if ( $match[0] ) + { + /* INI */ + $typed = ''; + + /* Format type for default set */ + if( $this->request['id'] == 'default' ) + { + $typed = str_replace( '"', "", $this->request[ 'emo_type_' . $match[1] ] ); + $typed = str_replace( '\', "", $typed ); + } + + /* Check clickable */ + $click = $this->request[ 'emo_click_' . $match[1] ]; + + /* Update the emoticon */ + if ( $match[1] ) + { + if( $typed ) + { + /* Get the original name */ + $orig_typed = $this->DB->buildAndFetch( array( 'select' => 'typed', 'from' => 'emoticons', 'where' => 'id=' . intval( $match[1] ) ) ); + + /* Update to new name */ + $this->DB->update( 'emoticons', array( 'clickable' => intval( $click ), 'typed' => $typed ), 'id=' . intval( $match[1] ) ); + $this->DB->update( 'emoticons', array( 'typed' => $typed ), "typed='" . $orig_typed['typed'] . "'" ); + } + else + { + /* Just update clickable */ + $this->DB->update( 'emoticons', array( 'clickable' => intval( $click ) ), 'id='.intval( $match[1] ) ); + } + } + } + } + } + + /* Recache and bounce */ + $this->emoticonsRebuildCache(); + + $this->registry->output->global_message = $this->lang->words['emo_updated']; + $this->emoticonsManageDirectory(); + } + + /** + * Manage emoticons + * + * @access public + * @return void + */ + public function emoticonsManageDirectory() + { + /* INI */ + $this->request['id'] = trim( $this->request['id'] ); + + /* Get emoticons for this group */ + $emo_db = array(); + $emo_file = array(); + + $this->DB->build( array( + 'select' => '*', + 'from' => 'emoticons', + 'where' => "emo_set='{$this->request['id']}'", + 'order' => 'clickable DESC, image ASC' + ) ); + $this->DB->execute(); + + /* Loop through the emoticons */ + while( $r = $this->DB->fetch() ) + { + $emo_db[ $r['image'] ] = $r; + } + + + /* Get emoticons from the directory */ + $emo_file = array(); + $emo_rfile = $this->_emoticonGetGolderContents( $this->request['id'] ); + + foreach( $emo_rfile as $ef ) + { + $emo_file[ $ef ] = $ef; + } + + /* Number of emoticons to show per row */ + $per_row = 5; + $td_width = 100 / $per_row; + + /* Loop through the database emoticons */ + $poss_names = array(); + $db_rows = array(); + + foreach( $emo_db as $image => $data ) + { + /* Remove this from the file list, it's already added */ + unset( $emo_file[ $image ] ); + + /* Clickable? */ + if ( $data['clickable'] ) + { + $data['_click'] = 'checked="checked"'; + $data['_class'] = 'tablerow1'; + } + else + { + $data['_click'] = ''; + $data['_class'] = 'tablerow2'; + } + + /* Add image to array */ + $data['image'] = $image; + + /* Addd array to output */ + $db_rows[] = $data; + + /* Possible names filter */ + $poss_names[$data['typed']] = $data['typed']; + } + + /* Check for unassigned images in the emoticon directory */ + $file_rows = array(); + + if ( count( $emo_file ) && $this->request['id'] == 'default' ) + { + /* Loop through the unassigned emoticons */ + foreach( $emo_file as $image ) + { + /* INI */ + $_fdata = array(); + + /* Suggest an emoticon name */ + $_fdata['poss_name'] = ':'.preg_replace( "/(.*)(\..+?)$/", "\\1", $image ).':'; + + if ( isset($poss_names[ $_fdata['poss_name'] ]) AND $poss_names[ $_fdata['poss_name'] ] ) + { + $_fdata['poss_name'] = preg_replace( "/:$/", "2:", $_fdata['poss_name'] ); + } + + /* Add the image */ + $_fdata['image'] = $image; + + /* Add to output array */ + $file_rows[] = $_fdata; + } + } + + /* Output */ + + $this->registry->output->extra_nav[] = array( '', $this->lang->words['emo_manage_set'].$this->request['id'] ); + $this->registry->output->html .= $this->html->emoticonsDirectoryManagement( $db_rows, $file_rows, $td_width, $per_row ); + } + + /** + * Builds the emoticons overview screen + * + * @access public + * @return void + */ + public function emoticonsOverview() + { + /* Check for the emoticon directory */ + if ( ! is_dir( DOC_IPS_ROOT_PATH . '/public/style_emoticons' ) ) + { + $this->registry->output->showError( $this->lang->words['emo_nolocate'], 2111 ); + + } + + /* Check the emoticon count */ + $this->DB->build( array( 'select' => 'id, count(id) as count, emo_set', + 'from' => 'emoticons', + 'group' => 'emo_set, id', + 'order' => 'emo_set' + ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $emo_db[ $r['emo_set'] ] = $r; + } + + /* Get emoticon folders */ + $emodirs = array( 0 => ''); + + try + { + foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . '/public/style_emoticons' ) as $_emoticon ) + { + if ( $_emoticon->isDir() AND ! $_emoticon->isDot() AND $_emoticon->getFilename() != '.svn' ) + { + if ( is_dir( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $_emoticon ) ) + { + if( $_emoticon->getFilename() == 'default' ) + { + $emodirs[0] = $_emoticon->getFilename(); + } + else + { + $emodirs[] = $_emoticon->getFilename(); + } + } + } + } + } catch ( Exception $e ) {} + + /* Loop through the emoticon directories */ + $rows = array(); + $i = 0; + $total = count($emodirs); + + foreach( $emodirs as $dir ) + { + $i++; + + $data = array(); + + $files = $this->_emoticonGetGolderContents( $dir ); + $data['count'] = intval( count($files) ); + + if( $dir == 'default' ) + { + $data['line_image'] = ''; + $data['link_text'] = $this->lang->words['emo_manageemos']; + } + else + { + $data['link_text'] = $this->lang->words['emo_setclickable']; + + if( $i == $total ) + { + $data['line_image'] = " "; + } + else + { + $data['line_image'] = " "; + } + } + + if ( is_writeable( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $dir ) ) + { + if( $dir == 'default' ) + { + $checked_def = "checked='checked' disabled='disabled' "; + } + else + { + $checked_def = ""; + } + + $data['icon'] = 'icon_can_write.gif'; + $data['title'] = $this->lang->words['emo_writeable']; + $data['checkbox'] = ""; + } + else + { + $data['icon'] = 'icon_cannot_write.gif'; + $data['title'] = $this->lang->words['emo_writeable_not']; + $data['checkbox'] = "-"; + } + + $data['dir'] = $dir; + $data['dir_count'] = intval( $emo_db[ $dir ]['count'] ); + + $rows[] = $data; + } + + $this->registry->output->html .= $this->html->emoticonsOverview( $rows ); + } + + /** + * Rebuilds the emoticon cache + * + * @access public + * @return void + */ + public function emoticonsRebuildCache() + { + $cache = array(); + + $this->DB->build( array( 'select' => 'typed,image,clickable,emo_set', 'from' => 'emoticons' ) ); + $c = $this->DB->execute(); + + while ( $r = $this->DB->fetch( $c ) ) + { + $cache[] = $r; + } + + usort( $cache, array( $this, '_thisUsort' ) ); + + ipsRegistry::cache()->setCache( 'emoticons', $cache, array( 'array' => 1 ) ); + } + + /** + * Custom sort operation + * + * @access private + * @param string A + * @param string B + * @return integer + */ + private static function _thisUsort($a, $b) + { + if ( strlen($a['typed']) == strlen($b['typed']) ) + { + return 0; + } + + return ( strlen($a['typed']) > strlen($b['typed']) ) ? -1 : 1; + } + + /** + * Gets all the emoticons from the specified directory + * + * @access private + * @param string $folder Emoticon folder to pull emoticons from + * @return array + **/ + private function _emoticonGetGolderContents( $folder='default' ) + { + $files = array(); + + /* Loop through the emoticon directory */ + try + { + foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . '/public/style_emoticons/' . $folder ) as $_emo ) + { + if( $_emo->isFile() && ! $_emo->isDot() ) + { + if ( preg_match( "/\.(?:gif|jpg|jpeg|png|swf)$/i", $_emo->getFilename() ) ) + { + $files[] = $_emo->getFilename(); + } + } + } + } catch ( Exception $e ) {} + + return $files; + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/posts/index.html b/upload/admin/applications/core/modules_admin/posts/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/posts/index.html +++ b/upload/admin/applications/core/modules_admin/posts/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/posts/media.php b/upload/admin/applications/core/modules_admin/posts/media.php index 8a55eeab..2e27c71d 100644 --- a/upload/admin/applications/core/modules_admin/posts/media.php +++ b/upload/admin/applications/core/modules_admin/posts/media.php @@ -1,434 +1,474 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_core_posts_media extends ipsCommand -{ - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = $this->registry->output->loadTemplate('cp_skin_bbcode'); - - //----------------------------------------- - // Set up stuff - //----------------------------------------- - - $this->form_code = $this->html->form_code = 'module=posts&section=media'; - $this->form_code_js = $this->html->form_code_js = 'module=posts§ion=media'; - - //----------------------------------------- - // Load lang - //----------------------------------------- - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_posts' ) ); - - ///---------------------------------------- - // What to do... - //----------------------------------------- - - switch( $this->request['do'] ) - { - case 'do_del': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'media_delete' ); - $this->_mediaTagDelete(); - break; - - case 'form_add': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'media_manage' ); - $this->_mediaTagForm( 'add' ); - break; - - case 'form_edit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'media_manage' ); - $this->_mediaTagForm( 'edit' ); - break; - - case 'domediatagadd': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'media_manage' ); - $this->_mediaTagSave( 'add' ); - break; - - case 'domediatagedit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'media_manage' ); - $this->_mediaTagSave( 'edit' ); - break; - - case 'mediatag_export': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'media_manage' ); - $this->_mediaTagExport(); - break; - - case 'mediatag_import': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'media_manage' ); - $this->_mediaTagImport(); - break; - - case 'index': - case 'overview': - default: - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'media_manage' ); - $this->_mediaTagIndex(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Import a mediaTag XML file - * - * @access private - * @return void [Outputs to screen] - */ - private function _mediaTagImport() - { - $content = $this->registry->getClass('adminFunctions')->importXml( 'mediatag.xml' ); - - //----------------------------------------- - // Got anything? - //----------------------------------------- - - if ( ! $content ) - { - $this->registry->output->global_message = $this->lang->words['m_upload_failed']; - $this->_mediaTagIndex(); - return; - } - - $this->doMediaImport( $content ); - - $this->registry->output->global_message = $this->lang->words['m_upload_complete']; - - $this->_mediaTagIndex(); - } - - /** - * Abstracted import routine for installer - * - * @access public - * @param string XML file content - * @return void - */ - public function doMediaImport( $content ) - { - //----------------------------------------- - // Get xml mah-do-dah - //----------------------------------------- - - require_once( IPS_KERNEL_PATH.'classXML.php' ); - - $xml = new classXML( IPS_DOC_CHAR_SET ); - $xml->loadXML( $content ); - - //----------------------------------------- - // Get current custom bbcodes - //----------------------------------------- - - $tags = array(); - - $this->DB->build( array( 'select' => '*', 'from' => 'bbcode_mediatag' ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $tags[ $r['mediatag_name'] ] = $r['mediatag_id']; - } - - //----------------------------------------- - // pArse - //----------------------------------------- - - foreach( $xml->fetchElements('mediatag') as $mediatag ) - { - $entry = $xml->fetchElementsFromRecord( $mediatag ); - - $name = $entry['mediatag_name']; - $match = $entry['mediatag_match']; - $replace = $entry['mediatag_replace']; - - $array = array( - 'mediatag_name' => $name, - 'mediatag_match' => $match, - 'mediatag_replace' => $replace - ); - - if ( $tags[ $name ] ) - { - $this->DB->update( 'bbcode_mediatag', $array, "mediatag_id=" . $tags[ $name ] ); - - continue; - } - - if ( $name ) - { - $this->DB->insert( 'bbcode_mediatag', $array ); - } - } - - $this->recacheMediaTag(); - } - - /** - * Export a mediaTag XML file - * - * @access private - * @return void [Outputs to screen] - */ - private function _mediaTagExport() - { - //----------------------------------------- - // Get xml mah-do-dah - //----------------------------------------- - - require_once( IPS_KERNEL_PATH.'classXML.php' ); - - $xml = new classXML( IPS_DOC_CHAR_SET ); - - $xml->newXMLDocument(); - $xml->addElement( 'mediatagexport' ); - $xml->addElement( 'mediataggroup', 'mediatagexport' ); - - $select = array( 'select' => '*', 'from' => 'bbcode_mediatag' ); - - if( $this->request['id'] ) - { - $select['where'] = 'mediatag_id=' . intval($this->request['id']); - } - - $this->DB->build( $select ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $xml->addElementAsRecord( 'mediataggroup', 'mediatag', $r ); - } - - $xmlData = $xml->fetchDocument(); - - //----------------------------------------- - // Send to browser. - //----------------------------------------- - - $this->registry->output->showDownload( $xmlData, 'mediatag.xml', '', 0 ); - } - - /** - * Delete a custom media tag - * - * @access private - * @return void - */ - private function _mediaTagDelete() - { - /* ID */ - $id = intval( $this->request['id'] ); - - /* Remove */ - $this->DB->delete( 'bbcode_mediatag', "mediatag_id={$id}" ); - - $this->recacheMediaTag(); - - /* Redirect */ - $this->registry->output->global_message = $this->lang->words['m_replace_removed']; - $this->_mediaTagIndex(); - } - - /** - * Save changes to a custom media tag - * - * @access private - * @param string [$type='add'] - * @return void - */ - private function _mediaTagSave( $type='add' ) - { - /* INI */ - $errors = array(); - - /* Check input */ - if( ! $this->request['mediatag_name'] ) - { - $errors[] = $this->lang->words['m_error_name']; - } - - if( ! $this->request['mediatag_match'] ) - { - $errors[] = $this->lang->words['m_error_match']; - } - - if( ! $this->request['mediatag_replace'] ) - { - $errors[] = $this->lang->words['m_error_replace']; - } - - if( count( $errors ) ) - { - $this->_mediaTagForm( $type, $errors ); - return; - } - - /* Data */ - $data = array( - 'mediatag_name' => $this->request['mediatag_name'], - 'mediatag_match' => rtrim( str_replace( '\', '\\', str_replace( ''', "'", trim( IPSText::stripslashes( $_POST['mediatag_match'] ) ) ) ), ',' ), - 'mediatag_replace' => rtrim( str_replace( '\', '\\', str_replace( ''', "'", trim( IPSText::stripslashes( $_POST['mediatag_replace'] ) ) ) ), ',' ), - ); - - /* Check the type */ - if( $type == 'add' ) - { - /* Insert the record */ - $this->DB->insert( 'bbcode_mediatag', $data ); - - /* Update cache */ - $this->recacheMediaTag(); - - /* All done */ - $this->registry->output->doneScreen( sprintf( $this->lang->words['m_tag_added'], $data['mediatag_name']), $this->lang->words['m_manager'], "{$this->form_code}&do=overview", 'redirect' ); - } - else - { - /* ID */ - $id = intval( $this->request['id'] ); - - /* Update */ - $this->DB->update( 'bbcode_mediatag', $data, "mediatag_id={$id}" ); - - /* Recache */ - $this->recacheMediaTag(); - - /* Done and done */ - $this->registry->output->doneScreen( sprintf( $this->lang->words['m_tag_updated'], $data['mediatag_name']), $this->lang->words['m_manager'], "{$this->form_code}&do=overview", 'redirect' ); - } - - } - - /** - * Show the mediatag add/edit form - * - * @access private - * @param string [$type='add'] - * @param array [Optional] array of errors - * @return void - */ - private function _mediaTagForm( $type='add', $errors=array() ) - { - /* Check form type */ - if( $type == 'add' ) - { - /* Data */ - $data = array( - 'mediatag_name' => $this->request['mediatag_name'], - 'mediatag_match' => rtrim( str_replace( '\', '\\', str_replace( ''', "'", trim( IPSText::stripslashes( $_POST['mediatag_match'] ) ) ) ), ',' ), - 'mediatag_replace' => rtrim( str_replace( '\', '\\', str_replace( ''', "'", trim( IPSText::stripslashes( $_POST['mediatag_replace'] ) ) ) ), ',' ), - ); - } - else - { - /* Data */ - $id = intval( $this->request['id'] ); - $data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'bbcode_mediatag', 'where' => "mediatag_id={$id}" ) ); - - /* Set Defaults */ - $data['mediatag_name'] = ( isset( $this->request['mediatag_name'] ) && $this->request['mediatag_name'] ) ? $this->request['mediatag_name'] : $data['mediatag_name']; - $data['mediatag_match'] = ( isset( $this->request['mediatag_match'] ) && $this->request['mediatag_match'] ) ? $this->request['mediatag_match'] : $data['mediatag_match']; - $data['mediatag_replace'] = ( isset( $this->request['mediatag_replace'] ) && $this->request['mediatag_replace'] ) ? $this->request['mediatag_replace'] : $data['mediatag_replace']; - } - - /* Setup Form */ - $this->registry->output->html .= $this->html->mediaTagForm( $type, $data, $errors ); - } - - /** - * List all the the current media tag types - * - * @access private - * @return void - */ - private function _mediaTagIndex() - { - /* Query Bookmarks */ - $this->DB->build( array( - 'select' => '*', - 'from' => 'bbcode_mediatag', - 'order' => 'mediatag_name ASC', - ) ); - $this->DB->execute(); - - $bbcode_rows = ""; - - /* List the bookmarks */ - while( $r = $this->DB->fetch() ) - { - $bbcode_rows .= $this->html->mediaTagRow( $r ); - } - - /* End table and output */ - $this->registry->output->html .= $this->html->mediaTagWrapper( $bbcode_rows ); - } - - /** - * Recache the mediatag config - * - * @access public - * @return void - */ - public function recacheMediaTag() - { - /* Query the tags */ - $this->DB->build( array( 'select' => '*', 'from' => 'bbcode_mediatag' ) ); - $this->DB->execute(); - - $media_config = array(); - - while( $r = $this->DB->fetch() ) - { - $media_config[$r['mediatag_name']] = array( - 'match' => preg_replace( "#{[0-9]}#", "(.*?)", str_replace( '.', '\.', str_replace( '?', '\?', $r['mediatag_match'] ) ) ), - 'replace' => $r['mediatag_replace'], - ); - } - - /* Save to cache */ - $this->cache->setCache( 'mediatag', $media_config, array( 'array' => 1 ) ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * BBCode Media Tag Management + * Last Updated: $LastChangedDate: 2010-10-18 13:10:17 -0400 (Mon, 18 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 27th January 2004 + * @version $Rev: 6990 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_posts_media extends ipsCommand +{ + /** + * Skin object + * + * @var object Skin templates + */ + private $html; + + /** + * Main class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = $this->registry->output->loadTemplate('cp_skin_bbcode'); + + //----------------------------------------- + // Set up stuff + //----------------------------------------- + + $this->form_code = $this->html->form_code = 'module=posts&section=media'; + $this->form_code_js = $this->html->form_code_js = 'module=posts§ion=media'; + + //----------------------------------------- + // Load lang + //----------------------------------------- + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_posts' ) ); + + ///---------------------------------------- + // What to do... + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'do_del': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'media_delete' ); + $this->_mediaTagDelete(); + break; + + case 'form_add': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'media_manage' ); + $this->_mediaTagForm( 'add' ); + break; + + case 'form_edit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'media_manage' ); + $this->_mediaTagForm( 'edit' ); + break; + + case 'domediatagadd': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'media_manage' ); + $this->_mediaTagSave( 'add' ); + break; + + case 'domediatagedit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'media_manage' ); + $this->_mediaTagSave( 'edit' ); + break; + + case 'mediatag_export': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'media_manage' ); + $this->_mediaTagExport(); + break; + + case 'mediatag_import': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'media_manage' ); + $this->_mediaTagImport(); + break; + + case 'reorder': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'media_manage' ); + $this->_moveMediaTag(); + break; + + case 'index': + case 'overview': + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'media_manage' ); + $this->_mediaTagIndex(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Reorder media tags + * + * @return void + */ + private function _moveMediaTag() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' ); + $ajax = new $classToLoad(); + + //----------------------------------------- + // Checks... + //----------------------------------------- + + if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) + { + $ajax->returnString( $this->lang->words['postform_badmd5'] ); + exit(); + } + + //----------------------------------------- + // Save new position + //----------------------------------------- + + $position = 1; + + if( is_array($this->request['media']) AND count($this->request['media']) ) + { + foreach( $this->request['media'] as $this_id ) + { + $this->DB->update( 'bbcode_mediatag', array( 'mediatag_position' => $position ), 'mediatag_id=' . $this_id ); + + $position++; + } + } + + $ajax->returnString( 'OK' ); + exit(); + } + + /** + * Import a mediaTag XML file + * + * @return void [Outputs to screen] + */ + private function _mediaTagImport() + { + $content = $this->registry->getClass('adminFunctions')->importXml( 'mediatag.xml' ); + + //----------------------------------------- + // Got anything? + //----------------------------------------- + + if ( ! $content ) + { + $this->registry->output->global_message = $this->lang->words['m_upload_failed']; + $this->_mediaTagIndex(); + return; + } + + $this->doMediaImport( $content ); + + $this->registry->output->global_message = $this->lang->words['m_upload_complete']; + + $this->_mediaTagIndex(); + } + + /** + * Abstracted import routine for installer + * + * @param string XML file content + * @return void + */ + public function doMediaImport( $content ) + { + //----------------------------------------- + // Get xml mah-do-dah + //----------------------------------------- + + require_once( IPS_KERNEL_PATH.'classXML.php' ); + + $xml = new classXML( IPS_DOC_CHAR_SET ); + $xml->loadXML( $content ); + + //----------------------------------------- + // Get current custom bbcodes + //----------------------------------------- + + $tags = array(); + + $this->DB->build( array( 'select' => '*', 'from' => 'bbcode_mediatag' ) ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $tags[ $r['mediatag_name'] ] = $r['mediatag_id']; + } + + //----------------------------------------- + // pArse + //----------------------------------------- + + foreach( $xml->fetchElements('mediatag') as $mediatag ) + { + $entry = $xml->fetchElementsFromRecord( $mediatag ); + + $name = $entry['mediatag_name']; + $match = $entry['mediatag_match']; + $replace = $entry['mediatag_replace']; + + $array = array( + 'mediatag_name' => $name, + 'mediatag_match' => $match, + 'mediatag_replace' => $replace + ); + + if ( $tags[ $name ] ) + { + $this->DB->update( 'bbcode_mediatag', $array, "mediatag_id=" . $tags[ $name ] ); + + continue; + } + + if ( $name ) + { + $this->DB->insert( 'bbcode_mediatag', $array ); + } + } + + $this->recacheMediaTag(); + } + + /** + * Export a mediaTag XML file + * + * @return void [Outputs to screen] + */ + private function _mediaTagExport() + { + //----------------------------------------- + // Get xml mah-do-dah + //----------------------------------------- + + require_once( IPS_KERNEL_PATH.'classXML.php' ); + + $xml = new classXML( IPS_DOC_CHAR_SET ); + + $xml->newXMLDocument(); + $xml->addElement( 'mediatagexport' ); + $xml->addElement( 'mediataggroup', 'mediatagexport' ); + + $select = array( 'select' => '*', 'from' => 'bbcode_mediatag' ); + + if( $this->request['id'] ) + { + $select['where'] = 'mediatag_id=' . intval($this->request['id']); + } + + $this->DB->build( $select ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $xml->addElementAsRecord( 'mediataggroup', 'mediatag', $r ); + } + + $xmlData = $xml->fetchDocument(); + + //----------------------------------------- + // Send to browser. + //----------------------------------------- + + $this->registry->output->showDownload( $xmlData, 'mediatag.xml', '', 0 ); + } + + /** + * Delete a custom media tag + * + * @return void + */ + private function _mediaTagDelete() + { + /* ID */ + $id = intval( $this->request['id'] ); + + /* Remove */ + $this->DB->delete( 'bbcode_mediatag', "mediatag_id={$id}" ); + + $this->recacheMediaTag(); + + /* Redirect */ + $this->registry->output->global_message = $this->lang->words['m_replace_removed']; + $this->_mediaTagIndex(); + } + + /** + * Save changes to a custom media tag + * + * @param string [$type='add'] + * @return void + */ + private function _mediaTagSave( $type='add' ) + { + /* INI */ + $errors = array(); + + /* Check input */ + if( ! $this->request['mediatag_name'] ) + { + $errors[] = $this->lang->words['m_error_name']; + } + + if( ! $this->request['mediatag_match'] ) + { + $errors[] = $this->lang->words['m_error_match']; + } + + if( ! $this->request['mediatag_replace'] ) + { + $errors[] = $this->lang->words['m_error_replace']; + } + + if( count( $errors ) ) + { + $this->_mediaTagForm( $type, $errors ); + return; + } + + /* Data */ + $data = array( + 'mediatag_name' => $this->request['mediatag_name'], + 'mediatag_match' => rtrim( str_replace( '\', '\\', str_replace( ''', "'", trim( IPSText::stripslashes( $_POST['mediatag_match'] ) ) ) ), ',' ), + 'mediatag_replace' => IPSText::formToText( rtrim( str_replace( '\', '\\', str_replace( ''', "'", trim( IPSText::stripslashes( $_POST['mediatag_replace'] ) ) ) ), ',' ) ), + ); + + /* Check the type */ + if( $type == 'add' ) + { + /* Insert the record */ + $this->DB->insert( 'bbcode_mediatag', $data ); + + /* Update cache */ + $this->recacheMediaTag(); + + /* All done */ + $this->registry->output->doneScreen( sprintf( $this->lang->words['m_tag_added'], $data['mediatag_name']), $this->lang->words['m_manager'], "{$this->form_code}&do=overview", 'redirect' ); + } + else + { + /* ID */ + $id = intval( $this->request['id'] ); + /* Update */ + $this->DB->update( 'bbcode_mediatag', $data, "mediatag_id={$id}" ); + + /* Recache */ + $this->recacheMediaTag(); + + /* Done and done */ + $this->registry->output->doneScreen( sprintf( $this->lang->words['m_tag_updated'], $data['mediatag_name']), $this->lang->words['m_manager'], "{$this->form_code}&do=overview", 'redirect' ); + } + + } + + /** + * Show the mediatag add/edit form + * + * @param string [$type='add'] + * @param array [Optional] array of errors + * @return void + */ + private function _mediaTagForm( $type='add', $errors=array() ) + { + /* Check form type */ + if( $type == 'add' ) + { + /* Data */ + $data = array( + 'mediatag_name' => $this->request['mediatag_name'], + 'mediatag_match' => rtrim( str_replace( '\', '\\', str_replace( ''', "'", trim( IPSText::stripslashes( $_POST['mediatag_match'] ) ) ) ), ',' ), + 'mediatag_replace' => rtrim( str_replace( '\', '\\', str_replace( ''', "'", trim( IPSText::stripslashes( $_POST['mediatag_replace'] ) ) ) ), ',' ), + ); + } + else + { + /* Data */ + $id = intval( $this->request['id'] ); + $data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'bbcode_mediatag', 'where' => "mediatag_id={$id}" ) ); + + /* Set Defaults */ + $data['mediatag_name'] = ( isset( $this->request['mediatag_name'] ) && $this->request['mediatag_name'] ) ? $this->request['mediatag_name'] : $data['mediatag_name']; + $data['mediatag_match'] = ( isset( $this->request['mediatag_match'] ) && $this->request['mediatag_match'] ) ? IPSText::textToForm( $this->request['mediatag_match'] ) : IPSText::textToForm( $data['mediatag_match'] ); + $data['mediatag_replace'] = ( isset( $this->request['mediatag_replace'] ) && $this->request['mediatag_replace'] ) ? IPSText::textToForm( $this->request['mediatag_replace'] ) : IPSText::textToForm( $data['mediatag_replace'] ); + } + + /* Setup Form */ + $this->registry->output->html .= $this->html->mediaTagForm( $type, $data, $errors ); + } + + /** + * List all the the current media tag types + * + * @return void + */ + private function _mediaTagIndex() + { + /* Query Bookmarks */ + $this->DB->build( array( + 'select' => '*', + 'from' => 'bbcode_mediatag', + 'order' => 'mediatag_position ASC', + ) ); + $this->DB->execute(); + + $bbcode_rows = ""; + + /* List the bookmarks */ + while( $r = $this->DB->fetch() ) + { + $bbcode_rows .= $this->html->mediaTagRow( $r ); + } + + /* End table and output */ + $this->registry->output->html .= $this->html->mediaTagWrapper( $bbcode_rows ); + } + + /** + * Recache the mediatag config + * + * @return void + */ + public function recacheMediaTag() + { + /* Query the tags */ + $this->DB->build( array( 'select' => '*', 'from' => 'bbcode_mediatag', 'order' => 'mediatag_position ASC' ) ); + $this->DB->execute(); + + $media_config = array(); + + while( $r = $this->DB->fetch() ) + { + $media_config[$r['mediatag_name']] = array( + 'match' => preg_replace( "#{[0-9]}#", "(.*?)", str_replace( '.', '\.', str_replace( '?', '\?', $r['mediatag_match'] ) ) ), + 'replace' => $r['mediatag_replace'], + ); + } + + /* Save to cache */ + $this->cache->setCache( 'mediatag', $media_config, array( 'array' => 1 ) ); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/posts/xml/index.html b/upload/admin/applications/core/modules_admin/posts/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/posts/xml/index.html +++ b/upload/admin/applications/core/modules_admin/posts/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/report/defaultSection.php b/upload/admin/applications/core/modules_admin/report/defaultSection.php index 8c9c549a..a9d8d636 100644 --- a/upload/admin/applications/core/modules_admin/report/defaultSection.php +++ b/upload/admin/applications/core/modules_admin/report/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default reports section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/report/index.html b/upload/admin/applications/core/modules_admin/report/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/core/modules_admin/report/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/report/reports.php b/upload/admin/applications/core/modules_admin/report/reports.php index eacdec21..5ef00b34 100644 --- a/upload/admin/applications/core/modules_admin/report/reports.php +++ b/upload/admin/applications/core/modules_admin/report/reports.php @@ -1,1301 +1,1290 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_core_report_reports extends ipsCommand -{ - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = $this->registry->output->loadTemplate('cp_skin_reports'); - - //----------------------------------------- - // Set up stuff - //----------------------------------------- - - $this->form_code = $this->html->form_code = 'module=report&section=reports'; - $this->form_code_js = $this->html->form_code_js = 'module=report§ion=reports'; - - //----------------------------------------- - // Load lang - //----------------------------------------- - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_posts' ) ); - - //----------------------------------------- - // How would you like your eggs cooked? - //----------------------------------------- - - switch( $this->request['do'] ) - { - case 'plugin_toggle': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'plugins_manage' ); - $this->_togglePlugin(); - break; - case 'create_plugin': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'plugins_manage' ); - $this->_createPlugin(); - break; - case 'edit_plugin': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'plugins_manage' ); - $this->_editPlugin(); - break; - case 'change_plugin': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'plugins_manage' ); - $this->_changePlugin(); - break; - case 'remove_plugin': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'plugins_remove' ); - $this->_removePlugin(); - break; - case 'plugin': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'plugins_manage' ); - $this->_showPluginIndex(); - break; - - case 'remove_image': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_remove' ); - $this->_removeImage(); - break; - case 'add_image': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_manage' ); - $this->_addImage(); - break; - case 'edit_image': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_manage' ); - $this->_editImage(); - break; - case 'status': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_manage' ); - $this->_showStatusIndex(); - break; - case 'set_status': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_manage' ); - $this->_setStatus(); - break; - case 'remove_status': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_manage' ); - $this->_removeStatus(); - break; - case 'create_status': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_manage' ); - $this->_createStatus(); - break; - case 'edit_status': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_manage' ); - $this->_editStatus(); - break; - case 'reorder': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_manage' ); - $this->_moveStatus(); - break; - - case 'chart_report_stats': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_access' ); - $this->_reportsChart(); - break; - case 'chart_top_moderator': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_access' ); - $this->_moderatorsChart(); - break; - default: - case 'main': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_access' ); - $this->_mainScreen(); - break; - - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Displays the overview page with version info, blog, stats, etc... - * - * @access private - * @return void - */ - private function _mainScreen() - { - $this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports' ) ); - $this->DB->execute(); - $num_reports = $this->DB->getTotalRows(); - - $this->DB->build( array( 'select' => 'id', 'from' => 'rc_comments' ) ); - $this->DB->execute(); - $num_comments = $this->DB->getTotalRows(); - - $this->DB->build( array( 'select' => 'onoff', 'from' => 'rc_classes' ) ); - $this->DB->execute(); - - $plug_on = 0; - $plug_total = 0; - - while( $plugs = $this->DB->fetch() ) - { - if( $plugs['onoff'] == 1 ) - { - $plug_on++; - } - - $plug_total++; - } - - $this->registry->output->html .= $this->html->overview_main_template( array( - 'reports_total' => $num_reports, - 'comments_total' => $num_comments, - 'active_plugins' => $plug_on, - 'total_plugins' => $plug_total, - ) ); - } - - - /** - * This function is used when you disable/enable a report plugin - * - * @access private - * @return void - */ - private function _togglePlugin() - { - $plugin_id = intval($this->request['plugin_id']); - - //-------------------------------------------- - // Checks... - //-------------------------------------------- - - if ( ! $plugin_id ) - { - $this->registry->output->global_message = $this->lang->words['r_noid']; - $this->_showPluginIndex(); - return; - } - - //-------------------------------------------- - // Get from database - //-------------------------------------------- - - $component = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_classes', 'where' => 'com_id=' . $plugin_id ) ); - - $com_enabled = $component['onoff'] ? 0 : 1; - - $this->DB->update( 'rc_classes', array( 'onoff' => $com_enabled ), 'com_id=' . $plugin_id ); - - $this->registry->output->global_message = $this->lang->words['r_toggle']; - $this->_showPluginIndex(); - } - - /** - * Basics for creating a plugin (with only file name, title, and description) - * - * @access private - * @return void - */ - private function _createPlugin() - { - if( $_POST['finish'] == 1 ) - { - //----------------------------------------- - // Make sure stuff is right - //----------------------------------------- - - if( ! $_POST['plugi_title'] || ! $_POST['plugi_desc'] || ! $_POST['plugi_file'] ) - { - $this->registry->output->global_message = $this->lang->words['r_missingfield']; - } - elseif( preg_match("/[^a-z0-9\-_]/i", $this->request['plugi_file'] ) ) - { - $this->registry->output->global_message = $this->lang->words['r_incchar']; - } - elseif( ! file_exists( IPSLib::getAppDir('core') . '/sources/reportPlugins/' . $this->request['plugi_file'] . '.php' ) ) - { - $this->registry->output->global_message = $this->lang->words['r_404file']; - } - - //----------------------------------------- - // If no errors, create the plugin - //----------------------------------------- - - if( ! $this->registry->output->global_message ) - { - $build_plugin = array( - 'onoff' => 1, - 'class_title' => $this->request['plugi_title'], - 'class_desc' => IPSText::stripslashes( $_POST['plugi_desc'] ), - 'author' => $this->request['plugi_author'], - 'author_url' => $this->request['plugi_author_url'], - 'my_class' => $this->request['plugi_file'], - 'pversion' => 'v' . strval($this->request['plugi_version']), - 'lockd' => 0, - ); - - $this->DB->insert( 'rc_classes', $build_plugin ); - - $plugin_id = $this->DB->getInsertId(); - - //----------------------------------------- - // Redirect to edit the plugin for more - //----------------------------------------- - - $this->registry->output->doneScreen( $this->lang->words['r_plugincreate'], $this->lang->words['r_finishplugin'], "{$this->form_code}&do=edit_plugin&com_id=" . $plugin_id, 'redirect' ); - } - } - - //----------------------------------------- - // Show the form - //----------------------------------------- - - $this->registry->output->html .= $this->html->pluginForm(); - } - - /** - * Here we are editing a plugin's settings - * - * @access private - * @return void - */ - private function _editPlugin() - { - $plug_id = intval( $this->request['com_id'] ); - - //----------------------------------------- - // Make sure the plug ID is not zero... - //----------------------------------------- - - if( $plug_id < 1 ) - { - $this->registry->output->global_message = $this->lang->words['r_noid']; - $this->_showPluginIndex(); - return; - } - - //----------------------------------------- - // Pull up the plugin information... - //----------------------------------------- - - $plug_data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_classes', 'where' => "com_id='{$plug_id}'" ) ); - - //----------------------------------------- - // Does this plugin even exist...? - //----------------------------------------- - - if( !$plug_data['com_id'] ) - { - $this->registry->output->global_message = $this->lang->words['r_plugnoexist']; - $this->_showPluginIndex(); - return; - } - - //----------------------------------------- - // Load the plugin and it's information - //----------------------------------------- - - if( $plug_data['my_class'] == '' ) - { - $plug_data['my_class'] = 'default'; - } - - require_once( IPSLib::getAppDir('core') . '/sources/reportPlugins/' . $plug_data['my_class'] . '.php' ); - $plugin_name = $plug_data['my_class'] . '_plugin'; - $plugin = new $plugin_name( $this->registry ); - - //----------------------------------------- - // Load the plugin's extra data settings - //----------------------------------------- - - if( $plug_data['extra_data'] && $plug_data['extra_data'] != 'N;' ) - { - $plugin->_extra = unserialize( $plug_data['extra_data'] ); - } - else - { - $plugin->_extra = array(); - } - - if( $_POST['finish'] == 1 ) - { - //----------------------------------------- - // Form was sent, so let's process stuff - //----------------------------------------- - - $plug_error = $plugin->processAdminForm( $extra_data ); - - if( $plugin_error ) - { - $this->registry->output->global_message = $plug_error; - } - - if( is_array( $_POST['plugi_can_report'] ) ) - { - $p_can_report = ',' . implode( ',', $_POST['plugi_can_report'] ) . ','; - } - - if( is_array( $_POST['plugi_gperm'] ) ) - { - $p_can_gperm = ',' . implode( ',', $_POST['plugi_gperm'] ) . ','; - } - - $build_plugin = array( - 'onoff' => $this->request['plugi_onoff'], - 'group_can_report' => $p_can_report, - 'mod_group_perm' => $p_can_gperm, - 'extra_data' => serialize($extra_data), - ); - - if( $plug_data['lockd'] == 0 || IN_DEV == 1 ) - { - $build_plugin['lockd'] = $this->request['plugi_lockd']; - } - - if( ! $this->registry->output->global_message ) - { - $this->DB->update( 'rc_classes', $build_plugin, "com_id={$plug_id}" ); - - $this->registry->output->doneScreen($this->lang->words['r_plugupdated'], $this->lang->words['r_plugmanager'], "{$this->form_code}&do=plugin", 'redirect' ); - } - else - { - $plug_data = $build_plugin; - } - } - - //----------------------------------------- - // Break up group perms into an array - //----------------------------------------- - - if( $plug_data['group_can_report'] ) - { - $sel_can_report = explode( ',' , $plug_data['group_can_report'] ); - } - - if( $plug_data['mod_group_perm'] ) - { - $sel_group_perm = explode( ',' , $plug_data['mod_group_perm'] ); - } - - //----------------------------------------- - // Display special plugin settings here... - //----------------------------------------- - - $extraForm = $plugin->displayAdminForm( $plugin->_extra, $this->html ); - - $this->registry->output->html .= $this->html->finishPluginForm( $plug_data, $sel_can_report, $sel_group_perm, $extraForm ); - } - - /** - * Lock/unlock a plugin - * - * @access private - * @return void - */ - private function _changePlugin() - { - $plug_id = intval( $this->request['com_id'] ); - - //----------------------------------------- - // Make sure plugin ID is > than zero... - //----------------------------------------- - - if( $plug_id < 1 ) - { - $this->registry->output->global_message = $this->lang->words['r_noid']; - $this->_showPluginIndex(); - return; - } - - //----------------------------------------- - // Load basic, very basic, information... - //----------------------------------------- - - $plug_data = $this->DB->buildAndFetch( array( 'select' => 'com_id, my_class, class_title, class_desc, author, author_url, pversion', 'from' => 'rc_classes', 'where' => "com_id='{$plug_id}'" ) ); - - //----------------------------------------- - // Does our plugin even exist...? - //----------------------------------------- - - if( !$plug_data['com_id'] ) - { - $this->registry->output->global_message = $this->lang->words['r_plugnoexist']; - $this->_showPluginIndex(); - return; - } - - //----------------------------------------- - // Can we even change this plugin? - //----------------------------------------- - - if( $plug_data['lockd'] > 0 && !IN_DEV ) - { - $this->registry->output->global_message = $this->lang->words['r_pluglocked']; - $this->_showPluginIndex(); - return; - } - - //----------------------------------------- - // Let's start loading stuff...! - //----------------------------------------- - - if( $plug_data['my_class'] == '' ) - { - $plug_data['my_class'] = 'default'; - } - - if( $_POST['finish'] == 1 ) - { - //----------------------------------------- - // The form got sent, so lets go! - //----------------------------------------- - - if( ! $_POST['plugi_title'] || ! $_POST['plugi_desc'] || ! $_POST['plugi_file'] ) - { - $this->registry->output->global_message = $this->lang->words['r_missingfield']; - } - elseif( preg_match( "/[^a-z0-9_\-]/i", $_POST['plugi_file'] ) ) - { - $this->registry->output->global_message = $this->lang->words['r_incchar']; - } - - $build_plugin = array( - 'class_title' => $this->request['plugi_title'], - 'class_desc' => IPSText::stripslashes( $_POST['plugi_desc'] ), - 'author' => $this->request['plugi_author'], - 'author_url' => $this->request['plugi_author_url'], - 'my_class' => $this->request['plugi_file'], - 'pversion' => 'v' . strval($this->request['plugi_version']), - 'lockd' => $this->request['plugi_lockd'] - ); - - //----------------------------------------- - // If file was changed blank out extra... - //----------------------------------------- - - if( $plug_data['my_class'] != $build_plugin['my_class'] ) - { - $build_plugin['extra_data'] = ''; - $do_edit = true; - } - - if( ! $this->registry->output->global_message ) - { - $this->DB->update( 'rc_classes', $build_plugin, "com_id={$plug_id}" ); - - if( $do_edit == true ) - { - //----------------------------------------- - // Plugin was changed, need settings now - //----------------------------------------- - - $this->registry->output->doneScreen($this->lang->words['r_plugupdated'], $this->lang->words['r_finishplugin'], "{$this->form_code}&do=edit_plugin&com_id=" . $plug_id, 'redirect' ); - } - else - { - //----------------------------------------- - // File was not changed, no need to edit.. - //----------------------------------------- - - $this->registry->output->doneScreen($this->lang->words['r_plugupdated'], $this->lang->words['r_plugmanager'], "{$this->form_code}&do=plugin", 'redirect' ); - } - } - else - { - $plug_data = $build_plugin; - } - } - - //----------------------------------------- - // Basic info for when I hit "Save"... - //----------------------------------------- - - $this->registry->output->html .= $this->html->pluginForm( $plug_data ); - } - - /** - * This is when we want to remove a plugin, possibly cuz it's crap - * - * @access private - * @return void - */ - private function _removePlugin() - { - $com_id = intval( $this->request['com_id'] ); - - //----------------------------------------- - // Make sure we don't delete nothing... - //----------------------------------------- - - if( $com_id < 1 ) - { - $this->registry->output->global_message = $this->lang->words['r_deleteair']; - $this->_showPluginIndex(); - return; - } - - $row = $this->DB->buildAndFetch( array( 'select' => 'com_id, lockd', 'from' => 'rc_classes', 'where' => "com_id={$com_id}" ) ); - - //----------------------------------------- - // Make sure plugin exists first! - // Again... NOTHING! - //----------------------------------------- - - if( !$row['com_id'] ) - { - $this->registry->output->global_message = $this->lang->words['r_plugin404']; - $this->_showPluginIndex(); - return; - } - - //----------------------------------------- - // Make sure it isn't locked... Snicker.. - //----------------------------------------- - - if( $row['lockd'] == 1 && !IN_DEV ) - { - $this->registry->output->global_message = $this->lang->words['r_dellocked']; - $this->_showPluginIndex(); - return; - } - - $this->DB->delete( 'rc_classes', "com_id={$com_id}" ); - - $this->registry->output->doneScreen( $this->lang->words['r_deleteplug'], $this->lang->words['r_plugmanager'], "{$this->form_code}&do=plugin", 'redirect' ); - } - - /** - * This is where you view all the plugins in a list with options - * - * @access private - * @return void - */ - private function _showPluginIndex() - { - $this->registry->output->extra_nav[] = array( "{$this->settings['base_url']}{$this->form_code}&do=plugin" , $this->lang->words['r_plugmanager'] ); - - $this->DB->build( array( 'select' => '*', 'from' => 'rc_classes' ) ); - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - $row['_enabled_img'] = $row['onoff'] == 1 ? 'tick.png' : 'cross.png'; - - $plugin_rows .= $this->html->report_plugin_row( $row ); - } - - $this->registry->output->html = $this->html->report_plugin_overview( $plugin_rows ); - } - - /** - * This is when you delete a status/severity image - * - * @access private - * @return void - */ - private function _removeImage() - { - $img_id = intval( $this->request['id'] ); - - if( $img_id < 1 ) - { - $this->registry->output->global_message = $this->lang->words['r_noid']; - $this->_showStatusIndex(); - return; - } - - $this->DB->delete( 'rc_status_sev', "id={$img_id}" ); - - $this->registry->output->doneScreen( $this->lang->words['r_imgdel'], $this->lang->words['r_statsever'], "{$this->form_code}&do=status", 'redirect' ); - } - - /** - * This is when I want to add a severity/status image - * - * @access private - * @return void - */ - private function _addImage() - { - $stat_id = intval( $this->request['id'] ); - - //----------------------------------------- - // Make sure that status isn't zero... - //----------------------------------------- - - if( $stat_id < 1 ) - { - $this->registry->output->global_message = $this->lang->words['r_noid']; - $this->_showStatusIndex(); - return; - } - - if( $_POST['finish'] == 1 ) - { - //----------------------------------------- - // Time to add that status img to DB... - //----------------------------------------- - - $image_data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_status_sev', 'where' => "status='{$stat_id}' AND points={$this->request['img_points']}" ) ); - - if( $image_data['id'] ) - { - $this->registry->output->global_message = $this->lang->words['r_changepoints']; - } - else - { - $build_image = array( - 'status' => $stat_id, - 'img' => trim(IPSText::safeslashes($_POST['img_filename'])), - 'width' => $this->request['img_width'], - 'height' => $this->request['img_height'], - 'points' => $this->request['img_points'], - 'is_png' => ( mb_strtolower(strrchr( $this->request['img_filename'], '.' )) == '.png' ? 1 : 0 ) - ); - - $this->DB->insert( 'rc_status_sev', $build_image, "id='{$img_id}'" ); - - $this->registry->output->doneScreen($this->lang->words['r_imgsaved'], $this->lang->words['r_statsever'], "{$this->form_code}&do=status", 'redirect' ); - } - } - - //----------------------------------------- - // Load basic status data... - //----------------------------------------- - - $status = $this->DB->buildAndFetch( array( 'select' => 'title', 'from' => 'rc_status', 'where' => "status='{$stat_id}'" ) ); - - //----------------------------------------- - // Does the status exist in the db? - //----------------------------------------- - - if( !$status['title'] ) - { - $this->registry->output->global_message = $this->lang->words['r_404status']; - $this->_showStatusIndex(); - return; - } - - //----------------------------------------- - // Build the form so we can do something - //----------------------------------------- - - $this->registry->output->html .= $this->html->imageForm( 'add_image', $status, $image_data ); - } - - /** - * This is for setting, in status index, which is New, Complete, and Active - * - * @access private - * @return void - */ - private function _setStatus() - { - $stat_id = intval( $this->request['id'] ); - - if( $stat_id < 1 ) - { - $this->registry->output->global_message = $this->lang->words['r_noid']; - } - - //----------------------------------------- - // Load the status that needs a change - //----------------------------------------- - - $row = $this->DB->buildAndFetch( array( 'select' => 'is_new, is_complete, is_active', 'from' => 'rc_status', 'where' => "status='{$stat_id}'" ) ); - - if( $this->request['status'] == 'new' || $this->request['status'] == 'complete' ) - { - //----------------------------------------- - // We want to make it new or complete - //----------------------------------------- - - if( $this->request['status'] == 'new' ) - { - if( $row['is_complete'] == 1 ) - { - $this->registry->output->global_message = $this->lang->words['r_newcomplete']; - $this->_showStatusIndex(); - return; - } - - $build_status = array( 'is_new' => 1 ); - $build_other_statuses = array( 'is_new' => 0 ); - } - else - { - if( $row['is_new'] == 1 ) - { - $this->registry->output->global_message = $this->lang->words['r_completenew']; - $this->_showStatusIndex(); - return; - } - - $build_status = array( 'is_complete' => 1 ); - $build_other_statuses = array( 'is_complete' => 0 ); - } - - $this->DB->update( 'rc_status', $build_other_statuses, "status<>{$stat_id}" ); - $this->DB->update( 'rc_status', $build_status, "status={$stat_id}" ); - } - elseif( $this->request['status'] == 'active' ) - { - //----------------------------------------- - // We can have as many active as we want - //----------------------------------------- - - $this->DB->update( 'rc_status', array( 'is_active' => ( ! $row['is_active'] ) ), "status={$stat_id}" ); - } - else - { - //----------------------------------------- - // What the heck can this be? - //----------------------------------------- - - $this->registry->output->global_message = $this->lang->words['r_invpar']; - } - - $this->_showStatusIndex(); - } - - /** - * This is the magic behind removing a status and the images behind it - * - * @access private - * @return void - */ - private function _removeStatus() - { - $stat_id = intval( $this->request['id'] ); - - if( $stat_id < 1 ) - { - $this->registry->output->global_message = $this->lang->words['r_deleteair']; - $this->_showStatusIndex(); - return; - } - - $row = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_status', 'where' => "status='{$stat_id}'" ) ); - - if( !$row['status'] ) - { - $this->registry->output->global_message = $this->lang->words['r_noid']; - $this->_showStatusIndex(); - return; - } - - //----------------------------------------- - // Make sure we arn't removing something - // that we are going to need. - //----------------------------------------- - - if( $row['is_new'] == 1 ) - { - $this->registry->output->global_message = $this->lang->words['r_onenew']; - $this->_showStatusIndex(); - return; - } - elseif( $row['is_complete'] == 1 ) - { - $this->registry->output->global_message = $this->lang->words['r_onecomplete']; - $this->_showStatusIndex(); - return; - } - - //----------------------------------------- - // Remove the status and its images - //----------------------------------------- - - $this->DB->delete( 'rc_status', "status='{$stat_id}'" ); - $this->DB->delete( 'rc_status_sev', "status='{$stat_id}'" ); - - $this->registry->output->doneScreen($this->lang->words['r_statdel'], $this->lang->words['r_statsever'], "{$this->form_code}&do=status", 'redirect' ); - } - - /** - * Here is where you create a status (before the added images) - * - * @access private - * @return void - */ - private function _createStatus() - { - if( $_POST['finish'] == 1 ) - { - //----------------------------------------- - // The form has been sent, lets go! - //----------------------------------------- - - if( preg_match("/[^0-9]/", $_POST['stat_ppr'] ) ) - { - $this->registry->output->global_message = $this->lang->words['r_ppr']; - } - elseif( preg_match("/[^0-9\.]/", $_POST['stat_pph'] ) ) - { - $this->registry->output->global_message = $this->lang->words['r_mtp']; - } - else if( !$this->request['stat_title'] ) - { - $this->registry->output->global_message = $this->lang->words['r_nostattitle']; - } - else - { - $stat_check = $this->DB->buildAndFetch( array( 'select' => 'MAX(rorder) as rorder', 'from' => 'rc_status' ) ); - - $build_status = array( - 'title' => $this->request['stat_title'], - 'points_per_report' => $this->request['stat_ppr'], - 'minutes_to_apoint' => $this->request['stat_pph'], - 'rorder' => $stat_check['rorder'] + 1, - ); - - $this->DB->insert( 'rc_status', $build_status ); - - $this->registry->output->doneScreen( $this->lang->words['r_statcreated'], $this->lang->words['r_statsever'], "{$this->form_code}&do=status", 'redirect' ); - } - } - - $this->registry->output->html .= $this->html->statusForm(); - } - - /** - * This is when I want to edit a status - * - * @access private - * @return void - */ - private function _editStatus() - { - $stat_id = intval( $this->request['id'] ); - - //----------------------------------------- - // Make sure the status ID is not zero - //----------------------------------------- - - if( $stat_id < 1 ) - { - $this->registry->output->global_message = $this->lang->words['r_noid']; - $this->_showStatusIndex(); - return; - } - - if( $_POST['finish'] == 1 ) - { - //----------------------------------------- - // We just sen't the form, check stuff - //----------------------------------------- - - if( preg_match("/[^0-9]/", $_POST['stat_ppr'] ) ) - { - $this->registry->output->global_message = $this->lang->words['r_ppr']; - } - elseif( preg_match("/[^0-9\.]/", $_POST['stat_pph'] ) ) - { - $this->registry->output->global_message = $this->lang->words['r_mtp']; - } - else - { - $build_status = array( - 'title' => $this->request['stat_title'], - 'points_per_report' => $this->request['stat_ppr'], - 'minutes_to_apoint' => $this->request['stat_pph'], - ); - - $this->DB->update( 'rc_status', $build_status, "status='{$stat_id}'" ); - - $this->registry->output->doneScreen( $this->lang->words['r_statsaved'], $this->lang->words['r_statsever'], "{$this->form_code}&do=status", 'redirect' ); - } - } - - $stat_data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_status', 'where' => "status='{$stat_id}'" ) ); - - //----------------------------------------- - // Make sure the status actually exists - //----------------------------------------- - - if( !$stat_data['status'] ) - { - $this->registry->output->global_message = $this->lang->words['r_noid']; - $this->_showStatusIndex(); - return; - } - - $this->registry->output->html .= $this->html->statusForm( 'edit_status', $stat_data ); - } - - /** - * This is where you edit an image under a status - * - * @access private - * @return void - */ - private function _editImage() - { - $img_id = intval( $this->request['id'] ); - - //----------------------------------------- - // Make sure the ID is not zero... - //----------------------------------------- - - if( $img_id < 1 ) - { - $this->registry->output->global_message = $this->lang->words['r_noid']; - $this->_showStatusIndex(); - return; - } - - if( $_POST['finish'] == 1 ) - { - //----------------------------------------- - // Now it's time to send the form... - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'rc_status_sev', 'where' => "status='{$this->request['img_status']}' AND points={$this->request['img_points']} AND id!={$img_id}", 'limit' => 1 ) ); - $this->DB->execute(); - - if( $this->DB->getTotalRows() != 0 ) - { - $this->registry->output->global_message = $this->lang->words['r_changepoints']; - } - else - { - $build_image = array( - 'img' => trim(IPSText::safeslashes($_POST['img_filename'])), - 'width' => $this->request['img_width'], - 'height' => $this->request['img_height'], - 'points' => $this->request['img_points'], - 'is_png' => ( mb_strtolower(strrchr( $this->request['img_filename'], '.' )) == '.png' ? 1 : 0 ) - ); - - $this->DB->update( 'rc_status_sev', $build_image, "id='{$img_id}'" ); - - $this->registry->output->doneScreen($this->lang->words['r_imgsaved'], $this->lang->words['r_statsever'], "{$this->form_code}&do=status", 'redirect' ); - } - } - - $image_data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_status_sev', 'where' => "id='{$img_id}'" ) ); - - //----------------------------------------- - // Make sure the image actually exists... - //----------------------------------------- - - if( !$image_data['id'] ) - { - $this->registry->output->global_message = $this->lang->words['r_noid']; - $this->_showStatusIndex(); - return; - } - - //----------------------------------------- - // Load basic data so we can edit it - //----------------------------------------- - - $status = $this->DB->buildAndFetch( array( 'select' => 'title', 'from' => 'rc_status', 'where' => "status='{$image_data['status']}'" ) ); - - $this->registry->output->html .= $this->html->imageForm( 'edit_image', $status, $image_data ); - } - - /** - * When we want to move the status up or down (not sideways...) - * - * @access private - * @return void - */ - private function _moveStatus() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - require_once( IPS_KERNEL_PATH . 'classAjax.php' ); - $ajax = new classAjax(); - - //----------------------------------------- - // Checks... - //----------------------------------------- - - if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) - { - $ajax->returnString( $this->lang->words['postform_badmd5'] ); - exit(); - } - - //----------------------------------------- - // Save new position - //----------------------------------------- - - $position = 1; - - if( is_array($this->request['status']) AND count($this->request['status']) ) - { - foreach( $this->request['status'] as $this_id ) - { - $this->DB->update( 'rc_status', array( 'rorder' => $position ), 'status=' . $this_id ); - - $position++; - } - } - - $ajax->returnString( 'OK' ); - exit(); - } - - /** - * Shows the status/severity index with all the special stuff - * - * @access private - * @return void - */ - private function _showStatusIndex() - { - $this->registry->output->extra_nav[] = array( "{$this->settings['base_url']}{$this->form_code}&do=status" , $this->lang->words['r_statsever'] ); - - //----------------------------------------- - // Get the default board skin... - //----------------------------------------- - - $skin = $this->DB->buildAndFetch( array( 'select' => 'set_image_dir', 'from' => 'skin_collections', 'where' => "set_is_default=1" ) ); - - //----------------------------------------- - // Get the status images... - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'rc_status_sev', 'order' => 'status ASC, points ASC' ) ); - $this->DB->execute(); - - //----------------------------------------- - // Store the status images in an array... - //----------------------------------------- - - $status_image_cache = array(); - - while( $srow = $this->DB->fetch() ) - { - $status_image_cache[ $srow['status'] ] .= str_replace( '<#IMG_DIR#>', $skin['set_image_dir'], $this->html->report_status_image( $srow ) ); - } - - //----------------------------------------- - // Load and process the stateses... - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'rc_status', 'order' => 'rorder ASC' ) ); - $this->DB->execute(); - - $total_statuses = $this->DB->getTotalRows(); - - while( $row = $this->DB->fetch() ) - { - //----------------------------------------- - // Show the New/Complete/Active boxes... - //----------------------------------------- - - $row['_is_new'] = $row['is_new'] == 1 ? 'on' : 'off'; - $row['_is_complete'] = $row['is_complete'] == 1 ? 'on' : 'off'; - $row['_is_active'] = $row['is_active'] == 1 ? 'on' : 'off'; - - //----------------------------------------- - // Finish row with image cache... - //----------------------------------------- - - $row['status_images'] = $status_image_cache[ $row['status'] ]; - $status_rows .= $this->html->report_status_row( $row ); - } - - $this->registry->output->html = $this->html->report_status_overview( $status_rows ); - } - - /** - * Shows report stats in the last 24 hours using chart class - * - * @access private - * @return void - */ - private function _reportsChart() - { - //----------------------------------------- - // Let's build our data for the chart - //----------------------------------------- - - $this->DB->build( - array( - 'select' => 'stat.title, COUNT(*) as num_reports', - 'from' => array( 'rc_reports_index' => 'rep' ), - 'where' => "( stat.is_active=1 OR ( stat.is_active=0 AND (" . time() . "-rep.date_updated)<86400 ) )", - 'group' => 'rep.status', - 'add_join' => array( - array( - 'from' => array( 'rc_reports' => 'reps' ), - 'where' => 'rep.id=reps.rid' - ), - array( - 'from' => array( 'rc_status' => 'stat' ), - 'where' => 'stat.status=rep.status' - ), - ) - ) - ); - $this->DB->execute(); - - $chart_data = array(); - $labels = array(); - - while( $row = $this->DB->fetch() ) - { - $chart_data[] = $row['num_reports']; - $labels[] = $row['title']; - } - - //----------------------------------------- - // Let's draw our pie chart now - //----------------------------------------- - - require_once( IPS_KERNEL_PATH . '/classGraph.php' ); - $graph = new classGraph(); - $graph->options['title'] = $this->lang->words['r_last24']; - $graph->options['width'] = 400; - $graph->options['height'] = 250; - $graph->options['style3D'] = 1; - - if( count($chart_data) ) - { - $graph->addLabels( $labels ); - $graph->addSeries( 'test', $chart_data ); - } - else - { - $graph->addLabels( array( $this->lang->words['r_nodata'] ) ); - $graph->addSeries( 'test', array( 1 ) ); - } - - $graph->options['charttype'] = 'Pie'; - $graph->display(); - } - - /** - * Shows bar graph of top five moderators. Show's what's been done - * - * @access private - * @return void - */ - private function _moderatorsChart() - { - //----------------------------------------- - // Build data for the bar chart - //----------------------------------------- - - $this->DB->build( array( - 'select' => 'rep.id', - 'from' => array( 'rc_reports' => 'reps' ), - 'where' => 'stat.is_complete=1', - 'add_join' => array( - array( - 'from' => array( 'rc_reports_index' => 'rep' ), - 'where' => 'reps.rid=rep.id', - ), - array( - 'from' => array( 'rc_status' => 'stat' ), - 'where' => 'stat.status=rep.status', - ), - ) - ) ); - $this->DB->execute(); - - $total_complete_reports = $this->DB->getTotalRows(); - - $this->DB->build( - array( - 'select' => 'mem.members_display_name as name, COUNT(*) as num_reports', - 'from' => array( 'rc_reports_index' => 'rep' ), - 'where' => "stat.is_complete=1", - 'group' => 'rep.updated_by', - 'order' => 'num_reports DESC', - 'limit' => array( 5 ), - 'add_join' => array( - array( - 'from' => array( 'rc_reports' => 'reps' ), - 'where' => 'rep.id=reps.rid' - ), - array( - 'from' => array( 'rc_status' => 'stat' ), - 'where' => 'stat.status=rep.status' - ), - array( - 'from' => array( 'members' => 'mem' ), - 'where' => 'mem.member_id=rep.updated_by' - ), - ) - ) - ); - $this->DB->execute(); - - $chart_data = array(); - $labels = array(); - - while( $row = $this->DB->fetch() ) - { - $chart_data[] = $row['num_reports']; - $labels[] = substr($row['name'],0,16); - } - - //----------------------------------------- - // Let's draw our pie chart now - //----------------------------------------- - - require_once( IPS_KERNEL_PATH . '/classGraph.php' ); - $graph = new classGraph(); - $graph->options['title'] = $this->lang->words['r_top5']; - $graph->options['width'] = 400; - $graph->options['height'] = 250; - $graph->options['style3D'] = 1; - - if( count($chart_data) ) - { - $graph->addLabels( $labels ); - $graph->addSeries( 'test', $chart_data ); - } - else - { - $graph->addLabels( array( $this->lang->words['r_nodata'] ) ); - $graph->addSeries( 'test', array( 1 ) ); - } - - $graph->options['charttype'] = 'Pie'; - $graph->display(); - } - + + * Invision Power Services + * IP.Board v3.1.4 + * Management for reported content + * Last Updated: $LastChangedDate: 2010-10-18 13:10:17 -0400 (Mon, 18 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @author Based on original "Report Center" by Luke Scott + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 6990 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_report_reports extends ipsCommand +{ + /** + * Skin object + * + * @var object Skin templates + */ + private $html; + + /** + * Main class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = $this->registry->output->loadTemplate('cp_skin_reports'); + + //----------------------------------------- + // Set up stuff + //----------------------------------------- + + $this->form_code = $this->html->form_code = 'module=report&section=reports'; + $this->form_code_js = $this->html->form_code_js = 'module=report§ion=reports'; + + //----------------------------------------- + // Load lang + //----------------------------------------- + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_posts' ) ); + + //----------------------------------------- + // How would you like your eggs cooked? + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'plugin_toggle': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'plugins_manage' ); + $this->_togglePlugin(); + break; + case 'create_plugin': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'plugins_manage' ); + $this->_createPlugin(); + break; + case 'edit_plugin': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'plugins_manage' ); + $this->_editPlugin(); + break; + case 'change_plugin': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'plugins_manage' ); + $this->_changePlugin(); + break; + case 'remove_plugin': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'plugins_remove' ); + $this->_removePlugin(); + break; + case 'plugin': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'plugins_manage' ); + $this->_showPluginIndex(); + break; + + case 'remove_image': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_remove' ); + $this->_removeImage(); + break; + case 'add_image': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_manage' ); + $this->_addImage(); + break; + case 'edit_image': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_manage' ); + $this->_editImage(); + break; + case 'status': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_manage' ); + $this->_showStatusIndex(); + break; + case 'set_status': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_manage' ); + $this->_setStatus(); + break; + case 'remove_status': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_manage' ); + $this->_removeStatus(); + break; + case 'create_status': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_manage' ); + $this->_createStatus(); + break; + case 'edit_status': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_manage' ); + $this->_editStatus(); + break; + case 'reorder': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sands_manage' ); + $this->_moveStatus(); + break; + + case 'chart_report_stats': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_access' ); + $this->_reportsChart(); + break; + case 'chart_top_moderator': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_access' ); + $this->_moderatorsChart(); + break; + default: + case 'main': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_access' ); + $this->_mainScreen(); + break; + + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Displays the overview page with version info, blog, stats, etc... + * + * @return void + */ + private function _mainScreen() + { + $this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports' ) ); + $this->DB->execute(); + $num_reports = $this->DB->getTotalRows(); + + $this->DB->build( array( 'select' => 'id', 'from' => 'rc_comments' ) ); + $this->DB->execute(); + $num_comments = $this->DB->getTotalRows(); + + $this->DB->build( array( 'select' => 'onoff', 'from' => 'rc_classes' ) ); + $this->DB->execute(); + + $plug_on = 0; + $plug_total = 0; + + while( $plugs = $this->DB->fetch() ) + { + if( $plugs['onoff'] == 1 ) + { + $plug_on++; + } + + $plug_total++; + } + + $this->registry->output->html .= $this->html->overview_main_template( array( + 'reports_total' => $num_reports, + 'comments_total' => $num_comments, + 'active_plugins' => $plug_on, + 'total_plugins' => $plug_total, + ) ); + } + + + /** + * This function is used when you disable/enable a report plugin + * + * @return void + */ + private function _togglePlugin() + { + $plugin_id = intval($this->request['plugin_id']); + + //-------------------------------------------- + // Checks... + //-------------------------------------------- + + if ( ! $plugin_id ) + { + $this->registry->output->global_message = $this->lang->words['r_noid']; + $this->_showPluginIndex(); + return; + } + + //-------------------------------------------- + // Get from database + //-------------------------------------------- + + $component = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_classes', 'where' => 'com_id=' . $plugin_id ) ); + + $com_enabled = $component['onoff'] ? 0 : 1; + + $this->DB->update( 'rc_classes', array( 'onoff' => $com_enabled ), 'com_id=' . $plugin_id ); + + $this->registry->output->global_message = $this->lang->words['r_toggle']; + $this->_showPluginIndex(); + } + + /** + * Basics for creating a plugin (with only file name, title, and description) + * + * @return void + */ + private function _createPlugin() + { + $this->registry->output->extra_nav[] = array( "{$this->settings['base_url']}{$this->form_code}&do=plugin" , $this->lang->words['r_plugmanager'] ); + + if( $_POST['finish'] == 1 ) + { + //----------------------------------------- + // Make sure stuff is right + //----------------------------------------- + + if( ! $_POST['plugi_title'] || ! $_POST['plugi_desc'] || ! $_POST['plugi_file'] ) + { + $this->registry->output->global_message = $this->lang->words['r_missingfield']; + } + elseif( preg_match("/[^a-z0-9\-_]/i", $this->request['plugi_file'] ) ) + { + $this->registry->output->global_message = $this->lang->words['r_incchar']; + } + elseif( ! file_exists( IPSLib::getAppDir( $this->request['appPlugin'] ) . '/extensions/reportPlugins/' . $this->request['plugi_file'] . '.php' ) ) + { + $this->registry->output->global_message = $this->lang->words['r_404file']; + } + + //----------------------------------------- + // If no errors, create the plugin + //----------------------------------------- + + if( ! $this->registry->output->global_message ) + { + $build_plugin = array( + 'onoff' => 1, + 'class_title' => $this->request['plugi_title'], + 'class_desc' => IPSText::stripslashes( $_POST['plugi_desc'] ), + 'author' => $this->request['plugi_author'], + 'author_url' => $this->request['plugi_author_url'], + 'my_class' => $this->request['plugi_file'], + 'pversion' => 'v' . strval($this->request['plugi_version']), + 'lockd' => 0, + 'app' => $this->request['appPlugin'] + ); + + $this->DB->insert( 'rc_classes', $build_plugin ); + + $plugin_id = $this->DB->getInsertId(); + + //----------------------------------------- + // Redirect to edit the plugin for more + //----------------------------------------- + + $this->registry->output->doneScreen( $this->lang->words['r_plugincreate'], $this->lang->words['r_finishplugin'], "{$this->form_code}&do=edit_plugin&com_id=" . $plugin_id, 'redirect' ); + } + } + + //----------------------------------------- + // Show the form + //----------------------------------------- + + $this->registry->output->html .= $this->html->pluginForm(); + } + + /** + * Here we are editing a plugin's settings + * + * @return void + */ + private function _editPlugin() + { + $this->registry->output->extra_nav[] = array( "{$this->settings['base_url']}{$this->form_code}&do=plugin" , $this->lang->words['r_plugmanager'] ); + + $plug_id = intval( $this->request['com_id'] ); + + //----------------------------------------- + // Make sure the plug ID is not zero... + //----------------------------------------- + + if( $plug_id < 1 ) + { + $this->registry->output->global_message = $this->lang->words['r_noid']; + $this->_showPluginIndex(); + return; + } + + //----------------------------------------- + // Pull up the plugin information... + //----------------------------------------- + + $plug_data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_classes', 'where' => "com_id='{$plug_id}'" ) ); + + //----------------------------------------- + // Does this plugin even exist...? + //----------------------------------------- + + if( !$plug_data['com_id'] ) + { + $this->registry->output->global_message = $this->lang->words['r_plugnoexist']; + $this->_showPluginIndex(); + return; + } + + //----------------------------------------- + // Load the plugin and it's information + //----------------------------------------- + + if( $plug_data['my_class'] == '' ) + { + $plug_data['my_class'] = 'default'; + } + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $plug_data['app'] ) . '/extensions/reportPlugins/' . $plug_data['my_class'] . '.php', $plug_data['my_class'] . '_plugin', $plug_data['app'] ); + $plugin = new $classToLoad( $this->registry ); + + //----------------------------------------- + // Load the plugin's extra data settings + //----------------------------------------- + + if( $plug_data['extra_data'] && $plug_data['extra_data'] != 'N;' ) + { + $plugin->_extra = unserialize( $plug_data['extra_data'] ); + } + else + { + $plugin->_extra = array(); + } + + if( $_POST['finish'] == 1 ) + { + //----------------------------------------- + // Form was sent, so let's process stuff + //----------------------------------------- + + $plugin_error = $plugin->processAdminForm( $extra_data ); + + if( $plugin_error ) + { + $this->registry->output->global_message = $plugin_error; + } + + if( is_array( $_POST['plugi_can_report'] ) ) + { + $p_can_report = ',' . implode( ',', $_POST['plugi_can_report'] ) . ','; + } + + if( is_array( $_POST['plugi_gperm'] ) ) + { + $p_can_gperm = ',' . implode( ',', $_POST['plugi_gperm'] ) . ','; + } + + $build_plugin = array( + 'onoff' => $this->request['plugi_onoff'], + 'group_can_report' => $p_can_report, + 'mod_group_perm' => $p_can_gperm, + 'extra_data' => serialize($extra_data), + 'app' => $this->request['appPlugin'] + ); + + if( $plug_data['lockd'] == 0 || IN_DEV == 1 ) + { + $build_plugin['lockd'] = $this->request['plugi_lockd']; + } + + if( ! $this->registry->output->global_message ) + { + $this->DB->update( 'rc_classes', $build_plugin, "com_id={$plug_id}" ); + + $this->registry->output->doneScreen($this->lang->words['r_plugupdated'], $this->lang->words['r_plugmanager'], "{$this->form_code}&do=plugin", 'redirect' ); + } + else + { + $plug_data = $build_plugin; + } + } + + //----------------------------------------- + // Break up group perms into an array + //----------------------------------------- + + if( $plug_data['group_can_report'] ) + { + $sel_can_report = explode( ',' , $plug_data['group_can_report'] ); + } + + if( $plug_data['mod_group_perm'] ) + { + $sel_group_perm = explode( ',' , $plug_data['mod_group_perm'] ); + } + + //----------------------------------------- + // Display special plugin settings here... + //----------------------------------------- + + $extraForm = $plugin->displayAdminForm( $plugin->_extra, $this->html ); + + $this->registry->output->html .= $this->html->finishPluginForm( $plug_data, $sel_can_report, $sel_group_perm, $extraForm ); + } + + /** + * Lock/unlock a plugin + * + * @return void + */ + private function _changePlugin() + { + $this->registry->output->extra_nav[] = array( "{$this->settings['base_url']}{$this->form_code}&do=plugin" , $this->lang->words['r_plugmanager'] ); + + $plug_id = intval( $this->request['com_id'] ); + + //----------------------------------------- + // Make sure plugin ID is > than zero... + //----------------------------------------- + + if( $plug_id < 1 ) + { + $this->registry->output->global_message = $this->lang->words['r_noid']; + $this->_showPluginIndex(); + return; + } + + //----------------------------------------- + // Load basic, very basic, information... + //----------------------------------------- + + $plug_data = $this->DB->buildAndFetch( array( 'select' => 'com_id, my_class, class_title, class_desc, author, author_url, pversion', 'from' => 'rc_classes', 'where' => "com_id='{$plug_id}'" ) ); + + //----------------------------------------- + // Does our plugin even exist...? + //----------------------------------------- + + if( !$plug_data['com_id'] ) + { + $this->registry->output->global_message = $this->lang->words['r_plugnoexist']; + $this->_showPluginIndex(); + return; + } + + //----------------------------------------- + // Can we even change this plugin? + //----------------------------------------- + + if( $plug_data['lockd'] > 0 && !IN_DEV ) + { + $this->registry->output->global_message = $this->lang->words['r_pluglocked']; + $this->_showPluginIndex(); + return; + } + + //----------------------------------------- + // Let's start loading stuff...! + //----------------------------------------- + + if( $plug_data['my_class'] == '' ) + { + $plug_data['my_class'] = 'default'; + } + + if( $_POST['finish'] == 1 ) + { + //----------------------------------------- + // The form got sent, so lets go! + //----------------------------------------- + + if( ! $_POST['plugi_title'] || ! $_POST['plugi_desc'] || ! $_POST['plugi_file'] ) + { + $this->registry->output->global_message = $this->lang->words['r_missingfield']; + } + elseif( preg_match( "/[^a-z0-9_\-]/i", $_POST['plugi_file'] ) ) + { + $this->registry->output->global_message = $this->lang->words['r_incchar']; + } + + $build_plugin = array( + 'class_title' => $this->request['plugi_title'], + 'class_desc' => IPSText::stripslashes( $_POST['plugi_desc'] ), + 'author' => $this->request['plugi_author'], + 'author_url' => $this->request['plugi_author_url'], + 'my_class' => $this->request['plugi_file'], + 'pversion' => 'v' . strval($this->request['plugi_version']), + 'lockd' => $this->request['plugi_lockd'] + ); + + //----------------------------------------- + // If file was changed blank out extra... + //----------------------------------------- + + if( $plug_data['my_class'] != $build_plugin['my_class'] ) + { + $build_plugin['extra_data'] = ''; + $do_edit = true; + } + + if( ! $this->registry->output->global_message ) + { + $this->DB->update( 'rc_classes', $build_plugin, "com_id={$plug_id}" ); + + if( $do_edit == true ) + { + //----------------------------------------- + // Plugin was changed, need settings now + //----------------------------------------- + + $this->registry->output->doneScreen($this->lang->words['r_plugupdated'], $this->lang->words['r_finishplugin'], "{$this->form_code}&do=edit_plugin&com_id=" . $plug_id, 'redirect' ); + } + else + { + //----------------------------------------- + // File was not changed, no need to edit.. + //----------------------------------------- + + $this->registry->output->doneScreen($this->lang->words['r_plugupdated'], $this->lang->words['r_plugmanager'], "{$this->form_code}&do=plugin", 'redirect' ); + } + } + else + { + $plug_data = $build_plugin; + } + } + + //----------------------------------------- + // Basic info for when I hit "Save"... + //----------------------------------------- + + $this->registry->output->html .= $this->html->pluginForm( $plug_data ); + } + + /** + * This is when we want to remove a plugin, possibly cuz it's crap + * + * @return void + */ + private function _removePlugin() + { + $com_id = intval( $this->request['com_id'] ); + + //----------------------------------------- + // Make sure we don't delete nothing... + //----------------------------------------- + + if( $com_id < 1 ) + { + $this->registry->output->global_message = $this->lang->words['r_deleteair']; + $this->_showPluginIndex(); + return; + } + + $row = $this->DB->buildAndFetch( array( 'select' => 'com_id, lockd', 'from' => 'rc_classes', 'where' => "com_id={$com_id}" ) ); + + //----------------------------------------- + // Make sure plugin exists first! + // Again... NOTHING! + //----------------------------------------- + + if( !$row['com_id'] ) + { + $this->registry->output->global_message = $this->lang->words['r_plugin404']; + $this->_showPluginIndex(); + return; + } + + //----------------------------------------- + // Make sure it isn't locked... Snicker.. + //----------------------------------------- + + if( $row['lockd'] == 1 && !IN_DEV ) + { + $this->registry->output->global_message = $this->lang->words['r_dellocked']; + $this->_showPluginIndex(); + return; + } + + $this->DB->delete( 'rc_classes', "com_id={$com_id}" ); + + $this->registry->output->doneScreen( $this->lang->words['r_deleteplug'], $this->lang->words['r_plugmanager'], "{$this->form_code}&do=plugin", 'redirect' ); + } + + /** + * This is where you view all the plugins in a list with options + * + * @return void + */ + private function _showPluginIndex() + { + $this->registry->output->extra_nav[] = array( "{$this->settings['base_url']}{$this->form_code}&do=plugin" , $this->lang->words['r_plugmanager'] ); + + $this->DB->build( array( 'select' => '*', 'from' => 'rc_classes' ) ); + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $row['_enabled_img'] = $row['onoff'] == 1 ? 'tick.png' : 'cross.png'; + + $plugin_rows .= $this->html->report_plugin_row( $row ); + } + + $this->registry->output->html = $this->html->report_plugin_overview( $plugin_rows ); + } + + /** + * This is when you delete a status/severity image + * + * @return void + */ + private function _removeImage() + { + $img_id = intval( $this->request['id'] ); + + if( $img_id < 1 ) + { + $this->registry->output->global_message = $this->lang->words['r_noid']; + $this->_showStatusIndex(); + return; + } + + $this->DB->delete( 'rc_status_sev', "id={$img_id}" ); + + $this->registry->output->doneScreen( $this->lang->words['r_imgdel'], $this->lang->words['r_statsever'], "{$this->form_code}&do=status", 'redirect' ); + } + + /** + * This is when I want to add a severity/status image + * + * @return void + */ + private function _addImage() + { + $stat_id = intval( $this->request['id'] ); + + //----------------------------------------- + // Make sure that status isn't zero... + //----------------------------------------- + + if( $stat_id < 1 ) + { + $this->registry->output->global_message = $this->lang->words['r_noid']; + $this->_showStatusIndex(); + return; + } + + if( $_POST['finish'] == 1 ) + { + //----------------------------------------- + // Time to add that status img to DB... + //----------------------------------------- + + $image_data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_status_sev', 'where' => "status='{$stat_id}' AND points={$this->request['img_points']}" ) ); + + if( $image_data['id'] ) + { + $this->registry->output->global_message = $this->lang->words['r_changepoints']; + } + else + { + $build_image = array( + 'status' => $stat_id, + 'img' => trim(IPSText::safeslashes($_POST['img_filename'])), + 'width' => $this->request['img_width'], + 'height' => $this->request['img_height'], + 'points' => $this->request['img_points'], + 'is_png' => ( mb_strtolower(strrchr( $this->request['img_filename'], '.' )) == '.png' ? 1 : 0 ) + ); + + $this->DB->insert( 'rc_status_sev', $build_image, "id='{$img_id}'" ); + + $this->registry->output->doneScreen($this->lang->words['r_imgsaved'], $this->lang->words['r_statsever'], "{$this->form_code}&do=status", 'redirect' ); + } + } + + //----------------------------------------- + // Load basic status data... + //----------------------------------------- + + $status = $this->DB->buildAndFetch( array( 'select' => 'title', 'from' => 'rc_status', 'where' => "status='{$stat_id}'" ) ); + + //----------------------------------------- + // Does the status exist in the db? + //----------------------------------------- + + if( !$status['title'] ) + { + $this->registry->output->global_message = $this->lang->words['r_404status']; + $this->_showStatusIndex(); + return; + } + + //----------------------------------------- + // Build the form so we can do something + //----------------------------------------- + + $this->registry->output->html .= $this->html->imageForm( 'add_image', $status, $image_data ); + } + + /** + * This is for setting, in status index, which is New, Complete, and Active + * + * @return void + */ + private function _setStatus() + { + $stat_id = intval( $this->request['id'] ); + + if( $stat_id < 1 ) + { + $this->registry->output->global_message = $this->lang->words['r_noid']; + } + + //----------------------------------------- + // Load the status that needs a change + //----------------------------------------- + + $row = $this->DB->buildAndFetch( array( 'select' => 'is_new, is_complete, is_active', 'from' => 'rc_status', 'where' => "status='{$stat_id}'" ) ); + + if( $this->request['status'] == 'new' || $this->request['status'] == 'complete' ) + { + //----------------------------------------- + // We want to make it new or complete + //----------------------------------------- + + if( $this->request['status'] == 'new' ) + { + if( $row['is_complete'] == 1 ) + { + $this->registry->output->global_message = $this->lang->words['r_newcomplete']; + $this->_showStatusIndex(); + return; + } + + $build_status = array( 'is_new' => 1 ); + $build_other_statuses = array( 'is_new' => 0 ); + } + else + { + if( $row['is_new'] == 1 ) + { + $this->registry->output->global_message = $this->lang->words['r_completenew']; + $this->_showStatusIndex(); + return; + } + + $build_status = array( 'is_complete' => 1 ); + $build_other_statuses = array( 'is_complete' => 0 ); + } + + $this->DB->update( 'rc_status', $build_other_statuses, "status<>{$stat_id}" ); + $this->DB->update( 'rc_status', $build_status, "status={$stat_id}" ); + } + elseif( $this->request['status'] == 'active' ) + { + //----------------------------------------- + // We can have as many active as we want + //----------------------------------------- + + $this->DB->update( 'rc_status', array( 'is_active' => ( ! $row['is_active'] ) ), "status={$stat_id}" ); + } + else + { + //----------------------------------------- + // What the heck can this be? + //----------------------------------------- + + $this->registry->output->global_message = $this->lang->words['r_invpar']; + } + + $this->_showStatusIndex(); + } + + /** + * This is the magic behind removing a status and the images behind it + * + * @return void + */ + private function _removeStatus() + { + $stat_id = intval( $this->request['id'] ); + + if( $stat_id < 1 ) + { + $this->registry->output->global_message = $this->lang->words['r_deleteair']; + $this->_showStatusIndex(); + return; + } + + $row = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_status', 'where' => "status='{$stat_id}'" ) ); + + if( !$row['status'] ) + { + $this->registry->output->global_message = $this->lang->words['r_noid']; + $this->_showStatusIndex(); + return; + } + + //----------------------------------------- + // Make sure we arn't removing something + // that we are going to need. + //----------------------------------------- + + if( $row['is_new'] == 1 ) + { + $this->registry->output->global_message = $this->lang->words['r_onenew']; + $this->_showStatusIndex(); + return; + } + elseif( $row['is_complete'] == 1 ) + { + $this->registry->output->global_message = $this->lang->words['r_onecomplete']; + $this->_showStatusIndex(); + return; + } + + //----------------------------------------- + // Remove the status and its images + //----------------------------------------- + + $this->DB->delete( 'rc_status', "status='{$stat_id}'" ); + $this->DB->delete( 'rc_status_sev', "status='{$stat_id}'" ); + + $this->registry->output->doneScreen($this->lang->words['r_statdel'], $this->lang->words['r_statsever'], "{$this->form_code}&do=status", 'redirect' ); + } + + /** + * Here is where you create a status (before the added images) + * + * @return void + */ + private function _createStatus() + { + if( $_POST['finish'] == 1 ) + { + //----------------------------------------- + // The form has been sent, lets go! + //----------------------------------------- + + if( preg_match("/[^0-9]/", $_POST['stat_ppr'] ) ) + { + $this->registry->output->global_message = $this->lang->words['r_ppr']; + } + elseif( preg_match("/[^0-9\.]/", $_POST['stat_pph'] ) ) + { + $this->registry->output->global_message = $this->lang->words['r_mtp']; + } + else if( !$this->request['stat_title'] ) + { + $this->registry->output->global_message = $this->lang->words['r_nostattitle']; + } + else + { + $stat_check = $this->DB->buildAndFetch( array( 'select' => 'MAX(rorder) as rorder', 'from' => 'rc_status' ) ); + + $build_status = array( + 'title' => $this->request['stat_title'], + 'points_per_report' => $this->request['stat_ppr'], + 'minutes_to_apoint' => $this->request['stat_pph'], + 'rorder' => $stat_check['rorder'] + 1, + ); + + $this->DB->insert( 'rc_status', $build_status ); + + $this->registry->output->doneScreen( $this->lang->words['r_statcreated'], $this->lang->words['r_statsever'], "{$this->form_code}&do=status", 'redirect' ); + } + } + + $this->registry->output->html .= $this->html->statusForm(); + } + + /** + * This is when I want to edit a status + * + * @return void + */ + private function _editStatus() + { + $stat_id = intval( $this->request['id'] ); + + //----------------------------------------- + // Make sure the status ID is not zero + //----------------------------------------- + + if( $stat_id < 1 ) + { + $this->registry->output->global_message = $this->lang->words['r_noid']; + $this->_showStatusIndex(); + return; + } + + if( $_POST['finish'] == 1 ) + { + //----------------------------------------- + // We just sen't the form, check stuff + //----------------------------------------- + + if( preg_match("/[^0-9]/", $_POST['stat_ppr'] ) ) + { + $this->registry->output->global_message = $this->lang->words['r_ppr']; + } + elseif( preg_match("/[^0-9\.]/", $_POST['stat_pph'] ) ) + { + $this->registry->output->global_message = $this->lang->words['r_mtp']; + } + else + { + $build_status = array( + 'title' => $this->request['stat_title'], + 'points_per_report' => $this->request['stat_ppr'], + 'minutes_to_apoint' => $this->request['stat_pph'], + ); + + $this->DB->update( 'rc_status', $build_status, "status='{$stat_id}'" ); + + $this->registry->output->doneScreen( $this->lang->words['r_statsaved'], $this->lang->words['r_statsever'], "{$this->form_code}&do=status", 'redirect' ); + } + } + + $stat_data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_status', 'where' => "status='{$stat_id}'" ) ); + + //----------------------------------------- + // Make sure the status actually exists + //----------------------------------------- + + if( !$stat_data['status'] ) + { + $this->registry->output->global_message = $this->lang->words['r_noid']; + $this->_showStatusIndex(); + return; + } + + $this->registry->output->html .= $this->html->statusForm( 'edit_status', $stat_data ); + } + + /** + * This is where you edit an image under a status + * + * @return void + */ + private function _editImage() + { + $img_id = intval( $this->request['id'] ); + + //----------------------------------------- + // Make sure the ID is not zero... + //----------------------------------------- + + if( $img_id < 1 ) + { + $this->registry->output->global_message = $this->lang->words['r_noid']; + $this->_showStatusIndex(); + return; + } + + if( $_POST['finish'] == 1 ) + { + //----------------------------------------- + // Now it's time to send the form... + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'rc_status_sev', 'where' => "status='{$this->request['img_status']}' AND points={$this->request['img_points']} AND id!={$img_id}", 'limit' => 1 ) ); + $this->DB->execute(); + + if( $this->DB->getTotalRows() != 0 ) + { + $this->registry->output->global_message = $this->lang->words['r_changepoints']; + } + else + { + $build_image = array( + 'img' => trim(IPSText::safeslashes($_POST['img_filename'])), + 'width' => $this->request['img_width'], + 'height' => $this->request['img_height'], + 'points' => $this->request['img_points'], + 'is_png' => ( mb_strtolower(strrchr( $this->request['img_filename'], '.' )) == '.png' ? 1 : 0 ) + ); + + $this->DB->update( 'rc_status_sev', $build_image, "id='{$img_id}'" ); + + $this->registry->output->doneScreen($this->lang->words['r_imgsaved'], $this->lang->words['r_statsever'], "{$this->form_code}&do=status", 'redirect' ); + } + } + + $image_data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_status_sev', 'where' => "id='{$img_id}'" ) ); + + //----------------------------------------- + // Make sure the image actually exists... + //----------------------------------------- + + if( !$image_data['id'] ) + { + $this->registry->output->global_message = $this->lang->words['r_noid']; + $this->_showStatusIndex(); + return; + } + + //----------------------------------------- + // Load basic data so we can edit it + //----------------------------------------- + + $status = $this->DB->buildAndFetch( array( 'select' => 'title', 'from' => 'rc_status', 'where' => "status='{$image_data['status']}'" ) ); + + $this->registry->output->html .= $this->html->imageForm( 'edit_image', $status, $image_data ); + } + + /** + * When we want to move the status up or down (not sideways...) + * + * @return void + */ + private function _moveStatus() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' ); + $ajax = new $classToLoad(); + + //----------------------------------------- + // Checks... + //----------------------------------------- + + if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) + { + $ajax->returnString( $this->lang->words['postform_badmd5'] ); + exit(); + } + + //----------------------------------------- + // Save new position + //----------------------------------------- + + $position = 1; + + if( is_array($this->request['status']) AND count($this->request['status']) ) + { + foreach( $this->request['status'] as $this_id ) + { + $this->DB->update( 'rc_status', array( 'rorder' => $position ), 'status=' . $this_id ); + + $position++; + } + } + + $ajax->returnString( 'OK' ); + exit(); + } + + /** + * Shows the status/severity index with all the special stuff + * + * @return void + */ + private function _showStatusIndex() + { + $this->registry->output->extra_nav[] = array( "{$this->settings['base_url']}{$this->form_code}&do=status" , $this->lang->words['r_statsever'] ); + + //----------------------------------------- + // Get the default board skin... + //----------------------------------------- + + $skin = $this->DB->buildAndFetch( array( 'select' => 'set_image_dir', 'from' => 'skin_collections', 'where' => "set_is_default=1" ) ); + + //----------------------------------------- + // Get the status images... + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'rc_status_sev', 'order' => 'status ASC, points ASC' ) ); + $this->DB->execute(); + + //----------------------------------------- + // Store the status images in an array... + //----------------------------------------- + + $status_image_cache = array(); + + while( $srow = $this->DB->fetch() ) + { + $status_image_cache[ $srow['status'] ] .= str_replace( '<#IMG_DIR#>', $skin['set_image_dir'], $this->html->report_status_image( $srow ) ); + } + + //----------------------------------------- + // Load and process the stateses... + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'rc_status', 'order' => 'rorder ASC' ) ); + $this->DB->execute(); + + $total_statuses = $this->DB->getTotalRows(); + + while( $row = $this->DB->fetch() ) + { + //----------------------------------------- + // Show the New/Complete/Active boxes... + //----------------------------------------- + + $row['_is_new'] = $row['is_new'] == 1 ? 'on' : 'off'; + $row['_is_complete'] = $row['is_complete'] == 1 ? 'on' : 'off'; + $row['_is_active'] = $row['is_active'] == 1 ? 'on' : 'off'; + + //----------------------------------------- + // Finish row with image cache... + //----------------------------------------- + + $row['status_images'] = $status_image_cache[ $row['status'] ]; + $status_rows .= $this->html->report_status_row( $row ); + } + + $this->registry->output->html = $this->html->report_status_overview( $status_rows ); + } + + /** + * Shows report stats in the last 24 hours using chart class + * + * @return void + */ + private function _reportsChart() + { + //----------------------------------------- + // Let's build our data for the chart + //----------------------------------------- + + $this->DB->build( + array( + 'select' => 'stat.title, COUNT(*) as num_reports', + 'from' => array( 'rc_reports_index' => 'rep' ), + 'where' => "( stat.is_active=1 OR ( stat.is_active=0 AND (" . time() . "-rep.date_updated)<86400 ) )", + 'group' => 'rep.status', + 'add_join' => array( + array( + 'from' => array( 'rc_reports' => 'reps' ), + 'where' => 'rep.id=reps.rid' + ), + array( + 'from' => array( 'rc_status' => 'stat' ), + 'where' => 'stat.status=rep.status' + ), + ) + ) + ); + $this->DB->execute(); + + $chart_data = array(); + $labels = array(); + + while( $row = $this->DB->fetch() ) + { + $chart_data[] = $row['num_reports']; + $labels[] = $row['title']; + } + + //----------------------------------------- + // Let's draw our pie chart now + //----------------------------------------- + + require_once( IPS_KERNEL_PATH . '/classGraph.php' ); + $graph = new classGraph(); + $graph->options['title'] = $this->lang->words['r_last24']; + $graph->options['width'] = 400; + $graph->options['height'] = 250; + $graph->options['style3D'] = 1; + + if( count($chart_data) ) + { + $graph->addLabels( $labels ); + $graph->addSeries( 'test', $chart_data ); + } + else + { + $graph->addLabels( array( $this->lang->words['r_nodata'] ) ); + $graph->addSeries( 'test', array( 1 ) ); + } + + $graph->options['charttype'] = 'Pie'; + $graph->display(); + } + + /** + * Shows bar graph of top five moderators. Show's what's been done + * + * @return void + */ + private function _moderatorsChart() + { + //----------------------------------------- + // Build data for the bar chart + //----------------------------------------- + + $this->DB->build( array( + 'select' => 'rep.id', + 'from' => array( 'rc_reports' => 'reps' ), + 'where' => 'stat.is_complete=1', + 'add_join' => array( + array( + 'from' => array( 'rc_reports_index' => 'rep' ), + 'where' => 'reps.rid=rep.id', + ), + array( + 'from' => array( 'rc_status' => 'stat' ), + 'where' => 'stat.status=rep.status', + ), + ) + ) ); + $this->DB->execute(); + + $total_complete_reports = $this->DB->getTotalRows(); + + $this->DB->build( + array( + 'select' => 'mem.members_display_name as name, COUNT(*) as num_reports', + 'from' => array( 'rc_reports_index' => 'rep' ), + 'where' => "stat.is_complete=1", + 'group' => 'rep.updated_by', + 'order' => 'num_reports DESC', + 'limit' => array( 5 ), + 'add_join' => array( + array( + 'from' => array( 'rc_reports' => 'reps' ), + 'where' => 'rep.id=reps.rid' + ), + array( + 'from' => array( 'rc_status' => 'stat' ), + 'where' => 'stat.status=rep.status' + ), + array( + 'from' => array( 'members' => 'mem' ), + 'where' => 'mem.member_id=rep.updated_by' + ), + ) + ) + ); + $this->DB->execute(); + + $chart_data = array(); + $labels = array(); + + while( $row = $this->DB->fetch() ) + { + $chart_data[] = $row['num_reports']; + $labels[] = IPSText::mbsubstr($row['name'],0,16); + } + + //----------------------------------------- + // Let's draw our pie chart now + //----------------------------------------- + + require_once( IPS_KERNEL_PATH . '/classGraph.php' ); + $graph = new classGraph(); + $graph->options['title'] = $this->lang->words['r_top5']; + $graph->options['width'] = 400; + $graph->options['height'] = 250; + $graph->options['style3D'] = 1; + + if( count($chart_data) ) + { + $graph->addLabels( $labels ); + $graph->addSeries( 'test', $chart_data ); + } + else + { + $graph->addLabels( array( $this->lang->words['r_nodata'] ) ); + $graph->addSeries( 'test', array( 1 ) ); + } + + $graph->options['charttype'] = 'Pie'; + $graph->display(); + } + } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/report/xml/index.html b/upload/admin/applications/core/modules_admin/report/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/report/xml/index.html +++ b/upload/admin/applications/core/modules_admin/report/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/sql/defaultSection.php b/upload/admin/applications/core/modules_admin/sql/defaultSection.php index 860cae32..b3beb0f4 100644 --- a/upload/admin/applications/core/modules_admin/sql/defaultSection.php +++ b/upload/admin/applications/core/modules_admin/sql/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default sql section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/sql/index.html b/upload/admin/applications/core/modules_admin/sql/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/sql/index.html +++ b/upload/admin/applications/core/modules_admin/sql/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/sql/mysql.php b/upload/admin/applications/core/modules_admin/sql/mysql.php index 09d833a0..589aad03 100644 --- a/upload/admin/applications/core/modules_admin/sql/mysql.php +++ b/upload/admin/applications/core/modules_admin/sql/mysql.php @@ -1,900 +1,817 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -@set_time_limit(1200); - - -class admin_core_sql_toolbox_module extends ipsCommand { - - /** - * SQL version - * - * @access public - * @var string - */ - public $sql_version = ""; - - /** - * True SQL version - * - * @access public - * @var string - */ - public $true_version = ""; - - /** - * GZIP Header contents for backup - * - * @access public - * @var string - */ - public $str_gzip_header = "\x1f\x8b\x08\x00\x00\x00\x00\x00"; - - /** - * Flag that's set if there's problems - * - * @access public - * @var boolean - */ - public $db_has_issues = false; - - /** - * HTML object - * - * @access public - * @var object - */ - public $html; - - /** - * Form code - * - * @access public - * @var string - */ - public $form_code = ""; - - /** - * Form code js - * - * @access public - * @var string - */ - public $form_code_js = ""; - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - /* Load HTML and Lang */ - $this->html = $this->registry->output->loadTemplate( 'cp_skin_sql' ); - $this->registry->class_localization->loadLanguageFile( array( 'admin_sql' ) ); - - /* URLs */ - $this->form_code = $this->html->form_code = 'module=sql&section=toolbox'; - $this->form_code_js = $this->html->form_code_js = 'module=sql§ion=toolbox'; - - /* Get mySQL Version */ - $this->DB->getSqlVersion(); - - $this->true_version = $this->html->true_version = $this->DB->true_version; - $this->sql_version = $this->html->sql_version = $this->DB->sql_version; - - /* What to do */ - switch( $this->request['do'] ) - { - case 'search_index': - $this->sqlSearchIndexOverview(); - break; - - case 'rebuild_app_search_index': - $this->sqlSearchRebuildAppIndex(); - break; - - case 'dotool': - $this->sqlRunTool(); - break; - - case 'runtime': - $this->sqlViewResults("SHOW STATUS"); - break; - - case 'system': - $this->sqlViewResults("SHOW VARIABLES"); - break; - - case 'processes': - $this->sqlViewResults("SHOW PROCESSLIST"); - break; - - case 'runsql': - $_POST['query'] = isset( $_POST['query'] ) ? $_POST['query'] : ''; - $q = $_POST['query'] == "" ? urldecode( $_GET['query'] ) : $_POST['query']; - $this->sqlViewResults( trim( stripslashes( $q ) ) ); - break; - - case 'backup': - $this->sqlBackupForm(); - break; - - case 'safebackup': - $this->sqlSafeBackupSplash(); - break; - - case 'dosafebackup': - $this->sqlDoSafeBackup(); - break; - - case 'export_tbl': - $this->sqlDoSafeBackup( trim( urldecode( stripslashes( $_GET['tbl'] ) ) ) ); - break; - - default: - $this->sqlListIndex(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Rebuild the index for the selected application - * - * @access public - * @return void - */ - public function sqlSearchRebuildAppIndex() - { - /* INI */ - $app = $this->request['app_key']; - $st = intval( $this->request['st'] ); - $pergo = 100; - - /* Get the interface */ - require_once( IPS_ROOT_PATH . 'sources/interfaces/interface_search.php' ); - - /* Check the app */ - if( ! IPSLib::appIsInstalled( $app ) ) - { - $this->registry->output->showError( $this->lang->words['my_noapp'], 11144 ); - } - - /* Rebuild Class */ - $_file = IPSLib::getAppDir( $app ) . '/extensions/searchRebuild.php'; - $_class = $app . 'SearchRebuild'; - - /* Check the file */ - if( file_exists( $_file ) ) - { - /* Get the rebuild class */ - require_once( $_file ); - - /* Check the class */ - if( class_exists( $_class ) ) - { - /* Setup the rebuild class */ - $rebuild = new $_class(); - - /* Clear if this is the first pass */ - if( $st == 0 && ! $this->request['rebuild_type']) - { - $rebuild->clear(); - } - - /* Do the rebuild */ - $processed = $rebuild->doRebuild( $st, $pergo ); - - /* Check processed */ - if( is_array( $processed ) ) - { - $rebuild_type_url = '&rebuild_type=' . $processed['type']; - $rebuild_type = $processed['type']; - $processed = $processed['total']; - } - else - { - $rebuild_type_url = ''; - $rebuild_type = ''; - } - - /* Get st again, in case the module updated it */ - if( $st != intval( $this->request['st'] ) ) - { - $st = intval( $this->request['st'] ); - } - else - { - $st += $pergo; - } - - /* Message */ - if( $processed > 0 || ( $rebuild_type && $rebuild_type != 'done' ) ) - { - $title = ipsRegistry::$applications[$app]['app_title'] . $this->lang->words['my_si_progress']; - $msg = "{$processed} " . $this->lang->words['my_processed']; - $url = "{$this->form_code}&do=rebuild_app_search_index&app_key={$app}&st={$st}{$rebuild_type_url}"; - } - else - { - $title = ipsRegistry::$applications[$app]['app_title'] . $this->lang->words['my_si_complete']; - $msg = ""; - $url = "{$this->form_code}&do=search_index"; - } - - /* Bounce */ - $this->registry->output->doneScreen( $title, $msg, $url, 'redirect' ); - } - else - { - $this->registry->output->showError( sprintf( $this->lang->words['my_noloc_class'], $_class ), 2112, true ); - } - } - else - { - $this->registry->output->showError( sprintf( $this->lang->words['my_noloc'], $_file ), 2113, true ); - } - - } - - /** - * SQL Search Index - * - * @access public - * @return void - */ - public function sqlSearchIndexOverview() - { - /* Query the overview data */ - $this->DB->query( "SHOW TABLE STATUS FROM {$this->DB->obj['sql_database']} LIKE 'search_index' " ); - $table_data = $this->DB->fetch(); - - /* Format */ - $table_data['Data_length'] = IPSLib::sizeFormat( $table_data['Data_length'] ); - $table_data['Max_data_length'] = IPSLib::sizeFormat( $table_data['Max_data_length'] ); - $table_data['Index_length'] = IPSLib::sizeFormat( $table_data['Index_length'] ); - - /* Check for searchable apps */ - $searchable_apps = array(); - - foreach( ipsRegistry::$applications as $app ) - { - if( IPSSearchIndex::appIsSearchable( $app['app_directory'] ) ) - { - $searchable_apps[ $app['app_directory'] ] = array( 'title' => $app['app_title'] ); - } - } - - /* Count the apps */ - $this->DB->build( array( 'select' => 'count(*) as total, app', 'from' => 'search_index', 'group' => 'app' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $searchable_apps[ $r['app'] ]['entries'] = $r['total']; - } - - /* Output */ - $this->registry->output->html .= $this->html->sqlSearchIndex( $table_data, $searchable_apps ); - } - - /** - * Run selected tool on selected tables - * - * @access public - * @return void - */ - public function sqlRunTool() - { - /* have we got some there tables me laddo? */ - $tables = array(); - - foreach( $this->request as $key => $value ) - { - if( preg_match( "/^tbl_(\S+)$/", $key, $match ) ) - { - if( $this->request[ $match[0] ] ) - { - $tables[] = $match[1]; - } - } - } - - /* Make sure we have tables to run this on */ - if( count( $tables ) < 1 ) - { - $this->registry->output->showError( $this->lang->words['my_seltables'], 11145 ); - } - - /* What tool is one running? */ - if( strtoupper( $this->request['tool'] ) == 'DROP' || strtoupper( $this->request['tool'] ) == 'CREATE' || strtoupper( $this->request['tool'] ) == 'FLUSH' ) - { - $this->registry->output->showError( $this->lang->words['my_cantdo'], 2114, true ); - } - - /** - * Rikki wants a stupid template so we can output his stupid header. Yes, this creates more work for me. - * This template serves no other purpose than to make Rikki happy. Must make Rikki happy. Rikki gets cranky when he's not happy. - * - * Ask him about roundabouts sometime. Apparently...they're round. - */ - $this->registry->output->html .= $this->html->sqlToolResultHeader(); - - /* Loop through each table and run the tool */ - foreach( $tables as $table ) - { - /* Run the query */ - $this->DB->query( strtoupper( $this->request['tool'] ) . " TABLE $table" ); - - /* Results */ - $fields = $this->DB->getResultFields(); - $data = $this->DB->fetch(); - - /* Print the headers - we don't what or how many so... */ - $columns = array(); - $cnt = count( $fields ); - - for( $i = 0; $i < $cnt; $i++ ) - { - $columns[] = $fields[$i]->name; - } - - /* Grab the rows - we don't what or how many so... */ - $rows = array(); - - for( $i = 0; $i < $cnt; $i++ ) - { - $rows[] = $data[ $fields[$i]->name ]; - } - - /* Add to output */ - $this->registry->output->html .= $this->html->sqlToolResult( "Result: " . $this->request['tool'] . " " . $table, $columns, $rows ); - } - } - - /** - * Safe backup splash screen - * - * @access public - * @return void - */ - public function sqlSafeBackupSplash() - { - /* Output */ - $this->registry->output->extra_nav[] = array( '', $this->lang->words['my_backupnav'] ); - $this->registry->output->html .= $this->html->sqlSafeBackupSplashScreen(); - } - - /** - * Runs the database backup - * - * @access public - * @param string $tbl_name Specify a table to backup, leave blank to backup all - * @return void - */ - public function sqlDoSafeBackup($tbl_name="") - { - /* Backup All Tables */ - if( $tbl_name == "" ) - { - $skip = intval( $this->request['skip'] ); - $create_tbl = intval( $this->request['create_tbl'] ); - $enable_gzip = intval( $this->request['enable_gzip'] ); - $filename = 'ipb_db_backup'; - } - /* Backup specfic table */ - else - { - $skip = 0; - $create_tbl = 0; - $enable_gzip = 1; - $filename = $tbl_name; - } - - /* Setup */ - $output = ""; - @header("Pragma: no-cache"); - $do_gzip = 0; - - /* Gzip? */ - if( $enable_gzip ) - { - $phpver = phpversion(); - - if($phpver >= "4.0") - { - if(extension_loaded("zlib")) - { - $do_gzip = 1; - } - } - } - - if( $do_gzip != 0 ) - { - @ob_start(); - @ob_implicit_flush(0); - header("Content-Type: text/x-delimtext; name=\"{$filename}.sql.gz\""); - header("Content-disposition: attachment; filename={$filename}.sql.gz"); - } - else - { - header("Content-Type: text/x-delimtext; name=\"{$filename}.sql\""); - header("Content-disposition: attachment; filename={$filename}.sql"); - } - - /* Get tables to work on */ - if( $tbl_name == "" ) - { - $tmp_tbl = $this->DB->getTableNames(); - - foreach( $tmp_tbl as $tbl ) - { - /* Ensure that we're only peeking at IBF tables */ - if ( preg_match( "/^" . $this->settings['sql_tbl_prefix'] . "/", $tbl ) ) - { - /* We've started our headers, so print as we go to stop poss memory problems */ - $this->sqlGetTableSQL($tbl, $create_tbl, $skip); - } - } - } - else - { - $this->sqlGetTableSQL($tbl_name, $create_tbl, $skip); - } - - /* Gzip the result */ - if( $do_gzip ) - { - $size = ob_get_length(); - $crc = crc32( ob_get_contents() ); - $contents = gzcompress( ob_get_contents() ); - ob_end_clean(); - echo $this->str_gzip_header . substr( $contents, 0, strlen( $contents ) - 4 ) . $this->sqlGzipFourChars( $crc ) . $this->sqlGzipFourChars( $size ); - } - - exit(); - } - - /** - * Displays the form for backing up an sql database - * - * @access public - * @return void - * @author Josh - */ - public function sqlBackupForm() - { - /* Check mySQL Version */ - if ( $this->sql_version < 3232 ) - { - $this->registry->output->showError( $this->lang->words['my_tooold'], 11146 ); - } - - /* Form Elements */ - $form = array(); - - $form['create_tbl'] = $this->registry->output->formYesNo( 'create_tbl', 1); - $form['skip'] = $this->registry->output->formYesNo( 'skip', 1); - $form['enable_gzip'] = $this->registry->output->formYesNo( 'enable_gzip', 0 ); - - /* Output */ - $this->registry->output->html .= $this->html->sqlBackupForm( $form ); - } - - /** - * Run a mysql query and display results - * - * @access public - * @param string $sql The query to run - * @return void - */ - public function sqlViewResults( $sql ) - { - /* INIT */ - $limit = 50; - $pages = ""; - $the_queries = array(); - - /* Title Map */ - $map = array( 'processes' => $this->lang->words['my_processes'], - 'runtime' => $this->lang->words['my_runtime'], - 'system' => $this->lang->words['my_sysvar'], - ); - - /* Figure out the title */ - if ( isset( $map[ $this->request['do'] ] ) AND $map[ $this->request['do'] ] != "" ) - { - $tbl_title = $map[ $this->request['do'] ]; - $man_query = 0; - } - else - { - $tbl_title = $this->lang->words['my_manual']; - $man_query = 1; - } - - /* Turn off error die */ - $this->DB->return_die = 1; - - /* Split up multiple queries */ - $the_queries = array(); - - if( strstr( $sql, ";" ) ) - { - $the_queries = preg_split( "/;[\r\n|\n]+/", $sql, -1, PREG_SPLIT_NO_EMPTY ); - } - else - { - if( $sql ) - { - $the_queries[] = $sql; - } - } - - $columns = array(); - $rows = array(); - $queryCntForArray = 0; - - if( ! count( $the_queries ) ) - { - $the_queries[ $queryCntForArray ] = ''; - $columns[ $queryCntForArray ][] = $this->lang->words['manual_error']; - $rows[ $queryCntForArray ][] = array( 'error' => $this->lang->words['manual_noquery'] ); - } - else - { - /* Loop through the queries and run them */ - foreach( $the_queries as $sql ) - { - /* INIT */ - $links = ""; - $sql = trim( $sql ); - - /* Check the sql */ - $test_sql = str_replace( "\'", "", $sql ); - $apos_count = substr_count( $test_sql, "'" ); - - if( $apos_count % 2 != 0 ) - { - $columns[ $queryCntForArray ][] = $this->lang->words['manual_error']; - $rows[ $queryCntForArray ][] = array( 'error' => $this->lang->words['manual_invalid'] . htmlspecialchars( $sql ) ); - - unset( $apos_count, $test_sql ); - continue; - } - - unset( $apos_count, $test_sql ); - - /* Check for drop and flush */ - if ( preg_match( "/^(DROP|FLUSH)/i",$sql ) ) - { - $columns[ $queryCntForArray ][] = $this->lang->words['manual_error']; - $rows[ $queryCntForArray ][] = array( 'error' => $this->lang->words['manual_notallowed'] ); - continue; - } - /* Protect admin_login_logs */ - else if ( preg_match( "/^(?!SELECT)/i", preg_replace( "#\s{1,}#s", "", $sql ) ) and preg_match( "/admin_login_logs/i", preg_replace( "#\s{1,}#s", "", $sql ) ) ) - { - $columns[ $queryCntForArray ][] = $this->lang->words['manual_error']; - $rows[ $queryCntForArray ][] = array( 'error' => $this->lang->words['manual_loginlogs'] ); - continue; - } - - /* Setup for query */ - $this->DB->error = ""; - $this->DB->allow_sub_select = 1; - - /* Run the query */ - $this->DB->query( $sql, 1 ); - - /* Check for errors... */ - if ( $this->DB->error != "") - { - $columns[ $queryCntForArray ][] = $this->lang->words['manual_error']; - $rows[ $queryCntForArray ][] = array( 'error' => htmlspecialchars( $this->DB->error ) ); - continue; - } - - /* Build display rows */ - $rows[ $queryCntForArray ] = array(); - $columns[ $queryCntForArray ] = array(); - - if ( preg_match( "/^SELECT/i", $sql ) or preg_match( "/^SHOW/i", $sql ) ) - { - /* Sort out the pages and stuff, auto limit if need be */ - if ( !preg_match( "/^SHOW/i", $sql ) AND ! preg_match( "/LIMIT[ 0-9,]+$/i", $sql ) ) - { - /* Start value */ - $start = $this->request['st'] ? intval( $this->request['st'] ) : 0; - - /* Count the number of rows we got back */ - $rows_returned = $this->DB->getTotalRows(); - - /* Paginate the results */ - if( $rows_returned > $limit ) - { - $links = $this->registry->output->generatePagination( array( - 'totalItems' => $rows_returned, - 'itemsPerPage' => $limit, - 'currentStartValue' => $start, - 'baseUrl' => "{$this->settings['base_url']}{$this->form_code}&do=runsql&query=" . urlencode( $sql ), - ) ); - - /* Reformat the query with a LIMIT */ - if( substr( $sql, -1, 1 ) == ";" ) - { - $sql = substr( $sql, 0, -1 ); - } - - $sql .= " LIMIT $start, $limit"; - - /* Re-run with limit */ - $this->DB->query( $sql, 1 ); - } - } - - /* Create the columns array */ - $fields = $this->DB->getResultFields(); - $cnt = count( $fields ); - - for( $i = 0; $i < $cnt; $i++ ) - { - $columns[ $queryCntForArray ][] = $fields[$i]->name; - } - - /* Populate the rows array */ - while( $r = $this->DB->fetch() ) - { - /* Loop through the results and add to row */ - $row = array(); - - for( $i = 0; $i < $cnt; $i++ ) - { - if( $man_query == 1 ) - { - if( IPSText::mbstrlen( $r[ $fields[$i]->name ] ) > 200 AND ! preg_match( "/^SHOW/i", $sql ) ) - { - $r[ $fields[$i]->name ] = IPSText::truncate( $r[ $fields[$i]->name ], 200 ) .'...'; - } - } - - $row[] = nl2br( htmlspecialchars( wordwrap( $r[ $fields[$i]->name ] , 50, "\n", 1 ) ) ); - } - - /* Add to output array */ - $rows[ $queryCntForArray ][] = $row; - } - } - else - { - $columns[ $queryCntForArray ][] = ''; - $rows[ $queryCntForArray ][] = array( $this->lang->words['query_executed_successfully'] ); - } - - $this->DB->freeResult(); - - $queryCntForArray++; - } - } - - /* Output */ - $this->registry->output->html .= $this->html->sqlViewResults( $the_queries, $columns, $rows, $links ); - } - - /** - * SHOW ALL TABLES AND STUFF! - * 5 hours ago this seemed like a damned good idea. - * - * @access public - * @return void - */ - public function sqlListIndex() - { - /* INIT */ - $form_array = array(); - $extra = ""; - - /* Check version */ - if ( $this->sql_version < 3232 ) - { - $extra = $this->lang->words['my_tooold']; - } - - /* Get a list of tables */ - $this->DB->query( "SHOW TABLE STATUS FROM `{$this->settings['sql_database']}`" ); - - /* Loop through the results */ - $rows = array(); - - while( $r = $this->DB->fetch() ) - { - /* Check to ensure it's a table for this install... */ - if ( ! preg_match( "/^" . $this->settings['sql_tbl_prefix'] ."/i", $r['Name'] ) ) - { - continue; - } - - /* Add to output array */ - $rows[] = array( - 'table' => $r['Name'], - 'rows' => $r['Rows'], - 'query' => urlencode( "SELECT * FROM {$r['Name']}" ) - ); - } - - /* Output */ - $this->registry->output->html .= $this->html->sqlListTables( $rows ); - } - - /** - * Internal handler to return content from table - * - * @access public - * @param string Table - * @param boolean Whether to show create table or not - * @param boolean Whether to skip non-essential tables - * @return void - * @author Josh - */ - public function sqlGetTableSQL($tbl, $create_tbl, $skip=0) - { - /* Add create table statement? */ - if( $create_tbl ) - { - /* Generate table structure */ - if( $this->request['addticks'] ) - { - $this->DB->query( "SHOW CREATE TABLE `{$this->settings['sql_database']}.{$tbl}`" ); - } - else - { - $this->DB->query( "SHOW CREATE TABLE {$this->settings['sql_database']}.{$tbl}" ); - } - - $ctable = $this->DB->fetch(); - - - echo $this->sqlStripTicks( $ctable['Create Table'] ).";\n"; - } - - /* Are we skipping? Woohoo, where's me rope?! */ - if( $skip == 1 ) - { - if( - $tbl == $this->settings['sql_tbl_prefix'].'admin_sessions' OR - $tbl == $this->settings['sql_tbl_prefix'].'sessions' OR - $tbl == $this->settings['sql_tbl_prefix'].'captcha' - ) - { - return $ret; - } - } - - /* Get the data */ - $this->DB->query("SELECT * FROM $tbl"); - - /* Check to make sure rows are in this table, if not return. */ - $row_count = $this->DB->getTotalRows(); - - if( $row_count < 1 ) - { - return TRUE; - } - - /* Get col names */ - $f_list = ""; - $fields = $this->DB->getResultFields(); - $cnt = count($fields); - - for( $i = 0; $i < $cnt; $i++ ) - { - $f_list .= $fields[$i]->name . ", "; - } - - $f_list = rtrim( $f_list, ', ' ); - - /* Loop through the rows */ - while ( $row = $this->DB->fetch() ) - { - /* Get col data */ - $d_list = ""; - - for( $i = 0; $i < $cnt; $i++ ) - { - if ( ! isset($row[ $fields[$i]->name ]) ) - { - $d_list .= "NULL,"; - } - elseif ( $row[ $fields[$i]->name ] != '' ) - { - $d_list .= "'".$this->sqlAddSlashes( $row[ $fields[$i]->name ] ). "',"; - } - else - { - $d_list .= "'',"; - } - } - - $d_list = rtrim( $d_list, ',' ); - - echo "INSERT INTO $tbl ($f_list) VALUES($d_list);\n"; - } - - return TRUE; - - } - - /** - * Strip tick marks from field names - * - * @access public - * @param string $data String to strip tick marks from - * @return string - */ - public function sqlStripTicks( $data ) - { - return str_replace( "`", "", $data ); - } - - /** - * Add slashes to single quotes to stop sql breaks - * - * @access public - * @param string $data String to add slashes too - * @return string - */ - public function sqlAddSlashes($data) - { - $data = str_replace('\\', '\\\\', $data); - $data = str_replace('\'', '\\\'', $data); - $data = str_replace("\r", '\r' , $data); - $data = str_replace("\n", '\n' , $data); - - return $data; - } - - /** - * Gzip - * - * @access public - * @param string $val - * @return string - **/ - public function sqlGzipFourChars( $val ) - { - for ($i = 0; $i < 4; $i ++) - { - $return .= chr($val % 256); - $val = floor($val / 256); - } - - return $return; - } + + * Invision Power Services + * IP.Board v3.1.4 + * mySQL Admin + * Last Updated: $Date: 2010-09-27 18:18:35 -0400 (Mon, 27 Sep 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 6917 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +@set_time_limit(1200); + + +class admin_core_sql_toolbox_module extends ipsCommand { + + /** + * SQL version + * + * @access public + * @var string + */ + public $sql_version = ""; + + /** + * True SQL version + * + * @access public + * @var string + */ + public $true_version = ""; + + /** + * GZIP Header contents for backup + * + * @access public + * @var string + */ + public $str_gzip_header = "\x1f\x8b\x08\x00\x00\x00\x00\x00"; + + /** + * Flag that's set if there's problems + * + * @access public + * @var boolean + */ + public $db_has_issues = false; + + /** + * HTML object + * + * @access public + * @var object + */ + public $html; + + /** + * Form code + * + * @access public + * @var string + */ + public $form_code = ""; + + /** + * Form code js + * + * @access public + * @var string + */ + public $form_code_js = ""; + + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load HTML and Lang */ + $this->html = $this->registry->output->loadTemplate( 'cp_skin_sql' ); + $this->registry->class_localization->loadLanguageFile( array( 'admin_sql' ) ); + + /* URLs */ + $this->form_code = $this->html->form_code = 'module=sql&section=toolbox'; + $this->form_code_js = $this->html->form_code_js = 'module=sql§ion=toolbox'; + + /* Get mySQL Version */ + $this->DB->getSqlVersion(); + + $this->true_version = $this->html->true_version = $this->DB->true_version; + $this->sql_version = $this->html->sql_version = $this->DB->sql_version; + + /* What to do */ + switch( $this->request['do'] ) + { + case 'dotool': + $this->sqlRunTool(); + break; + + case 'runtime': + $this->sqlViewResults("SHOW STATUS"); + break; + + case 'system': + $this->sqlViewResults("SHOW VARIABLES"); + break; + + case 'processes': + $this->sqlViewResults("SHOW PROCESSLIST"); + break; + + case 'runsql': + $_POST['query'] = isset( $_POST['query'] ) ? $_POST['query'] : ''; + $q = $_POST['query'] == "" ? urldecode( $_GET['query'] ) : $_POST['query']; + $q = str_replace( "\", '\\', IPSText::stripslashes( $q ) ); + + $this->sqlViewResults( trim( $q ) ); + break; + + case 'backup': + $this->sqlBackupForm(); + break; + + case 'safebackup': + $this->sqlSafeBackupSplash(); + break; + + case 'dosafebackup': + $this->sqlDoSafeBackup(); + break; + + case 'export_tbl': + $this->sqlDoSafeBackup( trim( urldecode( stripslashes( $_GET['tbl'] ) ) ) ); + break; + + case 'viewschematic': + $this->sqlViewTable(); + break; + default: + $this->sqlListIndex(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Run selected tool on selected tables + * + * @access public + * @return void + */ + public function sqlRunTool() + { + /* have we got some there tables me laddo? */ + $tables = array(); + + foreach( $this->request as $key => $value ) + { + if( preg_match( "/^tbl_(\S+)$/", $key, $match ) ) + { + if( $this->request[ $match[0] ] ) + { + $tables[] = $match[1]; + } + } + } + + /* Make sure we have tables to run this on */ + if( count( $tables ) < 1 ) + { + $this->registry->output->showError( $this->lang->words['my_seltables'], 11145 ); + } + + /* What tool is one running? */ + if( strtoupper( $this->request['tool'] ) == 'DROP' || strtoupper( $this->request['tool'] ) == 'CREATE' || strtoupper( $this->request['tool'] ) == 'FLUSH' ) + { + $this->registry->output->showError( $this->lang->words['my_cantdo'], 2114, true ); + } + + /** + * Rikki wants a stupid template so we can output his stupid header. Yes, this creates more work for me. + * This template serves no other purpose than to make Rikki happy. Must make Rikki happy. Rikki gets cranky when he's not happy. + * + * Ask him about roundabouts sometime. Apparently...they're round. + */ + $this->registry->output->html .= $this->html->sqlToolResultHeader(); + + /* Loop through each table and run the tool */ + foreach( $tables as $table ) + { + /* Run the query */ + $this->DB->query( strtoupper( $this->request['tool'] ) . " TABLE $table" ); + + /* Results */ + $fields = $this->DB->getResultFields(); + $data = $this->DB->fetch(); + + /* Print the headers - we don't what or how many so... */ + $columns = array(); + $cnt = count( $fields ); + + for( $i = 0; $i < $cnt; $i++ ) + { + $columns[] = $fields[$i]->name; + } + + /* Grab the rows - we don't what or how many so... */ + $rows = array(); + + for( $i = 0; $i < $cnt; $i++ ) + { + $rows[] = $data[ $fields[$i]->name ]; + } + + /* Add to output */ + $this->registry->output->html .= $this->html->sqlToolResult( $this->lang->words['resultprefix'] . $this->request['tool'] . " " . $table, $columns, $rows ); + } + } + + /** + * Safe backup splash screen + * + * @access public + * @return void + */ + public function sqlSafeBackupSplash() + { + /* Output */ + $this->registry->output->extra_nav[] = array( '', $this->lang->words['my_backupnav'] ); + $this->registry->output->html .= $this->html->sqlSafeBackupSplashScreen(); + } + + /** + * Runs the database backup + * + * @access public + * @param string $tbl_name Specify a table to backup, leave blank to backup all + * @return void + */ + public function sqlDoSafeBackup($tbl_name="") + { + /* Backup All Tables */ + if( $tbl_name == "" ) + { + $skip = intval( $this->request['skip'] ); + $create_tbl = intval( $this->request['create_tbl'] ); + $enable_gzip = intval( $this->request['enable_gzip'] ); + $filename = 'ipb_db_backup'; + } + /* Backup specfic table */ + else + { + $skip = 0; + $create_tbl = 0; + $enable_gzip = 1; + $filename = $tbl_name; + } + + /* Setup */ + $output = ""; + @header("Pragma: no-cache"); + $do_gzip = 0; + + /* Gzip? */ + if( $enable_gzip ) + { + $phpver = phpversion(); + + if($phpver >= "4.0") + { + if(extension_loaded("zlib")) + { + $do_gzip = 1; + } + } + } + + if( $do_gzip != 0 ) + { + @ob_start(); + @ob_implicit_flush(0); + header("Content-Type: text/x-delimtext; name=\"{$filename}.sql.gz\""); + header("Content-disposition: attachment; filename={$filename}.sql.gz"); + } + else + { + header("Content-Type: text/x-delimtext; name=\"{$filename}.sql\""); + header("Content-disposition: attachment; filename={$filename}.sql"); + } + + /* Get tables to work on */ + if( $tbl_name == "" ) + { + $tmp_tbl = $this->DB->getTableNames(); + + foreach( $tmp_tbl as $tbl ) + { + /* Ensure that we're only peeking at IBF tables */ + if ( preg_match( "/^" . $this->settings['sql_tbl_prefix'] . "/", $tbl ) ) + { + /* We've started our headers, so print as we go to stop poss memory problems */ + $this->sqlGetTableSQL($tbl, $create_tbl, $skip); + } + } + } + else + { + $this->sqlGetTableSQL($tbl_name, $create_tbl, $skip); + } + + /* Gzip the result */ + if( $do_gzip ) + { + $size = ob_get_length(); + $crc = crc32( ob_get_contents() ); + $contents = gzcompress( ob_get_contents() ); + ob_end_clean(); + echo $this->str_gzip_header . substr( $contents, 0, strlen( $contents ) - 4 ) . $this->sqlGzipFourChars( $crc ) . $this->sqlGzipFourChars( $size ); + } + + exit(); + } + + /** + * Displays the form for backing up an sql database + * + * @access public + * @return void + * @author Josh + */ + public function sqlBackupForm() + { + /* Check mySQL Version */ + if ( $this->sql_version < 3232 ) + { + $this->registry->output->showError( $this->lang->words['my_tooold'], 11146 ); + } + + /* Form Elements */ + $form = array(); + + $form['create_tbl'] = $this->registry->output->formYesNo( 'create_tbl', 1); + $form['skip'] = $this->registry->output->formYesNo( 'skip', 1); + $form['enable_gzip'] = $this->registry->output->formYesNo( 'enable_gzip', 0 ); + + /* Output */ + $this->registry->output->html .= $this->html->sqlBackupForm( $form ); + } + + /** + * Run a mysql query and display results + * + * @access public + * @param string $sql The query to run + * @return void + */ + public function sqlViewResults( $sql ) + { + /* INIT */ + $limit = 50; + $pages = ""; + $the_queries = array(); + $tableName = ''; + $truncated = array(); + + /* Title Map */ + $map = array( 'processes' => $this->lang->words['my_processes'], + 'runtime' => $this->lang->words['my_runtime'], + 'system' => $this->lang->words['my_sysvar'], + ); + + /* Figure out the title */ + if ( isset( $map[ $this->request['do'] ] ) AND $map[ $this->request['do'] ] != "" ) + { + $tbl_title = $map[ $this->request['do'] ]; + $man_query = 0; + } + else + { + $tbl_title = $this->lang->words['my_manual']; + $man_query = 1; + } + + /* Turn off error die */ + $this->DB->return_die = 1; + + /* Split up multiple queries */ + $the_queries = array(); + + if( strstr( $sql, ";" ) ) + { + $the_queries = preg_split( "/;[\r\n|\n]+/", $sql, -1, PREG_SPLIT_NO_EMPTY ); + } + else + { + if( $sql ) + { + $the_queries[] = $sql; + } + } + + $columns = array(); + $rows = array(); + $queryCntForArray = 0; + + if( ! count( $the_queries ) ) + { + $the_queries[ $queryCntForArray ] = ''; + $columns[ $queryCntForArray ][] = $this->lang->words['manual_error']; + $rows[ $queryCntForArray ][] = array( 'error' => $this->lang->words['manual_noquery'] ); + } + else + { + /* Loop through the queries and run them */ + foreach( $the_queries as $sql ) + { + /* INIT */ + $links = ""; + $sql = trim( $sql ); + + if ( ! $tableName ) + { + if ( preg_match( "#^SELECT(?:.*)\s+?FROM\s+?(\S+?)(?:\s|$)#i", $sql, $match ) ) + { + $tableName = $match[1]; + } + } + + /* Check the sql */ + $test_sql = str_replace( "\'", "", $sql ); + $apos_count = substr_count( $test_sql, "'" ); + + if( $apos_count % 2 != 0 ) + { + $columns[ $queryCntForArray ][] = $this->lang->words['manual_error']; + $rows[ $queryCntForArray ][] = array( 'error' => $this->lang->words['manual_invalid'] . htmlspecialchars( $sql ) ); + + unset( $apos_count, $test_sql ); + continue; + } + + unset( $apos_count, $test_sql ); + + /* Check for drop and flush */ + if ( preg_match( "/^(DROP|FLUSH)/i",$sql ) ) + { + $columns[ $queryCntForArray ][] = $this->lang->words['manual_error']; + $rows[ $queryCntForArray ][] = array( 'error' => $this->lang->words['manual_notallowed'] ); + continue; + } + /* Protect admin_login_logs */ + else if ( preg_match( "/^(?!SELECT)/i", preg_replace( "#\s{1,}#s", "", $sql ) ) and preg_match( "/admin_login_logs/i", preg_replace( "#\s{1,}#s", "", $sql ) ) ) + { + $columns[ $queryCntForArray ][] = $this->lang->words['manual_error']; + $rows[ $queryCntForArray ][] = array( 'error' => $this->lang->words['manual_loginlogs'] ); + continue; + } + + /* Setup for query */ + $this->DB->error = ""; + $this->DB->allow_sub_select = 1; + + /* Run the query */ + $this->DB->query( $sql, 1 ); + + /* Check for errors... */ + if ( $this->DB->error != "") + { + $columns[ $queryCntForArray ][] = $this->lang->words['manual_error']; + $rows[ $queryCntForArray ][] = array( 'error' => htmlspecialchars( $this->DB->error ) ); + continue; + } + + /* Build display rows */ + $rows[ $queryCntForArray ] = array(); + $columns[ $queryCntForArray ] = array(); + + if ( preg_match( "/^SELECT/i", $sql ) or preg_match( "/^SHOW/i", $sql ) ) + { + /* Sort out the pages and stuff, auto limit if need be */ + if ( !preg_match( "/^SHOW/i", $sql ) AND ! preg_match( "/LIMIT[ 0-9,]+$/i", $sql ) ) + { + /* Start value */ + $start = $this->request['st'] ? intval( $this->request['st'] ) : 0; + + /* Count the number of rows we got back */ + $rows_returned = $this->DB->getTotalRows(); + + /* Paginate the results */ + if( $rows_returned > $limit ) + { + $links = $this->registry->output->generatePagination( array( + 'totalItems' => $rows_returned, + 'itemsPerPage' => $limit, + 'currentStartValue' => $start, + 'baseUrl' => "{$this->settings['base_url']}{$this->form_code}&do=runsql&query=" . urlencode( $sql ), + ) ); + + /* Reformat the query with a LIMIT */ + if( substr( $sql, -1, 1 ) == ";" ) + { + $sql = substr( $sql, 0, -1 ); + } + + $sql .= " LIMIT $start, $limit"; + + /* Re-run with limit */ + $this->DB->query( $sql, 1 ); + } + } + + /* Create the columns array */ + $fields = $this->DB->getResultFields(); + $cnt = count( $fields ); + + for( $i = 0; $i < $cnt; $i++ ) + { + $columns[ $queryCntForArray ][] = $fields[$i]->name; + } + + /* Populate the rows array */ + while( $r = $this->DB->fetch() ) + { + /* Loop through the results and add to row */ + $row = array(); + + for( $i = 0; $i < $cnt; $i++ ) + { + if( $man_query == 1 ) + { + if( IPSText::mbstrlen( $r[ $fields[$i]->name ] ) > 200 AND ! preg_match( "/^SHOW/i", $sql ) ) + { + if ( ! $this->request['notruncate'] ) + { + $r[ $fields[$i]->name ] = IPSText::truncate( $r[ $fields[$i]->name ], 200 ) .'...'; + } + + $truncated[] = $fields[$i]->name; + } + } + + $row[] = nl2br( htmlspecialchars( wordwrap( $r[ $fields[$i]->name ] , 50, "\n", 1 ) ) ); + } + + /* Add to output array */ + $rows[ $queryCntForArray ][] = $row; + } + } + else + { + $columns[ $queryCntForArray ][] = ''; + $rows[ $queryCntForArray ][] = array( $this->lang->words['query_executed_successfully'] ); + } + + $this->DB->freeResult(); + + $queryCntForArray++; + } + } + + if ( $tableName ) + { + $this->registry->output->extra_nav[] = array( "{$this->settings['base_url']}{$this->form_code}&do=runsql&query=" . urlencode( "SELECT * FROM $tableName" ), $tableName ); + } + + /* Output */ + $this->registry->output->html .= $this->html->sqlViewResults( $the_queries, $columns, $rows, $links, $tableName, $truncated ); + } + + /** + * SHOW ALL TABLES AND STUFF! + * 5 hours ago this seemed like a damned good idea. + * + * @access public + * @return void + */ + public function sqlListIndex() + { + /* INIT */ + $form_array = array(); + $extra = ""; + + /* Check version */ + if ( $this->sql_version < 3232 ) + { + $extra = $this->lang->words['my_tooold']; + } + + /* Get a list of tables */ + $this->DB->query( "SHOW TABLE STATUS FROM `{$this->settings['sql_database']}`" ); + + /* Loop through the results */ + $rows = array(); + + while( $r = $this->DB->fetch() ) + { + /* Check to ensure it's a table for this install... */ + if ( ! preg_match( "/^" . $this->settings['sql_tbl_prefix'] ."/i", $r['Name'] ) ) + { + continue; + } + + /* Add to output array */ + $rows[] = array( + 'table' => $r['Name'], + 'rows' => $r['Rows'], + 'query' => urlencode( "SELECT * FROM {$r['Name']}" ) + ); + } + + /* Output */ + $this->registry->output->html .= $this->html->sqlListTables( $rows ); + } + + /** + * View table schematic + * + * @access public + * @return void + * @author Josh + */ + public function sqlViewTable() + { + /* INIT */ + $table = trim( $this->request['table'] ); + + /* Turn off return die */ + $this->DB->return_die = 1; + + /* Fetch data */ + $this->DB->query( "DESCRIBE {$table}" ); + + while( $row = $this->DB->fetch() ) + { + $rows[] = $row; + } + + /* Fetch index data */ + $this->DB->query( "SHOW INDEX FROM {$this->settings['sql_database']}.{$table}"); + + while( $row = $this->DB->fetch() ) + { + $indexes[] = $row; + } + + /* Add Nav */ + $this->registry->output->extra_nav[] = array( "{$this->settings['base_url']}{$this->form_code}&do=runsql&query=" . urlencode( "SELECT * FROM $table" ), $table ); + + /* Output */ + $this->registry->output->html .= $this->html->sqlViewTable( $table, $rows, $indexes ); + } + + /** + * Internal handler to return content from table + * + * @access public + * @param string Table + * @param boolean Whether to show create table or not + * @param boolean Whether to skip non-essential tables + * @return void + * @author Josh + */ + public function sqlGetTableSQL($tbl, $create_tbl, $skip=0) + { + /* Add create table statement? */ + if( $create_tbl ) + { + /* Generate table structure */ + if( $this->request['addticks'] ) + { + $this->DB->query( "SHOW CREATE TABLE `{$this->settings['sql_database']}.{$tbl}`" ); + } + else + { + $this->DB->query( "SHOW CREATE TABLE {$this->settings['sql_database']}.{$tbl}" ); + } + + $ctable = $this->DB->fetch(); + + + echo $this->sqlStripTicks( $ctable['Create Table'] ).";\n"; + } + + /* Are we skipping? Woohoo, where's me rope?! */ + if( $skip == 1 ) + { + if( + $tbl == $this->settings['sql_tbl_prefix'].'admin_sessions' OR + $tbl == $this->settings['sql_tbl_prefix'].'sessions' OR + $tbl == $this->settings['sql_tbl_prefix'].'captcha' + ) + { + return TRUE; + } + } + + /* Get the data */ + $this->DB->query("SELECT * FROM $tbl"); + + /* Check to make sure rows are in this table, if not return. */ + $row_count = $this->DB->getTotalRows(); + + if( $row_count < 1 ) + { + return TRUE; + } + + /* Get col names */ + $f_list = ""; + $fields = $this->DB->getResultFields(); + $cnt = count($fields); + + for( $i = 0; $i < $cnt; $i++ ) + { + $f_list .= $fields[$i]->name . ", "; + } + + $f_list = rtrim( $f_list, ', ' ); + + /* Loop through the rows */ + while ( $row = $this->DB->fetch() ) + { + /* Get col data */ + $d_list = ""; + + for( $i = 0; $i < $cnt; $i++ ) + { + if ( ! isset($row[ $fields[$i]->name ]) ) + { + $d_list .= "NULL,"; + } + elseif ( $row[ $fields[$i]->name ] != '' ) + { + $d_list .= "'".$this->sqlAddSlashes( $row[ $fields[$i]->name ] ). "',"; + } + else + { + $d_list .= "'',"; + } + } + + $d_list = rtrim( $d_list, ',' ); + + echo "INSERT INTO $tbl ($f_list) VALUES($d_list);\n"; + } + + return TRUE; + + } + + /** + * Strip tick marks from field names + * + * @access public + * @param string $data String to strip tick marks from + * @return string + */ + public function sqlStripTicks( $data ) + { + return str_replace( "`", "", $data ); + } + + /** + * Add slashes to single quotes to stop sql breaks + * + * @access public + * @param string $data String to add slashes too + * @return string + */ + public function sqlAddSlashes($data) + { + $data = str_replace('\\', '\\\\', $data); + $data = str_replace('\'', '\\\'', $data); + $data = str_replace("\r", '\r' , $data); + $data = str_replace("\n", '\n' , $data); + + return $data; + } + + /** + * Gzip + * + * @access public + * @param string $val + * @return string + **/ + public function sqlGzipFourChars( $val ) + { + for ($i = 0; $i < 4; $i ++) + { + $return .= chr($val % 256); + $val = floor($val / 256); + } + + return $return; + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/sql/toolbox.php b/upload/admin/applications/core/modules_admin/sql/toolbox.php index f941e528..d73d7dbd 100644 --- a/upload/admin/applications/core/modules_admin/sql/toolbox.php +++ b/upload/admin/applications/core/modules_admin/sql/toolbox.php @@ -1,18 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * SQL Admin - * Last Updated: $Date: 2009-03-11 09:44:20 -0400 (Wed, 11 Mar 2009) $ + * Last Updated: $Date: 2010-10-19 08:45:58 -0400 (Tue, 19 Oct 2010) $ + * * - * @author $Author: jason $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com - * @version $Rev: 4193 $ - * + * @link http://www.invisionpower.com + * @version $Rev: 6994 $ */ if ( ! defined( 'IN_ACP' ) ) @@ -26,14 +27,13 @@ class admin_core_sql_toolbox extends ipsCommand /** * Main class entry point * - * @access public * @param object ipsRegistry reference */ public function doExecute( ipsRegistry $registry ) { /* Require the right driver file */ - require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/sql/' . strtolower( ipsRegistry::dbFunctions()->getDriverType() ) . '.php' ); - $dbdriver = new admin_core_sql_toolbox_module(); + $classToLoad = IPSLib::loadActionOverloader( IPS_ROOT_PATH . 'applications/core/modules_admin/sql/' . strtolower( ipsRegistry::dbFunctions()->getDriverType() ) . '.php', 'admin_core_sql_toolbox_module' ); + $dbdriver = new $classToLoad(); $dbdriver->makeRegistryShortcuts( $registry ); $dbdriver->doExecute( $registry ); } diff --git a/upload/admin/applications/core/modules_admin/sql/xml/index.html b/upload/admin/applications/core/modules_admin/sql/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/sql/xml/index.html +++ b/upload/admin/applications/core/modules_admin/sql/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/system/defaultSection.php b/upload/admin/applications/core/modules_admin/system/defaultSection.php index 4787eb64..c80d2948 100644 --- a/upload/admin/applications/core/modules_admin/system/defaultSection.php +++ b/upload/admin/applications/core/modules_admin/system/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default system section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/system/index.html b/upload/admin/applications/core/modules_admin/system/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/system/index.html +++ b/upload/admin/applications/core/modules_admin/system/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/system/loginlog.php b/upload/admin/applications/core/modules_admin/system/loginlog.php index 823d5163..90be1773 100644 --- a/upload/admin/applications/core/modules_admin/system/loginlog.php +++ b/upload/admin/applications/core/modules_admin/system/loginlog.php @@ -1,17 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Admin Login Logs - * Last Updated: $LastChangedDate: 2009-03-20 12:37:44 -0400 (Fri, 20 Mar 2009) $ + * Last Updated: $LastChangedDate: 2010-10-08 08:06:02 -0400 (Fri, 08 Oct 2010) $ + * * - * @author $Author: josh $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com - * @version $Rev: 4267 $ + * @link http://www.invisionpower.com + * @version $Rev: 6955 $ */ if ( ! defined( 'IN_ACP' ) ) @@ -35,7 +37,7 @@ class admin_core_system_loginlog extends ipsCommand $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'acplogin_log' ); /* Language */ - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) ); + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs', 'admin_system' ) ); /* URLs */ $this->form_code = 'module=system&section=loginlog'; @@ -48,8 +50,7 @@ class admin_core_system_loginlog extends ipsCommand $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] ); $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=system§ion=loginlog', $this->lang->words['al_error_logs'] ); - /* Load lang and skin */ - $this->registry->class_localization->loadLanguageFile( array( 'admin_system' ) ); + /* Load skin */ $this->html = $this->registry->output->loadTemplate('cp_skin_system'); switch( $this->request['do'] ) diff --git a/upload/admin/applications/core/modules_admin/system/security.php b/upload/admin/applications/core/modules_admin/system/security.php index fbcfcef0..52d39f23 100644 --- a/upload/admin/applications/core/modules_admin/system/security.php +++ b/upload/admin/applications/core/modules_admin/system/security.php @@ -1,20 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Security center tools - * Last Updated: $Date: 2009-10-23 21:23:07 -0400 (Fri, 23 Oct 2009) $ + * Last Updated: $Date: 2010-10-18 13:10:17 -0400 (Mon, 18 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 2.2 IIRC - * @version $Revision: 5283 $ - * + * @version $Revision: 6990 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -28,7 +28,6 @@ class admin_core_system_security extends ipsCommand /** * Skin object * - * @access private * @var object Skin templates */ private $html; @@ -36,7 +35,6 @@ class admin_core_system_security extends ipsCommand /** * Main class entry point * - * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ @@ -107,7 +105,6 @@ class admin_core_system_security extends ipsCommand /** * Virus checker * - * @access public * @return void */ public function listAdmins() @@ -187,7 +184,6 @@ class admin_core_system_security extends ipsCommand /** * Virus checker * - * @access public * @return void */ public function virusCheck() @@ -214,8 +210,8 @@ class admin_core_system_security extends ipsCommand // Get class //----------------------------------------- - require_once( IPS_ROOT_PATH . 'sources/classes/virusChecker/virusChecker.php' ); - $class_virus_checker = new virusChecker( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/virusChecker/virusChecker.php', 'virusChecker' ); + $class_virus_checker = new $classToLoad( $this->registry ); //----------------------------------------- // Run it... @@ -294,7 +290,6 @@ class admin_core_system_security extends ipsCommand /** * Security Overview Screen * - * @access public * @return void */ public function securityOverview() @@ -427,7 +422,6 @@ class admin_core_system_security extends ipsCommand /** * ACP HTACCESS: Step two * - * @access public * @return void * @author Josh */ @@ -489,7 +483,6 @@ class admin_core_system_security extends ipsCommand /** * ACP HTACCESS: Step One * - * @access public * @return void */ public function acpHtaccessForm() @@ -501,7 +494,6 @@ class admin_core_system_security extends ipsCommand /** * Rename ACP directory * - * @access public * @return void */ public function doAcpRename() @@ -514,7 +506,6 @@ class admin_core_system_security extends ipsCommand /** * Change conf global * - * @access public * @return void */ public function doConfGlobal() @@ -544,7 +535,6 @@ class admin_core_system_security extends ipsCommand /** * Add htaccess to non IPB dirs * - * @access public * @return void */ public function doHtaccess() @@ -596,13 +586,13 @@ EOF; /** * Deep Virus Scan * - * @access public * @return void */ public function deepScan() { /* INIT */ $filter = trim( $this->request['filter'] ); + $bad_score = 0; $file_count = 0; $bad_count = 0; $content = ""; @@ -620,8 +610,8 @@ EOF; 10 => '#ff0000' ); /* Virus checker */ - require_once( IPS_ROOT_PATH . 'sources/classes/virusChecker/virusChecker.php' ); - $class_virus_checker = new virusChecker( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/virusChecker/virusChecker.php', 'virusChecker' ); + $class_virus_checker = new $classToLoad( $this->registry ); /* Run Scan */ $class_virus_checker->deepScan( rtrim( DOC_IPS_ROOT_PATH, '/' ) ); @@ -717,37 +707,4 @@ EOF; $this->registry->output->extra_nav[] = array( '', $this->lang->words['s_deep_nav'] ); } - - /** - * Update Setting - * - * @access public - * @param string $key Setting key to update - * @param mixed $value Value to set - * @return boolean - * @deprecated Not used any more best I can tell - */ - public function update_setting( $key, $value ) - { - /* Check for a key */ - if ( ! $key ) - { - return FALSE; - } - - /* Update the DB */ - $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => $value ), "conf_key='{$key}'" ); - - //----------------------------------------- - // Rebuild settings cache - //----------------------------------------- - - require_once( IPSLib::getAppDir( 'core' ) . '/modules_admin/tools/settings.php' ); - $settings = new settings(); - - $settings->setting_rebuildcache(); - - /* Done */ - return TRUE; - } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/system/taskmanager.php b/upload/admin/applications/core/modules_admin/system/taskmanager.php index f4e6e162..827e969c 100644 --- a/upload/admin/applications/core/modules_admin/system/taskmanager.php +++ b/upload/admin/applications/core/modules_admin/system/taskmanager.php @@ -1,18 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Task Manager - * Last Updated: $LastChangedDate: 2009-12-01 17:42:17 -0500 (Tue, 01 Dec 2009) $ + * Last Updated: $LastChangedDate: 2010-10-19 10:40:05 -0400 (Tue, 19 Oct 2010) $ + * * - * @author $Author: josh $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com - * @version $Rev: 5501 $ + * @link http://www.invisionpower.com + * @version $Rev: 6995 $ */ if ( ! defined( 'IN_ACP' ) ) @@ -26,7 +27,6 @@ class admin_core_system_taskmanager extends ipsCommand /** * Skin object * - * @access private * @var object Skin templates */ private $html; @@ -34,15 +34,14 @@ class admin_core_system_taskmanager extends ipsCommand /** * Main class entry point * - * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ public function doExecute( ipsRegistry $registry ) { /* Load Class */ - require_once( IPS_ROOT_PATH . '/sources/classes/class_taskmanager.php' ); - $this->func_taskmanager = new class_taskmanager( $registry ); + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/class_taskmanager.php', 'class_taskmanager' ); + $this->func_taskmanager = new $classToLoad( $registry ); /* Load Skin and Language */ $this->html = $this->registry->output->loadTemplate('cp_skin_system'); @@ -141,7 +140,6 @@ class admin_core_system_taskmanager extends ipsCommand /** * Perform the task import * - * @access public * @param string Raw XML code * @return void */ @@ -222,7 +220,6 @@ class admin_core_system_taskmanager extends ipsCommand /** * Remove a task log * - * @access public * @return void */ public function taskLogsDelete() @@ -251,7 +248,6 @@ class admin_core_system_taskmanager extends ipsCommand /** * Show task logs * - * @access public * @return void */ public function taskLogsShow() @@ -299,7 +295,6 @@ class admin_core_system_taskmanager extends ipsCommand /** * Builds the task log overview screen * - * @access public * @return void */ public function taskLogsOverview() @@ -355,7 +350,6 @@ class admin_core_system_taskmanager extends ipsCommand /** * Delete a task * - * @access public * @param string $type Either add or edit * @return void */ @@ -387,7 +381,6 @@ class admin_core_system_taskmanager extends ipsCommand /** * Unlock a task * - * @access public * @return void */ public function taskManagerUnlockTask() @@ -406,7 +399,6 @@ class admin_core_system_taskmanager extends ipsCommand /** * Runs the selected task * - * @access public * @return void */ public function taskManagerRunTask() @@ -459,10 +451,9 @@ class admin_core_system_taskmanager extends ipsCommand /* Run the task file */ if( file_exists( IPSLib::getAppDir( $this_task['task_application'] ) . '/tasks/' . $this_task['task_file'] ) ) { - require_once( IPSLib::getAppDir( $this_task['task_application'] ) . '/tasks/' . $this_task['task_file'] ); - $myobj = new task_item( $this->registry, $this->func_taskmanager, $this_task ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $this_task['task_application'] ) . '/tasks/' . $this_task['task_file'], 'task_item', $this_task['task_application'] ); + $myobj = new $classToLoad( $this->registry, $this->func_taskmanager, $this_task ); $myobj->runTask(); - /* Bounce */ $this->registry->output->global_message = $this->lang->words['t_ran']; @@ -483,7 +474,6 @@ class admin_core_system_taskmanager extends ipsCommand /** * Save the add/edit task form * - * @access public * @param string $type Either add or edit * @return void */ @@ -587,7 +577,6 @@ class admin_core_system_taskmanager extends ipsCommand /** * Builds the add/edit task form * - * @access public * @param string $type Either add or edit * @return void */ @@ -608,13 +597,13 @@ class admin_core_system_taskmanager extends ipsCommand /* Edit Task Form */ if ( $type == 'edit' ) { - /* Form bits */ - $title = "Editing Task: ".$group['cb_group_name']; - $button = "Edit Task"; - $formbit = "task_edit_do"; - /* Form Data */ - $task = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'task_manager', 'where' => "task_id=$task_id" ) ); + $task = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'task_manager', 'where' => "task_id={$task_id}" ) ); + + /* Form bits */ + $title = sprintf( $this->lang->words['task_edit_title'], $task['task_title'] ); + $button = $this->lang->words['edittask_button']; + $formbit = "task_edit_do"; } /* Add Task Form */ else @@ -703,7 +692,6 @@ class admin_core_system_taskmanager extends ipsCommand /** * Builds the task mananger overview screen * - * @access public * @return void */ public function taskManagerOverview() @@ -720,6 +708,11 @@ class admin_core_system_taskmanager extends ipsCommand /* Loop through and build the output array */ while ( $row = $this->DB->fetch() ) { + if( !IPSLib::appIsInstalled( $row['task_application'] ) ) + { + continue; + } + $row['task_minute'] = $row['task_minute'] != '-1' ? $row['task_minute'] : '-'; $row['task_hour'] = $row['task_hour'] != '-1' ? $row['task_hour'] : '-'; $row['task_month_day'] = $row['task_month_day'] != '-1' ? $row['task_month_day'] : '-'; @@ -758,7 +751,6 @@ class admin_core_system_taskmanager extends ipsCommand /** * Imports tasks from XML * - * @access public * @param string $file Filename to import tasks from * @param bool $no_return Set to return true/false, instead of displaying results * @return void @@ -882,7 +874,6 @@ class admin_core_system_taskmanager extends ipsCommand /** * Import all tasks from XML * - * @access public * @param bool $no_return * @return void */ @@ -953,21 +944,13 @@ class admin_core_system_taskmanager extends ipsCommand } } - /* Return or Bounce */ - if ( $no_return ) - { - return TRUE; - } - else - { - $this->taskManagerOverview(); - } + /* Return */ + $this->taskManagerOverview(); } /** * Export a single task * - * @access public * @return void */ public function taskExport() @@ -997,7 +980,6 @@ class admin_core_system_taskmanager extends ipsCommand /** * Export tasks to XML * - * @access public * @return void */ public function tasksExportToXML() @@ -1043,5 +1025,4 @@ class admin_core_system_taskmanager extends ipsCommand $this->registry->output->global_message = $this->lang->words['t_exported']; $this->taskManagerOverview(); } - } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/system/xml/index.html b/upload/admin/applications/core/modules_admin/system/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/system/xml/index.html +++ b/upload/admin/applications/core/modules_admin/system/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/templates/css.php b/upload/admin/applications/core/modules_admin/templates/css.php index e63189b3..0dd95d98 100644 --- a/upload/admin/applications/core/modules_admin/templates/css.php +++ b/upload/admin/applications/core/modules_admin/templates/css.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * CSS editing - * Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Who knows... - * @version $Revision: 3887 $ + * @version $Revision: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/templates/defaultSection.php b/upload/admin/applications/core/modules_admin/templates/defaultSection.php index 106f7a34..faf2ce84 100644 --- a/upload/admin/applications/core/modules_admin/templates/defaultSection.php +++ b/upload/admin/applications/core/modules_admin/templates/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default templates section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/templates/easylogo.php b/upload/admin/applications/core/modules_admin/templates/easylogo.php index 21e7720f..030f0dc8 100644 --- a/upload/admin/applications/core/modules_admin/templates/easylogo.php +++ b/upload/admin/applications/core/modules_admin/templates/easylogo.php @@ -1,245 +1,247 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - - -class admin_core_templates_easylogo extends ipsCommand -{ - /** - * HTML Skin object - * - * @access protected - * @var object - */ - protected $html; - - /** - * Skin Functions Class - * - * @access private - * @var object - */ - private $skinFunctions; - - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen/redirects] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load lang - //----------------------------------------- - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ), 'core' ); - - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = $this->registry->output->loadTemplate('cp_skin_templates'); - - //----------------------------------------- - // Set up stuff - //----------------------------------------- - - $this->form_code = $this->html->form_code = 'module=templates&section=easylogo'; - $this->form_code_js = $this->html->form_code_js = 'module=templates§ion=easylogo'; - - //----------------------------------------- - // Load functions and cache classes - //----------------------------------------- - - require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); - require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); - - $this->skinFunctions = new skinCaching( $registry ); - - //----------------------------------------- - // What to do? - //----------------------------------------- - - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'easy_logo' ); - - switch( $this->request['do'] ) - { - default: - case 'splash': - $this->splash(); - break; - case 'finish': - $this->complete(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Finish changing the logo - * - * @access public - * @return void [Outputs to screen/redirects] - */ - public function complete() - { - //----------------------------------------- - // Check id - //----------------------------------------- - - if ( ! $this->request['skin'] ) - { - $this->registry->output->global_message = $this->lang->words['el_noskinid']; - $this->splash(); - return; - } - - //----------------------------------------- - // Upload or new logo? - //----------------------------------------- - - if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") ) - { - if ( ! $_POST['logo_url'] ) - { - $this->registry->output->global_message = $this->lang->words['el_nofile']; - $this->splash(); - return; - } - - $newlogo = $_POST['logo_url']; - } - else - { - if ( ! is_writable( IPS_CACHE_PATH . 'public/style_images' ) ) - { - $this->registry->output->global_message = $this->lang->words['el_chmod']; - $this->splash(); - return; - } - - //----------------------------------------- - // Upload - //----------------------------------------- - - $FILE_NAME = $_FILES['FILE_UPLOAD']['name']; - $FILE_SIZE = $_FILES['FILE_UPLOAD']['size']; - $FILE_TYPE = $_FILES['FILE_UPLOAD']['type']; - - //----------------------------------------- - // Silly spaces - //----------------------------------------- - - $FILE_NAME = preg_replace( "/\s+/", "_", $FILE_NAME ); - - //----------------------------------------- - // Naughty Opera adds the filename on the end of the - // mime type - we don't want this. - //----------------------------------------- - - $FILE_TYPE = preg_replace( "/^(.+?);.*$/", "\\1", $FILE_TYPE ); - - //----------------------------------------- - // Correct file type? - //----------------------------------------- - - if ( ! preg_match( "#\.(?:gif|jpg|jpeg|png)$#is", $FILE_NAME ) ) - { - $this->registry->output->global_message = $this->lang->words['el_wrongformat']; - $this->splash(); - return; - } - - if ( move_uploaded_file( $_FILES[ 'FILE_UPLOAD' ]['tmp_name'], IPS_CACHE_PATH . "public/style_images/{$this->request['skin']}_" . $FILE_NAME ) ) - { - @chmod( IPS_CACHE_PATH."public/style_images/{$this->requestt['skin']}_".$FILE_NAME, 0777 ); - } - else - { - $this->registry->output->global_message = $this->lang->words['el_chmod']; - $this->start(); - return; - } - - $newlogo = "{$this->settings['public_dir']}style_images/{$this->request['skin']}_" . urlencode($FILE_NAME); - } - - //----------------------------------------- - // Update the macro.. - //----------------------------------------- - - $this->skinFunctions->saveReplacementFromEdit( $this->request['replacementId'], $this->request['skin'], $newlogo, 'logo_img' ); - - //----------------------------------------- - // Rebuild cache(s) - //----------------------------------------- - - $this->skinFunctions->rebuildReplacementsCache( $this->request['skin'] ); - - $this->registry->output->global_message = sprintf( $this->lang->words['el_log'], $this->request['skin'] ); - - if( $this->skinFunctions->fetchErrorMessages() ) - { - $this->registry->output->global_message .= "
" . implode( "
", $this->skinFunctions->fetchErrorMessages() ); - } - - if( $this->skinFunctions->fetchMessages() ) - { - $this->registry->output->global_message .= "
" . implode( "
", $this->skinFunctions->fetchMessages() ); - } - - $this->splash(); - } - - /** - * Show the form to change the logo - * - * @access public - * @return void [Outputs to screen/redirects] - */ - public function splash() - { - //----------------------------------------- - // Can we upload into style_images? - //----------------------------------------- - - $warning = ! is_writable( IPS_CACHE_PATH . 'public/style_images' ) ? true : false; - - //----------------------------------------- - // Get header logo image - //----------------------------------------- - - $replacements = $this->skinFunctions->fetchReplacements( 0 ); - $currentUrl = $replacements['logo_img']['replacement_content']; - $currentId = $replacements['logo_img']['replacement_id']; - - $this->registry->output->html .= $this->html->easyLogo( $warning, $currentUrl, $currentId ); - } - + + * Invision Power Services + * IP.Board v3.1.4 + * Easy Logo Changer + * Last Updated: $Date: 2010-07-16 14:28:53 -0400 (Fri, 16 Jul 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since Tuesday 17th August 2004 + * @version $Revision: 6664 $ + * + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class admin_core_templates_easylogo extends ipsCommand +{ + /** + * HTML Skin object + * + * @access protected + * @var object + */ + protected $html; + + /** + * Skin Functions Class + * + * @access private + * @var object + */ + private $skinFunctions; + + /** + * Class entry point + * + * @access public + * @param object Registry reference + * @return void [Outputs to screen/redirects] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load lang + //----------------------------------------- + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ), 'core' ); + + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = $this->registry->output->loadTemplate('cp_skin_templates'); + + //----------------------------------------- + // Set up stuff + //----------------------------------------- + + $this->form_code = $this->html->form_code = 'module=templates&section=easylogo'; + $this->form_code_js = $this->html->form_code_js = 'module=templates§ion=easylogo'; + + //----------------------------------------- + // Load functions and cache classes + //----------------------------------------- + + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); + require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); + + $this->skinFunctions = new skinCaching( $registry ); + + //----------------------------------------- + // What to do? + //----------------------------------------- + + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'easy_logo' ); + + switch( $this->request['do'] ) + { + default: + case 'splash': + $this->splash(); + break; + case 'finish': + $this->complete(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Finish changing the logo + * + * @access public + * @return void [Outputs to screen/redirects] + */ + public function complete() + { + //----------------------------------------- + // Check id + //----------------------------------------- + + if ( ! $this->request['skin'] ) + { + $this->registry->output->global_message = $this->lang->words['el_noskinid']; + $this->splash(); + return; + } + + //----------------------------------------- + // Upload or new logo? + //----------------------------------------- + + if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") ) + { + if ( ! $_POST['logo_url'] ) + { + $this->registry->output->global_message = $this->lang->words['el_nofile']; + $this->splash(); + return; + } + + $newlogo = $_POST['logo_url']; + } + else + { + if ( ! is_writable(DOC_IPS_ROOT_PATH . PUBLIC_DIRECTORY . "/style_images" ) ) + { + $this->registry->output->global_message = $this->lang->words['el_chmod']; + $this->splash(); + return; + } + + //----------------------------------------- + // Upload + //----------------------------------------- + + $FILE_NAME = $_FILES['FILE_UPLOAD']['name']; + $FILE_SIZE = $_FILES['FILE_UPLOAD']['size']; + $FILE_TYPE = $_FILES['FILE_UPLOAD']['type']; + + //----------------------------------------- + // Silly spaces + //----------------------------------------- + + $FILE_NAME = preg_replace( "/\s+/", "_", $FILE_NAME ); + + //----------------------------------------- + // Naughty Opera adds the filename on the end of the + // mime type - we don't want this. + //----------------------------------------- + + $FILE_TYPE = preg_replace( "/^(.+?);.*$/", "\\1", $FILE_TYPE ); + + //----------------------------------------- + // Correct file type? + //----------------------------------------- + + if ( ! preg_match( "#\.(?:gif|jpg|jpeg|png)$#is", $FILE_NAME ) ) + { + $this->registry->output->global_message = $this->lang->words['el_wrongformat']; + $this->splash(); + return; + } + + if ( move_uploaded_file( $_FILES[ 'FILE_UPLOAD' ]['tmp_name'], DOC_IPS_ROOT_PATH . PUBLIC_DIRECTORY . "/style_images/{$this->request['skin']}_" . $FILE_NAME ) ) + { + @chmod( DOC_IPS_ROOT_PATH . PUBLIC_DIRECTORY . "/style_images/{$this->requestt['skin']}_".$FILE_NAME, 0777 ); + } + else + { + $this->registry->output->global_message = $this->lang->words['el_chmod']; + $this->start(); + return; + } + + $newlogo = "{$this->settings['public_dir']}style_images/{$this->request['skin']}_" . urlencode($FILE_NAME); + } + + //----------------------------------------- + // Update the macro.. + //----------------------------------------- + + $this->skinFunctions->saveReplacementFromEdit( $this->request['replacementId'], $this->request['skin'], $newlogo, 'logo_img' ); + + //----------------------------------------- + // Rebuild cache(s) + //----------------------------------------- + + $this->skinFunctions->rebuildReplacementsCache( $this->request['skin'] ); + + $this->registry->output->global_message = sprintf( $this->lang->words['el_log'], $this->request['skin'] ); + + if( $this->skinFunctions->fetchErrorMessages() ) + { + $this->registry->output->global_message .= "
" . implode( "
", $this->skinFunctions->fetchErrorMessages() ); + } + + if( $this->skinFunctions->fetchMessages() ) + { + $this->registry->output->global_message .= "
" . implode( "
", $this->skinFunctions->fetchMessages() ); + } + + $this->splash(); + } + + /** + * Show the form to change the logo + * + * @access public + * @return void [Outputs to screen/redirects] + */ + public function splash() + { + //----------------------------------------- + // Can we upload into style_images? + //----------------------------------------- + + $warning = ! is_writable( DOC_IPS_ROOT_PATH . PUBLIC_DIRECTORY . '/style_images' ) ? true : false; + + //----------------------------------------- + // Get header logo image + //----------------------------------------- + + $replacements = $this->skinFunctions->fetchReplacements( 0 ); + $currentUrl = $replacements['logo_img']['replacement_content']; + $currentId = $replacements['logo_img']['replacement_id']; + + $this->registry->output->html .= $this->html->easyLogo( $warning, $currentUrl, $currentId ); + } + } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/templates/importexport.php b/upload/admin/applications/core/modules_admin/templates/importexport.php index 5c1ea690..d9efc77a 100644 --- a/upload/admin/applications/core/modules_admin/templates/importexport.php +++ b/upload/admin/applications/core/modules_admin/templates/importexport.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Import and export skin sets - * Last Updated: $Date: 2009-08-04 11:48:28 -0400 (Tue, 04 Aug 2009) $ + * Last Updated: $Date: 2010-09-13 17:28:12 -0400 (Mon, 13 Sep 2010) $ + * * - * @author $Author: matt $ + * @author $Author: terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Who knows... - * @version $Revision: 4973 $ + * @version $Revision: 6863 $ * */ @@ -85,7 +87,6 @@ class admin_core_templates_importexport extends ipsCommand // Load lang //----------------------------------------- - # I'm so sorry Keith. I know language abstraction sucks. You deserve a medal. $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ) ); //----------------------------------------- @@ -191,20 +192,24 @@ class admin_core_templates_importexport extends ipsCommand $importName = trim( $this->request['importName'] ); $importLocation = trim( $this->request['importLocation'] ); $setID = intval( $this->request['setID'] ); - + //----------------------------------------- // Fix up import name //----------------------------------------- + + if( ! $importName ) + { + $importName = isset( $_FILES['FILE_UPLOAD']['name'] ) && $_FILES['FILE_UPLOAD']['name'] ? $_FILES['FILE_UPLOAD']['name'] : $this->request['importLocation']; + } - $importName = ( $importName ) ? $importName : $_FILES['FILE_UPLOAD']['name']; $importName = str_ireplace( array( '.xml', '.gz', 'images-' ), '', $importName ); - + //----------------------------------------- // Attempt to get contents //----------------------------------------- $content = $this->registry->adminFunctions->importXml( $importLocation ); - + if ( $content ) { $added = $this->skinFunctions->importImagesXMLArchive( $content, $importName, $setID ); @@ -236,20 +241,61 @@ class admin_core_templates_importexport extends ipsCommand private function _importSet() { $importName = trim( $this->request['importName'] ); + $importUpgrade = intval( $this->request['importUpgrade'] ) ? TRUE : FALSE; $importLocation = trim( $this->request['importLocation'] ); $imageDir = trim( $this->request['importImgDirs'] ); + $checkVersion = trim( $this->request['noVersionCheck'] ) ? FALSE : TRUE; //----------------------------------------- // Attempt to get contents //----------------------------------------- - $content = $this->registry->adminFunctions->importXml( $importLocation ); + if ( $checkVersion ) + { + $content = $this->registry->adminFunctions->importXml( $importLocation ); + } + else + { + $_c = $this->DB->buildAndFetch( array( 'select' => 'cs_value', 'from' => 'cache_store', 'where' => 'cs_key=\'_importSkinContent_\'' ) ); + $content = $_c['cs_value']; + } if ( $content ) { - $added = $this->skinFunctions->importSetXMLArchive( $content, 0, $imageDir, $importName ); + /* Checking versions? */ + if ( $checkVersion ) + { + $this->DB->delete( 'cache_store', 'cs_key=\'_importSkinContent_\'' ); + + preg_match( "#ipbLongVersion=\"(\d+?)\"\s+?ipbHumanVersion=\"([\d\.\-\_]+?)\"#i", $content, $matches ); + + if ( $matches[1] and $matches[2] ) + { + $_version = IPSLib::fetchVersionNumber(); + + /* Long version is in format of 31001 (Major Minor X X X) we'll just check majorminor */ + $_importMajor = substr( $matches[1] , 0, 2 ); + $_currentMajor = substr( $_version['long'], 0, 2 ); + + if ( $_importMajor < $_currentMajor ) + { + /* Store it */ + $this->DB->insert( 'cache_store', array( 'cs_key' => '_importSkinContent_', 'cs_value' => $content ) ); + + /* Generate continue link */ + $link = $this->settings['base_url'] . '&noVersionCheck=1&' . http_build_query( $this->request ); + + /* Show form */ + $this->registry->output->global_error = sprintf( $this->lang->words['ie_importfail_old_version'], $matches[2], $_version['human'], $link ); + return $this->_showForm(); + } + } + } + + $added = $this->skinFunctions->importSetXMLArchive( $content, 0, $imageDir, $importName, $importUpgrade ); + $message = $added['upgrade'] ? $this->lang->words['ie_set_upgraded'] : $this->lang->words['ie_set_imported']; - $this->registry->output->global_message = sprintf( $this->lang->words['ie_set_imported'], $added['templates'], $added['replacements'], $added['css'] ); + $this->registry->output->global_message = sprintf( $message, $added['templates'], $added['replacements'], $added['css'] ); $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . 'module=templates§ion=importexport&do=overview' ); } else @@ -340,7 +386,6 @@ class admin_core_templates_importexport extends ipsCommand $apps[] = 'forums'; $apps[] = 'members'; $apps[] = 'calendar'; - $apps[] = 'chat'; $apps[] = 'portal'; } else if ( $v ) @@ -410,7 +455,7 @@ class admin_core_templates_importexport extends ipsCommand if ( $_count > 1 ) { - $name = $dir . sprintf( $this->lang->words['used_in_plus_others'], $_name['set_name'], $_count ); + $name = $dir . sprintf( $this->lang->words['used_in_plus_others'], $_name['set_name'], $_count-1 ); } else { @@ -443,12 +488,13 @@ class admin_core_templates_importexport extends ipsCommand $form['uploadField'] = $this->registry->output->formUpload(); $form['importName'] = $this->registry->output->formInput( 'importName' , $_POST['importName'] ); + $form['importUpgrade'] = $this->registry->output->formCheckbox( 'importUpgrade', $_POST['importUpgrade'] ); $form['importLocation'] = $this->registry->output->formInput( 'importLocation', $_POST['importLocation'] ); - $form['exportImgDirs'] = $this->registry->output->formDropdown( 'exportImgDirs', $_imageDirs ); + $form['exportImgDirs'] = $this->registry->output->formDropdown( 'exportImgDirs', $_imageDirs, $_POST['exportImgDirs'] ); array_unshift( $_imageDirs, array( '0', $this->lang->words['ie_none'] ) ); - $form['importImgDirs'] = $this->registry->output->formDropdown( 'importImgDirs', $_imageDirs ); + $form['importImgDirs'] = $this->registry->output->formDropdown( 'importImgDirs', $_imageDirs, $_POST['importImgDirs'] ); $form['exportSetOptions'] = $this->registry->output->formDropdown("exportSetOptions", array( 0 => array( 'current' , $this->lang->words['ie_ex_skin'] ), 1 => array( 'all' , $this->lang->words['ie_ex_skin_p'] ) ) ); @@ -510,7 +556,7 @@ class admin_core_templates_importexport extends ipsCommand continue; } - $_selected = ( $skinID != NULL AND $skinID == $_data['set_id'] ) ? 'selected="selected"' : ''; + $_selected = ( $skinID != NULL AND $skinID == $data['set_id'] ) ? 'selected="selected"' : ''; /* Ok to add... */ $output .= "\n"; diff --git a/upload/admin/applications/core/modules_admin/templates/index.html b/upload/admin/applications/core/modules_admin/templates/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/templates/index.html +++ b/upload/admin/applications/core/modules_admin/templates/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/templates/replacements.php b/upload/admin/applications/core/modules_admin/templates/replacements.php index 753ceb3d..6d581328 100644 --- a/upload/admin/applications/core/modules_admin/templates/replacements.php +++ b/upload/admin/applications/core/modules_admin/templates/replacements.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Macros/replacements - * Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Who knows... - * @version $Revision: 3887 $ + * @version $Revision: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/templates/searchandreplace.php b/upload/admin/applications/core/modules_admin/templates/searchandreplace.php index 084bc40b..572c4c57 100644 --- a/upload/admin/applications/core/modules_admin/templates/searchandreplace.php +++ b/upload/admin/applications/core/modules_admin/templates/searchandreplace.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Skin search and replace tool - * Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Who knows... - * @version $Revision: 3887 $ + * @version $Revision: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/templates/skindiff.php b/upload/admin/applications/core/modules_admin/templates/skindiff.php index 18c8d52d..6a4059a3 100644 --- a/upload/admin/applications/core/modules_admin/templates/skindiff.php +++ b/upload/admin/applications/core/modules_admin/templates/skindiff.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Skin diff report tools - * Last Updated: $Date: 2009-08-07 02:24:38 -0400 (Fri, 07 Aug 2009) $ + * Last Updated: $Date: 2010-07-22 04:20:07 -0400 (Thu, 22 Jul 2010) $ + * * * @author $Author: matt $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Who knows... - * @version $Revision: 4997 $ + * @version $Revision: 6694 $ * */ @@ -125,12 +127,12 @@ class admin_core_templates_skindiff extends ipsCommand case 'skin_diff_view_diff': $this->skin_differences_view_diff(); break; - case 'skin_diff_from_skin': - $this->skin_differences_start_from_skin(); - break; case 'removeReport': $this->_removeReport(); break; + case 'multiManage': + $this->_multiManage(); + break; default: $this->_list(); break; @@ -140,7 +142,52 @@ class admin_core_templates_skindiff extends ipsCommand $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); $this->registry->output->sendOutput(); } - + + /** + * Action a report drop down + * + * @access private + * @return void + */ + private function _multiManage() + { + $merge_id = $this->request['sessionID'] = intval( $this->request['merge_id'] ); + $mergeOption = trim( $this->request['mergeOption'] ); + $items = is_array( $_POST['changeIds'] ) ? IPSLib::cleanIntArray( array_keys( $_POST['changeIds'] ) ) : array(); + + /* Fetch session and check */ + $session = $this->skinFunctions->fetchSession( $merge_id ); + + if ( $session === FALSE ) + { + $this->registry->output->showError( $this->lang->words['sd_nosession'] ); + } + + /* Got items? */ + if ( count( $items ) ) + { + /* Process. I love pointless comments */ + switch( $mergeOption ) + { + case 'resolve_custom': + $this->skinFunctions->resolveConflict( $items, 'custom' ); + break; + case 'resolve_new': + $this->skinFunctions->resolveConflict( $items, 'new' ); + break; + case 'commit': + $this->skinFunctions->commit( $items ); + break; + case 'revert': + $this->skinFunctions->revert( $items ); + break; + } + } + + /* Throw it out */ + $this->registry->output->global_message = $this->lang->words['skindiff_okmsg']; + return $this->_viewReport(); + } /** * Remove a report @@ -214,7 +261,7 @@ class admin_core_templates_skindiff extends ipsCommand $content = $this->html->skindiff_export( $session, $data['data'], $data['counts']['missing'], $data['counts']['changed'] ); - $this->registry->output->showDownload( $content, 'IPBDiff-' . IPSText::makeSeoTitle( $session['diff_session_title'] ) . '.html', "unknown/unknown", 0 ); + $this->registry->output->showDownload( $content, 'diff-' . IPSText::makeSeoTitle( $this->skinFunctions->fetchReportTitle( $session ) ) . '.html', "unknown/unknown", 0 ); } /** @@ -239,7 +286,7 @@ class admin_core_templates_skindiff extends ipsCommand // Get current session //----------------------------------------- - $session = $this->skinFunctions->fetchSession( $sessionID ); + $session = $this->skinFunctions->fetchSession( $sessionID, true ); if ( $session === FALSE ) { @@ -252,6 +299,9 @@ class admin_core_templates_skindiff extends ipsCommand $data = $this->skinFunctions->fetchReport( $sessionID ); + $this->registry->output->extra_nav[] = array( $this->settings['base_url'].'module=templates&section=skindiff&do=overview', $this->lang->words['sk_skindiffreports'] ); + $this->registry->output->extra_nav[] = array( $this->settings['base_url'].'module=templates&section=skindiff&do=viewReport&sessionID=' . $session['merge_id'], $this->skinFunctions->fetchReportTitle( $session ) ); + $this->registry->output->html = $this->html->skindiff_reportOverview( $session, $data['data'], $data['counts']['missing'], $data['counts']['changed'] ); } @@ -262,20 +312,20 @@ class admin_core_templates_skindiff extends ipsCommand * @access public * @return void */ - public function skin_differences_start_from_skin() + public function _start() { //----------------------------------------- // Init //----------------------------------------- $content = ""; - $skin_id = intval( $this->request['skin_id'] ); + $setID = intval( $this->request['setID'] ); //----------------------------------------- // Check... //----------------------------------------- - if ( ! $skin_id ) + if ( ! $setID ) { $this->registry->output->showError( $this->lang->words['sd_noid'] ); } @@ -284,173 +334,32 @@ class admin_core_templates_skindiff extends ipsCommand // Get skin set... //----------------------------------------- - $skin_set = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_collections', 'where' => 'set_id='.$skin_id ) ); + $skin_set = $this->skinFunctions->fetchSkinData( $setID ); if ( ! $skin_set['set_id'] ) { $this->registry->output->showError( $this->lang->words['sd_noid'] ); } - //----------------------------------------- - // Get number template bits - //----------------------------------------- - - $total_bits = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count', 'from' => 'skin_templates', 'where' => 'set_id=1' ) ); - - //----------------------------------------- - // Create session - //----------------------------------------- - - $this->DB->insert( 'template_diff_session', array( 'diff_session_togo' => intval( $total_bits['count'] ), - 'diff_session_done' => 0, - 'diff_session_title' => $this->lang->words['sd_title'].$skin_set['set_name'], - 'diff_session_updated' => time(), - 'diff_session_ignore_missing' => 1 ) ); - - $diff_session_id = $this->DB->getInsertId(); - - $seen_templates = array(); - - //----------------------------------------- - // Grab template bits from DB - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'skin_templates', 'where' => 'set_id='.$skin_id ) ); - $outer = $this->DB->execute(); - - while( $entry = $this->DB->fetch( $outer ) ) + /* Create session */ + try { - $check = $this->DB->buildAndFetch( array( 'select' => 'diff_key', 'from' => 'templates_diff_import', 'where' => "diff_key='".$diff_session_id.':'.$entry[ 'group_name' ].':'.$entry[ 'func_name' ]."'" ) ); - - if( $this->DB->getTotalRows() == 0 ) - { - $this->DB->insert( 'templates_diff_import', array( 'diff_key' => $diff_session_id.':'.$entry[ 'group_name' ].':'.$entry[ 'func_name' ], - 'diff_func_group' => $entry[ 'group_name' ], - 'diff_func_data' => $entry[ 'func_data' ], - 'diff_func_name' => $entry[ 'func_name' ], - 'diff_func_content' => $entry[ 'section_content' ], - 'diff_session_id' => $diff_session_id ) ); - $seen_templates[ $entry[ 'group_name' ].':'.$entry[ 'func_name' ] ] = $entry['updated']; - } - else - { - if( $seen_templates[ $entry[ 'group_name' ].':'.$entry[ 'func_name' ] ] < $entry['updated'] ) - { - $this->DB->update( 'templates_diff_import', array( 'diff_func_group' => $entry[ 'group_name' ], - 'diff_func_data' => $entry[ 'func_data' ], - 'diff_func_name' => $entry[ 'func_name' ], - 'diff_func_content' => $entry[ 'section_content' ], - 'diff_session_id' => $diff_session_id ), "diff_key='" . $diff_session_id.':'.$entry[ 'group_name' ].':'.$entry[ 'func_name' ] . "'" ); - } - } + $sessionId = $this->skinFunctions->createSession( $setID ); + } + catch( Exception $e ) + { + $this->registry->output->showError( $this->lang->words['sd_exception'] ); } - $this->registry->output->redirectinit( $this->settings['base_url'].'&'.$this->form_code_js."&do=skin_diff_process&diff_session_id={$diff_session_id}&pergo=10&secure_key=" . $this->member->form_hash ); + /* Get count */ + $session = $this->skinFunctions->fetchSession( $sessionId ); + + $items = intval( $session['merge_templates_togo'] ) + intval( $session['merge_css_togo'] ); + + $this->registry->output->html = $this->html->skindiff_ajaxScreen( $sessionId, $items, $this->_bitsPerRound ); } - /** - * Initiate a skin diff session - * - * @access private - * @return void - */ - private function _start() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $content = ""; - $seen = array(); - $diff_session_title = $this->request['diff_session_title']; - $ignoreMissing = ( $this->request['diff_session_ignore_missing'] ) ? TRUE : FALSE; - $diffFolder = trim( $this->request['diffFolder'] ); - - //----------------------------------------- - // Check... - //----------------------------------------- - - if ( ! $diff_session_title ) - { - $this->registry->output->global_error = $this->lang->words['sd_entertitle']; - return $this->_list(); - } - - if ( $diffFolder ) - { - $files = array(); - $content = ''; - - /* Did we specify a folder? */ - if ( ! is_dir( DOC_IPS_ROOT_PATH . $diffFolder ) ) - { - $this->registry->output->global_error = sprintf( $this->lang->words['diff_folder_error'], DOC_IPS_ROOT_PATH . $diffFolder ); - return $this->_list(); - } - - try - { - foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . $diffFolder ) as $file ) - { - if ( ! $file->isDot() AND ! $file->isDir() ) - { - $_name = $file->getFileName(); - - if ( substr( $_name, -4 ) == '.xml' ) - { - $files[ $_name ] = @file_get_contents( DOC_IPS_ROOT_PATH . $diffFolder . '/' . $_name ); - } - } - } - } catch ( Exception $e ) {} - - if ( count( $files ) ) - { - foreach( $files as $name => $xml ) - { - if ( ! $content ) - { - $content = $xml; - } - else - { - preg_match( "#]+?)?>.*#is", $xml, $match ); - - if ( $match[0] ) - { - $content = str_replace( '', $match[0] . "\n", $content ); - } - } - } - } - } - else - { - /* fetch the upload then */ - $content = $this->registry->adminFunctions->importXml(); - } - - if ( ! $content ) - { - $this->registry->output->global_error = $this->lang->words['sd_nocontent']; - return $this->_list(); - } - //----------------------------------------- - // Create session... - //----------------------------------------- - - $diffSessionID = $this->skinFunctions->createSession( $diff_session_title, $content ); - - if ( $diffSessionID === FALSE ) - { - $this->registry->output->global_error = $this->lang->words['sd_nocontent']; - return $this->_list(); - } - - $this->registry->output->html = $this->html->skindiff_ajaxScreen( $diffSessionID, $this->skinFunctions->fetchNumberTemplateBits(), $this->_bitsPerRound ); - } - /** * List all current difference 'sets' * @@ -463,7 +372,7 @@ class admin_core_templates_skindiff extends ipsCommand // Do it //----------------------------------------- - $this->registry->output->html = $this->html->skindiff_overview( $this->skinFunctions->fetchSessions() ); + $this->registry->output->html = $this->html->skindiff_overview( $this->skinFunctions->fetchSessions(), $this->skinFunctions->getTiersFunction()->fetchAllsItemDropDown(), $this->skinFunctions->canUseMergeSystem() ); } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/templates/skinsets.php b/upload/admin/applications/core/modules_admin/templates/skinsets.php index 69ce0e94..4fa5367d 100644 --- a/upload/admin/applications/core/modules_admin/templates/skinsets.php +++ b/upload/admin/applications/core/modules_admin/templates/skinsets.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Skin set management - * Last Updated: $Date: 2009-09-24 04:15:52 -0400 (Thu, 24 Sep 2009) $ + * Last Updated: $Date: 2010-10-19 10:40:05 -0400 (Tue, 19 Oct 2010) $ + * * - * @author $Author: matt $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Who knows... - * @version $Revision: 5145 $ + * @version $Revision: 6995 $ * */ @@ -28,7 +30,6 @@ class admin_core_templates_skinsets extends ipsCommand /** * Skin Functions Class * - * @access private * @var object */ private $skinFunctions; @@ -36,7 +37,6 @@ class admin_core_templates_skinsets extends ipsCommand /** * Recursive depth guide * - * @access private * @var array */ private $_depthGuide = array(); @@ -44,7 +44,6 @@ class admin_core_templates_skinsets extends ipsCommand /** * Skin object * - * @access private * @var object Skin templates */ private $html; @@ -52,7 +51,6 @@ class admin_core_templates_skinsets extends ipsCommand /**#@+ * URL bits * - * @access public * @var string */ public $form_code = ''; @@ -62,7 +60,6 @@ class admin_core_templates_skinsets extends ipsCommand /** * Main class entry point * - * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ @@ -155,6 +152,10 @@ class admin_core_templates_skinsets extends ipsCommand $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'settemplates_manage' ); $this->_toggleHidden(); break; + case 'reorder': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'settemplates_manage' ); + $this->reorder(); + break; } /* Output */ @@ -162,10 +163,54 @@ class admin_core_templates_skinsets extends ipsCommand $this->registry->output->sendOutput(); } + /** + * AJAX Action: Reorder Skin Sets + */ + private function reorder() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' ); + $ajax = new $classToLoad(); + + //----------------------------------------- + // Checks... + //----------------------------------------- + + if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) + { + $ajax->returnString( $this->lang->words['postform_badmd5'] ); + exit(); + } + + //----------------------------------------- + // Save new position + //----------------------------------------- + + $position = 1; + + if( is_array($this->request['skin_sets']) AND count($this->request['skin_sets']) ) + { + foreach( $this->request['skin_sets'] as $this_id ) + { + $this->DB->update( 'skin_collections', array( 'set_order' => $position ), 'set_id=' . $this_id ); + + $position++; + } + } + + $this->skinFunctions->rebuildSkinSetsCache(); + + $ajax->returnString( 'OK' ); + exit(); + + } + /** * Toggle a skin set's hidden status * - * @access private * @return string HTML */ private function _toggleHidden() @@ -186,7 +231,6 @@ class admin_core_templates_skinsets extends ipsCommand /** * Make a skin set default for output engine * - * @access private * @return string HTML */ private function _makeDefault() @@ -210,7 +254,6 @@ class admin_core_templates_skinsets extends ipsCommand /** * Remove customizations from a skin set * - * @access private * @return string HTML */ private function _setRevert() @@ -238,7 +281,6 @@ class admin_core_templates_skinsets extends ipsCommand /** * Show revert splash screen * - * @access private * @return string HTML */ private function _revertSplash() @@ -257,7 +299,6 @@ class admin_core_templates_skinsets extends ipsCommand /** * Write out skin CSS in master format * - * @access private * @return string HTML */ private function _setWriteMasterCss() @@ -275,7 +316,7 @@ class admin_core_templates_skinsets extends ipsCommand } catch( Exception $error ) { - $this->registry->output->global_error = 'Error' . $error->getMessage(); + $this->registry->output->global_error = $this->lang->words['sk_error'] . $error->getMessage(); return $this->_listSets(); } @@ -286,7 +327,6 @@ class admin_core_templates_skinsets extends ipsCommand /** * Write out a skin set in master format * - * @access private * @return string HTML */ private function _setWriteMaster() @@ -304,7 +344,7 @@ class admin_core_templates_skinsets extends ipsCommand } catch( Exception $error ) { - $this->registry->output->global_error = 'Error' . $error->getMessage(); + $this->registry->output->global_error = $this->lang->words['sk_error'] . $error->getMessage(); return $this->_listSets(); } @@ -315,7 +355,6 @@ class admin_core_templates_skinsets extends ipsCommand /** * Remove Skin Set * - * @access private * @return string HTML */ private function _setRemove() @@ -347,7 +386,6 @@ class admin_core_templates_skinsets extends ipsCommand /** * Remove splash * - * @access private * @return void */ private function _setRemoveSplash() @@ -367,7 +405,6 @@ class admin_core_templates_skinsets extends ipsCommand /** * Form: Save * - * @access private * @param string Type of form to show (add/edit) * @return void */ @@ -468,6 +505,21 @@ class admin_core_templates_skinsets extends ipsCommand } } + /* test to ensure we're not re-using an existing skin set key */ + if ( $set_key ) + { + $test = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'skin_collections', + 'where' => 'set_key=\'' . $set_key . '\' AND set_id != ' . $set_id ) ); + + if ( $test['set_id'] ) + { + $this->registry->getClass('output')->global_message = $this->lang->words['ss_keynogoodyo']; + $this->_setForm( $type ); + return; + } + } + //----------------------------------------- // Build Save Array //----------------------------------------- @@ -485,6 +537,7 @@ class admin_core_templates_skinsets extends ipsCommand 'set_output_format' => $set_output_format, 'set_hide_from_list'=> ( $set_is_default ) ? 0 : $set_hide_from_list, 'set_minify' => $set_minify, + 'set_master_key' => ( isset( $skinSet['set_master_key'] ) ) ? $skinSet['set_master_key'] : ( ( $set_output_format == 'xml' ) ? 'xmlskin' : 'root' ), 'set_updated' => time() ); @@ -497,6 +550,10 @@ class admin_core_templates_skinsets extends ipsCommand /* Add elements into the array */ $save['set_added'] = time(); + /* Add position */ + $curPos = $this->skinFunctions->fetchHighestSetPosition(); + $save['set_order'] = (int)$curPos++; + $this->DB->insert( 'skin_collections', $save ); $set_id = $this->DB->getInsertId(); } @@ -513,15 +570,27 @@ class admin_core_templates_skinsets extends ipsCommand $messages = array(); $errors = array(); + + /* Caches need to be rebuilt first, so that the parent tree is setup. Bug #21008 */ + $this->skinFunctions->rebuildSkinSetsCache(); + $messages = array_merge( $messages, $this->skinFunctions->fetchMessages( TRUE ) ); + $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); + + /* Did we move this back into root? */ + if ( $set_parent_id != $skinSet['set_parent_id'] ) + { + if ( ! $set_parent_id && $set_key != 'mobile' && $skinSet['set_master_key'] != 'root' ) + { + $this->DB->update( 'skin_collections', array( 'set_master_key' => 'root' ), 'set_id = ' . $set_id ); + } + } + + /* Rebuild tree info */ + $this->skinFunctions->rebuildTreeInformation( $set_id ); + /* Flush the data */ $this->skinFunctions->flushSkinData(); - //----------------------------------------- - // Rebuild tree info - //----------------------------------------- - - $this->skinFunctions->rebuildTreeInformation( $set_id ); - //----------------------------------------- // Rebuild Caches //----------------------------------------- @@ -538,10 +607,6 @@ class admin_core_templates_skinsets extends ipsCommand $messages = array_merge( $messages, $this->skinFunctions->fetchMessages( TRUE ) ); $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); - $this->skinFunctions->rebuildSkinSetsCache(); - $messages = array_merge( $messages, $this->skinFunctions->fetchMessages( TRUE ) ); - $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); - //----------------------------------------- // Done... //----------------------------------------- @@ -554,7 +619,6 @@ class admin_core_templates_skinsets extends ipsCommand /** * Form * - * @access private * @param string Type of form to show (add/edit) * @return void */ @@ -697,7 +761,6 @@ class admin_core_templates_skinsets extends ipsCommand /** * List template sets * - * @access private * @return void */ private function _listSets() @@ -709,6 +772,8 @@ class admin_core_templates_skinsets extends ipsCommand $root_id = 'root'; $sets = array(); $cacheData = array(); + $hasData = array(); + $canMerge = $this->skinFunctions->canUseMergeSystem(); //----------------------------------------- // See if we have any cached data @@ -724,6 +789,38 @@ class admin_core_templates_skinsets extends ipsCommand $cacheData[ $row['cache_set_id'] ]['db']++; } + //----------------------------------------- + // See if we have any customized data + //----------------------------------------- + + $this->DB->build( array( 'select' => 'template_set_id', + 'from' => 'skin_templates', + 'group' => 'template_set_id' ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + if ( ! $this->skinFunctions->remapData['templates'][ $row['template_set_id'] ] ) + { + $hasData[ $row['template_set_id'] ]['templates'] = 1; + } + } + + $this->DB->build( array( 'select' => 'css_set_id', + 'from' => 'skin_css', + 'group' => 'css_set_id' ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + if ( ! $this->skinFunctions->remapData['css'][ $row['css_set_id'] ] ) + { + $hasData[ $row['css_set_id'] ]['css'] = 1; + } + } + //----------------------------------------- // Recurse through and gather data //----------------------------------------- @@ -743,7 +840,7 @@ class admin_core_templates_skinsets extends ipsCommand foreach( $sets as $setID => $setData ) { - if ( @is_dir( IPS_CACHE_PATH . 'skin_cache/cacheid_'.$setID ) ) + if ( @is_dir( IPS_CACHE_PATH . 'cache/skin_cache/cacheid_'.$setID ) ) { $cacheData[ $setID ]['php'] = 1; } @@ -753,13 +850,12 @@ class admin_core_templates_skinsets extends ipsCommand // Print it... //----------------------------------------- - $this->registry->output->html .= $this->html->skinsets_listSkinSets( $sets, $cacheData ); + $this->registry->output->html .= $this->html->skinsets_listSkinSets( $sets, $cacheData, $hasData, $canMerge ); } /** * Recursive list sets function * - * @access private * @param int Root ID to drill down from * @param array Array of skin set entries * @param int Depth gauge count @@ -784,7 +880,6 @@ class admin_core_templates_skinsets extends ipsCommand /** * Format the data * - * @access private * @param array Skin set entry * @param int Depth gauge count * @return array Modified skin set entry @@ -799,9 +894,9 @@ class admin_core_templates_skinsets extends ipsCommand $set_data['_set_added'] = gmstrftime( '%c', $set_data['set_added'] ); /* @see http://forums.invisionpower.com/tracker/issue-18012-warnings-in-acp-302/ */ - $this->skinFunctions->remapData['export'] = is_array($this->skinFunctions->remapData['export']) ? $this->skinFunctions->remapData['export'] : array(); + $this->skinFunctions->remapData['masterKeys'] = is_array($this->skinFunctions->remapData['masterKeys']) ? $this->skinFunctions->remapData['masterKeys'] : array(); - $set_data['_canRemove'] = ( ! $set_data['set_is_default'] AND ( ! in_array( $set_data['set_id'], array_values( $this->skinFunctions->remapData['export'] ) ) ) ) ? 1 : 0; + $set_data['_canRemove'] = ( ! $set_data['set_is_default'] AND ( ! in_array( $set_data['set_key'], $this->skinFunctions->remapData['masterKeys'] ) ) ) ? 1 : 0; $set_data['_setImg'] = ( $set_data['set_parent_id'] > 0 ) ? 'package.png' : 'folder_palette.png'; $set_data['_cssClass'] = ( $set_data['set_parent_id'] > 0 ) ? 'tablerow2' : 'tablerow1'; @@ -834,4 +929,4 @@ class admin_core_templates_skinsets extends ipsCommand return $set_data; } -} +} \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/templates/templates.php b/upload/admin/applications/core/modules_admin/templates/templates.php index d25abbe1..1f42a9e9 100644 --- a/upload/admin/applications/core/modules_admin/templates/templates.php +++ b/upload/admin/applications/core/modules_admin/templates/templates.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Template editing - * Last Updated: $Date: 2009-05-06 11:58:19 -0400 (Wed, 06 May 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * - * @author $Author: matt $ + * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Who knows... - * @version $Revision: 4610 $ + * @version $Revision: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/templates/tools.php b/upload/admin/applications/core/modules_admin/templates/tools.php index 85d9350c..5b43823e 100644 --- a/upload/admin/applications/core/modules_admin/templates/tools.php +++ b/upload/admin/applications/core/modules_admin/templates/tools.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Skin tools - * Last Updated: $Date: 2009-10-08 17:24:06 -0400 (Thu, 08 Oct 2009) $ + * Last Updated: $Date: 2010-10-11 20:21:22 -0400 (Mon, 11 Oct 2010) $ + * * - * @author $Author: josh $ + * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Who knows... - * @version $Revision: 5216 $ + * @version $Revision: 6962 $ * */ @@ -28,7 +30,6 @@ class admin_core_templates_tools extends ipsCommand /** * Skin Functions Class * - * @access private * @var object */ private $skinFunctions; @@ -36,7 +37,6 @@ class admin_core_templates_tools extends ipsCommand /** * Skin object * - * @access private * @var object Skin templates */ private $html; @@ -44,7 +44,6 @@ class admin_core_templates_tools extends ipsCommand /**#@+ * URL bits * - * @access public * @var string */ public $form_code = ''; @@ -54,7 +53,6 @@ class admin_core_templates_tools extends ipsCommand /** * Main executable function * - * @access public * @param object IPS Registry Object */ public function doExecute( ipsRegistry $registry ) @@ -89,7 +87,7 @@ class admin_core_templates_tools extends ipsCommand $this->skinFunctions = new skinImportExport( $registry ); $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'template_tools' ); - + switch( $this->request['do'] ) { case 'rebuildPHPTemplates': @@ -161,9 +159,8 @@ class admin_core_templates_tools extends ipsCommand /** * Cleans out CSS DB * - * @access public * @return void - */ + */ public function _toolCacheClean() { /* INIT */ @@ -189,9 +186,8 @@ class admin_core_templates_tools extends ipsCommand /** * Cleans out CSS DB * - * @access public * @return void - */ + */ public function _cssDbClean() { $affected = $this->skinFunctions->cleanDbCss(); @@ -202,9 +198,8 @@ class admin_core_templates_tools extends ipsCommand /** * Cleans out template DB * - * @access public * @return void - */ + */ public function _templateDbClean() { $affected = $this->skinFunctions->cleanDbTemplates(); @@ -215,9 +210,8 @@ class admin_core_templates_tools extends ipsCommand /** * Creates the master skin * - * @access public * @return void - */ + */ public function _createMasterSkin() { /* No dir? create */ @@ -229,20 +223,19 @@ class admin_core_templates_tools extends ipsCommand } else { - $this->registry->output->global_error = "Could not create directory: " . IPS_CACHE_PATH . 'cache/skin_cache/master_skin please create it via FTP and run the tool again'; + $this->registry->output->global_error = sprintf( $this->lang->words['cannotcreatemasterdir'], IPS_CACHE_PATH ); return $this->_splash(); } } $messages = $this->skinFunctions->writeMasterSkin( 0, 'master_skin' ); - $this->registry->output->html .= $this->html->tools_toolResults( 'master_skin Directory Creation Results', $messages ); + $this->registry->output->html .= $this->html->tools_toolResults( $this->lang->words['masterdircreatetitle'], $messages ); } /** * Rebuild everything for a release * - * @access private * @return void */ private function _rebuildForRelease() @@ -274,25 +267,25 @@ class admin_core_templates_tools extends ipsCommand foreach( $skinIDs as $id ) { $msg = $this->skinFunctions->rebuildMasterCSS( $id ); - $messages[] = "CSS Rebuilt for $id"; + $messages[] = "" . sprintf( $this->lang->words['cssrebuilt_for'], $id ) . ""; $messages = array_merge( $messages, $msg, $this->skinFunctions->fetchMessages( TRUE ) ); $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); $msg = $this->skinFunctions->rebuildMasterFromPHP( $id ); - $messages[] = "HTML Rebuilt for $id"; + $messages[] = "" . sprintf( $this->lang->words['htmlrebuilt_for'], $id ) . ""; $messages = array_merge( $messages, $msg, $this->skinFunctions->fetchMessages( TRUE ) ); $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); + + $msg = $this->skinFunctions->rebuildMasterReplacements( $id ); + $messages[] = "Replacements Rebuilt for $id"; + $messages = array_merge( $messages, (array)$msg, $this->skinFunctions->fetchMessages( TRUE ) ); + $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); } - $this->skinFunctions->rebuildMasterReplacements(); - $messages[] = "Replacements Rebuilt"; - $messages = array_merge( $messages, $this->skinFunctions->fetchMessages( TRUE ) ); - $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); - /* Got any errors? */ if ( count( $errors ) ) { - $this->registry->output->html .= $this->html->tools_toolResults( $this->lang->words['to_resultrebuild'] . ' ABORTED', $messages, $errors ); + $this->registry->output->html .= $this->html->tools_toolResults( $this->lang->words['to_resultrebuild'] . $this->lang->words['aborted_suffix'], $messages, $errors ); return; } @@ -312,51 +305,54 @@ class admin_core_templates_tools extends ipsCommand if ( $id > 0 ) { $this->skinFunctions->rebuildPHPTemplates( $id ); - $messages[] = "PHP Templates Recached for $key"; + $messages[] = "" . sprintf( $this->lang->words['templatesrecached_for'], $key ) . ""; $messages = array_merge( $messages, $this->skinFunctions->fetchMessages( TRUE ) ); $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); $this->skinFunctions->rebuildCSS( $id ); - $messages[] = "CSS Recached for $key"; + $messages[] = "" . sprintf( $this->lang->words['cssrecached_for'], $key ) . ""; + $messages = array_merge( $messages, $this->skinFunctions->fetchMessages( TRUE ) ); + $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); + + $this->skinFunctions->rebuildReplacementsCache( $id ); + $messages[] = "{$this->lang->words['to_replacerecached']} $key"; $messages = array_merge( $messages, $this->skinFunctions->fetchMessages( TRUE ) ); $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); } - $this->skinFunctions->rebuildReplacementsCache( $id ); - $messages[] = "{$this->lang->words['to_replacerecached']} $key"; - $messages = array_merge( $messages, $this->skinFunctions->fetchMessages( TRUE ) ); - $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); - /* Build and write XML files for replacements and CSS */ - $replacementsXML = $this->skinFunctions->generateReplacementsXML( $id, $_thisOnly ); + $replacementsXML = $this->skinFunctions->generateReplacementsXML( $id, FALSE ); @unlink( DOC_IPS_ROOT_PATH . PUBLIC_DIRECTORY . '/resources/skins/replacements_' . $key . '.xml', $replacementsXML ); - if ( ! @file_put_contents( DOC_IPS_ROOT_PATH . PUBLIC_DIRECTORY . '/resources/skins/replacements_' . $key . '.xml', $replacementsXML ) ) + if ( $replacementsXML ) { - $errors[] = "{$this->lang->words['to_couldnotwrite']}: " . DOC_IPS_ROOT_PATH . PUBLIC_DIRECTORY . '/resources/skins/replacements_' . $key . '.xml'; - } - else - { - $messages[] = "{$this->lang->words['to_wrote']} " . DOC_IPS_ROOT_PATH . PUBLIC_DIRECTORY . '/resources/skins/replacements_' . $key . '.xml'; + if ( ! @file_put_contents( DOC_IPS_ROOT_PATH . PUBLIC_DIRECTORY . '/resources/skins/replacements_' . $key . '.xml', $replacementsXML ) ) + { + $errors[] = "{$this->lang->words['to_couldnotwrite']}: " . DOC_IPS_ROOT_PATH . PUBLIC_DIRECTORY . '/resources/skins/replacements_' . $key . '.xml'; + } + else + { + $messages[] = "{$this->lang->words['to_wrote']} " . DOC_IPS_ROOT_PATH . PUBLIC_DIRECTORY . '/resources/skins/replacements_' . $key . '.xml'; + } } /* Export all CSS - Function loops through all skin sets */ $this->skinFunctions->exportAllAppCSS( $id ); - $messages[] = "App CSS Written For $key"; + $messages[] = "" . sprintf( $this->lang->words['appcssrecachedfor'], $key ) . ""; $messages = array_merge( $messages, $this->skinFunctions->fetchMessages( TRUE ) ); $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); /* Export all CSS - Function loops through all skin sets */ $this->skinFunctions->exportAllAppTemplates( $id ); - $messages[] = "App XML Written For $key"; + $messages[] = "" . sprintf( $this->lang->words['appxmlrecachedfor'], $key ) . ""; $messages = array_merge( $messages, $this->skinFunctions->fetchMessages( TRUE ) ); $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); /* Got any errors? */ if ( count( $errors ) ) { - $this->registry->output->html .= $this->html->tools_toolResults( $this->lang->words['to_resultrebuild'] . ' ABORTED', array(), $errors ); + $this->registry->output->html .= $this->html->tools_toolResults( $this->lang->words['to_resultrebuild'] . $this->lang->words['aborted_suffix'], array(), $errors ); return; } } @@ -387,7 +383,6 @@ class admin_core_templates_tools extends ipsCommand /** * Rebuilds master CSS * - * @access private * @param int [Set ID to import, default is all] * @return string HTML */ @@ -410,7 +405,7 @@ class admin_core_templates_tools extends ipsCommand } $msg = $this->skinFunctions->rebuildMasterCSS( $id ); - $messages[] = "CSS Rebuilt for $id"; + $messages[] = "" . sprintf( $this->lang->words['cssrebuilt_for'], $id ) . ""; $messages = array_merge( $messages, $msg, $this->skinFunctions->fetchMessages( TRUE ) ); $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); } @@ -425,29 +420,36 @@ class admin_core_templates_tools extends ipsCommand /** * Rebuilds master replacements * - * @access private * @return string HTML */ private function _inDevMasterReplacements() { + $skinIDs = array_keys( $this->skinFunctions->remapData['templates'] ); + $messages = array(); + $errors = array(); + //----------------------------------------- - // Do it... + // Rebuild stuff //----------------------------------------- - $this->skinFunctions->rebuildMasterReplacements(); + foreach( $skinIDs as $id ) + { + $msg = $this->skinFunctions->rebuildMasterReplacements( $id ); + $messages[] = "" . sprintf( $this->lang->words['reprebuilt_for'], $id ) . ""; + $messages = array_merge( $messages, (array)$msg, $this->skinFunctions->fetchMessages( TRUE ) ); + $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); + } //----------------------------------------- // Show it... //----------------------------------------- - $this->registry->output->global_message = $this->lang->words['to_masterreplace']; - return $this->_splash(); + $this->registry->output->html .= $this->html->tools_toolResults( $this->lang->words['to_resultrebuild'], $messages, $errors ); } /** * Imports all APP templates * - * @access private * @return void */ private function _importAPPTemplates() @@ -468,7 +470,6 @@ class admin_core_templates_tools extends ipsCommand /** * Exports all APP templates * - * @access private * @return void */ private function _exportAPPTemplates() @@ -489,7 +490,6 @@ class admin_core_templates_tools extends ipsCommand /** * Exports all APP templates * - * @access private * @return void */ private function _exportAPPCSS() @@ -510,7 +510,6 @@ class admin_core_templates_tools extends ipsCommand /** * Exports Replacements to XML * - * @access private * @return void */ private function _exportReplacements() @@ -536,12 +535,12 @@ class admin_core_templates_tools extends ipsCommand $key = $setData['set_key']; $this->skinFunctions->rebuildReplacementsCache( $id ); - $messages[] = "{$this->lang->words['to_replacerecached']} $key"; + $messages[] = "{$this->lang->words['to_replacerecached']} {$key}"; $messages = array_merge( $messages, $this->skinFunctions->fetchMessages( TRUE ) ); $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); /* Build and write XML files for replacements and CSS */ - $replacementsXML = $this->skinFunctions->generateReplacementsXML( $id, $_thisOnly ); + $replacementsXML = $this->skinFunctions->generateReplacementsXML( $id, FALSE ); @unlink( DOC_IPS_ROOT_PATH . PUBLIC_DIRECTORY . '/resources/skins/replacements_' . $key . '.xml', $replacementsXML ); @@ -557,7 +556,7 @@ class admin_core_templates_tools extends ipsCommand /* Got any errors? */ if ( count( $errors ) ) { - $this->registry->output->html .= $this->html->tools_toolResults( $this->lang->words['to_resultrebuild'] . ' ABORTED', array(), $errors ); + $this->registry->output->html .= $this->html->tools_toolResults( $this->lang->words['to_resultrebuild'] . $this->lang->words['aborted_suffix'], array(), $errors ); return; } } @@ -574,7 +573,6 @@ class admin_core_templates_tools extends ipsCommand /** * Rebuild PHP Templates Cache * - * @access private * @return void */ private function _rebuildMasterSkin() @@ -587,7 +585,7 @@ class admin_core_templates_tools extends ipsCommand if( $this->skinFunctions->remapData['templates'][ $this->request['set_id'] ] ) { $msg = $this->skinFunctions->rebuildMasterFromPHP( $this->request['set_id'] ); - $messages[] = "HTML Rebuilt for {$this->request['set_id']}"; + $messages[] = "" . sprintf( $this->lang->words['htmlrebuilt_for'], $this->request['set_id'] ) . ""; $messages = array_merge( $messages, $msg, $this->skinFunctions->fetchMessages( TRUE ) ); $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); } @@ -596,7 +594,7 @@ class admin_core_templates_tools extends ipsCommand { /* This is which skins we want to export for default installations */ $skinIDs = array_values( $this->skinFunctions->remapData['export'] ); - + //----------------------------------------- // Do it... //----------------------------------------- @@ -604,7 +602,7 @@ class admin_core_templates_tools extends ipsCommand foreach( $skinIDs as $id ) { $msg = $this->skinFunctions->rebuildMasterFromPHP( $id ); - $messages[] = "HTML Rebuilt for {$id}"; + $messages[] = "" . sprintf( $this->lang->words['htmlrebuilt_for'], $id ) . ""; $messages = array_merge( $messages, $msg, $this->skinFunctions->fetchMessages( TRUE ) ); $errors = array_merge( $errors , $this->skinFunctions->fetchErrorMessages( TRUE ) ); } @@ -620,7 +618,6 @@ class admin_core_templates_tools extends ipsCommand /** * Resets skin usage * - * @access private * @return string HTML */ private function _resetSkin() @@ -641,7 +638,7 @@ class admin_core_templates_tools extends ipsCommand if ( is_array( $_POST['setID'] ) ) { - $usingIDs = implode( ",", array_keys( $_POST['setID'] ) ); + $usingIDs = implode( ",", $_POST['setID'] ); if ( $resetMembers ) { @@ -663,7 +660,6 @@ class admin_core_templates_tools extends ipsCommand /** * Rebuild Master data * - * @access private * @return string HTML */ private function _rebuildMaster() @@ -677,6 +673,7 @@ class admin_core_templates_tools extends ipsCommand $rebuildCSS = intval( $this->request['rebuildCSS'] ); $rebuildReplacements = intval( $this->request['rebuildReplacements'] ); $messages = array(); + $masterKeys = $this->skinFunctions->fetchMasterKeys(); //----------------------------------------- // Figure out app data @@ -691,7 +688,7 @@ class admin_core_templates_tools extends ipsCommand //----------------------------------------- // Do it! //----------------------------------------- - + foreach( $_POST['apps'] as $app_dir => $data ) { if ( $data ) @@ -701,7 +698,7 @@ class admin_core_templates_tools extends ipsCommand /* HTML */ if ( $rebuildHTML ) { - foreach( array( 'root', 'lofi', 'xmlskin' ) as $setKey ) + foreach( $masterKeys as $setKey ) { $return = $this->skinFunctions->importTemplateAppXML( $app_dir, $setKey ); $messages[] = $_appTitle . sprintf( $this->lang->words['to_masterhtml'], $setKey, $return['updateCount'], $return['insertCount'] ); @@ -712,14 +709,17 @@ class admin_core_templates_tools extends ipsCommand /* Replacements */ if ( $rebuildReplacements ) { - $this->skinFunctions->rebuildMasterReplacements(); - $messages[] = $this->lang->words['to_masterreplace']; + foreach( $masterKeys as $setKey ) + { + $this->skinFunctions->rebuildMasterReplacements( $setKey ); + $messages[] = $this->lang->words['to_masterreplace']; + } } /* CSS */ if ( $rebuildCSS ) { - foreach( array( 'root', 'lofi', 'xmlskin' ) as $setKey ) + foreach( $masterKeys as $setKey ) { $return = $this->skinFunctions->importCSSAppXML( $app_dir, $setKey ); $messages[] = $_appTitle . sprintf( $this->lang->words['to_mastercssrebuilt'], $setKey, $return['updateCount'], $return['insertCount'] ); @@ -733,7 +733,6 @@ class admin_core_templates_tools extends ipsCommand /** * Rebuild PHP Templates Cache * - * @access private * @return void */ private function _recache() @@ -851,7 +850,6 @@ class admin_core_templates_tools extends ipsCommand /** * Rebuild PHP Templates Cache * - * @access private * @return void */ private function _rebuildPHPTemplates() @@ -884,7 +882,6 @@ class admin_core_templates_tools extends ipsCommand /** * Shows a list of available tools * - * @access public * @return void */ public function _splash() @@ -898,7 +895,7 @@ class admin_core_templates_tools extends ipsCommand foreach( ipsRegistry::$applications as $app_dir => $data ) { $data['lastmTime'] = @filemtime( IPSLib::getAppDir( $app_dir ) . '/xml/' . $app_dir . '_root_templates.xml' ); - $data['lastmTimeFormatted'] = $this->registry->getClass( 'class_localization')->getDate( $data['lastmTime'], 'JOINED' ); + $data['lastmTimeFormatted'] = $this->registry->getClass('class_localization')->getDate( $data['lastmTime'], 'JOINED' ); $appsData[ $app_dir ] = $data; } @@ -909,7 +906,7 @@ class admin_core_templates_tools extends ipsCommand $this->registry->output->html .= $this->html->tools_splash( $this->skinFunctions->getTiersFunction()->fetchAllsItemDropDown(), $appsData, $this->skinFunctions->remapData ); - $this->registry->output->nav[] = array( "" . $this->settings['base_url'] . "{$this->form_code}", $this->lang->words['to_remplatetools'] ); + $this->registry->output->nav[] = array( $this->settings['base_url'] . $this->form_code, $this->lang->words['to_remplatetools'] ); } } diff --git a/upload/admin/applications/core/modules_admin/templates/urlmap.php b/upload/admin/applications/core/modules_admin/templates/urlmap.php index a97fe3ac..fac786dd 100644 --- a/upload/admin/applications/core/modules_admin/templates/urlmap.php +++ b/upload/admin/applications/core/modules_admin/templates/urlmap.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Skin URL mapping - * Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 2.3.x - * @version $Revision: 3887 $ + * @version $Revision: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/templates/useragents.php b/upload/admin/applications/core/modules_admin/templates/useragents.php index b00d6e34..18b3fa62 100644 --- a/upload/admin/applications/core/modules_admin/templates/useragents.php +++ b/upload/admin/applications/core/modules_admin/templates/useragents.php @@ -1,20 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Gallery Application - * Last Updated: $Date: 2009-11-11 20:48:24 -0500 (Wed, 11 Nov 2009) $ + * Last Updated: $Date: 2010-10-19 10:40:05 -0400 (Tue, 19 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Who knows... - * @version $Revision: 5376 $ - * + * @version $Revision: 6995 $ */ if ( ! defined( 'IN_ACP' ) ) @@ -28,7 +28,6 @@ class admin_core_templates_useragents extends ipsCommand /** * Skin Functions Class * - * @access private * @var object */ private $skinFunctions; @@ -36,7 +35,6 @@ class admin_core_templates_useragents extends ipsCommand /** * User agent functions * - * @access private * @var object UA functions */ private $userAgentFunctions; @@ -44,7 +42,6 @@ class admin_core_templates_useragents extends ipsCommand /** * Skin object * - * @access private * @var object Skin templates */ private $html; @@ -52,7 +49,6 @@ class admin_core_templates_useragents extends ipsCommand /**#@+ * URL bits * - * @access public * @var string */ public $form_code = ''; @@ -62,7 +58,6 @@ class admin_core_templates_useragents extends ipsCommand /** * Main class entry point * - * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ @@ -93,12 +88,10 @@ class admin_core_templates_useragents extends ipsCommand require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' ); require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' ); - $this->skinFunctions = new skinCaching( $registry ); - require_once( IPS_ROOT_PATH . 'sources/classes/useragents/userAgentFunctions.php' ); - - $this->userAgentFunctions = new userAgentFunctions( $registry ); + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/useragents/userAgentFunctions.php', 'userAgentFunctions' ); + $this->userAgentFunctions = new $classToLoad( $registry ); ///---------------------------------------- // What to do... @@ -125,7 +118,6 @@ class admin_core_templates_useragents extends ipsCommand /** * Show useragents for this skin set * - * @access private * @return string HTML */ private function _saveAgents() @@ -211,7 +203,6 @@ class admin_core_templates_useragents extends ipsCommand /** * Show useragents for this skin set * - * @access private * @return void */ private function _showUserAgentMapping() diff --git a/upload/admin/applications/core/modules_admin/templates/xml/index.html b/upload/admin/applications/core/modules_admin/templates/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/templates/xml/index.html +++ b/upload/admin/applications/core/modules_admin/templates/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/tools/api.php b/upload/admin/applications/core/modules_admin/tools/api.php index ba9dab11..3f09bfdf 100644 --- a/upload/admin/applications/core/modules_admin/tools/api.php +++ b/upload/admin/applications/core/modules_admin/tools/api.php @@ -1,590 +1,594 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_core_tools_api extends ipsCommand -{ - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /** - * Shortcut for url - * - * @access private - * @var string URL shortcut - */ - private $form_code; - - /** - * Shortcut for url (javascript) - * - * @access private - * @var string JS URL shortcut - */ - private $form_code_js; - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load skin... - //----------------------------------------- - ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_tools' ) ); - $this->html = $this->registry->output->loadTemplate('cp_skin_api'); - - //----------------------------------------- - // Set up stuff - //----------------------------------------- - - $this->form_code = $this->html->form_code = 'module=tools&section=api'; - $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=api'; - - //----------------------------------------- - // What are we to do, today? - //----------------------------------------- - - switch( $this->request['do'] ) - { - case 'api_list': - default: - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_manage' ); - $this->apiList(); - break; - case 'api_add': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_manage' ); - $this->apiForm( 'add' ); - break; - case 'api_add_save': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_manage' ); - $this->apiSave( 'add' ); - break; - case 'api_edit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_manage' ); - $this->apiForm( 'edit' ); - break; - case 'api_edit_save': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_manage' ); - $this->apiSave( 'edit' ); - break; - case 'api_remove': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_remove' ); - $this->apiRemove(); - break; - - case 'log_list': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_logs' ); - $this->logList(); - break; - case 'log_view_detail': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_logs' ); - $this->logViewDetail(); - break; - } - - //----------------------------------------- - // Pass to CP output hander - //----------------------------------------- - - $this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper(); - $this->registry->getClass('output')->sendOutput(); - } - - /** - * API Logs View - * View API Log - * - * @access private - * @return void [Outputs] - * @author Matt Mecham - * @since 2.3.2 - */ - private function logViewDetail() - { - //----------------------------------------- - // Fix up navigation bar - //----------------------------------------- - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) ); - - $this->registry->output->core_nav = array(); - $this->registry->output->ignoreCoreNav = true; - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] ); - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] ); - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=api&do=log_list', $this->lang->words['api_error_logs'] ); - - //----------------------------------------- - // INIT - //----------------------------------------- - - $api_log_id = intval( $this->request['api_log_id'] ); - - //----------------------------------------- - // Get data from the deebee - //----------------------------------------- - - $log = $this->DB->buildAndFetch( array( 'select' => '*', - 'from' => 'api_log', - 'where' => 'api_log_id='.$api_log_id ) ); - - if ( ! $log['api_log_id'] ) - { - $this->registry->output->global_message = $this->lang->words['a_lognoid']; - $this->logList(); - return; - } - - //----------------------------------------- - // Display... - //----------------------------------------- - - $log['_api_log_date'] = ipsRegistry::getClass( 'class_localization')->getDate( $log['api_log_date'], 'LONG' ); - $log['_api_log_allowed'] = $log['api_log_allowed'] ? 'aff_tick.png' : 'aff_cross.png'; - $log['_api_log_query'] = htmlspecialchars( $log['api_log_query'] ); - - //----------------------------------------- - // Show... - //----------------------------------------- - - $this->registry->output->html .= $this->html->api_log_detail( $log ); - - $this->registry->output->printPopupWindow(); - } - - - /** - * API Logs List - * List API Logs - * - * @access private - * @return void [Outputs] - * @author Matt Mecham - * @since 2.3.2 - */ - private function logList() - { - //----------------------------------------- - // Fix up navigation bar - //----------------------------------------- - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) ); - - $this->registry->output->core_nav = array(); - $this->registry->output->ignoreCoreNav = true; - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] ); - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] ); - $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=api&do=log_list', $this->lang->words['api_error_logs'] ); - - //----------------------------------------- - // INIT - //----------------------------------------- - - $start = intval( $this->request['st'] ); - $perpage = 50; - $logs = array(); - - //----------------------------------------- - // Get log count - //----------------------------------------- - - $count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', - 'from' => 'api_log' ) ); - - $links = $this->registry->output->generatePagination( array( 'totalItems' => intval( $count['count'] ), - 'itemsPerPage' => $perpage, - 'currentStartValue' => $start, - 'baseUrl' => $this->settings['base_url'].'&'.$this->form_code ) ); - - //----------------------------------------- - // Get from DB - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'api_log', 'order' => 'api_log_date DESC', 'limit' => array( $start, $perpage ) ) ); - - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - $row['_api_log_date'] = ipsRegistry::getClass('class_localization')->getDate( $row['api_log_date'], 'LONG' ); - $row['_api_log_allowed'] = $row['api_log_allowed'] ? 'aff_tick.png' : 'aff_cross.png'; - - $logs[] = $row; - } - - //----------------------------------------- - // Print... - //----------------------------------------- - - $this->registry->output->html .= $this->html->api_login_view( $logs, $links ); - } - - /** - * API User Remove - * Removes an API User - * - * @access private - * @return void [Outputs] - * @author Matt Mecham - * @since 2.3.2 - */ - private function apiRemove() - { - $api_user_id = $this->request['api_user_id'] ? intval($this->request['api_user_id']) : 0; - - if( !$api_user_id ) - { - $this->registry->output->global_message = $this->lang->words['a_whatuser']; - $this->apiList(); - return; - } - - $api_user = $this->DB->buildAndFetch( array( 'select' => '*', - 'from' => 'api_users', - 'where' => 'api_user_id='.$api_user_id ) ); - - if ( ! $api_user['api_user_id'] ) - { - $this->registry->output->global_message = $this->lang->words['a_user404']; - $this->apiList(); - return; - } - - $this->DB->delete( 'api_users', 'api_user_id='.$api_user_id ); - - $this->registry->output->global_message = $this->lang->words['a_removed']; - $this->apiList(); - } - - /** - * API Save - * Save API user - * - * @access private - * @param string Type - * @return void [Outputs] - * @author Matt Mecham - * @since 2.3.2 - */ - private function apiSave( $type='add' ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $api_user_id = $this->request['api_user_id'] ? intval($this->request['api_user_id']) : 0; - $api_user_key = $this->request['api_user_key']; - $api_user_name = $this->request['api_user_name']; - $api_user_ip = $this->request['api_user_ip']; - $permissions = array(); - - //----------------------------------------- - // Check (please?) - //----------------------------------------- - - if ( ! $api_user_name ) - { - $this->registry->output->global_message = $this->lang->words['a_entertitle']; - $this->apiForm( $type ); - return; - } - - //----------------------------------------- - // More checking... - //----------------------------------------- - - if ( $type == 'add' ) - { - if ( ! $api_user_key ) - { - $this->registry->output->global_message = $this->lang->words['a_noapikey']; - $this->apiForm( $type ); - return; - } - } - else - { - $api_user = $this->DB->buildAndFetch( array( 'select' => '*', - 'from' => 'api_users', - 'where' => 'api_user_id='.$api_user_id ) ); - - if ( ! $api_user['api_user_id'] ) - { - $this->registry->output->global_message = $this->lang->words['a_user404']; - $this->apiList(); - return; - } - } - - //----------------------------------------- - // Save basics - //----------------------------------------- - - $save = array( 'api_user_name' => $api_user_name, - 'api_user_ip' => $api_user_ip ); - - //----------------------------------------- - // Sort out permissions... - //----------------------------------------- - - foreach( $this->request as $key => $value ) - { - if ( preg_match( "#^_perm_([^_]+?)_(.*)$#", $key, $matches ) ) - { - $module = $matches[1]; - $function = $matches[2]; - - if ( $value ) - { - $permissions[ $module ][ $function ] = 1; - } - } - } - - //----------------------------------------- - // Add in perms - //----------------------------------------- - - $save['api_user_perms'] = serialize( $permissions ); - - //----------------------------------------- - // Save... - //----------------------------------------- - - if ( $type == 'add' ) - { - //----------------------------------------- - // Add in key.. - //----------------------------------------- - - $save['api_user_key'] = $api_user_key; - - //----------------------------------------- - // Save it... - //----------------------------------------- - - $this->registry->output->global_message = $this->lang->words['a_added']; - - $this->DB->insert( 'api_users', $save ); - } - else - { - $this->registry->output->global_message = $this->lang->words['a_edited']; - - $this->DB->update( 'api_users', $save, 'api_user_id=' . $api_user_id ); - } - - $this->apiList(); - } - - /** - * API Form - * Shows the add/edit form - * - * @access private - * @param string Type - * @return void [Outputs] - * @author Matt Mecham - * @since 2.3.2 - */ - private function apiForm( $type='add' ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $api_user_id = $this->request['api_user_id'] ? intval($this->request['api_user_id']) : 0; - $form = array(); - $permissions = array(); - - //----------------------------------------- - // Check (please?) - //----------------------------------------- - - if ( $type == 'add' ) - { - $formcode = 'api_add_save'; - $title = $this->lang->words['a_createnew']; - $button = $this->lang->words['a_createnew']; - $api_user = array(); - $api_perms = array(); - } - else - { - $api_user = $this->DB->buildAndFetch( array( 'select' => '*', - 'from' => 'api_users', - 'where' => 'api_user_id='.$api_user_id ) ); - - if ( ! $api_user['api_user_id'] ) - { - $this->registry->output->global_message = $this->lang->words['a_user404']; - $this->apiList(); - return; - } - - $formcode = 'api_edit_save'; - $title = $this->lang->words['a_edituser'].$api_user['api_user_name']; - $button = $this->lang->words['a_savechanges']; - - $api_perms = unserialize( $api_user['api_user_perms'] ); - } - - //----------------------------------------- - // Form - //----------------------------------------- - - $form['api_user_name'] = $this->registry->output->formInput( 'api_user_name', ( isset($_POST['api_user_name']) AND $_POST['api_user_name'] ) ? stripslashes($_POST['api_user_name']) : $api_user['api_user_name'] ); - $form['api_user_ip'] = $this->registry->output->formInput( 'api_user_ip', ( isset($_POST['api_user_ip']) AND $_POST['api_user_ip'] ) ? stripslashes($_POST['api_user_ip']) : $api_user['api_user_ip'] ); - - //----------------------------------------- - // Get all modules and stuff and other things - //----------------------------------------- - - $path = DOC_IPS_ROOT_PATH . 'interface/board/modules'; - - if ( is_dir( $path ) ) - { - $handle = opendir( $path ); - - while ( ( $file = readdir($handle) ) !== FALSE ) - { - if ( is_dir( $path . '/' . $file ) ) - { - if ( file_exists( $path . '/' . $file . '/config.php' ) ) - { - $_name = $file; - - require_once( $path . "/" . $file . '/config.php' ); - - if ( $CONFIG['api_module_title'] ) - { - $permissions[ $_name ] = array( 'key' => $api_module_title, - 'title' => $CONFIG['api_module_title'], - 'desc' => $CONFIG['api_module_desc'], - 'path' => $path . "/" . $file, - 'perms' => array() ); - - //----------------------------------------- - // Get all available methods - //----------------------------------------- - - if ( file_exists( $path . '/' . $file . '/methods.php' ) ) - { - require_once( $path . '/' . $file . '/methods.php' ); - - $permissions[ $_name ]['perms'] = array_keys( $ALLOWED_METHODS ); - } - - //----------------------------------------- - // Sort out form field - //----------------------------------------- - - if ( is_array( $permissions[ $_name ]['perms'] ) ) - { - foreach( $permissions[ $_name ]['perms'] as $perm ) - { - $_checked = intval( $api_perms[ $_name ][ $perm ] ); - $permissions[ $_name ]['form_perms'][ $perm ] = array( 'title' => $perm, - 'form' => $this->registry->output->formCheckbox( '_perm_' . $_name . '_' . $perm, $_checked ) ); - } - } - } - - $CONFIG = array(); - $ALLOWED_METHODS = array(); - } - } - } - - closedir( $handle ); - } - - //----------------------------------------- - // Auto-generate API key - //----------------------------------------- - - if ( $type == 'add' ) - { - $form['_api_user_key'] = md5( mt_rand() . $this->memberData['member_login_key'] . uniqid( mt_rand(), true ) ); - } - - $this->registry->output->html .= $this->registry->output->global_template->information_box( $this->lang->words['a_title'], $this->lang->words['a_msg2'] ) . "
"; - $this->registry->output->html .= $this->html->api_form( $form, $title, $formcode, $button, $api_user, $type, $permissions ); - - } - - /** - * API LIST - * List all currently stored API users - * - * @access private - * @return void [Outputs] - * @author Matt Mecham - * @since 2.3.2 - */ - private function apiList() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $users = array(); - - //----------------------------------------- - // Get users from the DB - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'api_users', 'order' => 'api_user_id' ) ); - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - $users[] = $row; - } - - //----------------------------------------- - // XML RPC Enabled? - //----------------------------------------- - - if ( ! $this->settings['xmlrpc_enable'] ) - { - $this->registry->output->html .= $this->registry->output->global_template->warning_box( $this->lang->words['a_disabled'], sprintf( $this->lang->words['a_msg3'], $this->settings['base_url'] ) ) . "
"; - } - - //----------------------------------------- - // Dun... - //----------------------------------------- - - $this->registry->output->html .= $this->html->api_list( $users ); - } -} + + * Invision Power Services + * IP.Board v3.1.4 + * API Users + * Last Updated: $Date: 2010-10-11 20:21:22 -0400 (Mon, 11 Oct 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 1st march 2002 + * @version $Revision: 6962 $ + * + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_tools_api extends ipsCommand +{ + /** + * Skin object + * + * @access private + * @var object Skin templates + */ + private $html; + + /** + * Shortcut for url + * + * @access private + * @var string URL shortcut + */ + private $form_code; + + /** + * Shortcut for url (javascript) + * + * @access private + * @var string JS URL shortcut + */ + private $form_code_js; + + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load skin... + //----------------------------------------- + ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_tools' ) ); + $this->html = $this->registry->output->loadTemplate('cp_skin_api'); + + //----------------------------------------- + // Set up stuff + //----------------------------------------- + + $this->form_code = $this->html->form_code = 'module=tools&section=api'; + $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=api'; + + //----------------------------------------- + // What are we to do, today? + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'api_list': + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_manage' ); + $this->apiList(); + break; + case 'api_add': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_manage' ); + $this->apiForm( 'add' ); + break; + case 'api_add_save': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_manage' ); + $this->apiSave( 'add' ); + break; + case 'api_edit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_manage' ); + $this->apiForm( 'edit' ); + break; + case 'api_edit_save': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_manage' ); + $this->apiSave( 'edit' ); + break; + case 'api_remove': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_remove' ); + $this->apiRemove(); + break; + + case 'log_list': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_logs' ); + $this->logList(); + break; + case 'log_view_detail': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_logs' ); + $this->logViewDetail(); + break; + } + + //----------------------------------------- + // Pass to CP output hander + //----------------------------------------- + + $this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper(); + $this->registry->getClass('output')->sendOutput(); + } + + /** + * API Logs View + * View API Log + * + * @access private + * @return void [Outputs] + * @author Matt Mecham + * @since 2.3.2 + */ + private function logViewDetail() + { + //----------------------------------------- + // Fix up navigation bar + //----------------------------------------- + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) ); + + $this->registry->output->core_nav = array(); + $this->registry->output->ignoreCoreNav = true; + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] ); + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] ); + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=api&do=log_list', $this->lang->words['api_error_logs'] ); + + //----------------------------------------- + // INIT + //----------------------------------------- + + $api_log_id = intval( $this->request['api_log_id'] ); + + //----------------------------------------- + // Get data from the deebee + //----------------------------------------- + + $log = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'api_log', + 'where' => 'api_log_id='.$api_log_id ) ); + + if ( ! $log['api_log_id'] ) + { + $this->registry->output->global_message = $this->lang->words['a_lognoid']; + $this->logList(); + return; + } + + //----------------------------------------- + // Display... + //----------------------------------------- + + $log['_api_log_date'] = ipsRegistry::getClass( 'class_localization')->getDate( $log['api_log_date'], 'LONG' ); + $log['_api_log_allowed'] = $log['api_log_allowed'] ? 'tick.png' : 'cross.png'; + $log['_api_log_query'] = htmlspecialchars( $log['api_log_query'] ); + + //----------------------------------------- + // Show... + //----------------------------------------- + + $this->registry->output->html .= $this->html->api_log_detail( $log ); + + $this->registry->output->printPopupWindow(); + } + + + /** + * API Logs List + * List API Logs + * + * @access private + * @return void [Outputs] + * @author Matt Mecham + * @since 2.3.2 + */ + private function logList() + { + //----------------------------------------- + // Fix up navigation bar + //----------------------------------------- + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) ); + + $this->registry->output->core_nav = array(); + $this->registry->output->ignoreCoreNav = true; + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] ); + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] ); + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=api&do=log_list', $this->lang->words['api_error_logs'] ); + + //----------------------------------------- + // INIT + //----------------------------------------- + + $start = intval( $this->request['st'] ); + $perpage = 50; + $logs = array(); + + //----------------------------------------- + // Get log count + //----------------------------------------- + + $count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', + 'from' => 'api_log' ) ); + + $links = $this->registry->output->generatePagination( array( 'totalItems' => intval( $count['count'] ), + 'itemsPerPage' => $perpage, + 'currentStartValue' => $start, + 'baseUrl' => $this->settings['base_url'].'&'.$this->form_code ) ); + + //----------------------------------------- + // Get from DB + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'api_log', 'order' => 'api_log_date DESC', 'limit' => array( $start, $perpage ) ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $row['_api_log_date'] = ipsRegistry::getClass('class_localization')->getDate( $row['api_log_date'], 'LONG' ); + $row['_api_log_allowed'] = $row['api_log_allowed'] ? 'tick.png' : 'cross.png'; + + $logs[] = $row; + } + + //----------------------------------------- + // Print... + //----------------------------------------- + + $this->registry->output->html .= $this->html->api_login_view( $logs, $links ); + } + + /** + * API User Remove + * Removes an API User + * + * @access private + * @return void [Outputs] + * @author Matt Mecham + * @since 2.3.2 + */ + private function apiRemove() + { + $api_user_id = $this->request['api_user_id'] ? intval($this->request['api_user_id']) : 0; + + if( !$api_user_id ) + { + $this->registry->output->global_message = $this->lang->words['a_whatuser']; + $this->apiList(); + return; + } + + $api_user = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'api_users', + 'where' => 'api_user_id='.$api_user_id ) ); + + if ( ! $api_user['api_user_id'] ) + { + $this->registry->output->global_message = $this->lang->words['a_user404']; + $this->apiList(); + return; + } + + $this->DB->delete( 'api_users', 'api_user_id='.$api_user_id ); + + $this->registry->output->global_message = $this->lang->words['a_removed']; + $this->apiList(); + } + + /** + * API Save + * Save API user + * + * @access private + * @param string Type + * @return void [Outputs] + * @author Matt Mecham + * @since 2.3.2 + */ + private function apiSave( $type='add' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $api_user_id = $this->request['api_user_id'] ? intval($this->request['api_user_id']) : 0; + $api_user_key = $this->request['api_user_key']; + $api_user_name = $this->request['api_user_name']; + $api_user_ip = $this->request['api_user_ip']; + $permissions = array(); + + //----------------------------------------- + // Check (please?) + //----------------------------------------- + + if ( ! $api_user_name ) + { + $this->registry->output->global_message = $this->lang->words['a_entertitle']; + $this->apiForm( $type ); + return; + } + + //----------------------------------------- + // More checking... + //----------------------------------------- + + if ( $type == 'add' ) + { + if ( ! $api_user_key ) + { + $this->registry->output->global_message = $this->lang->words['a_noapikey']; + $this->apiForm( $type ); + return; + } + } + else + { + $api_user = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'api_users', + 'where' => 'api_user_id='.$api_user_id ) ); + + if ( ! $api_user['api_user_id'] ) + { + $this->registry->output->global_message = $this->lang->words['a_user404']; + $this->apiList(); + return; + } + } + + //----------------------------------------- + // Save basics + //----------------------------------------- + + $save = array( 'api_user_name' => $api_user_name, + 'api_user_ip' => $api_user_ip ); + + //----------------------------------------- + // Sort out permissions... + //----------------------------------------- + + foreach( $this->request as $key => $value ) + { + if ( preg_match( "#^_perm_([^_]+?)_(.*)$#", $key, $matches ) ) + { + $module = $matches[1]; + $function = $matches[2]; + + if ( $value ) + { + $permissions[ $module ][ $function ] = 1; + } + } + } + + //----------------------------------------- + // Add in perms + //----------------------------------------- + + $save['api_user_perms'] = serialize( $permissions ); + + //----------------------------------------- + // Save... + //----------------------------------------- + + if ( $type == 'add' ) + { + //----------------------------------------- + // Add in key.. + //----------------------------------------- + + $save['api_user_key'] = $api_user_key; + + //----------------------------------------- + // Save it... + //----------------------------------------- + + $this->registry->output->global_message = $this->lang->words['a_added']; + + $this->DB->insert( 'api_users', $save ); + } + else + { + $this->registry->output->global_message = $this->lang->words['a_edited']; + + $this->DB->update( 'api_users', $save, 'api_user_id=' . $api_user_id ); + } + + $this->apiList(); + } + + /** + * API Form + * Shows the add/edit form + * + * @access private + * @param string Type + * @return void [Outputs] + * @author Matt Mecham + * @since 2.3.2 + */ + private function apiForm( $type='add' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $api_user_id = $this->request['api_user_id'] ? intval($this->request['api_user_id']) : 0; + $form = array(); + $permissions = array(); + + //----------------------------------------- + // Check (please?) + //----------------------------------------- + + if ( $type == 'add' ) + { + $formcode = 'api_add_save'; + $title = $this->lang->words['a_createnew']; + $button = $this->lang->words['a_createnew']; + $api_user = array(); + $api_perms = array(); + } + else + { + $api_user = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'api_users', + 'where' => 'api_user_id='.$api_user_id ) ); + + if ( ! $api_user['api_user_id'] ) + { + $this->registry->output->global_message = $this->lang->words['a_user404']; + $this->apiList(); + return; + } + + $formcode = 'api_edit_save'; + $title = $this->lang->words['a_edituser'].$api_user['api_user_name']; + $button = $this->lang->words['a_savechanges']; + + $api_perms = unserialize( $api_user['api_user_perms'] ); + } + + //----------------------------------------- + // Form + //----------------------------------------- + + $form['api_user_name'] = $this->registry->output->formInput( 'api_user_name', ( isset($_POST['api_user_name']) AND $_POST['api_user_name'] ) ? stripslashes($_POST['api_user_name']) : $api_user['api_user_name'] ); + $form['api_user_ip'] = $this->registry->output->formInput( 'api_user_ip', ( isset($_POST['api_user_ip']) AND $_POST['api_user_ip'] ) ? stripslashes($_POST['api_user_ip']) : $api_user['api_user_ip'] ); + + //----------------------------------------- + // Get all modules and stuff and other things + //----------------------------------------- + + $path = DOC_IPS_ROOT_PATH . 'interface/board/modules'; + + if ( is_dir( $path ) ) + { + $handle = opendir( $path ); + + while ( ( $file = readdir($handle) ) !== FALSE ) + { + if ( is_dir( $path . '/' . $file ) ) + { + if ( file_exists( $path . '/' . $file . '/config.php' ) ) + { + $CONFIG = array(); + $_name = $file; + + require_once( $path . "/" . $file . '/config.php' ); + + if ( $CONFIG['api_module_title'] ) + { + $permissions[ $_name ] = array( 'key' => $CONFIG['api_module_key'], + 'title' => $CONFIG['api_module_title'], + 'desc' => $CONFIG['api_module_desc'], + 'path' => $path . "/" . $file, + 'perms' => array() ); + + //----------------------------------------- + // Get all available methods + //----------------------------------------- + + if ( file_exists( $path . '/' . $file . '/methods.php' ) ) + { + $ALLOWED_METHODS = array(); + require_once( $path . '/' . $file . '/methods.php' ); + + $permissions[ $_name ]['perms'] = array_keys( $ALLOWED_METHODS ); + } + + //----------------------------------------- + // Sort out form field + //----------------------------------------- + + if ( is_array( $permissions[ $_name ]['perms'] ) ) + { + foreach( $permissions[ $_name ]['perms'] as $perm ) + { + $_checked = intval( $api_perms[ $_name ][ $perm ] ); + $permissions[ $_name ]['form_perms'][ $perm ] = array( 'title' => $perm, + 'form' => $this->registry->output->formCheckbox( '_perm_' . $_name . '_' . $perm, $_checked ) ); + } + } + } + + $CONFIG = array(); + $ALLOWED_METHODS = array(); + } + } + } + + closedir( $handle ); + } + + //----------------------------------------- + // Auto-generate API key + //----------------------------------------- + + if ( $type == 'add' ) + { + $form['_api_user_key'] = md5( mt_rand() . $this->memberData['member_login_key'] . uniqid( mt_rand(), true ) ); + } + + $this->registry->output->html .= $this->registry->output->global_template->information_box( $this->lang->words['a_title'], $this->lang->words['a_msg2'] ) . "
"; + $this->registry->output->html .= $this->html->api_form( $form, $title, $formcode, $button, $api_user, $type, $permissions ); + + } + + /** + * API LIST + * List all currently stored API users + * + * @access private + * @return void [Outputs] + * @author Matt Mecham + * @since 2.3.2 + */ + private function apiList() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $users = array(); + + //----------------------------------------- + // Get users from the DB + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'api_users', 'order' => 'api_user_id' ) ); + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $users[] = $row; + } + + //----------------------------------------- + // XML RPC Enabled? + //----------------------------------------- + + if ( ! $this->settings['xmlrpc_enable'] ) + { + $this->registry->output->html .= $this->registry->output->global_template->warning_box( $this->lang->words['a_disabled'], sprintf( $this->lang->words['a_msg3'], $this->settings['base_url'] ) ) . "
"; + } + + //----------------------------------------- + // Dun... + //----------------------------------------- + + $this->registry->output->html .= $this->html->api_list( $users ); + } +} diff --git a/upload/admin/applications/core/modules_admin/tools/cache.php b/upload/admin/applications/core/modules_admin/tools/cache.php index e5109890..c1cc082d 100644 --- a/upload/admin/applications/core/modules_admin/tools/cache.php +++ b/upload/admin/applications/core/modules_admin/tools/cache.php @@ -1,488 +1,481 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class admin_core_tools_cache extends ipsCommand -{ - /** - * HTML skin object - * - * @access protected - * @var object - */ - protected $html; - - /** - * URL for form code - * - * @access protected - * @var string - */ - protected $form_code; - - /** - * URL for form code (javascript) - * - * @access protected - * @var string - */ - protected $form_code_js; - - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load language - //----------------------------------------- - - $this->registry->class_localization->loadLanguageFile( array( 'admin_tools' ) ); - - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = $this->registry->output->loadTemplate('cp_skin_tools'); - - //----------------------------------------- - // Set some vars - //----------------------------------------- - - $this->form_code = $this->html->form_code = '&module=tools&section=cache&'; - $this->form_code_js = $this->html->form_code_js = '&module=tools§ion=cache&'; - - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'cache_manage' ); - - //----------------------------------------- - // And then? - //----------------------------------------- - - switch( $this->request['do'] ) - { - default: - case 'cache_overview': - $this->request['do'] = 'cache_overview'; - $this->cacheOverview(); - break; - - case 'cache_view': - $this->cacheView(); - break; - - case 'cache_recache': - $this->cacheRecache(); - break; - - case 'cache_update_all_process': - $this->cacheUpdateAllProcess(); - break; - - case 'contentCache': - $this->_contentCache(); - break; - } - - //----------------------------------------- - // Pass to CP output hander - //----------------------------------------- - - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * View an individual cache store contents - * - * @access private - * @return void [Outputs to screen] - */ - private function _contentCache() - { - $type = $this->request['type']; - $method = $this->request['method']; - - /* What are we doing? */ - if ( $method == 'all' ) - { - $removed = IPSContentCache::truncate( $type ); - } - else - { - $removed = IPSContentCache::prune( $type ); - } - - $this->registry->output->global_message = sprintf( $this->lang->words['cc_processed'], $removed ); - $this->cacheOverview(); - } - - /** - * View an individual cache store contents - * - * @access public - * @return void [Outputs to screen] - */ - public function cacheView() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $id = trim( $this->request['id'] ); - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $id ) - { - $this->registry->output->global_message = $this->lang->words['c_noid']; - $this->cacheOverview(); - return false; - } - - //----------------------------------------- - // Get cache... - //----------------------------------------- - - if( $this->request['cache_app'] AND !in_array( $this->request['cache_app'], array( 'core', 'global' ) ) ) - { - ipsRegistry::_loadAppCoreVariables( $this->request['cache_app'] ); - } - - $db_cache = $this->cache->getCache( $id ); - - //----------------------------------------- - // Build HTML and output... - //----------------------------------------- - - ob_start(); - - print_r( $db_cache ); - - $out = ob_get_contents(); - - ob_end_clean(); - - $this->registry->output->html = $this->html->cache_pop_up( $id, htmlspecialchars($out) ); - - $this->registry->output->printPopupWindow(); - } - - /** - * Rebuild all caches - * - * @access public - * @return void [Outputs to screen] - */ - public function cacheUpdateAllProcess() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $id = intval( $this->request['id'] ); - $cache_name = ''; - $cache_data = ''; - $count = 0; - $img = '- '; - $_caches = array(); - - //----------------------------------------- - // Get core cache list - //----------------------------------------- - - $_caches = array_merge( $_caches, $this->registry->_fetchCoreVariables( 'cache' ) ); - - //----------------------------------------- - // Get all application's cache lists - //----------------------------------------- - - foreach( ipsRegistry::$applications as $app_dir => $app_data ) - { - $_file = IPSLib::getAppDir( $app_dir ) . '/extensions/coreVariables.php'; - - if ( file_exists( $_file ) ) - { - $CACHE = array(); - require( $_file ); - - foreach( $CACHE as $k => $v ) - { - $CACHE[ $k ]['cache_app'] = $app_dir; - } - - $_caches = array_merge( $_caches, $CACHE ); - } - } - - //----------------------------------------- - // Get cache data - //----------------------------------------- - - foreach( $_caches as $_cache_name => $_cache_data ) - { - if ( $count == $id ) - { - $cache_name = $_cache_name; - $cache_data = $_cache_data; - break; - } - - $count++; - } - - //----------------------------------------- - // Do what, now? - //----------------------------------------- - - $id++; - - if ( $cache_name ) - { - $this->cache->rebuildCache( $cache_name, $cache_data['cache_app'] ? $cache_data['cache_app'] : 'global' ); - - $this->registry->output->multipleRedirectHit( $this->settings['base_url'] . '&' . $this->form_code_js . '&do=cache_update_all_process&id=' . $id, $img . $_cache_name . $this->lang->words['c_processed'] ); - } - else - { - $this->registry->output->multipleRedirectFinish(); - } - } - - /** - * Recache an individual cache - * - * @access public - * @return void [Outputs to screen] - */ - public function cacheRecache() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $id = trim( $this->request['id'] ); - $app = IPSText::alphanumericalClean( $this->request['cacheapp'] ); - - if ( $id == '__all__' ) - { - $this->registry->output->multipleRedirectInit( $this->settings['base_url'] . '&' . $this->form_code_js . '&do=cache_update_all_process&id=0' ); - return false; - } - - $this->cache->rebuildCache( $id, $app ); - - $this->registry->output->global_message = $this->lang->words['c_recachethecachegetitgotitgood']; - $this->cacheOverview(); - } - - /** - * List all of the current caches - * - * @access public - * @return void [Outputs to screen] - */ - public function cacheOverview() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $content = ""; - $db_caches = array(); - $lib_caches = array(); - $cacheContent = array(); - $total = 0; - - //----------------------------------------- - // Get stored caches - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'cache_store' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $db_caches[ $r['cs_key'] ] = $r; - } - - //----------------------------------------- - // Get core cache list - //----------------------------------------- - - foreach( $this->registry->_fetchCoreVariables( 'cache' ) as $cache_name => $cache_data ) - { - $cache_data['cache_name'] = $cache_name; - $cache_data['_cache_size'] = IPSLib::sizeFormat( IPSLib::strlenToBytes( strlen( $db_caches[ $cache_name ]['cs_value'] ) ) ); - $cache_data['_cs_init_load'] = $db_caches[ $cache_name ]['cs_init_load']; - - $total += IPSLib::strlenToBytes( strlen( $db_caches[ $cache_name ]['cs_value'] ) ); - - $lib_caches['global'][ $cache_name ] = $cache_data; - } - - //----------------------------------------- - // Get all application's cache lists - //----------------------------------------- - - foreach( ipsRegistry::$applications as $app_dir => $app_data ) - { - $_file = IPSLib::getAppDir( $app_dir ) . '/extensions/coreVariables.php'; - - if ( file_exists( $_file ) ) - { - $CACHE = array(); - require( $_file ); - - foreach( $CACHE as $cache_name => $cache_data ) - { - $cache_data['cache_name'] = $cache_name; - $cache_data['_cache_size'] = IPSLib::sizeFormat( IPSLib::strlenToBytes( strlen( $db_caches[ $cache_name ]['cs_value'] ) ) ); - $cache_data['_cs_init_load'] = $db_caches[ $cache_name ]['cs_init_load']; - - $total += IPSLib::strlenToBytes( strlen( $db_caches[ $cache_name ]['cs_value'] ) ); - - $lib_caches[ $app_dir ][ $cache_name ] = $cache_data; - } - } - } - - foreach ( $lib_caches as $app => $data ) - { - ksort( $lib_caches[ $app ] ); - } - - $total = IPSLib::sizeFormat( $total ); - - /* Content Cache Stuffs */ - if ( IPSContentCache::isEnabled() ) - { - /* Monitor? */ - if ( $this->settings['cc_monitor'] ) - { - $cache = $this->cache->getCache('ccMonitor'); - - $cacheContent['m_posts'] = sprintf( $this->lang->words['served_data'], intval( $cache['post']['raw'] ), intval( $cache['post']['cached'] ) ); - $cacheContent['m_sigs'] = sprintf( $this->lang->words['served_data'], intval( $cache['sig']['raw'] ), intval( $cache['sig']['cached'] ) ); - } - else - { - $cacheContent['m_posts'] = $cacheContent['m_sigs'] = $this->lang->words['no_monitoring_data']; - } - - /* Get all posts */ - $cacheContent['posts'] = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count', - 'from' => 'posts' ) ); - - /* Get all members */ - $cacheContent['members'] = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count', - 'from' => 'members' ) ); - - /* Get cached post count */ - $cacheContent['cachedPosts'] = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count', - 'from' => 'content_cache_posts' ) ); - - /* Get cached sig count */ - $cacheContent['cachedSigs'] = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count', - 'from' => 'content_cache_sigs' ) ); - - /* Work out percentages */ - $cacheContent['postPercent'] = ( $cacheContent['posts']['count'] AND $cacheContent['cachedPosts']['count'] ) - ? sprintf( "%.0f", ( $cacheContent['cachedPosts']['count'] / $cacheContent['posts']['count'] ) * 100 ) : 0; - - $cacheContent['sigPercent'] = ( $cacheContent['members']['count'] AND $cacheContent['cachedSigs']['count'] ) - ? sprintf( "%.0f", ( $cacheContent['cachedSigs']['count'] / $cacheContent['members']['count'] ) * 100 ) : 0; - - - } - - $this->registry->output->html .= $this->html->cache_entry_wrapper( $lib_caches, $total, $cacheContent ); - } - - /** - * Rebuild the RSS cache for output - * - * @access public - * @param string [Optional app to rebuild] - * @return array - */ - public function rebuildRssCache( $app='' ) - { - $retrieved = array( time() + 60*60 ); - - foreach( ipsRegistry::$applications as $app_dir => $app_data ) - { - if ( ( ! empty( $app ) AND $app == $app_dir ) || empty( $app ) ) - { - if ( ! IPSLib::appIsInstalled( $app_dir ) ) - { - continue; - } - - //----------------------------------------- - // Retrieve the RSS links for the header - //----------------------------------------- - - if( file_exists( IPSLib::getAppDir( $app_dir ) . '/extensions/rssOutput.php' ) ) - { - require_once( IPSLib::getAppDir( $app_dir ) . '/extensions/rssOutput.php' ); - $className = "rss_output_{$app_dir}"; - - if( class_exists( $className ) ) - { - $rss = new $className( $this->registry ); - - if( method_exists( $rss, "getRssLinks" ) ) - { - $rssData = $rss->getRssLinks(); - - if( count($rssData) ) - { - foreach( $rssData as $data ) - { - if( !$data['url'] ) - { - continue; - } - - $retrieved[] = $data['title'] . ':|:' . $data['url']; - } - } - } - } - } - } - } - - $this->cache->setCache( 'rss_output_cache', $retrieved, array( 'array' => 1 ) ); - - return $retrieved; - } - + + * Invision Power Services + * IP.Board v3.1.4 + * ACP : Cache management + * Last Updated: $Date: 2010-10-19 10:40:05 -0400 (Tue, 19 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 26th January 2004 + * @version $Revision: 6995 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class admin_core_tools_cache extends ipsCommand +{ + /** + * HTML skin object + * + * @var object + */ + protected $html; + + /** + * URL for form code + * + * @var string + */ + protected $form_code; + + /** + * URL for form code (javascript) + * + * @var string + */ + protected $form_code_js; + + /** + * Class entry point + * + * @param object Registry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load language + //----------------------------------------- + + $this->registry->class_localization->loadLanguageFile( array( 'admin_tools' ) ); + + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = $this->registry->output->loadTemplate('cp_skin_tools'); + + //----------------------------------------- + // Set some vars + //----------------------------------------- + + $this->form_code = $this->html->form_code = '&module=tools&section=cache&'; + $this->form_code_js = $this->html->form_code_js = '&module=tools§ion=cache&'; + + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'cache_manage' ); + + //----------------------------------------- + // And then? + //----------------------------------------- + + switch( $this->request['do'] ) + { + default: + case 'cache_overview': + $this->request['do'] = 'cache_overview'; + $this->cacheOverview(); + break; + + case 'cache_view': + $this->cacheView(); + break; + + case 'cache_recache': + $this->cacheRecache(); + break; + + case 'cache_update_all_process': + $this->cacheUpdateAllProcess(); + break; + + case 'contentCache': + $this->_contentCache(); + break; + } + + //----------------------------------------- + // Pass to CP output hander + //----------------------------------------- + + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * View an individual cache store contents + * + * @return void [Outputs to screen] + */ + private function _contentCache() + { + $type = $this->request['type']; + $method = $this->request['method']; + + /* What are we doing? */ + if ( $method == 'all' ) + { + $removed = IPSContentCache::truncate( $type ); + } + else + { + $removed = IPSContentCache::prune( $type ); + } + + $this->registry->output->global_message = sprintf( $this->lang->words['cc_processed'], $removed ); + $this->cacheOverview(); + } + + /** + * View an individual cache store contents + * + * @return void [Outputs to screen] + */ + public function cacheView() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $id = trim( $this->request['id'] ); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $id ) + { + $this->registry->output->global_message = $this->lang->words['c_noid']; + $this->cacheOverview(); + return false; + } + + //----------------------------------------- + // Get cache... + //----------------------------------------- + + if( $this->request['cache_app'] AND !in_array( $this->request['cache_app'], array( 'core', 'global' ) ) ) + { + ipsRegistry::_loadAppCoreVariables( $this->request['cache_app'] ); + } + + $db_cache = $this->cache->getCache( $id ); + + //----------------------------------------- + // Build HTML and output... + //----------------------------------------- + + ob_start(); + + print_r( $db_cache ); + + $out = ob_get_contents(); + + ob_end_clean(); + + $this->registry->output->html = $this->html->cache_pop_up( $id, htmlspecialchars($out) ); + + $this->registry->output->printPopupWindow(); + } + + /** + * Rebuild all caches + * + * @return void [Outputs to screen] + */ + public function cacheUpdateAllProcess() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $id = intval( $this->request['id'] ); + $cache_name = ''; + $cache_data = ''; + $count = 0; + $img = '- '; + $_caches = array(); + + //----------------------------------------- + // Get core cache list + //----------------------------------------- + + $_caches = array_merge( $_caches, $this->registry->_fetchCoreVariables( 'cache' ) ); + + //----------------------------------------- + // Get all application's cache lists + //----------------------------------------- + + foreach( ipsRegistry::$applications as $app_dir => $app_data ) + { + $_file = IPSLib::getAppDir( $app_dir ) . '/extensions/coreVariables.php'; + + if ( file_exists( $_file ) ) + { + $CACHE = array(); + require( $_file ); + + foreach( $CACHE as $k => $v ) + { + $CACHE[ $k ]['cache_app'] = $app_dir; + } + + $_caches = array_merge( $_caches, $CACHE ); + } + } + + //----------------------------------------- + // Get cache data + //----------------------------------------- + + foreach( $_caches as $_cache_name => $_cache_data ) + { + if ( $count == $id ) + { + $cache_name = $_cache_name; + $cache_data = $_cache_data; + break; + } + + $count++; + } + + //----------------------------------------- + // Do what, now? + //----------------------------------------- + + $id++; + + if ( $cache_name ) + { + $this->cache->rebuildCache( $cache_name, $cache_data['cache_app'] ? $cache_data['cache_app'] : 'global' ); + + $this->registry->output->multipleRedirectHit( $this->settings['base_url'] . '&' . $this->form_code_js . '&do=cache_update_all_process&id=' . $id, $img . $_cache_name . $this->lang->words['c_processed'] ); + } + else + { + $this->registry->output->multipleRedirectFinish(); + } + } + + /** + * Recache an individual cache + * + * @return void [Outputs to screen] + */ + public function cacheRecache() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $id = trim( $this->request['id'] ); + $app = IPSText::alphanumericalClean( $this->request['cacheapp'] ); + + if ( $id == '__all__' ) + { + $this->registry->output->multipleRedirectInit( $this->settings['base_url'] . '&' . $this->form_code_js . '&do=cache_update_all_process&id=0' ); + return false; + } + + $this->cache->rebuildCache( $id, $app ); + + $this->registry->output->global_message = $this->lang->words['c_recachethecachegetitgotitgood']; + $this->cacheOverview(); + } + + /** + * List all of the current caches + * + * @return void [Outputs to screen] + */ + public function cacheOverview() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $content = ""; + $db_caches = array(); + $lib_caches = array(); + $cacheContent = array(); + $total = 0; + + //----------------------------------------- + // Get stored caches + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'cache_store' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $db_caches[ $r['cs_key'] ] = $r; + } + + //----------------------------------------- + // Get core cache list + //----------------------------------------- + + foreach( $this->registry->_fetchCoreVariables( 'cache' ) as $cache_name => $cache_data ) + { + $cache_data['cache_name'] = $cache_name; + $cache_data['_cache_size'] = IPSLib::sizeFormat( IPSLib::strlenToBytes( strlen( $db_caches[ $cache_name ]['cs_value'] ) ) ); + $cache_data['_cs_init_load'] = $db_caches[ $cache_name ]['cs_init_load']; + + $total += IPSLib::strlenToBytes( strlen( $db_caches[ $cache_name ]['cs_value'] ) ); + + $lib_caches['global'][ $cache_name ] = $cache_data; + } + + //----------------------------------------- + // Get all application's cache lists + //----------------------------------------- + + foreach( ipsRegistry::$applications as $app_dir => $app_data ) + { + if( !IPSLib::appIsInstalled( $app_dir ) ) + { + continue; + } + + $_file = IPSLib::getAppDir( $app_dir ) . '/extensions/coreVariables.php'; + + if ( file_exists( $_file ) ) + { + $CACHE = array(); + require( $_file ); + + foreach( $CACHE as $cache_name => $cache_data ) + { + $cache_data['cache_name'] = $cache_name; + $cache_data['_cache_size'] = IPSLib::sizeFormat( IPSLib::strlenToBytes( strlen( $db_caches[ $cache_name ]['cs_value'] ) ) ); + $cache_data['_cs_init_load'] = $db_caches[ $cache_name ]['cs_init_load']; + + $total += IPSLib::strlenToBytes( strlen( $db_caches[ $cache_name ]['cs_value'] ) ); + + $lib_caches[ $app_dir ][ $cache_name ] = $cache_data; + } + } + } + + foreach ( $lib_caches as $app => $data ) + { + ksort( $lib_caches[ $app ] ); + } + + $total = IPSLib::sizeFormat( $total ); + + /* Content Cache Stuffs */ + if ( IPSContentCache::isEnabled() ) + { + /* Monitor? */ + if ( $this->settings['cc_monitor'] ) + { + $cache = $this->cache->getCache('ccMonitor'); + + $cacheContent['m_posts'] = sprintf( $this->lang->words['served_data'], intval( $cache['post']['raw'] ), intval( $cache['post']['cached'] ) ); + $cacheContent['m_sigs'] = sprintf( $this->lang->words['served_data'], intval( $cache['sig']['raw'] ), intval( $cache['sig']['cached'] ) ); + } + else + { + $cacheContent['m_posts'] = $cacheContent['m_sigs'] = $this->lang->words['no_monitoring_data']; + } + + /* Get all posts */ + $cacheContent['posts'] = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count', + 'from' => 'posts' ) ); + + /* Get all members */ + $cacheContent['members'] = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count', + 'from' => 'members' ) ); + + /* Get cached post count */ + $cacheContent['cachedPosts'] = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count', + 'from' => 'content_cache_posts' ) ); + + /* Get cached sig count */ + $cacheContent['cachedSigs'] = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count', + 'from' => 'content_cache_sigs' ) ); + + /* Work out percentages */ + $cacheContent['postPercent'] = ( $cacheContent['posts']['count'] AND $cacheContent['cachedPosts']['count'] ) + ? sprintf( "%.0f", ( $cacheContent['cachedPosts']['count'] / $cacheContent['posts']['count'] ) * 100 ) : 0; + + $cacheContent['sigPercent'] = ( $cacheContent['members']['count'] AND $cacheContent['cachedSigs']['count'] ) + ? sprintf( "%.0f", ( $cacheContent['cachedSigs']['count'] / $cacheContent['members']['count'] ) * 100 ) : 0; + + + } + + $this->registry->output->html .= $this->html->cache_entry_wrapper( $lib_caches, $total, $cacheContent ); + } + + /** + * Rebuild the RSS cache for output + * + * @param string [Optional app to rebuild] + * @return array + */ + public function rebuildRssCache( $app='' ) + { + $retrieved = array( time() + 60*60 ); + + foreach( ipsRegistry::$applications as $app_dir => $app_data ) + { + if ( ( ! empty( $app ) AND $app == $app_dir ) || empty( $app ) ) + { + if ( ! IPSLib::appIsInstalled( $app_dir ) ) + { + continue; + } + + //----------------------------------------- + // Retrieve the RSS links for the header + //----------------------------------------- + + if( file_exists( IPSLib::getAppDir( $app_dir ) . '/extensions/rssOutput.php' ) ) + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $app_dir ) . '/extensions/rssOutput.php', 'rss_output_' . $app_dir, $app_dir ); + + if( class_exists( $classToLoad ) ) + { + $rss = new $classToLoad( $this->registry ); + + if( method_exists( $rss, "getRssLinks" ) ) + { + $rssData = $rss->getRssLinks(); + + if( count($rssData) ) + { + foreach( $rssData as $data ) + { + if( !$data['url'] ) + { + continue; + } + + $retrieved[] = $data['title'] . ':|:' . $data['url']; + } + } + } + } + } + } + } + + $this->cache->setCache( 'rss_output_cache', $retrieved, array( 'array' => 1 ) ); + + return $retrieved; + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/tools/defaultSection.php b/upload/admin/applications/core/modules_admin/tools/defaultSection.php index ea49a377..1019dd48 100644 --- a/upload/admin/applications/core/modules_admin/tools/defaultSection.php +++ b/upload/admin/applications/core/modules_admin/tools/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default tools section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_admin/tools/help.php b/upload/admin/applications/core/modules_admin/tools/help.php index e4c9b996..54d1c8f7 100644 --- a/upload/admin/applications/core/modules_admin/tools/help.php +++ b/upload/admin/applications/core/modules_admin/tools/help.php @@ -1,480 +1,472 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - - -class admin_core_tools_help extends ipsCommand -{ - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - /* Load lang and skin */ - $this->registry->class_localization->loadLanguageFile( array( 'admin_tools' ) ); - $this->html = $this->registry->output->loadTemplate( 'cp_skin_help_files' ); - - /* URLs */ - $this->form_code = $this->html->form_code = 'module=tools&section=help'; - $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=help'; - - /* What to do */ - switch( $this->request['do'] ) - { - case 'edit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_manage' ); - $this->helpFileForm( 'edit' ); - break; - - case 'new': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_manage' ); - $this->helpFileForm( 'new' ); - break; - - case 'doedit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_manage' ); - $this->handleHelpFileForm( 'edit' ); - break; - - case 'doreorder': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_manage' ); - $this->helpFilesReorder(); - break; - - case 'donew': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_manage' ); - $this->handleHelpFileForm( 'new' ); - break; - - case 'remove': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_remove' ); - $this->helpFileRemove(); - break; - - case 'exportXml': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_manage' ); - $this->helpFilesXMLExport(); - break; - - case 'importXml': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_manage' ); - $this->helpFilesXMLImport(); - break; - - case 'help_overview': - default: - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_manage' ); - $this->helpFilesList(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Import help files XML - * - * @access public - * @return void - */ - public function helpFilesXMLImport() - { - /* INIT */ - $messages = array(); - - /* Loop through all the applications */ - foreach( $this->registry->getApplications() as $app => $__data ) - { - $done = $this->helpFilesXMLImport_app( $app ); - $messages[] = sprintf( $this->lang->words['h_import_added'], $app, $done['added'], $done['updated'] ); - - /* In dev time stamp? */ - if ( IN_DEV ) - { - $cache = $this->caches['indev']; - $cache['import']['help'][ $app ] = time(); - $this->cache->setCache( 'indev', $cache, array( 'donow' => 1, 'array' => 1 ) ); - } - } - - $this->registry->output->global_message = $this->lang->words['h_imported'] . "
" . implode( "
", $messages ); - $this->helpFilesList(); - } - - /** - * Import help files XML helper. Abstracted so - * it can be used outside of this file. - * - * @access public - * @param string App Directory - * @param bool Allow overwrite. If FALSE, it will not update. - * @return array Number of items added / updated - */ - public function helpFilesXMLImport_app( $app, $overwrite=TRUE ) - { - /* INIT */ - $file = IPSLib::getAppDir( $app ) . '/xml/' . $app . '_help.xml'; - $processed = array( 'added' => 0, 'updated' => 0 ); - - /* Got anything to import? */ - if ( file_exists( $file ) ) - { - require_once( IPS_KERNEL_PATH.'classXML.php' ); - - $xml = new classXML( IPS_DOC_CHAR_SET ); - $xml->load( $file ); - - foreach( $xml->fetchElements('row') as $row ) - { - $entry = $xml->fetchElementsFromRecord( $row ); - $db = array( 'title' => $entry['title'], - 'text' => $entry['text'], - 'description' => $entry['description'], - 'position' => $entry['position'], - 'app' => $app ); - - if ( $entry['title'] ) - { - $curFaq = $this->DB->buildAndFetch( array( 'select' => 'id', 'from' => 'faq', 'where' => "app='" . $app . "' AND title = '".$this->DB->addSlashes( $entry['title'] )."'" ) ); - - if ( $curFaq['id'] ) - { - if ( $overwrite === TRUE ) - { - $processed['updated']++; - - $this->DB->update( 'faq', $db, "id = ". $curFaq['id'] ); - } - } - else - { - $processed['added']++; - - $this->DB->insert( 'faq', $db ); - } - } - } - } - - return $processed; - } - - /** - * Export help files XML - * - * @access public - * @return void - */ - public function helpFilesXMLExport() - { - /* INIT */ - $entry = array(); - - require_once( IPS_KERNEL_PATH.'classXML.php' ); - - /* Loop through all the applications */ - foreach( $this->registry->getApplications() as $app => $__data ) - { - $c = 0; - - $xml = new classXML( IPS_DOC_CHAR_SET ); - $xml->newXMLDocument(); - $xml->addElement( 'export' ); - $xml->addElement( 'help', 'export' ); - - /* Query tasks */ - $this->DB->build( array( 'select' => '*', 'from' => 'faq', 'where' => "app='{$app}'" ) ); - $this->DB->execute(); - - /* Loop through and add tasks to XML */ - while ( $r = $this->DB->fetch() ) - { - $c++; - unset( $r['id'] ); - - $r['text'] = str_replace( '%7Bstyle_image_url%7D', '{style_image_url}', $r['text'] ); - - $xml->addElementAsRecord( 'help', 'row', $r ); - } - - /* Finish XML */ - $doc = $xml->fetchDocument(); - - @unlink( IPSLib::getAppDir( $app ) . '/xml/' . $app . '_help.xml' ); - - /* Write */ - if( $doc and $c) - { - $fh = fopen( IPSLib::getAppDir( $app ) . '/xml/' . $app . '_help.xml', 'w' ); - fwrite( $fh, $doc ); - fclose( $fh ); - } - - /* In dev time stamp? */ - if ( IN_DEV ) - { - $cache = $this->caches['indev']; - $cache['import']['help'][ $app ] = time(); - $this->cache->setCache( 'indev', $cache, array( 'donow' => 1, 'array' => 1 ) ); - } - } - - $this->registry->output->global_message = $this->lang->words['h_exported']; - $this->helpFilesList(); - } - - /** - * Removes a help file - * - * @access public - * @return void - * @author Josh - */ - public function helpFileRemove() - { - /* Check ID */ - $id = intval( $this->request['id'] ); - if( ! $id ) - { - $this->registry->output->showError( $this->lang->words['h_noid'], 11149 ); - } - - /* Delete the record */ - $this->DB->delete( 'faq', "id={$id}" ); - - /* Log and bounce */ - $this->registry->adminFunctions->saveAdminLog( $this->lang->words['h_removed'] ); - $this->registry->output->silentRedirect( $this->settings['base_url'] . $this->form_code ); - } - - /** - * Handles the add/edit help file form - * - * @access public - * @param string $type Either new or edit - * @return void - */ - public function handleHelpFileForm( $type='new' ) - { - /* Error Checking */ - if( ! $this->request['title'] ) - { - $this->registry->output->showError( $this->lang->words['h_entertitle'], 11150 ); - } - - $text = trim( $_POST['editor_main'] ); - $text = preg_replace( "/\\\/", "\", $text ); - $text = str_replace( '%7Bstyle_image_url%7D', '{style_image_url}', $text ); - - /* Build DB Array */ - $db_array = array( - 'title' => $this->request['title'], - 'app' => $this->request['appDir'], - 'text' => $text, - 'description' => nl2br( $this->request['description'] ), - ); - - /* Insert help file */ - if( $type == 'new' ) - { - /* Update the DB */ - $this->DB->insert( 'faq', $db_array ); - - $id = $this->DB->getInsertId(); - - /* Log */ - $this->registry->adminFunctions->saveAdminLog( $this->lang->words['h_addlog'] ); - } - /* Update help file */ - else - { - /* ID */ - $id = intval( $this->request['id'] ); - - if( ! $id ) - { - $this->registry->output->showError( $this->lang->words['h_noid'], 11151 ); - } - - /* Update the DB */ - $this->DB->update( 'faq', $db_array, "id={$id}" ); - - $this->registry->adminFunctions->saveAdminLog( $this->lang->words['h_edited']); - } - - /* Bounce */ - $this->registry->output->silentRedirect( $this->settings['base_url'] . $this->form_code ); - } - - /** - * Form for adding/editing help files - * - * @access public - * @param string $type New or edit - * @return void - */ - public function helpFileForm( $type='new' ) - { - /* INIT */ - $dropdown = array(); - - /* Build Drop */ - foreach( ipsRegistry::$applications as $appDir => $appData ) - { - $dropdown[] = array( $appDir, $appData['app_title'] ); - } - - /* Edit Help File */ - if( $type != 'new' ) - { - /* ID */ - $id = intval( $this->request['id'] ); - - if( ! $id ) - { - $this->registry->output->showError( $this->lang->words['h_noid'], 11152 ); - } - - /* Query the help file */ - $this->DB->build( array( 'select' => '*', 'from' => 'faq', 'where' => "id=" . $id ) ); - $this->DB->execute(); - - /* Make sure we found one */ - if( ! $r = $this->DB->fetch() ) - { - $this->registry->output->showError( $this->lang->words['h_404'], 11153 ); - } - - /* Text bits */ - $button = $this->lang->words['h_editbutton']; - $code = 'doedit'; - } - else - { - /* Data */ - $r = array(); - $id = 0; - - /* Text Bits */ - $button = $this->lang->words['h_addbutton']; - $code = 'donew'; - } - - /* Form Elements */ - $form = array(); - - $form['title'] = $this->registry->output->formInput('title' , $r['title'] ); - $form['description'] = $this->registry->output->formTextarea('description', $r['description'] ); - $form['appDir'] = $this->registry->output->formDropdown( 'appDir', $dropdown, $r['app'] ); - $form['text'] = $r['text']; - - /* Ouput */ - $this->registry->output->html .= $this->html->helpFileForm( $code, $id, $form, $button ); - } - - /** - * Reorders help files - * - * @access public - * @return void - */ - public function helpFilesReorder() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - require_once( IPS_KERNEL_PATH . 'classAjax.php' ); - $ajax = new classAjax(); - - //----------------------------------------- - // Checks... - //----------------------------------------- - - if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) - { - $ajax->returnString( $this->lang->words['postform_badmd5'] ); - exit(); - } - - //----------------------------------------- - // Save new position - //----------------------------------------- - - $position = 1; - - if( is_array($this->request['faq']) AND count($this->request['faq']) ) - { - foreach( $this->request['faq'] as $this_id ) - { - $this->DB->update( 'faq', array( 'position' => $position ), 'id=' . $this_id ); - - $position++; - } - } - - //$this->registry->output->silentRedirect( $this->settings['base_url'] . $this->form_code ); - $ajax->returnString( 'OK' ); - exit(); - } - - /** - * List current help files - * - * @access public - * @return void - */ - public function helpFilesList() - { - /* Query Help Files */ - $this->DB->build( array( 'select' => '*', 'from' => 'faq', 'order' => "position" ) ); - $this->DB->execute(); - - /* Do we have help files? */ - $rows = array(); - - if( $this->DB->getTotalRows() ) - { - while( $r = $this->DB->fetch() ) - { - /* Add to output array */ - $rows[] = $r; - } - } - - /* Output */ - $this->registry->output->html .= $this->html->helpFilesList( $rows ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Help Files + * Last Updated: $LastChangedDate: 2010-10-19 10:40:05 -0400 (Tue, 19 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 6995 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class admin_core_tools_help extends ipsCommand +{ + /** + * Skin object + * + * @var object Skin templates + */ + private $html; + + /** + * Main class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load lang and skin */ + $this->registry->class_localization->loadLanguageFile( array( 'admin_tools' ) ); + $this->html = $this->registry->output->loadTemplate( 'cp_skin_help_files' ); + + /* URLs */ + $this->form_code = $this->html->form_code = 'module=tools&section=help'; + $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=help'; + + /* What to do */ + switch( $this->request['do'] ) + { + case 'edit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_manage' ); + $this->helpFileForm( 'edit' ); + break; + + case 'new': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_manage' ); + $this->helpFileForm( 'new' ); + break; + + case 'doedit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_manage' ); + $this->handleHelpFileForm( 'edit' ); + break; + + case 'doreorder': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_manage' ); + $this->helpFilesReorder(); + break; + + case 'donew': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_manage' ); + $this->handleHelpFileForm( 'new' ); + break; + + case 'remove': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_remove' ); + $this->helpFileRemove(); + break; + + case 'exportXml': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_manage' ); + $this->helpFilesXMLExport(); + break; + + case 'importXml': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_manage' ); + $this->helpFilesXMLImport(); + break; + + case 'help_overview': + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'help_manage' ); + $this->helpFilesList(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Import help files XML + * + * @return void + */ + public function helpFilesXMLImport() + { + /* INIT */ + $messages = array(); + + /* Loop through all the applications */ + foreach( $this->registry->getApplications() as $app => $__data ) + { + $done = $this->helpFilesXMLImport_app( $app ); + $messages[] = sprintf( $this->lang->words['h_import_added'], $app, $done['added'], $done['updated'] ); + + /* In dev time stamp? */ + if ( IN_DEV ) + { + $cache = $this->caches['indev']; + $cache['import']['help'][ $app ] = time(); + $this->cache->setCache( 'indev', $cache, array( 'donow' => 1, 'array' => 1 ) ); + } + } + + $this->registry->output->global_message = $this->lang->words['h_imported'] . "
" . implode( "
", $messages ); + $this->helpFilesList(); + } + + /** + * Import help files XML helper. Abstracted so + * it can be used outside of this file. + * + * @param string App Directory + * @param bool Allow overwrite. If FALSE, it will not update. + * @return array Number of items added / updated + */ + public function helpFilesXMLImport_app( $app, $overwrite=TRUE ) + { + /* INIT */ + $file = IPSLib::getAppDir( $app ) . '/xml/' . $app . '_help.xml'; + $processed = array( 'added' => 0, 'updated' => 0 ); + + /* Got anything to import? */ + if ( file_exists( $file ) ) + { + require_once( IPS_KERNEL_PATH.'classXML.php' ); + + $xml = new classXML( IPS_DOC_CHAR_SET ); + $xml->load( $file ); + + foreach( $xml->fetchElements('row') as $row ) + { + $entry = $xml->fetchElementsFromRecord( $row ); + $db = array( 'title' => $entry['title'], + 'text' => $entry['text'], + 'description' => $entry['description'], + 'position' => $entry['position'], + 'app' => $app ); + + if ( $entry['title'] ) + { + $curFaq = $this->DB->buildAndFetch( array( 'select' => 'id', 'from' => 'faq', 'where' => "app='" . $app . "' AND title = '".$this->DB->addSlashes( $entry['title'] )."'" ) ); + + if ( $curFaq['id'] ) + { + if ( $overwrite === TRUE ) + { + $processed['updated']++; + + $this->DB->update( 'faq', $db, "id = ". $curFaq['id'] ); + } + } + else + { + $processed['added']++; + + $this->DB->insert( 'faq', $db ); + } + } + } + } + + return $processed; + } + + /** + * Export help files XML + * + * @return void + */ + public function helpFilesXMLExport() + { + /* INIT */ + $entry = array(); + + require_once( IPS_KERNEL_PATH.'classXML.php' ); + + /* Loop through all the applications */ + foreach( $this->registry->getApplications() as $app => $__data ) + { + $c = 0; + + $xml = new classXML( IPS_DOC_CHAR_SET ); + $xml->newXMLDocument(); + $xml->addElement( 'export' ); + $xml->addElement( 'help', 'export' ); + + /* Query tasks */ + $this->DB->build( array( 'select' => '*', 'from' => 'faq', 'where' => "app='{$app}'" ) ); + $this->DB->execute(); + + /* Loop through and add tasks to XML */ + while ( $r = $this->DB->fetch() ) + { + $c++; + unset( $r['id'] ); + + $r['text'] = str_replace( '%7Bstyle_image_url%7D', '{style_image_url}', $r['text'] ); + + $xml->addElementAsRecord( 'help', 'row', $r ); + } + + /* Finish XML */ + $doc = $xml->fetchDocument(); + + @unlink( IPSLib::getAppDir( $app ) . '/xml/' . $app . '_help.xml' ); + + /* Write */ + if( $doc and $c) + { + $fh = fopen( IPSLib::getAppDir( $app ) . '/xml/' . $app . '_help.xml', 'w' ); + fwrite( $fh, $doc ); + fclose( $fh ); + } + + /* In dev time stamp? */ + if ( IN_DEV ) + { + $cache = $this->caches['indev']; + $cache['import']['help'][ $app ] = time(); + $this->cache->setCache( 'indev', $cache, array( 'donow' => 1, 'array' => 1 ) ); + } + } + + $this->registry->output->global_message = $this->lang->words['h_exported']; + $this->helpFilesList(); + } + + /** + * Removes a help file + * + * @return void + * @author Josh + */ + public function helpFileRemove() + { + /* Check ID */ + $id = intval( $this->request['id'] ); + if( ! $id ) + { + $this->registry->output->showError( $this->lang->words['h_noid'], 11149 ); + } + + /* Delete the record */ + $this->DB->delete( 'faq', "id={$id}" ); + + /* Log and bounce */ + $this->registry->adminFunctions->saveAdminLog( $this->lang->words['h_removed'] ); + $this->registry->output->silentRedirect( $this->settings['base_url'] . $this->form_code ); + } + + /** + * Handles the add/edit help file form + * + * @param string $type Either new or edit + * @return void + */ + public function handleHelpFileForm( $type='new' ) + { + /* Error Checking */ + if( ! $this->request['title'] ) + { + $this->registry->output->showError( $this->lang->words['h_entertitle'], 11150 ); + } + + $text = trim( $_POST['editor_main'] ); + $text = preg_replace( "/\\\/", "\", $text ); + $text = str_replace( '%7Bstyle_image_url%7D', '{style_image_url}', $text ); + + /* Build DB Array */ + $db_array = array( + 'title' => $this->request['title'], + 'app' => $this->request['appDir'], + 'text' => $text, + 'description' => nl2br( $this->request['description'] ), + ); + + /* Insert help file */ + if( $type == 'new' ) + { + /* Update the DB */ + $this->DB->insert( 'faq', $db_array ); + + $id = $this->DB->getInsertId(); + + /* Log */ + $this->registry->adminFunctions->saveAdminLog( $this->lang->words['h_addlog'] ); + } + /* Update help file */ + else + { + /* ID */ + $id = intval( $this->request['id'] ); + + if( ! $id ) + { + $this->registry->output->showError( $this->lang->words['h_noid'], 11151 ); + } + + /* Update the DB */ + $this->DB->update( 'faq', $db_array, "id={$id}" ); + + $this->registry->adminFunctions->saveAdminLog( $this->lang->words['h_edited']); + } + + /* Bounce */ + $this->registry->output->silentRedirect( $this->settings['base_url'] . $this->form_code ); + } + + /** + * Form for adding/editing help files + * + * @param string $type New or edit + * @return void + */ + public function helpFileForm( $type='new' ) + { + /* INIT */ + $dropdown = array(); + + /* Build Drop */ + foreach( ipsRegistry::$applications as $appDir => $appData ) + { + $dropdown[] = array( $appDir, $appData['app_title'] ); + } + + /* Edit Help File */ + if( $type != 'new' ) + { + /* ID */ + $id = intval( $this->request['id'] ); + + if( ! $id ) + { + $this->registry->output->showError( $this->lang->words['h_noid'], 11152 ); + } + + /* Query the help file */ + $this->DB->build( array( 'select' => '*', 'from' => 'faq', 'where' => "id=" . $id ) ); + $this->DB->execute(); + + /* Make sure we found one */ + if( ! $r = $this->DB->fetch() ) + { + $this->registry->output->showError( $this->lang->words['h_404'], 11153 ); + } + + /* Text bits */ + $button = $this->lang->words['h_editbutton']; + $code = 'doedit'; + } + else + { + /* Data */ + $r = array(); + $id = 0; + + /* Text Bits */ + $button = $this->lang->words['h_addbutton']; + $code = 'donew'; + } + + /* Form Elements */ + $form = array(); + + $form['title'] = $this->registry->output->formInput('title' , $r['title'] ); + $form['description'] = $this->registry->output->formTextarea('description', $r['description'] ); + $form['appDir'] = $this->registry->output->formDropdown( 'appDir', $dropdown, $r['app'] ); + $form['text'] = $r['text']; + + /* Ouput */ + $this->registry->output->html .= $this->html->helpFileForm( $code, $id, $form, $button ); + } + + /** + * Reorders help files + * + * @return void + */ + public function helpFilesReorder() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' ); + $ajax = new $classToLoad(); + + //----------------------------------------- + // Checks... + //----------------------------------------- + + if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) + { + $ajax->returnString( $this->lang->words['postform_badmd5'] ); + exit(); + } + + //----------------------------------------- + // Save new position + //----------------------------------------- + + $position = 1; + + if( is_array($this->request['faq']) AND count($this->request['faq']) ) + { + foreach( $this->request['faq'] as $this_id ) + { + $this->DB->update( 'faq', array( 'position' => $position ), 'id=' . $this_id ); + + $position++; + } + } + + //$this->registry->output->silentRedirect( $this->settings['base_url'] . $this->form_code ); + $ajax->returnString( 'OK' ); + exit(); + } + + /** + * List current help files + * + * @return void + */ + public function helpFilesList() + { + /* Query Help Files */ + $this->DB->build( array( 'select' => '*', 'from' => 'faq', 'order' => "position" ) ); + $this->DB->execute(); + + /* Do we have help files? */ + $rows = array(); + + if( $this->DB->getTotalRows() ) + { + while( $r = $this->DB->fetch() ) + { + /* Add to output array */ + $rows[] = $r; + } + } + + /* Output */ + $this->registry->output->html .= $this->html->helpFilesList( $rows ); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/tools/incomingEmails.php b/upload/admin/applications/core/modules_admin/tools/incomingEmails.php new file mode 100644 index 00000000..e37cae2f --- /dev/null +++ b/upload/admin/applications/core/modules_admin/tools/incomingEmails.php @@ -0,0 +1,250 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Incoming Email Routing + * Last Updated: $LastChangedDate: 2010-10-04 11:44:10 -0400 (Mon, 04 Oct 2010) $ + * + * + * @author $Author: mark $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 6938 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class admin_core_tools_incomingEmails extends ipsCommand +{ + /** + * Main entry point + * + * @access public + * @param object ipsRegistry reference + * @return void + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load lang and skin */ + $this->registry->class_localization->loadLanguageFile( array( 'admin_tools' ) ); + $this->html = $this->registry->output->loadTemplate( 'cp_skin_tools' ); + + $this->form_code = $this->html->form_code = 'module=tools&section=incomingEmails'; + + /* What to do */ + switch( $this->request['do'] ) + { + case 'add': + $this->form('add'); + break; + + case 'edit': + $this->form('edit'); + break; + + case 'save': + $this->save(); + break; + + case 'delete': + $this->delete(); + break; + + case 'test': + $this->test(); + default: + $this->manage(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Test POP3 + * + * @access public + * @return void + */ + protected function test() + { + require_once( IPS_KERNEL_PATH . '/pop3class/pop3.php' ); + $pop3 = new pop3_class; + + $pop3->hostname = $this->settings['pop3_server']; + $pop3->port = $this->settings['pop3_port']; + $pop3->tls = $this->settings['pop3_tls']; + $pop3->realm = ''; + $pop3->workstation = ''; + $pop3->authentication_mechanism = 'USER'; + $pop3->debug = FALSE; + $pop3->html_debug = FALSE; + $pop3->join_continuation_header_lines = TRUE; + + $user = $this->settings['pop3_user']; + $password = $this->settings['pop3_password']; + $apop = FALSE; + + $open = $pop3->Open(); + if ( $open != '' ) + { + $this->registry->output->global_error = '' . $this->lang->words['pop3_err_connect'] . '
' . $open; + return; + } + + $login = $pop3->Login($user, $password, $apop ); + if ( $login != '' ) + { + $this->registry->output->global_error = '' . $this->lang->words['pop3_err_login'] . '
' . $login; + return; + } + + $messages = NULL; + $size = NULL; + $pop3->Statistics( $messages, $size ); + if ( $messages === NULL or $size === NULL ) + { + $this->registry->output->global_error = $this->lang->words['pop3_err_stats']; + } + + $pop3->Close(); + + $this->registry->output->global_message = sprintf( $this->lang->words['pop3_okay'], $messages ); + } + + /** + * Manage Rules + * + * @access public + * @return void + */ + protected function manage() + { + $rules = array(); + $this->DB->build( array( 'select' => '*', 'from' => 'core_incoming_emails' ) ); + $this->DB->execute(); + while ( $row = $this->DB->fetch() ) + { + $rules[] = array( + 'id' => $row['rule_id'], + 'criteria' => $this->_getRuleText( $row['rule_criteria_field'], $row['rule_criteria_type'], $row['rule_criteria_value'] ), + 'action' => ( $row['rule_app'] == '--' ) ? $this->lang->words['ie_ignore'] : ( $this->lang->words['ie_sendto'] . ipsRegistry::$applications[ $row['rule_app'] ]['app_title'] ) + ); + } + + $this->registry->output->html .= $this->html->manageEmailRules( $rules ); + } + + /** + * Show Form + * + * @access public + * @return void + */ + protected function form( $type ) + { + $current = array(); + if ( $type == 'edit' ) + { + $id = intval( $this->request['id'] ); + $current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_incoming_emails', 'where' => "rule_id={$id}" ) ); + if ( !$current['rule_id'] ) + { + ipsRegistry::getClass('output')->showError( 'ie_not_found', 12345 ); + } + } + + $applications = array(); + foreach ( ipsRegistry::$applications as $dir => $app ) + { + if ( file_exists( IPSLib::getAppDir( $dir ) . '/extensions/incomingEmails.php' ) ) + { + $applications[] = array( $dir, $this->lang->words['ie_sendto'] . $app['app_title'] ); + } + } + + $this->registry->output->html .= $this->html->emailRuleForm( $current, $applications ); + } + + /** + * Action: Save + */ + protected function save() + { + //----------------------------------------- + // Save + //----------------------------------------- + + $save = array( + 'rule_criteria_field' => $this->request['criteria_field'], + 'rule_criteria_type' => $this->request['criteria_type'], + 'rule_criteria_value' => str_replace( '\', '\\', $this->request['criteria_value'] ), + 'rule_app' => $this->request['action'], + 'rule_added_by' => $this->memberData['member_id'], + 'rule_added_date' => time(), + ); + + if ( $this->request['id'] ) + { + $id = intval( $this->request['id'] ); + $this->DB->update( 'core_incoming_emails', $save, "rule_id={$id}" ); + + $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['ie_updated'], $this->_getRuleText( $save['rule_criteria_field'], $save['rule_criteria_type'], $save['rule_criteria_value'] ) ) ); + } + else + { + $this->DB->insert( 'core_incoming_emails', $save ); + $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['ie_added'], $this->_getRuleText( $save['rule_criteria_field'], $save['rule_criteria_type'], $save['rule_criteria_value'] ) ) ); + } + + //----------------------------------------- + // Display + //----------------------------------------- + + $this->registry->output->global_message = $this->lang->words['ie_saved']; + $this->manage(); + } + + /** + * Action: Delete + */ + protected function delete() + { + $id = intval( $this->request['id'] ); + $current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_incoming_emails', 'where' => "rule_id={$id}" ) ); + if ( !$current['rule_id'] ) + { + ipsRegistry::getClass('output')->showError( 'ie_not_found', 12345 ); + } + + $this->DB->delete( 'core_incoming_emails', "rule_id={$id}" ); + $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['ie_deleted'], $this->_getRuleText( $current['rule_criteria_field'], $current['rule_criteria_type'], $current['rule_criteria_value'] ) ) ); + + $this->registry->output->global_message = $this->lang->words['ie_delete_done']; + $this->manage(); + } + + /** + * Return human-readable interpretation of rule + * + * @param string field + * @param string type + * @param string value + * @return string + */ + protected function _getRuleText( $field, $type, $value ) + { + return $this->lang->words[ 'ie_cf_' . $field ] . ' ' . $this->lang->words[ 'ie_ct_' . $type ] . ' "' . $value . '"'; + } +} \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/tools/index.html b/upload/admin/applications/core/modules_admin/tools/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/tools/index.html +++ b/upload/admin/applications/core/modules_admin/tools/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

403: IP.Board -> Forbidden


You have reached this page in error, please use your back button to return to the forum.
IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

403: IP.Board -> Forbidden

+
+You have reached this page in error, please use your back button to return to the forum. +
+IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/tools/licensekey.php b/upload/admin/applications/core/modules_admin/tools/licensekey.php new file mode 100644 index 00000000..d6afa4c4 --- /dev/null +++ b/upload/admin/applications/core/modules_admin/tools/licensekey.php @@ -0,0 +1,177 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * License Manager + * Last Updated: $LastChangedDate$ + * + * + * @author $Author$ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev$ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class admin_core_tools_licensekey extends ipsCommand +{ + /** + * HTML object + * + * @var object + **/ + private $html; + + /**#@+ + * URL bits + * + * @var string + */ + public $form_code = ''; + public $form_code_js = ''; + /**#@-*/ + + /** + * Main entry point + * + * @param object ipsRegistry reference + * @return void + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load lang and skin */ + $this->registry->class_localization->loadLanguageFile( array( 'admin_tools' ) ); + $this->html = $this->registry->output->loadTemplate( 'cp_skin_tools' ); + + /* URLs */ + $this->form_code = $this->html->form_code = 'module=tools&section=licensekey'; + $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=licensekey'; + + /* What to do */ + switch( $this->request['do'] ) + { + case 'remove': + $this->remove(); + break; + + case 'activate': + $this->activate(); + break; + + case 'overview': + default: + $this->overview(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + /** + * Removes a license key + * + * @return void + */ + public function remove() + { + /* Remove the key */ + $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => '' ), "conf_key='ipb_reg_number'" ); + + /* Rebuild the cache */ + $this->cache->rebuildCache( 'settings', 'global' ); + $this->cache->setCache( 'licenseData', array(), array( 'array' => 1 ) ); + + /* Done */ + $this->registry->output->silentRedirect( $this->settings['base_url'] . $this->form_code ); + } + + /** + * Activates a license + * + * @return void + */ + public function activate() + { + /* Get the file managemnet class */ + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' ); + $query = new $classToLoad(); + $query->use_sockets = 1; + + /* Query the api */ + + /* Decode */ + $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => $this->request['license_key'] ), "conf_key='ipb_reg_number'" ); + $this->cache->rebuildCache( 'settings', 'global' ); + $this->cache->setCache( 'licenseData', array(), array( 'array' => 1 ) ); + + $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code ); + } + + /** + * Displays license information + * + * @return void + */ + public function overview() + { + /* Show activation form if we have no key */ + if( ! $this->settings['ipb_reg_number'] ) + { + $this->activateForm(); + return; + } + + /* Get License Data from cache */ + $licenseData = $this->cache->getCache( 'licenseData' ); + + if( ! $licenseData || $this->request['refresh'] == 1 || ( IPS_UNIX_TIME_NOW - $licenseData['_cached_date'] ) > 86400 ) + { + /* Get the file managemnet class */ + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' ); + $query = new $classToLoad(); + $query->use_sockets = 1; + + /* Query the api */ + + /* Get License Data */ + + /* Save to cache */ + $licenseData['_cached_date'] = time(); + $this->cache->setCache( 'licenseData', $licenseData, array( 'array' => 1 ) ); + } + + /* Date */ + $licenseData['_cached_date'] = $this->lang->formatTime( $licenseData['_cached_date'] ); + + /* Output */ + $this->registry->output->html .= $this->html->licenseKeyStatusScreen( $this->settings['ipb_reg_number'], $licenseData ); + } + + /** + * Displays license key status + * + * @return void + */ + public function activateForm() + { + /* Key Input */ + $keyInput = $this->registry->output->formInput( 'license_key', $this->request['license_key'] ); + + /* Domain Input */ + $domainInput = $this->registry->output->formInput( 'domain_key', $this->settings['board_url'] ); + + /* Output */ + $this->registry->output->html .= $this->html->activateForm( $keyInput, $domainInput ); + } +} \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/tools/login.php b/upload/admin/applications/core/modules_admin/tools/login.php index b20558b4..67a1dd10 100644 --- a/upload/admin/applications/core/modules_admin/tools/login.php +++ b/upload/admin/applications/core/modules_admin/tools/login.php @@ -1,1163 +1,1186 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class admin_core_tools_login extends ipsCommand -{ - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /** - * Shortcut for url - * - * @access private - * @var string URL shortcut - */ - private $form_code; - - /** - * Shortcut for url (javascript) - * - * @access private - * @var string JS URL shortcut - */ - private $form_code_js; - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load language and skin - //----------------------------------------- - - ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_tools' ) ); - $this->html = ipsRegistry::getClass('output')->loadTemplate('cp_skin_tools'); - - //----------------------------------------- - // Set URL shortcuts - //----------------------------------------- - - $this->form_code = $this->html->form_code = 'module=tools&section=login'; - $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=login'; - - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'login_manage' ); - - //----------------------------------------- - // What are we doing now? - //----------------------------------------- - - switch(ipsRegistry::$request['do']) - { - case 'manage': - default: - ipsRegistry::$request[ 'do'] = 'manage' ; - $this->_loginList(); - break; - - case 'login_toggle': - $this->_loginToggle(); - break; - - case 'login_uninstall': - $this->_loginUninstall(); - break; - - case 'login_install': - $this->_loginInstall(); - break; - - case 'login_reorder': - $this->_loginReorder(); - break; - - case 'login_add': - $this->_loginForm('add'); - break; - - case 'login_add_do': - $this->_loginSave('add'); - break; - - case 'login_edit_details': - $this->_loginForm('edit'); - break; - - case 'login_edit_do': - $this->_loginSave('edit'); - break; - - case 'login_acp_conf': - $this->_loginACPConf(); - break; - - case 'login_save_conf': - $this->_loginSaveConf(); - break; - - case 'master_xml_export': - $this->_masterXmlExport(); - break; - - case 'login_export': - $this->_masterXmlExport( ipsRegistry::$request['login_id'] ); - break; - - case 'login_diagnostics': - $this->_loginDiagnostics(); - break; - } - - //----------------------------------------- - // Pass to CP output hander - //----------------------------------------- - - $this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper(); - $this->registry->getClass('output')->sendOutput(); - } - - /** - * Save login method configuration details - * - * @access private - * @return boolean Saved or not - */ - private function _loginSaveConf() - { - //----------------------------------------- - // Init Vars - //----------------------------------------- - - $login_id = intval($this->request['login_id']); - - //----------------------------------------- - // Check (please?) - //----------------------------------------- - - $login = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_id=' . $login_id ) ); - - if ( ! $login['login_id'] ) - { - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_404']; - $this->_loginList(); - return false; - } - - //----------------------------------------- - // Generate file path - //----------------------------------------- - - $mypath = IPS_PATH_CUSTOM_LOGIN . '/' . $login['login_folder_name']; - - //----------------------------------------- - // Check (still waiting) - //----------------------------------------- - - if( !file_exists( $mypath . '/acp.php' ) ) - { - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_noconfig']; - $this->_loginList(); - return false; - } - - if( !file_exists( $mypath . '/conf.php' ) ) - { - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_noconfigfile']; - $this->_loginList(); - return false; - } - - if( !is_writable( $mypath . '/conf.php' ) ) - { - ipsRegistry::getClass('output')->global_message = $mypath . $this->lang->words['l_confwrite']; - $this->_loginList(); - return false; - } - - //----------------------------------------- - // We all good? - //----------------------------------------- - - require_once( $mypath . '/acp.php' ); - require_once( $mypath . '/conf.php' ); - - if( !is_array($config) OR !count($config) ) - { - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_noconfig']; - $this->_loginList(); - return false; - } - - //----------------------------------------- - // Teh form - //----------------------------------------- - - $save = array(); - - foreach( $config as $option ) - { - if( $option['key'] ) - { - $save[ $option['key'] ] = str_replace( '\', '\\', $_POST[ $option['key'] ] ); - } - } - - $conf_file = '<' . '?php' . "\n\n"; - - foreach( $save as $k => $v ) - { - $conf_file .= '$LOGIN_CONF[' . "'" . $k . "'] = " . '"' . addslashes( $v ) . '";' . "\n"; - } - - $conf_file .= "\n\n?" . '>'; - - if( $fh = @fopen( $mypath . '/conf.php', 'w' ) ) - { - fwrite( $fh, $conf_file ); - fclose( $fh ); - } - else - { - ipsRegistry::getClass('output')->global_message = $mypath . $this->lang->words['l_confwrite']; - $this->_loginACPConf(); - return false; - } - - ipsRegistry::getClass('output')->global_message = sprintf($this->lang->words['l_confup'], $login['login_title'] ); - $this->_loginList(); - return true; - } - - /** - * Configure details specific to a login method - * - * @access private - * @return mixed Outputs, or return false - */ - private function _loginACPConf() - { - //----------------------------------------- - // Init Vars - //----------------------------------------- - - $login_id = intval(ipsRegistry::$request['login_id']); - - //----------------------------------------- - // Check (please?) - //----------------------------------------- - - $login = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_id=' . $login_id ) ); - - if ( ! $login['login_id'] ) - { - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_404']; - $this->_loginList(); - return false; - } - - //----------------------------------------- - // Generate file path - //----------------------------------------- - - $mypath = IPS_PATH_CUSTOM_LOGIN . '/' . $login['login_folder_name']; - - //----------------------------------------- - // Check (still waiting) - //----------------------------------------- - - if( !file_exists( $mypath . '/acp.php' ) ) - { - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_noconfig']; - $this->_loginList(); - return false; - } - - if( !file_exists( $mypath . '/conf.php' ) ) - { - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_noconfigfile']; - $this->_loginList(); - return false; - } - - if( !is_writable( $mypath . '/conf.php' ) ) - { - ipsRegistry::getClass('output')->global_message = $mypath . $this->lang->words['l_confwrite']; - $this->_loginList(); - return false; - } - - //----------------------------------------- - // We all good? - //----------------------------------------- - - require_once( $mypath . '/acp.php' ); - require_once( $mypath . '/conf.php' ); - - if( !is_array($config) OR !count($config) ) - { - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_noconfig']; - $this->_loginList(); - return false; - } - - //----------------------------------------- - // Teh form - //----------------------------------------- - - $form = array(); - - foreach( $config as $option ) - { - $form_control = ''; - - if( $option['type'] == 'yesno' ) - { - $form_control = ipsRegistry::getClass('output')->formYesNo( $option['key'], $_POST[ $option['key'] ] ? $_POST[ $option['key'] ] : $LOGIN_CONF[ $option['key'] ] ); - } - else if( $option['type'] == 'select' ) - { - $form_control = ipsRegistry::getClass('output')->formDropdown( $option['key'], $option['options'], $_POST[ $option['key'] ] ? $_POST[ $option['key'] ] : $LOGIN_CONF[ $option['key'] ] ); - } - else - { - $form_control = ipsRegistry::getClass('output')->formInput( $option['key'], $_POST[ $option['key'] ] ? $_POST[ $option['key'] ] : $LOGIN_CONF[ $option['key'] ] ); - } - - $form[] = array( - 'title' => $option['title'], - 'description' => $option['description'], - 'control' => $form_control - ); - } - - ipsRegistry::getClass('output')->html .= $this->html->login_conf_form( $login, $form ); - } - - - /** - * Build XML file from array of data - * - * @access private - * @param array Entries to add - * @return string XML Document - */ - private function _buildXML( $data=array() ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $entry = array(); - - //----------------------------------------- - // Get XML class - //----------------------------------------- - - require_once( IPS_KERNEL_PATH . 'class_xml.php' ); - $xml = new class_xml(); - $xml->doc_type = IPS_DOC_CHAR_SET; - - $xml->xml_set_root( 'export', array( 'exported' => time() ) ); - - //----------------------------------------- - // Set group - //----------------------------------------- - - $xml->xml_add_group( 'group' ); - - foreach( $data as $thisentry => $r ) - { - $content = array(); - - if ( $r['login_folder_name'] == 'internal' ) - { - $r['login_enabled'] = 1; - } - else if ( $r['login_folder_name'] == 'ipconverge' ) - { - $r['login_maintain_url'] = ''; - $r['login_register_url'] = ''; - $r['login_login_url'] = ''; - $r['login_logout_url'] = ''; - $r['login_enabled'] = 0; - } - else - { - $r['login_enabled'] = 0; - } - - //----------------------------------------- - // Sort the fields... - //----------------------------------------- - - foreach( $r as $k => $v ) - { - if( in_array( $k, array( 'login_id', 'login_date' ) ) ) - { - continue; - } - - $content[] = $xml->xml_build_simple_tag( $k, $v ); - } - - $entry[] = $xml->xml_build_entry( 'row', $content ); - } - - $xml->xml_add_entry_to_group( 'group', $entry ); - - $xml->xml_format_document(); - - return $xml->xml_document; - } - - /** - * Export master XML file for installer - * - * @access private - * @param integer [Optional] Login ID - * @return void [Outputs to screen] - */ - private function _masterXmlExport( $login_id=0 ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $entries = array(); - $where = ''; - - if( $login_id ) - { - $where = 'login_id=' . intval($login_id); - } - - //----------------------------------------- - // Get login methods - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', - 'from' => 'login_methods', - 'where' => $where - ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $entries[] = $r; - } - - $document = $this->_buildXML( $entries ); - - //----------------------------------------- - // Print to browser - //----------------------------------------- - - $filename = $login_id ? 'loginauth_install.xml' : 'loginauth.xml'; - - ipsRegistry::getClass('output')->showDownload( $document, $filename, '', 0 ); - } - - /** - * Shows the login 'diagnostics' screen - * - * @access private - * @return mixed Outputs, or returns false - */ - private function _loginDiagnostics() - { - //----------------------------------------- - // Init Vars - //----------------------------------------- - - $login_id = intval(ipsRegistry::$request['login_id']); - - //----------------------------------------- - // Check (please?) - //----------------------------------------- - - $login = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_id=' . $login_id ) ); - - if ( ! $login['login_id'] ) - { - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_404']; - $this->_loginList(); - return false; - } - - //----------------------------------------- - // Generate file - //----------------------------------------- - - $mypath = IPS_PATH_CUSTOM_LOGIN . '/' . $login['login_folder_name']; - - //----------------------------------------- - // Generate General Info - //----------------------------------------- - - $login['_enabled_img'] = $login['login_enabled'] ? 'tick.png' : 'cross.png'; - $login['_has_settings'] = $login['login_settings'] ? 'tick.png' : 'cross.png'; - - //----------------------------------------- - // File based info - //----------------------------------------- - - $login['_file_auth_exists'] = @file_exists( $mypath . '/auth.php' ) ? 'tick.png' : 'cross.png'; - $login['_file_conf_exists'] = @file_exists( $mypath . '/conf.php' ) ? 'tick.png' : 'cross.png'; - $login['_file_acp_exists'] = @file_exists( $mypath . '/acp.php' ) ? 'tick.png' : 'cross.png'; - - $login['_file_conf_write'] = @is_writable( $mypath.'/conf.php' ) ? 'tick.png' : 'cross.png'; - - ipsRegistry::getClass('output')->html .= $this->html->login_diagnostics( $login ); - } - - /** - * Saves the login method to the database [add,edit] - * - * @access private - * @param string Add or Edit flag - * @return void [Outputs to screen] - */ - private function _loginSave($type='add') - { - //-------------------------------------------- - // INIT - //-------------------------------------------- - - $login_id = intval(ipsRegistry::$request['login_id']); - $login_title = trim( ipsRegistry::$request['login_title'] ); - $login_description = trim( IPSText::stripslashes( IPSText::UNhtmlspecialchars($_POST['login_description'])) ); - $login_folder_name = trim( ipsRegistry::$request['login_folder_name'] ); - $login_maintain_url = trim( ipsRegistry::$request['login_maintain_url'] ); - $login_register_url = trim( ipsRegistry::$request['login_register_url'] ); - $login_alt_login_html = trim( IPSText::stripslashes( IPSText::UNhtmlspecialchars($_POST['login_alt_login_html'])) ); - $login_alt_acp_html = trim( IPSText::stripslashes( IPSText::UNhtmlspecialchars($_POST['login_alt_acp_html'])) ); - $login_enabled = intval(ipsRegistry::$request['login_enabled']); - $login_settings = intval(ipsRegistry::$request['login_settings']); - $login_replace_form = intval(ipsRegistry::$request['login_replace_form']); - $login_safemode = intval(ipsRegistry::$request['login_safemode']); - $login_login_url = trim( ipsRegistry::$request['login_login_url'] ); - $login_logout_url = trim( ipsRegistry::$request['login_logout_url'] ); - $login_complete_page = trim( ipsRegistry::$request['login_complete_page'] ); - $login_user_id = in_array( ipsRegistry::$request['login_user_id'], array( 'username', 'email' ) ) ? ipsRegistry::$request['login_user_id'] : 'username'; - - //-------------------------------------------- - // Checks... - //-------------------------------------------- - - if ( $type == 'edit' ) - { - if ( ! $login_id ) - { - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_404']; - $this->_loginList(); - return; - } - } - - if ( ! $login_title OR ! $login_folder_name ) - { - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_form']; - $this->_loginForm( $type ); - return; - } - - //-------------------------------------------- - // Save... - //-------------------------------------------- - - $array = array( 'login_title' => $login_title, - 'login_description' => $login_description, - 'login_folder_name' => $login_folder_name, - 'login_maintain_url' => $login_maintain_url, - 'login_register_url' => $login_register_url, - 'login_alt_login_html' => $login_alt_login_html, - 'login_alt_acp_html' => $login_alt_acp_html, - 'login_enabled' => $login_enabled, - 'login_settings' => $login_settings, - 'login_replace_form' => $login_replace_form, - 'login_logout_url' => $login_logout_url, - 'login_login_url' => $login_login_url, - 'login_user_id' => $login_user_id - ); - - //-------------------------------------------- - // In DEV? - //-------------------------------------------- - - if ( IN_DEV ) - { - $array['login_safemode'] = $login_safemode; - } - - //-------------------------------------------- - // Nike.. do it - //-------------------------------------------- - - if ( $type == 'add' ) - { - $array['login_date'] = time(); - - $this->DB->insert( 'login_methods', $array ); - - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_added']; - } - else - { - $this->DB->update( 'login_methods', $array, 'login_id='.$login_id ); - - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_edited']; - } - - if( $login_folder_name == 'ipconverge' ) - { - IPSLib::updateSettings( array( 'ipconverge_enabled' => $login_enabled ) ); - } - - //----------------------------------------- - // Recache - //----------------------------------------- - - $this->loginsRecache(); - - $this->_loginList(); - } - - /** - * Shows the login method form [add,edit] - * - * @access private - * @param string Add or Edit flag - * @return void [Outputs to screen] - */ - private function _loginForm( $type='add' ) - { - //----------------------------------------- - // Init Vars - //----------------------------------------- - - $login_id = intval(ipsRegistry::$request['login_id']); - - //----------------------------------------- - // Check (please?) - //----------------------------------------- - - if ( $type == 'add' ) - { - $formcode = 'login_add_do'; - $title = $this->lang->words['l_registernew']; - $button = $this->lang->words['l_registernew']; - } - else - { - $login = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_id='.$login_id ) ); - - if ( ! $login['login_id'] ) - { - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_404']; - $this->_loginList(); - return; - } - - $formcode = 'login_edit_do'; - $title = "Edit Log In Method " . $login['login_title']; - $button = "Save Changes"; - } - - //----------------------------------------- - // Form elements - //----------------------------------------- - - $valid_types = array( array( 'username', $this->lang->words['l_username'] ), array( 'email', $this->lang->words['l_email'] ) ); - $form = array(); - - $form['login_title'] = ipsRegistry::getClass('output')->formInput( 'login_title' , $_POST['login_title'] ? $_POST['login_title'] : $login['login_title'] ); - $form['login_description'] = ipsRegistry::getClass('output')->formInput( 'login_description' , IPSText::htmlspecialchars( $_POST['login_description'] ? $_POST['login_description'] : $login['login_description'] ) ); - $form['login_folder_name'] = ipsRegistry::getClass('output')->formInput( 'login_folder_name' , $_POST['login_folder_name'] ? $_POST['login_folder_name'] : $login['login_folder_name'] ); - $form['login_maintain_url'] = ipsRegistry::getClass('output')->formInput( 'login_maintain_url' , $_POST['login_maintain_url'] ? $_POST['login_maintain_url'] : $login['login_maintain_url'] ); - $form['login_register_url'] = ipsRegistry::getClass('output')->formInput( 'login_register_url' , $_POST['login_register_url'] ? $_POST['login_register_url'] : $login['login_register_url'] ); - $form['login_login_url'] = ipsRegistry::getClass('output')->formInput( 'login_login_url' , $_POST['login_login_url'] ? $_POST['login_login_url'] : $login['login_login_url'] ); - $form['login_logout_url'] = ipsRegistry::getClass('output')->formInput( 'login_logout_url' , $_POST['login_logout_url'] ? $_POST['login_logout_url'] : $login['login_logout_url'] ); - $form['login_enabled'] = ipsRegistry::getClass('output')->formYesNo( 'login_enabled' , $_POST['login_enabled'] ? $_POST['login_enabled'] : $login['login_enabled'] ); - $form['login_settings'] = ipsRegistry::getClass('output')->formYesNo( 'login_settings' , $_POST['login_settings'] ? $_POST['login_settings'] : $login['login_settings'] ); - $form['login_register_url'] = ipsRegistry::getClass('output')->formInput( 'login_register_url' , $_POST['login_register_url'] ? $_POST['login_register_url'] : $login['login_register_url'] ); - $form['login_replace_form'] = ipsRegistry::getClass('output')->formYesNo( 'login_replace_form' , $_POST['login_replace_form'] ? $_POST['login_replace_form'] : $login['login_replace_form'] ); - $form['login_alt_login_html'] = ipsRegistry::getClass('output')->formTextarea( 'login_alt_login_html' , IPSText::htmlspecialchars( $_POST['login_alt_login_html'] ? $_POST['login_alt_login_html'] : $login['login_alt_login_html'] ) ); - $form['login_alt_acp_html'] = ipsRegistry::getClass('output')->formTextarea( 'login_alt_acp_html' , IPSText::htmlspecialchars( $_POST['login_alt_acp_html'] ? $_POST['login_alt_acp_html'] : $login['login_alt_acp_html'] ) ); - $form['login_user_id'] = ipsRegistry::getClass('output')->formDropdown( 'login_user_id' , $valid_types, $_POST['login_user_id'] ? $_POST['login_user_id'] : $login['login_user_id'] ); - - if ( IN_DEV ) - { - $form['login_safemode'] = ipsRegistry::getClass('output')->formYesNo( 'login_safemode' , $_POST['login_safemode'] ? $_POST['login_safemode'] : $login['login_safemode'] ); - } - - ipsRegistry::getClass('output')->html .= $this->html->login_form( $form, $title, $formcode, $button, $login ); - } - - /** - * Lists the login method overview screen - * - * @access private - * @return void [Outputs to screen] - */ - private function _loginList() - { - //----------------------------------------- - // Output - //----------------------------------------- - - ipsRegistry::getClass('output')->nav[] = array( $this->form_code, $this->lang->words['l_nav'] ); - - //----------------------------------------- - // INIT - //----------------------------------------- - - require_once( IPS_KERNEL_PATH . 'class_xml.php' ); - $xml = new class_xml(); - $xml->doc_type = IPS_DOC_CHAR_SET; - $content = ""; - $db_methods = array(); - $dir_methods = array(); - $installed = array(); - - //----------------------------------------- - // Get login methods from database - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'login_methods' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $r['login_installed'] = 1; - $db_methods[ $r['login_order'] ] = $r; - $installed[] = $r['login_folder_name']; - } - - ksort( $db_methods ); - - //----------------------------------------- - // Now get the available login methods - //----------------------------------------- - - $dh = opendir( IPS_PATH_CUSTOM_LOGIN ); - - if ( $dh !== false ) - { - while ( false !== ($file = readdir($dh) ) ) - { - if( is_dir( IPS_PATH_CUSTOM_LOGIN . '/' . $file ) AND !in_array( $file, array( '.', '..', '.svn', '.DS_Store' ) ) ) - { - $data = array( 'login_title' => $file, 'login_folder_name' => $file ); - - if( file_exists( IPS_PATH_CUSTOM_LOGIN . '/' . $file . '/loginauth_install.xml' ) ) - { - $file_content = file_get_contents( IPS_PATH_CUSTOM_LOGIN . '/' . $file . '/loginauth_install.xml' ); - - $xml->xml_parse_document( $file_content ); - - if( is_array($xml->xml_array['export']['group']['row']) ) - { - foreach( $xml->xml_array['export']['group']['row'] as $f => $entry ) - { - if( is_array($entry) ) - { - foreach( $entry as $k => $v ) - { - if ( $f == 'VALUE' or $f == 'login_id' ) - { - continue; - } - - $data[ $f ] = $v; - } - } - } - } - } - - $data['acp_plugin'] = 0; - - if( file_exists( IPS_PATH_CUSTOM_LOGIN . '/' . $file . '/acp.php' ) AND file_exists( IPS_PATH_CUSTOM_LOGIN . '/' . $file . '/conf.php' ) ) - { - $data['acp_plugin'] = 1; - } - - $dir_methods[ $file ] = $data; - } - } - - closedir( $dh ); - } - - //----------------------------------------- - // First...we show installed methods - //----------------------------------------- - - $content .= $this->html->login_subheader( $this->lang->words['l_installed'] ); - $dbm_count = 0; - - if( count($db_methods ) ) - { - foreach( $db_methods as $r ) - { - $dbm_count++; - - $r['_enabled_img'] = $r['login_enabled'] ? 'tick.png' : 'cross.png'; - $r['acp_plugin'] = $dir_methods[ $r['login_folder_name'] ]['acp_plugin']; - - $content .= $this->html->login_row($r); - } - } - - if( !$dbm_count ) - { - $content .= $this->html->login_norow( "installed" ); - } - - //----------------------------------------- - // Then the ones not installed - //----------------------------------------- - - $content .= $this->html->login_subheader( $this->lang->words['l_others'] ); - $dm_count = 0; - - if( count( $dir_methods ) ) - { - foreach( $dir_methods as $r ) - { - if( in_array( $r['login_folder_name'], $installed ) ) - { - continue; - } - - $dm_count++; - - // Need to set a bogus login id to ensure HTML ids are unique for the javascript - $r['login_id'] = str_replace( '.', '', uniqid( 'abc', true ) ); - - $r['_enabled_img'] = 'cross.png'; - - $content .= $this->html->login_row($r); - } - } - - if( !$dm_count ) - { - $content .= $this->html->login_norow( "uninstalled" ); - } - - ipsRegistry::getClass('output')->html .= $this->html->login_overview( $content ); - } - - /** - * Toggle login method enabled/disabled - * - * @access private - * @return void [Outputs to screen] - */ - private function _loginToggle() - { - //-------------------------------------------- - // INIT - //-------------------------------------------- - - $login_id = intval(ipsRegistry::$request['login_id']); - - $login = $this->DB->buildAndFetch( array( 'select' => 'login_id, login_enabled, login_folder_name', 'from' => 'login_methods', 'where' => 'login_id=' . $login_id ) ); - - if( !$login['login_id'] ) - { - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_404']; - $this->_loginList(); - return; - } - - if( $login['login_enabled'] ) - { - $toggle = $this->lang->words['l_disabled']; - - $this->DB->update( 'login_methods', array( 'login_enabled' => 0 ), 'login_id=' . $login_id ); - - if( $login['login_folder_name'] == 'ipconverge' ) - { - IPSLib::updateSettings( array( 'ipconverge_enabled' => 0 ) ); - } - } - else - { - $toggle = $this->lang->words['l_enabled']; - - $this->DB->update( 'login_methods', array( 'login_enabled' => 1 ), 'login_id=' . $login_id ); - - if( $login['login_folder_name'] == 'ipconverge' ) - { - IPSLib::updateSettings( array( 'ipconverge_enabled' => 1 ) ); - } - } - - //----------------------------------------- - // Recache - //----------------------------------------- - - $this->loginsRecache(); - - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_successfully'] . $toggle; - - $this->_loginList(); - } - - /** - * Uninstall a login method - * - * @access private - * @return void [Outputs to screen] - */ - private function _loginUninstall() - { - //-------------------------------------------- - // INIT - //-------------------------------------------- - - $login_id = intval(ipsRegistry::$request['login_id']); - - $login = $this->DB->buildAndFetch( array( 'select' => 'login_id, login_enabled, login_folder_name', 'from' => 'login_methods', 'where' => 'login_id=' . $login_id ) ); - - if( !$login['login_id'] ) - { - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_404']; - $this->_loginList(); - return; - } - - $this->DB->delete( 'login_methods', 'login_id=' . $login_id ); - - if( $login['login_folder_name'] == 'ipconverge' ) - { - IPSLib::updateSettings( array( 'ipconverge_enabled' => 0 ) ); - } - - //----------------------------------------- - // Recache - //----------------------------------------- - - $this->loginsRecache(); - - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_uninstalled']; - - $this->_loginList(); - } - - /** - * Install a login method - * - * @access private - * @return void [Outputs to screen] - */ - private function _loginInstall() - { - //-------------------------------------------- - // INIT - //-------------------------------------------- - - require_once( IPS_KERNEL_PATH . 'class_xml.php' ); - $xml = new class_xml(); - $xml->doc_type = IPS_DOC_CHAR_SET; - - $login_id = basename(ipsRegistry::$request['login_folder']); - - //----------------------------------------- - // Now get the XML data - //----------------------------------------- - - $dh = opendir( IPS_PATH_CUSTOM_LOGIN ); - - if ( $dh !== false ) - { - while ( false !== ($file = readdir($dh) ) ) - { - if( is_dir( IPS_PATH_CUSTOM_LOGIN . '/' . $file ) AND $file == $login_id ) - { - if( file_exists( IPS_PATH_CUSTOM_LOGIN . '/' . $file . '/loginauth_install.xml' ) ) - { - $file_content = file_get_contents( IPS_PATH_CUSTOM_LOGIN . '/' . $file . '/loginauth_install.xml' ); - - $xml->xml_parse_document( $file_content ); - - if( is_array($xml->xml_array['export']['group']['row']) ) - { - foreach( $xml->xml_array['export']['group']['row'] as $f => $entry ) - { - if( is_array($entry) ) - { - foreach( $entry as $k => $v ) - { - if ( $f == 'VALUE' or $f == 'login_id' ) - { - continue; - } - - $data[ $f ] = $v; - } - } - } - } - } - else - { - closedir( $dh ); - - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_installer404']; - $this->_loginList(); - return; - } - - $dir_methods[ $file ] = $data; - - break; - } - } - - closedir( $dh ); - } - - if( !is_array($dir_methods) OR !count($dir_methods) ) - { - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_installer404']; - $this->_loginList(); - return; - } - - //----------------------------------------- - // Now verify it isn't installed - //----------------------------------------- - - $login = $this->DB->buildAndFetch( array( 'select' => 'login_id', 'from' => 'login_methods', 'where' => "login_folder_name='" . $login_id . "'" ) ); - - if( $login['login_id'] ) - { - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_already']; - $this->_loginList(); - return; - } - - //----------------------------------------- - // Get the highest order and insert method - //----------------------------------------- - - $max = $this->DB->buildAndFetch( array( 'select' => 'MAX(login_order) as highest_order', 'from' => 'login_methods' ) ); - - $dir_methods[ $login_id ]['login_order'] = $max['highest_order'] + 1; - - $this->DB->insert( 'login_methods', $dir_methods[ $login_id ] ); - - //----------------------------------------- - // Recache - //----------------------------------------- - - $this->loginsRecache(); - - ipsRegistry::getClass('output')->global_message = $this->lang->words['l_yesinstalled']; - - $this->_loginList(); - } - - /** - * Reorder a login method - * - * @access private - * @return void [Outputs to screen] - */ - private function _loginReorder() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - require_once( IPS_KERNEL_PATH . 'classAjax.php' ); - $ajax = new classAjax(); - - //----------------------------------------- - // Checks... - //----------------------------------------- - - if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) - { - $ajax->returnString( $this->lang->words['postform_badmd5'] ); - exit(); - } - - //----------------------------------------- - // Save new position - //----------------------------------------- - - $position = 1; - - if( is_array($this->request['logins']) AND count($this->request['logins']) ) - { - foreach( $this->request['logins'] as $this_id ) - { - $this->DB->update( 'login_methods', array( 'login_order' => $position ), 'login_id=' . $this_id ); - - $position++; - } - } - - $this->loginsRecache(); - - $ajax->returnString( 'OK' ); - exit(); - } - - /** - * Updates cache store record - * - * @access public - * @return boolean Cache store updated successfully - */ - public function loginsRecache() - { - $cache = array(); - - $this->DB->build( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_enabled=1', 'order' => 'login_order ASC' ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $cache[ $r['login_id'] ] = $r; - } - - ipsRegistry::cache()->setCache( 'login_methods', $cache, array( 'array' => 1 ) ); - } - -} + + * Invision Power Services + * IP.Board v3.1.4 + * Login Manager Administration + * Last Updated: $Date: 2010-10-19 10:40:05 -0400 (Tue, 19 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since Thursday 26th January 2006 (11:03) + * @version $Revision: 6995 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class admin_core_tools_login extends ipsCommand +{ + /** + * Skin object + * + * @var object Skin templates + */ + private $html; + + /** + * Shortcut for url + * + * @var string URL shortcut + */ + private $form_code; + + /** + * Shortcut for url (javascript) + * + * @var string JS URL shortcut + */ + private $form_code_js; + + /** + * Main class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load language and skin + //----------------------------------------- + + ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_tools' ) ); + $this->html = ipsRegistry::getClass('output')->loadTemplate('cp_skin_tools'); + + //----------------------------------------- + // Set URL shortcuts + //----------------------------------------- + + $this->form_code = $this->html->form_code = 'module=tools&section=login'; + $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=login'; + + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'login_manage' ); + + //----------------------------------------- + // What are we doing now? + //----------------------------------------- + + switch(ipsRegistry::$request['do']) + { + case 'manage': + default: + ipsRegistry::$request[ 'do'] = 'manage' ; + $this->_loginList(); + break; + + case 'login_toggle': + $this->_loginToggle(); + break; + + case 'login_uninstall': + $this->_loginUninstall(); + break; + + case 'login_install': + $this->_loginInstall(); + break; + + case 'login_reorder': + $this->_loginReorder(); + break; + + case 'login_add': + $this->_loginForm('add'); + break; + + case 'login_add_do': + $this->_loginSave('add'); + break; + + case 'login_edit_details': + $this->_loginForm('edit'); + break; + + case 'login_edit_do': + $this->_loginSave('edit'); + break; + + case 'login_acp_conf': + $this->_loginACPConf(); + break; + + case 'login_save_conf': + $this->_loginSaveConf(); + break; + + case 'master_xml_export': + $this->_masterXmlExport(); + break; + + case 'login_export': + $this->_masterXmlExport( ipsRegistry::$request['login_id'] ); + break; + + case 'login_diagnostics': + $this->_loginDiagnostics(); + break; + } + + //----------------------------------------- + // Pass to CP output hander + //----------------------------------------- + + $this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper(); + $this->registry->getClass('output')->sendOutput(); + } + + /** + * Save login method configuration details + * + * @return boolean Saved or not + */ + private function _loginSaveConf() + { + //----------------------------------------- + // Init Vars + //----------------------------------------- + + $login_id = intval($this->request['login_id']); + + //----------------------------------------- + // Check (please?) + //----------------------------------------- + + $login = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_id=' . $login_id ) ); + + if ( ! $login['login_id'] ) + { + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_404']; + $this->_loginList(); + return false; + } + + //----------------------------------------- + // Generate file path + //----------------------------------------- + + $mypath = IPS_PATH_CUSTOM_LOGIN . '/' . $login['login_folder_name']; + + //----------------------------------------- + // Check (still waiting) + //----------------------------------------- + + if( !file_exists( $mypath . '/acp.php' ) ) + { + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_noconfig']; + $this->_loginList(); + return false; + } + + if( !file_exists( $mypath . '/conf.php' ) ) + { + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_noconfigfile']; + $this->_loginList(); + return false; + } + + if( !is_writable( $mypath . '/conf.php' ) ) + { + ipsRegistry::getClass('output')->global_message = $mypath . $this->lang->words['l_confwrite']; + $this->_loginList(); + return false; + } + + //----------------------------------------- + // We all good? + //----------------------------------------- + $config = array(); + require_once( $mypath . '/acp.php' ); + require_once( $mypath . '/conf.php' ); + + if( !is_array($config) OR !count($config) ) + { + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_noconfig']; + $this->_loginList(); + return false; + } + + //----------------------------------------- + // Teh form + //----------------------------------------- + + $save = array(); + + foreach( $config as $option ) + { + if( $option['key'] ) + { + $save[ $option['key'] ] = str_replace( '\', '\\', $_POST[ $option['key'] ] ); + } + } + + $conf_file = '<' . '?php' . "\n\n"; + + foreach( $save as $k => $v ) + { + $conf_file .= '$LOGIN_CONF[' . "'" . $k . "'] = " . '"' . addslashes( $v ) . '";' . "\n"; + } + + $conf_file .= "\n\n?" . '>'; + + if( $fh = @fopen( $mypath . '/conf.php', 'w' ) ) + { + fwrite( $fh, $conf_file ); + fclose( $fh ); + } + else + { + ipsRegistry::getClass('output')->global_message = $mypath . $this->lang->words['l_confwrite']; + $this->_loginACPConf(); + return false; + } + + ipsRegistry::getClass('output')->global_message = sprintf($this->lang->words['l_confup'], $login['login_title'] ); + $this->_loginList(); + return true; + } + + /** + * Configure details specific to a login method + * + * @return mixed Outputs, or return false + */ + private function _loginACPConf() + { + //----------------------------------------- + // Init Vars + //----------------------------------------- + + $login_id = intval(ipsRegistry::$request['login_id']); + + //----------------------------------------- + // Check (please?) + //----------------------------------------- + + $login = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_id=' . $login_id ) ); + + if ( ! $login['login_id'] ) + { + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_404']; + $this->_loginList(); + return false; + } + + //----------------------------------------- + // Generate file path + //----------------------------------------- + + $mypath = IPS_PATH_CUSTOM_LOGIN . '/' . $login['login_folder_name']; + + //----------------------------------------- + // Check (still waiting) + //----------------------------------------- + + if( !file_exists( $mypath . '/acp.php' ) ) + { + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_noconfig']; + $this->_loginList(); + return false; + } + + if( !file_exists( $mypath . '/conf.php' ) ) + { + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_noconfigfile']; + $this->_loginList(); + return false; + } + + if( !is_writable( $mypath . '/conf.php' ) ) + { + ipsRegistry::getClass('output')->global_message = $mypath . $this->lang->words['l_confwrite']; + $this->_loginList(); + return false; + } + + //----------------------------------------- + // We all good? + //----------------------------------------- + $config = array(); + $LOGIN_CONF = array(); + require_once( $mypath . '/acp.php' ); + require_once( $mypath . '/conf.php' ); + + if( !is_array($config) OR !count($config) ) + { + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_noconfig']; + $this->_loginList(); + return false; + } + + //----------------------------------------- + // Teh form + //----------------------------------------- + $form = array(); + + foreach( $config as $option ) + { + $form_control = ''; + + if( $option['type'] == 'yesno' ) + { + $form_control = ipsRegistry::getClass('output')->formYesNo( $option['key'], $_POST[ $option['key'] ] ? $_POST[ $option['key'] ] : $LOGIN_CONF[ $option['key'] ] ); + } + else if( $option['type'] == 'select' ) + { + $form_control = ipsRegistry::getClass('output')->formDropdown( $option['key'], $option['options'], $_POST[ $option['key'] ] ? $_POST[ $option['key'] ] : $LOGIN_CONF[ $option['key'] ] ); + } + else + { + $form_control = ipsRegistry::getClass('output')->formInput( $option['key'], $_POST[ $option['key'] ] ? $_POST[ $option['key'] ] : $LOGIN_CONF[ $option['key'] ] ); + } + + $form[] = array( + 'title' => $option['title'], + 'description' => $option['description'], + 'control' => $form_control + ); + } + + ipsRegistry::getClass('output')->html .= $this->html->login_conf_form( $login, $form ); + } + + + /** + * Build XML file from array of data + * + * @param array Entries to add + * @return string XML Document + */ + private function _buildXML( $data=array() ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $entry = array(); + + //----------------------------------------- + // Get XML class + //----------------------------------------- + + require_once( IPS_KERNEL_PATH . 'class_xml.php' ); + $xml = new class_xml(); + $xml->doc_type = IPS_DOC_CHAR_SET; + + $xml->xml_set_root( 'export', array( 'exported' => time() ) ); + + //----------------------------------------- + // Set group + //----------------------------------------- + + $xml->xml_add_group( 'group' ); + + foreach( $data as $thisentry => $r ) + { + $content = array(); + + if ( $r['login_folder_name'] == 'internal' ) + { + $r['login_enabled'] = 1; + } + else if ( $r['login_folder_name'] == 'ipconverge' ) + { + $r['login_maintain_url'] = ''; + $r['login_register_url'] = ''; + $r['login_login_url'] = ''; + $r['login_logout_url'] = ''; + $r['login_enabled'] = 0; + } + else + { + $r['login_enabled'] = 0; + } + + //----------------------------------------- + // Sort the fields... + //----------------------------------------- + + foreach( $r as $k => $v ) + { + if( in_array( $k, array( 'login_id' ) ) ) + { + continue; + } + + $content[] = $xml->xml_build_simple_tag( $k, $v ); + } + + $entry[] = $xml->xml_build_entry( 'row', $content ); + } + + $xml->xml_add_entry_to_group( 'group', $entry ); + + $xml->xml_format_document(); + + return $xml->xml_document; + } + + /** + * Export master XML file for installer + * + * @param integer [Optional] Login ID + * @return void [Outputs to screen] + */ + private function _masterXmlExport( $login_id=0 ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $entries = array(); + $where = ''; + + if( $login_id ) + { + $where = 'login_id=' . intval($login_id); + } + + //----------------------------------------- + // Get login methods + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', + 'from' => 'login_methods', + 'where' => $where + ) ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $entries[] = $r; + } + + $document = $this->_buildXML( $entries ); + + //----------------------------------------- + // Print to browser + //----------------------------------------- + + $filename = $login_id ? 'loginauth_install.xml' : 'loginauth.xml'; + + ipsRegistry::getClass('output')->showDownload( $document, $filename, '', 0 ); + } + + /** + * Shows the login 'diagnostics' screen + * + * @return mixed Outputs, or returns false + */ + private function _loginDiagnostics() + { + //----------------------------------------- + // Init Vars + //----------------------------------------- + + $login_id = intval(ipsRegistry::$request['login_id']); + + //----------------------------------------- + // Check (please?) + //----------------------------------------- + + $login = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_id=' . $login_id ) ); + + if ( ! $login['login_id'] ) + { + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_404']; + $this->_loginList(); + return false; + } + + //----------------------------------------- + // Generate file + //----------------------------------------- + + $mypath = IPS_PATH_CUSTOM_LOGIN . '/' . $login['login_folder_name']; + + //----------------------------------------- + // Generate General Info + //----------------------------------------- + + $login['_enabled_img'] = $login['login_enabled'] ? 'tick.png' : 'cross.png'; + $login['_has_settings'] = $login['login_settings'] ? 'tick.png' : 'cross.png'; + + //----------------------------------------- + // File based info + //----------------------------------------- + + $login['_file_auth_exists'] = @file_exists( $mypath . '/auth.php' ) ? 'tick.png' : 'cross.png'; + $login['_file_conf_exists'] = @file_exists( $mypath . '/conf.php' ) ? 'tick.png' : 'cross.png'; + $login['_file_acp_exists'] = @file_exists( $mypath . '/acp.php' ) ? 'tick.png' : 'cross.png'; + + $login['_file_conf_write'] = @is_writable( $mypath.'/conf.php' ) ? 'tick.png' : 'cross.png'; + + /* Try to setup the module */ + require_once( IPS_PATH_CUSTOM_LOGIN . '/login_core.php' ); + require_once( IPS_PATH_CUSTOM_LOGIN . '/login_interface.php' ); + + if( file_exists( IPS_PATH_CUSTOM_LOGIN . '/' . $login['login_folder_name'] . '/auth.php' ) ) + { + $classFile = IPS_PATH_CUSTOM_LOGIN . '/' . $login['login_folder_name'] . '/auth.php'; + $config = IPS_PATH_CUSTOM_LOGIN . '/' . $login['login_folder_name'] . '/conf.php'; + + if( file_exists( $config ) ) + { + $LOGIN_CONF = array(); + require( $config ); + } + + $classname = "login_" . $login['login_folder_name']; + + require_once( $classFile ); + $module = new $classname( $this->registry, $login, $LOGIN_CONF ); + + if( $module->missingModules ) + { + $login['_missingModules'] = implode( ', ', $module->missingModules ); + } + } + + ipsRegistry::getClass('output')->html .= $this->html->login_diagnostics( $login ); + } + + /** + * Saves the login method to the database [add,edit] + * + * @param string Add or Edit flag + * @return void [Outputs to screen] + */ + private function _loginSave($type='add') + { + //-------------------------------------------- + // INIT + //-------------------------------------------- + + $login_id = intval(ipsRegistry::$request['login_id']); + $login_title = trim( ipsRegistry::$request['login_title'] ); + $login_description = trim( IPSText::stripslashes( IPSText::UNhtmlspecialchars($_POST['login_description'])) ); + $login_folder_name = trim( ipsRegistry::$request['login_folder_name'] ); + $login_maintain_url = trim( ipsRegistry::$request['login_maintain_url'] ); + $login_register_url = trim( ipsRegistry::$request['login_register_url'] ); + $login_alt_login_html = trim( IPSText::stripslashes( IPSText::UNhtmlspecialchars($_POST['login_alt_login_html'])) ); + $login_alt_acp_html = trim( IPSText::stripslashes( IPSText::UNhtmlspecialchars($_POST['login_alt_acp_html'])) ); + $login_enabled = intval(ipsRegistry::$request['login_enabled']); + $login_settings = intval(ipsRegistry::$request['login_settings']); + $login_replace_form = intval(ipsRegistry::$request['login_replace_form']); + $login_safemode = intval(ipsRegistry::$request['login_safemode']); + $login_login_url = trim( ipsRegistry::$request['login_login_url'] ); + $login_logout_url = trim( ipsRegistry::$request['login_logout_url'] ); + $login_complete_page = trim( ipsRegistry::$request['login_complete_page'] ); + $login_user_id = in_array( ipsRegistry::$request['login_user_id'], array( 'username', 'email', 'either' ) ) ? ipsRegistry::$request['login_user_id'] : 'username'; + + //-------------------------------------------- + // Checks... + //-------------------------------------------- + + if ( $type == 'edit' ) + { + if ( ! $login_id ) + { + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_404']; + $this->_loginList(); + return; + } + } + + if ( ! $login_title OR ! $login_folder_name ) + { + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_form']; + $this->_loginForm( $type ); + return; + } + + //-------------------------------------------- + // Save... + //-------------------------------------------- + + $array = array( 'login_title' => $login_title, + 'login_description' => $login_description, + 'login_folder_name' => $login_folder_name, + 'login_maintain_url' => $login_maintain_url, + 'login_register_url' => $login_register_url, + 'login_alt_login_html' => $login_alt_login_html, + 'login_alt_acp_html' => $login_alt_acp_html, + 'login_enabled' => $login_enabled, + 'login_settings' => $login_settings, + 'login_replace_form' => $login_replace_form, + 'login_logout_url' => $login_logout_url, + 'login_login_url' => $login_login_url, + 'login_user_id' => $login_user_id + ); + + //-------------------------------------------- + // In DEV? + //-------------------------------------------- + + if ( IN_DEV ) + { + $array['login_safemode'] = $login_safemode; + } + + //-------------------------------------------- + // Nike.. do it + //-------------------------------------------- + + if ( $type == 'add' ) + { + $this->DB->insert( 'login_methods', $array ); + + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_added']; + } + else + { + $this->DB->update( 'login_methods', $array, 'login_id='.$login_id ); + + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_edited']; + } + + if( $login_folder_name == 'ipconverge' ) + { + IPSLib::updateSettings( array( 'ipconverge_enabled' => $login_enabled ) ); + } + + //----------------------------------------- + // Recache + //----------------------------------------- + + $this->loginsRecache(); + + $this->_loginList(); + } + + /** + * Shows the login method form [add,edit] + * + * @param string Add or Edit flag + * @return void [Outputs to screen] + */ + private function _loginForm( $type='add' ) + { + //----------------------------------------- + // Init Vars + //----------------------------------------- + + $login_id = intval(ipsRegistry::$request['login_id']); + + //----------------------------------------- + // Check (please?) + //----------------------------------------- + + if ( $type == 'add' ) + { + $formcode = 'login_add_do'; + $title = $this->lang->words['l_registernew']; + $button = $this->lang->words['l_registernew']; + } + else + { + $login = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_id='.$login_id ) ); + + if ( ! $login['login_id'] ) + { + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_404']; + $this->_loginList(); + return; + } + + $formcode = 'login_edit_do'; + $title = $this->lang->words['editloginmethod'] . $login['login_title']; + $button = $this->lang->words['sl_form_edit_button']; + } + + //----------------------------------------- + // Form elements + //----------------------------------------- + + $valid_types = array( array( 'username', $this->lang->words['l_username'] ), array( 'email', $this->lang->words['l_email'] ), array( 'either', $this->lang->words['l_username_or_email'] ) ); + $form = array(); + + $form['login_title'] = ipsRegistry::getClass('output')->formInput( 'login_title' , $_POST['login_title'] ? $_POST['login_title'] : $login['login_title'] ); + $form['login_description'] = ipsRegistry::getClass('output')->formInput( 'login_description' , IPSText::htmlspecialchars( $_POST['login_description'] ? $_POST['login_description'] : $login['login_description'] ) ); + $form['login_folder_name'] = ipsRegistry::getClass('output')->formInput( 'login_folder_name' , $_POST['login_folder_name'] ? $_POST['login_folder_name'] : $login['login_folder_name'] ); + $form['login_maintain_url'] = ipsRegistry::getClass('output')->formInput( 'login_maintain_url' , $_POST['login_maintain_url'] ? $_POST['login_maintain_url'] : $login['login_maintain_url'] ); + $form['login_register_url'] = ipsRegistry::getClass('output')->formInput( 'login_register_url' , $_POST['login_register_url'] ? $_POST['login_register_url'] : $login['login_register_url'] ); + $form['login_login_url'] = ipsRegistry::getClass('output')->formInput( 'login_login_url' , $_POST['login_login_url'] ? $_POST['login_login_url'] : $login['login_login_url'] ); + $form['login_logout_url'] = ipsRegistry::getClass('output')->formInput( 'login_logout_url' , $_POST['login_logout_url'] ? $_POST['login_logout_url'] : $login['login_logout_url'] ); + $form['login_enabled'] = ipsRegistry::getClass('output')->formYesNo( 'login_enabled' , $_POST['login_enabled'] ? $_POST['login_enabled'] : $login['login_enabled'] ); + $form['login_settings'] = ipsRegistry::getClass('output')->formYesNo( 'login_settings' , $_POST['login_settings'] ? $_POST['login_settings'] : $login['login_settings'] ); + $form['login_register_url'] = ipsRegistry::getClass('output')->formInput( 'login_register_url' , $_POST['login_register_url'] ? $_POST['login_register_url'] : $login['login_register_url'] ); + $form['login_replace_form'] = ipsRegistry::getClass('output')->formYesNo( 'login_replace_form' , $_POST['login_replace_form'] ? $_POST['login_replace_form'] : $login['login_replace_form'] ); + $form['login_alt_login_html'] = ipsRegistry::getClass('output')->formTextarea( 'login_alt_login_html' , IPSText::htmlspecialchars( $_POST['login_alt_login_html'] ? $_POST['login_alt_login_html'] : $login['login_alt_login_html'] ) ); + $form['login_alt_acp_html'] = ipsRegistry::getClass('output')->formTextarea( 'login_alt_acp_html' , IPSText::htmlspecialchars( $_POST['login_alt_acp_html'] ? $_POST['login_alt_acp_html'] : $login['login_alt_acp_html'] ) ); + $form['login_user_id'] = ipsRegistry::getClass('output')->formDropdown( 'login_user_id' , $valid_types, $_POST['login_user_id'] ? $_POST['login_user_id'] : $login['login_user_id'] ); + + if ( IN_DEV ) + { + $form['login_safemode'] = ipsRegistry::getClass('output')->formYesNo( 'login_safemode' , $_POST['login_safemode'] ? $_POST['login_safemode'] : $login['login_safemode'] ); + } + + ipsRegistry::getClass('output')->html .= $this->html->login_form( $form, $title, $formcode, $button, $login ); + } + + /** + * Lists the login method overview screen + * + * @return void [Outputs to screen] + */ + private function _loginList() + { + //----------------------------------------- + // Output + //----------------------------------------- + + ipsRegistry::getClass('output')->nav[] = array( $this->form_code, $this->lang->words['l_nav'] ); + + //----------------------------------------- + // INIT + //----------------------------------------- + + require_once( IPS_KERNEL_PATH . 'class_xml.php' ); + $xml = new class_xml(); + $xml->doc_type = IPS_DOC_CHAR_SET; + $content = ""; + $db_methods = array(); + $dir_methods = array(); + $installed = array(); + $missing = array(); + + //----------------------------------------- + // Get login methods from database + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'login_methods' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $r['login_installed'] = 1; + $db_methods[ $r['login_order'] ] = $r; + $installed[] = $r['login_folder_name']; + } + + ksort( $db_methods ); + + //----------------------------------------- + // Now get the available login methods + //----------------------------------------- + + $dh = opendir( IPS_PATH_CUSTOM_LOGIN ); + + if ( $dh !== false ) + { + while ( false !== ($file = readdir($dh) ) ) + { + if( is_dir( IPS_PATH_CUSTOM_LOGIN . '/' . $file ) AND !in_array( $file, array( '.', '..', '.svn', '.DS_Store', '_vti_cnf' ) ) ) + { + $data = array( 'login_title' => $file, 'login_folder_name' => $file ); + + if( file_exists( IPS_PATH_CUSTOM_LOGIN . '/' . $file . '/loginauth_install.xml' ) ) + { + $file_content = file_get_contents( IPS_PATH_CUSTOM_LOGIN . '/' . $file . '/loginauth_install.xml' ); + + $xml->xml_parse_document( $file_content ); + + if( is_array($xml->xml_array['export']['group']['row']) ) + { + foreach( $xml->xml_array['export']['group']['row'] as $f => $entry ) + { + if( is_array($entry) ) + { + foreach( $entry as $k => $v ) + { + if ( $f == 'VALUE' or $f == 'login_id' ) + { + continue; + } + + $data[ $f ] = $v; + } + } + } + } + } + + $data['acp_plugin'] = 0; + + if( file_exists( IPS_PATH_CUSTOM_LOGIN . '/' . $file . '/acp.php' ) ) + { + if ( file_exists( IPS_PATH_CUSTOM_LOGIN . '/' . $file . '/conf.php' ) ) + { + $data['acp_plugin'] = 1; + } + else if ( file_exists( IPS_PATH_CUSTOM_LOGIN . '/' . $file . '/conf.dist.php' ) ) + { + $missing[] = IPS_PATH_CUSTOM_LOGIN . '/' . $file . '/'; + } + } + + $dir_methods[ $file ] = $data; + } + } + + closedir( $dh ); + } + + //----------------------------------------- + // Got some folders with the .dist.php files? + //----------------------------------------- + + if ( count( $missing ) ) + { + $this->registry->output->showError( sprintf( $this->lang->words['l_rename_conf'], implode( "
  • ", $missing ) ) ); + } + + //----------------------------------------- + // First...we show installed methods + //----------------------------------------- + + $content .= $this->html->login_subheader( $this->lang->words['l_installed'] ); + $dbm_count = 0; + + if( count($db_methods ) ) + { + foreach( $db_methods as $r ) + { + $dbm_count++; + + $r['_enabled_img'] = $r['login_enabled'] ? 'tick.png' : 'cross.png'; + $r['acp_plugin'] = $dir_methods[ $r['login_folder_name'] ]['acp_plugin']; + + $content .= $this->html->login_row($r); + } + } + + if( !$dbm_count ) + { + $content .= $this->html->login_norow( "installed" ); + } + + //----------------------------------------- + // Then the ones not installed + //----------------------------------------- + + $content .= $this->html->login_subheader( $this->lang->words['l_others'] ); + $dm_count = 0; + + if( count( $dir_methods ) ) + { + foreach( $dir_methods as $r ) + { + if( in_array( $r['login_folder_name'], $installed ) ) + { + continue; + } + + $dm_count++; + + // Need to set a bogus login id to ensure HTML ids are unique for the javascript + $r['login_id'] = str_replace( '.', '', uniqid( 'abc', true ) ); + + $r['_enabled_img'] = 'cross.png'; + + $content .= $this->html->login_row($r); + } + } + + if( !$dm_count ) + { + $content .= $this->html->login_norow( "uninstalled" ); + } + + ipsRegistry::getClass('output')->html .= $this->html->login_overview( $content ); + } + + /** + * Toggle login method enabled/disabled + * + * @return void [Outputs to screen] + */ + private function _loginToggle() + { + //-------------------------------------------- + // INIT + //-------------------------------------------- + + $login_id = intval(ipsRegistry::$request['login_id']); + + $login = $this->DB->buildAndFetch( array( 'select' => 'login_id, login_enabled, login_folder_name', 'from' => 'login_methods', 'where' => 'login_id=' . $login_id ) ); + + if( !$login['login_id'] ) + { + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_404']; + $this->_loginList(); + return; + } + + if( $login['login_enabled'] ) + { + $toggle = $this->lang->words['l_disabled']; + + $this->DB->update( 'login_methods', array( 'login_enabled' => 0 ), 'login_id=' . $login_id ); + + if( $login['login_folder_name'] == 'ipconverge' ) + { + IPSLib::updateSettings( array( 'ipconverge_enabled' => 0 ) ); + } + } + else + { + $toggle = $this->lang->words['l_enabled']; + + $this->DB->update( 'login_methods', array( 'login_enabled' => 1 ), 'login_id=' . $login_id ); + + if( $login['login_folder_name'] == 'ipconverge' ) + { + IPSLib::updateSettings( array( 'ipconverge_enabled' => 1 ) ); + } + } + + //----------------------------------------- + // Recache + //----------------------------------------- + + $this->loginsRecache(); + + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_successfully'] . $toggle; + + $this->_loginList(); + } + + /** + * Uninstall a login method + * + * @return void [Outputs to screen] + */ + private function _loginUninstall() + { + //-------------------------------------------- + // INIT + //-------------------------------------------- + + $login_id = intval(ipsRegistry::$request['login_id']); + + $login = $this->DB->buildAndFetch( array( 'select' => 'login_id, login_enabled, login_folder_name', 'from' => 'login_methods', 'where' => 'login_id=' . $login_id ) ); + + if( !$login['login_id'] ) + { + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_404']; + $this->_loginList(); + return; + } + + $this->DB->delete( 'login_methods', 'login_id=' . $login_id ); + + if( $login['login_folder_name'] == 'ipconverge' ) + { + IPSLib::updateSettings( array( 'ipconverge_enabled' => 0 ) ); + } + + //----------------------------------------- + // Recache + //----------------------------------------- + + $this->loginsRecache(); + + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_uninstalled']; + + $this->_loginList(); + } + + /** + * Install a login method + * + * @return void [Outputs to screen] + */ + private function _loginInstall() + { + //-------------------------------------------- + // INIT + //-------------------------------------------- + + require_once( IPS_KERNEL_PATH . 'class_xml.php' ); + $xml = new class_xml(); + $xml->doc_type = IPS_DOC_CHAR_SET; + + $login_id = basename(ipsRegistry::$request['login_folder']); + + //----------------------------------------- + // Now get the XML data + //----------------------------------------- + + $dh = opendir( IPS_PATH_CUSTOM_LOGIN ); + + if ( $dh !== false ) + { + while ( false !== ($file = readdir($dh) ) ) + { + if( is_dir( IPS_PATH_CUSTOM_LOGIN . '/' . $file ) AND $file == $login_id ) + { + if( file_exists( IPS_PATH_CUSTOM_LOGIN . '/' . $file . '/loginauth_install.xml' ) ) + { + $file_content = file_get_contents( IPS_PATH_CUSTOM_LOGIN . '/' . $file . '/loginauth_install.xml' ); + + $xml->xml_parse_document( $file_content ); + + if( is_array($xml->xml_array['export']['group']['row']) ) + { + foreach( $xml->xml_array['export']['group']['row'] as $f => $entry ) + { + if( is_array($entry) ) + { + foreach( $entry as $k => $v ) + { + if ( $f == 'VALUE' or $f == 'login_id' ) + { + continue; + } + + $data[ $f ] = $v; + } + } + } + } + } + else + { + closedir( $dh ); + + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_installer404']; + $this->_loginList(); + return; + } + + $dir_methods[ $file ] = $data; + + break; + } + } + + closedir( $dh ); + } + + if( !is_array($dir_methods) OR !count($dir_methods) ) + { + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_installer404']; + $this->_loginList(); + return; + } + + //----------------------------------------- + // Now verify it isn't installed + //----------------------------------------- + + $login = $this->DB->buildAndFetch( array( 'select' => 'login_id', 'from' => 'login_methods', 'where' => "login_folder_name='" . $login_id . "'" ) ); + + if( $login['login_id'] ) + { + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_already']; + $this->_loginList(); + return; + } + + //----------------------------------------- + // Get the highest order and insert method + //----------------------------------------- + + $max = $this->DB->buildAndFetch( array( 'select' => 'MAX(login_order) as highest_order', 'from' => 'login_methods' ) ); + + $dir_methods[ $login_id ]['login_order'] = $max['highest_order'] + 1; + + $this->DB->insert( 'login_methods', $dir_methods[ $login_id ] ); + + //----------------------------------------- + // Recache + //----------------------------------------- + + $this->loginsRecache(); + + ipsRegistry::getClass('output')->global_message = $this->lang->words['l_yesinstalled']; + + $this->_loginList(); + } + + /** + * Reorder a login method + * + * @return void [Outputs to screen] + */ + private function _loginReorder() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' ); + $ajax = new $classToLoad(); + + //----------------------------------------- + // Checks... + //----------------------------------------- + + if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) + { + $ajax->returnString( $this->lang->words['postform_badmd5'] ); + exit(); + } + + //----------------------------------------- + // Save new position + //----------------------------------------- + + $position = 1; + + if( is_array($this->request['logins']) AND count($this->request['logins']) ) + { + foreach( $this->request['logins'] as $this_id ) + { + $this->DB->update( 'login_methods', array( 'login_order' => $position ), 'login_id=' . $this_id ); + + $position++; + } + } + + $this->loginsRecache(); + + $ajax->returnString( 'OK' ); + exit(); + } + + /** + * Updates cache store record + * + * @return boolean Cache store updated successfully + */ + public function loginsRecache() + { + $cache = array(); + + $this->DB->build( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_enabled=1', 'order' => 'login_order ASC' ) ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $cache[ $r['login_id'] ] = $r; + } + + ipsRegistry::cache()->setCache( 'login_methods', $cache, array( 'array' => 1 ) ); + } +} \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/tools/logsSplash.php b/upload/admin/applications/core/modules_admin/tools/logsSplash.php index 2049117e..4f8a78a7 100644 --- a/upload/admin/applications/core/modules_admin/tools/logsSplash.php +++ b/upload/admin/applications/core/modules_admin/tools/logsSplash.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Log Splash Screen - * Last Updated: $LastChangedDate: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th January 2004 - * @version $Rev: 3887 $ + * @version $Rev: 5713 $ */ if ( ! defined( 'IN_ACP' ) ) diff --git a/upload/admin/applications/core/modules_admin/tools/performance.php b/upload/admin/applications/core/modules_admin/tools/performance.php index 572ce867..294d768c 100644 --- a/upload/admin/applications/core/modules_admin/tools/performance.php +++ b/upload/admin/applications/core/modules_admin/tools/performance.php @@ -1,456 +1,459 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - - -class admin_core_tools_performance extends ipsCommand -{ - /** - * Settings to ENABLE - * - * @access private - * @var array - */ - private $settingsEnable = array( 'live_search_disable', 'no_au_forum', 'no_au_topic', 'disable_summary' ); - - /** - * Settings to DISABLE - * - * @access private - * @var array - */ - private $settingsDisable = array( 'spider_visit', 'custom_profile_topic', 'update_topic_views_immediately', 'show_user_posted', - 'show_active', 'allow_search', 'topic_marking_enable' ); - - /** - * Group settings to ENABLE - * - * @access private - * @var array - */ - private $groupEnable = array(); - - /** - * Group settings to DISABLE - * - * @access private - * @var array - */ - private $groupDisable = array( 'g_mem_info', 'g_can_add_friends', 'g_email_friend' ); - - /** - * Other stuff to do...(custom coded) - * - * @access private - * @var array - */ - private $otherDisable = array( 'module__disable_pms', 'module__disable_online', 'disable_calendar', 'disable_hooks' ); - - /** - * HTML object - * - * @access private - * @var object - **/ - private $html; - - /** - * Current performance settings - * - * @access private - * @var array - */ - private $current = array(); - - /**#@+ - * URL bits - * - * @access public - * @var string - */ - public $form_code = ''; - public $form_code_js = ''; - /**#@-*/ - - /** - * Main entry point - * - * @access public - * @param object ipsRegistry reference - * @return void - */ - public function doExecute( ipsRegistry $registry ) - { - /* Load lang and skin */ - $this->registry->class_localization->loadLanguageFile( array( 'admin_tools' ) ); - $this->html = $this->registry->output->loadTemplate( 'cp_skin_performance' ); - - /* URLs */ - $this->form_code = $this->html->form_code = 'module=tools&section=performance'; - $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=performance'; - - /* Get current */ - $this->getSettings(); - - /* What to do */ - switch( $this->request['do'] ) - { - case 'toggle': - $this->toggle(); - break; - - case 'overview': - default: - $this->overview(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Toggle on/off - * - * @access public - * @return void - * @author Brandon - */ - public function toggle() - { - $nowEnabled = count($this->current) ? false : true; - $results = array(); - $stored = array(); - - /** - * Are we turning it ON - */ - if( $nowEnabled ) - { - /** - * Enable any settings after storing current value - */ - foreach( $this->settingsEnable as $settingKey ) - { - $stored['settingsEnable'][ $settingKey ] = $this->settings[ $settingKey ]; - - if( !$this->settings[ $settingKey ] ) - { - $results[] = sprintf( $this->lang->words['perf_enabled_setting'], $settingKey ); - } - - $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => 1 ), "conf_key='" . $settingKey . "'" ); - } - - /** - * Disable any settings after storing current value - */ - foreach( $this->settingsDisable as $settingKey ) - { - $stored['settingsDisable'][ $settingKey ] = $this->settings[ $settingKey ]; - - if( $this->settings[ $settingKey ] ) - { - $results[] = sprintf( $this->lang->words['perf_disabled_setting'], $settingKey ); - } - - $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => 0 ), "conf_key='" . $settingKey . "'" ); - } - - /** - * Enable appropriate group settings - */ - if( count($this->groupEnable) ) - { - foreach( $this->groupEnable as $settingKey ) - { - foreach( $this->cache->getCache('group_cache') as $gid => $group ) - { - $results[] = sprintf( $this->lang->words['perf_enabled_group'], $settingKey, $group['g_title'] ); - - $stored['groupEnable'][ $gid ][ $settingKey ] = $group[ $settingKey ]; - - $this->DB->update( 'groups', array( $settingKey => 1 ), "g_id=" . $gid ); - } - } - } - - /** - * Disable appropriate group settings - */ - if( count($this->groupDisable) ) - { - foreach( $this->groupDisable as $settingKey ) - { - foreach( $this->cache->getCache('group_cache') as $gid => $group ) - { - $results[] = sprintf( $this->lang->words['perf_disabled_group'], $settingKey, $group['g_title'] ); - - $stored['groupDisable'][ $gid ][ $settingKey ] = $group[ $settingKey ]; - - $this->DB->update( 'groups', array( $settingKey => 0 ), "g_id=" . $gid ); - } - } - } - - /** - * And anything else.. - */ - foreach( $this->otherDisable as $doIt ) - { - switch( $doIt ) - { - case 'module__disable_pms': - foreach( ipsRegistry::$modules['members'] as $module ) - { - if( $module['sys_module_key'] == 'messaging' ) - { - $stored['other']['module__disable_pms'] = $module['sys_module_visible']; - break; - } - } - - $this->DB->update( 'core_sys_module', array( 'sys_module_visible' => 0 ), "sys_module_key='messaging'" ); - $results[] = $this->lang->words['perf_dispms']; - break; - - case 'module__disable_online': - foreach( ipsRegistry::$modules['members'] as $module ) - { - if( $module['sys_module_key'] == 'online' ) - { - $stored['other']['module__disable_online'] = $module['sys_module_visible']; - break; - } - } - - $this->DB->update( 'core_sys_module', array( 'sys_module_visible' => 0 ), "sys_module_key='online'" ); - $results[] = $this->lang->words['perf_disonline']; - break; - - case 'disable_calendar': - foreach( ipsRegistry::$applications as $app ) - { - if( $app['app_directory'] == 'calendar' ) - { - $stored['other']['disable_calendar'] = $app['app_enabled']; - break; - } - } - - $this->DB->update( 'core_applications', array( 'app_enabled' => 0 ), "app_directory='calendar'" ); - $results[] = $this->lang->words['perf_discal']; - break; - - case 'disable_hooks': - $this->DB->build( array( 'select' => 'hook_id, hook_enabled', 'from' => 'core_hooks' ) ); - $this->DB->execute(); - - while( $hook = $this->DB->fetch() ) - { - $stored['other']['disable_hooks'][ $hook['hook_id'] ] = $hook['hook_enabled']; - } - - $this->DB->update( 'core_hooks', array( 'hook_enabled' => 0 ) ); - $results[] = $this->lang->words['perf_dishooks']; - break; - } - } - - /** - * And finally store in cache - */ - $this->cache->setCache( 'performanceCache', $stored, array( 'array' => 1 ) ); - } - /** - * We're turning it off - */ - else - { - /** - * Reset the "enable settings" value - */ - foreach( $this->current['settingsEnable'] as $k => $v ) - { - if( !$v ) - { - $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => 0 ), "conf_key='" . $k . "'" ); - - $results[] = sprintf( $this->lang->words['perf_disabled_setting'], $k ); - } - } - - /** - * Reset the "disable settings" value - */ - foreach( $this->current['settingsDisable'] as $k => $v ) - { - if( $v ) - { - $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => 1 ), "conf_key='" . $k . "'" ); - - $results[] = sprintf( $this->lang->words['perf_enabled_setting'], $k ); - } - } - - /** - * Reset the "enable group setting" value - */ - if( count($this->current['groupEnable']) ) - { - foreach( $this->current['groupEnable'] as $gid => $data ) - { - foreach( $data as $k => $v ) - { - if( !$v ) - { - $this->DB->update( 'groups', array( $k => 0 ), "g_id=" . $gid ); - - $results[] = sprintf( $this->lang->words['perf_disabled_group'], $k, $this->caches['group_cache'][ $gid ]['g_title'] ); - } - } - } - } - - /** - * Reset the "disable settings" value - */ - if( count($this->current['groupDisable']) ) - { - foreach( $this->current['groupDisable'] as $gid => $data ) - { - foreach( $data as $k => $v ) - { - if( $v ) - { - $this->DB->update( 'groups', array( $k => 1 ), "g_id=" . $gid ); - - $results[] = sprintf( $this->lang->words['perf_enabled_group'], $k, $this->caches['group_cache'][ $gid ]['g_title'] ); - } - } - } - } - - /** - * And anything else.. - */ - foreach( $this->otherDisable as $doIt ) - { - switch( $doIt ) - { - case 'module__disable_pms': - $previous = $this->current['other']['module__disable_pms']; - - if( $previous ) - { - $this->DB->update( 'core_sys_module', array( 'sys_module_visible' => 1 ), "sys_module_key='messaging'" ); - $results[] = $this->lang->words['perf_enpms']; - } - break; - - case 'module__disable_online': - $previous = $this->current['other']['module__disable_online']; - - if( $previous ) - { - $this->DB->update( 'core_sys_module', array( 'sys_module_visible' => 1 ), "sys_module_key='online'" ); - $results[] = $this->lang->words['perf_enonline']; - } - break; - - case 'disable_calendar': - $previous = $this->current['other']['disable_calendar']; - - if( $previous ) - { - $this->DB->update( 'core_applications', array( 'app_enabled' => 1 ), "app_directory='calendar'" ); - $results[] = $this->lang->words['perf_encal']; - } - break; - - case 'disable_hooks': - if( count($this->current['other']['disable_hooks']) ) - { - foreach( $this->current['other']['disable_hooks'] as $hookId => $hookEnabled ) - { - if( !$hookId ) - { - continue; - } - - $this->DB->update( 'core_hooks', array( 'hook_enabled' => $hookEnabled ), "hook_id=" . $hookId ); - } - } - - $results[] = $this->lang->words['perf_enhooks']; - break; - } - } - - /** - * And finally remove from DB - */ - $this->DB->delete( 'cache_store', "cs_key='performanceCache'" ); - } - - /** - * Need to rebuild some caches now... - */ - $this->cache->rebuildCache( 'settings', 'global' ); - $this->cache->rebuildCache( 'group_cache', 'global' ); - $this->cache->rebuildCache( 'app_cache', 'global' ); - $this->cache->rebuildCache( 'module_cache', 'global' ); - $this->cache->rebuildCache( 'hooks', 'global' ); - - /* Output */ - $this->registry->output->html .= $this->html->toggleResults( $nowEnabled, $results ); - } - - /** - * List current status/data - * - * @access public - * @return void - */ - public function overview() - { - /* Output */ - $this->registry->output->html .= $this->html->overview( count($this->current) ? true : false ); - } - - /** - * Retrieve current cached performance settings. - * Leaves array blank if currently "off" - * - * @access private - * @return void - */ - private function getSettings() - { - $record = $this->cache->getCache('performanceCache'); - - if( is_array($record) AND count($record) ) - { - $this->current = $record; - } - } + + * Invision Power Services + * IP.Board v3.1.4 + * Toggle performance mode on/off + * Last Updated: $LastChangedDate: 2010-06-01 18:11:37 -0400 (Tue, 01 Jun 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 6435 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class admin_core_tools_performance extends ipsCommand +{ + /** + * Settings to ENABLE + * + * @access private + * @var array + */ + private $settingsEnable = array( 'live_search_disable', 'no_au_forum', 'no_au_topic', 'disable_summary', 'topic_marking_noquery' ); + + /** + * Settings to DISABLE + * + * @access private + * @var array + */ + private $settingsDisable = array( 'spider_visit', 'custom_profile_topic', 'update_topic_views_immediately', 'show_user_posted', + 'show_active', 'allow_search', 'topic_marking_enable' ); + + /** + * Group settings to ENABLE + * + * @access private + * @var array + */ + private $groupEnable = array(); + + /** + * Group settings to DISABLE + * + * @access private + * @var array + */ + private $groupDisable = array( 'g_mem_info', 'g_can_add_friends', 'g_email_friend' ); + + /** + * Other stuff to do...(custom coded) + * + * @access private + * @var array + */ + private $otherDisable = array( 'module__disable_pms', 'module__disable_online', 'disable_calendar', 'disable_hooks' ); + + /** + * HTML object + * + * @access private + * @var object + **/ + private $html; + + /** + * Current performance settings + * + * @access private + * @var array + */ + private $current = array(); + + /**#@+ + * URL bits + * + * @access public + * @var string + */ + public $form_code = ''; + public $form_code_js = ''; + /**#@-*/ + + /** + * Main entry point + * + * @access public + * @param object ipsRegistry reference + * @return void + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load lang and skin */ + $this->registry->class_localization->loadLanguageFile( array( 'admin_tools' ) ); + $this->html = $this->registry->output->loadTemplate( 'cp_skin_performance' ); + + /* URLs */ + $this->form_code = $this->html->form_code = 'module=tools&section=performance'; + $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=performance'; + + /* Get current */ + $this->getSettings(); + + /* What to do */ + switch( $this->request['do'] ) + { + case 'toggle': + $this->toggle(); + break; + + case 'overview': + default: + $this->overview(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Toggle on/off + * + * @access public + * @return void + * @author Brandon + */ + public function toggle() + { + $nowEnabled = count($this->current) ? false : true; + $results = array(); + $stored = array(); + + /** + * Are we turning it ON + */ + if( $nowEnabled ) + { + /** + * Enable any settings after storing current value + */ + foreach( $this->settingsEnable as $settingKey ) + { + $stored['settingsEnable'][ $settingKey ] = $this->settings[ $settingKey ]; + + if( !$this->settings[ $settingKey ] ) + { + $results[] = sprintf( $this->lang->words['perf_enabled_setting'], $settingKey ); + } + + $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => 1 ), "conf_key='" . $settingKey . "'" ); + } + + /** + * Disable any settings after storing current value + */ + foreach( $this->settingsDisable as $settingKey ) + { + $stored['settingsDisable'][ $settingKey ] = $this->settings[ $settingKey ]; + + if( $this->settings[ $settingKey ] ) + { + $results[] = sprintf( $this->lang->words['perf_disabled_setting'], $settingKey ); + } + + $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => 0 ), "conf_key='" . $settingKey . "'" ); + } + + /** + * Enable appropriate group settings + */ + if( count($this->groupEnable) ) + { + foreach( $this->groupEnable as $settingKey ) + { + foreach( $this->cache->getCache('group_cache') as $gid => $group ) + { + $results[] = sprintf( $this->lang->words['perf_enabled_group'], $settingKey, $group['g_title'] ); + + $stored['groupEnable'][ $gid ][ $settingKey ] = $group[ $settingKey ]; + + $this->DB->update( 'groups', array( $settingKey => 1 ), "g_id=" . $gid ); + } + } + } + + /** + * Disable appropriate group settings + */ + if( count($this->groupDisable) ) + { + foreach( $this->groupDisable as $settingKey ) + { + foreach( $this->cache->getCache('group_cache') as $gid => $group ) + { + $results[] = sprintf( $this->lang->words['perf_disabled_group'], $settingKey, $group['g_title'] ); + + $stored['groupDisable'][ $gid ][ $settingKey ] = $group[ $settingKey ]; + + $this->DB->update( 'groups', array( $settingKey => 0 ), "g_id=" . $gid ); + } + } + } + + /** + * And anything else.. + */ + foreach( $this->otherDisable as $doIt ) + { + switch( $doIt ) + { + case 'module__disable_pms': + foreach( ipsRegistry::$modules['members'] as $module ) + { + if( $module['sys_module_key'] == 'messaging' ) + { + $stored['other']['module__disable_pms'] = $module['sys_module_visible']; + break; + } + } + + $this->DB->update( 'core_sys_module', array( 'sys_module_visible' => 0 ), "sys_module_key='messaging'" ); + $results[] = $this->lang->words['perf_dispms']; + break; + + case 'module__disable_online': + foreach( ipsRegistry::$modules['members'] as $module ) + { + if( $module['sys_module_key'] == 'online' ) + { + $stored['other']['module__disable_online'] = $module['sys_module_visible']; + break; + } + } + + $this->DB->update( 'core_sys_module', array( 'sys_module_visible' => 0 ), "sys_module_key='online'" ); + $results[] = $this->lang->words['perf_disonline']; + break; + + case 'disable_calendar': + foreach( ipsRegistry::$applications as $app ) + { + if( $app['app_directory'] == 'calendar' ) + { + $stored['other']['disable_calendar'] = $app['app_enabled']; + break; + } + } + + $this->DB->update( 'core_applications', array( 'app_enabled' => 0 ), "app_directory='calendar'" ); + $results[] = $this->lang->words['perf_discal']; + break; + + case 'disable_hooks': + $this->DB->build( array( 'select' => 'hook_id, hook_enabled', 'from' => 'core_hooks' ) ); + $this->DB->execute(); + + while( $hook = $this->DB->fetch() ) + { + $stored['other']['disable_hooks'][ $hook['hook_id'] ] = $hook['hook_enabled']; + } + + $this->DB->update( 'core_hooks', array( 'hook_enabled' => 0 ) ); + $results[] = $this->lang->words['perf_dishooks']; + break; + } + } + + /** + * And finally store in cache + */ + $this->cache->setCache( 'performanceCache', $stored, array( 'array' => 1 ) ); + } + /** + * We're turning it off + */ + else + { + /** + * Reset the "enable settings" value + */ + foreach( $this->current['settingsEnable'] as $k => $v ) + { + if( !$v ) + { + $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => 0 ), "conf_key='" . $k . "'" ); + + $results[] = sprintf( $this->lang->words['perf_disabled_setting'], $k ); + } + } + + /** + * Reset the "disable settings" value + */ + foreach( $this->current['settingsDisable'] as $k => $v ) + { + if( $v ) + { + $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => 1 ), "conf_key='" . $k . "'" ); + + $results[] = sprintf( $this->lang->words['perf_enabled_setting'], $k ); + } + } + + /** + * Reset the "enable group setting" value + */ + if( count($this->current['groupEnable']) ) + { + foreach( $this->current['groupEnable'] as $gid => $data ) + { + foreach( $data as $k => $v ) + { + if( !$v ) + { + $this->DB->update( 'groups', array( $k => 0 ), "g_id=" . $gid ); + + $results[] = sprintf( $this->lang->words['perf_disabled_group'], $k, $this->caches['group_cache'][ $gid ]['g_title'] ); + } + } + } + } + + /** + * Reset the "disable settings" value + */ + if( count($this->current['groupDisable']) ) + { + foreach( $this->current['groupDisable'] as $gid => $data ) + { + foreach( $data as $k => $v ) + { + if( $v ) + { + $this->DB->update( 'groups', array( $k => 1 ), "g_id=" . $gid ); + + $results[] = sprintf( $this->lang->words['perf_enabled_group'], $k, $this->caches['group_cache'][ $gid ]['g_title'] ); + } + } + } + } + + /** + * And anything else.. + */ + foreach( $this->otherDisable as $doIt ) + { + switch( $doIt ) + { + case 'module__disable_pms': + $previous = $this->current['other']['module__disable_pms']; + + if( $previous ) + { + $this->DB->update( 'core_sys_module', array( 'sys_module_visible' => 1 ), "sys_module_key='messaging'" ); + $results[] = $this->lang->words['perf_enpms']; + } + break; + + case 'module__disable_online': + $previous = $this->current['other']['module__disable_online']; + + if( $previous ) + { + $this->DB->update( 'core_sys_module', array( 'sys_module_visible' => 1 ), "sys_module_key='online'" ); + $results[] = $this->lang->words['perf_enonline']; + } + break; + + case 'disable_calendar': + $previous = $this->current['other']['disable_calendar']; + + if( $previous ) + { + $this->DB->update( 'core_applications', array( 'app_enabled' => 1 ), "app_directory='calendar'" ); + $results[] = $this->lang->words['perf_encal']; + } + break; + + case 'disable_hooks': + if( count($this->current['other']['disable_hooks']) ) + { + foreach( $this->current['other']['disable_hooks'] as $hookId => $hookEnabled ) + { + if( !$hookId ) + { + continue; + } + + $this->DB->update( 'core_hooks', array( 'hook_enabled' => $hookEnabled ), "hook_id=" . $hookId ); + } + } + + $results[] = $this->lang->words['perf_enhooks']; + break; + } + } + + /** + * And finally remove from DB + */ + $this->cache->setCache( 'performanceCache', '' ); + //$this->DB->delete( 'cache_store', "cs_key='performanceCache'" ); + } + + /** + * Need to rebuild some caches now... + */ + $this->cache->rebuildCache( 'settings', 'global' ); + $this->cache->rebuildCache( 'group_cache', 'global' ); + $this->cache->rebuildCache( 'app_cache', 'global' ); + $this->cache->rebuildCache( 'module_cache', 'global' ); + $this->cache->rebuildCache( 'hooks', 'global' ); + + /* Output */ + $this->registry->output->html .= $this->html->toggleResults( $nowEnabled, $results ); + } + + /** + * List current status/data + * + * @access public + * @return void + */ + public function overview() + { + /* Output */ + $this->registry->output->html .= $this->html->overview( count($this->current) ? true : false ); + } + + /** + * Retrieve current cached performance settings. + * Leaves array blank if currently "off" + * + * @access private + * @return void + */ + private function getSettings() + { + $record = $this->cache->getCache('performanceCache'); + + if( is_array($record) AND count($record) ) + { + $this->current = $record; + } + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/tools/qanda.php b/upload/admin/applications/core/modules_admin/tools/qanda.php index 4b657a90..8f4fc0d4 100644 --- a/upload/admin/applications/core/modules_admin/tools/qanda.php +++ b/upload/admin/applications/core/modules_admin/tools/qanda.php @@ -1,276 +1,278 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - - -class admin_core_tools_qanda extends ipsCommand -{ - /** - * HTML object - * - * @access private - * @var object - */ - private $html; - - /** - * Main entry point - * - * @access public - * @param object ipsRegistry reference - * @return void - */ - public function doExecute( ipsRegistry $registry ) - { - /* Load lang and skin */ - $this->registry->class_localization->loadLanguageFile( array( 'admin_tools' ) ); - $this->html = $this->registry->output->loadTemplate( 'cp_skin_qanda' ); - - /* URLs */ - $this->form_code = $this->html->form_code = 'module=tools&section=qanda'; - $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=qanda'; - - /* What to do */ - switch( $this->request['do'] ) - { - case 'edit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'qa_manage' ); - $this->showForm( 'edit' ); - break; - - case 'new': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'qa_manage' ); - $this->showForm( 'new' ); - break; - - case 'doedit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'qa_manage' ); - $this->saveForm( 'edit' ); - break; - - case 'donew': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'qa_manage' ); - $this->saveForm( 'new' ); - break; - - case 'remove': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'qa_remove' ); - $this->remove(); - break; - - case 'switchOn': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'qa_manage' ); - $this->_switchOn(); - case 'overview': - default: - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'qa_manage' ); - $this->overview(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - - /** - * Toggles the setting 'registration_qanda' - * - * @access private - * @return void - * @author Brandon - */ - private function _switchOn() - { - /* Switch it on */ - IPSLib::updateSettings( array( 'registration_qanda' => 1 ) ); - - /* Done */ - $this->registry->output->silentRedirect( $this->settings['base_url'] . $this->form_code ); - } - - /** - * Removes a question - * - * @access public - * @return void - * @author Brandon - */ - public function remove() - { - /* Check ID */ - $id = intval( $this->request['id'] ); - - if( ! $id ) - { - $this->registry->output->showError( $this->lang->words['qa_noid'], 111155 ); - } - - /* Delete the record */ - $this->DB->delete( 'question_and_answer', "qa_id={$id}" ); - - /* Log and bounce */ - $this->registry->adminFunctions->saveAdminLog( $this->lang->words['qa_deleted'] ); - $this->registry->output->silentRedirect( $this->settings['base_url'] . $this->form_code ); - } - - /** - * List current questions - * - * @access public - * @return void - */ - public function overview() - { - /* Query Questions */ - $this->DB->build( array( 'select' => '*', 'from' => 'question_and_answer' ) ); - $this->DB->execute(); - - /* Do we have questions? */ - $rows = array(); - - if( $this->DB->getTotalRows() ) - { - while( $r = $this->DB->fetch() ) - { - /* Add to output array */ - $rows[] = $r; - } - } - - /* Output */ - $this->registry->output->html .= $this->html->overview( $rows ); - } - - /** - * Form for adding/editing questions - * - * @access public - * @param string Type [new|edit] - * @return void - */ - public function showForm( $type='new' ) - { - /* Edit Question */ - if( $type != 'new' ) - { - /* ID */ - $id = intval( $this->request['id'] ); - - if( ! $id ) - { - $this->registry->output->showError( $this->lang->words['qa_noeditid'], 111156 ); - } - - /* Query the question */ - $this->DB->build( array( 'select' => '*', 'from' => 'question_and_answer', 'where' => "qa_id=" . $id ) ); - $this->DB->execute(); - - /* Make sure we found one */ - if( ! $r = $this->DB->fetch() ) - { - $this->registry->output->showError( $this->lang->words['qa_404'], 111157 ); - } - - /* Text bits */ - $button = $this->lang->words['qa_editbutton']; - $code = 'doedit'; - } - else - { - /* Data */ - $r = array(); - $id = 0; - - /* Text Bits */ - $button = $this->lang->words['qa_addbutton']; - $code = 'donew'; - } - - /* Form Elements */ - $form = array(); - - $form['question'] = $this->registry->output->formTextarea( 'question', htmlspecialchars( $r['qa_question'], ENT_QUOTES ) ); - $form['answers'] = $this->registry->output->formTextarea( 'answers', htmlspecialchars( $r['qa_answers'], ENT_QUOTES ) ); - - /* Ouput */ - $this->registry->output->html .= $this->html->showForm( $code, $id, $form, $button ); - } - - /** - * Save the questions from the form - * - * @access public - * @param string Type [new|edit] - * @return void - */ - public function saveForm( $type='new' ) - { - /* Error Checking */ - if( ! $this->request['question']) - { - $this->registry->output->showError( $this->lang->words['qa_no_question'], 11150 ); - } - - if( ! $this->request['answers'] ) - { - $this->registry->output->showError( $this->lang->words['qa_no_answer'], 11150 ); - } - - /* Build DB Array */ - $db_array = array( - 'qa_question' => $_POST['question'], - 'qa_answers' => $_POST['answers'], - ); - - /* Insert question */ - if( $type == 'new' ) - { - /* Update the DB */ - $this->DB->insert( 'question_and_answer', $db_array ); - - $id = $this->DB->getInsertId(); - - /* Log */ - $this->registry->adminFunctions->saveAdminLog( $this->lang->words['qa_addlog'] ); - } - /* Update question */ - else - { - /* ID */ - $id = intval( $this->request['id'] ); - - if( ! $id ) - { - $this->registry->output->showError( $this->lang->words['qa_noeditid'], 111158 ); - } - - /* Update the DB */ - $this->DB->update( 'question_and_answer', $db_array, "qa_id={$id}" ); - - $this->registry->adminFunctions->saveAdminLog( $this->lang->words['qa_edited']); - } - - /* Bounce */ - $this->registry->output->silentRedirect( $this->settings['base_url'] . $this->form_code ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Registration question and answer challenges + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 5713 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class admin_core_tools_qanda extends ipsCommand +{ + /** + * HTML object + * + * @access private + * @var object + */ + private $html; + + /** + * Main entry point + * + * @access public + * @param object ipsRegistry reference + * @return void + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load lang and skin */ + $this->registry->class_localization->loadLanguageFile( array( 'admin_tools' ) ); + $this->html = $this->registry->output->loadTemplate( 'cp_skin_qanda' ); + + /* URLs */ + $this->form_code = $this->html->form_code = 'module=tools&section=qanda'; + $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=qanda'; + + /* What to do */ + switch( $this->request['do'] ) + { + case 'edit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'qa_manage' ); + $this->showForm( 'edit' ); + break; + + case 'new': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'qa_manage' ); + $this->showForm( 'new' ); + break; + + case 'doedit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'qa_manage' ); + $this->saveForm( 'edit' ); + break; + + case 'donew': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'qa_manage' ); + $this->saveForm( 'new' ); + break; + + case 'remove': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'qa_remove' ); + $this->remove(); + break; + + case 'switchOn': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'qa_manage' ); + $this->_switchOn(); + case 'overview': + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'qa_manage' ); + $this->overview(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + + /** + * Toggles the setting 'registration_qanda' + * + * @access private + * @return void + * @author Brandon + */ + private function _switchOn() + { + /* Switch it on */ + IPSLib::updateSettings( array( 'registration_qanda' => 1 ) ); + + /* Done */ + $this->registry->output->silentRedirect( $this->settings['base_url'] . $this->form_code ); + } + + /** + * Removes a question + * + * @access public + * @return void + * @author Brandon + */ + public function remove() + { + /* Check ID */ + $id = intval( $this->request['id'] ); + + if( ! $id ) + { + $this->registry->output->showError( $this->lang->words['qa_noid'], 111155 ); + } + + /* Delete the record */ + $this->DB->delete( 'question_and_answer', "qa_id={$id}" ); + + /* Log and bounce */ + $this->registry->adminFunctions->saveAdminLog( $this->lang->words['qa_deleted'] ); + $this->registry->output->silentRedirect( $this->settings['base_url'] . $this->form_code ); + } + + /** + * List current questions + * + * @access public + * @return void + */ + public function overview() + { + /* Query Questions */ + $this->DB->build( array( 'select' => '*', 'from' => 'question_and_answer' ) ); + $this->DB->execute(); + + /* Do we have questions? */ + $rows = array(); + + if( $this->DB->getTotalRows() ) + { + while( $r = $this->DB->fetch() ) + { + /* Add to output array */ + $rows[] = $r; + } + } + + /* Output */ + $this->registry->output->html .= $this->html->overview( $rows ); + } + + /** + * Form for adding/editing questions + * + * @access public + * @param string Type [new|edit] + * @return void + */ + public function showForm( $type='new' ) + { + /* Edit Question */ + if( $type != 'new' ) + { + /* ID */ + $id = intval( $this->request['id'] ); + + if( ! $id ) + { + $this->registry->output->showError( $this->lang->words['qa_noeditid'], 111156 ); + } + + /* Query the question */ + $this->DB->build( array( 'select' => '*', 'from' => 'question_and_answer', 'where' => "qa_id=" . $id ) ); + $this->DB->execute(); + + /* Make sure we found one */ + if( ! $r = $this->DB->fetch() ) + { + $this->registry->output->showError( $this->lang->words['qa_404'], 111157 ); + } + + /* Text bits */ + $button = $this->lang->words['qa_editbutton']; + $code = 'doedit'; + } + else + { + /* Data */ + $r = array(); + $id = 0; + + /* Text Bits */ + $button = $this->lang->words['qa_addbutton']; + $code = 'donew'; + } + + /* Form Elements */ + $form = array(); + + $form['question'] = $this->registry->output->formTextarea( 'question', htmlspecialchars( $r['qa_question'], ENT_QUOTES ) ); + $form['answers'] = $this->registry->output->formTextarea( 'answers', htmlspecialchars( $r['qa_answers'], ENT_QUOTES ) ); + + /* Ouput */ + $this->registry->output->html .= $this->html->showForm( $code, $id, $form, $button ); + } + + /** + * Save the questions from the form + * + * @access public + * @param string Type [new|edit] + * @return void + */ + public function saveForm( $type='new' ) + { + /* Error Checking */ + if( ! $this->request['question']) + { + $this->registry->output->showError( $this->lang->words['qa_no_question'], 11150 ); + } + + if( ! $this->request['answers'] ) + { + $this->registry->output->showError( $this->lang->words['qa_no_answer'], 11150 ); + } + + /* Build DB Array */ + $db_array = array( + 'qa_question' => $_POST['question'], + 'qa_answers' => $_POST['answers'], + ); + + /* Insert question */ + if( $type == 'new' ) + { + /* Update the DB */ + $this->DB->insert( 'question_and_answer', $db_array ); + + $id = $this->DB->getInsertId(); + + /* Log */ + $this->registry->adminFunctions->saveAdminLog( $this->lang->words['qa_addlog'] ); + } + /* Update question */ + else + { + /* ID */ + $id = intval( $this->request['id'] ); + + if( ! $id ) + { + $this->registry->output->showError( $this->lang->words['qa_noeditid'], 111158 ); + } + + /* Update the DB */ + $this->DB->update( 'question_and_answer', $db_array, "qa_id={$id}" ); + + $this->registry->adminFunctions->saveAdminLog( $this->lang->words['qa_edited']); + } + + /* Bounce */ + $this->registry->output->silentRedirect( $this->settings['base_url'] . $this->form_code ); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/tools/rebuild.php b/upload/admin/applications/core/modules_admin/tools/rebuild.php index 133c8e64..952aa48c 100644 --- a/upload/admin/applications/core/modules_admin/tools/rebuild.php +++ b/upload/admin/applications/core/modules_admin/tools/rebuild.php @@ -1,2940 +1,2923 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_core_tools_rebuild extends ipsCommand -{ - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /**#@+ - * URL bits - * - * @access public - * @var string - */ - public $form_code = ''; - public $form_code_js = ''; - /**#@-*/ - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - require_once( IPS_ROOT_PATH . "applications/forums/sources/classes/forums/class_forums.php" ); - $this->registry->setClass( 'class_forums', new class_forums( $registry ) ); - $this->registry->class_forums->forumsInit(); - - /* Load lang and skin */ - $this->registry->class_localization->loadLanguageFile( array( 'admin_tools' ) ); - $this->html = $this->registry->output->loadTemplate( 'cp_skin_rebuild' ); - - /* URLs */ - $this->form_code = $this->html->form_code = 'module=tools&section=rebuild'; - $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=rebuild'; - - /* What to do */ - switch( $this->request['do'] ) - { - case 'docount': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_recount' ); - $this->doCount(); - break; - - case 'doresyncforums': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_resynch' ); - $this->resyncForums(); - break; - - case 'doresynctopics': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_resyncht' ); - $this->resyncTopics(); - break; - - case 'doposts': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_rebuild' ); - $this->rebuildPosts(); - break; - - case 'dopostnames': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_postcounts' ); - $this->rebuildPostNames(); - break; - - case 'dopostcounts': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_postcounts' ); - $this->rebuildPostCount(); - break; - - case 'dothumbnails': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_thumbs' ); - $this->rebuildThumbnails(); - break; - - case 'dophotos': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_thumbs' ); - $this->rebuildPhotos(); - break; - - case 'doattachdata': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_attach' ); - $this->rebuildAttachdata(); - break; - - case 'doseousernames': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_rebuild' ); - $this->rebuildSeoUserNames(); - break; - case 'cleanattachments': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_orphaned' ); - $this->cleanAttachments(); - break; - - case 'cleanavatars': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_orphana' ); - $this->cleanAvatars(); - break; - - case 'cleanphotos': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_orphanp' ); - $this->cleanPhotos(); - break; - - case 'domsgcounts': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_postcounts' ); - $this->rebuildMsgCounts(); - break; - - //----------------------------------------- - // Tools - //----------------------------------------- - - case '300pms': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); - $this->tools300Pms(); - break; - - case '220tool_contacts': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); - $this->tools220Contacts(); - break; - - case '210polls': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); - $this->tools210Polls(); - break; - - case '210calevents': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); - $this->tools210Calevents(); - break; - - case '210tool_settings': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); - $this->tools210DupeSettings(); - break; - - case 'tool_settings': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); - $this->toolsDupeSettings(); - break; - - case 'tool_converge': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); - $this->toolsConverge(); - break; - - case 'tool_bansettings': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); - $this->toolBanSettings(); - break; - - case 'tools': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); - $this->toolsSplashScreen(); - break; - - case 'rebuild_overview': - default: - $this->rebuildSplashScreen(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * 3.0.x Tools: PM Conversion - * - * @access public - * @return void - */ - public function tools300pms() - { - /* INIT */ - $pergo = 100; - $start = intval( $this->request['st'] ); - $converted = 0; - $seen = 0; - - //----------------------------------------- - // Check to make sure table exists - //----------------------------------------- - - if ( ! $this->DB->checkForTable( 'message_text' ) ) - { - $this->registry->output->global_message = $this->lang->words['re_msgsconverted']; - $this->toolsSplashScreen(); - return; - } - - - /* Select max topic ID thus far */ - $_tmp = $this->DB->buildAndFetch( array( 'select' => 'MAX(mt_id) as max', - 'from' => 'message_topics' ) ); - - $topicID = intval( $_tmp['max'] ); - - $this->DB->build( array( 'select' => '*', - 'from' => 'message_text', - 'order' => 'msg_id ASC', - 'limit' => array( $start, $pergo ) ) ); - - $o = $this->DB->execute(); - - while( $post = $this->DB->fetch( $o ) ) - { - $seen++; - - /* Make sure all data is valid */ - if ( intval( $post['msg_sent_to_count'] ) < 1 ) - { - continue; - } - - /* a little set up */ - $oldTopics = array(); - - /* Now fetch all topics */ - $this->DB->build( array( 'select' => '*', - 'from' => 'message_topics_old', - 'where' => 'mt_msg_id=' . intval( $post['msg_id'] ) ) ); - - $t = $this->DB->execute(); - - while( $topic = $this->DB->fetch( $t ) ) - { - /* Got any data? */ - if ( ! $topic['mt_from_id'] OR ! $topic['mt_to_id'] ) - { - continue; - } - - $oldTopics[ $topic['mt_id'] ] = $topic; - } - - /* Fail safe */ - if ( ! count( $oldTopics ) ) - { - continue; - } - - /* Increment number */ - $topicID++; - - /* Add in the post */ - $this->DB->insert( 'message_posts', array( 'msg_topic_id' => $topicID, - 'msg_date' => $post['msg_date'], - 'msg_post' => $post['msg_post'], - 'msg_post_key' => $post['msg_post_key'], - 'msg_author_id' => $post['msg_author_id'], - 'msg_ip_address' => $post['msg_ip_address'], - 'msg_is_first_post' => 1 ) ); - $postID = $this->DB->getInsertId(); - - /* Define some stuff. "To" member is added last in IPB 2 */ - $_tmp = $oldTopics; - ksort( $_tmp ); - $topicData = array_pop( $_tmp ); - $_invited = array(); - $_seenOwner = array(); - $_isDeleted = 0; - - /* Add the member rows */ - foreach( $oldTopics as $mt_id => $data ) - { - /* Prevent SQL error with unique index: Seen the owner ID already? */ - if ( $_seenOwner[ $data['mt_owner_id'] ] ) - { - continue; - } - - $_seenOwner[ $data['mt_owner_id'] ] = $data['mt_owner_id']; - - /* Build invited - does not include 'to' person */ - if ( $data['mt_owner_id'] AND ( $post['msg_author_id'] != $data['mt_owner_id'] ) AND ( $topicData['mt_to_id'] != $data['mt_owner_id'] ) ) - { - $_invited[ $data['mt_owner_id'] ] = $data['mt_owner_id']; - } - - $_isSent = ( $data['mt_vid_folder'] == 'sent' ) ? 1 : 0; - $_isDraft = ( $data['mt_vid_folder'] == 'unsent' ) ? 1 : 0; - - $this->DB->insert( 'message_topic_user_map', array( 'map_user_id' => $data['mt_owner_id'], - 'map_topic_id' => $topicID, - 'map_folder_id' => ( $_isDraft ) ? 'drafts' : 'myconvo', - 'map_read_time' => ( $data['mt_user_read'] ) ? $data['mt_user_read'] : ( $data['mt_read'] ? time() : 0 ), - 'map_user_active' => 1, - 'map_user_banned' => 0, - 'map_has_unread' => 0, //( $data['mt_read'] ) ? 0 : 1, - 'map_is_system' => 0, - 'map_last_topic_reply' => $post['msg_date'], - 'map_is_starter' => ( $data['mt_owner_id'] == $post['msg_author_id'] ) ? 1 : 0 ) ); - - } - - /* Now, did we see the author? If not, add them too but as inactive */ - if ( ! $_seenOwner[ $post['msg_author_id'] ] ) - { - $_isDeleted = 1; - - /*$this->DB->insert( 'message_topic_user_map', array( 'map_user_id' => $post['msg_author_id'], - 'map_topic_id' => $topicID, - 'map_folder_id' => 'myconvo', - 'map_read_time' => 0, - 'map_user_active' => 0, - 'map_user_banned' => 0, - 'map_has_unread' => 0, - 'map_is_system' => 0, - 'map_is_starter' => 1 ) );*/ - } - - $_isSent = ( $topicData['mt_vid_folder'] == 'sent' ) ? 1 : 0; - $_isDraft = ( $topicData['mt_vid_folder'] == 'unsent' ) ? 1 : 0; - - /* Add the topic */ - $this->DB->insert( 'message_topics', array( 'mt_id' => $topicID, - 'mt_date' => $topicData['mt_date'], - 'mt_title' => $topicData['mt_title'], - 'mt_starter_id' => $post['msg_author_id'], - 'mt_start_time' => $post['msg_date'], - 'mt_last_post_time' => $post['msg_date'], - 'mt_invited_members' => serialize( array_keys( $_invited ) ), - 'mt_to_count' => count( array_keys( $_invited ) ) + 1, - 'mt_to_member_id' => $topicData['mt_to_id'], - 'mt_replies' => 0, - 'mt_last_msg_id' => $postID, - 'mt_first_msg_id' => $postID, - 'mt_is_draft' => $_isDraft, - 'mt_is_deleted' => $_isDeleted, - 'mt_is_system' => 0 ) ); - - $converted++; - } - - /* What to do? */ - if ( $seen ) - { - $this->request['st'] = $start + $pergo; - - /* We did some, go check again.. */ - $this->registry->output->global_message = sprintf( $this->lang->words['tools300pms'], $this->request['st'] ); - - /* Re-do Page */ - $url = "{$this->settings['base_url']}{$this->form_code}&do=".$this->request['do'].'&st=' . $this->request['st']; - } - else - { - /* Update all members */ - $this->DB->update( 'members', array( 'msg_count_reset' => 1 ) ); - - $this->registry->output->global_message = $this->lang->words['re_pmsconverted']; - - $url = "{$this->settings['base_url']}{$this->form_code}&do=tools"; - } - - //----------------------------------------- - // Bye.... - //----------------------------------------- - - $this->registry->output->redirect( $url, $this->registry->output->global_message, $time ); - } - - /** - * Tools: Ban Settings - * - * @access public - * @return void - */ - public function toolBanSettings() - { - //----------------------------------------- - // Init - //----------------------------------------- - - $bomb = array(); - $ban = array(); - $ip_count = 0; - $email_count = 0; - $name_count = 0; - - //----------------------------------------- - // Get current entries - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'banfilters', 'order' => 'ban_date desc' ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $ban[ $r['ban_type'] ][ $r['ban_content'] ] = $r; - } - - //----------------------------------------- - // Get $INFO (again) ip email name - //----------------------------------------- - - require( DOC_IPS_ROOT_PATH."conf_global.php" ); - - //----------------------------------------- - // IP - //----------------------------------------- - - if ( $INFO['ban_ip'] ) - { - $bomb = explode( '|', $INFO['ban_ip'] ); - - if ( is_array( $bomb ) and count( $bomb ) ) - { - foreach( $bomb as $bang ) - { - if ( ! is_array($ban['ip'][ $bang ]) ) - { - $this->DB->insert( 'banfilters', array( 'ban_type' => 'ip', 'ban_content' => $bang, 'ban_date' => time() ) ); - - $ip_count++; - } - } - } - } - - //----------------------------------------- - // EMAIL - //----------------------------------------- - - if ( $INFO['ban_email'] ) - { - $bomb = explode( '|', $INFO['ban_email'] ); - - if ( is_array( $bomb ) and count( $bomb ) ) - { - foreach( $bomb as $bang ) - { - if ( ! is_array($ban['email'][ $bang ]) ) - { - $this->DB->insert( 'banfilters', array( 'ban_type' => 'email', 'ban_content' => $bang, 'ban_date' => time() ) ); - - $email_count++; - } - } - } - } - - //----------------------------------------- - // EMAIL - //----------------------------------------- - - if ( $INFO['ban_names'] ) - { - $bomb = explode( '|', $INFO['ban_names'] ); - - if ( is_array( $bomb ) and count( $bomb ) ) - { - foreach( $bomb as $bang ) - { - if ( ! is_array($ban['name'][ $bang ]) ) - { - $this->DB->insert( 'banfilters', array( 'ban_type' => 'name', 'ban_content' => $bang, 'ban_date' => time() ) ); - - $name_count++; - } - } - } - } - - $this->registry->output->global_message = sprintf( $this->lang->words['re_bansimport'], $ip_count, $email_count, $name_count ); - - $this->cache->rebuildCache( 'banfilters', 'global' ); - - $this->toolsSplashScreen(); - } - - /** - * 2.0.0 Tools: Converge - * - * @access public - * @return void - */ - public function toolsConverge() - { - //----------------------------------------- - // Get all validating members... - //----------------------------------------- - - $to_unconverge = array(); - $unconverge_count = 0; - - $this->DB->build( array( 'select' => 'member_id, email, member_group_id', 'from' => 'members', 'where' => 'member_group_id='.$this->settings['auth_group'] ) ); - $this->DB->execute(); - - while( $m = $this->DB->fetch() ) - { - if ( preg_match( "#^{$m['member_id']}\-#", $m['email'] ) ) - { - $to_unconverge[] = $m['member_id']; - } - } - - $unconverge_count = intval( count( $to_unconverge ) ); - - if ( $unconverge_count ) - { - foreach( $to_unconverge as $mid ) - { - $this->DB->update( 'members' , array( 'member_group_id' => $this->settings['member_group'] ), 'member_id='.$mid ); - $this->DB->update( 'profile_portal', array( 'bio' => 'dupemail' ), 'pp_member_id='.$mid ); - } - } - - //----------------------------------------- - // Time to move on dude - //----------------------------------------- - - $this->registry->output->global_message = (sprintf( $this->lang->words['re_convergerest'], $unconverge_count ) ); - $this->toolsSplashScreen(); - } - - /** - * 2.0.0 Tools: Dupe Settings - * - * @access public - * @return void - */ - public function toolsDupeSettings() - { - //----------------------------------------- - // Remove dupe categories - //----------------------------------------- - - $title_id_to_keep = array(); - $title_id_to_delete = array(); - $title_deleted_count = 0; - - $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_settings_titles', 'order' => 'conf_title_id' ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - if ( $title_id_to_keep[ $r['conf_title_title'] ] ) - { - $title_id_to_delete[ $r['conf_title_id'] ] = $r['conf_title_id']; - } - else - { - $title_id_to_keep[ $r['conf_title_title'] ] = $r['conf_title_id']; - } - } - - if ( count( $title_id_to_delete ) ) - { - $this->DB->buildAndFetch( array( 'delete' => 'conf_settings_titles', 'where' => 'conf_title_id IN ('.implode( ',', $title_id_to_delete ).')' ) ); - } - - $title_deleted_count = intval( count($title_id_to_delete) ); - - //----------------------------------------- - // Remove dupe settings - //----------------------------------------- - - $setting_id_to_keep = array(); - $setting_id_to_delete = array(); - $setting_id_deleted_count = 0; - - $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'order' => 'conf_id' ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - if ( $setting_id_to_keep[ $r['conf_title'].','.$r['conf_key'] ] ) - { - $setting_id_to_delete[ $r['conf_id'] ] = $r['conf_id']; - } - else - { - $setting_id_to_keep[ $r['conf_title'].','.$r['conf_key'] ] = $r['conf_id']; - } - } - - if ( count( $setting_id_to_delete ) ) - { - $this->DB->buildAndFetch( array( 'delete' => 'conf_settings', 'where' => 'conf_id IN ('.implode( ',', $setting_id_to_delete ).')' ) ); - } - - $setting_deleted_count = intval( count($setting_id_to_delete) ); - - //----------------------------------------- - // Time to move on dude - //----------------------------------------- - - $this->registry->output->global_message = sprintf( $this->lang->words['re_deletetitle'], $title_deleted_count, $setting_deleted_count ) ; - $this->toolsSplashScreen(); - } - - /** - * 2.1.0 Tools: Dupe Settings - * - * @access public - * @return void - */ - public function tools210DupeSettings() - { - //----------------------------------------- - // Remove dupe categories - //----------------------------------------- - - $title_id_to_keep = array(); - $title_id_to_delete = array(); - $title_deleted_count = 0; - $msg = ''; - - $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_settings_titles', 'order' => 'conf_title_id DESC' ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - if ( $title_id_to_keep[ $r['conf_title_title'] ] ) - { - $title_id_to_delete[ $r['conf_title_id'] ] = $r['conf_title_id']; - - $msg .= sprintf( $this->lang->words['re_deletingid'], $r['conf_title_title'], $r['conf_title_id'] ) . "
    "; - } - else - { - $title_id_to_keep[ $r['conf_title_title'] ] = $r['conf_title_id']; - $msg .= sprintf( $this->lang->words['re_keepingid'], $r['conf_title_title'], $r['conf_title_id'] ) . "
    "; - } - } - - if ( count( $title_id_to_delete ) ) - { - $this->DB->buildAndFetch( array( 'delete' => 'core_sys_conf_settings', 'where' => 'conf_title_id IN ('.implode( ',', $title_id_to_delete ).')' ) ); - } - - $title_deleted_count = intval( count($title_id_to_delete) ); - - //----------------------------------------- - // Time to move on dude - //----------------------------------------- - - $this->registry->output->global_message = sprintf( $this->lang->words['re_duplicatetitle'], $title_deleted_count, $msg ); - $this->toolsSplashScreen(); - } - - /** - * 2.1.0 Tools: Calendar Events - * - * @access public - * @return void - */ - public function tools210Calevents() - { - $start = intval($_GET['st']); - $lend = 50; - $end = $start + $lend; - $max = intval($_GET['max']); - - //----------------------------------------- - // Check to make sure table exists - //----------------------------------------- - - if ( ! $this->DB->checkForTable( 'calendar_events' ) ) - { - $this->registry->output->global_message = $this->lang->words['re_calremoved']; - $this->toolsSplashScreen(); - return; - } - - //----------------------------------------- - // Do we need to run this tool? - //----------------------------------------- - - if ( ! $max ) - { - $original = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as max', 'from' => 'calendar_events' ) ); - $new = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as max', 'from' => 'cal_events' ) ); - - if ( $new['max'] >= $original['max'] OR ! $original['max'] ) - { - $this->registry->output->global_message = $this->lang->words['re_calalready']; - $this->toolsSplashScreen(); - } - } - - $max = intval( $original['max'] ); - - //----------------------------------------- - // In steps... - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'calendar_events', 'limit' => array( $start, $lend ) ) ); - $o = $this->DB->execute(); - - //----------------------------------------- - // Do it... - //----------------------------------------- - - if ( $this->DB->getTotalRows($o) ) - { - //----------------------------------------- - // Got some to convert! - //----------------------------------------- - - while ( $r = $this->DB->fetch($o) ) - { - $recur_remap = array( 'w' => 1, - 'm' => 2, - 'y' => 3 ); - - $begin_date = IPSTime::date_getgmdate( $r['unix_stamp'] ); - $end_date = IPSTime::date_getgmdate( $r['end_unix_stamp'] ); - - if ( ! $begin_date OR ! $end_date ) - { - continue; - } - - $day = $begin_date['mday']; - $month = $begin_date['mon']; - $year = $begin_date['year']; - - $end_day = $end_date['mday']; - $end_month = $end_date['mon']; - $end_year = $end_date['year']; - - $_final_unix_from = gmmktime(0, 0, 0, $month, $day, $year ); - - //----------------------------------------- - // Recur or ranged... - //----------------------------------------- - - if ( $r['event_repeat'] OR $r['event_ranged'] ) - { - $_final_unix_to = gmmktime(23, 59, 59, $end_month, $end_day, $end_year); - } - else - { - $_final_unix_to = 0; - } - - $new_event = array( 'event_calendar_id' => 1, - 'event_member_id' => $r['userid'], - 'event_content' => $r['event_text'], - 'event_title' => $r['title'], - 'event_smilies' => $r['show_emoticons'], - 'event_perms' => $r['read_perms'], - 'event_private' => $r['priv_event'], - 'event_approved' => 1, - 'event_unixstamp' => $r['unix_stamp'], - 'event_recurring' => ( $r['event_repeat'] && $recur_remap[ $r['repeat_unit'] ] ) ? $recur_remap[ $r['repeat_unit'] ] : 0, - 'event_tz' => 0, - 'event_unix_from' => $_final_unix_from, - 'event_unix_to' => $_final_unix_to ); - - //----------------------------------------- - // INSERT - //----------------------------------------- - - $this->DB->insert( 'cal_events', $new_event ); - } - - $this->registry->output->global_message = sprintf( $this->lang->words['re_calstartto'], $start, $end ); - - $url = "{$this->settings['base_url']}{$this->form_code}&do=".$this->request['do'].'&max='.$max.'&st='.$end; - } - else - { - $this->registry->output->global_message = $this->lang->words['re_calsconverted']; - - $url = "{$this->settings['base_url']}{$this->form_code}&do=tools"; - } - - //----------------------------------------- - // Bye.... - //----------------------------------------- - - $this->registry->output->redirect( $url, $this->registry->output->global_message, $time ); - } - - /** - * 2.1.0 Tools: Polls - * - * @access public - * @return void - */ - public function tools210Polls() - { - $start = intval( $this->request['st'] ); - $lend = 50; - $end = $start + $lend; - $max = intval( $this->request['max'] ); - $done = 0; - $converted = intval( $this->request['conv'] ); - - //----------------------------------------- - // First off.. grab number of polls to convert - //----------------------------------------- - - if ( ! $max ) - { - $total = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as max', - 'from' => 'topics', - 'where' => "poll_state IN ('open', 'close', 'closed')" ) ); - - $max = $total['max']; - } - - if ( $max < 1 ) - { - $done = 1; - } - - //----------------------------------------- - // In steps... - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', - 'from' => 'topics', - 'where' => "poll_state IN ('open', 'close', 'closed' )", - 'limit' => array( $start, $lend ) ) ); - $o = $this->DB->execute(); - - //----------------------------------------- - // Do it... - //----------------------------------------- - - if ( $this->DB->getTotalRows($o) ) - { - //----------------------------------------- - // Got some to convert! - //----------------------------------------- - - while ( $r = $this->DB->fetch($o) ) - { - $converted++; - - $new_poll = array( 1 => array() ); - - $poll_data = $this->DB->buildAndFetch( array( 'select' => '*', - 'from' => 'polls', - 'where' => "tid=".$r['tid'] - ) ); - if ( ! $poll_data['pid'] ) - { - continue; - } - - if ( ! $poll_data['poll_question'] ) - { - $poll_data['poll_question'] = $r['title']; - } - - //----------------------------------------- - // Kick start new poll - //----------------------------------------- - - $new_poll[1]['question'] = $poll_data['poll_question']; - - //----------------------------------------- - // Get OLD polls - //----------------------------------------- - - $poll_answers = unserialize( stripslashes( $poll_data['choices'] ) ); - - reset($poll_answers); - - foreach ( $poll_answers as $entry ) - { - $id = $entry[0]; - $choice = $entry[1]; - $votes = $entry[2]; - - $total_votes += $votes; - - if ( strlen($choice) < 1 ) - { - continue; - } - - $new_poll[ 1 ]['choice'][ $id ] = $choice; - $new_poll[ 1 ]['votes'][ $id ] = $votes; - } - - //----------------------------------------- - // Got something? - //----------------------------------------- - - if ( count( $new_poll[1]['choice'] ) ) - { - $this->DB->update( 'polls' , array( 'choices' => serialize( $new_poll ) ), 'tid='.$r['tid'] ); - $this->DB->update( 'topics', array( 'poll_state' => 1 ), 'tid='.$r['tid'] ); - } - - //----------------------------------------- - // All done? - //----------------------------------------- - - if ( $converted >= $max ) - { - $done = 1; - continue; - } - } - } - else - { - $done = 1; - } - - - if ( ! $done ) - { - $this->registry->output->global_message = sprintf( $this->lang->words['re_pollstartto'], $start, $end, $max ); - - $url = "{$this->settings['base_url']}{$this->form_code}&do=".$this->request['do'].'&max='.$max.'&st='.$end.'&conv='.$converted; - } - else - { - $this->registry->output->global_message = $this->lang->words['re_pollconverted']; - - $url = "{$this->settings['base_url']}{$this->form_code}&do=tools"; - } - - //----------------------------------------- - // Bye.... - //----------------------------------------- - - $this->registry->output->redirect( $url, $this->registry->output->global_message, 1 ); - } - - /** - * 2.2.0 Tools: Contacts - * DEPRECATED - * - * @access public - * @return void - */ - public function tools220Contacts() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $start = intval($_GET['st']); - $lend = 50; - $end = $start + $lend; - $done = 0; - $updated = 0; - - //----------------------------------------- - // Get lib - //----------------------------------------- - - require_once( IPSLib::getAppDir('members') . '/sources/friends.php' ); - $profile = new profileFriendsLib( $this->registry ); - - - //----------------------------------------- - // OK.. - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', - 'from' => 'contacts', - 'where' => 'allow_msg=1', - 'limit' => array( $start, $lend ) ) ); - - $o = $this->DB->execute(); - - //----------------------------------------- - // Do it... - //----------------------------------------- - - if ( $this->DB->getTotalRows($o) ) - { - //----------------------------------------- - // Got some to convert! - //----------------------------------------- - - while( $row = $this->DB->fetch( $o ) ) - { - //----------------------------------------- - // Already a friend - //----------------------------------------- - - $friend = $this->DB->buildAndFetch( array( 'select' => '*', - 'from' => 'profile_friends', - 'where' => 'friends_member_id=' . intval( $row['member_id'] ) . ' AND friends_friend_id=' . intval( $row['contact_id'] ) ) ); - - if ( ! $friend['friends_id'] ) - { - //----------------------------------------- - // Add to DB - //----------------------------------------- - - $this->DB->insert( 'profile_friends', array( 'friends_member_id' => $row['member_id'], - 'friends_friend_id' => $row['contact_id'], - 'friends_approved' => 1, - 'friends_added' => time() ) ); - - //----------------------------------------- - // Rebuild... - //----------------------------------------- - - $profile->recacheFriends( array( 'member_id' => $row['member_id'] ) ); - - $updated++; - } - - $this->DB->delete( "contacts", "id={$row['id']}" ); - } - } - else - { - $done = 1; - } - - //----------------------------------------- - // Done? - //----------------------------------------- - - if ( ! $done ) - { - $this->registry->output->global_message = sprintf( $this->lang->words['re_contactsstartto'],$start, $end, $updated ); - - $url = "{$this->settings['base_url']}{$this->form_code}&do=".$this->request['do'].'&st='.$end; - } - else - { - $this->registry->output->global_message = $this->lang->words['re_contactsup']; - - $url = "{$this->settings['base_url']}{$this->form_code}&do=tools"; - } - - //----------------------------------------- - // Bye.... - //----------------------------------------- - - $this->registry->output->redirect( $url, $this->registry->output->global_message, 1 ); - } - - /** - * Cleanup Tools Splash Screen - * - * @access public - * @return void - */ - public function toolsSplashScreen() - { - /* Output */ - $this->registry->output->html .= $this->html->toolsSplashScreen(); - } - - /** - * Count stats - * - * @access public - * @return void - */ - public function doCount() - { - if ( (! $this->request['posts']) and (! $this->request['online']) and (! $this->request['members'] ) and (! $this->request['lastreg'] ) ) - { - $this->registry->output->showError( $this->lang->words['re_nothing'], 11154 ); - } - - $stats = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='stats'" ) ); - - $stats = unserialize( IPSText::stripslashes( $stats['cs_value'] ) ); - - if ($this->request['posts']) - { - $topics = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as tcount', - 'from' => 'topics', - 'where' => 'approved=1' ) ); - - $posts = $this->DB->buildAndFetch( array( 'select' => 'SUM(posts) as replies', - 'from' => 'topics', - 'where' => 'approved=1' ) ); - - $stats['total_topics'] = $topics['tcount']; - $stats['total_replies'] = $posts['replies']; - } - - if ($this->request['members']) - { - $this->DB->build( array( 'select' => 'count(member_id) as members', 'from' => 'members', 'where' => "member_group_id <> '{$this->settings['auth_group']}'" ) ); - $this->DB->execute(); - - $r = $this->DB->fetch(); - $stats['mem_count'] = intval($r['members']); - } - - if ($this->request['lastreg']) - { - $this->DB->build( array( 'select' => 'member_id, name, members_display_name', - 'from' => 'members', - 'where' => "member_group_id <> '{$this->settings['auth_group']}' AND members_display_name != '' AND members_display_name " . $this->DB->buildIsNull( false ), - 'order' => "member_id DESC", - 'limit' => array(0,1) ) ); - $this->DB->execute(); - - $r = $this->DB->fetch(); - $stats['last_mem_name'] = $r['members_display_name'] ? $r['members_display_name'] : $r['name']; - $stats['last_mem_id'] = $r['member_id']; - } - - if ($this->request['online']) - { - $stats['most_date'] = time(); - $stats['most_count'] = 1; - } - - if ( count($stats) > 0 ) - { - $this->cache->setCache( 'stats', $stats, array( 'array' => 1 ) ); - } - else - { - $this->registry->output->showError( $this->lang->words['re_nothing'], 11155 ); - } - - $this->registry->output->global_message = $this->lang->words['re_statsrecount']; - - $this->registry->output->doneScreen($this->lang->words['re_statsrecount'], $this->lang->words['re_statscenter'], "{$this->form_code}", 'redirect' ); - } - - /** - * Clean out photos - * - * @access public - * @return void - */ - public function cleanPhotos() - { - /* Upload Class */ - require_once( IPS_KERNEL_PATH.'classUpload.php' ); - $upload = new classUpload(); - - //----------------------------------------- - // Set up - //----------------------------------------- - - $done = 0; - $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; - $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; - $display = $end + $start; - $output = array(); - - //----------------------------------------- - // Pop open the directory and - // peek inside... - //----------------------------------------- - - $i = 0; - - try - { - foreach( new DirectoryIterator( $this->settings['upload_dir'] ) as $file ) - { - if ( strstr( $file->getFilename(), 'photo-' ) ) - { - $fullfile = $this->settings['upload_dir'].'/'.$file->getFilename(); - - $i++; - - //----------------------------------------- - // Already started? - //----------------------------------------- - - if ( $start > $i ) - { - continue; - } - - //----------------------------------------- - // Done for this iteration? - //----------------------------------------- - - if ( $i > $display ) - { - break; - } - - //----------------------------------------- - // Try and get attach row - //----------------------------------------- - - $found = $this->DB->buildAndFetch( array( 'select' => 'pp_member_id', 'from' => 'profile_portal', 'where' => "pp_main_photo='{$file->getFilename()}' OR pp_thumb_photo='{$file->getFilename()}'" ) ); - - if ( ! $found['pp_member_id'] ) - { - @unlink( $fullfile ); - $output[] = "{$this->lang->words['re_removedorph']} {$file->getFilename()}"; - } - else - { - $output[] = "{$this->lang->words['re_attachedok']} {$file->getFilename()}"; - } - } - } - } catch ( Exception $e ) {} - - //----------------------------------------- - // Finish - or more?... - //----------------------------------------- - - if ( $i < $display) - { - //----------------------------------------- - // Done.. - //----------------------------------------- - - $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}"; - $time = 2; - } - else - { - //----------------------------------------- - // More.. - //----------------------------------------- - $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $display ); - $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$display}"; - $time = 0; - } - - //----------------------------------------- - // Bye.... - //----------------------------------------- - - $this->registry->output->redirect( $url, $text, $time ); - } - - /** - * Clean out avatars - * - * @access public - * @return void - */ - public function cleanAvatars() - { - /* Upload Class */ - require_once( IPS_KERNEL_PATH.'classUpload.php' ); - $upload = new classUpload(); - - //----------------------------------------- - // Set up - //----------------------------------------- - - $done = 0; - $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; - $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; - $dis = $end + $start; - $output = array(); - - //----------------------------------------- - // Pop open the directory and - // peek inside... - //----------------------------------------- - - $i = 0; - - try - { - foreach( new DirectoryIterator( $this->settings['upload_dir'] ) as $file ) - { - if ( strstr( $file->getFilename(), 'av-' ) ) - { - $fullfile = $this->settings['upload_dir'].'/'.$file->getFilename(); - - $i++; - - //----------------------------------------- - // Already started? - //----------------------------------------- - - if ( $start > $i ) - { - continue; - } - - //----------------------------------------- - // Done for this iteration? - //----------------------------------------- - - if ( $i > $dis ) - { - break; - } - - //----------------------------------------- - // Try and get attach row - //----------------------------------------- - - $found = $this->DB->buildAndFetch( array( 'select' => 'pp_member_id', 'from' => 'profile_portal', 'where' => "avatar_location='{$file->getFilename()}' or avatar_location='upload:{$file->getFilename()}'" ) ); - - if ( ! $found['pp_member_id'] ) - { - @unlink( $fullfile ); - $output[] = "{$this->lang->words['re_removedorph']} $file"; - } - else - { - $output[] = "{$this->lang->words['re_attachedok']} $file"; - } - } - } - } catch ( Exception $e ) {} - - //----------------------------------------- - // Finish - or more?... - //----------------------------------------- - - if ( $i < $dis) - { - //----------------------------------------- - // Done.. - //----------------------------------------- - - $text = $this->lang->words['re_rebuildcomplete'] . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}"; - $time = 2; - } - else - { - //----------------------------------------- - // More.. - //----------------------------------------- - $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); - $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; - $time = 0; - } - - //----------------------------------------- - // Bye.... - //----------------------------------------- - - $this->registry->output->redirect( $url, $text, $time ); - } - - /** - * Clean out attachments - * - * @access public - * @return void - */ - public function cleanAttachments() - { - /* Upload Class */ - require_once( IPS_KERNEL_PATH.'classUpload.php' ); - $upload = new classUpload(); - - //----------------------------------------- - // Set up - //----------------------------------------- - - $done = 0; - $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; - $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; - $dis = $end + $start; - $output = array(); - - //----------------------------------------- - // Pop open the directory and - // peek inside... - //----------------------------------------- - - $i = 0; - try - { - foreach( new DirectoryIterator( $this->settings['upload_dir'] ) as $file ) - { - if ( $file->getFilename() == '.' OR $file->getFilename() == '..' ) - { - continue; - } - - $fullfile = $this->settings['upload_dir'] . '/' . $file->getFilename(); - - if( is_dir( $fullfile ) ) - { - $ndh = opendir( $fullfile ); - - try - { - foreach( new DirectoryIterator( $fullfile ) as $nfile ) - { - if ( $nfile->getFilename() == '.' OR $nfile->getFilename() == '..' ) - { - continue; - } - - if ( strstr( $nfile->getFilename(), 'post-' ) ) - { - $i++; - - //----------------------------------------- - // Already started? - //----------------------------------------- - - if ( $start > $i ) - { - continue; - } - - //----------------------------------------- - // Done for this iteration? - //----------------------------------------- - - if ( $i > $dis ) - { - break; - } - - //----------------------------------------- - // Try and get attach row - //----------------------------------------- - - $found = $this->DB->buildAndFetch( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => "attach_location='{$file->getFilename()}/{$nfile->getFilename()}' OR attach_thumb_location='{$file->getFilename()}/{$nfile->getFilename()}'" ) ); - - if ( ! $found['attach_id'] ) - { - @unlink( $fullfile . '/' . $nfile ); - $output[] = "{$this->lang->words['re_removedorph']} {$nfile->getFilename()}"; - } - else - { - $output[] = "{$this->lang->words['re_attachedok']} {$nfile->getFilename()}"; - } - } - } - } catch ( Exception $e ) {} - closedir( $ndh ); - } - else if ( strstr( $file, 'post-' ) ) - { - $i++; - - //----------------------------------------- - // Already started? - //----------------------------------------- - - if ( $start > $i ) - { - continue; - } - - //----------------------------------------- - // Done for this iteration? - //----------------------------------------- - - if ( $i > $dis ) - { - break; - } - - //----------------------------------------- - // Try and get attach row - //----------------------------------------- - - $found = $this->DB->buildAndFetch( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => "attach_location='{$file->getFilename()}' OR attach_thumb_location='{$file->getFilename()}'" ) ); - - if ( ! $found['attach_id'] ) - { - @unlink( $fullfile ); - $output[] = "{$this->lang->words['re_removedorph']} {$file->getFilename()}"; - } - else - { - $output[] = "{$this->lang->words['re_attachedok']} {$file->getFilename()}"; - } - } - } - } catch ( Exception $e ) {} - - //----------------------------------------- - // Finish - or more?... - //----------------------------------------- - - if ( $i < $dis) - { - //----------------------------------------- - // Done.. - //----------------------------------------- - - $text = $this->lang->words['re_rebuidcomp'] . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}"; - $time = 2; - } - else - { - //----------------------------------------- - // More.. - //----------------------------------------- - $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); - $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; - $time = 0; - } - - //----------------------------------------- - // Bye.... - //----------------------------------------- - - $this->registry->output->redirect( $url, $text, $time ); - } - - /** - * Rebuild Attachment Data - * - * @access public - * @return void - */ - public function rebuildAttachdata() - { - /* Upload Class */ - require_once( IPS_KERNEL_PATH.'classUpload.php' ); - $upload = new classUpload(); - - //----------------------------------------- - // Set up - //----------------------------------------- - - $done = 0; - $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; - $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; - $dis = $end + $start; - $output = array(); - - //----------------------------------------- - // Got any more? - //----------------------------------------- - - $tmp = $this->DB->buildAndFetch( array( 'select' => 'attach_id', 'from' => 'attachments', 'limit' => array($dis,1) ) ); - $max = intval( $tmp['attach_id'] ); - - //----------------------------------------- - // Avoid limit... - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) ); - $outer = $this->DB->execute(); - - //----------------------------------------- - // Process... - //----------------------------------------- - - while( $r = $this->DB->fetch( $outer ) ) - { - //----------------------------------------- - // Get ext - //----------------------------------------- - - $update = array(); - - $update['attach_ext'] = $upload->_getFileExtension( $r['attach_file'] ); - - if ( $r['attach_location'] ) - { - if ( file_exists( $this->settings['upload_dir'].'/'.$r['attach_location'] ) ) - { - $update['attach_filesize'] = @filesize( $this->settings['upload_dir'].'/'.$r['attach_location'] ); - - if( $r['attach_is_image'] ) - { - $dims = @getimagesize( $this->settings['upload_dir'].'/'.$r['attach_location'] ); - - if( $dims[0] AND $dims[1] ) - { - $update['attach_img_width'] = $dims[0]; - $update['attach_img_height'] = $dims[1]; - } - } - } - } - - if ( count( $update ) ) - { - $this->DB->update( 'attachments', $update, 'attach_id='.$r['attach_id'] ); - } - - $done++; - } - - //----------------------------------------- - // Finish - or more?... - //----------------------------------------- - - if ( ! $done and ! $max ) - { - //----------------------------------------- - // Done.. - //----------------------------------------- - - $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}"; - $time = 2; - } - else - { - //----------------------------------------- - // More.. - //----------------------------------------- - $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); - $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; - $time = 0; - } - - //----------------------------------------- - // Bye.... - //----------------------------------------- - - $this->registry->output->redirect( $url, $text, $time ); - } - - /** - * Rebuild Photos - * - * @access public - * @return void - */ - public function rebuildPhotos() - { - /* Image Class */ - require_once( IPS_KERNEL_PATH . 'classImage.php' ); - require_once( IPS_KERNEL_PATH . 'classImageGd.php' ); - - //----------------------------------------- - // Set up - //----------------------------------------- - - $done = 0; - $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; - $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; - $dis = $end + $start; - $output = array(); - - //----------------------------------------- - // Got any more? - //----------------------------------------- - - $tmp = $this->DB->buildAndFetch( array( 'select' => 'pp_member_id', 'from' => 'profile_portal', 'where' => "pp_main_photo != ''", 'order' => 'pp_member_id ASC', 'limit' => array($dis,1) ) ); - $max = intval( $tmp['pp_member_id'] ); - - //----------------------------------------- - // Avoid limit... - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'profile_portal', 'order' => 'pp_member_id ASC', 'where' => "pp_main_photo != ''", 'limit' => array($start,$end) ) ); - $outer = $this->DB->execute(); - - //----------------------------------------- - // Process... - //----------------------------------------- - - while( $r = $this->DB->fetch( $outer ) ) - { - if ( $r['pp_thumb_photo'] and ( $r['pp_thumb_photo'] != $r['pp_main_photo'] ) ) - { - if ( file_exists( $this->settings['upload_dir'].'/'.$r['pp_thumb_photo'] ) ) - { - if ( ! @unlink( $this->settings['upload_dir'].'/'.$r['pp_thumb_photo'] ) ) - { - $output[] = $this->lang->words['re_noremove'].$r['pp_thumb_photo']; - continue; - } - } - } - - if( !file_exists( $this->settings['upload_dir'] . '/' . $r['pp_main_photo'] ) ) - { - $output[] = $this->lang->words['re_noresizefound'] . $r['pp_main_photo']; - continue; - } - - $photo_data = array(); - $thumb_data = array(); - - $image = new classImageGd(); - - $image->init( array( 'image_path' => $this->settings['upload_dir'], 'image_file' => $r['pp_main_photo'] ) ); - - $thumb_data = $image->resizeImage( 50, 50 ); - $image->writeImage( $this->settings['upload_dir'] . '/' . $r['pp_thumb_photo'] ); - - $photo_data['pp_thumb_width'] = intval($thumb_data['newWidth']); - $photo_data['pp_thumb_height'] = intval($thumb_data['newHeight']); - $photo_data['pp_thumb_photo'] = $r['pp_thumb_photo']; - - if ( count( $photo_data ) ) - { - $this->DB->update( 'profile_portal', $photo_data, 'pp_member_id='.$r['pp_member_id'] ); - - $output[] = $this->lang->words['re_resized'].$r['pp_main_photo']; - } - - unset($image); - - $done++; - } - - //----------------------------------------- - // Finish - or more?... - //----------------------------------------- - - if ( ! $done and ! $max ) - { - //----------------------------------------- - // Done.. - //----------------------------------------- - - $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}"; - $time = 2; - } - else - { - //----------------------------------------- - // More.. - //----------------------------------------- - $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); - $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; - $time = 0; - } - - //----------------------------------------- - // Bye.... - //----------------------------------------- - - $this->registry->output->redirect( $url, $text, $time ); - } - - /** - * Rebuild Post Thumbnails - * - * @access public - * @return void - */ - public function rebuildThumbnails() - { - require_once( IPS_KERNEL_PATH . 'classImage.php' ); - require_once( IPS_KERNEL_PATH . 'classImageGd.php' ); - - //----------------------------------------- - // Set up - //----------------------------------------- - - $done = 0; - $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; - $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; - $dis = $end + $start; - $output = array(); - - //----------------------------------------- - // Got any more? - //----------------------------------------- - - $tmp = $this->DB->buildAndFetch( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg')", 'limit' => array($dis,1) ) ); - $max = intval( $tmp['attach_id'] ); - - //----------------------------------------- - // Avoid limit... - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg')", 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) ); - $outer = $this->DB->execute(); - - //----------------------------------------- - // Process... - //----------------------------------------- - - while( $r = $this->DB->fetch( $outer ) ) - { - if ( $r['attach_is_image'] ) - { - if ( $r['attach_thumb_location'] and ( $r['attach_thumb_location'] != $r['attach_location'] ) ) - { - if ( file_exists( $this->settings['upload_dir'].'/'.$r['attach_thumb_location'] ) ) - { - if ( ! @unlink( $this->settings['upload_dir'].'/'.$r['attach_thumb_location'] ) ) - { - $output[] = $this->lang->words['re_noremove'].$r['attach_thumb_location']; - continue; - } - } - } - - $attach_data = array(); - $thumbnail = $r['attach_thumb_location'] ? $r['attach_thumb_location'] - : preg_replace( "/^(.*)\.(.+?)$/", "\\1_thumb.\\2", $r['attach_location'] ); - - $image = new classImageGd(); - - $image->init( array( - 'image_path' => $this->settings['upload_dir'], - 'image_file' => $r['attach_location'], - ) ); - - $return = $image->resizeImage( $this->settings['siu_width'], $this->settings['siu_height'] ); - $image->writeImage( $this->settings['upload_dir'] . '/' . $thumbnail ); - - $attach_data['attach_thumb_width'] = intval($return['newWidth'] ? $return['newWidth'] : $image->cur_dimensions['width']); - $attach_data['attach_thumb_height'] = intval($return['newHeight'] ? $return['newHeight'] : $image->cur_dimensions['height']); - $attach_data['attach_thumb_location'] = $thumbnail; - - if ( count( $attach_data ) ) - { - $this->DB->update( 'attachments', $attach_data, 'attach_id='.$r['attach_id'] ); - - $output[] = $this->lang->words['re_resized'].$r['attach_location']; - } - - unset($image); - } - - $done++; - } - - //----------------------------------------- - // Finish - or more?... - //----------------------------------------- - - if ( ! $done and ! $max ) - { - //----------------------------------------- - // Done.. - //----------------------------------------- - - $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}"; - $time = 2; - } - else - { - //----------------------------------------- - // More.. - //----------------------------------------- - $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); - $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; - $time = 0; - } - - //----------------------------------------- - // Bye.... - //----------------------------------------- - - $this->registry->output->redirect( $url, $text, $time ); - } - - /** - * Rebuild Messenger Totals - * - * @access public - * @return void - */ - public function rebuildMsgCounts() - { - //----------------------------------------- - // Grab messenger lib - //----------------------------------------- - - require_once( IPSLib::getAppDir( "members" ) . '/sources/classes/messaging/messengerFunctions.php' ); - $messengerFunctions = new messengerFunctions( $this->registry ); - - //----------------------------------------- - // Set up - //----------------------------------------- - - $done = 0; - $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; - $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; - $dis = $end + $start; - $output = array(); - - //----------------------------------------- - // Got any more? - //----------------------------------------- - - $tmp = $this->DB->buildAndFetch( array( 'select' => 'member_id', 'from' => 'members', 'limit' => array($dis,1) ) ); - $max = intval( $tmp['member_id'] ); - - //----------------------------------------- - // Avoid limit... - //----------------------------------------- - - $this->DB->build( array( 'select' => 'member_id, members_display_name', 'from' => 'members', 'order' => 'member_id ASC', 'limit' => array($start,$end) ) ); - $outer = $this->DB->execute(); - - //----------------------------------------- - // Process... - //----------------------------------------- - - while( $r = $this->DB->fetch( $outer ) ) - { - $messengerFunctions->resetMembersFolderCounts( $r['member_id'] ); - $messengerFunctions->resetMembersTotalTopicCount( $r['member_id'] ); - $messengerFunctions->resetMembersNewTopicCount( $r['member_id'] ); - - $done++; - } - - //----------------------------------------- - // Finish - or more?... - //----------------------------------------- - - if ( ! $done and ! $max ) - { - //----------------------------------------- - // Done.. - //----------------------------------------- - - $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}"; - $time = 2; - } - else - { - //----------------------------------------- - // More.. - //----------------------------------------- - $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); - $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; - $time = 0; - } - - //----------------------------------------- - // Bye.... - //----------------------------------------- - - $this->registry->output->redirect( $url, $text, $time ); - } - - /** - * Rebuild Post Count - * - * @access public - * @return void - */ - public function rebuildPostCount() - { - //----------------------------------------- - // Forums not to count? - //----------------------------------------- - - $forums = array(); - - foreach( $this->registry->class_forums->forum_by_id as $data ) - { - if ( ! $data['inc_postcount'] ) - { - $forums[] = $data['id']; - } - } - - //----------------------------------------- - // Set up - //----------------------------------------- - - $done = 0; - $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; - $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; - $dis = $end + $start; - $output = array(); - - //----------------------------------------- - // Got any more? - //----------------------------------------- - - $tmp = $this->DB->buildAndFetch( array( 'select' => 'member_id', 'from' => 'members', 'limit' => array($dis,1) ) ); - $max = intval( $tmp['member_id'] ); - - //----------------------------------------- - // Avoid limit... - //----------------------------------------- - - $this->DB->build( array( 'select' => 'member_id, name', 'from' => 'members', 'order' => 'member_id ASC', 'limit' => array($start,$end) ) ); - $outer = $this->DB->execute(); - - //----------------------------------------- - // Process... - //----------------------------------------- - - while( $r = $this->DB->fetch( $outer ) ) - { - if ( ! count( $forums ) ) - { - $count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'posts', 'where' => 'queued != 1 AND author_id='.$r['member_id'] ) ); - } - else - { - $this->DB->build( array( 'select' => 'count(p.pid) as count', - 'from' => array( 'posts' => 'p' ), - 'where' => 'p.queued <> 1 AND p.author_id='.$r['member_id'].' AND t.forum_id NOT IN ('.implode(",",$forums).')', - 'add_join' => array( 1 => array( 'type' => 'left', - 'from' => array( 'topics' => 't' ), - 'where' => 't.tid=p.topic_id' - ) ) - ) ); - $this->DB->execute(); - - $count = $this->DB->fetch(); - } - - $new_post_count = intval( $count['count'] ); - - $this->DB->update( 'members', array( 'posts' => $new_post_count ), 'member_id='.$r['member_id'] ); - - $done++; - } - - //----------------------------------------- - // Finish - or more?... - //----------------------------------------- - - if ( ! $done and ! $max ) - { - //----------------------------------------- - // Done.. - //----------------------------------------- - - $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}"; - $time = 2; - } - else - { - //----------------------------------------- - // More.. - //----------------------------------------- - $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); - $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; - $time = 0; - } - - //----------------------------------------- - // Bye.... - //----------------------------------------- - - $this->registry->output->redirect( $url, $text, $time ); - } - - /** - * Rebuild Seo User Names - * - * @access public - * @return void - */ - public function rebuildSeoUserNames() - { - //----------------------------------------- - // Set up - //----------------------------------------- - - $done = 0; - $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; - $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; - $dis = $end + $start; - $output = array(); - - //----------------------------------------- - // Got any more? - //----------------------------------------- - - $tmp = $this->DB->buildAndFetch( array( 'select' => 'member_id', 'from' => 'members', 'limit' => array( $dis, 1 ) ) ); - $max = intval( $tmp['member_id'] ); - - //----------------------------------------- - // Avoid limit... - //----------------------------------------- - - $this->DB->build( array( 'select' => 'member_id, members_display_name', 'from' => 'members', 'order' => 'member_id ASC', 'limit' => array( $start, $end ) ) ); - $outer = $this->DB->execute(); - - //----------------------------------------- - // Process... - //----------------------------------------- - - while( $r = $this->DB->fetch( $outer ) ) - { - $this->DB->update( 'members', array( 'members_seo_name' => IPSText::makeSeoTitle( $r['members_display_name'] ) ), "member_id=" . $r['member_id'] ); - $done++; - } - - //----------------------------------------- - // Finish - or more?... - //----------------------------------------- - - if ( ! $done and ! $max ) - { - //----------------------------------------- - // Done.. - //----------------------------------------- - - $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}"; - $time = 2; - } - else - { - //----------------------------------------- - // More.. - //----------------------------------------- - $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); - $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; - $time = 0; - } - - //----------------------------------------- - // Bye.... - //----------------------------------------- - - $this->registry->output->redirect( $url, $text, $time ); - } - - - /** - * Rebuild Post Names - * - * @access public - * @return void - */ - public function rebuildPostNames() - { - //----------------------------------------- - // Set up - //----------------------------------------- - - $done = 0; - $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; - $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; - $dis = $end + $start; - $output = array(); - - //----------------------------------------- - // Got any more? - //----------------------------------------- - - $tmp = $this->DB->buildAndFetch( array( 'select' => 'member_id', 'from' => 'members', 'limit' => array( $dis, 1 ) ) ); - $max = intval( $tmp['member_id'] ); - - //----------------------------------------- - // Avoid limit... - //----------------------------------------- - - $this->DB->build( array( 'select' => 'member_id, members_display_name', 'from' => 'members', 'order' => 'member_id ASC', 'limit' => array( $start, $end ) ) ); - $outer = $this->DB->execute(); - - //----------------------------------------- - // Process... - //----------------------------------------- - - while( $r = $this->DB->fetch( $outer ) ) - { - $seoName = IPSText::makeSeoTitle( $r['members_display_name'] ); - $this->DB->update( 'topics', array( 'starter_name' => $r['members_display_name'], 'seo_first_name' => $seoName ), "starter_id=" . $r['member_id'] ); - $this->DB->update( 'topics', array( 'last_poster_name' => $r['members_display_name'], 'seo_last_name' => $seoName ), "last_poster_id=" . $r['member_id'] ); - - $done++; - } - - //----------------------------------------- - // Finish - or more?... - //----------------------------------------- - - if ( ! $done and ! $max ) - { - //----------------------------------------- - // Done.. - //----------------------------------------- - - $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}"; - $time = 2; - } - else - { - //----------------------------------------- - // More.. - //----------------------------------------- - $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); - $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; - $time = 0; - } - - //----------------------------------------- - // Bye.... - //----------------------------------------- - - $this->registry->output->redirect( $url, $text, $time ); - } - - /** - * Rebuild posts - * - * @access public - * @return void - */ - public function rebuildPosts() - { - //----------------------------------------- - // If it's "none", go back - //----------------------------------------- - - if( !$this->request['type'] OR $this->request['type'] == 'none' ) - { - $this->rebuildSplashScreen(); - return; - } - - //----------------------------------------- - // Only need to rebuild once - //----------------------------------------- - - $sections = array(); - $alreadyRebuilt = $this->DB->buildAndFetch( array( 'select' => 'cs_value', 'from' => 'cache_store', 'where' => "cs_key='isRebuilt'" ) ); - - if( $alreadyRebuilt['cs_value'] ) - { - $sections = explode( ',', $alreadyRebuilt['cs_value'] ); - } - - //----------------------------------------- - // Get new parser and old parser - //----------------------------------------- - - require_once( IPS_ROOT_PATH . "sources/handlers/han_parse_bbcode.php" ); - $parser = new parseBbcode( $this->registry ); - $oldparser = new parseBbcode( $this->registry, 'legacy' ); - - //----------------------------------------- - // Set up - //----------------------------------------- - - $done = 0; - $last = 0; - $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; - $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; - $dis = intval($this->request['dis']) >=0 ? intval($this->request['dis']) : 0; - $output = array(); - $plugin = null; - - $types = array( 'posts', 'pms', 'cal', 'announce', 'sigs', 'aboutme', 'rules' ); - - foreach( ipsRegistry::$applications as $app_dir => $app_data ) - { - //----------------------------------------- - // Retrieve the RSS links for the header - //----------------------------------------- - - if( file_exists( IPSLib::getAppDir( $app_dir ) . '/extensions/upgradePostRebuild.php' ) ) - { - require_once( IPSLib::getAppDir( $app_dir ) . '/extensions/upgradePostRebuild.php' ); - $className = "postRebuild_{$app_dir}"; - - if( class_exists( $className ) ) - { - $rebuild = new $className( $this->registry ); - - if( method_exists( $rebuild, "getDropdown" ) ) - { - $options = $rebuild->getDropdown(); - - if( count($options) ) - { - foreach( $options as $appOption ) - { - $types[] = $appOption[0]; - - if( $appOption[0] == $this->request['type'] ) - { - $plugin =& $rebuild; - break 2; - } - } - } - } - } - } - } - - $type = in_array( $this->request['type'], $types ) ? $this->request['type'] : 'posts'; - - //----------------------------------------- - // Got any more? - //----------------------------------------- - - switch( $type ) - { - case 'cal': - $tmp = $this->DB->buildAndFetch( array( 'select' => 'event_id', 'from' => 'cal_events', 'limit' => array($dis,1) ) ); - $max = intval( $tmp['event_id'] ); - break; - - case 'announce': - $tmp = $this->DB->buildAndFetch( array( 'select' => 'announce_id', 'from' => 'announcements', 'limit' => array($dis,1) ) ); - $max = intval( $tmp['announce_id'] ); - break; - - case 'pms': - $tmp = $this->DB->buildAndFetch( array( 'select' => 'msg_id', 'from' => 'message_posts', 'limit' => array($dis,1) ) ); - $max = intval( $tmp['msg_id'] ); - break; - - case 'sigs': - $tmp = $this->DB->buildAndFetch( array( 'select' => 'pp_member_id', 'from' => 'profile_portal', 'where' => "signature IS NOT NULL AND signature != ''", 'limit' => array($dis,1) ) ); - $max = intval( $tmp['pp_member_id'] ); - break; - - case 'aboutme': - $tmp = $this->DB->buildAndFetch( array( 'select' => 'pp_member_id', 'from' => 'profile_portal', 'where' => "pp_about_me IS NOT NULL AND pp_about_me != ''", 'limit' => array($dis,1) ) ); - $max = intval( $tmp['pp_member_id'] ); - break; - - case 'posts': - $tmp = $this->DB->buildAndFetch( array( 'select' => 'pid', 'from' => 'posts', 'limit' => array($dis,1) ) ); - $max = intval( $tmp['pid'] ); - break; - - case 'rules': - $tmp = $this->DB->buildAndFetch( array( 'select' => 'id', 'from' => 'forums', 'where' => "rules_text IS NOT NULL AND rules_text != ''", 'limit' => array($dis,1) ) ); - $max = intval( $tmp['id'] ); - break; - - default: - $max = $rebuild->getMax( $type, $dis ); - break; - - } - - //----------------------------------------- - // Avoid limit... - //----------------------------------------- - - switch( $type ) - { - case 'cal': - $this->DB->build( array( 'select' => 'e.*', - 'from' => array( 'cal_events' => 'e' ), - 'order' => 'e.event_id ASC', - 'where' => 'e.event_id > ' . $start, - 'limit' => array($end), - 'add_join' => array( 1 => array( 'type' => 'left', - 'select' => 'm.member_group_id, m.mgroup_others', - 'from' => array( 'members' => 'm' ), - 'where' => "m.member_id=e.event_member_id" - ) ) - ) ); - break; - - case 'announce': - $this->DB->build( array( 'select' => 'a.*', - 'from' => array( 'announcements' => 'a' ), - 'order' => 'a.announce_id ASC', - 'where' => 'a.announce_id > ' . $start, - 'limit' => array($end), - 'add_join' => array( 1 => array( 'type' => 'left', - 'select' => 'm.member_group_id, m.mgroup_others', - 'from' => array( 'members' => 'm' ), - 'where' => "m.member_id=a.announce_member_id" - ) ) - ) ); - break; - - case 'pms': - $this->DB->build( array( 'select' => 'p.*', - 'from' => array( 'message_posts' => 'p' ), - 'order' => 'p.msg_id ASC', - 'where' => 'p.msg_id > ' . $start, - 'limit' => array($end), - 'add_join' => array( 1 => array( 'type' => 'left', - 'select' => 'm.member_group_id, m.mgroup_others', - 'from' => array( 'members' => 'm' ), - 'where' => "m.member_id=p.msg_author_id" - ) ) - ) ); - break; - - case 'sigs': - $this->DB->build( array( 'select' => 'me.signature, me.pp_member_id', - 'from' => array( 'profile_portal' => 'me' ), - 'order' => 'me.pp_member_id ASC', - 'where' => "me.signature IS NOT NULL AND me.signature != '' AND me.pp_member_id > " . $start, - 'limit' => array($end), - 'add_join' => array( 1 => array( 'type' => 'left', - 'select' => 'm.member_group_id, m.mgroup_others', - 'from' => array( 'members' => 'm' ), - 'where' => "m.member_id=me.pp_member_id" - ) ) - ) ); - break; - - case 'aboutme': - $this->DB->build( array( 'select' => 'pp.pp_about_me, pp.pp_member_id', - 'from' => array( 'profile_portal' => 'pp' ), - 'order' => 'pp.pp_member_id ASC', - 'where' => "pp.pp_about_me != '' AND pp.pp_about_me IS NOT NULL AND pp.pp_member_id > " . $start, - 'limit' => array($end), - 'add_join' => array( 1 => array( 'type' => 'left', - 'select' => 'm.member_group_id, m.mgroup_others', - 'from' => array( 'members' => 'm' ), - 'where' => "m.member_id=pp.pp_member_id" - ) ) - ) ); - break; - - case 'posts': - $this->DB->build( array( 'select' => 'p.*', - 'from' => array( 'posts' => 'p' ), - 'order' => 'p.pid ASC', - 'where' => 'p.pid > ' . $start, - 'limit' => array($end), - 'add_join' => array( 1 => array( 'type' => 'left', - 'select' => 't.forum_id', - 'from' => array( 'topics' => 't' ), - 'where' => "t.tid=p.topic_id" - ), - 2 => array( 'type' => 'left', - 'select' => 'm.member_group_id, m.mgroup_others', - 'from' => array( 'members' => 'm' ), - 'where' => "m.member_id=p.author_id" - ) ) - ) ); - break; - - case 'rules': - $this->DB->build( array( 'select' => '*', 'from' => 'forums', 'order' => 'id ASC', 'where' => "rules_text IS NOT NULL AND rules_text != '' AND id > " . $start, 'limit' => array($end) ) ); - break; - - default: - $plugin->executeQuery( $type, $start, $end ); - break; - } - - $outer = $this->DB->execute(); - - //----------------------------------------- - // Process... - //----------------------------------------- - - while( $r = $this->DB->fetch( $outer ) ) - { - //----------------------------------------- - // Reset - //----------------------------------------- - - $parser->quote_open = $oldparser->quote_open = 0; - $parser->quote_closed = $oldparser->quote_closed = 0; - $parser->quote_error = $oldparser->quote_error = 0; - $parser->error = $oldparser->error = ''; - $parser->image_count = $oldparser->image_count = 0; - $parser->parsing_mgroup = $oldparser->parsing_mgroup = $r['member_group_id']; - $parser->parsing_mgroup_others = $oldparser->parsing_mgroup_others = $r['mgroup_others']; - - $this->memberData['g_bypass_badwords'] = $this->caches['group_cache'][ $r['member_group_id'] ]['g_bypass_badwords']; - - switch( $type ) - { - case 'cal': - $parser->parse_smilies = $oldparser->parse_smilies = $r['event_smilies']; - $parser->parse_html = $oldparser->parse_html = 0; - $parser->parse_bbcode = $oldparser->parse_bbcode = 1; - $parser->parsing_section = 'calendar'; - - $rawpost = $oldparser->preEditParse( $r['event_content'] ); - break; - - case 'announce': - $parser->parse_smilies = $oldparser->parse_smilies = 1; - $parser->parse_html = $oldparser->parse_html = $r['announce_html_enabled']; - $parser->parse_bbcode = $oldparser->parse_bbcode = 1; - $parser->parse_nl2br = $oldparser->parse_nl2br = ( $r['announce_html_enabled'] ? $r['announce_nlbr_enabled'] : 1 ); - $parser->parsing_section = 'announcement'; - - $rawpost = $oldparser->preEditParse( $r['announce_post'] ); - break; - - case 'pms': - $parser->parse_smilies = $oldparser->parse_smilies = 1; - $parser->parse_html = $oldparser->parse_html = $this->settings['msg_allow_html']; - $parser->parse_bbcode = $oldparser->parse_bbcode = $this->settings['msg_allow_code']; - $parser->parse_nl2br = $oldparser->parse_nl2br = 1; - $parser->parsing_section = 'pms'; - - $rawpost = $oldparser->preEditParse( $r['msg_post'] ); - break; - - case 'sigs': - $parser->parse_smilies = $oldparser->parse_smilies = 0; - $parser->parse_html = $oldparser->parse_html = $this->settings['sig_allow_html']; - $parser->parse_bbcode = $oldparser->parse_bbcode = $this->settings['sig_allow_ibc']; - $parser->parse_nl2br = $oldparser->parse_nl2br = 1; - $parser->parsing_section = 'signatures'; - - $rawpost = $oldparser->preEditParse( $r['signature'] ); - break; - - case 'aboutme': - $parser->parse_smilies = $oldparser->parse_smilies = $this->settings['aboutme_emoticons']; - $parser->parse_html = $oldparser->parse_html = intval($this->settings['aboutme_html']); - $parser->parse_bbcode = $oldparser->parse_bbcode = $this->settings['aboutme_bbcode']; - $parser->parse_nl2br = $oldparser->parse_nl2br = 1; - $parser->parsing_section = 'aboutme'; - - $rawpost = $oldparser->preEditParse( $r['pp_about_me'] ); - break; - - case 'posts': - $parser->parse_smilies = $oldparser->parse_smilies = $r['use_emo']; - $parser->parse_html = $oldparser->parse_html = ( $this->registry->class_forums->forum_by_id[ $r['forum_id'] ]['use_html'] AND - $this->caches['group_cache'][ $r['member_group_id'] ]['g_dohtml'] AND - $r['post_htmlstate'] > 0 ) ? 1 : 0; - $parser->parse_bbcode = $oldparser->parse_bbcode = $this->registry->class_forums->forum_by_id[ $r['forum_id'] ]['use_ibc']; - $parser->parse_nl2br = $oldparser->parse_nl2br = ( $r['post_htmlstate'] != 1 ) ? 1 : 0; - $parser->parsing_section = 'topics'; - - $rawpost = $oldparser->preEditParse( $r['post'] ); - break; - - case 'rules': - $parser->parse_smilies = $oldparser->parse_smilies = 1; - $parser->parse_html = $oldparser->parse_html = 1; - $parser->parse_bbcode = $oldparser->parse_bbcode = 1; - $parser->parse_nl2br = $oldparser->parse_nl2br = 1; - $parser->parsing_section = 'rules'; - - $rawpost = $oldparser->preEditParse( $r['rules_text'] ); - break; - - default: - $plugin->parser =& $parser; - $plugin->oldparser =& $oldparser; - - $rawpost = $plugin->getRawPost( $type, $r ); - break; - } - - $newpost = $parser->preDbParse( $rawpost ); - - //----------------------------------------- - // Remove old \' escaping - //----------------------------------------- - - $newpost = str_replace( "\\'", "'", $newpost ); - - //----------------------------------------- - // Convert old dohtml? - //----------------------------------------- - - $htmlstate = 0; - - if ( strstr( strtolower($newpost), '[dohtml]' ) ) - { - //----------------------------------------- - // Can we use HTML? - //----------------------------------------- - - if ( $type == 'posts' AND $this->registry->class_forums->forum_by_id[ $r['forum_id'] ]['use_html'] ) - { - $htmlstate = 2; - } - - $newpost = preg_replace( "#\[dohtml\]#i" , "", $newpost ); - $newpost = preg_replace( "#\[/dohtml\]#i", "", $newpost ); - } - else - { - $htmlstate = intval( $r['post_htmlstate'] ); - } - - //----------------------------------------- - // Convert old attachment tags - //----------------------------------------- - - $newpost = preg_replace( "#\[attachmentid=(\d+?)\]#is", "[attachment=\\1:attachment]", $newpost ); - - if ( $newpost OR $type == 'sigs' OR $type == 'aboutme' ) - { - switch( $type ) - { - case 'posts': - $this->DB->update( 'posts', array( 'post' => $newpost, 'post_htmlstate' => $htmlstate ), 'pid='.$r['pid'] ); - $last = $r['pid']; - break; - - case 'pms': - $this->DB->update( 'message_posts', array( 'msg_post' => $newpost ), 'msg_id='.$r['msg_id'] ); - $last = $r['msg_id']; - break; - - case 'sigs': - $this->DB->update( 'profile_portal', array( 'signature' => $newpost ), 'pp_member_id='.$r['pp_member_id'] ); - $last = $r['pp_member_id']; - break; - - case 'aboutme': - $this->DB->update( 'profile_portal', array( 'pp_about_me' => $newpost ), 'pp_member_id='.$r['pp_member_id'] ); - $last = $r['pp_member_id']; - break; - - case 'cal': - $this->DB->update( 'cal_events', array( 'event_content' => $newpost ), 'event_id='.$r['event_id'] ); - $last = $r['event_id']; - break; - - case 'announce': - $this->DB->update( 'announcements', array( 'announce_post' => $newpost ), 'announce_id='.$r['announce_id'] ); - $last = $r['announce_id']; - break; - - case 'rules': - $this->DB->update( 'forums', array( 'rules_text' => $newpost ), 'id='.$r['id'] ); - $last = $r['id']; - break; - - default: - $last = $plugin->storeNewPost( $type, $r, $newpost ); - break; - } - } - - $done++; - } - - //----------------------------------------- - // Finish - or more?... - //----------------------------------------- - - if ( ! $last and ! $max ) - { - //----------------------------------------- - // Done.. - //----------------------------------------- - - $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}"; - $time = 2; - - $sections[] = $type; - $this->DB->replace( 'cache_store', array( 'cs_key' => 'isRebuilt', 'cs_value' => implode( ',', $sections ) ), array( "cs_key" ) ); - - if( $type == 'posts' ) - { - $this->DB->delete( 'content_cache_posts' ); - } - else if( $type == 'sigs' ) - { - $this->DB->delete( 'content_cache_sigs' ); - } - } - else - { - //----------------------------------------- - // More.. - //----------------------------------------- - - $dis = $dis + $done; - $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); - $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&type={$type}&pergo={$this->request['pergo']}&st={$last}&dis={$dis}"; - $time = 0; - } - - //----------------------------------------- - // Bye.... - //----------------------------------------- - - $this->registry->output->redirect( $url, $text, $time ); - } - - /** - * Resyncronize Topics - * - * @access public - * @return void - */ - public function resyncTopics() - { - require_once( IPSLib::getAppDir('forums') .'/sources/classes/moderate.php' ); - $modfunc = new moderatorLibrary( $this->registry ); - - $this->registry->class_localization->loadLanguageFile( array( 'public_global' ) ); - - //----------------------------------------- - // Set up - //----------------------------------------- - - $done = 0; - $start = intval( $this->request['st'] ) >= 0 ? intval( $this->request['st'] ) : 0; - $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; - $dis = $end + $start; - $output = array(); - - //----------------------------------------- - // Got any more? - //----------------------------------------- - - $tmp = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'topics', 'limit' => array( $dis, 1 ) ) ); - $max = intval( $tmp['count'] ); - - //----------------------------------------- - // Avoid limit... - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'topics', 'where' => 'state != "link"', 'order' => 'tid ASC', 'limit' => array( $start, $end ) ) ); - $outer = $this->DB->execute(); - - //----------------------------------------- - // Process... - //----------------------------------------- - - while( $r = $this->DB->fetch( $outer ) ) - { - $modfunc->rebuildTopic($r['tid'], 0); - - if ( $this->request['pergo'] <= 200 ) - { - $output[] = $this->lang->words['re_processed'].$r['title']; - } - - $done++; - } - - //----------------------------------------- - // Finish - or more?... - //----------------------------------------- - - if ( ! $done and ! $max ) - { - //----------------------------------------- - // Done.. - //----------------------------------------- - - $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}"; - $time = 2; - } - else - { - //----------------------------------------- - // More.. - //----------------------------------------- - $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); - $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; - $time = 0; - } - - //----------------------------------------- - // Bye.... - //----------------------------------------- - - $this->registry->output->redirect( $url, $text, $time ); - } - - /** - * Resyncronize forum data - * - * @access public - * @return void - */ - public function resyncForums() - { - require_once( IPSLib::getAppDir('forums') .'/sources/classes/moderate.php' ); - $modfunc = new moderatorLibrary( $this->registry ); - - //----------------------------------------- - // Set up - //----------------------------------------- - - $done = 0; - $start = intval( $this->request['st'] ) >= 0 ? intval( $this->request['st'] ) : 0; - $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; - $dis = $end + $start; - $output = array(); - - //----------------------------------------- - // Got any more? - //----------------------------------------- - - $tmp = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'forums', 'limit' => array( $dis, 1 ) ) ); - $max = intval( $tmp['count'] ); - - //----------------------------------------- - // Avoid limit... - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'forums', 'order' => 'id ASC', 'limit' => array( $start, $end ) ) ); - $outer = $this->DB->execute(); - - //----------------------------------------- - // Process... - //----------------------------------------- - - while( $r = $this->DB->fetch( $outer ) ) - { - $modfunc->forumRecount( $r['id'] ); - $output[] = sprintf( $this->lang->words['rebuild_process_f'], $r['name'] ); - $done++; - } - - //----------------------------------------- - // Finish - or more?... - //----------------------------------------- - - if ( ! $done and ! $max ) - { - //----------------------------------------- - // Done.. - //----------------------------------------- - - $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}"; - $time = 2; - } - else - { - //----------------------------------------- - // More.. - //----------------------------------------- - $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); - $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); - $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; - $time = 0; - } - - //----------------------------------------- - // Bye.... - //----------------------------------------- - - $this->registry->output->redirect( $url, $text, $time ); - } - - /** - * Splash screen with rebuild options - * - * @access public - * @return void - */ - public function rebuildSplashScreen() - { - /* Build Form Elements */ - $form = array(); - - $form['posts'] = $this->registry->output->formDropdown( 'posts' , array( 0 => array( 0, $this->lang->words['yesno_no'] ), 1 => array( 1, $this->lang->words['yesno_yes'] ) ) ); - $form['members'] = $this->registry->output->formDropdown( 'members', array( 0 => array( 0, $this->lang->words['yesno_no'] ), 1 => array( 1, $this->lang->words['yesno_yes'] ) ) ); - $form['lastreg'] = $this->registry->output->formDropdown( 'lastreg', array( 0 => array( 0, $this->lang->words['yesno_no'] ), 1 => array( 1, $this->lang->words['yesno_yes'] ) ) ); - $form['online'] = $this->registry->output->formDropdown( 'online' , array( 0 => array( 0, $this->lang->words['yesno_no'] ), 1 => array( 1, $this->lang->words['yesno_yes'] ) ) ); - - //----------------------------------------- - // Only need to rebuild once - //----------------------------------------- - - $todo = array( - array( 'posts' , $this->lang->words['remenu_posts'] ), - array( 'pms' , $this->lang->words['remenu_pms'] ), - array( 'cal' , $this->lang->words['remenu_events'] ), - array( 'announce', $this->lang->words['remenu_announce'] ), - array( 'sigs' , $this->lang->words['remenu_sigs'] ), - array( 'aboutme' , $this->lang->words['remenu_aboutme'] ), - array( 'rules' , $this->lang->words['remenu_rules'] ), - ); - - foreach( ipsRegistry::$applications as $app_dir => $app_data ) - { - //----------------------------------------- - // Retrieve the RSS links for the header - //----------------------------------------- - - if( file_exists( IPSLib::getAppDir( $app_dir ) . '/extensions/upgradePostRebuild.php' ) ) - { - require_once( IPSLib::getAppDir( $app_dir ) . '/extensions/upgradePostRebuild.php' ); - $className = "postRebuild_{$app_dir}"; - - if( class_exists( $className ) ) - { - $rebuild = new $className( $this->registry ); - - if( method_exists( $rebuild, "getDropdown" ) ) - { - $todo = array_merge( $todo, $rebuild->getDropdown() ); - } - } - } - } - - $final = array(); - $sections = array(); - - $alreadyRebuilt = $this->DB->buildAndFetch( array( 'select' => 'cs_value', 'from' => 'cache_store', 'where' => "cs_key='isRebuilt'" ) ); - - if( $alreadyRebuilt['cs_value'] ) - { - $sections = explode( ',', $alreadyRebuilt['cs_value'] ); - } - - $form['pergo'] = $this->registry->output->formSimpleInput( 'pergo', '50', 5 ); - - /* Output */ - $this->registry->output->html .= $this->html->rebuildSplashScreen( $form, $todo, $sections ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Rebuild & Other Tools + * Last Updated: $LastChangedDate: 2010-10-23 08:40:34 -0400 (Sat, 23 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 7023 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_tools_rebuild extends ipsCommand +{ + /** + * Skin object + * + * @var object Skin templates + */ + private $html; + + /**#@+ + * URL bits + * + * @var string + */ + public $form_code = ''; + public $form_code_js = ''; + /**#@-*/ + + /** + * Main class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'applications/forums/sources/classes/forums/class_forums.php', 'class_forums', 'forums' ); + $this->registry->setClass( 'class_forums', new $classToLoad( $registry ) ); + $this->registry->class_forums->forumsInit(); + + /* Load lang and skin */ + $this->registry->class_localization->loadLanguageFile( array( 'admin_tools' ) ); + $this->html = $this->registry->output->loadTemplate( 'cp_skin_rebuild' ); + + /* URLs */ + $this->form_code = $this->html->form_code = 'module=tools&section=rebuild'; + $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=rebuild'; + + /* What to do */ + switch( $this->request['do'] ) + { + case 'docount': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_recount' ); + $this->doCount(); + break; + + case 'doresyncforums': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_resynch' ); + $this->resyncForums(); + break; + + case 'doresynctopics': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_resyncht' ); + $this->resyncTopics(); + break; + + case 'doposts': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_rebuild' ); + $this->rebuildPosts(); + break; + + case 'dopostnames': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_postcounts' ); + $this->rebuildPostNames(); + break; + + case 'dopostcounts': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_postcounts' ); + $this->rebuildPostCount(); + break; + + case 'dothumbnails': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_thumbs' ); + $this->rebuildThumbnails(); + break; + + case 'dophotos': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_thumbs' ); + $this->rebuildPhotos(); + break; + + case 'doattachdata': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_attach' ); + $this->rebuildAttachdata(); + break; + + case 'doseousernames': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_rebuild' ); + $this->rebuildSeoUserNames(); + break; + case 'cleanattachments': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_orphaned' ); + $this->cleanAttachments(); + break; + + case 'cleanavatars': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_orphana' ); + $this->cleanAvatars(); + break; + + case 'cleanphotos': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_orphanp' ); + $this->cleanPhotos(); + break; + + case 'domsgcounts': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_postcounts' ); + $this->rebuildMsgCounts(); + break; + + //----------------------------------------- + // Tools + //----------------------------------------- + + case '300pms': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); + $this->tools300Pms(); + break; + + case '220tool_contacts': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); + $this->tools220Contacts(); + break; + + case '210polls': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); + $this->tools210Polls(); + break; + + case '210calevents': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); + $this->tools210Calevents(); + break; + + case '210tool_settings': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); + $this->tools210DupeSettings(); + break; + + case 'tool_settings': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); + $this->toolsDupeSettings(); + break; + + case 'tool_converge': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); + $this->toolsConverge(); + break; + + case 'tool_bansettings': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); + $this->toolBanSettings(); + break; + + case 'tools': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tools_220' ); + $this->toolsSplashScreen(); + break; + + case 'rebuild_overview': + default: + $this->rebuildSplashScreen(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * 3.0.x Tools: PM Conversion + * + * @return void + */ + public function tools300pms() + { + /* INIT */ + $pergo = 100; + $start = intval( $this->request['st'] ); + $converted = 0; + $seen = 0; + + //----------------------------------------- + // Check to make sure table exists + //----------------------------------------- + + if ( ! $this->DB->checkForTable( 'message_text' ) ) + { + $this->registry->output->global_message = $this->lang->words['re_msgsconverted']; + $this->toolsSplashScreen(); + return; + } + + + /* Select max topic ID thus far */ + $_tmp = $this->DB->buildAndFetch( array( 'select' => 'MAX(mt_id) as max', + 'from' => 'message_topics' ) ); + + $topicID = intval( $_tmp['max'] ); + + $this->DB->build( array( 'select' => '*', + 'from' => 'message_text', + 'order' => 'msg_id ASC', + 'limit' => array( $start, $pergo ) ) ); + + $o = $this->DB->execute(); + + while( $post = $this->DB->fetch( $o ) ) + { + $seen++; + + /* Make sure all data is valid */ + if ( intval( $post['msg_sent_to_count'] ) < 1 ) + { + continue; + } + + /* a little set up */ + $oldTopics = array(); + + /* Now fetch all topics */ + $this->DB->build( array( 'select' => '*', + 'from' => 'message_topics_old', + 'where' => 'mt_msg_id=' . intval( $post['msg_id'] ) ) ); + + $t = $this->DB->execute(); + + while( $topic = $this->DB->fetch( $t ) ) + { + /* Got any data? */ + if ( ! $topic['mt_from_id'] OR ! $topic['mt_to_id'] ) + { + continue; + } + + $oldTopics[ $topic['mt_id'] ] = $topic; + } + + /* Fail safe */ + if ( ! count( $oldTopics ) ) + { + continue; + } + + /* Increment number */ + $topicID++; + + /* Add in the post */ + $this->DB->insert( 'message_posts', array( 'msg_topic_id' => $topicID, + 'msg_date' => $post['msg_date'], + 'msg_post' => $post['msg_post'], + 'msg_post_key' => $post['msg_post_key'], + 'msg_author_id' => $post['msg_author_id'], + 'msg_ip_address' => $post['msg_ip_address'], + 'msg_is_first_post' => 1 ) ); + $postID = $this->DB->getInsertId(); + + /* Define some stuff. "To" member is added last in IPB 2 */ + $_tmp = $oldTopics; + ksort( $_tmp ); + $topicData = array_pop( $_tmp ); + $_invited = array(); + $_seenOwner = array(); + $_isDeleted = 0; + + /* Add the member rows */ + foreach( $oldTopics as $mt_id => $data ) + { + /* Prevent SQL error with unique index: Seen the owner ID already? */ + if ( $_seenOwner[ $data['mt_owner_id'] ] ) + { + continue; + } + + $_seenOwner[ $data['mt_owner_id'] ] = $data['mt_owner_id']; + + /* Build invited - does not include 'to' person */ + if ( $data['mt_owner_id'] AND ( $post['msg_author_id'] != $data['mt_owner_id'] ) AND ( $topicData['mt_to_id'] != $data['mt_owner_id'] ) ) + { + $_invited[ $data['mt_owner_id'] ] = $data['mt_owner_id']; + } + + $_isSent = ( $data['mt_vid_folder'] == 'sent' ) ? 1 : 0; + $_isDraft = ( $data['mt_vid_folder'] == 'unsent' ) ? 1 : 0; + + $this->DB->insert( 'message_topic_user_map', array( 'map_user_id' => $data['mt_owner_id'], + 'map_topic_id' => $topicID, + 'map_folder_id' => ( $_isDraft ) ? 'drafts' : 'myconvo', + 'map_read_time' => ( $data['mt_user_read'] ) ? $data['mt_user_read'] : ( $data['mt_read'] ? time() : 0 ), + 'map_user_active' => 1, + 'map_user_banned' => 0, + 'map_has_unread' => 0, //( $data['mt_read'] ) ? 0 : 1, + 'map_is_system' => 0, + 'map_last_topic_reply' => $post['msg_date'], + 'map_is_starter' => ( $data['mt_owner_id'] == $post['msg_author_id'] ) ? 1 : 0 ) ); + + } + + /* Now, did we see the author? If not, add them too but as inactive */ + if ( ! $_seenOwner[ $post['msg_author_id'] ] ) + { + $_isDeleted = 1; + + /*$this->DB->insert( 'message_topic_user_map', array( 'map_user_id' => $post['msg_author_id'], + 'map_topic_id' => $topicID, + 'map_folder_id' => 'myconvo', + 'map_read_time' => 0, + 'map_user_active' => 0, + 'map_user_banned' => 0, + 'map_has_unread' => 0, + 'map_is_system' => 0, + 'map_is_starter' => 1 ) );*/ + } + + $_isSent = ( $topicData['mt_vid_folder'] == 'sent' ) ? 1 : 0; + $_isDraft = ( $topicData['mt_vid_folder'] == 'unsent' ) ? 1 : 0; + + /* This is for MSSQL. I need a quick fix. This is it. Enjoy. */ + if ( method_exists( $this->DB, 'setTableIdentityInsert' ) ) + { + $this->DB->setTableIdentityInsert( 'message_topics', 'ON' ); + } + + /* Add the topic */ + $this->DB->insert( 'message_topics', array( 'mt_id' => $topicID, + 'mt_date' => $topicData['mt_date'], + 'mt_title' => $topicData['mt_title'], + 'mt_starter_id' => $post['msg_author_id'], + 'mt_start_time' => $post['msg_date'], + 'mt_last_post_time' => $post['msg_date'], + 'mt_invited_members' => serialize( array_keys( $_invited ) ), + 'mt_to_count' => count( array_keys( $_invited ) ) + 1, + 'mt_to_member_id' => $topicData['mt_to_id'], + 'mt_replies' => 0, + 'mt_last_msg_id' => $postID, + 'mt_first_msg_id' => $postID, + 'mt_is_draft' => $_isDraft, + 'mt_is_deleted' => $_isDeleted, + 'mt_is_system' => 0 ) ); + + /* This is for MSSQL. I need a quick fix. This is it. Enjoy. */ + if ( method_exists( $this->DB, 'setTableIdentityInsert' ) ) + { + $this->DB->setTableIdentityInsert( 'message_topics', 'OFF' ); + } + + $converted++; + } + + /* What to do? */ + if ( $seen ) + { + $this->request['st'] = $start + $pergo; + + /* We did some, go check again.. */ + $this->registry->output->global_message = sprintf( $this->lang->words['tools300pms'], $this->request['st'], $converted ); + + /* Re-do Page */ + $url = "{$this->settings['base_url']}{$this->form_code}&do=".$this->request['do'].'&st=' . $this->request['st']; + } + else + { + /* Update all members */ + $this->DB->update( 'members', array( 'msg_count_reset' => 1 ) ); + + $this->registry->output->global_message = $this->lang->words['re_pmsconverted']; + + $url = "{$this->settings['base_url']}{$this->form_code}&do=tools"; + } + + //----------------------------------------- + // Bye.... + //----------------------------------------- + + $this->registry->output->redirect( $url, $this->registry->output->global_message, 1 ); + } + + /** + * Tools: Ban Settings + * + * @return void + */ + public function toolBanSettings() + { + //----------------------------------------- + // Init + //----------------------------------------- + + $bomb = array(); + $ban = array(); + $ip_count = 0; + $email_count = 0; + $name_count = 0; + + //----------------------------------------- + // Get current entries + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'banfilters', 'order' => 'ban_date desc' ) ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $ban[ $r['ban_type'] ][ $r['ban_content'] ] = $r; + } + + //----------------------------------------- + // Get $INFO (again) ip email name + //----------------------------------------- + $INFO = array(); + require( DOC_IPS_ROOT_PATH."conf_global.php" ); + + //----------------------------------------- + // IP + //----------------------------------------- + + if ( $INFO['ban_ip'] ) + { + $bomb = explode( '|', $INFO['ban_ip'] ); + + if ( is_array( $bomb ) and count( $bomb ) ) + { + foreach( $bomb as $bang ) + { + if ( ! is_array($ban['ip'][ $bang ]) ) + { + $this->DB->insert( 'banfilters', array( 'ban_type' => 'ip', 'ban_content' => $bang, 'ban_date' => time() ) ); + + $ip_count++; + } + } + } + } + + //----------------------------------------- + // EMAIL + //----------------------------------------- + + if ( $INFO['ban_email'] ) + { + $bomb = explode( '|', $INFO['ban_email'] ); + + if ( is_array( $bomb ) and count( $bomb ) ) + { + foreach( $bomb as $bang ) + { + if ( ! is_array($ban['email'][ $bang ]) ) + { + $this->DB->insert( 'banfilters', array( 'ban_type' => 'email', 'ban_content' => $bang, 'ban_date' => time() ) ); + + $email_count++; + } + } + } + } + + //----------------------------------------- + // EMAIL + //----------------------------------------- + + if ( $INFO['ban_names'] ) + { + $bomb = explode( '|', $INFO['ban_names'] ); + + if ( is_array( $bomb ) and count( $bomb ) ) + { + foreach( $bomb as $bang ) + { + if ( ! is_array($ban['name'][ $bang ]) ) + { + $this->DB->insert( 'banfilters', array( 'ban_type' => 'name', 'ban_content' => $bang, 'ban_date' => time() ) ); + + $name_count++; + } + } + } + } + + $this->registry->output->global_message = sprintf( $this->lang->words['re_bansimport'], $ip_count, $email_count, $name_count ); + + $this->cache->rebuildCache( 'banfilters', 'global' ); + + $this->toolsSplashScreen(); + } + + /** + * 2.0.0 Tools: Converge + * + * @return void + */ + public function toolsConverge() + { + //----------------------------------------- + // Get all validating members... + //----------------------------------------- + + $to_unconverge = array(); + $unconverge_count = 0; + + $this->DB->build( array( 'select' => 'member_id, email, member_group_id', 'from' => 'members', 'where' => 'member_group_id='.$this->settings['auth_group'] ) ); + $this->DB->execute(); + + while( $m = $this->DB->fetch() ) + { + if ( preg_match( "#^{$m['member_id']}\-#", $m['email'] ) ) + { + $to_unconverge[] = $m['member_id']; + } + } + + $unconverge_count = intval( count( $to_unconverge ) ); + + if ( $unconverge_count ) + { + foreach( $to_unconverge as $mid ) + { + $this->DB->update( 'members' , array( 'member_group_id' => $this->settings['member_group'] ), 'member_id='.$mid ); + } + } + + //----------------------------------------- + // Time to move on dude + //----------------------------------------- + + $this->registry->output->global_message = (sprintf( $this->lang->words['re_convergerest'], $unconverge_count ) ); + $this->toolsSplashScreen(); + } + + /** + * 2.0.0 Tools: Dupe Settings + * + * @return void + */ + public function toolsDupeSettings() + { + //----------------------------------------- + // Remove dupe categories + //----------------------------------------- + + $title_id_to_keep = array(); + $title_id_to_delete = array(); + $title_deleted_count = 0; + + $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_settings_titles', 'order' => 'conf_title_id' ) ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + if ( $title_id_to_keep[ $r['conf_title_title'] ] ) + { + $title_id_to_delete[ $r['conf_title_id'] ] = $r['conf_title_id']; + } + else + { + $title_id_to_keep[ $r['conf_title_title'] ] = $r['conf_title_id']; + } + } + + if ( count( $title_id_to_delete ) ) + { + $this->DB->buildAndFetch( array( 'delete' => 'conf_settings_titles', 'where' => 'conf_title_id IN ('.implode( ',', $title_id_to_delete ).')' ) ); + } + + $title_deleted_count = intval( count($title_id_to_delete) ); + + //----------------------------------------- + // Remove dupe settings + //----------------------------------------- + + $setting_id_to_keep = array(); + $setting_id_to_delete = array(); + $setting_id_deleted_count = 0; + + $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'order' => 'conf_id' ) ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + if ( $setting_id_to_keep[ $r['conf_title'].','.$r['conf_key'] ] ) + { + $setting_id_to_delete[ $r['conf_id'] ] = $r['conf_id']; + } + else + { + $setting_id_to_keep[ $r['conf_title'].','.$r['conf_key'] ] = $r['conf_id']; + } + } + + if ( count( $setting_id_to_delete ) ) + { + $this->DB->buildAndFetch( array( 'delete' => 'conf_settings', 'where' => 'conf_id IN ('.implode( ',', $setting_id_to_delete ).')' ) ); + } + + $setting_deleted_count = intval( count($setting_id_to_delete) ); + + //----------------------------------------- + // Time to move on dude + //----------------------------------------- + + $this->registry->output->global_message = sprintf( $this->lang->words['re_deletetitle'], $title_deleted_count, $setting_deleted_count ) ; + $this->toolsSplashScreen(); + } + + /** + * 2.1.0 Tools: Dupe Settings + * + * @return void + */ + public function tools210DupeSettings() + { + //----------------------------------------- + // Remove dupe categories + //----------------------------------------- + + $title_id_to_keep = array(); + $title_id_to_delete = array(); + $title_deleted_count = 0; + $msg = ''; + + $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_settings_titles', 'order' => 'conf_title_id DESC' ) ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + if ( $title_id_to_keep[ $r['conf_title_title'] ] ) + { + $title_id_to_delete[ $r['conf_title_id'] ] = $r['conf_title_id']; + + $msg .= sprintf( $this->lang->words['re_deletingid'], $r['conf_title_title'], $r['conf_title_id'] ) . "
    "; + } + else + { + $title_id_to_keep[ $r['conf_title_title'] ] = $r['conf_title_id']; + $msg .= sprintf( $this->lang->words['re_keepingid'], $r['conf_title_title'], $r['conf_title_id'] ) . "
    "; + } + } + + if ( count( $title_id_to_delete ) ) + { + $this->DB->delete( 'core_sys_conf_settings', 'conf_title_id IN ('.implode( ',', $title_id_to_delete ).')' ); + } + + $title_deleted_count = intval( count($title_id_to_delete) ); + + //----------------------------------------- + // Time to move on dude + //----------------------------------------- + + $this->registry->output->global_message = sprintf( $this->lang->words['re_duplicatetitle'], $title_deleted_count, $msg ); + $this->toolsSplashScreen(); + } + + /** + * 2.1.0 Tools: Calendar Events + * + * @return void + */ + public function tools210Calevents() + { + $start = intval($_GET['st']); + $lend = 50; + $end = $start + $lend; + $max = intval($_GET['max']); + + //----------------------------------------- + // Check to make sure table exists + //----------------------------------------- + + if ( ! $this->DB->checkForTable( 'calendar_events' ) ) + { + $this->registry->output->global_message = $this->lang->words['re_calremoved']; + $this->toolsSplashScreen(); + return; + } + + //----------------------------------------- + // Do we need to run this tool? + //----------------------------------------- + + if ( ! $max ) + { + $original = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as max', 'from' => 'calendar_events' ) ); + $new = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as max', 'from' => 'cal_events' ) ); + + if ( $new['max'] >= $original['max'] OR ! $original['max'] ) + { + $this->registry->output->global_message = $this->lang->words['re_calalready']; + $this->toolsSplashScreen(); + } + } + + $max = intval( $original['max'] ); + + //----------------------------------------- + // In steps... + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'calendar_events', 'limit' => array( $start, $lend ) ) ); + $o = $this->DB->execute(); + + //----------------------------------------- + // Do it... + //----------------------------------------- + + if ( $this->DB->getTotalRows($o) ) + { + //----------------------------------------- + // Got some to convert! + //----------------------------------------- + + while ( $r = $this->DB->fetch($o) ) + { + $recur_remap = array( 'w' => 1, + 'm' => 2, + 'y' => 3 ); + + $begin_date = IPSTime::date_getgmdate( $r['unix_stamp'] ); + $end_date = IPSTime::date_getgmdate( $r['end_unix_stamp'] ); + + if ( ! $begin_date OR ! $end_date ) + { + continue; + } + + $day = $begin_date['mday']; + $month = $begin_date['mon']; + $year = $begin_date['year']; + + $end_day = $end_date['mday']; + $end_month = $end_date['mon']; + $end_year = $end_date['year']; + + $_final_unix_from = gmmktime(0, 0, 0, $month, $day, $year ); + + //----------------------------------------- + // Recur or ranged... + //----------------------------------------- + + if ( $r['event_repeat'] OR $r['event_ranged'] ) + { + $_final_unix_to = gmmktime(23, 59, 59, $end_month, $end_day, $end_year); + } + else + { + $_final_unix_to = 0; + } + + $new_event = array( 'event_calendar_id' => 1, + 'event_member_id' => $r['userid'], + 'event_content' => $r['event_text'], + 'event_title' => $r['title'], + 'event_smilies' => $r['show_emoticons'], + 'event_perms' => $r['read_perms'], + 'event_private' => $r['priv_event'], + 'event_approved' => 1, + 'event_unixstamp' => $r['unix_stamp'], + 'event_recurring' => ( $r['event_repeat'] && $recur_remap[ $r['repeat_unit'] ] ) ? $recur_remap[ $r['repeat_unit'] ] : 0, + 'event_tz' => 0, + 'event_unix_from' => $_final_unix_from, + 'event_unix_to' => $_final_unix_to ); + + //----------------------------------------- + // INSERT + //----------------------------------------- + + $this->DB->insert( 'cal_events', $new_event ); + } + + $this->registry->output->global_message = sprintf( $this->lang->words['re_calstartto'], $start, $end ); + + $url = "{$this->settings['base_url']}{$this->form_code}&do=".$this->request['do'].'&max='.$max.'&st='.$end; + } + else + { + $this->registry->output->global_message = $this->lang->words['re_calsconverted']; + + $url = "{$this->settings['base_url']}{$this->form_code}&do=tools"; + } + + //----------------------------------------- + // Bye.... + //----------------------------------------- + + $this->registry->output->redirect( $url, $this->registry->output->global_message, 1 ); + } + + /** + * 2.1.0 Tools: Polls + * + * @return void + */ + public function tools210Polls() + { + $start = intval( $this->request['st'] ); + $lend = 50; + $end = $start + $lend; + $max = intval( $this->request['max'] ); + $done = 0; + $converted = intval( $this->request['conv'] ); + + //----------------------------------------- + // First off.. grab number of polls to convert + //----------------------------------------- + + if ( ! $max ) + { + $total = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as max', + 'from' => 'topics', + 'where' => "poll_state IN ('open', 'close', 'closed')" ) ); + + $max = $total['max']; + } + + if ( $max < 1 ) + { + $done = 1; + } + + //----------------------------------------- + // In steps... + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', + 'from' => 'topics', + 'where' => "poll_state IN ('open', 'close', 'closed' )", + 'limit' => array( $start, $lend ) ) ); + $o = $this->DB->execute(); + + //----------------------------------------- + // Do it... + //----------------------------------------- + + if ( $this->DB->getTotalRows($o) ) + { + //----------------------------------------- + // Got some to convert! + //----------------------------------------- + + while ( $r = $this->DB->fetch($o) ) + { + $converted++; + + $new_poll = array( 1 => array() ); + + $poll_data = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'polls', + 'where' => "tid=".$r['tid'] + ) ); + if ( ! $poll_data['pid'] ) + { + continue; + } + + if ( ! $poll_data['poll_question'] ) + { + $poll_data['poll_question'] = $r['title']; + } + + //----------------------------------------- + // Kick start new poll + //----------------------------------------- + + $new_poll[1]['question'] = $poll_data['poll_question']; + + //----------------------------------------- + // Get OLD polls + //----------------------------------------- + + $poll_answers = unserialize( stripslashes( $poll_data['choices'] ) ); + + reset($poll_answers); + + foreach ( $poll_answers as $entry ) + { + $id = $entry[0]; + $choice = $entry[1]; + $votes = $entry[2]; + + $total_votes += $votes; + + if ( strlen($choice) < 1 ) + { + continue; + } + + $new_poll[ 1 ]['choice'][ $id ] = $choice; + $new_poll[ 1 ]['votes'][ $id ] = $votes; + } + + //----------------------------------------- + // Got something? + //----------------------------------------- + + if ( count( $new_poll[1]['choice'] ) ) + { + $this->DB->update( 'polls' , array( 'choices' => serialize( $new_poll ) ), 'tid='.$r['tid'] ); + $this->DB->update( 'topics', array( 'poll_state' => 1 ), 'tid='.$r['tid'] ); + } + + //----------------------------------------- + // All done? + //----------------------------------------- + + if ( $converted >= $max ) + { + $done = 1; + continue; + } + } + } + else + { + $done = 1; + } + + + if ( ! $done ) + { + $this->registry->output->global_message = sprintf( $this->lang->words['re_pollstartto'], $start, $end, $max ); + + $url = "{$this->settings['base_url']}{$this->form_code}&do=".$this->request['do'].'&max='.$max.'&st='.$end.'&conv='.$converted; + } + else + { + $this->registry->output->global_message = $this->lang->words['re_pollconverted']; + + $url = "{$this->settings['base_url']}{$this->form_code}&do=tools"; + } + + //----------------------------------------- + // Bye.... + //----------------------------------------- + + $this->registry->output->redirect( $url, $this->registry->output->global_message, 1 ); + } + + /** + * 2.2.0 Tools: Contacts + * DEPRECATED + * + * @return void + */ + public function tools220Contacts() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $start = intval($_GET['st']); + $lend = 50; + $end = $start + $lend; + $done = 0; + $updated = 0; + + //----------------------------------------- + // Get lib + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('members') . '/sources/friends.php', 'profileFriendsLib', 'members' ); + $profile = new $classToLoad( $this->registry ); + + + //----------------------------------------- + // OK.. + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', + 'from' => 'contacts', + 'where' => 'allow_msg=1', + 'limit' => array( $start, $lend ) ) ); + + $o = $this->DB->execute(); + + //----------------------------------------- + // Do it... + //----------------------------------------- + + if ( $this->DB->getTotalRows($o) ) + { + //----------------------------------------- + // Got some to convert! + //----------------------------------------- + + while( $row = $this->DB->fetch( $o ) ) + { + //----------------------------------------- + // Already a friend + //----------------------------------------- + + $friend = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'profile_friends', + 'where' => 'friends_member_id=' . intval( $row['member_id'] ) . ' AND friends_friend_id=' . intval( $row['contact_id'] ) ) ); + + if ( ! $friend['friends_id'] ) + { + //----------------------------------------- + // Add to DB + //----------------------------------------- + + $this->DB->insert( 'profile_friends', array( 'friends_member_id' => $row['member_id'], + 'friends_friend_id' => $row['contact_id'], + 'friends_approved' => 1, + 'friends_added' => time() ) ); + + //----------------------------------------- + // Rebuild... + //----------------------------------------- + + $profile->recacheFriends( array( 'member_id' => $row['member_id'] ) ); + + $updated++; + } + + $this->DB->delete( "contacts", "id={$row['id']}" ); + } + } + else + { + $done = 1; + } + + //----------------------------------------- + // Done? + //----------------------------------------- + + if ( ! $done ) + { + $this->registry->output->global_message = sprintf( $this->lang->words['re_contactsstartto'],$start, $end, $updated ); + + $url = "{$this->settings['base_url']}{$this->form_code}&do=".$this->request['do'].'&st='.$end; + } + else + { + $this->registry->output->global_message = $this->lang->words['re_contactsup']; + + $url = "{$this->settings['base_url']}{$this->form_code}&do=tools"; + } + + //----------------------------------------- + // Bye.... + //----------------------------------------- + + $this->registry->output->redirect( $url, $this->registry->output->global_message, 1 ); + } + + /** + * Cleanup Tools Splash Screen + * + * @return void + */ + public function toolsSplashScreen() + { + /* Output */ + $this->registry->output->html .= $this->html->toolsSplashScreen(); + } + + /** + * Count stats + * + * @return void + */ + public function doCount() + { + if ( (! $this->request['posts']) and (! $this->request['online']) and (! $this->request['members'] ) and (! $this->request['lastreg'] ) ) + { + $this->registry->output->showError( $this->lang->words['re_nothing'], 11154 ); + } + + $stats = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='stats'" ) ); + + $stats = unserialize( IPSText::stripslashes( $stats['cs_value'] ) ); + + if ($this->request['posts']) + { + $topics = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as tcount', + 'from' => 'topics', + 'where' => 'approved=1' ) ); + + $posts = $this->DB->buildAndFetch( array( 'select' => 'SUM(posts) as replies', + 'from' => 'topics', + 'where' => 'approved=1' ) ); + + $stats['total_topics'] = $topics['tcount']; + $stats['total_replies'] = $posts['replies']; + } + + if ($this->request['members']) + { + $this->DB->build( array( 'select' => 'count(member_id) as members', 'from' => 'members', 'where' => "member_group_id <> '{$this->settings['auth_group']}'" ) ); + $this->DB->execute(); + + $r = $this->DB->fetch(); + $stats['mem_count'] = intval($r['members']); + } + + if ($this->request['lastreg']) + { + $this->DB->build( array( 'select' => 'member_id, name, members_display_name, members_seo_name', + 'from' => 'members', + 'where' => "member_group_id <> '{$this->settings['auth_group']}' AND members_display_name != '' AND members_display_name " . $this->DB->buildIsNull( false ), + 'order' => "member_id DESC", + 'limit' => array(0,1) ) ); + $this->DB->execute(); + + $r = $this->DB->fetch(); + $stats['last_mem_name'] = $r['members_display_name'] ? $r['members_display_name'] : $r['name']; + $stats['last_mem_id'] = $r['member_id']; + $stats['last_mem_name_seo'] = $r['members_seo_name']; + } + + if ($this->request['online']) + { + $stats['most_date'] = time(); + $stats['most_count'] = 1; + } + + if ( count($stats) > 0 ) + { + $this->cache->setCache( 'stats', $stats, array( 'array' => 1 ) ); + } + else + { + $this->registry->output->showError( $this->lang->words['re_nothing'], 11155 ); + } + + $this->registry->output->global_message = $this->lang->words['re_statsrecount']; + + $this->registry->output->doneScreen($this->lang->words['re_statsrecount'], $this->lang->words['re_statscenter'], "{$this->form_code}", 'redirect' ); + } + + /** + * Clean out photos + * + * @return void + */ + public function cleanPhotos() + { + /* Upload Class */ + require_once( IPS_KERNEL_PATH.'classUpload.php' ); + $upload = new classUpload(); + + //----------------------------------------- + // Set up + //----------------------------------------- + + $done = 0; + $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; + $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; + $display = $end + $start; + $output = array(); + + //----------------------------------------- + // Pop open the directory and + // peek inside... + //----------------------------------------- + + $i = 0; + + try + { + foreach( new DirectoryIterator( $this->settings['upload_dir'] ) as $file ) + { + if ( strstr( $file->getFilename(), 'photo-' ) ) + { + $fullfile = $this->settings['upload_dir'].'/'.$file->getFilename(); + + $i++; + + //----------------------------------------- + // Already started? + //----------------------------------------- + + if ( $start > $i ) + { + continue; + } + + //----------------------------------------- + // Done for this iteration? + //----------------------------------------- + + if ( $i > $display ) + { + break; + } + + //----------------------------------------- + // Try and get attach row + //----------------------------------------- + + $found = $this->DB->buildAndFetch( array( 'select' => 'pp_member_id', 'from' => 'profile_portal', 'where' => "pp_main_photo='{$file->getFilename()}' OR pp_thumb_photo='{$file->getFilename()}'" ) ); + + if ( ! $found['pp_member_id'] ) + { + @unlink( $fullfile ); + $output[] = "{$this->lang->words['re_removedorph']} {$file->getFilename()}"; + } + else + { + $output[] = "{$this->lang->words['re_attachedok']} {$file->getFilename()}"; + } + } + } + } catch ( Exception $e ) {} + + //----------------------------------------- + // Finish - or more?... + //----------------------------------------- + + if ( $i < $display) + { + //----------------------------------------- + // Done.. + //----------------------------------------- + + $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}"; + $time = 2; + } + else + { + //----------------------------------------- + // More.. + //----------------------------------------- + $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $display ); + $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$display}"; + $time = 0; + } + + //----------------------------------------- + // Bye.... + //----------------------------------------- + + $this->registry->output->redirect( $url, $text, $time ); + } + + /** + * Clean out avatars + * + * @return void + */ + public function cleanAvatars() + { + /* Upload Class */ + require_once( IPS_KERNEL_PATH.'classUpload.php' ); + $upload = new classUpload(); + + //----------------------------------------- + // Set up + //----------------------------------------- + + $done = 0; + $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; + $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; + $dis = $end + $start; + $output = array(); + + //----------------------------------------- + // Pop open the directory and + // peek inside... + //----------------------------------------- + + $i = 0; + + try + { + foreach( new DirectoryIterator( $this->settings['upload_dir'] ) as $file ) + { + if ( strstr( $file->getFilename(), 'av-' ) ) + { + $fullfile = $this->settings['upload_dir'].'/'.$file->getFilename(); + + $i++; + + //----------------------------------------- + // Already started? + //----------------------------------------- + + if ( $start > $i ) + { + continue; + } + + //----------------------------------------- + // Done for this iteration? + //----------------------------------------- + + if ( $i > $dis ) + { + break; + } + + //----------------------------------------- + // Try and get attach row + //----------------------------------------- + + $found = $this->DB->buildAndFetch( array( 'select' => 'pp_member_id', 'from' => 'profile_portal', 'where' => "avatar_location='{$file->getFilename()}' or avatar_location='upload:{$file->getFilename()}'" ) ); + + if ( ! $found['pp_member_id'] ) + { + @unlink( $fullfile ); + $output[] = "{$this->lang->words['re_removedorph']} $file"; + } + else + { + $output[] = "{$this->lang->words['re_attachedok']} $file"; + } + } + } + } catch ( Exception $e ) {} + + //----------------------------------------- + // Finish - or more?... + //----------------------------------------- + + if ( $i < $dis) + { + //----------------------------------------- + // Done.. + //----------------------------------------- + + $text = $this->lang->words['re_rebuildcomplete'] . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}"; + $time = 2; + } + else + { + //----------------------------------------- + // More.. + //----------------------------------------- + $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); + $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; + $time = 0; + } + + //----------------------------------------- + // Bye.... + //----------------------------------------- + + $this->registry->output->redirect( $url, $text, $time ); + } + + /** + * Clean out attachments + * + * @return void + */ + public function cleanAttachments() + { + /* Upload Class */ + require_once( IPS_KERNEL_PATH.'classUpload.php' ); + $upload = new classUpload(); + + //----------------------------------------- + // Set up + //----------------------------------------- + + $done = 0; + $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; + $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; + $dis = $end + $start; + $output = array(); + + //----------------------------------------- + // Pop open the directory and + // peek inside... + //----------------------------------------- + + $i = 0; + try + { + foreach( new DirectoryIterator( $this->settings['upload_dir'] ) as $file ) + { + if ( $file->getFilename() == '.' OR $file->getFilename() == '..' ) + { + continue; + } + + $fullfile = $this->settings['upload_dir'] . '/' . $file->getFilename(); + + if( is_dir( $fullfile ) ) + { + $ndh = opendir( $fullfile ); + + try + { + foreach( new DirectoryIterator( $fullfile ) as $nfile ) + { + if ( $nfile->getFilename() == '.' OR $nfile->getFilename() == '..' ) + { + continue; + } + + if ( strstr( $nfile->getFilename(), 'post-' ) ) + { + $i++; + + //----------------------------------------- + // Already started? + //----------------------------------------- + + if ( $start > $i ) + { + continue; + } + + //----------------------------------------- + // Done for this iteration? + //----------------------------------------- + + if ( $i > $dis ) + { + break; + } + + //----------------------------------------- + // Try and get attach row + //----------------------------------------- + + $found = $this->DB->buildAndFetch( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => "attach_location='{$file->getFilename()}/{$nfile->getFilename()}' OR attach_thumb_location='{$file->getFilename()}/{$nfile->getFilename()}'" ) ); + + if ( ! $found['attach_id'] ) + { + @unlink( $fullfile . '/' . $nfile ); + $output[] = "{$this->lang->words['re_removedorph']} {$nfile->getFilename()}"; + } + else + { + $output[] = "{$this->lang->words['re_attachedok']} {$nfile->getFilename()}"; + } + } + } + } catch ( Exception $e ) {} + closedir( $ndh ); + } + else if ( strstr( $file, 'post-' ) ) + { + $i++; + + //----------------------------------------- + // Already started? + //----------------------------------------- + + if ( $start > $i ) + { + continue; + } + + //----------------------------------------- + // Done for this iteration? + //----------------------------------------- + + if ( $i > $dis ) + { + break; + } + + //----------------------------------------- + // Try and get attach row + //----------------------------------------- + + $found = $this->DB->buildAndFetch( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => "attach_location='{$file->getFilename()}' OR attach_thumb_location='{$file->getFilename()}'" ) ); + + if ( ! $found['attach_id'] ) + { + @unlink( $fullfile ); + $output[] = "{$this->lang->words['re_removedorph']} {$file->getFilename()}"; + } + else + { + $output[] = "{$this->lang->words['re_attachedok']} {$file->getFilename()}"; + } + } + } + } catch ( Exception $e ) {} + + //----------------------------------------- + // Finish - or more?... + //----------------------------------------- + + if ( $i < $dis) + { + //----------------------------------------- + // Done.. + //----------------------------------------- + + $text = $this->lang->words['re_rebuidcomp'] . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}"; + $time = 2; + } + else + { + //----------------------------------------- + // More.. + //----------------------------------------- + $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); + $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; + $time = 0; + } + + //----------------------------------------- + // Bye.... + //----------------------------------------- + + $this->registry->output->redirect( $url, $text, $time ); + } + + /** + * Rebuild Attachment Data + * + * @return void + */ + public function rebuildAttachdata() + { + /* Upload Class */ + require_once( IPS_KERNEL_PATH.'classUpload.php' ); + $upload = new classUpload(); + + //----------------------------------------- + // Set up + //----------------------------------------- + + $done = 0; + $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; + $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; + $dis = $end + $start; + $output = array(); + + //----------------------------------------- + // Got any more? + //----------------------------------------- + + $tmp = $this->DB->buildAndFetch( array( 'select' => 'attach_id', 'from' => 'attachments', 'limit' => array($dis,1) ) ); + $max = intval( $tmp['attach_id'] ); + + //----------------------------------------- + // Avoid limit... + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) ); + $outer = $this->DB->execute(); + + //----------------------------------------- + // Process... + //----------------------------------------- + + while( $r = $this->DB->fetch( $outer ) ) + { + //----------------------------------------- + // Get ext + //----------------------------------------- + + $update = array(); + + $update['attach_ext'] = $upload->_getFileExtension( $r['attach_file'] ); + + if ( $r['attach_location'] ) + { + if ( file_exists( $this->settings['upload_dir'].'/'.$r['attach_location'] ) ) + { + $update['attach_filesize'] = @filesize( $this->settings['upload_dir'].'/'.$r['attach_location'] ); + + if( $r['attach_is_image'] ) + { + $dims = @getimagesize( $this->settings['upload_dir'].'/'.$r['attach_location'] ); + + if( $dims[0] AND $dims[1] ) + { + $update['attach_img_width'] = $dims[0]; + $update['attach_img_height'] = $dims[1]; + } + } + } + } + + if ( count( $update ) ) + { + $this->DB->update( 'attachments', $update, 'attach_id='.$r['attach_id'] ); + } + + $done++; + } + + //----------------------------------------- + // Finish - or more?... + //----------------------------------------- + + if ( ! $done and ! $max ) + { + //----------------------------------------- + // Done.. + //----------------------------------------- + + $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}"; + $time = 2; + } + else + { + //----------------------------------------- + // More.. + //----------------------------------------- + $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); + $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; + $time = 0; + } + + //----------------------------------------- + // Bye.... + //----------------------------------------- + + $this->registry->output->redirect( $url, $text, $time ); + } + + /** + * Rebuild Photos + * + * @return void + */ + public function rebuildPhotos() + { + /* Image Class */ + require_once( IPS_KERNEL_PATH . 'classImage.php' ); + require_once( IPS_KERNEL_PATH . 'classImageGd.php' ); + + //----------------------------------------- + // Set up + //----------------------------------------- + + $done = 0; + $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; + $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; + $dis = $end + $start; + $output = array(); + + //----------------------------------------- + // Got any more? + //----------------------------------------- + + $tmp = $this->DB->buildAndFetch( array( 'select' => 'pp_member_id', 'from' => 'profile_portal', 'where' => "pp_main_photo != ''", 'order' => 'pp_member_id ASC', 'limit' => array($dis,1) ) ); + $max = intval( $tmp['pp_member_id'] ); + + //----------------------------------------- + // Avoid limit... + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'profile_portal', 'order' => 'pp_member_id ASC', 'where' => "pp_main_photo != ''", 'limit' => array($start,$end) ) ); + $outer = $this->DB->execute(); + + //----------------------------------------- + // Process... + //----------------------------------------- + + while( $r = $this->DB->fetch( $outer ) ) + { + if ( $r['pp_thumb_photo'] and ( $r['pp_thumb_photo'] != $r['pp_main_photo'] ) ) + { + if ( file_exists( $this->settings['upload_dir'].'/'.$r['pp_thumb_photo'] ) ) + { + if ( ! @unlink( $this->settings['upload_dir'].'/'.$r['pp_thumb_photo'] ) ) + { + $output[] = $this->lang->words['re_noremove'].$r['pp_thumb_photo']; + continue; + } + } + } + + if( !file_exists( $this->settings['upload_dir'] . '/' . $r['pp_main_photo'] ) ) + { + $output[] = $this->lang->words['re_noresizefound'] . $r['pp_main_photo']; + continue; + } + + $photo_data = array(); + $thumb_data = array(); + + $image = new classImageGd(); + + $image->init( array( 'image_path' => $this->settings['upload_dir'], 'image_file' => $r['pp_main_photo'] ) ); + + $thumb_data = $image->resizeImage( 50, 50 ); + $image->writeImage( $this->settings['upload_dir'] . '/' . $r['pp_thumb_photo'] ); + + $photo_data['pp_thumb_width'] = intval($thumb_data['newWidth']); + $photo_data['pp_thumb_height'] = intval($thumb_data['newHeight']); + $photo_data['pp_thumb_photo'] = $r['pp_thumb_photo']; + + if ( count( $photo_data ) ) + { + $this->DB->update( 'profile_portal', $photo_data, 'pp_member_id='.$r['pp_member_id'] ); + + $output[] = $this->lang->words['re_resized'].$r['pp_main_photo']; + } + + unset($image); + + $done++; + } + + //----------------------------------------- + // Finish - or more?... + //----------------------------------------- + + if ( ! $done and ! $max ) + { + //----------------------------------------- + // Done.. + //----------------------------------------- + + $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}"; + $time = 2; + } + else + { + //----------------------------------------- + // More.. + //----------------------------------------- + $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); + $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; + $time = 0; + } + + //----------------------------------------- + // Bye.... + //----------------------------------------- + + $this->registry->output->redirect( $url, $text, $time ); + } + + /** + * Rebuild Post Thumbnails + * + * @return void + */ + public function rebuildThumbnails() + { + require_once( IPS_KERNEL_PATH . 'classImage.php' ); + require_once( IPS_KERNEL_PATH . 'classImageGd.php' ); + + //----------------------------------------- + // Set up + //----------------------------------------- + + $done = 0; + $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; + $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; + $dis = $end + $start; + $output = array(); + + //----------------------------------------- + // Got any more? + //----------------------------------------- + + $tmp = $this->DB->buildAndFetch( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg')", 'limit' => array($dis,1) ) ); + $max = intval( $tmp['attach_id'] ); + + //----------------------------------------- + // Avoid limit... + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg')", 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) ); + $outer = $this->DB->execute(); + + //----------------------------------------- + // Process... + //----------------------------------------- + + while( $r = $this->DB->fetch( $outer ) ) + { + if ( $r['attach_is_image'] ) + { + if ( $r['attach_thumb_location'] and ( $r['attach_thumb_location'] != $r['attach_location'] ) ) + { + if ( file_exists( $this->settings['upload_dir'].'/'.$r['attach_thumb_location'] ) ) + { + if ( ! @unlink( $this->settings['upload_dir'].'/'.$r['attach_thumb_location'] ) ) + { + $output[] = $this->lang->words['re_noremove'].$r['attach_thumb_location']; + continue; + } + } + } + + $attach_data = array(); + $thumbnail = $r['attach_thumb_location'] ? $r['attach_thumb_location'] + : preg_replace( "/^(.*)\.(.+?)$/", "\\1_thumb.\\2", $r['attach_location'] ); + + $image = new classImageGd(); + + $image->init( array( + 'image_path' => $this->settings['upload_dir'], + 'image_file' => $r['attach_location'], + ) ); + + $return = $image->resizeImage( $this->settings['siu_width'], $this->settings['siu_height'] ); + $image->writeImage( $this->settings['upload_dir'] . '/' . $thumbnail ); + + $attach_data['attach_thumb_width'] = intval($return['newWidth'] ? $return['newWidth'] : $image->cur_dimensions['width']); + $attach_data['attach_thumb_height'] = intval($return['newHeight'] ? $return['newHeight'] : $image->cur_dimensions['height']); + $attach_data['attach_thumb_location'] = $thumbnail; + + if ( count( $attach_data ) ) + { + $this->DB->update( 'attachments', $attach_data, 'attach_id='.$r['attach_id'] ); + + $output[] = $this->lang->words['re_resized'].$r['attach_location']; + } + + unset($image); + } + + $done++; + } + + //----------------------------------------- + // Finish - or more?... + //----------------------------------------- + + if ( ! $done and ! $max ) + { + //----------------------------------------- + // Done.. + //----------------------------------------- + + $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}"; + $time = 2; + } + else + { + //----------------------------------------- + // More.. + //----------------------------------------- + $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); + $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; + $time = 0; + } + + //----------------------------------------- + // Bye.... + //----------------------------------------- + + $this->registry->output->redirect( $url, $text, $time ); + } + + /** + * Rebuild Messenger Totals + * + * @return void + */ + public function rebuildMsgCounts() + { + //----------------------------------------- + // Grab messenger lib + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php', 'messengerFunctions', 'members' ); + $messengerFunctions = new $classToLoad( $this->registry ); + + //----------------------------------------- + // Set up + //----------------------------------------- + + $done = 0; + $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; + $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; + $dis = $end + $start; + $output = array(); + + //----------------------------------------- + // Got any more? + //----------------------------------------- + + $tmp = $this->DB->buildAndFetch( array( 'select' => 'member_id', 'from' => 'members', 'limit' => array($dis,1) ) ); + $max = intval( $tmp['member_id'] ); + + //----------------------------------------- + // Avoid limit... + //----------------------------------------- + + $this->DB->build( array( 'select' => 'member_id, members_display_name', 'from' => 'members', 'order' => 'member_id ASC', 'limit' => array($start,$end) ) ); + $outer = $this->DB->execute(); + + //----------------------------------------- + // Process... + //----------------------------------------- + + while( $r = $this->DB->fetch( $outer ) ) + { + $messengerFunctions->resetMembersFolderCounts( $r['member_id'] ); + $messengerFunctions->resetMembersTotalTopicCount( $r['member_id'] ); + $messengerFunctions->resetMembersNewTopicCount( $r['member_id'] ); + + $done++; + } + + //----------------------------------------- + // Finish - or more?... + //----------------------------------------- + + if ( ! $done and ! $max ) + { + //----------------------------------------- + // Done.. + //----------------------------------------- + + $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}"; + $time = 2; + } + else + { + //----------------------------------------- + // More.. + //----------------------------------------- + $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); + $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; + $time = 0; + } + + //----------------------------------------- + // Bye.... + //----------------------------------------- + + $this->registry->output->redirect( $url, $text, $time ); + } + + /** + * Rebuild Post Count + * + * @return void + */ + public function rebuildPostCount() + { + //----------------------------------------- + // Forums not to count? + //----------------------------------------- + + $forums = array(); + + foreach( $this->registry->class_forums->forum_by_id as $data ) + { + if ( ! $data['inc_postcount'] ) + { + $forums[] = $data['id']; + } + } + + //----------------------------------------- + // Set up + //----------------------------------------- + + $done = 0; + $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; + $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; + $dis = $end + $start; + $output = array(); + + //----------------------------------------- + // Got any more? + //----------------------------------------- + + $tmp = $this->DB->buildAndFetch( array( 'select' => 'member_id', 'from' => 'members', 'limit' => array($dis,1) ) ); + $max = intval( $tmp['member_id'] ); + + //----------------------------------------- + // Avoid limit... + //----------------------------------------- + + $this->DB->build( array( 'select' => 'member_id, name', 'from' => 'members', 'order' => 'member_id ASC', 'limit' => array($start,$end) ) ); + $outer = $this->DB->execute(); + + //----------------------------------------- + // Process... + //----------------------------------------- + + while( $r = $this->DB->fetch( $outer ) ) + { + if ( ! count( $forums ) ) + { + $count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'posts', 'where' => 'queued != 1 AND author_id='.$r['member_id'] ) ); + } + else + { + $this->DB->build( array( 'select' => 'count(p.pid) as count', + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.queued <> 1 AND p.author_id='.$r['member_id'].' AND t.forum_id NOT IN ('.implode(",",$forums).')', + 'add_join' => array( 1 => array( 'type' => 'left', + 'from' => array( 'topics' => 't' ), + 'where' => 't.tid=p.topic_id' + ) ) + ) ); + $this->DB->execute(); + + $count = $this->DB->fetch(); + } + + $new_post_count = intval( $count['count'] ); + + $this->DB->update( 'members', array( 'posts' => $new_post_count ), 'member_id='.$r['member_id'] ); + + $done++; + } + + //----------------------------------------- + // Finish - or more?... + //----------------------------------------- + + if ( ! $done and ! $max ) + { + //----------------------------------------- + // Done.. + //----------------------------------------- + + $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}"; + $time = 2; + } + else + { + //----------------------------------------- + // More.. + //----------------------------------------- + $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); + $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; + $time = 0; + } + + //----------------------------------------- + // Bye.... + //----------------------------------------- + + $this->registry->output->redirect( $url, $text, $time ); + } + + /** + * Rebuild Seo User Names + * + * @return void + */ + public function rebuildSeoUserNames() + { + //----------------------------------------- + // Set up + //----------------------------------------- + + $done = 0; + $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; + $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; + $dis = $end + $start; + $output = array(); + + //----------------------------------------- + // Got any more? + //----------------------------------------- + + $tmp = $this->DB->buildAndFetch( array( 'select' => 'member_id', 'from' => 'members', 'limit' => array( $dis, 1 ) ) ); + $max = intval( $tmp['member_id'] ); + + //----------------------------------------- + // Avoid limit... + //----------------------------------------- + + $this->DB->build( array( 'select' => 'member_id, members_display_name', 'from' => 'members', 'order' => 'member_id ASC', 'limit' => array( $start, $end ) ) ); + $outer = $this->DB->execute(); + + //----------------------------------------- + // Process... + //----------------------------------------- + + while( $r = $this->DB->fetch( $outer ) ) + { + $this->DB->update( 'members', array( 'members_seo_name' => IPSText::makeSeoTitle( $r['members_display_name'] ) ), "member_id=" . $r['member_id'] ); + $done++; + } + + //----------------------------------------- + // Finish - or more?... + //----------------------------------------- + + if ( ! $done and ! $max ) + { + //----------------------------------------- + // Done.. + //----------------------------------------- + + $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}"; + $time = 2; + } + else + { + //----------------------------------------- + // More.. + //----------------------------------------- + $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); + $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; + $time = 0; + } + + //----------------------------------------- + // Bye.... + //----------------------------------------- + + $this->registry->output->redirect( $url, $text, $time ); + } + + + /** + * Rebuild Post Names + * + * @return void + */ + public function rebuildPostNames() + { + //----------------------------------------- + // Set up + //----------------------------------------- + + $done = 0; + $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; + $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; + $dis = $end + $start; + $output = array(); + + //----------------------------------------- + // Got any more? + //----------------------------------------- + + $tmp = $this->DB->buildAndFetch( array( 'select' => 'member_id', 'from' => 'members', 'limit' => array( $dis, 1 ) ) ); + $max = intval( $tmp['member_id'] ); + + //----------------------------------------- + // Avoid limit... + //----------------------------------------- + + $this->DB->build( array( 'select' => 'member_id, members_display_name', 'from' => 'members', 'order' => 'member_id ASC', 'limit' => array( $start, $end ) ) ); + $outer = $this->DB->execute(); + + //----------------------------------------- + // Process... + //----------------------------------------- + + while( $r = $this->DB->fetch( $outer ) ) + { + $seoName = IPSText::makeSeoTitle( $r['members_display_name'] ); + $this->DB->update( 'topics', array( 'starter_name' => $r['members_display_name'], 'seo_first_name' => $seoName ), "starter_id=" . $r['member_id'] ); + $this->DB->update( 'topics', array( 'last_poster_name' => $r['members_display_name'], 'seo_last_name' => $seoName ), "last_poster_id=" . $r['member_id'] ); + + $done++; + } + + //----------------------------------------- + // Finish - or more?... + //----------------------------------------- + + if ( ! $done and ! $max ) + { + //----------------------------------------- + // Done.. + //----------------------------------------- + + $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}"; + $time = 2; + } + else + { + //----------------------------------------- + // More.. + //----------------------------------------- + $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); + $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; + $time = 0; + } + + //----------------------------------------- + // Bye.... + //----------------------------------------- + + $this->registry->output->redirect( $url, $text, $time ); + } + + /** + * Rebuild posts + * + * @return void + */ + public function rebuildPosts() + { + //----------------------------------------- + // If it's "none", go back + //----------------------------------------- + + if( !$this->request['type'] OR $this->request['type'] == 'none' ) + { + $this->rebuildSplashScreen(); + return; + } + + //----------------------------------------- + // Only need to rebuild once + //----------------------------------------- + + $sections = array(); + $alreadyRebuilt = $this->DB->buildAndFetch( array( 'select' => 'cs_value', 'from' => 'cache_store', 'where' => "cs_key='isRebuilt'" ) ); + + if( $alreadyRebuilt['cs_value'] ) + { + $sections = explode( ',', $alreadyRebuilt['cs_value'] ); + } + + //----------------------------------------- + // Get new parser and old parser + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_parse_bbcode.php', 'parseBbcode' ); + $parser = new $classToLoad( $this->registry ); + $oldparser = new $classToLoad( $this->registry, 'legacy' ); + + //----------------------------------------- + // Set up + //----------------------------------------- + + $done = 0; + $last = 0; + $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; + $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; + $dis = intval($this->request['dis']) >=0 ? intval($this->request['dis']) : 0; + $output = array(); + $plugin = null; + + $types = array( 'posts', 'pms', 'cal', 'announce', 'sigs', 'aboutme', 'rules' ); + + foreach( ipsRegistry::$applications as $app_dir => $app_data ) + { + //----------------------------------------- + // Retrieve the RSS links for the header + //----------------------------------------- + + if( file_exists( IPSLib::getAppDir( $app_dir ) . '/extensions/upgradePostRebuild.php' ) ) + { + $className = IPSLib::loadLibrary( IPSLib::getAppDir( $app_dir ) . '/extensions/upgradePostRebuild.php', 'postRebuild_'.$app_dir, $app_dir ); + + if( class_exists( $className ) ) + { + $rebuild = new $className( $this->registry ); + + if( method_exists( $rebuild, "getDropdown" ) ) + { + $options = $rebuild->getDropdown(); + + if( count($options) ) + { + foreach( $options as $appOption ) + { + $types[] = $appOption[0]; + + if( $appOption[0] == $this->request['type'] ) + { + $plugin =& $rebuild; + break 2; + } + } + } + } + } + } + } + + $type = in_array( $this->request['type'], $types ) ? $this->request['type'] : 'posts'; + + //----------------------------------------- + // Got any more? + //----------------------------------------- + + switch( $type ) + { + case 'cal': + $tmp = $this->DB->buildAndFetch( array( 'select' => 'event_id', 'from' => 'cal_events', 'limit' => array($dis,1) ) ); + $max = intval( $tmp['event_id'] ); + break; + + case 'announce': + $tmp = $this->DB->buildAndFetch( array( 'select' => 'announce_id', 'from' => 'announcements', 'limit' => array($dis,1) ) ); + $max = intval( $tmp['announce_id'] ); + break; + + case 'pms': + $tmp = $this->DB->buildAndFetch( array( 'select' => 'msg_id', 'from' => 'message_posts', 'limit' => array($dis,1) ) ); + $max = intval( $tmp['msg_id'] ); + break; + + case 'sigs': + $tmp = $this->DB->buildAndFetch( array( 'select' => 'pp_member_id', 'from' => 'profile_portal', 'where' => "signature IS NOT NULL AND signature != ''", 'limit' => array($dis,1) ) ); + $max = intval( $tmp['pp_member_id'] ); + break; + + case 'aboutme': + $tmp = $this->DB->buildAndFetch( array( 'select' => 'pp_member_id', 'from' => 'profile_portal', 'where' => "pp_about_me IS NOT NULL AND pp_about_me != ''", 'limit' => array($dis,1) ) ); + $max = intval( $tmp['pp_member_id'] ); + break; + + case 'posts': + $tmp = $this->DB->buildAndFetch( array( 'select' => 'pid', 'from' => 'posts', 'limit' => array($dis,1) ) ); + $max = intval( $tmp['pid'] ); + break; + + case 'rules': + $tmp = $this->DB->buildAndFetch( array( 'select' => 'id', 'from' => 'forums', 'where' => "rules_text IS NOT NULL AND rules_text != ''", 'limit' => array($dis,1) ) ); + $max = intval( $tmp['id'] ); + break; + + default: + $max = $rebuild->getMax( $type, $dis ); + break; + + } + + //----------------------------------------- + // Avoid limit... + //----------------------------------------- + + switch( $type ) + { + case 'cal': + $this->DB->build( array( 'select' => 'e.*', + 'from' => array( 'cal_events' => 'e' ), + 'order' => 'e.event_id ASC', + 'where' => 'e.event_id > ' . $start, + 'limit' => array($end), + 'add_join' => array( 1 => array( 'type' => 'left', + 'select' => 'm.member_group_id, m.mgroup_others', + 'from' => array( 'members' => 'm' ), + 'where' => "m.member_id=e.event_member_id" + ) ) + ) ); + break; + + case 'announce': + $this->DB->build( array( 'select' => 'a.*', + 'from' => array( 'announcements' => 'a' ), + 'order' => 'a.announce_id ASC', + 'where' => 'a.announce_id > ' . $start, + 'limit' => array($end), + 'add_join' => array( 1 => array( 'type' => 'left', + 'select' => 'm.member_group_id, m.mgroup_others', + 'from' => array( 'members' => 'm' ), + 'where' => "m.member_id=a.announce_member_id" + ) ) + ) ); + break; + + case 'pms': + $this->DB->build( array( 'select' => 'p.*', + 'from' => array( 'message_posts' => 'p' ), + 'order' => 'p.msg_id ASC', + 'where' => 'p.msg_id > ' . $start, + 'limit' => array($end), + 'add_join' => array( 1 => array( 'type' => 'left', + 'select' => 'm.member_group_id, m.mgroup_others', + 'from' => array( 'members' => 'm' ), + 'where' => "m.member_id=p.msg_author_id" + ) ) + ) ); + break; + + case 'sigs': + $this->DB->build( array( 'select' => 'me.signature, me.pp_member_id', + 'from' => array( 'profile_portal' => 'me' ), + 'order' => 'me.pp_member_id ASC', + 'where' => "me.signature IS NOT NULL AND me.signature != '' AND me.pp_member_id > " . $start, + 'limit' => array($end), + 'add_join' => array( 1 => array( 'type' => 'left', + 'select' => 'm.member_group_id, m.mgroup_others', + 'from' => array( 'members' => 'm' ), + 'where' => "m.member_id=me.pp_member_id" + ) ) + ) ); + break; + + case 'aboutme': + $this->DB->build( array( 'select' => 'pp.pp_about_me, pp.pp_member_id', + 'from' => array( 'profile_portal' => 'pp' ), + 'order' => 'pp.pp_member_id ASC', + 'where' => "pp.pp_about_me != '' AND pp.pp_about_me IS NOT NULL AND pp.pp_member_id > " . $start, + 'limit' => array($end), + 'add_join' => array( 1 => array( 'type' => 'left', + 'select' => 'm.member_group_id, m.mgroup_others', + 'from' => array( 'members' => 'm' ), + 'where' => "m.member_id=pp.pp_member_id" + ) ) + ) ); + break; + + case 'posts': + $this->DB->build( array( 'select' => 'p.*', + 'from' => array( 'posts' => 'p' ), + 'order' => 'p.pid ASC', + 'where' => 'p.pid > ' . $start, + 'limit' => array($end), + 'add_join' => array( 1 => array( 'type' => 'left', + 'select' => 't.forum_id', + 'from' => array( 'topics' => 't' ), + 'where' => "t.tid=p.topic_id" + ), + 2 => array( 'type' => 'left', + 'select' => 'm.member_group_id, m.mgroup_others', + 'from' => array( 'members' => 'm' ), + 'where' => "m.member_id=p.author_id" + ) ) + ) ); + break; + + case 'rules': + $this->DB->build( array( 'select' => '*', 'from' => 'forums', 'order' => 'id ASC', 'where' => "rules_text IS NOT NULL AND rules_text != '' AND id > " . $start, 'limit' => array($end) ) ); + break; + + default: + $plugin->executeQuery( $type, $start, $end ); + break; + } + + $outer = $this->DB->execute(); + + //----------------------------------------- + // Process... + //----------------------------------------- + + while( $r = $this->DB->fetch( $outer ) ) + { + //----------------------------------------- + // Reset + //----------------------------------------- + + $parser->quote_open = $oldparser->quote_open = 0; + $parser->quote_closed = $oldparser->quote_closed = 0; + $parser->quote_error = $oldparser->quote_error = 0; + $parser->error = $oldparser->error = ''; + $parser->image_count = $oldparser->image_count = 0; + $parser->parsing_mgroup = $oldparser->parsing_mgroup = $r['member_group_id']; + $parser->parsing_mgroup_others = $oldparser->parsing_mgroup_others = $r['mgroup_others']; + + $this->memberData['g_bypass_badwords'] = $this->caches['group_cache'][ $r['member_group_id'] ]['g_bypass_badwords']; + + switch( $type ) + { + case 'cal': + $parser->parse_smilies = $oldparser->parse_smilies = $r['event_smilies']; + $parser->parse_html = $oldparser->parse_html = 0; + $parser->parse_bbcode = $oldparser->parse_bbcode = 1; + $parser->parsing_section = 'calendar'; + + $rawpost = $oldparser->preEditParse( $r['event_content'] ); + break; + + case 'announce': + $parser->parse_smilies = $oldparser->parse_smilies = 1; + $parser->parse_html = $oldparser->parse_html = $r['announce_html_enabled']; + $parser->parse_bbcode = $oldparser->parse_bbcode = 1; + $parser->parse_nl2br = $oldparser->parse_nl2br = ( $r['announce_html_enabled'] ? $r['announce_nlbr_enabled'] : 1 ); + $parser->parsing_section = 'announcement'; + + $rawpost = $oldparser->preEditParse( $r['announce_post'] ); + break; + + case 'pms': + $parser->parse_smilies = $oldparser->parse_smilies = 1; + $parser->parse_html = $oldparser->parse_html = $this->settings['msg_allow_html']; + $parser->parse_bbcode = $oldparser->parse_bbcode = $this->settings['msg_allow_code']; + $parser->parse_nl2br = $oldparser->parse_nl2br = 1; + $parser->parsing_section = 'pms'; + + $rawpost = $oldparser->preEditParse( $r['msg_post'] ); + break; + + case 'sigs': + $parser->parse_smilies = $oldparser->parse_smilies = 0; + $parser->parse_html = $oldparser->parse_html = $this->settings['sig_allow_html']; + $parser->parse_bbcode = $oldparser->parse_bbcode = $this->settings['sig_allow_ibc']; + $parser->parse_nl2br = $oldparser->parse_nl2br = 1; + $parser->parsing_section = 'signatures'; + + $rawpost = $oldparser->preEditParse( $r['signature'] ); + break; + + case 'aboutme': + $parser->parse_smilies = $oldparser->parse_smilies = $this->settings['aboutme_emoticons']; + $parser->parse_html = $oldparser->parse_html = intval($this->settings['aboutme_html']); + $parser->parse_bbcode = $oldparser->parse_bbcode = $this->settings['aboutme_bbcode']; + $parser->parse_nl2br = $oldparser->parse_nl2br = 1; + $parser->parsing_section = 'aboutme'; + + $rawpost = $oldparser->preEditParse( $r['pp_about_me'] ); + break; + + case 'posts': + $parser->parse_smilies = $oldparser->parse_smilies = $r['use_emo']; + $parser->parse_html = $oldparser->parse_html = ( $this->registry->class_forums->forum_by_id[ $r['forum_id'] ]['use_html'] AND + $this->caches['group_cache'][ $r['member_group_id'] ]['g_dohtml'] AND + $r['post_htmlstate'] > 0 ) ? 1 : 0; + $parser->parse_bbcode = $oldparser->parse_bbcode = $this->registry->class_forums->forum_by_id[ $r['forum_id'] ]['use_ibc']; + $parser->parse_nl2br = $oldparser->parse_nl2br = ( $r['post_htmlstate'] != 1 ) ? 1 : 0; + $parser->parsing_section = 'topics'; + + $rawpost = $oldparser->preEditParse( $r['post'] ); + break; + + case 'rules': + $parser->parse_smilies = $oldparser->parse_smilies = 1; + $parser->parse_html = $oldparser->parse_html = 1; + $parser->parse_bbcode = $oldparser->parse_bbcode = 1; + $parser->parse_nl2br = $oldparser->parse_nl2br = 1; + $parser->parsing_section = 'rules'; + + $rawpost = $oldparser->preEditParse( $r['rules_text'] ); + break; + + default: + $plugin->parser =& $parser; + $plugin->oldparser =& $oldparser; + + $rawpost = $plugin->getRawPost( $type, $r ); + break; + } + + $newpost = $parser->preDbParse( $rawpost ); + + //----------------------------------------- + // Remove old \' escaping + //----------------------------------------- + + $newpost = str_replace( "\\'", "'", $newpost ); + + //----------------------------------------- + // Convert old dohtml? + //----------------------------------------- + + $htmlstate = 0; + + if ( strstr( strtolower($newpost), '[dohtml]' ) ) + { + //----------------------------------------- + // Can we use HTML? + //----------------------------------------- + + if ( $type == 'posts' AND $this->registry->class_forums->forum_by_id[ $r['forum_id'] ]['use_html'] ) + { + $htmlstate = 2; + } + + $newpost = preg_replace( "#\[dohtml\]#i" , "", $newpost ); + $newpost = preg_replace( "#\[/dohtml\]#i", "", $newpost ); + } + else + { + $htmlstate = intval( $r['post_htmlstate'] ); + } + + //----------------------------------------- + // Convert old attachment tags + //----------------------------------------- + + $newpost = preg_replace( "#\[attachmentid=(\d+?)\]#is", "[attachment=\\1:attachment]", $newpost ); + + if ( $newpost OR $type == 'sigs' OR $type == 'aboutme' ) + { + switch( $type ) + { + case 'posts': + $this->DB->update( 'posts', array( 'post' => $newpost, 'post_htmlstate' => $htmlstate ), 'pid='.$r['pid'] ); + $last = $r['pid']; + break; + + case 'pms': + $this->DB->update( 'message_posts', array( 'msg_post' => $newpost ), 'msg_id='.$r['msg_id'] ); + $last = $r['msg_id']; + break; + + case 'sigs': + $this->DB->update( 'profile_portal', array( 'signature' => $newpost ), 'pp_member_id='.$r['pp_member_id'] ); + $last = $r['pp_member_id']; + break; + + case 'aboutme': + $this->DB->update( 'profile_portal', array( 'pp_about_me' => $newpost ), 'pp_member_id='.$r['pp_member_id'] ); + $last = $r['pp_member_id']; + break; + + case 'cal': + $this->DB->update( 'cal_events', array( 'event_content' => $newpost ), 'event_id='.$r['event_id'] ); + $last = $r['event_id']; + break; + + case 'announce': + $this->DB->update( 'announcements', array( 'announce_post' => $newpost ), 'announce_id='.$r['announce_id'] ); + $last = $r['announce_id']; + break; + + case 'rules': + $this->DB->update( 'forums', array( 'rules_text' => $newpost ), 'id='.$r['id'] ); + $last = $r['id']; + break; + + default: + $last = $plugin->storeNewPost( $type, $r, $newpost ); + break; + } + } + + $done++; + } + + //----------------------------------------- + // Finish - or more?... + //----------------------------------------- + + if ( ! $last and ! $max ) + { + //----------------------------------------- + // Done.. + //----------------------------------------- + + $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}"; + $time = 2; + + $sections[] = $type; + $this->DB->replace( 'cache_store', array( 'cs_key' => 'isRebuilt', 'cs_value' => implode( ',', $sections ) ), array( "cs_key" ) ); + + if( $type == 'posts' ) + { + $this->DB->delete( 'content_cache_posts' ); + } + else if( $type == 'sigs' ) + { + $this->DB->delete( 'content_cache_sigs' ); + } + } + else + { + //----------------------------------------- + // More.. + //----------------------------------------- + + $dis = $dis + $done; + $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); + $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&type={$type}&pergo={$this->request['pergo']}&st={$last}&dis={$dis}"; + $time = 0; + } + + //----------------------------------------- + // Bye.... + //----------------------------------------- + + $this->registry->output->redirect( $url, $text, $time ); + } + + /** + * Resyncronize Topics + * + * @return void + */ + public function resyncTopics() + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php', 'moderatorLibrary', 'forums' ); + $modfunc = new $classToLoad( $this->registry ); + + $this->registry->class_localization->loadLanguageFile( array( 'public_global' ) ); + + //----------------------------------------- + // Set up + //----------------------------------------- + + $done = 0; + $start = intval( $this->request['st'] ) >= 0 ? intval( $this->request['st'] ) : 0; + $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; + $dis = $end + $start; + $output = array(); + + //----------------------------------------- + // Got any more? + //----------------------------------------- + + $tmp = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'topics', 'limit' => array( $dis, 1 ) ) ); + $max = intval( $tmp['count'] ); + + //----------------------------------------- + // Avoid limit... + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'topics', 'where' => "state != 'link'", 'order' => 'tid ASC', 'limit' => array( $start, $end ) ) ); + $outer = $this->DB->execute(); + + //----------------------------------------- + // Process... + //----------------------------------------- + + while( $r = $this->DB->fetch( $outer ) ) + { + $modfunc->rebuildTopic($r['tid'], 0); + + if ( $this->request['pergo'] <= 200 ) + { + $output[] = $this->lang->words['re_processed'].$r['title']; + } + + $done++; + } + + //----------------------------------------- + // Finish - or more?... + //----------------------------------------- + + if ( ! $done and ! $max ) + { + //----------------------------------------- + // Done.. + //----------------------------------------- + + $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}"; + $time = 2; + } + else + { + //----------------------------------------- + // More.. + //----------------------------------------- + $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); + $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; + $time = 0; + } + + //----------------------------------------- + // Bye.... + //----------------------------------------- + + $this->registry->output->redirect( $url, $text, $time ); + } + + /** + * Resyncronize forum data + * + * @return void + */ + public function resyncForums() + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php', 'moderatorLibrary', 'forums' ); + $modfunc = new $classToLoad( $this->registry ); + + //----------------------------------------- + // Set up + //----------------------------------------- + + $done = 0; + $start = intval( $this->request['st'] ) >= 0 ? intval( $this->request['st'] ) : 0; + $end = intval( $this->request['pergo'] ) ? intval( $this->request['pergo'] ) : 100; + $dis = $end + $start; + $output = array(); + + //----------------------------------------- + // Got any more? + //----------------------------------------- + + $tmp = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'forums', 'limit' => array( $dis, 1 ) ) ); + $max = intval( $tmp['count'] ); + + //----------------------------------------- + // Avoid limit... + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'forums', 'order' => 'id ASC', 'limit' => array( $start, $end ) ) ); + $outer = $this->DB->execute(); + + //----------------------------------------- + // Process... + //----------------------------------------- + + while( $r = $this->DB->fetch( $outer ) ) + { + $modfunc->forumRecount( $r['id'] ); + $output[] = sprintf( $this->lang->words['rebuild_process_f'], $r['name'] ); + $done++; + } + + //----------------------------------------- + // Finish - or more?... + //----------------------------------------- + + if ( ! $done and ! $max ) + { + //----------------------------------------- + // Done.. + //----------------------------------------- + + $text = $this->lang->words['re_rebuildcomp'] . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}"; + $time = 2; + } + else + { + //----------------------------------------- + // More.. + //----------------------------------------- + $thisgoeshere = sprintf( $this->lang->words['re_thisgoeshere'], $dis ); + $text = $thisgoeshere . '
    ' . implode( "
    ", $output ); + $url = "{$this->settings['base_url']}{$this->form_code}&do={$this->request['do']}&pergo={$this->request['pergo']}&st={$dis}"; + $time = 0; + } + + //----------------------------------------- + // Bye.... + //----------------------------------------- + + $this->registry->output->redirect( $url, $text, $time ); + } + + /** + * Splash screen with rebuild options + * + * @return void + */ + public function rebuildSplashScreen() + { + /* Build Form Elements */ + $form = array(); + + $form['posts'] = $this->registry->output->formDropdown( 'posts' , array( 0 => array( 0, $this->lang->words['yesno_no'] ), 1 => array( 1, $this->lang->words['yesno_yes'] ) ) ); + $form['members'] = $this->registry->output->formDropdown( 'members', array( 0 => array( 0, $this->lang->words['yesno_no'] ), 1 => array( 1, $this->lang->words['yesno_yes'] ) ) ); + $form['lastreg'] = $this->registry->output->formDropdown( 'lastreg', array( 0 => array( 0, $this->lang->words['yesno_no'] ), 1 => array( 1, $this->lang->words['yesno_yes'] ) ) ); + $form['online'] = $this->registry->output->formDropdown( 'online' , array( 0 => array( 0, $this->lang->words['yesno_no'] ), 1 => array( 1, $this->lang->words['yesno_yes'] ) ) ); + + //----------------------------------------- + // Only need to rebuild once + //----------------------------------------- + + $todo = array( + array( 'posts' , $this->lang->words['remenu_posts'] ), + array( 'pms' , $this->lang->words['remenu_pms'] ), + array( 'cal' , $this->lang->words['remenu_events'] ), + array( 'announce', $this->lang->words['remenu_announce'] ), + array( 'sigs' , $this->lang->words['remenu_sigs'] ), + array( 'aboutme' , $this->lang->words['remenu_aboutme'] ), + array( 'rules' , $this->lang->words['remenu_rules'] ), + ); + + foreach( ipsRegistry::$applications as $app_dir => $app_data ) + { + //----------------------------------------- + // Retrieve the RSS links for the header + //----------------------------------------- + + if( file_exists( IPSLib::getAppDir( $app_dir ) . '/extensions/upgradePostRebuild.php' ) ) + { + $className = IPSLib::loadLibrary( IPSLib::getAppDir( $app_dir ) . '/extensions/upgradePostRebuild.php', 'postRebuild_'.$app_dir, $app_dir ); + + if( class_exists( $className ) ) + { + $rebuild = new $className( $this->registry ); + + if( method_exists( $rebuild, "getDropdown" ) ) + { + $todo = array_merge( $todo, $rebuild->getDropdown() ); + } + } + } + } + + $final = array(); + $sections = array(); + + $alreadyRebuilt = $this->DB->buildAndFetch( array( 'select' => 'cs_value', 'from' => 'cache_store', 'where' => "cs_key='isRebuilt'" ) ); + + if( $alreadyRebuilt['cs_value'] ) + { + $sections = explode( ',', $alreadyRebuilt['cs_value'] ); + } + + $form['pergo'] = $this->registry->output->formSimpleInput( 'pergo', '50', 5 ); + + /* Output */ + $this->registry->output->html .= $this->html->rebuildSplashScreen( $form, $todo, $sections ); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/tools/settings.php b/upload/admin/applications/core/modules_admin/tools/settings.php index 7568a1d2..e73af8f5 100644 --- a/upload/admin/applications/core/modules_admin/tools/settings.php +++ b/upload/admin/applications/core/modules_admin/tools/settings.php @@ -1,2254 +1,2139 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_core_tools_settings extends ipsCommand -{ - /** - * Key array - * - * @access private - * @var array Array of keys - */ - private $key_array = array(); - - /** - * Setting group array - * - * @access private - * @var array Array of setting groups - */ - private $in_group = array(); - - /** - * Setting groups array - * - * @access private - * @var array Array of setting groups - */ - private $setting_groups = array(); - - /** - * Setting groups array mapping - * - * @access private - * @var array Array of setting groups - */ - private $setting_groups_by_key = array(); - - /** - * Skin object - * This is public so that the portal can access it - * - * @access public - * @var object Skin templates - */ - public $html; - - /** - * Form code - * This is public so that the portal can access it - * - * @access public - * @var string Form code - */ - public $form_code; - - /** - * Form code - * This is public so that the portal can access it - * - * @access public - * @var string JS Form code - */ - public $form_code_js; - - /** - * Application to use - * - * @access private - * @var string Application - */ - private $_app; - - /** - * Where to return to after save - * - * @access public - * @var string URL to go to - */ - public $return_after_save; - - /** - * Breadcrumb url to use in place of the default - * - * @access public - * @var string - */ - public $base_nav_url; - - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load language - //----------------------------------------- - - $this->registry->class_localization->loadLanguageFile( array( 'admin_tools' ) ); - - $this->html = $this->registry->output->loadTemplate('cp_skin_tools'); - - $this->form_code = $this->html->form_code = 'module=tools&section=settings'; - $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=settings'; - - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'settings_manage' ); - - switch( $this->request['do'] ) - { - case 'settinggroup_resync': - $this->_resynchSettingGroup(); - break; - - case 'settinggroup_delete': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'settings_delete' ); - $this->_deleteSettingGroup(); - break; - - case 'settinggroup_new': - $this->_settingGroupForm('add'); - break; - - case 'settinggroup_showedit': - $this->_settingGroupForm('edit'); - break; - - case 'settinggroup_add': - $this->_settingGroupSave('add'); - break; - - case 'settinggroup_edit': - $this->_settingGroupSave('edit'); - break; - - case 'settingnew': - $this->_settingForm('add'); - break; - - case 'setting_showedit': - $this->_settingForm('edit'); - break; - - case 'setting_add': - $this->_settingSave('add'); - break; - - case 'setting_edit': - $this->_settingSave('edit'); - break; - - case 'reorder': - $this->reorder(); - break; - - case 'setting_view': - $this->_viewSettings(); - break; - - case 'setting_delete': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'settings_delete' ); - $this->_deleteSettings(); - break; - - case 'setting_revert': - $this->_revertSettings(); - break; - - case 'setting_update': - $this->_updateSettings(); - break; - - case 'findsetting': - $this->_findSettingGroup(); - break; - - case 'settings_do_import': - $this->importAllSettings(); - break; - case 'settings_do_import_indev': - $this->importAllSettings(1); - break; - - case 'setting_someexport_start': - $this->_startExportingSettings(); - break; - - case 'setting_someexport_complete': - $this->_finishExportingSettings(); - break; - - case 'MOD_export_setting': - $this->_exportSettingsGroup(); - break; - - case 'settingsExportApps': - $messages = $this->exportAllApps(); - - $this->registry->output->global_message = implode( "
    ", $messages ); - - $this->_settingsOverview(); - break; - - case 'settingsImportApps': - $messages = $this->importAllApps(); - - $this->registry->output->global_message = implode( "
    ", $messages ); - $this->_settingsOverview(); - break; - default: - $this->request['do'] = 'settingsview'; - $this->_settingsOverview(); - break; - } - - //----------------------------------------- - // Pass to CP output hander - //----------------------------------------- - - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Reorder the settings - * - * @access public - * @return void - */ - public function reorder() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - require_once( IPS_KERNEL_PATH . 'classAjax.php' ); - $ajax = new classAjax(); - - //----------------------------------------- - // Checks... - //----------------------------------------- - - if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) - { - $ajax->returnString( $this->lang->words['postform_badmd5'] ); - exit(); - } - - //----------------------------------------- - // Save new position - //----------------------------------------- - - $position = 1; - - if( is_array($this->request['settings']) AND count($this->request['settings']) ) - { - foreach( $this->request['settings'] as $this_id ) - { - $this->DB->update( 'core_sys_conf_settings', array( 'conf_position' => $position ), 'conf_id=' . $this_id ); - - $position++; - } - } - - $ajax->returnString( 'OK' ); - exit(); - } - - /** - * Show page to export settings - * - * @access private - * @return void - */ - private function _startExportingSettings() - { - //----------------------------------------- - // Get the settings - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'order' => 'conf_id' ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $settings[] = $r; - } - - $this->registry->output->html .= $this->html->settings_exportsingle( $settings ); - } - - /** - * Export the settings - * - * @access private - * @return void - */ - private function _finishExportingSettings() - { - $ids = array(); - $groups = array(); - - //----------------------------------------- - // get ids... - //----------------------------------------- - - foreach ($_POST as $key => $value) - { - if ( preg_match( "/^id_(\d+)$/", $key, $match ) ) - { - if ($this->request[$match[0]]) - { - $ids[] = $match[1]; - } - } - } - - $ids = IPSLib::cleanIntArray( $ids ); - - //----------------------------------------- - // Got any? - //----------------------------------------- - - if ( ! count( $ids ) ) - { - $this->registry->output->global_message = $this->lang->words['s_sometoexport']; - $this->_startExportingSettings(); - return; - } - - //----------------------------------------- - // Get XML class - //----------------------------------------- - - require_once( IPS_KERNEL_PATH . 'class_xml.php' ); - - $xml = new class_xml(); - - $xml->xml_set_root( 'settingexport', array( 'exported' => time() ) ); - - //----------------------------------------- - // Get groups - //----------------------------------------- - - $xml->xml_add_group( 'settinggroup' ); - - $this->_settingsGetGroups(); - - $entry = array(); - - $this->DB->build( array( 'select' => '*', - 'from' => 'core_sys_conf_settings', - 'where' => "conf_id IN (".implode(",",$ids).")", - 'order' => 'conf_position, conf_title' ) ); - - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $content = array(); - $groups[ $r['conf_group'] ] = $r['conf_group']; - $r['conf_value'] = ''; - - //----------------------------------------- - // Add in setting key - //----------------------------------------- - - $r['conf_title_keyword'] = $this->setting_groups[ $r['conf_group'] ]['conf_title_keyword']; - - foreach( $r as $k => $v ) - { - $content[] = $xml->xml_build_simple_tag( $k, $v ); - } - - $entry[] = $xml->xml_build_entry( 'setting', $content ); - } - - //----------------------------------------- - // Add in groups... - //----------------------------------------- - - if ( is_array( $groups ) AND count( $groups ) ) - { - foreach( $groups as $conf_group_id ) - { - $content = array(); - - $thisconf = array( 'conf_is_title' => 1, - 'conf_title_keyword' => $this->setting_groups[ $conf_group_id ]['conf_title_keyword'], - 'conf_title_title' => $this->setting_groups[ $conf_group_id ]['conf_title_title'], - 'conf_title_desc' => $this->setting_groups[ $conf_group_id ]['conf_title_desc'], - 'conf_title_noshow' => $this->setting_groups[ $conf_group_id ]['conf_title_noshow'], - 'conf_title_module' => $this->setting_groups[ $conf_group_id ]['conf_title_module'] ); - - foreach( $thisconf as $k => $v ) - { - $content[] = $xml->xml_build_simple_tag( $k, $v ); - } - - $entry[] = $xml->xml_build_entry( 'setting', $content ); - } - } - - $xml->xml_add_entry_to_group( 'settinggroup', $entry ); - - $xml->xml_format_document(); - - $doc = $xml->xml_document; - - //----------------------------------------- - // Print to browser - //----------------------------------------- - - $this->registry->output->showDownload( $doc, 'ipb_settings_partial.xml', '', 0 ); - } - - /** - * Setting group export - * - * @access private - * @return void - */ - private function _exportSettingsGroup() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $this->request[ 'conf_group'] = intval($this->request['conf_group'] ); - - /* Got anything? */ - if ( ! $this->request['conf_group'] ) - { - return; - } - - //----------------------------------------- - // Get setting groups - //----------------------------------------- - - $this->_settingsGetGroups( true ); - - //----------------------------------------- - // Get xml class - //----------------------------------------- - - require_once( IPS_KERNEL_PATH.'classXML.php' ); - - $xml = new classXML( IPS_DOC_CHAR_SET ); - - $xml->newXMLDocument(); - $xml->addElement( 'settingexport' ); - $xml->addElement( 'settinggroup', 'settingexport' ); - - foreach( $this->setting_groups as $i => $roar ) - { - //----------------------------------------- - // App check? - //----------------------------------------- - - if ( $this->request['conf_group'] != $roar['conf_title_id'] ) - { - continue; - } - - //----------------------------------------- - // First, add in setting group title - //----------------------------------------- - - $thisconf = array( 'conf_is_title' => 1, - 'conf_title_keyword' => $roar['conf_title_keyword'], - 'conf_title_title' => $roar['conf_title_title'], - 'conf_title_desc' => $roar['conf_title_desc'], - 'conf_title_tab' => $roar['conf_title_tab'], - 'conf_title_app' => $roar['conf_title_app'] ? $roar['conf_title_app'] : $app_dir, - 'conf_title_noshow' => $roar['conf_title_noshow'] ); - - $xml->addElementAsRecord( 'settinggroup', 'setting', $thisconf ); - - //----------------------------------------- - // Get settings... - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', - 'from' => 'core_sys_conf_settings', - 'where' => "conf_group='{$roar['conf_title_id']}'", - 'order' => 'conf_position, conf_title' ) ); - - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - //----------------------------------------- - // Clean up... - //----------------------------------------- - - unset( $r['conf_value'], $r['conf_id'] ); - - $r['conf_title_keyword'] = $roar['conf_title_keyword']; - $r['conf_is_title'] = 0; - - $xml->addElementAsRecord( 'settinggroup', 'setting', $r ); - } - } - - //----------------------------------------- - // Grab the XML document - //----------------------------------------- - - $xmlData = $xml->fetchDocument(); - - $this->registry->output->showDownload( $xmlData, 'settingGroup_' . IPSText::makeSeoTitle( $thisconf['conf_title_title'] ) . '.xml', '', 0 ); - } - - /** - * Find setting group (don't rely on IDs) - * - * @access public - * @return void - */ - public function _findSettingGroup() - { - if ( ! $this->request['key'] ) - { - $this->_settingsOverview(); - } - - $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_settings_titles' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - if( ( $r['conf_title_keyword'] == $this->request['key'] ) OR mb_strtolower( str_replace( " ", "", trim( $r['conf_title_title'] ) ) ) == urldecode( trim( $this->request['key'] ) ) ) - { - $this->registry->output->silentRedirect( $this->settings['base_url'] . '&' . $this->form_code . '&do=setting_view&conf_group=' . $r['conf_title_id'] ); - break; - } - } - - $this->_settingsOverview(); - } - - /** - * Import all settings - * - * @access public - * @param boolean In development mode? - * @param boolean Return (ignore the var name) - * @param array Array of known setting values - * @return void - */ - public function importAllSettings( $in_dev=0, $no_return=0, $known=array() ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $updated = 0; - $inserted = 0; - $need_update = array(); - - //----------------------------------------- - // Make sure we have titles - //----------------------------------------- - - $this->_settingsTitlesCheck(); - - //----------------------------------------- - // INDEV? - //----------------------------------------- - - if ( $in_dev ) - { - $_FILES['FILE_UPLOAD']['name'] = ''; - $this->request['file_location'] = IPSLib::getAppDir( $this->request['app_dir'] ) . '/xml/' . $this->request['app_dir'] . '_settings.xml'; - } - else - { - $this->request['file_location'] = IPS_ROOT_PATH . $this->request['file_location'] ; - } - - //----------------------------------------- - // Go for it - //----------------------------------------- - - if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") ) - { - //----------------------------------------- - // check and load from server - //----------------------------------------- - - if ( ! $this->request['file_location'] ) - { - $this->registry->output->global_message = $this->lang->words['s_nofile']; - $this->_settingsOverview(); - return; - } - - if ( ! file_exists( $this->request['file_location'] ) ) - { - $this->registry->output->global_message = sprintf( $this->lang->words['s_noopen'], $this->request['file_location'] ); - $this->_settingsOverview(); - return; - } - - if ( preg_match( "#\.gz$#", $this->request['file_location'] ) ) - { - if ( $FH = @gzopen( $this->request['file_location'], 'rb' ) ) - { - while ( ! @gzeof( $FH ) ) - { - $content .= @gzread( $FH, 1024 ); - } - - @gzclose( $FH ); - } - } - else - { - if ( $FH = @fopen( $this->request['file_location'], 'rb' ) ) - { - $content = @fread( $FH, filesize($this->request['file_location']) ); - @fclose( $FH ); - } - } - } - else - { - //----------------------------------------- - // Get uploaded schtuff - //----------------------------------------- - - $tmp_name = $_FILES['FILE_UPLOAD']['name']; - $tmp_name = preg_replace( "#\.gz$#", "", $tmp_name ); - - $content = ipsRegistry::getClass('adminFunctions')->importXml( $tmp_name ); - } - - if ( ! $content ) - { - $this->registry->output->global_message = $this->lang->words['s_nofile']; - $this->_settingsOverview(); - return; - } - - $return = $this->_importXML( $content, $this->request['app_dir'], $known ); - - if ( $no_return ) - { - $this->registry->output->global_message = sprintf( $this->lang->words['s_upandin'], $return['updatedCount'], $return['insertedCount'] ); - return TRUE; - } - else - { - $this->registry->output->global_message = sprintf( $this->lang->words['s_upandin'], $return['updatedCount'], $return['insertedCount'] ); - $this->_settingsOverview(); - return; - } - } - - /** - * Delete a setting group - * - * @access private - * @return void - */ - private function _deleteSettingGroup() - { - if ( $this->request['id'] ) - { - $conf = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'core_sys_conf_settings', 'where' => 'conf_group=' . $this->request['id'] ) ); - - $count = intval($conf['count']); - - if ( $count > 0 ) - { - $this->registry->output->global_message = $this->lang->words['s_cantremove']; - } - else - { - $this->DB->delete( 'core_sys_settings_titles', 'conf_title_id=' . $this->request['id'] ); - - $this->registry->output->global_message = $this->lang->words['s_removed']; - } - - } - - $this->settingsRebuildCache(); - - $this->_settingsOverview(); - } - - /** - * Resynchronize settings in a group - * - * @access private - * @return void - */ - private function _resynchSettingGroup() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $this->request['id'] = intval( $this->request['id'] ); - - //----------------------------------------- - // Doit... - //----------------------------------------- - - $this->_resynchGroup( $this->request['id'] ); - - $this->registry->output->global_message = $this->lang->words['s_recounted']; - - //----------------------------------------- - // Get conf title details - //----------------------------------------- - - $conf_group = $this->DB->buildAndFetch( array( 'select' => 'conf_title_tab', - 'from' => 'core_sys_settings_titles', - 'where' => 'conf_title_id='.$this->request['id'] ) ); - - $this->_settingsOverview( $conf_group['conf_title_tab'] ); - } - - /** - * Does the resync - * - * @access private - * @param integer Group id - * @return void - */ - private function _resynchGroup( $id ) - { - if ( $id ) - { - $conf = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'core_sys_conf_settings', 'where' => 'conf_group='.$id ) ); - - $count = intval($conf['count']); - - $this->DB->update( 'core_sys_settings_titles', array( 'conf_title_count' => $count ), 'conf_title_id=' . $id ); - } - } - - /** - * Form to add/edit a setting group - * - * @access private - * @param string [add|edit] - * @return void - */ - private function _settingGroupForm( $type='add' ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $conf_title_id = intval( $this->request['id'] ); - $form = array(); - $apps = array( 0 => array( 'core', $this->lang->words['s_global_dd'] ) ); - - //----------------------------------------- - // Build applications drop down - //----------------------------------------- - - foreach( ipsRegistry::$applications as $app_dir => $app_data ) - { - $apps[] = array( $app_dir, $app_data['app_title'] ); - } - - //----------------------------------------- - // Type - //----------------------------------------- - - if ( $type == 'add' ) - { - $formcode = 'settinggroup_add'; - $title = $this->lang->words['s_createnew']; - $button = $this->lang->words['s_createnew']; - } - else - { - $conf = $this->DB->buildAndFetch( array( 'select' => '*', - 'from' => 'core_sys_settings_titles', - 'where' => 'conf_title_id='.$conf_title_id ) ); - - if ( ! $conf['conf_title_id'] ) - { - $this->registry->output->global_message = $this->lang->words['s_noid']; - $this->_settingsOverview(); - } - - $formcode = 'settinggroup_edit'; - $title = sprintf($this->lang->words['s_editsetting'], $conf['conf_title'] ); - $button = $this->lang->words['s_savechanges']; - } - - //----------------------------------------- - // Form elements - //----------------------------------------- - - $form['conf_title_title'] = $this->registry->output->formInput( 'conf_title_title', $_POST['conf_title_title'] ? $_POST['conf_title_title'] : $conf['conf_title_title'] ); - $form['conf_title_desc'] = $this->registry->output->formTextarea( 'conf_title_desc', $_POST['conf_title_desc'] ? $_POST['conf_title_desc'] : $conf['conf_title_desc'] ); - $form['conf_title_app'] = $this->registry->output->formDropdown( 'conf_title_app', $apps, $_POST['conf_title_app'] ? $_POST['conf_title_app'] : $conf['conf_title_app'] ); - $form['conf_title_tab'] = $this->registry->output->formInput( 'conf_title_tab', $_POST['conf_title_tab'] ? $_POST['conf_title_tab'] : $conf['conf_title_tab'] ); - - if ( IN_DEV ) - { - $form['conf_title_keyword'] = $this->registry->output->formInput( 'conf_title_keyword', $_POST['conf_title_keyword'] ? $_POST['conf_title_keyword'] : $conf['conf_title_keyword'] ); - $form['conf_title_noshow'] = $this->registry->output->formYesNo( 'conf_title_noshow', $_POST['conf_title_noshow'] ? $_POST['conf_title_noshow'] : $conf['conf_title_noshow'] ); - } - - $this->registry->output->html .= $this->html->settings_title_form( $form, $title, $formcode, $button ); - } - - /** - * Save a setting group - * - * @access private - * @param string [add|edit] - * @return void - */ - private function _settingGroupSave($type='add') - { - //----------------------------------------- - // INIT - //----------------------------------------- - - if ( $type == 'edit' ) - { - if ( ! $this->request['id'] ) - { - $this->registry->output->global_message = $this->lang->words['s_noid']; - $this->_settingForm(); - return; - } - } - - if( ! $this->request['conf_title_title'] ) - { - $this->registry->output->global_message = $this->lang->words['s_notitle']; - $this->_settingGroupForm( $type ); - return; - } - - //-------------------------------------------- - // Check... - //-------------------------------------------- - - $array = array( 'conf_title_title' => $this->request['conf_title_title'], - 'conf_title_desc' => IPSText::safeslashes( $_POST['conf_title_desc'] ), - 'conf_title_keyword' => IPSText::safeslashes( $_POST['conf_title_keyword'] ), - 'conf_title_noshow' => $this->request['conf_title_noshow'], - 'conf_title_app' => trim( $this->request['conf_title_app'] ), - 'conf_title_tab' => trim( $this->request['conf_title_tab'] ) - ); - - - if ( $type == 'add' ) - { - $this->DB->insert( 'core_sys_settings_titles', $array ); - $this->registry->output->global_message = $this->lang->words['s_added']; - } - else - { - $this->DB->update( 'core_sys_settings_titles', $array, 'conf_title_id=' . $this->request['id'] ); - $this->registry->output->global_message = $this->lang->words['s_edited']; - } - - $this->settingsRebuildCache(); - - $this->_settingsOverview(); - } - - /** - * Form to add/edit a setting - * - * @access private - * @param string [add|edit] - * @return void - */ - private function _settingForm( $type='add' ) - { - if ( $type == 'add' ) - { - $formcode = 'setting_add'; - $title = $this->lang->words['s_createnewtitle']; - $button = $this->lang->words['s_createnewtitle']; - $conf = array( 'conf_group' => $this->request['conf_group'], 'conf_add_cache' => 1 ); - - if ( IN_DEV ) - { - $conf['conf_protected'] = 1; - } - - if ( $this->request['conf_group'] ) - { - $max = $this->DB->buildAndFetch( array( 'select' => 'max(conf_position) as max', 'from' => 'core_sys_conf_settings', 'where' => 'conf_group=' . $this->request['conf_group'] ) ); - } - else - { - $max = $this->DB->buildAndFetch( array( 'select' => 'max(conf_position) as max', 'from' => 'core_sys_conf_settings' ) ); - } - - $conf['conf_position'] = $max['max'] + 1; - } - else - { - $conf = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => 'conf_id=' . $this->request['id'] ) ); - - if ( ! $conf['conf_id'] ) - { - $this->registry->output->global_message = $this->lang->words['s_noid']; - $this->_settingsOverview(); - } - - $formcode = 'setting_edit'; - $title = sprintf($this->lang->words['s_editsetting'], $conf['conf_title'] ); - $button = $this->lang->words['s_savechanges']; - } - - //----------------------------------------- - // Get groups - //----------------------------------------- - - $this->_settingsGetGroups(); - - $groups = array(); - - foreach( $this->setting_groups as $i => $r ) - { - $groups[] = array( $r['conf_title_id'], $r['conf_title_title'] ); - } - - //----------------------------------------- - // Type - //----------------------------------------- - - $types = array( 0 => array( 'input' , $this->lang->words['s_input'] ), - 1 => array( 'dropdown', $this->lang->words['s_dropdown'] ), - 2 => array( 'yes_no' , $this->lang->words['s_yes_no'] ), - 3 => array( 'textarea', $this->lang->words['s_textarea'] ), - 4 => array( 'editor' , $this->lang->words['s_editor'] ), - 5 => array( 'multi' , $this->lang->words['s_multi'] ), - ); - - - - $form['conf_title'] = $this->registry->output->formInput( 'conf_title' , $_POST['conf_title'] ? $_POST['conf_title'] : $conf['conf_title'] ); - $form['conf_position'] = $this->registry->output->formInput( 'conf_position' , $_POST['conf_position'] ? $_POST['conf_position'] : $conf['conf_position'] ); - $form['conf_description'] = $this->registry->output->formTextarea( 'conf_description', $_POST['conf_description'] ? $_POST['conf_description'] : $conf['conf_description'] ); - $form['conf_group'] = $this->registry->output->formDropdown( 'conf_group' , $groups, $_POST['conf_group'] ? $_POST['conf_group'] : $conf['conf_group'] ); - $form['conf_type'] = $this->registry->output->formDropdown( 'conf_type' , $types, $_POST['conf_type'] ? $_POST['conf_type'] : $conf['conf_type'] ); - $form['conf_key'] = $this->registry->output->formInput( 'conf_key' , $_POST['conf_key'] ? $_POST['conf_key'] : $conf['conf_key'] ); - $form['conf_value'] = $this->registry->output->formTextarea( 'conf_value' , $_POST['conf_value'] ? $_POST['conf_value'] : $conf['conf_value'] ); - $form['conf_default'] = $this->registry->output->formTextarea( 'conf_default' , $_POST['conf_default'] ? $_POST['conf_default'] : $conf['conf_default'] ); - $form['conf_extra'] = $this->registry->output->formTextarea( 'conf_extra' , $_POST['conf_extra'] ? $_POST['conf_extra'] : $conf['conf_extra'] ); - $form['conf_evalphp'] = $this->registry->output->formTextarea( 'conf_evalphp' , $_POST['conf_evalphp'] ? $_POST['conf_evalphp'] : $conf['conf_evalphp'] ); - $form['conf_keywords'] = $this->registry->output->formTextarea( 'conf_keywords' , $_POST['conf_keywords'] ? $_POST['conf_keywords'] : $conf['conf_keywords'] ); - $form['conf_start_group'] = $this->registry->output->formInput( 'conf_start_group', $_POST['conf_start_group'] ? $_POST['conf_start_group'] : $conf['conf_start_group'] ); - $form['conf_end_group'] = $this->registry->output->formYesNo( 'conf_end_group' , $_POST['conf_end_group'] ? $_POST['conf_end_group'] : $conf['conf_end_group'] ); - $form['conf_add_cache'] = $this->registry->output->formYesNo( 'conf_add_cache', $_POST['conf_add_cache'] ? $_POST['conf_add_cache'] : $conf['conf_add_cache'] ); - - if ( IN_DEV ) - { - $form['conf_protected'] = $this->registry->output->formYesNo( 'conf_protected', $_POST['conf_protected'] ? $_POST['conf_protected'] : $conf['conf_protected'] ); - } - - - - //----------------------------------------- - // start form - //----------------------------------------- - - $this->registry->output->html .= $this->html->settings_form( $form, $title, $formcode, $button ); - } - - /** - * View all settings (form) in a group - * This is public so that portal can access it - * - * @access public - * @return void - */ - public function _viewSettings() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $search_key = trim( $this->request['search'] ); - $conf_group = trim( $this->request['conf_group'] ); - $conf_titles = array(); - $in_group = array(); - $last_conf_id = -1; - $start = intval( $this->request['st'] ); - $end = 150; - $get_by_key = isset( $this->request['conf_title_keyword'] ) ? $this->request['conf_title_keyword'] : ''; - - //----------------------------------------- - // Get settings in group - //----------------------------------------- - - $this->_settingsGetGroups( ( $get_by_key ) ? TRUE : FALSE ); - - //----------------------------------------- - // Grabbing by key? - //----------------------------------------- - - if( $get_by_key ) - { - $data = $this->DB->buildAndFetch( array( - 'select' => 'conf_title_id, conf_title_keyword, conf_title_title', - 'from' => 'core_sys_settings_titles', - 'where' => "conf_title_keyword='{$get_by_key}'" - ) ); - - $this->request['conf_group'] = $data['conf_title_id'] ; - $conf_group = $data['conf_title_id']; - $this->request['groupHelpKey'] = $data['conf_title_keyword']; - } - - //----------------------------------------- - // check... - //----------------------------------------- - - if( ( ! $conf_group and ! $search_key ) && ! $search_key ) - { - $this->registry->output->global_message = $this->lang->words['s_nogroup']; - $this->_settingsOverview(); - return; - } - - //----------------------------------------- - // Pagination - //----------------------------------------- - - $pages = $this->registry->output->generatePagination( array( - 'totalItems' => $this->setting_groups[$conf_group]['conf_title_count'], - 'itemsPerPage' => $end, - 'currentStartValue' => $start, - 'baseUrl' => $this->settings['base_url'] . "&{$this->form_code}&&search={$search_key}", - ) ); - - - //----------------------------------------- - // Did we search? - //----------------------------------------- - - if( $search_key ) - { - $keywords = mb_strtolower($search_key); - $whereExtra = $conf_group ? " AND c.conf_group={$conf_group}" : ''; - - $this->DB->build( array( - 'select' => 'c.*', - 'from' => array( 'core_sys_conf_settings' => 'c' ), - 'where' => '(' . $this->DB->buildLower('c.conf_title') . " LIKE '%{$keywords}%' OR " . $this->DB->buildLower('c.conf_description') . " LIKE '%{$keywords}%' OR " . $this->DB->buildLower('c.conf_title') . " LIKE '%{$keywords}%')" . $whereExtra, - 'order' => 'c.conf_title', - 'limit' => array( $start, $end ), - 'add_join' => array( - array( - 'select' => 'ct.conf_title_id, ct.conf_title_noshow, ct.conf_title_title, ct.conf_title_tab', - 'from' => array( 'core_sys_settings_titles' => 'ct' ), - 'where' => 'ct.conf_title_id=c.conf_group', - 'type' => 'left' - ) - ) - ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $r['conf_start_group'] = ""; - $r['conf_end_group'] = ""; - $r['conf_description'] .= '
    ' . $this->lang->words['conf_desc_search'] . "" . $r['conf_title_title'] . ""; - $conf_entry[ $r['conf_id'] ] = $r; - } - - if( ! count( $conf_entry ) ) - { - $this->registry->output->global_message = sprintf( $this->lang->words['s_nomatches'], $keywords ); - $this->_settingsOverview(); - return; - } - - $title = sprintf( $this->lang->words['s_searchedfor'], $keywords ); - $tab = ''; - } - - //----------------------------------------- - // Or not... - //----------------------------------------- - - else - { - $this->DB->build( array( - 'select' => '*', - 'from' => 'core_sys_conf_settings', - 'where' => "conf_group='{$conf_group}'", - 'order' => 'conf_position, conf_title', - 'limit' => array( $start,$end ) - ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $conf_entry[ $r['conf_id'] ] = $r; - - if ( $r['conf_end_group'] ) - { - $in_g = 0; - } - - if ( $in_g ) - { - $this->in_group[] = $r['conf_id']; - } - - if ( $r['conf_start_group'] ) - { - $in_g = 1; - } - } - - $title = $this->setting_groups[$conf_group]['conf_title_title']; - $tab = IPSText::md5Clean( $this->setting_groups[$conf_group]['conf_title_tab'] ); - $this->request['groupHelpKey'] = $this->setting_groups[ $conf_group ]['conf_title_keyword']; - } - - //----------------------------------------- - // Start output - //----------------------------------------- - - $content = ""; - - if( is_array( $conf_entry ) and count( $conf_entry ) ) - { - foreach( $conf_entry as $id => $r ) - { - $content .= $this->_processSettingEntry( $r ); - } - } - - if( ! $search_key AND ! $get_by_key ) - { - $searchbutton = 1; - } - - /* Navigation */ - if( $this->base_nav_url ) - { - $this->registry->output->extra_nav[] = array( $this->base_nav_url, ipsRegistry::$applications[ $this->setting_groups[$conf_group]['conf_title_app'] ]['app_title'] ); - $this->registry->output->extra_nav[] = array( "", $title ); - - } - else if( $tab ) - { - $this->registry->output->extra_nav[] = array( "{$this->settings['base_url']}{$this->form_code}&_dtab={$tab}", ipsRegistry::$applications[ $this->setting_groups[$conf_group]['conf_title_app'] ]['app_title'] ); - $this->registry->output->extra_nav[] = array( "{$this->settings['base_url']}{$this->form_code}&do=setting_view&conf_group={$conf_group}", $title ); - } - - /* Output */ - $this->registry->output->html .= $this->html->settings_view_wrapper( $title, $content, $searchbutton, $this->return_after_save ); - $this->registry->output->html = str_replace( '', "", $this->registry->output->html ); - } - - /** - * Process an individual setting for display - * - * @access private - * @param array Setting record - * @return void - */ - private function _processSettingEntry($r) - { - $tempSkinUrl = $this->settings['skin_app_url']; - $this->settings[ 'skin_app_url'] = $this->settings['_original_base_url'] . '/' . CP_DIRECTORY . '/applications/core/skin_cp/' ; - - $form_element = ""; - $form_type = 'normal'; - $dropdown = array(); - $start = ""; - $end = ""; - $revert_button = ""; - - $key = $r['conf_key']; - $value = $r['conf_value'] != "" ? $r['conf_value'] : $r['conf_default']; - $value = $value == "{blank}" ? '' : $value; - - $show = 1; - - //----------------------------------------------- - // Default? - //----------------------------------------------- - - $css = ""; - - if ( $r['conf_value'] != "" and ( $r['conf_value'] != $r['conf_default'] ) ) - { - $revert_button = "form_code}&do=setting_revert&id={$r['conf_id']}&conf_group={$r['conf_group']}&search=" . $this->request['search'] . "' title='{$this->lang->words['s_revertback']}'>X"; - } - - //----------------------------------------------- - // Evil eval - //----------------------------------------------- - - if ( $r['conf_evalphp'] ) - { - $show = 1; - - eval( $r['conf_evalphp'] ); - } - - if( ! $show && ! IN_DEV ) - { - return ''; - } - - switch( $r['conf_type'] ) - { - case 'input': - $form_element = $this->registry->output->formInput( $key, str_replace( "'", "'", $value ) ); - break; - - case 'textarea': - $form_element = $this->registry->output->formTextarea( $key, $value, 45 ); - break; - - case 'editor': - IPSText::getTextClass('bbcode')->parse_html = 1; - IPSText::getTextClass('bbcode')->parse_nl2br = 1; - IPSText::getTextClass('bbcode')->parse_smilies = 1; - IPSText::getTextClass('bbcode')->parse_bbcode = 1; - IPSText::getTextClass('bbcode')->parsing_section = 'global'; - - if ( IPSText::getTextClass('editor')->method == 'rte' ) - { - $value = IPSText::getTextClass('bbcode')->convertForRTE( IPSText::getTextClass('bbcode')->preDbParse( $value ) ); - } - else - { - $value = IPSText::getTextClass('bbcode')->preEditParse( $value ); - } - - $form_element = IPSText::getTextClass('editor')->showEditor( $value, $key ); - $form_type = 'rte'; - - break; - - case 'yes_no': - $form_element = $this->registry->output->formYesNo( $key, $value ); - break; - - default: - - if ( $r['conf_extra'] ) - { - if ( $r['conf_extra'] == '#show_forums#' ) - { - //----------------------------------------- - // Require the library - // (Not a building with books) - //----------------------------------------- - - require_once( IPSLib::getAppDir( 'forums' ) .'/sources/classes/forums/class_forums.php' ); - require_once( IPSLib::getAppDir( 'forums' ) .'/sources/classes/forums/admin_forum_functions.php' ); - - $aff = new admin_forum_functions( $this->registry ); - $aff->forumsInit(); - $dropdown = $aff->adForumsForumList(1); - } - else if ( $r['conf_extra'] == '#show_groups#' ) - { - $this->DB->build( array( 'select' => '*', 'from' => 'groups', 'order' => 'g_title ASC' ) ); - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - if ( $row['g_access_cp'] ) - { - $row['g_title'] .= $this->lang->words['setting_staff_tag']; - } - - $dropdown[] = array( $row['g_id'], $row['g_title'] ); - } - } - else if ( $r['conf_extra'] == '#show_applications#' ) - { - foreach( ipsRegistry::$applications as $app ) - { - $dropdown[] = array( $app['app_directory'], $app['app_title'] ); - } - } - else if ( $r['conf_extra'] == '#show_skins#' ) - { - $dropdown = $this->registry->output->generateSkinDropdown(); - } - else - { - foreach( explode( "\n", $r['conf_extra'] ) as $l ) - { - list ($k, $v) = explode( "=", $l ); - if ( $k != "" and $v != "" ) - { - $dropdown[] = array( trim($k), trim($v) ); - } - } - } - } - - if ( $r['conf_type'] == 'dropdown' ) - { - $form_element = $this->registry->output->formDropdown( $key, $dropdown, $value ); - } - else - { - $form_element = $this->registry->output->formMultiDropdown( $key, $dropdown, explode( ",", $value ) ); - } - - break; - } - - $delete = " form_code}&do=setting_delete&id={$r['conf_id']}\");' title='key: {$r['conf_key']}'>{$this->lang->words["; - $edit = "form_code}&do=setting_showedit&id={$r['conf_id']}' title='id: {$r['conf_id']}'>{$this->lang->words["; - - if ( $r['conf_protected'] and ! IN_DEV ) - { - $delete = ""; - $edit = ""; - } - - if ( $r['conf_start_group'] ) - { - $start = $this->html->settings_row_start_group( $r ); - } - else - { - if ( ! in_array( $r['conf_id'], $this->in_group ) and ! $r['conf_end_group'] ) - { - $start = $this->html->settings_row_start_normal(); - } - } - - if ( $r['conf_end_group'] ) - { - $end = $this->html->settings_row_end_group(); - } - else - { - if ( ! in_array( $r['conf_id'], $this->in_group ) and ! $r['conf_start_group'] ) - { - $end = $this->html->settings_row_end_normal(); - } - } - - //----------------------------------------------- - // Search hi-lite - //----------------------------------------------- - - if ( $this->request['search'] ) - { - $_replacements = array(); - - preg_match_all( "/(&([a-zA-Z0-9]+);)/i", $r['conf_title'], $matches ); - - if( count($matches[0]) ) - { - for( $i=0, $cnt=count($matches[0]); $i <= $cnt; $i++ ) - { - $r['conf_title'] = str_replace( $matches[0][$i], '{{{' . $i . '}}}', $r['conf_title'] ); - } - } - - $r['conf_title'] = preg_replace( "/(".$this->request['search'].")/i", "\\1", $r['conf_title'] ); - - if( count($matches[0]) ) - { - for( $i=0, $cnt=count($matches); $i <= $cnt; $i++ ) - { - $r['conf_title'] = str_replace( '{{{' . $i . '}}}', $matches[0][$i], $r['conf_title'] ); - } - } - - /** - * Ok this is just annoying.... - */ - $_did = 0; - preg_match_all( "/(href=['\"].*?[\"'])/i", $r['conf_description'], $matches ); - - if( count($matches[0]) ) - { - for( $i=$_did, $cnt=count($matches[0]); $i <= $cnt; $i++ ) - { - $r['conf_description'] = str_replace( $matches[0][$i], '{{{' . $i . '}}}', $r['conf_description'] ); - - $_replacements[ $i ] = $matches[0][$i]; - $_did++; - } - } - - preg_match_all( "/(&([a-zA-Z0-9]+);)/i", $r['conf_description'], $matches ); - - if( count($matches[0]) ) - { - for( $i=$_did, $cnt=count($matches[0]); $i <= $cnt; $i++ ) - { - $r['conf_description'] = str_replace( $matches[0][$i], '{{{' . $i . '}}}', $r['conf_description'] ); - - $_replacements[ $i ] = $matches[0][$i]; - $_did++; - } - } - - $r['conf_description'] = preg_replace( "/(".$this->request['search'].")/i", "\\1", $r['conf_description'] ); - - if( count($_replacements) ) - { - foreach( $_replacements as $index => $val ) - { - $r['conf_description'] = str_replace( '{{{' . $index . '}}}', $val, $r['conf_description'] ); - } - } - } - - $html .= $start . $this->html->settings_view_row( $r, $edit, $delete, $form_element, $revert_button, $form_type ) . $end; - - $this->key_array[] = preg_replace( "/\[\]$/", "", $key ); - - $this->settings[ 'skin_app_url'] = $tempSkinUrl ; - - return $html; - } - - /** - * View setting groups - * - * @access private - * @param string Application to default to - * @return void - */ - private function _settingsOverview( $start_app='' ) - { - $content = ""; - $title = ""; - $settings = array(); - $start_app = ( $start_app ) ? $start_app : trim( $this->request['start_app'] ); - - //----------------------------------------- - // Get the groups - //----------------------------------------- - - $this->_settingsGetGroups(); - - //----------------------------------------- - // Build settings.. - //----------------------------------------- - - foreach( $this->setting_groups as $i => $r ) - { - $r['conf_title_app'] = ( $r['conf_title_app'] ) ? $r['conf_title_app'] : 'core'; - $r['conf_title_tab'] = ( $r['conf_title_tab'] ) ? $r['conf_title_tab'] : 'System'; - $r['conf_title_title'] = ( $r['conf_title_noshow'] ) ? $r['conf_title_title'] . $this->lang->words['s_ishidden'] : $r['conf_title_title']; - - $settings[ $r['conf_title_tab'] ][] = $r; - } - - $this->registry->output->html .= $this->html->settings_titles_wrapper( $this->html->settings_titles_top_searchbox(), $settings, $start_app ); - } - - /** - * Update setting values/ordering - * - * @access private - * @param boolean Return afterwards? - * @return void - */ - private function _updateSettings( $donothing="" ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $bounceback = str_replace( '&', '&', $this->request['bounceback'] ); - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $this->request['id'] and ! $this->request['search'] AND !$this->request['settings_save'] ) - { - $this->registry->output->global_message = $this->lang->words['s_noid']; - $this->_settingsOverview(); - return; - } - - //-------------------------------------------- - // check... - //-------------------------------------------- - - $fields = explode( ",", trim($this->request['settings_save']) ); - - if ( ! count($fields ) ) - { - $this->registry->output->global_message = $this->lang->words['s_nofields']; - $this->_viewSettings(); - return; - } - - //-------------------------------------------- - // Get info from DB - //-------------------------------------------- - - $db_fields = array(); - - $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => "conf_key IN ('" . implode( "','", $fields ) . "')" ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $db_fields[ $r['conf_key'] ] = $r; - } - - foreach( $db_fields as $key => $data ) - { - if ( $data['conf_evalphp'] ) - { -// print htmlspecialchars($data['conf_evalphp']);exit; - $save = 1; - eval( $data['conf_evalphp'] ); - } - - if ( $data['conf_type'] == 'editor' ) - { - IPSText::getTextClass('bbcode')->bypass_badwords = 1; - IPSText::getTextClass('bbcode')->parse_smilies = 1; - IPSText::getTextClass('bbcode')->parse_html = 1; - IPSText::getTextClass('bbcode')->parse_bbcode = 1; - IPSText::getTextClass('bbcode')->parse_nl2br = 1; - - //$_POST[ $key ] = IPSText::getTextClass('bbcode')->preDbParse( IPSText::getTextClass('editor')->processRawPost( $key ) ); - - if( trim($_POST[ $key ]) == '
    ' OR trim($_POST[ $key ]) == '
    ' ) - { - $_POST[ $key ] = ''; - } - else - { - $_POST[ $key ] = IPSText::getTextClass('editor')->processRawPost( $key ); - } - } - - $_POST[ $key ] = str_replace( "\r", "", $_POST[ $key ] ); - - - if ( ($_POST[ $key ] != $data['conf_default']) ) - { - $value = str_replace( "'", "'", IPSText::stripslashes($_POST[ $key ]) ); - $value = $value == '' ? "{blank}" : $value; - - $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => $value ), 'conf_id=' . $data['conf_id'] ); - } - else if( ( isset( $this->request[ $key ] ) && $this->request[ $key ] == '' ) || ( $this->request[ $key ] == $data['conf_default'] ) || $data['conf_value'] != '' ) - { - $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => '' ), 'conf_id=' . $data['conf_id'] ); - } - } - - $this->request['conf_group'] = $this->request['id']; - - $this->registry->output->global_message = $this->lang->words['s_updated']; - - $this->settingsRebuildCache(); - - //----------------------------------------- - // We're bouncing back (Boing boing) - //----------------------------------------- - - if ( $bounceback ) - { - $this->registry->output->silentRedirect( $bounceback ); - } - - //----------------------------------------- - // Still here? - //----------------------------------------- - - if ( ! $donothing ) - { - $this->_viewSettings(); - } - } - - /** - * Save the settings form - * - * @access private - * @param string [add|edit] - * @return void - */ - private function _settingSave($type='add') - { - if ( $type == 'edit' ) - { - if ( ! $this->request['id'] ) - { - $this->registry->output->global_message = $this->lang->words['s_noid']; - $this->_settingForm(); - return; - } - } - - //-------------------------------------------- - // check... - //-------------------------------------------- - - $conf_group = $this->request['conf_newgroup'] ? $this->request['conf_newgroup'] : $this->request['conf_group']; - - $array = array( 'conf_title' => $this->request['conf_title'], - 'conf_description' => IPSText::stripslashes( $_POST['conf_description'] ), - 'conf_group' => $this->request['conf_group'], - 'conf_type' => $this->request['conf_type'], - 'conf_key' => $this->request['conf_key'], - 'conf_value' => IPSText::stripslashes( $_POST['conf_value'] ), - 'conf_default' => IPSText::stripslashes( $_POST['conf_default'] ), - 'conf_extra' => IPSText::stripslashes( $_POST['conf_extra'] ), - 'conf_evalphp' => IPSText::stripslashes( $_POST['conf_evalphp'] ), - 'conf_protected' => intval( $this->request['conf_protected'] ), - 'conf_position' => intval( $this->request['conf_position'] ), - 'conf_start_group' => $this->request['conf_start_group'], - 'conf_end_group' => $this->request['conf_end_group'], - 'conf_add_cache' => intval( $this->request['conf_add_cache'] ), - 'conf_keywords' => IPSText::stripslashes( $_POST['conf_keywords'] ), - ); - - if ( $type == 'add' ) - { - $this->DB->insert( 'core_sys_conf_settings', $array ); - $this->registry->output->global_message = $this->lang->words['s_added2']; - } - else - { - $conf = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => 'conf_id=' . $this->request['id'] ) ); - - $this->DB->update( 'core_sys_conf_settings', $array, 'conf_id=' . $this->request['id'] ); - $this->registry->output->global_message = $this->lang->words['s_edited2']; - - // Recount old group - $this->_resynchGroup( $conf['conf_group'] ); - } - - //----------------------------------------- - // Recount new group - //----------------------------------------- - - if( $this->request['conf_group'] ) - { - $this->_resynchGroup( $this->request['conf_group'] ); - } - - $this->settingsRebuildCache(); - - $this->_viewSettings(); - } - - /** - * Revert a setting to the default value - * - * @access private - * @return void - */ - private function _revertSettings() - { - $this->request[ 'id'] = intval($this->request['id'] ); - - if ( ! $this->request['id'] ) - { - $this->registry->output->global_message = $this->lang->words['s_noid']; - $this->_settingForm(); - return; - } - - $conf = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => 'conf_id=' . $this->request['id'] ) ); - - //-------------------------------------------- - // Revert... - //-------------------------------------------- - - $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => '' ), 'conf_id=' . $this->request['id'] ); - - $this->registry->output->global_message = $this->lang->words['s_revertedback']; - - $this->settingsRebuildCache(); - - $this->_viewSettings(); - } - - /** - * Delete a setting - * - * @access private - * @return void - */ - private function _deleteSettings() - { - if ( ! $this->request['id'] ) - { - $this->registry->output->global_message = $this->lang->words['s_noid']; - $this->_settingsOverview(); - return; - } - - $conf = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => 'conf_id=' . $this->request['id'] ) ); - - if ( ! $conf['conf_id'] ) - { - $this->registry->output->global_message = $this->lang->words['s_noid']; - $this->_settingsOverview(); - return; - } - - //-------------------------------------------- - // Delete... - //-------------------------------------------- - - $this->DB->delete( 'core_sys_conf_settings', 'conf_id=' . $this->request['id'] ); - - $this->DB->update( 'core_sys_settings_titles', 'conf_title_count=conf_title_count-1', 'conf_title_id=' . $conf['conf_group'], false, true ); - - $this->registry->output->global_message = $this->lang->words['s_deleted']; - - $this->settingsRebuildCache(); - - $this->_settingsOverview(); - } - - - /** - * Rebuild settings cache - * - * @access public - * @return void - */ - public function settingsRebuildCache() - { - $settings = array(); - - $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => 'conf_add_cache=1' ) ); - $info = $this->DB->execute(); - - while ( $r = $this->DB->fetch($info) ) - { - $value = $r['conf_value'] != "" ? $r['conf_value'] : $r['conf_default']; - - if ( $value == '{blank}' ) - { - $value = ''; - } - - $settings[ $r['conf_key'] ] = $value; - } - - $this->cache->setCache( 'settings', $settings, array( 'array' => 1 ) ); - } - - /** - * Grab all setting groups and store in an internal array - * - * @access private - * @param boolean Pull all settings, not just visible ones - * @return void - */ - private function _settingsGetGroups( $ignoreInDev=false ) - { - $this->setting_groups = array(); - - if ( IN_DEV OR $ignoreInDev ) - { - $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_settings_titles', 'order' => 'conf_title_title' ) ); - $this->DB->execute(); - } - else - { - $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_settings_titles', 'where' => 'conf_title_noshow=0', 'order' => 'conf_title_title' ) ); - $this->DB->execute(); - } - - while( $r = $this->DB->fetch() ) - { - $this->setting_groups[ $r['conf_title_id'] ] = $r; - $this->setting_groups_by_key[ $r['conf_title_keyword'] ] = $r; - } - } - - /** - * Make sure all titles have keywords set - * - * @access private - * @return void - */ - private function _settingsTitlesCheck() - { - //----------------------------------------- - // Get 'em - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_settings_titles' ) ); - $outer = $this->DB->execute(); - - while( $row = $this->DB->fetch( $outer ) ) - { - if ( ! $row['conf_title_keyword'] ) - { - $new_keyword = mb_strtolower( preg_replace( "#[^\d\w]#", "", $row['conf_title_title'] ) ); - $this->DB->update( 'core_sys_settings_titles', array( 'conf_title_keyword' => $new_keyword ), 'conf_title_id='.$row['conf_title_id'] ); - } - } - } - - /** - * Import XML Settings on an app by app basis - * - * @access public - * @return array Array of messages - */ - public function importAllApps() - { - $message = array(); - - foreach( ipsRegistry::$applications as $app_dir => $app_data ) - { - $file = IPSLib::getAppDir( $app_dir ) . '/xml/' . $app_dir . '_settings.xml'; - - if ( file_exists( $file ) ) - { - $contents = file_get_contents( $file ); - - $return = $this->_importXML( $contents, $app_dir ); - - $message[] = $app_data['app_title'] . " " . sprintf( $this->lang->words['s_upandin'], $return['updatedCount'], $return['insertedCount'] ); - - /* In dev time stamp? */ - if ( IN_DEV ) - { - $cache = $this->caches['indev']; - $cache['import']['settings'][ $app_dir ] = time(); - $this->cache->setCache( 'indev', $cache, array( 'donow' => 1, 'array' => 1 ) ); - } - } - } - - return $message; - } - - /** - * Import XML Settings - * - * @access private - * @param string XML Data - * @param string Application (should be set by XML file, however) - * @param array Array of any known settings and their values - * @return array array( 'insertedCount' => x, 'updatedCount' => x, 'updatedKeys' => array(..), 'insertedKeys' => array() ) - */ - private function _importXML( $content, $app='core', $knownSettings=array() ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $cur_settings = array(); - $updated = 0; - $inserted = 0; - $updatedKeys = array(); - $insertedKeys = array(); - $known = array(); - - //----------------------------------------- - // Get current settings. - //----------------------------------------- - - $this->DB->build( array( 'select' => 'conf_id, conf_key', - 'from' => 'core_sys_conf_settings', - 'order' => 'conf_id' ) ); - - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $cur_settings[ $r['conf_key'] ] = $r['conf_id']; - } - - //----------------------------------------- - // Get current titles - //----------------------------------------- - - $this->_settingsGetGroups( true ); - - //----------------------------------------- - // Get xml class - //----------------------------------------- - - require_once( IPS_KERNEL_PATH.'classXML.php' ); - - $xml = new classXML( IPS_DOC_CHAR_SET ); - $xml->loadXML( $content ); - - //----------------------------------------- - // Loop through and sort out settings... - //----------------------------------------- - - foreach( $xml->fetchElements('setting') as $setting ) - { - $entry = $xml->fetchElementsFromRecord( $setting ); - - //----------------------------------------- - // Is setting? - //----------------------------------------- - - if ( ! $entry['conf_is_title'] ) - { - unset( $entry['conf_is_title'] ); - unset( $entry['conf_help_key'] ); - unset( $entry['conf_id'] ); - $new_settings[] = $entry; - } - - //----------------------------------------- - // Is title? - //----------------------------------------- - - else - { - $new_titles[] = $entry; - } - } - - //----------------------------------------- - // Sort out titles... - //----------------------------------------- - - if ( is_array( $new_titles ) and count( $new_titles ) ) - { - foreach( $new_titles as $idx => $data ) - { - if ( $data['conf_title_title'] AND $data['conf_title_keyword'] ) - { - //----------------------------------------- - // Get ID based on key - //----------------------------------------- - - $conf_id = $this->setting_groups_by_key[ $data['conf_title_keyword'] ]['conf_title_id']; - - $save = array( 'conf_title_title' => $data['conf_title_title'], - 'conf_title_desc' => $data['conf_title_desc'], - 'conf_title_keyword' => $data['conf_title_keyword'], - 'conf_title_tab' => $data['conf_title_tab'], - 'conf_title_app' => $data['conf_title_app'] ? $data['conf_title_app'] : $app, - 'conf_title_noshow' => $data['conf_title_noshow'] ); - - //----------------------------------------- - // Not got a row, insert first! - //----------------------------------------- - - if ( ! $conf_id ) - { - $this->DB->insert( 'core_sys_settings_titles', $save ); - $conf_id = $this->DB->getInsertId(); - - } - else - { - //----------------------------------------- - // Update... - //----------------------------------------- - - $this->DB->update( 'core_sys_settings_titles', $save, 'conf_title_id='.$conf_id ); - } - - //----------------------------------------- - // Update settings cache - //----------------------------------------- - - $save['conf_title_id'] = $conf_id; - $this->setting_groups_by_key[ $save['conf_title_keyword'] ] = $save; - $this->setting_groups[ $save['conf_title_id'] ] = $save; - - //----------------------------------------- - // Remove need update... - //----------------------------------------- - - $need_update[] = $conf_id; - } - } - } - - //----------------------------------------- - // Sort out settings - //----------------------------------------- - - if ( is_array( $new_settings ) and count( $new_settings ) ) - { - foreach( $new_settings as $idx => $data ) - { - //----------------------------------------- - // Insert known - //----------------------------------------- - - $data['conf_value'] = ''; - - if( is_array($knownSettings) AND count($knownSettings) ) - { - if ( ! $data['conf_value'] AND ( in_array( $data['conf_key'], array_keys( $knownSettings ) ) ) ) - { - $data['conf_value'] = $knownSettings[ $data['conf_key'] ]; - } - } - - $data['conf_group'] = $this->setting_groups_by_key[ $data['conf_title_keyword'] ]['conf_title_id']; - - //----------------------------------------- - // Remove from array - //----------------------------------------- - - unset( $data['conf_title_keyword'] ); - - if ( $cur_settings[ $data['conf_key'] ] ) - { - //----------------------------------------- - // Don't change the setting value - //----------------------------------------- - unset( $data['conf_value'] ); - - //----------------------------------------- - // Update - //----------------------------------------- - - $this->DB->update( 'core_sys_conf_settings', $data, 'conf_id='.$cur_settings[ $data['conf_key'] ] ); - $updatedKeys[] = $data['conf_key']; - $updated++; - } - else - { - //----------------------------------------- - // INSERT - //----------------------------------------- - - $this->DB->insert( 'core_sys_conf_settings', $data ); - $insertedKeys[] = $data['conf_key']; - $inserted++; - } - } - } - - //----------------------------------------- - // Update group counts... - //----------------------------------------- - - if ( count( $need_update ) ) - { - foreach( $need_update as $i => $idx ) - { - $conf = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'core_sys_conf_settings', 'where' => 'conf_group='.$idx ) ); - - $count = intval($conf['count']); - - $this->DB->update( 'core_sys_settings_titles', array( 'conf_title_count' => $count ), 'conf_title_id='.$idx ); - } - } - - //----------------------------------------- - // Resync - //----------------------------------------- - - $this->settingsRebuildCache(); - - //----------------------------------------- - // Return - //----------------------------------------- - - return array( 'insertedCount' => $inserted, - 'updatedCount' => $updated, - 'insertedKeys' => $insertedKeys, - 'updatedKeys' => $updatedKeys ); - } - - /** - * Export all apps: Wrapper function really. Yes. It is. - * - * @access public - * @return array Array of messages or errors - */ - public function exportAllApps() - { - $messages = array(); - $errors = array(); - - foreach( ipsRegistry::$applications as $app_dir => $app_data ) - { - @unlink( IPSLib::getAppDir( $app_dir ) . '/xml/' . $app_dir . '_settings.xml' ); - - if ( ! file_exists( IPSLib::getAppDir( $app_dir ) . '/xml' ) ) - { - $errors[] = "Ошибка: " . IPSLib::getAppDir( $app_dir ) . "/xml/ не существует"; - continue; - } - else if ( ! IPSLib::isWritable( IPSLib::getAppDir( $app_dir ) . '/xml' ) ) - { - if ( ! @chmod( IPSLib::isWritable( IPSLib::getAppDir( $app_dir ) . '/xml', 0755 ) ) ) - { - $errors[] = "Ошибка: " . IPSLib::getAppDir( $app_dir ) . "/xml/ нет прав на запись"; - continue; - } - } - else if ( file_exists( IPSLib::getAppDir( $app_dir ) . '/xml/' . $app_dir . '_settings.xml' ) AND ! IPSLib::isWritable( IPSLib::getAppDir( $app_dir ) . '/xml/' . $app_dir . '_settings.xml' ) ) - { - $errors[] = "Ошибка: " . IPSLib::getAppDir( $app_dir ) . '/xml/' . $app_dir . "_settings.xml нет прав на запись"; - continue; - } - - $this->_exportXML( $app_dir ); - - $messages[] = "Настройки приложения " . $app_data['app_title'] . " экспортированы в директорию приложения"; - - /* In dev time stamp? */ - if ( IN_DEV ) - { - $cache = $this->caches['indev']; - $cache['import']['settings'][ $app_dir ] = time(); - $this->cache->setCache( 'indev', $cache, array( 'donow' => 1, 'array' => 1 ) ); - } - } - - return $errors ? $errors : $messages; - } - - - /** - * Export all settings to XML (IN_DEV mode) - * - * @access private - * @param string Application directory - * @return boolean - */ - private function _exportXML( $app_dir='core' ) - { - //----------------------------------------- - // Get setting groups - //----------------------------------------- - - $this->_settingsGetGroups( true ); - - //----------------------------------------- - // Get xml class - //----------------------------------------- - - require_once( IPS_KERNEL_PATH.'classXML.php' ); - - $xml = new classXML( IPS_DOC_CHAR_SET ); - - $xml->newXMLDocument(); - $xml->addElement( 'settingexport' ); - $xml->addElement( 'settinggroup', 'settingexport' ); - - foreach( $this->setting_groups as $i => $roar ) - { - //----------------------------------------- - // App check? - //----------------------------------------- - - if ( $app_dir != $roar['conf_title_app'] ) - { - continue; - } - - //----------------------------------------- - // First, add in setting group title - //----------------------------------------- - - $thisconf = array( 'conf_is_title' => 1, - 'conf_title_keyword' => $roar['conf_title_keyword'], - 'conf_title_title' => $roar['conf_title_title'], - 'conf_title_desc' => $roar['conf_title_desc'], - 'conf_title_tab' => $roar['conf_title_tab'], - 'conf_title_app' => $roar['conf_title_app'] ? $roar['conf_title_app'] : $app_dir, - 'conf_title_noshow' => $roar['conf_title_noshow'] ); - - $xml->addElementAsRecord( 'settinggroup', 'setting', $thisconf ); - - //----------------------------------------- - // Get settings... - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', - 'from' => 'core_sys_conf_settings', - 'where' => "conf_group='{$roar['conf_title_id']}'", - 'order' => 'conf_position, conf_title' ) ); - - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - //----------------------------------------- - // Clean up... - //----------------------------------------- - - unset( $r['conf_value'], $r['conf_id'] ); - - $r['conf_title_keyword'] = $roar['conf_title_keyword']; - $r['conf_is_title'] = 0; - - $xml->addElementAsRecord( 'settinggroup', 'setting', $r ); - } - } - - //----------------------------------------- - // Grab the XML document - //----------------------------------------- - - $xmlData = $xml->fetchDocument(); - - //----------------------------------------- - // Attempt to write... - //----------------------------------------- - - $file = IPSLib::getAppDir( $app_dir ) . '/xml/' . $app_dir . '_settings.xml'; - - @unlink( $file ); - @file_put_contents( $file, $xmlData ); - } - +Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_tools_settings extends ipsCommand +{ + /** + * Key array + * + * @var array Array of keys + */ + private $key_array = array(); + + /** + * Setting groups array + * + * @var array Array of setting groups + */ + private $setting_groups = array(); + + /** + * Setting groups array mapping + * + * @var array Array of setting groups + */ + private $setting_groups_by_key = array(); + + /** + * Skin object + * This is public so that the portal can access it + * + * @var object Skin templates + */ + public $html; + + /** + * Form code + * This is public so that the portal can access it + * + * @var string Form code + */ + public $form_code; + + /** + * Form code + * This is public so that the portal can access it + * + * @var string JS Form code + */ + public $form_code_js; + + /** + * Application to use + * + * @var string Application + */ + private $_app; + + /** + * Where to return to after save + * + * @var string URL to go to + */ + public $return_after_save; + + /** + * Breadcrumb url to use in place of the default + * + * @var string + */ + public $base_nav_url; + + /** + * Class entry point + * + * @param object Registry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load language + //----------------------------------------- + + $this->registry->class_localization->loadLanguageFile( array( 'admin_tools' ) ); + + $this->html = $this->registry->output->loadTemplate('cp_skin_tools'); + + $this->form_code = $this->html->form_code = 'module=tools&section=settings'; + $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=settings'; + + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'settings_manage' ); + + switch( $this->request['do'] ) + { + case 'settinggroup_resync': + $this->_resynchSettingGroup(); + break; + + case 'settinggroup_delete': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'settings_delete' ); + $this->_deleteSettingGroup(); + break; + + case 'settinggroup_new': + $this->_settingGroupForm('add'); + break; + + case 'settinggroup_showedit': + $this->_settingGroupForm('edit'); + break; + + case 'settinggroup_add': + $this->_settingGroupSave('add'); + break; + + case 'settinggroup_edit': + $this->_settingGroupSave('edit'); + break; + + case 'settingnew': + $this->_settingForm('add'); + break; + + case 'setting_showedit': + $this->_settingForm('edit'); + break; + + case 'setting_add': + $this->_settingSave('add'); + break; + + case 'setting_edit': + $this->_settingSave('edit'); + break; + + case 'reorder': + $this->reorder(); + break; + + case 'setting_view': + $this->_viewSettings(); + break; + + case 'setting_delete': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'settings_delete' ); + $this->_deleteSettings(); + break; + + case 'setting_revert': + $this->_revertSettings(); + break; + + case 'setting_update': + $this->_updateSettings(); + break; + + case 'findsetting': + $this->_findSettingGroup(); + break; + + case 'settings_do_import': + $this->importAllSettings(); + break; + case 'settings_do_import_indev': + $this->importAllSettings(1); + break; + + case 'MOD_export_setting': + $this->_exportSettingsGroup(); + break; + + case 'settingsExportApps': + $messages = $this->exportAllApps(); + + $this->registry->output->global_message = implode( "
    ", $messages ); + + $this->_settingsOverview(); + break; + + case 'settingsImportApps': + $messages = $this->importAllApps(); + + $this->registry->output->global_message = implode( "
    ", $messages ); + $this->_settingsOverview(); + break; + default: + $this->request['do'] = 'settingsview'; + $this->_settingsOverview(); + break; + } + + //----------------------------------------- + // Pass to CP output hander + //----------------------------------------- + + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Reorder the settings + * + * @return void + */ + public function reorder() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' ); + $ajax = new $classToLoad(); + + //----------------------------------------- + // Checks... + //----------------------------------------- + + if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) + { + $ajax->returnString( $this->lang->words['postform_badmd5'] ); + exit(); + } + + //----------------------------------------- + // Save new position + //----------------------------------------- + + $position = 1; + + if( is_array($this->request['settings']) AND count($this->request['settings']) ) + { + foreach( $this->request['settings'] as $this_id ) + { + $this->DB->update( 'core_sys_conf_settings', array( 'conf_position' => $position ), 'conf_id=' . $this_id ); + + $position++; + } + } + + $ajax->returnString( 'OK' ); + exit(); + } + + /** + * Setting group export + * + * @return void + */ + private function _exportSettingsGroup() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $this->request[ 'conf_group'] = intval($this->request['conf_group'] ); + + /* Got anything? */ + if ( ! $this->request['conf_group'] ) + { + return; + } + + //----------------------------------------- + // Get setting groups + //----------------------------------------- + + $this->_settingsGetGroups( true ); + + //----------------------------------------- + // Get xml class + //----------------------------------------- + + require_once( IPS_KERNEL_PATH.'classXML.php' ); + + $xml = new classXML( IPS_DOC_CHAR_SET ); + + $xml->newXMLDocument(); + $xml->addElement( 'settingexport' ); + $xml->addElement( 'settinggroup', 'settingexport' ); + + foreach( $this->setting_groups as $i => $roar ) + { + //----------------------------------------- + // App check? + //----------------------------------------- + + if ( $this->request['conf_group'] != $roar['conf_title_id'] ) + { + continue; + } + + //----------------------------------------- + // First, add in setting group title + //----------------------------------------- + + $thisconf = array( 'conf_is_title' => 1, + 'conf_title_keyword' => $roar['conf_title_keyword'], + 'conf_title_title' => $roar['conf_title_title'], + 'conf_title_desc' => $roar['conf_title_desc'], + 'conf_title_tab' => $roar['conf_title_tab'], + 'conf_title_app' => $roar['conf_title_app'] ? $roar['conf_title_app'] : 'core', + 'conf_title_noshow' => $roar['conf_title_noshow'] ); + + $xml->addElementAsRecord( 'settinggroup', 'setting', $thisconf ); + + //----------------------------------------- + // Get settings... + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', + 'from' => 'core_sys_conf_settings', + 'where' => "conf_group='{$roar['conf_title_id']}'", + 'order' => 'conf_position, conf_title' ) ); + + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + //----------------------------------------- + // Clean up... + //----------------------------------------- + + unset( $r['conf_value'], $r['conf_id'] ); + + $r['conf_title_keyword'] = $roar['conf_title_keyword']; + $r['conf_is_title'] = 0; + + $xml->addElementAsRecord( 'settinggroup', 'setting', $r ); + } + } + + //----------------------------------------- + // Grab the XML document + //----------------------------------------- + + $xmlData = $xml->fetchDocument(); + + $this->registry->output->showDownload( $xmlData, 'settingGroup_' . IPSText::makeSeoTitle( $thisconf['conf_title_title'] ) . '.xml', '', 0 ); + } + + /** + * Find setting group (don't rely on IDs) + * + * @return void + */ + public function _findSettingGroup() + { + if ( ! $this->request['key'] ) + { + $this->_settingsOverview(); + } + + $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_settings_titles' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + if( ( $r['conf_title_keyword'] == $this->request['key'] ) OR mb_strtolower( str_replace( " ", "", trim( $r['conf_title_title'] ) ) ) == urldecode( trim( $this->request['key'] ) ) ) + { + $this->registry->output->silentRedirect( $this->settings['base_url'] . '&' . $this->form_code . '&do=setting_view&conf_group=' . $r['conf_title_id'] ); + break; + } + } + + $this->_settingsOverview(); + } + + /** + * Import all settings + * + * @param boolean In development mode? + * @param boolean Return (ignore the var name) + * @param array Array of known setting values + * @return void + */ + public function importAllSettings( $in_dev=0, $no_return=0, $known=array() ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $updated = 0; + $inserted = 0; + $need_update = array(); + + //----------------------------------------- + // Make sure we have titles + //----------------------------------------- + + $this->_settingsTitlesCheck(); + + //----------------------------------------- + // INDEV? + //----------------------------------------- + + if ( $in_dev ) + { + $_FILES['FILE_UPLOAD']['name'] = ''; + $this->request['file_location'] = IPSLib::getAppDir( $this->request['app_dir'] ) . '/xml/' . $this->request['app_dir'] . '_settings.xml'; + } + else + { + $this->request['file_location'] = IPS_ROOT_PATH . $this->request['file_location'] ; + } + + //----------------------------------------- + // Go for it + //----------------------------------------- + + if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") ) + { + //----------------------------------------- + // check and load from server + //----------------------------------------- + + if ( ! $this->request['file_location'] ) + { + $this->registry->output->global_message = $this->lang->words['s_nofile']; + $this->_settingsOverview(); + return; + } + + if ( ! file_exists( $this->request['file_location'] ) ) + { + $this->registry->output->global_message = sprintf( $this->lang->words['s_noopen'], $this->request['file_location'] ); + $this->_settingsOverview(); + return; + } + + if ( preg_match( "#\.gz$#", $this->request['file_location'] ) ) + { + if ( $FH = @gzopen( $this->request['file_location'], 'rb' ) ) + { + while ( ! @gzeof( $FH ) ) + { + $content .= @gzread( $FH, 1024 ); + } + + @gzclose( $FH ); + } + } + else + { + if ( $FH = @fopen( $this->request['file_location'], 'rb' ) ) + { + $content = @fread( $FH, filesize($this->request['file_location']) ); + @fclose( $FH ); + } + } + } + else + { + //----------------------------------------- + // Get uploaded schtuff + //----------------------------------------- + + $tmp_name = $_FILES['FILE_UPLOAD']['name']; + $tmp_name = preg_replace( "#\.gz$#", "", $tmp_name ); + + $content = ipsRegistry::getClass('adminFunctions')->importXml( $tmp_name ); + } + + if ( ! $content ) + { + $this->registry->output->global_message = $this->lang->words['s_nofile']; + $this->_settingsOverview(); + return; + } + + $return = $this->_importXML( $content, $this->request['app_dir'], $known ); + + if ( $no_return ) + { + $this->registry->output->global_message = sprintf( $this->lang->words['s_upandin'], $return['updatedCount'], $return['insertedCount'] ); + return TRUE; + } + else + { + $this->registry->output->global_message = sprintf( $this->lang->words['s_upandin'], $return['updatedCount'], $return['insertedCount'] ); + $this->_settingsOverview(); + return; + } + } + + /** + * Delete a setting group + * + * @return void + */ + private function _deleteSettingGroup() + { + if ( $this->request['id'] ) + { + $conf = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'core_sys_conf_settings', 'where' => 'conf_group=' . $this->request['id'] ) ); + + $count = intval($conf['count']); + + if ( $count > 0 ) + { + $this->registry->output->global_message = $this->lang->words['s_cantremove']; + } + else + { + $this->DB->delete( 'core_sys_settings_titles', 'conf_title_id=' . $this->request['id'] ); + + $this->registry->output->global_message = $this->lang->words['s_removed']; + } + + } + + $this->settingsRebuildCache(); + + $this->_settingsOverview(); + } + + /** + * Resynchronize settings in a group + * + * @return void + */ + private function _resynchSettingGroup() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $this->request['id'] = intval( $this->request['id'] ); + + //----------------------------------------- + // Doit... + //----------------------------------------- + + $this->_resynchGroup( $this->request['id'] ); + + $this->registry->output->global_message = $this->lang->words['s_recounted']; + + //----------------------------------------- + // Get conf title details + //----------------------------------------- + + $conf_group = $this->DB->buildAndFetch( array( 'select' => 'conf_title_tab', + 'from' => 'core_sys_settings_titles', + 'where' => 'conf_title_id='.$this->request['id'] ) ); + + $this->_settingsOverview( $conf_group['conf_title_tab'] ); + } + + /** + * Does the resync + * + * @param integer Group id + * @return void + */ + private function _resynchGroup( $id ) + { + if ( $id ) + { + $conf = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'core_sys_conf_settings', 'where' => 'conf_group='.$id ) ); + + $count = intval($conf['count']); + + $this->DB->update( 'core_sys_settings_titles', array( 'conf_title_count' => $count ), 'conf_title_id=' . $id ); + } + } + + /** + * Form to add/edit a setting group + * + * @param string [add|edit] + * @return void + */ + private function _settingGroupForm( $type='add' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $conf_title_id = intval( $this->request['id'] ); + $form = array(); + $apps = array( 0 => array( 'core', $this->lang->words['s_global_dd'] ) ); + + //----------------------------------------- + // Build applications drop down + //----------------------------------------- + + foreach( ipsRegistry::$applications as $app_dir => $app_data ) + { + $apps[] = array( $app_dir, $app_data['app_title'] ); + } + + //----------------------------------------- + // Type + //----------------------------------------- + + if ( $type == 'add' ) + { + $formcode = 'settinggroup_add'; + $title = $this->lang->words['s_createnew']; + $button = $this->lang->words['s_createnew']; + } + else + { + $conf = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'core_sys_settings_titles', + 'where' => 'conf_title_id='.$conf_title_id ) ); + + if ( ! $conf['conf_title_id'] ) + { + $this->registry->output->global_message = $this->lang->words['s_noid']; + $this->_settingsOverview(); + } + + $formcode = 'settinggroup_edit'; + $title = sprintf($this->lang->words['s_editsetting'], $conf['conf_title'] ); + $button = $this->lang->words['s_savechanges']; + } + + //----------------------------------------- + // Form elements + //----------------------------------------- + + $form['conf_title_title'] = $this->registry->output->formInput( 'conf_title_title', $_POST['conf_title_title'] ? $_POST['conf_title_title'] : $conf['conf_title_title'] ); + $form['conf_title_desc'] = $this->registry->output->formTextarea( 'conf_title_desc', $_POST['conf_title_desc'] ? $_POST['conf_title_desc'] : $conf['conf_title_desc'] ); + $form['conf_title_app'] = $this->registry->output->formDropdown( 'conf_title_app', $apps, $_POST['conf_title_app'] ? $_POST['conf_title_app'] : $conf['conf_title_app'] ); + $form['conf_title_tab'] = $this->registry->output->formInput( 'conf_title_tab', $_POST['conf_title_tab'] ? $_POST['conf_title_tab'] : $conf['conf_title_tab'] ); + + //if ( IN_DEV ) + //{ + $form['conf_title_keyword'] = $this->registry->output->formInput( 'conf_title_keyword', $_POST['conf_title_keyword'] ? $_POST['conf_title_keyword'] : $conf['conf_title_keyword'] ); + $form['conf_title_noshow'] = $this->registry->output->formYesNo( 'conf_title_noshow', $_POST['conf_title_noshow'] ? $_POST['conf_title_noshow'] : $conf['conf_title_noshow'] ); + //} + + $this->registry->output->html .= $this->html->settings_title_form( $form, $title, $formcode, $button ); + } + + /** + * Save a setting group + * + * @param string [add|edit] + * @return void + */ + private function _settingGroupSave($type='add') + { + //----------------------------------------- + // INIT + //----------------------------------------- + + if ( $type == 'edit' ) + { + if ( ! $this->request['id'] ) + { + $this->registry->output->global_message = $this->lang->words['s_noid']; + $this->_settingForm(); + return; + } + } + + if( ! $this->request['conf_title_title'] ) + { + $this->registry->output->global_message = $this->lang->words['s_notitle']; + $this->_settingGroupForm( $type ); + return; + } + + if( ! $this->request['conf_title_keyword'] ) + { + $this->registry->output->global_message = $this->lang->words['s_nokeyword']; + $this->_settingGroupForm( $type ); + return; + } + + //-------------------------------------------- + // Check... + //-------------------------------------------- + + $array = array( 'conf_title_title' => $this->request['conf_title_title'], + 'conf_title_desc' => IPSText::safeslashes( $_POST['conf_title_desc'] ), + 'conf_title_keyword' => IPSText::safeslashes( $_POST['conf_title_keyword'] ), + 'conf_title_noshow' => $this->request['conf_title_noshow'], + 'conf_title_app' => trim( $this->request['conf_title_app'] ), + 'conf_title_tab' => trim( $this->request['conf_title_tab'] ) + ); + + + if ( $type == 'add' ) + { + $this->DB->insert( 'core_sys_settings_titles', $array ); + $this->registry->output->global_message = $this->lang->words['s_added']; + } + else + { + $this->DB->update( 'core_sys_settings_titles', $array, 'conf_title_id=' . $this->request['id'] ); + $this->registry->output->global_message = $this->lang->words['s_edited']; + } + + $this->settingsRebuildCache(); + + $this->_settingsOverview(); + } + + /** + * Form to add/edit a setting + * + * @param string [add|edit] + * @return void + */ + private function _settingForm( $type='add' ) + { + if ( $type == 'add' ) + { + $formcode = 'setting_add'; + $title = $this->lang->words['s_createnewtitle']; + $button = $this->lang->words['s_createnewtitle']; + $conf = array( 'conf_group' => $this->request['conf_group'], 'conf_add_cache' => 1 ); + + if ( IN_DEV ) + { + $conf['conf_protected'] = 1; + } + + if ( $this->request['conf_group'] ) + { + $max = $this->DB->buildAndFetch( array( 'select' => 'max(conf_position) as max', 'from' => 'core_sys_conf_settings', 'where' => 'conf_group=' . $this->request['conf_group'] ) ); + } + else + { + $max = $this->DB->buildAndFetch( array( 'select' => 'max(conf_position) as max', 'from' => 'core_sys_conf_settings' ) ); + } + + $conf['conf_position'] = $max['max'] + 1; + } + else + { + $conf = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => 'conf_id=' . $this->request['id'] ) ); + + if ( ! $conf['conf_id'] ) + { + $this->registry->output->global_message = $this->lang->words['s_noid']; + $this->_settingsOverview(); + } + + $formcode = 'setting_edit'; + $title = sprintf($this->lang->words['s_editsetting'], $conf['conf_title'] ); + $button = $this->lang->words['s_savechanges']; + } + + //----------------------------------------- + // Get groups + //----------------------------------------- + + $this->_settingsGetGroups(); + + $groups = array(); + + foreach( $this->setting_groups as $i => $r ) + { + $groups[] = array( $r['conf_title_id'], $r['conf_title_title'] ); + } + + //----------------------------------------- + // Type + //----------------------------------------- + + $types = array( + array( 'input' , $this->lang->words['s_input'] ), + array( 'dropdown' , $this->lang->words['s_dropdown'] ), + array( 'yes_no' , $this->lang->words['s_yes_no'] ), + array( 'textarea' , $this->lang->words['s_textarea'] ), + array( 'editor' , $this->lang->words['s_editor'] ), + array( 'multi' , $this->lang->words['s_multi'] ), + array( 'name_autocomplete' , $this->lang->words['s_name_autocomplete'] ), + ); + + + + $form['conf_title'] = $this->registry->output->formInput( 'conf_title' , $_POST['conf_title'] ? $_POST['conf_title'] : $conf['conf_title'] ); + $form['conf_position'] = $this->registry->output->formInput( 'conf_position' , $_POST['conf_position'] ? $_POST['conf_position'] : $conf['conf_position'] ); + $form['conf_description'] = $this->registry->output->formTextarea( 'conf_description', $_POST['conf_description'] ? $_POST['conf_description'] : $conf['conf_description'] ); + $form['conf_group'] = $this->registry->output->formDropdown( 'conf_group' , $groups, $_POST['conf_group'] ? $_POST['conf_group'] : $conf['conf_group'] ); + $form['conf_type'] = $this->registry->output->formDropdown( 'conf_type' , $types, $_POST['conf_type'] ? $_POST['conf_type'] : $conf['conf_type'] ); + $form['conf_key'] = $this->registry->output->formInput( 'conf_key' , $_POST['conf_key'] ? $_POST['conf_key'] : $conf['conf_key'] ); + $form['conf_value'] = $this->registry->output->formTextarea( 'conf_value' , $_POST['conf_value'] ? $_POST['conf_value'] : $conf['conf_value'] ); + $form['conf_default'] = $this->registry->output->formTextarea( 'conf_default' , $_POST['conf_default'] ? $_POST['conf_default'] : $conf['conf_default'] ); + $form['conf_extra'] = $this->registry->output->formTextarea( 'conf_extra' , $_POST['conf_extra'] ? $_POST['conf_extra'] : $conf['conf_extra'] ); + $form['conf_evalphp'] = $this->registry->output->formTextarea( 'conf_evalphp' , $_POST['conf_evalphp'] ? $_POST['conf_evalphp'] : $conf['conf_evalphp'] ); + $form['conf_keywords'] = $this->registry->output->formTextarea( 'conf_keywords' , $_POST['conf_keywords'] ? $_POST['conf_keywords'] : $conf['conf_keywords'] ); + $form['conf_start_group'] = $this->registry->output->formInput( 'conf_start_group', $_POST['conf_start_group'] ? $_POST['conf_start_group'] : $conf['conf_start_group'] ); + $form['conf_add_cache'] = $this->registry->output->formYesNo( 'conf_add_cache', $_POST['conf_add_cache'] ? $_POST['conf_add_cache'] : $conf['conf_add_cache'] ); + + if ( IN_DEV ) + { + $form['conf_protected'] = $this->registry->output->formYesNo( 'conf_protected', $_POST['conf_protected'] ? $_POST['conf_protected'] : $conf['conf_protected'] ); + } + + + + //----------------------------------------- + // start form + //----------------------------------------- + + $this->registry->output->html .= $this->html->settings_form( $form, $title, $formcode, $button ); + } + + /** + * View all settings (form) in a group + * This is public so that portal can access it + * + * @return void + */ + public function _viewSettings() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $search_key = trim( $this->request['search'] ); + $conf_group = trim( $this->request['conf_group'] ); + $conf_titles = array(); + $last_conf_id = -1; + $start = intval( $this->request['st'] ); + $end = 150; + $get_by_key = isset( $this->request['conf_title_keyword'] ) ? $this->request['conf_title_keyword'] : ''; + + //----------------------------------------- + // Get settings in group + //----------------------------------------- + + $this->_settingsGetGroups( ( $get_by_key ) ? TRUE : FALSE ); + + //----------------------------------------- + // Grabbing by key? + //----------------------------------------- + + if( $get_by_key ) + { + $data = $this->DB->buildAndFetch( array( + 'select' => 'conf_title_id, conf_title_keyword, conf_title_title', + 'from' => 'core_sys_settings_titles', + 'where' => "conf_title_keyword='{$get_by_key}'" + ) ); + + $this->request['conf_group'] = $data['conf_title_id'] ; + $conf_group = $data['conf_title_id']; + $this->request['groupHelpKey'] = $data['conf_title_keyword']; + } + + //----------------------------------------- + // check... + //----------------------------------------- + + if( !$conf_group and !$search_key ) + { + $this->registry->output->global_message = $this->lang->words['s_nogroup']; + $this->_settingsOverview(); + return; + } + + //-------------------------------------- + // Redirect to Nexus for ads + //-------------------------------------- + + if ( $this->setting_groups[ $conf_group ]['conf_title_keyword'] == 'adcodeintegration' and IPSLib::appIsInstalled('nexus') ) + { + $this->registry->output->silentRedirect( $this->settings['base_url'] . 'app=nexus&module=promotion§ion=advertisements' ); + } + + //----------------------------------------- + // Pagination + //----------------------------------------- + + $pages = $this->registry->output->generatePagination( array( + 'totalItems' => $this->setting_groups[$conf_group]['conf_title_count'], + 'itemsPerPage' => $end, + 'currentStartValue' => $start, + 'baseUrl' => $this->settings['base_url'] . "&{$this->form_code}&&search={$search_key}", + ) ); + + + //----------------------------------------- + // Did we search? + //----------------------------------------- + + if( $search_key ) + { + $keywords = mb_strtolower($search_key); + $whereExtra = $conf_group ? " AND c.conf_group={$conf_group}" : ''; + + $this->DB->build( array( + 'select' => 'c.*', + 'from' => array( 'core_sys_conf_settings' => 'c' ), + 'where' => '(' . $this->DB->buildLower('c.conf_title') . " LIKE '%{$keywords}%' OR " . $this->DB->buildLower('c.conf_description') . " LIKE '%{$keywords}%' OR " . $this->DB->buildLower('c.conf_keywords') . " LIKE '%{$keywords}%')" . $whereExtra, + 'order' => 'c.conf_title', + 'limit' => array( $start, $end ), + 'add_join' => array( + array( + 'select' => 'ct.conf_title_id, ct.conf_title_noshow, ct.conf_title_title, ct.conf_title_tab', + 'from' => array( 'core_sys_settings_titles' => 'ct' ), + 'where' => 'ct.conf_title_id=c.conf_group', + 'type' => 'left' + ) + ) + ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $r['conf_start_group'] = ""; + $r['conf_description'] .= '
    ' . $this->lang->words['conf_desc_search'] . "" . $r['conf_title_title'] . ""; + $conf_entry[ $r['conf_id'] ] = $r; + } + + if( ! count( $conf_entry ) ) + { + $this->registry->output->global_message = sprintf( $this->lang->words['s_nomatches'], $keywords ); + $this->_settingsOverview(); + return; + } + + $title = sprintf( $this->lang->words['s_searchedfor'], $keywords ); + $tab = ''; + } + + //----------------------------------------- + // Or not... + //----------------------------------------- + + else + { + $this->DB->build( array( + 'select' => '*', + 'from' => 'core_sys_conf_settings', + 'where' => "conf_group='{$conf_group}'", + 'order' => 'conf_position, conf_title', + 'limit' => array( $start,$end ) + ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $conf_entry[ $r['conf_id'] ] = $r; + } + + $title = $this->setting_groups[$conf_group]['conf_title_title']; + $tab = IPSText::md5Clean( $this->setting_groups[$conf_group]['conf_title_tab'] ); + $this->request['groupHelpKey'] = $this->setting_groups[ $conf_group ]['conf_title_keyword']; + } + + //----------------------------------------- + // Start output + //----------------------------------------- + + $content = ""; + + if( is_array( $conf_entry ) and count( $conf_entry ) ) + { + foreach( $conf_entry as $id => $r ) + { + $content .= $this->_processSettingEntry( $r ); + } + } + + if( ! $search_key AND ! $get_by_key ) + { + $searchbutton = 1; + } + + /* Navigation */ + if( $this->base_nav_url ) + { + $this->registry->output->extra_nav[] = array( $this->base_nav_url, ipsRegistry::$applications[ $this->setting_groups[$conf_group]['conf_title_app'] ]['app_title'] ); + $this->registry->output->extra_nav[] = array( "", $title ); + + } + else if( $tab ) + { + $this->registry->output->extra_nav[] = array( "{$this->settings['base_url']}{$this->form_code}&_dtab={$tab}", ipsRegistry::$applications[ $this->setting_groups[$conf_group]['conf_title_app'] ]['app_title'] ); + $this->registry->output->extra_nav[] = array( "{$this->settings['base_url']}{$this->form_code}&do=setting_view&conf_group={$conf_group}", $title ); + } + + /* Output */ + $this->registry->output->html .= $this->html->settings_view_wrapper( $title, $content, $searchbutton, $this->return_after_save ); + $this->registry->output->html = str_replace( '', "", $this->registry->output->html ); + } + + /** + * Process an individual setting for display + * + * @param array Setting record + * @return void + */ + private function _processSettingEntry($r) + { + $tempSkinUrl = $this->settings['skin_app_url']; + $this->settings[ 'skin_app_url'] = $this->settings['_original_base_url'] . '/' . CP_DIRECTORY . '/applications/core/skin_cp/' ; + + $form_element = ""; + $form_type = 'normal'; + $dropdown = array(); + $start = ""; + $revert_button = ""; + + $key = $r['conf_key']; + $value = $r['conf_value'] != "" ? $r['conf_value'] : $r['conf_default']; + $value = $value == "{blank}" ? '' : $value; + + $show = 1; + + //----------------------------------------------- + // Default? + //----------------------------------------------- + + $css = ""; + + if ( $r['conf_value'] != "" and ( $r['conf_value'] != $r['conf_default'] ) ) + { + $revert_button = "form_code}&do=setting_revert&id={$r['conf_id']}&conf_group={$r['conf_group']}&search=" . $this->request['search'] . "' title='{$this->lang->words['s_revertback']}'>X"; + } + + //----------------------------------------------- + // Evil eval + //----------------------------------------------- + + if ( $r['conf_evalphp'] ) + { + $show = 1; + + eval( $r['conf_evalphp'] ); + } + + if( ! $show && ! IN_DEV ) + { + return ''; + } + + switch( $r['conf_type'] ) + { + case 'input': + $form_element = $this->registry->output->formInput( $key, str_replace( "'", "'", $value ) ); + break; + + case 'textarea': + $form_element = $this->registry->output->formTextarea( $key, $value, 45 ); + break; + + case 'editor': + IPSText::getTextClass('bbcode')->parse_html = 1; + IPSText::getTextClass('bbcode')->parse_nl2br = 1; + IPSText::getTextClass('bbcode')->parse_smilies = 1; + IPSText::getTextClass('bbcode')->parse_bbcode = 1; + IPSText::getTextClass('bbcode')->parsing_section = 'global'; + + if ( IPSText::getTextClass('editor')->method == 'rte' ) + { + $value = IPSText::getTextClass('bbcode')->convertForRTE( IPSText::getTextClass('bbcode')->preDbParse( $value ) ); + } + else + { + $value = IPSText::getTextClass('bbcode')->preEditParse( $value ); + } + + $form_element = IPSText::getTextClass('editor')->showEditor( $value, $key ); + $form_type = 'rte'; + + break; + + case 'yes_no': + $form_element = $this->registry->output->formYesNo( $key, $value ); + break; + + case 'name_autocomplete': + $form_element = $this->html->nameAutoCompleteField( $key, $value ); + break; + + default: + + if ( $r['conf_extra'] ) + { + if ( $r['conf_extra'] == '#show_forums#' ) + { + //----------------------------------------- + // Require the library + // (Not a building with books) + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) .'/sources/classes/forums/class_forums.php', 'class_forums', 'forums' ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) .'/sources/classes/forums/admin_forum_functions.php', 'admin_forum_functions', 'forums' ); + + $aff = new $classToLoad( $this->registry ); + $aff->forumsInit(); + $dropdown = $aff->adForumsForumList(1); + } + else if ( $r['conf_extra'] == '#show_groups#' ) + { + $this->DB->build( array( 'select' => '*', 'from' => 'groups', 'order' => 'g_title ASC' ) ); + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + if ( $row['g_access_cp'] ) + { + $row['g_title'] .= $this->lang->words['setting_staff_tag']; + } + + $dropdown[] = array( $row['g_id'], $row['g_title'] ); + } + } + else if ( $r['conf_extra'] == '#show_applications#' ) + { + foreach( ipsRegistry::$applications as $app ) + { + $dropdown[] = array( $app['app_directory'], $app['app_title'] ); + } + } + else if ( $r['conf_extra'] == '#show_skins#' ) + { + $dropdown = $this->registry->output->generateSkinDropdown(); + } + else + { + foreach( explode( "\n", $r['conf_extra'] ) as $l ) + { + list ($k, $v) = explode( "=", $l ); + if ( $k != "" and $v != "" ) + { + $dropdown[] = array( trim($k), trim($v) ); + } + } + } + } + + if ( $r['conf_type'] == 'dropdown' ) + { + $form_element = $this->registry->output->formDropdown( $key, $dropdown, $value ); + } + else + { + $form_element = $this->registry->output->formMultiDropdown( $key, $dropdown, explode( ",", $value ) ); + } + + break; + } + + $delete = " form_code}&do=setting_delete&id={$r['conf_id']}\");' title='key: {$r['conf_key']}'>{$this->lang->words["; + $edit = "form_code}&do=setting_showedit&id={$r['conf_id']}' title='id: {$r['conf_id']}'>{$this->lang->words["; + + if ( $r['conf_protected'] and ! IN_DEV ) + { + $delete = ""; + $edit = ""; + } + + if ( $r['conf_start_group'] ) + { + $start = $this->html->settings_row_start_group( $r ); + } + + $r['conf_description'] = str_replace( '{ACP_URL}', $this->settings['_base_url'], $r['conf_description'] ); + + //----------------------------------------------- + // Search hi-lite + //----------------------------------------------- + + if ( $this->request['search'] ) + { + $_replacements = array(); + + preg_match_all( "/(&([a-zA-Z0-9]+);)/i", $r['conf_title'], $matches ); + + if( count($matches[0]) ) + { + for( $i=0, $cnt=count($matches[0]); $i <= $cnt; $i++ ) + { + $r['conf_title'] = str_replace( $matches[0][$i], '{{{' . $i . '}}}', $r['conf_title'] ); + } + } + + $r['conf_title'] = preg_replace( "/(".$this->request['search'].")/i", "\\1", $r['conf_title'] ); + + if( count($matches[0]) ) + { + for( $i=0, $cnt=count($matches); $i <= $cnt; $i++ ) + { + $r['conf_title'] = str_replace( '{{{' . $i . '}}}', $matches[0][$i], $r['conf_title'] ); + } + } + + /** + * Ok this is just annoying.... + */ + $_did = 0; + preg_match_all( "/(href=['\"].*?[\"'])/i", $r['conf_description'], $matches ); + + if( count($matches[0]) ) + { + for( $i=$_did, $cnt=count($matches[0]); $i <= $cnt; $i++ ) + { + $r['conf_description'] = str_replace( $matches[0][$i], '{{{' . $i . '}}}', $r['conf_description'] ); + + $_replacements[ $i ] = $matches[0][$i]; + $_did++; + } + } + + preg_match_all( "/(&([a-zA-Z0-9]+);)/i", $r['conf_description'], $matches ); + + if( count($matches[0]) ) + { + for( $i=$_did, $cnt=count($matches[0]); $i <= $cnt; $i++ ) + { + $r['conf_description'] = str_replace( $matches[0][$i], '{{{' . $i . '}}}', $r['conf_description'] ); + + $_replacements[ $i ] = $matches[0][$i]; + $_did++; + } + } + + $r['conf_description'] = preg_replace( "/(".$this->request['search'].")/i", "\\1", $r['conf_description'] ); + + if( count($_replacements) ) + { + foreach( $_replacements as $index => $val ) + { + $r['conf_description'] = str_replace( '{{{' . $index . '}}}', $val, $r['conf_description'] ); + } + } + } + + $html .= $start . $this->html->settings_view_row( $r, $edit, $delete, $form_element, $revert_button, $form_type ); + + $this->key_array[] = preg_replace( "/\[\]$/", "", $key ); + + $this->settings[ 'skin_app_url'] = $tempSkinUrl ; + + return $html; + } + + /** + * View setting groups + * + * @param string Application to default to + * @return void + */ + private function _settingsOverview( $start_app='' ) + { + $content = ""; + $title = ""; + $settings = array(); + $start_app = ( $start_app ) ? $start_app : trim( $this->request['start_app'] ); + + //----------------------------------------- + // Get the groups + //----------------------------------------- + + $this->_settingsGetGroups(); + + //----------------------------------------- + // Build settings.. + //----------------------------------------- + + foreach( $this->setting_groups as $i => $r ) + { + $r['conf_title_app'] = ( $r['conf_title_app'] ) ? $r['conf_title_app'] : 'core'; + $r['conf_title_tab'] = ( $r['conf_title_tab'] ) ? $r['conf_title_tab'] : 'System'; + $r['conf_title_title'] = ( $r['conf_title_noshow'] ) ? $r['conf_title_title'] . $this->lang->words['s_ishidden'] : $r['conf_title_title']; + + $settings[ $r['conf_title_tab'] ][] = $r; + } + + $this->registry->output->html .= $this->html->settings_titles_wrapper( $this->html->settings_titles_top_searchbox(), $settings, $start_app ); + } + + /** + * Update setting values/ordering + * + * @param boolean Return afterwards? + * @return void + */ + private function _updateSettings( $donothing="" ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $bounceback = str_replace( '&', '&', $this->request['bounceback'] ); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $this->request['id'] and ! $this->request['search'] AND !$this->request['settings_save'] ) + { + $this->registry->output->global_message = $this->lang->words['s_noid']; + $this->_settingsOverview(); + return; + } + + //-------------------------------------------- + // check... + //-------------------------------------------- + + $fields = explode( ",", trim($this->request['settings_save']) ); + + if ( ! count($fields ) ) + { + $this->registry->output->global_message = $this->lang->words['s_nofields']; + $this->_viewSettings(); + return; + } + + //-------------------------------------------- + // Get info from DB + //-------------------------------------------- + + $db_fields = array(); + + $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => "conf_key IN ('" . implode( "','", $fields ) . "')" ) ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $db_fields[ $r['conf_key'] ] = $r; + } + + foreach( $db_fields as $key => $data ) + { + $value = null; + + if ( ! is_array( $_POST[ $key ] ) ) + { + if ( $_POST[ $key ] != $data['conf_default'] ) + { + $value = str_replace( "'", "'", IPSText::stripslashes($_POST[ $key ]) ); + $value = $value == '' ? "{blank}" : $value; + } + else + { + $value = $data['conf_default']; + } + } + + if ( $data['conf_evalphp'] ) + { + $save = 1; + eval( $data['conf_evalphp'] ); + + /* Was value set? */ + if ( $value === null ) + { + $value = str_replace( "'", "'", IPSText::stripslashes($_POST[ $key ]) ); + $value = $value == '' ? "{blank}" : $value; + } + } + + if ( $data['conf_type'] == 'editor' ) + { + IPSText::getTextClass('bbcode')->bypass_badwords = 1; + IPSText::getTextClass('bbcode')->parse_smilies = 1; + IPSText::getTextClass('bbcode')->parse_html = 1; + IPSText::getTextClass('bbcode')->parse_bbcode = 1; + IPSText::getTextClass('bbcode')->parse_nl2br = 1; + + //$_POST[ $key ] = IPSText::getTextClass('bbcode')->preDbParse( IPSText::getTextClass('editor')->processRawPost( $key ) ); + + if( trim($_POST[ $key ]) == '
    ' OR trim($_POST[ $key ]) == '
    ' ) + { + $_POST[ $key ] = ''; + } + else + { + $_POST[ $key ] = IPSText::getTextClass('editor')->processRawPost( $key ); + } + } + + $_POST[ $key ] = str_replace( "\r", "", $_POST[ $key ] ); + + if ( $_POST[ $key ] != $data['conf_default'] ) + { + $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => $value ), 'conf_id=' . $data['conf_id'] ); + } + else if( ( isset( $this->request[ $key ] ) && $this->request[ $key ] == '' ) || ( $this->request[ $key ] == $data['conf_default'] ) || $data['conf_value'] != '' ) + { + $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => '' ), 'conf_id=' . $data['conf_id'] ); + } + } + + $this->request['conf_group'] = $this->request['id']; + + $this->registry->output->global_message = $this->lang->words['s_updated']; + + $this->settingsRebuildCache(); + + //----------------------------------------- + // We're bouncing back (Boing boing) + //----------------------------------------- + + if ( $bounceback ) + { + $this->registry->output->silentRedirect( $bounceback ); + } + + //----------------------------------------- + // Still here? + //----------------------------------------- + + if ( ! $donothing ) + { + $this->_viewSettings(); + } + } + + /** + * Save the settings form + * + * @param string [add|edit] + * @return void + */ + private function _settingSave($type='add') + { + if ( $type == 'edit' ) + { + if ( ! $this->request['id'] ) + { + $this->registry->output->global_message = $this->lang->words['s_noid']; + $this->_settingForm(); + return; + } + } + + //-------------------------------------------- + // check... + //-------------------------------------------- + + $conf_group = $this->request['conf_newgroup'] ? $this->request['conf_newgroup'] : $this->request['conf_group']; + + $array = array( 'conf_title' => $this->request['conf_title'], + 'conf_description' => IPSText::stripslashes( $_POST['conf_description'] ), + 'conf_group' => $this->request['conf_group'], + 'conf_type' => $this->request['conf_type'], + 'conf_key' => str_replace( '-', '_', IPSText::alphanumericalClean( $this->request['conf_key'] ) ), + 'conf_value' => IPSText::stripslashes( $_POST['conf_value'] ), + 'conf_default' => IPSText::stripslashes( $_POST['conf_default'] ), + 'conf_extra' => IPSText::stripslashes( $_POST['conf_extra'] ), + 'conf_evalphp' => IPSText::stripslashes( $_POST['conf_evalphp'] ), + 'conf_protected' => intval( $this->request['conf_protected'] ), + 'conf_position' => intval( $this->request['conf_position'] ), + 'conf_start_group' => $this->request['conf_start_group'], + 'conf_add_cache' => intval( $this->request['conf_add_cache'] ), + 'conf_keywords' => IPSText::stripslashes( $_POST['conf_keywords'] ), + ); + + //----------------------------------------- + // Do we have a title and key? + //----------------------------------------- + + if( !$array['conf_title'] OR !$array['conf_key'] ) + { + $this->registry->output->global_message = $this->lang->words['s_missing_key_data']; + $this->_settingForm(); + return; + } + + if ( $type == 'add' ) + { + //----------------------------------------- + // Is the key already in use? + //----------------------------------------- + + if( $this->settings[ $array['conf_key'] ] ) + { + $this->registry->output->global_message = $this->lang->words['s_keyinuse_already']; + $this->_settingForm(); + return; + } + + $this->DB->insert( 'core_sys_conf_settings', $array ); + $this->registry->output->global_message = $this->lang->words['s_added2']; + } + else + { + $conf = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => 'conf_id=' . $this->request['id'] ) ); + + $this->DB->update( 'core_sys_conf_settings', $array, 'conf_id=' . $this->request['id'] ); + $this->registry->output->global_message = $this->lang->words['s_edited2']; + + // Recount old group + $this->_resynchGroup( $conf['conf_group'] ); + } + + //----------------------------------------- + // Recount new group + //----------------------------------------- + + if( $this->request['conf_group'] ) + { + $this->_resynchGroup( $this->request['conf_group'] ); + } + + $this->settingsRebuildCache(); + + $this->_viewSettings(); + } + + /** + * Revert a setting to the default value + * + * @return void + */ + private function _revertSettings() + { + $this->request[ 'id'] = intval($this->request['id'] ); + + if ( ! $this->request['id'] ) + { + $this->registry->output->global_message = $this->lang->words['s_noid']; + $this->_settingForm(); + return; + } + + $conf = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => 'conf_id=' . $this->request['id'] ) ); + + //-------------------------------------------- + // Revert... + //-------------------------------------------- + + $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => '' ), 'conf_id=' . $this->request['id'] ); + + $this->registry->output->global_message = $this->lang->words['s_revertedback']; + + $this->settingsRebuildCache(); + + $this->_viewSettings(); + } + + /** + * Delete a setting + * + * @return void + */ + private function _deleteSettings() + { + if ( ! $this->request['id'] ) + { + $this->registry->output->global_message = $this->lang->words['s_noid']; + $this->_settingsOverview(); + return; + } + + $conf = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => 'conf_id=' . $this->request['id'] ) ); + + if ( ! $conf['conf_id'] ) + { + $this->registry->output->global_message = $this->lang->words['s_noid']; + $this->_settingsOverview(); + return; + } + + //-------------------------------------------- + // Delete... + //-------------------------------------------- + + $this->DB->delete( 'core_sys_conf_settings', 'conf_id=' . $this->request['id'] ); + + $this->DB->update( 'core_sys_settings_titles', 'conf_title_count=conf_title_count-1', 'conf_title_id=' . $conf['conf_group'], false, true ); + + $this->registry->output->global_message = $this->lang->words['s_deleted']; + + $this->settingsRebuildCache(); + + $this->_settingsOverview(); + } + + + /** + * Rebuild settings cache + * + * @return void + */ + public function settingsRebuildCache() + { + $settings = array(); + + $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => 'conf_add_cache=1' ) ); + $info = $this->DB->execute(); + + while ( $r = $this->DB->fetch($info) ) + { + $value = $r['conf_value'] != "" ? $r['conf_value'] : $r['conf_default']; + + if ( $value == '{blank}' ) + { + $value = ''; + } + + $settings[ $r['conf_key'] ] = $value; + } + + $this->cache->setCache( 'settings', $settings, array( 'array' => 1 ) ); + } + + /** + * Grab all setting groups and store in an internal array + * + * @param boolean Pull all settings, not just visible ones + * @return void + */ + private function _settingsGetGroups( $ignoreInDev=false ) + { + $this->setting_groups = array(); + + if ( IN_DEV OR $ignoreInDev ) + { + $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_settings_titles', 'order' => 'conf_title_title' ) ); + $this->DB->execute(); + } + else + { + $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_settings_titles', 'where' => 'conf_title_noshow=0', 'order' => 'conf_title_title' ) ); + $this->DB->execute(); + } + + while( $r = $this->DB->fetch() ) + { + $this->setting_groups[ $r['conf_title_id'] ] = $r; + $this->setting_groups_by_key[ $r['conf_title_keyword'] ] = $r; + } + } + + /** + * Make sure all titles have keywords set + * + * @return void + */ + private function _settingsTitlesCheck() + { + //----------------------------------------- + // Get 'em + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'core_sys_settings_titles' ) ); + $outer = $this->DB->execute(); + + while( $row = $this->DB->fetch( $outer ) ) + { + if ( ! $row['conf_title_keyword'] ) + { + $new_keyword = mb_strtolower( preg_replace( "#[^\d\w]#", "", $row['conf_title_title'] ) ); + $this->DB->update( 'core_sys_settings_titles', array( 'conf_title_keyword' => $new_keyword ), 'conf_title_id='.$row['conf_title_id'] ); + } + } + } + + /** + * Import XML Settings on an app by app basis + * + * @return array Array of messages + */ + public function importAllApps() + { + $message = array(); + + /* Check for settings not needed anymore */ + $this->_loadDeleteList(); + + foreach( ipsRegistry::$applications as $app_dir => $app_data ) + { + $file = IPSLib::getAppDir( $app_dir ) . '/xml/' . $app_dir . '_settings.xml'; + + if ( file_exists( $file ) ) + { + $contents = file_get_contents( $file ); + + $return = $this->_importXML( $contents, $app_dir ); + + $message[] = $app_data['app_title'] . " " . sprintf( $this->lang->words['s_upandin'], $return['updatedCount'], $return['insertedCount'] ); + + /* In dev time stamp? */ + if ( IN_DEV ) + { + $cache = $this->caches['indev']; + $cache['import']['settings'][ $app_dir ] = time(); + $this->cache->setCache( 'indev', $cache, array( 'donow' => 1, 'array' => 1 ) ); + } + } + } + + return $message; + } + + /** + * Import XML Settings + * + * @param string XML Data + * @param string Application (should be set by XML file, however) + * @param array Array of any known settings and their values + * @return array array( 'insertedCount' => x, 'updatedCount' => x, 'updatedKeys' => array(..), 'insertedKeys' => array() ) + */ + private function _importXML( $content, $app='core', $knownSettings=array() ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $cur_settings = array(); + $updated = 0; + $inserted = 0; + $updatedKeys = array(); + $insertedKeys = array(); + $known = array(); + + //----------------------------------------- + // Get current settings. + //----------------------------------------- + + $this->DB->build( array( 'select' => 'conf_id, conf_key', + 'from' => 'core_sys_conf_settings', + 'order' => 'conf_id' ) ); + + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $cur_settings[ $r['conf_key'] ] = $r['conf_id']; + } + + //----------------------------------------- + // Get current titles + //----------------------------------------- + + $this->_settingsGetGroups( true ); + + //----------------------------------------- + // Get xml class + //----------------------------------------- + + require_once( IPS_KERNEL_PATH.'classXML.php' ); + + $xml = new classXML( IPS_DOC_CHAR_SET ); + $xml->loadXML( $content ); + + //----------------------------------------- + // Loop through and sort out settings... + //----------------------------------------- + + foreach( $xml->fetchElements('setting') as $setting ) + { + $entry = $xml->fetchElementsFromRecord( $setting ); + + //----------------------------------------- + // Is setting? + //----------------------------------------- + + if ( ! $entry['conf_is_title'] ) + { + unset( $entry['conf_is_title'] ); + unset( $entry['conf_help_key'] ); + unset( $entry['conf_id'] ); + unset( $entry['conf_end_group'] ); + $new_settings[] = $entry; + } + + //----------------------------------------- + // Is title? + //----------------------------------------- + + else + { + $new_titles[] = $entry; + } + } + + //----------------------------------------- + // Sort out titles... + //----------------------------------------- + + if ( is_array( $new_titles ) and count( $new_titles ) ) + { + foreach( $new_titles as $idx => $data ) + { + if ( $data['conf_title_title'] AND $data['conf_title_keyword'] ) + { + //----------------------------------------- + // Get ID based on key + //----------------------------------------- + + $conf_id = $this->setting_groups_by_key[ $data['conf_title_keyword'] ]['conf_title_id']; + + $save = array( 'conf_title_title' => $data['conf_title_title'], + 'conf_title_desc' => $data['conf_title_desc'], + 'conf_title_keyword' => $data['conf_title_keyword'], + 'conf_title_tab' => $data['conf_title_tab'], + 'conf_title_app' => $data['conf_title_app'] ? $data['conf_title_app'] : $app, + 'conf_title_noshow' => $data['conf_title_noshow'] ); + + //----------------------------------------- + // Not got a row, insert first! + //----------------------------------------- + + if ( ! $conf_id ) + { + $this->DB->insert( 'core_sys_settings_titles', $save ); + $conf_id = $this->DB->getInsertId(); + + } + else + { + //----------------------------------------- + // Update... + //----------------------------------------- + + $this->DB->update( 'core_sys_settings_titles', $save, 'conf_title_id='.$conf_id ); + } + + //----------------------------------------- + // Update settings cache + //----------------------------------------- + + $save['conf_title_id'] = $conf_id; + $this->setting_groups_by_key[ $save['conf_title_keyword'] ] = $save; + $this->setting_groups[ $save['conf_title_id'] ] = $save; + + //----------------------------------------- + // Remove need update... + //----------------------------------------- + + $need_update[] = $conf_id; + } + } + } + + //----------------------------------------- + // Sort out settings + //----------------------------------------- + + if ( is_array( $new_settings ) and count( $new_settings ) ) + { + foreach( $new_settings as $idx => $data ) + { + //----------------------------------------- + // Insert known + //----------------------------------------- + + $data['conf_value'] = ''; + + if( is_array($knownSettings) AND count($knownSettings) ) + { + if ( ! $data['conf_value'] AND ( in_array( $data['conf_key'], array_keys( $knownSettings ) ) ) ) + { + $data['conf_value'] = $knownSettings[ $data['conf_key'] ]; + } + } + + $data['conf_group'] = $this->setting_groups_by_key[ $data['conf_title_keyword'] ]['conf_title_id']; + + //----------------------------------------- + // Remove from array + //----------------------------------------- + + unset( $data['conf_title_keyword'] ); + + if ( $cur_settings[ $data['conf_key'] ] ) + { + //----------------------------------------- + // Don't change the setting value + //----------------------------------------- + unset( $data['conf_value'] ); + + //----------------------------------------- + // Update + //----------------------------------------- + + $this->DB->update( 'core_sys_conf_settings', $data, 'conf_id='.$cur_settings[ $data['conf_key'] ] ); + $updatedKeys[] = $data['conf_key']; + $updated++; + } + else + { + //----------------------------------------- + // INSERT + //----------------------------------------- + + $this->DB->insert( 'core_sys_conf_settings', $data ); + $insertedKeys[] = $data['conf_key']; + $inserted++; + } + } + } + + //----------------------------------------- + // Update group counts... + //----------------------------------------- + + if ( count( $need_update ) ) + { + foreach( $need_update as $i => $idx ) + { + $conf = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'core_sys_conf_settings', 'where' => 'conf_group='.$idx ) ); + + $count = intval($conf['count']); + + $this->DB->update( 'core_sys_settings_titles', array( 'conf_title_count' => $count ), 'conf_title_id='.$idx ); + } + } + + //----------------------------------------- + // Resync + //----------------------------------------- + + $this->settingsRebuildCache(); + + //----------------------------------------- + // Return + //----------------------------------------- + + return array( 'insertedCount' => $inserted, + 'updatedCount' => $updated, + 'insertedKeys' => $insertedKeys, + 'updatedKeys' => $updatedKeys ); + } + + /** + * Export all apps: Wrapper function really. Yes. It is. + * + * @return array Array of messages or errors + */ + public function exportAllApps() + { + $messages = array(); + $errors = array(); + + /* Check for settings not needed anymore */ + $this->_loadDeleteList(); + + foreach( ipsRegistry::$applications as $app_dir => $app_data ) + { + @unlink( IPSLib::getAppDir( $app_dir ) . '/xml/' . $app_dir . '_settings.xml' ); + + if ( ! file_exists( IPSLib::getAppDir( $app_dir ) . '/xml' ) ) + { + $errors[] = "Ошибка: " . IPSLib::getAppDir( $app_dir ) . "/xml/ не существует"; + continue; + } + else if ( ! IPSLib::isWritable( IPSLib::getAppDir( $app_dir ) . '/xml' ) ) + { + if ( ! @chmod( IPSLib::isWritable( IPSLib::getAppDir( $app_dir ) . '/xml', 0755 ) ) ) + { + $errors[] = "Ошибка: " . IPSLib::getAppDir( $app_dir ) . "/xml/ нет прав на запись"; + continue; + } + } + else if ( file_exists( IPSLib::getAppDir( $app_dir ) . '/xml/' . $app_dir . '_settings.xml' ) AND ! IPSLib::isWritable( IPSLib::getAppDir( $app_dir ) . '/xml/' . $app_dir . '_settings.xml' ) ) + { + $errors[] = "Ошибка: " . IPSLib::getAppDir( $app_dir ) . '/xml/' . $app_dir . "_settings.xml нет прав на запись"; + continue; + } + + $this->_exportXML( $app_dir ); + + $messages[] = "Настройки приложения " . $app_data['app_title'] . " экспортированы в директорию приложения"; + + /* In dev time stamp? */ + if ( IN_DEV ) + { + $cache = $this->caches['indev']; + $cache['import']['settings'][ $app_dir ] = time(); + $this->cache->setCache( 'indev', $cache, array( 'donow' => 1, 'array' => 1 ) ); + } + } + + return $errors ? $errors : $messages; + } + + + /** + * Export all settings to XML (IN_DEV mode) + * + * @param string Application directory + * @return boolean + */ + private function _exportXML( $app_dir='core' ) + { + //----------------------------------------- + // Get setting groups + //----------------------------------------- + + $this->_settingsGetGroups( true ); + + //----------------------------------------- + // Get xml class + //----------------------------------------- + + require_once( IPS_KERNEL_PATH.'classXML.php' ); + + $xml = new classXML( IPS_DOC_CHAR_SET ); + + $xml->newXMLDocument(); + $xml->addElement( 'settingexport' ); + $xml->addElement( 'settinggroup', 'settingexport' ); + + foreach( $this->setting_groups as $i => $roar ) + { + //----------------------------------------- + // App check? + //----------------------------------------- + + if ( $app_dir != $roar['conf_title_app'] ) + { + continue; + } + + //----------------------------------------- + // First, add in setting group title + //----------------------------------------- + + $thisconf = array( 'conf_is_title' => 1, + 'conf_title_keyword' => $roar['conf_title_keyword'], + 'conf_title_title' => $roar['conf_title_title'], + 'conf_title_desc' => $roar['conf_title_desc'], + 'conf_title_tab' => $roar['conf_title_tab'], + 'conf_title_app' => $roar['conf_title_app'] ? $roar['conf_title_app'] : $app_dir, + 'conf_title_noshow' => $roar['conf_title_noshow'] ); + + $xml->addElementAsRecord( 'settinggroup', 'setting', $thisconf ); + + //----------------------------------------- + // Get settings... + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', + 'from' => 'core_sys_conf_settings', + 'where' => "conf_group='{$roar['conf_title_id']}'", + 'order' => 'conf_position, conf_title' ) ); + + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + //----------------------------------------- + // Clean up... + //----------------------------------------- + + unset( $r['conf_value'], $r['conf_id'] ); + + $r['conf_title_keyword'] = $roar['conf_title_keyword']; + $r['conf_is_title'] = 0; + + $xml->addElementAsRecord( 'settinggroup', 'setting', $r ); + } + } + + //----------------------------------------- + // Grab the XML document + //----------------------------------------- + + $xmlData = $xml->fetchDocument(); + + //----------------------------------------- + // Attempt to write... + //----------------------------------------- + + $file = IPSLib::getAppDir( $app_dir ) . '/xml/' . $app_dir . '_settings.xml'; + + @unlink( $file ); + @file_put_contents( $file, $xmlData ); + } + + /** + * Load and parse settings delete list (IN_DEV) + * + * @return void + */ + private function _loadDeleteList() + { + if ( IN_DEV ) + { + /* Check for group settings */ + if ( file_exists( DOC_IPS_ROOT_PATH . '_deleteGroupSettings.txt' ) ) + { + $notTheseGroups = file( DOC_IPS_ROOT_PATH . '_deleteGroupSettings.txt' ); + + if ( count($notTheseGroups) ) + { + $notTheseGroups = array_map('trim', $notTheseGroups); + + $this->DB->build( array( 'select' => 'conf_title_id', 'from' => 'core_sys_settings_titles', 'where' => "conf_title_keyword IN ('" . implode("','", $notTheseGroups) . "')" ) ); + $this->DB->execute(); + + if ( $this->DB->getTotalRows() ) + { + $_deleteTheseGroups = array(); + + while( $s = $this->DB->fetch() ) + { + $_deleteTheseGroups[] = $s['conf_title_id']; + } + + if ( count($_deleteTheseGroups) ) + { + $this->DB->delete( 'core_sys_conf_settings', 'conf_group IN (' . implode(',', $_deleteTheseGroups) . ')' ); + $this->DB->delete( 'core_sys_settings_titles', "conf_title_keyword IN ('" . implode("','", $notTheseGroups) . "')" ); + } + } + } + } + + /* Check for single settings */ + if ( file_exists( DOC_IPS_ROOT_PATH . '_deleteSettings.txt' ) ) + { + $notTheseSettings = file( DOC_IPS_ROOT_PATH . '_deleteSettings.txt' ); + + if ( count($notTheseSettings) ) + { + $notTheseSettings = array_map('trim', $notTheseSettings); + + $this->DB->delete( 'core_sys_conf_settings', "conf_key IN('" . implode( "','", $notTheseSettings ) . "')" ); + } + } + } + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/tools/sharelinks.php b/upload/admin/applications/core/modules_admin/tools/sharelinks.php new file mode 100644 index 00000000..960b4b86 --- /dev/null +++ b/upload/admin/applications/core/modules_admin/tools/sharelinks.php @@ -0,0 +1,339 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Bookmarks + * Last Updated: $LastChangedDate: 2010-01-15 15:18:44 +0000 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Blog + * @link http://www.invisionpower.com + * @since 27th January 2004 + * @version $Rev: 5713 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class admin_core_tools_sharelinks extends ipsCommand +{ + /** + * Skin object + * + * @var object Skin templates + */ + private $html; + + /** + * Shortcut for url + * + * @var string URL shortcut + */ + private $form_code; + + /** + * Shortcut for url (javascript) + * + * @var string JS URL shortcut + */ + private $form_code_js; + + /** + * Main class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load Skin Template */ + $this->html = $this->registry->output->loadTemplate( 'cp_skin_tools' ); + + /* Load Language */ + $this->lang->loadLanguageFile( array( 'admin_tools' ) ); + + /* URL Bits */ + $this->html->form_code = $this->form_code = 'module=tools&section=sharelinks&'; + $this->html->form_code_js = $this->form_code_js = 'module=tools§ion=sharelinks&'; + + switch( $this->request['do'] ) + { + case 'reorder': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sharelinks_manage' ); + $this->shareLinksReorder(); + break; + + case 'delete': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sharelinks_manage' ); + $this->sharelinksDelete(); + break; + + case 'add': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sharelinks_manage' ); + $this->sharelinksForm( 'add' ); + break; + + case 'edit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sharelinks_manage' ); + $this->sharelinksForm( 'edit' ); + break; + + case 'do_add': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sharelinks_manage' ); + $this->sharelinksSave( 'add' ); + break; + + case 'do_edit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'sharelinks_manage' ); + $this->sharelinksSave( 'edit' ); + break; + + case 'index': + default: + $this->_sharelinksIndex(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Reorder + * + * @return void + */ + private function shareLinksReorder() + { + /* AJAX Class */ + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' ); + $ajax = new $classToLoad(); + + /* Check security key */ + if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) + { + $ajax->returnString( $this->lang->words['postform_badmd5'] ); + exit(); + } + + /* Save new positions */ + $position = 1; + + if( is_array( $this->request['share'] ) AND count( $this->request['share'] ) ) + { + foreach( $this->request['share'] as $this_id ) + { + $this->DB->update( 'core_share_links', array( 'share_position' => $position ), 'share_id=' . intval( $this_id ) ); + $position++; + } + } + + /* Rebuild Cache */ + $this->rebuildCache(); + + /* Done */ + $ajax->returnString( 'OK' ); + exit(); + } + + /** + * sharelinksDelete + * + * @return void + **/ + function sharelinksDelete() + { + /* ID */ + $id = intval( $this->request['share_id'] ); + + /* Remove */ + $this->DB->delete( 'core_share_links', "share_id={$id}" ); + $this->rebuildCache(); + + /* Redirect */ + $this->registry->output->global_message = $this->lang->words['sl_removed']; + $this->registry->output->silentRedirectWithMessage( "{$this->settings['base_url']}{$this->form_code}" ); + } + + /** + * sharelinksSave + * + * @param string [$type='add'] + * @return void + **/ + function sharelinksSave( $type='add' ) + { + /* INI */ + $errors = array(); + + /* Check input */ + if( ! $this->request['share_title'] ) + { + $errors[] = "
  • {$this->lang->words['sl_must_title']}"; + } + + if( ! $this->request['share_key'] ) + { + $errors[] = "
  • {$this->lang->words['sl_must_key']}"; + } + + if( count( $errors ) ) + { + $this->registry->output->html .= "

    {$this->lang->words['sl_formerror']}

      " . implode( '', $errors ) . "

    "; + $this->sharelinksForm( $type ); + return; + } + + /* Data */ + $data = array( + 'share_title' => $this->request['share_title'], + 'share_key' => $this->request['share_key'], + 'share_enabled' => $this->request['share_enabled'], + 'share_canonical' => $this->request['share_canonical'] + ); + + /* Check the type */ + if( $type == 'add' ) + { + $max = $this->DB->buildAndFetch( array( 'select' => 'MAX(share_position) as position', 'from' => 'core_share_links' ) ); + + $data['share_position'] = intval($max['position']) + 1; + + /* Insert the record */ + $this->DB->insert( 'core_share_links', $data ); + $this->rebuildCache(); + + /* All done */ + $this->registry->output->global_message = sprintf( $this->lang->words['sl_added'], $data['share_title'] ); + $this->registry->output->silentRedirectWithMessage( "{$this->settings['base_url']}{$this->form_code}" ); + } + else + { + /* ID */ + $id = intval( $this->request['id'] ); + + /* Update */ + $this->DB->update( 'core_share_links', $data, "share_id={$id}" ); + $this->rebuildCache(); + + /* Done and done */ + $this->registry->output->global_message = sprintf( $this->lang->words['sl_updated'], $data['share_title'] ); + $this->registry->output->silentRedirectWithMessage( "{$this->settings['base_url']}{$this->form_code}" ); + } + + } + + /** + * Displays the add/edit bookmark form + * + * @param string [$type='add'] + * @return void + **/ + public function sharelinksForm( $type='add' ) + { + /* Check form type */ + if( $type == 'add' ) + { + /* Strings */ + $title = $this->lang->words['sl_form_new_title']; + $button = $this->lang->words['sl_form_new_button']; + $req = 'do_add'; + + /* Data */ + $data = array( + 'share_title' => $this->request['share_title'], + 'share_key' => $this->request['share_key'], + 'share_enabled' => $this->request['share_enabled'], + 'share_canonical' => $this->request['share_canonical'] + ); + $id = 0; + } + else + { + /* Strings */ + $title = $this->lang->words['sl_form_edit_title']; + $button = $this->lang->words['sl_form_edit_button']; + $req = 'do_edit'; + + /* Data */ + $id = intval( $this->request['share_id'] ); + $data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_share_links', 'where' => "share_id={$id}" ) ); + + /* Set Defaults */ + $data['share_title'] = ( isset( $this->request['share_title'] ) && $this->request['share_title'] ) ? $this->request['share_title'] : $data['share_title']; + $data['share_key'] = ( isset( $this->request['share_key'] ) && $this->request['share_key'] ) ? $this->request['share_key'] : $data['share_key']; + $data['share_enabled'] = ( isset( $this->request['share_enabled'] ) && $this->request['share_enabled'] ) ? $this->request['share_enabled'] : $data['share_enabled']; + $data['share_canonical'] = ( isset( $this->request['share_canonical'] ) && $this->request['share_canonical'] ) ? $this->request['share_canonical'] : $data['share_canonical']; + } + + /* Form Elements */ + $form = array(); + + $form['share_title'] = $this->registry->output->formInput( 'share_title' , $data['share_title'] , 'share_title' , 50 ); + $form['share_key'] = $this->registry->output->formInput( 'share_key' , $data['share_key'] , 'share_key' , 50 ); + $form['share_enabled'] = $this->registry->output->formYesNo( 'share_enabled' , $data['share_enabled'] ); + $form['share_canonical'] = $this->registry->output->formYesNo( 'share_canonical' , $data['share_canonical'] ); + + $this->registry->output->html .= $this->html->sharelinksForm( $id, $req, $title, $button, $form ); + } + + /** + * List all the the current bookmark types + * + * @return void + **/ + private function _sharelinksIndex() + { + /* Init */ + $rows = array(); + + /* Fetch */ + $this->DB->build( array( 'select' => '*', + 'from' => 'core_share_links', + 'order' => 'share_position ASC, share_id ASC' ) ); + + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $rows[] = $r; + } + + /* End table and output */ + $this->registry->output->html .= $this->html->shareLinksIndex( $rows ); + } + + /** + * Recaches share links + * + * @return void + */ + public function rebuildCache() + { + /* INIT */ + $cache = array(); + + /* Fetch */ + $this->DB->build( array( 'select' => '*', + 'from' => 'core_share_links', + 'order' => 'share_position ASC, share_id ASC' ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $cache[ $row['share_key'] ] = $row; + } + + $this->cache->setCache( 'sharelinks', $cache, array( 'array' => 1 ) ); + } +} \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/tools/uagents.php b/upload/admin/applications/core/modules_admin/tools/uagents.php index 51e9e7df..15e33f16 100644 --- a/upload/admin/applications/core/modules_admin/tools/uagents.php +++ b/upload/admin/applications/core/modules_admin/tools/uagents.php @@ -1,390 +1,378 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_core_tools_uagents extends ipsCommand -{ - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /** - * User agent functions - * - * @access private - * @var object Skin templates - */ - private $userAgentFunctions; - - /**#@+ - * URL bits - * - * @access public - * @var string - */ - public $form_code = ''; - public $form_code_js = ''; - /**#@-*/ - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = $this->registry->output->loadTemplate('cp_skin_tools'); - - //----------------------------------------- - // Set up stuff - //----------------------------------------- - - $this->form_code = $this->html->form_code = 'module=tools&section=uagents'; - $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=uagents'; - - //----------------------------------------- - // Load lang - //----------------------------------------- - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_tools' ) ); - - //----------------------------------------- - // Load functions and cache classes - //----------------------------------------- - - require_once( IPS_ROOT_PATH . 'sources/classes/useragents/userAgentFunctions.php' ); - - $this->userAgentFunctions = new userAgentFunctions( $registry ); - - ///---------------------------------------- - // What to do... - //----------------------------------------- - - switch( $this->request['do'] ) - { - case 'list': - default: - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_manage' ); - $this->_listUagents(); - break; - case 'reorder': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_manage' ); - $this->_uagentsReorder(); - break; - case 'groupsList': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_manage' ); - $this->_listGroups(); - break; - case 'groupAdd': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_manage' ); - $this->_groupForm('add'); - break; - case 'groupEdit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_manage' ); - $this->_groupForm('edit'); - break; - case 'groupAddDo': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_manage' ); - $this->_groupSave( 'add' ); - break; - case 'groupEditDo': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_manage' ); - $this->_groupSave( 'edit' ); - break; - case 'groupRemove': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_remove' ); - $this->_groupRemove(); - break; - case 'rebuildMaster': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_manage' ); - $this->_rebuildMasterUserAgents(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Group remove - * - * @access private - * @return string HTML - */ - private function _groupRemove() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $ugroup_id = intval( $this->request['ugroup_id'] ); - - //----------------------------------------- - // Remove it... - //----------------------------------------- - - $this->userAgentFunctions->removeUserAgentGroup( $ugroup_id ); - - return $this->_listGroups(); - } - - /** - * Form Save - * - * @access private - * @param string Type of form to show (add/edit) - * @return string HTML - */ - private function _groupSave( $type ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $ugroup_id = intval( $this->request['ugroup_id'] ); - $ugroup_title = trim( $this->request['ugroup_title'] ); - $ugroupData = json_decode( $_POST['uAgentsData'], TRUE ); - - if ( ! $ugroup_title ) - { - $ugroup_title = $this->lang->words['ua_unknown'] . time(); - } - - //----------------------------------------- - // Save in function - //----------------------------------------- - - $this->userAgentFunctions->saveUserAgentGroup( $ugroup_title, $ugroupData, $ugroup_id ); - - return $this->_listGroups(); - } - - /** - * Form type - * - * @access private - * @param string Type of form to show (add/edit) - * @return void - */ - private function _groupForm( $type='' ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $ugroup_id = intval( $this->request['ugroup_id'] ); - $ugroup = array(); - $form = array(); - - //----------------------------------------- - // Get user agents - //----------------------------------------- - - $matrixAgents = $this->userAgentFunctions->fetchAgents(); - - //----------------------------------------- - // Check (please?) - //----------------------------------------- - - if ( $type == 'add' ) - { - $formcode = 'groupAddDo'; - $title = $this->lang->words['ua_addnewtitle']; - $button = $this->lang->words['ua_addnewbutton']; - } - else - { - $groups = $this->userAgentFunctions->fetchGroups(); - $ugroup = $groups[ $ugroup_id ]; - - if ( ! $ugroup['ugroup_id'] ) - { - $this->registry->getClass('output')->global_message = $this->lang->words['ua_noid']; - $this->_groupForm( $type ); - return; - } - - $formcode = 'groupEditDo'; - $title = sprintf( $this->lang->words['ua_editua'], $ugroup['ugroup_title'] ); - $button = $this->lang->words['ua_savechanges']; - } - - //----------------------------------------- - // Form elements - //----------------------------------------- - - $form['ugroup_title'] = $this->registry->getClass('output')->formInput( 'ugroup_title', $_POST['ugroup_title'] ? $_POST['ugroup_title'] : $ugroup['ugroup_title'] ); - - //----------------------------------------- - // Navvy Gation - //----------------------------------------- - - $this->registry->output->extra_nav[] = array( $this->settings['base_url'].'module=tools&section=uagents&do=groupsList', $this->lang->words['ua_nav1'] ); - $this->registry->output->extra_nav[] = array( $this->settings['base_url'].'module=tools&section=uagents&do=list', $this->lang->words['ua_nav2'] ); - - $this->registry->getClass('output')->html .= $this->html->uagents_groupForm( $form, $title, $formcode, $button, $ugroup, $matrixAgents ); - } - - /** - * List available user agent groups - * - * @access private - * @return void - */ - private function _listGroups() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $groups = array(); - - //----------------------------------------- - // Get user agents - //----------------------------------------- - - $groups = $this->userAgentFunctions->fetchGroups(); - - //----------------------------------------- - // Navvy Gation - //----------------------------------------- - - $this->registry->output->extra_nav[] = array( $this->settings['base_url'].'module=tools&section=uagents&do=groupsList', $this->lang->words['ua_nav1'] ); - $this->registry->output->extra_nav[] = array( $this->settings['base_url'].'module=tools&section=uagents&do=list', $this->lang->words['ua_nav2'] ); - - //----------------------------------------- - // Print it... - //----------------------------------------- - - $this->registry->output->html .= $this->html->uagents_listUagentGroups( $groups ); - - //----------------------------------------- - // Reset - //----------------------------------------- - - $this->request['do'] = 'groupsList'; - } - - /** - * Rebuild master user agents - * - * @access private - * @return string HTML - */ - private function _rebuildMasterUserAgents() - { - $this->userAgentFunctions->rebuildMasterUserAgents(); - - return $this->_listUagents(); - } - - /** - * List available user agents - * - * @access private - * @return void - */ - private function _listUagents() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $agents = array(); - - //----------------------------------------- - // Get user agents - //----------------------------------------- - - $matrixAgents = $this->userAgentFunctions->fetchAgents(); - - //----------------------------------------- - // Navvy Gation - //----------------------------------------- - - $this->registry->output->extra_nav[] = array( $this->settings['base_url'].'module=tools&section=uagents&do=list', $this->lang->words['ua_nav1'] ); - - //----------------------------------------- - // Print it... - //----------------------------------------- - - $this->registry->output->html .= $this->html->uagents_listUagents( $matrixAgents ); - } - - /** - * Reorder useragents - * - * @access private - * @return void - */ - private function _uagentsReorder() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - require_once( IPS_KERNEL_PATH . 'classAjax.php' ); - $ajax = new classAjax(); - - //----------------------------------------- - // Checks... - //----------------------------------------- - - if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) - { - $ajax->returnString( $this->lang->words['postform_badmd5'] ); - exit(); - } - - //----------------------------------------- - // Save new position - //----------------------------------------- - - $position = 1; - - if( is_array($this->request['uagents']) AND count($this->request['uagents']) ) - { - foreach( $this->request['uagents'] as $this_id ) - { - $this->DB->update( 'core_uagents', array( 'uagent_position' => $position ), 'uagent_id=' . $this_id ); - - $position++; - } - } - - $ajax->returnString( 'OK' ); - exit(); - } + + * Invision Power Services + * IP.Board v3.1.4 + * User agent management + * Last Updated: $Date: 2010-10-19 10:40:05 -0400 (Tue, 19 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since Who knows... + * @version $Revision: 6995 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_core_tools_uagents extends ipsCommand +{ + /** + * Skin object + * + * @var object Skin templates + */ + private $html; + + /** + * User agent functions + * + * @var object Skin templates + */ + private $userAgentFunctions; + + /**#@+ + * URL bits + * + * @var string + */ + public $form_code = ''; + public $form_code_js = ''; + /**#@-*/ + + /** + * Main class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = $this->registry->output->loadTemplate('cp_skin_tools'); + + //----------------------------------------- + // Set up stuff + //----------------------------------------- + + $this->form_code = $this->html->form_code = 'module=tools&section=uagents'; + $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=uagents'; + + //----------------------------------------- + // Load lang + //----------------------------------------- + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_tools' ) ); + + //----------------------------------------- + // Load functions and cache classes + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/useragents/userAgentFunctions.php', 'userAgentFunctions' ); + $this->userAgentFunctions = new $classToLoad( $registry ); + + ///---------------------------------------- + // What to do... + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'list': + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_manage' ); + $this->_listUagents(); + break; + case 'reorder': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_manage' ); + $this->_uagentsReorder(); + break; + case 'groupsList': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_manage' ); + $this->_listGroups(); + break; + case 'groupAdd': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_manage' ); + $this->_groupForm('add'); + break; + case 'groupEdit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_manage' ); + $this->_groupForm('edit'); + break; + case 'groupAddDo': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_manage' ); + $this->_groupSave( 'add' ); + break; + case 'groupEditDo': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_manage' ); + $this->_groupSave( 'edit' ); + break; + case 'groupRemove': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_remove' ); + $this->_groupRemove(); + break; + case 'rebuildMaster': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ua_manage' ); + $this->_rebuildMasterUserAgents(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Group remove + * + * @return string HTML + */ + private function _groupRemove() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $ugroup_id = intval( $this->request['ugroup_id'] ); + + //----------------------------------------- + // Remove it... + //----------------------------------------- + + $this->userAgentFunctions->removeUserAgentGroup( $ugroup_id ); + + return $this->_listGroups(); + } + + /** + * Form Save + * + * @param string Type of form to show (add/edit) + * @return string HTML + */ + private function _groupSave( $type ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $ugroup_id = intval( $this->request['ugroup_id'] ); + $ugroup_title = trim( $this->request['ugroup_title'] ); + $ugroupData = json_decode( $_POST['uAgentsData'], TRUE ); + + if ( ! $ugroup_title ) + { + $ugroup_title = $this->lang->words['ua_unknown'] . time(); + } + + //----------------------------------------- + // Save in function + //----------------------------------------- + + $this->userAgentFunctions->saveUserAgentGroup( $ugroup_title, $ugroupData, $ugroup_id ); + + return $this->_listGroups(); + } + + /** + * Form type + * + * @param string Type of form to show (add/edit) + * @return void + */ + private function _groupForm( $type='' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $ugroup_id = intval( $this->request['ugroup_id'] ); + $ugroup = array(); + $form = array(); + + //----------------------------------------- + // Get user agents + //----------------------------------------- + + $matrixAgents = $this->userAgentFunctions->fetchAgents(); + + //----------------------------------------- + // Check (please?) + //----------------------------------------- + + if ( $type == 'add' ) + { + $formcode = 'groupAddDo'; + $title = $this->lang->words['ua_addnewtitle']; + $button = $this->lang->words['ua_addnewbutton']; + } + else + { + $groups = $this->userAgentFunctions->fetchGroups(); + $ugroup = $groups[ $ugroup_id ]; + + if ( ! $ugroup['ugroup_id'] ) + { + $this->registry->getClass('output')->global_message = $this->lang->words['ua_noid']; + $this->_groupForm( $type ); + return; + } + + $formcode = 'groupEditDo'; + $title = sprintf( $this->lang->words['ua_editua'], $ugroup['ugroup_title'] ); + $button = $this->lang->words['ua_savechanges']; + } + + //----------------------------------------- + // Form elements + //----------------------------------------- + + $form['ugroup_title'] = $this->registry->getClass('output')->formInput( 'ugroup_title', $_POST['ugroup_title'] ? $_POST['ugroup_title'] : $ugroup['ugroup_title'] ); + + //----------------------------------------- + // Navvy Gation + //----------------------------------------- + + $this->registry->output->extra_nav[] = array( $this->settings['base_url'].'module=tools&section=uagents&do=groupsList', $this->lang->words['ua_nav1'] ); + $this->registry->output->extra_nav[] = array( $this->settings['base_url'].'module=tools&section=uagents&do=list', $this->lang->words['ua_nav2'] ); + + $this->registry->getClass('output')->html .= $this->html->uagents_groupForm( $form, $title, $formcode, $button, $ugroup, $matrixAgents ); + } + + /** + * List available user agent groups + * + * @return void + */ + private function _listGroups() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $groups = array(); + + //----------------------------------------- + // Get user agents + //----------------------------------------- + + $groups = $this->userAgentFunctions->fetchGroups(); + + //----------------------------------------- + // Navvy Gation + //----------------------------------------- + + $this->registry->output->extra_nav[] = array( $this->settings['base_url'].'module=tools&section=uagents&do=groupsList', $this->lang->words['ua_nav1'] ); + $this->registry->output->extra_nav[] = array( $this->settings['base_url'].'module=tools&section=uagents&do=list', $this->lang->words['ua_nav2'] ); + + //----------------------------------------- + // Print it... + //----------------------------------------- + + $this->registry->output->html .= $this->html->uagents_listUagentGroups( $groups ); + + //----------------------------------------- + // Reset + //----------------------------------------- + + $this->request['do'] = 'groupsList'; + } + + /** + * Rebuild master user agents + * + * @return string HTML + */ + private function _rebuildMasterUserAgents() + { + $this->userAgentFunctions->rebuildMasterUserAgents(); + + return $this->_listUagents(); + } + + /** + * List available user agents + * + * @return void + */ + private function _listUagents() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $agents = array(); + + //----------------------------------------- + // Get user agents + //----------------------------------------- + + $matrixAgents = $this->userAgentFunctions->fetchAgents(); + + //----------------------------------------- + // Navvy Gation + //----------------------------------------- + + $this->registry->output->extra_nav[] = array( $this->settings['base_url'].'module=tools&section=uagents&do=list', $this->lang->words['ua_nav1'] ); + + //----------------------------------------- + // Print it... + //----------------------------------------- + + $this->registry->output->html .= $this->html->uagents_listUagents( $matrixAgents ); + } + + /** + * Reorder useragents + * + * @return void + */ + private function _uagentsReorder() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' ); + $ajax = new $classToLoad(); + + //----------------------------------------- + // Checks... + //----------------------------------------- + + if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) + { + $ajax->returnString( $this->lang->words['postform_badmd5'] ); + exit(); + } + + //----------------------------------------- + // Save new position + //----------------------------------------- + + $position = 1; + + if( is_array($this->request['uagents']) AND count($this->request['uagents']) ) + { + foreach( $this->request['uagents'] as $this_id ) + { + $this->DB->update( 'core_uagents', array( 'uagent_position' => $position ), 'uagent_id=' . $this_id ); + + $position++; + } + } + + $ajax->returnString( 'OK' ); + exit(); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/tools/xml/index.html b/upload/admin/applications/core/modules_admin/tools/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_admin/tools/xml/index.html +++ b/upload/admin/applications/core/modules_admin/tools/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/tools/xml/menu.xml b/upload/admin/applications/core/modules_admin/tools/xml/menu.xml index 68f06dee..92a474c5 100644 --- a/upload/admin/applications/core/modules_admin/tools/xml/menu.xml +++ b/upload/admin/applications/core/modules_admin/tools/xml/menu.xml @@ -129,6 +129,34 @@ 0 - + + + Сервисы публикации ссылок + + + Сервисы публикации ссылок + sharelinks + + + 0 + + + + + Правила входящих email + + + Правила входящих email + incomingEmails + + + 0 + + + getCache('systemvars'); + return $systemvars['incomingEmails']; + ]]> +
  • \ No newline at end of file diff --git a/upload/admin/applications/core/modules_admin/tools/xml/permissions.xml b/upload/admin/applications/core/modules_admin/tools/xml/permissions.xml index 1e4c6138..1d9fded8 100644 --- a/upload/admin/applications/core/modules_admin/tools/xml/permissions.xml +++ b/upload/admin/applications/core/modules_admin/tools/xml/permissions.xml @@ -86,6 +86,15 @@
    + + Ссылки публикации + + + sharelinks_manage + Может добавлять/изменять/удалять ссылки? + + + User Agents diff --git a/upload/admin/applications/core/modules_public/ajax/captcha.php b/upload/admin/applications/core/modules_public/ajax/captcha.php index f555e329..6dcbd9ec 100644 --- a/upload/admin/applications/core/modules_public/ajax/captcha.php +++ b/upload/admin/applications/core/modules_public/ajax/captcha.php @@ -1,62 +1,64 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_core_ajax_captcha extends ipsAjaxCommand -{ - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - switch( ipsRegistry::$request['do'] ) - { - default: - case 'refresh': - $this->refresh(); - break; - - } - } - - /** - * Refresh the captcha image - * - * @access public - * @return void [Outputs to screen] - */ - public function refresh() - { - $captcha_unique_id = trim( IPSText::alphanumericalClean( ipsRegistry::$request['captcha_unique_id'] ) ); - - $template = $this->registry->getClass('class_captcha')->getTemplate( $captcha_unique_id ); - $newUniqueID = $this->registry->getClass('class_captcha')->captchaKey; - - $this->returnString( $newUniqueID ); - } - + + * Invision Power Services + * IP.Board v3.1.4 + * Update captcha image + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 2.3 + * @version $Revision: 5713 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_ajax_captcha extends ipsAjaxCommand +{ + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + switch( ipsRegistry::$request['do'] ) + { + default: + case 'refresh': + $this->refresh(); + break; + + } + } + + /** + * Refresh the captcha image + * + * @access public + * @return void [Outputs to screen] + */ + public function refresh() + { + $captcha_unique_id = trim( IPSText::alphanumericalClean( ipsRegistry::$request['captcha_unique_id'] ) ); + + $template = $this->registry->getClass('class_captcha')->getTemplate( $captcha_unique_id ); + $newUniqueID = $this->registry->getClass('class_captcha')->captchaKey; + + $this->returnString( $newUniqueID ); + } + } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/ajax/comments.php b/upload/admin/applications/core/modules_public/ajax/comments.php new file mode 100644 index 00000000..4bcf386e --- /dev/null +++ b/upload/admin/applications/core/modules_public/ajax/comments.php @@ -0,0 +1,242 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Image Ajax + * Last Updated: $LastChangedDate: 2010-08-18 16:55:30 +0100 (Wed, 18 Aug 2010) $ + * + * + * @author $Author: matt $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Gallery + * @link http://www.invisionpower.com + * @version $Rev: 6767 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_ajax_comments extends ipsAjaxCommand +{ + /** + * Main class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + /* From App */ + $fromApp = trim( $this->request['fromApp'] ); + + /* Init some data */ + require_once( IPS_ROOT_PATH . 'sources/classes/comments/bootstrap.php' ); + $this->_comments = classes_comments_bootstrap::controller( $fromApp ); + + /* What to do? */ + switch( $this->request['do'] ) + { + case 'add': + $this->_add(); + break; + case 'delete': + $this->_delete(); + break; + case 'showEdit': + $this->_showEdit(); + break; + case 'saveEdit': + $this->_saveEdit(); + break; + case 'fetchReply': + $this->_fetchReply(); + break; + case 'moderate': + $this->_moderate(); + break; + } + } + + /** + * Moderate + * + * @return void + */ + protected function _moderate() + { + $parentId = intval( $this->request['parentId'] ); + $commentIds = ( is_array( $_POST['commentIds'] ) ) ? IPSLib::cleanIntArray( $_POST['commentIds'] ) : array(); + $modact = trim( $this->request['modact'] ); + + if ( count( $commentIds ) ) + { + try + { + $this->_comments->moderate( $modact, $parentId, $commentIds, $this->memberData ); + + $this->returnJsonArray( array( 'msg' => 'ok' ) ); + } + catch( Exception $error ) + { + $this->returnJsonError( 'Error ' . $error->getMessage() . ' line: ' . $error->getFile() . '.' . $error->getLine() ); + } + } + } + + /** + * Reply + * + * @return void + */ + protected function _fetchReply() + { + /* INIT */ + $commentId = intval( $this->request['comment_id'] ); + $parentId = intval( $this->request['parentId'] ); + + /* Quick error checko */ + if ( ! $commentId OR ! $parentId ) + { + $this->returnString( 'error' ); + } + + # Get Edit form + try + { + $html = $this->_comments->fetchReply( $parentId, $commentId, $this->memberData ); + + $this->returnString( $html ); + } + catch ( Exception $error ) + { + $this->returnString( 'Error ' . $error->getMessage() ); + } + } + + + /** + * Deletes a comment + * + * @return void + */ + protected function _delete() + { + /* INIT */ + $commentId = intval( $this->request['comment_id'] ); + $parentId = intval( $this->request['parentId'] ); + + /* Quick error checko */ + if ( ! $commentId OR ! $parentId ) + { + $this->returnJsonError( 'error' ); + } + + try + { + $this->_comments->delete( $parentId, $commentId, $this->memberData ); + + $this->returnJsonArray( array( 'msg' => 'ok' ) ); + } + catch ( Exception $error ) + { + $this->returnJsonError( 'Error ' . $error->getMessage() ); + } + } + + /** + * Shows the edit box + * + * @return void + */ + protected function _showEdit() + { + /* INIT */ + $commentId = intval( $this->request['comment_id'] ); + $parentId = intval( $this->request['parentId'] ); + + /* Quick error checko */ + if ( ! $commentId OR ! $parentId ) + { + $this->returnString( 'error' ); + } + + # Get Edit form + try + { + $html = $this->_comments->displayAjaxEditForm( $parentId, $commentId, $this->memberData ); + + $html = $this->registry->output->replaceMacros( $html ); + + $this->returnHtml( $html ); + } + catch ( Exception $error ) + { + $this->returnString( 'Error ' . $error->getMessage() ); + } + } + + /** + * Saves the post + * + * @return void + */ + protected function _saveEdit() + { + /* INIT */ + $commentId = intval( $this->request['comment_id'] ); + $parentId = intval( $this->request['parentId'] ); + $post = IPSText::parseCleanValue( $_POST['Post'] ); + + /* Quick error checko */ + if ( ! $parentId OR ! $commentId ) + { + $this->returnString( 'error' ); + } + + /* Edit */ + try + { + $output = $this->_comments->edit( $parentId, $commentId, $_POST['Post'], $this->memberData ); + + $this->returnJsonArray( array( 'successString' => $this->registry->output->replaceMacros( $output ) ) ); + } + catch ( Exception $error ) + { + $this->returnJsonError( $error->getMessage() ); + } + } + + /** + * Add a comment via the magic and mystery of ajax + * + * @return void + */ + protected function _add() + { + /* init */ + $post = IPSText::parseCleanValue( $_POST['Post'] ); + $parentId = intval( $this->request['parentId'] ); + + if ( $post AND $parentId ) + { + try + { + $newCommentId = $this->_comments->add( $parentId, $_POST['Post'] ); + return $this->returnHtml( $this->_comments->fetchFormattedSingle( $parentId, $newCommentId ) ); + } + catch( Exception $e ) + { + $this->returnJsonError( 'no_permission: ' . $e->getMessage() . var_export( $e, true ) ); + } + } + else + { + $this->returnJsonError( 'no_permission'); + } + } +} \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/ajax/defaultSection.php b/upload/admin/applications/core/modules_public/ajax/defaultSection.php index 624172f8..053d4be8 100644 --- a/upload/admin/applications/core/modules_public/ajax/defaultSection.php +++ b/upload/admin/applications/core/modules_public/ajax/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default ajax section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_public/ajax/editor.php b/upload/admin/applications/core/modules_public/ajax/editor.php deleted file mode 100644 index e5a5acec..00000000 --- a/upload/admin/applications/core/modules_public/ajax/editor.php +++ /dev/null @@ -1,154 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_core_ajax_editor extends ipsAjaxCommand -{ - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $to_rte = intval( $this->request['to_rte'] ); - $post = $this->convertUnicode( $_POST['Post'] ); - $post = IPSText::stripslashes($post); - //$post = $this->convertHtmlEntities( $post ); - - //----------------------------------------- - // Load BBCode - //----------------------------------------- - - require_once( IPS_ROOT_PATH . 'sources/classes/bbcode/core.php' ); - require_once( IPS_ROOT_PATH . 'sources/classes/bbcode/normal.php' ); - - $bbcode = new class_bbcode_normal( $this->registry ); - $bbcode->parse_bbcode = 1; - $bbcode->parse_html = 0; - $bbcode->parse_nl2br = 1; - $bbcode->parse_smilies = 1; - $bbcode->parsing_section = 'topics'; - - //----------------------------------------- - // Converting from STD to RTE? - //----------------------------------------- - - if ( $to_rte ) - { - //----------------------------------------- - // Ensure no slashy slashy - //----------------------------------------- - - $post = str_replace( '"','"', $post ); - $post = str_replace( "'",''', $post ); - - //----------------------------------------- - // Convert <> - //----------------------------------------- - - $post = str_replace( '<', '<', $post ); - $post = str_replace( '>', '>', $post ); - - $post = $bbcode->convertForRTE( $bbcode->preDbParse( $post ) ); - - //----------------------------------------- - // Convert <> - //----------------------------------------- - - $post = str_replace( '<', '<', $post ); - $post = str_replace( '>', '>', $post ); - - //----------------------------------------- - // Fix up... - //----------------------------------------- - - $post = $this->registry->output->replaceMacros( $post ); - - //----------------------------------------- - // Make sure no nasty HTML entities show - //----------------------------------------- - - $post = IPSText::htmlspecialchars( $post ); - } - //----------------------------------------- - // Converting from RTE to STD - //----------------------------------------- - - else - { - require_once( IPS_ROOT_PATH . 'sources/classes/editor/class_editor.php' ); - require_once( IPS_ROOT_PATH . 'sources/classes/editor/class_editor_rte.php' ); - - //----------------------------------------- - // Ok, now, apparently, for SOME reason, IE - // strips SOME comments but not others... - // this causes font/span stuff to break. - // Let's just strip all the comments - //----------------------------------------- - - if ( $this->member->browser['browser'] == "ie" OR $this->member->browser['browser'] == "opera" ) - { - $post = preg_replace( "#<\!--(.*?)-->#is", "" , $post ); - } - - //----------------------------------------- - // IE has this thing where [center]text[/center] - // Becomes [b][center][b]text[/b][/center][/b] - //----------------------------------------- - - $rte = new class_editor_module( $this->registry ); - $post = $bbcode->preEditParse( $post ); - $post = $rte->processAfterForm( $post ); - - //----------------------------------------- - // Fix up... - //----------------------------------------- - - $post = preg_replace( "/
    |
    /", "\n", $post ); - } - - //----------------------------------------- - // Member? Store choice... - //----------------------------------------- - - if ( $this->memberData['member_id'] ) - { - $_choice = ( $to_rte ) ? 'rte' : 'std'; - - IPSMember::save( $this->memberData['member_id'], array( 'members' => array( 'members_editor_choice' => $_choice ) ) ); - } - - $post = trim( html_entity_decode($post) ); - - $this->returnHtml( $post ); - } -} \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/ajax/facebook.php b/upload/admin/applications/core/modules_public/ajax/facebook.php index 44b8a4d2..ebd8d57f 100644 --- a/upload/admin/applications/core/modules_public/ajax/facebook.php +++ b/upload/admin/applications/core/modules_public/ajax/facebook.php @@ -1,116 +1,97 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_core_ajax_facebook extends ipsAjaxCommand -{ - /** - * Login handler object - * - * @access protected - * @var object - */ - protected $han_login; - - /** - * Flag : Logged in - * - * @access protected - * @var boolean - */ - protected $logged_in = false; - - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - /* What to do */ - switch( $this->request['do'] ) - { - case 'getUserByFbId': - $return = $this->_getUserByFbId(); - break; - case 'setAllowEmailAccess': - $return = $this->_setAllowEmailAccess(); - break; - } - - /* Output */ - $this->returnHtml( $return ); - } - - /** - * Allow facebook email access set - * - * @access private - * @return void [Outputs JSON to browser AJAX call] - */ - private function _setAllowEmailAccess() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $memberID = intval( $this->memberData['member_id'] ); - - IPSMember::update( $memberID, array( 'core' => array( 'fb_emailallow' => 1 ) ) ); - - $this->returnJsonArray( array( 'status' => 'ok' ) ); - } - - /** - * Main AJAX log in routine - * - * @access private - * @return void [Outputs JSON to browser AJAX call] - */ - private function _getUserByFbId() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $fbUid = is_numeric( $this->request['fbid'] ) ? $this->request['fbid'] : 0; - $member = array( 'member_id' => 0 ); - - if ( $fbUid ) - { - $_mid = $this->DB->buildAndFetch( array( 'select' => 'member_id', - 'from' => 'members', - 'where' => 'fb_uid=' . $fbUid ) ); - - if ( $_mid['member_id'] ) - { - $member = IPSMember::load( $_mid['member_id'], 'all' ); - } - } - - $this->returnJsonArray( $member ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Login handler abstraction : AJAX login + * Last Updated: $Date: 2010-01-25 11:58:04 -0500 (Mon, 25 Jan 2010) $ + * + * + * @author $Author: matt $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since Tuesday 1st March 2005 (11:52) + * @version $Revision: 5747 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_ajax_facebook extends ipsAjaxCommand +{ + /** + * Login handler object + * + * @access protected + * @var object + */ + protected $han_login; + + /** + * Flag : Logged in + * + * @access protected + * @var boolean + */ + protected $logged_in = false; + + /** + * Class entry point + * + * @access public + * @param object Registry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + /* What to do */ + switch( $this->request['do'] ) + { + case 'getUserByFbId': + $return = $this->_getUserByFbId(); + break; + } + + /* Output */ + $this->returnHtml( $return ); + } + + + /** + * Main AJAX log in routine + * + * @access private + * @return void [Outputs JSON to browser AJAX call] + */ + private function _getUserByFbId() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $fbUid = is_numeric( $this->request['fbid'] ) ? $this->request['fbid'] : 0; + $member = array( 'member_id' => 0 ); + + if ( $fbUid ) + { + $_mid = $this->DB->buildAndFetch( array( 'select' => 'member_id', + 'from' => 'members', + 'where' => 'fb_uid=' . $fbUid ) ); + + if ( $_mid['member_id'] ) + { + $member = IPSMember::load( $_mid['member_id'], 'all' ); + } + } + + $this->returnJsonArray( $member ); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/ajax/findnames.php b/upload/admin/applications/core/modules_public/ajax/findnames.php index cf9222c3..3f024d3e 100644 --- a/upload/admin/applications/core/modules_public/ajax/findnames.php +++ b/upload/admin/applications/core/modules_public/ajax/findnames.php @@ -1,108 +1,111 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_core_ajax_findnames extends ipsAjaxCommand -{ - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return 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 - * - * @access private - * @return void Outputs to screen - */ - private function _getMemberNames() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $name = $this->convertAndMakeSafe( ipsRegistry::$request['name'], 0 ); - - //----------------------------------------- - // 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() ) - { - $photo = IPSMember::buildProfilePhoto( $r ); - $group = IPSLib::makeNameFormatted( '' , $r['member_group_id'] ); - $return[ $r['member_id'] ] = array( 'name' => $r['members_display_name'], - 'showas'=> '' . $r['members_display_name'] . ' (' . $group . ')', - 'img' => $photo['pp_thumb_photo'], - 'img_w' => $photo['pp_mini_width'], - 'img_h' => $photo['pp_mini_height'] - ); - } - - $this->returnJsonArray( $return ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Login handler abstraction : AJAX Find Names functions + * Last Updated: $Date: 2010-04-14 19:25:27 -0400 (Wed, 14 Apr 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since Tuesday 1st March 2005 (11:52) + * @version $Revision: 6118 $ + * @see admin_core_ajax_findnames + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_ajax_findnames extends ipsAjaxCommand +{ + /** + * Class entry point + * + * @access public + * @param object Registry reference + * @return 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 + * + * @access private + * @return void Outputs to screen + */ + private function _getMemberNames() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $name = IPSText::convertUnicode( $this->convertAndMakeSafe( ipsRegistry::$request['name'], 0 ) ); + + //----------------------------------------- + // 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() ) + { + $photo = IPSMember::buildProfilePhoto( $r ); + $group = IPSLib::makeNameFormatted( '' , $r['member_group_id'] ); + $return[ $r['member_id'] ] = array( 'name' => $r['members_display_name'], + 'showas'=> '' . $r['members_display_name'] . ' (' . $group . ')', + 'img' => $photo['pp_thumb_photo'], + 'img_w' => $photo['pp_mini_width'], + 'img_h' => $photo['pp_mini_height'] + ); + } + + $this->returnJsonArray( $return ); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/ajax/index.html b/upload/admin/applications/core/modules_public/ajax/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_public/ajax/index.html +++ b/upload/admin/applications/core/modules_public/ajax/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/ajax/like.php b/upload/admin/applications/core/modules_public/ajax/like.php new file mode 100644 index 00000000..6ff65489 --- /dev/null +++ b/upload/admin/applications/core/modules_public/ajax/like.php @@ -0,0 +1,151 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Like Ajax + * Last Updated: $LastChangedDate: 2010-08-18 16:55:30 +0100 (Wed, 18 Aug 2010) $ + * + * + * @author $Author: matt $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Gallery + * @link http://www.invisionpower.com + * @version $Rev: 6767 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_ajax_like extends ipsAjaxCommand +{ + /** + * Main class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + /* From App */ + $app = trim( $this->request['f_app'] ); + $area = trim( $this->request['f_area'] ); + $relid = intval( $this->request['f_relid'] ); + + if ( ! $app OR ! $area OR empty( $relid ) ) + { + trigger_error( "Missing data in " . __FILE__ . ' ' . __LINE__ ); + } + + /* Init some data */ + require_once( IPS_ROOT_PATH . 'sources/classes/like/composite.php' ); + $this->_like = classes_like::bootstrap( $app, $area ); + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_like' ), 'core' ); + + /* What to do? */ + switch( $this->request['do'] ) + { + case 'setDialogue': + $this->_setDialogue( $app, $area, $relid ); + break; + case 'save': + $this->_save( $app, $area, $relid ); + break; + case 'unset': + $this->_unset( $app, $area, $relid ); + break; + case 'more': + $this->_more( $app, $area, $relid ); + break; + } + } + + /** + * Show more dialogue + * + * @param string App + * @param string Area + * @param int Relationship ID + * @return void + */ + protected function _more( $app, $area, $relid ) + { + /* Fetch data */ + return $this->returnHtml( $this->_like->render( 'more', $relid ) ); + } + + /** + * Do unset + * + * @param string App + * @param string Area + * @param int Relationship ID + * @return void + */ + protected function _unset( $app, $area, $relid ) + { + if( !$this->memberData['member_id'] ) + { + return $this->returnNull(); + } + + /* Set data */ + $this->_like->remove( $relid, $this->memberData['member_id'] ); + + /* Fetch data */ + return $this->returnHtml( $this->_like->render( 'summary', $relid ) ); + } + + /** + * Save form + * + * @param string App + * @param string Area + * @param int Relationship ID + * @return void + */ + protected function _save( $app, $area, $relid ) + { + if( !$this->memberData['member_id'] ) + { + return $this->returnNull(); + } + + $like_notify = intval( $this->request['like_notify'] ); + $like_freq = trim( $this->request['like_freq'] ); + $like_anon = intval( $this->request['like_anon'] ); + + /* Set data */ + $this->_like->add( $relid, $this->memberData['member_id'], array( 'like_notify_do' => $like_notify, 'like_notify_freq' => $like_freq ), $like_anon ); + + /* Fetch data */ + return $this->returnHtml( $this->_like->render( 'summary', $relid ) ); + } + + /** + * Show set form + * + * @param string App + * @param string Area + * @param int Relationship ID + * @return void + */ + protected function _setDialogue( $app, $area, $relid ) + { + if( !$this->memberData['member_id'] ) + { + return $this->returnNull(); + } + + $data = $this->_like->getDataForSetDialogue( $relid ); + + return $this->returnHtml( $this->registry->getClass('output')->getTemplate('global_other')->likeSetDialogue( $app, $area, $relid, $data ) ); + } + +} diff --git a/upload/admin/applications/core/modules_public/ajax/login.php b/upload/admin/applications/core/modules_public/ajax/login.php index 96050fb3..670c9292 100644 --- a/upload/admin/applications/core/modules_public/ajax/login.php +++ b/upload/admin/applications/core/modules_public/ajax/login.php @@ -1,144 +1,139 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_core_ajax_login extends ipsAjaxCommand -{ - /** - * Login handler object - * - * @access protected - * @var object - */ - protected $han_login; - - /** - * Flag : Logged in - * - * @access protected - * @var boolean - */ - protected $logged_in = false; - - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load handler... - //----------------------------------------- - - require_once( IPS_ROOT_PATH . 'sources/handlers/han_login.php' ); - $this->han_login = new han_login( $this->registry ); - $this->han_login->init(); - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_login' ), 'core' ); - - //----------------------------------------- - // Show form or process login? - //----------------------------------------- - - if ( $this->request['do'] == 'showForm' ) - { - $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]; - } - - $this->returnHtml( $this->registry->getClass('output')->getTemplate('global')->loginForm( $replace == 'replace' ? true : false, $data ) ); - } - else if ( $this->request['do'] == 'authenticateUser' ) - { - return $this->_authenticateUser(); - } - else - { - return $this->_doLogIn(); - } - } - - /** - * Authenticate a user, returns a JSON array - * - * @access private - * @return void [Outputs JSON to browser AJAX call] - */ - private function _authenticateUser() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $email = $this->request['emailaddress']; - $password = $this->request['password']; - - /* Force email check */ - $this->han_login->setForceEmailCheck( TRUE ); - - $return = $this->han_login->loginPasswordCheck( '', $email, $password ); - - if ( $return !== TRUE ) - { - $this->returnJsonArray( array( 'status' => 'error' ) ); - } - else - { - $this->returnJsonArray( array( 'status' => 'ok', 'memberData' => $this->han_login->member_data ) ); - } - } - - /** - * Main AJAX log in routine - * - * @access private - * @return void [Outputs JSON to browser AJAX call] - */ - private function _doLogIn() - { - //----------------------------------------- - // Use central method - //----------------------------------------- - - $return = $this->han_login->verifyLogin(); - - if( is_array($return[2]) AND count($return[2]) ) - { - $this->returnJsonArray( array( 'error' => $return[2]['MSG'] ) ); - } - else - { - $this->returnJsonArray( array( 'message' => $return[0], 'url' => $return[1] ) ); - } - } + + * Invision Power Services + * IP.Board v3.1.4 + * Login handler abstraction : AJAX login + * Last Updated: $Date: 2010-10-19 10:40:05 -0400 (Tue, 19 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since Tuesday 1st March 2005 (11:52) + * @version $Revision: 6995 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_ajax_login extends ipsAjaxCommand +{ + /** + * Login handler object + * + * @var object + */ + protected $han_login; + + /** + * Flag : Logged in + * + * @var boolean + */ + protected $logged_in = false; + + /** + * Class entry point + * + * @param object Registry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load handler... + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $this->han_login = new $classToLoad( $this->registry ); + $this->han_login->init(); + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_login' ), 'core' ); + + //----------------------------------------- + // Show form or process login? + //----------------------------------------- + + if ( $this->request['do'] == 'showForm' ) + { + $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]; + } + + $this->returnHtml( $this->registry->getClass('output')->getTemplate('global')->loginForm( $replace == 'replace' ? true : false, $data ) ); + } + else if ( $this->request['do'] == 'authenticateUser' ) + { + return $this->_authenticateUser(); + } + else + { + return $this->_doLogIn(); + } + } + + /** + * Authenticate a user, returns a JSON array + * + * @return void [Outputs JSON to browser AJAX call] + */ + private function _authenticateUser() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $email = $this->request['emailaddress']; + $password = $this->request['password']; + + /* Force email check */ + $this->han_login->setForceEmailCheck( TRUE ); + + $return = $this->han_login->loginPasswordCheck( '', $email, $password ); + + if ( $return !== TRUE ) + { + $this->returnJsonArray( array( 'status' => 'error' ) ); + } + else + { + $this->returnJsonArray( array( 'status' => 'ok', 'memberData' => $this->han_login->member_data ) ); + } + } + + /** + * Main AJAX log in routine + * + * @return void [Outputs JSON to browser AJAX call] + */ + private function _doLogIn() + { + //----------------------------------------- + // Use central method + //----------------------------------------- + + $return = $this->han_login->verifyLogin(); + + if( is_array($return[2]) AND count($return[2]) ) + { + $this->returnJsonArray( array( 'error' => $return[2]['MSG'] ) ); + } + else + { + $this->returnJsonArray( array( 'message' => $return[0], 'url' => $return[1] ) ); + } + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/ajax/notifications.php b/upload/admin/applications/core/modules_public/ajax/notifications.php new file mode 100644 index 00000000..bae41893 --- /dev/null +++ b/upload/admin/applications/core/modules_public/ajax/notifications.php @@ -0,0 +1,180 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Notification AJAX methods + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since Tuesday 1st March 2005 (11:52) + * @version $Revision: 5713 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_ajax_notifications extends ipsAjaxCommand +{ + /** + * Class entry point + * + * @access public + * @param object Registry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + switch( $this->request['do'] ) + { + case 'getlatest': + default: + $this->getMyNotifications(); + break; + + case 'getNextNotification': + $this->getMoreNotifications( 'DESC' ); + break; + + case 'getLastNotification': + $this->getMoreNotifications( 'ASC' ); + break; + } + } + + /** + * Retrieve next notification for user + * + * @access protected + * @param string Database order (asc/desc) + * @return void [Outputs JSON to browser AJAX call] + */ + protected function getMoreNotifications( $dir='DESC' ) + { + //----------------------------------------- + // We logged in? + //----------------------------------------- + + if( !$this->memberData['member_id'] ) + { + $this->returnJsonError( $this->lang->words['notifylogin_error'] ); + } + + //----------------------------------------- + // Retrieve notifications + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' ); + $notifyLibrary = new $classToLoad( $this->registry ); + $notifyLibrary->setMember( $this->memberData ); + + $_data = $notifyLibrary->fetchUnreadNotifications( 50, 'notify_sent', $dir ); + + //----------------------------------------- + // Now we loop through and set has previous, + // has more, and get "next" notification + //----------------------------------------- + + $_hasPrevious = false; + $_hasNext = false; + $_hitId = false; + $_gotNext = false; + $_thisNotify = array(); + + foreach( $_data as $k => $v ) + { + if( !$_hitId ) + { + if( $v['notify_id'] == $this->request['last'] ) + { + $_hitId = true; + } + + $_hasPrevious = true; + continue; + } + + if( !$_gotNext ) + { + $_gotNext = true; + $_thisNotify = $v; + continue; + } + + $_hasNext = true; + break; + } + + if( count($_thisNotify) ) + { + $_thisNotify['notify_date_formatted'] = $this->registry->class_localization->getDate( $_thisNotify['notify_sent'], 'short' ); + + $_thisNotify['has_more'] = $_hasNext; + $_thisNotify['has_previous'] = $_hasPrevious; + } + else + { + $_thisNotify['error'] = $this->lang->words['nomore_notifications_4u']; + } + + if( !$_thisNotify['notify_url'] ) + { + $_thisNotify['notify_url'] = $this->registry->output->buildSEOUrl( "app=core&module=usercp&area=viewNotification&do=view&view={$_thisNotify['notify_id']}", 'public' ); + } + + $this->returnJsonArray( $_thisNotify ); + } + + /** + * Retrieve user's last x notifications + * + * @access protected + * @return void [Outputs JSON to browser AJAX call] + */ + protected function getMyNotifications() + { + //----------------------------------------- + // We logged in? + //----------------------------------------- + + if( !$this->memberData['member_id'] ) + { + $this->returnJsonError( $this->lang->words['notifylogin_error'] ); + } + + //----------------------------------------- + // Retrieve notifications + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' ); + $notifyLibrary = new $classToLoad( $this->registry ); + $notifyLibrary->setMember( $this->memberData ); + + $_data = $notifyLibrary->fetchUnreadNotifications( 10, 'notify_sent', 'DESC', false ); + + //----------------------------------------- + // Now mark them all read + //----------------------------------------- + + $this->DB->update( 'inline_notifications', array( 'notify_read' => 1 ), 'notify_to_id=' . $this->memberData['member_id'] ); + + $notifyLibrary->rebuildUnreadCount(); + + //----------------------------------------- + // Return results + //----------------------------------------- + + $this->returnJsonArray( array( 'html' => $this->registry->output->getTemplate('global_other')->notificationsList( $_data ) ) ); + } +} \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/ajax/register.php b/upload/admin/applications/core/modules_public/ajax/register.php index 33bce4e2..78561048 100644 --- a/upload/admin/applications/core/modules_public/ajax/register.php +++ b/upload/admin/applications/core/modules_public/ajax/register.php @@ -1,183 +1,194 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_core_ajax_register extends ipsAjaxCommand -{ - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - switch( ipsRegistry::$request['do'] ) - { - case 'check-display-name': - $this->checkDisplayName( 'members_display_name' ); - break; - case 'check-user-name': - $this->checkDisplayName( 'name' ); - break; - case 'check-email-address': - $this->checkEmail(); - break; - } - } - - /** - * Check the email address - * - * @access public - * @return void [Outputs to screen] - */ - public function checkEmail() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $email = ''; - - if( is_string($_REQUEST['email']) ) - { - $email = mb_strtolower( IPSText::parseCleanValue( rawurldecode( $_REQUEST['email'] ) ) ); - } - - if( !$email ) - { - $this->returnString('found'); - } - - if( !IPSText::checkEmailAddress( $email ) ) - { - $this->returnString('found'); - } - - //----------------------------------------- - // Got the member? - //----------------------------------------- - - if ( ! IPSMember::checkByEmail( $email ) ) - { - //----------------------------------------- - // Load ban filters - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'banfilters' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $banfilters[ $r['ban_type'] ][] = $r['ban_content']; - } - - //----------------------------------------- - // Are they banned [EMAIL]? - //----------------------------------------- - - if ( is_array( $banfilters['email'] ) and count( $banfilters['email'] ) ) - { - foreach ( $banfilters['email'] as $memail ) - { - $memail = str_replace( "\*", '.*' , preg_quote($memail, "/") ); - - if ( preg_match( "/$memail/", $email ) ) - { - $this->returnString('banned'); - break; - } - } - } - - //----------------------------------------- - // Load handler... - //----------------------------------------- - - require_once( IPS_ROOT_PATH . 'sources/handlers/han_login.php' ); - $han_login = new han_login( $this->registry ); - $han_login->init(); - - if( $han_login->emailExistsCheck( $email ) ) - { - $this->returnString('found'); - } - - $this->returnString('notfound'); - } - else - { - $this->returnString('found'); - } - } - - /** - * Check the name or display name - * - * @access public - * @return void [Outputs to screen] - */ - public function checkDisplayName( $field='members_display_name' ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $this->registry->class_localization->loadLanguageFile( array( 'public_register' ) ); - $name = ''; - - if( is_string($_POST['name']) ) - { - $name = mb_strtolower( trim( rawurldecode( $_POST['name'] ) ) ); - } - - if( !$name ) - { - $this->returnString( sprintf( ipsRegistry::getClass( 'class_localization' )->words['reg_error_no_name'], ipsRegistry::$settings['max_user_name_length'] ) ); - } - - /* Check the username */ - $user_check = IPSMember::getFunction()->cleanAndCheckName( $name, array(), $field ); - - $errorField = $field == 'members_display_name' ? 'dname' : 'username'; - $nameField = $field == 'members_display_name' ? 'members_display_name' : 'username'; - - if( is_array( $user_check['errors'][ $errorField ] ) && count( $user_check['errors'][ $errorField ] ) ) - { - $this->returnString( $user_check['errors'][ $errorField ][0] ); - return; - } - else if( $user_check['errors'][ $errorField ] ) - { - $this->returnString( $user_check['errors'][ $errorField ] ); - } - else - { - $this->returnString('notfound'); - } - - } - + + * Invision Power Services + * IP.Board v3.1.4 + * Registration AJAX routines + * Last Updated: $Date: 2010-10-19 10:40:05 -0400 (Tue, 19 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since Who knows... + * @version $Revision: 6995 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_ajax_register extends ipsAjaxCommand +{ + /** + * Main class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + switch( ipsRegistry::$request['do'] ) + { + case 'check-display-name': + $this->checkDisplayName( 'members_display_name' ); + break; + case 'check-user-name': + $this->checkDisplayName( 'name' ); + break; + case 'check-email-address': + $this->checkEmail(); + break; + } + } + + /** + * Check the email address + * + * @return void [Outputs to screen] + */ + public function checkEmail() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $email = ''; + $banfilters = array(); + + if( is_string($_REQUEST['email']) ) + { + $email = mb_strtolower( IPSText::parseCleanValue( rawurldecode( $_REQUEST['email'] ) ) ); + } + + if( !$email ) + { + $this->returnString('found'); + } + + if( !IPSText::checkEmailAddress( $email ) ) + { + $this->returnString('found'); + } + + //----------------------------------------- + // Got the member? + //----------------------------------------- + + if ( ! IPSMember::checkByEmail( $email ) ) + { + //----------------------------------------- + // Load ban filters + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'banfilters' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $banfilters[ $r['ban_type'] ][] = $r['ban_content']; + } + + //----------------------------------------- + // Are they banned [EMAIL]? + //----------------------------------------- + + if ( is_array( $banfilters['email'] ) and count( $banfilters['email'] ) ) + { + foreach ( $banfilters['email'] as $memail ) + { + $memail = str_replace( "*", '.*' , preg_quote($memail, "/") ); + + if ( preg_match( "/^{$memail}$/", $email ) ) + { + $this->returnString('banned'); + break; + } + } + } + + //----------------------------------------- + // Load handler... + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $han_login = new $classToLoad( $this->registry ); + $han_login->init(); + + if( $han_login->emailExistsCheck( $email ) ) + { + $this->returnString('found'); + } + + $this->returnString('notfound'); + } + else + { + $this->returnString('found'); + } + } + + /** + * Check the name or display name + * + * @return void [Outputs to screen] + */ + public function checkDisplayName( $field='members_display_name' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $this->registry->class_localization->loadLanguageFile( array( 'public_register' ) ); + $name = ''; + $member = array(); + + if( is_string($_POST['name']) ) + { + $name = mb_strtolower( trim( rawurldecode( $_POST['name'] ) ) ); + } + + if( !$name ) + { + $this->returnString( sprintf( ipsRegistry::getClass( 'class_localization' )->words['reg_error_no_name'], ipsRegistry::$settings['max_user_name_length'] ) ); + } + + /* Bug where Twitter sets a username but you can't use it when you try and sign up with a new account using username as display name */ + if ( ! $this->memberData['member_id'] AND $this->request['mpid'] ) + { + $reg = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'members_partial', + 'where' => "partial_member_id=" . intval( $this->request['mpid'] ) ) ); + + if ( $reg['partial_member_id'] ) + { + $member = IPSMember::load( $reg['partial_member_id'], 'all' ); + } + } + + /* Check the username */ + $user_check = IPSMember::getFunction()->cleanAndCheckName( $name, $member, $field ); + + $errorField = $field == 'members_display_name' ? 'dname' : 'username'; + $nameField = $field == 'members_display_name' ? 'members_display_name' : 'username'; + + if( is_array( $user_check['errors'][ $errorField ] ) && count( $user_check['errors'][ $errorField ] ) ) + { + $this->returnString( ipsRegistry::getClass( 'class_localization' )->words[ $user_check['errors'][ $errorField ][0] ] ? ipsRegistry::getClass( 'class_localization' )->words[ $user_check['errors'][ $errorField ][0] ] : $user_check['errors'][ $errorField ][0] ); + return; + } + else if( $user_check['errors'][ $errorField ] ) + { + $this->returnString( ipsRegistry::getClass( 'class_localization' )->words[ $user_check['errors'][ $errorField ] ] ? ipsRegistry::getClass( 'class_localization' )->words[ $user_check['errors'][ $errorField ] ] : $user_check['errors'][ $errorField ] ); + } + else + { + $this->returnString('notfound'); + } + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/ajax/reports.php b/upload/admin/applications/core/modules_public/ajax/reports.php index e7f58195..b056638a 100644 --- a/upload/admin/applications/core/modules_public/ajax/reports.php +++ b/upload/admin/applications/core/modules_public/ajax/reports.php @@ -1,137 +1,135 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_core_ajax_reports extends ipsAjaxCommand -{ - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - $this->registry->class_localization->loadLanguageFile( array( 'public_reports' ) ); - - $this->DB->loadCacheFile( IPSLib::getAppDir('core') . '/sql/' . ips_DBRegistry::getDriverType() . '_report_queries.php', 'report_sql_queries' ); - - require_once( IPSLib::getAppDir('core') .'/sources/classes/reportLibrary.php' ); - $this->registry->setClass( 'reportLibrary', new reportLibrary( $this->registry ) ); - - /* What to do */ - switch( $this->request['do'] ) - { - case 'change_status': - $this->output = $this->_changeStatus(); - break; - } - } - - /** - * Adds a rating to the index - * - * @access private - * @return void - */ - private function _changeStatus() - { - //----------------------------------------- - // Get status's and flags - //----------------------------------------- - - $this->registry->getClass('reportLibrary')->buildStatuses( true ); - - $COM_PERM = $this->registry->getClass('reportLibrary')->buildQueryPermissions(); - - //----------------------------------------- - // Process changes if info is correct - //----------------------------------------- - - if( is_numeric($this->request['id']) && $this->request['id'] > 0 ) - { - $the_id = intval( $this->request['id'] ); - $return = array('id' => $the_id); - - $this->DB->buildFromCache( 'grab_report', array( 'COM' => $COM_PERM, 'rid' => $the_id ), 'report_sql_queries' ); - $res = $this->DB->execute(); - - if( $this->DB->getTotalRows() > 0 ) - { - $report = $this->DB->fetch(); - - $old_status = $report['status']; - $new_status = $this->request['status']; - - if( $old_status != $new_status ) - { - $build_update = array( - 'status' => $new_status, - 'date_updated' => time(), - 'updated_by' => $this->memberData['member_id'], - ); - - $this->DB->update( 'rc_reports_index', $build_update, "id=".$the_id ); - } - - $this->registry->getClass('reportLibrary')->updateCacheTime(); - $this->registry->getClass('reportLibrary')->rebuildMemberCacheArray(); - - //----------------------------------------- - // Need to reload data to get right "points" :( - //----------------------------------------- - - $this->DB->buildFromCache( 'grab_report', array( 'COM' => $COM_PERM, 'rid' => $the_id ), 'report_sql_queries' ); - $res = $this->DB->execute(); - $report = $this->DB->fetch(); - - //----------------------------------------- - // Pick the right flag.. or else! - //----------------------------------------- - - $return['img'] = str_replace( '<#IMG_DIR#>', $this->registry->output->skin['set_image_dir'], $this->registry->getClass('reportLibrary')->flag_cache[ $report['status'] ][ $report['points'] ]['img'] ); - $return['width'] = $this->registry->getClass('reportLibrary')->flag_cache[ $report['status'] ][ $report['points'] ]['width']; - $return['height'] = $this->registry->getClass('reportLibrary')->flag_cache[ $report['status'] ][ $report['points'] ]['height']; - $return['is_png'] = $this->registry->getClass('reportLibrary')->flag_cache[ $report['status'] ][ $report['points'] ]['is_png']; - - //----------------------------------------- - // Image? PNG? Using 'Is-Evil' machine? - //----------------------------------------- - - if( $return['img'] != '' ) - { - $this->returnJsonArray( array( 'img' => $this->registry->getClass('output')->getTemplate('reports')->statusIcon( $return['img'], $return['width'], $return['height'] ) ) ); - } - else - { - $this->returnString( ' ' ); - } - } - } - else - { - $this->returnString( 'error' ); - } - } + + * Invision Power Services + * IP.Board v3.1.4 + * Reports AJAX options + * Last Updated: $Date: 2010-10-19 10:40:05 -0400 (Tue, 19 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 6995 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_ajax_reports extends ipsAjaxCommand +{ + /** + * Class entry point + * + * @param object Registry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + $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 ) ); + + /* What to do */ + switch( $this->request['do'] ) + { + case 'change_status': + $this->output = $this->_changeStatus(); + break; + } + } + + /** + * Adds a rating to the index + * + * @return void + */ + private function _changeStatus() + { + //----------------------------------------- + // Get status's and flags + //----------------------------------------- + + $this->registry->getClass('reportLibrary')->buildStatuses( true ); + + $COM_PERM = $this->registry->getClass('reportLibrary')->buildQueryPermissions(); + + //----------------------------------------- + // Process changes if info is correct + //----------------------------------------- + + if( is_numeric($this->request['id']) && $this->request['id'] > 0 ) + { + $the_id = intval( $this->request['id'] ); + $return = array('id' => $the_id); + + $this->DB->buildFromCache( 'grab_report', array( 'COM' => $COM_PERM, 'rid' => $the_id ), 'report_sql_queries' ); + $res = $this->DB->execute(); + + if( $this->DB->getTotalRows() > 0 ) + { + $report = $this->DB->fetch(); + + $old_status = $report['status']; + $new_status = $this->request['status']; + + if( $old_status != $new_status ) + { + $build_update = array( + 'status' => $new_status, + 'date_updated' => time(), + 'updated_by' => $this->memberData['member_id'], + ); + + $this->DB->update( 'rc_reports_index', $build_update, "id=".$the_id ); + } + + $this->registry->getClass('reportLibrary')->updateCacheTime(); + $this->registry->getClass('reportLibrary')->rebuildMemberCacheArray(); + + //----------------------------------------- + // Need to reload data to get right "points" :( + //----------------------------------------- + + $this->DB->buildFromCache( 'grab_report', array( 'COM' => $COM_PERM, 'rid' => $the_id ), 'report_sql_queries' ); + $res = $this->DB->execute(); + $report = $this->DB->fetch(); + + //----------------------------------------- + // Pick the right flag.. or else! + //----------------------------------------- + + $return['img'] = str_replace( '<#IMG_DIR#>', $this->registry->output->skin['set_image_dir'], $this->registry->getClass('reportLibrary')->flag_cache[ $report['status'] ][ $report['points'] ]['img'] ); + $return['width'] = $this->registry->getClass('reportLibrary')->flag_cache[ $report['status'] ][ $report['points'] ]['width']; + $return['height'] = $this->registry->getClass('reportLibrary')->flag_cache[ $report['status'] ][ $report['points'] ]['height']; + $return['is_png'] = $this->registry->getClass('reportLibrary')->flag_cache[ $report['status'] ][ $report['points'] ]['is_png']; + + //----------------------------------------- + // Image? PNG? Using 'Is-Evil' machine? + //----------------------------------------- + + if( $return['img'] != '' ) + { + $this->returnJsonArray( array( 'img' => $this->registry->getClass('output')->getTemplate('reports')->statusIcon( $return['img'], $return['width'], $return['height'] ) ) ); + } + else + { + $this->returnString( ' ' ); + } + } + } + else + { + $this->returnString( 'error' ); + } + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/ajax/reputation.php b/upload/admin/applications/core/modules_public/ajax/reputation.php index 8bcc811a..5e4528d3 100644 --- a/upload/admin/applications/core/modules_public/ajax/reputation.php +++ b/upload/admin/applications/core/modules_public/ajax/reputation.php @@ -1,82 +1,79 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_core_ajax_reputation extends ipsAjaxCommand -{ - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - /* What to do */ - switch( $this->request['do'] ) - { - case 'add_rating': - $this->doRating(); - break; - } - - /* Output */ - $this->returnHtml( $this->output ); - } - - /** - * Adds a rating to the index - * - * @access public - * @return void - */ - public function doRating() - { - /* INIT */ - $app = $this->request['app_rate']; - $type = $this->request['type']; - $type_id = intval( $this->request['type_id'] ); - $rating = intval( $this->request['rating'] ); - - /* Check */ - if( ! $app || ! $type || ! $type_id || ! $rating ) - { - $this->returnString( $this->lang->words['ajax_incomplete_data'] ); - } - - /* Get the rep library */ - require_once( IPS_ROOT_PATH . 'sources/classes/class_reputation_cache.php' ); - $repCache = new classReputationCache(); - - /* Add the rating */ - if( $repCache->addRate( $type, $type_id, $rating, '', 0, $app ) === false ) - { - $this->returnString( $repCache->error_message ); - } - else - { - $this->returnString( 'done' ); - } - } + + * Invision Power Services + * IP.Board v3.1.4 + * Reputation + * Last Updated: $Date: 2010-10-14 17:24:55 -0400 (Thu, 14 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 6982 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_ajax_reputation extends ipsAjaxCommand +{ + /** + * Class entry point + * + * @param object Registry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + /* What to do */ + switch( $this->request['do'] ) + { + case 'add_rating': + $this->doRating(); + break; + } + + exit(); + } + + /** + * Adds a rating to the index + * + * @return void + */ + public function doRating() + { + /* INIT */ + $app = $this->request['app_rate']; + $type = $this->request['type']; + $type_id = intval( $this->request['type_id'] ); + $rating = intval( $this->request['rating'] ); + + /* Check */ + if( ! $app || ! $type || ! $type_id || ! $rating ) + { + $this->returnString( $this->lang->words['ajax_incomplete_data'] ); + } + + /* Get the rep library */ + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_reputation_cache.php', 'classReputationCache' ); + $repCache = new $classToLoad(); + + /* Add the rating */ + if( $repCache->addRate( $type, $type_id, $rating, '', 0, $app ) === false ) + { + $this->returnString( $repCache->error_message ); + } + else + { + $this->returnString( 'done' ); + } + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/ajax/sharelinks.php b/upload/admin/applications/core/modules_public/ajax/sharelinks.php new file mode 100644 index 00000000..a384c639 --- /dev/null +++ b/upload/admin/applications/core/modules_public/ajax/sharelinks.php @@ -0,0 +1,231 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * AJAX Sharelinks + * Last Updated: $Date: 2010-10-19 11:56:25 -0400 (Tue, 19 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Revision: 6997 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_ajax_sharelinks extends ipsAjaxCommand +{ + /** + * Class entry point + * + * @param object Registry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + /* load language */ + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_emails' ), 'core' ); + + /* Do it */ + switch( $this->request['do'] ) + { + case 'twitterForm': + return $this->_twitterForm(); + break; + case 'twitterGo': + return $this->_twitterGo(); + break; + case 'facebookForm': + return $this->_facebookForm(); + break; + case 'facebookGo': + return $this->_facebookGo(); + break; + } + } + + /** + * Displays a form of facebook stuff. It's really that exciting. + * + * @return void [Outputs HTML to browser AJAX call] + */ + private function _facebookForm() + { + /* Ensure we have a twitter account and that */ + if ( $this->memberData['member_id'] AND $this->memberData['fb_uid'] AND $this->memberData['fb_token'] ) + { + /* Connect to the Facebook */ + require_once( IPS_ROOT_PATH . 'sources/classes/facebook/connect.php' ); + $connect = new facebook_connect( $this->registry ); + + try + { + $userData = $connect->fetchUserData(); + + $this->returnHtml( $this->registry->output->getTemplate('global_other')->facebookPop( $userData ) ); + } + catch( Exception $e ) + { + $this->returnHtml( '.' ); + } + } + else + { + /* Bog off @todo probably grab the URL and doc title and forward to normal twitter.com/submit link */ + $this->returnHtml( 'x' ); + } + } + + /** + * Go go Facebook go + * + * @return void [Outputs HTML to browser AJAX call] + */ + private function _facebookGo() + { + /* INIT */ + $comment = trim( urldecode( $_POST['comment'] ) ); + $url = trim( urldecode( $_POST['url'] ) ); + $title = trim( urldecode( $_POST['title'] ) ); + + /* Ensure title is correctly de-html-ized */ + $title = IPSText::UNhtmlspecialchars( $title ); + + /* Ensure we have a twitter account and that */ + if ( $this->memberData['member_id'] AND $this->memberData['fb_uid'] AND $this->memberData['fb_token'] ) + { + /* Connect to the Facebook */ + require_once( IPS_ROOT_PATH . 'sources/classes/facebook/connect.php' ); + $connect = new facebook_connect( $this->registry ); + + try + { + $userData = $connect->fetchUserData(); + + if ( $userData['first_name'] ) + { + /* Log it */ + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/share/links.php', 'share_links' ); + $share = new $classToLoad( $this->registry, 'facebook' ); + $share->log( $url, $title ); + + $connect->postLinkToWall( $url, $comment ); + + $this->returnHtml( $this->registry->output->getTemplate('global_other')->facebookDone( $userData ) ); + } + else + { + $this->returnHtml( 'finchersaysno' ); + } + + } + catch( Exception $e ) + { + $this->returnHtml( 'finchersaysno' ); + } + } + else + { + /* Bog off */ + $this->returnString( 'finchersaysno' ); + } + } + + + /** + * Go go twitter go + * + * @return void [Outputs HTML to browser AJAX call] + */ + private function _twitterGo() + { + /* INIT */ + $tweet = trim( urldecode( $_POST['tweet'] ) ); + $url = trim( urldecode( $_POST['url'] ) ); + $title = trim( urldecode( $_POST['title'] ) ); + + /* Ensure title is correctly de-html-ized */ + $title = IPSText::UNhtmlspecialchars( $title ); + + /* Ensure we have a twitter account and that */ + if ( $this->memberData['member_id'] AND $this->memberData['twitter_id'] AND $this->memberData['twitter_token'] AND $this->memberData['twitter_secret'] ) + { + /* Connect to the twitter */ + require_once( IPS_ROOT_PATH . 'sources/classes/twitter/connect.php' ); + $connect = new twitter_connect( $this->registry, $this->memberData['twitter_token'], $this->memberData['twitter_secret'] ); + $user = $connect->fetchUserData(); + + if ( $user['id'] ) + { + $sid = $connect->updateStatusWithUrl( $tweet, $url ); + + if ( $sid ) + { + /* Log it */ + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/share/links.php', 'share_links' ); + $share = new $classToLoad( $this->registry, 'twitter' ); + $share->log( $url, $title ); + + $user['status']['id'] = $sid; + $this->returnHtml( $this->registry->output->getTemplate('global_other')->twitterDone( $user ) ); + } + else + { + /* Bog off */ + $this->returnString( 'failwhale' ); + } + } + else + { + /* Bog off */ + $this->returnString( 'failwhale' ); + } + } + else + { + /* Bog off */ + $this->returnString( 'failwhale' ); + } + } + + /** + * Displays a form of twitter stuff. It's really that exciting. + * + * @return void [Outputs HTML to browser AJAX call] + */ + private function _twitterForm() + { + /* Ensure we have a twitter account and that */ + if ( $this->memberData['member_id'] AND $this->memberData['twitter_id'] AND $this->memberData['twitter_token'] AND $this->memberData['twitter_secret'] ) + { + /* Connect to the twitter */ + require_once( IPS_ROOT_PATH . 'sources/classes/twitter/connect.php' ); + $connect = new twitter_connect( $this->registry, $this->memberData['twitter_token'], $this->memberData['twitter_secret'] ); + $user = $connect->fetchUserData(); + + if ( $user['id'] ) + { + $this->returnHtml( $this->registry->output->getTemplate('global_other')->twitterPop( $user ) ); + } + else + { + /* Bog off @todo probably grab the URL and doc title and forward to normal twitter.com/submit link */ + $this->returnHtml( '.' ); + } + } + else + { + /* Bog off @todo probably grab the URL and doc title and forward to normal twitter.com/submit link */ + $this->returnHtml( 'x' ); + } + } +} \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/ajax/usercp.php b/upload/admin/applications/core/modules_public/ajax/usercp.php index ab356b51..04c7b610 100644 --- a/upload/admin/applications/core/modules_public/ajax/usercp.php +++ b/upload/admin/applications/core/modules_public/ajax/usercp.php @@ -1,111 +1,113 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_core_ajax_usercp extends ipsAjaxCommand -{ - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - switch( $this->request['do'] ) - { - case 'displayNameCheck': - $this->displayNameCheck(); - break; - } - } - - /** - * Checks a display name - * - * @access private - * @return void [Outputs JSON to browser AJAX call] - */ - private function displayNameCheck() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $name = mb_strtolower( $this->convertAndMakeSafe( $this->request['name'], 0 ) ); - $name = str_replace("+", "+", $name ); - $member = array(); - $return = TRUE; - $id = intval( $this->request['member_id'] ); - - # Set member ID - $id = $this->memberData['member_id'] ? $this->memberData['member_id'] : $id; - - //----------------------------------------- - // Load member if required - //----------------------------------------- - - if ( $id != $this->memberData['member_id'] ) - { - $member = IPSMember::load( $id, 'all' ); - } - else - { - $member = $this->member->fetchMemberData(); - } - - //----------------------------------------- - // Test name - //----------------------------------------- - - try - { - $return = IPSMember::getFunction()->checkNameExists( $name, $member ); - } - catch( Exception $error ) - { - $_msg = $error->getMessage(); - - if ( $_msg == 'NO_MORE_CHANGES' ) - { - $this->returnString( 'nomorechanges' ); - return; - } - - # Really, we're not very interested why it didn't work at this point, so - # just return with a 'found' string which will make a nice red cross and - # force the user to choose another. - - $this->returnString('found'); - return; - } - - //----------------------------------------- - // So, what's it to be? - //----------------------------------------- - - $this->returnString( ( $return === TRUE ) ? 'found' : 'notfound' ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Login handler abstraction : AJAX UserCP functions + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since Tuesday 1st March 2005 (11:52) + * @version $Revision: 5713 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_ajax_usercp extends ipsAjaxCommand +{ + /** + * Class entry point + * + * @access public + * @param object Registry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + switch( $this->request['do'] ) + { + case 'displayNameCheck': + $this->displayNameCheck(); + break; + } + } + + /** + * Checks a display name + * + * @access private + * @return void [Outputs JSON to browser AJAX call] + */ + private function displayNameCheck() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $name = mb_strtolower( $this->convertAndMakeSafe( $this->request['name'], 0 ) ); + $name = str_replace("+", "+", $name ); + $member = array(); + $return = TRUE; + $id = intval( $this->request['member_id'] ); + + # Set member ID + $id = $this->memberData['member_id'] ? $this->memberData['member_id'] : $id; + + //----------------------------------------- + // Load member if required + //----------------------------------------- + + if ( $id != $this->memberData['member_id'] ) + { + $member = IPSMember::load( $id, 'all' ); + } + else + { + $member = $this->member->fetchMemberData(); + } + + //----------------------------------------- + // Test name + //----------------------------------------- + + try + { + $return = IPSMember::getFunction()->checkNameExists( $name, $member ); + } + catch( Exception $error ) + { + $_msg = $error->getMessage(); + + if ( $_msg == 'NO_MORE_CHANGES' ) + { + $this->returnString( 'nomorechanges' ); + return; + } + + # Really, we're not very interested why it didn't work at this point, so + # just return with a 'found' string which will make a nice red cross and + # force the user to choose another. + + $this->returnString('found'); + return; + } + + //----------------------------------------- + // So, what's it to be? + //----------------------------------------- + + $this->returnString( ( $return === TRUE ) ? 'found' : 'notfound' ); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/ajax/vkontakte.php b/upload/admin/applications/core/modules_public/ajax/vkontakte.php new file mode 100644 index 00000000..084d6f88 --- /dev/null +++ b/upload/admin/applications/core/modules_public/ajax/vkontakte.php @@ -0,0 +1,121 @@ +Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_ajax_vkontakte extends ipsAjaxCommand +{ + /** + * Login handler object + * + * @access protected + * @var object + */ + protected $han_login; + + /** + * Flag : Logged in + * + * @access protected + * @var boolean + */ + protected $logged_in = false; + + /** + * Class entry point + * + * @access public + * @param object Registry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + + /* What to do */ + switch( $this->request['do'] ) + { + case 'getUserByVkId': + $return = $this->_getUserByVkId(); + break; + } + + /* Output */ + $this->returnHtml( $return ); + } + + /** + * Main AJAX log in routine + * + * @access private + * @return void [Outputs JSON to browser AJAX call] + */ + private function _getUserByVkId() + { + require_once( IPS_ROOT_PATH . 'sources/classes/vkontakte/connect.php' ); + $vk = new Vkontakte_Request_Validator( $this->settings['vk_api_id'], $this->settings['vk_secret'] ); + + //----------------------------------------- + // INIT + //----------------------------------------- + + $vkUid = is_numeric( $vk->mid ) ? $vk->mid : -1; + $member = array( 'member_id' => 0 ); + + if ( $vkUid ) + { + $_mid = $this->DB->buildAndFetch( array( 'select' => 'member_id', + 'from' => 'members', + 'where' => 'vk_uid=' . $vkUid ) ); + + if ( $_mid['member_id'] ) + { + $member = IPSMember::load( $_mid['member_id'], 'all' ); + } + } + + /* Create validating account for the member */ + $key = md5( uniqid( microtime() ) ); + $member['key'] = $key; + + if ( $vkUid == $this->request['id'] ) + { + + $this->DB->delete( 'vkontakte_connect', 'v_id = ' . $vkUid ); + + $name = IPSMember::getFunction()->cleanAndCheckName( $this->request['name'], array(), 'name' ); + + $photo = ''; + + if ( IPSText::xssCheckUrl( $this->request['photo'] ) && preg_match('~^http://.+?\.vkontakte\.ru/u' . $vkUid. '~is', $this->request['photo'])) + { + $photo = $this->request['photo']; + } + + $this->DB->insert( 'vkontakte_connect', array( 'v_key' => $key, + 'v_user' => $name['username'], + 'v_data' => $photo, + 'v_id' => $vkUid ) ); + + } + + $this->returnJsonArray( $member ); + } +} \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/attach/attach.php b/upload/admin/applications/core/modules_public/attach/attach.php index 4ddde65b..9598e0bc 100644 --- a/upload/admin/applications/core/modules_public/attach/attach.php +++ b/upload/admin/applications/core/modules_public/attach/attach.php @@ -1,353 +1,345 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_core_attach_attach extends ipsCommand -{ - /** - * Attachment Library - * - * @access public - * @var object class_attach - */ - public $class_attach; - - /** - * AJAX Library - * - * @access public - * @var object classAjax - */ - public $ajax; - - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen/redirects] - */ - public function doExecute( ipsRegistry $registry ) - { - /* AJAX Class */ - require_once( IPS_KERNEL_PATH . '/classAjax.php' ); - $this->ajax = new classAjax(); - - /* Attachment Class */ - require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' ); - $this->class_attach = new class_attach( $registry ); - - /* What to do... */ - switch( $this->request['do'] ) - { - case 'attach_upload_show': - $this->ajax->returnHtml( $this->attachmentUploadShow() ); - break; - - case 'attach_upload_process': - $this->attachmentUploadProcess(); - break; - - case 'attach_upload_remove': - $this->attachmentUploadRemove(); - break; - - /* IFrame based upload */ - case 'attachiFrame': - $this->attachiFrame(); - break; - case 'attachUploadiFrame': - $this->attachUploadiFrame(); - break; - - default: - $this->showPostAttachment(); - break; - } - } - - /** - * View Post Attachment - * - * @access public - * @return void - */ - public function showPostAttachment() - { - /* INIT */ - $attach_id = intval( $this->request['attach_id'] ); - - /* INIT module */ - $this->class_attach->init(); - - /* Display */ - $this->class_attach->showAttachment( $attach_id ); - } - - /** - * Remove an upload - * - * @access public - * @return void - */ - public function attachmentUploadRemove() - { - /* INIT */ - $attach_post_key = trim( IPSText::alphanumericalClean( $this->request['attach_post_key'] ) ); - $attach_rel_module = trim( IPSText::alphanumericalClean( $this->request['attach_rel_module'] ) ); - $attach_rel_id = intval( $this->request['attach_rel_id'] ); - $attach_id = intval( $this->request['attach_id'] ); - - /* Setup Module */ - $this->class_attach->type = $attach_rel_module; - $this->class_attach->attach_post_key = $attach_post_key; - $this->class_attach->attach_rel_id = $attach_rel_id; - $this->class_attach->attach_id = $attach_id; - $this->class_attach->init(); - - /* Remove the attachment */ - $removed = $this->class_attach->removeAttachment(); - - /* Show the form */ - if( $removed ) - { - $this->ajax->returnHtml( $this->attachmentUploadShow( 'attach_removed', 0 ) ); - } - else - { - $this->ajax->returnHtml( $this->attachmentUploadShow( 'remove_failed', 1 ) ); - } - } - - /** - * Perform the actual upload - * - * @access public - * @return void - */ - public function attachmentUploadProcess() - { - /* INIT */ - $attach_post_key = trim( IPSText::alphanumericalClean( $this->request['attach_post_key'] ) ); - $attach_rel_module = trim( IPSText::alphanumericalClean( $this->request['attach_rel_module'] ) ); - $attach_rel_id = intval( $this->request['attach_rel_id'] ); - $attach_current_items = ''; - - /* INIT module */ - $this->class_attach->type = $attach_rel_module; - $this->class_attach->attach_post_key = $attach_post_key; - $this->class_attach->attach_rel_id = $attach_rel_id; - $this->class_attach->init(); - - /* Process upload */ - $insert_id = $this->class_attach->processUpload(); - - /* Got an error? */ - if( $this->class_attach->error ) - { - $this->ajax->returnHtml( $this->attachmentUploadShow( $this->class_attach->error, 1, $insert_id ) ); - } - else - { - $this->ajax->returnHtml( $this->attachmentUploadShow( 'upload_ok', 0, $insert_id ) ); - } - } - - /** - * Show the attach upload field - * - * @access public - * @param string $msg - * @param bool $is_error - * @param integer $insert_id - * @return void - **/ - public function attachmentUploadShow( $msg="ready", $is_error=0, $insert_id=0 ) - { - /* INIT JSON */ - $JSON = array(); - $JSON['msg'] = $msg; - $JSON['is_error'] = $is_error; - - $is_reset = 0; - - /* Check the upload domain setting */ - if( $this->settings['upload_domain'] ) - { - $is_reset = 1; - $original = $this->settings['base_url']; - - if( $this->member->session_type == 'cookie' ) - { - $this->settings['base_url'] = $this->settings['upload_domain'] . '/index.' . $this->settings['php_ext'].'?'; - } - else - { - $this->settings['base_url'] = $this->settings['upload_domain'] . '/index.' . $this->settings['php_ext'].'?s='.$this->member->session_id .'&'; - } - } - - /* JSON Data */ - $JSON['attach_post_key'] = $attach_post_key = trim( IPSText::alphanumericalClean( $this->request['attach_post_key'] ) ); - $JSON['attach_rel_module'] = $attach_rel_module = trim( IPSText::alphanumericalClean( $this->request['attach_rel_module'] ) ); - $JSON['attach_rel_id'] = $attach_rel_id = intval( $this->request['attach_rel_id'] ); - - if( $insert_id ) - { - $JSON['insert_id'] = $insert_id; - } - - /* Get extra form fields */ - foreach( $_GET as $k => $v ) - { - if( preg_match( "#^--ff--#", $k ) ) - { - $JSON['extra_upload_form_url'] .= '&' . str_replace( '--ff--', '', $k ) . '='.$v; - $JSON['extra_upload_form_url'] .= '&' . $k . '='.$v; - } - } - - /* INIT module */ - $this->class_attach->type = $attach_rel_module; - $this->class_attach->attach_post_key = $attach_post_key; - $this->class_attach->init(); - $this->class_attach->getUploadFormSettings(); - - /* Load Language Bits */ - $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'lang_post' ) ); - - /* Generate current items... */ - $_more = ( $attach_rel_id ) ? ' OR c.attach_rel_id=' . $attach_rel_id : ''; - - $this->DB->build( array( - 'select' => 'c.*', - 'from' => array( 'attachments' => 'c' ), - 'where' => "c.attach_rel_module='{$attach_rel_module}' AND c.attach_post_key='{$attach_post_key}'{$_more}", - 'add_join' => array( array( - 'select' => 't.*', - 'from' => array( 'attachments_type' => 't' ), - 'where' => 't.atype_extension=c.attach_ext', - 'type' => 'left' - ) ) - - ) ); - - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - if ( $attach_rel_module != $row['attach_rel_module'] ) - { - continue; - } - - if( ( $insert_id && $row['attach_id'] == $insert_id ) || $this->request['fetch_all'] ) - { - if ( $row['attach_is_image'] and ! $row['attach_thumb_location'] ) - { - $row['attach_thumb_location'] = $row['attach_location']; - $row['attach_thumb_width'] = $row['attach_width']; - $row['attach_thumb_height'] = $row['attach_height']; - } - - $JSON['current_items'][ $row['attach_id'] ] = array( $row['attach_id'] , - str_replace( array( '[', ']' ), '', $row['attach_file'] ), - $row['attach_filesize'], - $row['attach_is_image'], - $row['attach_thumb_location'], - $row['attach_thumb_width'], - $row['attach_thumb_height'], - $row['atype_img'] - ); - } - } - - $JSON['attach_stats'] = $this->class_attach->attach_stats; - - /* Formatting nonsense for special char sets */ - array_walk_recursive( $JSON, create_function( '&$value, $key', '$value = IPSText::convertCharsets($value, "' . IPS_DOC_CHAR_SET . '", "UTF-8");' ) ); - $result = json_encode( $JSON ); - $result = IPSText::convertCharsets( $result, "UTF-8", IPS_DOC_CHAR_SET ); - - IPSDebug::addLogMessage( $result, 'uploads' ); - - /* Return JSON */ - return $result; - } - - /** - * Show the attach upload field - * - * @access public - * @param string $msg - * @param bool $is_error - * @param integer $insert_id - * @return void - */ - public function attachiFrame( $msg="ready", $is_error=0, $insert_id=0 ) - { - /* INIT JSON */ - $JSON = $this->attachmentUploadShow( $msg, $is_error, $insert_id ); - - $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_post' ), 'forums' ); - - $this->ajax->returnHtml( $this->registry->output->getTemplate( 'post' )->attachiFrame( $JSON, intval( $this->request['attach_rel_id'] ) ) ); - } - - /** - * Perform the actual upload - * - * @access public - * @return void - */ - public function attachUploadiFrame() - { - /* INIT */ - $attach_post_key = trim( IPSText::alphanumericalClean( $this->request['attach_post_key'] ) ); - $attach_rel_module = trim( IPSText::alphanumericalClean( $this->request['attach_rel_module'] ) ); - $attach_rel_id = intval( $this->request['attach_rel_id'] ); - $attach_current_items = ''; - - $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_post' ), 'forums' ); - - /* INIT module */ - $this->class_attach->type = $attach_rel_module; - $this->class_attach->attach_post_key = $attach_post_key; - $this->class_attach->attach_rel_id = $attach_rel_id; - $this->class_attach->init(); - - /* Process upload */ - $insert_id = $this->class_attach->processUpload(); - - /* Got an error? */ - if( $this->class_attach->error ) - { - $JSON = $this->attachmentUploadShow( $this->class_attach->error, 1, $insert_id ); - } - else - { - $JSON = $this->attachmentUploadShow( 'upload_ok', 0, $insert_id ); - } - - $this->ajax->returnHtml( $this->registry->output->getTemplate( 'post' )->attachiFrame( $JSON, $attach_rel_id ) ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Attachment Poster + * Last Updated: $Date: 2010-10-19 11:56:25 -0400 (Tue, 19 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 6997 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_attach_attach extends ipsCommand +{ + /** + * Attachment Library + * + * @var object class_attach + */ + public $class_attach; + + /** + * AJAX Library + * + * @var object classAjax + */ + public $ajax; + + /** + * Class entry point + * + * @param object Registry reference + * @return void [Outputs to screen/redirects] + */ + public function doExecute( ipsRegistry $registry ) + { + /* AJAX Class */ + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' ); + $this->ajax = new $classToLoad(); + + /* Attachment Class */ + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $this->class_attach = new $classToLoad( $registry ); + + /* What to do... */ + switch( $this->request['do'] ) + { + case 'attach_upload_show': + $this->ajax->returnHtml( $this->attachmentUploadShow() ); + break; + + case 'attach_upload_process': + $this->attachmentUploadProcess(); + break; + + case 'attach_upload_remove': + $this->attachmentUploadRemove(); + break; + + /* IFrame based upload */ + case 'attachiFrame': + $this->attachiFrame(); + break; + case 'attachUploadiFrame': + $this->attachUploadiFrame(); + break; + + default: + $this->showPostAttachment(); + break; + } + } + + /** + * View Post Attachment + * + * @return void + */ + public function showPostAttachment() + { + /* INIT */ + $attach_id = intval( $this->request['attach_id'] ); + + /* INIT module */ + $this->class_attach->init(); + + /* Display */ + $this->class_attach->showAttachment( $attach_id ); + } + + /** + * Remove an upload + * + * @return void + */ + public function attachmentUploadRemove() + { + /* INIT */ + $attach_post_key = trim( IPSText::alphanumericalClean( $this->request['attach_post_key'] ) ); + $attach_rel_module = trim( IPSText::alphanumericalClean( $this->request['attach_rel_module'] ) ); + $attach_rel_id = intval( $this->request['attach_rel_id'] ); + $attach_id = intval( $this->request['attach_id'] ); + + /* Setup Module */ + $this->class_attach->type = $attach_rel_module; + $this->class_attach->attach_post_key = $attach_post_key; + $this->class_attach->attach_rel_id = $attach_rel_id; + $this->class_attach->attach_id = $attach_id; + $this->class_attach->init(); + + /* Remove the attachment */ + $removed = $this->class_attach->removeAttachment(); + + /* Show the form */ + if( $removed ) + { + $this->ajax->returnHtml( $this->attachmentUploadShow( 'attach_removed', 0 ) ); + } + else + { + $this->ajax->returnHtml( $this->attachmentUploadShow( 'remove_failed', 1 ) ); + } + } + + /** + * Perform the actual upload + * + * @return void + */ + public function attachmentUploadProcess() + { + /* INIT */ + $attach_post_key = trim( IPSText::alphanumericalClean( $this->request['attach_post_key'] ) ); + $attach_rel_module = trim( IPSText::alphanumericalClean( $this->request['attach_rel_module'] ) ); + $attach_rel_id = intval( $this->request['attach_rel_id'] ); + $attach_current_items = ''; + + /* INIT module */ + $this->class_attach->type = $attach_rel_module; + $this->class_attach->attach_post_key = $attach_post_key; + $this->class_attach->attach_rel_id = $attach_rel_id; + $this->class_attach->init(); + + /* Process upload */ + $insert_id = $this->class_attach->processUpload(); + + /* Got an error? */ + if( $this->class_attach->error ) + { + $this->ajax->returnHtml( $this->attachmentUploadShow( $this->class_attach->error, 1, $insert_id ) ); + } + else + { + $this->ajax->returnHtml( $this->attachmentUploadShow( 'upload_ok', 0, $insert_id ) ); + } + } + + /** + * Show the attach upload field + * + * @param string $msg + * @param bool $is_error + * @param integer $insert_id + * @return void + **/ + public function attachmentUploadShow( $msg="ready", $is_error=0, $insert_id=0 ) + { + /* INIT JSON */ + $JSON = array(); + $JSON['msg'] = $msg; + $JSON['is_error'] = $is_error; + + $is_reset = 0; + + /* Check the upload domain setting */ + if( $this->settings['upload_domain'] ) + { + $is_reset = 1; + $original = $this->settings['base_url']; + + if( $this->member->session_type == 'cookie' ) + { + $this->settings['base_url'] = $this->settings['upload_domain'] . '/index.' . $this->settings['php_ext'].'?'; + } + else + { + $this->settings['base_url'] = $this->settings['upload_domain'] . '/index.' . $this->settings['php_ext'].'?s='.$this->member->session_id .'&'; + } + } + + /* JSON Data */ + $JSON['attach_post_key'] = $attach_post_key = trim( IPSText::alphanumericalClean( $this->request['attach_post_key'] ) ); + $JSON['attach_rel_module'] = $attach_rel_module = trim( IPSText::alphanumericalClean( $this->request['attach_rel_module'] ) ); + $JSON['attach_rel_id'] = $attach_rel_id = intval( $this->request['attach_rel_id'] ); + + if( $insert_id ) + { + $JSON['insert_id'] = $insert_id; + } + + /* Get extra form fields */ + foreach( $_GET as $k => $v ) + { + if( preg_match( "#^--ff--#", $k ) ) + { + $JSON['extra_upload_form_url'] .= '&' . str_replace( '--ff--', '', $k ) . '='.$v; + $JSON['extra_upload_form_url'] .= '&' . $k . '='.$v; + } + } + + /* INIT module */ + $this->class_attach->type = $attach_rel_module; + $this->class_attach->attach_post_key = $attach_post_key; + $this->class_attach->init(); + $this->class_attach->getUploadFormSettings(); + + /* Load Language Bits */ + $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'lang_post' ) ); + + /* Generate current items... */ + $_more = ( $attach_rel_id ) ? ' OR c.attach_rel_id=' . $attach_rel_id : ''; + + $this->DB->build( array( + 'select' => 'c.*', + 'from' => array( 'attachments' => 'c' ), + 'where' => "c.attach_rel_module='{$attach_rel_module}' AND c.attach_post_key='{$attach_post_key}'{$_more}", + 'add_join' => array( array( + 'select' => 't.*', + 'from' => array( 'attachments_type' => 't' ), + 'where' => 't.atype_extension=c.attach_ext', + 'type' => 'left' + ) ) + + ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + if ( $attach_rel_module != $row['attach_rel_module'] ) + { + continue; + } + + if( ( $insert_id && $row['attach_id'] == $insert_id ) || $this->request['fetch_all'] ) + { + if ( $row['attach_is_image'] and ! $row['attach_thumb_location'] ) + { + $row['attach_thumb_location'] = $row['attach_location']; + $row['attach_thumb_width'] = $row['attach_width']; + $row['attach_thumb_height'] = $row['attach_height']; + } + + $JSON['current_items'][ $row['attach_id'] ] = array( $row['attach_id'] , + str_replace( array( '[', ']' ), '', $row['attach_file'] ), + $row['attach_filesize'], + $row['attach_is_image'], + $row['attach_thumb_location'], + $row['attach_thumb_width'], + $row['attach_thumb_height'], + $row['atype_img'] + ); + } + } + + $JSON['attach_stats'] = $this->class_attach->attach_stats; + + /* Formatting nonsense for special char sets */ + array_walk_recursive( $JSON, create_function( '&$value, $key', '$value = IPSText::convertCharsets($value, "' . IPS_DOC_CHAR_SET . '", "UTF-8");' ) ); + $result = json_encode( $JSON ); + $result = IPSText::convertCharsets( $result, "UTF-8", IPS_DOC_CHAR_SET ); + + IPSDebug::addLogMessage( $result, 'uploads' ); + + /* Return JSON */ + return $result; + } + + /** + * Show the attach upload field + * + * @param string $msg + * @param bool $is_error + * @param integer $insert_id + * @return void + */ + public function attachiFrame( $msg="ready", $is_error=0, $insert_id=0 ) + { + /* INIT JSON */ + $JSON = $this->attachmentUploadShow( $msg, $is_error, $insert_id ); + + $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_post' ), 'forums' ); + + $this->ajax->returnHtml( $this->registry->output->getTemplate( 'post' )->attachiFrame( $JSON, intval( $this->request['attach_rel_id'] ) ) ); + } + + /** + * Perform the actual upload + * + * @return void + */ + public function attachUploadiFrame() + { + /* INIT */ + $attach_post_key = trim( IPSText::alphanumericalClean( $this->request['attach_post_key'] ) ); + $attach_rel_module = trim( IPSText::alphanumericalClean( $this->request['attach_rel_module'] ) ); + $attach_rel_id = intval( $this->request['attach_rel_id'] ); + $attach_current_items = ''; + + $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_post' ), 'forums' ); + + /* INIT module */ + $this->class_attach->type = $attach_rel_module; + $this->class_attach->attach_post_key = $attach_post_key; + $this->class_attach->attach_rel_id = $attach_rel_id; + $this->class_attach->init(); + + /* Process upload */ + $insert_id = $this->class_attach->processUpload(); + + /* Got an error? */ + if( $this->class_attach->error ) + { + $JSON = $this->attachmentUploadShow( $this->class_attach->error, 1, $insert_id ); + } + else + { + $JSON = $this->attachmentUploadShow( 'upload_ok', 0, $insert_id ); + } + + $this->ajax->returnHtml( $this->registry->output->getTemplate( 'post' )->attachiFrame( $JSON, $attach_rel_id ) ); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/attach/defaultSection.php b/upload/admin/applications/core/modules_public/attach/defaultSection.php index 4bfb2f9a..580ab9c1 100644 --- a/upload/admin/applications/core/modules_public/attach/defaultSection.php +++ b/upload/admin/applications/core/modules_public/attach/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default attachments section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_public/attach/index.html b/upload/admin/applications/core/modules_public/attach/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_public/attach/index.html +++ b/upload/admin/applications/core/modules_public/attach/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/global/captcha.php b/upload/admin/applications/core/modules_public/global/captcha.php index 3b207fb3..eeb1b786 100644 --- a/upload/admin/applications/core/modules_public/global/captcha.php +++ b/upload/admin/applications/core/modules_public/global/captcha.php @@ -1,93 +1,91 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_core_global_captcha extends ipsCommand -{ - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen/redirects] - */ - public function doExecute( ipsRegistry $registry ) - { - /* Load Cpatcha Class */ - $this->class_captcha = $this->registry->getClass('class_captcha'); - - /* What to do... */ - switch( $this->request['do'] ) - { - default: - case 'showimage': - $this->showImage(); - break; - case 'refresh': - $this->refreshImage(); - break; - } - } - - /** - * Show the captcha image - * Shows the captcha image. Good god, that was a waste of time - * - * @access public - * @return void - */ - public function showImage() - { - /* INIT */ - $captcha_unique_id = trim( $this->request['captcha_unique_id'] ); - - /* GD installed? */ - $this->class_captcha->show_error_gd_img = TRUE; - - /* Show Image... */ - $this->class_captcha->showImage( $captcha_unique_id ); - } - - /** - * Show the captcha image - * Refreshes the captcha image. - * - * @access public - * @return void - */ - public function refreshImage() - { - /* INIT */ - $captcha_unique_id = trim( $this->request['captcha_unique_id'] ); - - /* Throw away */ - $blah = $this->class_captcha->getTemplate(); - - require_once( IPS_KERNEL_PATH . 'classAjax.php' ); - $ajax = new classAjax(); - - /* Show Image... */ - $ajax->returnString( $this->class_captcha->captchaKey ); - exit; - } + + * Invision Power Services + * IP.Board v3.1.4 + * Captcha + * Last Updated: $Date: 2010-10-19 11:56:25 -0400 (Tue, 19 Oct 2010) $ + * + * + * @author $Author $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 20th February 2002 + * @version $Rev: 6997 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_global_captcha extends ipsCommand +{ + /** + * Class entry point + * + * @param object Registry reference + * @return void [Outputs to screen/redirects] + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load Cpatcha Class */ + $this->class_captcha = $this->registry->getClass('class_captcha'); + + /* What to do... */ + switch( $this->request['do'] ) + { + default: + case 'showimage': + $this->showImage(); + break; + case 'refresh': + $this->refreshImage(); + break; + } + } + + /** + * Show the captcha image + * Shows the captcha image. Good god, that was a waste of time + * + * @return void + */ + public function showImage() + { + /* INIT */ + $captcha_unique_id = trim( $this->request['captcha_unique_id'] ); + + /* GD installed? */ + $this->class_captcha->show_error_gd_img = TRUE; + + /* Show Image... */ + $this->class_captcha->showImage( $captcha_unique_id ); + } + + /** + * Show the captcha image + * Refreshes the captcha image. + * + * @return void + */ + public function refreshImage() + { + /* INIT */ + $captcha_unique_id = trim( $this->request['captcha_unique_id'] ); + + /* Throw away */ + $blah = $this->class_captcha->getTemplate(); + + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' ); + $ajax = new $classToLoad(); + + /* Show Image... */ + $ajax->returnString( $this->class_captcha->captchaKey ); + exit; + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/global/comments.php b/upload/admin/applications/core/modules_public/global/comments.php new file mode 100644 index 00000000..2a92307a --- /dev/null +++ b/upload/admin/applications/core/modules_public/global/comments.php @@ -0,0 +1,322 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Image Ajax + * Last Updated: $LastChangedDate: 2010-08-18 16:55:30 +0100 (Wed, 18 Aug 2010) $ + * + * + * @author $Author: matt $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Gallery + * @link http://www.invisionpower.com + * @version $Rev: 6767 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_global_comments extends ipsCommand +{ + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + /* From App */ + $fromApp = trim( $this->request['fromApp'] ); + + /* Init some data */ + require_once( IPS_ROOT_PATH . 'sources/classes/comments/bootstrap.php' ); + $this->_comments = classes_comments_bootstrap::controller( $fromApp ); + + /* What to do? */ + switch( $this->request['do'] ) + { + case 'add': + $this->_add(); + break; + case 'delete': + $this->_delete(); + break; + case 'showEdit': + $this->_showEdit(); + break; + case 'saveEdit': + $this->_saveEdit(); + break; + case 'fetchReply': + $this->_fetchReply(); + break; + case 'moderate': + $this->_moderate(); + break; + case 'findLastComment': + $this->_findLastComment(); + break; + case 'findComment': + $this->_findComment(); + break; + } + } + + /** + * Find last page of comments + * + * @access protected + * @return void [Redirects] + */ + protected function _findLastComment() + { + /* Init */ + $parentId = intval( $this->request['parentId'] ); + + $this->_comments->redirectToComment( 'last', $parentId ); + } + + /** + * Find last page of comments + * + * @access protected + * @return void [Redirects] + */ + protected function _findComment() + { + /* Init */ + $parentId = intval( $this->request['parentId'] ); + $comment_id = intval( $this->request['comment_id'] ); + + $this->_comments->redirectToComment( $comment_id, $parentId ); + } + + /** + * Moderate + * + * @access protected + * @return void + */ + protected function _moderate() + { + $parentId = intval( $this->request['parentId'] ); + $commentIds = ( is_array( $_POST['commentIds'] ) ) ? IPSLib::cleanIntArray( $_POST['commentIds'] ) : array(); + $modact = trim( $this->request['modact'] ); + + if ( count( $commentIds ) ) + { + try + { + $this->_comments->moderate( $modact, $parentId, $commentIds, $this->memberData ); + + $this->returnJsonArray( array( 'msg' => 'ok' ) ); + } + catch( Exception $error ) + { + $this->returnJsonError( 'Error ' . $error->getMessage() . ' line: ' . $error->getFile() . '.' . $error->getLine() ); + } + } + } + + /** + * Reply + * + * @access public + * @return void + */ + protected function _fetchReply() + { + /* INIT */ + $commentId = intval( $this->request['comment_id'] ); + $parentId = intval( $this->request['parentId'] ); + + /* Quick error checko */ + if ( ! $commentId OR ! $parentId ) + { + $this->returnString( 'error' ); + } + + # Get Edit form + try + { + $html = $this->_comments->fetchReply( $parentId, $commentId, $this->memberData ); + + $this->returnString( $html ); + } + catch ( Exception $error ) + { + $this->returnString( 'Error ' . $error->getMessage() ); + } + } + + + /** + * Deletes a comment + * + * @access public + * @return void + */ + protected function _delete() + { + /* INIT */ + $commentId = intval( $this->request['comment_id'] ); + $parentId = intval( $this->request['parentId'] ); + + /* Perm check (looks nice) */ + if ( $this->request['auth_key'] != $this->member->form_hash ) + { + $this->registry->getClass('output')->showError( 'posting_bad_auth_key', '1-global-comments-_delete-0', null, null, 403 ); + } + + /* Quick error checko */ + if ( ! $commentId OR ! $parentId ) + { + $this->registry->getClass('output')->showError( 'no_permission', '1-global-comments-_delete-2', null, null, 403 ); + } + + try + { + $this->_comments->delete( $parentId, $commentId, $this->memberData ); + + /* Redirect to find latest */ + $this->_comments->redirectToComment( 'last', $parentId ); + } + catch ( Exception $error ) + { + $this->registry->getClass('output')->showError( 'no_permission', '1-global-comments-_delete-2', null, null, 403 ); + } + } + + /** + * Shows the edit box + * + * @access public + * @return void + */ + protected function _showEdit() + { + /* INIT */ + $commentId = intval( $this->request['comment_id'] ); + $parentId = intval( $this->request['parentId'] ); + + /* Quick error checko */ + if ( ! $commentId OR ! $parentId ) + { + $this->returnString( 'error' ); + } + + array( 'parent_id' => 'id', + 'parent_owner_id' => 'member_id', + 'parent_parent_id' => 'img_album_id', + 'parent_title' => 'caption', + 'parent_seo_title' => 'caption_seo', + 'parent_date' => 'idate' ); + + # Get Edit form + try + { + $html = $this->_comments->displayEditForm( $parentId, $commentId, $this->memberData ); + + /* Get nav */ + $parent = $this->_comments->remapFromLocal( $this->_comments->fetchParent( $parentId ), 'parent' ); + + /* Output */ + $this->registry->getClass('output')->setTitle( $this->title ); + $this->registry->getClass('output')->addContent( $html ); + + $this->registry->getClass('output')->addNavigation( $this->lang->words['edit_comment'] . $parent['parent_title'], sprintf( $this->_comments->fetchSetting('urls-showParent'), $parentId ), $parent['parent_seo_title'] ); + + $this->registry->getClass('output')->sendOutput(); + } + catch ( Exception $error ) + { + $this->registry->getClass('output')->showError( 'no_permission', '1-global-comments-_showEdit-0', null, null, 403 ); + } + } + + /** + * Saves the post + * + * @access public + * @return void + */ + protected function _saveEdit() + { + /* INIT */ + $commentId = intval( $this->request['comment_id'] ); + $parentId = intval( $this->request['parentId'] ); + $post = IPSText::parseCleanValue( $_POST['Post'] ); + + /* Perm check (looks nice) */ + if ( $this->request['auth_key'] != $this->member->form_hash ) + { + $this->registry->getClass('output')->showError( 'posting_bad_auth_key', '1-global-comments-_saveEdit-0', null, null, 403 ); + } + + /* Quick error checko */ + if ( ! $parentId OR ! $commentId ) + { + $this->registry->getClass('output')->showError( 'no_permission', '1-global-comments-_saveEdit-1', null, null, 403 ); + } + + /* Edit */ + try + { + $this->_comments->edit( $parentId, $commentId, $_POST['Post'], $this->memberData ); + + $this->_comments->redirectToComment( $commentId, $parentId ); + } + catch ( Exception $error ) + { + $this->registry->getClass('output')->showError( 'no_permission', '1-global-comments-_saveEdit-2', null, null, 403 ); + } + } + + /** + * Add a comment via the magic and mystery of NORMAL POSTING FOOL + * + * @access protected + * @return void + */ + protected function _add() + { + /* init */ + $post = IPSText::parseCleanValue( $_POST['Post'] ); + $parentId = intval( $this->request['parentId'] ); + + /* Perm check (looks nice) */ + if ( $this->request['auth_key'] != $this->member->form_hash ) + { + $this->registry->getClass('output')->showError( 'posting_bad_auth_key', '1-global-comments-_add-0', null, null, 403 ); + } + + if ( $post AND $parentId ) + { + try + { + $newCommentId = $this->_comments->add( $parentId, $_POST['Post'] ); + + /* Redirect to find latest */ + $this->_comments->redirectToComment( 'last', $parentId ); + } + catch( Exception $e ) + { + $this->registry->output->showError( 'no_permission', '1-global-comments-_add-1', null, null, 403 ); + } + } + else + { + $this->registry->output->showError( 'no_permission', '1-global-comments-_add-2', null, null, 403 ); + } + } + + +} diff --git a/upload/admin/applications/core/modules_public/global/defaultSection.php b/upload/admin/applications/core/modules_public/global/defaultSection.php index c866bd9e..9d6a6500 100644 --- a/upload/admin/applications/core/modules_public/global/defaultSection.php +++ b/upload/admin/applications/core/modules_public/global/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default global section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_public/global/favorites.php b/upload/admin/applications/core/modules_public/global/favorites.php new file mode 100644 index 00000000..2a92307a --- /dev/null +++ b/upload/admin/applications/core/modules_public/global/favorites.php @@ -0,0 +1,322 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Image Ajax + * Last Updated: $LastChangedDate: 2010-08-18 16:55:30 +0100 (Wed, 18 Aug 2010) $ + * + * + * @author $Author: matt $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Gallery + * @link http://www.invisionpower.com + * @version $Rev: 6767 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_global_comments extends ipsCommand +{ + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + /* From App */ + $fromApp = trim( $this->request['fromApp'] ); + + /* Init some data */ + require_once( IPS_ROOT_PATH . 'sources/classes/comments/bootstrap.php' ); + $this->_comments = classes_comments_bootstrap::controller( $fromApp ); + + /* What to do? */ + switch( $this->request['do'] ) + { + case 'add': + $this->_add(); + break; + case 'delete': + $this->_delete(); + break; + case 'showEdit': + $this->_showEdit(); + break; + case 'saveEdit': + $this->_saveEdit(); + break; + case 'fetchReply': + $this->_fetchReply(); + break; + case 'moderate': + $this->_moderate(); + break; + case 'findLastComment': + $this->_findLastComment(); + break; + case 'findComment': + $this->_findComment(); + break; + } + } + + /** + * Find last page of comments + * + * @access protected + * @return void [Redirects] + */ + protected function _findLastComment() + { + /* Init */ + $parentId = intval( $this->request['parentId'] ); + + $this->_comments->redirectToComment( 'last', $parentId ); + } + + /** + * Find last page of comments + * + * @access protected + * @return void [Redirects] + */ + protected function _findComment() + { + /* Init */ + $parentId = intval( $this->request['parentId'] ); + $comment_id = intval( $this->request['comment_id'] ); + + $this->_comments->redirectToComment( $comment_id, $parentId ); + } + + /** + * Moderate + * + * @access protected + * @return void + */ + protected function _moderate() + { + $parentId = intval( $this->request['parentId'] ); + $commentIds = ( is_array( $_POST['commentIds'] ) ) ? IPSLib::cleanIntArray( $_POST['commentIds'] ) : array(); + $modact = trim( $this->request['modact'] ); + + if ( count( $commentIds ) ) + { + try + { + $this->_comments->moderate( $modact, $parentId, $commentIds, $this->memberData ); + + $this->returnJsonArray( array( 'msg' => 'ok' ) ); + } + catch( Exception $error ) + { + $this->returnJsonError( 'Error ' . $error->getMessage() . ' line: ' . $error->getFile() . '.' . $error->getLine() ); + } + } + } + + /** + * Reply + * + * @access public + * @return void + */ + protected function _fetchReply() + { + /* INIT */ + $commentId = intval( $this->request['comment_id'] ); + $parentId = intval( $this->request['parentId'] ); + + /* Quick error checko */ + if ( ! $commentId OR ! $parentId ) + { + $this->returnString( 'error' ); + } + + # Get Edit form + try + { + $html = $this->_comments->fetchReply( $parentId, $commentId, $this->memberData ); + + $this->returnString( $html ); + } + catch ( Exception $error ) + { + $this->returnString( 'Error ' . $error->getMessage() ); + } + } + + + /** + * Deletes a comment + * + * @access public + * @return void + */ + protected function _delete() + { + /* INIT */ + $commentId = intval( $this->request['comment_id'] ); + $parentId = intval( $this->request['parentId'] ); + + /* Perm check (looks nice) */ + if ( $this->request['auth_key'] != $this->member->form_hash ) + { + $this->registry->getClass('output')->showError( 'posting_bad_auth_key', '1-global-comments-_delete-0', null, null, 403 ); + } + + /* Quick error checko */ + if ( ! $commentId OR ! $parentId ) + { + $this->registry->getClass('output')->showError( 'no_permission', '1-global-comments-_delete-2', null, null, 403 ); + } + + try + { + $this->_comments->delete( $parentId, $commentId, $this->memberData ); + + /* Redirect to find latest */ + $this->_comments->redirectToComment( 'last', $parentId ); + } + catch ( Exception $error ) + { + $this->registry->getClass('output')->showError( 'no_permission', '1-global-comments-_delete-2', null, null, 403 ); + } + } + + /** + * Shows the edit box + * + * @access public + * @return void + */ + protected function _showEdit() + { + /* INIT */ + $commentId = intval( $this->request['comment_id'] ); + $parentId = intval( $this->request['parentId'] ); + + /* Quick error checko */ + if ( ! $commentId OR ! $parentId ) + { + $this->returnString( 'error' ); + } + + array( 'parent_id' => 'id', + 'parent_owner_id' => 'member_id', + 'parent_parent_id' => 'img_album_id', + 'parent_title' => 'caption', + 'parent_seo_title' => 'caption_seo', + 'parent_date' => 'idate' ); + + # Get Edit form + try + { + $html = $this->_comments->displayEditForm( $parentId, $commentId, $this->memberData ); + + /* Get nav */ + $parent = $this->_comments->remapFromLocal( $this->_comments->fetchParent( $parentId ), 'parent' ); + + /* Output */ + $this->registry->getClass('output')->setTitle( $this->title ); + $this->registry->getClass('output')->addContent( $html ); + + $this->registry->getClass('output')->addNavigation( $this->lang->words['edit_comment'] . $parent['parent_title'], sprintf( $this->_comments->fetchSetting('urls-showParent'), $parentId ), $parent['parent_seo_title'] ); + + $this->registry->getClass('output')->sendOutput(); + } + catch ( Exception $error ) + { + $this->registry->getClass('output')->showError( 'no_permission', '1-global-comments-_showEdit-0', null, null, 403 ); + } + } + + /** + * Saves the post + * + * @access public + * @return void + */ + protected function _saveEdit() + { + /* INIT */ + $commentId = intval( $this->request['comment_id'] ); + $parentId = intval( $this->request['parentId'] ); + $post = IPSText::parseCleanValue( $_POST['Post'] ); + + /* Perm check (looks nice) */ + if ( $this->request['auth_key'] != $this->member->form_hash ) + { + $this->registry->getClass('output')->showError( 'posting_bad_auth_key', '1-global-comments-_saveEdit-0', null, null, 403 ); + } + + /* Quick error checko */ + if ( ! $parentId OR ! $commentId ) + { + $this->registry->getClass('output')->showError( 'no_permission', '1-global-comments-_saveEdit-1', null, null, 403 ); + } + + /* Edit */ + try + { + $this->_comments->edit( $parentId, $commentId, $_POST['Post'], $this->memberData ); + + $this->_comments->redirectToComment( $commentId, $parentId ); + } + catch ( Exception $error ) + { + $this->registry->getClass('output')->showError( 'no_permission', '1-global-comments-_saveEdit-2', null, null, 403 ); + } + } + + /** + * Add a comment via the magic and mystery of NORMAL POSTING FOOL + * + * @access protected + * @return void + */ + protected function _add() + { + /* init */ + $post = IPSText::parseCleanValue( $_POST['Post'] ); + $parentId = intval( $this->request['parentId'] ); + + /* Perm check (looks nice) */ + if ( $this->request['auth_key'] != $this->member->form_hash ) + { + $this->registry->getClass('output')->showError( 'posting_bad_auth_key', '1-global-comments-_add-0', null, null, 403 ); + } + + if ( $post AND $parentId ) + { + try + { + $newCommentId = $this->_comments->add( $parentId, $_POST['Post'] ); + + /* Redirect to find latest */ + $this->_comments->redirectToComment( 'last', $parentId ); + } + catch( Exception $e ) + { + $this->registry->output->showError( 'no_permission', '1-global-comments-_add-1', null, null, 403 ); + } + } + else + { + $this->registry->output->showError( 'no_permission', '1-global-comments-_add-2', null, null, 403 ); + } + } + + +} diff --git a/upload/admin/applications/core/modules_public/global/index.html b/upload/admin/applications/core/modules_public/global/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_public/global/index.html +++ b/upload/admin/applications/core/modules_public/global/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/global/login.php b/upload/admin/applications/core/modules_public/global/login.php index 2223319f..f617b5c5 100644 --- a/upload/admin/applications/core/modules_public/global/login.php +++ b/upload/admin/applications/core/modules_public/global/login.php @@ -1,623 +1,525 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_core_global_login extends ipsCommand -{ - /** - * Login handler object - * - * @access protected - * @var object - */ - protected $han_login; - - /** - * Facebook connect class - * - * @access protected - * @var object - */ - private $_facebook; - - /** - * Initiate login handler - * - * @access public - * @return void - */ - public function initHanLogin() - { - require_once( IPS_ROOT_PATH . 'sources/handlers/han_login.php' ); - $this->han_login = new han_login( $this->registry ); - $this->han_login->init(); - } - - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen/redirects] - */ - public function doExecute( ipsRegistry $registry ) - { - /* Make object */ - $this->registry = $registry; - $this->DB = $this->registry->DB(); - $this->settings =& $this->registry->fetchSettings(); - $this->request =& $this->registry->fetchRequest(); - $this->lang = $this->registry->getClass('class_localization'); - $this->member = $this->registry->member(); - $this->memberData =& $this->registry->member()->fetchMemberData(); - $this->cache = $this->registry->cache(); - $this->caches =& $this->registry->cache()->fetchCaches(); - - $this->registry->getClass( 'class_localization' )->loadLanguageFile( array( 'public_login' ), 'core' ); - - //----------------------------------------- - // Load handler... - //----------------------------------------- - - $this->initHanLogin(); - - //----------------------------------------- - // INIT Facebook - //----------------------------------------- - - if ( IPSLib::fbc_enabled() ) - { - require_once( IPS_ROOT_PATH . 'sources/classes/facebook/connect.php' ); - $this->_facebook = new facebook_connect( $registry ); - } - - //----------------------------------------- - // Are we enforcing log ins? - //----------------------------------------- - - $msg = ""; - - if ( !$this->request['do'] == 'showForm' AND $this->settings['force_login'] == 1 ) - { - $msg = 'admin_force_log_in'; - } - - //----------------------------------------- - // What to do? - //----------------------------------------- - - switch( $this->request['do'] ) - { - case 'fbc_login': - $return = $this->fbcLogin(); - break; - case 'fbc_loginFromLinked': - $return = $this->fbcLoginFromLinked(); - break; - case 'fbc_loginWithNew': - $return = $this->fbcLoginWithNew(); - break; - case 'process': - $return = $this->doLogin(); - - if( $return[2] ) - { - //$this->registry->getClass('output')->showError( $return[2], 1014 ); - $this->loginForm( $return[2], $return[3] ); - } - else - { - $this->registry->getClass('output')->redirectScreen( $return[0], $return[1], 'false' ); - } - break; - - case 'logout': - $return = $this->doLogout(); - - /* URL */ - $return[2] = $return[2] ? $return[2] : ''; - - if( $return[0] == 'immediate' ) - { - $this->registry->getClass('output')->silentRedirect( $return[2] ); - } - else - { - $this->registry->getClass('output')->redirectScreen( $return[1], $return[2], 'false' ); - } - break; - - case 'deleteCookies': - $return = $this->deleteCookies(); - $this->registry->getClass('output')->silentRedirect( $this->settings['base_url'] ); - break; - - case 'autologin': - $return = $this->autoLogin(); - break; - - case 'showForm': - default: - $return = $this->loginForm($msg); - break; - } - - //----------------------------------------- - // If we have any HTML to print, do so... - //----------------------------------------- - - $this->registry->getClass('output')->addContent("$this->output"); - $this->registry->getClass('output')->sendOutput( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) ); - } - - /** - * FB Log in from a new account - * Function is called when IPB has detected a FB user that is linked to an IPB user - * - * @access public - * @return void Redirects user - */ - public function fbcLoginWithNew() - { - try - { - $result = $this->_facebook->loginWithNewAccount(); - - $this->registry->getClass('output')->redirectScreen( $result[0], $result[1], true ); - } - catch( Exception $error ) - { - $msg = $error->getMessage(); - - switch( $msg ) - { - default: - case 'NO_FACEBOOK_USER_LOGGED_IN': - case 'NO_FB_EMAIL': - case 'CREATION_FAIL': - $this->registry->getClass('output')->showError( 'fbc_authorization_screwup', 1005 ); - break; - } - } - } - - /** - * FB Log in from a linked account - * Function is called when IPB has detected a FB user that is linked to an IPB user - * - * @access public - * @return void Redirects user - */ - public function fbcLoginFromLinked() - { - try - { - $result = $this->_facebook->loginWithExistingLink(); - - $this->registry->getClass('output')->redirectScreen( $result[0], $result[1], true ); - } - catch( Exception $error ) - { - $msg = $error->getMessage(); - - switch( $msg ) - { - default: - case 'NO_FACEBOOK_USER_LOGGED_IN': - case 'NO_LINKED_MEMBER': - $this->registry->getClass('output')->showError( 'fbc_authorization_screwup', 1005 ); - break; - } - } - } - - /** - * FB Log in - * Function is called when IPB has detected a FB user and they've authorized by ajax. - * - * @access public - * @return void Redirects user - */ - public function fbcLogin() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $email = $this->request['emailaddress']; - $password = $this->request['password']; - - try - { - $result = $this->_facebook->loginWithCreateLink( $email, $password ); - - $this->registry->getClass('output')->redirectScreen( $result[0], $result[1], true ); - } - catch( Exception $error ) - { - $msg = $error->getMessage(); - - switch( $msg ) - { - default: - case 'NO_FACEBOOK_USER_LOGGED_IN': - case 'AUTH_FAIL': - case 'ALREADY_LINKED': - $this->registry->getClass('output')->showError( 'fbc_authorization_screwup', 1005 ); - break; - } - } - } - - /** - * Attempt to automatically log a user in - * - * @access public - * @return array [0=Words to display,1=URL to send to] - */ - public function autoLogin() - { - /* Verify the login */ - $this->han_login->verifyLogin(); - - /* Lang Bits */ - $true_words = $this->lang->words['logged_in']; - $false_words = $this->lang->words['not_logged_in']; - $method = 'no_show'; - - /* Register Redirect */ - if ($this->request['fromreg'] == 1) - { - $true_words = $this->lang->words['reg_log_in']; - $false_words = $this->lang->words['reg_not_log_in']; - $method = 'show'; - } - /* Email Redirect */ - else if ($this->request['fromemail'] == 1) - { - $true_words = $this->lang->words['email_log_in']; - $false_words = $this->lang->words['email_not_log_in']; - $method = 'show'; - } - /* Password Redirect */ - else if ($this->request['frompass'] == 1) - { - $true_words = $this->lang->words['pass_log_in']; - $false_words = $this->lang->words['pass_not_log_in']; - $method = 'show'; - } - - if( $this->memberData[ 'member_id' ] ) - { - /* Member Sync */ - IPSLib::runMemberSync( 'onLogin', $this->memberData ); - - if ( ! $this->request['fromreg'] ) - { - IPSCookie::set('session_id', '0', -1 ); - } - - if( $method == 'show' ) - { - $this->registry->getClass('output')->redirectScreen( $true_words, $this->settings['base_url'] ); - } - else - { - $this->registry->getClass('output')->silentRedirect( $this->settings['board_url'] . '/index.php' ); - } - } - else - { - if( $method == 'show' ) - { - $this->registry->getClass('output')->redirectScreen( $false_words, $this->settings['base_url'] . 'app=core&module=global§ion=login' ); - } - else - { - $this->registry->getClass('output')->silentRedirect( $this->settings['base_url'] . 'app=core&module=global§ion=login' ); - } - } - } - - /** - * Delete a user's cookies - * - * @access public - * @param boolean Check the key - * @return mixed Output error page if key checking fails, else boolean true - */ - public function deleteCookies( $check_key=true ) - { - //----------------------------------------- - // Check the md5 key - //----------------------------------------- - - if( $check_key ) - { - $key = $this->request['k']; - - if ( $key != $this->member->form_hash ) - { - $this->registry->getClass('output')->showError( 'bad_delete_cookies_key', 2010 ); - } - } - - //----------------------------------------- - // Wipe out any forum password cookies - //----------------------------------------- - - if ( is_array($_COOKIE) ) - { - foreach( $_COOKIE as $cookie => $value ) - { - if ( stripos( $cookie, $this->settings['cookie_id']."ipbforum" ) !== false ) - { - IPSCookie::set( str_replace( $this->settings['cookie_id'], "", $cookie ) , '-', -1 ); - } - - if ( stripos( $cookie, $this->settings['cookie_id']."itemMarking_" ) !== false ) - { - IPSCookie::set( str_replace( $this->settings['cookie_id'], "", $cookie ) , '-', -1 ); - } - } - } - - //----------------------------------------- - // And the rest of the cookies - //----------------------------------------- - - IPSCookie::set('pass_hash' , '-1'); - IPSCookie::set('member_id' , '-1'); - IPSCookie::set('session_id', '-1'); - IPSCookie::set('anonlogin' , '-1'); - - return true; - } - - /** - * Show the login form - * - * @access public - * @param string Message to show on login form - * @return string Login form HTML - */ - public function loginForm( $message="", $replacement='' ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $extra_form = ""; - $show_form = 1; - $template = ''; - - //----------------------------------------- - // Are they banned? - //----------------------------------------- - - if ( IPSMember::isBanned( 'ip', $this->member->ip_address ) ) - { - $this->registry->getClass('output')->showError( 'you_are_banned', 2011 ); - } - - if ( $message != "" ) - { - if( $replacement ) - { - $message = sprintf( $this->lang->words[ $message ], $replacement ); - } - else - { - $message = $this->lang->words[ $message ]; - } - $name = $this->request['UserName'] ? $this->request['UserName'] : $this->request['address']; - $message = str_replace( "<#NAME#>", "" . $name . "", $message ); - - $template .= $this->registry->getClass('output')->getTemplate('login')->errors($message); - } - - //----------------------------------------- - // Using an alternate log in form? - //----------------------------------------- - - $this->han_login->checkLoginUrlRedirect(); - - //----------------------------------------- - // Extra HTML? - //----------------------------------------- - - $additionalForm = $this->han_login->additionalFormHTML(); - - if ( count($additionalForm[1]) ) - { - if ( $additionalForm[0] == 'add' ) - { - $extra_form = $additionalForm[1]; - $show_form = 1; - } - else - { - $template .= $additionalForm[1]; - $show_form = 0; - } - } - - //----------------------------------------- - // Continue... - //----------------------------------------- - - if ( $show_form ) - { - if( $this->request['referer'] ) - { - $http_referrer = $this->request['referer']; - } - else if ( !my_getenv('HTTP_REFERER') OR stripos( my_getenv('HTTP_REFERER'), $this->settings['board_url'] ) === false ) - { - $http_referrer = ( strtolower($_SERVER['HTTPS']) == 'on' ? "https://" : "http://" ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; - } - else - { - $http_referrer = my_getenv('HTTP_REFERER'); - } - - $facebookOpts = array(); - $login_methods = false; - $uses_name = false; - $uses_email = false; - - foreach( $this->cache->getCache('login_methods') as $method ) - { - $login_methods[ $method['login_folder_name'] ] = $method['login_folder_name']; - - if( $method['login_user_id'] == 'username' ) - { - $uses_name = true; - } - - if( $method['login_user_id'] == 'email' ) - { - $uses_email = true; - } - } - - if( $uses_name AND $uses_email ) - { - $this->lang->words['enter_name'] = $this->lang->words['enter_name_and_email']; - } - else if( $uses_email ) - { - $this->lang->words['enter_name'] = $this->lang->words['enter_useremail']; - } - else - { - $this->lang->words['enter_name'] = $this->lang->words['enter_username']; - } - - $template .= $this->registry->getClass('output')->getTemplate('login')->showLogInForm( $this->lang->words['please_log_in'], htmlentities(urldecode($http_referrer)), $extra_form, $login_methods, $facebookOpts ); - } - - /* Work around for bug http://bugs.developers.facebook.com/show_bug.cgi?id=3237 */ - if ( IPSLib::fbc_enabled() ) - { - $this->_facebook->testConnectSession(); - } - - $this->registry->getClass('output')->addNavigation( $this->lang->words['log_in'], '' ); - $this->registry->getClass('output')->setTitle( $this->lang->words['log_in'] ); - $this->registry->getClass('output')->addContent( $template ); - $this->registry->getClass('output')->sendOutput( ); - } - - /** - * Verify login form submission and log user in - * - * @access public - * @return mixed array [0=Words to show, 1=URL to send to, 2=error array] - */ - public function doLogin() - { - return $this->han_login->verifyLogin(); - } - - /** - * Log a user out - * - * @access public - * @param integer Flag to check md5 key - * @return mixed Error message or array [0=immediate|redirect, 1=words to show, 2=URL to send to] - */ - public function doLogout( $check_key=true ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - if ( $check_key ) - { - $key = $this->request['k']; - - # Check for funny business - if ( $key != $this->member->form_hash ) - { - $this->registry->getClass('output')->showError( 'bad_logout_key', 2012 ); - } - } - - //----------------------------------------- - // Set some cookies - //----------------------------------------- - - IPSCookie::set( "member_id" , "0" ); - IPSCookie::set( "pass_hash" , "0" ); - IPSCookie::set( "anonlogin" , "-1" ); - - if( is_array( $_COOKIE ) ) - { - foreach( $_COOKIE as $cookie => $value) - { - if ( stripos( $cookie, $this->settings['cookie_id'] . 'ipbforumpass' ) !== false ) - { - IPSCookie::set( $cookie, '-', -1 ); - } - } - } - - //----------------------------------------- - // Logout callbacks... - //----------------------------------------- - - $this->han_login->logoutCallback(); - - //----------------------------------------- - // Do it.. - //----------------------------------------- - - $this->member->sessionClass()->convertMemberToGuest(); - - list( $privacy, $loggedin ) = explode( '&', $this->memberData['login_anonymous'] ); - - IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'login_anonymous' => "{$privacy}&0", - 'last_activity' => time() ) ) ); - - - //----------------------------------------- - // Return.. - //----------------------------------------- - - $url = ""; - - if ( $this->request['return'] AND $this->request['return'] != "" ) - { - $return = urldecode($this->request['return']); - - if ( strpos( $return, "http://" ) === 0 ) - { - return array( 'immediate', '', $return ); - } - } - - return array( 'redirect', $this->lang->words['thanks_for_logout'], $this->settings['base_url'] . 'act=idx' ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Login handler abstraction + * Last Updated: $Date: 2010-10-07 18:12:54 -0400 (Thu, 07 Oct 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since Tuesday 1st March 2005 (11:52) + * @version $Revision: 6954 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_global_login extends ipsCommand +{ + /** + * Login handler object + * + * @access protected + * @var object + */ + protected $han_login; + + /** + * Facebook connect class + * + * @access protected + * @var object + */ + private $_facebook; + + /** + * Initiate login handler + * + * @access public + * @return 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->init(); + } + + /** + * Class entry point + * + * @access public + * @param object Registry reference + * @return void [Outputs to screen/redirects] + */ + public function doExecute( ipsRegistry $registry ) + { + /* Make object */ + $this->registry = $registry; + $this->DB = $this->registry->DB(); + $this->settings =& $this->registry->fetchSettings(); + $this->request =& $this->registry->fetchRequest(); + $this->lang = $this->registry->getClass('class_localization'); + $this->member = $this->registry->member(); + $this->memberData =& $this->registry->member()->fetchMemberData(); + $this->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + + $this->registry->getClass( 'class_localization' )->loadLanguageFile( array( 'public_login' ), 'core' ); + + //----------------------------------------- + // Load handler... + //----------------------------------------- + + $this->initHanLogin(); + + //----------------------------------------- + // Are we enforcing log ins? + //----------------------------------------- + + $msg = ""; + + if ( !$this->request['do'] == 'showForm' AND $this->settings['force_login'] == 1 ) + { + $msg = 'admin_force_log_in'; + } + + //----------------------------------------- + // Meta tags + //----------------------------------------- + + $this->registry->output->addMetaTag( 'robots', 'noindex' ); + + //----------------------------------------- + // What to do? + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'process': + $return = $this->doLogin(); + + if( $return[2] ) + { + //$this->registry->getClass('output')->showError( $return[2], 1014 ); + $this->loginForm( $return[2], $return[3] ); + } + else + { + $this->registry->getClass('output')->redirectScreen( $return[0], $return[1], 'false' ); + } + break; + + case 'logout': + $return = $this->doLogout(); + + /* URL */ + $return[2] = $return[2] ? $return[2] : ''; + + if( $return[0] == 'immediate' ) + { + $this->registry->getClass('output')->silentRedirect( $return[2] ); + } + else + { + $this->registry->getClass('output')->redirectScreen( $return[1], $return[2], 'false' ); + } + break; + + case 'deleteCookies': + $return = $this->deleteCookies(); + $this->registry->getClass('output')->silentRedirect( $this->settings['base_url'] ); + break; + + case 'autologin': + $return = $this->autoLogin(); + break; + + case 'showForm': + default: + $return = $this->loginForm($msg); + break; + } + + //----------------------------------------- + // If we have any HTML to print, do so... + //----------------------------------------- + + $this->registry->getClass('output')->addContent( $this->output ); + $this->registry->getClass('output')->sendOutput(); + } + + /** + * Attempt to automatically log a user in + * + * @access public + * @return array [0=Words to display,1=URL to send to] + */ + public function autoLogin() + { + /* Verify the login */ + $this->han_login->verifyLogin(); + + /* Lang Bits */ + $true_words = $this->lang->words['logged_in']; + $false_words = $this->lang->words['not_logged_in']; + $method = 'no_show'; + + /* Register Redirect */ + if ($this->request['fromreg'] == 1) + { + $true_words = $this->lang->words['reg_log_in']; + $false_words = $this->lang->words['reg_not_log_in']; + $method = 'show'; + } + /* Email Redirect */ + else if ($this->request['fromemail'] == 1) + { + $true_words = $this->lang->words['email_log_in']; + $false_words = $this->lang->words['email_not_log_in']; + $method = 'show'; + } + /* Password Redirect */ + else if ($this->request['frompass'] == 1) + { + $true_words = $this->lang->words['pass_log_in']; + $false_words = $this->lang->words['pass_not_log_in']; + $method = 'show'; + } + + if( $this->memberData[ 'member_id' ] ) + { + /* Member Sync */ + IPSLib::runMemberSync( 'onLogin', $this->memberData ); + + if ( ! $this->request['fromreg'] ) + { + IPSCookie::set('session_id', '0', -1 ); + } + + if( $method == 'show' ) + { + $this->registry->getClass('output')->redirectScreen( $true_words, $this->settings['base_url'] ); + } + else + { + $this->registry->getClass('output')->silentRedirect( $this->settings['board_url'] . '/index.php' ); + } + } + else + { + if( $method == 'show' ) + { + $this->registry->getClass('output')->redirectScreen( $false_words, $this->settings['base_url'] . 'app=core&module=global§ion=login' ); + } + else + { + $this->registry->getClass('output')->silentRedirect( $this->settings['base_url'] . 'app=core&module=global§ion=login' ); + } + } + } + + /** + * Delete a user's cookies + * + * @access public + * @param boolean Check the key + * @return mixed Output error page if key checking fails, else boolean true + */ + public function deleteCookies( $check_key=true ) + { + //----------------------------------------- + // Check the md5 key + //----------------------------------------- + + if( $check_key ) + { + $key = $this->request['k']; + + if ( $key != $this->member->form_hash ) + { + $this->registry->getClass('output')->showError( 'bad_delete_cookies_key', 2010 ); + } + } + + //----------------------------------------- + // Wipe out any forum password cookies + //----------------------------------------- + + if ( is_array($_COOKIE) ) + { + foreach( $_COOKIE as $cookie => $value ) + { + if ( stripos( $cookie, $this->settings['cookie_id']."ipbforum" ) !== false ) + { + IPSCookie::set( str_replace( $this->settings['cookie_id'], "", $cookie ), '-', -1 ); + } + + if ( stripos( $cookie, $this->settings['cookie_id']."itemMarking_" ) !== false ) + { + IPSCookie::set( str_replace( $this->settings['cookie_id'], "", $cookie ), '-', -1 ); + } + } + } + + //----------------------------------------- + // And the rest of the cookies + //----------------------------------------- + + IPSCookie::set('pass_hash' , '-1'); + IPSCookie::set('member_id' , '-1'); + IPSCookie::set('session_id', '-1'); + IPSCookie::set('anonlogin' , '-1'); + + return true; + } + + /** + * Show the login form + * + * @access public + * @param string Message to show on login form + * @return string Login form HTML + */ + public function loginForm( $message="", $replacement='' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $extra_form = ""; + $show_form = 1; + $template = ''; + $serviceClick = trim( $this->request['serviceClick'] ); + + //----------------------------------------- + // Are they banned? + //----------------------------------------- + + if ( IPSMember::isBanned( 'ip', $this->member->ip_address ) ) + { + $this->registry->getClass('output')->showError( 'you_are_banned', 2011, null, null, 403 ); + } + + if ( $message != "" ) + { + if( $replacement ) + { + $message = sprintf( $this->lang->words[ $message ], $replacement ); + } + else + { + $message = $this->lang->words[ $message ]; + } + $name = $this->request['UserName'] ? $this->request['UserName'] : $this->request['address']; + $message = str_replace( "<#NAME#>", "" . $name . "", $message ); + + $template .= $this->registry->getClass('output')->getTemplate('login')->errors($message); + } + + //----------------------------------------- + // Using an alternate log in form? + //----------------------------------------- + + $this->han_login->checkLoginUrlRedirect(); + + /* Did we click a service? */ + if ( $serviceClick ) + { + switch ($serviceClick) + { + case 'facebook': + $this->registry->getClass('output')->silentRedirect( $this->settings['_original_base_url'] . "/interface/facebook/index.php?reg=1" ); + break; + case 'twitter': + $this->registry->getClass('output')->silentRedirect( $this->settings['_original_base_url'] . "/interface/twitter/index.php?reg=1" ); + break; + } + } + + //----------------------------------------- + // Extra HTML? + //----------------------------------------- + + $additionalForm = $this->han_login->additionalFormHTML(); + + if ( count($additionalForm[1]) ) + { + if ( $additionalForm[0] == 'add' ) + { + $extra_form = $additionalForm[1]; + $show_form = 1; + } + else + { + $template .= $additionalForm[1]; + $show_form = 0; + } + } + + //----------------------------------------- + // Continue... + //----------------------------------------- + + if ( $show_form ) + { + if( $this->request['referer'] ) + { + $http_referrer = $this->request['referer']; + } + else + { + $http_referrer = my_getenv('HTTP_REFERER'); + } + + $facebookOpts = array(); + $login_methods = false; + $uses_name = false; + $uses_email = false; + + foreach( $this->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['enter_name'] = $this->lang->words['enter_name_and_email']; + } + else if( $uses_email ) + { + $this->lang->words['enter_name'] = $this->lang->words['enter_useremail']; + } + else + { + $this->lang->words['enter_name'] = $this->lang->words['enter_username']; + } + + $template .= $this->registry->getClass('output')->getTemplate('login')->showLogInForm( $this->lang->words['please_log_in'], htmlentities(urldecode($http_referrer)), $extra_form, $login_methods, $facebookOpts ); + } + + + $this->registry->getClass('output')->addNavigation( $this->lang->words['log_in'], '' ); + $this->registry->getClass('output')->setTitle( $this->lang->words['log_in'] . ' - ' . ipsRegistry::$settings['board_name'] ); + $this->registry->getClass('output')->addContent( $template ); + $this->registry->getClass('output')->sendOutput( ); + } + + /** + * Verify login form submission and log user in + * + * @access public + * @return mixed array [0=Words to show, 1=URL to send to, 2=error array] + */ + public function doLogin() + { + if ( $this->request['auth_key'] != $this->member->form_hash ) + { + $this->registry->getClass('output')->showError( 'login_no_authkey', 10193, null, null, 403 ); + } + + return $this->han_login->verifyLogin(); + } + + /** + * Log a user out + * + * @access public + * @param integer Flag to check md5 key + * @return mixed Error message or array [0=immediate|redirect, 1=words to show, 2=URL to send to] + */ + public function doLogout( $check_key=true ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + if ( $check_key ) + { + $key = $this->request['k']; + + # Check for funny business + if ( $key != $this->member->form_hash ) + { + $this->registry->getClass('output')->showError( 'bad_logout_key', 2012 ); + } + } + + //----------------------------------------- + // Set some cookies + //----------------------------------------- + + IPSCookie::set( "member_id" , "0" ); + IPSCookie::set( "pass_hash" , "0" ); + IPSCookie::set( "anonlogin" , "-1" ); + + if( is_array( $_COOKIE ) ) + { + foreach( $_COOKIE as $cookie => $value) + { + if ( stripos( $cookie, $this->settings['cookie_id'] . 'ipbforumpass' ) !== false AND ! strstr( $value, 'mobileApp' ) ) + { + IPSCookie::set( str_replace( $this->settings['cookie_id'], "", $cookie ), '-', -1 ); + } + } + } + + //----------------------------------------- + // Do it.. + //----------------------------------------- + + $this->member->sessionClass()->convertMemberToGuest(); + + list( $privacy, $loggedin ) = explode( '&', $this->memberData['login_anonymous'] ); + + IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'login_anonymous' => "{$privacy}&0", + 'last_activity' => time() ) ) ); + + //----------------------------------------- + // Logout callbacks... + //----------------------------------------- + + IPSLib::runMemberSync( 'onLogOut', $this->memberData ); + + $this->han_login->logoutCallback(); + + //----------------------------------------- + // Return.. + //----------------------------------------- + + $url = ""; + + if ( $this->request['return'] AND $this->request['return'] != "" ) + { + $return = urldecode($this->request['return']); + + if ( strpos( $return, "http://" ) === 0 ) + { + return array( 'immediate', '', $return ); + } + } + + return array( 'redirect', $this->lang->words['thanks_for_logout'], $this->settings['base_url'] ); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/global/lostpass.php b/upload/admin/applications/core/modules_public/global/lostpass.php index 842560c5..6fa72105 100644 --- a/upload/admin/applications/core/modules_public/global/lostpass.php +++ b/upload/admin/applications/core/modules_public/global/lostpass.php @@ -1,490 +1,498 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_core_global_lostpass extends ipsCommand -{ - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen/redirects] - */ - public function doExecute( ipsRegistry $registry ) - { - /* Load language */ - $this->registry->class_localization->loadLanguageFile( array( 'public_register' ), 'core' ); - - /* What to do */ - switch( $this->request['do'] ) - { - case 'sendform': - $this->lostPasswordValidateForm(); - break; - - case '11': - $this->lostPasswordEnd(); - break; - - case '03': - $this->lostPasswordValidate(); - break; - - default: - case '10': - $this->lostPasswordForm(); - break; - } - - /* Output */ - $this->registry->output->addContent( $this->output ); - $this->registry->output->sendOutput(); - } - - /** - * Validates a lost password request - * - * @access public - * @return void - */ - public function lostPasswordValidate() - { - /* Check for input and it's in a valid format. */ - $in_user_id = intval( trim( urldecode( $this->request['uid'] ) ) ); - $in_validate_key = IPSText::md5Clean( trim( urldecode( $this->request['aid'] ) ) ); - - /* Check Input */ - if( ! $in_validate_key ) - { - $this->registry->output->showError( 'validation_key_incorrect', 1015 ); - } - - if( ! preg_match( "/^(?:\d){1,}$/", $in_user_id ) ) - { - $this->registry->output->showError( 'uid_key_incorrect', 1016 ); - } - - /* Attempt to get the profile of the requesting user */ - $member = IPSMember::load( $in_user_id ); - - if( ! $member['member_id'] ) - { - $this->registry->output->showError( 'lostpass_no_member', 1017 ); - } - - /* Get validating info.. */ - $validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id=' . $in_user_id . ' and lost_pass=1' ) ); - - if( ! $validate['member_id'] ) - { - $this->registry->output->showError( 'lostpass_not_validating', 1018 ); - } - - if( ( $validate['new_reg'] == 1 ) && ( $this->settings['reg_auth_type'] == "admin" ) ) - { - $this->registry->output->showError( 'lostpass_new_reg', 4010, true ); - } - - if( $validate['vid'] != $in_validate_key ) - { - $this->registry->output->showError( 'lostpass_key_wrong', 1019 ); - } - else - { - /* On the same page? */ - if( $validate['lost_pass'] != 1 ) - { - $this->registry->output->showError( 'lostpass_not_lostpass', 4011, true ); - } - - /* Test GD image */ - if( $this->settings['bot_antispam'] ) - { - if ( $this->registry->getClass('class_captcha')->validate() !== TRUE ) - { - $this->lostPasswordValidateForm( 'err_reg_code' ); - return; - } - } - - /* Send a new random password? */ - if( $this->settings['lp_method'] == 'random' ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $save_array = array(); - - //----------------------------------------- - // Generate a new random password - //----------------------------------------- - - $new_pass = IPSLib::makePassword(); - - //----------------------------------------- - // Generate a new salt - //----------------------------------------- - - $salt = IPSMember::generatePasswordSalt(5); - $salt = str_replace( '\\', "\\\\", $salt ); - - //----------------------------------------- - // New log in key - //----------------------------------------- - - $key = IPSMember::generateAutoLoginKey(); - - //----------------------------------------- - // Update... - //----------------------------------------- - - $save_array['members_pass_salt'] = $salt; - $save_array['members_pass_hash'] = md5( md5($salt) . md5( $new_pass ) ); - $save_array['member_login_key'] = $key; - $save_array['member_login_key_expire'] = $this->settings['login_key_expire'] * 60 * 60 * 24; - $save_array['failed_logins'] = null; - $save_array['failed_login_count'] = 0; - - //----------------------------------------- - // Load handler... - //----------------------------------------- - - require_once( IPS_ROOT_PATH.'sources/handlers/han_login.php' ); - $this->han_login = new han_login( $this->registry ); - $this->han_login->init(); - $this->han_login->changePass( $member['email'], md5( $new_pass ) ); - - if ( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) - { - $this->registry->output->showError( $this->lang->words['lostpass_external_fail'], 2013 ); - } - - IPSMember::save( $member['member_id'], array( 'members' => $save_array ) ); - - //----------------------------------------- - // Send out the email... - //----------------------------------------- - - IPSText::getTextClass('email')->getTemplate("lost_pass_email_pass"); - - IPSText::getTextClass('email')->buildMessage( array( - 'NAME' => $member['members_display_name'], - 'THE_LINK' => $this->settings['base_url'] . 'app=core&module=usercp&tab=core&area=password', - 'PASSWORD' => $new_pass, - 'LOGIN' => $this->settings['base_url'] . 'app=core&module=global§ion=login', - 'USERNAME' => $member['name'], - 'EMAIL' => $member['email'], - 'ID' => $member['member_id'], - ) - ); - - IPSText::getTextClass('email')->subject = $this->lang->words['lp_random_pass_subject'] . ' ' . $this->settings['board_name']; - IPSText::getTextClass('email')->to = $member['email']; - - IPSText::getTextClass('email')->sendMail(); - - $this->registry->output->setTitle( $this->lang->words['activation_form'] ); - $this->output = $this->registry->getClass('output')->getTemplate('register')->showLostPassWaitRandom( $member ); - } - else - { - if( $_POST['pass1'] == "" ) - { - $this->registry->output->showError( 'pass_blank', 10184 ); - } - - if( $_POST['pass2'] == "" ) - { - $this->registry->output->showError( 'pass_blank', 10185 ); - } - - $pass_a = trim( $this->request['pass1'] ); - $pass_b = trim( $this->request['pass2'] ); - - if( strlen( $pass_a ) < 3 ) - { - $this->registry->output->showError( 'pass_too_short', 10186 ); - } - - if( $pass_a != $pass_b ) - { - $this->registry->output->showError( 'pass_no_match', 10187 ); - } - - $new_pass = md5( $pass_a ); - - /* Update Member Array */ - $save_array = array(); - - /* Generate a new salt */ - $salt = IPSMember::generatePasswordSalt(5); - $salt = str_replace( '\\', "\\\\", $salt ); - - /* New log in key */ - $key = IPSMember::generateAutoLoginKey(); - - /* Update Array */ - $save_array['members_pass_salt'] = $salt; - $save_array['members_pass_hash'] = md5( md5($salt) . $new_pass ); - $save_array['member_login_key'] = $key; - $save_array['member_login_key_expire'] = $this->settings['login_key_expire'] * 60 * 60 * 24; - $save_array['failed_logins'] = null; - $save_array['failed_login_count'] = 0; - - /* Change the password */ - require_once( IPS_ROOT_PATH.'sources/handlers/han_login.php' ); - $this->han_login = new han_login( $this->registry ); - $this->han_login->init(); - $this->han_login->changePass( $member['email'], md5( $new_pass ) ); - - //----------------------------------------- - // We'll ignore any remote errors - //----------------------------------------- - - if( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) - { - // Pass not changed remotely - } - - /* Update the member */ - IPSMember::save( $member['member_id'], array( 'members' => $save_array ) ); - - /* Remove "dead" validation */ - $this->DB->delete( 'validating', "vid='{$validate['vid']}' OR (member_id={$member['member_id']} AND lost_pass=1)" ); - - $this->registry->output->silentRedirect( $this->settings['base_url'] . '&app=core&module=global§ion=login&do=autologin&frompass=1' ); - } - } - } - - /** - * Completes the lost password request form - * - * @access public - * @return void - */ - public function lostPasswordEnd() - { - if( $this->settings['bot_antispam'] ) - { - if( !$this->registry->getClass('class_captcha')->validate( $this->request['regid'], $this->request['reg_code'] ) ) - { - $this->lostPasswordForm( 'err_reg_code' ); - return; - } - } - - /* Back to the usual programming! :o */ - if( $this->request['member_name'] == "" AND $this->request['email_addy'] == "" ) - { - $this->registry->output->showError( 'lostpass_name_email', 10110 ); - } - - /* Check for input and it's in a valid format. */ - $member_name = trim( mb_strtolower( $this->request['member_name'] ) ); - $email_addy = trim( mb_strtolower( $this->request['email_addy'] ) ); - - if( $member_name == "" AND $email_addy == "" ) - { - $this->registry->output->showError( 'lostpass_name_email', 10111 ); - } - - /* Attempt to get the user details from the DB */ - if( $member_name ) - { - $this->DB->build( array( 'select' => 'members_display_name, name, member_id, email, member_group_id', 'from' => 'members', 'where' => "members_l_username='{$member_name}'" ) ); - $this->DB->execute(); - } - else if( $email_addy ) - { - $this->DB->build( array( 'select' => 'members_display_name, name, member_id, email, member_group_id', 'from' => 'members', 'where' => "email='{$email_addy}'" ) ); - $this->DB->execute(); - } - - if ( ! $this->DB->getTotalRows() ) - { - $this->registry->output->showError( 'lostpass_no_user', 10112 ); - } - else - { - $member = $this->DB->fetch(); - - /* Is there a validation key? If so, we'd better not touch it */ - if( $member['member_id'] == "" ) - { - $this->registry->output->showError( 'lostpass_no_mid', 2014 ); - } - - $validate_key = md5( IPSLib::makePassword() . uniqid( mt_rand(), TRUE ) ); - - /* Get rid of old entries for this member */ - $this->DB->delete( 'validating', "member_id={$member['member_id']} AND lost_pass=1" ); - - /* Update the DB for this member. */ - $db_str = array( - 'vid' => $validate_key, - 'member_id' => $member['member_id'], - 'temp_group' => $member['member_group_id'], - 'entry_date' => time(), - 'coppa_user' => 0, - 'lost_pass' => 1, - 'ip_address' => $this->member->ip_address, - ); - - /* Are they already in the validating group? */ - if( $member['member_group_id'] != $this->settings['auth_group'] ) - { - $db_str['real_group'] = $member['member_group_id']; - } - - $this->DB->insert( 'validating', $db_str ); - - /* Send out the email. */ - IPSText::getTextClass('email')->getTemplate( 'lost_pass' ); - - IPSText::getTextClass('email')->buildMessage( array( - 'NAME' => $member['members_display_name'], - 'THE_LINK' => $this->settings['base_url']."app=core&module=global§ion=lostpass&do=sendform&uid=".$member['member_id']."&aid=".$validate_key, - 'MAN_LINK' => $this->settings['base_url']."app=core&module=global§ion=lostpass&do=sendform", - 'EMAIL' => $member['email'], - 'ID' => $member['member_id'], - 'CODE' => $validate_key, - 'IP_ADDRESS' => $this->member->ip_address, - ) - ); - - IPSText::getTextClass('email')->subject = $this->lang->words['lp_subject'] . ' ' . $this->settings['board_name']; - IPSText::getTextClass('email')->to = $member['email']; - IPSText::getTextClass('email')->sendMail(); - - $this->output = $this->registry->getClass('output')->getTemplate('register')->lostPasswordWait( $member ); - } - - $this->registry->output->setTitle( $this->lang->words['lost_pass_form'] ); - } - - /** - * Displays the lost password form - * - * @access public - * @param string $errors - * @return void - */ - public function lostPasswordForm( $errors="" ) - { - //----------------------------------------- - // Do we have another URL for password resets? - //----------------------------------------- - - require_once( IPS_ROOT_PATH . 'sources/handlers/han_login.php' ); - $han_login = new han_login( $this->registry ); - $han_login->init(); - $han_login->checkMaintenanceRedirect(); - - /* CAPTCHA */ - if( $this->settings['bot_antispam'] ) - { - $captchaHTML = $this->registry->getClass('class_captcha')->getTemplate(); - } - - $this->registry->output->setTitle( $this->lang->words['lost_pass_form'] ); - $this->registry->output->addNavigation( $this->lang->words['lost_pass_form'], '' ); - - $this->output .= $this->registry->output->getTemplate('register')->lostPasswordForm( $this->lang->words[ $errors ] ); - - if ( $this->settings['bot_antispam'] ) - { - $this->output = str_replace( "", $captchaHTML, $this->output ); - } - } - - - /** - * Shows the form for validating a lost password request - * - * @access public - * @param string $msg - * @return void - */ - public function lostPasswordValidateForm( $msg='' ) - { - $this->output .= $this->registry->getClass('output')->getTemplate('register')->showLostpassForm( $this->lang->words[$msg] ); - - /* Check for input and it's in a valid format. */ - if( $this->request['uid'] AND $this->request['aid'] ) - { - $in_user_id = intval( trim( urldecode( $this->request['uid'] ) ) ); - $in_validate_key = IPSText::md5Clean( trim( urldecode( $this->request['aid'] ) ) ); - $in_type = trim( $this->request['type'] ); - - if ($in_type == "") - { - $in_type = 'reg'; - } - - /* Check and test input */ - if ( ! $in_validate_key ) - { - $this->registry->output->showError( 'validation_key_incorrect', 10113 ); - } - - if (! preg_match( "/^(?:\d){1,}$/", $in_user_id ) ) - { - $this->registry->output->showError( 'uid_key_incorrect', 10114 ); - } - - /* Attempt to get the profile of the requesting user */ - $member = IPSMember::load( $in_user_id ); - - if( ! $member['member_id'] ) - { - $this->registry->output->showError( 'lostpass_no_member', 10115 ); - } - - /* Get validating info.. */ - $validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => "member_id={$in_user_id} and vid='{$in_validate_key}' and lost_pass=1" ) ); - - if( ! $validate['member_id'] ) - { - $this->registry->output->showError( 'validation_key_incorrect', 10116 ); - } - - $this->output = str_replace( "", $this->registry->output->getTemplate('register')->show_lostpass_form_auto( $in_validate_key, $in_user_id ), $this->output ); - } - else - { - $this->output = str_replace( "", $this->registry->output->getTemplate('register')->show_lostpass_form_manual(), $this->output ); - } - - /* CAPTCHA */ - if( $this->settings['bot_antispam'] ) - { - $this->output = str_replace( "", $this->registry->getClass('class_captcha')->getTemplate(), $this->output ); - } - - $this->registry->output->setTitle( $this->lang->words['activation_form'] ); - $this->registry->output->addNavigation( $this->lang->words['activation_form'], '' ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Recover Lost Password + * Last Updated: $Date: 2010-09-06 12:10:04 -0400 (Mon, 06 Sep 2010) $ + * + * + * @author $Author $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 20th February 2002 + * @version $Rev: 6832 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_global_lostpass extends ipsCommand +{ + /** + * Class entry point + * + * @access public + * @param object Registry reference + * @return void [Outputs to screen/redirects] + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load language */ + $this->registry->class_localization->loadLanguageFile( array( 'public_register' ), 'core' ); + + //----------------------------------------- + // Meta tags + //----------------------------------------- + + $this->registry->output->addMetaTag( 'robots', 'noindex' ); + + /* What to do */ + switch( $this->request['do'] ) + { + case 'sendform': + $this->lostPasswordValidateForm(); + break; + + case '11': + $this->lostPasswordEnd(); + break; + + case '03': + $this->lostPasswordValidate(); + break; + + default: + case '10': + $this->lostPasswordForm(); + break; + } + + /* Output */ + $this->registry->output->addContent( $this->output ); + $this->registry->output->sendOutput(); + } + + /** + * Validates a lost password request + * + * @access public + * @return void + */ + public function lostPasswordValidate() + { + /* Check for input and it's in a valid format. */ + $in_user_id = intval( trim( urldecode( $this->request['uid'] ) ) ); + $in_validate_key = IPSText::md5Clean( trim( urldecode( $this->request['aid'] ) ) ); + + /* Check Input */ + if( ! $in_validate_key ) + { + $this->registry->output->showError( 'validation_key_incorrect', 1015 ); + } + + if( ! preg_match( '/^(?:\d){1,}$/', $in_user_id ) ) + { + $this->registry->output->showError( 'uid_key_incorrect', 1016 ); + } + + /* Attempt to get the profile of the requesting user */ + $member = IPSMember::load( $in_user_id ); + + if( ! $member['member_id'] ) + { + $this->registry->output->showError( 'lostpass_no_member', 1017 ); + } + + /* Get validating info.. */ + $validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id=' . $in_user_id . ' and lost_pass=1' ) ); + + if( ! $validate['member_id'] ) + { + $this->registry->output->showError( 'lostpass_not_validating', 1018 ); + } + + if( ( $validate['new_reg'] == 1 ) && ( $this->settings['reg_auth_type'] == "admin" ) ) + { + $this->registry->output->showError( 'lostpass_new_reg', 4010, true ); + } + + if( $validate['vid'] != $in_validate_key ) + { + $this->registry->output->showError( 'lostpass_key_wrong', 1019 ); + } + else + { + /* On the same page? */ + if( $validate['lost_pass'] != 1 ) + { + $this->registry->output->showError( 'lostpass_not_lostpass', 4011, true ); + } + + /* Test GD image */ + if( $this->settings['bot_antispam_type'] != 'none' ) + { + if ( $this->registry->getClass('class_captcha')->validate() !== TRUE ) + { + $this->lostPasswordValidateForm( 'err_reg_code' ); + return; + } + } + + /* Send a new random password? */ + if( $this->settings['lp_method'] == 'random' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $save_array = array(); + + //----------------------------------------- + // Generate a new random password + //----------------------------------------- + + $new_pass = IPSLib::makePassword(); + + //----------------------------------------- + // Generate a new salt + //----------------------------------------- + + $salt = IPSMember::generatePasswordSalt(5); + $salt = str_replace( '\\', "\\\\", $salt ); + + //----------------------------------------- + // New log in key + //----------------------------------------- + + $key = IPSMember::generateAutoLoginKey(); + + //----------------------------------------- + // Update... + //----------------------------------------- + + $save_array['members_pass_salt'] = $salt; + $save_array['members_pass_hash'] = md5( md5($salt) . md5( $new_pass ) ); + $save_array['member_login_key'] = $key; + $save_array['member_login_key_expire'] = $this->settings['login_key_expire'] * 60 * 60 * 24; + $save_array['failed_logins'] = null; + $save_array['failed_login_count'] = 0; + + //----------------------------------------- + // Load handler... + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $this->han_login = new $classToLoad( $this->registry ); + $this->han_login->init(); + $this->han_login->changePass( $member['email'], md5( $new_pass ), $new_pass, $member ); + + if ( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) + { + $this->registry->output->showError( $this->lang->words['lostpass_external_fail'], 2013 ); + } + + IPSMember::save( $member['member_id'], array( 'members' => $save_array ) ); + + //----------------------------------------- + // Send out the email... + //----------------------------------------- + + IPSText::getTextClass('email')->getTemplate("lost_pass_email_pass"); + + IPSText::getTextClass('email')->buildMessage( array( + 'NAME' => $member['members_display_name'], + 'THE_LINK' => $this->settings['base_url'] . 'app=core&module=usercp&tab=core&area=password', + 'PASSWORD' => $new_pass, + 'LOGIN' => $this->settings['base_url'] . 'app=core&module=global§ion=login', + 'USERNAME' => $member['name'], + 'EMAIL' => $member['email'], + 'ID' => $member['member_id'], + ) + ); + + IPSText::getTextClass('email')->subject = $this->lang->words['lp_random_pass_subject'] . ' ' . $this->settings['board_name']; + IPSText::getTextClass('email')->to = $member['email']; + + IPSText::getTextClass('email')->sendMail(); + + $this->registry->output->setTitle( $this->lang->words['activation_form'] . ' - ' . ipsRegistry::$settings['board_name'] ); + $this->output = $this->registry->getClass('output')->getTemplate('register')->showLostPassWaitRandom( $member ); + } + else + { + if( $_POST['pass1'] == "" ) + { + $this->registry->output->showError( 'pass_blank', 10184 ); + } + + if( $_POST['pass2'] == "" ) + { + $this->registry->output->showError( 'pass_blank', 10185 ); + } + + $pass_a = trim( $this->request['pass1'] ); + $pass_b = trim( $this->request['pass2'] ); + + if( strlen( $pass_a ) < 3 ) + { + $this->registry->output->showError( 'pass_too_short', 10186 ); + } + + if( $pass_a != $pass_b ) + { + $this->registry->output->showError( 'pass_no_match', 10187 ); + } + + $new_pass = md5( $pass_a ); + + /* Update Member Array */ + $save_array = array(); + + /* Generate a new salt */ + $salt = IPSMember::generatePasswordSalt(5); + $salt = str_replace( '\\', "\\\\", $salt ); + + /* New log in key */ + $key = IPSMember::generateAutoLoginKey(); + + /* Update Array */ + $save_array['members_pass_salt'] = $salt; + $save_array['members_pass_hash'] = md5( md5($salt) . $new_pass ); + $save_array['member_login_key'] = $key; + $save_array['member_login_key_expire'] = $this->settings['login_key_expire'] * 60 * 60 * 24; + $save_array['failed_logins'] = null; + $save_array['failed_login_count'] = 0; + + /* Change the password */ + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $this->han_login = new $classToLoad( $this->registry ); + $this->han_login->init(); + $this->han_login->changePass( $member['email'], md5( $new_pass ), $new_pass, $member ); + + //----------------------------------------- + // We'll ignore any remote errors + //----------------------------------------- + + if( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) + { + // Pass not changed remotely + } + + /* Update the member */ + IPSMember::save( $member['member_id'], array( 'members' => $save_array ) ); + + /* Remove "dead" validation */ + $this->DB->delete( 'validating', "vid='{$validate['vid']}' OR (member_id={$member['member_id']} AND lost_pass=1)" ); + + $this->registry->output->silentRedirect( $this->settings['base_url'] . '&app=core&module=global§ion=login&do=autologin&frompass=1' ); + } + } + } + + /** + * Completes the lost password request form + * + * @access public + * @return void + */ + public function lostPasswordEnd() + { + if( $this->settings['bot_antispam_type'] != 'none' ) + { + if( !$this->registry->getClass('class_captcha')->validate( $this->request['regid'], $this->request['reg_code'] ) ) + { + $this->lostPasswordForm( 'err_reg_code' ); + return; + } + } + + /* Back to the usual programming! :o */ + if( $this->request['member_name'] == "" AND $this->request['email_addy'] == "" ) + { + $this->registry->output->showError( 'lostpass_name_email', 10110 ); + } + + /* Check for input and it's in a valid format. */ + $member_name = trim( mb_strtolower( $this->request['member_name'] ) ); + $email_addy = trim( mb_strtolower( $this->request['email_addy'] ) ); + + if( $member_name == "" AND $email_addy == "" ) + { + $this->registry->output->showError( 'lostpass_name_email', 10111 ); + } + + /* Attempt to get the user details from the DB */ + if( $member_name ) + { + $this->DB->build( array( 'select' => 'members_display_name, name, member_id, email, member_group_id', 'from' => 'members', 'where' => "members_l_username='{$member_name}'" ) ); + $this->DB->execute(); + } + else if( $email_addy ) + { + $this->DB->build( array( 'select' => 'members_display_name, name, member_id, email, member_group_id', 'from' => 'members', 'where' => "email='{$email_addy}'" ) ); + $this->DB->execute(); + } + + if ( ! $this->DB->getTotalRows() ) + { + $this->registry->output->showError( 'lostpass_no_user', 10112 ); + } + else + { + $member = $this->DB->fetch(); + + /* Is there a validation key? If so, we'd better not touch it */ + if( $member['member_id'] == "" ) + { + $this->registry->output->showError( 'lostpass_no_mid', 2014 ); + } + + $validate_key = md5( IPSLib::makePassword() . uniqid( mt_rand(), TRUE ) ); + + /* Get rid of old entries for this member */ + $this->DB->delete( 'validating', "member_id={$member['member_id']} AND lost_pass=1" ); + + /* Update the DB for this member. */ + $db_str = array( + 'vid' => $validate_key, + 'member_id' => $member['member_id'], + 'temp_group' => $member['member_group_id'], + 'entry_date' => time(), + 'coppa_user' => 0, + 'lost_pass' => 1, + 'ip_address' => $this->member->ip_address, + ); + + /* Are they already in the validating group? */ + if( $member['member_group_id'] != $this->settings['auth_group'] ) + { + $db_str['real_group'] = $member['member_group_id']; + } + + $this->DB->insert( 'validating', $db_str ); + + /* Send out the email. */ + IPSText::getTextClass('email')->getTemplate( 'lost_pass' ); + + IPSText::getTextClass('email')->buildMessage( array( + 'NAME' => $member['members_display_name'], + 'THE_LINK' => $this->settings['base_url']."app=core&module=global§ion=lostpass&do=sendform&uid=".$member['member_id']."&aid=".$validate_key, + 'MAN_LINK' => $this->settings['base_url']."app=core&module=global§ion=lostpass&do=sendform", + 'EMAIL' => $member['email'], + 'ID' => $member['member_id'], + 'CODE' => $validate_key, + 'IP_ADDRESS' => $this->member->ip_address, + ) + ); + + IPSText::getTextClass('email')->subject = $this->lang->words['lp_subject'] . ' ' . $this->settings['board_name']; + IPSText::getTextClass('email')->to = $member['email']; + IPSText::getTextClass('email')->sendMail(); + + $this->output = $this->registry->getClass('output')->getTemplate('register')->lostPasswordWait( $member ); + } + + $this->registry->output->setTitle( $this->lang->words['lost_pass_form'] . ' - ' . ipsRegistry::$settings['board_name'] ); + } + + /** + * Displays the lost password form + * + * @access public + * @param string $errors + * @return void + */ + public function lostPasswordForm( $errors="" ) + { + //----------------------------------------- + // Do we have another URL for password resets? + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $han_login = new $classToLoad( $this->registry ); + $han_login->init(); + $han_login->checkMaintenanceRedirect(); + + /* CAPTCHA */ + if( $this->settings['bot_antispam_type'] != 'none' ) + { + $captchaHTML = $this->registry->getClass('class_captcha')->getTemplate(); + } + + $this->registry->output->setTitle( $this->lang->words['lost_pass_form'] . ' - ' . ipsRegistry::$settings['board_name'] ); + $this->registry->output->addNavigation( $this->lang->words['lost_pass_form'], '' ); + + $this->output .= $this->registry->output->getTemplate('register')->lostPasswordForm( $this->lang->words[ $errors ] ); + + if ( $this->settings['bot_antispam_type'] != 'none' ) + { + $this->output = str_replace( "", $captchaHTML, $this->output ); + } + } + + + /** + * Shows the form for validating a lost password request + * + * @access public + * @param string $msg + * @return void + */ + public function lostPasswordValidateForm( $msg='' ) + { + $this->output .= $this->registry->getClass('output')->getTemplate('register')->showLostpassForm( $this->lang->words[$msg] ); + + /* Check for input and it's in a valid format. */ + if( $this->request['uid'] AND $this->request['aid'] ) + { + $in_user_id = intval( trim( urldecode( $this->request['uid'] ) ) ); + $in_validate_key = IPSText::md5Clean( trim( urldecode( $this->request['aid'] ) ) ); + $in_type = trim( $this->request['type'] ); + + if ($in_type == "") + { + $in_type = 'reg'; + } + + /* Check and test input */ + if ( ! $in_validate_key ) + { + $this->registry->output->showError( 'validation_key_incorrect', 10113 ); + } + + if (! preg_match( '/^(?:\d){1,}$/', $in_user_id ) ) + { + $this->registry->output->showError( 'uid_key_incorrect', 10114 ); + } + + /* Attempt to get the profile of the requesting user */ + $member = IPSMember::load( $in_user_id ); + + if( ! $member['member_id'] ) + { + $this->registry->output->showError( 'lostpass_no_member', 10115 ); + } + + /* Get validating info.. */ + $validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => "member_id={$in_user_id} and vid='{$in_validate_key}' and lost_pass=1" ) ); + + if( ! $validate['member_id'] ) + { + $this->registry->output->showError( 'validation_key_incorrect', 10116 ); + } + + $this->output = str_replace( "", $this->registry->output->getTemplate('register')->show_lostpass_form_auto( $in_validate_key, $in_user_id ), $this->output ); + } + else + { + $this->output = str_replace( "", $this->registry->output->getTemplate('register')->show_lostpass_form_manual(), $this->output ); + } + + /* CAPTCHA */ + if( $this->settings['bot_antispam_type'] != 'none' ) + { + $this->output = str_replace( "", $this->registry->getClass('class_captcha')->getTemplate(), $this->output ); + } + + $this->registry->output->setTitle( $this->lang->words['activation_form'] . ' - ' . ipsRegistry::$settings['board_name'] ); + $this->registry->output->addNavigation( $this->lang->words['activation_form'], '' ); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/global/register.php b/upload/admin/applications/core/modules_public/global/register.php index 2386f92a..c3794b3f 100644 --- a/upload/admin/applications/core/modules_public/global/register.php +++ b/upload/admin/applications/core/modules_public/global/register.php @@ -1,1686 +1,1969 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_core_global_register extends ipsCommand -{ - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen/redirects] - */ - public function doExecute( ipsRegistry $registry ) - { - /* Load language */ - $this->registry->class_localization->loadLanguageFile( array( 'public_register' ), 'core' ); - - /* What to do */ - switch( $this->request['do'] ) - { - case 'process_form': - $this->registerProcessForm(); - break; - - case 'auto_validate': - $this->_autoValidate(); - break; - - case 'coppa_two': - $this->registerCoppaTwo(); - break; - - case '12': - $this->registerCoppaPermsForm(); - break; - - case '05': - $this->_showManualForm(); - break; - - case '07': - $this->_showManualForm('newemail'); - break; - - case 'reval': - $this->_revalidateForm(); - break; - - case 'reval2': - $this->_revalidateComplete(); - break; - - case 'complete_login': - $this->_completeRegistration(); - break; - case 'complete_login_do': - $this->_completeRegistrationSave(); - break; - - default: - case 'form': - if( $this->settings['no_reg'] == 1 ) - { - $this->registry->output->showError( 'registration_disabled', 10123 ); - } - - if( $this->settings['use_coppa'] == 1 and $this->request['coppa_pass'] != 1 ) - { - $this->registerCoppaStart(); - } - else - { - $this->registerForm(); - } - break; - } - - /* Output */ - $this->registry->output->addContent( $this->output ); - $this->registry->output->sendOutput(); - } - - - /** - * Save the data to complete the partial member record login/registration - * - * @access private - * @return void [Outputs to screen/redirects] - */ - private function _completeRegistrationSave() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $mid = intval( $this->request['mid'] ); - $key = intval( $this->request['key'] ); - $in_email = mb_strtolower( trim($this->request['EmailAddress']) ); - $banfilters = array(); - $form_errors = array( 'dname' => array(), 'email' => array(), 'general' => array() ); - $members_display_name = trim( $this->request['members_display_name'] ); - $poss_session_id = ""; - - //----------------------------------------- - // Get DB row - //----------------------------------------- - - $reg = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'members_partial', 'where' => "partial_member_id={$mid} AND partial_date={$key}" ) ); - $tmp_member = IPSMember::load( $mid ); - - //----------------------------------------- - // Got it? - //----------------------------------------- - - if ( ! $reg['partial_id'] OR ! $tmp_member['member_id'] ) - { - $this->registry->output->showError( 'partial_reg_noid', 10117 ); - } - - //----------------------------------------- - // Load ban filters - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'banfilters' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $banfilters[ $r['ban_type'] ][] = $r['ban_content']; - } - - //----------------------------------------- - // Custom profile field stuff - //----------------------------------------- - - require_once( IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php' ); - $custom_fields = new customProfileFields(); - - $custom_fields->initData( 'edit' ); - $custom_fields->parseToSave( $this->request, 'register' ); - - /* Check */ - if( $custom_fields->error_messages ) - { - $form_errors['general'] = $custom_fields->error_messages; - } - - //----------------------------------------- - // Remove 'sneaky' spaces - //----------------------------------------- - - if ( $this->settings['strip_space_chr'] ) - { - $members_display_name = IPSText::removeControlCharacters( $members_display_name ); - } - - //----------------------------------------- - // Testing email addresses? - //----------------------------------------- - - if ( ! $reg['partial_email_ok'] ) - { - //----------------------------------------- - // Check the email address - //----------------------------------------- - - if( !IPSText::checkEmailAddress( $in_email ) ) - { - $form_errors['email'][] = $this->lang->words['reg_error_email_nm']; - } - - //----------------------------------------- - // Test email address - //----------------------------------------- - - $this->request['EmailAddress_two'] = mb_strtolower( trim($this->request['EmailAddress_two']) ); - - if ( $this->request['EmailAddress_two'] != $in_email ) - { - $form_errors['email'][] = $this->lang->words['reg_error_email_nm']; - } - - //----------------------------------------- - // Are they banned [EMAIL]? - //----------------------------------------- - - if ( is_array( $banfilters['email'] ) and count( $banfilters['email'] ) ) - { - foreach ( $banfilters['email'] as $email ) - { - $email = str_replace( '\*', '.*' , preg_quote($email, "/") ); - - if ( preg_match( "/^{$email}$/i", $in_email ) ) - { - $form_errors['email'][] = $this->lang->words['reg_error_email_taken']; - break; - } - } - } - - /* Is this email addy taken? */ - if( IPSMember::checkByEmail( $in_email ) == TRUE ) - { - $form_errors['email'][] = $this->lang->words['reg_error_email_taken']; - } - - //----------------------------------------- - // Load handler... - //----------------------------------------- - - require_once( IPS_ROOT_PATH . 'sources/handlers/han_login.php' ); - $han_login = new han_login( $this->registry ); - $han_login->init(); - - if( $han_login->emailExistsCheck( trim( mb_strtolower( $member['email'] ) ), trim( mb_strtolower( $in_email ) ) ) ) - { - $form_errors['email'][] = $this->lang->words['reg_error_email_taken']; - } - } - - if ( $this->settings['auth_allow_dnames'] ) - { - /* Check the username */ - $user_check = IPSMember::getFunction()->cleanAndCheckName( $members_display_name, $tmp_member, 'members_display_name' ); - - if( is_array( $user_check['errors'] ) && count( $user_check['errors'] ) ) - { - $form_errors['dname'] = array_merge( $form_errors['dname'], $user_check['errors'] ); - } - } - - //----------------------------------------- - // CHECK 1: Any errors (duplicate names, etc)? - //----------------------------------------- - - if ( count( $form_errors ) ) - { - $errorMessages = array(); - - foreach( $form_errors as $errorCat => $errorMessage ) - { - foreach( $errorMessage as $error ) - { - $errorMessages['general'][] = $error; - } - } - - if( count($errorMessages) ) - { - $this->_completeRegistration( $errorMessages ); - return; - } - } - - //----------------------------------------- - // Update: Members - //----------------------------------------- - - $members_display_name = $this->settings['auth_allow_dnames'] ? $members_display_name : $tmp_member['name']; - - if ( ! $reg['partial_email_ok'] ) - { - IPSMember::save( $mid, array( 'members' => array( 'email' => $in_email, - 'members_display_name' => $members_display_name, - 'name' => $tmp_member['name'] ? $tmp_member['name'] : $members_display_name, - 'members_l_username' => $tmp_member['members_l_username'] ? $tmp_member['members_l_username'] : $members_display_name, - 'members_l_display_name' => mb_strtolower( $members_display_name ) ) ) ); - } - else - { - IPSMember::save( $mid, array( 'members' => array( 'members_display_name' => $members_display_name, - 'name' => $tmp_member['name'] ? $tmp_member['name'] : $members_display_name, - 'members_l_username' => $tmp_member['members_l_username'] ? $tmp_member['members_l_username'] : $members_display_name, - 'members_l_display_name' => mb_strtolower( $members_display_name ) ) ) ); - } - - //----------------------------------------- - // Delete: Partials row - //----------------------------------------- - - $this->DB->delete( 'members_partial', 'partial_member_id=' . $mid ); - - //----------------------------------------- - // Update: Profile fields - //----------------------------------------- - - $this->DB->force_data_type = array(); - - foreach( $custom_fields->out_fields as $_field => $_data ) - { - $this->DB->force_data_type[ $_field ] = 'string'; - } - - if ( is_array($custom_fields->out_fields) and count($custom_fields->out_fields) ) - { - $this->DB->update( 'pfields_content', $custom_fields->out_fields, 'member_id=' . $mid ); - } - - //----------------------------------------- - // Send out admin email - //----------------------------------------- - - if ( $this->settings['new_reg_notify'] ) - { - $date = $this->registry->getClass('class_localization')->getDate( time(), 'LONG', 1 ); - - IPSText::getTextClass('email')->getTemplate("admin_newuser"); - - IPSText::getTextClass('email')->buildMessage( array( 'DATE' => $date, - 'LOG_IN_NAME' => $tmp_member['name'] ? $tmp_member['name'] : $members_display_name, - 'EMAIL' => $in_email, - 'IP' => $tmp_member['ip_address'], - 'DISPLAY_NAME' => $members_display_name ) ); - - IPSText::getTextClass('email')->subject = $this->lang->words['new_registration_email'] . $this->settings['board_name']; - IPSText::getTextClass('email')->to = $this->settings['email_in']; - IPSText::getTextClass('email')->sendMail(); - } - - //----------------------------------------- - // Set cookies - //----------------------------------------- - - IPSCookie::set("member_id" , $mid , 1 ); - IPSCookie::set("pass_hash" , $tmp_member['member_login_key'] , 1 ); - - //----------------------------------------- - // Fix up session - //----------------------------------------- - - $privacy = $this->request['Privacy'] ? 1 : 0; - - if( $this->caches['group_cache'][ $tmp_member['member_group_id'] ]['g_hide_online_list'] ) - { - $privacy = 1; - } - - $this->member->sessionClass()->convertGuestToMember( array( 'member_name' => $members_display_name, - 'member_id' => $mid, - 'member_group' => $tmp_member['member_group_id'], - 'login_type' => $privacy ) ); - - //----------------------------------------- - // Update Stats - //----------------------------------------- - - $cache = $this->cache->getCache('stats'); - - if( $members_display_name AND $mid ) - { - $cache['last_mem_name'] = $members_display_name; - $cache['last_mem_id'] = $mid; - } - - $cache['mem_count'] += 1; - - $this->cache->setCache( 'stats', $cache, array( 'array' => 1 ) ); - - /* Complete account */ - IPSLib::runMemberSync( 'onCompleteAccount', IPSMember::load( $mid ) ); - - //----------------------------------------- - // Go to the board index - //----------------------------------------- - - $this->registry->output->redirectScreen( $this->lang->words['clogin_done'], $this->settings['base_url'] ); - } - - /** - * When a member logs in via an external login method and we do not have all of the data - * to create the member's account, we create a partial record. This function shows the - * form upon first visit by member (usually immediately after login) to complete the - * login/registration. - * - * @access private - * @param array Errors - * @return void [Outputs to screen/redirects] - */ - private function _completeRegistration( $form_errors=array() ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $mid = intval( $this->request['mid'] ); - $key = intval( $this->request['key'] ); - $final_errors = ''; - - //----------------------------------------- - // Get DB row - //----------------------------------------- - - $reg = $this->DB->buildAndFetch( array( 'select' => '*', - 'from' => 'members_partial', - 'where' => "partial_member_id={$mid} AND partial_date={$key}" ) ); - - //----------------------------------------- - // Got it? - //----------------------------------------- - - if ( ! $reg['partial_id'] ) - { - $this->registry->output->showError( 'partial_reg_noid', 10118 ); - } - - //----------------------------------------- - // Custom profile fields stuff - //----------------------------------------- - - /* Custom Profile Fields */ - $custom_fields_out = array( 'required', 'optional' ); - - require_once( IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php' ); - $custom_fields = new customProfileFields(); - - $custom_fields->member_data = array(); - $custom_fields->initData( 'edit' ); - $custom_fields->parseToEdit( 'register' ); - - if ( count( $custom_fields->out_fields ) ) - { - foreach( $custom_fields->out_fields as $id => $form_element ) - { - if ( $custom_fields->cache_data[ $id ]['pf_not_null'] == 1 ) - { - $ftype = 'required'; - } - else - { - $ftype = 'optional'; - } - - $custom_fields_out[$ftype][] = array( - 'name' => $custom_fields->field_names[ $id ], - 'desc' => $custom_fields->field_desc[ $id ], - 'field' => $form_element, - 'id' => $id, - 'error' => $error, - 'type' => $custom_fields->cache_data[ $id ]['pf_type'] - ); - } - } - - //----------------------------------------- - // Other errors - //----------------------------------------- - - foreach( array( 'username', 'dname', 'password', 'email', 'general' ) as $thing ) - { - if ( is_array( $form_errors[ $thing ] ) AND count( $form_errors[ $thing ] ) ) - { - $final_errors .= implode( "
    ", $form_errors[ $thing ] ); - } - } - - //----------------------------------------- - // No display name? - //----------------------------------------- - - if ( ! $this->memberData['members_display_name'] ) - { - $this->member->setProperty( 'members_display_name', $this->memberData['email'] ); - } - - //----------------------------------------- - // Show the form (email and display name) - //----------------------------------------- - - $this->output .= $this->registry->getClass('output')->getTemplate('register')->completePartialLogin( $mid, $key, $custom_fields_out, $final_errors, $reg ); - - $this->registry->output->setTitle( $this->lang->words['clogin_title'] ); - $this->registry->output->addNavigation( $this->lang->words['clogin_title'], '' ); - } - - /** - * Show the form to request validation email to be resent - * - * @access private - * @param string Errors - * @return void [Outputs to screen/redirects] - */ - private function _revalidateForm( $errors="" ) - { - $name = $this->memberData['member_id'] == "" ? '' : $this->memberData['email']; - - $this->output .= $this->registry->getClass('output')->getTemplate('register')->showRevalidateForm( $name, $errors ); - $this->registry->output->setTitle( $this->lang->words['rv_title'] ); - $this->registry->output->addNavigation( $this->lang->words['rv_title'], '' ); - } - - /** - * Resend email validation request for lost password, email change and new registration - * - * @access private - * @return void [Outputs to screen/redirects] - */ - private function _revalidateComplete() - { - //----------------------------------------- - // Check in the DB for entered member name - //----------------------------------------- - - if ( $this->request['username'] == "" ) - { - $this->_revalidateForm('err_no_username'); - return; - } - - $username = $this->request['username']; - $keyType = IPSText::checkEmailAddress( $this->request['username'] ) ? 'email' : 'username'; - - $member = IPSMember::load( $username, 'extendedProfile', $keyType ); - - if ( ! $member['member_id'] ) - { - /** - * Try the other key type just to be safe... - */ - $member = IPSMember::load( $username, 'extendedProfile', $keyType == 'email' ? 'username' : 'email' ); - - if ( ! $member['member_id'] ) - { - $this->_revalidateForm('err_no_username'); - return; - } - } - - //----------------------------------------- - // Check in the DB for any validations - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'validating', 'where' => "member_id=" . intval($member['member_id']) ) ); - $this->DB->execute(); - - if ( ! $val = $this->DB->fetch() ) - { - $this->_revalidateForm('err_no_validations'); - return; - } - - //----------------------------------------- - // Which type is it then? - //----------------------------------------- - - if ( $val['lost_pass'] == 1 ) - { - IPSText::getTextClass('email')->getTemplate("lost_pass"); - - IPSText::getTextClass('email')->buildMessage( array( - 'NAME' => $member['members_display_name'], - 'THE_LINK' => $this->settings['base_url'] . "app=core&module=global§ion=lostpass&do=sendform&uid=" . $member['member_id'] . "&aid=" . $val['vid'], - 'MAN_LINK' => $this->settings['base_url'] . "app=core&module=global§ion=lostpass&do=sendform", - 'EMAIL' => $member['email'], - 'ID' => $member['member_id'], - 'CODE' => $val['vid'], - 'IP_ADDRESS' => $this->member->ip_address, - ) - ); - - IPSText::getTextClass('email')->subject = $this->lang->words['lp_subject'].' '.$this->settings['board_name']; - IPSText::getTextClass('email')->to = $member['email']; - - IPSText::getTextClass('email')->sendMail(); - } - else if ( $val['new_reg'] == 1 ) - { - IPSText::getTextClass('email')->getTemplate("reg_validate"); - - IPSText::getTextClass('email')->buildMessage( array( - 'THE_LINK' => $this->settings['base_url'] . "app=core&module=global§ion=register&do=auto_validate&uid=" . $member['member_id'] . "&aid=" . $val['vid'], - 'NAME' => $member['members_display_name'], - 'MAN_LINK' => $this->settings['base_url'] . "app=core&module=global§ion=register&do=05", - 'EMAIL' => $member['email'], - 'ID' => $member['member_id'], - 'CODE' => $val['vid'], - ) - ); - - IPSText::getTextClass('email')->subject = $this->lang->words['email_reg_subj'] . " " . $this->settings['board_name']; - IPSText::getTextClass('email')->to = $member['email']; - - IPSText::getTextClass('email')->sendMail(); - } - else if ( $val['email_chg'] == 1 ) - { - IPSText::getTextClass('email')->getTemplate("newemail"); - - IPSText::getTextClass('email')->buildMessage( array( - 'NAME' => $member['members_display_name'], - 'THE_LINK' => $this->settings['base_url'] . "app=core&module=global§ion=register&do=auto_validate&type=newemail&uid=" . $member['member_id'] . "&aid=" . $val['vid'], - 'ID' => $member['member_id'], - 'MAN_LINK' => $this->settings['base_url'] . "app=core&module=global§ion=register&do=07", - 'CODE' => $val['vid'], - ) - ); - - IPSText::getTextClass('email')->subject = $this->lang->words['ne_subject'] . ' ' . $this->settings['board_name']; - IPSText::getTextClass('email')->to = $member['email']; - - IPSText::getTextClass('email')->sendMail(); - } - else - { - $this->_revalidateForm('err_no_validations'); - return; - } - - $this->output .= $this->registry->getClass('output')->getTemplate('register')->showRevalidated(); - - $this->registry->output->setTitle( $this->lang->words['rv_title'] ); - $this->registry->output->addNavigation( $this->lang->words['rv_title'], '' ); - } - - /** - * Show the form to manually enter in validation info if auto-validation failed. - * - * @access private - * @param string Type of validation - * @param string Error messages - * @return void [Outputs to screen/redirects] - */ - private function _showManualForm($type='reg', $errors="") - { - //----------------------------------------- - // In IPB3 this is handled by another section - // If somehow a request comes in, send to correct location - //----------------------------------------- - - if ( $type == 'lostpass' ) - { - $this->registry->output->silentRedirect( $this->settings['base_url'] . 'app=core&module=global§ion=lostpass&do=sendform&uid=' . $this->request['uid'] . '&aid=' . $this->request['aid'] ); - } - else - { - $this->output = $this->registry->getClass('output')->getTemplate('register')->showManualForm( $type ); - } - - $this->registry->output->setTitle( $this->lang->words['activation_form'] ); - $this->registry->output->addNavigation( $this->lang->words['activation_form'], '' ); - } - - - /** - * Show coppa form. This is the downloadable/printable form, and as such is just printed to the browser directly - * - * @access private - * @return void - */ - private function registerCoppaPermsForm() - { - /* Keith said to strip these out - it's all his fault :( */ - $this->settings[ 'coppa_address'] = str_replace( array( '
    ', '
    ' ), '', $this->settings['coppa_address'] ); - $this->settings[ 'coppa_address'] = nl2br( $this->settings['coppa_address'] ); - - echo( $this->registry->output->getTemplate('register')->registerCoppaForm() ); - exit(); - } - - /** - * This is the second page a COPPA submission hits. Really, user hits this page and if birthday is older than 13 - * we just continue with registration form. Otherwise we show the coppa validation required message with link - * to download/print coppa compliance sheet for parents to fill in. - * - * @access private - * @return void - */ - private function registerCoppaTwo() - { - if( ! $this->request['m'] OR ! $this->request['d'] OR ! $this->request['y'] ) - { - $this->registry->output->showError( 'coppa_form_fill', 10119 ); - } - - $birthday = mktime( 0, 0, 0, intval( $this->request['m'] ), intval( $this->request['d'] ), intval( $this->request['y'] ) ); - $coppa = mktime( 0, 0, 0, date( "m" ), date ("d" ), date( "Y" ) - 13 ); - - if( $birthday <= $coppa ) - { - $this->registerForm(); - return; - } - - IPSCookie::set( 'coppa', 'yes', 0, 1 ); - IPSCookie::set( 'coppabday', $this->request['m'] . '-' . $this->request['d'] . '-' . $this->request['y'], 0, 1 ); - - $this->lang->words['coppa_form_text'] = str_replace( "<#FORM_LINK#>", "" . $this->lang->words['coppa_link_form'] . "", $this->lang->words['coppa_form_text']); - - $this->output .= $this->registry->output->getTemplate('register')->registerCoppaTwo(); - - $this->registry->output->setTitle( $this->lang->words['coppa_title'] ); - $this->registry->output->addNavigation( $this->lang->words['coppa_title'], '' ); - } - - /** - * First COPPA screen. Shows form for visitor to enter birthday in and then submits to registerCoppaTwo - * - * @access private - * @return void - */ - private function registerCoppaStart() - { - $this->lang->words['coppa_form_text'] = str_replace( "<#FORM_LINK#>", "{$this->lang->words['coppa_link_form']}", $this->lang->words['coppa_form_text']); - - $this->output .= $this->registry->output->getTemplate('register')->registerCoppaStart(); - - $this->registry->output->setTitle( $this->lang->words['coppa_title'] ); - $this->registry->output->addNavigation( $this->lang->words['coppa_title'], '' ); - } - - /** - * Validation completion. This is the action hit when a user clicks a validation link from their email for - * lost password, email change and new registration. - * - * @access private - * @return void - */ - private function _autoValidate() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $in_user_id = intval(trim(urldecode($this->request['uid']))); - $in_validate_key = substr( IPSText::alphanumericalClean( urldecode( $this->request['aid'] ) ), 0, 32 ); - $in_type = trim($this->request['type']); - $in_type = $in_type ? $in_type : 'reg'; - - //----------------------------------------- - // Attempt to get the profile of the requesting user - //----------------------------------------- - - $member = IPSMember::load( $in_user_id, 'members' ); - - if ( ! $member['member_id'] ) - { - $this->_showManualForm( $in_type, 'reg_error_validate' ); - return; - } - - //----------------------------------------- - // Get validating info.. - //----------------------------------------- - - if ( $in_type == 'lostpass' ) - { - $validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id=' . $in_user_id . " AND lost_pass=1" ) ); - } - else if ( $in_type == 'newemail' ) - { - $validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id=' . $in_user_id . " AND email_chg=1" ) ); - } - else - { - $validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id=' . $in_user_id ) ); - } - - //----------------------------------------- - // Checks... - //----------------------------------------- - - if ( ! $validate['member_id'] ) - { - $this->registry->output->showError( 'no_validate_key', 10120 ); - } - - if ( ( $validate['new_reg'] == 1 ) && ($this->settings['reg_auth_type'] == "admin" ) ) - { - $this->registry->output->showError( 'validate_admin_turn', 10121 ); - } - - if ( $validate['vid'] != $in_validate_key ) - { - $this->registry->output->showError( 'validation_key_invalid', 10122 ); - } - - //----------------------------------------- - // Captcha (from posted form, not GET) - //----------------------------------------- - - if ( $this->settings['use_captcha'] AND $this->request['uid'] ) - { - if ( $this->registry->getClass('class_captcha')->validate( $this->request['captcha_unique_id'], $this->request['captcha_input'] ) !== TRUE ) - { - $this->_showManualForm( $in_type, 'reg_error_anti_spam' ); - return; - } - } - //----------------------------------------- - // REGISTER VALIDATE - //----------------------------------------- - - if ( $validate['new_reg'] == 1 ) - { - if ( ! $validate['real_group'] ) - { - $validate['real_group'] = $this->settings['member_group']; - } - - //----------------------------------------- - // SELF-VERIFICATION... - //----------------------------------------- - - if ( $this->settings['reg_auth_type'] != 'admin_user' ) - { - IPSMember::save( $member['member_id'], array( 'members' => array( 'member_group_id' => $validate['real_group'] ) ) ); - - /* Reset newest member */ - $stat_cache = $this->caches['stats']; - - if( $member['members_display_name'] AND $member['member_id'] ) - { - $stat_cache['last_mem_name'] = $member['members_display_name']; - $stat_cache['last_mem_name_seo'] = IPSText::makeSeoTitle( $member['members_display_name'] ); - $stat_cache['last_mem_id'] = $member['member_id']; - } - - $stat_cache['mem_count'] += 1; - - $this->cache->setCache( 'stats', $stat_cache, array( 'array' => 1 ) ); - - //----------------------------------------- - // Remove "dead" validation - //----------------------------------------- - - $this->DB->delete( 'validating', "vid='" . $validate['vid'] . "'" ); - - $this->registry->output->silentRedirect( $this->settings['base_url'] . '&app=core&module=global§ion=login&do=autologin&fromreg=1' ); - } - - //----------------------------------------- - // ADMIN-VERIFICATION... - //----------------------------------------- - - else - { - //----------------------------------------- - // Update DB row... - //----------------------------------------- - - $this->DB->update( 'validating', array( 'user_verified' => 1 ), 'vid=\'' . $validate['vid'] . '\'' ); - - //----------------------------------------- - // Print message - //----------------------------------------- - - $this->registry->output->setTitle( $this->lang->words['validation_complete'] ); - - $this->output = $this->registry->getClass('output')->getTemplate('register')->showPreview( $member ); - } - } - - //----------------------------------------- - // LOST PASS VALIDATE - //----------------------------------------- - - else if ( $validate['lost_pass'] == 1 ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $save_array = array(); - - //----------------------------------------- - // Generate a new random password - //----------------------------------------- - - $new_pass = IPSLib::makePassword(); - - //----------------------------------------- - // Generate a new salt - //----------------------------------------- - - $salt = IPSMember::generatePasswordSalt(5); - $salt = str_replace( '\\', "\\\\", $salt ); - - //----------------------------------------- - // New log in key - //----------------------------------------- - - $key = IPSMember::generateAutoLoginKey(); - - //----------------------------------------- - // Update... - //----------------------------------------- - - $save_array['members_pass_salt'] = $salt; - $save_array['members_pass_hash'] = md5( md5($salt) . md5( $new_pass ) ); - $save_array['member_login_key'] = $key; - $save_array['member_login_key_expire'] = $this->settings['login_key_expire'] * 60 * 60 * 24; - - //----------------------------------------- - // Load handler... - //----------------------------------------- - - require_once( IPS_ROOT_PATH.'sources/handlers/han_login.php' ); - $this->han_login = new han_login( $this->registry ); - $this->han_login->init(); - $this->han_login->changePass( $member['email_address'], md5( $new_pass ) ); - - if ( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) - { - $this->registry->output->showError( 'lostpass_external_fail', 2015, true ); - } - - IPSMember::save( $member['member_id'], array( 'members' => $save_array ) ); - - //----------------------------------------- - // Send out the email... - //----------------------------------------- - - IPSText::getTextClass('email')->getTemplate("lost_pass_email_pass"); - - IPSText::getTextClass('email')->buildMessage( array( - 'NAME' => $member['members_display_name'], - 'THE_LINK' => $this->settings['base_url'] . 'app=core&module=usercp&tab=core&area=password', - 'PASSWORD' => $new_pass, - 'LOGIN' => $this->settings['base_url'] . 'app=core&module=global§ion=login', - 'USERNAME' => $member['name'], - 'EMAIL' => $member['email'], - 'ID' => $member['member_id'], - ) - ); - - IPSText::getTextClass('email')->subject = $this->lang->words['lp_random_pass_subject'] . ' ' . $this->settings['board_name']; - IPSText::getTextClass('email')->to = $member['email']; - - IPSText::getTextClass('email')->sendMail(); - - $this->registry->output->setTitle( $this->lang->words['validation_complete'] ); - - //----------------------------------------- - // Remove "dead" validation - //----------------------------------------- - - $this->DB->delete( 'validating', "vid='" . $validate['vid'] . "' OR (member_id={$member['member_id']} AND lost_pass=1)" ); - - $this->output = $this->registry->getClass('output')->getTemplate('register')->showLostPassWaitRandom( $member ); - } - - //----------------------------------------- - // EMAIL ADDY CHANGE - //----------------------------------------- - - else if ( $validate['email_chg'] == 1 ) - { - if ( !$validate['real_group'] ) - { - $validate['real_group'] = $this->settings['member_group']; - } - - IPSMember::save( $member['member_id'], array( 'members' => array( 'member_group_id' => intval($validate['real_group']) ) ) ); - - IPSCookie::set( "member_id", $member['member_id'] , 1 ); - IPSCookie::set( "pass_hash", $member['member_login_key'], 1 ); - - //----------------------------------------- - // Remove "dead" validation - //----------------------------------------- - - $this->DB->delete( 'validating', "vid='" . $validate['vid'] . "' OR (member_id={$member['member_id']} AND email_chg=1)" ); - - $this->registry->output->silentRedirect( $this->settings['base_url'].'&app=core&module=global§ion=login&do=autologin&fromemail=1' ); - } - } - - /** - * Displays the registration form - * - * @access public - * @param array $form_errors - * @return void - */ - public function registerForm( $form_errors=array() ) - { - /* INIT */ - $final_errors = array(); - - if( $this->settings['no_reg'] == 1 ) - { - $this->registry->output->showError( 'registration_disabled', 10123 ); - } - - $coppa = IPSCookie::get( 'coppa' ); - - if( $coppa == 'yes' ) - { - $this->registry->output->showError( 'awaiting_coppa', 10124 ); - } - - $this->settings[ 'username_errormsg'] = str_replace( '{chars}', $this->settings['username_characters'], $this->settings['username_errormsg'] ); - - /* Read T&Cs yet? */ - if( ! $this->request['termsread'] ) - { - if( $this->memberData['member_id'] ) - { - require_once( IPS_ROOT_PATH . 'sources/handlers/han_login.php' ); - $this->han_login = new han_login( $this->registry ); - $this->han_login->init(); - - //----------------------------------------- - // Set some cookies - //----------------------------------------- - - IPSCookie::set( "member_id" , "0" ); - IPSCookie::set( "pass_hash" , "0" ); - IPSCookie::set( "anonlogin" , "-1" ); - - if ( is_array($_COOKIE) ) - { - foreach( $_COOKIE as $cookie => $value) - { - if ( stripos( $cookie, $this->settings['cookie_id']."ipbforum" ) !== false ) - { - IPSCookie::set( str_replace( $this->settings['cookie_id'], "", $match[0] ) , '-', -1 ); - } - } - } - - //----------------------------------------- - // Logout callbacks... - //----------------------------------------- - - $this->han_login->logoutCallback(); - - //----------------------------------------- - // Do it.. - //----------------------------------------- - - $this->member->sessionClass()->convertMemberToGuest(); - - list( $privacy, $loggedin ) = explode( '&', $this->memberData['login_anonymous'] ); - - IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'login_anonymous' => "{$privacy}&0", - 'last_activity' => time() ) ) ); - } - - /* Continue */ - $cache = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => "conf_key='reg_rules'" ) ); - - $text = $cache['conf_value'] ? $cache['conf_value'] : $cache['conf_default']; - - /* Load the Parser */ - IPSText::getTextClass( 'bbcode' )->bypass_badwords = 1; - IPSText::getTextClass( 'bbcode' )->parse_smilies = 1; - IPSText::getTextClass( 'bbcode' )->parse_html = 1; - IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; - IPSText::getTextClass( 'bbcode' )->parsing_section = 'global'; - - $text = IPSText::getTextClass('bbcode')->preDbParse( $text ); - $text = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $text ); - - $this->registry->output->setTitle( $this->lang->words['registration_form'] ); - $this->registry->output->addNavigation( $this->lang->words['registration_form'], '' ); - - $this->output .= $this->registry->output->getTemplate('register')->registerShowTerms( $text, $coppa ); - return; - } - else - { - /* Did we agree to the t&c? */ - if( ! $this->request['agree_to_terms'] ) - { - $this->registry->output->showError( 'must_agree_to_terms', 10125 ); - } - } - - /* Do we have another URL that one needs to visit to register? */ - $this->DB->build( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_enabled=1' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - if( $r['login_register_url'] ) - { - $this->registry->output->silentRedirect( $r['login_register_url'] ); - exit(); - } - } - - /* Continue... */ - if( $this->settings['reg_auth_type'] ) - { - if( $this->settings['reg_auth_type'] == 'admin_user' OR $this->settings['reg_auth_type'] == 'user' ) - { - $this->lang->words['std_text'] .= "
    " . $this->lang->words['email_validate_text']; - } - - /* User then admin? */ - if( $this->settings['reg_auth_type'] == 'admin_user' ) - { - $this->lang->words['std_text'] .= "
    " . $this->lang->words['user_admin_validation']; - } - - if( $this->settings['reg_auth_type'] == 'admin' ) - { - $this->lang->words['std_text'] .= "
    " . $this->lang->words['just_admin_validation']; - } - } - - $captchaHTML = ''; - $qandaHTML = ''; - $this->cache->updateCacheWithoutSaving('_hasStep3', 0); - - /* Q and A Challenge */ - if( $this->settings['registration_qanda'] ) - { - // Grab a random question... - $question = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'question_and_answer', 'order' => 'rand()', 'limit' => array(1) ) ); - - if( count($question) ) - { - $qandaHTML = $this->registry->output->getTemplate('global_other')->questionAndAnswer( $question ); - } - } - - /* Custom Profile Fields */ - $custom_fields_out = array( 'required', 'optional' ); - - require_once( IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php' ); - $custom_fields = new customProfileFields(); - - $custom_fields->member_data = $member; - $custom_fields->initData( 'edit' ); - $custom_fields->parseToEdit( 'register' ); - - if ( count( $custom_fields->out_fields ) ) - { - $this->cache->updateCacheWithoutSaving('_hasStep3', 1); - - foreach( $custom_fields->out_fields as $id => $form_element ) - { - if ( $custom_fields->cache_data[ $id ]['pf_not_null'] == 1 ) - { - $ftype = 'required'; - } - else - { - $ftype = 'optional'; - } - - $custom_fields_out[$ftype][] = array( - 'name' => $custom_fields->field_names[ $id ], - 'desc' => $custom_fields->field_desc[ $id ], - 'field' => $form_element, - 'id' => $id, - 'error' => $error, - 'type' => $custom_fields->cache_data[ $id ]['pf_type'] - ); - } - } - - /* CAPTCHA */ - if( $this->settings['bot_antispam'] ) - { - $captchaHTML = $this->registry->getClass('class_captcha')->getTemplate(); - } - - $this->registry->output->setTitle( $this->lang->words['registration_form'] ); - $this->registry->output->addNavigation( $this->lang->words['registration_form'], '' ); - - /* Other errors */ - $final_errors = array( 'username' => NULL, 'dname' => NULL, 'password' => NULL, 'email' => NULL ); - - foreach( array( 'username', 'dname', 'password', 'email' ) as $thing ) - { - if ( isset($form_errors[ $thing ]) AND is_array( $form_errors[ $thing ] ) AND count( $form_errors[ $thing ] ) ) - { - $final_errors[ $thing ] = implode( "
    ", $form_errors[ $thing ] ); - } - } - - $this->request['UserName'] = $this->request['UserName'] ? $this->request['UserName'] : '' ; - $this->request['PassWord'] = $this->request['PassWord'] ? $this->request['PassWord'] : '' ; - $this->request['EmailAddress'] = $this->request['EmailAddress'] ? $this->request['EmailAddress'] : '' ; - $this->request['EmailAddress_two'] = $this->request['EmailAddress_two'] ? $this->request['EmailAddress_two'] : '' ; - $this->request['PassWord_Check'] = $this->request['PassWord_Check'] ? $this->request['PassWord_Check'] : '' ; - $this->request['members_display_name'] = $this->request['members_display_name'] ? $this->request['members_display_name'] : '' ; - $this->request['time_offset'] = $this->request['time_offset'] ? $this->request['time_offset'] : '' ; - $this->request['allow_member_mail'] = $this->request['allow_member_mail'] ? $this->request['allow_member_mail'] : '' ; - $this->request['dst'] = $this->request['dst'] ? $this->request['dst'] : '' ; - - /* Time zone... */ - $this->registry->class_localization->loadLanguageFile( array( 'public_usercp' ), 'core' ); - - $time_select = array(); - - foreach( $this->lang->words as $k => $v ) - { - if( strpos( $k, "time_" ) === 0 ) - { - $k = str_replace( "time_", '', $k ); - - if( preg_match( "/^[\-\d\.]+$/", $k ) ) - { - $time_select[ $k ] = $v; - } - } - } - - ksort( $time_select ); - - /* set default.. */ - $this->request['time_offset'] = ( $this->request['time_offset'] ) ? $this->request['time_offset'] : $this->settings['time_offset']; - - /* Need username? */ - $uses_name = false; - - foreach( $this->cache->getCache('login_methods') as $method ) - { - if( $method['login_user_id'] == 'username' ) - { - $uses_name = true; - } - } - - /* Get form HTML */ - $this->output .= $this->registry->output->getTemplate('register')->registerForm( - $form_errors['general'], - array( - 'TEXT' => $this->lang->words['std_text'], - 'coppa_user' => $coppa, - 'captchaHTML' => $captchaHTML, - 'qandaHTML' => $qandaHTML, - 'requireName' => $uses_name, - ), - $final_errors, - $time_select, - $custom_fields_out ); - - /* Run the member sync module */ - IPSLib::runMemberSync( 'onRegisterForm' ); - } - - /** - * Processes the registration form - * - * @access public - * @return void - */ - public function registerProcessForm() - { - $form_errors = array(); - $coppa = ( $this->request['coppa_user'] == 1 ) ? 1 : 0; - $in_password = trim( $this->request['PassWord'] ); - $in_email = mb_strtolower( trim( $this->request['EmailAddress'] ) ); - $_SFS_FOUND = FALSE; - - /* Check */ - if( $this->settings['no_reg'] == 1 ) - { - $this->registry->output->showError( 'registration_disabled', 2016, true ); - } - - /* Custom profile field stuff */ - require_once( IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php' ); - $custom_fields = new customProfileFields(); - - $custom_fields->initData( 'edit' ); - $custom_fields->parseToSave( $this->request, 'register' ); - - /* Check */ - if( $custom_fields->error_messages ) - { - $form_errors['general'] = $custom_fields->error_messages; - } - - /* Check the email address */ - if ( ! $in_email OR strlen( $in_email ) < 6 OR !IPSText::checkEmailAddress( $in_email ) ) - { - $form_errors['email'][$this->lang->words['err_invalid_email']] = $this->lang->words['err_invalid_email']; - } - - if( trim($this->request['PassWord_Check']) != $in_password OR !$in_password ) - { - $form_errors['password'][$this->lang->words['passwords_not_match']] = $this->lang->words['passwords_not_match']; - } - - /* Test email address */ - $this->request['EmailAddress_two'] = mb_strtolower( trim( $this->request['EmailAddress_two'] ) ); - $this->request['EmailAddress'] = mb_strtolower( trim( $this->request['EmailAddress'] ) ); - - if( !IPSText::checkEmailAddress( $this->request['EmailAddress_two'] ) ) - { - $form_errors['email'][$this->lang->words['reg_error_email_invalid']] = $this->lang->words['reg_error_email_invalid']; - } - else - { - if ( $in_email AND $this->request['EmailAddress_two'] != $in_email ) - { - $form_errors['email'][$this->lang->words['reg_error_email_nm']] = $this->lang->words['reg_error_email_nm']; - } - } - - /* Need username? */ - $uses_name = false; - - foreach( $this->cache->getCache('login_methods') as $method ) - { - if( $method['login_user_id'] == 'username' ) - { - $uses_name = true; - } - } - - if( !$uses_name ) - { - $_REQUEST['UserName'] = $_REQUEST['members_display_name']; - $this->request['UserName'] = $this->request['members_display_name']; - } - - /* Check the username */ - $user_check = IPSMember::getFunction()->cleanAndCheckName( $this->request['UserName'], array(), 'name' ); - $disp_check = IPSMember::getFunction()->cleanAndCheckName( $this->request['members_display_name'] ? $this->request['members_display_name'] : $this->request['UserName'], array(), 'members_display_name' ); - - if( is_array( $user_check['errors'] ) && count( $user_check['errors'] ) ) - { - foreach( $user_check['errors'] as $key => $error ) - { - $form_errors[ $key ][] = $error; - } - } - - if( is_array( $disp_check['errors'] ) && count( $disp_check['errors'] ) ) - { - foreach( $disp_check['errors'] as $key => $error ) - { - if( !$this->settings['auth_allow_dnames'] AND !( is_array( $user_check['errors'] ) && count( $user_check['errors'] ) ) ) - { - $key = 'username'; - } - - $form_errors[ $key ][] = $error; - } - } - - /* CHECK 1: Any errors (missing fields, etc)? */ - if( count( $form_errors ) ) - { - $this->registerForm( $form_errors ); - return; - } - - /* Is this email addy taken? */ - if( IPSMember::checkByEmail( $in_email ) == TRUE ) - { - $form_errors['email'][$this->lang->words['reg_error_email_taken']] = $this->lang->words['reg_error_email_taken']; - } - - /* Load handler... */ - require_once( IPS_ROOT_PATH . 'sources/handlers/han_login.php' ); - $this->han_login = new han_login( $this->registry ); - $this->han_login->init(); - $this->han_login->emailExistsCheck( $in_email ); - - if( $this->han_login->return_code AND $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'EMAIL_NOT_IN_USE' ) - { - $form_errors['email'][$this->lang->words['reg_error_email_taken']] = $this->lang->words['reg_error_email_taken']; - } - - /* Are they banned [EMAIL]? */ - if ( IPSMember::isBanned( 'email', $in_email ) === TRUE ) - { - $form_errors['email'][$this->lang->words['reg_error_email_ban']] = $this->lang->words['reg_error_email_ban']; - } - - /* Check the CAPTCHA */ - if ( $this->settings['bot_antispam'] ) - { - if ( $this->registry->getClass('class_captcha')->validate() !== TRUE ) - { - $form_errors['general'][$this->lang->words['err_reg_code']] = $this->lang->words['err_reg_code']; - } - } - - /* Check the Q and A */ - if( $this->settings['registration_qanda'] ) - { - $qanda = intval($this->request['qanda_id']); - $pass = false; - - if( $qanda ) - { - $data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'question_and_answer', 'where' => 'qa_id=' . $qanda ) ); - - if( $data['qa_id'] ) - { - $answers = explode( "\n", str_replace( "\r", "", $data['qa_answers'] ) ); - - if( count($answers) ) - { - foreach( $answers as $answer ) - { - if( mb_strtolower($answer) == mb_strtolower($this->request['qa_answer']) ) - { - $pass = true; - break; - } - } - } - } - } - else - { - //----------------------------------------- - // Do we have any questions? - //----------------------------------------- - - $data = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as questions', 'from' => 'question_and_answer' ) ); - - if( !$data['questions'] ) - { - $pass = true; - } - } - - if( !$pass ) - { - $form_errors['general'][$this->lang->words['err_q_and_a']] = $this->lang->words['err_q_and_a']; - } - } - - /* CHECK 2: Any errors ? */ - if ( count( $form_errors ) ) - { - $this->registerForm( $form_errors ); - return; - } - - /* Build up the hashes */ - $mem_group = $this->settings['member_group']; - - /* Are we asking the member or admin to preview? */ - if( $this->settings['reg_auth_type'] ) - { - $mem_group = $this->settings['auth_group']; - } - else if ($coppa == 1) - { - $mem_group = $this->settings['auth_group']; - } - - /* Create member */ - $member = array( - 'name' => $this->request['UserName'], - 'password' => $in_password, - 'members_display_name' => $this->settings['auth_allow_dnames'] ? $this->request['members_display_name'] : $this->request['UserName'], - 'email' => $in_email, - 'member_group_id' => $mem_group, - 'joined' => time(), - 'ip_address' => $this->member->ip_address, - 'time_offset' => $this->request['time_offset'], - 'coppa_user' => $coppa, - 'members_auto_dst' => intval($this->request['dst']), - 'allow_admin_mails' => intval( $this->request['allow_admin_mail'] ), - 'hide_email' => $this->request['allow_member_mail'] ? 0 : 1, - ); - - /* Spam Service */ - $spamCode = 0; - - if( $this->settings['spam_service_enabled'] && $this->settings['spam_service_api_key'] ) - { - /* Query the service */ - $spamCode = IPSMember::querySpamService( $in_email ); - - /* Action to perform */ - $action = $this->settings[ 'spam_service_action_' . $spamCode ]; - - /* Perform Action */ - switch( $action ) - { - /* Proceed with registraction */ - case 1: - break; - - /* Flag for admin approval */ - case 2: - $member['member_group_id'] = $this->settings['auth_group']; - $this->settings['reg_auth_type'] = 'admin'; - break; - - /* Approve the account, but ban it */ - case 3: - $member['member_banned'] = 1; - $member['member_group_id'] = $this->settings['banned_group']; - $this->settings['reg_auth_type'] = ''; - break; - } - } - - //----------------------------------------- - // Create the account - //----------------------------------------- - - $member = IPSMember::create( array( 'members' => $member, 'pfields_content' => $this->request ) ); - - //----------------------------------------- - // Login handler create account callback - //----------------------------------------- - - $this->han_login->createAccount( array( 'email' => $member['email'], - 'joined' => $member['joined'], - 'password' => $in_password, - 'ip_address' => $this->member->ip_address, - 'username' => $member['members_display_name'], - ) ); - - //----------------------------------------- - // We'll just ignore if this fails - it shouldn't hold up IPB anyways - //----------------------------------------- - - /*if ( $han_login->return_code AND ( $han_login->return_code != 'METHOD_NOT_DEFINED' AND $han_login->return_code != 'SUCCESS' ) ) - { - $this->registry->output->showError( 'han_login_create_failed', 2017, true ); - }*/ - - //----------------------------------------- - // Validation - //----------------------------------------- - - $validate_key = md5( IPSLib::makePassword() . time() ); - $time = time(); - - if( $coppa != 1 ) - { - if( ( $this->settings['reg_auth_type'] == 'user' ) or ( $this->settings['reg_auth_type'] == 'admin' ) or ( $this->settings['reg_auth_type'] == 'admin_user' ) ) - { - //----------------------------------------- - // We want to validate all reg's via email, - // after email verificiation has taken place, - // we restore their previous group and remove the validate_key - //----------------------------------------- - - $this->DB->insert( 'validating', array( - 'vid' => $validate_key, - 'member_id' => $member['member_id'], - 'real_group' => /*$this->settings['subsm_enforce'] ? $this->settings['subsm_nopkg_group'] :*/ $this->settings['member_group'], - 'temp_group' => $this->settings['auth_group'], - 'entry_date' => $time, - 'coppa_user' => $coppa, - 'new_reg' => 1, - 'ip_address' => $member['ip_address'] - ) ); - - if( $this->settings['reg_auth_type'] == 'user' OR $this->settings['reg_auth_type'] == 'admin_user' ) - { - IPSText::getTextClass('email')->getTemplate("reg_validate"); - - IPSText::getTextClass('email')->buildMessage( array( - 'THE_LINK' => $this->settings['base_url'] . "app=core&module=global§ion=register&do=auto_validate&uid=" . urlencode( $member['member_id'] ) . "&aid=" . urlencode( $validate_key ), - 'NAME' => $member['members_display_name'], - 'MAN_LINK' => $this->settings['base_url'] . "app=core&module=global§ion=register&do=05", - 'EMAIL' => $member['email'], - 'ID' => $member['member_id'], - 'CODE' => $validate_key, - ) ); - - IPSText::getTextClass('email')->subject = $this->lang->words['new_registration_email'] . $this->settings['board_name']; - IPSText::getTextClass('email')->to = $member['email']; - - IPSText::getTextClass('email')->sendMail(); - - $this->output = $this->registry->output->getTemplate('register')->showAuthorize( $member ); - - } - else if( $this->settings['reg_auth_type'] == 'admin' ) - { - $this->output = $this->registry->output->getTemplate('register')->showPreview( $member ); - } - - if( $this->settings['new_reg_notify'] ) - { - $date = $this->registry->class_localization->getDate( time(), 'LONG', 1 ); - - IPSText::getTextClass('email')->getTemplate( 'admin_newuser' ); - - IPSText::getTextClass('email')->buildMessage( array( 'DATE' => $date, - 'LOG_IN_NAME' => $member['name'], - 'EMAIL' => $member['email'], - 'IP' => $member['ip_address'], - 'DISPLAY_NAME' => $member['members_display_name'] ) ); - - IPSText::getTextClass('email')->subject = $this->lang->words['new_registration_email1'] . $this->settings['board_name']; - IPSText::getTextClass('email')->to = $this->settings['email_in']; - IPSText::getTextClass('email')->sendMail(); - } - - $this->registry->output->setTitle( $this->lang->words['reg_success'] ); - $this->registry->output->addNavigation( $this->lang->words['nav_reg'], '' ); - } - else - { - /* We don't want to preview, or get them to validate via email. */ - $stat_cache = $this->caches['stats']; - - if( $member['members_display_name'] AND $member['member_id'] ) - { - $stat_cache['last_mem_name'] = $member['members_display_name']; - $stat_cache['last_mem_name_seo'] = IPSText::makeSeoTitle( $member['members_display_name'] ); - $stat_cache['last_mem_id'] = $member['member_id']; - } - - $stat_cache['mem_count'] += 1; - - $this->cache->setCache( 'stats', $stat_cache, array( 'array' => 1 ) ); - - if( $this->settings['new_reg_notify'] ) - { - $date = $this->registry->class_localization->getDate( time(), 'LONG', 1 ); - - IPSText::getTextClass('email')->getTemplate( 'admin_newuser' ); - - IPSText::getTextClass('email')->buildMessage( array( 'DATE' => $date, - 'LOG_IN_NAME' => $member['name'], - 'EMAIL' => $member['email'], - 'IP' => $member['ip_address'], - 'DISPLAY_NAME' => $member['members_display_name'] ) ); - - IPSText::getTextClass('email')->subject = $this->lang->words['new_registration_email1'] . $this->settings['board_name']; - IPSText::getTextClass('email')->to = $this->settings['email_in']; - IPSText::getTextClass('email')->sendMail(); - } - - IPSCookie::set( 'pass_hash' , $member['member_login_key'], 1); - IPSCookie::set( 'member_id' , $member['member_id'] , 1); - - //----------------------------------------- - // Fix up session - //----------------------------------------- - - $privacy = $this->request['Privacy'] ? 1 : 0; - - if( $member['g_hide_online_list'] ) - { - $privacy = 1; - } - - $this->member->sessionClass()->convertGuestToMember( array( 'member_name' => $member['members_display_name'], - 'member_id' => $member['member_id'], - 'member_group' => $member['member_group_id'], - 'login_type' => $privacy ) ); - - $this->registry->output->silentRedirect( $this->settings['base_url'] . '&app=core&module=global§ion=login&do=autologin&fromreg=1'); - } - } - else - { - /* This is a COPPA user, so lets tell them they registered OK and redirect to the form. */ - $this->DB->insert( 'validating', array ( - 'vid' => $validate_key, - 'member_id' => $member['member_id'], - 'real_group' => $this->settings['member_group'], - 'temp_group' => $this->settings['auth_group'], - 'entry_date' => $time, - 'coppa_user' => $coppa, - 'new_reg' => 1, - 'ip_address' => $member['ip_address'] - ) ); - - $this->registry->output->redirectScreen( $this->lang->words['cp_success'], $this->settings['base_url'] . 'app=core&module=global&section=register&do=12' ); - } - } + + * Invision Power Services + * IP.Board v3.1.4 + * Register + * Last Updated: $Date: 2010-10-05 21:26:08 -0400 (Tue, 05 Oct 2010) $ + * + * + * @author $Author $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 20th February 2002 + * @version $Rev: 6945 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_global_register extends ipsCommand +{ + /** + * Class entry point + * + * @access public + * @param object Registry reference + * @return void [Outputs to screen/redirects] + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load language */ + $this->registry->class_localization->loadLanguageFile( array( 'public_register' ), 'core' ); + + //----------------------------------------- + // Meta tags + //----------------------------------------- + + $this->registry->output->addMetaTag( 'robots', 'noindex' ); + + /* What to do */ + switch( $this->request['do'] ) + { + case 'process_form': + $this->registerProcessForm(); + break; + + case 'auto_validate': + $this->_autoValidate(); + break; + + case 'coppa_two': + $this->registerCoppaTwo(); + break; + + case '12': + $this->registerCoppaPermsForm(); + break; + + case '05': + $this->_showManualForm(); + break; + + case '07': + $this->_showManualForm('newemail'); + break; + + case 'reval': + $this->_revalidateForm(); + break; + + case 'reval2': + $this->_revalidateComplete(); + break; + + case 'complete_login': + $this->_completeRegistration(); + break; + case 'complete_login_do': + $this->_completeRegistrationSave(); + break; + + default: + case 'form': + if( $this->settings['no_reg'] > 0 ) + { + $this->registry->output->showError( 'registration_disabled', 10123, FALSE, '', 200 ); + } + + if( $this->settings['use_coppa'] == 1 and $this->request['coppa_pass'] != 1 ) + { + $this->registerCoppaStart(); + } + else + { + $this->registerForm(); + } + break; + } + + /* Output */ + $this->registry->output->addContent( $this->output ); + $this->registry->output->sendOutput(); + } + + + /** + * Save the data to complete the partial member record login/registration + * + * @access private + * @return void [Outputs to screen/redirects] + */ + private function _completeRegistrationSave() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $mid = intval( $this->request['mid'] ); + $key = intval( $this->request['key'] ); + $in_email = mb_strtolower( trim($this->request['EmailAddress']) ); + $banfilters = array(); + $form_errors = array( 'dname' => array(), 'email' => array(), 'general' => array() ); + $members_display_name = trim( $this->request['members_display_name'] ); + $poss_session_id = ""; + $login_user = trim( $this->request['login_user'] ); + $login_pass = trim( $this->request['login_pass'] ); + $connectService = trim( mb_strtolower( $this->request['connectService'] ) ); + + //----------------------------------------- + // Get DB row + //----------------------------------------- + + $reg = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'members_partial', 'where' => "partial_member_id={$mid} AND partial_date={$key}" ) ); + $tmp_member = IPSMember::load( $mid ); + + //----------------------------------------- + // Got it? + //----------------------------------------- + + if ( ! $reg['partial_id'] OR ! $tmp_member['member_id'] ) + { + $this->registry->output->showError( 'partial_reg_noid', 10117 ); + } + + //----------------------------------------- + // Load ban filters + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'banfilters' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $banfilters[ $r['ban_type'] ][] = $r['ban_content']; + } + + //----------------------------------------- + // Load log in handler... + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $han_login = new $classToLoad( $this->registry ); + $han_login->init(); + + //----------------------------------------- + // Custom profile field stuff + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php', 'customProfileFields' ); + $custom_fields = new $classToLoad(); + + $custom_fields->initData( 'edit' ); + $custom_fields->parseToSave( $this->request, 'register' ); + + /* Check */ + if( $custom_fields->error_messages ) + { + $form_errors['general'] = $custom_fields->error_messages; + } + + /* Check the website url field */ + $website_field = $custom_fields->getFieldIDByKey( 'website' ); + + if( $website_field && $custom_fields->out_fields[ 'field_' . $website_field ] ) + { + if( ! stristr( $custom_fields->out_fields[ 'field_' . $website_field ], 'http://' ) ) + { + $custom_fields->out_fields[ 'field_' . $website_field ] = 'http://' . $custom_fields->out_fields[ 'field_' . $website_field ]; + } + } + + /* Are we trying to connect to an existing account */ + if ( $connectService AND $login_user AND $login_pass AND ( $this->settings['fb_realname'] == 'enforced' OR !$members_display_name ) ) + { + /* Load Full Member */ + $member = IPSMember::load( $mid, 'all' ); + + /* Force email check */ + $han_login->setForceEmailCheck( TRUE ); + + /* Now attempt to authorize member */ + $return = $han_login->loginPasswordCheck( '', $login_user, $login_pass ); + + if ( $return !== TRUE ) + { + /* Wrong email/password */ + $form_errors['serviceLogIn'][] = $this->lang->words['connect_incorrect_details']; + } + else + { + /* Fetch data returned based on email address */ + $logInMember = $han_login->member_data; + + /* We're A-OK so allow service module to clean up member accounts, then log us the heck in! */ + if ( $connectService == 'facebook' AND $member['fb_uid'] ) + { + /* Already FBd? */ + if ( $logInMember['fb_uid'] AND ( $member['fb_uid'] != $logInMember['fb_uid'] ) ) + { + /* User already has facebook link */ + $form_errors['serviceLogIn'][] = sprintf( $this->lang->words['connect_already_linked'], $login_user, ucfirst( $connectService ) ); + } + + require_once( IPS_ROOT_PATH . 'sources/classes/facebook/connect.php' ); + $facebook = new facebook_connect( $this->registry, $member['fb_token'], $member['fb_uid'] ); + + if ( $facebook->finishNewConnection( $logInMember['member_id'], $member['member_id'] ) !== true ) + { + /* Unknown error */ + $form_errors['serviceLogIn'][] = $this->lang->words['connect_unknown']; + } + } + else if ( $connectService == 'twitter' AND $member['twitter_id'] ) + { + /* Already FBd? */ + if ( $logInMember['twitter_id'] AND ( $member['twitter_id'] != $logInMember['twitter_id'] ) ) + { + /* User already has facebook link */ + $form_errors['serviceLogIn'][] = sprintf( $this->lang->words['connect_already_linked'], $login_user, ucfirst( $connectService ) ); + } + + require_once( IPS_ROOT_PATH . 'sources/classes/twitter/connect.php' ); + $twitter = new twitter_connect( $this->registry, $member['twitter_token'], $member['twitter_secret'] ); + + if ( $twitter->finishNewConnection( $logInMember['member_id'], $member['member_id'] ) !== true ) + { + /* Unknown error */ + $form_errors['serviceLogIn'][] = $this->lang->words['connect_unknown']; + } + } + else if ( $connectService == 'vkontakte' AND $member['vk_uid'] ) + { + /* Already VKd? */ + if ( $logInMember['vk_uid'] AND ( $member['vk_uid'] != $logInMember['vk_uid'] ) ) + { + /* User already has vkontakte link */ + $form_errors['serviceLogIn'][] = sprintf( $this->lang->words['connect_already_linked'], $login_user, ucfirst( $connectService ) ); + } + + require_once( IPS_ROOT_PATH . 'sources/classes/vkontakte/connect.php' ); + $vk = new vkontakte_connect( $this->registry, $key ); + + if ( $vk->finishNewConnection( $logInMember['member_id'], $member['member_id'] ) !== true ) + { + /* Unknown error */ + $form_errors['serviceLogIn'][] = $this->lang->words['connect_unknown']; + } + } + + /* Ok to proceed? */ + if ( ! count( $form_errors['serviceLogIn'] ) ) + { + IPSMember::remove( $member['member_id'] ); + + /* Here, so log us in!! */ + $r = $han_login->loginWithoutCheckingCredentials( $logInMember['member_id'], TRUE ); + + /* Boing */ + if ( is_array( $r ) ) + { + $this->registry->getClass('output')->silentRedirect( $this->settings['base_url'] . 'app=core&module=usercp§ion=register&tab=members&area=' . $connectService ); + } + } + } + } + + //----------------------------------------- + // Remove 'sneaky' spaces + //----------------------------------------- + + if ( $this->settings['strip_space_chr'] ) + { + $members_display_name = IPSText::removeControlCharacters( $members_display_name ); + } + + //----------------------------------------- + // Testing email addresses? + //----------------------------------------- + + if ( ! $reg['partial_email_ok'] AND $in_email ) + { + //----------------------------------------- + // Check the email address + //----------------------------------------- + + if( ! IPSText::checkEmailAddress( $in_email ) ) + { + $form_errors['email'][] = $this->lang->words['reg_error_email_nm']; + } + + //----------------------------------------- + // Test email address + //----------------------------------------- + + $this->request['EmailAddress_two'] = mb_strtolower( trim($this->request['EmailAddress_two']) ); + + if ( $in_email AND ( $this->request['EmailAddress_two'] != $in_email ) ) + { + $form_errors['email'][] = $this->lang->words['reg_error_email_nm']; + } + + //----------------------------------------- + // Are they banned [EMAIL]? + //----------------------------------------- + + if ( is_array( $banfilters['email'] ) and count( $banfilters['email'] ) ) + { + foreach ( $banfilters['email'] as $email ) + { + $email = str_replace( '\*', '.*' , preg_quote($email, "/") ); + + if ( preg_match( "/^{$email}$/i", $in_email ) ) + { + $form_errors['email'][] = $this->lang->words['reg_error_email_taken']; + break; + } + } + } + + /* Is this email addy taken? */ + if( IPSMember::checkByEmail( $in_email ) == TRUE ) + { + $form_errors['email'][] = $this->lang->words['reg_error_email_taken']; + } + + if( $han_login->emailExistsCheck( trim( mb_strtolower( $in_email ) ) ) ) + { + $form_errors['email'][] = $this->lang->words['reg_error_email_taken']; + } + } + else if ( ! $reg['partial_email_ok'] AND ! $in_email AND ! $login_user ) + { + $form_errors['email'][] = $this->lang->words['reg_error_email_nm']; + } + + if ( $this->settings['auth_allow_dnames'] ) + { + /* Check the username */ + $user_check = IPSMember::getFunction()->cleanAndCheckName( $members_display_name, $tmp_member, 'members_display_name' ); + + if( is_array( $user_check['errors'] ) && count( $user_check['errors'] ) ) + { + $form_errors['dname'][] = $this->lang->words[ $user_check['errors']['dname'] ]; + } + } + + //----------------------------------------- + // CHECK 1: Any errors (duplicate names, etc)? + //----------------------------------------- + + if ( count( $form_errors ) ) + { + $errorMessages = array(); + + foreach( $form_errors as $errorCat => $errorMessage ) + { + foreach( $errorMessage as $error ) + { + $errorMessages['general'][] = $error; + } + } + + if( count($errorMessages) ) + { + $this->_completeRegistration( $errorMessages ); + return; + } + } + + //----------------------------------------- + // Update: Members + //----------------------------------------- + + $members_display_name = $this->settings['auth_allow_dnames'] ? $members_display_name : $tmp_member['name']; + $member_group_id = ( $tmp_member['twitter_token'] AND $tmp_member['member_group_id'] == $this->settings['auth_group']) ? $this->settings['member_group'] : $tmp_member['member_group_id']; + + if ( ! $reg['partial_email_ok'] ) + { + IPSMember::save( $mid, array( 'members' => array( + 'email' => $in_email, + 'members_display_name' => $members_display_name, + 'members_seo_name' => IPSText::makeSeoTitle( $members_display_name ), + 'name' => $tmp_member['name'] ? $tmp_member['name'] : $members_display_name, + 'members_l_username' => $tmp_member['members_l_username'] ? $tmp_member['members_l_username'] : $members_display_name, + 'member_group_id' => $member_group_id, + 'members_l_display_name' => mb_strtolower( $members_display_name ) + ) ) ); + } + else + { + IPSMember::save( $mid, array( 'members' => array( + 'members_display_name' => $members_display_name, + 'members_seo_name' => IPSText::makeSeoTitle( $members_display_name ), + 'name' => $tmp_member['name'] ? $tmp_member['name'] : $members_display_name, + 'members_l_username' => $tmp_member['members_l_username'] ? $tmp_member['members_l_username'] : $members_display_name, + 'member_group_id' => $member_group_id, + 'members_l_display_name' => mb_strtolower( $members_display_name ) + ) ) ); + } + + //----------------------------------------- + // Delete: Partials row + //----------------------------------------- + + $this->DB->delete( 'members_partial', 'partial_member_id=' . $mid ); + $this->DB->delete( 'vkontakte_connect', "v_key='" . $key . "'" ); + + //----------------------------------------- + // Update: Profile fields + //----------------------------------------- + + $this->DB->force_data_type = array(); + + foreach( $custom_fields->out_fields as $_field => $_data ) + { + $this->DB->force_data_type[ $_field ] = 'string'; + } + + if ( is_array($custom_fields->out_fields) and count($custom_fields->out_fields) ) + { + $this->DB->update( 'pfields_content', $custom_fields->out_fields, 'member_id=' . $mid ); + } + + //----------------------------------------- + // Pass twitter/facebook via spam service + //----------------------------------------- + + //----------------------------------------- + // Send out admin email + //----------------------------------------- + + if ( $this->settings['new_reg_notify'] ) + { + $date = $this->registry->getClass('class_localization')->getDate( time(), 'LONG', 1 ); + + IPSText::getTextClass('email')->getTemplate("admin_newuser"); + + IPSText::getTextClass('email')->buildMessage( array( 'DATE' => $date, + 'LOG_IN_NAME' => $tmp_member['name'] ? $tmp_member['name'] : $members_display_name, + 'EMAIL' => $in_email, + 'IP' => $tmp_member['ip_address'], + 'DISPLAY_NAME' => $members_display_name ) ); + + IPSText::getTextClass('email')->subject = $this->lang->words['new_registration_email'] . $this->settings['board_name']; + IPSText::getTextClass('email')->to = $this->settings['email_in']; + IPSText::getTextClass('email')->sendMail(); + } + + //----------------------------------------- + // Set cookies + //----------------------------------------- + + IPSCookie::set("member_id" , $mid , 1 ); + IPSCookie::set("pass_hash" , $tmp_member['member_login_key'] , 1 ); + + //----------------------------------------- + // Fix up session + //----------------------------------------- + + $privacy = $this->request['Privacy'] ? 1 : 0; + + if( $this->caches['group_cache'][ $tmp_member['member_group_id'] ]['g_hide_online_list'] ) + { + $privacy = 1; + } + + $this->member->sessionClass()->convertGuestToMember( array( 'member_name' => $members_display_name, + 'member_id' => $mid, + 'member_group' => $tmp_member['member_group_id'], + 'login_type' => $privacy ) ); + + //----------------------------------------- + // Update Stats + //----------------------------------------- + + $cache = $this->cache->getCache('stats'); + + if( $members_display_name AND $mid AND $privacy ) + { + $cache['last_mem_name'] = $members_display_name; + $cache['last_mem_name_seo'] = IPSText::makeSeoTitle( $members_display_name ); + $cache['last_mem_id'] = $mid; + } + + $cache['mem_count'] += 1; + + $this->cache->setCache( 'stats', $cache, array( 'array' => 1 ) ); + + /* Complete account */ + IPSLib::runMemberSync( 'onCompleteAccount', IPSMember::load( $mid ) ); + + //----------------------------------------- + // Go to the board index + //----------------------------------------- + + $this->registry->output->redirectScreen( $this->lang->words['clogin_done'], $this->settings['base_url'] ); + } + + /** + * When a member logs in via an external login method and we do not have all of the data + * to create the member's account, we create a partial record. This function shows the + * form upon first visit by member (usually immediately after login) to complete the + * login/registration. + * + * @access private + * @param array Errors + * @return void [Outputs to screen/redirects] + */ + private function _completeRegistration( $form_errors=array() ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $mid = intval( $this->request['mid'] ); + $key = intval( $this->request['key'] ); + $final_errors = ''; + + //----------------------------------------- + // Get DB row + //----------------------------------------- + + $reg = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'members_partial', + 'where' => "partial_member_id={$mid} AND partial_date={$key}" ) ); + + //----------------------------------------- + // Got it? + //----------------------------------------- + + if ( ! $reg['partial_id'] ) + { + $this->registry->output->showError( 'partial_reg_noid', 10118 ); + } + + /* Load Full Member */ + $member = IPSMember::load( $mid, 'all' ); + + /* Twitter or Facebook? */ + if ( $member['fb_uid'] AND $member['fb_token'] ) + { + /* Attempt to fetch user details */ + require_once( IPS_ROOT_PATH . 'sources/classes/facebook/connect.php' ); + $facebook = new facebook_connect( $this->registry, $member['fb_token'], $member['fb_uid'] ); + + $userData = $facebook->fetchUserData(); + + if ( $userData['id'] ) + { + $userData['service'] = 'facebook'; + $userData['_name'] = $userData['name']; + $userData['_pic'] = $userData['pic_square']; + $userData['_sImage'] = $this->settings['public_dir'] . 'style_status/facebook.png'; + + /* Enforcing / allowing real names? */ + if ( ! count( $form_errors['dname'] ) AND $this->settings['fb_realname'] != 'any' ) + { + $userData['_displayName'] = $userData['_name']; + + /* Now, make sure we have a unique display name */ + $max = $this->DB->buildAndFetch( array( 'select' => 'MAX(member_id) as max', + 'from' => 'members', + 'where' => "members_l_display_name LIKE '" . $this->DB->addSlashes( mb_strtolower( $userData['_displayName'] ) ) . "%'" ) ); + + if ( $max['max'] ) + { + /* does the username already have it set? */ + if ( stristr( $member['name'], $userData['_displayName'] ) ) + { + $userData['_displayName'] = $member['name']; + } + else + { + $_num = $max['max'] + 1; + $userData['_displayName'] = $userData['_displayName'] . '_' . $_num; + } + } + } + } + } + else if ( $member['twitter_id'] AND $member['twitter_token'] AND $member['twitter_secret'] ) + { + /* Attempt to fetch user details */ + require_once( IPS_ROOT_PATH . 'sources/classes/twitter/connect.php' ); + $twitter = new twitter_connect( $this->registry, $member['twitter_token'], $member['twitter_secret'] ); + + $userData = $twitter->fetchUserData(); + + if ( $userData['id'] ) + { + $userData['service'] = 'twitter'; + $userData['_name'] = $userData['screen_name']; + $userData['_pic'] = $userData['profile_image_url']; + $userData['_sImage'] = $this->settings['public_dir'] . 'style_status/twitter.png'; + } + } + else if ( $member['vk_uid'] ) + { + /* Attempt to fetch user details */ + require_once( IPS_ROOT_PATH . 'sources/classes/vkontakte/connect.php' ); + $vk = new vkontakte_connect( $this->registry, $key ); + + $userData = $vk->fetchUserData(); + + if ( $userData['id'] ) + { + $userData['service'] = 'vkontakte'; + $userData['_name'] = $userData['name']; + $userData['_pic'] = $userData['photo']; + $userData['_sImage'] = $this->settings['public_dir'] . 'style_status/vkontakte.png'; + } + } + + /* Remote registrations disabled? */ + if ( $this->settings['no_reg'] == 2 ) + { + $this->registry->output->showError( 'no_remote_reg', 1090001 ); + } + + //----------------------------------------- + // Custom profile fields stuff + //----------------------------------------- + + /* Custom Profile Fields */ + $custom_fields_out = array( 'required', 'optional' ); + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php', 'customProfileFields' ); + $custom_fields = new $classToLoad(); + + $custom_fields->member_data = array(); + $custom_fields->initData( 'edit' ); + $custom_fields->parseToEdit( 'register' ); + + if ( count( $custom_fields->out_fields ) ) + { + foreach( $custom_fields->out_fields as $id => $form_element ) + { + if ( $custom_fields->cache_data[ $id ]['pf_not_null'] == 1 ) + { + $ftype = 'required'; + } + else + { + $ftype = 'optional'; + } + + $custom_fields_out[$ftype][] = array( + 'name' => $custom_fields->field_names[ $id ], + 'desc' => $custom_fields->field_desc[ $id ], + 'field' => $form_element, + 'id' => $id, + 'error' => '', + 'type' => $custom_fields->cache_data[ $id ]['pf_type'] + ); + } + } + + //----------------------------------------- + // Other errors + //----------------------------------------- + + foreach( array( 'username', 'dname', 'password', 'email', 'general', 'serviceLogIn' ) as $thing ) + { + if ( is_array( $form_errors[ $thing ] ) AND count( $form_errors[ $thing ] ) ) + { + $final_errors .= implode( "
    ", $form_errors[ $thing ] ); + } + } + + //----------------------------------------- + // No display name? + //----------------------------------------- + + if ( ! $this->memberData['members_display_name'] ) + { + $this->memberData['members_display_name'] = ( $member['members_display_name'] ) ? $member['members_display_name'] : $member['email']; + } + + //----------------------------------------- + // Show the form (email and display name) + //----------------------------------------- + + $this->output .= $this->registry->getClass('output')->getTemplate('register')->completePartialLogin( $mid, $key, $custom_fields_out, $final_errors, $reg, $userData ); + + $this->registry->output->setTitle( $this->lang->words['clogin_title'] . ' - ' . ipsRegistry::$settings['board_name'] ); + $this->registry->output->addNavigation( $this->lang->words['clogin_title'], '' ); + } + + /** + * Show the form to request validation email to be resent + * + * @access private + * @param string Errors + * @return void [Outputs to screen/redirects] + */ + private function _revalidateForm( $errors="" ) + { + $uses_name = false; + $uses_email = false; + + foreach( $this->cache->getCache('login_methods') as $method ) + { + if( $method['login_user_id'] == 'username' ) + { + $uses_name = true; + } + + if( $method['login_user_id'] == 'email' ) + { + $uses_email = true; + } + } + + if( $uses_name AND $uses_email ) + { + $name = $this->memberData['member_id'] == "" ? '' : $this->memberData['name']; + $this->lang->words['rv_ins'] = $this->lang->words['rv_ins_both']; + } + else if( $uses_email ) + { + $name = $this->memberData['member_id'] == "" ? '' : $this->memberData['email']; + $this->lang->words['rv_ins'] = $this->lang->words['rv_ins_email']; + } + else + { + $name = $this->memberData['member_id'] == "" ? '' : $this->memberData['name']; + $this->lang->words['rv_ins'] = $this->lang->words['rv_ins_name']; + } + + $this->output .= $this->registry->getClass('output')->getTemplate('register')->showRevalidateForm( $name, $errors ); + $this->registry->output->setTitle( $this->lang->words['rv_title'] . ' - ' . ipsRegistry::$settings['board_name'] ); + $this->registry->output->addNavigation( $this->lang->words['rv_title'], '' ); + } + + /** + * Resend email validation request for lost password, email change and new registration + * + * @access private + * @return void [Outputs to screen/redirects] + */ + private function _revalidateComplete() + { + //----------------------------------------- + // Check in the DB for entered member name + //----------------------------------------- + + if ( $this->request['username'] == "" ) + { + $this->_revalidateForm('err_no_username'); + return; + } + + $username = $this->request['username']; + $keyType = IPSText::checkEmailAddress( $this->request['username'] ) ? 'email' : 'username'; + + $member = IPSMember::load( $username, 'extendedProfile', $keyType ); + + if ( ! $member['member_id'] ) + { + /** + * Try the other key type just to be safe... + */ + $member = IPSMember::load( $username, 'extendedProfile', $keyType == 'email' ? 'username' : 'email' ); + + if ( ! $member['member_id'] ) + { + $this->_revalidateForm('err_no_username'); + return; + } + } + + //----------------------------------------- + // Check in the DB for any validations + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'validating', 'where' => "member_id=" . intval($member['member_id']) ) ); + $this->DB->execute(); + + if ( ! $val = $this->DB->fetch() ) + { + $this->_revalidateForm('err_no_validations'); + return; + } + + //----------------------------------------- + // Which type is it then? + //----------------------------------------- + + if ( $val['lost_pass'] == 1 ) + { + IPSText::getTextClass('email')->getTemplate("lost_pass"); + + IPSText::getTextClass('email')->buildMessage( array( + 'NAME' => $member['members_display_name'], + 'THE_LINK' => $this->settings['base_url'] . "app=core&module=global§ion=lostpass&do=sendform&uid=" . $member['member_id'] . "&aid=" . $val['vid'], + 'MAN_LINK' => $this->settings['base_url'] . "app=core&module=global§ion=lostpass&do=sendform", + 'EMAIL' => $member['email'], + 'ID' => $member['member_id'], + 'CODE' => $val['vid'], + 'IP_ADDRESS' => $this->member->ip_address, + ) + ); + + IPSText::getTextClass('email')->subject = $this->lang->words['lp_subject'].' '.$this->settings['board_name']; + IPSText::getTextClass('email')->to = $member['email']; + + IPSText::getTextClass('email')->sendMail(); + } + else if ( $val['new_reg'] == 1 ) + { + IPSText::getTextClass('email')->getTemplate("reg_validate"); + + IPSText::getTextClass('email')->buildMessage( array( + 'THE_LINK' => $this->settings['base_url'] . "app=core&module=global§ion=register&do=auto_validate&uid=" . $member['member_id'] . "&aid=" . $val['vid'], + 'NAME' => $member['members_display_name'], + 'MAN_LINK' => $this->settings['base_url'] . "app=core&module=global§ion=register&do=05", + 'EMAIL' => $member['email'], + 'ID' => $member['member_id'], + 'CODE' => $val['vid'], + ) + ); + + IPSText::getTextClass('email')->subject = $this->lang->words['email_reg_subj'] . " " . $this->settings['board_name']; + IPSText::getTextClass('email')->to = $member['email']; + + IPSText::getTextClass('email')->sendMail(); + } + else if ( $val['email_chg'] == 1 ) + { + IPSText::getTextClass('email')->getTemplate("newemail"); + + IPSText::getTextClass('email')->buildMessage( array( + 'NAME' => $member['members_display_name'], + 'THE_LINK' => $this->settings['base_url'] . "app=core&module=global§ion=register&do=auto_validate&type=newemail&uid=" . $member['member_id'] . "&aid=" . $val['vid'], + 'ID' => $member['member_id'], + 'MAN_LINK' => $this->settings['base_url'] . "app=core&module=global§ion=register&do=07", + 'CODE' => $val['vid'], + ) + ); + + IPSText::getTextClass('email')->subject = $this->lang->words['ne_subject'] . ' ' . $this->settings['board_name']; + IPSText::getTextClass('email')->to = $member['email']; + + IPSText::getTextClass('email')->sendMail(); + } + else + { + $this->_revalidateForm('err_no_validations'); + return; + } + + $this->output .= $this->registry->getClass('output')->getTemplate('register')->showRevalidated(); + + $this->registry->output->setTitle( $this->lang->words['rv_title'] . ' - ' . ipsRegistry::$settings['board_name'] ); + $this->registry->output->addNavigation( $this->lang->words['rv_title'], '' ); + } + + /** + * Show the form to manually enter in validation info if auto-validation failed. + * + * @access private + * @param string Type of validation + * @param string Error messages + * @return void [Outputs to screen/redirects] + */ + private function _showManualForm($type='reg', $errors="") + { + //----------------------------------------- + // In IPB3 this is handled by another section + // If somehow a request comes in, send to correct location + //----------------------------------------- + + if ( $type == 'lostpass' ) + { + $this->registry->output->silentRedirect( $this->settings['base_url'] . 'app=core&module=global§ion=lostpass&do=sendform&uid=' . $this->request['uid'] . '&aid=' . $this->request['aid'] ); + } + else + { + $this->output = $this->registry->getClass('output')->getTemplate('register')->showManualForm( $type ); + } + + $this->registry->output->setTitle( $this->lang->words['activation_form'] . ' - ' . ipsRegistry::$settings['board_name'] ); + $this->registry->output->addNavigation( $this->lang->words['activation_form'], '' ); + } + + + /** + * Show coppa form. This is the downloadable/printable form, and as such is just printed to the browser directly + * + * @access private + * @return void + */ + private function registerCoppaPermsForm() + { + /* Keith said to strip these out - it's all his fault :( */ + $this->settings[ 'coppa_address'] = str_replace( array( '
    ', '
    ' ), '', $this->settings['coppa_address'] ); + $this->settings[ 'coppa_address'] = nl2br( $this->settings['coppa_address'] ); + + echo( $this->registry->output->getTemplate('register')->registerCoppaForm() ); + exit(); + } + + /** + * This is the second page a COPPA submission hits. Really, user hits this page and if birthday is older than 13 + * we just continue with registration form. Otherwise we show the coppa validation required message with link + * to download/print coppa compliance sheet for parents to fill in. + * + * @access private + * @return void + */ + private function registerCoppaTwo() + { + if( ! $this->request['m'] OR ! $this->request['d'] OR ! $this->request['y'] ) + { + $this->registry->output->showError( 'coppa_form_fill', 10119 ); + } + + $birthday = mktime( 0, 0, 0, intval( $this->request['m'] ), intval( $this->request['d'] ), intval( $this->request['y'] ) ); + $coppa = mktime( 0, 0, 0, date( "m" ), date ("d" ), date( "Y" ) - 13 ); + + if( $birthday <= $coppa ) + { + $this->registerForm(); + return; + } + + IPSCookie::set( 'coppa', 'yes', 0, 1 ); + IPSCookie::set( 'coppabday', $this->request['m'] . '-' . $this->request['d'] . '-' . $this->request['y'], 0, 1 ); + + $this->lang->words['coppa_form_text'] = str_replace( "<#FORM_LINK#>", "" . $this->lang->words['coppa_link_form'] . "", $this->lang->words['coppa_form_text']); + + $this->output .= $this->registry->output->getTemplate('register')->registerCoppaTwo(); + + $this->registry->output->setTitle( $this->lang->words['coppa_title'] . ' - ' . ipsRegistry::$settings['board_name']); + $this->registry->output->addNavigation( $this->lang->words['coppa_title'], '' ); + } + + /** + * First COPPA screen. Shows form for visitor to enter birthday in and then submits to registerCoppaTwo + * + * @access private + * @return void + */ + private function registerCoppaStart() + { + $this->lang->words['coppa_form_text'] = str_replace( "<#FORM_LINK#>", "{$this->lang->words['coppa_link_form']}", $this->lang->words['coppa_form_text']); + + $this->output .= $this->registry->output->getTemplate('register')->registerCoppaStart(); + + $this->registry->output->setTitle( $this->lang->words['coppa_title'] . ' - ' . ipsRegistry::$settings['board_name'] ); + $this->registry->output->addNavigation( $this->lang->words['coppa_title'], '' ); + } + + /** + * Validation completion. This is the action hit when a user clicks a validation link from their email for + * lost password, email change and new registration. + * + * @access private + * @return void + */ + private function _autoValidate() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $in_user_id = intval(trim(urldecode($this->request['uid']))); + $in_validate_key = substr( IPSText::alphanumericalClean( urldecode( $this->request['aid'] ) ), 0, 32 ); + $in_type = trim($this->request['type']); + $in_type = $in_type ? $in_type : 'reg'; + + //----------------------------------------- + // Attempt to get the profile of the requesting user + //----------------------------------------- + + $member = IPSMember::load( $in_user_id, 'members' ); + + if ( ! $member['member_id'] ) + { + $this->_showManualForm( $in_type, 'reg_error_validate' ); + return; + } + + //----------------------------------------- + // Get validating info.. + //----------------------------------------- + + if ( $in_type == 'lostpass' ) + { + $validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id=' . $in_user_id . " AND lost_pass=1" ) ); + } + else if ( $in_type == 'newemail' ) + { + $validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id=' . $in_user_id . " AND email_chg=1" ) ); + } + else + { + $validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id=' . $in_user_id ) ); + } + + //----------------------------------------- + // Checks... + //----------------------------------------- + + if ( ! $validate['member_id'] ) + { + $this->registry->output->showError( 'no_validate_key', 10120 ); + } + + //----------------------------------------- + // Changed to check if this is an admin flagged + // account for a spam user too + //----------------------------------------- + + if ( ( $validate['new_reg'] == 1 ) && (($this->settings['reg_auth_type'] == "admin" ) || $validate['spam_user']) ) + { + $this->registry->output->showError( 'validate_admin_turn', 10121 ); + } + + if ( $validate['vid'] != $in_validate_key ) + { + $this->registry->output->showError( 'validation_key_invalid', 10122 ); + } + + //----------------------------------------- + // Captcha (from posted form, not GET) + //----------------------------------------- + + if ( $this->settings['use_captcha'] AND $this->request['uid'] ) + { + if ( $this->registry->getClass('class_captcha')->validate( $this->request['captcha_unique_id'], $this->request['captcha_input'] ) !== TRUE ) + { + $this->_showManualForm( $in_type, 'reg_error_anti_spam' ); + return; + } + } + //----------------------------------------- + // REGISTER VALIDATE + //----------------------------------------- + + if ( $validate['new_reg'] == 1 ) + { + if ( ! $validate['real_group'] ) + { + $validate['real_group'] = $this->settings['member_group']; + } + else if( ! array_key_exists( $validate['real_group'], $this->caches['group_cache'] ) ) + { + $validate['real_group'] = $this->settings['member_group']; + } + + //----------------------------------------- + // SELF-VERIFICATION... + // 12.14.2009 Changed from != 'admin_user' to + // be more inclusive (just self-verification only) + //----------------------------------------- + + if ( $this->settings['reg_auth_type'] == 'user' ) + { + IPSMember::save( $member['member_id'], array( 'members' => array( 'member_group_id' => $validate['real_group'] ) ) ); + + /* Reset newest member */ + $stat_cache = $this->caches['stats']; + + if( $member['members_display_name'] AND $member['member_id'] AND !$this->caches['group_cache'][ $validate['real_group'] ]['g_hide_online_list'] ) + { + $stat_cache['last_mem_name'] = $member['members_display_name']; + $stat_cache['last_mem_name_seo'] = IPSText::makeSeoTitle( $member['members_display_name'] ); + $stat_cache['last_mem_id'] = $member['member_id']; + } + + $stat_cache['mem_count'] += 1; + + $this->cache->setCache( 'stats', $stat_cache, array( 'array' => 1 ) ); + + //----------------------------------------- + // Remove "dead" validation + //----------------------------------------- + + $this->DB->delete( 'validating', "vid='" . $validate['vid'] . "'" ); + + $this->registry->output->silentRedirect( $this->settings['base_url'] . '&app=core&module=global§ion=login&do=autologin&fromreg=1' ); + } + + //----------------------------------------- + // ADMIN-VERIFICATION... + //----------------------------------------- + + else + { + //----------------------------------------- + // Update DB row... + //----------------------------------------- + + $this->DB->update( 'validating', array( 'user_verified' => 1 ), 'vid=\'' . $validate['vid'] . '\'' ); + + //----------------------------------------- + // Print message + //----------------------------------------- + + $this->registry->output->setTitle( $this->lang->words['validation_complete'] . ' - ' . ipsRegistry::$settings['board_name'] ); + + $this->output = $this->registry->getClass('output')->getTemplate('register')->showPreview( $member ); + } + } + + //----------------------------------------- + // LOST PASS VALIDATE + //----------------------------------------- + + else if ( $validate['lost_pass'] == 1 ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $save_array = array(); + + //----------------------------------------- + // Generate a new random password + //----------------------------------------- + + $new_pass = IPSLib::makePassword(); + + //----------------------------------------- + // Generate a new salt + //----------------------------------------- + + $salt = IPSMember::generatePasswordSalt(5); + $salt = str_replace( '\\', "\\\\", $salt ); + + //----------------------------------------- + // New log in key + //----------------------------------------- + + $key = IPSMember::generateAutoLoginKey(); + + //----------------------------------------- + // Update... + //----------------------------------------- + + $save_array['members_pass_salt'] = $salt; + $save_array['members_pass_hash'] = md5( md5($salt) . md5( $new_pass ) ); + $save_array['member_login_key'] = $key; + $save_array['member_login_key_expire'] = $this->settings['login_key_expire'] * 60 * 60 * 24; + + //----------------------------------------- + // Load handler... + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $this->han_login = new $classToLoad( $this->registry ); + $this->han_login->init(); + $this->han_login->changePass( $member['email'], md5( $new_pass ), $new_pass, $member ); + + if ( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' ) + { + $this->registry->output->showError( 'lostpass_external_fail', 2015, true ); + } + + IPSMember::save( $member['member_id'], array( 'members' => $save_array ) ); + + //----------------------------------------- + // Send out the email... + //----------------------------------------- + + IPSText::getTextClass('email')->getTemplate("lost_pass_email_pass"); + + IPSText::getTextClass('email')->buildMessage( array( + 'NAME' => $member['members_display_name'], + 'THE_LINK' => $this->settings['base_url'] . 'app=core&module=usercp&tab=core&area=password', + 'PASSWORD' => $new_pass, + 'LOGIN' => $this->settings['base_url'] . 'app=core&module=global§ion=login', + 'USERNAME' => $member['name'], + 'EMAIL' => $member['email'], + 'ID' => $member['member_id'], + ) + ); + + IPSText::getTextClass('email')->subject = $this->lang->words['lp_random_pass_subject'] . ' ' . $this->settings['board_name']; + IPSText::getTextClass('email')->to = $member['email']; + + IPSText::getTextClass('email')->sendMail(); + + $this->registry->output->setTitle( $this->lang->words['validation_complete'] . ' - ' . ipsRegistry::$settings['board_name'] ); + + //----------------------------------------- + // Remove "dead" validation + //----------------------------------------- + + $this->DB->delete( 'validating', "vid='" . $validate['vid'] . "' OR (member_id={$member['member_id']} AND lost_pass=1)" ); + + $this->output = $this->registry->getClass('output')->getTemplate('register')->showLostPassWaitRandom( $member ); + } + + //----------------------------------------- + // EMAIL ADDY CHANGE + //----------------------------------------- + + else if ( $validate['email_chg'] == 1 ) + { + if ( !$validate['real_group'] ) + { + $validate['real_group'] = $this->settings['member_group']; + } + else if( !array_key_exists( $validate['real_group'], $this->caches['group_cache'] ) ) + { + $validate['real_group'] = $this->settings['member_group']; + } + + IPSMember::save( $member['member_id'], array( 'members' => array( 'member_group_id' => intval($validate['real_group']) ) ) ); + + IPSCookie::set( "member_id", $member['member_id'] , 1 ); + IPSCookie::set( "pass_hash", $member['member_login_key'], 1 ); + + //----------------------------------------- + // Remove "dead" validation + //----------------------------------------- + + $this->DB->delete( 'validating', "vid='" . $validate['vid'] . "' OR (member_id={$member['member_id']} AND email_chg=1)" ); + + $this->registry->output->silentRedirect( $this->settings['base_url'].'&app=core&module=global§ion=login&do=autologin&fromemail=1' ); + } + } + + /** + * Displays the registration form + * + * @access public + * @param array $form_errors + * @return void + */ + public function registerForm( $form_errors=array() ) + { + /* INIT */ + $final_errors = array(); + + if( $this->settings['no_reg'] > 0 ) + { + $this->registry->output->showError( 'registration_disabled', 10123, FALSE, '', 200 ); + } + + $coppa = IPSCookie::get( 'coppa' ); + + if( $coppa == 'yes' ) + { + $this->registry->output->showError( 'awaiting_coppa', 10124 ); + } + + $this->settings[ 'username_errormsg'] = str_replace( '{chars}', $this->settings['username_characters'], $this->settings['username_errormsg'] ); + + /* Read T&Cs yet? */ + if( ! $this->request['termsread'] ) + { + if( $this->memberData['member_id'] ) + { + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $this->han_login = new $classToLoad( $this->registry ); + $this->han_login->init(); + + //----------------------------------------- + // Set some cookies + //----------------------------------------- + + IPSCookie::set( "member_id" , "0" ); + IPSCookie::set( "pass_hash" , "0" ); + IPSCookie::set( "anonlogin" , "-1" ); + + if ( is_array($_COOKIE) ) + { + foreach( $_COOKIE as $cookie => $value) + { + if ( stripos( $cookie, $this->settings['cookie_id']."ipbforum" ) !== false ) + { + IPSCookie::set( str_replace( $this->settings['cookie_id'], "", $cookie ) , '-', -1 ); + } + } + } + + //----------------------------------------- + // Logout callbacks... + //----------------------------------------- + + $this->han_login->logoutCallback(); + + //----------------------------------------- + // Do it.. + //----------------------------------------- + + $this->member->sessionClass()->convertMemberToGuest(); + + list( $privacy, $loggedin ) = explode( '&', $this->memberData['login_anonymous'] ); + + IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'login_anonymous' => "{$privacy}&0", + 'last_activity' => time() ) ) ); + } + + /* Continue */ + $cache = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => "conf_key='reg_rules'" ) ); + + $text = $cache['conf_value'] ? $cache['conf_value'] : $cache['conf_default']; + + /* Load the Parser */ + IPSText::getTextClass( 'bbcode' )->bypass_badwords = 1; + IPSText::getTextClass( 'bbcode' )->parse_smilies = 1; + IPSText::getTextClass( 'bbcode' )->parse_html = 1; + IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; + IPSText::getTextClass( 'bbcode' )->parsing_section = 'global'; + + $text = IPSText::getTextClass('bbcode')->preDbParse( $text ); + $text = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $text ); + + $this->registry->output->setTitle( $this->lang->words['registration_form'] . ' - ' . ipsRegistry::$settings['board_name'] ); + $this->registry->output->addNavigation( $this->lang->words['registration_form'], '' ); + + $this->output .= $this->registry->output->getTemplate('register')->registerShowTerms( $text, $coppa ); + return; + } + else + { + /* Did we agree to the t&c? */ + if( ! $this->request['agree_to_terms'] ) + { + $this->registry->output->showError( 'must_agree_to_terms', 10125 ); + } + } + + /* Do we have another URL that one needs to visit to register? */ + $this->DB->build( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_enabled=1' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + if( $r['login_register_url'] ) + { + $this->registry->output->silentRedirect( $r['login_register_url'] ); + exit(); + } + } + + /* Continue... */ + if( $this->settings['reg_auth_type'] ) + { + if( $this->settings['reg_auth_type'] == 'admin_user' OR $this->settings['reg_auth_type'] == 'user' ) + { + $this->lang->words['std_text'] .= "
    " . $this->lang->words['email_validate_text']; + } + + /* User then admin? */ + if( $this->settings['reg_auth_type'] == 'admin_user' ) + { + $this->lang->words['std_text'] .= "
    " . $this->lang->words['user_admin_validation']; + } + + if( $this->settings['reg_auth_type'] == 'admin' ) + { + $this->lang->words['std_text'] .= "
    " . $this->lang->words['just_admin_validation']; + } + } + + $captchaHTML = ''; + $qandaHTML = ''; + $this->cache->updateCacheWithoutSaving('_hasStep3', 0); + + /* Q and A Challenge */ + if( $this->settings['registration_qanda'] ) + { + // Grab a random question... + $question = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'question_and_answer', 'order' => $this->DB->buildRandomOrder(), 'limit' => array(1) ) ); + + if( count($question) ) + { + $qandaHTML = $this->registry->output->getTemplate('global_other')->questionAndAnswer( $question ); + } + } + + /* Custom Profile Fields */ + $custom_fields_out = array( 'required', 'optional' ); + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php', 'customProfileFields' ); + $custom_fields = new $classToLoad(); + + $custom_fields->member_data = $this->memberData; + $custom_fields->initData( 'edit' ); + $custom_fields->parseToEdit( 'register' ); + + if ( count( $custom_fields->out_fields ) ) + { + $this->cache->updateCacheWithoutSaving('_hasStep3', 1); + + foreach( $custom_fields->out_fields as $id => $form_element ) + { + if ( $custom_fields->cache_data[ $id ]['pf_not_null'] == 1 ) + { + $ftype = 'required'; + } + else + { + $ftype = 'optional'; + } + + $custom_fields_out[$ftype][] = array( + 'name' => $custom_fields->field_names[ $id ], + 'desc' => $custom_fields->field_desc[ $id ], + 'field' => $form_element, + 'id' => $id, + 'error' => '', + 'type' => $custom_fields->cache_data[ $id ]['pf_type'] + ); + } + } + + /* CAPTCHA */ + if( $this->settings['bot_antispam_type'] != 'none' ) + { + $captchaHTML = $this->registry->getClass('class_captcha')->getTemplate(); + } + + $this->registry->output->setTitle( $this->lang->words['registration_form'] . ' - ' . ipsRegistry::$settings['board_name'] ); + $this->registry->output->addNavigation( $this->lang->words['registration_form'], '' ); + + /* Other errors */ + $final_errors = array( 'username' => NULL, 'dname' => NULL, 'password' => NULL, 'email' => NULL ); + + foreach( array( 'username', 'dname', 'password', 'email' ) as $thing ) + { + if ( isset($form_errors[ $thing ]) AND is_array( $form_errors[ $thing ] ) AND count( $form_errors[ $thing ] ) ) + { + $final_errors[ $thing ] = implode( "
    ", $form_errors[ $thing ] ); + } + } + + $this->request['UserName'] = $this->request['UserName'] ? $this->request['UserName'] : '' ; + $this->request['PassWord'] = $this->request['PassWord'] ? $this->request['PassWord'] : '' ; + $this->request['EmailAddress'] = $this->request['EmailAddress'] ? $this->request['EmailAddress'] : '' ; + $this->request['EmailAddress_two'] = $this->request['EmailAddress_two'] ? $this->request['EmailAddress_two'] : '' ; + $this->request['PassWord_Check'] = $this->request['PassWord_Check'] ? $this->request['PassWord_Check'] : '' ; + $this->request['members_display_name'] = $this->request['members_display_name'] ? $this->request['members_display_name'] : '' ; + $this->request['time_offset'] = $this->request['time_offset'] ? $this->request['time_offset'] : '' ; + $this->request['allow_member_mail'] = $this->request['allow_member_mail'] ? $this->request['allow_member_mail'] : '' ; + $this->request['dst'] = $this->request['dst'] ? $this->request['dst'] : '' ; + + /* Time zone... */ + $this->registry->class_localization->loadLanguageFile( array( 'public_usercp' ), 'core' ); + + $time_select = array(); + + foreach( $this->lang->words as $k => $v ) + { + if( strpos( $k, "time_" ) === 0 ) + { + $k = str_replace( "time_", '', $k ); + + if( preg_match( '/^[\-\d\.]+$/', $k ) ) + { + $time_select[ $k ] = $v; + } + } + } + + ksort( $time_select ); + + /* set default.. */ + $this->request['time_offset'] = ( $this->request['time_offset'] ) ? $this->request['time_offset'] : $this->settings['time_offset']; + + /* Need username? */ + $uses_name = false; + + foreach( $this->cache->getCache('login_methods') as $method ) + { + if( $method['login_user_id'] == 'username' ) + { + $uses_name = true; + } + } + + /* Get form HTML */ + $this->output .= $this->registry->output->getTemplate('register')->registerForm( + $form_errors['general'], + array( + 'TEXT' => $this->lang->words['std_text'], + 'coppa_user' => $coppa, + 'captchaHTML' => $captchaHTML, + 'qandaHTML' => $qandaHTML, + 'requireName' => $uses_name, + ), + $final_errors, + $time_select, + $custom_fields_out ); + + /* Run the member sync module */ + IPSLib::runMemberSync( 'onRegisterForm' ); + } + + /** + * Processes the registration form + * + * @access public + * @return void + */ + public function registerProcessForm() + { + if( $this->memberData['member_id'] ) + { + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $this->han_login = new $classToLoad( $this->registry ); + $this->han_login->init(); + + //----------------------------------------- + // Set some cookies + //----------------------------------------- + + IPSCookie::set( "member_id" , "0" ); + IPSCookie::set( "pass_hash" , "0" ); + IPSCookie::set( "anonlogin" , "-1" ); + + if ( is_array($_COOKIE) ) + { + foreach( $_COOKIE as $cookie => $value) + { + if ( stripos( $cookie, $this->settings['cookie_id']."ipbforum" ) !== false ) + { + IPSCookie::set( str_replace( $this->settings['cookie_id'], "", $cookie ) , '-', -1 ); + } + } + } + + //----------------------------------------- + // Logout callbacks... + //----------------------------------------- + + $this->han_login->logoutCallback(); + + //----------------------------------------- + // Do it.. + //----------------------------------------- + + $this->member->sessionClass()->convertMemberToGuest(); + + list( $privacy, $loggedin ) = explode( '&', $this->memberData['login_anonymous'] ); + + IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'login_anonymous' => "{$privacy}&0", + 'last_activity' => time() ) ) ); + } + + $form_errors = array(); + $coppa = ( $this->request['coppa_user'] == 1 ) ? 1 : 0; + $in_password = trim( $this->request['PassWord'] ); + $in_email = mb_strtolower( trim( $this->request['EmailAddress'] ) ); + $_SFS_FOUND = FALSE; + + /* Check */ + if( $this->settings['no_reg'] > 0 ) + { + $this->registry->output->showError( 'registration_disabled', 2016, true ); + } + + /* Custom profile field stuff */ + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php', 'customProfileFields' ); + $custom_fields = new $classToLoad(); + + $custom_fields->initData( 'edit' ); + $custom_fields->parseToSave( $this->request, 'register' ); + + /* Check */ + if( $custom_fields->error_messages ) + { + $form_errors['general'] = $custom_fields->error_messages; + } + + /* Check the email address */ + if ( ! $in_email OR strlen( $in_email ) < 6 OR !IPSText::checkEmailAddress( $in_email ) ) + { + $form_errors['email'][$this->lang->words['err_invalid_email']] = $this->lang->words['err_invalid_email']; + } + + if( trim($this->request['PassWord_Check']) != $in_password OR !$in_password ) + { + $form_errors['password'][$this->lang->words['passwords_not_match']] = $this->lang->words['passwords_not_match']; + } + + /* Test email address */ + $this->request['EmailAddress_two'] = mb_strtolower( trim( $this->request['EmailAddress_two'] ) ); + $this->request['EmailAddress'] = mb_strtolower( trim( $this->request['EmailAddress'] ) ); + + if( !IPSText::checkEmailAddress( $this->request['EmailAddress_two'] ) ) + { + $form_errors['email'][$this->lang->words['reg_error_email_invalid']] = $this->lang->words['reg_error_email_invalid']; + } + else + { + if ( $in_email AND $this->request['EmailAddress_two'] != $in_email ) + { + $form_errors['email'][$this->lang->words['reg_error_email_nm']] = $this->lang->words['reg_error_email_nm']; + } + } + + /* Need username? */ + $uses_name = false; + + foreach( $this->cache->getCache('login_methods') as $method ) + { + if( $method['login_user_id'] == 'username' ) + { + $uses_name = true; + } + } + + if( !$uses_name ) + { + $_REQUEST['UserName'] = $_REQUEST['members_display_name']; + $this->request['UserName'] = $this->request['members_display_name']; + } + + /* Set the display name, if empty */ + $this->request['members_display_name'] = $this->request['members_display_name'] ? $this->request['members_display_name'] : $this->request['UserName']; + + /* Check the username */ + $user_check = IPSMember::getFunction()->cleanAndCheckName( $this->request['UserName'], array(), 'name' ); + $disp_check = IPSMember::getFunction()->cleanAndCheckName( $this->request['members_display_name'], array(), 'members_display_name' ); + + if( is_array( $user_check['errors'] ) && count( $user_check['errors'] ) ) + { + foreach( $user_check['errors'] as $key => $error ) + { + $form_errors[ $key ][] = isset($this->lang->words[ $error ]) ? $this->lang->words[ $error ] : $error; + } + } + + if( is_array( $disp_check['errors'] ) && count( $disp_check['errors'] ) ) + { + foreach( $disp_check['errors'] as $key => $error ) + { + if( !$this->settings['auth_allow_dnames'] AND !( is_array( $user_check['errors'] ) && count( $user_check['errors'] ) ) ) + { + $key = 'username'; + } + + $form_errors[ $key ][] = isset($this->lang->words[ $error ]) ? $this->lang->words[ $error ] : $error; + } + } + + /* CHECK 1: Any errors (missing fields, etc)? */ + if( count( $form_errors ) ) + { + $this->registerForm( $form_errors ); + return; + } + + /* Is this email addy taken? */ + if( IPSMember::checkByEmail( $in_email ) == TRUE ) + { + $form_errors['email'][$this->lang->words['reg_error_email_taken']] = $this->lang->words['reg_error_email_taken']; + } + + /* Load handler... */ + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $this->han_login = new $classToLoad( $this->registry ); + $this->han_login->init(); + $this->han_login->emailExistsCheck( $in_email ); + + if( $this->han_login->return_code AND $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'EMAIL_NOT_IN_USE' ) + { + $form_errors['email'][$this->lang->words['reg_error_email_taken']] = $this->lang->words['reg_error_email_taken']; + } + + /* Are they banned [EMAIL]? */ + if ( IPSMember::isBanned( 'email', $in_email ) === TRUE ) + { + $form_errors['email'][$this->lang->words['reg_error_email_ban']] = $this->lang->words['reg_error_email_ban']; + } + + /* Check the CAPTCHA */ + if ( $this->settings['bot_antispam_type'] != 'none' ) + { + if ( $this->registry->getClass('class_captcha')->validate() !== TRUE ) + { + $form_errors['general'][$this->lang->words['err_reg_code']] = $this->lang->words['err_reg_code']; + } + } + + /* Check the Q and A */ + if( $this->settings['registration_qanda'] ) + { + $qanda = intval($this->request['qanda_id']); + $pass = false; + + if( $qanda ) + { + $data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'question_and_answer', 'where' => 'qa_id=' . $qanda ) ); + + if( $data['qa_id'] ) + { + $answers = explode( "\n", str_replace( "\r", "", $data['qa_answers'] ) ); + + if( count($answers) ) + { + foreach( $answers as $answer ) + { + if( mb_strtolower($answer) == mb_strtolower($this->request['qa_answer']) ) + { + $pass = true; + break; + } + } + } + } + } + else + { + //----------------------------------------- + // Do we have any questions? + //----------------------------------------- + + $data = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as questions', 'from' => 'question_and_answer' ) ); + + if( !$data['questions'] ) + { + $pass = true; + } + } + + if( !$pass ) + { + $form_errors['general'][$this->lang->words['err_q_and_a']] = $this->lang->words['err_q_and_a']; + } + } + + /* CHECK 2: Any errors ? */ + if ( count( $form_errors ) ) + { + $this->registerForm( $form_errors ); + return; + } + + /* Build up the hashes */ + $mem_group = $this->settings['member_group']; + + /* Are we asking the member or admin to preview? */ + if( $this->settings['reg_auth_type'] ) + { + $mem_group = $this->settings['auth_group']; + } + else if ($coppa == 1) + { + $mem_group = $this->settings['auth_group']; + } + + /* Create member */ + $member = array( + 'name' => $this->request['UserName'], + 'password' => $in_password, + 'members_display_name' => $this->settings['auth_allow_dnames'] ? $this->request['members_display_name'] : $this->request['UserName'], + 'email' => $in_email, + 'member_group_id' => $mem_group, + 'joined' => time(), + 'ip_address' => $this->member->ip_address, + 'time_offset' => $this->request['time_offset'], + 'coppa_user' => $coppa, + 'members_auto_dst' => intval($this->request['dst']), + 'allow_admin_mails' => intval( $this->request['allow_admin_mail'] ), + 'hide_email' => $this->request['allow_member_mail'] ? 0 : 1, + ); + + /* Spam Service */ + $spamCode = 0; + $_spamFlag = 0; + + //----------------------------------------- + // Create the account + //----------------------------------------- + + $member = IPSMember::create( array( 'members' => $member, 'pfields_content' => $this->request ), FALSE, FALSE, FALSE ); + + //----------------------------------------- + // Login handler create account callback + //----------------------------------------- + + $this->han_login->createAccount( array( 'email' => $member['email'], + 'joined' => $member['joined'], + 'password' => $in_password, + 'ip_address' => $this->member->ip_address, + 'username' => $member['members_display_name'], + ) ); + + //----------------------------------------- + // We'll just ignore if this fails - it shouldn't hold up IPB anyways + //----------------------------------------- + + /*if ( $han_login->return_code AND ( $han_login->return_code != 'METHOD_NOT_DEFINED' AND $han_login->return_code != 'SUCCESS' ) ) + { + $this->registry->output->showError( 'han_login_create_failed', 2017, true ); + }*/ + + //----------------------------------------- + // Validation + //----------------------------------------- + + $validate_key = md5( IPSLib::makePassword() . time() ); + $time = time(); + + if( $coppa != 1 ) + { + if( ( $this->settings['reg_auth_type'] == 'user' ) or ( $this->settings['reg_auth_type'] == 'admin' ) or ( $this->settings['reg_auth_type'] == 'admin_user' ) ) + { + //----------------------------------------- + // We want to validate all reg's via email, + // after email verificiation has taken place, + // we restore their previous group and remove the validate_key + //----------------------------------------- + + $this->DB->insert( 'validating', array( + 'vid' => $validate_key, + 'member_id' => $member['member_id'], + 'real_group' => /*$this->settings['subsm_enforce'] ? $this->settings['subsm_nopkg_group'] :*/ $this->settings['member_group'], + 'temp_group' => $this->settings['auth_group'], + 'entry_date' => $time, + 'coppa_user' => $coppa, + 'new_reg' => 1, + 'ip_address' => $member['ip_address'], + 'spam_flag' => $_spamFlag, + ) ); + + if( $this->settings['reg_auth_type'] == 'user' OR $this->settings['reg_auth_type'] == 'admin_user' ) + { + IPSText::getTextClass('email')->getTemplate("reg_validate"); + + IPSText::getTextClass('email')->buildMessage( array( + 'THE_LINK' => $this->settings['base_url'] . "app=core&module=global§ion=register&do=auto_validate&uid=" . urlencode( $member['member_id'] ) . "&aid=" . urlencode( $validate_key ), + 'NAME' => $member['members_display_name'], + 'MAN_LINK' => $this->settings['base_url'] . "app=core&module=global§ion=register&do=05", + 'EMAIL' => $member['email'], + 'ID' => $member['member_id'], + 'CODE' => $validate_key, + ) ); + + IPSText::getTextClass('email')->subject = $this->lang->words['new_registration_email'] . $this->settings['board_name']; + IPSText::getTextClass('email')->to = $member['email']; + + IPSText::getTextClass('email')->sendMail(); + + $this->output = $this->registry->output->getTemplate('register')->showAuthorize( $member ); + + } + else if( $this->settings['reg_auth_type'] == 'admin' ) + { + $this->output = $this->registry->output->getTemplate('register')->showPreview( $member ); + } + + if( $this->settings['new_reg_notify'] ) + { + $date = $this->registry->class_localization->getDate( time(), 'LONG', 1 ); + + IPSText::getTextClass('email')->getTemplate( 'admin_newuser' ); + + IPSText::getTextClass('email')->buildMessage( array( 'DATE' => $date, + 'LOG_IN_NAME' => $member['name'], + 'EMAIL' => $member['email'], + 'IP' => $member['ip_address'], + 'DISPLAY_NAME' => $member['members_display_name'] ) ); + + IPSText::getTextClass('email')->subject = $this->lang->words['new_registration_email1'] . $this->settings['board_name']; + IPSText::getTextClass('email')->to = $this->settings['email_in']; + IPSText::getTextClass('email')->sendMail(); + } + + $this->registry->output->setTitle( $this->lang->words['reg_success'] . ' - ' . ipsRegistry::$settings['board_name'] ); + $this->registry->output->addNavigation( $this->lang->words['nav_reg'], '' ); + } + else + { + /* We don't want to preview, or get them to validate via email. */ + $stat_cache = $this->caches['stats']; + + if( $member['members_display_name'] AND $member['member_id'] AND !$this->caches['group_cache'][ $member['member_group_id'] ]['g_hide_online_list'] ) + { + $stat_cache['last_mem_name'] = $member['members_display_name']; + $stat_cache['last_mem_name_seo'] = IPSText::makeSeoTitle( $member['members_display_name'] ); + $stat_cache['last_mem_id'] = $member['member_id']; + } + + $stat_cache['mem_count'] += 1; + + $this->cache->setCache( 'stats', $stat_cache, array( 'array' => 1 ) ); + + if( $this->settings['new_reg_notify'] ) + { + $date = $this->registry->class_localization->getDate( time(), 'LONG', 1 ); + + IPSText::getTextClass('email')->getTemplate( 'admin_newuser' ); + + IPSText::getTextClass('email')->buildMessage( array( 'DATE' => $date, + 'LOG_IN_NAME' => $member['name'], + 'EMAIL' => $member['email'], + 'IP' => $member['ip_address'], + 'DISPLAY_NAME' => $member['members_display_name'] ) ); + + IPSText::getTextClass('email')->subject = $this->lang->words['new_registration_email1'] . $this->settings['board_name']; + IPSText::getTextClass('email')->to = $this->settings['email_in']; + IPSText::getTextClass('email')->sendMail(); + } + + IPSCookie::set( 'pass_hash' , $member['member_login_key'], 1); + IPSCookie::set( 'member_id' , $member['member_id'] , 1); + + //----------------------------------------- + // Fix up session + //----------------------------------------- + + $privacy = $this->request['Privacy'] ? 1 : 0; + + if( $member['g_hide_online_list'] ) + { + $privacy = 1; + } + + $this->member->sessionClass()->convertGuestToMember( array( 'member_name' => $member['members_display_name'], + 'member_id' => $member['member_id'], + 'member_group' => $member['member_group_id'], + 'login_type' => $privacy ) ); + + $this->registry->output->silentRedirect( $this->settings['base_url'] . '&app=core&module=global§ion=login&do=autologin&fromreg=1'); + } + } + else + { + /* This is a COPPA user, so lets tell them they registered OK and redirect to the form. */ + $this->DB->insert( 'validating', array ( + 'vid' => $validate_key, + 'member_id' => $member['member_id'], + 'real_group' => $this->settings['member_group'], + 'temp_group' => $this->settings['auth_group'], + 'entry_date' => $time, + 'coppa_user' => $coppa, + 'new_reg' => 1, + 'ip_address' => $member['ip_address'] + ) ); + + $this->registry->output->redirectScreen( $this->lang->words['cp_success'], $this->settings['base_url'] . 'app=core&module=global&section=register&do=12' ); + } + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/global/reputation.php b/upload/admin/applications/core/modules_public/global/reputation.php index d19d8c34..3ce09fde 100644 --- a/upload/admin/applications/core/modules_public/global/reputation.php +++ b/upload/admin/applications/core/modules_public/global/reputation.php @@ -1,101 +1,103 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_core_global_reputation extends ipsCommand -{ - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen/redirects] - */ - public function doExecute( ipsRegistry $registry ) - { - /* What to do... */ - switch( $this->request['do'] ) - { - case 'add_rating': - $this->doRating(); - break; - } - } - - /** - * Adds a rating to the index - * - * @access public - * @return void - */ - public function doRating() - { - /* INIT */ - $app = $this->request['app_rate']; - $type = $this->request['type']; - $type_id = intval( $this->request['type_id'] ); - $rating = intval( $this->request['rating'] ); - - /* Check */ - if( ! $app || ! $type || ! $type_id || ! $rating ) - { - $this->registry->output->showError( 'reputation_missing_data', 10126 ); - } - - /* Check the secure key. Needed here to prevent direct URLs from increasing reps */ - if ( $this->request['secure_key'] != $this->member->form_hash ) - { - $this->registry->output->showError( 'reputation_missing_data', 10126 ); - } - - /* Get the rep library */ - require_once( IPS_ROOT_PATH . 'sources/classes/class_reputation_cache.php' ); - $repCache = new classReputationCache(); - - /* Add the rating */ - if( ! $repCache->addRate( $type, $type_id, $rating, '', 0, $app ) ) - { - $this->registry->output->showError( $repCache->error_message, 10127 ); - } - else - { - /* Redirect to */ - $return_url = ''; - - if( isset( $this->request['post_return'] ) && $this->request['post_return'] ) - { - $return_url = $this->settings['base_url'] . 'app=forums&module=forums§ion=findpost&pid=' . intval( $this->request['post_return'] ); - } - else if( $_SERVER['HTTP_REFERER'] ) - { - $return_url = $_SERVER['HTTP_REFERER']; - } - else - { - $return_url = $this->settings['base_url']; - } - - /* Probably Temporary :) */ - $this->registry->output->silentRedirect( $return_url ); - } - } + + * Invision Power Services + * IP.Board v3.1.4 + * Reputation + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 5713 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_global_reputation extends ipsCommand +{ + /** + * Class entry point + * + * @access public + * @param object Registry reference + * @return void [Outputs to screen/redirects] + */ + public function doExecute( ipsRegistry $registry ) + { + /* What to do... */ + switch( $this->request['do'] ) + { + case 'add_rating': + $this->doRating(); + break; + } + } + + /** + * Adds a rating to the index + * + * @access public + * @return void + */ + public function doRating() + { + /* INIT */ + $app = $this->request['app_rate']; + $type = $this->request['type']; + $type_id = intval( $this->request['type_id'] ); + $rating = intval( $this->request['rating'] ); + + /* Check */ + if( ! $app || ! $type || ! $type_id || ! $rating ) + { + $this->registry->output->showError( 'reputation_missing_data', 10126 ); + } + + /* Check the secure key. Needed here to prevent direct URLs from increasing reps */ + if ( $this->request['secure_key'] != $this->member->form_hash ) + { + $this->registry->output->showError( 'reputation_missing_data', 10126 ); + } + + /* Get the rep library */ + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_reputation_cache.php', 'classReputationCache' ); + $repCache = new $classToLoad(); + + /* Add the rating */ + if( ! $repCache->addRate( $type, $type_id, $rating, '', 0, $app ) ) + { + $this->registry->output->showError( $repCache->error_message, 10127 ); + } + else + { + /* Redirect to */ + $return_url = ''; + + if( isset( $this->request['post_return'] ) && $this->request['post_return'] ) + { + $return_url = $this->settings['base_url'] . 'app=forums&module=forums§ion=findpost&pid=' . intval( $this->request['post_return'] ); + } + else if( $_SERVER['HTTP_REFERER'] ) + { + $return_url = $_SERVER['HTTP_REFERER']; + } + else + { + $return_url = $this->settings['base_url']; + } + + /* Probably Temporary :) */ + $this->registry->output->silentRedirect( $return_url ); + } + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/global/rss.php b/upload/admin/applications/core/modules_public/global/rss.php index 634658c4..549ecc28 100644 --- a/upload/admin/applications/core/modules_public/global/rss.php +++ b/upload/admin/applications/core/modules_public/global/rss.php @@ -1,19 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * RSS output functionality - * Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 18th March 2005 - * @version $Revision: 3887 $ + * @version $Revision: 7003 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -27,7 +28,6 @@ class public_core_global_rss extends ipsCommand /** * XML document content * - * @access private * @var string XML document content */ private $to_print = ''; @@ -35,7 +35,6 @@ class public_core_global_rss extends ipsCommand /** * Class entry point * - * @access public * @param object Registry reference * @return void [Outputs to screen/redirects] */ @@ -56,7 +55,15 @@ class public_core_global_rss extends ipsCommand if( $this->settings['board_offline'] ) { - header("HTTP/1.1 503 Service Temporarily Unavailable"); + if ( isset( $_SERVER['SERVER_PROTOCOL'] ) AND strstr( $_SERVER['SERVER_PROTOCOL'], '/1.0' ) ) + { + header("HTTP/1.0 503 Service Temporarily Unavailable"); + } + else + { + header("HTTP/1.1 503 Service Temporarily Unavailable"); + } + print $this->lang->words['rss_board_offline']; exit(); } @@ -69,22 +76,46 @@ class public_core_global_rss extends ipsCommand if( $this->request['type'] ) { - if( file_exists( IPSLib::getAppDir( IPSText::alphanumericalClean( $this->request['type'] ) ) . '/extensions/rssOutput.php' ) ) + if( IPSLib::appIsInstalled( IPSText::alphanumericalClean( $this->request['type'] ) ) ) { - $type = IPSText::alphanumericalClean( $this->request['type'] ); + if( file_exists( IPSLib::getAppDir( IPSText::alphanumericalClean( $this->request['type'] ) ) . '/extensions/rssOutput.php' ) ) + { + $type = IPSText::alphanumericalClean( $this->request['type'] ); + } } } - + //----------------------------------------- // And grab the content //----------------------------------------- - require_once( IPSLib::getAppDir( $type ) . '/extensions/rssOutput.php' ); - $classname = "rss_output_" . $type; - $rss_library = new $classname( $this->registry ); + if( IPSLib::appIsInstalled($type) ) + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $type ) . '/extensions/rssOutput.php', 'rss_output_'.$type, $type ); + $rss_library = new $classToLoad( $this->registry ); + + $this->to_print = $rss_library->returnRSSDocument(); + $expires = $rss_library->grabExpiryDate(); + } - $this->to_print = $rss_library->returnRSSDocument(); - $expires = $rss_library->grabExpiryDate(); + //----------------------------------------- + // No output? + //----------------------------------------- + + if( !$this->to_print ) + { + if ( isset( $_SERVER['SERVER_PROTOCOL'] ) AND strstr( $_SERVER['SERVER_PROTOCOL'], '/1.0' ) ) + { + header("HTTP/1.0 503 Service Temporarily Unavailable"); + } + else + { + header("HTTP/1.1 503 Service Temporarily Unavailable"); + } + + print $this->lang->words['rssappoffline']; + exit(); + } //----------------------------------------- // Then output diff --git a/upload/admin/applications/core/modules_public/global/share.php b/upload/admin/applications/core/modules_public/global/share.php new file mode 100644 index 00000000..e06ef60b --- /dev/null +++ b/upload/admin/applications/core/modules_public/global/share.php @@ -0,0 +1,47 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Captcha + * Last Updated: $Date: 2010-01-15 15:18:44 +0000 (Fri, 15 Jan 2010) $ + * + * + * @author $Author $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 20th February 2002 + * @version $Rev: 5713 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_global_share extends ipsCommand +{ + /** + * Class entry point + * + * @param object Registry reference + * @return void [Outputs to screen/redirects] + */ + public function doExecute( ipsRegistry $registry ) + { + $url = IPSText::base64_decode_urlSafe( $this->request['url'] ); + $title = IPSText::base64_decode_urlSafe( $this->request['title'] ); + $key = trim( $this->request['key'] ); + + /* Get the lib */ + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/share/links.php', 'share_links' ); + $share = new $classToLoad( $registry, $key ); + + /* Share! */ + $share->share( $title, $url ); + } +} \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/help/defaultSection.php b/upload/admin/applications/core/modules_public/help/defaultSection.php index 9d5924a5..4a082572 100644 --- a/upload/admin/applications/core/modules_public/help/defaultSection.php +++ b/upload/admin/applications/core/modules_public/help/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default help section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_public/help/help.php b/upload/admin/applications/core/modules_public/help/help.php index 544d6079..c3ed85f3 100644 --- a/upload/admin/applications/core/modules_public/help/help.php +++ b/upload/admin/applications/core/modules_public/help/help.php @@ -1,18 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Help File System - * Last Updated: $Date: 2009-04-24 08:15:53 -0400 (Fri, 24 Apr 2009) $ + * Last Updated: $Date: 2010-10-19 11:56:25 -0400 (Tue, 19 Oct 2010) $ + * * - * @author $Author: matt $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com - * @version $Rev: 4544 $ - * + * @link http://www.invisionpower.com + * @version $Rev: 6997 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -26,7 +27,6 @@ class public_core_help_help extends ipsCommand /** * HTML to output * - * @access private * @var string HTML */ public $output = ""; @@ -34,7 +34,6 @@ class public_core_help_help extends ipsCommand /** * Class entry point * - * @access public * @param object Registry reference * @return void [Outputs to screen/redirects] */ @@ -63,7 +62,6 @@ class public_core_help_help extends ipsCommand /** * Show help topics * - * @access public * @return void */ public function helpShowTitles() @@ -103,14 +101,13 @@ class public_core_help_help extends ipsCommand ); /* Navigation */ - $this->registry->output->setTitle( $this->lang->words['page_title'] ); + $this->registry->output->setTitle( $this->lang->words['page_title'] . ' - ' . ipsRegistry::$settings['board_name'] ); $this->registry->output->addNavigation( $this->lang->words['page_title'], '' ); } /** * Displays a help file * - * @access public * @return void */ public function helpShowSection() @@ -159,14 +156,14 @@ class public_core_help_help extends ipsCommand ); /* Navigation */ - $this->registry->output->setTitle( $this->lang->words['help_topic'] ); + $this->registry->output->setTitle( $this->lang->words['help_topic'] . ' - ' . ipsRegistry::$settings['board_name'] ); $this->registry->output->addNavigation( $this->lang->words['help_topics'], "app=core&module=help" ); $this->registry->output->addNavigation( $this->lang->words['help_topic'], '' ); if( $this->request['xml'] == 1 ) { - require_once( IPS_KERNEL_PATH . 'classAjax.php' ); - $classAjax = new classAjax(); + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' ); + $classAjax = new $classToLoad(); $classAjax->returnHtml( $this->output ); } } diff --git a/upload/admin/applications/core/modules_public/help/index.html b/upload/admin/applications/core/modules_public/help/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_public/help/index.html +++ b/upload/admin/applications/core/modules_public/help/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/index.html b/upload/admin/applications/core/modules_public/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_public/index.html +++ b/upload/admin/applications/core/modules_public/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/reports/defaultSection.php b/upload/admin/applications/core/modules_public/reports/defaultSection.php index 8c9c549a..a9d8d636 100644 --- a/upload/admin/applications/core/modules_public/reports/defaultSection.php +++ b/upload/admin/applications/core/modules_public/reports/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default reports section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_public/reports/index.html b/upload/admin/applications/core/modules_public/reports/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_public/reports/index.html +++ b/upload/admin/applications/core/modules_public/reports/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/reports/reports.php b/upload/admin/applications/core/modules_public/reports/reports.php index fa915de2..6baf63b5 100644 --- a/upload/admin/applications/core/modules_public/reports/reports.php +++ b/upload/admin/applications/core/modules_public/reports/reports.php @@ -1,1169 +1,1111 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class public_core_reports_reports extends ipsCommand -{ - /** - * Execute selected method - * - * @access public - * @param object Registry object - * @return void - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load basic things - //----------------------------------------- - - $this->registry->class_localization->loadLanguageFile( array( 'public_reports' ) ); - - $this->DB->loadCacheFile( IPSLib::getAppDir('core') . '/sql/' . ips_DBRegistry::getDriverType() . '_report_queries.php', 'report_sql_queries' ); - - require_once( IPSLib::getAppDir('core') .'/sources/classes/reportLibrary.php' ); - $this->registry->setClass( 'reportLibrary', new reportLibrary( $this->registry ) ); - - //----------------------------------------- - // Check permissions... - //----------------------------------------- - - $showReportCenter = false; - - $this->member_group_ids = array( $this->memberData['member_group_id'] ); - $this->member_group_ids = array_diff( array_merge( $this->member_group_ids, explode( ',', $this->memberData['mgroup_others'] ) ), array('') ); - $report_center = array_diff( explode( ',', $this->settings['report_mod_group_access'] ), array('') ); - - foreach( $report_center as $groupId ) - { - if( in_array( $groupId, $this->member_group_ids ) ) - { - $showReportCenter = true; - } - } - - if( ($this->request['do'] AND $this->request['do'] != 'report') AND !$showReportCenter ) - { - $this->registry->output->showError( 'no_reports_permission', 2018, true ); - } - - $this->registry->output->setTitle( $this->lang->words['main_title'] ); - - //----------------------------------------- - // Which road are we going to take? - //----------------------------------------- - - switch( $this->request['do'] ) - { - default: - case 'report': - $this->_initReportForm(); - break; - - case 'showMessage': - $this->_viewReportedMessage(); - break; - - case 'index': - $this->_displayReportCenter(); - break; - - case 'process': - $this->_processReports(); - break; - - case 'findfirst': - $this->findFirstReport(); - break; - - case 'show_methods': - $this->_showNotificationMethods(); - break; - case 'save_methods': - $this->_saveNotificationMethods(); - break; - - case 'show_report': - $this->_displayReport(); - break; - - case 'save_comment': - $this->_saveComment(); - break; - } - - //----------------------------------------- - // Output - //----------------------------------------- - - $this->registry->getClass('output')->addContent( $this->output ); - $this->registry->output->sendOutput(); - } - - /** - * View a reported private message as it shows in the messenger - * - * @access private - * @return void - */ - private function _viewReportedMessage() - { - //----------------------------------------- - // Do we have permission? - //----------------------------------------- - - $this->registry->getClass('reportLibrary')->buildQueryPermissions(); - - if( !in_array( $this->memberData['member_group_id'], explode( ',', $this->registry->getClass('reportLibrary')->plugins['messages']->_extra['plugi_messages_add'] ) ) ) - { - $this->registry->getClass('output')->showError( 'no_permission_addreport', 20115 ); - } - - //----------------------------------------- - // First see if we are already in map... - //----------------------------------------- - - $topicId = intval($this->request['topicID']); - - $mapRecord = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'message_topic_user_map', 'where' => "map_user_id={$this->memberData['member_id']} AND map_topic_id={$topicId}" ) ); - - //----------------------------------------- - // Doesn't exist? - //----------------------------------------- - - if( !$mapRecord['map_user_id'] ) - { - define( 'FROM_REPORT_CENTER', true ); - - require_once( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php' ); - $messengerFunctions = new messengerFunctions( $this->registry ); - - //----------------------------------------- - // Add ourselves - //----------------------------------------- - - try - { - $messengerFunctions->addTopicParticipants( $topicId, array( $this->memberData['members_display_name'] ), $this->memberData['member_id'] ); - } - - //----------------------------------------- - // Must already be in there - //----------------------------------------- - - catch( Exception $e ) - { - - } - } - - //----------------------------------------- - // Already a participant, make sure we're active - //----------------------------------------- - - else - { - $update = array(); - - if( !$mapRecord['map_user_active'] ) - { - $update['map_user_active'] = 1; - } - - if( $mapRecord['map_folder_id'] == 'finished' ) - { - $update['map_folder_id'] = 'myconvo'; - } - - if( $mapRecord['map_user_banned'] ) - { - $update['map_user_banned'] = 0; - } - - if( count($update) ) - { - $this->DB->update( 'message_topic_user_map', $update, "map_user_id={$this->memberData['member_id']} AND map_topic_id={$topicId}" ); - } - } - - $this->registry->output->silentRedirect( $this->settings['base_url'] . "app=members&module=messaging&section=view&do=showConversation&topicID=" . $topicId . "&st=" . $this->request['st'] . "#msg" . $this->request['msg'] ); - } - - /** - * Main function for displaying reports in a list - * - * @access private - * @return void - */ - private function _displayReportCenter() - { - //----------------------------------------- - // Check for rss key and if none make one - //----------------------------------------- - - $this->registry->getClass('reportLibrary')->checkMemberRSSKey(); - - //----------------------------------------- - // Basic title and nav routine.. - //----------------------------------------- - - $this->registry->output->addNavigation( $this->lang->words['main_title'], 'app=core&module=reports&do=index' ); - - //----------------------------------------- - // We need some extra permisisons sql.. - //----------------------------------------- - - $COM_PERM = $this->registry->getClass('reportLibrary')->buildQueryPermissions(); - - $reports = array(); - - //----------------------------------------- - // Show me the money! err.. Reports! - //----------------------------------------- - - $total = $this->DB->buildAndFetch( array( - 'select' => 'COUNT(*) as reports', - 'from' => array( 'rc_reports_index' => 'rep' ), - 'where' => $COM_PERM, - 'add_join' => array( - array( - 'from' => array( 'rc_classes' => 'rcl' ), - 'where' => 'rcl.com_id=rep.rc_class' - ) - ) - ) ); - - - - $this->DB->buildFromCache( 'reports_index', array( 'WHERE' => $COM_PERM, 'START' => intval($this->request['st']), 'LIMIT' => 10 ), 'report_sql_queries' ); - $res = $this->DB->execute(); - - while( $row = $this->DB->fetch($res) ) - { - $sec_data = $this->registry->getClass('reportLibrary')->plugins[$row['my_class']]->giveSectionLinkTitle( $row ); - $sec_data['url'] = $this->registry->getClass('reportLibrary')->processUrl( $sec_data['url'], $sec_data['seo_title'], $sec_data['seo_template'] ); - $row['points'] = isset( $row['points'] ) ? $row['points'] : $this->settings['_tmpPoints'][ $row['id'] ]; - $row['section'] = $sec_data; - $row['status_icon'] = $this->_buildStatusIcon( $row ); - - $reports[ $row['id'] ] = $row; - } - - //----------------------------------------- - // Statuses - //----------------------------------------- - - $stats = array(); - $_tmp = $this->registry->getClass('reportLibrary')->flag_cache; - - // Manually build array get just the statuses, not severities - foreach( $_tmp as $sid => $sta ) - { - if( is_array( $sta ) && count( $sta ) ) - { - foreach( $sta as $points => $info ) - { - if( $stats[ $sid ] ) - { - break; - } - - $stats[ $sid ] = $info; - } - } - } - - //----------------------------------------- - // Display Page Navigation - //----------------------------------------- - - $pages = $this->registry->output->generatePagination( array( 'totalItems' => $total['reports'], - 'itemsPerPage' => 10, - 'currentStartValue' => $this->request['st'], - 'baseUrl' => 'app=core&module=reports&do=index' - ) - ); - - $this->output .= $this->registry->getClass('output')->getTemplate('reports')->reportsIndex( $reports, $this->registry->getClass('reportLibrary')->buildStatuses(), $pages, $this->_getStats( 1 ), $stats ); - } - - /** - * Basic functions for processing actions on 'Report Index' page (Drop Down) - * - * @access private - * @return void - */ - private function _processReports() - { - //----------------------------------------- - // Check form key - //----------------------------------------- - - if ( $this->request['k'] != $this->member->form_hash ) - { - $this->registry->getClass('output')->showError( 'no_permission', 20112 ); - } - - //----------------------------------------- - // Are we pruning? - //----------------------------------------- - - if( is_numeric($this->request['pruneDays']) && $this->request['newstatus'] == 'p' ) - { - if( !$this->memberData['g_access_cp'] ) - { - $this->registry->output->showError( 'no_report_prune_perm', 2019, true ); - } - - //----------------------------------------- - // Let's prune those reports.. if we can - //----------------------------------------- - - $prune_time = ceil(time() - (intval($this->request['pruneDays']) * 86400)); - $total_pruned = $this->_pruneReports( $prune_time ); - - if( $total_pruned ) - { - $this->registry->output->redirectScreen( $this->lang->words['report_prune_message_done'], $this->settings['base_url'] . "app=core&module=reports&do=index&st=" . $this->request['st'] ); - } - else - { - $this->registry->output->redirectScreen( $this->lang->words['report_prune_message_none'], $this->settings['base_url'] . "app=core&module=reports&do=index&st=" . $this->request['st'] ); - } - } - - //----------------------------------------- - // Either deleting or updating status? - //----------------------------------------- - - elseif( $this->request['report_ids'] && is_array($this->request['report_ids']) ) - { - $ids = implode( ',', IPSLib::cleanIntArray( $this->request['report_ids'] ) ); - - if( strlen($ids) > 0 && ( ! preg_match( "/[^0-9,]/", $ids ) ) ) - { - if( $this->request['newstatus'] == 'd' ) - { - if( !$this->memberData['g_access_cp'] ) - { - $this->registry->output->showError( 'no_report_prune_perm', 20110, true ); - } - - //----------------------------------------- - // Time to delete some stuff! - //----------------------------------------- - - $this->_deleteReports( $ids, true ); - $this->registry->getClass('reportLibrary')->updateCacheTime(); - - $this->registry->output->redirectScreen( $this->lang->words['redirect_delete_report'], $this->settings['base_url'] . "app=core&module=reports&do=index&st=" . $this->request['st'] ); - } - else - { - //---------------------------------------------- - // Change the status of these reports... - //---------------------------------------------- - - $build_update = array( - 'status' => intval($this->request['newstatus']), - 'date_updated' => time(), - 'updated_by' => $this->memberData['member_id'], - ); - - $this->DB->update( 'rc_reports_index', $build_update, "id IN({$ids})" ); - - $this->registry->getClass('reportLibrary')->updateCacheTime(); - - $this->registry->output->redirectScreen( $this->lang->words['redirect_mark_status'], $this->settings['base_url'] . "app=core&module=reports&do=index&st=" . $this->request['st'] ); - } - } - } - - //----------------------------------------- - // If we're still here show an error - //----------------------------------------- - - if( !$this->memberData['g_access_cp'] ) - { - $this->registry->output->showError( 'no_report_none_perm', 10131 ); - } - else - { - $this->registry->output->silentRedirect( $this->settings['base_url'] . "app=core&module=reports&do=index" ); - } - } - - /** - * Finds first post reported using topic-id - * - * @access public - * @return void - */ - public function findFirstReport() - { - $this->registry->getClass('reportLibrary')->buildStatuses( true ); - - $tid = intval($this->request['tid']); - $cid = intval($this->request['cid']); - - if( $tid < 1 || $cid < 1 ) - { - $this->registry->output->showError( 'reports_need_tidcid', 10132 ); - } - - $row = $this->DB->buildAndFetch( array( 'select' => 'exdat2, exdat3', 'from' => 'rc_reports_index', 'where' => "exdat2={$tid} AND rc_class={$cid} AND status!={$this->registry->getClass('reportLibrary')->report_is_complete}", 'order' => "exdat2 asc", 'limit' => 1 ) ); - - if( !$row['exdat2'] ) - { - $this->registry->output->showError( 'reports_no_topic', 10133 ); - } - - $this->registry->output->silentRedirect( $this->settings['base_url'] . "showtopic={$row['exdat2']}&view=findpost&p={$row['exdat3']}" ); - } - - /** - * Main function for making reports and uses the custom plugins - * - * @access private - * @return void - */ - private function _initReportForm() - { - //----------------------------------------- - // Make sure we have an rcom - //----------------------------------------- - - $rcom = IPSText::alphanumericalClean($this->request['rcom']); - - if( !$rcom ) - { - $this->registry->output->showError( 'reports_what_now', 10134 ); - } - - //----------------------------------------- - // Request plugin info from database - //----------------------------------------- - - $row = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_classes', 'where' => "my_class='{$rcom}' AND onoff=1" ) ); - - if( !$row['com_id'] ) - { - $this->registry->output->showError( 'reports_what_now', 10135 ); - } - else - { - //----------------------------------------- - // Can this group report this type of page? - //----------------------------------------- - - if( $row['my_class'] == '' || count( array_diff($this->member_group_ids, explode(',', $row['group_can_report'])) ) >= count( $this->member_group_ids ) ) - { - $this->registry->output->showError( 'reports_cant_report', 10136 ); - } - - require_once( IPSLib::getAppDir('core') . '/sources/classes/reportNotifications.php' ); - - $notify = new reportNotifications( $this->registry ); - - //----------------------------------------- - // Let's get cooking! Load the plugin - //----------------------------------------- - - $this->registry->getClass('reportLibrary')->loadPlugin( $row['my_class'] ); - - //----------------------------------------- - // Process 'extra data' for the plugin - //----------------------------------------- - - if( $row['extra_data'] && $row['extra_data'] != 'N;' ) - { - $this->registry->getClass('reportLibrary')->plugins[ $row['my_class'] ]->_extra = unserialize( $row['extra_data'] ); - } - else - { - $this->registry->getClass('reportLibrary')->plugins[ $row['my_class'] ]->_extra = array(); - } - - $send_code = intval($this->request['send']); - - if( $send_code == 0 ) - { - //----------------------------------------- - // Request report form from plugin - //----------------------------------------- - - $this->output .= $this->registry->getClass('reportLibrary')->plugins[ $row['my_class'] ]->reportForm( $row ); - } - else - { - //----------------------------------------- - // Form key not valid - //----------------------------------------- - - if ( $this->request['k'] != $this->member->form_hash ) - { - $this->registry->getClass('output')->showError( 'no_permission', 20114 ); - } - - //----------------------------------------- - // Empty report - //----------------------------------------- - - if( !trim(strip_tags($this->request['message'])) ) - { - $this->registry->output->showError( 'reports_cant_empty', 10181 ); - } - - //----------------------------------------- - // Sending report... do necessary things - //----------------------------------------- - - $report_data = $this->registry->getClass('reportLibrary')->plugins[ $row['my_class'] ]->processReport( $row ); - - $this->registry->getClass('reportLibrary')->updateCacheTime(); - - //----------------------------------------- - // Send out notfications... - //----------------------------------------- - - $notify->initNotify( $this->registry->getClass('reportLibrary')->plugins[ $row['my_class'] ]->getNotificationList( substr( $row['mod_group_perm'], 1, strlen($row['mod_group_perm']) - 2), $report_data ), $report_data ); - $notify->sendNotifications(); - - //----------------------------------------- - // Redirect... - //----------------------------------------- - - $this->registry->getClass('reportLibrary')->plugins[ $row['my_class'] ]->reportRedirect( $report_data ); - } - } - } - - /** - * Displays notification options - * - * @access private - * @return void - */ - private function _showNotificationMethods() - { - //----------------------------------------- - // Basic title and nav routine.. - //----------------------------------------- - - $this->registry->output->addNavigation( $this->lang->words['main_title'], 'app=core&module=reports&do=index' ); - - $row = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_modpref', 'where' => "mem_id='{$this->memberData['member_id']}'" ) ); - - $this->output .= $this->registry->getClass('output')->getTemplate('reports')->config_notif( $row ); - } - - /** - * Saves notification options - * - * @access private - * @return void - */ - private function _saveNotificationMethods() - { - //----------------------------------------- - // Check key - //----------------------------------------- - - if ( $this->request['k'] != $this->member->form_hash ) - { - $this->registry->getClass('output')->showError( 'no_permission', 20113 ); - } - - $mod_prefs['by_pm'] = intval( $this->request['notmet_pm'] ); - $mod_prefs['by_email'] = intval( $this->request['notmet_email'] ); - $mod_prefs['by_alert'] = intval( $this->request['notmet_alert'] ); - - $this->DB->build( array( 'select' => '*', 'from' => 'rc_modpref', 'where' => "mem_id='{$this->memberData['member_id']}'" ) ); - $this->DB->execute(); - - if( $this->DB->getTotalRows() == 0 ) - { - $mod_prefs['mem_id'] = $this->memberData['member_id']; - - $this->DB->insert( 'rc_modpref', $mod_prefs ); - } - else - { - $this->DB->update( 'rc_modpref', $mod_prefs, "mem_id='{$this->memberData['member_id']}'" ); - } - - $this->registry->output->redirectScreen( $this->lang->words['reports_methods_saved'], $this->settings['base_url'] . "app=core&module=reports&do=index" ); - } - - /** - * Handles ajax/non-ajax window for reports and comments linked from reports - * - * @access private - * @return boolean - */ - private function _displayReport() - { - //----------------------------------------- - // Lets make sure this report exists... - //----------------------------------------- - - $rid = intval($this->request['rid']); - $options = array( - 'rid' => $rid - ); - $reports = array(); - $comments = array(); - - if( !$rid ) - { - $this->registry->output->showError( 'reports_no_rid', 10137 ); - } - - $this->registry->class_localization->loadLanguageFile( array( 'public_editors' ) ); - - $report_index = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_reports_index', 'where' => "id=" . $rid ) ); - - //----------------------------------------- - // Basic title and nav routine.. - //----------------------------------------- - - $this->registry->output->addNavigation( $this->lang->words['main_title'], 'app=core&module=reports&do=index' ); - $this->registry->output->addNavigation( $report_index['title'], '' ); - - if( $this->DB->getTotalRows() == 0 ) - { - $this->registry->output->showError( 'reports_no_rid', 10138 ); - } - - $COM_PERM = $this->registry->getClass('reportLibrary')->buildQueryPermissions(); - - IPSText::getTextClass('bbcode')->parse_bbcode = 1; - IPSText::getTextClass('bbcode')->parse_html = 0; - IPSText::getTextClass('bbcode')->parse_emoticons = 1; - IPSText::getTextClass('bbcode')->parse_nl2br = 0; - IPSText::getTextClass('bbcode')->parsing_section = 'global'; - - //----------------------------------------- - // Get reports - //----------------------------------------- - - $this->DB->buildFromCache( 'grab_report', array( 'COM' => $COM_PERM, 'rid' => $rid ), 'report_sql_queries' ); - $outer = $this->DB->execute(); - - while( $row = $this->DB->fetch($outer) ) - { - IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id']; - IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others']; - - $row['points'] = isset( $row['points'] ) ? $row['points'] : $this->settings['_tmpPoints'][ $row['id'] ]; - - if( !$options['url'] && $row['url'] ) - { - $options['url'] = $this->registry->getClass('reportLibrary')->processUrl( $row['url'], $row['seoname'], $row['seotemplate'] ); - } - - if( !$options['class'] && $row['my_class'] ) - { - $options['class'] = $row['my_class']; - } - - if( $row['my_class'] == 'messages' && !$options['topicID'] && $row['exdat1'] ) - { - $options['topicID'] = intval($row['exdat1']); - } - - $options['title'] = $row['title']; - $options['status_id'] = $row['status']; - - if( !$options['image'] && $row['img_preview'] ) - { - $options['image'] = $this->registry->getClass('reportLibrary')->processUrl( $row['img_preview'], $row['seoname'], $row['seotemplate'] ); - } - - if( !$options['status_icon'] ) - { - $options['status_icon'] = $this->_buildStatusIcon( $row ); - $options['status_text'] = $this->registry->getClass('reportLibrary')->flag_cache[ $row['status'] ][ $row['points'] ]['title']; - } - - /* Stupid stupid stupidness */ - $row['_title'] = $row['title']; - $row['title'] = $row['member_title']; - - $row['author'] = IPSMember::buildDisplayData( $row ); - - $row['title'] = $row['_title']; - $row['report'] = IPSText::getTextClass('bbcode')->preDisplayParse( $row['report'] ); - $row['report'] = IPSText::getTextClass( 'bbcode' )->memberViewImages( $row['report'] ); - - $reports[] = $row; - } - - if( !$options['class'] ) - { - $this->registry->output->showError( 'reports_no_rid', 10138 ); - } - - $_tmp = $this->registry->getClass('reportLibrary')->flag_cache; - - // Manually build array get just the statuses, not severities - foreach( $_tmp as $sid => $sta ) - { - if( is_array( $sta ) && count( $sta ) ) - { - foreach( $sta as $points => $info ) - { - if( $options['statuses'][ $sid ] ) - { - break; - } - - $options['statuses'][ $sid ] = $info; - } - } - } - - //----------------------------------------- - // Get comments - //----------------------------------------- - - $ids = array( 0 => 0 ); - - $this->DB->build( array( 'select' => 'id', - 'from' => 'rc_comments', - 'where' => 'rid=' . $rid, - 'group' => 'id' ) ); - - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - $ids[ $row['id'] ] = $row['id']; - } - - $this->DB->build( array( - 'select' => 'comm.*', - 'from' => array( 'rc_comments' => 'comm' ), - 'where' => 'comm.id IN (' . implode( ',', $ids ) . ')', - 'order' => 'comm.comment_date ASC', - 'add_join' => array( - array( - 'select' => 'mem.*', - 'from' => array( 'members' => 'mem' ), - 'where' => 'mem.member_id=comm.comment_by', - ), - array( - 'select' => 'grop.*,grop.g_is_supmod as iscop', - 'from' => array( 'groups' => 'grop' ), - 'where' => 'grop.g_id=mem.member_group_id', - ), - array( - 'select' => 'pp.*', - 'from' => array( 'profile_portal' => 'pp' ), - 'where' => 'pp.pp_member_id=mem.member_id', - ), - ) - ) ); - $outer = $this->DB->execute(); - - while($row = $this->DB->fetch($outer)) - { - IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id']; - IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others']; - - $row['author'] = IPSMember::buildDisplayData( $row['member_id'] ); - $row['comment'] = IPSText::getTextClass('bbcode')->preDisplayParse( $row['comment'] ); - $row['comment'] = IPSText::getTextClass( 'bbcode' )->memberViewImages( $row['comment'] ); - - $comments[ $row['id'] ] = $row; - } - - //----------------------------------------- - // And output - //----------------------------------------- - - $this->output .= $this->registry->getClass('output')->getTemplate('reports')->viewReport( $options, $reports, $comments ); - } - - /** - * Recieves comment, submits to database, and redirects user - * - * @access private - * @return void - */ - private function _saveComment() - { - //----------------------------------------- - // Make sure we have a report id... - //----------------------------------------- - - $rid = intval($this->request['rid']); - - if( $rid < 1 ) - { - $this->registry->output->showError( 'reports_no_comment', 10139 ); - } - - //----------------------------------------- - // Lets make sure we even have this report - //----------------------------------------- - - $report = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_reports_index', 'where' => "id=" . $rid ) ); - - if( $report['id'] ) - { - $postContent = IPSText::getTextClass( 'editor' )->processRawPost( $_POST['comment'] ); - - 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'; - - $postContent = IPSText::getTextClass( 'bbcode' )->preDbParse( $postContent ); - - if( !trim( IPSText::br2nl($postContent) ) ) - { - $this->registry->output->showError( 'reports_no_comment_text', 10188 ); - } - - $build_comment = array( - 'rid' => $rid, - 'comment' => $postContent, - 'comment_by' => $this->memberData['member_id'], - 'comment_date' => time() - ); - - $this->DB->insert( 'rc_comments', $build_comment ); - $this->DB->update( 'rc_reports_index', array( 'num_comments' => $report['num_comments'] + 1, 'date_updated' => time(), 'updated_by' => $this->memberData['member_id'] ), "id=" . $report['id'] ); - } - - $this->registry->output->redirectScreen( $this->lang->words['report_comment_saved'], $this->settings['base_url'] . "app=core&module=reports&rid={$report['id']}&do=show_report" ); - } - - /** - * Responsible for pruning reports. Uses the delete reports function to finish - * - * @access private - * @param integer seconds used for pruning reports - * @return void - */ - private function _pruneReports( $stamp ) - { - $ids = array(); - - //-------------------------------------------------- - // Let's grab a list of reports and check stuff... - //-------------------------------------------------- - - $this->DB->build( array( - 'select' => 'rep.id', - 'from' => array( 'rc_reports_index' => 'rep' ), - 'where' => $this->registry->getClass('reportLibrary')->buildQueryPermissions() . ' AND stat.is_complete=1 And rep.date_updated<' . $stamp, - 'add_join' => array( - array( - 'from' => array( 'rc_classes' => 'rcl' ), - 'where' => 'rcl.com_id=rep.rc_class' - ), - array( - 'from' => array( 'rc_status' => 'stat' ), - 'where' => 'stat.status=rep.status' - ), - ) - ) ); - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - $ids[] = $row['id']; - } - - //----------------------------------------- - // OK lets delete them! I love OOP - //----------------------------------------- - - if( count($ids) ) - { - $this->_deleteReports( implode( ',', $ids ), false ); - } - - return count($ids); - } - - /** - * Responsible for deleting reports - * - * @access private - * @param string Report IDS (#,#,#,...) - * @param boolean Security check? - * @return boolean - */ - private function _deleteReports( $rids='', $toCheck=false ) - { - if( $this->memberData['g_access_cp'] != 1 ) - { - return false; - } - - //----------------------------------------- - // Lets make sure we got this right... - //----------------------------------------- - - if( ! $rids || ! preg_match("/[0-9,]+/", $rids ) ) - { - return false; - } - - //----------------------------------------- - // Are we checking security now? - //----------------------------------------- - - if( $toCheck == true ) - { - $this->DB->build( array( - 'select' => 'rep.id, rep.status', - 'from' => array( 'rc_reports_index' => 'rep' ), - 'where' => $this->registry->getClass('reportLibrary')->buildQueryPermissions() . ' AND rep.id IN(' . $rids . ')', - 'add_join' => array( - array( - 'from' => array( 'rc_classes' => 'rcl' ), - 'where' => 'rcl.com_id=rep.rc_class' - ) - ) - ) ); - $res = $this->DB->execute(); - $num = $this->DB->getTotalRows(); - - if( count( explode( ',' , $rids ) ) != $this->DB->getTotalRows() ) - { - $this->registry->output->showError( 'reports_like_whoa', 20111, true ); - } - } - - //----------------------------------------- - // Time to call for the good ol' shredder - //----------------------------------------- - - $this->DB->delete( 'rc_reports_index', 'id IN(' . $rids . ')' ); - $this->DB->delete( 'rc_reports', 'rid IN(' . $rids . ')' ); - $this->DB->delete( 'rc_comments', 'rid IN(' . $rids . ')' ); - - //----------------------------------------- - // I think we should update the numbers.. - //----------------------------------------- - - $this->registry->getClass('reportLibrary')->updateCacheTime(); - - return true; - } - - /** - * Returns the correct status icon / flag to display for a report row - * - * @access private - * @param array Report Row - * @return string - */ - private function _buildStatusIcon( $row ) - { - $this->registry->getClass('reportLibrary')->buildStatuses( true ); - - //----------------------------------------- - // Pick the right flag.. or else! - //----------------------------------------- - - $row['img'] = str_replace( '<#IMG_DIR#>', $this->registry->output->skin['set_image_dir'], $this->registry->getClass('reportLibrary')->flag_cache[ $row['status'] ][ $row['points'] ]['img'] ); - $row['width'] = $this->registry->getClass('reportLibrary')->flag_cache[ $row['status'] ][ $row['points'] ]['width']; - $row['height'] = $this->registry->getClass('reportLibrary')->flag_cache[ $row['status'] ][ $row['points'] ]['height']; - $row['is_png'] = $this->registry->getClass('reportLibrary')->flag_cache[ $row['status'] ][ $row['points'] ]['is_png']; - - //----------------------------------------- - // Image? PNG? Using 'Is-Evil' machine? - //----------------------------------------- - - if( $row['img'] != '' ) - { - return $this->registry->getClass('output')->getTemplate('reports')->statusIcon( $row['img'], $row['width'], $row['height'] ); - } - else - { - return ' '; - } - } - - /** - * Builds the "who's viewing" strip - * - * @access private - * @param integer Section ID - * @return string - */ - private function _getStats( $id=1 ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $ar_time = time(); - $cached = array(); - $guests = array(); - $active = array( 'guests' => 0, 'anon' => 0, 'members' => 0, 'names' => array() ); - $rows = array( $ar_time => array( 'login_type' => substr($this->memberData['login_anonymous'],0, 1), - 'running_time' => $ar_time, - 'id' => $this->member->session_id, - 'seo_name' => $this->memberData['members_seo_name'], - 'member_id' => $this->memberData['member_id'], - 'member_name' => $this->memberData['members_display_name'], - 'member_group' => $this->memberData['member_group_id'] ) ); - - //----------------------------------------- - // Process users active in this forum - //----------------------------------------- - - if ($this->settings['no_au_topic'] != 1) - { - //----------------------------------------- - // Get the users - //----------------------------------------- - - $cut_off = ($this->settings['au_cutoff'] != "") ? $this->settings['au_cutoff'] * 60 : 900; - - $this->DB->build( array( - 'select' => 's.member_id, s.member_name, s.member_group, s.id, s.login_type, s.location, s.running_time, s.uagent_type, s.current_module, s.seo_name', - 'from' => 'sessions s', - 'where' => "current_appcomponent='core' AND current_module='reports' AND running_time > $cut_off", - ) ); - $this->DB->execute(); - - //----------------------------------------- - // FETCH... - //----------------------------------------- - - while ($r = $this->DB->fetch() ) - { - $rows[ $r['running_time'].'.'.$r['id'] ] = $r; - } - - krsort( $rows ); - - //----------------------------------------- - // PRINT... - //----------------------------------------- - - foreach( $rows as $result ) - { - $result['member_name'] = IPSLib::makeNameFormatted( $result['member_name'], $result['member_group'] ); - - $last_date = $this->registry->class_localization->getTime( $result['running_time'] ); - - if ( $result['member_id'] == 0 OR ! $result['member_name'] ) - { - if ( in_array( $result['id'], $guests ) ) - { - continue; - } - - //----------------------------------------- - // Bot? - //----------------------------------------- - - if ( $result['uagent_type'] == 'search' ) - { - //----------------------------------------- - // Seen bot of this type yet? - //----------------------------------------- - - if ( ! $cached[ $result['member_name'] ] ) - { - if ( $this->settings['spider_anon'] ) - { - if ( $this->memberData['g_access_cp'] ) - { - $active['names'][] = array( 'id' => $result['member_id'], 'name' => $result['member_name'], 'seo' => $result['seo_name'] ); - } - } - else - { - $active['names'][] = array( 'id' => $result['member_id'], 'name' => $result['member_name'], 'seo' => $result['seo_name'] ); - } - - $cached[ $result['member_name'] ] = 1; - } - else - { - $active['guests']++; - $guests[] = $result['id']; - } - } - else - { - $active['guests']++; - $guests[] = $result['id']; - } - } - else - { - if (empty( $cached[ $result['member_id'] ] ) ) - { - $cached[ $result['member_id'] ] = 1; - - $p_start = ""; - $p_end = ""; - $p_title = sprintf( $this->lang->words['au_reading'], $last_date ); - - if ( strstr( $result['current_module'], 'post' ) and $result['member_id'] != $this->memberData['member_id'] ) - { - $p_start = ""; - $p_end = ""; - $p_title = sprintf( $this->lang->words['au_posting'], $last_date ); - } - - if ( ! $this->settings['disable_anonymous'] AND $result['login_type'] ) - { - if ( $this->memberData['g_access_cp'] and ($this->settings['disable_admin_anon'] != 1) ) - { - $active['names'][] = array( 'id' => $result['member_id'], 'name' => $result['member_name'] . '*', 'p_start' => $p_start, 'p_title' => $p_title, 'p_end' => $p_end, 'seo' => $result['seo_name'] ); - $active['anon']++; - } - else - { - $active['anon']++; - } - } - else - { - $active['members']++; - $active['names'][] = array( 'id' => $result['member_id'], 'name' => $result['member_name'], 'p_start' => $p_start, 'p_title' => $p_title, 'p_end' => $p_end, 'seo' => $result['seo_name'] ); - } - } - } - } - - //$active['active_users_title'] = sprintf( $this->lang->words['active_users_title'] , ($active['members'] + $active['guests'] + $active['anon'] ) ); - //$active['active_users_detail'] = sprintf( $this->lang->words['active_users_detail'] , $active['guests'],$active['anon'] ); - $active['active_users_members'] = sprintf( $this->lang->words['active_users_members'], $active['members'] ); - - return $active; - } - } + + * Invision Power Services + * IP.Board v3.1.4 + * Reports content central management + * Last Updated: $LastChangedDate: 2010-09-29 20:23:38 -0400 (Wed, 29 Sep 2010) $ + * + * + * @author $Author: bfarber $ + * @author Based on original "Report Center" by Luke Scott + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 6925 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class public_core_reports_reports extends ipsCommand +{ + /** + * Execute selected method + * + * @access public + * @param object Registry object + * @return void + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load basic things + //----------------------------------------- + + $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 ) ); + + //----------------------------------------- + // Check permissions... + //----------------------------------------- + + $showReportCenter = false; + + $this->member_group_ids = array( $this->memberData['member_group_id'] ); + $this->member_group_ids = array_diff( array_merge( $this->member_group_ids, explode( ',', $this->memberData['mgroup_others'] ) ), array('') ); + $report_center = array_diff( explode( ',', $this->settings['report_mod_group_access'] ), array('') ); + + foreach( $report_center as $groupId ) + { + if( in_array( $groupId, $this->member_group_ids ) ) + { + $showReportCenter = true; + } + } + + if( ($this->request['do'] AND $this->request['do'] != 'report') AND !$showReportCenter ) + { + $this->registry->output->showError( 'no_reports_permission', 2018, true, null, 403 ); + } + + $this->registry->output->setTitle( $this->lang->words['main_title'] . ' - ' . ipsRegistry::$settings['board_name'] ); + + //----------------------------------------- + // Which road are we going to take? + //----------------------------------------- + + switch( $this->request['do'] ) + { + default: + case 'report': + $this->_initReportForm(); + break; + + case 'showMessage': + $this->_viewReportedMessage(); + break; + + case 'index': + $this->_displayReportCenter(); + break; + + case 'process': + $this->_processReports(); + break; + + case 'findfirst': + $this->findFirstReport(); + break; + + case 'show_report': + $this->_displayReport(); + break; + + case 'save_comment': + $this->_saveComment(); + break; + } + + //----------------------------------------- + // Output + //----------------------------------------- + + $this->registry->getClass('output')->addContent( $this->output ); + $this->registry->output->sendOutput(); + } + + /** + * View a reported private message as it shows in the messenger + * + * @access private + * @return void + */ + private function _viewReportedMessage() + { + //----------------------------------------- + // Do we have permission? + //----------------------------------------- + + $this->registry->getClass('reportLibrary')->buildQueryPermissions(); + + if( !in_array( $this->memberData['member_group_id'], explode( ',', $this->registry->getClass('reportLibrary')->plugins['messages']->_extra['plugi_messages_add'] ) ) ) + { + $this->registry->getClass('output')->showError( 'no_permission_addreport', 20115, null, null, 403 ); + } + + //----------------------------------------- + // First see if we are already in map... + //----------------------------------------- + + $topicId = intval($this->request['topicID']); + + $mapRecord = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'message_topic_user_map', 'where' => "map_user_id={$this->memberData['member_id']} AND map_topic_id={$topicId}" ) ); + + //----------------------------------------- + // Doesn't exist? + //----------------------------------------- + + if( !$mapRecord['map_user_id'] ) + { + define( 'FROM_REPORT_CENTER', true ); + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php', 'messengerFunctions', 'members' ); + $messengerFunctions = new $classToLoad( $this->registry ); + + //----------------------------------------- + // Add ourselves + //----------------------------------------- + + try + { + $messengerFunctions->addTopicParticipants( $topicId, array( $this->memberData['members_display_name'] ), $this->memberData['member_id'] ); + } + + //----------------------------------------- + // Must already be in there + //----------------------------------------- + + catch( Exception $e ) + { + + } + } + + //----------------------------------------- + // Already a participant, make sure we're active + //----------------------------------------- + + else + { + $update = array(); + + if( !$mapRecord['map_user_active'] ) + { + $update['map_user_active'] = 1; + } + + if( $mapRecord['map_folder_id'] == 'finished' ) + { + $update['map_folder_id'] = 'myconvo'; + } + + if( $mapRecord['map_user_banned'] ) + { + $update['map_user_banned'] = 0; + } + + if( count($update) ) + { + $this->DB->update( 'message_topic_user_map', $update, "map_user_id={$this->memberData['member_id']} AND map_topic_id={$topicId}" ); + } + } + + $this->registry->output->silentRedirect( $this->settings['base_url'] . "app=members&module=messaging&section=view&do=showConversation&topicID=" . $topicId . "&st=" . $this->request['st'] . "#msg" . $this->request['msg'] ); + } + + /** + * Main function for displaying reports in a list + * + * @access private + * @return void + */ + private function _displayReportCenter() + { + //----------------------------------------- + // Check for rss key and if none make one + //----------------------------------------- + + $this->registry->getClass('reportLibrary')->checkMemberRSSKey(); + + //----------------------------------------- + // Basic title and nav routine.. + //----------------------------------------- + + $this->registry->output->addNavigation( $this->lang->words['main_title'], 'app=core&module=reports&do=index' ); + + //----------------------------------------- + // We need some extra permisisons sql.. + //----------------------------------------- + + $COM_PERM = $this->registry->getClass('reportLibrary')->buildQueryPermissions(); + + $reports = array(); + + //----------------------------------------- + // Show me the money! err.. Reports! + //----------------------------------------- + + $total = $this->DB->buildAndFetch( array( + 'select' => 'COUNT(*) as reports', + 'from' => array( 'rc_reports_index' => 'rep' ), + 'where' => $COM_PERM, + 'add_join' => array( + array( + 'from' => array( 'rc_classes' => 'rcl' ), + 'where' => 'rcl.com_id=rep.rc_class' + ) + ) + ) ); + + + + $this->DB->buildFromCache( 'reports_index', array( 'WHERE' => $COM_PERM, 'START' => intval($this->request['st']), 'LIMIT' => 10 ), 'report_sql_queries' ); + $res = $this->DB->execute(); + + while( $row = $this->DB->fetch($res) ) + { + $sec_data = $this->registry->getClass('reportLibrary')->plugins[$row['my_class']]->giveSectionLinkTitle( $row ); + $sec_data['url'] = $this->registry->getClass('reportLibrary')->processUrl( $sec_data['url'], $sec_data['seo_title'], $sec_data['seo_template'] ); + $row['points'] = isset( $row['points'] ) ? $row['points'] : $this->settings['_tmpPoints'][ $row['id'] ]; + $row['section'] = $sec_data; + $row['status_icon'] = $this->_buildStatusIcon( $row ); + + $reports[ $row['id'] ] = $row; + } + + //----------------------------------------- + // Statuses + //----------------------------------------- + + $stats = array(); + $_tmp = $this->registry->getClass('reportLibrary')->flag_cache; + + // Manually build array get just the statuses, not severities + foreach( $_tmp as $sid => $sta ) + { + if( is_array( $sta ) && count( $sta ) ) + { + foreach( $sta as $points => $info ) + { + if( $stats[ $sid ] ) + { + break; + } + + $stats[ $sid ] = $info; + } + } + } + + //----------------------------------------- + // Display Page Navigation + //----------------------------------------- + + $pages = $this->registry->output->generatePagination( array( 'totalItems' => $total['reports'], + 'itemsPerPage' => 10, + 'currentStartValue' => $this->request['st'], + 'baseUrl' => 'app=core&module=reports&do=index' + ) + ); + + $this->output .= $this->registry->getClass('output')->getTemplate('reports')->reportsIndex( $reports, $this->registry->getClass('reportLibrary')->buildStatuses(), $pages, $this->_getStats( 1 ), $stats ); + } + + /** + * Basic functions for processing actions on 'Report Index' page (Drop Down) + * + * @access private + * @return void + */ + private function _processReports() + { + //----------------------------------------- + // Check form key + //----------------------------------------- + + if ( $this->request['k'] != $this->member->form_hash ) + { + $this->registry->getClass('output')->showError( 'no_permission', 20112, null, null, 403 ); + } + + //----------------------------------------- + // Are we pruning? + //----------------------------------------- + + if( is_numeric($this->request['pruneDays']) && $this->request['newstatus'] == 'p' ) + { + if( !$this->memberData['g_access_cp'] ) + { + $this->registry->output->showError( 'no_report_prune_perm', 2019, true, null, null, 403 ); + } + + //----------------------------------------- + // Let's prune those reports.. if we can + //----------------------------------------- + + $prune_time = ceil(time() - (intval($this->request['pruneDays']) * 86400)); + $total_pruned = $this->_pruneReports( $prune_time ); + + if( $total_pruned ) + { + $this->registry->output->redirectScreen( $this->lang->words['report_prune_message_done'], $this->settings['base_url'] . "app=core&module=reports&do=index&st=" . $this->request['st'] ); + } + else + { + $this->registry->output->redirectScreen( $this->lang->words['report_prune_message_none'], $this->settings['base_url'] . "app=core&module=reports&do=index&st=" . $this->request['st'] ); + } + } + + //----------------------------------------- + // Either deleting or updating status? + //----------------------------------------- + + elseif( $this->request['report_ids'] && is_array($this->request['report_ids']) ) + { + $ids = implode( ',', IPSLib::cleanIntArray( $this->request['report_ids'] ) ); + + if( strlen($ids) > 0 && ( ! preg_match( "/[^0-9,]/", $ids ) ) ) + { + if( $this->request['newstatus'] == 'd' ) + { + if( !$this->memberData['g_access_cp'] ) + { + $this->registry->output->showError( 'no_report_prune_perm', 20110, true, null, null, 403 ); + } + + //----------------------------------------- + // Time to delete some stuff! + //----------------------------------------- + + $this->_deleteReports( $ids, true ); + $this->registry->getClass('reportLibrary')->updateCacheTime(); + + $this->registry->output->redirectScreen( $this->lang->words['redirect_delete_report'], $this->settings['base_url'] . "app=core&module=reports&do=index&st=" . $this->request['st'] ); + } + else + { + //---------------------------------------------- + // Change the status of these reports... + //---------------------------------------------- + + $build_update = array( + 'status' => intval($this->request['newstatus']), + 'date_updated' => time(), + 'updated_by' => $this->memberData['member_id'], + ); + + $this->DB->update( 'rc_reports_index', $build_update, "id IN({$ids})" ); + + $this->registry->getClass('reportLibrary')->updateCacheTime(); + + $this->registry->output->redirectScreen( $this->lang->words['redirect_mark_status'], $this->settings['base_url'] . "app=core&module=reports&do=index&st=" . $this->request['st'] ); + } + } + } + + //----------------------------------------- + // If we're still here show an error + //----------------------------------------- + + if( !$this->memberData['g_access_cp'] ) + { + $this->registry->output->showError( 'no_report_none_perm', 10131, null, null, 403 ); + } + else + { + $this->registry->output->silentRedirect( $this->settings['base_url'] . "app=core&module=reports&do=index" ); + } + } + + /** + * Finds first post reported using topic-id + * + * @access public + * @return void + */ + public function findFirstReport() + { + $this->registry->getClass('reportLibrary')->buildStatuses( true ); + + $tid = intval($this->request['tid']); + $cid = intval($this->request['cid']); + + if( $tid < 1 || $cid < 1 ) + { + $this->registry->output->showError( 'reports_need_tidcid', 10132 ); + } + + $row = $this->DB->buildAndFetch( array( 'select' => 'exdat2, exdat3', 'from' => 'rc_reports_index', 'where' => "exdat2={$tid} AND rc_class={$cid} AND status!={$this->registry->getClass('reportLibrary')->report_is_complete}", 'order' => "exdat2 asc", 'limit' => 1 ) ); + + if( !$row['exdat2'] ) + { + $this->registry->output->showError( 'reports_no_topic', 10133 ); + } + + $this->registry->output->silentRedirect( $this->settings['base_url'] . "showtopic={$row['exdat2']}&view=findpost&p={$row['exdat3']}" ); + } + + /** + * Main function for making reports and uses the custom plugins + * + * @access private + * @return void + */ + private function _initReportForm() + { + //----------------------------------------- + // Make sure we have an rcom + //----------------------------------------- + + $rcom = IPSText::alphanumericalClean($this->request['rcom']); + + if( !$rcom ) + { + $this->registry->output->showError( 'reports_what_now', 10134 ); + } + + //----------------------------------------- + // Request plugin info from database + //----------------------------------------- + + $row = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_classes', 'where' => "my_class='{$rcom}' AND onoff=1" ) ); + + if( !$row['com_id'] ) + { + $this->registry->output->showError( 'reports_what_now', 10135 ); + } + else + { + //----------------------------------------- + // Can this group report this type of page? + //----------------------------------------- + + if( $row['my_class'] == '' || count( array_diff($this->member_group_ids, explode(',', $row['group_can_report'])) ) >= count( $this->member_group_ids ) ) + { + $this->registry->output->showError( 'reports_cant_report', 10136, null, null, 403 ); + } + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') . '/sources/classes/reportNotifications.php', 'reportNotifications' ); + $notify = new $classToLoad( $this->registry ); + + //----------------------------------------- + // Let's get cooking! Load the plugin + //----------------------------------------- + + $this->registry->getClass('reportLibrary')->loadPlugin( $row['my_class'], $row['app'] ); + + if( !is_object($this->registry->getClass('reportLibrary')->plugins[ $row['my_class'] ]) ) + { + $this->registry->output->showError( 'reports_no_plugin', 10136.1, null, null, 403 ); + } + + //----------------------------------------- + // Process 'extra data' for the plugin + //----------------------------------------- + + if( $row['extra_data'] && $row['extra_data'] != 'N;' ) + { + $this->registry->getClass('reportLibrary')->plugins[ $row['my_class'] ]->_extra = unserialize( $row['extra_data'] ); + } + else + { + $this->registry->getClass('reportLibrary')->plugins[ $row['my_class'] ]->_extra = array(); + } + + $send_code = intval($this->request['send']); + + if( $send_code == 0 ) + { + //----------------------------------------- + // Request report form from plugin + //----------------------------------------- + + $this->output .= $this->registry->getClass('reportLibrary')->plugins[ $row['my_class'] ]->reportForm( $row ); + } + else + { + //----------------------------------------- + // Form key not valid + //----------------------------------------- + + if ( $this->request['k'] != $this->member->form_hash ) + { + $this->registry->getClass('output')->showError( 'no_permission', 20114, null, null, 403 ); + } + + //----------------------------------------- + // Empty report + //----------------------------------------- + + if( !trim(strip_tags($this->request['message'])) ) + { + $this->registry->output->showError( 'reports_cant_empty', 10181 ); + } + + //----------------------------------------- + // Sending report... do necessary things + //----------------------------------------- + + $report_data = $this->registry->getClass('reportLibrary')->plugins[ $row['my_class'] ]->processReport( $row ); + + $this->registry->getClass('reportLibrary')->updateCacheTime(); + + //----------------------------------------- + // Send out notfications... + //----------------------------------------- + + $notify->initNotify( $this->registry->getClass('reportLibrary')->plugins[ $row['my_class'] ]->getNotificationList( IPSText::cleanPermString( $row['mod_group_perm'] ), $report_data ), $report_data ); + $notify->sendNotifications(); + + //----------------------------------------- + // Redirect... + //----------------------------------------- + + $this->registry->getClass('reportLibrary')->plugins[ $row['my_class'] ]->reportRedirect( $report_data ); + } + } + } + + /** + * Handles ajax/non-ajax window for reports and comments linked from reports + * + * @access private + * @return boolean + */ + private function _displayReport() + { + //----------------------------------------- + // Lets make sure this report exists... + //----------------------------------------- + + $rid = intval($this->request['rid']); + $options = array( + 'rid' => $rid + ); + $reports = array(); + $comments = array(); + + if( !$rid ) + { + $this->registry->output->showError( 'reports_no_rid', 10137 ); + } + + $this->registry->class_localization->loadLanguageFile( array( 'public_editors' ) ); + + $report_index = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_reports_index', 'where' => "id=" . $rid ) ); + + //----------------------------------------- + // Basic title and nav routine.. + //----------------------------------------- + + $this->registry->output->addNavigation( $this->lang->words['main_title'], 'app=core&module=reports&do=index' ); + $this->registry->output->addNavigation( $report_index['title'], '' ); + + if( $this->DB->getTotalRows() == 0 ) + { + $this->registry->output->showError( 'reports_no_rid', 10138 ); + } + + $COM_PERM = $this->registry->getClass('reportLibrary')->buildQueryPermissions(); + + IPSText::getTextClass('bbcode')->parse_bbcode = 1; + IPSText::getTextClass('bbcode')->parse_html = 0; + IPSText::getTextClass('bbcode')->parse_emoticons = 1; + IPSText::getTextClass('bbcode')->parse_nl2br = 0; + IPSText::getTextClass('bbcode')->parsing_section = 'global'; + + //----------------------------------------- + // Get reports + //----------------------------------------- + + $this->DB->buildFromCache( 'grab_report', array( 'COM' => $COM_PERM, 'rid' => $rid ), 'report_sql_queries' ); + $outer = $this->DB->execute(); + + while( $row = $this->DB->fetch($outer) ) + { + IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id']; + IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others']; + + $row['points'] = isset( $row['points'] ) ? $row['points'] : $this->settings['_tmpPoints'][ $row['id'] ]; + + if( !$options['url'] && $row['url'] ) + { + $options['url'] = $this->registry->getClass('reportLibrary')->processUrl( $row['url'], $row['seoname'], $row['seotemplate'] ); + } + + if( !$options['class'] && $row['my_class'] ) + { + $options['class'] = $row['my_class']; + } + + if( $row['my_class'] == 'messages' && !$options['topicID'] && $row['exdat1'] ) + { + $options['topicID'] = intval($row['exdat1']); + } + + $options['title'] = $row['title']; + $options['status_id'] = $row['status']; + + if( !$options['image'] && $row['img_preview'] ) + { + $options['image'] = $this->registry->getClass('reportLibrary')->processUrl( $row['img_preview'], $row['seoname'], $row['seotemplate'] ); + } + + if( !$options['status_icon'] ) + { + $options['status_icon'] = $this->_buildStatusIcon( $row ); + $options['status_text'] = $this->registry->getClass('reportLibrary')->flag_cache[ $row['status'] ][ $row['points'] ]['title']; + } + + /* Stupid stupid stupidness */ + $row['_title'] = $row['title']; + $row['title'] = $row['member_title']; + + $row['author'] = IPSMember::buildDisplayData( $row ); + + $row['title'] = $row['_title']; + $row['report'] = IPSText::getTextClass('bbcode')->preDisplayParse( $row['report'] ); + $row['report'] = IPSText::getTextClass( 'bbcode' )->memberViewImages( $row['report'] ); + + $reports[] = $row; + } + + if( !$options['class'] ) + { + $this->registry->output->showError( 'reports_no_rid', 10138 ); + } + + $_tmp = $this->registry->getClass('reportLibrary')->flag_cache; + + // Manually build array get just the statuses, not severities + foreach( $_tmp as $sid => $sta ) + { + if( is_array( $sta ) && count( $sta ) ) + { + foreach( $sta as $points => $info ) + { + if( $options['statuses'][ $sid ] ) + { + break; + } + + $options['statuses'][ $sid ] = $info; + } + } + } + + //----------------------------------------- + // Get comments + //----------------------------------------- + + $ids = array( 0 => 0 ); + + $this->DB->build( array( 'select' => 'id', + 'from' => 'rc_comments', + 'where' => 'rid=' . $rid, + 'group' => 'id' ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $ids[ $row['id'] ] = $row['id']; + } + + $this->DB->build( array( + 'select' => 'comm.*', + 'from' => array( 'rc_comments' => 'comm' ), + 'where' => 'comm.id IN (' . implode( ',', $ids ) . ')', + 'order' => 'comm.comment_date ASC', + 'add_join' => array( + array( + 'select' => 'mem.*', + 'from' => array( 'members' => 'mem' ), + 'where' => 'mem.member_id=comm.comment_by', + ), + array( + 'select' => 'grop.*,grop.g_is_supmod as iscop', + 'from' => array( 'groups' => 'grop' ), + 'where' => 'grop.g_id=mem.member_group_id', + ), + array( + 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'pp.pp_member_id=mem.member_id', + ), + ) + ) ); + $outer = $this->DB->execute(); + + while($row = $this->DB->fetch($outer)) + { + IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id']; + IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others']; + + $row['author'] = IPSMember::buildDisplayData( $row['member_id'] ); + $row['comment'] = IPSText::getTextClass('bbcode')->preDisplayParse( $row['comment'] ); + $row['comment'] = IPSText::getTextClass( 'bbcode' )->memberViewImages( $row['comment'] ); + + $comments[ $row['id'] ] = $row; + } + + //----------------------------------------- + // And output + //----------------------------------------- + + $this->output .= $this->registry->getClass('output')->getTemplate('reports')->viewReport( $options, $reports, $comments ); + } + + /** + * Recieves comment, submits to database, and redirects user + * + * @access private + * @return void + */ + private function _saveComment() + { + //----------------------------------------- + // Make sure we have a report id... + //----------------------------------------- + + $rid = intval($this->request['rid']); + + if( $rid < 1 ) + { + $this->registry->output->showError( 'reports_no_comment', 10139 ); + } + + //----------------------------------------- + // Lets make sure we even have this report + //----------------------------------------- + + $report = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rc_reports_index', 'where' => "id=" . $rid ) ); + + if( $report['id'] ) + { + $postContent = IPSText::getTextClass( 'editor' )->processRawPost( $_POST['comment'] ); + + 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'; + + $postContent = IPSText::getTextClass( 'bbcode' )->preDbParse( $postContent ); + + if( !trim( IPSText::br2nl($postContent) ) ) + { + $this->registry->output->showError( 'reports_no_comment_text', 10188 ); + } + + $build_comment = array( + 'rid' => $rid, + 'comment' => $postContent, + 'comment_by' => $this->memberData['member_id'], + 'comment_date' => time() + ); + + $this->DB->insert( 'rc_comments', $build_comment ); + $this->DB->update( 'rc_reports_index', array( 'num_comments' => $report['num_comments'] + 1, 'date_updated' => time(), 'updated_by' => $this->memberData['member_id'] ), "id=" . $report['id'] ); + } + + $this->registry->output->redirectScreen( $this->lang->words['report_comment_saved'], $this->settings['base_url'] . "app=core&module=reports&rid={$report['id']}&do=show_report" ); + } + + /** + * Responsible for pruning reports. Uses the delete reports function to finish + * + * @access private + * @param integer seconds used for pruning reports + * @return void + */ + private function _pruneReports( $stamp ) + { + $ids = array(); + + //-------------------------------------------------- + // Let's grab a list of reports and check stuff... + //-------------------------------------------------- + + $this->DB->build( array( + 'select' => 'rep.id', + 'from' => array( 'rc_reports_index' => 'rep' ), + 'where' => $this->registry->getClass('reportLibrary')->buildQueryPermissions() . ' AND stat.is_complete=1 And rep.date_updated<' . $stamp, + 'add_join' => array( + array( + 'from' => array( 'rc_classes' => 'rcl' ), + 'where' => 'rcl.com_id=rep.rc_class' + ), + array( + 'from' => array( 'rc_status' => 'stat' ), + 'where' => 'stat.status=rep.status' + ), + ) + ) ); + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $ids[] = $row['id']; + } + + //----------------------------------------- + // OK lets delete them! I love OOP + //----------------------------------------- + + if( count($ids) ) + { + $this->_deleteReports( implode( ',', $ids ), false ); + } + + return count($ids); + } + + /** + * Responsible for deleting reports + * + * @access private + * @param string Report IDS (#,#,#,...) + * @param boolean Security check? + * @return boolean + */ + private function _deleteReports( $rids='', $toCheck=false ) + { + if( $this->memberData['g_access_cp'] != 1 ) + { + return false; + } + + //----------------------------------------- + // Lets make sure we got this right... + //----------------------------------------- + + if( ! $rids || ! preg_match("/[0-9,]+/", $rids ) ) + { + return false; + } + + //----------------------------------------- + // Are we checking security now? + //----------------------------------------- + + if( $toCheck == true ) + { + $this->DB->build( array( + 'select' => 'rep.id, rep.status', + 'from' => array( 'rc_reports_index' => 'rep' ), + 'where' => $this->registry->getClass('reportLibrary')->buildQueryPermissions() . ' AND rep.id IN(' . $rids . ')', + 'add_join' => array( + array( + 'from' => array( 'rc_classes' => 'rcl' ), + 'where' => 'rcl.com_id=rep.rc_class' + ) + ) + ) ); + $res = $this->DB->execute(); + $num = $this->DB->getTotalRows(); + + if( count( explode( ',' , $rids ) ) != $this->DB->getTotalRows() ) + { + $this->registry->output->showError( 'reports_like_whoa', 20111, true ); + } + } + + //----------------------------------------- + // Time to call for the good ol' shredder + //----------------------------------------- + + $this->DB->delete( 'rc_reports_index', 'id IN(' . $rids . ')' ); + $this->DB->delete( 'rc_reports', 'rid IN(' . $rids . ')' ); + $this->DB->delete( 'rc_comments', 'rid IN(' . $rids . ')' ); + + //----------------------------------------- + // I think we should update the numbers.. + //----------------------------------------- + + $this->registry->getClass('reportLibrary')->updateCacheTime(); + + return true; + } + + /** + * Returns the correct status icon / flag to display for a report row + * + * @access private + * @param array Report Row + * @return string + */ + private function _buildStatusIcon( $row ) + { + $this->registry->getClass('reportLibrary')->buildStatuses( true ); + + //----------------------------------------- + // Pick the right flag.. or else! + //----------------------------------------- + + $row['img'] = str_replace( '<#IMG_DIR#>', $this->registry->output->skin['set_image_dir'], $this->registry->getClass('reportLibrary')->flag_cache[ $row['status'] ][ $row['points'] ]['img'] ); + $row['width'] = $this->registry->getClass('reportLibrary')->flag_cache[ $row['status'] ][ $row['points'] ]['width']; + $row['height'] = $this->registry->getClass('reportLibrary')->flag_cache[ $row['status'] ][ $row['points'] ]['height']; + $row['is_png'] = $this->registry->getClass('reportLibrary')->flag_cache[ $row['status'] ][ $row['points'] ]['is_png']; + + //----------------------------------------- + // Image? PNG? Using 'Is-Evil' machine? + //----------------------------------------- + + if( $row['img'] != '' ) + { + return $this->registry->getClass('output')->getTemplate('reports')->statusIcon( $row['img'], $row['width'], $row['height'] ); + } + else + { + return ' '; + } + } + + /** + * Builds the "who's viewing" strip + * + * @access private + * @param integer Section ID + * @return string + */ + private function _getStats( $id=1 ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $ar_time = time(); + $cached = array(); + $guests = array(); + $active = array( 'guests' => 0, 'anon' => 0, 'members' => 0, 'names' => array() ); + $rows = array( $ar_time => array( 'login_type' => substr($this->memberData['login_anonymous'],0, 1), + 'running_time' => $ar_time, + 'id' => $this->member->session_id, + 'seo_name' => $this->memberData['members_seo_name'], + 'member_id' => $this->memberData['member_id'], + 'member_name' => $this->memberData['members_display_name'], + 'member_group' => $this->memberData['member_group_id'] ) ); + + //----------------------------------------- + // Process users active in this forum + //----------------------------------------- + + if ($this->settings['no_au_topic'] != 1) + { + //----------------------------------------- + // Get the users + //----------------------------------------- + + $cut_off = ($this->settings['au_cutoff'] != "") ? $this->settings['au_cutoff'] * 60 : 900; + + $this->DB->build( array( + 'select' => '*', + 'from' => 'sessions', + 'where' => "current_appcomponent='core' AND current_module='reports' AND running_time > " . $cut_off, + ) ); + $this->DB->execute(); + + //----------------------------------------- + // FETCH... + //----------------------------------------- + + while ($r = $this->DB->fetch() ) + { + $rows[ $r['running_time'].'.'.$r['id'] ] = $r; + } + + krsort( $rows ); + + //----------------------------------------- + // PRINT... + //----------------------------------------- + + foreach( $rows as $result ) + { + $result['member_name'] = IPSLib::makeNameFormatted( $result['member_name'], $result['member_group'] ); + + $last_date = $this->registry->class_localization->getTime( $result['running_time'] ); + + if ( $result['member_id'] == 0 OR ! $result['member_name'] ) + { + if ( in_array( $result['id'], $guests ) ) + { + continue; + } + + //----------------------------------------- + // Bot? + //----------------------------------------- + + if ( $result['uagent_type'] == 'search' ) + { + //----------------------------------------- + // Seen bot of this type yet? + //----------------------------------------- + + if ( ! $cached[ $result['member_name'] ] ) + { + if ( $this->settings['spider_anon'] ) + { + if ( $this->memberData['g_access_cp'] ) + { + $active['names'][] = array( 'id' => $result['member_id'], 'name' => $result['member_name'], 'seo' => $result['seo_name'] ); + } + } + else + { + $active['names'][] = array( 'id' => $result['member_id'], 'name' => $result['member_name'], 'seo' => $result['seo_name'] ); + } + + $cached[ $result['member_name'] ] = 1; + } + else + { + $active['guests']++; + $guests[] = $result['id']; + } + } + else + { + $active['guests']++; + $guests[] = $result['id']; + } + } + else + { + if (empty( $cached[ $result['member_id'] ] ) ) + { + $cached[ $result['member_id'] ] = 1; + + $p_start = ""; + $p_end = ""; + $p_title = sprintf( $this->lang->words['au_reading'], $last_date ); + + if ( strstr( $result['current_module'], 'post' ) and $result['member_id'] != $this->memberData['member_id'] ) + { + $p_start = ""; + $p_end = ""; + $p_title = sprintf( $this->lang->words['au_posting'], $last_date ); + } + + if ( ! $this->settings['disable_anonymous'] AND $result['login_type'] ) + { + if ( $this->memberData['g_access_cp'] and ($this->settings['disable_admin_anon'] != 1) ) + { + $active['names'][] = array( 'id' => $result['member_id'], 'name' => $result['member_name'] . '*', 'p_start' => $p_start, 'p_title' => $p_title, 'p_end' => $p_end, 'seo' => $result['seo_name'] ); + $active['anon']++; + } + else + { + $active['anon']++; + } + } + else + { + $active['members']++; + $active['names'][] = array( 'id' => $result['member_id'], 'name' => $result['member_name'], 'p_start' => $p_start, 'p_title' => $p_title, 'p_end' => $p_end, 'seo' => $result['seo_name'] ); + } + } + } + } + + //$active['active_users_title'] = sprintf( $this->lang->words['active_users_title'] , ($active['members'] + $active['guests'] + $active['anon'] ) ); + //$active['active_users_detail'] = sprintf( $this->lang->words['active_users_detail'] , $active['guests'],$active['anon'] ); + $active['active_users_members'] = sprintf( $this->lang->words['active_users_members'], $active['members'] ); + + return $active; + } + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/search/defaultSection.php b/upload/admin/applications/core/modules_public/search/defaultSection.php index 0b0de580..d2a6005c 100644 --- a/upload/admin/applications/core/modules_public/search/defaultSection.php +++ b/upload/admin/applications/core/modules_public/search/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Define the default section section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/applications/core/modules_public/search/index.html b/upload/admin/applications/core/modules_public/search/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_public/search/index.html +++ b/upload/admin/applications/core/modules_public/search/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/search/search.php b/upload/admin/applications/core/modules_public/search/search.php index 751f90d4..05191cbe 100644 --- a/upload/admin/applications/core/modules_public/search/search.php +++ b/upload/admin/applications/core/modules_public/search/search.php @@ -1,1300 +1,776 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_core_search_search extends ipsCommand -{ - /** - * Generated output - * - * @access private - * @var string - */ - private $output = ''; - - /** - * Page Title - * - * @access private - * @var string - */ - private $title = ''; - - /** - * Object to handle searches - * - * @access private - * @var string - */ - private $search_plugin = ''; - - /** - * Topics array - * - * @access private - * @var array - */ - private $_topicArray = array(); - - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen/redirects] - */ - public function doExecute( ipsRegistry $registry ) - { - /* Basic Search */ - if( isset( $this->request['search_filter_app'] ) && is_array( $this->request['search_filter_app'] ) ) - { - foreach( $this->request['search_filter_app'] as $app => $checked ) - { - /* Bypass the all filter */ - if( $app == 'all' ) - { - $this->request['search_app'] = 'forums'; - $this->request['search_filter_app']['forums'] = 1; - break; - } - - /* Add to the array */ - if( $checked ) - { - $this->request['search_app'] = $app; - break; - } - } - } - - $this->request['search_app'] = $this->request['search_app'] ? $this->request['search_app'] : 'forums'; - - /* Load Search Plugin */ - try - { - /* If it's not a search operation, like new content or user post for example, we use mysql instead of sphinx */ - if( $this->request['do'] != 'quick_search' ) - { - $this->search_plugin = IPSSearchIndex::getSearchPlugin( 'index' ); - } - else - { - $this->search_plugin = IPSSearchIndex::getSearchPlugin(); - } - } - catch( Exception $error ) - { - switch( $error->getMessage() ) - { - case 'INVALID_BASIC_SEARCH_PLUGIN_FILE': - $this->registry->output->showError( 'search_invalid_plugin', 10140 ); - break; - - case 'INVALID_BASIC_SEARCH_PLUGIN_CLASS': - $this->registry->output->showError( 'search_plugin_class', 10141, true ); - break; - - case 'INVALID_INDEX_PLUGIN_FILE': - $this->registry->output->showError( 'search_plugin_file', 10142 ); - break; - - case 'INVALID_INDEX_PLUGIN_CLASS': - $this->registry->output->showError( 'search_plugin_class', 10143, true ); - break; - } - } - - /* Check Access */ - $this->_canSearch(); - - /* Load language */ - $this->registry->class_localization->loadLanguageFile( array( 'public_search' ), 'core' ); - $this->registry->class_localization->loadLanguageFile( array( 'public_forums' ), 'forums' ); - - /* What to do */ - switch( $this->request['do'] ) - { - case 'active': - $this->activeContent(); - break; - - case 'user_posts': - $this->viewUserContent(); - break; - - case 'new_posts': - $this->viewNewPosts(); - break; - - case 'quick_search': - $this->searchResults(); - break; - - default: - case 'search_form': - $this->searchAdvancedForm(); - break; - } - - /* If we have any HTML to print, do so... */ - $this->registry->output->setTitle( $this->title ); - $this->registry->output->addContent( $this->output ); - $this->registry->output->sendOutput(); - } - - /** - * Builds the advanced search form - * - * @access public - * @param string Message - * @return void - */ - public function searchAdvancedForm( $msg='', $removed_search_terms=array() ) - { - /* Get any application specific filters */ - $filters_html = ''; - - foreach( ipsRegistry::$applications as $app ) - { - if( IPSSearchIndex::appisSearchable( $app['app_directory'] ) ) - { - require_once( IPSLib::getAppDir( $app['app_directory'] ) . '/extensions/searchDisplay.php' ); - $_class = $app['app_directory'] . 'SearchDisplay'; - - if( class_exists( $_class ) ) - { - $search_display_plugin = new $_class(); - $filters_html .= $search_display_plugin->getFilterHTML(); - } - } - } - - /* Output */ - $this->title = $this->lang->words['search_form']; - $this->registry->output->addNavigation( $this->lang->words['search_form'], '' ); - $this->output .= $this->registry->output->getTemplate( 'search' )->searchAdvancedForm( $filters_html, $msg, $removed_search_terms ); - } - - /** - * Processes a search request - * - * @access public - * @return void - */ - public function searchResults() - { - /* Search Term */ - $asForum = ( method_exists( $this->search_plugin, 'getShowAsForum' ) ) ? $this->_getShowAsForum() : false; - $search_term = str_replace( """, '"', IPSText::parseCleanValue( rawurldecode( $this->request['search_term'] ) ) ); - $search_term = str_replace( "&", '&', $search_term ); - $removedTerms = array(); - - /* Did we come in off a post request? */ - if ( $this->request['request_method'] == 'post' ) - { - /* Set a no-expires header */ - $this->registry->getClass('output')->setCacheExpirationSeconds( 30 * 60 ); - } - - /* Sort some form elements out */ - $this->request['search_sort_by'] = ( $this->request['search_sort_by'] && $this->request['search_sort_by'] != 'date' ) ? 'relevance' : 'date'; - $this->request['search_sort_order'] = ( $this->request['search_sort_order'] && $this->request['search_sort_order'] != 'desc' ) ? 'asc' : 'desc'; - - /* Check for disallowed search terms */ - while( preg_match_all( "/(?:^|\s+)(img|quote|code|html|javascript|a href|color|span|div|border|style)(?:\s+|$)/", $search_term, $removed_search_terms ) ) - { - $removedTerms[] = $removed_search_terms[0][0]; - $search_term = preg_replace( "/(?:^|\s+)(?:img|quote|code|html|javascript|a href|color|span|div|border|style)(?:\s+|$)/", '', $search_term ); - } - - /* Remove some formatting */ - //$search_term = str_replace( array( '|', '\\', '/' ), '', $search_term ); - // | is an OR operator for sphinx - don't want to block globally - $search_term = str_replace( array( '\\', '/' ), '', $search_term ); - - if( ( $this->settings['min_search_word'] && strlen( $search_term ) < $this->settings['min_search_word'] ) && ! $this->request['search_author'] ) - { - $this->searchAdvancedForm( sprintf( $this->lang->words['search_term_short'], $this->settings['min_search_word'] ), $removedTerms ); - return; - } - - /* Save date for the form */ - $this->request['_search_date_start'] = $this->request['search_date_start']; - $this->request['_search_date_end'] = $this->request['search_date_end']; - - /* Default End Date */ - if( $this->request['search_date_start'] && ! $this->request['search_date_end'] ) - { - $this->request['search_date_end'] = 'now'; - } - - /* Do some date checking */ - if( strtotime( IPSText::monthNameRu2En($this->request['search_date_start']) ) > strtotime( IPSText::monthNameRu2En($this->request['search_date_end']) ) ) - { - $this->searchAdvancedForm( $this->lang->words['search_invalid_date_range'] ); - return; - } - - /*if( strtotime( $this->request['search_date_start'] ) > time() || strtotime( $this->request['search_date_end'] ) > time() ) - { - $this->searchAdvancedForm( $this->lang->words['search_invalid_date_future'] ); - return; - }*/ - - if( strtotime( IPSText::monthNameRu2En( $this->request['search_date_start'] ) ) > time() ) - { - $this->request['search_date_start'] = 'now'; - } - - if( strtotime( IPSText::monthNameRu2En( $this->request['search_date_end'] ) ) > time() ) - { - $this->request['search_date_end'] = 'now'; - } - - /* Cleanup */ - $this->request['search_higlight'] = str_replace( '.', '', $this->request['search_term'] ); - - /* Search Flood Check */ - if( $this->memberData['g_search_flood'] ) - { - /* Check for a cookie */ - $last_search = IPSCookie::get( 'sfc' ); - $last_term = str_replace( """, '"', IPSCookie::get( 'sfct' ) ); - $last_term = str_replace( "&", '&', $last_term ); - - /* If we have a last search time, check it */ - if( $last_search && $last_term ) - { - if( ( time() - $last_search ) <= $this->memberData['g_search_flood'] && $last_term != $search_term ) - { - $this->searchAdvancedForm( sprintf( $this->lang->words['xml_flood'], $this->memberData['g_search_flood'] ) ); - return; - } - else - { - /* Reset the cookie */ - IPSCookie::set( 'sfc', time() ); - IPSCookie::set( 'sfct', $search_term ); - } - } - /* Set the cookie */ - else - { - IPSCookie::set( 'sfc', time() ); - IPSCookie::set( 'sfct', $search_term ); - } - } - - /** - * Ok this is an upper limit. - * If you needed to change this, you could do so via conf_global.php by adding: - * $INFO['max_search_word'] = #####; - */ - $this->settings['max_search_word'] = $this->settings['max_search_word'] ? $this->settings['max_search_word'] : 300; - - if( $this->settings['max_search_word'] && strlen( $search_term ) > $this->settings['max_search_word'] ) - { - $this->searchAdvancedForm( sprintf( $this->lang->words['search_term_long'], $this->settings['max_search_word'] ) ); - return; - } - - /* Search titles only? */ - $content_titles_only = isset( $this->request['content_title_only'] ) && $this->request['content_title_only'] ? true : false; - - /* Show as titles? */ - if( ( $this->request['show_as_titles'] AND $this->settings['enable_show_as_titles'] ) OR ( $content_titles_only ) ) - { - $this->search_plugin->onlyTitles = true; - } - - /* Check for application restriction */ - $search_app_filter = array(); - $traditionalkey = ''; - - if( isset( $this->request['search_filter_app'] ) && is_array( $this->request['search_filter_app'] ) ) - { - if( ! in_array( $this->settings['search_method'], array( 'traditional', 'sphinx' ) ) ) - { - /* Bypass all this if we are searching all apps */ - if( $this->request['search_filter_app']['all'] != 1 ) - { - foreach( $this->request['search_filter_app'] as $app => $checked ) - { - /* Bypass the all filter */ - if( $app == 'all' ) - { - continue; - } - - /* Add to the array */ - if( $checked ) - { - $search_app_filter[] = "'$app'"; - } - } - - /* Add this condition to the search */ - $this->search_plugin->setCondition( 'app', 'IN', implode( ',', $search_app_filter ) ); - } - } - else - { - foreach( $this->request['search_filter_app'] as $app => $checked ) - { - $traditionalKey = $app; - } - } - } - - /* Check for an author filter */ - if( isset( $this->request['search_author'] ) && $this->request['search_author'] ) - { - /* Query the member id */ - $mem = $this->DB->buildAndFetch( array( - 'select' => 'member_id', - 'from' => 'members', - 'where' => "members_display_name='{$this->request['search_author']}'" - ) ); - - $this->search_plugin->searchAuthor = true; - - /* Add the condition to our search */ - $this->search_plugin->setCondition( 'member_id', '=', $mem['member_id'] ? $mem['member_id'] : -1 ); - } - - /* Check for application specific filters */ - if( isset( $this->request['search_app_filters'] ) && is_array( $this->request['search_app_filters'] ) ) - { - foreach( $this->request['search_app_filters'] as $app => $filter_data ) - { - if( ! isset( $this->search_plugin->display_plugins[ $app ] ) ) - { - $this->search_plugin->display_plugins[ $app ] = IPSSearchIndex::getSearchDisplayPlugin( $app ); - $this->search_plugin->display_plugins[ $app ]->search_plugin = $this->search_plugin; - } - - $filter_data = $this->search_plugin->display_plugins[ $app ]->buildFilterSQL( $filter_data ); - - if( $filter_data ) - { - if ( isset( $filter_data[0] ) ) - { - foreach( $filter_data as $_data ) - { - $this->search_plugin->setCondition( $_data['column'], $_data['operator'], $_data['value'], 'AND' ); - } - } - else - { - $this->search_plugin->setCondition( $filter_data['column'], $filter_data['operator'], $filter_data['value'], 'OR' ); - } - } - } - } - - /* Check Date Range */ - if( isset( $this->request['search_date_start'] ) && $this->request['search_date_start'] || isset( $this->request['search_date_end'] ) && $this->request['search_date_end'] ) - { - /* Start Range Date */ - $search_date_start = 0; - - if( $this->request['search_date_start'] ) - { - $search_date_start = strtotime( IPSText::monthNameRu2En( $this->request['search_date_start'] ) ); - } - - /* End Range Date */ - $search_date_end = 0; - - if( $this->request['search_date_end'] ) - { - $search_date_end = strtotime( IPSText::monthNameRu2En( $this->request['search_date_end'] ) ); - } - - /* Correct for timezone...hopefully */ - $search_date_start += abs( $this->registry->class_localization->getTimeOffset() ); - $search_date_end += abs( $this->registry->class_localization->getTimeOffset() ); - - /* If the times are exactly equaly, we're going to assume they are trying to search all posts from one day */ - if( ( $search_date_start && $search_date_end ) && $search_date_start == $search_date_end ) - { - $search_date_end += 86400; - } - - $this->search_plugin->setDateRange( $search_date_start, $search_date_end ); - } - - /* If we're display results as a forum*/ - /* Count the number of results */ - $total_results = $this->search_plugin->getSearchCount( $search_term, '', $content_titles_only, array( $st, $per_page ), $this->request['search_sort_by'], $this->request['search_sort_order'] ); - - /* Do Pagination Stuff */ - $st = isset( $this->request['st'] ) ? intval( $this->request['st'] ) : 0; - $per_page = $this->settings['search_per_page'] ? $this->settings['search_per_page'] : 25; - - $links = $this->registry->output->generatePagination( array( - 'totalItems' => $total_results, - 'itemsPerPage' => $per_page, - 'currentStartValue' => $st, - 'baseUrl' => $this->_buildURLString() . '&search_filter_app[' . $traditionalKey . ']=1', - ) ); - - /* Showing */ - $showing = array( 'start' => $st + 1, 'end' => ( $st + $per_page ) > $total_results ? $total_results : $st + $per_page ); - - /* Loop through the search results and build the output */ - $search_entries = array(); - $search_results = array(); - $topic_ids = array(); - - /** - * If we've already run a search and it's not clear, kill it now - */ - if( $this->member->sessionClass()->session_data['search_thread_id'] ) - { - $this->DB->return_die = true; - $this->DB->kill( $this->member->sessionClass()->session_data['search_thread_id'] ); - $this->DB->return_die = false; - } - - /** - * Store the process id - */ - $processId = $this->DB->getThreadId(); - - if( $processId ) - { - $this->DB->update( 'sessions', array( 'search_thread_id' => $processId, 'search_thread_time' => time() ), "id='" . $this->member->session_id . "'" ); - } - - /* Do the search */ - foreach( $this->search_plugin->getSearchResults( $search_term, array( $st, $per_page ), $this->request['search_sort_by'], '', $content_titles_only, $this->request['search_sort_order'] ) as $r ) - { - /* Hack Job */ - if( $r['app'] == 'forums' && $r['type_2'] == 'topic' && $r['type_id_2'] ) - { - $topic_ids[] = $r['type_id_2']; - } - - /* Add to the entries array */ - $search_entries[] = $r; - } - - /** - * And kill that process ID - */ - if( $processId ) - { - $this->DB->update( 'sessions', array( 'search_thread_id' => 0, 'search_thread_time' => 0 ), "id='" . $this->member->session_id . "'" ); - } - - /* Get dots */ - $this->_retrieveTopics( $topic_ids ); - - /* Parse results */ - foreach( $search_entries as $r ) - { - $search_results[] = $this->_parseSearchResult( $r, $search_term ); - } - - /* Extra vars */ - $limited = ( isset( $this->search_plugin->hardLimit ) ) ? $this->search_plugin->hardLimit : 0; - $wasLimited = ( isset( $this->search_plugin->resultsCutToLimit ) ) ? $this->search_plugin->resultsCutToLimit : false; - - /* Output */ - $this->title = $this->lang->words['search_results']; - $this->output .= $this->registry->output->getTemplate( 'search' )->searchResults( $search_results, $links, $total_results, $showing, $search_term, $this->_buildURLString(), $traditionalKey, $removed_search_terms[0], $asForum, $limited, $wasLimited ); - } - - /** - * Displays the active topics screen - * - * @access public - * @return void - */ - public function activeContent() - { - $this->search_plugin->onlyTitles = true; - - /* Check for application restriction */ - $search_app_filter = array(); - - if( isset( $this->request['search_filter_app'] ) && is_array( $this->request['search_filter_app'] ) ) - { - if( ! in_array( $this->settings['search_method'], array( 'traditional', 'sphinx' ) ) ) - { - /* Bypass all this if we are searching all apps */ - if( $this->request['search_filter_app']['all'] != 1 ) - { - foreach( $this->request['search_filter_app'] as $app => $checked ) - { - /* Bypass the all filter */ - if( $app == 'all' ) - { - continue; - } - - /* Add to the array */ - if( $checked ) - { - $search_app_filter[] = "'$app'"; - } - } - - /* Add this condition to the search */ - $this->search_plugin->setCondition( 'app', 'IN', implode( ',', $search_app_filter ) ); - } - } - } - - /* Exclude forums */ - if( $this->settings['vnp_block_forums'] ) - { - if( $this->request['search_app'] == 'forums' ) - { - $this->search_plugin->setCondition( 't.forum_id', 'NOT IN', $this->settings['vnp_block_forums'] ); - } - } - - /* Do we have a period? */ - switch( $this->request['period'] ) - { - case 'today': - default: - $date = 86400; // 24 hours - - $this->request['period'] = empty($this->request['period']) ? 'today' : $this->request['period']; - break; - - case 'week': - $date = 604800; // 1 week - break; - - case 'weeks': - $date = 1209600; // 2 weeks - break; - - case 'month': - $date = 2592000; // 30 days - break; - - case 'months': - $date = 15552000; // 6 months - break; - - case 'year': - $date = 31536000; // 365 days - break; - } - - /* Set Date Range */ - $this->search_plugin->setDateRange( time() - $date, time() ); - - /* Count the number of results */ - $total_results = $this->search_plugin->getSearchCount( '', '', true ); - - /* Do Pagination Stuff */ - $st = isset( $this->request['st'] ) ? intval( $this->request['st'] ) : 0; - $per_page = $this->settings['search_per_page'] ? $this->settings['search_per_page'] : 25; - - /* Add in application filter url bit */ - $urlbit = ''; - - if( isset( $this->request['search_filter_app'] ) && is_array( $this->request['search_filter_app'] ) && count( $this->request['search_filter_app'] ) ) - { - foreach( $this->request['search_filter_app'] as $app => $checked ) - { - $urlbit .= "&search_filter_app[{$app}]={$checked}"; - } - } - - $urlbit .= "&period={$this->request['period']}"; - - $links = $this->registry->output->generatePagination( array( - 'totalItems' => $total_results, - 'itemsPerPage' => $per_page, - 'currentStartValue' => $st, - 'baseUrl' => 'app=core&module=search&do=active' . $urlbit, - ) ); - - /* Showing */ - $showing = array( 'start' => $st + 1, 'end' => ( $st + $per_page ) > $total_results ? $total_results : $st + $per_page ); - - /* Loop through the search results and build the output */ - $search_entries = array(); - $search_results = array(); - $topic_ids = array(); - - foreach( $this->search_plugin->getSearchResults( '', array( $st, $per_page ), 'date', '', true ) as $r ) - { - /* Hack Job */ - if( $r['app'] == 'forums' && $r['type_2'] == 'topic' ) - { - $topic_ids[] = $r['type_id_2']; - } - - /* Add to the entries array */ - $search_entries[] = $r; - } - - /* Get dots */ - $this->_retrieveTopics( $topic_ids ); - - /* Parse results */ - foreach( $search_entries as $r ) - { - $search_results[] = $this->_parseSearchResult( $r ); - } - - /* Output */ - $this->title = $this->lang->words['active_posts_title']; - $this->registry->output->addNavigation( $this->lang->words['active_posts_title'], '' ); - $this->output .= $this->registry->output->getTemplate( 'search' )->activePostsView( $search_results, $links, $total_results, ( method_exists( $this->search_plugin, 'getShowAsForum' ) ) ? $this->_getShowAsForum() : false ); - } - - /** - * Displays latest user content - * - * @access public - * @return void - */ - public function viewUserContent() - { - /* INIT */ - $id = intval( $this->request['mid'] ); - $member = IPSMember::load( $id, 'core' ); - $beginStamp = 0; - - /* Content Title Only? */ - $this->search_plugin->onlyTitles = $this->request['view_by_title'] == 1 ? true : false; - - /* Set flag for viewing author content */ - $this->search_plugin->searchAuthor = true; - - /* Set the member_id */ - $this->search_plugin->setCondition( 'member_id', '=', $id ); - - /* Check for application restriction */ - $search_app_filter = array(); - - if( isset( $this->request['search_filter_app'] ) && is_array( $this->request['search_filter_app'] ) ) - { - if( ! in_array( $this->settings['search_method'], array( 'traditional', 'sphinx' ) ) ) - { - /* Bypass all this if we are searching all apps */ - if( $this->request['search_filter_app']['all'] != 1 ) - { - foreach( $this->request['search_filter_app'] as $app => $checked ) - { - /* Bypass the all filter */ - if( $app == 'all' ) - { - continue; - } - - /* Add to the array */ - if( $checked ) - { - $search_app_filter[] = "'$app'"; - } - } - - /* Add this condition to the search */ - $this->search_plugin->setCondition( 'app', 'IN', implode( ',', $search_app_filter ) ); - } - } - } - - /* Cut by date for efficiency? */ - if ( $this->settings['search_ucontent_days'] AND method_exists( $this->search_plugin, 'setBeginTimeStamp' ) ) - { - $this->search_plugin->setBeginTimeStamp( ( $member['last_post'] ? $member['last_post'] : time() ) - 86400 * intval( $this->settings['search_ucontent_days'] ) ); - - if ( method_exists( $this->search_plugin, 'getBeginTimeStamp' ) ) - { - $beginStamp = $this->search_plugin->getBeginTimeStamp(); - } - } - - /* Count the number of results */ - $total_results = $this->search_plugin->getSearchCount( '', '', $this->search_plugin->onlyTitles ); - - /* Do Pagination Stuff */ - $st = isset( $this->request['st'] ) ? intval( $this->request['st'] ) : 0; - $per_page = $this->settings['search_per_page'] ? $this->settings['search_per_page'] : 25; - - /* Add in application filter url bit */ - $urlbit = ''; - if( isset( $this->request['search_filter_app'] ) && is_array( $this->request['search_filter_app'] ) && count( $this->request['search_filter_app'] ) ) - { - foreach( $this->request['search_filter_app'] as $app => $checked ) - { - $urlbit .= "&search_filter_app[{$app}]={$checked}"; - } - } - if( $this->request['view_by_title'] == 1 ) - { - $urlbit .= '&view_by_title=1'; - } - - $links = $this->registry->output->generatePagination( array( - 'totalItems' => $total_results, - 'itemsPerPage' => $per_page, - 'currentStartValue' => $st, - 'baseUrl' => 'app=core&module=search&do=user_posts&mid=' . $id . $urlbit, - ) ); - - /* Showing */ - $showing = array( 'start' => $st + 1, 'end' => ( $st + $per_page ) > $total_results ? $total_results : $st + $per_page ); - - /* Loop through the search results and build the output */ - $search_entries = array(); - $search_results = array(); - $topic_ids = array(); - - foreach( $this->search_plugin->getSearchResults( '', array( $st, $per_page ), 'date', '', $this->search_plugin->onlyTitles ) as $r ) - { - /* Hack Job */ - if( $r['app'] == 'forums' && $r['type_2'] == 'topic' ) - { - $topic_ids[] = $r['type_id_2']; - } - - /* Add to the entries array */ - $search_entries[] = $r; - } - - /* Get dots */ - $this->_retrieveTopics( $topic_ids ); - - /* Parse results */ - foreach( $search_entries as $r ) - { - $search_results[] = $this->_parseSearchResult( $r ); - } - - /* Extra vars */ - $limited = ( isset( $this->search_plugin->hardLimit ) ) ? $this->search_plugin->hardLimit : 0; - $wasLimited = ( isset( $this->search_plugin->resultsCutToLimit ) ) ? $this->search_plugin->resultsCutToLimit : false; - - /* Output */ - $this->lang->words['user_posts_title'] = sprintf( $this->lang->words['user_posts_title'] , ( ($this->request['view_by_title'] && $this->request['search_app'] == 'forums') ? $this->lang->words['user_posts_title_topics'] : $this->lang->words['user_posts_title_posts'] ), $member['members_display_name'] ); - - $this->title = $this->lang->words['user_posts_title']; - $this->registry->output->addNavigation( $this->lang->words['user_posts_title'], '' ); - $this->output .= $this->registry->output->getTemplate( 'search' )->userPostsView( $search_results, $links, $total_results, $member, ( method_exists( $this->search_plugin, 'getShowAsForum' ) ) ? $this->_getShowAsForum() : false, $limited, $wasLimited, $beginStamp ); - } - - /** - * View new posts since your last visit - * - * @access public - * @return void - */ - public function viewNewPosts() - { - $this->search_plugin->onlyTitles = true; - $_METHOD = ( method_exists( $this->search_plugin, 'viewNewPosts_count' ) && method_exists( $this->search_plugin, 'viewNewPosts_fetch' ) ) ? 'custom' : 'standard'; - $asForum = ( method_exists( $this->search_plugin, 'getShowAsForum' ) ) ? $this->_getShowAsForum() : false; - - /* Do we have a manual method? */ - if ( $_METHOD == 'custom' ) - { - $total_results = $this->search_plugin->viewNewPosts_count(); - } - else - { - /* Call the unread items function */ - $this->search_plugin->setUnreadConditions(); - - /* Check for application restriction */ - $search_app_filter = array(); - - if( isset( $this->request['search_filter_app'] ) && is_array( $this->request['search_filter_app'] ) ) - { - if( ! in_array( $this->settings['search_method'], array( 'traditional', 'sphinx' ) ) ) - { - /* Bypass all this if we are searching all apps */ - if( $this->request['search_filter_app']['all'] != 1 ) - { - foreach( $this->request['search_filter_app'] as $app => $checked ) - { - /* Bypass the all filter */ - if( $app == 'all' ) - { - continue; - } - - /* Add to the array */ - if( $checked ) - { - $search_app_filter[] = "'$app'"; - } - } - - /* Add this condition to the search */ - $this->search_plugin->setCondition( 'app', 'IN', implode( ',', $search_app_filter ) ); - } - } - } - - /* Exclude forums */ - if( $this->settings['vnp_block_forums'] ) - { - if( $this->request['search_app'] == 'forums' ) - { - $this->search_plugin->setCondition( 't.forum_id', 'NOT IN', $this->settings['vnp_block_forums'] ); - } - } - - /* Only Titles */ - //$this->search_plugin->setCondition( 'content_title', '<>', "''" ); - $group_by = ''; - - if( $this->request['search_app'] == 'forums' ) - { - $group_by = 'topic_id'; - } - - if( !$this->search_plugin->removeMe ) - { - /* Count the number of results */ - $total_results = $this->search_plugin->getSearchCount( '', '', true ); - } - else - { - $total_results = 0; - } - } - - /* Do Pagination Stuff */ - $st = isset( $this->request['st'] ) ? intval( $this->request['st'] ) : 0; - $per_page = $this->settings['search_per_page'] ? $this->settings['search_per_page'] : 25; - - /* Add in application filter url bit */ - $urlbit = ''; - if( isset( $this->request['search_filter_app'] ) && is_array( $this->request['search_filter_app'] ) && count( $this->request['search_filter_app'] ) ) - { - foreach( $this->request['search_filter_app'] as $app => $checked ) - { - $urlbit .= "&search_filter_app[{$app}]={$checked}"; - } - } - - $links = $this->registry->output->generatePagination( array( - 'totalItems' => $total_results, - 'itemsPerPage' => $per_page, - 'currentStartValue' => $st, - 'baseUrl' => 'app=core&module=search&do=new_posts' . $urlbit, - ) ); - - /* Showing */ - $showing = array( 'start' => $st + 1, 'end' => ( $st + $per_page ) > $total_results ? $total_results : $st + $per_page ); - - /* Loop through the search results and build the output */ - $search_entries = array(); - $search_results = array(); - $topic_ids = array(); - - /* Do we have a manual method? */ - if ( $_METHOD == 'custom' ) - { - $search_entries = $this->search_plugin->viewNewPosts_fetch( array( $st, $per_page ) ); - - foreach( $search_entries as $data ) - { - $topic_ids[] = $data['tid']; - } - - } - else - { - if( !$this->search_plugin->removeMe ) - { - foreach( $this->search_plugin->getSearchResults( '', array( $st, $per_page ), 'date', '', true ) as $r ) - { - /* Hack Job */ - if( $r['app'] == 'forums' && $r['type_2'] == 'topic' ) - { - $topic_ids[] = $r['type_id_2']; - } - - /* Add to the entries array */ - $search_entries[] = $r; - } - } - } - - /* Get dots */ - $this->_retrieveTopics( $topic_ids ); - - /* Parse results */ - foreach( $search_entries as $r ) - { - $search_results[] = $this->_parseSearchResult( $r, '', true ); - } - - /* Output */ - $this->title = $this->lang->words['new_posts_title']; - $this->registry->output->addNavigation( $this->lang->words['new_posts_title'], '' ); - $this->output .= $this->registry->output->getTemplate( 'search' )->newPostsView( $search_results, $links, $total_results, $asForum ); - } - - /** - * Retrieve the topic array - * - * @access private - * @param array Topic ids - * @return void - */ - private function _retrieveTopics( $ids ) - { - /* Query posts - this is so the stupid "you have posted" dot shows up on topic icons */ - $this->_topicArray = array(); - - if( ! $this->settings['show_user_posted'] ) - { - return; - } - - if( count( $ids ) ) - { - $this->DB->build( array( - 'select' => 'author_id, topic_id', - 'from' => 'posts', - 'where' => 'author_id=' . $this->memberData['member_id'] . ' AND topic_id IN(' . implode( ',', $ids ) . ')', - ) ); - - $this->DB->execute(); - - while( $p = $this->DB->fetch() ) - { - $this->_topicArray[ $p['topic_id'] ] = $p['author_id']; - } - } - } - - /** - * Parse a common search result - * - * @access private - * @param array $r Search result - * @param string $search_term Keywords searched for - * @param bool $isVnc Is from view new content - * @return array $search_result Search result for template - */ - private function _parseSearchResult( $r, $search_term='', $isVnc=false ) - { - /* Forum stuff */ - $sub = false; - $r['_topic_array'] = $this->_topicArray; - - /* If basic search, strip the content */ - IPSText::getTextClass( 'bbcode' )->parse_wordwrap = 0; - IPSText::getTextClass( 'bbcode' )->parse_bbcode = 0; - IPSText::getTextClass( 'bbcode' )->strip_quotes = 1; - IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics'; - IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $r['member_group_id']; - IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $r['mgroup_others']; - - $r['content'] = strip_tags( IPSText::getTextClass( 'bbcode' )->stripAllTags( $r['content'] ) ); - $r['content'] = str_replace( array( '<br>', '<br />' ), '', $r['content'] ); - $r['content'] = trim( str_replace( array( "\n\n\n", "\n\n" ), "\n", str_replace( "\r", '', $r['content'] ) ) ); - - /* Highlight */ - $r['content'] = IPSText::searchHighlight( $this->_searchTruncate( $r['content'], $search_term ), $search_term ); - $r['content_title'] = ( ! $this->search_plugin->onlyPosts AND $this->_getShowAsForum() === false ) ? IPSText::searchHighlight( $r['content_title'], $search_term ) : $r['content_title']; - - /* Check to see if the display plugin is loaded */ - if( ! isset( $this->search_plugin->display_plugins[ $r['app'] ] ) ) - { - $this->search_plugin->display_plugins[ $r['app'] ] = IPSSearchIndex::getSearchDisplayPlugin( $r['app'] ); - $this->search_plugin->display_plugins[ $r['app'] ]->search_plugin = $this->search_plugin; - } - - /* Return the formatted result */ - if( isset( $this->search_plugin->display_plugins[ $r['app'] ] ) && is_object( $this->search_plugin->display_plugins[ $r['app'] ] ) ) - { - $return = $this->search_plugin->display_plugins[ $r['app'] ]->formatContent( $r, $isVnc ); - - if( is_array( $return ) ) - { - $html = $return[0]; - $sub = $return[1]; - } - else - { - $html = $return; - } - } - else - { - $html = $this->registry->output->getTemplate( 'search' )->searchRowGenericFormat( $r ); - } - - return array( 'html' => $html, 'app' => $r['app'], 'type' => $r['type'], 'sub' => $sub ); - } - - /** - * Function to trim the search result display around the the hit - * - * @access private - * @param string $haystack Full search result - * @param string $needle The search term - * @return string - **/ - private function _searchTruncate( $haystack, $needle ) - { - /* Base on words */ - $haystack = explode( " ", $haystack ); - - if( count( $haystack ) > 21 ) - { - $_term_at = $this->searchInArray( $needle, $haystack ); - - if( $_term_at - 11 > 0 ) - { - $begin = array_splice( $haystack, 0, $_term_at - 11 ); - - /* The term position will have changed now */ - $_term_at = $this->searchInArray( $needle, $haystack ); - } - - if( $_term_at + 11 < count( $haystack ) ) - { - $end = array_splice( $haystack, $_term_at + 11, count( $haystack ) ); - } - } - else - { - $begin = array(); - $end = array(); - } - - $haystack = implode( " ", $haystack ); - - if( is_array( $begin ) && count( $begin ) ) - { - $haystack = '...' . $haystack; - } - - if( is_array( $end ) && count( $end ) ) - { - $haystack = $haystack . '...'; - } - - return $haystack; - } - - /** - * Search array (array_search only finds exact instances) - * - * @access protected - * @param string "Needle" - * @param array Array of entries to search - * @return mixed Key of array, or false on failure - */ - protected function searchInArray( $needle, $haystack ) - { - if( !is_array( $haystack ) OR !count($haystack) OR ! $needle ) - { - return false; - } - - foreach( $haystack as $k => $v ) - { - if( $v AND strpos( $v, $needle ) !== false ) - { - return $k; - } - } - - return false; - } - - /** - * Returns a url string that will maintain search results via links - * - * @access private - * @return string - */ - private function _buildURLString() - { - /* INI */ - $url_string = 'app=core&module=search&do=quick_search'; - - /* Add author name */ - if( isset( $this->request['search_author'] ) ) - { - $url_string .= "&search_author=" . urlencode($this->request['search_author']); - } - - /* Add titles only */ - if( isset( $this->request['show_as_titles'] ) ) - { - $url_string .= "&show_as_titles={$this->request['show_as_titles']}"; - } - - /* Search Range */ - if( isset( $this->request['search_date_start'] ) ) - { - $url_string .= "&search_date_start={$this->request['search_date_start']}"; - } - - if( isset( $this->request['search_date_end'] ) ) - { - $url_string .= "&search_date_end={$this->request['search_date_end']}"; - } - - /* Search app filters */ - if( isset( $this->request['search_app_filters'] ) && count( $this->request['search_app_filters'] ) ) - { - foreach( $this->request['search_app_filters'] as $app => $filter_data ) - { - if( is_array( $filter_data ) ) - { - foreach( $filter_data as $k => $v ) - { - if ( is_array( $v ) ) - { - foreach( $v as $_k => $_v ) - { - $url_string .= "&search_app_filters[{$app}][{$k}][$_k]={$_v}"; - } - } - else - { - $url_string .= "&search_app_filters[{$app}][{$k}]={$v}"; - } - } - } - else - { - $url_string .= "&search_app_filters[{$app}]={$v}"; - } - } - } - - /* Search sort by */ - if( isset( $this->request['search_sort_by'] ) ) - { - $url_string .= "&search_sort_by={$this->request['search_sort_by']}"; - } - - if( isset( $this->request['search_sort_order'] ) ) - { - $url_string .= "&search_sort_order={$this->request['search_sort_order']}"; - } - - /* Add in application filter */ - /*if( isset( $this->request['search_filter_app'] ) && is_array( $this->request['search_filter_app'] ) && count( $this->request['search_filter_app'] ) ) - { - foreach( $this->request['search_filter_app'] as $app => $checked ) - { - $url_string .= "&search_filter_app[{$app}]={$checked}"; - } - }*/ - - if( isset( $this->request['content_title_only'] ) && $this->request['content_title_only'] ) - { - $url_string .= "&content_title_only=1"; - } - - if( isset( $this->request['type'] ) && isset( $this->request['type_id'] ) ) - { - $url_string .= "&type={$this->request['type']}&type_id={$this->request['type_id']}"; - } - - if( isset( $this->request['type_2'] ) && isset( $this->request['type_id_2'] ) ) - { - $url_string .= "&type_2={$this->request['type_2']}&type_id_2={$this->request['type_id_2']}"; - } - - /* Fix up the search term a bit */ - $_search_term = str_replace( '&', '&', $this->request['search_term'] ); - $_search_term = str_replace( '"', '"', $_search_term ); - $_search_term = str_replace( '>', '>', $_search_term ); - $_search_term = str_replace( '<', '<', $_search_term ); - $_search_term = str_replace( '$', '$', $_search_term ); - - $url_string .= '&search_term=' . urlencode( $_search_term ); - - return $url_string; - } - - /** - * Checks to see if the logged in user is allowed to use the search system - * - * @access private - * @return void - */ - private function _canSearch() - { - /* Check the search setting */ - if( ! $this->settings['allow_search'] ) - { - if( $this->xml_out ) - { - @header( "Content-type: text/html;charset={$this->settings['gb_char_set']}" ); - print $this->lang->words['search_off']; - exit(); - } - else - { - $this->registry->output->showError( 'search_off', 10145 ); - } - } - - /* Check the member authorization */ - if( ! isset( $this->memberData['g_use_search'] ) || ! $this->memberData['g_use_search'] ) - { - if( $this->xml_out ) - { - @header( "Content-type: text/html;charset={$this->settings['gb_char_set']}" ); - print $this->lang->words['no_xml_permission']; - exit(); - } - else - { - $this->registry->output->showError( 'no_permission_to_search', 10146 ); - } - } - } - - /** - * Wrapper function to prevent fatal errors if method does not support this function - * - * @access private - * @return boolean - */ - private function _getShowAsForum() - { - if ( method_exists( $this->search_plugin, 'getShowAsForum' ) ) - { - return $this->search_plugin->getShowAsForum(); - } - else - { - return false; - } - } + + * Invision Power Services + * IP.Board v3.1.4 + * Global Search + * Last Updated: $Date: 2010-11-17 03:11:07 -0500 (Wed, 17 Nov 2010) $ + * + * + * @author $Author: mmecham $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 7200 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_core_search_search extends ipsCommand +{ + /** + * Generated output + * + * @var string + */ + private $output = ''; + + /** + * Page Title + * + * @var string + */ + private $title = ''; + + /** + * Object to handle searches + * + * @var string + */ + private $search_plugin = ''; + + /** + * Topics array + * + * @var array + */ + private $_topicArray = array(); + private $_removedTerms = array(); + + /** + * Search controller + * + * @var obj + */ + private $searchController; + private $_session; + + /** + * Class entry point + * + * @param object Registry reference + * @return void [Outputs to screen/redirects] + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load language */ + $this->registry->class_localization->loadLanguageFile( array( 'public_search' ), 'core' ); + $this->registry->class_localization->loadLanguageFile( array( 'public_forums', 'public_topic' ), 'forums' ); + + /* Reset engine type */ + $this->settings['search_method'] = ( $this->settings['search_method'] == 'traditional' ) ? 'sql' : $this->settings['search_method']; + + /* Special consideration for contextual search */ + if ( isset( $this->request['search_app'] ) AND strstr( $this->request['search_app'], ':' ) ) + { + list( $app, $type, $id ) = explode( ':', $this->request['search_app'] ); + + $this->request['search_app'] = $app; + $this->request['cType'] = $type; + $this->request['cId'] = $id; + } + else + { + /* Force forums as default search */ + $this->request['search_in'] = ( $this->request['search_in'] AND IPSLib::appIsSearchable( $this->request['search_in'], 'search' ) ) ? $this->request['search_in'] : 'forums'; + $this->request['search_app'] = $this->request['search_app'] ? $this->request['search_app'] : $this->request['search_in']; + } + + /* Check Access */ + $this->_canSearch(); + + /* Start session - needs to be called before the controller is initiated */ + $this->_startSession(); + + /* Load the controller */ + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH. 'sources/classes/search/controller.php', 'IPSSearch' ); + + /* Sanitzie */ + if ( ! is_string( $this->request['search_app'] ) ) + { + $this->request['search_app'] = ''; + } + + try + { + $this->searchController = new $classToLoad( $registry, $this->settings['search_method'], $this->request['search_app'] ); + } + catch( Exception $error ) + { + $msg = $error->getMessage(); + + /* Start session */ + $this->_endSession(); + + switch( $msg ) + { + case 'NO_SUCH_ENGINE': + case 'NO_SUCH_APP': + case 'NO_SUCH_APP_ENGINE': + $this->registry->output->showError( sprintf( $this->lang->words['no_search_app'], ipsRegistry::$applications[ $this->request['search_app'] ]['app_title'] ), 10145.1 ); + break; + } + } + + /* Set up some defaults */ + IPSSearchRegistry::set('in.start', intval( $this->request['st'] ) ); + IPSSearchRegistry::set('opt.search_per_page', intval( $this->settings['search_per_page'] ) ? intval( $this->settings['search_per_page'] ) : 25 ); + + /* Contextuals */ + if ( isset( $this->request['cType'] ) ) + { + IPSSearchRegistry::set('contextual.type', $this->request['cType'] ); + IPSSearchRegistry::set('contextual.id' , $this->request['cId'] ); + } + + /* What to do */ + switch( $this->request['do'] ) + { + case 'active': + $this->activeContent(); + break; + + case 'user_activity': + $this->viewUserContent(); + break; + + case 'new_posts': + $this->viewNewPosts(); + break; + + case 'search': + case 'quick_search': + $this->searchResults(); + break; + + default: + case 'search_form': + $this->searchAdvancedForm(); + break; + } + + /* Start session */ + $this->_endSession(); + + /* If we have any HTML to print, do so... */ + $this->registry->output->setTitle( $this->title . ' - ' . ipsRegistry::$settings['board_name'] ); + $this->registry->output->addContent( $this->output ); + $this->registry->output->sendOutput(); + } + + /** + * Builds the advanced search form + * + * @param string Message + * @return void + */ + public function searchAdvancedForm( $msg='', $removed_search_terms=array() ) + { + /* Set up data */ + IPSSearchRegistry::set('view.search_form', true ); + + /* Get any application specific filters */ + $appHtml = $this->searchController->getHtml(); + $isBoolean = $this->searchController->isBoolean(); + + /* Output */ + $this->title = $this->lang->words['search_form']; + $this->registry->output->addNavigation( $this->lang->words['search_form'], '' ); + $this->output .= $this->registry->output->getTemplate( 'search' )->searchAdvancedForm( $appHtml, $msg, $this->request['search_app'], $removed_search_terms, $isBoolean ); + } + + /** + * Processes a search request + * + * @return void + */ + public function searchResults() + { + /* Search Term */ + $_st = $this->searchController->formatSearchTerm( $this->request['search_term'] ); + $search_term = $_st['search_term']; + $removedTerms = $_st['removed']; + + /* Set up some defaults */ + $this->settings['max_search_word'] = $this->settings['max_search_word'] ? $this->settings['max_search_word'] : 300; + + /* Did we come in off a post request? */ + if ( $this->request['request_method'] == 'post' ) + { + /* Set a no-expires header */ + $this->registry->getClass('output')->setCacheExpirationSeconds( 30 * 60 ); + } + + /* App specific */ + if ( isset( $this->request['search_sort_by_' . $this->request['search_app'] ] ) ) + { + $this->request['search_sort_by'] = ( $_POST[ 'search_sort_by_' . $this->request['search_app'] ] ) ? $_POST[ 'search_sort_by_' . $this->request['search_app'] ] : $this->request['search_sort_by_' . $this->request['search_app'] ]; + $this->request['search_sort_order'] = ( $_POST[ 'search_sort_order_' . $this->request['search_app'] ] ) ? $_POST[ 'search_sort_order_' . $this->request['search_app'] ] : $this->request['search_sort_order_' . $this->request['search_app'] ]; + } + + /* Populate the registry */ + IPSSearchRegistry::set('in.search_app' , $this->request['search_app'] ); + IPSSearchRegistry::set('in.raw_search_term' , trim( $this->request['search_term'] ) ); + IPSSearchRegistry::set('in.clean_search_term', $search_term ); + IPSSearchRegistry::set('in.search_higlight' , str_replace( '.', '', $this->request['search_term'] ) ); + IPSSearchRegistry::set('in.search_date_end' , ( $this->request['search_date_start'] && $this->request['search_date_end'] ) ? $this->request['search_date_end'] : 'now' ); + IPSSearchRegistry::set('in.search_date_start', ( $this->request['search_date_start'] ) ? $this->request['search_date_start'] : '' ); + IPSSearchRegistry::set('in.search_author' , ( isset( $this->request['search_author'] ) && $this->request['search_author'] ) ? $this->request['search_author'] : '' ); + + /* Set sort filters */ + $this->_setSortFilters(); + + /* These can be overridden in the actual engine scripts */ + // IPSSearchRegistry::set('set.hardLimit' , 0 ); + IPSSearchRegistry::set('set.resultsCutToLimit', false ); + IPSSearchRegistry::set('set.resultsAsForum' , false ); + + /* Are we option to show titles only / search in titles only */ + IPSSearchRegistry::set('opt.searchTitleOnly', ( isset( $this->request['content_title_only'] ) && $this->request['content_title_only'] ) ? true : false ); + IPSSearchRegistry::set('display.onlyTitles' , ( ( $this->request['show_as_titles'] AND $this->settings['enable_show_as_titles'] ) OR ( IPSSearchRegistry::get('opt.searchTitleOnly') ) ) ? true : false ); + + /* Time check */ + if ( IPSSearchRegistry::get('in.search_date_start') AND strtotime( IPSText::monthNameRu2En(IPSSearchRegistry::get('in.search_date_start')) ) > time() ) + { + IPSSearchRegistry::set('in.search_date_start', 'now' ); + } + + if ( IPSSearchRegistry::get('in.search_date_end') AND strtotime( IPSText::monthNameRu2En(IPSSearchRegistry::get('in.search_date_end')) ) > time() ) + { + IPSSearchRegistry::set('in.search_date_end', 'now' ); + } + + /* Do some date checking */ + if( IPSSearchRegistry::get('in.search_date_end') AND IPSSearchRegistry::get('in.search_date_start') AND strtotime( IPSText::monthNameRu2En(IPSSearchRegistry::get('in.search_date_start')) ) > strtotime( IPSText::monthNameRu2En(IPSSearchRegistry::get('in.search_date_end')) ) ) + { + $this->searchAdvancedForm( $this->lang->words['search_invalid_date_range'] ); + return; + } + + /** + * Ok this is an upper limit. + * If you needed to change this, you could do so via conf_global.php by adding: + * $INFO['max_search_word'] = #####; + */ + if ( $this->settings['min_search_word'] && ! IPSSearchRegistry::get('in.search_author') ) + { + $_words = explode( ' ', IPSSearchRegistry::get('in.raw_search_term') ); + $_ok = true; + + foreach( $_words as $_word ) + { + if( strlen( $_word ) < $this->settings['min_search_word'] ) + { + $_ok = false; + break; + } + } + + if( !$_ok ) + { + $this->searchAdvancedForm( sprintf( $this->lang->words['search_term_short'], $this->settings['min_search_word'] ), $removedTerms ); + return; + } + } + + if ( $this->settings['max_search_word'] && strlen( IPSSearchRegistry::get('in.raw_search_term') ) > $this->settings['max_search_word'] ) + { + $this->searchAdvancedForm( sprintf( $this->lang->words['search_term_long'], $this->settings['max_search_word'] ) ); + return; + } + + /* Search Flood Check */ + if( $this->memberData['g_search_flood'] ) + { + /* Check for a cookie */ + $last_search = IPSCookie::get( 'sfc' ); + $last_term = str_replace( """, '"', IPSCookie::get( 'sfct' ) ); + $last_term = str_replace( "&", '&', $last_term ); + + /* If we have a last search time, check it */ + if( $last_search && $last_term ) + { + if( ( time() - $last_search ) <= $this->memberData['g_search_flood'] && $last_term != IPSSearchRegistry::get('in.raw_search_term') ) + { + $this->searchAdvancedForm( sprintf( $this->lang->words['xml_flood'], $this->memberData['g_search_flood'] ) ); + return; + } + else + { + /* Reset the cookie */ + IPSCookie::set( 'sfc', time() ); + IPSCookie::set( 'sfct', urlencode( IPSSearchRegistry::get('in.raw_search_term') ) ); + } + } + /* Set the cookie */ + else + { + IPSCookie::set( 'sfc', time() ); + IPSCookie::set( 'sfct', urlencode( IPSSearchRegistry::get('in.raw_search_term') ) ); + } + } + + /* Clean search term for results view */ + $_search_term = trim( preg_replace( "#(^|\s)(\+|\-|\||\~)#", " ", $search_term ) ); + + /* Can we do this? */ + if ( IPSLib::appisSearchable( IPSSearchRegistry::get('in.search_app'), 'search' ) ) + { + /* Perform the search */ + $this->searchController->search(); + + /* Get count */ + $count = $this->searchController->getResultCount(); + + /* Get results which will be array of IDs */ + $results = $this->searchController->getResultSet(); + + /* Get templates to use */ + $template = $this->searchController->fetchTemplates(); + + /* Fetch sort details */ + $sortDropDown = $this->searchController->fetchSortDropDown(); + + /* Fetch sort details */ + $sortIn = $this->searchController->fetchSortIn(); + + /* Build pagination */ + $links = $this->registry->output->generatePagination( array( 'totalItems' => $count, + 'itemsPerPage' => IPSSearchRegistry::get('opt.search_per_page'), + 'currentStartValue' => IPSSearchRegistry::get('in.start'), + 'baseUrl' => $this->_buildURLString() . '&search_app=' . IPSSearchRegistry::get('in.search_app') . '' ) ); + + /* Showing */ + $showing = array( 'start' => IPSSearchRegistry::get('in.start') + 1, 'end' => ( IPSSearchRegistry::get('in.start') + IPSSearchRegistry::get('opt.search_per_page') ) > $count ? $count : IPSSearchRegistry::get('in.start') + IPSSearchRegistry::get('opt.search_per_page') ); + + /* Parse result set */ + $results = $this->registry->output->getTemplate( $template['group'] )->$template['template']( $results, ( IPSSearchRegistry::get('display.onlyTitles') || IPSSearchRegistry::get( 'opt.noPostPreview') ) ? 1 : 0 ); + } + else + { + $count = 0; + $results = array(); + } + + /* Output */ + $this->title = $this->lang->words['search_results']; + $this->output .= $this->registry->output->getTemplate( 'search' )->searchResultsWrapper( $results, $sortDropDown, $sortIn, $links, $count, $showing, $_search_term, $this->_buildURLString(), $this->request['search_app'], $removedTerms, IPSSearchRegistry::get('set.hardLimit'), IPSSearchRegistry::get('set.resultsCutToLimit') ); + } + + /** + * Starts session + * Loads / creates a session based on activity + * + * @return + */ + protected function _startSession() + { + $session_id = IPSText::md5Clean( $this->request['sid'] ); + $requestType = ( $this->request['request_method'] == 'post' ) ? 'post' : 'get'; + + if ( $session_id ) + { + /* We check on member id 'cos we can. Obviously guests will have a member ID of zero, but meh */ + $this->_session = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'search_sessions', + 'where' => 'session_id=\'' . $session_id . '\' AND session_member_id=' . $this->memberData['member_id'] ) ); + } + + /* Deflate */ + if ( $this->_session['session_id'] ) + { + if ( $this->_session['session_data'] ) + { + $this->_session['_session_data'] = unserialize( $this->_session['session_data'] ); + + if ( isset( $this->_session['_session_data']['search_app_filters'] ) ) + { + $this->request['search_app_filters'] = $this->_session['_session_data']['search_app_filters']; + } + } + + IPSDebug::addMessage( "Loaded search session:
    " . var_export( $this->_session['_session_data'], true ) . "
    " ); + } + else + { + /* Create a session */ + $this->_session = array( 'session_id' => md5( uniqid( microtime(), true ) ), + 'session_created' => time(), + 'session_updated' => time(), + 'session_member_id' => $this->memberData['member_id'], + 'session_data' => serialize( array( 'search_app_filters' => $this->request['search_app_filters'] ) ) ); + + $this->DB->insert( 'search_sessions', $this->_session ); + + $this->_session['_session_data']['search_app_filters'] = $this->request['search_app_filters']; + + IPSDebug::addMessage( "Created search session:
    " . var_export( $this->_session['_session_data'], true ) . "
    " ); + } + + /* Do we have POST infos? */ + if ( isset( $_POST['search_app_filters'] ) ) + { + $this->_session['_session_data']['search_app_filters'] = ( is_array( $this->_session['_session_data']['search_app_filters'] ) ) ? IPSLib::arrayMergeRecursive( $this->_session['_session_data']['search_app_filters'], $_POST['search_app_filters'] ) : $_POST['search_app_filters']; + $this->request['search_app_filters'] = $this->_session['_session_data']['search_app_filters']; + + IPSDebug::addMessage( "Updated filters:
    " . var_export( $_POST['search_app_filters'], true ) . "
    " ); + } + + /* Globalize the session ID */ + $this->request['_sid'] = $this->_session['session_id']; + } + + /** + * End the session + * + */ + protected function _endSession() + { + if ( $this->_session['session_id'] ) + { + $sd = array( 'session_updated' => time(), + 'session_data' => serialize( $this->_session['_session_data'] ) ); + + $this->DB->update( 'search_sessions', $sd, 'session_id=\'' . $this->_session['session_id'] . '\'' ); + } + + /* Delete old sessions */ + $this->DB->delete( 'search_sessions', 'session_updated < ' . ( time() - 86400 ) ); + } + + /** + * Set the search order and key + * + * @return void + */ + protected function _setSortFilters() + { + $app = $this->request['search_app']; + $key = 'date'; + $dir = 'desc'; + $dun = false; + + /* multi search in options? */ + if ( isset( $this->request['search_app_filters'][ $app ]['searchInKey'] ) ) + { + $_k = $this->request['search_app_filters'][ $app ]['searchInKey']; + + if ( isset( $this->request['search_app_filters'][ $app ][ $_k ]['sortKey'] ) ) + { + $dun = true; + $key = $this->request['search_app_filters'][ $app ][ $_k ]['sortKey']; + $dir = $this->request['search_app_filters'][ $app ][ $_k ]['sortDir']; + } + } + + /* Normal options - although sometimes used even with multiple types */ + if ( ! $dun AND isset( $this->request['search_app_filters'][$app]['sortKey'] ) ) + { + $key = $this->request['search_app_filters'][$app]['sortKey']; + $dir = $this->request['search_app_filters'][$app]['sortDir']; + } + /* Global */ + else + { + if ( isset( $this->request['search_sort_by'] ) ) + { + $key = $this->request['search_sort_by']; + $dir = $this->request['search_sort_order']; + } + } + + /* Numeric? */ + if ( is_numeric( $dir ) ) + { + $dir = ( $dir == 0 ) ? 'desc' : 'asc'; + } + + IPSSearchRegistry::set('in.search_sort_by' , trim( $key ) ); + IPSSearchRegistry::set('in.search_sort_order', ( $dir != 'desc' ) ? 'asc' : 'desc' ); + } + + /** + * Displays the active topics screen + * + * @return void + */ + public function activeContent() + { + IPSSearchRegistry::set('in.search_app', $this->request['search_app'] ); + IPSSearchRegistry::set('in.period' , ( empty( $this->request['period'] ) ) ? 'today' : $this->request['period'] ); + + /* Can we do this? */ + if ( IPSLib::appisSearchable( IPSSearchRegistry::get('in.search_app'), 'active' ) ) + { + /* Perform the search */ + $this->searchController->viewActiveContent(); + + /* Get count */ + $count = $this->searchController->getResultCount(); + + /* Get results which will be array of IDs */ + $results = $this->searchController->getResultSet(); + + /* Get templates to use */ + $template = $this->searchController->fetchTemplates(); + + /* Fetch sort details */ + $sortIn = $this->searchController->fetchSortIn(); + + /* Parse result set */ + $results = $this->registry->output->getTemplate( $template['group'] )->$template['template']( $results, ( IPSSearchRegistry::get('display.onlyTitles') || IPSSearchRegistry::get( 'opt.noPostPreview') ) ? 1 : 0 ); + + /* Build pagination */ + $links = $this->registry->output->generatePagination( array( 'totalItems' => $count, + 'itemsPerPage' => IPSSearchRegistry::get('opt.search_per_page'), + 'currentStartValue' => IPSSearchRegistry::get('in.start'), + 'baseUrl' => 'app=core&module=search&do=active&period=' . IPSSearchRegistry::get('in.period') . '&search_app=' . IPSSearchRegistry::get('in.search_app') . '&sid=' . $this->request['_sid'] ) ); + } + else + { + $count = 0; + $results = array(); + } + + /* Output */ + $this->title = $this->lang->words['active_posts_title']; + $this->registry->output->addNavigation( $this->lang->words['active_posts_title'], '' ); + $this->output .= $this->registry->output->getTemplate( 'search' )->activePostsView( $results, $links, $count, $sortIn ); + } + + /** + * Displays latest user content + * + * @return void + */ + public function viewUserContent() + { + /* INIT */ + $id = $this->request['mid'] ? intval( trim( $this->request['mid'] ) ) : $this->memberData['member_id']; + $member = IPSMember::load( $id, 'core' ); + $beginStamp = 0; + + if ( ! $member['member_id'] ) + { + $this->registry->output->showError( 'search_invalid_id', 10147, null, null, 403 ); + } + + IPSSearchRegistry::set('in.search_app', $this->request['search_app'] ); + IPSSearchRegistry::set('in.userMode' , ( $this->request['userMode'] ) ? $this->request['userMode'] : 'all' ); + + /* Can we do this? */ + if ( IPSLib::appisSearchable( IPSSearchRegistry::get('in.search_app'), 'usercontent' ) ) + { + /* Perform the search */ + $this->searchController->viewUserContent( $member ); + + /* Get count */ + $count = $this->searchController->getResultCount(); + + /* Get results which will be array of IDs */ + $results = $this->searchController->getResultSet(); + + /* Get templates to use */ + $template = $this->searchController->fetchTemplates(); + + /* Fetch sort details */ + $sortIn = $this->searchController->fetchSortIn(); + + /* Parse result set */ + $results = $this->registry->output->getTemplate( $template['group'] )->$template['template']( $results, ( IPSSearchRegistry::get('display.onlyTitles') || IPSSearchRegistry::get( 'opt.noPostPreview') ) ? 1 : 0 ); + + /* Build pagination */ + $links = $this->registry->output->generatePagination( array( 'totalItems' => $count, + 'itemsPerPage' => IPSSearchRegistry::get('opt.search_per_page'), + 'currentStartValue' => IPSSearchRegistry::get('in.start'), + 'baseUrl' => 'app=core&module=search&do=user_activity&mid=' . $id . '&search_app=' . IPSSearchRegistry::get('in.search_app') . '&userMode=' . IPSSearchRegistry::get('in.userMode') . '&sid=' . $this->request['_sid'] ) ); + } + else + { + $count = 0; + $results = array(); + } + + $this->title = sprintf( $this->lang->words['s_participation_title'], $member['members_display_name'] ); + $this->registry->output->addNavigation( $this->title, '' ); + $this->output .= $this->registry->output->getTemplate( 'search' )->userPostsView( $results, $links, $count, $member, IPSSearchRegistry::get('set.hardLimit'), IPSSearchRegistry::get('set.resultsCutToLimit'), $beginStamp, $sortIn ); + } + + /** + * View new posts since your last visit + * + * @return void + */ + public function viewNewPosts() + { + IPSSearchRegistry::set('in.search_app', $this->request['search_app'] ); + + /* Can we do this? */ + if ( IPSLib::appisSearchable( IPSSearchRegistry::get('in.search_app'), 'vnc' ) ) + { + /* Perform the search */ + $this->searchController->viewNewContent(); + + /* Get count */ + $count = $this->searchController->getResultCount(); + + /* Get results which will be array of IDs */ + $results = $this->searchController->getResultSet(); + + /* Get templates to use */ + $template = $this->searchController->fetchTemplates(); + + /* Fetch sort details */ + $sortDropDown = $this->searchController->fetchSortDropDown(); + + /* Fetch sort details */ + $sortIn = $this->searchController->fetchSortIn(); + + /* Parse result set */ + $results = $this->registry->output->getTemplate( $template['group'] )->$template['template']( $results, ( IPSSearchRegistry::get('display.onlyTitles') || IPSSearchRegistry::get( 'opt.noPostPreview') ) ? 1 : 0 ); + + /* Build pagination */ + $links = $this->registry->output->generatePagination( array( 'totalItems' => $count, + 'itemsPerPage' => IPSSearchRegistry::get('opt.search_per_page'), + 'currentStartValue' => IPSSearchRegistry::get('in.start'), + 'baseUrl' => 'app=core&module=search&do=new_posts&search_app=' . IPSSearchRegistry::get('in.search_app') . '&sid= ' . $this->request['_sid'] ) ); + + /* Showing */ + $showing = array( 'start' => IPSSearchRegistry::get('in.start') + 1, 'end' => ( IPSSearchRegistry::get('in.start') + IPSSearchRegistry::get('opt.search_per_page') ) > $count ? $count : IPSSearchRegistry::get('in.start') + IPSSearchRegistry::get('opt.search_per_page') ); + } + else + { + $count = 0; + $results = array(); + } + + /* Output */ + $this->title = $this->lang->words['new_posts_title']; + $this->registry->output->addNavigation( $this->lang->words['new_posts_title'], '' ); + $this->output .= $this->registry->output->getTemplate( 'search' )->newPostsView( $results, $links, $count, $sortDropDown, $sortIn, IPSSearchRegistry::get('set.resultCutToDate') ); + } + + + /** + * Returns a url string that will maintain search results via links + * + * @return string + */ + protected function _buildURLString() + { + /* INI */ + $url_string = 'app=core&module=search&do=search&andor_type=' . $this->request['andor_type']; + $url_string .= '&sid=' . $this->request['_sid']; + + /* Add author name */ + if( isset( $this->request['search_author'] ) AND $this->request['search_author'] ) + { + $url_string .= "&search_author=" . urlencode($this->request['search_author']); + } + + /* Add titles only */ + if( isset( $this->request['show_as_titles'] ) AND $this->request['show_as_titles'] ) + { + $url_string .= "&show_as_titles={$this->request['show_as_titles']}"; + } + + /* Search Range */ + if( isset( $this->request['search_date_start'] ) AND $this->request['search_date_start'] ) + { + $url_string .= "&search_date_start={$this->request['search_date_start']}"; + } + + if( isset( $this->request['search_date_end'] ) AND $this->request['search_date_end'] ) + { + $url_string .= "&search_date_end={$this->request['search_date_end']}"; + } + + /* Contextual Type */ + if ( IPSSearchRegistry::get('contextual.type') ) + { + $url_string .= "&cType=" . IPSSearchRegistry::get('contextual.type') . "&cId=" . IPSSearchRegistry::get('contextual.id'); + } + + /* Content Only */ + if( isset( $this->request['content_title_only'] ) && $this->request['content_title_only'] ) + { + $url_string .= "&content_title_only=1"; + } + + /* Types */ + if( isset( $this->request['type'] ) && isset( $this->request['type_id'] ) ) + { + $url_string .= "&type={$this->request['type']}&type_id={$this->request['type_id']}"; + } + + if( isset( $this->request['type_2'] ) && isset( $this->request['type_id_2'] ) ) + { + $url_string .= "&type_2={$this->request['type_2']}&type_id_2={$this->request['type_id_2']}"; + } + + /* Fix up the search term a bit */ + $_search_term = str_replace( '&', '&', $this->request['search_term'] ); + $_search_term = str_replace( '"', '"', $_search_term ); + $_search_term = str_replace( '>', '>', $_search_term ); + $_search_term = str_replace( '<', '<', $_search_term ); + $_search_term = str_replace( '$', '$', $_search_term ); + + $url_string .= '&search_term=' . urlencode( $_search_term ); + + return $url_string; + } + + /** + * Checks to see if the logged in user is allowed to use the search system + * + * @return void + */ + protected function _canSearch() + { + /* Check the search setting */ + if( ! $this->settings['allow_search'] ) + { + if( $this->xml_out ) + { + @header( "Content-type: text/html;charset={$this->settings['gb_char_set']}" ); + print $this->lang->words['search_off']; + exit(); + } + else + { + $this->registry->output->showError( 'search_off', 10145 ); + } + } + + /* Check the member authorization */ + if( ! isset( $this->memberData['g_use_search'] ) || ! $this->memberData['g_use_search'] ) + { + if( $this->xml_out ) + { + @header( "Content-type: text/html;charset={$this->settings['gb_char_set']}" ); + print $this->lang->words['no_xml_permission']; + exit(); + } + else + { + $this->registry->output->showError( 'no_permission_to_search', 10146, null, null, 403 ); + } + } + } } \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/task/index.html b/upload/admin/applications/core/modules_public/task/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_public/task/index.html +++ b/upload/admin/applications/core/modules_public/task/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/task/manualResolver.php b/upload/admin/applications/core/modules_public/task/manualResolver.php index 66174971..daedf07a 100644 --- a/upload/admin/applications/core/modules_public/task/manualResolver.php +++ b/upload/admin/applications/core/modules_public/task/manualResolver.php @@ -1,17 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Task Manager - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-07-12 18:26:09 -0400 (Mon, 12 Jul 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com - * @version $Rev: 4948 $ + * @link http://www.invisionpower.com + * @version $Rev: 6635 $ * */ @@ -32,14 +34,12 @@ class public_core_task_manualResolver extends ipsCommand */ public function doExecute( ipsRegistry $registry ) { - @set_time_limit(1200); - //----------------------------------------- // Require and run //----------------------------------------- - require_once( IPS_ROOT_PATH . 'sources/classes/class_taskmanager.php' ); - $functions = new class_taskmanager( $registry ); + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_taskmanager.php', 'class_taskmanager' ); + $functions = new $classToLoad( $registry ); //----------------------------------------- // Check shutdown functions diff --git a/upload/admin/applications/core/modules_public/usercp/index.html b/upload/admin/applications/core/modules_public/usercp/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/modules_public/usercp/index.html +++ b/upload/admin/applications/core/modules_public/usercp/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/modules_public/usercp/manualResolver.php b/upload/admin/applications/core/modules_public/usercp/manualResolver.php index 5d5f9e93..9a593b76 100644 --- a/upload/admin/applications/core/modules_public/usercp/manualResolver.php +++ b/upload/admin/applications/core/modules_public/usercp/manualResolver.php @@ -1,367 +1,300 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -/** -* Main loader class -*/ -class public_core_usercp_manualResolver extends ipsCommand -{ - /** - * Page Title set by sub classes - * - * @access protected - * @var string - */ - protected $_pageTitle; - - /** - * Navigation array set by sub classes - * - * @access protected - * @var array - */ - protected $_nav = array(); - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $_thisNav = array(); - - //----------------------------------------- - // Load language - //----------------------------------------- - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_usercp' ) ); - - //----------------------------------------- - // Logged in? - //----------------------------------------- - - if ( ! $this->memberData['member_id'] ) - { - $this->registry->getClass('output')->silentRedirect( $this->settings['base_url'].'&app=core&module=global§ion=login&do=form' ); - - exit(); - } - - //----------------------------------------- - // Make sure they're clean - //----------------------------------------- - - $this->request['tab'] = IPSText::alphanumericalClean( $this->request['tab'] ); - $this->request['area'] = IPSText::alphanumericalClean( $this->request['area'] ); - - //----------------------------------------- - // Set up some basics... - //----------------------------------------- - - $_TAB = ( $this->request['tab'] ) ? $this->request['tab'] : 'core'; - $_AREA = ( $this->request['area'] ) ? $this->request['area'] : 'settings'; - $_DO = ( $this->request['do'] ) ? $this->request['do'] : 'show'; - $_FUNC = ( $_DO == 'show' ) ? 'showForm' : ( $_DO == 'save' ? 'saveForm' : $_DO ); - $tabs = array(); - $errors = array(); - - //----------------------------------------- - // Got a plug in? - //----------------------------------------- - - require_once( IPS_ROOT_PATH . 'sources/interfaces/interface_usercp.php' ); - - $EXT_DIR = IPSLib::getAppDir( $_TAB ) . '/extensions'; - $_CLASS = 'usercpForms_' . $_TAB; - - if ( ! file_exists($EXT_DIR . '/usercpForms.php') ) - { - $this->registry->getClass('output')->showError( 'usercp_bad_tab', 10147 ); - exit(); - } - - //----------------------------------------- - // Cycle through applications and load - // usercpForm extensions - //----------------------------------------- - foreach( ipsRegistry::$applications as $app_dir => $app_data ) - { - // Check that the application is installed. - if ( !IPSLib::appIsInstalled( $app_dir ) ) - { - continue; - } - - $ext_dir = IPSLib::getAppDir( $app_dir ) . '/extensions'; - - // Make sure the extension exists - if ( !file_exists( $ext_dir . '/usercpForms.php' ) ) - { - continue; - } - - require_once( $ext_dir . '/usercpForms.php' ); - $__class = 'usercpForms_' . $app_dir; - - //----------------------------------------- - // Support for extending usercpForms - //----------------------------------------- - if ( file_exists( $ext_dir . '/usercpFormsExt.php' ) ) - { - require_once( $ext_dir . '/usercpFormsExt.php' ); - - //----------------------------------------- - // The class must exist and extend - // the usercpForm class to be valid. - //----------------------------------------- - if ( class_exists( 'usercpFormsExt_' . $app_dir ) ) - { - $parent = get_parent_class( 'usercpFormsExt_' . $app_dir ); - - if ( $parent == $__class ) - { - $__class = 'usercpFormsExt_' . $app_dir; - } - } - } - - $_usercp_module = new $__class(); - $_usercp_module->makeRegistryShortcuts( $this->registry ); - - if ( is_callable( array( $_usercp_module, 'init' ) ) ) - { - $_usercp_module->init(); - - /* Set default area? */ - if ( ( $_TAB == $app_dir ) AND ! isset( $_REQUEST['area'] ) ) - { - if ( isset( $_usercp_module->defaultAreaCode ) ) - { - $this->request['area'] = $_AREA = $_usercp_module->defaultAreaCode; - } - } - } - - if ( is_callable( array( $_usercp_module, 'getLinks' ) ) ) - { - $tabs[ $app_dir ]['_name'] = $_usercp_module->tab_name ? $_usercp_module->tab_name : IPSLib::getAppTitle( $app_dir ); - $tabs[ $app_dir ]['_menu'] = $_usercp_module->getLinks(); - - if ( ! $tabs[ $app_dir ]['_menu'] ) - { - unset( $tabs[ $app_dir ] ); - } - - /* Add in 'last' element */ - $tabs[ $app_dir ]['_menu'][ count( $tabs[ $app_dir ]['_menu'] ) - 1 ]['last'] = 1; - - /* This nav? */ - if ( ! count( $_thisNav ) AND $app_dir == $_TAB ) - { - foreach( $tabs[ $app_dir ]['_menu'] as $_navData ) - { - if ( $_navData['url'] == 'area=' . $_AREA ) - { - $_thisNav = array( 'app=core&module=usercp&tab=' . $_TAB . '&area=' . $_AREA, $_navData['title'] ); - } - } - } - } - } - - //----------------------------------------- - // Set up basic navigation - //----------------------------------------- - - $this->_nav[] = array( $this->lang->words['t_title'], '&app=core&module=usercp' ); - $this->_nav[] = array( $this->lang->words['tab__' . $_TAB ] ? $this->lang->words['tab__' . $_TAB ] : IPSLib::getAppTitle( $_TAB ) , '&app=core&module=usercp&tab=' . $_TAB ); - - if ( isset( $_thisNav[0] ) ) - { - $this->_nav[] = array( $_thisNav[1], $_thisNav[0] ); - } - - //----------------------------------------- - // Begin initilization routine for extension - //----------------------------------------- - require_once( $EXT_DIR . '/usercpForms.php' ); - - //----------------------------------------- - // Support for extending usercpForms - //----------------------------------------- - if ( file_exists( $EXT_DIR . '/usercpFormsExt.php' ) ) - { - require_once( $EXT_DIR . '/usercpFormsExt.php' ); - - //----------------------------------------- - // The class must exist and extend - // the usercpForm class to be valid. - //----------------------------------------- - if ( class_exists( 'usercpFormsExt_' . $_TAB ) ) - { - $parent = get_parent_class( 'usercpFormsExt_' . $_TAB ); - - if ( $parent == $_CLASS ) - { - $_CLASS = 'usercpFormsExt_' . $_TAB; - } - } - } - - $usercp_module = new $_CLASS(); - $usercp_module->makeRegistryShortcuts( $this->registry ); - $usercp_module->init(); - - if ( ( $_DO == 'saveForm' || $_DO == 'showForm' ) AND ! is_callable( array( $usercp_module, $_FUNC ) ) ) - { - $this->registry->getClass('output')->showError( 'usercp_bad_tab', 10148, true ); - exit(); - } - - //----------------------------------------- - // Run it... - //----------------------------------------- - - if ( $_FUNC == 'showForm' ) - { - //----------------------------------------- - // Facebook email - //----------------------------------------- - - //@facebook concession - if ( IPSLib::fbc_enabled() === TRUE ) - { - if ( ! $this->memberData['fb_emailallow'] AND strstr( $this->memberData['email'], '@proxymail.facebook.com' ) ) - { - require_once( IPS_ROOT_PATH . 'sources/classes/facebook/connect.php' ); - $fb = new facebook_connect( $this->registry ); - - try - { - $fb->testConnectSession(); - $result = $fb->users_hasAppPermission( 'email' ); - - IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'fb_emailallow' => intval( $result ) ) ) ); - } - catch( Exception $error ) - { - } - } - } - - $html = $usercp_module->showForm( $_AREA ); - } - else if ( $_FUNC == 'saveForm' ) - { - //----------------------------------------- - // Check secure key... - //----------------------------------------- - - if ( $this->request['secure_hash'] != $this->member->form_hash ) - { - $html = $usercp_module->showForm( $_AREA ); - $errors[] = $this->lang->words['securehash_not_secure']; - } - else - { - $errors = $usercp_module->saveForm( $_AREA ); - - $do = ( $usercp_module->do_url ) ? $usercp_module->do_url : 'show'; - - if ( is_array( $errors ) AND count( $errors ) ) - { - $html = $usercp_module->showForm( $_AREA, $errors ); - } - else if ( $usercp_module->ok_message ) - { - $this->registry->getClass('output')->redirectScreen( $usercp_module->ok_message, $this->settings['base_url'] . 'app=' . IPS_APP_COMPONENT . '&module=usercp&tab=' . $_TAB . '&area=' . $_AREA . '&do='.$do.'&saved=1', 1 ); - } - else - { - $this->registry->getClass('output')->silentRedirect( $this->settings['base_url_with_app'] . 'module=usercp&tab=' . $_TAB . '&area=' . $_AREA . '&do='.$do.'&saved=1'.'&_r='.time() ); - } - } - } - else - { - if ( ! is_callable( array( $usercp_module, 'runCustomEvent' ) ) ) - { - $html = $usercp_module->showForm( $_AREA ); - $errors[] = $this->lang->words['called_invalid_function']; - } - else - { - $html = $usercp_module->runCustomEvent( $_AREA ); - } - } - - //----------------------------------------- - // If you've run a custom event, may need to - // reset the "area" to highlight the menu correctly - //----------------------------------------- - - if ( is_callable( array( $usercp_module, 'resetArea' ) ) ) - { - $_AREA = $usercp_module->resetArea( $_AREA ); - } - - //----------------------------------------- - // Wrap form and show - //----------------------------------------- - - $template = $this->registry->getClass('output')->getTemplate('ucp')->userCPTemplate( $_TAB, $html, $tabs, $_AREA, $errors, $usercp_module->hide_form_and_save_button, $usercp_module->uploadFormMax ); - - //----------------------------------------- - // Pass to CP output hander - //----------------------------------------- - - $this->registry->getClass('output')->setTitle( ( $this->_pageTitle ) ? $this->settings['board_name'] . " {$this->lang->words['pagetitle_bit']} : " . $this->_pageTitle : $this->settings['board_name'] . " {$this->lang->words['pagetitle_bit']}" ); - $this->registry->getClass('output')->addContent( $template ); - - if ( is_array( $this->_nav ) AND count( $this->_nav ) ) - { - foreach( $this->_nav as $_nav ) - { - $this->registry->getClass('output')->addNavigation( $_nav[0], $_nav[1] ); - } - } - - if ( is_array( $usercp_module->_nav ) AND count( $usercp_module->_nav ) ) - { - foreach( $usercp_module->_nav as $_nav ) - { - $this->registry->getClass('output')->addNavigation( $_nav[0], $_nav[1] ); - } - } - - $this->registry->getClass('output')->sendOutput(); - } + + * Invision Power Services + * IP.Board v3.1.4 + * User control panel resolver + * Last Updated: $Date: 2010-10-21 14:02:34 -0400 (Thu, 21 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 1st march 2002 + * @version $Revision: 7011 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +/** +* Main loader class +*/ +class public_core_usercp_manualResolver extends ipsCommand +{ + /** + * Page Title set by sub classes + * + * @access protected + * @var string + */ + protected $_pageTitle; + + /** + * Navigation array set by sub classes + * + * @access protected + * @var array + */ + protected $_nav = array(); + + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $_thisNav = array(); + + //----------------------------------------- + // Load language + //----------------------------------------- + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_usercp' ) ); + + //----------------------------------------- + // Logged in? + //----------------------------------------- + + if ( ! $this->memberData['member_id'] ) + { + $this->registry->getClass('output')->silentRedirect( $this->settings['base_url'].'&app=core&module=global§ion=login&do=form' ); + + exit(); + } + + //----------------------------------------- + // Make sure they're clean + //----------------------------------------- + + $this->request['tab'] = IPSText::alphanumericalClean( $this->request['tab'] ); + $this->request['area'] = IPSText::alphanumericalClean( $this->request['area'] ); + + //----------------------------------------- + // Set up some basics... + //----------------------------------------- + + $_TAB = ( $this->request['tab'] ) ? $this->request['tab'] : 'core'; + $_AREA = ( $this->request['area'] ) ? $this->request['area'] : 'settings'; + $_DO = ( $this->request['do'] ) ? $this->request['do'] : 'show'; + $_FUNC = ( $_DO == 'show' ) ? 'showForm' : ( $_DO == 'save' ? 'saveForm' : $_DO ); + $tabs = array(); + $errors = array(); + + //----------------------------------------- + // Got a plug in? + //----------------------------------------- + + IPSLib::loadInterface( 'interface_usercp.php' ); + + $EXT_DIR = IPSLib::getAppDir( $_TAB ) . '/extensions'; + + if ( ! file_exists($EXT_DIR . '/usercpForms.php') ) + { + $this->registry->getClass('output')->showError( 'usercp_bad_tab', 10147 ); + exit(); + } + + //----------------------------------------- + // Cycle through applications and load + // usercpForm extensions + //----------------------------------------- + foreach( ipsRegistry::$applications as $app_dir => $app_data ) + { + // Check that the application is installed. + if ( !IPSLib::appIsInstalled( $app_dir ) ) + { + continue; + } + + $ext_dir = IPSLib::getAppDir( $app_dir ) . '/extensions'; + + // Make sure the extension exists + if ( !file_exists( $ext_dir . '/usercpForms.php' ) ) + { + continue; + } + + $__class = IPSLib::loadLibrary( $ext_dir . '/usercpForms.php', 'usercpForms_' . $app_dir, $app_dir ); + $_usercp_module = new $__class(); + $_usercp_module->makeRegistryShortcuts( $this->registry ); + + if ( is_callable( array( $_usercp_module, 'init' ) ) ) + { + $_usercp_module->init(); + + /* Set default area? */ + if ( ( $_TAB == $app_dir ) AND ! isset( $_REQUEST['area'] ) ) + { + if ( isset( $_usercp_module->defaultAreaCode ) ) + { + $this->request['area'] = $_AREA = $_usercp_module->defaultAreaCode; + } + } + } + + if ( is_callable( array( $_usercp_module, 'getLinks' ) ) ) + { + $tabs[ $app_dir ]['_name'] = $_usercp_module->tab_name ? $_usercp_module->tab_name : IPSLib::getAppTitle( $app_dir ); + $tabs[ $app_dir ]['_menu'] = $_usercp_module->getLinks(); + + if ( ! $tabs[ $app_dir ]['_menu'] ) + { + unset( $tabs[ $app_dir ] ); + } + + /* Add in 'last' element */ + $tabs[ $app_dir ]['_menu'][ count( $tabs[ $app_dir ]['_menu'] ) - 1 ]['last'] = 1; + + /* This nav? */ + if ( ! count( $_thisNav ) AND $app_dir == $_TAB ) + { + foreach( $tabs[ $app_dir ]['_menu'] as $_navData ) + { + if ( $_navData['url'] == 'area=' . $_AREA ) + { + $_thisNav = array( 'app=core&module=usercp&tab=' . $_TAB . '&area=' . $_AREA, $_navData['title'] ); + } + } + } + } + } + + //----------------------------------------- + // Set up basic navigation + //----------------------------------------- + + $this->_nav[] = array( $this->lang->words['t_title'], '&app=core&module=usercp' ); + $this->_nav[] = array( $this->lang->words['tab__' . $_TAB ] ? $this->lang->words['tab__' . $_TAB ] : IPSLib::getAppTitle( $_TAB ) , '&app=core&module=usercp&tab=' . $_TAB ); + + if ( isset( $_thisNav[0] ) ) + { + $this->_nav[] = array( $_thisNav[1], $_thisNav[0] ); + } + + //----------------------------------------- + // Begin initilization routine for extension + //----------------------------------------- + $classToLoad = IPSLib::loadLibrary( $EXT_DIR . '/usercpForms.php', 'usercpForms_' . $_TAB, $_TAB ); + $usercp_module = new $classToLoad(); + $usercp_module->makeRegistryShortcuts( $this->registry ); + $usercp_module->init(); + + if ( ( $_DO == 'saveForm' || $_DO == 'showForm' ) AND ! is_callable( array( $usercp_module, $_FUNC ) ) ) + { + $this->registry->getClass('output')->showError( 'usercp_bad_tab', 10148, true ); + exit(); + } + + //----------------------------------------- + // Run it... + //----------------------------------------- + + if ( $_FUNC == 'showForm' ) + { + //----------------------------------------- + // Facebook email + //----------------------------------------- + + $html = $usercp_module->showForm( $_AREA ); + } + else if ( $_FUNC == 'saveForm' ) + { + //----------------------------------------- + // Check secure key... + //----------------------------------------- + + if ( $this->request['secure_hash'] != $this->member->form_hash ) + { + $html = $usercp_module->showForm( $_AREA ); + $errors[] = $this->lang->words['securehash_not_secure']; + } + else + { + $errors = $usercp_module->saveForm( $_AREA ); + + $do = ( $usercp_module->do_url ) ? $usercp_module->do_url : 'show'; + + if ( is_array( $errors ) AND count( $errors ) ) + { + $html = $usercp_module->showForm( $_AREA, $errors ); + } + else if ( $usercp_module->ok_message ) + { + $this->registry->getClass('output')->redirectScreen( $usercp_module->ok_message, $this->settings['base_url'] . 'app=' . IPS_APP_COMPONENT . '&module=usercp&tab=' . $_TAB . '&area=' . $_AREA . '&do='.$do.'&saved=1', 1 ); + } + else + { + $this->registry->getClass('output')->silentRedirect( $this->settings['base_url_with_app'] . 'module=usercp&tab=' . $_TAB . '&area=' . $_AREA . '&do='.$do.'&saved=1'.'&_r='.time() ); + } + } + } + else + { + if ( ! is_callable( array( $usercp_module, 'runCustomEvent' ) ) ) + { + $html = $usercp_module->showForm( $_AREA ); + $errors[] = $this->lang->words['called_invalid_function']; + } + else + { + $html = $usercp_module->runCustomEvent( $_AREA ); + } + } + + //----------------------------------------- + // If you've run a custom event, may need to + // reset the "area" to highlight the menu correctly + //----------------------------------------- + + if ( is_callable( array( $usercp_module, 'resetArea' ) ) ) + { + $_AREA = $usercp_module->resetArea( $_AREA ); + } + + //----------------------------------------- + // Wrap form and show + //----------------------------------------- + + $template = $this->registry->getClass('output')->getTemplate('ucp')->userCPTemplate( $_TAB, $html, $tabs, $_AREA, $errors, $usercp_module->hide_form_and_save_button, $usercp_module->uploadFormMax ); + + //----------------------------------------- + // Pass to CP output hander + //----------------------------------------- + + $this->registry->getClass('output')->setTitle( ( $this->_pageTitle ) ? $this->settings['board_name'] . " {$this->lang->words['pagetitle_bit']} : " . $this->_pageTitle : $this->settings['board_name'] . " {$this->lang->words['pagetitle_bit']}" ); + $this->registry->getClass('output')->addContent( $template ); + + if ( is_array( $this->_nav ) AND count( $this->_nav ) ) + { + foreach( $this->_nav as $_nav ) + { + $this->registry->getClass('output')->addNavigation( $_nav[0], $_nav[1] ); + } + } + + if ( is_array( $usercp_module->_nav ) AND count( $usercp_module->_nav ) ) + { + foreach( $usercp_module->_nav as $_nav ) + { + $this->registry->getClass('output')->addNavigation( $_nav[0], $_nav[1] ); + } + } + + $this->registry->getClass('output')->sendOutput(); + } } \ No newline at end of file diff --git a/upload/admin/applications/core/setup/index.html b/upload/admin/applications/core/setup/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/setup/index.html +++ b/upload/admin/applications/core/setup/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/index.html b/upload/admin/applications/core/setup/versions/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/setup/versions/index.html +++ b/upload/admin/applications/core/setup/versions/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/install/index.html b/upload/admin/applications/core/setup/versions/install/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/setup/versions/install/index.html +++ b/upload/admin/applications/core/setup/versions/install/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/install/knownSettings.php b/upload/admin/applications/core/setup/versions/install/knownSettings.php index ffdf0d81..8e601775 100644 --- a/upload/admin/applications/core/setup/versions/install/knownSettings.php +++ b/upload/admin/applications/core/setup/versions/install/knownSettings.php @@ -21,5 +21,5 @@ $knownSettings = array( 'upload_url' => IPSSetUp::getSavedData('install_url') . '/uploads', 'upload_dir' => IPSSetUp::getSavedData('install_dir') . '/uploads', 'search_sql_method' => ipsRegistry::DB()->checkFulltextSupport() ? 'ftext' : 'man', - 'safe_mode_skins' => ( @ini_get("safe_mode") ) ? 1 : 0 + 'safe_mode_skins' => ( @ini_get("safe_mode") ) ? 1 : 0, ); \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/install/sql/core_mysql_fulltext.php b/upload/admin/applications/core/setup/versions/install/sql/core_mysql_fulltext.php index ac620565..c6f3e7b7 100644 --- a/upload/admin/applications/core/setup/versions/install/sql/core_mysql_fulltext.php +++ b/upload/admin/applications/core/setup/versions/install/sql/core_mysql_fulltext.php @@ -3,5 +3,3 @@ * Installation Schematic File * Generated on Thu, 19 Feb 2009 08:15:49 +0000 GMT */ -$INDEX[] = "ALTER TABLE search_index ADD FULLTEXT KEY content (content,content_title)"; -?> \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/install/sql/core_mysql_inserts.php b/upload/admin/applications/core/setup/versions/install/sql/core_mysql_inserts.php index 64bbe623..90417b78 100644 --- a/upload/admin/applications/core/setup/versions/install/sql/core_mysql_inserts.php +++ b/upload/admin/applications/core/setup/versions/install/sql/core_mysql_inserts.php @@ -1,28 +1,28 @@ \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/install/sql/index.html b/upload/admin/applications/core/setup/versions/install/sql/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/setup/versions/install/sql/index.html +++ b/upload/admin/applications/core/setup/versions/install/sql/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_10002/version_upgrade_mysql.php b/upload/admin/applications/core/setup/versions/upg_10002/version_upgrade_mysql.php index c714b6b4..cca0b7d1 100644 --- a/upload/admin/applications/core/setup/versions/upg_10002/version_upgrade_mysql.php +++ b/upload/admin/applications/core/setup/versions/upg_10002/version_upgrade_mysql.php @@ -2,11 +2,11 @@ /* +-------------------------------------------------------------------------- -| IP.Board v3.0.5 +| IP.Board v3.1.2 | ======================================== | by Matthew Mecham | (c) 2001 - 2004 Invision Power Services -| http://www.iinvisionpower.com +| http://www.invisionpower.com | ======================================== | Web: http://www.invisionboard.com | Email: matt@invisionpower.com @@ -143,7 +143,7 @@ class version_upgrade } if ( $this->request['workact'] ) { - IPSSetUp::getSavedData('vid') = $this->install->current_version; + IPSSetUp::getSavedData('vid', $this->install->current_version ); return false; } @@ -1412,9 +1412,9 @@ class version_upgrade { // Reset loginkey - IPSSetUp::getSavedData('loginkey') = $member_login_key; + IPSSetUp::getSavedData('loginkey', $member_login_key ); $this->install->ipsclass->member['member_login_key'] = $member_login_key; - IPSSetUp::getSavedData('securekey') = $this->install->ipsclass->return_md5_check(); + IPSSetUp::getSavedData('securekey', $this->install->ipsclass->return_md5_check() ); } } @@ -1906,7 +1906,7 @@ class version_upgrade $SQL[] = "REPLACE INTO ".ipsRegistry::dbFunctions()->getPrefix()."faq VALUES (1, 'Registration benefits', 'To be able to use all the features on this board, the administrator will probably require that you register for a member account. Registration is free and only takes a moment to complete.\r
    \r
    During registration, the administrator requires that you supply a valid email address. This is important as the administrator may require that you validate your registration via an email. If this is the case, you will be notified when registering. If your e-mail does not arrive, then on the member bar at the top of the page, there will be a link that will allow you to re-send the validation e-mail. \r
    \r
    In some cases, the administrator will need to approve your registration before you can use your member account fully. If this is the case you will be notified during registration.\r
    \r
    Once you have registered and logged in, you will have access to your personal messenger and your control panel.\r
    \r
    For more information on these items, please see the relevant sections in this documentation.', 'How to register and the added benefits of being a registered member.');"; - $SQL[] = "REPLACE INTO ".ipsRegistry::dbFunctions()->getPrefix()."faq VALUES (2, 'Cookies and cookie usage', 'Using cookies is optional, but strongly recommended. Cookies are used to track topics, showing you which topics have new replies since your last visit and to automatically log you in when you return.\r
    \r
    If your computer is unable to use the cookie system to browse the board correctly, then the board will automatically add in a session ID to each link to track you around the board.\r
    \r
    Clearing Cookies\r
    \r
    You can clear the cookies at any time by clicking on the link found at the bottom of the main board page (the first page you see when returning to the board). If this does not work for you, you may need to remove the cookies manually.\r
    \r
    Removing Cookies in Internet Explorer for Windows\r
    \r
      \r
    • Close all open Internet Explorer Windows\r
    • Click on the \'start\' button\r
    • Move up to \'Find\' and click on \'Files and Folders\'\r
    • When the new window appears, type in the domain name of the board you are using into the \'containing text\' field. (If the boards address was \'\' you would enter \'\' without the quotes)\r
    • In the \'look in\' box, type in C:WindowsCookies and press \'Find Now\'\r
    • After it has finished searching, highlight all files (click on a file then press CTRL+A) and delete them.\r
    \r
    \r
    Removing Cookies in Internet Explorer for Macintosh\r
    \r
      \r
    • With Internet Explorer active, choose \'Edit\' and then \'Preferences\' from the Macintosh menu bar at the top of the screen\r
    • When the preferences panel opens, choose \'Cookies\' found in the \'Receiving Files\' section.\r
    • When the cookie pane loads, look for the domain name of the board (If the boards address was \'\' look for \'\' or \'\'\r
    • For each cookie, click on the entry and press the delete button.\r
    \r
    \r
    Your cookies should now be removed. In some cases you may need to restart your computer for the changes to take effect.', 'The benefits of using cookies and how to remove cookies set by this board.');"; + $SQL[] = "REPLACE INTO ".ipsRegistry::dbFunctions()->getPrefix()."faq VALUES (2, 'Cookies and cookie usage', 'Using cookies is optional, but strongly recommended. Cookies are used to track topics, showing you which topics have new replies since your last visit and to automatically log you in when you return.\r
    \r
    If your computer is unable to use the cookie system to browse the board correctly, then the board will automatically add in a session ID to each link to track you around the board.\r
    \r
    Clearing Cookies\r
    \r
    You can clear the cookies at any time by clicking on the link found at the bottom of the main board page (the first page you see when returning to the board). If this does not work for you, you may need to remove the cookies manually.\r
    \r
    Removing Cookies in Internet Explorer for Windows\r
    \r
      \r
    • Close all open Internet Explorer Windows\r
    • Click on the \'start\' button\r
    • Move up to \'Find\' and click on \'Files and Folders\'\r
    • When the new window appears, type in the domain name of the board you are using into the \'containing text\' field. (If the boards address was \'http://www.test.ru/forums/index.php\' you would enter \'test.ru\' without the quotes)\r
    • In the \'look in\' box, type in C:WindowsCookies and press \'Find Now\'\r
    • After it has finished searching, highlight all files (click on a file then press CTRL+A) and delete them.\r
    \r
    \r
    Removing Cookies in Internet Explorer for Macintosh\r
    \r
      \r
    • With Internet Explorer active, choose \'Edit\' and then \'Preferences\' from the Macintosh menu bar at the top of the screen\r
    • When the preferences panel opens, choose \'Cookies\' found in the \'Receiving Files\' section.\r
    • When the cookie pane loads, look for the domain name of the board (If the boards address was \'http://www.test.ru/forums/index.php\' look for \'test.ru\' or \'www.test.ru\'\r
    • For each cookie, click on the entry and press the delete button.\r
    \r
    \r
    Your cookies should now be removed. In some cases you may need to restart your computer for the changes to take effect.', 'The benefits of using cookies and how to remove cookies set by this board.');"; $SQL[] = "REPLACE INTO ".ipsRegistry::dbFunctions()->getPrefix()."faq VALUES (3, 'Recovering lost or forgotten passwords', 'Security is a big feature on this board, and to that end, all passwords are encrypted when you register.\r
    This means that we cannot email your password to you as we hold no record of your \'uncrypted\' password. You can however, apply to have your password reset.\r
    \r
    To do this, click on the Lost Password link found on the log in page.\r
    \r
    Further instruction is available from there.', 'How to reset your password if you\'ve forgotton it.');"; $SQL[] = "REPLACE INTO ".ipsRegistry::dbFunctions()->getPrefix()."faq VALUES (4, 'Your Control Panel (My Controls)', 'Your control panel is your own private board console. You can change how the board looks and feels as well as your own information from here.\r
    \r
    Subscriptions\r
    \r
    This is where you manage your topic and forums subscriptions. Please see the help file \'Email Notification of new messages\' for more information on how to subscribe to topics.\r
    \r
    Edit Profile Info\r
    \r
    This section allows you to add or edit your contact information and enter some personal information if you choose.\r
    \r
    Edit Signature\r
    \r
    A board \'signature\' is very similar to an email signature. This signature is attached to the foot of every message you post unless you choose to check the box that allows you to ommit the signature in the message you are posting. You may use BB Code if available and in some cases, pure HTML (if the board administrator allows it).\r
    \r
    Edit Avatar Settings\r
    \r
    An avatar is a little image that appears under your username when you view a topic or post you authored. If the administrator allows, you may either choose from the board gallery, enter a URL to an avatar stored on your server or upload an avatar to use. You may also set the width of the avatar to ensure that it\'s sized in proportion.\r
    \r
    Change Personal Photo\r
    \r
    This section will allow you to add a photograph to your profile. This will be displayed when a user clicks to view your profile, on the mini-profile screen and will also be linked to from the member list.\r
    \r
    Email Settings\r
    \r
    Hide my email address allows you to deny the ability for other users to send you an email from the board.\r
    Send me updates sent by the board administrator will allow the administrator to include your email address in any mailings they send out - this is used mostly for important updates and community information.\r
    Include a copy of the post when emailing me from a subscribed topic, this allows you to have the new post included in any reply to topic notifications.\r
    Send a confirmation email when I receive a new private message, this will send you an e-mail notification to your registered e-mail address each time you receive a private message on the board.\r
    Enable \'Email Notification\' by default?, this will automatically subscribe you to any topic that you make a reply to. You may unsubscribe from the \'Subscriptions\' section of My Controls if you wish.\r
    \r
    Board Settings\r
    \r
    From this section, you can set your time zone, choose to not see users signatures, avatars and posted images.\r
    You can choose to get a pop up window informing you when you have a new message and choose to show or hide the \'Fast Reply\' box where it is enabled.\r
    You are also able to choose display preferences for the number of topics/posts shown per page on the board.\r
    \r
    Skins and Languages\r
    \r
    If available, you can choose a skin style and language choice. This affects how the board is displayed so you may wish to preview the skin before submitting the form.\r
    \r
    Change Email Address\r
    \r
    At any time, you can change the email address that is registered to your account. In some cases, you will need to revalidate your account after changing your email address. If this is the case, you will be notified before your email address change is processed.\r
    \r
    Change Password\r
    \r
    You may change your password from this section. Please note that you will need to know your current password before you can change your password.', 'Editing contact information, personal information, avatars, signatures, board settings, languages and style choices.');"; $SQL[] = "REPLACE INTO ".ipsRegistry::dbFunctions()->getPrefix()."faq VALUES (5, 'Email Notification of new messages', 'This board can notify you when a new reply is added to a topic. Many users find this useful to keep up to date on topics without the need to view the board to check for new messages.\r
    \r
    There are three ways to subscribe to a topic:\r
    \r
  • Click the \'Track This Topic\' link at the top of the topic that you wish to track\r
  • On the posting screen when replying to or creating a topic, check the \'Enable email notification of replies?\' checkbox\r
  • From the E-Mail settings section of your User CP (My Controls) check the \'Enable Email Notification by default?\' option, this will automatically subscribe you to any topic that you make a reply to\r
    \r
    Please note that to avoid multiple emails being sent to your email address, you will only get one e-mail for each topic you are subscribed to until the next time you visit the board.\r
    \r
    You are also able to subscribe to each individual forum on the board, to be notified when a new topic is created in that particular forum. To enable this, click the \'Subscribe to this forum\' link at the bottom of the forum that you wish to subscribe to.\r
    \r
    To unsubscribe from any forums or topics that you are subscribed to - just go to the \'Subscriptions\' section of \'My Controls\' and you can do this from there.', 'How to get emailed when a new reply is added to a topic.');"; @@ -2245,7 +2245,7 @@ class version_upgrade $this->registry->output->addMessage("Data recached..."); unset($this->request['workact']); unset($this->request['st']); - unset(IPSSetUp::getSavedData('vid')); + //unset(IPSSetUp::getSavedData('vid')); } diff --git a/upload/admin/applications/core/setup/versions/upg_10004/version_upgrade_mysql.php b/upload/admin/applications/core/setup/versions/upg_10004/version_upgrade_mysql.php index a2419ac8..b4f7f4d1 100644 --- a/upload/admin/applications/core/setup/versions/upg_10004/version_upgrade_mysql.php +++ b/upload/admin/applications/core/setup/versions/upg_10004/version_upgrade_mysql.php @@ -2,15 +2,15 @@ /* +-------------------------------------------------------------------------- -| IP.Board v3.0.5 +| IP.Board v3.1.2 | ======================================== -| by Matthew Mecham -| (c) 2001 - 2004 Invision Power Services -| http://www.iinvisionpower.com -| ======================================== -| Web: http://www.iinvisionboard.com -| Email: matt@iinvisionpower.com -| Licence Info: http://www.iinvisionboard.com/?license +| by Matthew Mecham +| (c) 2001 - 2004 Invision Power Services +| http://www.invisionpower.com +| ======================================== +| Web: http://www.invisionboard.com +| Email: matt@invisionpower.com +| Licence Info: http://www.invisionboard.com/?license +--------------------------------------------------------------------------- | | > IPB UPGRADE 1.1 -> 2.0 SQL STUFF! diff --git a/upload/admin/applications/core/setup/versions/upg_20004/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_20004/mysql_updates.php index d2b00b72..86ef875d 100644 --- a/upload/admin/applications/core/setup/versions/upg_20004/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_20004/mysql_updates.php @@ -2,15 +2,15 @@ /* +-------------------------------------------------------------------------- -| IP.Board v3.0.5 +| IP.Board v3.1.2 | ======================================== -| by Matthew Mecham -| (c) 2001 - 2004 Invision Power Services -| http://www.iinvisionpower.com -| ======================================== -| Web: http://www.iinvisionboard.com -| Email: matt@iinvisionpower.com -| Licence Info: http://www.iinvisionboard.com/?license +| by Matthew Mecham +| (c) 2001 - 2004 Invision Power Services +| http://www.invisionpower.com +| ======================================== +| Web: http://www.invisionboard.com +| Email: matt@invisionpower.com +| Licence Info: http://www.invisionboard.com/?license +--------------------------------------------------------------------------- | | > IPB UPGRADE MODULE:: IPB 2.0.0 PDR1 -> PDR 2 @@ -30,29 +30,26 @@ if ( ! defined( 'IN_IPB' ) ) $SQL = array(); -$SQL[] = "INSERT INTO ibf_conf_settings_titles (conf_title_title, conf_title_desc, conf_title_count, conf_title_noshow, conf_title_keyword) VALUES ('IPB Portal', 'These settings enable you to enable or disable IPB Portal and control the options IPB Portal offers.', 20, 0, 'ipbportal');"; +$SQL[] = "INSERT INTO conf_settings_titles (conf_title_title, conf_title_desc, conf_title_count, conf_title_noshow, conf_title_keyword) VALUES ('IPB Portal', 'These settings enable you to enable or disable IPB Portal and control the options IPB Portal offers.', 20, 0, 'ipbportal');"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('ENABLE IPB Portal?', 'If \'yes\', IPB Portal can be accessed via \'index.php?act=home\' or via the special \'index.php\' script (see documentation for more info).', '22', 'yes_no', 'csite_on', '', '1', '', '', 1, 1, '', 0, '', 1);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('IPB Portal Page Title?', 'This will appear inbetween the <title> elements on the page', '22', 'input', 'csite_title', '', 'IPB Portal', '', '', 1, 2, '', 0, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Forums to export articles from', 'Separate forum ids with a comma for more than one', '22', 'input', 'csite_article_forum', '1,2,3,4,5,6', '', '', '', 1, 3, '', 0, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Number of Articles to display in the main section', '', '22', 'input', 'csite_article_max', '', '15', '', '', 1, 4, '', 0, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Enable Recent Articles?', 'This will show a list of recent topic titles on the IPB Portal page', '22', 'yes_no', 'csite_article_recent_on', '', '1', '', '', 1, 5, 'IPB Portal Recent Articles', 0, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Max. no recent articles to show', '', '22', 'input', 'csite_article_recent_max', '', '5', '', '', 1, 6, '', 0, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Max. length of topic titles', '', '22', 'input', 'csite_article_len', '', '30', '', '', 1, 7, '', 1, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Date format for articles', 'Same as PHP\'s date function', '22', 'input', 'csite_article_date', '', 'm-j-y H:i', '', '', 1, 3, '', 0, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Enable Recent Discussions', '', '22', 'yes_no', 'csite_discuss_on', '', '1', '', '', 1, 9, 'IPB Portal Recent Discussions', 0, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Max. no recent discussions to show', '', '22', 'input', 'csite_discuss_max', '', '10', '', '', 1, 10, '', 0, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Max. length of topic titles', '', '22', 'input', 'csite_discuss_len', '', '30', '', '', 1, 11, '', 1, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Show User / Guest Info box?', '', '22', 'yes_no', 'csite_pm_show', '', '1', '', '', 1, 12, 'IPB Portal Components', 0, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Show online users?', '', '22', 'yes_no', 'csite_online_show', '', '1', '', '', 1, 13, '', 0, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Show search box?', '', '22', 'yes_no', 'csite_search_show', '', '1', '', '', 1, 14, '', 0, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Enable skin selection choice dropdown?', '', '22', 'yes_no', 'csite_skinchange_show', '', '1', '', '', 1, 15, '', 0, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Enter URL to poll topic for inclusion', 'Leave blank to not show a poll or the poll box', '22', 'input', 'csite_poll_url', '', '', '', '', 1, 17, '', 0, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Show Site Navigation Menu?', '', '22', 'yes_no', 'csite_nav_show', '', '1', '', '', 1, 18, '', 0, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Site Navigation Menu Links', 'One per line in this format
    http://www.apple.com [Apple\'s Website]

    {board_url} will convert into your board', '22', 'textarea', 'csite_nav_contents', '', '{board_url} [Forums]\r\n{board_url}act=Search&do=getactive [Today\'s Active Topics]\r\n{board_url}act=Stats [Today\'s Top 10 Posters]\r\n{board_url}act=Stats&do=leaders [Contact Staff]', '', 'if ( $show == 1)\r\n{\r\n $value = preg_replace( \"/&(middot|quot|copy|amp)/\", \"&\\\\1\", $value );\r\n}', 1, 19, '', 0, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Show Affiliates / Favoured Sites box?', '', '22', 'yes_no', 'csite_fav_show', '', '0', '', '', 1, 20, '', 0, '', 0);"; -$SQL[] = "INSERT INTO ibf_conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Show Affiliates / Favoured Sites box content', 'Raw HTML enabled', '22', 'textarea', 'csite_fav_contents', '', '', '', 'if ( $show == 1)\r\n{\r\n $value = preg_replace( \"/&(middot|quot|copy|amp)/\", \"&\\\\1\", $value );\r\n}', 1, 21, '', 1, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('ENABLE IPB Portal?', 'If \'yes\', IPB Portal can be accessed via \'index.php?act=home\' or via the special \'index.php\' script (see documentation for more info).', '22', 'yes_no', 'csite_on', '', '1', '', '', 1, 1, '', 0, '', 1);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('IPB Portal Page Title?', 'This will appear inbetween the <title> elements on the page', '22', 'input', 'csite_title', '', 'IPB Portal', '', '', 1, 2, '', 0, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Forums to export articles from', 'Separate forum ids with a comma for more than one', '22', 'input', 'csite_article_forum', '1,2,3,4,5,6', '', '', '', 1, 3, '', 0, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Number of Articles to display in the main section', '', '22', 'input', 'csite_article_max', '', '15', '', '', 1, 4, '', 0, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Enable Recent Articles?', 'This will show a list of recent topic titles on the IPB Portal page', '22', 'yes_no', 'csite_article_recent_on', '', '1', '', '', 1, 5, 'IPB Portal Recent Articles', 0, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Max. no recent articles to show', '', '22', 'input', 'csite_article_recent_max', '', '5', '', '', 1, 6, '', 0, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Max. length of topic titles', '', '22', 'input', 'csite_article_len', '', '30', '', '', 1, 7, '', 1, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Date format for articles', '
    Same as PHP\'s date function', '22', 'input', 'csite_article_date', '', 'm-j-y H:i', '', '', 1, 3, '', 0, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Enable Recent Discussions', '', '22', 'yes_no', 'csite_discuss_on', '', '1', '', '', 1, 9, 'IPB Portal Recent Discussions', 0, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Max. no recent discussions to show', '', '22', 'input', 'csite_discuss_max', '', '10', '', '', 1, 10, '', 0, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Max. length of topic titles', '', '22', 'input', 'csite_discuss_len', '', '30', '', '', 1, 11, '', 1, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Show User / Guest Info box?', '', '22', 'yes_no', 'csite_pm_show', '', '1', '', '', 1, 12, 'IPB Portal Components', 0, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Show online users?', '', '22', 'yes_no', 'csite_online_show', '', '1', '', '', 1, 13, '', 0, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Show search box?', '', '22', 'yes_no', 'csite_search_show', '', '1', '', '', 1, 14, '', 0, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Enable skin selection choice dropdown?', '', '22', 'yes_no', 'csite_skinchange_show', '', '1', '', '', 1, 15, '', 0, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Enter URL to poll topic for inclusion', 'Leave blank to not show a poll or the poll box', '22', 'input', 'csite_poll_url', '', '', '', '', 1, 17, '', 0, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Show Site Navigation Menu?', '', '22', 'yes_no', 'csite_nav_show', '', '1', '', '', 1, 18, '', 0, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Site Navigation Menu Links', 'One per line in this format
    http://www.apple.com [Apple\'s Website]

    {board_url} will convert into your board', '22', 'textarea', 'csite_nav_contents', '', '{board_url} [Forums]\r\n{board_url}act=Search&do=getactive [Today\'s Active Topics]\r\n{board_url}act=Stats [Today\'s Top 10 Posters]\r\n{board_url}act=Stats&do=leaders [Contact Staff]', '', 'if ( $show == 1)\r\n{\r\n $value = preg_replace( \"/&(middot|quot|copy|amp)/\", \"&\\\\1\", $value );\r\n}', 1, 19, '', 0, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Show Affiliates / Favoured Sites box?', '', '22', 'yes_no', 'csite_fav_show', '', '0', '', '', 1, 20, '', 0, '', 0);"; +$SQL[] = "INSERT INTO conf_settings (conf_title, conf_description, conf_group, conf_type, conf_key, conf_value, conf_default, conf_extra, conf_evalphp, conf_protected, conf_position, conf_start_group, conf_end_group, conf_help_key, conf_add_cache) VALUES ('Show Affiliates / Favoured Sites box content', 'Raw HTML enabled', '22', 'textarea', 'csite_fav_contents', '', '', '', 'if ( $show == 1)\r\n{\r\n $value = preg_replace( \"/&(middot|quot|copy|amp)/\", \"&\\\\1\", $value );\r\n}', 1, 21, '', 1, '', 0);"; - - -?> \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_20005/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_20005/mysql_updates.php index d3c76074..44337dba 100644 --- a/upload/admin/applications/core/setup/versions/upg_20005/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_20005/mysql_updates.php @@ -2,15 +2,15 @@ /* +-------------------------------------------------------------------------- -| IP.Board v3.0.5 +| IP.Board v3.1.2 | ======================================== -| by Matthew Mecham -| (c) 2001 - 2004 Invision Power Services -| http://www.iinvisionpower.com -| ======================================== -| Web: http://www.iinvisionboard.com -| Email: matt@iinvisionpower.com -| Licence Info: http://www.iinvisionboard.com/?license +| by Matthew Mecham +| (c) 2001 - 2004 Invision Power Services +| http://www.invisionpower.com +| ======================================== +| Web: http://www.invisionboard.com +| Email: matt@invisionpower.com +| Licence Info: http://www.invisionboard.com/?license +--------------------------------------------------------------------------- | | > IPB UPGRADE MODULE:: IPB 2.0.0 PDR1 -> PDR 2 @@ -29,10 +29,6 @@ if ( ! defined( 'IN_IPB' ) ) $SQL = array(); -$SQL[] = "INSERT INTO ibf_task_manager (task_title, task_file, task_next_run, task_week_day, task_month_day, task_hour, task_minute, task_cronkey, task_log, task_description, task_enabled, task_key, task_safemode) VALUES ('Send Bulk Mail', 'bulkmail.php', 1086706080, -1, -1, -1, -1, '61359ac93eb93ebbd935a4e275ade2db', 0, 'Dynamically assigned, no need to edit or change', 0, 'bulkmail', 1);"; -$SQL[] = "INSERT INTO ibf_task_manager (task_title, task_file, task_next_run, task_week_day, task_month_day, task_hour, task_minute, task_cronkey, task_log, task_description, task_enabled, task_key, task_safemode) VALUES ('Daily Topic & Forum Digest', 'dailydigest.php', 1086912600, -1, -1, 0, 10, '723cab2aae32dd5d04898b1151038846', 1, 'Emails out daily topic & forum digest emails', 1, 'dailydigest', 0);"; -$SQL[] = "INSERT INTO ibf_task_manager (task_title, task_file, task_next_run, task_week_day, task_month_day, task_hour, task_minute, task_cronkey, task_log, task_description, task_enabled, task_key, task_safemode) VALUES ('Weekly Topic & Forum Digest', 'weeklydigest.php', 1087096200, 0, -1, 3, 10, '7e7fccd07f781bdb24ac108d26612931', 1, 'Emails weekly topic & forum digest emails', 1, 'weeklydigest', 0);"; - - - -?> \ No newline at end of file +$SQL[] = "INSERT INTO task_manager (task_title, task_file, task_next_run, task_week_day, task_month_day, task_hour, task_minute, task_cronkey, task_log, task_description, task_enabled, task_key, task_safemode) VALUES ('Send Bulk Mail', 'bulkmail.php', 1086706080, -1, -1, -1, -1, '61359ac93eb93ebbd935a4e275ade2db', 0, 'Dynamically assigned, no need to edit or change', 0, 'bulkmail', 1);"; +$SQL[] = "INSERT INTO task_manager (task_title, task_file, task_next_run, task_week_day, task_month_day, task_hour, task_minute, task_cronkey, task_log, task_description, task_enabled, task_key, task_safemode) VALUES ('Daily Topic & Forum Digest', 'dailydigest.php', 1086912600, -1, -1, 0, 10, '723cab2aae32dd5d04898b1151038846', 1, 'Emails out daily topic & forum digest emails', 1, 'dailydigest', 0);"; +$SQL[] = "INSERT INTO task_manager (task_title, task_file, task_next_run, task_week_day, task_month_day, task_hour, task_minute, task_cronkey, task_log, task_description, task_enabled, task_key, task_safemode) VALUES ('Weekly Topic & Forum Digest', 'weeklydigest.php', 1087096200, 0, -1, 3, 10, '7e7fccd07f781bdb24ac108d26612931', 1, 'Emails weekly topic & forum digest emails', 1, 'weeklydigest', 0);"; diff --git a/upload/admin/applications/core/setup/versions/upg_20007/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_20007/mysql_updates.php index 096eafb1..648394c0 100644 --- a/upload/admin/applications/core/setup/versions/upg_20007/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_20007/mysql_updates.php @@ -1,34 +1,32 @@ - IPB UPGRADE MODULE:: IPB 2.0.0 PF1 -> PF 2 -| > Script written by Matt Mecham -| > Date started: 23rd April 2004 -| > "So what, pop is dead - it's no great loss. - So many facelifts, it's face flew off" -+-------------------------------------------------------------------------- -*/ - -if ( ! defined( 'IN_IPB' ) ) -{ - print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -$SQL = array(); - -$SQL[] = "INSERT INTO ibf_custom_bbcode (bbcode_title, bbcode_desc, bbcode_tag, bbcode_replace, bbcode_useoption, bbcode_example) VALUES ('CODEBOX', 'Use this BBCode tag to show a scrolling codebox. Useful for long sections of code.', 'codebox', '
    CODE
    {content}
    ', 0, '[codebox]long_code_here = '';[/codebox]');"; - -?> \ No newline at end of file + IPB UPGRADE MODULE:: IPB 2.0.0 PF1 -> PF 2 +| > Script written by Matt Mecham +| > Date started: 23rd April 2004 +| > "So what, pop is dead - it's no great loss. + So many facelifts, it's face flew off" ++-------------------------------------------------------------------------- +*/ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +$SQL = array(); + +$SQL[] = "INSERT INTO custom_bbcode (bbcode_title, bbcode_desc, bbcode_tag, bbcode_replace, bbcode_useoption, bbcode_example) VALUES ('CODEBOX', 'Use this BBCode tag to show a scrolling codebox. Useful for long sections of code.', 'codebox', '
    CODE
    {content}
    ', 0, '[codebox]long_code_here = '';[/codebox]');"; diff --git a/upload/admin/applications/core/setup/versions/upg_20009/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_20009/mysql_updates.php index 0e349056..b44f64aa 100644 --- a/upload/admin/applications/core/setup/versions/upg_20009/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_20009/mysql_updates.php @@ -1,27 +1,26 @@ /p_up.gif\' border=\'0\' alt=\'Go to the top of the page\' />', 1, 1);"; -$SQL[] = "INSERT INTO ibf_skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('P_CARD', '/p_card.gif\' border=\'0\' alt=\'Profile Card\' />', 1, 1);"; -$SQL[] = "INSERT INTO ibf_skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('PRO_AIM', '/profile_aim.gif\' border=\'0\' alt=\'AIM\' />', 1, 1);"; -$SQL[] = "INSERT INTO ibf_skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('PRO_ITEM', '/profile_item.gif\' border=\'0\' alt=\'Profile Item\' />', 1, 1);"; -$SQL[] = "INSERT INTO ibf_skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('PRO_MSN', '/profile_msn.gif\' border=\'0\' alt=\'MSN\' />', 1, 1);"; -$SQL[] = "INSERT INTO ibf_skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('PRO_ICQ', '/profile_icq.gif\' border=\'0\' alt=\'ICQ\' />', 1, 1);"; -$SQL[] = "INSERT INTO ibf_skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('PRO_YIM', '/profile_yahoo.gif\' border=\'0\' alt=\'Yahoo\' />', 1, 1);"; -$SQL[] = "INSERT INTO ibf_skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('PRO_CONTACT', '/icon_msg_nonew.gif\' border=\'0\' alt=\'Contact\' />', 1, 1);"; -$SQL[] = "INSERT INTO ibf_skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('BAR_LEFT', '/bar_left.gif\' border=\'0\' alt=\'*\' />', 1, 1);"; -$SQL[] = "INSERT INTO ibf_skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('BAR_RIGHT', '/bar_right.gif\' border=\'0\' alt=\'*\' />', 1, 1);"; -$SQL[] = "INSERT INTO ibf_skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('CAL_GOTO', '/cal_goto.gif\' border=\'0\' alt=\'Goto Month\' />', 1, 1);"; -?> \ No newline at end of file +$SQL[] = "INSERT INTO skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('P_UP', '/p_up.gif\' border=\'0\' alt=\'Go to the top of the page\' />', 1, 1);"; +$SQL[] = "INSERT INTO skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('P_CARD', '/p_card.gif\' border=\'0\' alt=\'Profile Card\' />', 1, 1);"; +$SQL[] = "INSERT INTO skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('PRO_AIM', '/profile_aim.gif\' border=\'0\' alt=\'AIM\' />', 1, 1);"; +$SQL[] = "INSERT INTO skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('PRO_ITEM', '/profile_item.gif\' border=\'0\' alt=\'Profile Item\' />', 1, 1);"; +$SQL[] = "INSERT INTO skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('PRO_MSN', '/profile_msn.gif\' border=\'0\' alt=\'MSN\' />', 1, 1);"; +$SQL[] = "INSERT INTO skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('PRO_ICQ', '/profile_icq.gif\' border=\'0\' alt=\'ICQ\' />', 1, 1);"; +$SQL[] = "INSERT INTO skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('PRO_YIM', '/profile_yahoo.gif\' border=\'0\' alt=\'Yahoo\' />', 1, 1);"; +$SQL[] = "INSERT INTO skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('PRO_CONTACT', '/icon_msg_nonew.gif\' border=\'0\' alt=\'Contact\' />', 1, 1);"; +$SQL[] = "INSERT INTO skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('BAR_LEFT', '/bar_left.gif\' border=\'0\' alt=\'*\' />', 1, 1);"; +$SQL[] = "INSERT INTO skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('BAR_RIGHT', '/bar_right.gif\' border=\'0\' alt=\'*\' />', 1, 1);"; +$SQL[] = "INSERT INTO skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('CAL_GOTO', '/cal_goto.gif\' border=\'0\' alt=\'Goto Month\' />', 1, 1);"; diff --git a/upload/admin/applications/core/setup/versions/upg_20010/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_20010/mysql_updates.php index 9f35f500..91e412b4 100644 --- a/upload/admin/applications/core/setup/versions/upg_20010/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_20010/mysql_updates.php @@ -1,24 +1,23 @@ /profile_icq.gif\' border=\'0\' alt=\'ICQ\' />', 1, 1);"; +$SQL[] = "DELETE FROM skin_macro WHERE macro_value='PRO_ICQ' and macro_set=1"; +$SQL[] = "INSERT INTO skin_macro (macro_value, macro_replace, macro_can_remove, macro_set) VALUES ('PRO_ICQ', '/profile_icq.gif\' border=\'0\' alt=\'ICQ\' />', 1, 1);"; # Fix bug where "select * from members where temp_ban..." prevents NULL IS NOT NULL confusion -$SQL[] = "ALTER TABLE ibf_members change temp_ban temp_ban varchar(100) default '0'"; -?> \ No newline at end of file +$SQL[] = "ALTER TABLE members change temp_ban temp_ban varchar(100) default '0'"; diff --git a/upload/admin/applications/core/setup/versions/upg_20012/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_20012/mysql_updates.php index 0ee5b9e9..af46de01 100644 --- a/upload/admin/applications/core/setup/versions/upg_20012/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_20012/mysql_updates.php @@ -1,31 +1,30 @@ \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_21003/ipb_acpperms.xml b/upload/admin/applications/core/setup/versions/upg_21003/ipb_acpperms.xml deleted file mode 100644 index 8e0b25e7..00000000 --- a/upload/admin/applications/core/setup/versions/upg_21003/ipb_acpperms.xml +++ /dev/null @@ -1,845 +0,0 @@ - - - - - recache - tools - admin - - - - remove - admin - adminlog - - - - add - content - attach - - - - edit - content - attach - - - - remove - content - attach - - - - export - content - attach - - - - import - content - attach - - - - stats - content - attach - - - - search - content - attach - - - - bw-add - content - babw - - - - bw-remove - content - babw - - - - bw-edit - content - babw - - - - bw-export - content - babw - - - - bw-import - content - babw - - - - ban-view - content - babw - - - - ban-add - content - babw - - - - ban-remove - content - babw - - - - add - content - bbcode - - - - edit - content - bbcode - - - - remove - content - bbcode - - - - export - content - bbcode - - - - import - content - bbcode - - - - remove - content - calendars - - - - add - content - calendars - - - - edit - content - calendars - - - - recache - content - calendars - - - - add - admin - components - - - - edit - admin - components - - - - export - admin - components - - - - import - admin - components - - - - remove - admin - emailerror - - - - remove - admin - emaillog - - - - export - lookandfeel - emoticons - - - - import - lookandfeel - emoticons - - - - edit - lookandfeel - emoticons - - - - add - lookandfeel - emoticons - - - - remove - lookandfeel - emoticons - - - - upload - lookandfeel - emoticons - - - - add - content - forum - - - - edit - content - forum - - - - permedit - content - forum - - - - reorder - content - forum - - - - remove - content - forum - - - - recount - content - forum - - - - empty - content - forum - - - - rules - content - forum - - - - skin - content - forum - - - - add - content - group - - - - edit - content - group - - - - remove - content - group - - - - perms - content - group - - - - edit - tools - help - - - - add - tools - help - - - - remove - tools - help - - - - add - lookandfeel - lang - - - - edit - lookandfeel - lang - - - - remove - lookandfeel - lang - - - - export - lookandfeel - lang - - - - import - lookandfeel - lang - - - - add - tools - login - - - - edit - tools - login - - - - diagnostics - tools - login - - - - export - tools - login - - - - import - tools - login - - - - edit - content - mem - - - - suspend - content - mem - - - - add - content - mem - - - - remove - content - mem - - - - title-view - content - mem - - - - title-edit - content - mem - - - - title-add - content - mem - - - - title-remove - content - mem - - - - mod - content - mem - - - - ban - content - mem - - - - view - content - mtools - - - - add - content - mod - - - - edit - content - mod - - - - remove - content - mod - - - - remove - admin - modlog - - - - add - content - multimod - - - - edit - content - multimod - - - - remove - content - multimod - - - - install - content - msubs - - - - edit - content - msubs - - - - remove - content - msubs - - - - add - content - msubs - - - - search - content - msubs - - - - edit - tools - portal - - - - add - tools - postoffice - - - - edit - tools - postoffice - - - - send - tools - postoffice - - - - remove - tools - postoffice - - - - add - content - field - - - - edit - content - field - - - - remove - content - field - - - - recount - tools - rebuild - - - - rebuild - tools - rebuild - - - - add - content - rssexport - - - - edit - content - rssexport - - - - recache - content - rssexport - - - - remove - content - rssexport - - - - add - content - rssimport - - - - edit - content - rssimport - - - - recache - content - rssimport - - - - remove - content - rssimport - - - - edit - tools - op - - - - remove - tools - op - - - - add - tools - op - - - - export - tools - op - - - - search - tools - op - - - - import - tools - op - - - - edit - lookandfeel - style - - - - rundiff - lookandfeel - skindiff - - - - export - lookandfeel - skindiff - - - - remove - lookandfeel - skindiff - - - - export - lookandfeel - import - - - - import - lookandfeel - import - - - - edit - lookandfeel - image - - - - remove - lookandfeel - image - - - - add - lookandfeel - image - - - - add - lookandfeel - sets - - - - edit - lookandfeel - sets - - - - remove - lookandfeel - sets - - - - rebuild - lookandfeel - sets - - - - edit - lookandfeel - templ - - - - remove - lookandfeel - templ - - - - add - lookandfeel - templ - - - - edit - lookandfeel - wrap - - - - recache - lookandfeel - skintools - - - - changemember - lookandfeel - skintools - - - - search - lookandfeel - skintools - - - - remove - admin - spiderlog - - - - show - admin - stats - - - - edit - tools - task - - - - add - tools - task - - - - remove - tools - task - - - - runnow - tools - task - - - - log - tools - task - - - - view - admin - warnlog - - - - remove - admin - warnlog - - - - \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates.php index b2feafe5..3b9983e3 100644 --- a/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates.php @@ -1,15 +1,15 @@ \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates_1.php b/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates_1.php index 3608be44..f3f13a60 100644 --- a/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates_1.php +++ b/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates_1.php @@ -1,38 +1,37 @@ \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates_2.php b/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates_2.php index 11b059d1..8b8bcac1 100644 --- a/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates_2.php +++ b/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates_2.php @@ -1,30 +1,29 @@ \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates_3.php b/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates_3.php index e34cbb07..367265ea 100644 --- a/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates_3.php +++ b/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates_3.php @@ -1,44 +1,42 @@ \ No newline at end of file +$SQL[] = "ALTER TABLE search_results ADD PRIMARY KEY(id);"; +$SQL[] = "ALTER TABLE search_results ADD INDEX search_date(search_date);"; diff --git a/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates_4.php b/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates_4.php index f48de96a..92f925fd 100644 --- a/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates_4.php +++ b/upload/admin/applications/core/setup/versions/upg_21003/mysql_updates_4.php @@ -1,55 +1,54 @@ , '', 'a:3:{s:9:\"perm_read\";s:1:\"*\";s:9:\"perm_post\";s:3:\"4,3\";s:10:\"perm_nomod\";s:0:\"\";}');"; +$SQL[] = "INSERT INTO cal_calendars (cal_id, cal_title, cal_moderate, cal_position, cal_event_limit, cal_bday_limit, cal_rss_export, cal_rss_export_days, cal_rss_export_max, cal_rss_update, cal_rss_update_last, cal_rss_cache, cal_permissions) VALUES (1, 'Community Calendar', 1, 0, 2, 1, 1, 14, 20, 1440, <%time%>, '', 'a:3:{s:9:\"perm_read\";s:1:\"*\";s:9:\"perm_post\";s:3:\"4,3\";s:10:\"perm_nomod\";s:0:\"\";}');"; -$SQL[] ="INSERT INTO ibf_login_methods (login_id, login_title, login_description, login_folder_name, login_maintain_url, login_register_url, login_type, login_alt_login_html, login_date, login_settings, login_enabled, login_safemode, login_installed, login_replace_form, login_allow_create) VALUES (1, 'IPB Internal', 'The standard method of authentication', 'internal', '', '', 'passthrough', '', <%time%>, 0, 1, 1, 1, 0, 1);"; -$SQL[] ="INSERT INTO ibf_login_methods (login_id, login_title, login_description, login_folder_name, login_maintain_url, login_register_url, login_type, login_alt_login_html, login_date, login_settings, login_enabled, login_safemode, login_installed, login_replace_form, login_allow_create) VALUES (2, 'LDAP Authentication', 'LDAP / Active Directory Authentication', 'ldap', '', '', 'passthrough', '', <%time%>, 0, 0, 1, 0, 0, 1);"; -$SQL[] ="INSERT INTO ibf_login_methods (login_id, login_title, login_description, login_folder_name, login_maintain_url, login_register_url, login_type, login_alt_login_html, login_date, login_settings, login_enabled, login_safemode, login_installed, login_replace_form, login_allow_create) VALUES (3, 'External Database', 'Authentication via an external database', 'external', '', '', 'passthrough', '', <%time%>, 0, 0, 1, 0, 0, 1);"; +$SQL[] = "INSERT INTO login_methods (login_id, login_title, login_description, login_folder_name, login_maintain_url, login_register_url, login_type, login_alt_login_html, login_date, login_settings, login_enabled, login_safemode, login_installed, login_replace_form, login_allow_create) VALUES (1, 'IPB Internal', 'The standard method of authentication', 'internal', '', '', 'passthrough', '', <%time%>, 0, 1, 1, 1, 0, 1);"; +$SQL[] = "INSERT INTO login_methods (login_id, login_title, login_description, login_folder_name, login_maintain_url, login_register_url, login_type, login_alt_login_html, login_date, login_settings, login_enabled, login_safemode, login_installed, login_replace_form, login_allow_create) VALUES (2, 'LDAP Authentication', 'LDAP / Active Directory Authentication', 'ldap', '', '', 'passthrough', '', <%time%>, 0, 0, 1, 0, 0, 1);"; +$SQL[] = "INSERT INTO login_methods (login_id, login_title, login_description, login_folder_name, login_maintain_url, login_register_url, login_type, login_alt_login_html, login_date, login_settings, login_enabled, login_safemode, login_installed, login_replace_form, login_allow_create) VALUES (3, 'External Database', 'Authentication via an external database', 'external', '', '', 'passthrough', '', <%time%>, 0, 0, 1, 0, 0, 1);"; -$SQL[] ="INSERT INTO ibf_task_manager VALUES ('', 'Update Topic Views Counter', 'updateviews.php', <%time%>, -1, -1, 3, -1, 'ddce954b5ba1c163bc627ca20725b595', 0, 'Used when topic views are not incremented immediately', 1, 'updateviews', 0, 0);"; -$SQL[] ="INSERT INTO ibf_task_manager VALUES ('', 'Subscription Expiration Notification', 'expiresubs.php', <%time%>, -1, -1, 1, 0, '21fa5f52cf9122c6fe940e1c6dac0b5a', 1, 'Sends out an email to all members who have a subscription due to expire', 1, 'expiresubs', 0, 0);"; -$SQL[] ="INSERT INTO ibf_task_manager VALUES ('', 'RSS Import Update', 'rssimport.php', <%time%>, -1, -1, -1, 30, '8f17dc0ba334e5f18e762f154365a578', 0, 'Imports any new RSS articles', 1, 'rssimport', 1, 0);"; +$SQL[] = "INSERT INTO task_manager VALUES ('', 'Update Topic Views Counter', 'updateviews.php', <%time%>, -1, -1, 3, -1, 'ddce954b5ba1c163bc627ca20725b595', 0, 'Used when topic views are not incremented immediately', 1, 'updateviews', 0, 0);"; +$SQL[] = "INSERT INTO task_manager VALUES ('', 'Subscription Expiration Notification', 'expiresubs.php', <%time%>, -1, -1, 1, 0, '21fa5f52cf9122c6fe940e1c6dac0b5a', 1, 'Sends out an email to all members who have a subscription due to expire', 1, 'expiresubs', 0, 0);"; +$SQL[] = "INSERT INTO task_manager VALUES ('', 'RSS Import Update', 'rssimport.php', <%time%>, -1, -1, -1, 30, '8f17dc0ba334e5f18e762f154365a578', 0, 'Imports any new RSS articles', 1, 'rssimport', 1, 0);"; -$SQL[] = "INSERT INTO ibf_task_manager (task_title, task_file, task_next_run, task_week_day, task_month_day, task_hour, task_minute, task_cronkey, task_log, task_description, task_enabled, task_key, task_safemode) VALUES ('Expire Paid Subscriptions', 'doexpiresubs.php', 1121212800, -1, -1, 0, 0, 'bb57399ea05eb9240b42d5d5f53575fb', 1, 'Unsubscribes members from their subscribed packages', 1, 'doexpiresubs', 1)"; +$SQL[] = "INSERT INTO task_manager (task_title, task_file, task_next_run, task_week_day, task_month_day, task_hour, task_minute, task_cronkey, task_log, task_description, task_enabled, task_key, task_safemode) VALUES ('Expire Paid Subscriptions', 'doexpiresubs.php', 1121212800, -1, -1, 0, 0, 'bb57399ea05eb9240b42d5d5f53575fb', 1, 'Unsubscribes members from their subscribed packages', 1, 'doexpiresubs', 1)"; -$SQL[] ="INSERT INTO ibf_components (com_id, com_title, com_author, com_url, com_version, com_date_added, com_menu_data, com_enabled, com_safemode, com_section, com_filename, com_description, com_url_title, com_url_uri, com_position) VALUES (1, 'Invision Gallery', 'Invision Power Services', '', '1.3.0', 1113309894, 'a:1:{i:1;a:5:{s:9:\"menu_text\";s:24:\"Purchase and Information\";s:8:\"menu_url\";s:9:\"code=show\";s:13:\"menu_redirect\";i:0;s:12:\"menu_permbit\";s:0:\"\";s:13:\"menu_permlang\";s:0:\"\";}}', 0, 1, 'gallery', 'gallery', 'Complete gallery system for your members', '{ipb.lang[\'gallery\']}', '{ipb.base_url}act=module&module=gallery', 1);"; -$SQL[] ="INSERT INTO ibf_components (com_id, com_title, com_author, com_url, com_version, com_date_added, com_menu_data, com_enabled, com_safemode, com_section, com_filename, com_description, com_url_title, com_url_uri, com_position) VALUES (2, 'Invision Community Blog', 'Invision Power Services', '', '1.1.2', 1113310263, 'a:1:{i:1;a:5:{s:9:\"menu_text\";s:24:\"Purchase and Information\";s:8:\"menu_url\";s:9:\"code=show\";s:13:\"menu_redirect\";i:0;s:12:\"menu_permbit\";s:0:\"\";s:13:\"menu_permlang\";s:0:\"\";}}', 0, 1, 'blog', 'blog', 'Blogging addition for your members', '{ipb.lang[\'blog\']}', '{ipb.base_url}automodule=blog', -1);"; -$SQL[] ="INSERT INTO ibf_components (com_id, com_title, com_author, com_url, com_version, com_date_added, com_menu_data, com_enabled, com_safemode, com_section, com_filename, com_description, com_url_title, com_url_uri, com_position) VALUES (3, 'Invision Chat (ParaChat)', 'Invision Power Services', '', '2.1', 1113313895, 'a:1:{i:1;a:5:{s:9:\"menu_text\";s:24:\"Purchase and Information\";s:8:\"menu_url\";s:9:\"code=show\";s:13:\"menu_redirect\";i:0;s:12:\"menu_permbit\";s:0:\"\";s:13:\"menu_permlang\";s:0:\"\";}}', 0, 1, 'chatpara', 'chatpara', 'Full real-time chat system for your members', '{ipb.lang[\'live_chat\']}', '{ipb.base_url}autocom=chatpara', 2);"; -$SQL[] ="INSERT INTO ibf_components (com_id, com_title, com_author, com_url, com_version, com_date_added, com_menu_data, com_enabled, com_safemode, com_section, com_filename, com_description, com_url_title, com_url_uri, com_position) VALUES (4, 'Invision Copyright Removal', 'Invision Power Services', '', '2.1', 1113314009, 'a:1:{i:1;a:5:{s:9:\"menu_text\";s:24:\"Purchase and Information\";s:8:\"menu_url\";s:9:\"code=show\";s:13:\"menu_redirect\";i:0;s:12:\"menu_permbit\";s:0:\"\";s:13:\"menu_permlang\";s:0:\"\";}}', 1, 1, 'copyright', 'copyright', 'Allows the copyright notices to be removed from the board\'s output', '', '', 3);"; +$SQL[] = "INSERT INTO components (com_id, com_title, com_author, com_url, com_version, com_date_added, com_menu_data, com_enabled, com_safemode, com_section, com_filename, com_description, com_url_title, com_url_uri, com_position) VALUES (1, 'Invision Gallery', 'Invision Power Services', '', '1.3.0', 1113309894, 'a:1:{i:1;a:5:{s:9:\"menu_text\";s:24:\"Purchase and Information\";s:8:\"menu_url\";s:9:\"code=show\";s:13:\"menu_redirect\";i:0;s:12:\"menu_permbit\";s:0:\"\";s:13:\"menu_permlang\";s:0:\"\";}}', 0, 1, 'gallery', 'gallery', 'Complete gallery system for your members', '{ipb.lang[\'gallery\']}', '{ipb.base_url}act=module&module=gallery', 1);"; +$SQL[] = "INSERT INTO components (com_id, com_title, com_author, com_url, com_version, com_date_added, com_menu_data, com_enabled, com_safemode, com_section, com_filename, com_description, com_url_title, com_url_uri, com_position) VALUES (2, 'Invision Community Blog', 'Invision Power Services', '', '1.1.2', 1113310263, 'a:1:{i:1;a:5:{s:9:\"menu_text\";s:24:\"Purchase and Information\";s:8:\"menu_url\";s:9:\"code=show\";s:13:\"menu_redirect\";i:0;s:12:\"menu_permbit\";s:0:\"\";s:13:\"menu_permlang\";s:0:\"\";}}', 0, 1, 'blog', 'blog', 'Blogging addition for your members', '{ipb.lang[\'blog\']}', '{ipb.base_url}automodule=blog', -1);"; +$SQL[] = "INSERT INTO components (com_id, com_title, com_author, com_url, com_version, com_date_added, com_menu_data, com_enabled, com_safemode, com_section, com_filename, com_description, com_url_title, com_url_uri, com_position) VALUES (3, 'Invision Chat (ParaChat)', 'Invision Power Services', '', '2.1', 1113313895, 'a:1:{i:1;a:5:{s:9:\"menu_text\";s:24:\"Purchase and Information\";s:8:\"menu_url\";s:9:\"code=show\";s:13:\"menu_redirect\";i:0;s:12:\"menu_permbit\";s:0:\"\";s:13:\"menu_permlang\";s:0:\"\";}}', 0, 1, 'chatpara', 'chatpara', 'Full real-time chat system for your members', '{ipb.lang[\'live_chat\']}', '{ipb.base_url}autocom=chatpara', 2);"; +$SQL[] = "INSERT INTO components (com_id, com_title, com_author, com_url, com_version, com_date_added, com_menu_data, com_enabled, com_safemode, com_section, com_filename, com_description, com_url_title, com_url_uri, com_position) VALUES (4, 'Invision Copyright Removal', 'Invision Power Services', '', '2.1', 1113314009, 'a:1:{i:1;a:5:{s:9:\"menu_text\";s:24:\"Purchase and Information\";s:8:\"menu_url\";s:9:\"code=show\";s:13:\"menu_redirect\";i:0;s:12:\"menu_permbit\";s:0:\"\";s:13:\"menu_permlang\";s:0:\"\";}}', 1, 1, 'copyright', 'copyright', 'Allows the copyright notices to be removed from the board\'s output', '', '', 3);"; -$SQL[] ="DELETE FROM ibf_conf_settings WHERE conf_key IN ( 'csite_article_forum' , 'csite_article_max', 'csite_article_recent_on', +$SQL[] = "DELETE FROM conf_settings WHERE conf_key IN ( 'csite_article_forum' , 'csite_article_max', 'csite_article_recent_on', 'csite_article_recent_max', 'csite_article_len', 'csite_discuss_on', 'csite_discuss_max' , 'csite_discuss_len', 'csite_poll_url', 'csite_online_show', 'poll_disable_noreply' );"; # UPDATE KNOWN CONF_TITLE KEYS -$SQL[] = "UPDATE ibf_conf_settings_titles SET conf_title_keyword='general' WHERE conf_title_id=1"; -$SQL[] = "UPDATE ibf_conf_settings_titles SET conf_title_keyword='boardoffline' WHERE conf_title_id=15"; -$SQL[] = "UPDATE ibf_conf_settings_titles SET conf_title_keyword='calendar' WHERE conf_title_id=9"; -$SQL[] = "UPDATE ibf_conf_settings_titles SET conf_title_keyword='converge' WHERE conf_title_id=18"; -$SQL[] = "UPDATE ibf_conf_settings_titles SET conf_title_keyword='coppa' WHERE conf_title_id=8"; -$SQL[] = "UPDATE ibf_conf_settings_titles SET conf_title_keyword='cpusaving' WHERE conf_title_id=2"; -$SQL[] = "UPDATE ibf_conf_settings_titles SET conf_title_keyword='date' WHERE conf_title_id=3"; -$SQL[] = "UPDATE ibf_conf_settings_titles SET conf_title_keyword='email' WHERE conf_title_id=12"; -$SQL[] = "UPDATE ibf_conf_settings_titles SET conf_title_keyword='searchsetup' WHERE conf_title_id=19"; - -?> \ No newline at end of file +$SQL[] = "UPDATE conf_settings_titles SET conf_title_keyword='general' WHERE conf_title_id=1"; +$SQL[] = "UPDATE conf_settings_titles SET conf_title_keyword='boardoffline' WHERE conf_title_id=15"; +$SQL[] = "UPDATE conf_settings_titles SET conf_title_keyword='calendar' WHERE conf_title_id=9"; +$SQL[] = "UPDATE conf_settings_titles SET conf_title_keyword='converge' WHERE conf_title_id=18"; +$SQL[] = "UPDATE conf_settings_titles SET conf_title_keyword='coppa' WHERE conf_title_id=8"; +$SQL[] = "UPDATE conf_settings_titles SET conf_title_keyword='cpusaving' WHERE conf_title_id=2"; +$SQL[] = "UPDATE conf_settings_titles SET conf_title_keyword='date' WHERE conf_title_id=3"; +$SQL[] = "UPDATE conf_settings_titles SET conf_title_keyword='email' WHERE conf_title_id=12"; +$SQL[] = "UPDATE conf_settings_titles SET conf_title_keyword='searchsetup' WHERE conf_title_id=19"; diff --git a/upload/admin/applications/core/setup/versions/upg_21003/version_upgrade.php b/upload/admin/applications/core/setup/versions/upg_21003/version_upgrade.php index 4fdb9217..a562c3cb 100644 --- a/upload/admin/applications/core/setup/versions/upg_21003/version_upgrade.php +++ b/upload/admin/applications/core/setup/versions/upg_21003/version_upgrade.php @@ -2,15 +2,15 @@ /* +-------------------------------------------------------------------------- -| IP.Board v3.0.5 +| IP.Board v3.1.2 | ======================================== -| by Matthew Mecham -| (c) 2001 - 2004 Invision Power Services -| http://www.iinvisionpower.com -| ======================================== -| Web: http://www.iinvisionboard.com -| Email: matt@iinvisionpower.com -| Licence Info: http://www.iinvisionboard.com/?license +| by Matthew Mecham +| (c) 2001 - 2004 Invision Power Services +| http://www.invisionpower.com +| ======================================== +| Web: http://www.invisionboard.com +| Email: matt@invisionpower.com +| Licence Info: http://www.invisionboard.com/?license +--------------------------------------------------------------------------- | | > IPB UPGRADE MODULE:: IPB 2.0.2 -> IPB 2.0.3 @@ -154,9 +154,14 @@ class version_upgrade $output .= preg_replace( "/\s{1,}/", " ", $query ) . "\n\n"; } else - { + { + if( ! $query ) + { + continue; + } + $this->DB->query( $query ); - + if ( $this->DB->error ) { $this->registry->output->addError( $query."

    ".$this->DB->error ); @@ -168,7 +173,7 @@ class version_upgrade } } - $this->registry->output->addMessage("$this->sqlcount запросов выполнено...."); + $this->registry->output->addMessage("{$this->sqlcount} запросов выполнено...."); } //-------------------------------- @@ -189,7 +194,13 @@ class version_upgrade if ( IPSSetUp::getSavedData('man') AND $output ) { - $this->_output = $this->registry->output->template()->upgrade_manual_queries( $output ); + /* Create source file */ + if ( $this->registry->dbFunctions()->getDriverType() == 'mysql' ) + { + $sourceFile = IPSSetUp::createSqlSourceFile( $output, '21003', $id ); + } + + $this->_output = $this->registry->output->template()->upgrade_manual_queries( $output, $sourceFile ); } } diff --git a/upload/admin/applications/core/setup/versions/upg_21004/ipb_acpperms.xml b/upload/admin/applications/core/setup/versions/upg_21004/ipb_acpperms.xml deleted file mode 100644 index abb54960..00000000 --- a/upload/admin/applications/core/setup/versions/upg_21004/ipb_acpperms.xml +++ /dev/null @@ -1,845 +0,0 @@ - - - - - recache - tools - admin - - - - remove - admin - adminlog - - - - add - content - attach - - - - edit - content - attach - - - - remove - content - attach - - - - export - content - attach - - - - import - content - attach - - - - stats - content - attach - - - - search - content - attach - - - - bw-add - content - babw - - - - bw-remove - content - babw - - - - bw-edit - content - babw - - - - bw-export - content - babw - - - - bw-import - content - babw - - - - ban-view - content - babw - - - - ban-add - content - babw - - - - ban-remove - content - babw - - - - add - content - bbcode - - - - edit - content - bbcode - - - - remove - content - bbcode - - - - export - content - bbcode - - - - import - content - bbcode - - - - remove - content - calendars - - - - add - content - calendars - - - - edit - content - calendars - - - - recache - content - calendars - - - - add - admin - components - - - - edit - admin - components - - - - export - admin - components - - - - import - admin - components - - - - remove - admin - emailerror - - - - remove - admin - emaillog - - - - export - lookandfeel - emoticons - - - - import - lookandfeel - emoticons - - - - edit - lookandfeel - emoticons - - - - add - lookandfeel - emoticons - - - - remove - lookandfeel - emoticons - - - - upload - lookandfeel - emoticons - - - - add - content - forum - - - - edit - content - forum - - - - permedit - content - forum - - - - reorder - content - forum - - - - remove - content - forum - - - - recount - content - forum - - - - empty - content - forum - - - - rules - content - forum - - - - skin - content - forum - - - - add - content - group - - - - edit - content - group - - - - remove - content - group - - - - perms - content - group - - - - edit - tools - help - - - - add - tools - help - - - - remove - tools - help - - - - add - lookandfeel - lang - - - - edit - lookandfeel - lang - - - - remove - lookandfeel - lang - - - - export - lookandfeel - lang - - - - import - lookandfeel - lang - - - - add - tools - loginauth - - - - edit - tools - loginauth - - - - diagnostics - tools - loginauth - - - - export - tools - loginauth - - - - import - tools - loginauth - - - - edit - content - mem - - - - suspend - content - mem - - - - add - content - mem - - - - remove - content - mem - - - - title-view - content - mem - - - - title-edit - content - mem - - - - title-add - content - mem - - - - title-remove - content - mem - - - - mod - content - mem - - - - ban - content - mem - - - - view - content - mtools - - - - add - content - mod - - - - edit - content - mod - - - - remove - content - mod - - - - remove - admin - modlog - - - - add - content - multimod - - - - edit - content - multimod - - - - remove - content - multimod - - - - install - content - msubs - - - - edit - content - msubs - - - - remove - content - msubs - - - - add - content - msubs - - - - search - content - msubs - - - - edit - tools - portal - - - - add - tools - postoffice - - - - edit - tools - postoffice - - - - send - tools - postoffice - - - - remove - tools - postoffice - - - - add - content - field - - - - edit - content - field - - - - remove - content - field - - - - recount - tools - rebuild - - - - rebuild - tools - rebuild - - - - add - content - rssexport - - - - edit - content - rssexport - - - - recache - content - rssexport - - - - remove - content - rssexport - - - - add - content - rssimport - - - - edit - content - rssimport - - - - recache - content - rssimport - - - - remove - content - rssimport - - - - edit - tools - op - - - - remove - tools - op - - - - add - tools - op - - - - export - tools - op - - - - search - tools - op - - - - import - tools - op - - - - edit - lookandfeel - style - - - - rundiff - lookandfeel - skindiff - - - - export - lookandfeel - skindiff - - - - remove - lookandfeel - skindiff - - - - export - lookandfeel - import - - - - import - lookandfeel - import - - - - edit - lookandfeel - image - - - - remove - lookandfeel - image - - - - add - lookandfeel - image - - - - add - lookandfeel - sets - - - - edit - lookandfeel - sets - - - - remove - lookandfeel - sets - - - - rebuild - lookandfeel - sets - - - - edit - lookandfeel - templ - - - - remove - lookandfeel - templ - - - - add - lookandfeel - templ - - - - edit - lookandfeel - wrap - - - - recache - lookandfeel - skintools - - - - changemember - lookandfeel - skintools - - - - search - lookandfeel - skintools - - - - remove - admin - spiderlog - - - - show - admin - stats - - - - edit - tools - task - - - - add - tools - task - - - - remove - tools - task - - - - runnow - tools - task - - - - log - tools - task - - - - view - admin - warnlog - - - - remove - admin - warnlog - - - - \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_21005/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_21005/mysql_updates.php index 990e16d8..6d1021bf 100644 --- a/upload/admin/applications/core/setup/versions/upg_21005/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_21005/mysql_updates.php @@ -1,29 +1,28 @@ \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_21007/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_21007/mysql_updates.php index 55f4f5e6..b56ffcfb 100644 --- a/upload/admin/applications/core/setup/versions/upg_21007/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_21007/mysql_updates.php @@ -1,22 +1,21 @@ \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_21007/version_upgrade.php b/upload/admin/applications/core/setup/versions/upg_21007/version_upgrade.php index 2d5253c1..7e82e54e 100644 --- a/upload/admin/applications/core/setup/versions/upg_21007/version_upgrade.php +++ b/upload/admin/applications/core/setup/versions/upg_21007/version_upgrade.php @@ -2,15 +2,15 @@ /* +-------------------------------------------------------------------------- -| IP.Board v3.0.5 +| IP.Board v3.1.2 | ======================================== -| by Matthew Mecham -| (c) 2001 - 2004 Invision Power Services -| http://www.iinvisionpower.com -| ======================================== -| Web: http://www.iinvisionboard.com -| Email: matt@iinvisionpower.com -| Licence Info: http://www.iinvisionboard.com/?license +| by Matthew Mecham +| (c) 2001 - 2004 Invision Power Services +| http://www.invisionpower.com +| ======================================== +| Web: http://www.invisionboard.com +| Email: matt@invisionpower.com +| Licence Info: http://www.invisionboard.com/?license +--------------------------------------------------------------------------- */ diff --git a/upload/admin/applications/core/setup/versions/upg_21008/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_21008/mysql_updates.php index 68fe68a6..946e450f 100644 --- a/upload/admin/applications/core/setup/versions/upg_21008/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_21008/mysql_updates.php @@ -1,26 +1,25 @@ \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_21009/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_21009/mysql_updates.php index 437dc85f..e1f04534 100644 --- a/upload/admin/applications/core/setup/versions/upg_21009/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_21009/mysql_updates.php @@ -1,49 +1,47 @@ \r
    During registration, the administrator requires that you supply a valid email address. This is important as the administrator may require that you validate your registration via an email. If this is the case, you will be notified when registering. If your e-mail does not arrive, then on the member bar at the top of the page, there will be a link that will allow you to re-send the validation e-mail. \r
    \r
    In some cases, the administrator will need to approve your registration before you can use your member account fully. If this is the case you will be notified during registration.\r
    \r
    Once you have registered and logged in, you will have access to your personal messenger and your control panel.\r
    \r
    For more information on these items, please see the relevant sections in this documentation.', description='How to register and the added benefits of being a registered member.' WHERE id=1"; -$UPDATES[] = "UPDATE ibf_faq SET title='Cookies and cookie usage', text='Using cookies is optional, but strongly recommended. Cookies are used to track topics, showing you which topics have new replies since your last visit and to automatically log you in when you return.\r
    \r
    If your computer is unable to use the cookie system to browse the board correctly, then the board will automatically add in a session ID to each link to track you around the board.\r
    \r
    Clearing Cookies\r
    \r
    You can clear the cookies at any time by clicking on the link found at the bottom of the main board page (the first page you see when returning to the board). If this does not work for you, you may need to remove the cookies manually.\r
    \r
    Removing Cookies in Internet Explorer for Windows\r
    \r
      \r
    • Close all open Internet Explorer Windows\r
    • Click on the \'start\' button\r
    • Move up to \'Find\' and click on \'Files and Folders\'\r
    • When the new window appears, type in the domain name of the board you are using into the \'containing text\' field. (If the boards address was \'\' you would enter \'\' without the quotes)\r
    • In the \'look in\' box, type in C:WindowsCookies and press \'Find Now\'\r
    • After it has finished searching, highlight all files (click on a file then press CTRL+A) and delete them.\r
    \r
    \r
    Removing Cookies in Internet Explorer for Macintosh\r
    \r
      \r
    • With Internet Explorer active, choose \'Edit\' and then \'Preferences\' from the Macintosh menu bar at the top of the screen\r
    • When the preferences panel opens, choose \'Cookies\' found in the \'Receiving Files\' section.\r
    • When the cookie pane loads, look for the domain name of the board (If the boards address was \'\' look for \'\' or \'\'\r
    • For each cookie, click on the entry and press the delete button.\r
    \r
    \r
    Your cookies should now be removed. In some cases you may need to restart your computer for the changes to take effect.', description='The benefits of using cookies and how to remove cookies set by this board.' WHERE id=2"; -$UPDATES[] = "UPDATE ibf_faq SET title='Recovering lost or forgotten passwords', text='Security is a big feature on this board, and to that end, all passwords are encrypted when you register.\r
    This means that we cannot email your password to you as we hold no record of your \'uncrypted\' password. You can however, apply to have your password reset.\r
    \r
    To do this, click on the
    Lost Password link found on the log in page.\r
    \r
    Further instruction is available from there.', description='How to reset your password if you\'ve forgotten it.' WHERE id=3"; -$UPDATES[] = "UPDATE ibf_faq SET title='Your Control Panel (My Controls)', text='Your control panel is your own private board console. You can change how the board looks and feels as well as your own information from here.\r
    \r
    Subscriptions\r
    \r
    This is where you manage your topic and forums subscriptions. Please see the help file \'Email Notification of new messages\' for more information on how to subscribe to topics.\r
    \r
    Edit Profile Info\r
    \r
    This section allows you to add or edit your contact information and enter some personal information if you choose.\r
    \r
    Edit Signature\r
    \r
    A board \'signature\' is very similar to an email signature. This signature is attached to the foot of every message you post unless you choose to check the box that allows you to ommit the signature in the message you are posting. You may use BB Code if available and in some cases, pure HTML (if the board administrator allows it).\r
    \r
    Edit Avatar Settings\r
    \r
    An avatar is a little image that appears under your username when you view a topic or post you authored. If the administrator allows, you may either choose from the board gallery, enter a URL to an avatar stored on your server or upload an avatar to use. You may also set the width of the avatar to ensure that it\'s sized in proportion.\r
    \r
    Change Personal Photo\r
    \r
    This section will allow you to add a photograph to your profile. This will be displayed when a user clicks to view your profile, on the mini-profile screen and will also be linked to from the member list.\r
    \r
    Email Settings\r
    \r
    Hide my email address allows you to deny the ability for other users to send you an email from the board.\r
    Send me updates sent by the board administrator will allow the administrator to include your email address in any mailings they send out - this is used mostly for important updates and community information.\r
    Include a copy of the post when emailing me from a subscribed topic, this allows you to have the new post included in any reply to topic notifications.\r
    Send a confirmation email when I receive a new private message, this will send you an e-mail notification to your registered e-mail address each time you receive a private message on the board.\r
    Enable \'Email Notification\' by default?, this will automatically subscribe you to any topic that you make a reply to. You may unsubscribe from the \'Subscriptions\' section of My Controls if you wish.\r
    \r
    Board Settings\r
    \r
    From this section, you can set your time zone, choose to not see users signatures, avatars and posted images.\r
    You can choose to get a pop up window informing you when you have a new message and choose to show or hide the \'Fast Reply\' box where it is enabled.\r
    You are also able to choose display preferences for the number of topics/posts shown per page on the board.\r
    \r
    Change Email Address\r
    \r
    At any time, you can change the email address that is registered to your account. In some cases, you will need to revalidate your account after changing your email address. If this is the case, you will be notified before your email address change is processed.\r
    \r
    Change Password\r
    \r
    You may change your password from this section. Please note that you will need to know your current password before you can change your password.', description='Editing contact information, personal information, avatars, signatures, board settings, languages and style choices.' WHERE id=4"; -$UPDATES[] = "UPDATE ibf_faq SET title='Email Notification of new messages', text='This board can notify you when a new reply is added to a topic. Many users find this useful to keep up to date on topics without the need to view the board to check for new messages.\r
    \r
    There are three ways to subscribe to a topic:\r
      \r
    • Click the \'Track This Topic\' link at the top of the topic that you wish to track
    • \r
    • On the posting screen when replying to or creating a topic, check the \'Enable email notification of replies?\' checkbox
    • \r
    • From the E-Mail settings section of your User CP (My Controls) check the \'Enable Email Notification by default?\' option, this will automatically subscribe you to any topic that you make a reply to
    • \r
    Please note that to avoid multiple emails being sent to your email address, you will only get one e-mail for each topic you are subscribed to until the next time you visit the board.\r
    \r
    You are also able to subscribe to each individual forum on the board, to be notified when a new topic is created in that particular forum. To enable this, click the \'Subscribe to this forum\' link at the bottom of the forum that you wish to subscribe to.\r
    \r
    To unsubscribe from any forums or topics that you are subscribed to - just go to the \'Subscriptions\' section of \'My Controls\' and you can do thi from there.', description='How to get emailed when a new reply is added to a topic.' WHERE id=5"; -$UPDATES[] = "UPDATE ibf_faq SET title='Your Personal Messenger', text='Your personal messenger acts much like an email account in that you can send and receive messages and store messages in folders.\r
    \r
    Compose a New PM\r
    \r
    This will allow you to send a message to another member. If you have names in your contact list, you can choose a name from it - or you may choose to enter a name in the relevant form field. This will be automatically filled in if you clicked a \'PM\' button on the board (from the member list or a post). If allowed, you may also be able to enter in multiple names in the box provided, will need to add one username per line.\r
    If the administrator allows, you may use BB Code and HTML in your private message. If you choose to check the \'Add a copy of this message to you sent items folder\' box, a copy of the message will be saved for you for later reference. If you tick the \'Track this message?\' box, then the details of the message will be available in your \'Message Tracker\' where you will be able to see if/when it has been read.\r
    \r
    \r
    \r
    Your inbox is where all new messages are sent to. Clicking on the message title will show you the message in a similar format to the board topic view. You can also delete or move messages from your inbox.\r
    \r
    Empty PM Folders\r
    \r
    This option provides you with a quick and easy way to clear out all of your PM folders.\r
    \r
    Edit Storage Folders\r
    \r
    You may rename, add or remove folders to store messages is, allowing you to organise your messages to your preference. You cannot remove \'Sent Items\' or \'Inbox\'.\r
    \r
    PM Buddies/Block List\r
    \r
    You may add in users names in this section, or edit any saved entries. You can also use this as a ban list, denying the named member the ability to message you.\r
    Names entered in this section will appear in the drop down list when sending a new PM, allowing you to quickly choose the members name when sending a message.\r
    \r
    Archive Messages\r
    \r
    If your messenger folders are full and you are unable to receive new messages, you can archive them off. This compiles the messages into a single HTML page or Microsoft © Excel Format. This page is then emailed to your registered email address for your convenience.\r
    \r
    Saved (Unsent) PMs\r
    \r
    This area will allow you to go back to any PM\'s that you have chosen to save to be sent later.\r
    \r
    Message Tracker\r
    \r
    This is the page that any messages that you have chosen to track will appear. Details of if and when they have been read by the recipient will appear here. This also gives you the chance to delete any messages that you have sent and not yet been read by the intended recipient.', description='How to send personal messages, track them, edit your messenger folders and archive stored messages.' WHERE id=6"; -$UPDATES[] = "UPDATE ibf_faq SET title='Contacting the moderating team & reporting posts', text='Contacting the moderating team\r
    \r
    If you need to contact a moderator or simply wish to view the complete administration team, you can click the link \'The moderating team\' found at the bottom of the main board page (the first page you see when visiting the board), or from \'My Assistant\'.\r
    \r
    This list will show you administrators (those who have administration control panel access), global moderators (those who can moderate in all forums) and the moderators of the individual forums.\r
    \r
    If you wish to contact someone about your member account, then contact an administrator - if you wish to contact someone about a post or topic, contact either a global moderator or the forum moderator.\r
    \r
    Reporting a post\r
    \r
    If the administrator has enabled this function on the board, you\'ll see a \'Report\' button in a post, next to the \'Quote\' button. This function will let you report the post to the forum moderator (or the administrator(s), if there isn\'t a specific moderator available). You can use this function when you think the moderator(s) should be aware of the existance of that post. However, do not use this to chat with the moderator(s)!. You can use the email function or the Personal Messenger function for that.', description='Where to find a list of the board moderators and administrators.' WHERE id=7"; -$UPDATES[] = "UPDATE ibf_faq SET title='Viewing members profile information', text='You can view a members profile at any time by clicking on their name when it is underlined (as a link) or by clicking on their name in a post within a topic.\r
    \r
    This will show you their profile page which contains their contact information (if they have entered some) and their \'active stats\'.\r
    \r
    You can also click on the \'Mini Profile\' button underneath their posts, this will show up a mini \'e-card\' with their contact information and a photograph if they have chosen to have one.', description='How to view members contact information.' WHERE id=8"; -$UPDATES[] = "UPDATE ibf_faq SET title='Viewing active topics and new posts', text='You can view which new topics have new replies today by clicking on the \'Today\'s Active Topics\' link found at the bottom of the main board page (the first page you see when visiting the board). You can set your own date criteria, choosing to view all topics with new replies during several date choices.\r
    \r
    The \'View New Posts\' link in the member bar at the top of each page, will allow you to view all of the topics which have new replies in since your last visit to the board.', description='How to view all the topics which have a new reply today and the new posts made since your last visit.' WHERE id=9"; -$UPDATES[] = "UPDATE ibf_faq SET title='Searching Topics and Posts', text='The search feature is designed to allow you to quickly find topics and posts that contain the keywords you enter.\r
    \r
    There are two types of search form available, simple search and advanced search. You may switch between the two using the \'More Options\' and \'Simple Mode\' buttons.\r
    \r
    Simple Mode\r
    \r
    All you need to do here is enter in a keyword into the search box, and select a forum(s) to search in. (to select multiple forums, hold down the control key on a PC, or the Shift/Apple key on a Mac) choose a sorting order and search.\r
    \r
    Advanced Mode\r
    \r
    The advanced search screen, will give you a much greater range of options to choose from to refine your search. In addition to searching by keyword, you are able to search by a members username or a combination of both. You can also choose to refine your search by selecting a date range, and there are a number of sorting options available. There are also two ways of displaying the search results, can either show the post text in full or just show a link to the topic, can choose this using the radio buttons available.\r
    \r
    If the administrator has enabled it, you may have a minimum amount of time to wait between searches, this is known as search flood control.\r
    \r
    There are also search boxes available at the bottom of each forum, to allow you to carry out a quick search of all of the topics within that particular forum.', description='How to use the search feature.' WHERE id=10"; -$UPDATES[] = "UPDATE ibf_faq SET title='Logging in and out', text='If you have chosen not to remember your log in details in cookies, or you are accessing the board on another computer, you will need to log into the board to access your member profile and post with your registered name.\r
    \r
    When you log in, you have the choice to save cookies that will log you in automatically when you return. Do not use this option on a shared computer for security.\r
    \r
    You can also choose to hide - this will keep your name from appearing in the active users list.\r
    \r
    Logging out is simply a matter of clicking on the \'Log Out\' link that is displayed when you are logged in. If you find that you are not logged out, you may need to manually remove your cookies. See the \'Cookies\' help file for more information.', description='How to log in and out from the board and how to remain anonymous and not be shown on the active users list.' WHERE id=11"; -$UPDATES[] = "UPDATE ibf_faq SET title='My Assistant', text='This feature is sometimes referred to as a \'Browser Buddy\'. \r
    \r
    At the top it tells you how many posts have been made since you last visited the board.. Also underneath this the number of posts with replies that have been made in topics that the individual has also posted in.\r
    Click on the \'View\' link on either of the two sentences to see the posts.\r
    \r
    The next section is five links to useful features:\r
      \r
    • The link to the moderating team is basically a quick link to see all those that either administrate or moderate certain forums on the message board.
    • \r
    • The link to \'Today\'s Active Topics\' shows you all the topics that have been created in the last 24 hours on the board.
    • \r
    • Today\'s Top 10 Posters link shows you exactly as the name suggests. It shows you the amount of posts by the members and also their total percentage of the total posts made that day.
    • \r
    • The overall Top 10 Posters link shows you the top 10 posters for the whole time that the board has been installed.
    • \r
    • My last 10 posts links to the latest topics that you have made on the board. These are shortened on the page, to save space, and are linked to if you require to read more of them.
    • \r
    The two search features allow you to search the whole board for certain words in a whole topic. It isn\'t as featured as the normal search option so it is not as comprehensive.\r
    \r
    The Help Search is just as comprehensive as the normal help section\'s search function and allows for quick searching of all the help topics on the board.', description='A comprehensive guide to use this handy little feature.' WHERE id=12"; -$UPDATES[] = "UPDATE ibf_faq SET title='Posting', text='There are three different posting screens available. The new topic button, visible in forums and in topics allows you to add a new topic to that particular forum. The new poll button (if the admin has enabled it) will also be viewable in topics and forums allowing you to create a new poll in the forum. When viewing a topic, there will be an add reply button, allowing you to add a new reply onto that particular topic. \r\n
    \r\n
    Posting new topics and replying\r\n
    \r\n
    When making a post, you will most likely have the option to use IBF code when posting. This will allow you to add various types of formatting to your messages. For more information on this, click the \'BB Code Help\' link under the emoticon box to launch the help window.\r\n
    \r\n
    On the left of the text entry box, there is the clickable emoticons box - you can click on these to add them to the content of your message (these are sometimes known as \'smilies\').\r\n
    \r\n
    There are three options available when making a post or a reply. \'Enable emoticons?\' if this is unchecked, then any text that would normally be converted into an emoticon will not be. \'Enable signature?\' allows you to choose whether or not you would like your signature to appear on that individual post. \'Enable email notification of replies?\' ticking this box will mean that you will receive e-mail updates to the topic, see the \'Email Notification of new messages\' help topic for more information on this.\r\n
    \r\n
    You also have the option to choose a post icon for the topic/post when creating one. This icon will appear next to the topic name on the topic listing in that forum, or will appear next to the date/time of the message if making a reply to a topic.\r\n
    \r\n
    If the admin has enabled it, you will also see a file attachments option, this will allow you to attach a file to be uploaded when making a post. Click the browse button to select a file from your computer to be uploaded. If you upload an image file, it may be shown in the content of the post, all other file types will be linked to.\r\n
    \r\n
    Poll Options\r\n
    \r\n
    If you have chosen to post a new poll, there will be an extra two option boxes at the top of the help screen. The first input box will allow you to enter the question that you are asking in the poll. The text field underneath is where you will input the choices for the poll. Simply enter a different option on each line. The maximum number of choices is set by the board admin, and this figure is displayed on the left.\r\n
    \r\n
    Quoting Posts\r\n
    \r\n
    Displayed below each post in a topic, there is a \'Quote\' button. Pressing this button will allow you to reply to a topic, and have the text from a particular reply quoted in your own reply. When you choose to do this, an extra text field will appear below the main text input box to allow you to edit the content of the post being quoted.\r\n
    \r\n
    Editing Posts\r\n
    \r\n
    Above any posts that you have made, you may see an \'Edit\' button. Pressing this will allow you to edit the post that you had previously made. \r\n
    \r\n
    When editing you may see an option to \'Add the \'Edit by\' line in this post?\'. If you tick this then it will show up in the posts that it has been edited and the time at which it was edited. If this option does not appear, then the edit by line will always be added to the post.\r\n
    \r\n
    If you are unable to see the edit button displayed on each post that you have made, then the administrator may have prevented you from editing posts, or the time limit for editing may have expired.\r\n
    \r\n
    Fast Reply\r\n
    \r\n
    Where it has been enabled, there will be a fast reply button on each topic. Clicking this will open up a posting box on the topic view screen, cutting down on the time required to load the main posting screen. Click the fast reply button to expand the reply box and type the post inside of there. Although the fast reply box is not expanded by default, you can choose the option to have it expanded by default, from the board settings section of your control panel. Pressing the \'More Options\' button will take you to the normal posting screen.', description='A guide to the features avaliable when posting on the boards.' WHERE id=13"; -$UPDATES[] = "UPDATE ibf_faq SET title='Member List', text='The member list, accessed via the \'Members\' link at the top of each page, is basically a listing of all of the members that have registered on the board. \r\n
    \r\n
    If you are looking to search for a particular member by all/part of their username, then in the drop down box at the bottom of the page, change the selection from \'Search All Available\' to \'Name Begins With\' or \'Name Contains\' and input all/part of their name in the text input field and press the \'Go!\' button. \r\n
    \r\n
    Also, at the bottom of the member list page, there are a number of sorting options available to alter the way in which the list is displayed. \r\n
    \r\n
    If a member has chosen to add a photo to their profile information, then a camera icon will appear next to their name, and you may click this to view the photo.', description='Explaining the different ways to sort and search through the list of members.' WHERE id=14"; -$UPDATES[] = "UPDATE ibf_faq SET title='Topic Options', text='At the bottom of each topic, there is a \'Topic Options\' button. Pressing this button will expand the topic options box. \r
    \r
    From this box, you can select from the following options: \r
      \r
    • Track this topic - this option will allow you to receive e-mail updates for the topic, see the \'Email Notification of new messages\' help file for more information on this
    • \r
    • Subscribe to this forum - will allow you to receive e-mail updates for any new topics posted in the forum, see the Notification of new messages\' help file for more information on this
    • \r
    • Download / Print this Topic - will show the topic in a number of different formats. \'Printer Friendly Version\' will display a version of the topic that is suitable for printing out. \'Download HTML Version\' will download a copy of the topic to your hard drive, and this can then be viewed in a web browser, without having to visit the board. \'Download Microsoft Word Version\' will allow you to download the file to your hard drive and open it up in the popular word processing application, Microsoft Word, for viewing offline.
    • \r
    ', description='A guide to the options avaliable when viewing a topic.' WHERE id=15"; -$UPDATES[] = "UPDATE ibf_faq SET title='Calendar', text='This board features it\'s very own calendar feature, which can be accessed via the calendar link at the top of the board.\r
    \r
    You are able to add your own personal events to the calendar - and these are only viewable by yourself. To add a new event, use the \'Add New Event\' button to be taken to the event posting screen. There are three types of events that you can now add:\r
      \r
    • A single day/one off event can be added using the first option, by just selecting the date for it to appear on.
    • \r
    • Ranged Event - is an event that spans across multiple days, to do this in addition to selecting the start date as above, will need to add the end date for the event. There are also options available to highlight the message on the calendar, useful if there is more than one ranged event being displayed at any one time.
    • \r
    • Recurring Event - is a one day event, that you can set to appear at set intervals on the calendar, either weekly, monthly or yearly.
    • \r
    If the admistrator allows you, you may also be able to add a public event, that will not just be shown to yourself, but will be viewable by everyone.\r
    \r
    Also, if the admistrator has chosen, there will be a link to all the birthdays happening on a particular day displayed on the calendar, and your birthday will appear if you have chosen to enter a date of birth in the Profile Info section of your control panel.', description='More information on the boards calendar feature.' WHERE id=16"; +$UPDATES[] = "UPDATE faq SET title='Registration benefits', text='To be able to use all the features on this board, the administrator will probably require that you register for a member account. Registration is free and only takes a moment to complete.\r
    \r
    During registration, the administrator requires that you supply a valid email address. This is important as the administrator may require that you validate your registration via an email. If this is the case, you will be notified when registering. If your e-mail does not arrive, then on the member bar at the top of the page, there will be a link that will allow you to re-send the validation e-mail. \r
    \r
    In some cases, the administrator will need to approve your registration before you can use your member account fully. If this is the case you will be notified during registration.\r
    \r
    Once you have registered and logged in, you will have access to your personal messenger and your control panel.\r
    \r
    For more information on these items, please see the relevant sections in this documentation.', description='How to register and the added benefits of being a registered member.' WHERE id=1"; +$UPDATES[] = "UPDATE faq SET title='Cookies and cookie usage', text='Using cookies is optional, but strongly recommended. Cookies are used to track topics, showing you which topics have new replies since your last visit and to automatically log you in when you return.\r
    \r
    If your computer is unable to use the cookie system to browse the board correctly, then the board will automatically add in a session ID to each link to track you around the board.\r
    \r
    Clearing Cookies\r
    \r
    You can clear the cookies at any time by clicking on the link found at the bottom of the main board page (the first page you see when returning to the board). If this does not work for you, you may need to remove the cookies manually.\r
    \r
    Removing Cookies in Internet Explorer for Windows\r
    \r
      \r
    • Close all open Internet Explorer Windows\r
    • Click on the \'start\' button\r
    • Move up to \'Find\' and click on \'Files and Folders\'\r
    • When the new window appears, type in the domain name of the board you are using into the \'containing text\' field. (If the boards address was \'http://www.test.ru/forums/index.php\' you would enter \'test.ru\' without the quotes)\r
    • In the \'look in\' box, type in C:WindowsCookies and press \'Find Now\'\r
    • After it has finished searching, highlight all files (click on a file then press CTRL+A) and delete them.\r
    \r
    \r
    Removing Cookies in Internet Explorer for Macintosh\r
    \r
      \r
    • With Internet Explorer active, choose \'Edit\' and then \'Preferences\' from the Macintosh menu bar at the top of the screen\r
    • When the preferences panel opens, choose \'Cookies\' found in the \'Receiving Files\' section.\r
    • When the cookie pane loads, look for the domain name of the board (If the boards address was \'http://www.test.ru/forums/index.php\' look for \'test.ru\' or \'www.test.ru\'\r
    • For each cookie, click on the entry and press the delete button.\r
    \r
    \r
    Your cookies should now be removed. In some cases you may need to restart your computer for the changes to take effect.', description='The benefits of using cookies and how to remove cookies set by this board.' WHERE id=2"; +$UPDATES[] = "UPDATE faq SET title='Recovering lost or forgotten passwords', text='Security is a big feature on this board, and to that end, all passwords are encrypted when you register.\r
    This means that we cannot email your password to you as we hold no record of your \'uncrypted\' password. You can however, apply to have your password reset.\r
    \r
    To do this, click on the Lost Password link found on the log in page.\r
    \r
    Further instruction is available from there.', description='How to reset your password if you\'ve forgotten it.' WHERE id=3"; +$UPDATES[] = "UPDATE faq SET title='Your Control Panel (My Controls)', text='Your control panel is your own private board console. You can change how the board looks and feels as well as your own information from here.\r
    \r
    Subscriptions\r
    \r
    This is where you manage your topic and forums subscriptions. Please see the help file \'Email Notification of new messages\' for more information on how to subscribe to topics.\r
    \r
    Edit Profile Info\r
    \r
    This section allows you to add or edit your contact information and enter some personal information if you choose.\r
    \r
    Edit Signature\r
    \r
    A board \'signature\' is very similar to an email signature. This signature is attached to the foot of every message you post unless you choose to check the box that allows you to ommit the signature in the message you are posting. You may use BB Code if available and in some cases, pure HTML (if the board administrator allows it).\r
    \r
    Edit Avatar Settings\r
    \r
    An avatar is a little image that appears under your username when you view a topic or post you authored. If the administrator allows, you may either choose from the board gallery, enter a URL to an avatar stored on your server or upload an avatar to use. You may also set the width of the avatar to ensure that it\'s sized in proportion.\r
    \r
    Change Personal Photo\r
    \r
    This section will allow you to add a photograph to your profile. This will be displayed when a user clicks to view your profile, on the mini-profile screen and will also be linked to from the member list.\r
    \r
    Email Settings\r
    \r
    Hide my email address allows you to deny the ability for other users to send you an email from the board.\r
    Send me updates sent by the board administrator will allow the administrator to include your email address in any mailings they send out - this is used mostly for important updates and community information.\r
    Include a copy of the post when emailing me from a subscribed topic, this allows you to have the new post included in any reply to topic notifications.\r
    Send a confirmation email when I receive a new private message, this will send you an e-mail notification to your registered e-mail address each time you receive a private message on the board.\r
    Enable \'Email Notification\' by default?, this will automatically subscribe you to any topic that you make a reply to. You may unsubscribe from the \'Subscriptions\' section of My Controls if you wish.\r
    \r
    Board Settings\r
    \r
    From this section, you can set your time zone, choose to not see users signatures, avatars and posted images.\r
    You can choose to get a pop up window informing you when you have a new message and choose to show or hide the \'Fast Reply\' box where it is enabled.\r
    You are also able to choose display preferences for the number of topics/posts shown per page on the board.\r
    \r
    Change Email Address\r
    \r
    At any time, you can change the email address that is registered to your account. In some cases, you will need to revalidate your account after changing your email address. If this is the case, you will be notified before your email address change is processed.\r
    \r
    Change Password\r
    \r
    You may change your password from this section. Please note that you will need to know your current password before you can change your password.', description='Editing contact information, personal information, avatars, signatures, board settings, languages and style choices.' WHERE id=4"; +$UPDATES[] = "UPDATE faq SET title='Email Notification of new messages', text='This board can notify you when a new reply is added to a topic. Many users find this useful to keep up to date on topics without the need to view the board to check for new messages.\r
    \r
    There are three ways to subscribe to a topic:\r
      \r
    • Click the \'Track This Topic\' link at the top of the topic that you wish to track
    • \r
    • On the posting screen when replying to or creating a topic, check the \'Enable email notification of replies?\' checkbox
    • \r
    • From the E-Mail settings section of your User CP (My Controls) check the \'Enable Email Notification by default?\' option, this will automatically subscribe you to any topic that you make a reply to
    • \r
    Please note that to avoid multiple emails being sent to your email address, you will only get one e-mail for each topic you are subscribed to until the next time you visit the board.\r
    \r
    You are also able to subscribe to each individual forum on the board, to be notified when a new topic is created in that particular forum. To enable this, click the \'Subscribe to this forum\' link at the bottom of the forum that you wish to subscribe to.\r
    \r
    To unsubscribe from any forums or topics that you are subscribed to - just go to the \'Subscriptions\' section of \'My Controls\' and you can do thi from there.', description='How to get emailed when a new reply is added to a topic.' WHERE id=5"; +$UPDATES[] = "UPDATE faq SET title='Your Personal Messenger', text='Your personal messenger acts much like an email account in that you can send and receive messages and store messages in folders.\r
    \r
    Compose a New PM\r
    \r
    This will allow you to send a message to another member. If you have names in your contact list, you can choose a name from it - or you may choose to enter a name in the relevant form field. This will be automatically filled in if you clicked a \'PM\' button on the board (from the member list or a post). If allowed, you may also be able to enter in multiple names in the box provided, will need to add one username per line.\r
    If the administrator allows, you may use BB Code and HTML in your private message. If you choose to check the \'Add a copy of this message to you sent items folder\' box, a copy of the message will be saved for you for later reference. If you tick the \'Track this message?\' box, then the details of the message will be available in your \'Message Tracker\' where you will be able to see if/when it has been read.\r
    \r
    \r
    \r
    Your inbox is where all new messages are sent to. Clicking on the message title will show you the message in a similar format to the board topic view. You can also delete or move messages from your inbox.\r
    \r
    Empty PM Folders\r
    \r
    This option provides you with a quick and easy way to clear out all of your PM folders.\r
    \r
    Edit Storage Folders\r
    \r
    You may rename, add or remove folders to store messages is, allowing you to organise your messages to your preference. You cannot remove \'Sent Items\' or \'Inbox\'.\r
    \r
    PM Buddies/Block List\r
    \r
    You may add in users names in this section, or edit any saved entries. You can also use this as a ban list, denying the named member the ability to message you.\r
    Names entered in this section will appear in the drop down list when sending a new PM, allowing you to quickly choose the members name when sending a message.\r
    \r
    Archive Messages\r
    \r
    If your messenger folders are full and you are unable to receive new messages, you can archive them off. This compiles the messages into a single HTML page or Microsoft © Excel Format. This page is then emailed to your registered email address for your convenience.\r
    \r
    Saved (Unsent) PMs\r
    \r
    This area will allow you to go back to any PM\'s that you have chosen to save to be sent later.\r
    \r
    Message Tracker\r
    \r
    This is the page that any messages that you have chosen to track will appear. Details of if and when they have been read by the recipient will appear here. This also gives you the chance to delete any messages that you have sent and not yet been read by the intended recipient.', description='How to send personal messages, track them, edit your messenger folders and archive stored messages.' WHERE id=6"; +$UPDATES[] = "UPDATE faq SET title='Contacting the moderating team & reporting posts', text='Contacting the moderating team\r
    \r
    If you need to contact a moderator or simply wish to view the complete administration team, you can click the link \'The moderating team\' found at the bottom of the main board page (the first page you see when visiting the board), or from \'My Assistant\'.\r
    \r
    This list will show you administrators (those who have administration control panel access), global moderators (those who can moderate in all forums) and the moderators of the individual forums.\r
    \r
    If you wish to contact someone about your member account, then contact an administrator - if you wish to contact someone about a post or topic, contact either a global moderator or the forum moderator.\r
    \r
    Reporting a post\r
    \r
    If the administrator has enabled this function on the board, you\'ll see a \'Report\' button in a post, next to the \'Quote\' button. This function will let you report the post to the forum moderator (or the administrator(s), if there isn\'t a specific moderator available). You can use this function when you think the moderator(s) should be aware of the existance of that post. However, do not use this to chat with the moderator(s)!. You can use the email function or the Personal Messenger function for that.', description='Where to find a list of the board moderators and administrators.' WHERE id=7"; +$UPDATES[] = "UPDATE faq SET title='Viewing members profile information', text='You can view a members profile at any time by clicking on their name when it is underlined (as a link) or by clicking on their name in a post within a topic.\r
    \r
    This will show you their profile page which contains their contact information (if they have entered some) and their \'active stats\'.\r
    \r
    You can also click on the \'Mini Profile\' button underneath their posts, this will show up a mini \'e-card\' with their contact information and a photograph if they have chosen to have one.', description='How to view members contact information.' WHERE id=8"; +$UPDATES[] = "UPDATE faq SET title='Viewing active topics and new posts', text='You can view which new topics have new replies today by clicking on the \'Today\'s Active Topics\' link found at the bottom of the main board page (the first page you see when visiting the board). You can set your own date criteria, choosing to view all topics with new replies during several date choices.\r
    \r
    The \'View New Posts\' link in the member bar at the top of each page, will allow you to view all of the topics which have new replies in since your last visit to the board.', description='How to view all the topics which have a new reply today and the new posts made since your last visit.' WHERE id=9"; +$UPDATES[] = "UPDATE faq SET title='Searching Topics and Posts', text='The search feature is designed to allow you to quickly find topics and posts that contain the keywords you enter.\r
    \r
    There are two types of search form available, simple search and advanced search. You may switch between the two using the \'More Options\' and \'Simple Mode\' buttons.\r
    \r
    Simple Mode\r
    \r
    All you need to do here is enter in a keyword into the search box, and select a forum(s) to search in. (to select multiple forums, hold down the control key on a PC, or the Shift/Apple key on a Mac) choose a sorting order and search.\r
    \r
    Advanced Mode\r
    \r
    The advanced search screen, will give you a much greater range of options to choose from to refine your search. In addition to searching by keyword, you are able to search by a members username or a combination of both. You can also choose to refine your search by selecting a date range, and there are a number of sorting options available. There are also two ways of displaying the search results, can either show the post text in full or just show a link to the topic, can choose this using the radio buttons available.\r
    \r
    If the administrator has enabled it, you may have a minimum amount of time to wait between searches, this is known as search flood control.\r
    \r
    There are also search boxes available at the bottom of each forum, to allow you to carry out a quick search of all of the topics within that particular forum.', description='How to use the search feature.' WHERE id=10"; +$UPDATES[] = "UPDATE faq SET title='Logging in and out', text='If you have chosen not to remember your log in details in cookies, or you are accessing the board on another computer, you will need to log into the board to access your member profile and post with your registered name.\r
    \r
    When you log in, you have the choice to save cookies that will log you in automatically when you return. Do not use this option on a shared computer for security.\r
    \r
    You can also choose to hide - this will keep your name from appearing in the active users list.\r
    \r
    Logging out is simply a matter of clicking on the \'Log Out\' link that is displayed when you are logged in. If you find that you are not logged out, you may need to manually remove your cookies. See the \'Cookies\' help file for more information.', description='How to log in and out from the board and how to remain anonymous and not be shown on the active users list.' WHERE id=11"; +$UPDATES[] = "UPDATE faq SET title='My Assistant', text='This feature is sometimes referred to as a \'Browser Buddy\'. \r
    \r
    At the top it tells you how many posts have been made since you last visited the board.. Also underneath this the number of posts with replies that have been made in topics that the individual has also posted in.\r
    Click on the \'View\' link on either of the two sentences to see the posts.\r
    \r
    The next section is five links to useful features:\r
      \r
    • The link to the moderating team is basically a quick link to see all those that either administrate or moderate certain forums on the message board.
    • \r
    • The link to \'Today\'s Active Topics\' shows you all the topics that have been created in the last 24 hours on the board.
    • \r
    • Today\'s Top 10 Posters link shows you exactly as the name suggests. It shows you the amount of posts by the members and also their total percentage of the total posts made that day.
    • \r
    • The overall Top 10 Posters link shows you the top 10 posters for the whole time that the board has been installed.
    • \r
    • My last 10 posts links to the latest topics that you have made on the board. These are shortened on the page, to save space, and are linked to if you require to read more of them.
    • \r
    The two search features allow you to search the whole board for certain words in a whole topic. It isn\'t as featured as the normal search option so it is not as comprehensive.\r
    \r
    The Help Search is just as comprehensive as the normal help section\'s search function and allows for quick searching of all the help topics on the board.', description='A comprehensive guide to use this handy little feature.' WHERE id=12"; +$UPDATES[] = "UPDATE faq SET title='Posting', text='There are three different posting screens available. The new topic button, visible in forums and in topics allows you to add a new topic to that particular forum. The new poll button (if the admin has enabled it) will also be viewable in topics and forums allowing you to create a new poll in the forum. When viewing a topic, there will be an add reply button, allowing you to add a new reply onto that particular topic. \r\n
    \r\n
    Posting new topics and replying\r\n
    \r\n
    When making a post, you will most likely have the option to use IBF code when posting. This will allow you to add various types of formatting to your messages. For more information on this, click the \'BB Code Help\' link under the emoticon box to launch the help window.\r\n
    \r\n
    On the left of the text entry box, there is the clickable emoticons box - you can click on these to add them to the content of your message (these are sometimes known as \'smilies\').\r\n
    \r\n
    There are three options available when making a post or a reply. \'Enable emoticons?\' if this is unchecked, then any text that would normally be converted into an emoticon will not be. \'Enable signature?\' allows you to choose whether or not you would like your signature to appear on that individual post. \'Enable email notification of replies?\' ticking this box will mean that you will receive e-mail updates to the topic, see the \'Email Notification of new messages\' help topic for more information on this.\r\n
    \r\n
    You also have the option to choose a post icon for the topic/post when creating one. This icon will appear next to the topic name on the topic listing in that forum, or will appear next to the date/time of the message if making a reply to a topic.\r\n
    \r\n
    If the admin has enabled it, you will also see a file attachments option, this will allow you to attach a file to be uploaded when making a post. Click the browse button to select a file from your computer to be uploaded. If you upload an image file, it may be shown in the content of the post, all other file types will be linked to.\r\n
    \r\n
    Poll Options\r\n
    \r\n
    If you have chosen to post a new poll, there will be an extra two option boxes at the top of the help screen. The first input box will allow you to enter the question that you are asking in the poll. The text field underneath is where you will input the choices for the poll. Simply enter a different option on each line. The maximum number of choices is set by the board admin, and this figure is displayed on the left.\r\n
    \r\n
    Quoting Posts\r\n
    \r\n
    Displayed below each post in a topic, there is a \'Quote\' button. Pressing this button will allow you to reply to a topic, and have the text from a particular reply quoted in your own reply. When you choose to do this, an extra text field will appear below the main text input box to allow you to edit the content of the post being quoted.\r\n
    \r\n
    Editing Posts\r\n
    \r\n
    Above any posts that you have made, you may see an \'Edit\' button. Pressing this will allow you to edit the post that you had previously made. \r\n
    \r\n
    When editing you may see an option to \'Add the \'Edit by\' line in this post?\'. If you tick this then it will show up in the posts that it has been edited and the time at which it was edited. If this option does not appear, then the edit by line will always be added to the post.\r\n
    \r\n
    If you are unable to see the edit button displayed on each post that you have made, then the administrator may have prevented you from editing posts, or the time limit for editing may have expired.\r\n
    \r\n
    Fast Reply\r\n
    \r\n
    Where it has been enabled, there will be a fast reply button on each topic. Clicking this will open up a posting box on the topic view screen, cutting down on the time required to load the main posting screen. Click the fast reply button to expand the reply box and type the post inside of there. Although the fast reply box is not expanded by default, you can choose the option to have it expanded by default, from the board settings section of your control panel. Pressing the \'More Options\' button will take you to the normal posting screen.', description='A guide to the features avaliable when posting on the boards.' WHERE id=13"; +$UPDATES[] = "UPDATE faq SET title='Member List', text='The member list, accessed via the \'Members\' link at the top of each page, is basically a listing of all of the members that have registered on the board. \r\n
    \r\n
    If you are looking to search for a particular member by all/part of their username, then in the drop down box at the bottom of the page, change the selection from \'Search All Available\' to \'Name Begins With\' or \'Name Contains\' and input all/part of their name in the text input field and press the \'Go!\' button. \r\n
    \r\n
    Also, at the bottom of the member list page, there are a number of sorting options available to alter the way in which the list is displayed. \r\n
    \r\n
    If a member has chosen to add a photo to their profile information, then a camera icon will appear next to their name, and you may click this to view the photo.', description='Explaining the different ways to sort and search through the list of members.' WHERE id=14"; +$UPDATES[] = "UPDATE faq SET title='Topic Options', text='At the bottom of each topic, there is a \'Topic Options\' button. Pressing this button will expand the topic options box. \r
    \r
    From this box, you can select from the following options: \r
      \r
    • Track this topic - this option will allow you to receive e-mail updates for the topic, see the \'Email Notification of new messages\' help file for more information on this
    • \r
    • Subscribe to this forum - will allow you to receive e-mail updates for any new topics posted in the forum, see the Notification of new messages\' help file for more information on this
    • \r
    • Download / Print this Topic - will show the topic in a number of different formats. \'Printer Friendly Version\' will display a version of the topic that is suitable for printing out. \'Download HTML Version\' will download a copy of the topic to your hard drive, and this can then be viewed in a web browser, without having to visit the board. \'Download Microsoft Word Version\' will allow you to download the file to your hard drive and open it up in the popular word processing application, Microsoft Word, for viewing offline.
    • \r
    ', description='A guide to the options avaliable when viewing a topic.' WHERE id=15"; +$UPDATES[] = "UPDATE faq SET title='Calendar', text='This board features it\'s very own calendar feature, which can be accessed via the calendar link at the top of the board.\r
    \r
    You are able to add your own personal events to the calendar - and these are only viewable by yourself. To add a new event, use the \'Add New Event\' button to be taken to the event posting screen. There are three types of events that you can now add:\r
      \r
    • A single day/one off event can be added using the first option, by just selecting the date for it to appear on.
    • \r
    • Ranged Event - is an event that spans across multiple days, to do this in addition to selecting the start date as above, will need to add the end date for the event. There are also options available to highlight the message on the calendar, useful if there is more than one ranged event being displayed at any one time.
    • \r
    • Recurring Event - is a one day event, that you can set to appear at set intervals on the calendar, either weekly, monthly or yearly.
    • \r
    If the admistrator allows you, you may also be able to add a public event, that will not just be shown to yourself, but will be viewable by everyone.\r
    \r
    Also, if the admistrator has chosen, there will be a link to all the birthdays happening on a particular day displayed on the calendar, and your birthday will appear if you have chosen to enter a date of birth in the Profile Info section of your control panel.', description='More information on the boards calendar feature.' WHERE id=16"; - -?> \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_21010/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_21010/mysql_updates.php index c887b4af..afd0ed20 100644 --- a/upload/admin/applications/core/setup/versions/upg_21010/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_21010/mysql_updates.php @@ -1,22 +1,21 @@ \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_21011/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_21011/mysql_updates.php index 0940cc5c..754cd8f4 100644 --- a/upload/admin/applications/core/setup/versions/upg_21011/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_21011/mysql_updates.php @@ -1,21 +1,20 @@ \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_22005/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_22005/mysql_updates.php index 815ff263..d9e5ea27 100644 --- a/upload/admin/applications/core/setup/versions/upg_22005/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_22005/mysql_updates.php @@ -1,15 +1,15 @@ \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_22005/mysql_updates_1.php b/upload/admin/applications/core/setup/versions/upg_22005/mysql_updates_1.php index f9041349..683d9be5 100644 --- a/upload/admin/applications/core/setup/versions/upg_22005/mysql_updates_1.php +++ b/upload/admin/applications/core/setup/versions/upg_22005/mysql_updates_1.php @@ -1,49 +1,48 @@ \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_22005/mysql_updates_2.php b/upload/admin/applications/core/setup/versions/upg_22005/mysql_updates_2.php index b24960c5..2d75427d 100644 --- a/upload/admin/applications/core/setup/versions/upg_22005/mysql_updates_2.php +++ b/upload/admin/applications/core/setup/versions/upg_22005/mysql_updates_2.php @@ -1,25 +1,24 @@ \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_22005/mysql_updates_3.php b/upload/admin/applications/core/setup/versions/upg_22005/mysql_updates_3.php index a9390196..fa1709c9 100644 --- a/upload/admin/applications/core/setup/versions/upg_22005/mysql_updates_3.php +++ b/upload/admin/applications/core/setup/versions/upg_22005/mysql_updates_3.php @@ -1,64 +1,63 @@ PayPal for more information.' WHERE LOWER(submethod_name)='paypal';"; +$SQL[] ="UPDATE subscription_methods SET submethod_desc='All major credit cards accepted. See PayPal for more information.' WHERE LOWER(submethod_name)='paypal';"; -$SQL[] ="UPDATE ibf_groups SET g_photo_max_vars='100:150:150';"; +$SQL[] ="UPDATE groups SET g_photo_max_vars='100:150:150';"; -$SQL[] ="UPDATE ibf_attachments SET attach_rel_id=attach_pid, attach_rel_module='post' where attach_pid > 0;"; -$SQL[] ="UPDATE ibf_attachments SET attach_rel_id=attach_msg, attach_rel_module='msg' where attach_msg > 0;"; +$SQL[] ="UPDATE attachments SET attach_rel_id=attach_pid, attach_rel_module='post' where attach_pid > 0;"; +$SQL[] ="UPDATE attachments SET attach_rel_id=attach_msg, attach_rel_module='msg' where attach_msg > 0;"; -$SQL[] ="UPDATE ibf_login_methods SET login_settings = '1', login_installed = '1' WHERE login_folder_name='ldap';"; -$SQL[] ="UPDATE ibf_login_methods SET login_settings = '1', login_installed = '1' WHERE login_folder_name='external';"; +$SQL[] ="UPDATE login_methods SET login_settings = '1', login_installed = '1' WHERE login_folder_name='ldap';"; +$SQL[] ="UPDATE login_methods SET login_settings = '1', login_installed = '1' WHERE login_folder_name='external';"; -$SQL[] ="INSERT INTO ibf_login_methods (login_title, login_description, login_folder_name, login_maintain_url, login_register_url, login_type, login_alt_login_html, login_date, login_settings, login_enabled, login_safemode, login_installed, login_replace_form, login_allow_create) VALUES ('IP.Converge', 'Для внутреннего использования', 'ipconverge', '', '', 'passthrough', '', 0, 0, 0, 1, 1, 0, 1);"; -$SQL[] ="UPDATE ibf_forums SET permission_showtopic=1 WHERE parent_id='-1';"; +$SQL[] ="INSERT INTO login_methods (login_title, login_description, login_folder_name, login_maintain_url, login_register_url, login_type, login_alt_login_html, login_date, login_settings, login_enabled, login_safemode, login_installed, login_replace_form, login_allow_create) VALUES ('IP.Converge', 'Internal Use Only', 'ipconverge', '', '', 'passthrough', '', 0, 0, 0, 1, 1, 0, 1);"; +$SQL[] ="UPDATE forums SET permission_showtopic=1 WHERE parent_id='-1';"; # MEMBERS -$SQL[] = "UPDATE ibf_members SET members_l_display_name=LOWER(members_display_name);"; -$SQL[] = "UPDATE ibf_members SET members_l_username=LOWER(name);"; +$SQL[] = "UPDATE members SET members_l_display_name=LOWER(members_display_name);"; +$SQL[] = "UPDATE members SET members_l_username=LOWER(name);"; -?> \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_22005/version_upgrade.php b/upload/admin/applications/core/setup/versions/upg_22005/version_upgrade.php index feec5a86..e7394365 100644 --- a/upload/admin/applications/core/setup/versions/upg_22005/version_upgrade.php +++ b/upload/admin/applications/core/setup/versions/upg_22005/version_upgrade.php @@ -2,15 +2,15 @@ /* +-------------------------------------------------------------------------- -| IP.Board v3.0.5 +| IP.Board v3.1.2 | ======================================== -| by Matthew Mecham -| (c) 2001 - 2004 Invision Power Services -| http://www.iinvisionpower.com -| ======================================== -| Web: http://www.iinvisionboard.com -| Email: matt@iinvisionpower.com -| Licence Info: http://www.iinvisionboard.com/?license +| by Matthew Mecham +| (c) 2001 - 2004 Invision Power Services +| http://www.invisionpower.com +| ======================================== +| Web: http://www.invisionboard.com +| Email: matt@invisionpower.com +| Licence Info: http://www.invisionboard.com/?license +--------------------------------------------------------------------------- */ @@ -195,7 +195,13 @@ class version_upgrade if ( IPSSetUp::getSavedData('man') AND $output ) { - $this->_output = $this->registry->output->template()->upgrade_manual_queries( $output ); + /* Create source file */ + if ( $this->registry->dbFunctions()->getDriverType() == 'mysql' ) + { + $sourceFile = IPSSetUp::createSqlSourceFile( $output, '22005', $id ); + } + + $this->_output = $this->registry->output->template()->upgrade_manual_queries( $output, $sourceFile ); } } diff --git a/upload/admin/applications/core/setup/versions/upg_22006/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_22006/mysql_updates.php index 429432a4..aa7c07f2 100644 --- a/upload/admin/applications/core/setup/versions/upg_22006/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_22006/mysql_updates.php @@ -1,15 +1,15 @@ \ No newline at end of file +$SQL[] = "DELETE FROM conf_settings WHERE conf_key IN ('rte_width', 'rte_pm_width');"; diff --git a/upload/admin/applications/core/setup/versions/upg_22007/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_22007/mysql_updates.php index 60ce3c88..030526ac 100644 --- a/upload/admin/applications/core/setup/versions/upg_22007/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_22007/mysql_updates.php @@ -1,15 +1,15 @@ \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_22009/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_22009/mysql_updates.php index b513d04c..ad432b16 100644 --- a/upload/admin/applications/core/setup/versions/upg_22009/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_22009/mysql_updates.php @@ -1,15 +1,15 @@ \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_22010/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_22010/mysql_updates.php index da5332ca..b9e21a96 100644 --- a/upload/admin/applications/core/setup/versions/upg_22010/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_22010/mysql_updates.php @@ -1,15 +1,15 @@ \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_22011/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_22011/mysql_updates.php index 5f938ccd..45ee6acc 100644 --- a/upload/admin/applications/core/setup/versions/upg_22011/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_22011/mysql_updates.php @@ -1,28 +1,27 @@ - \ No newline at end of file + \ No newline at end of file + \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_23005/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_23005/mysql_updates.php index c403ebfe..cd7379f5 100644 --- a/upload/admin/applications/core/setup/versions/upg_23005/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_23005/mysql_updates.php @@ -1,50 +1,44 @@ - \ No newline at end of file + \ No newline at end of file +$SQL[] = "UPDATE cal_events SET event_unix_from= (event_unix_from - (event_tz * 2)) WHERE event_timeset != 0;"; diff --git a/upload/admin/applications/core/setup/versions/upg_23010/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_23010/mysql_updates.php index 2a8bbef6..86a90edb 100644 --- a/upload/admin/applications/core/setup/versions/upg_23010/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_23010/mysql_updates.php @@ -1,20 +1,17 @@ \ No newline at end of file +$SQL[] = "DELETE FROM conf_settings WHERE conf_key='bot_antispam' OR conf_key='guest_captcha';"; diff --git a/upload/admin/applications/core/setup/versions/upg_30001/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_30001/mysql_updates.php index fa5e5e6f..1b9f81c4 100644 --- a/upload/admin/applications/core/setup/versions/upg_30001/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_30001/mysql_updates.php @@ -1,15 +1,15 @@ /folder_team_icons/admin.gif','public/style_extra/team_icons/admin.png');"; $SQL[] = "UPDATE groups SET g_icon=REPLACE(g_icon,'style_images/<#IMG_DIR#>/folder_team_icons/','public/style_extra/team_icons/');"; +/* Adding this here so permsBbcode section doesn't throw error */ +$SQL[] = "ALTER TABLE bbcode_mediatag ADD mediatag_position SMALLINT NOT NULL DEFAULT '0';"; + + diff --git a/upload/admin/applications/core/setup/versions/upg_30001/mysql_updates_2.php b/upload/admin/applications/core/setup/versions/upg_30001/mysql_updates_2.php index 51a493f0..3a6952a4 100644 --- a/upload/admin/applications/core/setup/versions/upg_30001/mysql_updates_2.php +++ b/upload/admin/applications/core/setup/versions/upg_30001/mysql_updates_2.php @@ -1,15 +1,15 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.2 * Upgrade Class * * Class to add options and notices for IP.Board upgrade - * Last Updated: $Date: 2009-02-13 17:09:43 +0000 (Fri, 13 Feb 2009) $ + * Last Updated: $Date: 2010-05-03 19:34:02 -0400 (Mon, 03 May 2010) $ + * * * @author Matt Mecham - * @version $Rev: 3957 $ + * @version $Rev: 6205 $ * @since 3.0 * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @link http://www.iinvisionpower.com - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @link http://www.invisionpower.com + * @package IP.Board */ class version_class_30001 @@ -142,6 +144,22 @@ EOF; return $notices; } + + + /** + * Return any pre-installation notices + * + * @access public + * @return array Array of notices + */ + public function preInstallNotices() + { + $notices = array(); + + $notices[] = "Skins made for prior versions will not be compatible with this version. The default skin will be restored."; + + return $notices; + + } } -?> \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_30001/version_upgrade.php b/upload/admin/applications/core/setup/versions/upg_30001/version_upgrade.php index fe21d5fd..8e48b39c 100644 --- a/upload/admin/applications/core/setup/versions/upg_30001/version_upgrade.php +++ b/upload/admin/applications/core/setup/versions/upg_30001/version_upgrade.php @@ -2,15 +2,15 @@ /* +-------------------------------------------------------------------------- -| IP.Board v3.0.5 +| IP.Board v3.1.2 | ======================================== -| by Matthew Mecham -| (c) 2001 - 2004 Invision Power Services -| http://www.iinvisionpower.com -| ======================================== -| Web: http://www.iinvisionboard.com -| Email: matt@iinvisionpower.com -| Licence Info: http://www.iinvisionboard.com/?license +| by Matthew Mecham +| (c) 2001 - 2004 Invision Power Services +| http://www.invisionpower.com +| ======================================== +| Web: http://www.invisionboard.com +| Email: matt@invisionpower.com +| Licence Info: http://www.invisionboard.com/?license +--------------------------------------------------------------------------- */ @@ -362,8 +362,8 @@ class version_upgrade $apps['ips']['portal']['_currentLong'] = '30003'; $apps['ips']['portal']['_currentHuman'] = '3.0.0'; - $apps['ips']['chat']['_currentLong'] = '30003'; - $apps['ips']['chat']['_currentHuman'] = '3.0.0'; + //$apps['ips']['chat']['_currentLong'] = '30003'; + //$apps['ips']['chat']['_currentHuman'] = '3.0.0'; $apps['ips']['calendar']['_currentLong'] = '30003'; $apps['ips']['calendar']['_currentHuman'] = '3.0.0'; @@ -1278,6 +1278,9 @@ class version_upgrade 'msg_is_first_post' => 1 ) ); $postID = $this->DB->getInsertId(); + /* Update attachments */ + $this->DB->update( 'attachments', array( 'attach_rel_id' => $postID ), "attach_rel_module='msg' AND attach_rel_id=".$post['msg_id'] ); + /* Define some stuff. "To" member is added last in IPB 2 */ $_tmp = $oldTopics; ksort( $_tmp ); @@ -1408,7 +1411,7 @@ class version_upgrade $this->DB->build( array( 'select' => '*', 'from' => 'members', - 'where' => $this->DB->buildLength('ignored_users') . ' > 0', + 'where' => method_exists( $this->DB, 'setTableIdentityInsert' ) ? 'ignored_users NOT LIKE \'\'' : $this->DB->buildLength('ignored_users') . ' > 0', 'order' => 'member_id ASC', 'limit' => array( $start, $pergo ) ) ); @@ -1545,7 +1548,8 @@ class version_upgrade } $this->registry->output->addMessage( "Обновление опросов завершено." ); - $this->request['workact'] = 'finish'; + $this->request['workact'] = 'finish'; + $this->request['st'] = 0; } diff --git a/upload/admin/applications/core/setup/versions/upg_30003/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_30003/mysql_updates.php index 4497a1d6..708f6954 100644 --- a/upload/admin/applications/core/setup/versions/upg_30003/mysql_updates.php +++ b/upload/admin/applications/core/setup/versions/upg_30003/mysql_updates.php @@ -1,15 +1,15 @@ getPrefix()); +$DB = ipsRegistry::DB(); + +$SQL[] = "ALTER TABLE members CHANGE language language MEDIUMINT( 4 ) NULL DEFAULT NULL;"; + +$has_right_index = false; +$has_wrong_index = false; +$DB->query( "SHOW INDEX FROM {$PRE}rss_import;" ); +while ( $row = $DB->fetch() ) +{ + if ( $row['Key_name'] == 'rss_grab' ) + { + $has_right_index = true; + } + if ( $row['Key_name'] == 'rss_import_enabled' ) + { + $has_wrong_index = true; + } +} + +if ( $has_wrong_index ) +{ + $SQL[] = "ALTER TABLE rss_import DROP INDEX rss_import_enabled;"; +} +if ( !$has_right_index ) +{ + $SQL[] = "ALTER TABLE rss_import ADD INDEX rss_grab ( rss_import_enabled , rss_import_last_import );"; +} + +$SQL[] = "ALTER TABLE core_item_markers ADD item_is_deleted INT(1) NOT NULL DEFAULT '0';"; +$SQL[] = "ALTER TABLE core_item_markers DROP INDEX item_member_id;"; +$SQL[] = "ALTER TABLE core_item_markers ADD INDEX item_member_id (item_member_id, item_is_deleted);"; + +$SQL[] = "ALTER TABLE pfields_data ADD pf_search_type varchar(5) NOT NULL default 'loose';"; +$SQL[] = "UPDATE pfields_data SET pf_search_type = 'loose';"; + +$SQL[] = "DELETE FROM core_sys_conf_settings WHERE conf_key='photo_ext';"; +$SQL[] = "delete from core_sys_conf_settings where conf_key='seo_r301';"; +$SQL[] = "DELETE from core_sys_settings_titles WHERE conf_title_keyword='searchenginespiders';"; + +$SQL[] = "ALTER TABLE sessions CHANGE login_type login_type tinyint(1) default '0';"; +$SQL[] = "ALTER TABLE sessions CHANGE location_1_type location_1_type VARCHAR( 255 ) NOT NULL;"; +$SQL[] = "ALTER TABLE sessions CHANGE location_2_type location_2_type VARCHAR( 255 ) NOT NULL;"; +$SQL[] = "ALTER TABLE sessions CHANGE location_3_type location_3_type VARCHAR( 255 ) NOT NULL;"; + +$SQL[] = "ALTER TABLE core_sys_cp_sessions ADD INDEX ( session_running_time );"; +$SQL[] = "ALTER TABLE core_sys_cp_sessions ADD INDEX ( session_member_id );"; +$SQL[] = "ALTER TABLE upgrade_history ADD INDEX upgrades ( upgrade_app , upgrade_version_id );"; +$SQL[] = "ALTER TABLE validating ADD INDEX ( lost_pass );"; +$SQL[] = "ALTER TABLE members ADD INDEX ( failed_login_count );"; +$SQL[] = "ALTER TABLE validating ADD INDEX ( coppa_user );"; +$SQL[] = "ALTER TABLE api_log ADD INDEX ( api_log_date );"; +$SQL[] = "ALTER TABLE core_applications ADD INDEX ( app_directory );"; +$SQL[] = "ALTER TABLE bulk_mail ADD INDEX ( mail_start );"; +$SQL[] = "ALTER TABLE skin_collections ADD INDEX ( set_is_default );"; +$SQL[] = "ALTER TABLE members ADD INDEX ( joined );"; +$SQL[] = "ALTER TABLE rc_classes ADD INDEX ( onoff , mod_group_perm );"; + +//----------------------------------------- +// @link http://community.invisionpower.com/tracker/issue-22903-error-on-upgrade-305-to-310/ +//----------------------------------------- + +$_tasks = array(); +$DB->build( array( 'select' => 'task_id, task_key, task_application', 'from' => 'task_manager' ) ); +$DB->execute(); + +while( $_r = $DB->fetch() ) +{ + $_tasks[ $_r['task_key'] . $_r['task_application'] ] = $_r['task_id']; +} + +$SQL[] = "DELETE FROM task_manager WHERE task_key='' OR task_key IS NULL;"; +$SQL[] = "DELETE FROM task_manager WHERE task_application='' OR task_application IS NULL;"; + +if( is_array($_tasks) AND count($_tasks) ) +{ + $SQL[] = "DELETE FROM task_manager WHERE task_id NOT IN(" . implode( ',', $_tasks ) . ");"; +} + +$SQL[] = "ALTER TABLE task_manager ADD UNIQUE task_key ( task_application , task_key );"; +$SQL[] = "ALTER TABLE reputation_index ADD INDEX member_rep ( member_id , rep_rating , rep_date );"; +$SQL[] = "ALTER TABLE announcements ADD INDEX ( announce_end );"; + +if ( $DB->checkForTable( 'cal_events' ) ) +{ + $SQL[] = "ALTER TABLE cal_events DROP INDEX daterange;"; + $SQL[] = "ALTER TABLE cal_events ADD INDEX daterange ( event_approved , event_unix_from , event_unix_to );"; + $SQL[] = "ALTER TABLE cal_calendars ADD INDEX ( cal_rss_export );"; +} + +$SQL[] = "ALTER TABLE core_sys_conf_settings ADD INDEX conf_group ( conf_group , conf_position , conf_title );"; +$SQL[] = "ALTER TABLE core_uagent_groups ADD INDEX ( ugroup_title );"; +$SQL[] = "ALTER TABLE core_uagents ADD INDEX ordering ( uagent_position , uagent_key );"; + +$SQL[] = "ALTER TABLE core_sys_conf_settings ADD INDEX ( conf_add_cache );"; +$SQL[] = "ALTER TABLE emoticons ADD INDEX ( emo_set );"; +$SQL[] = "ALTER TABLE skin_templates ADD INDEX ( template_set_id );"; +$SQL[] = "ALTER TABLE skin_css ADD INDEX ( css_set_id );"; + +$SQL[] = "ALTER TABLE message_topic_user_map DROP INDEX map_user;"; +$SQL[] = "ALTER TABLE message_topic_user_map ADD INDEX map_user ( map_user_id , map_folder_id , map_last_topic_reply );"; + +$SQL[] = "ALTER TABLE validating ADD spam_flag TINYINT NOT NULL DEFAULT '0';"; +$SQL[] = "ALTER TABLE validating ADD INDEX ( spam_flag );"; +$SQL[] = "ALTER TABLE validating ADD INDEX ( member_id );"; + +$SQL[] = "ALTER TABLE core_sys_lang ADD lang_protected tinyint(1) NOT NULL DEFAULT '0';"; + +$SQL[] = "CREATE TABLE member_status_actions ( + action_id int(10) NOT NULL AUTO_INCREMENT, + action_status_id int(10) unsigned NOT NULL DEFAULT '0', + action_reply_id int(10) unsigned NOT NULL DEFAULT '0', + action_member_id int(10) unsigned NOT NULL DEFAULT '0', + action_date int(10) unsigned NOT NULL DEFAULT '0', + action_key varchar(200) NOT NULL DEFAULT '', + action_status_owner int(10) unsigned NOT NULL DEFAULT '0', + action_app varchar(255) NOT NULL DEFAULT 'members', + action_custom_text text, + action_custom int(1) NOT NULL DEFAULT '0', + action_custom_url text, + PRIMARY KEY (action_id), + KEY action_status_id (action_status_id), + KEY action_member_id ( action_member_id , action_date ), + KEY action_date (action_date), + KEY action_custom ( action_custom , action_date ) +);"; + +$SQL[] = "CREATE TABLE member_status_replies ( + reply_id int(10) NOT NULL AUTO_INCREMENT, + reply_status_id int(10) unsigned NOT NULL DEFAULT '0', + reply_member_id int(10) unsigned NOT NULL DEFAULT '0', + reply_date int(10) unsigned NOT NULL DEFAULT '0', + reply_content text, + PRIMARY KEY (reply_id), + KEY reply_status_id (reply_status_id), + KEY reply_member_id (reply_member_id), + KEY reply_status_count (reply_status_id,reply_member_id), + KEY reply_date (reply_date) +);"; + +$SQL[] = "CREATE TABLE member_status_updates ( + status_id int(10) NOT NULL AUTO_INCREMENT, + status_member_id int(10) unsigned NOT NULL DEFAULT '0', + status_date int(10) unsigned NOT NULL DEFAULT '0', + status_content text, + status_replies int(10) unsigned NOT NULL DEFAULT '0', + status_last_ids text, + status_is_latest int(1) NOT NULL DEFAULT '0', + status_is_locked int(1) NOT NULL DEFAULT '0', + status_hash varchar(32) NOT NULL DEFAULT '', + status_imported int(1) NOT NULL DEFAULT '0', + status_creator varchar(100) NOT NULL DEFAULT '', + PRIMARY KEY (status_id), + KEY status_member_id (status_member_id), + KEY status_date (status_date), + KEY status_is_latest ( status_is_latest , status_date ), + KEY s_hash (status_member_id,status_hash,status_imported) +);"; + +$SQL[] = "CREATE TABLE inline_notifications ( +notify_id INT NOT NULL AUTO_INCREMENT , +notify_to_id INT NOT NULL DEFAULT '0', +notify_sent INT(10) NOT NULL DEFAULT '0', +notify_read INT(10) NOT NULL DEFAULT '0', +notify_title text NULL , +notify_text TEXT NULL DEFAULT NULL , +notify_from_id INT NOT NULL DEFAULT '0', +notify_type_key VARCHAR( 255 ) NULL DEFAULT NULL , +notify_url text null, +PRIMARY KEY (notify_id), +KEY notify_to_id ( notify_to_id , notify_sent ), +KEY grabber (notify_to_id, notify_read, notify_sent) +);"; + +$SQL[] = "CREATE TABLE core_soft_delete_log ( + sdl_id int(10) NOT NULL AUTO_INCREMENT, + sdl_obj_id int(10) NOT NULL DEFAULT '0', + sdl_obj_key varchar(20) NOT NULL DEFAULT '', + sdl_obj_member_id int(10) NOT NULL DEFAULT '0', + sdl_obj_date int(10) NOT NULL DEFAULT '0', + sdl_obj_reason text, + sdl_locked int(1) NOT NULL DEFAULT '0', + PRIMARY KEY (sdl_id), + KEY look_up (sdl_obj_id,sdl_obj_key) +);"; + +$SQL[] = "CREATE TABLE twitter_connect ( + t_key VARCHAR(32) NOT NULL default '', + t_token VARCHAR(255) NOT NULL default '', + t_secret VARCHAR(255) NOT NULL default '', + t_time INT(10) NOT NULL default '0' +);"; + +$SQL[] = "CREATE TABLE core_share_links ( + share_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + share_title VARCHAR(255) NOT NULL DEFAULT '', + share_url TEXT, + share_key VARCHAR(50) NOT NULL DEFAULT '', + share_enabled INT(1) NOT NULL DEFAULT '0', + share_position INT(3) NOT NULL DEFAULT '0', + share_markup TEXT, + share_canonical INT(1) NOT NULL DEFAULT '1', + PRIMARY KEY share_id (share_id) +);"; + +$SQL[] = "CREATE TABLE core_share_links_log ( + log_id INT(10) NOT NULL auto_increment, + log_date INT(10) NOT NULL default '0', + log_member_id INT(10) NOT NULL default '0', + log_url TEXT, + log_title TEXT, + log_share_key VARCHAR(50) NOT NULL default '', + log_data_app VARCHAR(50) NOT NULL default '', + log_data_type VARCHAR(50) NOT NULL default '', + log_data_primary_id INT(10) NOT NULL default '0', + log_data_secondary_id INT(10) NOT NULL default '0', + log_ip_address VARCHAR(16) NOT NULL DEFAULT '', + PRIMARY KEY log_id (log_id), + KEY findstuff (log_data_app, log_data_type, log_data_primary_id), + KEY log_date (log_date), + KEY log_member_id (log_member_id), + KEY log_share_key (log_share_key), + KEY log_ip_address (log_ip_address) +);"; + +$SQL[] = "CREATE TABLE core_share_links_caches ( + cache_id INT(10) NOT NULL auto_increment, + cache_key VARCHAR(255) NOT NULL default '', + cache_data MEDIUMTEXT, + cache_date INT(10) NOT NULL default '0', + PRIMARY KEY cache_id( cache_id ) +);"; + +$SQL[] = "CREATE TABLE core_incoming_emails ( + rule_id INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , + rule_criteria_field VARCHAR( 4 ) NOT NULL , + rule_criteria_type VARCHAR( 4 ) NOT NULL , + rule_criteria_value TEXT NOT NULL , + rule_app VARCHAR( 255 ) NOT NULL , + rule_added_by MEDIUMINT( 8 ) NOT NULL , + rule_added_date INT( 10 ) NOT NULL +);"; + +$SQL[] = "CREATE TABLE search_sessions ( + session_id VARCHAR(32) NOT NULL DEFAULT '', + session_created INT(10) NOT NULL DEFAULT '0', + session_updated INT(10) NOT NULL DEFAULT '0', + session_member_id INT(10) NOT NULL DEFAULT '0', + session_data MEDIUMTEXT, + KEY session_updated (session_updated), + PRIMARY KEY (session_id) +);"; + +$SQL[] = "CREATE TABLE skin_merge_session ( + merge_id INT(10) NOT NULL auto_increment, + merge_date INT(10) NOT NULL DEFAULT '0', + merge_set_id INT(10) NOT NULL DEFAULT '0', + merge_master_key VARCHAR(200) NOT NULL DEFAULT '', + merge_old_version VARCHAR(200) NOT NULL DEFAULT '', + merge_new_version VARCHAR(200) NOT NULL DEFAULT '', + merge_templates_togo INT(10) NOT NULL DEFAULT '0', + merge_css_togo INT(10) NOT NULL DEFAULT '0', + merge_templates_done INT(10) NOT NULL DEFAULT '0', + merge_css_done INT(10) NOT NULL DEFAULT '0', + merge_m_templates_togo INT(10) NOT NULL DEFAULT '0', + merge_m_css_togo INT(10) NOT NULL DEFAULT '0', + merge_m_templates_done INT(10) NOT NULL DEFAULT '0', + merge_m_css_done INT(10) NOT NULL DEFAULT '0', + merge_diff_done INT(1) NOT NULL DEFAULT '0', + PRIMARY KEY (merge_id) +);"; + +$SQL[] = "CREATE TABLE skin_merge_changes ( + change_id INT(10) NOT NULL auto_increment, + change_key VARCHAR(255) NOT NULL DEFAULT '', + change_session_id INT(10) NOT NULL DEFAULT '0', + change_updated INT(10) NOT NULL DEFAULT '0', + change_data_group VARCHAR(255) NOT NULL DEFAULT '', + change_data_title VARCHAR(255) NOT NULL DEFAULT '', + change_data_content MEDIUMTEXT, + change_data_type VARCHAR(10) NOT NULL DEFAULT 'template', + change_is_new INT(1) NOT NULL DEFAULT '0', + change_is_diff INT(1) NOT NULL DEFAULT '0', + change_can_merge INT(1) NOT NULL DEFAULT '0', + change_merge_content MEDIUMTEXT, + change_is_conflict INT(1) NOT NULL DEFAULT '0', + change_final_content MEDIUMTEXT, + change_changes_applied INT(1) NOT NULL DEFAULT '0', + change_original_content MEDIUMTEXT, + PRIMARY KEY (change_id), + KEY (change_key, change_data_type) +);"; + +$SQL[] = "CREATE TABLE facebook_oauth_temp ( + f_key VARCHAR(32) NOT NULL default '', + f_token VARCHAR(255) NOT NULL default '', + f_time INT(10) NOT NULL default '0' +);"; + +$SQL[] = "INSERT INTO member_status_updates (status_member_id, status_date, status_content, status_replies, status_is_latest ) SELECT pp_member_id, pp_status_update, pp_status, 0, 1 FROM `{$PRE}profile_portal` WHERE LENGTH(pp_status) > 0;"; + + +$SQL[] = "ALTER TABLE members ADD twitter_id VARCHAR(255) NOT NULL DEFAULT '';"; +$SQL[] = "ALTER TABLE members ADD twitter_token VARCHAR(255) NOT NULL DEFAULT '';"; +$SQL[] = "ALTER TABLE members ADD twitter_secret VARCHAR(255) NOT NULL DEFAULT '';"; +$SQL[] = "ALTER TABLE members ADD notification_cnt MEDIUMINT NOT NULL DEFAULT '0';"; +$SQL[] = "ALTER TABLE members ADD tc_lastsync INT(10) NOT NULL default '0';"; +$SQL[] = "ALTER TABLE members ADD fb_session VARCHAR(200) NOT NULL default '';"; +$SQL[] = "ALTER TABLE members DROP fb_emailallow;"; +$SQL[] = "ALTER TABLE members ADD fb_token TEXT NULL;"; + +$SQL[] = "ALTER TABLE members ADD INDEX fb_uid (fb_uid);"; +$SQL[] = "ALTER TABLE members ADD INDEX twitter_id (twitter_id);"; + + +$SQL[] = "ALTER TABLE profile_portal ADD tc_last_sid_import BIGINT(20) UNSIGNED NOT NULL default '0';"; +$SQL[] = "ALTER TABLE profile_portal ADD tc_photo text;"; +$SQL[] = "ALTER TABLE profile_portal ADD tc_bwoptions int(10) unsigned NOT NULL default '0';"; +$SQL[] = "ALTER TABLE profile_portal ADD pp_customization mediumtext;"; + +$SQL[] = "ALTER TABLE groups ADD g_max_notifications MEDIUMINT NOT NULL DEFAULT '0';"; +$SQL[] = "ALTER TABLE groups ADD g_max_bgimg_upload INT(10) NOT NULL default '0';"; + +$SQL[] = "ALTER TABLE rc_classes ADD app VARCHAR( 32 ) NOT NULL;"; +$SQL[] = "ALTER TABLE forums ADD disable_sharelinks INT(1) NOT NULL default '0';"; + +$SQL[] = "ALTER TABLE topics ADD topic_deleted_posts INT(10) NOT NULL default '0';"; +$SQL[] = "ALTER TABLE forums ADD deleted_posts INT(10) NOT NULL default '0';"; +$SQL[] = "ALTER TABLE forums ADD deleted_topics INT(10) NOT NULL default '0';"; + +$SQL[] = "ALTER TABLE forums ADD rules_raw_html tinyint(1) NOT NULL default '0';"; + +$SQL[] = "UPDATE rc_classes SET app='core' WHERE my_class='default';"; +$SQL[] = "UPDATE rc_classes SET app='forums' WHERE my_class='post';"; +$SQL[] = "UPDATE rc_classes SET app='blog' WHERE my_class='blog';"; +$SQL[] = "UPDATE rc_classes SET app='gallery' WHERE my_class='gallery';"; +$SQL[] = "UPDATE rc_classes SET app='downloads' WHERE my_class='downloads';"; +$SQL[] = "UPDATE rc_classes SET app='members' WHERE my_class='messages';"; +$SQL[] = "UPDATE rc_classes SET app='members' WHERE my_class='profiles';"; +$SQL[] = "UPDATE rc_classes SET app='calendar' WHERE my_class='calendar';"; + + +$SQL[] = "INSERT INTO core_share_links VALUES(1, 'Twitter', 'http://twitter.com/home?status={title}%20{url}', 'twitter', 1, 1, '',1);"; +$SQL[] = "INSERT INTO core_share_links VALUES(2, 'Facebook', 'http://www.facebook.com/share.php?u={url}', 'facebook', 1, 2, '',1);"; +$SQL[] = "INSERT INTO core_share_links VALUES(3, 'Digg', 'http://digg.com/submit?phase=2&url={url}&title={title}', 'digg', 1, 3, '',1);"; +$SQL[] = "INSERT INTO core_share_links VALUES(4, 'Del.icio.us', 'http://del.icio.us/post?v=2&url={url}&title={title}', 'delicious', 1, 4, '',1);"; +$SQL[] = "INSERT INTO core_share_links VALUES(5, 'Вконтакте', 'http://vkontakte.ru/share.php?url={url}&title={title}', 'vkontakte', 1, 5, '',1);"; +$SQL[] = "INSERT INTO core_share_links VALUES(6, 'Мемори', 'http://memori.ru/link/?sm=1&u_data[url]={url}&u_data[name]={title}', 'memori', 1, 6, '',1);"; +$SQL[] = "INSERT INTO core_share_links VALUES(7, 'БобрДобр', 'http://bobrdobr.ru/addext.html?url={url}&title={title}', 'bobrdobr', 1, 7, '',1);"; +$SQL[] = "INSERT INTO core_share_links VALUES(8, 'Email', '', 'email', 1, 8, '',1);"; +$SQL[] = "INSERT INTO core_share_links VALUES(9, 'Buzz', '', 'buzz', 1, 3, '', 1);"; +$SQL[] = "INSERT INTO core_share_links VALUES(10, 'Печать', '', 'print', 1, 10, '', 0);"; +$SQL[] = "INSERT INTO core_share_links VALUES(11, 'Скачать', '', 'download', 1, 11, '', 0);"; + +/* Grab stuff */ +$DB->build( array( 'select' => '*', + 'from' => 'skin_collections' ) ); +$DB->execute(); + +$skins = array(); + +while( $row = $DB->fetch() ) +{ + if ( in_array( $row['set_key'], array( 'default', 'lofi', 'xmlskin' ) ) ) + { + $skins[ $row['set_key'] ] = $row['set_id']; + } +} + +$ids = implode( ',', array_values( $skins ) ); + +/* Do we have a master skin? */ +if ( ! $skins['default'] ) +{ + /* Insert it */ + $DB->insert( 'skin_collections', array( 'set_name' => 'IP.Board', + 'set_key' => 'default', + 'set_parent_id' => 0, + 'set_parent_array' => 'a:0:{}', + 'set_child_array' => 'a:0:{}', + 'set_permissions' => '*', + 'set_is_default' => 0, + 'set_author_name' => "Invision Power Services, Inc", + 'set_author_url' => 'http://bestcms.ws', + 'set_image_dir' => 'master', + 'set_emo_dir' => 'default', + 'set_hide_from_list' => 1, + 'set_css_groups' => '', + 'set_output_format' => 'html' ) ); +} + +/* Do we have a lofi skin? */ +if ( ! $skins['lofi'] ) +{ + /* Insert it */ + $DB->insert( 'skin_collections', array( 'set_name' => 'IP.Board Lofi', + 'set_key' => 'lofi', + 'set_parent_id' => 0, + 'set_parent_array' => 'a:0:{}', + 'set_child_array' => 'a:0:{}', + 'set_permissions' => '*', + 'set_is_default' => 0, + 'set_author_name' => "Invision Power Services, Inc", + 'set_author_url' => 'http://bestcms.ws', + 'set_image_dir' => 'master', + 'set_emo_dir' => 'default', + 'set_hide_from_list' => 1, + 'set_css_groups' => '', + 'set_output_format' => 'html' ) ); +} + +/* Make sure we have a HTML default... */ +$skin = $DB->buildAndFetch( array( 'select' => 'set_id', + 'from' => 'skin_collections', + 'where' => 'set_output_format=\'html\' AND set_is_default=1' ) ); + +if ( ! $skin['set_id'] ) +{ + $DB->update( 'skin_collections', array( 'set_is_default' => 1, 'set_hide_from_list' => 0 ), "set_key='default'" ); +} + +$SQL[] = "ALTER TABLE custom_bbcode ADD bbcode_custom_regex TEXT NULL DEFAULT NULL;"; + +$SQL[] = "ALTER TABLE skin_templates ADD template_master_key VARCHAR(100) NOT NULL DEFAULT '';"; +$SQL[] = "ALTER TABLE skin_templates ADD INDEX template_master_key (template_master_key);"; + +$SQL[] = "ALTER TABLE skin_css ADD css_master_key VARCHAR(100) NOT NULL DEFAULT '';"; + +$SQL[] = "ALTER TABLE skin_collections ADD set_master_key VARCHAR(100) NOT NULL DEFAULT '';"; + +# will need to sort children out too +$uagents = 'a:2:{s:6:"groups";a:0:{}s:7:"uagents";a:10:{s:10:"blackberry";s:0:"";s:6:"iphone";s:0:"";s:9:"ipodtouch";s:0:"";s:12:"sonyericsson";s:0:"";s:5:"nokia";s:0:"";s:8:"motorola";s:0:"";s:7:"samsung";s:0:"";s:3:"htc";s:0:"";s:2:"lg";s:0:"";s:4:"palm";s:0:"";}}'; +$SQL[] = "UPDATE skin_collections SET set_master_key='root' WHERE set_key='default';"; +$SQL[] = "UPDATE skin_collections SET set_name='IP.Board Mobile', set_master_key='mobile', set_key='mobile', set_image_dir='mobile', set_locked_uagent='{$uagents}' WHERE set_key='lofi';"; +$SQL[] = "UPDATE skin_collections SET set_master_key='xmlskin' WHERE set_key='xmlskin';"; + +$SQL[] = "UPDATE skin_templates SET template_master_key='root' WHERE template_set_id=0;"; + +$SQL[] = "UPDATE skin_css SET css_master_key='root' WHERE css_set_id=0;"; + +if ( trim($ids) ) +{ + $SQL[] = "DELETE FROM skin_templates WHERE template_set_id IN (" . $ids . ");"; + $SQL[] = "DELETE FROM skin_css WHERE css_set_id IN (" . $ids . ");"; +} + +$SQL[] = "ALTER TABLE skin_collections ADD set_order INT( 10 ) NOT NULL;"; +$SQL[] = "ALTER TABLE skin_collections ADD INDEX ( set_order );"; + +$SQL[] = "ALTER TABLE skin_replacements ADD replacement_master_key VARCHAR(100) NOT NULL DEFAULT '';"; +$SQL[] = "UPDATE skin_replacements SET replacement_master_key='root' WHERE replacement_set_id=0;"; + + +# Optimizations +$SQL[] = "ALTER TABLE forum_tracker DROP INDEX member_id;"; +$SQL[] = "ALTER TABLE forum_tracker ADD INDEX member_id ( member_id , last_sent );"; + +$SQL[] = "ALTER TABLE tracker DROP INDEX tm_id;"; +$SQL[] = "ALTER TABLE tracker ADD INDEX tm_id ( member_id , topic_id , last_sent );"; + +$SQL[] = "ALTER TABLE forum_tracker ADD INDEX ( forum_track_type );"; +$SQL[] = "ALTER TABLE tracker ADD INDEX ( topic_track_type );"; + +$SQL[] = "ALTER TABLE skin_templates ADD INDEX ( template_name(100) , template_group(100) );"; + +$SQL[] = "ALTER TABLE members ADD INDEX ( email );"; + diff --git a/upload/admin/applications/core/setup/versions/upg_31003/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_31003/mysql_updates.php new file mode 100644 index 00000000..e948192f --- /dev/null +++ b/upload/admin/applications/core/setup/versions/upg_31003/mysql_updates.php @@ -0,0 +1,35 @@ +getPrefix()); +$DB = ipsRegistry::DB(); + +if ( ! $DB->checkForField( 'replacement_master_key', 'skin_replacements' ) ) +{ + $SQL[] = "ALTER TABLE skin_replacements ADD replacement_master_key VARCHAR(100) NOT NULL DEFAULT '';"; + $SQL[] = "UPDATE skin_replacements SET replacement_master_key='root' WHERE replacement_set_id=0;"; +} + +$SQL[] = "CREATE TABLE vkontakte_connect ( + v_key varchar(32) NOT NULL default '', + v_user varchar(255) NOT NULL default '', + v_data varchar(255) NOT NULL default '', + v_id bigint(20) NOT NULL +);"; + +$SQL[] = "ALTER TABLE members ADD vk_uid bigint(20) unsigned NOT NULL default '0';"; +$SQL[] = "ALTER TABLE members ADD INDEX vk_uid (vk_uid);"; \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_31004/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_31004/mysql_updates.php new file mode 100644 index 00000000..f06ed975 --- /dev/null +++ b/upload/admin/applications/core/setup/versions/upg_31004/mysql_updates.php @@ -0,0 +1,50 @@ +checkForIndex( 'group_perms', 'rc_classes' ) ) +{ + $SQL[] = "ALTER TABLE rc_classes DROP INDEX group_perms;"; +} +else if ( $DB->checkForIndex( 'onoff', 'rc_classes' ) ) +{ + $SQL[] = "ALTER TABLE rc_classes DROP INDEX onoff;"; +} + +$SQL[] = "ALTER TABLE rc_classes CHANGE group_can_report group_can_report TEXT NULL DEFAULT NULL"; +$SQL[] = "ALTER TABLE rc_classes CHANGE mod_group_perm mod_group_perm TEXT NULL DEFAULT NULL;"; + +$SQL[] = "ALTER TABLE rc_classes ADD INDEX onoff ( onoff , mod_group_perm ( 255 ) );"; + +$SQL[] = "ALTER TABLE pfields_content DROP updated;"; diff --git a/upload/admin/applications/core/setup/versions/upg_31005/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_31005/mysql_updates.php new file mode 100644 index 00000000..7d5de29d --- /dev/null +++ b/upload/admin/applications/core/setup/versions/upg_31005/mysql_updates.php @@ -0,0 +1,27 @@ +\n

    Hello World

    \n[/html]' where bbcode_tag='html';"; + +/* Have to add this into 3.0.0 upgrader now, so check here if we're upgrade > 3.0.0 */ +if ( ! $DB->checkForField( 'mediatag_position', 'bbcode_mediatag' ) ) +{ + $SQL[] = "ALTER TABLE bbcode_mediatag ADD mediatag_position SMALLINT NOT NULL DEFAULT '0';"; +} diff --git a/upload/admin/applications/core/setup/versions/upg_31006/index.html b/upload/admin/applications/core/setup/versions/upg_31006/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/core/setup/versions/upg_31006/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_31006/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_31006/mysql_updates.php new file mode 100644 index 00000000..eb8f8386 --- /dev/null +++ b/upload/admin/applications/core/setup/versions/upg_31006/mysql_updates.php @@ -0,0 +1,361 @@ +checkForTable('cal_events') ) +{ + $SQL[] = "ALTER TABLE cal_events CHANGE event_tz event_tz VARCHAR( 4 ) NOT NULL DEFAULT '0'"; +} + +$SQL[] = "ALTER TABLE mobile_notifications DROP INDEX id;"; +$SQL[] = "ALTER TABLE profile_friends DROP INDEX friends_member_id;"; +$SQL[] = "ALTER TABLE member_status_updates DROP INDEX status_member_id;"; +$SQL[] = "ALTER TABLE profile_friends_flood DROP INDEX friends_member_id;"; +$SQL[] = "ALTER TABLE moderator_logs CHANGE topic_title topic_title TEXT NULL DEFAULT NULL;"; +$SQL[] = "ALTER TABLE moderator_logs CHANGE query_string query_string TEXT NULL DEFAULT NULL;"; +$SQL[] = "ALTER TABLE moderator_logs CHANGE http_referer http_referer TEXT NULL DEFAULT NULL;"; +$SQL[] = "ALTER TABLE moderator_logs CHANGE action action TEXT NULL DEFAULT NULL;"; +$SQL[] = "ALTER TABLE profile_portal_views ADD INDEX ( views_member_id );"; +$SQL[] = "ALTER TABLE topic_views ADD INDEX ( views_tid );"; +$SQL[] = "ALTER TABLE attachments DROP INDEX attach_where;"; +$SQL[] = "DELETE FROM core_sys_conf_settings WHERE conf_key='acp_tutorial_mode';"; +$SQL[] = "UPDATE skin_templates SET template_data='\$required_output=\'\',\$optional_output=\'\',\$day=\'\',\$mon=\'\',\$year=\'\'' WHERE template_name='membersProfileForm';"; + +//----------------------------------------- +// Remove unused tables +//----------------------------------------- + +if( $DB->checkForTable('facebook_oauth_temp') ) +{ + $SQL[] = "DROP TABLE facebook_oauth_temp;"; +} + +if( $DB->checkForTable('search_index') ) +{ + $SQL[] = "DROP TABLE search_index;"; +} + +// Tracker is using this apparently +//if( $DB->checkForTable('search_results') ) +//{ +// $SQL[] = "DROP TABLE search_results;"; +//} + +if( $DB->checkForTable('templates_diff_import') ) +{ + $SQL[] = "DROP TABLE templates_diff_import;"; +} + +if( $DB->checkForTable('template_diff_changes') ) +{ + $SQL[] = "DROP TABLE template_diff_changes;"; +} + +if( $DB->checkForTable('template_diff_session') ) +{ + $SQL[] = "DROP TABLE template_diff_session;"; +} + +//----------------------------------------- +// And unused columns *sigh* +// Fun fact: +// Matt said: YES - and all below apart from that massive ALTER list and Im not touching that. :p so there +//----------------------------------------- + +if( $DB->checkForField( 'attach_approved', 'attachments' ) ) +{ + $SQL[] = "ALTER TABLE attachments DROP attach_approved;"; +} + +if( $DB->checkForField( 'attach_temp', 'attachments' ) ) +{ + $SQL[] = "ALTER TABLE attachments DROP attach_temp;"; +} + +if( $DB->checkForField( 'mail_honor', 'bulk_mail' ) ) +{ + $SQL[] = "ALTER TABLE bulk_mail DROP mail_honor;"; +} + +//if( $DB->checkForField( 'cs_extra', 'cache_store' ) ) +//{ +// $SQL[] = "ALTER TABLE cache_store DROP cs_extra;"; +//} + +if( $DB->checkForField( 'rss_foreign_id', 'core_rss_imported' ) ) +{ + $SQL[] = "ALTER TABLE core_rss_imported DROP rss_foreign_id;"; +} + +if( $DB->checkForField( 'share_url', 'core_share_links' ) ) +{ + $SQL[] = "ALTER TABLE core_share_links DROP share_url;"; +} + +if( $DB->checkForField( 'share_markup', 'core_share_links' ) ) +{ + $SQL[] = "ALTER TABLE core_share_links DROP share_markup;"; +} + +if( $DB->checkForField( 'conf_end_group', 'core_sys_conf_settings' ) ) +{ + $SQL[] = "ALTER TABLE core_sys_conf_settings DROP conf_end_group;"; +} + +if( $DB->checkForField( 'lang_currency_symbol', 'core_sys_lang' ) ) +{ + $SQL[] = "ALTER TABLE core_sys_lang DROP lang_currency_symbol;"; +} + +if( $DB->checkForField( 'lang_decimal', 'core_sys_lang' ) ) +{ + $SQL[] = "ALTER TABLE core_sys_lang DROP lang_decimal;"; +} + +if( $DB->checkForField( 'lang_comma', 'core_sys_lang' ) ) +{ + $SQL[] = "ALTER TABLE core_sys_lang DROP lang_comma;"; +} + +if( $DB->checkForField( 'sys_login_skin', 'core_sys_login' ) ) +{ + $SQL[] = "ALTER TABLE core_sys_login DROP sys_login_skin;"; +} + +if( $DB->checkForField( 'sys_login_language', 'core_sys_login' ) ) +{ + $SQL[] = "ALTER TABLE core_sys_login DROP sys_login_language;"; +} + +if( $DB->checkForField( 'sys_login_last_visit', 'core_sys_login' ) ) +{ + $SQL[] = "ALTER TABLE core_sys_login DROP sys_login_last_visit;"; +} + +if( $DB->checkForField( 'conf_title_module', 'core_sys_settings_titles' ) ) +{ + $SQL[] = "ALTER TABLE core_sys_settings_titles DROP conf_title_module;"; +} + +if( $DB->checkForField( 'bbcode_parse', 'custom_bbcode' ) ) +{ + $SQL[] = "ALTER TABLE custom_bbcode DROP bbcode_parse;"; +} + +if( $DB->checkForField( 'topic_id', 'email_logs' ) ) +{ + $SQL[] = "ALTER TABLE email_logs DROP topic_id;"; +} + +if( $DB->checkForField( 'redirect_loc', 'forums' ) ) +{ + $SQL[] = "ALTER TABLE forums DROP redirect_loc;"; +} + +if( $DB->checkForField( 'topic_mm_id', 'forums' ) ) +{ + $SQL[] = "ALTER TABLE forums DROP topic_mm_id;"; +} + +if( $DB->checkForField( 'permission_array', 'forums' ) ) +{ + $SQL[] = "ALTER TABLE forums DROP permission_array;"; +} + +if( $DB->checkForField( 'g_invite_friend', 'groups' ) ) +{ + $SQL[] = "ALTER TABLE groups DROP g_invite_friend;"; +} + +if( $DB->checkForField( 'g_can_remove', 'groups' ) ) +{ + $SQL[] = "ALTER TABLE groups DROP g_can_remove;"; +} + +if( $DB->checkForField( 'login_date', 'login_methods' ) ) +{ + $SQL[] = "ALTER TABLE login_methods DROP login_date;"; +} + +if( $DB->checkForField( 'mail_type', 'mail_queue' ) ) +{ + $SQL[] = "ALTER TABLE mail_queue DROP mail_type;"; +} + +if( $DB->checkForField( 'edit_user', 'moderators' ) ) +{ + $SQL[] = "ALTER TABLE moderators DROP edit_user;"; +} + +if( $DB->checkForField( 'rating_added', 'profile_ratings' ) ) +{ + $SQL[] = "ALTER TABLE profile_ratings DROP rating_added;"; +} + +if( $DB->checkForField( 'misc', 'reputation_index' ) ) +{ + $SQL[] = "ALTER TABLE reputation_index DROP misc;"; +} + +if( $DB->checkForField( 'pp_profile_update', 'profile_portal' ) ) +{ + $SQL[] = "ALTER TABLE profile_portal DROP pp_profile_update;"; +} + +if( $DB->checkForField( 'pp_bio_content', 'profile_portal' ) ) +{ + $SQL[] = "ALTER TABLE profile_portal DROP pp_bio_content;"; +} + +if( $DB->checkForField( 'pp_comment_count', 'profile_portal' ) ) +{ + $SQL[] = "ALTER TABLE profile_portal DROP pp_comment_count;"; +} + +if( $DB->checkForField( 'pp_setting_notify_comments', 'profile_portal' ) ) +{ + $SQL[] = "ALTER TABLE profile_portal DROP pp_setting_notify_comments;"; +} + +if( $DB->checkForField( 'pp_setting_notify_friend', 'profile_portal' ) ) +{ + $SQL[] = "ALTER TABLE profile_portal DROP pp_setting_notify_friend;"; +} + +if( $DB->checkForField( 'pp_friend_count', 'profile_portal' ) ) +{ + $SQL[] = "ALTER TABLE profile_portal DROP pp_friend_count;"; +} + +if( $DB->checkForField( 'pp_gender', 'profile_portal' ) ) +{ + $SQL[] = "ALTER TABLE profile_portal DROP pp_gender;"; +} + +if( $DB->checkForField( 'pp_profile_views', 'profile_portal' ) ) +{ + $SQL[] = "ALTER TABLE profile_portal DROP pp_profile_views;"; +} + +if( $DB->checkForField( 'links', 'profile_portal' ) ) +{ + $SQL[] = "ALTER TABLE profile_portal DROP links;"; +} + +if( $DB->checkForField( 'bio', 'profile_portal' ) ) +{ + $SQL[] = "ALTER TABLE profile_portal DROP bio;"; +} + +if( $DB->checkForField( 'ta_size', 'profile_portal' ) ) +{ + $SQL[] = "ALTER TABLE profile_portal DROP ta_size;"; +} + +if( $DB->checkForField( 'fb_status', 'profile_portal' ) ) +{ + $SQL[] = "ALTER TABLE profile_portal DROP fb_status;"; +} + +if( $DB->checkForField( 'pp_status', 'profile_portal' ) ) +{ + $SQL[] = "ALTER TABLE profile_portal DROP pp_status;"; +} + +if( $DB->checkForField( 'pp_status_update', 'profile_portal' ) ) +{ + $SQL[] = "ALTER TABLE profile_portal DROP pp_status_update;"; +} + +if( $DB->checkForField( 'max_points', 'rc_modpref' ) ) +{ + $SQL[] = "ALTER TABLE rc_modpref DROP max_points;"; +} + +if( $DB->checkForField( 'reports_pp', 'rc_modpref' ) ) +{ + $SQL[] = "ALTER TABLE rc_modpref DROP reports_pp;"; +} + +if( $DB->checkForField( 'by_pm', 'rc_modpref' ) ) +{ + $SQL[] = "ALTER TABLE rc_modpref DROP by_pm;"; +} + +if( $DB->checkForField( 'by_email', 'rc_modpref' ) ) +{ + $SQL[] = "ALTER TABLE rc_modpref DROP by_email;"; +} + +if( $DB->checkForField( 'by_alert', 'rc_modpref' ) ) +{ + $SQL[] = "ALTER TABLE rc_modpref DROP by_alert;"; +} + +//if( $DB->checkForField( 'location', 'sessions' ) ) +//{ +// $SQL[] = "ALTER TABLE sessions DROP location;"; +//} + +if( $DB->checkForField( 'misc', 'tags_index' ) ) +{ + $SQL[] = "ALTER TABLE tags_index DROP misc;"; +} + +if( $DB->checkForField( 'total_votes', 'topics' ) ) +{ + $SQL[] = "ALTER TABLE topics DROP total_votes;"; +} + +if( $DB->checkForField( 'email_pm', 'members' ) ) +{ + $SQL[] = "ALTER TABLE members DROP email_pm;"; +} + +if( $DB->checkForField( 'view_pop', 'members' ) ) +{ + $SQL[] = "ALTER TABLE members DROP view_pop;"; +} \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_31007/index.html b/upload/admin/applications/core/setup/versions/upg_31007/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/core/setup/versions/upg_31007/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/setup/versions/upg_31007/mysql_updates.php b/upload/admin/applications/core/setup/versions/upg_31007/mysql_updates.php new file mode 100644 index 00000000..0e11fea0 --- /dev/null +++ b/upload/admin/applications/core/setup/versions/upg_31007/mysql_updates.php @@ -0,0 +1,56 @@ +checkForTable('core_like_cache') ) +{ + $SQL[] = "DROP TABLE core_like_cache;"; +} + +if ( $DB->checkForTable('core_like') ) +{ + $SQL[] = "DROP TABLE core_like;"; +} + +$SQL[] = "CREATE TABLE core_like_cache ( + like_cache_id VARCHAR(32), + like_cache_app VARCHAR(150) NOT NULL DEFAULT '', + like_cache_area VARCHAR(200) NOT NULL DEFAULT '', + like_cache_rel_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, + like_cache_data TEXT, + like_cache_expire INT(10) NOT NULL DEFAULT '0', + PRIMARY KEY (like_cache_id) +);"; + + +$SQL[] = "CREATE TABLE core_like ( + like_id VARCHAR(32), + like_lookup_id VARCHAR(32), + like_app VARCHAR(150) NOT NULL DEFAULT '', + like_area VARCHAR(200) NOT NULL DEFAULT '', + like_rel_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, + like_member_id INT(10) UNSIGNED NOT NULL DEFAULT 0, + like_is_anon INT(1) NOT NULL DEFAULT 0, + like_added INT(10) UNSIGNED NOT NULL DEFAULT 0, + like_notify_do INT(1) NOT NULL DEFAULT 0, + like_notify_meta TEXT, + like_notify_freq VARCHAR(200) NOT NULL DEFAULT '', + like_notify_sent INT(10) UNSIGNED NOT NULL DEFAULT 0, + PRIMARY KEY (like_id), + KEY find_rel_favs ( like_lookup_id, like_is_anon, like_added), + KEY like_member_id (like_member_id,like_added) +);"; + diff --git a/upload/admin/applications/core/skin_cp/cp_skin_adminlogs.php b/upload/admin/applications/core/skin_cp/cp_skin_adminlogs.php index 9572f0ca..ad9cb61e 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_adminlogs.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_adminlogs.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Admin log skin file - * Last Updated: $Date: 2009-09-24 16:56:42 -0400 (Thu, 24 Sep 2009) $ + * Last Updated: $Date: 2010-06-24 05:36:05 -0400 (Thu, 24 Jun 2010) $ + * * - * @author $Author: rikki $ + * @author $Author: matt $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 5154 $ + * @version $Revision: 6570 $ */ class cp_skin_adminlogs extends output @@ -54,6 +56,8 @@ $IPBHTML .= <<{$this->lang->words['sched_error_logs']} {$this->lang->words['al_error_logs']} {$this->lang->words['slog_spamlogs']} + {$this->lang->words['mlog_mobilelogs']} + {$this->lang->words['mlog_sqlerrors']} HTML; @@ -200,6 +204,112 @@ HTML; return $IPBHTML; } +/** + * SQL log RAPPER LIKE ICE T BUT MORE LIKE COFFEE + * + * @access public + * @param array Rows + * @param string Page links + * @return string HTML + */ +public function sqllogsWrapper( $rows ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

    {$this->lang->words['sqllog_title']}

    + + +
    +

    {$this->lang->words['sqllog_title']}

    + + + + + + + + +HTML; + +if( count($rows) AND is_array($rows) ) +{ + foreach( $rows as $row ) + { + $size = IPSLib::sizeFormat( $row['size'] ); + $mtime = $this->registry->class_localization->getDate( $row['mtime'], 'SHORT' ); + + $IPBHTML .= << + + + + + + +HTML; + } +} +else +{ + $IPBHTML .= << + + +HTML; +} + +$IPBHTML .= << +
    +
     
    +
    + +
    +HTML; + +//--endhtml--// +return $IPBHTML; +} + + +/** + * View a log + * + * @access public + */ +public function sqlLogsView( $file, $size, $content ) { + +$tailSize = IPSLib::strlenToBytes( strlen( $content ) ); + +/* Display a message? */ +if ( $tailSize < $size ) +{ + $this->registry->output->global_message = sprintf( $this->lang->words['sqllog_more_file'], $file ); +} + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

    {$this->lang->words['sqllog_title']}

    + + +
    +

    {$file}

    +
    +
    {$content}
    +
    +
    +HTML; + +//--endhtml--// +return $IPBHTML; +} + /** * View an individual admin's logs * diff --git a/upload/admin/applications/core/skin_cp/cp_skin_api.php b/upload/admin/applications/core/skin_cp/cp_skin_api.php index b7c73373..403dba6e 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_api.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_api.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * API users skin file - * Last Updated: $Date: 2009-08-18 16:46:02 -0400 (Tue, 18 Aug 2009) $ + * Last Updated: $Date: 2010-09-29 20:23:38 -0400 (Wed, 29 Sep 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 5027 $ + * @version $Revision: 6925 $ */ class cp_skin_api extends output @@ -51,20 +53,20 @@ $IPBHTML .= <<{$this->lang->words['a_basics']}
     {$this->lang->words['sqllog_name']}{$this->lang->words['sqllog_date']}{$this->lang->words['sqllog_size']} 
    {$row['name']}{$mtime}{$size}
    {$this->lang->words['sqllog_noresults']}
    - - + + - - + + - - + + - - + +
    {$this->lang->words['a_key']}{$log['api_log_key']}{$this->lang->words['a_key']}{$log['api_log_key']}
    {$this->lang->words['a_ip']}{$log['api_log_ip']}{$this->lang->words['a_ip']}{$log['api_log_ip']}
    {$this->lang->words['a_time']}{$log['_api_log_date']}{$this->lang->words['a_time']}{$log['_api_log_date']}
    {$this->lang->words['a_success']}-{$this->lang->words['a_success']}-
    @@ -123,14 +125,14 @@ if ( is_array( $logs ) AND count( $logs ) ) $IPBHTML .= << - - + - {$r['api_log_key']}
    {$r['api_log_ip']}
    {$r['_api_log_date']} - - + - - - + - EOF; @@ -138,7 +140,7 @@ EOF; } $IPBHTML .= << -
    $links
    +
    {$links}
    EOF; diff --git a/upload/admin/applications/core/skin_cp/cp_skin_applications.php b/upload/admin/applications/core/skin_cp/cp_skin_applications.php index 264f6b42..2ebd5ed2 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_applications.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_applications.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Applications skin file - * Last Updated: $Date: 2009-09-24 11:58:41 -0400 (Thu, 24 Sep 2009) $ + * Last Updated: $Date: 2010-11-17 08:24:42 -0500 (Wed, 17 Nov 2010) $ + * * - * @author $Author: matt $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 5150 $ + * @version $Revision: 7205 $ */ class cp_skin_applications extends output @@ -45,14 +47,14 @@ public function module_form( $form, $title, $formcode, $button, $module, $applic $IPBHTML = ""; //--starthtml--// -$title = $formcode == module_edit_do ? $this->lang->words['module_form_edit_title'] : $this->lang->words['module_form_add_title']; +$title = $formcode == 'module_edit_do' ? $this->lang->words['module_form_edit_title'] : $this->lang->words['module_form_add_title']; $IPBHTML .= <<

    {$title}

    -
    form_code}&do=$formcode&app_id={$application['app_id']}&sys_module_id={$module['sys_module_id']}' method='POST'> +form_code}&do={$formcode}&app_id={$application['app_id']}&sys_module_id={$module['sys_module_id']}' method='POST'>

    {$this->lang->words['a_modules']}

    @@ -77,10 +79,6 @@ $IPBHTML .= <<{$this->lang->words['a_modver']}{$this->lang->words['a_modver_info']} {$form['sys_module_version']}
  • -
  • {$form['sys_module_visible']} @@ -99,7 +97,7 @@ $IPBHTML .= <<
    - +
    @@ -110,27 +108,6 @@ EOF; return $IPBHTML; } -/** - * No up/down arrow - * - * @access public - * @param int Module id - * @return string HTML - * @deprecated Don't think this is used any longer - */ -public function module_position_blank($sys_module_id) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -EOF; - -//--endhtml--// -return $IPBHTML; -} - /** * List the modules * @@ -152,8 +129,8 @@ $IPBHTML .= <<{$_type} {$this->lang->words['a_modules']} «{$application['app_title']}» @@ -162,13 +139,13 @@ $IPBHTML .= << EOF; -if( count( $modules['root'] ) ) +if( count( $modules ) ) { - foreach( $modules['root'] as $module ) + foreach( $modules as $module ) { $IPBHTML .= << - +
    - - +
  • +
  • drag
    @@ -177,7 +154,7 @@ if( count( $modules['root'] ) )
    - form_code}&do=module_edit&sys_module_id={$module['sys_module_id']}&app_id={$application['app_id']}&sys_module_admin=$sys_module_admin'>{$module['sys_module_title']} + form_code}&do=module_edit&sys_module_id={$module['sys_module_id']}&app_id={$application['app_id']}&sys_module_admin=$sys_module_admin'>{$module['sys_module_title']} EOF; if( $module['sys_module_description'] ) { @@ -192,7 +169,7 @@ EOF; {$module['sys_module_version']} - + {$this->lang->words[ @@ -201,8 +178,8 @@ EOF; if ( $module['sys_module_protected'] != 1 OR IN_DEV ) { $IPBHTML .= <<form_code}&do=module_edit&sys_module_id={$module['sys_module_id']}&app_id={$application['app_id']}&sys_module_admin=$sys_module_admin'>{$this->lang->words['a_editmod']} -
  • form_code}&do=module_remove&sys_module_id={$module['sys_module_id']}&app_id={$application['app_id']}&sys_module_admin=$sys_module_admin");'>{$this->lang->words['a_removemod']}
  • +
  • form_code}&do=module_edit&sys_module_id={$module['sys_module_id']}&app_id={$application['app_id']}&sys_module_admin=$sys_module_admin'>{$this->lang->words['a_editmod']}
  • +
  • form_code}&do=module_remove&sys_module_id={$module['sys_module_id']}&app_id={$application['app_id']}&sys_module_admin=$sys_module_admin");'>{$this->lang->words['a_removemod']}
  • EOF; } else @@ -301,7 +278,7 @@ $IPBHTML .= <<{$this->lang->words['a_apps']} -form_code}&do=$formcode&app_id={$application['app_id']}' method='POST'> +form_code}&do={$formcode}&app_id={$application['app_id']}' method='POST'>

    $title

    @@ -417,7 +394,7 @@ public function applications_list( $applications, $uninstalled=array() ) { $IPBHTML = ""; //--starthtml--// -if( !IPSLib::appIsInstalled('blog') OR !IPSLib::appIsInstalled('gallery') OR !IPSLib::appIsInstalled('downloads') OR !$this->settings['ips_cp_purchase'] ) +if( !IPSLib::appIsInstalled('nexus', false) OR !IPSLib::appIsInstalled('blog', false) OR !IPSLib::appIsInstalled('gallery', false) OR !IPSLib::appIsInstalled('ccs', false) OR !IPSLib::appIsInstalled('downloads', false) OR !$this->settings['ips_cp_purchase'] ) { $IPBHTML .= << @@ -425,42 +402,27 @@ if( !IPSLib::appIsInstalled('blog') OR !IPSLib::appIsInstalled('gallery') OR !IP EOF; - if( !IPSLib::appIsInstalled('blog') ) +foreach( array('nexus','blog','gallery','ccs','downloads') as $__app ) +{ + if( !IPSLib::appIsInstalled( $__app, false ) ) { + $_app_name = $__app == 'ccs' ? 'Content' : ucfirst($__app); + $IPBHTML .= << - - IP.Blog - -EOF; - } - - if( !IPSLib::appIsInstalled('gallery') ) - { - $IPBHTML .= << - - IP.Gallery - -EOF; - } - - if( !IPSLib::appIsInstalled('downloads') ) - { - $IPBHTML .= << - - IP.Downloads + + IP.{$_app_name} EOF; } +} if( !$this->settings['ips_cp_purchase'] ) { $IPBHTML .= << - - Удаление копирайта + + Удаление копирайта EOF; } @@ -470,16 +432,16 @@ $IPBHTML .= <<

    {$this->lang->words['a_apps']}

    +
    @@ -541,7 +503,7 @@ EOF; $IPBHTML .= << -
       
    +
    @@ -621,7 +583,7 @@ EOF; } $IPBHTML .= <<  +
     
    EOF; @@ -631,7 +593,7 @@ $IPBHTML .= <<

    {$this->lang->words['a_unapps']}

    -
    drag
    @@ -550,7 +512,7 @@ $IPBHTML .= <<
    - form_code}&do=modules_overview&app_id={$app['app_id']}&sys_module_admin=1'>{$app['titlePrefix']}{$app['app_title']} + form_code}&do=modules_overview&app_id={$app['app_id']}&sys_module_admin=1'>{$app['titlePrefix']}{$app['app_title']} EOF; @@ -570,7 +532,7 @@ $IPBHTML .= << - form_code}&do=toggle_app&app_id={$app['app_id']}' title='{$this->lang->words['toggle_app_enabled']}'> + form_code}&do=toggle_app&app_id={$app['app_id']}' title='{$this->lang->words['toggle_app_enabled']}'>- {$this->lang->words[ @@ -579,14 +541,14 @@ EOF; if ( $app['app_protected'] != 1 OR IN_DEV ) { $IPBHTML .= <<form_code}&do=application_remove_splash&app_id={$app['app_id']}");'>{$this->lang->words['a_removeapp']} -
  • form_code}&do=application_edit&app_id={$app['app_id']}'>{$this->lang->words['a_editapp']}
  • +
  • form_code}&do=application_remove_splash&app_id={$app['app_id']}");'>{$this->lang->words['a_removeapp']}
  • +
  • form_code}&do=application_edit&app_id={$app['app_id']}'>{$this->lang->words['a_editapp']}
  • EOF; } $IPBHTML .= <<form_code}&do=modules_overview&app_id={$app['app_id']}&sys_module_admin=1'>{$this->lang->words['a_manageadmin']} -
  • form_code}&do=modules_overview&app_id={$app['app_id']}&sys_module_admin=0'>{$this->lang->words['a_managepublic']}
  • +
  • form_code}&do=modules_overview&app_id={$app['app_id']}&sys_module_admin=1'>{$this->lang->words['a_manageadmin']}
  • +
  • form_code}&do=modules_overview&app_id={$app['app_id']}&sys_module_admin=0'>{$this->lang->words['a_managepublic']}
  • +
    @@ -689,19 +651,19 @@ $IPBHTML .= << EOF; +} + if ( IN_DEV ) { $IPBHTML .= <<
  • form_code}&do=inDevExportAll'>In Dev: Экспорт XML всех приложений
  • -
  • form_code}&do=inDevRebuildAll'>In Dev: Импорт XML всех приложений -
  • +
  • form_code}&do=inDevRebuildAll'>In Dev: Импорт XML всех приложений
  • EOF; } -} //--endhtml--// return $IPBHTML; } @@ -748,7 +710,7 @@ return << @@ -770,6 +732,7 @@ $HTML = ""; $leSigh = ( $this->request['checkUpdates'] ) ? ' class="closed"' : ''; $leBigh = ( $this->request['checkUpdates'] ) ? 0 : 1; +$cache = $this->cache->getCache( 'disabledHooksCache' ); $HTML .= << @@ -781,21 +744,52 @@ EOF; if ( IN_DEV ) { $HTML .= << Удалить старые кеши +
  • {$this->lang->words['remove_dead_caches']}
  • EOF; } $HTML .= << {$this->lang->words['create_hook_link']} -
  • {$this->lang->words['rebuild_app_hooks']}
  • +
  • {$this->lang->words['create_hook_link']}
  • +
  • {$this->lang->words['rebuild_app_hooks']}
  • + form_code}&do=hooks_overview&checkUpdates={$leBigh}'> {$this->lang->words['hook_check_updates']} +EOF; + +if( is_array( $cache ) && count( $cache ) ) +{ +$HTML .= << {$this->lang->words['hook_reenable_all']} +EOF; +} +else +{ +$HTML .= << {$this->lang->words['hook_disable_all']} +EOF; +} +$HTML .= << +
      +
    • {$this->lang->words['a_installedhooks']}
    • +
    • {$this->lang->words['a_disabledhook']}
    • +
    + + +
    -

    {$this->lang->words['a_installedhooks']}

    +
    -
      {$this->lang->words['a_app']}
    +
    @@ -827,7 +821,7 @@ EOF; if( IN_DEV ) { $HTML .= <<form_code}&do=edit_hook&id={$r['hook_id']}'> + form_code}&do=edit_hook&id={$r['hook_id']}'> {$r['hook_name']} EOF; @@ -861,21 +855,21 @@ EOF; @@ -893,16 +887,9 @@ EOF; $HTML .= << - -
    - -
    + + +
    -

    {$this->lang->words['a_disabledhook']}

    +
      {$this->lang->words['a_hook']} {$this->lang->words[
    - - - - + + + + EOF; @@ -942,26 +929,26 @@ if( count( $uninstalledHooks ) ) {$r['hook_name']}
    {$r['hook_desc']}
    - + @@ -979,9 +966,9 @@ EOF; $HTML .= << - +
    -form_code}&do=install_hook' method='post' enctype='multipart/form-data'> +form_code}&do=install_hook' method='post' enctype='multipart/form-data'>

    {$this->lang->words['a_installhook']}

    @@ -1021,6 +1008,22 @@ $HTML .= <<{$this->lang->words['a_setuphook']}
    +
      +
    • {$this->lang->words['hook_form_info']}
    • +
    • {$this->lang->words['a_hookrequirements']}
    • +
    • {$this->lang->words['a_hookfiles']}
    • +
    + + + form_code}' id='mainform'> @@ -1028,76 +1031,69 @@ $HTML .= <<
    -

    {$this->lang->words['hook_form_info']}

    - -
      - -
    • - - -
    • - -
    • - - -
    • - -
    • - - -
    • - -
    • - - -
    • - -
    • - - -
    • - -
    • - - -
    • - -
    • - - -
    • - -
    • - - -
    • - -
    • - - -
    • -
    -
    -
    -
    -

    {$this->lang->words['a_hookrequirements']}

    - -
      -
    • - - {$this->lang->words['a_min']}:
      - {$this->lang->words['a_max']}: -
    • -
    • - - {$this->lang->words['a_min']}:
      - {$this->lang->words['a_max']}: -
    • -
    -
    -
    -
    -

    {$this->lang->words['a_hookfiles']}

    +
    +
      +
    • + + +
    • + +
    • + + +
    • + +
    • + + +
    • + +
    • + + +
    • + +
    • + + +
    • + +
    • + + +
    • + +
    • + + +
    • + +
    • + + +
    • + +
    • + + +
    • +
    +
    +
    +
      +
    • + + {$this->lang->words['a_min']}:
      + {$this->lang->words['a_max']}: +
    • +
    • + + {$this->lang->words['a_min']}:
      + {$this->lang->words['a_max']}: +
    • +
    +
    +
    EOF; @@ -1110,11 +1106,19 @@ EOF; $hook_type_command = $file['hook_type'] == 'commandHooks' ? " selected='selected'" : ''; $hook_type_skin = $file['hook_type'] == 'skinHooks' ? " selected='selected'" : ''; $hook_type_template = $file['hook_type'] == 'templateHooks' ? " selected='selected'" : ''; + $hook_type_data = $file['hook_type'] == 'dataHooks' ? " selected='selected'" : ''; + $hook_type_library = $file['hook_type'] == 'libraryHooks' ? " selected='selected'" : ''; $latestIndex = $index > $latestIndex ? $index : $latestIndex; $HTML .= <<{$this->lang->words['a_hookfile']} #{$index}
      +EOF; + +if( IN_DEV ) +{ +$HTML .= << @@ -1124,18 +1128,60 @@ EOF; - +EOF; +} +else +{ +$HTML .= << + +EOF; +} +$HTML .= << EOF; - if( $file['hook_type'] != 'templateHooks' ) + if( $file['hook_type'] == 'dataHooks' ) + { + $HTML .= << + + {$file['_dataLocationDropdown']} + +EOF; + } + else if( $file['hook_type'] == 'libraryHooks' ) + { + $apps = array(); + + foreach( ipsRegistry::$applications as $dir => $appdata ) + { + $apps[] = array( $dir, $appdata['app_title'] ); + } + + $_applications = $this->registry->output->formDropdown( "libApplication[{$index}]", $apps, $file['hook_data']['libApplication'] ); + + $HTML .= << + + + +
    • + + {$_applications} +
    • +EOF; + } + else if( $file['hook_type'] != 'templateHooks' ) { $HTML .= << @@ -1181,16 +1227,16 @@ EOF; } $HTML .= << -
      -
      - +
      +
      + +
      -
      @@ -1574,10 +1620,11 @@ $hookData['hook_extra_data']['display']['custom'] = $hookData['hook_extra_data' $hookData['hook_extra_data']['display']['language'] = $hookData['hook_extra_data']['display']['language'] ? $hookData['hook_extra_data']['display']['language'] : $this->lang->words['a_nolang']; $hookData['hook_extra_data']['display']['templates'] = $hookData['hook_extra_data']['display']['templates'] ? $hookData['hook_extra_data']['display']['templates'] : $this->lang->words['a_noskin']; +$hookData['hook_extra_data']['display']['css'] = $hookData['hook_extra_data']['display']['css'] ? $hookData['hook_extra_data']['display']['css'] : $this->lang->words['a_nocss']; $HTML .= <<Экспорт {$hookData['hook_name']} +

      {$this->lang->words['hook_h2_exporting']} {$hookData['hook_name']}

      @@ -1680,6 +1727,24 @@ $HTML .= <<

      + +
      +

      {$this->lang->words['a_exportcss']}

      + +
    {$this->lang->words['a_hook']}{$this->lang->words['a_author']}{$this->lang->words['a_uptodate']}{$this->lang->words['a_version']} {$this->lang->words['a_author']}{$this->lang->words['a_uptodate']}{$this->lang->words['a_version']} 
    {$r['hook_author']}{$r['hook_author']} {$r['hook_update_available']} {$r['hook_version_human']} {$this->lang->words[
    + + + + +
    {$this->lang->words['a_css_info']}
    +

    {$hookData['hook_extra_data']['display']['css']}

    +
    {$this->lang->words['a_addcss']}
    +
    + +
    +

    {$this->lang->words['a_exporttasks']}

    diff --git a/upload/admin/applications/core/skin_cp/cp_skin_badwords.php b/upload/admin/applications/core/skin_cp/cp_skin_badwords.php index c24dbc1d..5dc9d30b 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_badwords.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_badwords.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Badwords skin file - * Last Updated: $Date: 2009-05-26 18:02:08 -0400 (Tue, 26 May 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 4690 $ + * @version $Revision: 5713 $ */ class cp_skin_badwords extends output diff --git a/upload/admin/applications/core/skin_cp/cp_skin_bbcode.php b/upload/admin/applications/core/skin_cp/cp_skin_bbcode.php index 054c6b1d..ce9e8958 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_bbcode.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_bbcode.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * BBcode skin file - * Last Updated: $Date: 2009-07-09 22:20:10 -0400 (Thu, 09 Jul 2009) $ + * Last Updated: $Date: 2010-07-13 19:56:23 -0400 (Tue, 13 Jul 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 4864 $ + * @version $Revision: 6644 $ */ class cp_skin_bbcode extends output @@ -225,6 +227,7 @@ $form['bbcode_php_plugin'] = $this->registry->output->formInput( 'bbcode_php_p $form['bbcode_no_parsing'] = $this->registry->output->formYesNo( 'bbcode_no_parsing', $this->request['bbcode_no_parsing'] ? $this->request['bbcode_no_parsing'] : $bbcode['bbcode_no_parsing'] ); $form['bbcode_protected'] = $this->registry->output->formYesNo( 'bbcode_protected', $this->request['bbcode_protected'] ? $this->request['bbcode_protected'] : $bbcode['bbcode_protected'] ); $form['bbcode_strip_search'] = $this->registry->output->formYesNo( 'bbcode_strip_search', $this->request['bbcode_strip_search'] ? $this->request['bbcode_strip_search'] : $bbcode['bbcode_strip_search'] ); +$form['bbcode_custom_regex'] = $this->registry->output->formTextarea( 'bbcode_custom_regex', htmlspecialchars($_POST['bbcode_custom_regex'] ? $_POST['bbcode_custom_regex'] : $bbcode['bbcode_custom_regex']) ); $apps = array(); @@ -305,6 +308,10 @@ $IPBHTML .= <<{$this->lang->words['bbcode_useoption']}{$this->lang->words['bbcode_useoption_info']} {$form['bbcode_useoption']} +
  • + + {$form['bbcode_custom_regex']} +
  • {$form['bbcode_optional_option']} @@ -472,12 +479,16 @@ $IPBHTML .= <<

    {$this->lang->words['media_current']}

    - +
    - {$content} +
    {$this->lang->words['media_name']} {$this->lang->words['bbcode_options']}
    +
      + {$content} +
    +

  • @@ -496,6 +507,24 @@ $IPBHTML .= << + EOF; //--endhtml--// @@ -515,18 +544,24 @@ $IPBHTML = ""; //--starthtml--// $IPBHTML .= << -
    {$row['mediatag_name']} - - - -
    + + + + + +
    +
    +
    {$row['mediatag_name']} + + +
    +
  • EOF; //--endhtml--// diff --git a/upload/admin/applications/core/skin_cp/cp_skin_diagnostics.php b/upload/admin/applications/core/skin_cp/cp_skin_diagnostics.php index 4583ebb9..6eb64149 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_diagnostics.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_diagnostics.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Diagnostics skin file - * Last Updated: $Date: 2009-10-01 10:02:08 -0400 (Thu, 01 Oct 2009) $ + * Last Updated: $Date: 2010-09-13 17:28:12 -0400 (Mon, 13 Sep 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 5190 $ + * @version $Revision: 6863 $ */ class cp_skin_diagnostics extends output @@ -28,6 +30,54 @@ public function __destruct() { } + +/** + * Connection checker + * + * @access public + * @param string Raw HTTP headers + * @param string Request result + * @param string Raw HTTPS headers + * @param string Request result + * @return string HTML + */ +public function connectionCheckerResult( $headers='', $output='', $headers_ssl='', $output_ssl='' ) { + +$IPBHTML = ""; +//--starthtml--// + +$output = IPSText::mbsubstr( htmlspecialchars($output), 0, 2000 ); +$output_ssl = IPSText::mbsubstr( htmlspecialchars($output_ssl), 0, 2000 ); + +$IPBHTML .= << +

      {$this->lang->words['ipb_message']}

    + {$this->lang->words['connections__message']} + +
    +
    +

    {$this->lang->words['connectionchecker']}

    +
    + +
    +

    {$this->lang->words['connections__headers']}

    +
    {$headers}
    +
    +

    {$this->lang->words['connections__output']}

    +
    {$output}
    +
    +

    {$this->lang->words['connections__headers1']}

    +
    {$headers_ssl}
    +
    +

    {$this->lang->words['connections__output1']}

    +
    {$output_ssl}
    +
    +EOF; + +//--endhtml--// +return $IPBHTML; +} + /** * DB Index checker * @@ -50,7 +100,6 @@ if( count( $errors ) ) { $IPBHTML .= << -

    {$app}

    @@ -95,9 +144,10 @@ $IPBHTML .= <<
  • HTML; - +if ( is_array( $r['index'] ) ) +{ $IPBHTML .= implode( "
  • ", $r['index'] ); - +} $IPBHTML .= << @@ -181,7 +231,6 @@ if( count( $errors ) ) { $IPBHTML .= << -

    {$app}

  • {$this->lang->words['d_ierrors']}
    @@ -233,7 +282,7 @@ HTML; $IPBHTML .= << - + HTML; @@ -243,7 +292,7 @@ HTML; $IPBHTML .= << - + EOF; @@ -608,13 +257,13 @@ $IPBHTML = ""; //--starthtml--// $IPBHTML .= << +

    {$this->lang->words['cp_latestadminlogins']}

    -
    {$this->lang->words['d_ierrors']}
    {$r['table']}{$_column}YNYN  
    {$r['table']}YNYN form_code}&section=diagnostics&do=dbchecker&fix={$r['key']}'>{$this->lang->words['d_iauto']}{$this->lang->words['d_iman']}
    @@ -331,7 +380,7 @@ return $IPBHTML; * @param array Data * @return string HTML */ -public function diagnosticsOverview( $data=array() ) { +public function diagnosticsOverview( $data=array(), $statsbox ) { $IPBHTML = ""; //--starthtml--// @@ -341,6 +390,14 @@ $IPBHTML .= <<{$this->lang->words['d_atitle']}
    +
    +

    {$this->lang->words['cp_systemstats']}

    + + {$statsbox} +
    +
    +
    +

    {$this->lang->words['sys_system_overview']}

    @@ -892,4 +949,64 @@ EOF; return $IPBHTML; } +/** + * ACP Statistics wrapper + * + * @access public + * @param array Content + * @return string HTML + */ +public function acp_stats_wrapper($content) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << + + + + + + + + + + + +EOF; + +//--endhtml--// +return $IPBHTML; +} + + } \ No newline at end of file diff --git a/upload/admin/applications/core/skin_cp/cp_skin_emailerrorlogs.php b/upload/admin/applications/core/skin_cp/cp_skin_emailerrorlogs.php index f1ae4bc7..aff0fe4d 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_emailerrorlogs.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_emailerrorlogs.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Email error logs - * Last Updated: $Date: 2009-03-27 11:41:38 -0400 (Fri, 27 Mar 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 4333 $ + * @version $Revision: 5713 $ */ class cp_skin_emailerrorlogs extends output diff --git a/upload/admin/applications/core/skin_cp/cp_skin_emaillogs.php b/upload/admin/applications/core/skin_cp/cp_skin_emaillogs.php index f317b581..36c089ec 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_emaillogs.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_emaillogs.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Email logs skin file - * Last Updated: $Date: 2009-05-28 13:24:24 -0400 (Thu, 28 May 2009) $ + * Last Updated: $Date: 2010-05-19 21:06:53 -0400 (Wed, 19 May 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 4699 $ + * @version $Revision: 6326 $ */ class cp_skin_emaillogs extends output @@ -89,9 +91,9 @@ if( count($rows) AND is_array($rows) ) $IPBHTML .= << - + - + diff --git a/upload/admin/applications/core/skin_cp/cp_skin_emoticons.php b/upload/admin/applications/core/skin_cp/cp_skin_emoticons.php index 279f3f17..4ffe626c 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_emoticons.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_emoticons.php @@ -1,453 +1,455 @@ - -

    {$this->lang->words['emo_title']}

    - - -form_code}' method='post' name='theAdminForm' id='theAdminForm'> - - - -
    -

    {$this->lang->words['emote_export']}

    - -
      -
    • - - {$form['emo_set']} -
    • -
    - -
    -
    - -
    -
    -
    -
    - -form_code}' method='post' name='uploadform' enctype='multipart/form-data' id='uploadform'> - - - - -
    -

    {$this->lang->words['emote_import']}

    - -
    + {$this->lang->words['cp_totalmembers']} +
    + {$this->lang->words['cp_onlinenow']}
    + {$this->lang->words['cp_awaitingvalidation']}
    + {$this->lang->words['cp_lockedaccounts']}
    + {$this->lang->words['cp_coppaaccounts']}
    + {$this->lang->words['cp_spammeraccounts']} +
    +
    + {$content['members']} +
    + {$this->lang->words['cp_view']} ({$content['sessions']})
    + {$this->lang->words['cp_manage']} ({$content['validate']})
    + {$this->lang->words['cp_manage']} ({$content['locked']})
    + {$this->lang->words['cp_manage']} ({$content['coppa']})
    + {$this->lang->words['cp_manage']} ({$content['spammer'][0]}) +
    +
    + {$this->lang->words['cp_topics']} +
    + {$this->lang->words['cp_awaitingmoderation']} +
    +
    {$content['topics']}
    {$content['topics_mod']}
    + {$this->lang->words['cp_posts']} +
    + {$this->lang->words['cp_awaitingmoderation']} +
    +
    {$content['replies']}
    {$content['posts_mod']}
    form_code}&do=list&type=fromid&id={$row['member_id']}' title='{$this->lang->words['elog_show_title']}'>{$this->lang->words[ settings['php_ext']}?showuser={$row['member_id']}' title='{$this->lang->words['elog_profile']}' target='_blank'>{$row['members_display_name']}form_code}&do=list&type=fromid&id={$row['member_id']}' title='{$this->lang->words['elog_show_title']}'>{$this->lang->words[ settings['php_ext']}?showuser={$row['member_id']}' title='{$this->lang->words['elog_profile']}' target='_blank'>{$row['members_display_name']} form_code_js}&do=viewemail&id={$row['email_id']}",400,350,"{$row['email_id']}")' title='{$this->lang->words['elog_read']}'>{$row['email_subject']}form_code}&do=list&type=toid&id={$row['to_id']}' title='{$this->lang->words['elog_show_title']}'>{$this->lang->words[ settings['php_ext']}?showuser={$row['to_id']}' title='{$this->lang->words['elog_profile']}' target='_blank'>{$row['to_name']}form_code}&do=list&type=toid&id={$row['to_id']}' title='{$this->lang->words['elog_show_title']}'>{$this->lang->words[ settings['php_ext']}?showuser={$row['to_id']}' title='{$this->lang->words['elog_profile']}' target='_blank'>{$row['to_name']} {$row['_date']}
    - - - - - - - - - - - - - - - - - -
    - {$this->lang->words['emote_import_which']}
    - {$this->lang->words['emote_xml_export']} -
    {$form['emo_set']}
    - {$this->lang->words['emote_import_newgroup']}
    - {$this->lang->words['emote_import_name']} -
    {$form['new_emo_set']}
    - {$this->lang->words['emote_import_over']}
    - {$this->lang->words['emote_import_replace']} -
    {$form['overwrite']}
    {$this->lang->words['emote_import_upload']}
    {$this->lang->words['emote_import_browse']}
    -
    -
    - -
    -
    -
    - -HTML; - -return $IPBHTML; -} - -/** - * Show the splash screen for the logs - * - * @access public - * @param array Db records - * @param array File records - * @param string Width for table cells - * @param int Number of emoticons per row - * @return string HTML - */ -public function emoticonsDirectoryManagement( $db_rows, $file_rows, $td_width, $per_row ) -{ -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

    {$this->lang->words['emo_control']}

    - - -
    -

    {$this->lang->words['emote_assigned']}'{$this->request['id']}'

    - -
    form_code}do=emo_doedit&id={$this->request['id']}' method='post'> - - - - -HTML; - -/* Loop through the database emoticons */ -$count = 0; - -foreach( $db_rows as $r ) -{ - $count++; - -$IPBHTML .= << -
    - {$r['image']} - - -      -HTML; - if( $this->request['id'] == 'default' ) - { -$IPBHTML .= <<form_code}do=emo_remove&eid={$r['id']}&id={$this->request['id']}' title='{$this->lang->words['emote_delete_title']}'> - {$this->lang->words[ - -
    - -HTML; - } - else - { -$IPBHTML .= <<
    {$r['typed']} -HTML; - } - -$IPBHTML .= <<
    {$this->lang->words['emote_clickable']} -
    - -HTML; - - if( $count == $per_row ) - { -$IPBHTML .= << - - -HTML; - $count = 0; - } - -} - -/* Finish off a row in progress */ -if( $count > 0 and $count != $per_row ) -{ - for( $i = $count ; $i < $per_row ; ++$i ) - { -$IPBHTML .= <<  -HTML; - } - -$IPBHTML .= << -HTML; - -} - -$IPBHTML .= << -
    -
    - -
    -
    - -
    -HTML; - -/* Display unassigned emoticons */ -if( is_array( $file_rows ) && count( $file_rows ) ) -{ -$IPBHTML .= << -

    {$this->lang->words['emote_unassigned']}'{$this->request['id']}'

    - - form_code}do=emo_doadd&id={$this->request['id']}' method='post'> - - -
    - -HTML; - - /* Loop through the unassigned emoticons */ - $master_count = 0; - $count = 0; - - foreach( $file_rows as $r ) - { - $master_count++; - $count++; - -$IPBHTML .= << -
    - {$r['image']} -    - {$this->lang->words['emote_add']}
    - {$this->lang->words['emote_text']}

    - {$this->lang->words['emote_clickable']} - -
    - -HTML; - - if( $count == $per_row ) - { -$IPBHTML .= << - - -HTML; - $count = 0; - } - } - - /* Finish off a row in progress */ - if( $count > 0 and $count != $per_row ) - { - for( $i = $count ; $i < $per_row ; ++$i ) - { -$IPBHTML .= <<  -HTML; - } - -$IPBHTML .= << -HTML; - - } - -$IPBHTML .= << - -
    -
    -    - -
    -
    - - -HTML; - -} - - -return $IPBHTML; -} - -/** - * Overview of emoticon packs - * - * @access public - * @param array Records - * @return string HTML - */ -public function emoticonsOverview( $rows ) -{ - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - - -
    -

    {$this->lang->words['emo_control']}

    - - -
    - -form_code}' method='post' name='uploadform' enctype='multipart/form-data' id='uploadform'> - - - - - -
    -

    {$this->lang->words['emote_current']}

    - -
    - - - - - - - -HTML; - -foreach( $rows as $data ) -{ -$IPBHTML .= << - - - - - - - -HTML; -} - -$IPBHTML .= << -
    -HTML; - -if( SAFE_MODE_ON ) -{ -$IPBHTML .= << -HTML; -} -else -{ -$IPBHTML .= << -

    {$this->lang->words['emote_uploademos']}

    - -
    {$this->lang->words['emote_emofolder']}{$this->lang->words['emote_upload']}{$this->lang->words['emote_num_disk']}{$this->lang->words['emote_num_group']}{$this->lang->words['emote_options']}
    -
    {$data[
    - {$data['line_image']}  - form_code}do=emo_manage&id={$data['dir']}' title='{$this->lang->words['emote_manageset']}'>{$data['dir']} -
    {$data['checkbox']}
    {$data['count']}
    {$data['dir_count']}
    - -
    - - - - - - - - -
    - -
    -
    - -
    -
    -
    - -HTML; -} - - -return $IPBHTML; -} - + + * Invision Power Services + * IP.Board v3.1.4 + * Emoticon manager skin file + * Last Updated: $Date: 2010-05-19 21:06:53 -0400 (Wed, 19 May 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since Friday 19th May 2006 17:33 + * @version $Revision: 6326 $ + */ + +class cp_skin_emoticons extends output +{ + +/** + * Prevent our main destructor being called by this class + * + * @access public + * @return void + */ +public function __destruct() +{ +} + +/** + * Emoticon pack splash page + * + * @access public + * @param array Form elements + * @return string HTML + */ +public function emoticonsPackSplash( $form ) +{ +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

    {$this->lang->words['emo_title']}

    + + +
    form_code}' method='post' name='theAdminForm' id='theAdminForm'> + + + +
    +

    {$this->lang->words['emote_export']}

    + +
      +
    • + + {$form['emo_set']} +
    • +
    + +
    +
    + +
    +
    +
    +

    + +
    form_code}' method='post' name='uploadform' enctype='multipart/form-data' id='uploadform'> + + + + +
    +

    {$this->lang->words['emote_import']}

    + + + + + + + + + + + + + + + + + + + +
    + {$this->lang->words['emote_import_which']}
    + {$this->lang->words['emote_xml_export']} +
    {$form['emo_set']}
    + {$this->lang->words['emote_import_newgroup']}
    + {$this->lang->words['emote_import_name']} +
    {$form['new_emo_set']}
    + {$this->lang->words['emote_import_over']}
    + {$this->lang->words['emote_import_replace']} +
    {$form['overwrite']}
    {$this->lang->words['emote_import_upload']}
    {$this->lang->words['emote_import_browse']}
    +
    +
    + +
    +
    +
    +
    +HTML; + +return $IPBHTML; +} + +/** + * Show the splash screen for the logs + * + * @access public + * @param array Db records + * @param array File records + * @param string Width for table cells + * @param int Number of emoticons per row + * @return string HTML + */ +public function emoticonsDirectoryManagement( $db_rows, $file_rows, $td_width, $per_row ) +{ +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

    {$this->lang->words['emo_control']}

    + + +
    +

    {$this->lang->words['emote_assigned']}'{$this->request['id']}'

    + +
    form_code}do=emo_doedit&id={$this->request['id']}' method='post'> + + + + +HTML; + +/* Loop through the database emoticons */ +$count = 0; + +foreach( $db_rows as $r ) +{ + $count++; + +$IPBHTML .= << +
    + {$r['image']} + + +      +HTML; + if( $this->request['id'] == 'default' ) + { +$IPBHTML .= <<form_code}do=emo_remove&eid={$r['id']}&id={$this->request['id']}' title='{$this->lang->words['emote_delete_title']}'> + {$this->lang->words[ + +
    + +HTML; + } + else + { +$IPBHTML .= <<
    {$r['typed']} +HTML; + } + +$IPBHTML .= <<
    {$this->lang->words['emote_clickable']} +
    + +HTML; + + if( $count == $per_row ) + { +$IPBHTML .= << + + +HTML; + $count = 0; + } + +} + +/* Finish off a row in progress */ +if( $count > 0 and $count != $per_row ) +{ + for( $i = $count ; $i < $per_row ; ++$i ) + { +$IPBHTML .= <<  +HTML; + } + +$IPBHTML .= << +HTML; + +} + +$IPBHTML .= << +
    +
    + +
    +
    + +
    +HTML; + +/* Display unassigned emoticons */ +if( is_array( $file_rows ) && count( $file_rows ) ) +{ +$IPBHTML .= << +

    {$this->lang->words['emote_unassigned']}'{$this->request['id']}'

    + + form_code}do=emo_doadd&id={$this->request['id']}' method='post'> + + +
    + +HTML; + + /* Loop through the unassigned emoticons */ + $master_count = 0; + $count = 0; + + foreach( $file_rows as $r ) + { + $master_count++; + $count++; + +$IPBHTML .= << +
    + {$r['image']} +    + {$this->lang->words['emote_add']}
    + {$this->lang->words['emote_text']}

    + {$this->lang->words['emote_clickable']} + +
    + +HTML; + + if( $count == $per_row ) + { +$IPBHTML .= << + + +HTML; + $count = 0; + } + } + + /* Finish off a row in progress */ + if( $count > 0 and $count != $per_row ) + { + for( $i = $count ; $i < $per_row ; ++$i ) + { +$IPBHTML .= <<  +HTML; + } + +$IPBHTML .= << +HTML; + + } + +$IPBHTML .= << + +
    +
    +    + +
    +
    + + +HTML; + +} + + +return $IPBHTML; +} + +/** + * Overview of emoticon packs + * + * @access public + * @param array Records + * @return string HTML + */ +public function emoticonsOverview( $rows ) +{ + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << + + +
    +

    {$this->lang->words['emo_control']}

    + + +
    + +form_code}' method='post' name='uploadform' enctype='multipart/form-data' id='uploadform'> + + + + + +
    +

    {$this->lang->words['emote_current']}

    + +
    + + + + + + + +HTML; + +foreach( $rows as $data ) +{ +$IPBHTML .= << + + + + + + + +HTML; +} + +$IPBHTML .= << +
    +HTML; + +if( SAFE_MODE_ON ) +{ +$IPBHTML .= << +HTML; +} +else +{ +$IPBHTML .= << +

    {$this->lang->words['emote_uploademos']}

    + +
    {$this->lang->words['emote_emofolder']}{$this->lang->words['emote_upload']}{$this->lang->words['emote_num_disk']}{$this->lang->words['emote_num_group']}{$this->lang->words['emote_options']}
    +
    {$data[
    + {$data['line_image']}  + form_code}do=emo_manage&id={$data['dir']}' title='{$this->lang->words['emote_manageset']}'>{$data['dir']} +
    {$data['checkbox']}
    {$data['count']}
    {$data['dir_count']}
    + +
    + + + + + + + + +
    + +
    +
    + +
    +
    +
    + +HTML; +} + + +return $IPBHTML; +} + } \ No newline at end of file diff --git a/upload/admin/applications/core/skin_cp/cp_skin_errorlogs.php b/upload/admin/applications/core/skin_cp/cp_skin_errorlogs.php index 4a566c48..3e87911d 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_errorlogs.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_errorlogs.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Error log skin file - * Last Updated: $Date: 2009-05-28 13:24:24 -0400 (Thu, 28 May 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 4699 $ + * @version $Revision: 5713 $ */ class cp_skin_errorlogs extends output diff --git a/upload/admin/applications/core/skin_cp/cp_skin_help_files.php b/upload/admin/applications/core/skin_cp/cp_skin_help_files.php index 9a9f6c02..adee75ed 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_help_files.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_help_files.php @@ -1,195 +1,197 @@ - -

    {$this->lang->words['h_title']}

    - - -
    form_code}' method='post' name='theAdminForm' id='postingform'> - - - - -
    -

    {$button}

    - -
      -
    • - - {$form['title']} -
    • - -
    • - - {$form['description']} -
    • - -
    • - - {$form['appDir']} -
    • - -
    • - -
      -
    • -
    -
    -
    - -
    -
    -
    -
    -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * List the current help files - * - * @access public - * @param array Rows - * @return string HTML - */ -public function helpFilesList( $rows ) -{ -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

    {$this->lang->words['h_title']}

    - - - - - -
    -

    {$this->lang->words['h_current']}

    - -
    -
    - -HTML; - -//--endhtml--// -return $IPBHTML; - - -} - + + * Invision Power Services + * IP.Board v3.1.4 + * Manage help files skin file + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since Friday 19th May 2006 17:33 + * @version $Revision: 5713 $ + */ + +class cp_skin_help_files extends output +{ + +/** + * Prevent our main destructor being called by this class + * + * @access public + * @return void + */ +public function __destruct() +{ +} + +/** + * Form to add/edit a help file + * + * @access public + * @param string Action + * @param int ID + * @param array Form elements + * @param string Button text + * @return string HTML + */ +public function helpFileForm( $do, $id, $form, $button ) +{ +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

    {$this->lang->words['h_title']}

    + + +
    form_code}' method='post' name='theAdminForm' id='postingform'> + + + + +
    +

    {$button}

    + +
      +
    • + + {$form['title']} +
    • + +
    • + + {$form['description']} +
    • + +
    • + + {$form['appDir']} +
    • + +
    • + +
      +
    • +
    +
    +
    + +
    +
    +
    +
    +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * List the current help files + * + * @access public + * @param array Rows + * @return string HTML + */ +public function helpFilesList( $rows ) +{ +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

    {$this->lang->words['h_title']}

    + + + + + +
    +

    {$this->lang->words['h_current']}

    + +
    +
    + +HTML; + +//--endhtml--// +return $IPBHTML; + + +} + } \ No newline at end of file diff --git a/upload/admin/applications/core/skin_cp/cp_skin_hooks_export.php b/upload/admin/applications/core/skin_cp/cp_skin_hooks_export.php index 459738e8..fbd1f98a 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_hooks_export.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_hooks_export.php @@ -1,637 +1,695 @@ - - acp.hooks.fields['MF__settings'] = {}; - acp.hooks.fields['MF__settings']['fields'] = $A(['setting_groups', 'settings']); - acp.hooks.fields['MF__settings']['url'] = "app=core&module=ajax&section=hooks&do=save&name=settings&id={$hook['hook_id']}"; - acp.hooks.fields['MF__settings']['callback'] = function( t, json ){ - $('MF__settings').innerHTML = json['message']; - new Effect.Pulsate( $('MF__settings'), { pulses: 3 } ); - } - - -
    -

    Добавление настроек

    -
      -
    • - Выберите одну или несколько групп настроек для экспорта. Все настройки этих групп будут полностью сохранены -
    • -
    • - {$form['groups']} -
    • -
    • - Выберите индивидуальную настройку для экспорта. Все необходимые значения настройки будут сохранены -
    • -
    • - {$form['settings']} -
    • -
    -
    - -
    -
    - -EOF; - -return $IPBHTML; -} - -/** - * Inline modules dhtml box - * - * @access public - * @param array Hook data - * @param array Form elements - * @return string HTML - */ -public function inline_modules( $hook, $form=array() ) -{ -$IPBHTML = ""; - -$IPBHTML .= << - acp.hooks.fields['MF__modules'] = {}; - acp.hooks.fields['MF__modules']['fields'] = $A(['modules']); - acp.hooks.fields['MF__modules']['url'] = "app=core&module=ajax&section=hooks&do=save&name=modules&id={$hook['hook_id']}"; - acp.hooks.fields['MF__modules']['callback'] = function( t, json ){ - $('MF__modules').innerHTML = json['message']; - new Effect.Pulsate( $('MF__modules'), { pulses: 3 } ); - } - - -
    -

    Добавление модулей

    -
      -
    • - Выберите один или несколько модулей для экспорта -
    • -
    • - {$form['modules']} -
    • -
    -
    - -
    -
    - -EOF; - -return $IPBHTML; -} - -/** - * Inline custom script dhtml box - * - * @access public - * @param array Hook data - * @param array Form elements - * @return string HTML - */ -public function inline_custom( $hook, $form=array() ) -{ -$IPBHTML = ""; - -$IPBHTML .= << - acp.hooks.fields['MF__custom'] = {}; - acp.hooks.fields['MF__custom']['fields'] = $A(['custom']); - acp.hooks.fields['MF__custom']['url'] = "app=core&module=ajax&section=hooks&do=save&name=custom&id={$hook['hook_id']}"; - acp.hooks.fields['MF__custom']['callback'] = function( t, json ){ - $('MF__custom').innerHTML = json['message']; - new Effect.Pulsate( $('MF__custom'), { pulses: 3 } ); - } - - -
    -

    Добавление установочных скриптов

    -
      -
    • - Введите имя файла, содержащего скрипт установки/удаления. Файл должен иметь префикс "install_" в имени и находится в директории hooks/. Префикс перед именем файла вы можете не указывать -
    • -
    • - install_ {$form['custom']} -
    • -
    -
    - -
    -
    -EOF; - -return $IPBHTML; -} - -/** - * Inline help files dhtml box - * - * @access public - * @param array Hook data - * @param array Form elements - * @return string HTML - */ -public function inline_help( $hook, $form=array() ) -{ -$IPBHTML = ""; - -$IPBHTML .= << - acp.hooks.fields['MF__help'] = {}; - acp.hooks.fields['MF__help']['fields'] = $A(['help']); - acp.hooks.fields['MF__help']['url'] = "app=core&module=ajax&section=hooks&do=save&name=help&id={$hook['hook_id']}"; - acp.hooks.fields['MF__help']['callback'] = function( t, json ){ - $('MF__help').innerHTML = json['message']; - new Effect.Pulsate( $('MF__help'), { pulses: 3 } ); - } - - -
    -

    Добавление разделов помощи

    -
      -
    • - Выберите один или несколько разделов помощи для экспорта -
    • -
    • - {$form['help']} -
    • -
    -
    - -
    -
    -EOF; - -return $IPBHTML; -} - -/** - * Inline tasks dhtml box - * - * @access public - * @param array Hook data - * @param array Form elements - * @return string HTML - */ -public function inline_tasks( $hook, $form=array() ) -{ -$IPBHTML = ""; - -$IPBHTML .= << - acp.hooks.fields['MF__tasks'] = {}; - acp.hooks.fields['MF__tasks']['fields'] = $A(['tasks']); - acp.hooks.fields['MF__tasks']['url'] = "app=core&module=ajax&section=hooks&do=save&name=tasks&id={$hook['hook_id']}"; - acp.hooks.fields['MF__tasks']['callback'] = function( t, json ){ - $('MF__tasks').innerHTML = json['message']; - new Effect.Pulsate( $('MF__tasks'), { pulses: 3 } ); - } - - -
    -

    Добавление задач

    -
      -
    • - Выберите одну или несколько задач для экспорта (не забудьте приложить PHP файлы задач к модификации) -
    • -
    • - {$form['tasks']} -
    • -
    -
    - -
    -
    - -EOF; - -return $IPBHTML; -} - -/** - * Inline language bits dhtml box - * - * @access public - * @param array Hook data - * @param array Form elements - * @param int Current index - * @return string HTML - */ -public function inline_languages( $hook, $form=array(), $i=0 ) -{ -$IPBHTML = ""; - -$IPBHTML .= << - acp.hooks.fields['MF__language'] = {}; - acp.hooks.fields['MF__language']['fields'] = $A([]); - acp.hooks.fields['MF__language']['url'] = "app=core&module=ajax&section=hooks&do=save&name=language&id={$hook['hook_id']}"; - acp.hooks.fields['MF__language']['callback'] = function( t, json ){ - $('MF__language').innerHTML = json['message']; - new Effect.Pulsate( $('MF__language'), { pulses: 3 } ); - } - - ipb.templates['lang_row'] = new Template("
  • #{control}
  • "); - - acp.hooks.languageMax = $i; - - - -
    -

    Добавление языковых конструкций

    -
    -
      -EOF; - if( $i ) - { - for( $k=1; $k<$i; $k++ ) - { - $IPBHTML .= << - - - - - -
      - {$form['language_file_' . $k ]}
      - Выберите языковые строки для добавления → -
      -
      - {$form['language_strings_' . $k ]} - -
      -
      - -EOF; - } - } - - $IPBHTML .= << - - - - - -
      - {$form['language_file_' . $i ]}
      - -
      - -
      - -
    -
    -
    - - -
    -
    -EOF; - -return $IPBHTML; -} - -/** - * Inline skin bits dhtml box - * - * @access public - * @param array Hook data - * @param array Form elements - * @param int Current index - * @return string HTML - */ -public function inline_skins( $hook, $form=array(), $i=0 ) -{ -$IPBHTML = ""; - -$IPBHTML .= << - acp.hooks.fields['MF__templates'] = {}; - acp.hooks.fields['MF__templates']['fields'] = $A([]); - acp.hooks.fields['MF__templates']['url'] = "app=core&module=ajax&section=hooks&do=save&name=skins&id={$hook['hook_id']}"; - acp.hooks.fields['MF__templates']['callback'] = function( t, json ){ - $('MF__templates').innerHTML = json['message']; - new Effect.Pulsate( $('MF__templates'), { pulses: 3 } ); - } - - ipb.templates['skin_row'] = new Template("
  • #{control}
  • "); - - acp.hooks.skinMax = $i; - - - -
    -

    Добавление шаблонов

    -
    -
      -EOF; - -if( $i ) -{ - for( $k=1; $k<$i; $k++ ) - { - $IPBHTML .= << - - - - - -
      - {$form['skin_file_' . $k ]}
      - Выберите шаблоны для добавления → -
      -
      - {$form['skin_method_' . $k ]} - -
      -
      - - -EOF; - } -} - $IPBHTML .= << - - - - - -
      - {$form['skin_file_' . $i ]}
      - -
      - -
      - -
    -
    -
    - - -
    -
    -EOF; - -return $IPBHTML; -} - -/** - * Inline database changes dhtml box - * - * @access public - * @param array Hook data - * @param array Form elements - * @param int Current index - * @return string HTML - */ -public function inline_database( $hook, $form=array(), $i=0 ) -{ -$IPBHTML = ""; - -$IPBHTML .= << - acp.hooks.fields['MF__database'] = {}; - acp.hooks.fields['MF__database']['fields'] = $A([]); - acp.hooks.fields['MF__database']['url'] = "app=core&module=ajax&section=hooks&do=save&name=database&id={$hook['hook_id']}"; - acp.hooks.fields['MF__database']['callback'] = function( t, json ){ - $('MF__database').innerHTML = json['message']; - new Effect.Pulsate( $('MF__database'), { pulses: 3 } ); - } - - ipb.templates['db_row'] = new Template("

  • "); - - ipb.templates['db_create'] = new Template("Укажите имя таблицы (без префикса)


    Укажите индексы таблицы, так же как они идут в SQL запросе для создания таблицы


    Укажите тип таблицы (напр-р, myisam или innodb)
    "); - - ipb.templates['db_alter'] = new Template("Укажите тип изменения таблицы


    Укажите имя таблицы (без префикса)


    Укажите имя поля


    (Только для изменения поля) укажите новое имя поля


    Укажите тип поля (напр-р, varchar(255))


    Укажите значение по-умолчанию
    "); - - ipb.templates['db_update'] = new Template("Укажите имя таблицы (без префикса)


    Укажите имя поля


    Укажите новое значение


    Укажите старое значени (полезно для операции удаления модификации)


    Укажите дополнительное значение для WHERE
    "); - - ipb.templates['db_insert'] = new Template("Укажите имя таблицы (без префикса)


    Укажите данные для добавления в формате column=value, column=value


    Укажите пару column=value для совпадения при удалении
    "); - - acp.hooks.dbMax = $i; - - - - - -
    -

    Добавление изменений БД

    -
    -
      -EOF; - -if( $i ) -{ - for( $k=1; $k<$i; $k++ ) - { - $IPBHTML .= << - - - - - -
      - {$form['type_' . $k ]}
      - Укажите параметры → -
      -
      -EOF; - if( $form['field_1_' . $k ] ) - { - $IPBHTML .= << - {$form['field_1_' . $k ]}

      -EOF; - } - - if( $form['field_2_' . $k ] ) - { - $IPBHTML .= << - {$form['field_2_' . $k ]}

      -EOF; - } - - if( $form['field_3_' . $k ] ) - { - $IPBHTML .= << - {$form['field_3_' . $k ]}

      -EOF; - } - - if( $form['field_4_' . $k ] ) - { - $IPBHTML .= << - {$form['field_4_' . $k ]}

      -EOF; - } - - if( $form['field_5_' . $k ] ) - { - $IPBHTML .= << - {$form['field_5_' . $k ]}

      -EOF; - } - - if( $form['field_6_' . $k ] ) - { - $IPBHTML .= << - {$form['field_6_' . $k ]}

      -EOF; - } - - $IPBHTML .= << - acp.hooks.fields['MF__database']['fields'].push( "type_{$k}" ); - acp.hooks.fields['MF__database']['fields'].push( "name_{$k}" ); - acp.hooks.fields['MF__database']['fields'].push( "fields_{$k}" ); - acp.hooks.fields['MF__database']['fields'].push( "tabletype_{$k}" ); - acp.hooks.fields['MF__database']['fields'].push( "altertype_{$k}" ); - acp.hooks.fields['MF__database']['fields'].push( "table_{$k}" ); - acp.hooks.fields['MF__database']['fields'].push( "field_{$k}" ); - acp.hooks.fields['MF__database']['fields'].push( "newfield_{$k}" ); - acp.hooks.fields['MF__database']['fields'].push( "fieldtype_{$k}" ); - acp.hooks.fields['MF__database']['fields'].push( "default_{$k}" ); - acp.hooks.fields['MF__database']['fields'].push( "where_{$k}" ); - acp.hooks.fields['MF__database']['fields'].push( "newvalue_{$k}" ); - acp.hooks.fields['MF__database']['fields'].push( "oldvalue_{$k}" ); - acp.hooks.fields['MF__database']['fields'].push( "updates_{$k}" ); - acp.hooks.fields['MF__database']['fields'].push( "fordelete_{$k}" ); - - acp.hooks.dbMax = {$k}; - -
      -
      - -EOF; - } -} -$IPBHTML .= << - - - - - -
      - {$form['type_' . $i ]}
      - -
      - -
      - -
    -
    -
    - - -
    -
    - - -EOF; - -return $IPBHTML; -} - + + * Invision Power Services + * IP.Board v3.1.4 + * Hooks export skin file + * Last Updated: $Date: 2010-10-18 13:10:17 -0400 (Mon, 18 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since Friday 19th May 2006 17:33 + * @version $Revision: 6990 $ + */ + +class cp_skin_hooks_export extends output +{ + +/** + * Prevent our main destructor being called by this class + * + * @access public + * @return void + */ +public function __destruct() +{ +} + +/** + * Inline css dhtml box + * + * @access public + * @param array Hook data + * @param array Form elements + * @return string HTML + */ +public function inline_css( $hook, $form=array() ) +{ +$IPBHTML = ""; + +$IPBHTML .= << + acp.hooks.fields['MF__css'] = {}; + acp.hooks.fields['MF__css']['fields'] = $A(['css']); + acp.hooks.fields['MF__css']['url'] = "app=core&module=ajax&section=hooks&do=save&name=css&id={$hook['hook_id']}"; + acp.hooks.fields['MF__css']['callback'] = function( t, json ){ + $('MF__css').innerHTML = json['message']; + new Effect.Pulsate( $('MF__css'), { pulses: 3 } ); + } + + +
    +

    {$this->lang->words['addcss']}

    +
      +
    • + {$this->lang->words['selectoneomorecss']} +
    • +
    • + {$form['css']} +
    • +
    +
    + +
    +
    + +EOF; + +return $IPBHTML; +} + + +/** + * Inline settings dhtml box + * + * @access public + * @param array Hook data + * @param array Form elements + * @return string HTML + */ +public function inline_settings( $hook, $form=array() ) +{ +$IPBHTML = ""; + +$IPBHTML .= << + acp.hooks.fields['MF__settings'] = {}; + acp.hooks.fields['MF__settings']['fields'] = $A(['setting_groups', 'settings']); + acp.hooks.fields['MF__settings']['url'] = "app=core&module=ajax&section=hooks&do=save&name=settings&id={$hook['hook_id']}"; + acp.hooks.fields['MF__settings']['callback'] = function( t, json ){ + $('MF__settings').innerHTML = json['message']; + new Effect.Pulsate( $('MF__settings'), { pulses: 3 } ); + } + + +
    +

    {$this->lang->words['addsettings']}

    +
      +
    • + {$this->lang->words['exportonesettings']} +
    • +
    • + {$form['groups']} +
    • +
    • + {$this->lang->words['indivsettingsex']} +
    • +
    • + {$form['settings']} +
    • +
    +
    + +
    +
    + +EOF; + +return $IPBHTML; +} + +/** + * Inline modules dhtml box + * + * @access public + * @param array Hook data + * @param array Form elements + * @return string HTML + */ +public function inline_modules( $hook, $form=array() ) +{ +$IPBHTML = ""; + +$IPBHTML .= << + acp.hooks.fields['MF__modules'] = {}; + acp.hooks.fields['MF__modules']['fields'] = $A(['modules']); + acp.hooks.fields['MF__modules']['url'] = "app=core&module=ajax&section=hooks&do=save&name=modules&id={$hook['hook_id']}"; + acp.hooks.fields['MF__modules']['callback'] = function( t, json ){ + $('MF__modules').innerHTML = json['message']; + new Effect.Pulsate( $('MF__modules'), { pulses: 3 } ); + } + + +
    +

    {$this->lang->words['addmodules']}

    +
      +
    • + {$this->lang->words['exportmodules']} +
    • +
    • + {$form['modules']} +
    • +
    +
    + +
    +
    + +EOF; + +return $IPBHTML; +} + +/** + * Inline custom script dhtml box + * + * @access public + * @param array Hook data + * @param array Form elements + * @return string HTML + */ +public function inline_custom( $hook, $form=array() ) +{ +$IPBHTML = ""; + +$IPBHTML .= << + acp.hooks.fields['MF__custom'] = {}; + acp.hooks.fields['MF__custom']['fields'] = $A(['custom']); + acp.hooks.fields['MF__custom']['url'] = "app=core&module=ajax&section=hooks&do=save&name=custom&id={$hook['hook_id']}"; + acp.hooks.fields['MF__custom']['callback'] = function( t, json ){ + $('MF__custom').innerHTML = json['message']; + new Effect.Pulsate( $('MF__custom'), { pulses: 3 } ); + } + + +
    +

    {$this->lang->words['addcustomscript']}

    +
      +
    • + {$this->lang->words['pathcustomscript']} +
    • +
    • + install_ {$form['custom']} +
    • +
    +
    + +
    +
    +EOF; + +return $IPBHTML; +} + +/** + * Inline help files dhtml box + * + * @access public + * @param array Hook data + * @param array Form elements + * @return string HTML + */ +public function inline_help( $hook, $form=array() ) +{ +$IPBHTML = ""; + +$IPBHTML .= << + acp.hooks.fields['MF__help'] = {}; + acp.hooks.fields['MF__help']['fields'] = $A(['help']); + acp.hooks.fields['MF__help']['url'] = "app=core&module=ajax&section=hooks&do=save&name=help&id={$hook['hook_id']}"; + acp.hooks.fields['MF__help']['callback'] = function( t, json ){ + $('MF__help').innerHTML = json['message']; + new Effect.Pulsate( $('MF__help'), { pulses: 3 } ); + } + + +
    +

    {$this->lang->words['addhelpfiles']}

    +
      +
    • + {$this->lang->words['selectoneormorehelp']} +
    • +
    • + {$form['help']} +
    • +
    +
    + +
    +
    +EOF; + +return $IPBHTML; +} + +/** + * Inline tasks dhtml box + * + * @access public + * @param array Hook data + * @param array Form elements + * @return string HTML + */ +public function inline_tasks( $hook, $form=array() ) +{ +$IPBHTML = ""; + +$IPBHTML .= << + acp.hooks.fields['MF__tasks'] = {}; + acp.hooks.fields['MF__tasks']['fields'] = $A(['tasks']); + acp.hooks.fields['MF__tasks']['url'] = "app=core&module=ajax&section=hooks&do=save&name=tasks&id={$hook['hook_id']}"; + acp.hooks.fields['MF__tasks']['callback'] = function( t, json ){ + $('MF__tasks').innerHTML = json['message']; + new Effect.Pulsate( $('MF__tasks'), { pulses: 3 } ); + } + + +
    +

    {$this->lang->words['addtasks']}

    +
      +
    • + {$this->lang->words['oneormtasks']} +
    • +
    • + {$form['tasks']} +
    • +
    +
    + +
    +
    + +EOF; + +return $IPBHTML; +} + +/** + * Inline language bits dhtml box + * + * @access public + * @param array Hook data + * @param array Form elements + * @param int Current index + * @return string HTML + */ +public function inline_languages( $hook, $form=array(), $i=0 ) +{ +$IPBHTML = ""; + +$IPBHTML .= << + acp.hooks.fields['MF__language'] = {}; + acp.hooks.fields['MF__language']['fields'] = $A([]); + acp.hooks.fields['MF__language']['url'] = "app=core&module=ajax&section=hooks&do=save&name=language&id={$hook['hook_id']}"; + acp.hooks.fields['MF__language']['callback'] = function( t, json ){ + $('MF__language').innerHTML = json['message']; + new Effect.Pulsate( $('MF__language'), { pulses: 3 } ); + } + + ipb.templates['lang_row'] = new Template("
  • #{control}
  • "); + + acp.hooks.languageMax = $i; + + + +
    +

    {$this->lang->words['addlanguage']}

    +
    +
      +EOF; + if( $i ) + { + for( $k=1; $k<$i; $k++ ) + { + $IPBHTML .= << + + + + + +
      + {$form['language_file_' . $k ]}
      + {$this->lang->words['nowselectstrings']} {$this->lang->words['_rarr']} +
      +
      + {$form['language_strings_' . $k ]} + +
      +
      + +EOF; + } + } + + $IPBHTML .= << + + + + + +
      + {$form['language_file_' . $i ]}
      + +
      + +
      + +
    +
    +
    + + +
    +
    +EOF; + +return $IPBHTML; +} + +/** + * Inline skin bits dhtml box + * + * @access public + * @param array Hook data + * @param array Form elements + * @param int Current index + * @return string HTML + */ +public function inline_skins( $hook, $form=array(), $i=0 ) +{ +$IPBHTML = ""; + +$IPBHTML .= << + acp.hooks.fields['MF__templates'] = {}; + acp.hooks.fields['MF__templates']['fields'] = $A([]); + acp.hooks.fields['MF__templates']['url'] = "app=core&module=ajax&section=hooks&do=save&name=skins&id={$hook['hook_id']}"; + acp.hooks.fields['MF__templates']['callback'] = function( t, json ){ + $('MF__templates').innerHTML = json['message']; + new Effect.Pulsate( $('MF__templates'), { pulses: 3 } ); + } + + ipb.templates['skin_row'] = new Template("
  • #{control}
  • "); + + acp.hooks.skinMax = $i; + + + +
    +

    {$this->lang->words['addtemplates']}

    +
    +
      +EOF; + +if( $i ) +{ + for( $k=1; $k<$i; $k++ ) + { + $IPBHTML .= << + + + + + +
      + {$form['skin_file_' . $k ]}
      + {$this->lang->words['nowselectbits']} {$this->lang->words['_rarr']} +
      +
      + {$form['skin_method_' . $k ]} + +
      +
      + + +EOF; + } +} + $IPBHTML .= << + + + + + +
      + {$form['skin_file_' . $i ]}
      + +
      + +
      + +
    +
    +
    + + +
    +
    +EOF; + +return $IPBHTML; +} + +/** + * Inline database changes dhtml box + * + * @access public + * @param array Hook data + * @param array Form elements + * @param int Current index + * @return string HTML + */ +public function inline_database( $hook, $form=array(), $i=0 ) +{ +$IPBHTML = ""; + +$IPBHTML .= << + acp.hooks.fields['MF__database'] = {}; + acp.hooks.fields['MF__database']['fields'] = $A([]); + acp.hooks.fields['MF__database']['url'] = "app=core&module=ajax&section=hooks&do=save&name=database&id={$hook['hook_id']}"; + acp.hooks.fields['MF__database']['callback'] = function( t, json ){ + $('MF__database').innerHTML = json['message']; + new Effect.Pulsate( $('MF__database'), { pulses: 3 } ); + } + + ipb.templates['db_row'] = new Template("

  • "); + + ipb.templates['db_create'] = new Template("{$this->lang->words['desc_newtable']}


    {$this->lang->words['desc_fieldnames']}


    {$this->lang->words['desc_tabletype']}
    "); + + ipb.templates['db_alter'] = new Template("{$this->lang->words['desc_altertype']}


    {$this->lang->words['desc_existtable']}


    {$this->lang->words['desc_field']}


    {$this->lang->words['desc_changefield']}


    {$this->lang->words['desc_definition']}


    {$this->lang->words['desc_defaultvalue']}
    "); + + ipb.templates['db_update'] = new Template("{$this->lang->words['desc_existtable']}


    {$this->lang->words['desc_field']}


    {$this->lang->words['desc_newvalue']}


    {$this->lang->words['desc_oldvalue']}


    {$this->lang->words['desc_where']}
    "); + + ipb.templates['db_insert'] = new Template("{$this->lang->words['desc_existtable']}


    {$this->lang->words['desc_data']}


    {$this->lang->words['desc_revert']}
    "); + + acp.hooks.dbMax = $i; + + + + + +
    +

    {$this->lang->words['adddbchanges']}

    +
    +
      +EOF; + +if( $i ) +{ + for( $k=1; $k<$i; $k++ ) + { + $IPBHTML .= << + + + + + +
      + {$form['type_' . $k ]}
      + {$this->lang->words['nomodifyset']} {$this->lang->words['_rarr']} +
      +
      +EOF; + if( $form['field_1_' . $k ] ) + { + $IPBHTML .= << + {$form['field_1_' . $k ]}

      +EOF; + } + + if( $form['field_2_' . $k ] ) + { + $IPBHTML .= << + {$form['field_2_' . $k ]}

      +EOF; + } + + if( $form['field_3_' . $k ] ) + { + $IPBHTML .= << + {$form['field_3_' . $k ]}

      +EOF; + } + + if( $form['field_4_' . $k ] ) + { + $IPBHTML .= << + {$form['field_4_' . $k ]}

      +EOF; + } + + if( $form['field_5_' . $k ] ) + { + $IPBHTML .= << + {$form['field_5_' . $k ]}

      +EOF; + } + + if( $form['field_6_' . $k ] ) + { + $IPBHTML .= << + {$form['field_6_' . $k ]}

      +EOF; + } + + $IPBHTML .= << + acp.hooks.fields['MF__database']['fields'].push( "type_{$k}" ); + acp.hooks.fields['MF__database']['fields'].push( "name_{$k}" ); + acp.hooks.fields['MF__database']['fields'].push( "fields_{$k}" ); + acp.hooks.fields['MF__database']['fields'].push( "tabletype_{$k}" ); + acp.hooks.fields['MF__database']['fields'].push( "altertype_{$k}" ); + acp.hooks.fields['MF__database']['fields'].push( "table_{$k}" ); + acp.hooks.fields['MF__database']['fields'].push( "field_{$k}" ); + acp.hooks.fields['MF__database']['fields'].push( "newfield_{$k}" ); + acp.hooks.fields['MF__database']['fields'].push( "fieldtype_{$k}" ); + acp.hooks.fields['MF__database']['fields'].push( "default_{$k}" ); + acp.hooks.fields['MF__database']['fields'].push( "where_{$k}" ); + acp.hooks.fields['MF__database']['fields'].push( "newvalue_{$k}" ); + acp.hooks.fields['MF__database']['fields'].push( "oldvalue_{$k}" ); + acp.hooks.fields['MF__database']['fields'].push( "updates_{$k}" ); + acp.hooks.fields['MF__database']['fields'].push( "fordelete_{$k}" ); + + acp.hooks.dbMax = {$k}; + +
      +
      + +EOF; + } +} +$IPBHTML .= << + + + + + +
      + {$form['type_' . $i ]}
      + +
      + +
      + +
    +
    +
    + + +
    +
    + + +EOF; + +return $IPBHTML; +} + } \ No newline at end of file diff --git a/upload/admin/applications/core/skin_cp/cp_skin_livesearch.php b/upload/admin/applications/core/skin_cp/cp_skin_livesearch.php index 1e1beda0..975fe1f3 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_livesearch.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_livesearch.php @@ -1,220 +1,402 @@ - -EOF; - -if( count($results) ) -{ - foreach( $results as $key => $output ) - { - if( $key == 'settings' ) - { - $text = $this->lang->words['ls_settings']; - } - else if( $key == 'location' ) - { - $text = $this->lang->words['ls_acppages']; - } - - if( !$output ) - { - continue; - } - - $IPBHTML .= << - {$text} {$this->lang->words[ -
      - {$output} -
    -EOF; - -// If we started hidding settings, we need to stop hiding them now... -if( $key == 'settings' AND $this->startedHideSettings ) -{ - $this->startedHideSettings = false; - $IPBHTML .= << - -EOF; -} -// If we started hidding pages, we need to stop hiding them now... -else if( $key == 'location' AND $this->startedHidePages ) -{ - $this->startedHidePages = false; - $IPBHTML .= << - -EOF; -} - - -$IPBHTML .= << -EOF; - } -} -else -{ - $IPBHTML .= <<No results -EOF; -} - -$IPBHTML .= << -EOF; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Result for settings - * - * @access public - * @param array Result - * @param int Total count - * @param int Section count - * @return string HTML - */ -public function searchRowSetting( $r, $count, $secCount ) { -$IPBHTML = ""; -//--starthtml--// - -if( $secCount > 10 ) -{ - if( !$this->startedHideSettings ) - { - $this->startedHideSettings = true; - - $IPBHTML .= << -
    - - + - {$r['admin_username']} @@ -586,7 +235,7 @@ $IPBHTML .= << - - + -
    +
    {$content}
    EOF; @@ -690,14 +339,14 @@ $IPBHTML = ""; $IPBHTML .= << - - - + + - - - {$rowb['members_display_name']} + + {$rowb['members_display_name']}
    {$this->lang->words['cp_ip']}: {$rowb['ip_address']}
    - - {$rowb['_ctime']} + + {$rowb['_ctime']} EOF; @@ -729,7 +378,7 @@ $IPBHTML .= << @@ -740,85 +389,6 @@ return $IPBHTML; } -/** - * ACP Statistics wrapper - * - * @access public - * @param array Content - * @return string HTML - */ -public function acp_stats_wrapper($content) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - - {$this->lang->words['cp_totalmembers']} -
    - {$this->lang->words['cp_onlinenow']}
    - {$this->lang->words['cp_awaitingvalidation']}
    - {$this->lang->words['cp_lockedaccounts']}
    - {$this->lang->words['cp_coppaaccounts']}
    - {$this->lang->words['cp_spammeraccounts']} -
    - - - {$content['members']} -
    - {$this->lang->words['cp_view']} ({$content['sessions']})
    - {$this->lang->words['cp_manage']} ({$content['validate']})
    - {$this->lang->words['cp_manage']} ({$content['locked']})
    - {$this->lang->words['cp_manage']} ({$content['coppa']})
    - {$this->lang->words['cp_manage']} ({$content['spammer'][0]}) -
    - - - - - {$this->lang->words['cp_topics']} -
    - {$this->lang->words['cp_awaitingmoderation']} -
    - - {$content['topics']}
    {$content['topics_mod']} - - - - {$this->lang->words['cp_posts']} -
    - {$this->lang->words['cp_awaitingmoderation']} -
    - - {$content['replies']}
    {$content['posts_mod']} - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Show a warning about the PHP version - * - * @access public - * @param string PHP version - * @return string HTML - */ -public function acp_php_version_warning( $phpversion ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= <<lang->words['cp_php_warning']} -EOF; - -//--endhtml--// -return $IPBHTML; -} - /** * Show a warning box * @@ -834,7 +404,7 @@ $IPBHTML = ""; $IPBHTML .= << -

    {$this->lang->words[ {$title}

    +

    {$this->lang->words[ {$title}

    {$content} EOF; @@ -843,64 +413,6 @@ EOF; return $IPBHTML; } -/** - * Show warning that unlocked installer is present - * - * @access public - * @return string HTML - */ -public function warning_unlocked_installer() { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= <<lang->words['cp_unlocked_warning']} -EOF; - -//--endhtml--// -return $IPBHTML; -} - - -/** - * Show unfinished upgrade warning - * - * @access public - * @return string HTML - */ -public function warning_upgrade() { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= <<lang->words['cp_upgrade_warning']} -EOF; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Show locked installer present warning - * - * @access public - * @return string HTML - */ -public function warning_installer() { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= <<lang->words['cp_installer_warning']} -EOF; - -//--endhtml--// -return $IPBHTML; -} - /** * Show a warning that an emergency skin rebuild has occurred * @@ -969,7 +481,7 @@ $IPBHTML .= <<
  • - +
  • diff --git a/upload/admin/applications/core/skin_cp/cp_skin_performance.php b/upload/admin/applications/core/skin_cp/cp_skin_performance.php index b3b43578..584e2719 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_performance.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_performance.php @@ -1,129 +1,131 @@ -" . $this->lang->words['perf_on'] . "" : "
    " . $this->lang->words['perf_off'] . "
    "; - -$IPBHTML .= << -

    {$this->lang->words['perf_help_title']}

    - - - - -
    -

    {$this->lang->words['perf_current']}

    - -
    - {$text} -
    -HTML; - -if( count($actions) ) -{ - $IPBHTML .= "
      "; - foreach( $actions as $action ) - { - $IPBHTML .= << - {$action} - -HTML; - } - $IPBHTML .= "
    "; -} - -$IPBHTML .= <<form_code}&do=toggle' class='button'>{$this->lang->words['perf_toggle']}
    - -
    -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Show the overview page - * - * @access public - * @param string Content - * @return string HTML - */ -public function overview( $current ) -{ -$IPBHTML = ""; -//--starthtml--// - -$text = $current ? "
    " . $this->lang->words['perf_on'] . "
    " : "
    " . $this->lang->words['perf_off'] . "
    "; - - -$IPBHTML .= << -

    {$this->lang->words['perf_help_title']}

    - - - - -
    -

    {$this->lang->words['perf_current']}

    - -
    - {$text} -
    - - -
    -
    -HTML; - -//--endhtml--// -return $IPBHTML; - - -} - + + * Invision Power Services + * IP.Board v3.1.4 + * Performance mode skin file + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since Friday 19th May 2006 17:33 + * @version $Revision: 5713 $ + */ + +class cp_skin_performance extends output +{ + +/** + * Prevent our main destructor being called by this class + * + * @access public + * @return void + */ +public function __destruct() +{ +} + +/** + * Show the results from toggling the mode + * + * @access public + * @param bool Currently on or off + * @param array Actions that were taken + * @return string HTML + */ +public function toggleResults( $current, $actions=array() ) +{ +$IPBHTML = ""; +//--starthtml--// + +$text = $current ? "
    " . $this->lang->words['perf_on'] . "
    " : "
    " . $this->lang->words['perf_off'] . "
    "; + +$IPBHTML .= << +

    {$this->lang->words['perf_help_title']}

    + + + + +
    +

    {$this->lang->words['perf_current']}

    + +
    + {$text} +
    +HTML; + +if( count($actions) ) +{ + $IPBHTML .= "
      "; + foreach( $actions as $action ) + { + $IPBHTML .= << + {$action} + +HTML; + } + $IPBHTML .= "
    "; +} + +$IPBHTML .= <<form_code}&do=toggle' class='button'>{$this->lang->words['perf_toggle']}
    + +
    +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Show the overview page + * + * @access public + * @param string Content + * @return string HTML + */ +public function overview( $current ) +{ +$IPBHTML = ""; +//--starthtml--// + +$text = $current ? "
    " . $this->lang->words['perf_on'] . "
    " : "
    " . $this->lang->words['perf_off'] . "
    "; + + +$IPBHTML .= << +

    {$this->lang->words['perf_help_title']}

    + + + + +
    +

    {$this->lang->words['perf_current']}

    + +
    + {$text} +
    + + +
    +
    +HTML; + +//--endhtml--// +return $IPBHTML; + + +} + } \ No newline at end of file diff --git a/upload/admin/applications/core/skin_cp/cp_skin_qanda.php b/upload/admin/applications/core/skin_cp/cp_skin_qanda.php index 25527c90..692ef624 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_qanda.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_qanda.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Question and answer skin file - * Last Updated: $Date: 2009-04-02 11:17:56 -0400 (Thu, 02 Apr 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * - * @author $Author: matt $ + * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 4393 $ + * @version $Revision: 5713 $ */ class cp_skin_qanda extends output diff --git a/upload/admin/applications/core/skin_cp/cp_skin_rebuild.php b/upload/admin/applications/core/skin_cp/cp_skin_rebuild.php index 8b79d7a5..247ec03b 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_rebuild.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_rebuild.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Cleanup and rebuild tools skin file - * Last Updated: $Date: 2009-11-16 12:37:20 -0500 (Mon, 16 Nov 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 5414 $ + * @version $Revision: 5713 $ */ class cp_skin_rebuild extends output diff --git a/upload/admin/applications/core/skin_cp/cp_skin_reports.php b/upload/admin/applications/core/skin_cp/cp_skin_reports.php index 11b1bc0d..570bc8b1 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_reports.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_reports.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Report center skin file - * Last Updated: $Date: 2009-05-21 16:47:25 -0400 (Thu, 21 May 2009) $ + * Last Updated: $Date: 2010-05-19 21:06:53 -0400 (Wed, 19 May 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 4682 $ + * @version $Revision: 6326 $ */ class cp_skin_reports extends output @@ -99,7 +101,7 @@ $IPBHTML .= $data['author']; $IPBHTML .= << - YN + YN {$this->lang->words[ @@ -181,7 +183,7 @@ public function report_status_row( $data ) { $IPBHTML .= << - +
    EOF; @@ -240,7 +242,7 @@ $IPBHTML .= <<
    ({$data['human']}k)   {$data['mtime']}
    - - + - @@ -322,7 +324,7 @@ $IPBHTML .= <<
    ({$data['human']}k)   {$data['mtime']}
    - - + - @@ -362,7 +364,7 @@ $IPBHTML .= <<

    {$this->lang->words['h3_title_security']}

    -
    @@ -190,9 +192,9 @@ $IPBHTML .= <<{$data['title']}
    - {$this->lang->words[ - {$this->lang->words[ - {$this->lang->words[ + {$this->lang->words[ + {$this->lang->words[ + {$this->lang->words[ {$this->lang->words[ @@ -225,7 +227,7 @@ $IPBHTML .= <<  {$this->lang->words[ - {$data[ {$data['points']} баллов + {$data[ {$data['points']} {$this->lang->words['pointssuffix']}
    • form_code}&code=edit_image&id={$data['id']}'>{$this->lang->words['r_editimg']}
    • form_code}&code=remove_image&id={$data['id']}");'>{$this->lang->words['r_removeimg']}
    • @@ -320,6 +322,15 @@ if( $plug_data['class_title'] ) $code = 'change_plugin'; } +//----------------------------------------- +// Build applications drop down +//----------------------------------------- + +foreach( ipsRegistry::$applications as $app_dir => $app_data ) +{ + $apps[] = array( $app_dir, $app_data['app_title'] ); +} + $plug_data = (is_array($plug_data) AND count($plug_data)) ? $plug_data : $this->request; $form = array(); @@ -329,6 +340,7 @@ $form['plugi_desc'] = $this->registry->output->formInput('plugi_desc', htmls $form['plugi_author_url'] = $this->registry->output->formInput('plugi_author_url', $plug_data['author_url']); $form['plugi_author'] = $this->registry->output->formInput('plugi_author', $plug_data['author']); $form['plugi_file'] = $this->registry->output->formInput('plugi_file', ( $plug_data['my_class'] ? $plug_data['my_class'] : 'default' )); +$form['plugi_app'] = $this->registry->output->formDropdown( 'appPlugin', $apps, $plug_data['app'] ); $IPBHTML = ""; //--starthtml--// @@ -344,6 +356,10 @@ $IPBHTML .= <<

      {$this->lang->words['r_registernew']}

        +
      • + + {$form['plugi_app']} +
      • {$form['plugi_title']} @@ -366,7 +382,7 @@ $IPBHTML .= <<
      • - /admin/applications/core/sources/reportPlugins/ {$form['plugi_file']} .php + /admin/applications/YOURAPP/extensions/reportPlugins/ {$form['plugi_file']} .php
      @@ -438,6 +454,15 @@ foreach( $this->cache->getCache('group_cache') as $g ) { $groups[] = array( $g['g_id'], $g['g_title'] ); } + +//----------------------------------------- +// Build applications drop down +//----------------------------------------- + +foreach( ipsRegistry::$applications as $app_dir => $app_data ) +{ + $apps[] = array( $app_dir, $app_data['app_title'] ); +} $form = array(); $form['plugi_can_report'] = $this->registry->output->formMultiDropdown('plugi_can_report[]', $groups, $sel_can_report ); @@ -445,6 +470,7 @@ $form['plugi_gperm'] = $this->registry->output->formMultiDropdown('plugi_gper $form['plugi_onoff'] = $this->registry->output->formYesNo('plugi_onoff', $plug_data['onoff']); $form['plugi_lockd'] = $this->registry->output->formYesNo('plugi_lockd', $plug_data['lockd']); $form['plugi_enabled'] = $this->registry->output->formYesNo('plugi_onoff', $plug_data['onoff']); +$form['plugi_app'] = $this->registry->output->formDropdown( 'appPlugin', $apps, $plug_data['app'] ); $IPBHTML = ""; //--starthtml--// @@ -453,8 +479,12 @@ $IPBHTML .= <<form_code}&do=edit_plugin&secure_key={$secure_key}&com_id={$plug_data['com_id']}' method='post'>
      -

      {$this->lang->words['r_editplugin']}

      +

      {$this->lang->words['r_editplugin']}: {$plug_data['class_title']}

        +
      • + + {$form['plugi_app']} +
      • {$form['plugi_can_report']} diff --git a/upload/admin/applications/core/skin_cp/cp_skin_security.php b/upload/admin/applications/core/skin_cp/cp_skin_security.php index 49cd3829..d9700c89 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_security.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_security.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Security skin file - * Last Updated: $Date: 2009-05-21 16:47:25 -0400 (Thu, 21 May 2009) $ + * Last Updated: $Date: 2010-05-19 21:06:53 -0400 (Wed, 19 May 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 4682 $ + * @version $Revision: 6326 $ */ class cp_skin_security extends output @@ -177,8 +179,8 @@ $IPBHTML = ""; $IPBHTML .= <<
    - - - $file_path + - + {$file_path}
    +
    {$content['bad']} {$content['ok']} {$content['good']} diff --git a/upload/admin/applications/core/skin_cp/cp_skin_setup.php b/upload/admin/applications/core/skin_cp/cp_skin_setup.php index 19b048f7..eee67752 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_setup.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_setup.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Setup skin file - * Last Updated: $Date: 2009-06-18 19:43:48 -0400 (Thu, 18 Jun 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 4790 $ + * @version $Revision: 5713 $ */ class cp_skin_setup extends output diff --git a/upload/admin/applications/core/skin_cp/cp_skin_spamlogs.php b/upload/admin/applications/core/skin_cp/cp_skin_spamlogs.php index 1806d007..8fa0e53f 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_spamlogs.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_spamlogs.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Error log skin file - * Last Updated: $Date$ + * Last Updated: $Date: 2010-09-30 21:47:05 -0400 (Thu, 30 Sep 2010) $ + * * - * @author $Author$ + * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision$ + * @version $Revision: 6929 $ */ class cp_skin_spamlogs extends output @@ -66,6 +68,13 @@ $IPBHTML = ""; //--starthtml--// $IPBHTML .= << +

    {$this->lang->words['spamlog_searchh3']}

    + form_code}' method='post'> +

    + + +
    form_code}' method='post' name='theAdminForm' id='theAdminForm'> @@ -105,7 +114,7 @@ else { $IPBHTML .= << - + HTML; } diff --git a/upload/admin/applications/core/skin_cp/cp_skin_spiderlogs.php b/upload/admin/applications/core/skin_cp/cp_skin_spiderlogs.php index ff8ba190..8f4d31f1 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_spiderlogs.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_spiderlogs.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Spiderlogs skin file - * Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 3887 $ + * @version $Revision: 5713 $ */ class cp_skin_spiderlogs extends output diff --git a/upload/admin/applications/core/skin_cp/cp_skin_sql.php b/upload/admin/applications/core/skin_cp/cp_skin_sql.php index 593f9617..0724d95f 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_sql.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_sql.php @@ -1,451 +1,571 @@ - -

    {$this->lang->words['my_si_data']}

    - -
      -
    • - - {$table_data['Rows']} -
    • - -
    • - - {$table_data['Data_length']} -
    • - -
    • - - {$table_data['Index_length']} -
    • -
    - -
    -
    -

    {$this->lang->words['my_si_searchable']}

    - -
    -HTML; - -//--endhtml--// -return $IPBHTML; - -} - -/** - * Result from running an SQL tool - * - * @access public - * @param string Page title - * @param array Columns - * @param array Rows - * @return string HTML - */ -public function sqlToolResult( $title, $columns, $rows ) { -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

    {$title}

    - -
    {$this->lang->words['slog_noresults']}{$this->lang->words['sslog_noresults']}
    - -HTML; - -foreach( $columns as $r ) -{ -$IPBHTML .= <<{$r} -HTML; -} - -$IPBHTML .= << - - -HTML; - -foreach( $rows as $r ) -{ - $num = $num == 1 ? 2 : 1; -$IPBHTML .= <<{$r} -HTML; -} - -$IPBHTML .= << -
    - -
    -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Show the header for an SQL tool result - * - * @access public - * @return string HTML - */ -public function sqlToolResultHeader() { -$IPBHTML = ""; -//--starthtml--// - -$title = sprintf( $this->lang->words['my_title'], $this->true_version ); - -$IPBHTML .= << -

    {$title}

    - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Splash screen to create an SQL backup - * - * @access public - * @return string HTML - */ -public function sqlSafeBackupSplashScreen() { -$IPBHTML = ""; -//--starthtml--// - -$title = sprintf( $this->lang->words['my_backuptitle'], $this->true_version ); - -$IPBHTML .= << -

    {$title}

    - - - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Show the form to create an SQL backup - * - * @access public - * @param array Form elements - * @return string HTML - */ -public function sqlBackupForm( $form ) { -$IPBHTML = ""; -//--starthtml--// - -$title = sprintf( $this->lang->words['my_backuptitle'], $this->true_version ); - -$IPBHTML .= << -

    {$title}

    - - -form_code}' method='post' name='theAdminForm' id='theAdminForm'> - - - -
    -

    {$this->lang->words['my_simple_backup']}

    - -
      -
    • - - {$form['create_tbl']} -
    • - -
    • - - -
    • - -
    • - - {$form['skip']} -
    • - -
    • - - {$form['enable_gzip']} -
    • -
    - -
    -
    - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * View results from executing an SQL query - * - * @access public - * @param array Queries - * @param array Headers for the queries - * @param array Rows from the queries - * @param string Page links - * @return string HTML - */ -public function sqlViewResults( $queries, $headers, $rows, $pages ) { -$IPBHTML = ""; -//--starthtml--// - -$query = implode( ";\n", $queries ); - -$title = sprintf( $this->lang->words['my_title'], $this->true_version ); - -$IPBHTML .= << -

    {$title}

    - -HTML; - -//----------------------------------------- -// When coming from db checker/index checker, won't be set -//----------------------------------------- - -if( $this->form_code ) -{ - $IPBHTML .= <<form_code}' method='post' name='theAdminForm' id='theAdminForm'> - - - -
    -

    {$this->lang->words['my_run']}

    - -
    -
    - -
    -HTML; -} - -foreach( $queries as $index => $aQuery ) -{ - $IPBHTML .= <<{$pages} - -
    -

    {$this->lang->words['my_results']}

    - - - -HTML; - -if( count($headers[ $index ]) ) -{ - foreach( $headers[ $index ] as $r ) - { - $IPBHTML .= <<{$r} -HTML; - } -} - -$IPBHTML .= << -HTML; - -if( count($rows[ $index ]) ) -{ - foreach( $rows[ $index ] as $r ) - { - $IPBHTML .= << -HTML; - - foreach( $r as $_r ) - { - $num = ( $num == 1 ) ? 2 : 1; -$IPBHTML .= <<{$_r} -HTML; - } - -$IPBHTML .= << -HTML; - } -} - -$IPBHTML .= << -
    -
    -
    {$pages}
    -
    -HTML; -} - -//--endhtml--// -return $IPBHTML; -} - -/** - * Show the database tables (SQL Toolbox homepage) - * - * @access public - * @param array Tables - * @return string HTML - */ -public function sqlListTables( $rows ) { -$IPBHTML = ""; -//--starthtml--// - -$title = sprintf( $this->lang->words['my_title'], $this->true_version ); - -$IPBHTML .= << -

    {$title}

    - - - - -
    form_code}' method='post' name='theForm' id='theForm'> - - - -
    -

    {$this->lang->words['my_tables']}

    - - - - - - - - -HTML; - -foreach( $rows as $r ) -{ -$IPBHTML .= << - - - - - -HTML; -} - -$IPBHTML .= << -
    -
    - - -
    -
    - - - -
    - -form_code}' method='post' name='theAdminForm' id='theAdminForm'> - - - -
    -

    {$this->lang->words['my_run']}

    - -
      -
    • - - -
    • -
    - -
    -
    - -HTML; - -//--endhtml--// -return $IPBHTML; -} - + + * Invision Power Services + * IP.Board v3.1.4 + * SQL Toolbox skin file + * Last Updated: $Date: 2010-09-27 18:18:35 -0400 (Mon, 27 Sep 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since Friday 19th May 2006 17:33 + * @version $Revision: 6917 $ + */ + +class cp_skin_sql extends output +{ + +/** + * Prevent our main destructor being called by this class + * + * @access public + * @return void + */ +public function __destruct() +{ +} + + +/** + * Result from running an SQL tool + * + * @access public + * @param string Page title + * @param array Columns + * @param array Rows + * @return string HTML + */ +public function sqlToolResult( $title, $columns, $rows ) { +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

    {$title}

    + +
    {$this->lang->words['my_table']}{$this->lang->words['my_rows']}{$this->lang->words['my_export']}
    - form_code}&do=runsql&query={$r['query']}'>{$r['table']} - {$r['rows']}form_code}&do=export_tbl&tbl={$r['table']}'>{$this->lang->words['my_export']}
    + +HTML; + +foreach( $columns as $r ) +{ +$IPBHTML .= <<{$r} +HTML; +} + +$IPBHTML .= << + + +HTML; + +foreach( $rows as $r ) +{ + $num = $num == 1 ? 2 : 1; +$IPBHTML .= <<{$r} +HTML; +} + +$IPBHTML .= << +
    +
    +
    +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Show the header for an SQL tool result + * + * @access public + * @return string HTML + */ +public function sqlToolResultHeader() { +$IPBHTML = ""; +//--starthtml--// + +$title = sprintf( $this->lang->words['my_title'], $this->true_version ); + +$IPBHTML .= << +

    {$title}

    + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Splash screen to create an SQL backup + * + * @access public + * @return string HTML + */ +public function sqlSafeBackupSplashScreen() { +$IPBHTML = ""; +//--starthtml--// + +$title = sprintf( $this->lang->words['my_backuptitle'], $this->true_version ); + +$IPBHTML .= << +

    {$title}

    + + + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Show the form to create an SQL backup + * + * @access public + * @param array Form elements + * @return string HTML + */ +public function sqlBackupForm( $form ) { +$IPBHTML = ""; +//--starthtml--// + +$title = sprintf( $this->lang->words['my_backuptitle'], $this->true_version ); + +$IPBHTML .= << +

    {$this->lang->words['backup_tool_warning_title']}

    +

    {$this->lang->words['backup_tool_warning_text']}

    + +
    +
    +

    {$title}

    +
    + +
    form_code}' method='post' name='theAdminForm' id='theAdminForm'> + + + +
    +

    {$this->lang->words['my_simple_backup']}

    + +
      +
    • + + {$form['create_tbl']} +
    • + +
    • + + +
    • + +
    • + + {$form['skip']} +
    • + +
    • + + {$form['enable_gzip']} +
    • +
    + +
    +
    +
    +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * View results from executing an SQL query + * + * @access public + * @param array Queries + * @param array Headers for the queries + * @param array Rows from the queries + * @param string Page links + * @return string HTML + */ +public function sqlViewResults( $queries, $headers, $rows, $pages, $tableName='', $truncated=array() ) { +$IPBHTML = ""; +//--starthtml--// + +$query = implode( ";\n", $queries ); + +$title = sprintf( $this->lang->words['my_title'], $this->true_version ); + +$IPBHTML .= << +

    {$title}

    + +HTML; + +if ( $tableName ) +{ + $this->lang->words['my_results'] .= ' - ' . $tableName; +} + +//----------------------------------------- +// When coming from db checker/index checker, won't be set +//----------------------------------------- + +if( $this->form_code ) +{ + $IPBHTML .= <<form_code}' method='post' name='theAdminForm' id='theAdminForm'> + + + +
    +

    {$this->lang->words['my_run']}

    +
    +
    +
    + +
    +HTML; +} + +foreach( $queries as $index => $aQuery ) +{ + $IPBHTML .= <<{$pages} + +
    +

    {$this->lang->words['my_results']}

    + + + +HTML; + +if( count($headers[ $index ]) ) +{ + foreach( $headers[ $index ] as $r ) + { + if ( ! $this->request['notruncate'] AND in_array( $r, $truncated ) ) + { + $r = '
    ' . $r . "
    "; + } + + $IPBHTML .= <<{$r} +HTML; + } +} + +$IPBHTML .= << +HTML; + +if( count($rows[ $index ]) ) +{ + foreach( $rows[ $index ] as $r ) + { + $IPBHTML .= << +HTML; + + foreach( $r as $_r ) + { + $num = ( $num == 1 ) ? 2 : 1; + + /* Excerpt? */ + if ( $this->request['notruncate'] ) + { + if ( strlen( $_r ) > 200 ) + { + $_r = ""; + } + } + +$IPBHTML .= <<{$_r} +HTML; + } + +$IPBHTML .= << +HTML; + } +} + +$IPBHTML .= << +
    +
    +
    {$pages}
    +
    +HTML; +} + +//--endhtml--// +return $IPBHTML; +} + +/** + * Show the database tables (SQL Toolbox homepage) + * + * @access public + * @param array Tables + * @return string HTML + */ +public function sqlListTables( $rows ) { +$IPBHTML = ""; +//--starthtml--// + +$title = sprintf( $this->lang->words['my_title'], $this->true_version ); + +$IPBHTML .= << +

    {$title}

    + + + + +
    form_code}' method='post' name='theForm' id='theForm'> + + + +
    +

    {$this->lang->words['my_tables']}

    + + + + + + + + + +HTML; + +foreach( $rows as $r ) +{ +$IPBHTML .= << + + + + + +HTML; +} + +$IPBHTML .= << +
    +
    + + +
    +
    + + + +
    + +form_code}' method='post' name='theAdminForm' id='theAdminForm'> + + + +
    +

    {$this->lang->words['my_run']}

    + +
      +
    • + + +
    • +
    + +
    +
    + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Show the table schematic (SQL Toolbox homepage) + * + * @access public + * @param array Rows + * @return string HTML + */ +public function sqlViewTable( $table, $rows, $indexes ) { +$IPBHTML = ""; +//--starthtml--// + +$title = sprintf( $this->lang->words['view_schematic'], $table ); + +$IPBHTML .= << +

    {$title}

    + + + + +
    +

    {$this->lang->words['view_structure']}: {$table}

    + +
     {$this->lang->words['my_table']}{$this->lang->words['my_rows']}{$this->lang->words['my_export']}
    + form_code}&do=viewschematic&table={$r['table']}'>{$r['table']} +HTML; + if ( $r['rows'] == '' ) + { + $IPBHTML .= << + {$this->lang->words['crashed_table_ohnoes']} + +HTML; + } + $IPBHTML .= << + form_code}&do=runsql&query={$r['query']}'>{$r['rows']}form_code}&do=export_tbl&tbl={$r['table']}'>{$this->lang->words['my_export']}
    + +HTML; + + foreach( $rows[0] as $k => $v ) + { + $IPBHTML .= <<$k +HTML; + } + +$IPBHTML .= << +HTML; + +foreach( $rows as $idx ) +{ + $IPBHTML .= << +HTML; + foreach( $idx as $k => $v ) + { +$IPBHTML .= <<{$v} +HTML; + } + $IPBHTML .= << +HTML; +} + +$IPBHTML .= << +
    +
    +   +
    +
    + +HTML; + +if ( is_array( $indexes ) AND count( $indexes ) ) +{ + $IPBHTML .= << +
    +

    {$this->lang->words['view_indexes']}: {$table}

    + +
    + +HTML; + + foreach( $indexes[0] as $k => $v ) + { + $IPBHTML .= <<$k +HTML; + } + +$IPBHTML .= << +HTML; + +foreach( $indexes as $idx ) +{ + $IPBHTML .= << +HTML; + foreach( $idx as $k => $v ) + { +$IPBHTML .= <<{$v} +HTML; + } + $IPBHTML .= << +HTML; +} + +$IPBHTML .= << +
    +
    +   +
    +
    + + +HTML; + +} + +$IPBHTML .= << + +form_code}' method='post' name='theAdminForm' id='theAdminForm'> + + + +
    +

    {$this->lang->words['my_run']}

    + +
      +
    • + + +
    • +
    + +
    +
    + +HTML; + +//--endhtml--// +return $IPBHTML; +} + } \ No newline at end of file diff --git a/upload/admin/applications/core/skin_cp/cp_skin_system.php b/upload/admin/applications/core/skin_cp/cp_skin_system.php index a06d1424..a8141ded 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_system.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_system.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * System tools skin file - * Last Updated: $Date: 2009-09-25 03:27:57 -0400 (Fri, 25 Sep 2009) $ + * Last Updated: $Date: 2010-09-24 21:21:39 -0400 (Fri, 24 Sep 2010) $ + * * - * @author $Author: matt $ + * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 5156 $ + * @version $Revision: 6915 $ */ class cp_skin_system extends output @@ -112,7 +114,7 @@ $IPBHTML .= << -form_code}&do=task_log_show' method='post'> +form_code}&do=task_log_show' method='post'>

    {$this->lang->words['sys_view_task_manager_logs']}

      @@ -133,7 +135,7 @@ $IPBHTML .= << -form_code}&do=task_log_delete' method='post'> +form_code}&do=task_log_delete' method='post'>

      {$this->lang->words['sys_delete_task_manager_logs']}

        @@ -306,10 +308,10 @@ function formatnumber(num) } -form_code}&do=$formbit&task_id={$task['task_id']}&type=$type&app_dir={$task['task_application']}' method='post' id='task_manager'> +form_code}&do={$formbit}&task_id={$task['task_id']}&type={$type}&app_dir={$task['task_application']}' method='post' id='task_manager'>
        -

        $title

        +

        {$title}

        • @@ -348,7 +350,7 @@ function formatnumber(num) {$form['task_month_day']}
        • - Выберите + {$this->lang->words['selectimeunitsabove']}
        • @@ -376,13 +378,13 @@ HTML; $IPBHTML .= <<
          - +
        HTML; @@ -480,8 +482,8 @@ $IPBHTML .= <<{$row['task_title']}{$row['_title']}
        {$row['task_description']}
    HTML; @@ -599,7 +601,7 @@ $IPBHTML .= <<{$this->lang->words['sys_status']} - $content + {$content}
    - - + - {$r['admin_username']} -
    IP: {$r['admin_ip_address']}
    +
    {$this->lang->words['ipaddyprefix']}{$r['admin_ip_address']}
    {$r['_admin_time']} - - + - - - + -
    {$this->lang->words['sys_log']}
    @@ -628,7 +630,7 @@ $IPBHTML = ""; $IPBHTML .= << -

    Данные авторизаций

    +

    {$this->lang->words['logindetails']}

    @@ -722,7 +724,7 @@ $IPBHTML .= <<
    - $acplogins + {$acplogins} HTML; if ( IN_DEV ) @@ -769,11 +771,11 @@ $IPBHTML = ""; $IPBHTML .= << - - - - - + + + + + HTML; @@ -947,23 +949,23 @@ $HTML .= <<{$this->lang->words['sys_developers_language_cache_impo']}
    - +
    @@ -1179,10 +1181,10 @@ $HTML = <<
    {$this->lang->words['logindetail_basic']} $name$ip_address$log_in$click$location{$name}{$ip_address}{$log_in}{$click}{$location}
    - - - - + + + + HTML; @@ -1194,10 +1196,10 @@ if( count( $packs ) ) $stats[$r]['custom'] = isset( $stats[$r]['custom'] ) ? $stats[$r]['custom'] : ' '; $HTML .= << - + - + HTML; @@ -1207,7 +1209,7 @@ else { $HTML .= << - + HTML; } @@ -1242,32 +1244,53 @@ $HTML = <<
    -

    $title

    +

    {$title}

      -
    • - +
    • +
    • - - + +
    • - +
    • - +
    - +
    + HTML; return $HTML; diff --git a/upload/admin/applications/core/skin_cp/cp_skin_templates.php b/upload/admin/applications/core/skin_cp/cp_skin_templates.php index 5276977b..ffed5738 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_templates.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_templates.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Look and feel skin file - * Last Updated: $Date: 2009-09-29 17:59:02 -0400 (Tue, 29 Sep 2009) $ + * Last Updated: $Date: 2010-11-16 11:26:43 -0500 (Tue, 16 Nov 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: mmecham $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 5178 $ + * @version $Revision: 7195 $ */ class cp_skin_templates extends output @@ -182,7 +184,7 @@ $IPBHTML .=<<
    {txt.language_pack_name}{txt.language_total_entries}{txt.language_customized_entries}{txt.language_out_of_date_entries}{$this->lang->words['language_pack_name']}{$this->lang->words['language_total_entries']}{$this->lang->words['language_customized_entries']}{$this->lang->words['language_out_of_date_entries']}  
    form_code}&word_pack={$app}/{$r}&do=edit_word_pack&id={$this->request['id']}'>{$r}form_code}&word_pack={$app}/{$r}&do=edit_word_pack&id={$this->request['id']}'>{$r} {$stats[$r]['total']} {$stats[$r]['custom']}form_code}&word_pack={$app}/{$r}&do=edit_word_pack&id={$this->request['id']}&filter=1'>{$stats[$r]['outofdate']}form_code}&word_pack={$app}/{$r}&do=edit_word_pack&id={$this->request['id']}&filter=1'>{$stats[$r]['outofdate']} {$menus[$r]}
    Для данного приложения нет языков{$this->lang->words['nolangpacksgroup']}
    @@ -533,13 +627,14 @@ $IPBHTML .= <<
    -
    {$bitsof}
    - +
    +
    +
    {$this->lang->words['minutepatience']}
    - +
    @@ -553,18 +648,20 @@ $IPBHTML .= <<
    - - - - - - + + + + + +
    EOF; @@ -580,7 +677,7 @@ return $IPBHTML; * @param array Skin diff sessions * @return string HTML */ -public function skindiff_overview( $sessions=array() ) { +public function skindiff_overview( $sessions=array(), $skinOptionList, $canMerge ) { $IPBHTML = ""; //--starthtml--// @@ -605,14 +702,14 @@ if ( count( $sessions ) ) $IPBHTML .= << - {$data['diff_session_title']} + {$data['_title']} {$data['_date']} - {$this->lang->words[ -
    {$this->lang->words['sk_comparediff']}
    - + #{css_group}.css
    @@ -1940,7 +2139,6 @@ $IPBHTML .= << -

    {$this->lang->words['sk_editingset']} {$setData['set_name']}

    @@ -2108,6 +2306,15 @@ EOF; {$form['importName']} + + + {$this->lang->words['sk_upgrade']}
    + {$this->lang->words['sk_doupgrade']} + + + {$form['importUpgrade']} + + {$this->lang->words['sk_useimageset']}
    diff --git a/upload/admin/applications/core/skin_cp/cp_skin_tools.php b/upload/admin/applications/core/skin_cp/cp_skin_tools.php index 439b20ec..f07d1f14 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_tools.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_tools.php @@ -1,18 +1,18 @@ +

    {$this->lang->words['ie_title']}

    + +
    + + +
    +

    {$this->lang->words['ie_title']}

    + + + + + + + +HTML; + +if ( !empty( $rows ) ) +{ + + foreach( $rows as $r ) + { + $IPBHTML .= << + + + + + +HTML; + } +} +else +{ + $IPBHTML .= << + + +HTML; +} + +$IPBHTML .= << + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Add/Edit Email Rules +//=========================================================================== +function emailRuleForm( $current, $applications=array() ) { + +if ( empty( $current ) ) +{ + $title = $this->lang->words['ie_add']; + $id = 0; +} +else +{ + $title = $this->lang->words['ie_edit']; + $id = $current['rule_id']; +} + +$form['criteria_field'] = $this->registry->output->formDropdown( 'criteria_field', array( + array( 'to', $this->lang->words['ie_cf_to'] ), + array( 'from', $this->lang->words['ie_cf_from'] ), + array( 'sbjt', $this->lang->words['ie_cf_sbjt'] ), + array( 'body', $this->lang->words['ie_cf_body'] ), + ), empty( $current ) ? NULL : $current['rule_criteria_field'] ); + +$form['criteria_type'] = $this->registry->output->formDropdown( 'criteria_type', array( + array( 'ctns', $this->lang->words['ie_ct_ctns'] ), + array( 'eqls', $this->lang->words['ie_ct_eqls'] ), + array( 'regx', $this->lang->words['ie_ct_regx'] ), + ), empty( $current ) ? NULL : $current['rule_criteria_type'] ); + +$form['criteria_value'] = $this->registry->output->formInput( 'criteria_value', ( empty( $current ) ? '' : $current['rule_criteria_value'] ) ); + +$form['action'] = $this->registry->output->formDropdown( 'action', array_merge( + array( array( '--', $this->lang->words['ie_ignore'] ) ), + $applications + ), empty( $current ) ? NULL : $current['rule_app'] ); + + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

    {$title}

    + + +
    +

    {$title}

    +
    form_code}&do=save' method='post'> + +
      +
    • + + {$form['criteria_field']} {$form['criteria_type']} {$form['criteria_value']} +
    • +
    • + + {$form['action']} +
    • +
    +
    + +
    + +
    +HTML; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// License Activation Form +//=========================================================================== + +//=========================================================================== +// Sharelinks Form +//=========================================================================== +public function sharelinksForm( $id, $do, $title, $button, $form ) { +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= <<form_code}' method='post' name='theAdminForm' id='theAdminForm'> + + + + +
    +

    {$title}

    + +
      +
    • + + {$form['share_enabled']} +
    • +
    • + + {$form['share_title']} +
    • +
    • + + {$form['share_key']} +
    • +
    • + + {$form['share_canonical']} +
    • +
    +
    +
    + +
    +
    +
    + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +//=========================================================================== +// Share links Index +//=========================================================================== +public function shareLinksIndex( $rows ) { +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

    {$this->lang->words['sl_m_title']}

    + + + + + + +
    +

    {$this->lang->words['sl_current_title']}

    + +
     {$this->lang->words['ie_criteria']}{$this->lang->words['ie_action']} 
     {$r['criteria']}{$r['action']} + {$this->lang->words[ + +
    {$this->lang->words['ie_none']}
    + + + + + + +
      {$this->lang->words['sl_title']} 
    +
    + + +HTML; + +//--endhtml--// +return $IPBHTML; +} + /** * User agents group form * @@ -121,7 +398,7 @@ ALL THESE ARE USED WITHIN ipb3uAgents.js
    - + #{uagent_name}
    @@ -131,7 +408,7 @@ ALL THESE ARE USED WITHIN ipb3uAgents.js
    [ {$this->lang->words['t_uaremove']} ]
    - + #{uagent_name}
    @@ -141,9 +418,9 @@ ALL THESE ARE USED WITHIN ipb3uAgents.js
    {$this->lang->words['t_uaediting']} #{uagent_name}
    -{$this->lang->words['t_ua_info']} + {$this->lang->words['t_ua_info']}
    - Versions: + {$this->lang->words['uaversions']}
    @@ -202,7 +479,7 @@ if ( is_array( $userAgentGroups ) AND count( $userAgentGroups ) )
    - + {$data['ugroup_title']}
    @@ -293,7 +570,7 @@ EOF; { $IPBHTML .= << - +
    + + + + + + + + + + + + + +EOF; + +if( $login['_missingModules'] ) +{ + $_missing = sprintf( $this->lang->words['login_method_missing_functions'], $login['_missingModules'] ); +$IPBHTML .= << + + +EOF; +} + + +$IPBHTML .= << EOF; @@ -672,7 +963,7 @@ if( $data['login_installed'] ) $IPBHTML .= << -
    @@ -326,7 +603,7 @@ EOF; ipb.templates['add_uagent'] = new Template("

    #{box_title}


    • {$this->lang->words['t_uaname_desc']}

    • {$this->lang->words['t_uakey_desc']}

    • {$this->lang->words['t_uacapture_desc']}
    "); - ipb.templates['agent_row'] = new Template("
  • Icon#{name}{$this->lang->words[ {$this->lang->words[
  • "); + ipb.templates['agent_row'] = new Template("
  • {$this->lang->words[#{name}{$this->lang->words[ {$this->lang->words[
  • "); EOF; } @@ -391,7 +668,7 @@ EOF; $IPBHTML .= <<
    -
    + @@ -471,28 +748,42 @@ $IPBHTML .= <<

    {$this->lang->words['tol_diagnostics_for']}: {$login['login_title']}

    - - - - - - + + + + + + - - - - - - - - - - - - - - -
    {$this->lang->words['tol_file_name']}{$this->lang->words['tol_exists']}{$this->lang->words['tol_writeable']}
    {$this->lang->words['tol_file_name']}{$this->lang->words['tol_exists']}{$this->lang->words['tol_writeable']}
    {$this->lang->words['tol_log_in_enabled']}*./sources/loginauth/{$login['login_folder_name']}/auth.php*-
    {$this->lang->words['tol_log_in_has_settings']}*./sources/loginauth/{$login['login_folder_name']}/conf.php**
    +
    {$this->lang->words['tol_log_in_enabled']}*./sources/loginauth/{$login['login_folder_name']}/auth.php*-
    {$this->lang->words['tol_log_in_has_settings']}*./sources/loginauth/{$login['login_folder_name']}/conf.php**
    {$_missing}
    +
    + -HTML; - -if( !$this->request['showall'] ) -{ - $IPBHTML .= << -
    drag
    - -HTML; -} - - if( $depth_guide ) - { - $IPBHTML .= << - {$depth_guide} - -HTML; - } - - $IPBHTML .= << -HTML; -if ( $r['id'] == $this->settings['forum_trash_can_id'] ) -{ -$IPBHTML .= << -HTML; -} - -$IPBHTML .= <<{$r['name']} -HTML; - -if( $desc ) -{ - $IPBHTML .= <<{$desc} -HTML; -} - -if ( ($r['skin_id'] != "") and ($r['skin_id'] > 0) ) -{ -$IPBHTML .= <<[ Использует стиль: {$skin} ] -HTML; -} - -$IPBHTML .= <<
    {$this->lang->words['frm_moderators']}{$r['_modstring']}
    -HTML; -} - -$IPBHTML .= << - - -
    EOF; @@ -685,7 +976,7 @@ EOF; else { $IPBHTML .= << + -- EOF; } @@ -712,7 +1003,7 @@ EOF; $IPBHTML .= "form_code}&do=login_toggle&login_id={$data['login_id']}' title='{$toggle_text}'>"; } - $IPBHTML .= "YN"; + $IPBHTML .= "YN"; if( $data['login_installed'] ) { @@ -933,7 +1224,7 @@ EOF; { $IPBHTML .= << - {$data['cache_name']} {$data['_cache_size']} @@ -941,19 +1232,19 @@ EOF; if ( $data['_cs_init_load'] AND $data['allow_unload'] ) { $IPBHTML .= << + EOF; } else if ( $data['_cs_init_load'] AND ! $data['allow_unload'] ) { $IPBHTML .= << + EOF; } else { $IPBHTML .= << + EOF; } $IPBHTML .= << $app_data ) $_tab = IPSText::md5Clean( $tab ); $IPBHTML .= << - +
    EOF; foreach( $app_data as $r ) @@ -1336,12 +1627,6 @@ public function settings_row_start_group($r) { $IPBHTML = ""; //--starthtml--// -if( $this->settings['acp_tutorial_mode'] ) -{ - //$settingGroup = preg_replace( "/[^a-zA-Z0-9&;]/", '', $r['conf_start_group'] ); - //$r['conf_start_group'] = "{$r['conf_start_group']}Icon"; -} - $IPBHTML .= <<
    @@ -1356,55 +1641,24 @@ return $IPBHTML; } /** - * End a group of settings + * Automcplete field * * @access public * @return string HTML */ -public function settings_row_end_group() { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << + EOF; //--endhtml--// @@ -1433,18 +1687,12 @@ if( !$r['conf_start_group'] )
  • EOF; } -else -{ - $IPBHTML .= <<--> -EOF; -} $IPBHTML .= << +
  • - - + + EOF; if( $elem_type != 'rte' ) { @@ -1496,86 +1744,10 @@ EOF; EOF; -/*if( $r['conf_start_group'] ) -{ - $IPBHTML .= << -EOF; -}*/ - - //--endhtml--// return $IPBHTML; } -/** - * Form to export single settings - * - * @access public - * @param array Settings - * @return string HTML - */ -public function settings_exportsingle( $settings ) { - -$per_row = 3; -$td_width = 100 / $per_row; -$count = 0; - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

    {$this->lang->words['export_helptitle']}

    - - -
    form_code}&do=setting_someexport_complete' method='post'> -
    -
    {$this->lang->words['choose_export']}
    -
    Drag
    {$r['conf_title']}
    {$r['conf_description']}{$r['help_key']}
    -
    {$r['conf_title']}
    {$r['conf_description']}
    - -EOF; - -foreach( $settings as $r ) -{ - $count++; - $class = $count == 2 ? 'tablerow2' : 'tablerow1'; - - $IPBHTML .= << - {$r['conf_key']} - {$r['conf_id']} - -EOF; - - if ($count == $per_row ) - { - $IPBHTML .= "\n\n"; - $count = 0; - } -} - -if ( $count > 0 and $count != $per_row ) -{ - for ($i = $count ; $i < $per_row ; ++$i) - { - $IPBHTML .= "\n"; - } - - $IPBHTML .= ""; -} - -$IPBHTML .= << -
    - -
    - - -EOF; - -return $IPBHTML; -} - /** * Form to add/edit a setting * @@ -1649,10 +1821,6 @@ $IPBHTML .= <<{$this->lang->words['tol_start_setting_group']}{$this->lang->words['tol_enter_title_here_or_leave_blan']} {$form['conf_start_group']} -
  • - - {$form['conf_end_group']} -
  • EOF; //startif if ( $form['conf_protected'] != '' ) diff --git a/upload/admin/applications/core/skin_cp/cp_skin_warnlogs.php b/upload/admin/applications/core/skin_cp/cp_skin_warnlogs.php index ca7f80e6..855c4e8e 100644 --- a/upload/admin/applications/core/skin_cp/cp_skin_warnlogs.php +++ b/upload/admin/applications/core/skin_cp/cp_skin_warnlogs.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Warn log skin file - * Last Updated: $Date: 2009-03-27 11:41:38 -0400 (Fri, 27 Mar 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Friday 19th May 2006 17:33 - * @version $Revision: 4333 $ + * @version $Revision: 5713 $ */ class cp_skin_warnlogs extends output diff --git a/upload/admin/applications/core/skin_cp/index.html b/upload/admin/applications/core/skin_cp/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/skin_cp/index.html +++ b/upload/admin/applications/core/skin_cp/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/skin_cp/skinDiff.css b/upload/admin/applications/core/skin_cp/skinDiff.css index be974a93..01ff6fa1 100644 --- a/upload/admin/applications/core/skin_cp/skinDiff.css +++ b/upload/admin/applications/core/skin_cp/skinDiff.css @@ -10,7 +10,7 @@ { margin-left: auto; margin-right: auto; - background-color: #FFFFFF; + background: rgb(241, 244, 247); background-repeat: repeat-x; border: 1px solid #5b5b5b; width: 500px; @@ -29,11 +29,10 @@ font-size:14px; } -#diffLogText +#diffLogTitle { width: 96%; - height: 45px; - padding:10px; + padding:6px; font-size:22px; margin:auto; text-align:center; @@ -41,6 +40,25 @@ overflow: auto; } +#diffLogText +{ + width: 96%; + padding:6px; + font-size:14px; + margin:auto; + text-align:center; + font-weight:normal; + overflow: auto; +} + +#diffLogMsg +{ + color: gray; + font-size:10px; + margin:auto; + text-align:center; +} + /* Progress Bar */ #diffLogProgressBar { diff --git a/upload/admin/applications/core/sources/classes/attach/class_attach.php b/upload/admin/applications/core/sources/classes/attach/class_attach.php index e310675a..41187019 100644 --- a/upload/admin/applications/core/sources/classes/attach/class_attach.php +++ b/upload/admin/applications/core/sources/classes/attach/class_attach.php @@ -1,10 +1,11 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Attachments - * Last Updated: $Date: 2009-12-03 17:23:59 -0500 (Thu, 03 Dec 2009) $ + * Last Updated: $Date: 2010-11-15 11:39:10 -0500 (Mon, 15 Nov 2010) $ + * * * * Possible Error strings: @@ -16,13 +17,13 @@ * - no_upload_dir_perms (Upload dir is not writeable) * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com - * @version $Rev: 5516 $ + * @link http://www.invisionpower.com + * @version $Rev: 7185 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -36,7 +37,6 @@ class class_attach /** * Global html class * - * @access public * @var object */ public $html; @@ -44,7 +44,6 @@ class class_attach /** * Type of attachment * - * @access public * @var string */ public $type = ''; @@ -52,7 +51,6 @@ class class_attach /** * Plugin Class * - * @access public * @var object */ public $plugin = ''; @@ -60,7 +58,6 @@ class class_attach /** * Post key * - * @access public * @var string */ public $attach_post_key = ''; @@ -68,7 +65,6 @@ class class_attach /** * Relationship ID * - * @access public * @var integer */ public $attach_rel_id = ''; @@ -76,7 +72,6 @@ class class_attach /** * Return variables * - * @access public * @var array [ 'allow_uploads', 'space_allowed', 'space_allowed_human', 'space_used', 'space_used_human', 'space_left', 'space_left_human' ] */ public $attach_stats = array(); @@ -85,7 +80,6 @@ class class_attach * Lang array * Internal language array * - * @access public * @var array */ public $language = array( 'unlimited' => 'Неограничено', @@ -94,7 +88,6 @@ class class_attach /** * Error array * - * @access public * @var string */ public $error = ""; @@ -102,7 +95,6 @@ class class_attach /** * Full upload path * - * @access public * @var string */ public $upload_path = ''; @@ -110,7 +102,6 @@ class class_attach /** * Upload part part (from /uploads) * - * @access public * @var string */ public $upload_dir = ''; @@ -118,7 +109,6 @@ class class_attach /** * Extra upload form url * - * @access public * @var string */ public $extra_upload_form_url = ''; @@ -126,7 +116,6 @@ class class_attach /** * Custom settings * - * @access public * @var array */ public $attach_settings = array( @@ -140,7 +129,6 @@ class class_attach /**#@+ * Registry Object Shortcuts * - * @access protected * @var object */ protected $registry; @@ -149,12 +137,12 @@ class class_attach protected $request; protected $lang; protected $member; + protected $memberData; /**#@-*/ /** * CONSTRUCTOR * - * @access public * @param object ipsRegistry reference * @return void */ @@ -173,7 +161,6 @@ class class_attach /** * Initiates class * - * @access public * @return void */ public function init() @@ -223,14 +210,13 @@ class class_attach //----------------------------------------- $this->upload_path = $this->attach_settings['upload_dir']; - + $this->_upload_path = $this->upload_path; } /** * Show the attachment (or force download) * - * @access public * @param int Attachment ID (The main attach id) * @return void */ @@ -257,13 +243,13 @@ class class_attach /* Got a reply? */ if( $attach === FALSE OR ! is_array( $attach ) ) { - $this->registry->getClass('output')->showError( 'no_permission_to_download', 10171 ); + $this->registry->getClass('output')->showError( 'no_permission_to_download', 10171, null, null, 403 ); } /* Got a rel id? */ if( ! $attach['attach_rel_id'] AND $attach['attach_member_id'] != $this->memberData['member_id'] ) { - $this->registry->getClass('output')->showError( 'err_attach_not_attached', 10172 ); + $this->registry->getClass('output')->showError( 'err_attach_not_attached', 10172, null, null, 403 ); } //----------------------------------------- @@ -292,10 +278,10 @@ class class_attach $this->registry->cache()->updateCacheWithoutSaving( 'attachtypes', $attachtypes ); } - + /* Show attachment */ $attach_cache = $this->registry->cache()->getCache('attachtypes'); - $this->_upload_path = ( isset( $this->plugin->settings[ 'upload_dir' ] ) ) ? $this->plugin->settings[ 'upload_dir' ] : $this->attach_settings[ 'upload_dir' ]; + $this->_upload_path = ( isset( $this->plugin->mysettings[ 'upload_dir' ] ) ) ? $this->plugin->mysettings[ 'upload_dir' ] : $this->attach_settings[ 'upload_dir' ]; $file = $this->_upload_path . "/" . $attach['attach_location']; @@ -307,31 +293,59 @@ class class_attach /* Open and display the file.. */ header( "Content-Type: {$attach_cache[ $attach['attach_ext'] ]['atype_mimetype']}" ); - if( $attach['attach_is_image'] ) + $disposition = $attach['attach_is_image'] ? "inline" : "attachment"; + + if( in_array( $this->memberData['userAgentKey'], array( 'firefox', 'opera' ) ) ) { - header( "Content-Disposition: inline; filename=\"{$attach['attach_file']}\"" ); + @header( 'Content-Disposition: ' . $disposition . "; filename*={$this->settings['gb_char_set']}''" . rawurlencode($attach['attach_file']) ); + } + else if( in_array( $this->memberData['userAgentKey'], array( 'explorer' ) ) ) + { + @header( 'Content-Disposition: ' . $disposition . '; filename="' . rawurlencode($attach['attach_file']) . '"' ); } else { - header( "Content-Disposition: attachment; filename=\"{$attach['attach_file']}\"" ); + @header( 'Content-Disposition: ' . $disposition . '; filename="' . $attach['attach_file'] . '"' ); } if( !ini_get('zlib.output_compression') OR ini_get('zlib.output_compression') == 'off' ) { header( 'Content-Length: ' . (string) ( filesize( $file ) ) ); } - - if( $fh = fopen( $file, 'rb' ) ) + + /** + * @link http://community.invisionpower.com/tracker/issue-22011-wrong-way-to-handle-attachments-transfer/ + */ + if ( function_exists('ob_end_clean') ) { - while( ! feof( $fh ) ) - { - echo fread( $fh, 4096 ); - flush(); - @ob_flush(); - } - - @fclose( $fh ); - } + @ob_end_clean(); + } + + if( function_exists('readfile') ) + { + readfile( $file ); + } + else + { + if( $fh = fopen( $file, 'rb' ) ) + { + while( ! feof( $fh ) ) + { + echo fread( $fh, 4096 ); + + if ( function_exists('ob_get_length') AND function_exists('ob_flush') AND @ob_get_length() ) + { + @ob_flush(); + } + else + { + @flush(); + } + } + + @fclose( $fh ); + } + } exit(); } @@ -344,14 +358,13 @@ class class_attach else { /* No permission? */ - $this->registry->getClass('output')->showError( 'no_permission_to_download', 10174 ); + $this->registry->getClass('output')->showError( 'no_permission_to_download', 10174, null, null, 403 ); } } /** * Swaps the HTML for the nice attachments. * - * @access public * @param array Array of HTML blocks to convert: [ rel_id => $html ] * @param array Relationship ids * @param string Skin group to use @@ -417,7 +430,7 @@ class class_attach //----------------------------------------- $rows = $this->plugin->renderAttachment( $attach_ids, $rel_ids, $this->attach_post_key ); - + //----------------------------------------- // Got anything? //----------------------------------------- @@ -478,7 +491,7 @@ class class_attach // Make sure we've not seen this ID //----------------------------------------- - $row['_attach_id'] = $row['attach_id'] . '-' . str_replace( ".", "-", microtime( true ) ); + $row['_attach_id'] = $row['attach_id'] . '-' . str_replace( array( '.', ' ' ), "-", microtime() ); $not_inline = $_seen_rows > 0 ? $_seen_rows%$this->settings['topic_attach_no_per_row'] : 1; @@ -501,7 +514,7 @@ class class_attach // Convert HTML //----------------------------------------- - if ( is_array( $map_attach_id_to_rel_id[ $_attach_id ] ) AND count( $map_attach_id_to_rel_id[ $_attach_id ] ) ) + if ( isset($map_attach_id_to_rel_id[ $_attach_id ]) AND is_array( $map_attach_id_to_rel_id[ $_attach_id ] ) AND count( $map_attach_id_to_rel_id[ $_attach_id ] ) ) { foreach( $map_attach_id_to_rel_id[ $_attach_id ] as $idx => $_rel_id ) { @@ -607,11 +620,11 @@ class class_attach $_seen_rows++; } - + //----------------------------------------- // Anthing to add? //----------------------------------------- - + if ( count( $final_blocks ) ) { foreach( $final_blocks as $rel_id => $type ) @@ -647,7 +660,6 @@ class class_attach /** * Removes attachment(s) * - * @access public * @param array $remove_ids Array of attachment ids to remove * @param string $id_type Column to use when deleting, attach_rel_id by default * @return bool @@ -710,7 +722,6 @@ class class_attach /** * Removes an attachment. * - * @access public * @return void */ public function removeAttachment() @@ -721,7 +732,6 @@ class class_attach if ( ! $this->attach_id ) { - echo "no this->attachid"; return FALSE; } @@ -735,7 +745,6 @@ class class_attach if ( ! $attachment['attach_id'] ) { - echo "no attach id"; return FALSE; } @@ -775,7 +784,6 @@ class class_attach } else { - echo "no perms"; return FALSE; } } @@ -784,7 +792,6 @@ class class_attach * Converts post-key attachments into rel_id / rel_module attachments * by adding in the correct ID, etc * - * @access public * @param array $args * @return array */ @@ -812,7 +819,6 @@ class class_attach /** * Uploads and saves file * - * @access public * @return mixed void, or the new insert id */ public function processUpload() @@ -881,7 +887,6 @@ class class_attach 'attach_thumb_location' => "", 'attach_hits' => 0, 'attach_date' => time(), - 'attach_temp' => 0, 'attach_post_key' => $this->attach_post_key, 'attach_member_id' => $this->memberData['member_id'], 'attach_rel_id' => $this->attach_rel_id, @@ -900,7 +905,7 @@ class class_attach // Set up the variables //----------------------------------------- - $upload->out_file_name = $this->type . '-' . $this->memberData['member_id'] . '-' . str_replace( '.', '', microtime( true ) ); + $upload->out_file_name = $this->type . '-' . $this->memberData['member_id'] . '-' . str_replace( array( '.', ' ' ), '-', microtime() ); $upload->out_file_dir = $this->upload_path; $upload->max_file_size = $this->attach_stats['max_single_upload'] ? $this->attach_stats['max_single_upload'] : 1000000000; $upload->make_script_safe = 1; @@ -997,6 +1002,7 @@ class class_attach require_once( IPS_KERNEL_PATH."classImage.php" ); require_once( IPS_KERNEL_PATH."classImageGd.php" ); $image = new classImageGd(); + $image->force_resize = true; $image->init( array( @@ -1036,15 +1042,14 @@ class class_attach $this->DB->insert( 'attachments', $attach_data ); $newid = $this->DB->getInsertId(); - + return $newid; - } + } } /** * Uploads and saves file * - * @access public * @return mixed void, or an array of new insert ids */ public function processMultipleUploads() @@ -1063,6 +1068,13 @@ class class_attach } } + /* Can Upload */ + if ( ! $this->attach_stats['allow_uploads'] ) + { + $this->error = 'upload_failed'; + return; + } + /* Setup Attachment Types */ if( ! ( $this->registry->cache()->getCache('attachtypes') ) OR ! is_array( $this->registry->cache()->getCache('attachtypes') ) ) { @@ -1082,13 +1094,6 @@ class class_attach $this->registry->cache()->updateCacheWithoutSaving( 'attachtypes', $attachtypes ); } - - /* Can Upload */ - if ( ! $this->attach_stats['allow_uploads'] ) - { - $this->error = 'upload_failed'; - return; - } /* Attachment Library */ require_once( IPS_KERNEL_PATH.'classUpload.php' ); @@ -1140,7 +1145,6 @@ class class_attach 'attach_thumb_location' => "", 'attach_hits' => 0, 'attach_date' => time(), - 'attach_temp' => 0, 'attach_post_key' => $this->attach_post_key, 'attach_member_id' => $this->memberData['member_id'], 'attach_rel_id' => $this->attach_rel_id, @@ -1240,14 +1244,13 @@ class class_attach /** * Gets stuff required for the upload form * - * @access public * @return void */ public function getUploadFormSettings() { /* Collect settings from the plug-in */ $stats = $this->plugin->getSpaceAllowance( $this->attach_post_key ); - + /* Fix language strings */ if( isset($this->lang->words['attach_unlimited']) ) { @@ -1258,7 +1261,7 @@ class class_attach { $this->language['not_allowed'] = $this->lang->words['attach_notallowed']; } - + /* Format and return... */ $this->attach_stats['space_used'] = $stats['space_used']; $this->attach_stats['space_used_human'] = IPSLib::sizeFormat( $stats['space_used'] ); @@ -1266,7 +1269,7 @@ class class_attach $this->attach_stats['max_single_upload'] = $stats['max_single_upload']; $this->attach_stats['max_single_upload_human'] = $this->attach_stats['max_single_upload'] ? IPSLib::sizeFormat( $stats['max_single_upload'] ) : $this->language[ 'unlimited' ]; $this->attach_stats['total_space_allowed_human'] = $this->attach_stats['total_space_allowed'] ? IPSLib::sizeFormat( $this->attach_stats['total_space_allowed'] ) : $this->language[ 'unlimited' ]; - + if( $stats['space_allowed'] == 0 ) { /* Unlimited... */ @@ -1298,7 +1301,6 @@ class class_attach /** * Checks the upload dir. See above. It's not rocket science * - * @access public * @return bool */ public function checkUploadDirectory() @@ -1364,29 +1366,35 @@ class class_attach /** * Loads child extends class. * - * @access public * @return void + * @todo Should we add a check here in the foreach to see if the application is enabled? */ public function loadAttachmentPlugin() { /* INIT */ $this->type = IPSText::alphanumericalClean( $this->type ); - /* Load... */ - $file = IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/plugin_' . $this->type . '.php'; - $class = 'plugin_'.$this->type; - - if( ! is_object( $this->plugin ) ) + /* No plugin yet? Load it! */ + if( ! is_object( $this->plugin ) && $this->type ) { - if ( file_exists( $file ) ) + /* Load... */ + foreach( ipsRegistry::$applications as $app ) { - require_once( $file ); - $this->plugin = new $class( $this->registry ); - $this->plugin->getSettings(); + if( file_exists( IPSLib::getAppDir( $app['app_directory'] ) . '/extensions/attachments/plugin_' . $this->type . '.php' ) ) + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $app['app_directory'] ) . '/extensions/attachments/plugin_' . $this->type . '.php', 'plugin_'.$this->type, $app['app_directory'] ); + $this->plugin = new $classToLoad( $this->registry ); + $this->plugin->getSettings(); + + /* Found it, stop */ + break; + } } - else + + /* Still here? Error out then.. */ + if ( ! is_object( $this->plugin ) ) { - print "Could not locate $file"; + print "Could not locate plugin {$this->type}"; exit(); } } @@ -1395,7 +1403,6 @@ class class_attach /** * Swaps the HTML for the nice attachments. * - * @access private * @param array Array of matches from preg_replace_callback * @return string HTML */ @@ -1412,7 +1419,7 @@ class class_attach // Generate random ID //----------------------------------------- - $row['_attach_id'] = $row['attach_id'] . '-' . preg_replace( "#[\.\s]#", "-", microtime() ); + $row['_attach_id'] = $row['attach_id'] . '-' . str_replace( array( '.', ' ' ), "-", microtime() ); //----------------------------------------- // Build HTML @@ -1433,5 +1440,4 @@ class class_attach return $tmp; } - } \ No newline at end of file diff --git a/upload/admin/applications/core/sources/classes/attach/index.html b/upload/admin/applications/core/sources/classes/attach/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/sources/classes/attach/index.html +++ b/upload/admin/applications/core/sources/classes/attach/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/sources/classes/attach/plugin_blogcblock.php b/upload/admin/applications/core/sources/classes/attach/plugin_blogcblock.php deleted file mode 100644 index 22d9cc8c..00000000 --- a/upload/admin/applications/core/sources/classes/attach/plugin_blogcblock.php +++ /dev/null @@ -1,465 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class plugin_blogcblock extends class_attach -{ - /** - * Module type - * - * @access public - * @var string - */ - public $module = 'blogcblock'; - - /** - * Returns an array of settings: - * 'siu_thumb' = Allow thumbnail creation? - * 'siu_height' = Height of the generated thumbnail in pixels - * 'siu_width' = Width of the generated thumbnail in pixels - * 'upload_dir' = Base upload directory (must be a full path) - * - * You can omit any of these settings and IPB will use the default - * settings (which are the ones entered into the ACP for post thumbnails) - * - * @access public - * @return boolean - */ - public function getSettings() - { - $this->mysettings = array( 'siu_thumb' => $this->settings['blog_thumb'], - 'siu_width' => $this->settings['blog_thumb_width'], - 'siu_height' => $this->settings['blog_thumb_height'], - 'upload_dir' => $this->settings['blog_upload_dir'], - ); - - return true; - } - - /** - * Checks the attachment and checks for download / show perms - * - * @access public - * @param integer Attachment id - * @return array Attachment data - */ - public function getAttachmentData( $attach_id ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $_ok = 0; - - //----------------------------------------- - // Grab 'em - //----------------------------------------- - - $this->DB->build( array( 'select' => 'a.*', - 'from' => array( 'attachments' => 'a' ), - 'where' => "a.attach_rel_module='" . $this->module . "' AND a.attach_id=" . $attach_id, - 'add_join' => array( 0 => array( 'select' => 'bcc.cbcus_id', - 'from' => array( 'blog_custom_cblocks' => 'bcc' ), - 'where' => "bcc.cbcus_id=a.attach_rel_id", - 'type' => 'left' ), - 1 => array( 'select' => 'cb.blog_id', - 'from' => array( 'blog_cblocks' => 'cb' ), - 'where' => "cb.cblock_ref_id=bcc.cbcus_id AND cb.cblock_type='custom'", - 'type' => 'left' ) ) - ) ); - - $attach_sql = $this->DB->execute(); - - $attach = $this->DB->fetch( $attach_sql ); - - //----------------------------------------- - // Check.. - //----------------------------------------- - - if ( ! isset( $attach['blog_id'] ) || ! $attach['blog_id'] ) - { - return FALSE; - } - - require_once ( IPSLib::getAppDir('blog') . '/sources/lib/lib_blogfunctions.php' ); - $blog_std = new blogFunctions( $this->registry ); - $blog_std->buildPerms(); - - $blog = $blog_std->loadBlog( $attach['blog_id'] ); - - if( !$blog['blog_id'] ) - { - return false; - } - - return $attach; - } - - /** - * Check the attachment and make sure its OK to display - * - * @access public - * @param array Array of ids - * @param array Array of relationship ids - * @return array Attachment data - */ - public function renderAttachment( $attach_ids, $rel_ids=array() ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $rows = array(); - $query = ''; - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! is_array( $attach_ids ) OR ! count( $attach_ids ) ) - { - $attach_ids = array( -2 ); - } - - if ( is_array( $rel_ids ) and count( $rel_ids ) ) - { - $query = " OR attach_rel_id IN (-1," . implode( ",", $rel_ids ) . ")"; - } - - //----------------------------------------- - // Grab 'em - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', - 'from' => 'attachments', - 'where' => "attach_rel_module='" . $this->module . "' AND ( attach_id IN(-1," . implode( ",", $attach_ids ) . ") " . $query . " )", - ) ); - - $attach_sql = $this->DB->execute(); - - //----------------------------------------- - // Loop through and filter off naughty ids - //----------------------------------------- - - while( $db_row = $this->DB->fetch( $attach_sql ) ) - { - $_ok = 1; - - //----------------------------------------- - // Ok? - //----------------------------------------- - - if ( $_ok ) - { - $rows[ $db_row['attach_id'] ] = $db_row; - } - } - - //----------------------------------------- - // Return - //----------------------------------------- - - return $rows; - } - - /** - * Recounts number of attachments for the articles row - * - * @access public - * @param string Post key - * @param integer Related ID - * @param array Arguments for query - * @return array Returns count of items found - */ - public function postUploadProcess( $post_key, $rel_id, $args=array() ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $cnt = array( 'cnt' => 0 ); - - //----------------------------------------- - // Check.. - //----------------------------------------- - - if ( ! $post_key ) - { - return 0; - } - - - $this->DB->build( array( "select" => 'COUNT(*) as cnt', - 'from' => 'attachments', - 'where' => "attach_rel_module='".$this->module."' AND attach_post_key='{$post_key}'") ); - $this->DB->execute(); - - $cnt = $this->DB->fetch(); - - if ( $cnt['cnt'] ) - { - $this->DB->buildAndFetch( array( 'update' => 'blog_custom_cblocks', - 'set' => "cbcus_has_attach=cbcus_has_attach+" . $cnt['cnt'], - 'where' => "cbcus_id=" . intval( $rel_id ) ) ); - } - - return array( 'count' => $cnt['cnt'] ); - } - - /** - * Recounts number of attachments for the articles row - * - * @access public - * @param array Attachment data - * @return boolean - */ - public function attachmentRemovalCleanup( $attachment ) - { - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $attachment['attach_id'] ) - { - return FALSE; - } - - $this->DB->build( array( 'select' => 'e.cbcus_id', - 'from' => array( 'blog_custom_cblocks' => 'e' ), - 'where' => 'e.cbcus_id='. intval( $attachment['attach_rel_id'] ) - ) ); - - $this->DB->execute(); - - $cbcus = $this->DB->fetch(); - - if ( isset( $cbcus['cbcus_id'] ) ) - { - $this->DB->build( array( "select" => 'count(*) as cnt', - 'from' => 'attachments', - 'where' => "attach_rel_module='".$this->module."' AND attach_rel_id = ".$cbcus['cbcus_id'] ) ); - $this->DB->execute(); - - $cnt = $this->DB->fetch(); - - $count = intval( $cnt['cnt'] ); - - $this->DB->buildAndFetch( array( 'update' => 'blog_custom_cblocks', 'set' => "cbcus_has_attach=". $count , 'where' => "cbcus_id=".$cbcus['cbcus_id'] ) ); - } - - return TRUE; - } - - /** - * Determines if you have permission for bulk attachment removal - * Returns TRUE or FALSE - * IT really does - * - * @access public - * @param array Ids to check against - * @return boolean - */ - public function canBulkRemove( $attach_rel_ids=array() ) - { - return $this->memberData['g_is_supmod'] ? true : false; - } - - /** - * Determines if you can remove this attachment - * Returns TRUE or FALSE - * IT really does - * - * @access public - * @param array Attachment data - * @return boolean - */ - public function canRemove( $attachment ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $ok_to_remove = FALSE; - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $attachment['attach_id'] ) - { - return FALSE; - } - - //----------------------------------------- - // Allowed to remove? - //----------------------------------------- - - if ( $this->memberData['member_id'] == $attachment['attach_member_id'] ) - { - if ( $this->settings['blog_allow_cblockchange'] && $this->settings['blog_allow_cblocks'] ) - { - $ok_to_remove = TRUE; - } - } - else if ( $this->memberData['g_is_supmod'] ) - { - $ok_to_remove = TRUE; - } - elseif ( $this->memberData['_blogmod']['moderate_allow_editcblocks'] ) - { - $ok_to_remove = TRUE; - } - - return $ok_to_remove; - } - - /** - * Returns an array of the allowed upload sizes in bytes. - * Return 'space_allowed' as -1 to not allow uploads. - * Return 'space_allowed' as 0 to allow unlimited uploads - * Return 'max_single_upload' as 0 to not set a limit - * - * @access public - * @param string MD5 post key - * @param id Member ID - * @return array [ 'space_used', 'space_left', 'space_allowed', 'max_single_upload' ] - */ - public function getSpaceAllowance( $post_key='', $member_id='' ) - { - $max_php_size = intval( IPSLib::getMaxPostSize() ); - $member_id = intval( $member_id ? $member_id : $this->memberData['member_id'] ); - $space_left = 0; - $space_used = 0; - $space_allowed = 0; - $max_single_upload = 0; - $space_calculated = 0; - - if ( $post_key ) - { - //----------------------------------------- - // Check to make sure we're not attempting - // to upload to another's post... - //----------------------------------------- - - if ( ! $this->memberData['g_is_supmod'] ) - { - $post = $this->DB->buildAndFetch( array( 'select' => '*', - 'from' => 'posts', - 'where' => "post_key='".$post_key."'" ) ); - - if ( $post['post_key'] AND ( $post['author_id'] != $member_id ) ) - { - $space_allowed = -1; - $space_calculated = 1; - } - } - } - - //----------------------------------------- - // Generate total space allowed - //----------------------------------------- - - $total_space_allowed = ( $this->memberData['g_blog_attach_per_entry'] ? $this->memberData['g_blog_attach_per_entry'] : $this->memberData['g_blog_attach_max'] ) * 1024; - - //----------------------------------------- - // Allowed to attach? - //----------------------------------------- - - if ( ! $member_id ) - { - $space_allowed = -1; - } - - if ( ! $space_calculated ) - { - //----------------------------------------- - // Generate space allowed figure - //----------------------------------------- - - if ( $total_space_allowed > 0 ) - { - if ( $this->memberData['g_blog_attach_per_entry'] ) - { - //----------------------------------------- - // Per post limit... - //----------------------------------------- - - $_space_used = $this->DB->buildAndFetch( array( 'select' => 'SUM(attach_filesize) as figure', - 'from' => 'attachments', - 'where' => "attach_post_key='".$post_key."'" ) ); - - $space_used = intval( $_space_used['figure'] ); - $space_allowed = intval( ( $this->memberData['g_blog_attach_per_entry'] * 1024 ) - $space_used ); - $space_allowed = $space_allowed < 0 ? 0 : $space_allowed; - } - else - { - //----------------------------------------- - // Global limit... - //----------------------------------------- - - $_space_used = $this->DB->buildAndFetch( array( 'select' => 'SUM(attach_filesize) as figure', - 'from' => 'attachments', - 'where' => 'attach_member_id='.$member_id." AND attach_rel_module in('blogentry','blogcblock')" ) ); - - $space_used = intval( $_space_used['figure'] ); - $space_allowed = intval( ( $this->memberData['g_blog_attach_max'] * 1024 ) - $space_used ); - $space_allowed = $space_allowed < 0 ? 0 : $space_allowed; - } - } - else - { - # Unlimited - $space_allowed = 0; - } - - //----------------------------------------- - // Generate space left figure - //----------------------------------------- - - $space_left = $space_allowed ? $space_allowed : 0; - $space_left = ($space_left < 0) ? 0 : $space_left; - - //----------------------------------------- - // Generate max upload size - //----------------------------------------- - - if ( ! $max_single_upload ) - { - if ( $space_left > 0 AND $space_left < $max_php_size ) - { - $max_single_upload = $space_left; - } - else if ( $max_php_size ) - { - $max_single_upload = $max_php_size; - } - } - } - - $return = array( 'space_used' => $space_used, 'space_left' => $space_left, 'space_allowed' => $space_allowed, 'max_single_upload' => $max_single_upload, 'total_space_allowed' => $total_space_allowed ); - - return $return; - } - -} diff --git a/upload/admin/applications/core/sources/classes/attach/plugin_blogentry.php b/upload/admin/applications/core/sources/classes/attach/plugin_blogentry.php deleted file mode 100644 index db59ce44..00000000 --- a/upload/admin/applications/core/sources/classes/attach/plugin_blogentry.php +++ /dev/null @@ -1,456 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class plugin_blogentry extends class_attach -{ - /** - * Module type - * - * @access public - * @var string - */ - public $module = 'blogentry'; - - /** - * Returns an array of settings: - * 'siu_thumb' = Allow thumbnail creation? - * 'siu_height' = Height of the generated thumbnail in pixels - * 'siu_width' = Width of the generated thumbnail in pixels - * 'upload_dir' = Base upload directory (must be a full path) - * - * You can omit any of these settings and IPB will use the default - * settings (which are the ones entered into the ACP for post thumbnails) - * - * @access public - * @return boolean - */ - public function getSettings() - { - $this->mysettings = array( 'siu_thumb' => $this->settings['blog_thumb'], - 'siu_width' => $this->settings['blog_thumb_width'], - 'siu_height' => $this->settings['blog_thumb_height'], - 'upload_dir' => $this->settings['blog_upload_dir'] ? $this->settings['blog_upload_dir'] : $this->settings['upload_dir'] ); - - return true; - } - - /** - * Checks the attachment and checks for download / show perms - * - * @access public - * @param integer Attachment id - * @return array Attachment data - */ - public function getAttachmentData( $attach_id ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $_ok = 0; - - //----------------------------------------- - // Grab 'em - //----------------------------------------- - - $this->DB->build( array( 'select' => 'a.*', - 'from' => array( 'attachments' => 'a' ), - 'where' => "a.attach_rel_module='".$this->module."' AND a.attach_id=".$attach_id, - 'add_join' => array( 0 => array( 'select' => 'e.entry_id, e.blog_id', - 'from' => array( 'blog_entries' => 'e' ), - 'where' => "e.entry_id=a.attach_rel_id", - 'type' => 'left' ) ) - ) ); - - $attach_sql = $this->DB->execute(); - - $attach = $this->DB->fetch( $attach_sql ); - - //----------------------------------------- - // Check.. - //----------------------------------------- - - if ( ! isset( $attach['blog_id'] ) || ! $attach['blog_id'] ) - { - return FALSE; - } - - require_once ( IPSLib::getAppDir('blog') . '/sources/classes/blogFunctions.php' ); - $blog_std = new blogFunctions( $this->registry ); - $blog_std->buildPerms(); - - $blog = $blog_std->loadBlog( $attach['blog_id'] ); - - if( !$blog['blog_id'] ) - { - return false; - } - - return $attach; - } - - /** - * Check the attachment and make sure its OK to display - * - * @access public - * @param array Array of ids - * @param array Array of relationship ids - * @return array Attachment data - */ - public function renderAttachment( $attach_ids, $rel_ids=array() ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $rows = array(); - $query = ''; - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! is_array( $attach_ids ) OR ! count( $attach_ids ) ) - { - $attach_ids = array( -2 ); - } - - if ( is_array( $rel_ids ) and count( $rel_ids ) ) - { - $query = " OR attach_rel_id IN (-1," . implode( ",", $rel_ids ) . ")"; - } - - //----------------------------------------- - // Grab 'em - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', - 'from' => 'attachments', - 'where' => "attach_rel_module='".$this->module."' AND ( attach_id IN(-1,". implode( ",", $attach_ids ) . ") " . $query . " )", - ) ); - - $attach_sql = $this->DB->execute(); - - //----------------------------------------- - // Loop through and filter off naughty ids - //----------------------------------------- - - while( $db_row = $this->DB->fetch( $attach_sql ) ) - { - $_ok = 1; - - //----------------------------------------- - // Ok? - //----------------------------------------- - - if ( $_ok ) - { - $rows[ $db_row['attach_id'] ] = $db_row; - } - } - - //----------------------------------------- - // Return - //----------------------------------------- - - return $rows; - } - - /** - * Recounts number of attachments for the articles row - * - * @access public - * @param string Post key - * @param integer Related ID - * @param array Arguments for query - * @return array Returns count of items found - */ - public function postUploadProcess( $post_key, $rel_id, $args=array() ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $cnt = array( 'cnt' => 0 ); - - //----------------------------------------- - // Check.. - //----------------------------------------- - - if ( ! $post_key ) - { - return 0; - } - - - $this->DB->build( array( "select" => 'COUNT(*) as cnt', - 'from' => 'attachments', - 'where' => "attach_rel_module='".$this->module."' AND attach_post_key='{$post_key}'") ); - $this->DB->execute(); - - $cnt = $this->DB->fetch(); - - if ( $cnt['cnt'] ) - { - $this->DB->buildAndFetch( array( 'update' => 'blog_entries', - 'set' => "entry_has_attach=entry_has_attach+" . $cnt['cnt'], - 'where' => "entry_id=" . intval( $rel_id ) ) ); - } - - return array( 'count' => $cnt['cnt'] ); - } - - /** - * Recounts number of attachments for the articles row - * - * @access public - * @param array Attachment data - * @return boolean - */ - public function attachmentRemovalCleanup( $attachment ) - { - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $attachment['attach_id'] ) - { - return FALSE; - } - - $this->DB->build( array( 'select' => 'entry_id', - 'from' => 'blog_entries', - 'where' => 'entry_id='. intval( $attachment['attach_rel_id'] ) - ) ); - - $this->DB->execute(); - - $entry = $this->DB->fetch(); - - if ( isset( $entry['entry_id'] ) ) - { - $this->DB->build( array( "select" => 'count(*) as cnt', - 'from' => 'attachments', - 'where' => "attach_rel_module='blogentry' AND attach_rel_id = ".$entry['entry_id'] ) ); - $this->DB->execute(); - - $cnt = $this->DB->fetch(); - - $count = intval( $cnt['cnt'] ); - - $this->DB->build( array( 'update' => 'blog_entries', 'set' => "entry_has_attach=". $count , 'where' => "entry_id=".$entry['entry_id'] ) ); - $this->DB->execute(); - } - - return TRUE; - } - - /** - * Determines if you have permission for bulk attachment removal - * Returns TRUE or FALSE - * IT really does - * - * @access public - * @param array Ids to check against - * @return boolean - */ - public function canBulkRemove( $attach_rel_ids=array() ) - { - return $this->memberData['g_is_supmod'] ? true : false; - } - - /** - * Determines if you can remove this attachment - * Returns TRUE or FALSE - * IT really does - * - * @access public - * @param array Attachment data - * @return boolean - */ - public function canRemove( $attachment ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $ok_to_remove = FALSE; - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $attachment['attach_id'] ) - { - return FALSE; - } - - //----------------------------------------- - // Allowed to remove? - //----------------------------------------- - - if ( $this->memberData['member_id'] == $attachment['attach_member_id'] ) - { - $ok_to_remove = TRUE; - } - else if ( $this->memberData['g_is_supmod'] ) - { - $ok_to_remove = TRUE; - } - elseif ( $this->memberData['_blogmod']['moderate_edit_comment'] ) - { - $ok_to_remove = TRUE; - } - - return $ok_to_remove; - } - - /** - * Returns an array of the allowed upload sizes in bytes. - * Return 'space_allowed' as -1 to not allow uploads. - * Return 'space_allowed' as 0 to allow unlimited uploads - * Return 'max_single_upload' as 0 to not set a limit - * - * @access public - * @param string MD5 post key - * @param id Member ID - * @return array [ 'space_used', 'space_left', 'space_allowed', 'max_single_upload' ] - */ - public function getSpaceAllowance( $post_key='', $member_id='' ) - { - $max_php_size = intval( IPSLib::getMaxPostSize() ); - $member_id = intval( $member_id ? $member_id : $this->memberData['member_id'] ); - $space_left = 0; - $space_used = 0; - $space_allowed = 0; - $max_single_upload = 0; - $space_calculated = 0; - - if ( $post_key ) - { - //----------------------------------------- - // Check to make sure we're not attempting - // to upload to another's post... - //----------------------------------------- - - if ( ! $this->memberData['g_is_supmod'] ) - { - $post = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'posts', 'where' => "post_key='{$post_key}'" ) ); - - if ( $post['post_key'] AND ( $post['author_id'] != $member_id ) ) - { - $space_allowed = -1; - $space_calculated = 1; - } - } - } - - //----------------------------------------- - // Generate total space allowed - //----------------------------------------- - - $total_space_allowed = ( $this->memberData['g_blog_attach_max'] ? $this->memberData['g_blog_attach_max'] : 0 ) * 1024; - - //----------------------------------------- - // Allowed to attach? - //----------------------------------------- - - if ( ! $member_id ) - { - $space_allowed = -1; - } - - if ( ! $space_calculated ) - { - //----------------------------------------- - // Generate space allowed figure - //----------------------------------------- - - if ( $total_space_allowed > 0 ) - { - if ( $this->memberData['g_blog_attach_per_entry'] ) - { - //----------------------------------------- - // Per post limit... - //----------------------------------------- - - $_space_used = $this->DB->buildAndFetch( array( 'select' => 'SUM(attach_filesize) as figure', - 'from' => 'attachments', - 'where' => "attach_post_key='".$post_key."'" ) ); - - $space_used = intval( $_space_used['figure'] ); - $space_allowed = intval( ( $this->memberData['g_blog_attach_per_entry'] * 1024 ) - $space_used ); - $space_allowed = $space_allowed < 0 ? 0 : $space_allowed; - } - else - { - //----------------------------------------- - // Global limit... - //----------------------------------------- - - $_space_used = $this->DB->buildAndFetch( array( 'select' => 'SUM(attach_filesize) as figure', - 'from' => 'attachments', - 'where' => 'attach_member_id='.$member_id." AND attach_rel_module in('blogentry','blogcblock')" ) ); - - $space_used = intval( $_space_used['figure'] ); - $space_allowed = intval( ( $this->memberData['g_blog_attach_max'] * 1024 ) - $space_used ); - $space_allowed = $space_allowed < 0 ? 0 : $space_allowed; - } - } - else - { - # Unlimited - $space_allowed = 0; - } - - //----------------------------------------- - // Generate space left figure - //----------------------------------------- - - $space_left = $space_allowed ? $space_allowed : 0; - $space_left = ($space_left < 0) ? 0 : $space_left; - - //----------------------------------------- - // Generate max upload size - //----------------------------------------- - - if ( ! $max_single_upload ) - { - if ( $space_left > 0 AND $space_left < $max_php_size ) - { - $max_single_upload = $space_left; - } - else if ( $max_php_size ) - { - $max_single_upload = $max_php_size; - } - } - } - - $return = array( 'space_used' => $space_used, 'space_left' => $space_left, 'space_allowed' => $space_allowed, 'max_single_upload' => $max_single_upload, 'total_space_allowed' => $total_space_allowed ); - - return $return; - } - -} \ No newline at end of file diff --git a/upload/admin/applications/core/sources/classes/hooks/gateway.php b/upload/admin/applications/core/sources/classes/hooks/gateway.php new file mode 100644 index 00000000..26d678a5 --- /dev/null +++ b/upload/admin/applications/core/sources/classes/hooks/gateway.php @@ -0,0 +1,185 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Subscriptions Hooks Gateway "Handler" + * Owner: Matt "Oh Lord, why did I get assigned this?" Mecham + * Last Updated: $Date: 2010-01-15 15:18:44 +0000 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @link http://www.invisionpower.com + * @since 9th March 2005 11:03 + * @version $Revision: 5713 $ + */ + +class core_hookGateway +{ + /**#@+ + * Registry objects + * + * @var object + */ + protected $registry; + protected $DB; + protected $settings; + protected $request; + protected $lang; + protected $member; + protected $memberData; + protected $cache; + protected $caches; + /**#@-*/ + + /** + * Method constructor + * + * @param object Registry Object + * @return void + */ + function __construct( ipsRegistry $registry ) + { + /* Make registry objects */ + $this->registry = $registry; + $this->DB = $this->registry->DB(); + $this->settings =& $this->registry->fetchSettings(); + $this->request =& $this->registry->fetchRequest(); + $this->lang = $this->registry->getClass('class_localization'); + $this->member = $this->registry->member(); + $this->memberData =& $this->registry->member()->fetchMemberData(); + $this->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + + } + + + /** + * Shows board index recent entries + * + */ + public function shareLinks() + { + /* System enabled? */ + if ( ! $this->settings['sl_enable'] OR ! $this->settings['sl_publicdata'] OR ! $this->memberData['member_id'] ) + { + return ''; + } + + /* INIT */ + $fetchData = array(); + $finalData = array(); + $noThisIsFinalReally = array(); + + /* Fetch cached data */ + $this->DB->build( array( 'select' => '*', + 'from' => 'core_share_links_caches', + 'where' => "cache_key IN ('mostitems', 'mostrecent', 'mosttypes')" ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $caches[ $row['cache_key'] ] = ( $row['cache_data'] ) ? unserialize( $row['cache_data'] ) : array(); + } + + foreach( array( 'mostrecent', 'mostitems' ) as $items ) + { + /* Build an array of data up */ + if ( is_array( $caches[ $items ] ) AND count( $caches[ $items ] ) ) + { + foreach( $caches[ $items ] as $data ) + { + if ( $data['log_data_app'] AND $data['log_data_type'] AND $data['log_data_primary_id'] ) + { + $key = $data['log_data_app'] . '--' . $data['log_data_type'] . '--' . $data['log_data_primary_id']; + + $fetchData[ $data['log_data_app'] ][ $key ] = $data; + } + } + } + } + + /* Now go and fetch the data for the grabbed stuff */ + if ( is_array( $fetchData ) AND count( $fetchData ) ) + { + foreach( $fetchData as $app => $data ) + { + $finalData[ $app ] = $this->_fetchAppData( $app, $data ); + } + } + + /* Now to mash it all back */ + if ( is_array( $finalData ) AND count( $finalData ) ) + { + foreach( array( 'mostrecent', 'mostitems' ) as $items ) + { + /* Build an array of data up */ + if ( is_array( $caches[ $items ] ) AND count( $caches[ $items ] ) ) + { + foreach( $caches[ $items ] as $data ) + { + if ( $data['log_data_app'] AND $data['log_data_type'] AND $data['log_data_primary_id'] ) + { + $key = $data['log_data_app'] . '--' . $data['log_data_type'] . '--' . $data['log_data_primary_id']; + + if ( is_array( $finalData[ $data['log_data_app'] ][ $key ] ) ) + { + $noThisIsFinalReally[ $items ][] = array_merge( $data, $finalData[ $data['log_data_app'] ][ $key ] ); + } + } + } + } + } + } + + return $this->registry->getClass('output')->getTemplate('boards')->hookBoardIndexShareLinks( $noThisIsFinalReally ); + } + + /** + * Fetch application data + * + * @param string App + * @param array Array of incoming data + * @return array Array of outgoing data + */ + protected function _fetchAppData( $appKey, $data ) + { + if ( $appKey ) + { + $app_cache = $this->cache->getCache('app_cache'); + $app = $app_cache[ $appKey ]; + + /* Only if app enabled... */ + if ( $app['app_enabled'] ) + { + /* Setup */ + $_file = IPSLib::getAppDir( $app['app_directory'] ) . '/extensions/coreExtensions.php'; + + /* Check for the file */ + if( file_exists( $_file ) ) + { + /* Get the file */ + $_class = IPSLib::loadLibrary( $_file, $app['app_directory'] . 'ShareLinks', $app['app_directory'] ); + + /* Check for the class */ + if( class_exists( $_class ) ) + { + /* Create an object */ + $_obj = new $_class(); + + /* Check for the module */ + if( method_exists( $_obj, 'processData' ) ) + { + /* Call it */ + return $_obj->processData( $data ); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/upload/admin/applications/core/sources/classes/hooks/index.html b/upload/admin/applications/core/sources/classes/hooks/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/core/sources/classes/hooks/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/sources/classes/hooksFunctions.php b/upload/admin/applications/core/sources/classes/hooksFunctions.php index 593ec5cf..44066789 100644 --- a/upload/admin/applications/core/sources/classes/hooksFunctions.php +++ b/upload/admin/applications/core/sources/classes/hooksFunctions.php @@ -1,345 +1,359 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class hooksFunctions -{ - /**#@+ - * Registry objects - * - * @access protected - * @var object - */ - protected $registry; - protected $DB; - protected $settings; - protected $request; - protected $lang; - protected $member; - protected $memberData; - protected $cache; - protected $caches; - /**#@-*/ - - /** - * Constructor - * - * @access public - * @param object Registry object - * @return void - */ - public function __construct( ipsRegistry $registry ) - { - //----------------------------------------- - // 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->cache = $this->registry->cache(); - $this->caches =& $this->registry->cache()->fetchCaches(); - $this->lang = $this->registry->class_localization; - - $this->lang->loadLanguageFile( array( 'admin_applications' ) ); - } - - /** - * Get all the available hook ids in a function for a given type - * - * @access public - * @param string Skin Function - * @param string Hook type [foreach|if] - * @return array Settings for dropdown - */ - public function getHookIds( $template='', $type='' ) - { - if( !$template ) - { - return array(); - } - - $type = $type ? $type : 'foreach'; - - $return = array( array( 0, $this->lang->words['h_selectid'] ) ); - $seenids = array(); - $presort = array(); - - $this->DB->build( array( 'select' => 'template_content', 'from' => 'skin_templates', 'where' => "template_name='{$template}'" ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - /* Use regex to try to find the ids */ - - $matches = array(); - - if( $type == 'foreach' ) - { - preg_match_all( "#\#i", $r['template_content'], $matches ); - } - else - { - preg_match_all( "#\#i", $r['template_content'], $matches ); - } - - if( is_array($matches[1]) AND count($matches[1]) ) - { - foreach( $matches[1] as $match ) - { - $presort[ $match ] = array( $match, $match ); - } - } - } - - /* Put the ids in alphabetical order, kinda hacky, oh well ;) */ - ksort( $presort ); - foreach( $presort as $k => $v ) - { - $return[$k] = $v; - } - - return $return; - } - - /** - * Get all the available skin files - * - * @access public - * @return array Settings for dropdown - */ - public function getSkinGroups() - { - $return = array( array( 0, $this->lang->words['h_selectfile'] ) ); - - $this->DB->build( array( 'select' => $this->DB->buildDistinct( 'template_group' ), 'from' => 'skin_templates', 'order' => 'template_group ASC' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $return[] = array( $r['template_group'], $r['template_group'] ); - } - - return $return; - } - - /** - * Get all the available skin templates in a skin group - * - * @access public - * @param string Skin Group - * @return array Settings for dropdown - */ - public function getSkinMethods( $file='' ) - { - if( !$file ) - { - return array(); - } - - $return = array( array( 0, $this->lang->words['h_selecttemp'] ) ); - - $this->DB->build( array( 'select' => $this->DB->buildDistinct( 'template_name' ), 'from' => 'skin_templates', 'where' => "template_group='{$file}'", 'order' => 'template_name ASC' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $return[] = array( $r['template_name'], $r['template_name'] ); - } - - return $return; - } - - /** - * Retrieve setting groups for multiselect - * - * @access public - * @return array Settings for multiselect - */ - public function getSettingGroups() - { - $return = array(); - - $this->DB->build( array( 'select' => 'conf_title_id, conf_title_title', 'from' => 'core_sys_settings_titles', 'order' => 'conf_title_title ASC' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $return[] = array( $r['conf_title_id'], $r['conf_title_title'] ); - } - - return $return; - } - - /** - * Retrieve settings for multiselect - * - * @access public - * @return array Settings for multiselect - */ - public function getSettings() - { - $return = array(); - - $this->DB->build( array( 'select' => 'conf_id, conf_title', 'from' => 'core_sys_conf_settings', 'order' => 'conf_title ASC' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $return[] = array( $r['conf_id'], $r['conf_title'] ); - } - - return $return; - } - - /** - * Retrieve available modules for export - * - * @access public - * @return array Settings for multiselect - */ - public function getModules() - { - $return = array(); - - $this->DB->build( - array( - 'select' => 'm.sys_module_key, m.sys_module_title, m.sys_module_admin', - 'from' => array( 'core_sys_module' => 'm' ), - 'order' => 'a.app_title ASC, m.sys_module_title ASC', - 'add_join' => array( - array( - 'select' => 'a.app_title', - 'from' => array( 'core_applications' => 'a' ), - 'where' => 'a.app_directory=m.sys_module_application', - 'type' => 'left' - ) - ) - ) - ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $admin = $r['sys_module_admin'] ? $this->lang->words['hook_admin_module'] : $this->lang->words['hook_public_module']; - - $return[] = array( $r['sys_module_key'], $r['app_title'] . ':: ' . $r['sys_module_title'] . $admin ); - } - - return $return; - } - - /** - * Retrieve available Help Files for export - * - * @access public - * @return array Settings for multiselect - */ - public function getHelpFiles() - { - $return = array(); - - $this->DB->build( array( 'select' => 'id, title', 'from' => 'faq', 'order' => 'title ASC' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $return[] = array( $r['id'], $r['title'] ); - } - - return $return; - } - - /** - * Retrieve available tasks for export - * - * @access public - * @return array Settings for multiselect - */ - public function getTasks() - { - $return = array(); - - $this->DB->build( array( 'select' => 'task_id, task_title', 'from' => 'task_manager', 'order' => 'task_title ASC' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $return[] = array( $r['task_id'], $r['task_title'] ); - } - - return $return; - } - - /** - * Get all the available language files - * - * @access public - * @return array Settings for dropdown - */ - public function getLanguageFiles() - { - $return = array( array( 0, 'Select a File' ) ); - - $this->DB->build( array( 'select' => $this->DB->buildDistinct( 'word_pack' ), 'from' => 'core_sys_lang_words', 'order' => 'word_pack ASC' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $return[] = array( $r['word_pack'], $r['word_pack'] ); - } - - return $return; - } - - /** - * Get all the available language strings in a given file - * - * @access public - * @param string Language file - * @return array Settings for multiselect - */ - public function getStrings( $file='' ) - { - if( !$file ) - { - return array(); - } - - $return = array(); - - $this->DB->build( array( 'select' => $this->DB->buildDistinct( 'word_key' ), 'from' => 'core_sys_lang_words', 'where' => "word_pack='{$file}'", 'order' => 'word_key ASC' ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $return[] = array( $r['word_key'], $r['word_key'] ); - } - - return $return; - } -} - \ No newline at end of file + + * Invision Power Services + * IP.Board v3.1.4 + * Library of shared methods for hooks installation/configuration + * Last Updated: $LastChangedDate: 2010-10-14 13:15:13 -0400 (Thu, 14 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 6980 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class hooksFunctions +{ + /**#@+ + * Registry objects + * + * @var object + */ + protected $registry; + protected $DB; + protected $settings; + protected $request; + protected $lang; + protected $member; + protected $memberData; + protected $cache; + protected $caches; + /**#@-*/ + + /** + * Constructor + * + * @param object Registry object + * @return void + */ + public function __construct( ipsRegistry $registry ) + { + //----------------------------------------- + // 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->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + $this->lang = $this->registry->class_localization; + + $this->lang->loadLanguageFile( array( 'admin_applications' ) ); + } + + /** + * Get all the available hook ids in a function for a given type + * + * @param string Skin Function + * @param string Hook type [foreach|if] + * @return array Settings for dropdown + */ + public function getHookIds( $template='', $type='' ) + { + if( !$template ) + { + return array(); + } + + $type = $type ? $type : 'foreach'; + + $return = array( array( 0, $this->lang->words['h_selectid'] ) ); + $seenids = array(); + $presort = array(); + + $this->DB->build( array( 'select' => 'template_content', 'from' => 'skin_templates', 'where' => "template_set_id=0 AND template_master_key='root' AND template_name='{$template}'" ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + /* Use regex to try to find the ids */ + + $matches = array(); + + if( $type == 'foreach' ) + { + preg_match_all( "#\#i", $r['template_content'], $matches ); + } + else + { + preg_match_all( "#\#i", $r['template_content'], $matches ); + } + + if( is_array($matches[1]) AND count($matches[1]) ) + { + foreach( $matches[1] as $match ) + { + $presort[ $match ] = array( $match, $match ); + } + } + } + + /* Put the ids in alphabetical order, kinda hacky, oh well ;) */ + ksort( $presort ); + foreach( $presort as $k => $v ) + { + $return[$k] = $v; + } + + return $return; + } + + /** + * Get all the available skin files + * + * @return array Settings for dropdown + */ + public function getSkinGroups() + { + $return = array( array( 0, $this->lang->words['h_selectfile'] ) ); + + $this->DB->build( array( 'select' => $this->DB->buildDistinct( 'template_group' ), 'from' => 'skin_templates', 'order' => 'template_group ASC' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $return[] = array( $r['template_group'], $r['template_group'] ); + } + + return $return; + } + + /** + * Get all the available skin templates in a skin group + * + * @param string Skin Group + * @return array Settings for dropdown + */ + public function getSkinMethods( $file='' ) + { + if( !$file ) + { + return array(); + } + + $return = array( array( 0, $this->lang->words['h_selecttemp'] ) ); + + $this->DB->build( array( 'select' => $this->DB->buildDistinct( 'template_name' ), 'from' => 'skin_templates', 'where' => "template_group='{$file}'", 'order' => 'template_name ASC' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $return[] = array( $r['template_name'], $r['template_name'] ); + } + + return $return; + } + + /** + * Retrieve css files for multiselect + * + * @return array Settings for multiselect + */ + public function getCSSFiles() + { + /* Query CSS Files */ + $this->DB->build( array( 'select' => '*', 'from' => 'skin_css', 'order' => 'css_set_id ASC' ) ); + $this->DB->execute(); + + /* Loop through CSS Files and add to array */ + $cssFiles = array(); + + while( $r = $this->DB->fetch() ) + { + $cssFiles[] = array( $r['css_id'], $r['css_set_id'] . ': ' . $r['css_group'] ); + } + + return $cssFiles; + } + + /** + * Retrieve setting groups for multiselect + * + * @return array Settings for multiselect + */ + public function getSettingGroups() + { + $return = array(); + + $this->DB->build( array( 'select' => 'conf_title_id, conf_title_title', 'from' => 'core_sys_settings_titles', 'order' => 'conf_title_title ASC' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $return[] = array( $r['conf_title_id'], $r['conf_title_title'] ); + } + + return $return; + } + + /** + * Retrieve settings for multiselect + * + * @return array Settings for multiselect + */ + public function getSettings() + { + $return = array(); + + $this->DB->build( array( 'select' => 'conf_id, conf_title', 'from' => 'core_sys_conf_settings', 'order' => 'conf_title ASC' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $return[] = array( $r['conf_id'], $r['conf_title'] ); + } + + return $return; + } + + /** + * Retrieve available modules for export + * + * @return array Settings for multiselect + */ + public function getModules() + { + $return = array(); + + $this->DB->build( + array( + 'select' => 'm.sys_module_application, m.sys_module_key, m.sys_module_title, m.sys_module_admin', + 'from' => array( 'core_sys_module' => 'm' ), + 'order' => 'a.app_title ASC, m.sys_module_title ASC', + 'add_join' => array( + array( + 'select' => 'a.app_title', + 'from' => array( 'core_applications' => 'a' ), + 'where' => 'a.app_directory=m.sys_module_application', + 'type' => 'left' + ) + ) + ) + ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $admin = $r['sys_module_admin'] ? $this->lang->words['hook_admin_module'] : $this->lang->words['hook_public_module']; + $prefix = $r['sys_module_admin'] ? mb_strtolower( $this->lang->words['a_admin'] ) : mb_strtolower( $this->lang->words['a_public'] ); + + $return[] = array( $prefix.'-'.$r['sys_module_application'].'-'.$r['sys_module_key'], $r['app_title'] . ':: ' . $r['sys_module_title'] . $admin ); + } + + return $return; + } + + /** + * Retrieve available Help Files for export + * + * @return array Settings for multiselect + */ + public function getHelpFiles() + { + $return = array(); + + $this->DB->build( array( 'select' => 'id, title', 'from' => 'faq', 'order' => 'title ASC' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $return[] = array( $r['id'], $r['title'] ); + } + + return $return; + } + + /** + * Retrieve available tasks for export + * + * @return array Settings for multiselect + */ + public function getTasks() + { + $return = array(); + + $this->DB->build( array( 'select' => 'task_id, task_title', 'from' => 'task_manager', 'order' => 'task_title ASC' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $return[] = array( $r['task_id'], $r['task_title'] ); + } + + return $return; + } + + /** + * Get all the available language files + * + * @return array Settings for dropdown + */ + public function getLanguageFiles() + { + $return = array( array( 0, $this->lang->words['selectafile'] ) ); + + $this->DB->build( array( 'select' => 'word_app, word_pack', 'from' => 'core_sys_lang_words', 'group' => 'word_app, word_pack', 'order' => 'word_app, word_pack' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $return[] = array( $r['word_app'].'_'.$r['word_pack'], $r['word_app'].'_'.$r['word_pack'] ); + } + + return $return; + } + + /** + * Get all the available language strings in a given file + * + * @param string Language file + * @return array Settings for multiselect + */ + public function getStrings( $file='' ) + { + if( !$file ) + { + return array(); + } + + $bits = explode( '_', $file ); + $app = $bits[0]; + $pack = str_replace( $app.'_', '', $file ); + + $return = array(); + + $this->DB->build( array( 'select' => $this->DB->buildDistinct( 'word_key' ), 'from' => 'core_sys_lang_words', 'where' => "word_app='{$app}' AND word_pack='{$pack}'", 'order' => 'word_key ASC' ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $return[] = array( $r['word_key'], $r['word_key'] ); + } + + return $return; + } +} \ No newline at end of file diff --git a/upload/admin/applications/core/sources/classes/index.html b/upload/admin/applications/core/sources/classes/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/sources/classes/index.html +++ b/upload/admin/applications/core/sources/classes/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/sources/classes/reportLibrary.php b/upload/admin/applications/core/sources/classes/reportLibrary.php index 12edc3f0..885a43ee 100644 --- a/upload/admin/applications/core/sources/classes/reportLibrary.php +++ b/upload/admin/applications/core/sources/classes/reportLibrary.php @@ -1,431 +1,426 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class reportLibrary -{ - /**#@+ - * Registry objects - * - * @access protected - * @var object - */ - protected $registry; - protected $DB; - protected $settings; - protected $request; - protected $lang; - protected $member; - protected $cache; - /**#@-*/ - - /** - * Group Ids - * - * @access protected - * @var array - */ - protected $member_group_ids; - - /** - * Array of plugin objects - * - * @access public - * @var array - */ - public $plugins; - - /** - * Status for new reports - * - * @access public - * @var integer - */ - public $report_is_new = 0; - - /** - * Status for complete reports - * - * @access public - * @var integer - */ - public $report_is_complete = 0; - - /** - * Cache of status/flag images - * - * @access public - * @var array - */ - public $flag_cache = array(); - - /** - * Cache of HTML status dropdown - * - * @access public - * @var string - */ - public $flag_body = ''; - - /** - * Constructor - * - * @access public - * @param object Registry object - * @return void - */ - public function __construct( ipsRegistry $registry ) - { - //----------------------------------------- - // 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->cache = $this->registry->cache(); - $this->caches =& $this->registry->cache()->fetchCaches(); - - $this->member_group_ids = array( $this->memberData['member_group_id'] ); - $this->member_group_ids = array_diff( array_merge( $this->member_group_ids, explode( ',', $this->memberData['mgroup_others'] ) ), array('') ); - } - - /** - * Rebuild the member cache array if it is outdated - * - * @access public - * @return integer New 'total reports' count - */ - public function rebuildMemberCacheArray() - { - $this->DB->loadCacheFile( IPSLib::getAppDir('core') . '/sql/' . ips_DBRegistry::getDriverType() . '_report_queries.php', 'report_sql_queries' ); - - $class_perm = $this->buildQueryPermissions(); - - $total = $this->DB->buildAndFetch( array( - 'select' => 'COUNT(*) as reports', - 'from' => array( 'rc_reports_index' => 'rep' ), - 'where' => $class_perm . " AND stat.is_active=1", - 'add_join' => array( - array( - 'from' => array( 'rc_classes' => 'rcl' ), - 'where' => 'rcl.com_id=rep.rc_class' - ), - array( - 'from' => array( 'rc_status' => 'stat' ), - 'where' => 'stat.status=rep.status' - ), - ) - ) ); - - $reports_by_plugin = array(); - - $this->DB->build( array( - 'select' => 'rep.id, rep.title, rep.num_reports, rep.exdat1, rep.exdat2, rep.exdat3', - 'from' => array( 'rc_reports_index' => 'rep' ), - 'where' => $class_perm . " AND (stat.is_active=1 OR stat.is_new=1) AND rcl.onoff=1", - 'order' => 'stat.is_new ASC', - 'add_join' => array( - array( - 'select' => 'stat.is_active, stat.is_new', - 'from' => array( 'rc_status' => 'stat' ), - 'where' => 'stat.status=rep.status' - ), - array( - 'select' => 'rcl.com_id, rcl.com_id, rcl.my_class, rcl.extra_data', - 'from' => array( 'rc_classes' => 'rcl' ), - 'where' => 'rcl.com_id=rep.rc_class' - ), - - ) - ) ); - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - if( $row['my_class'] != '' ) - { - $reports_by_plugin[ $row['my_class'] ][] = $row; - } - } - - $build_member_cache_array['report_temp'] = array(); - - foreach( $reports_by_plugin as $plugin_name => $reports_array ) - { - $this->loadPlugin( $plugin_name ); - $this->plugins[ $plugin_name ]->updateReportsTimestamp( $reports_array, $build_member_cache_array ); - } - - $build_member_cache_array['report_last_updated'] = time(); - $build_member_cache_array['report_num'] = $total['reports']; - - if( count($build_member_cache_array) > 0 ) - { - IPSMember::packMemberCache( $this->memberData['member_id'], $build_member_cache_array ); - } - - return $total['reports']; - } - - /** - * Builds permissions for several sql queries for various functions - * - * @access public - * @param string based on mods or users - * @return string - */ - public function buildQueryPermissions( $check='mod' ) - { - //----------------------------------------- - // Are we checking user or mod permissions? - //----------------------------------------- - - if( $check == 'mod' ) - { - $col = 'mod_group_perm'; - } - else - { - $col = 'group_can_report'; - } - - //----------------------------------------- - // Get components we have access to... - //----------------------------------------- - - $this->DB->buildFromCache( 'get_class_permissions', array( 'COL' => $col, 'GROUP_IDS' => $this->member_group_ids ), 'report_sql_queries' ); - $res = $this->DB->execute(); - - while( $row = $this->DB->fetch( $res ) ) - { - if( $row['my_class'] != '' ) - { - $spec_perm = ''; - - $this->loadPlugin( $row['my_class'] ); - - if( $row['extra_data'] && $row['extra_data'] != 'N;' ) - { - $this->plugins[ $row['my_class'] ]->_extra = unserialize( $row['extra_data'] ); - } - else - { - $this->plugins[ $row['my_class'] ]->_extra = array(); - } - - if( $this->plugins[ $row['my_class'] ]->getReportPermissions( $check, $row, $this->member_group_ids, $spec_perm ) ) - { - $cids[ $row['com_id'] ] = $spec_perm; - } - } - } - - return $this->DB->fetchLoadedClass('report_sql_queries')->join_com_permissions( array( 'NOTCACHE' => 1, 'COMS' => $cids ) ); - } - - /** - * Loads plugins into $this->plugins object for later use - * - * @access public - * @param string plugin name (>name<.php) - * @return void - */ - public function loadPlugin( $plugin_name ) - { - if( ! $this->plugins[ $plugin_name ] ) - { - require_once( IPSLib::getAppDir('core') . '/sources/reportPlugins/' . $plugin_name . '.php' ); - $class_name = $plugin_name . '_plugin'; - - $this->plugins[ $plugin_name ] = new $class_name( $this->registry ); - } - } - - /** - * Process a URL - * - * @access public - * @param string URL - * @param string FURL Title - * @param string FURL Template - * @return string Full URL if existing URL was short - */ - public function processUrl( $url, $friendlyTitle='', $friendlyTemplate='' ) - { - if( $url && ! preg_match( "/(http|https)\:\/\//", $url ) ) - { - $returnUrl = str_replace( '/index.php?', '', $url ); - $returnUrl = $this->registry->output->buildSEOUrl( $returnUrl, 'public', $friendlyTitle, $friendlyTemplate ); - - return $returnUrl; - } - else - { - return $url; - } - } - - /** - * Fixes the member's RSS Key if none set - * - * @access public - * @return void - */ - public function checkMemberRSSKey() - { - if( ! $this->memberData['_cache']['rc_rss_key'] ) - { - $new_rss_key = md5( uniqid( microtime(), true ) ); - - $this->DB->build( array( 'select' => '*', 'from' => 'rc_modpref', 'where' => "mem_id=" . $this->memberData['member_id'] ) ); - $this->DB->execute(); - - if( $this->DB->getTotalRows() == 1 ) - { - $this->DB->update( 'rc_modpref', array( 'rss_key' => $new_rss_key ), "mem_id=" . $this->memberData['member_id'] ); - } - else - { - $this->DB->insert( 'rc_modpref', array( 'rss_key' => $new_rss_key, 'mem_id' => $this->memberData['member_id'], 'rss_cache' => '' ) ); - } - - $memberCache = $this->memberData['_cache']; - $memberCache['rc_rss_key'] = $new_rss_key; - $this->member->setProperty( '_cache', $memberCache ); - - IPSMember::packMemberCache( $this->memberData['member_id'], array( 'rc_rss_key' => $new_rss_key ) ); - } - } - - /** - * Generates report form HTML - * - * @access public - * @param string Title - What is being reported - * @param string URL - what the user can click on (title) - * @param array Extra data passed on to the form for processing - * @return string - */ - public function showReportForm( $name, $url, $ex_data=array() ) - { - $extra_input = ''; - - if( is_array( $ex_data ) && count( $ex_data ) > 0 ) - { - foreach( $ex_data as $bname => $value ) - { - $extra_input .= ""; - } - } - - return $this->registry->getClass('output')->getTemplate('reports')->basicReportForm( $name, $url, $extra_input ); - } - - /** - * Updates global 'cache time' which forces 'mod caches' to re-cache - * - * @access public - * @return void - */ - public function updateCacheTime() - { - $cache = $this->cache->getCache('report_cache'); - $cache['last_updated'] = time(); - - $this->cache->setCache( 'report_cache', $cache, array( 'array' => 1, 'donow' => 1 ) ); - } - - /** - * Builds the status information (and maybe drop down html) - * - * @access public - * @param boolean Do we need the drop down? - * @return string HTML body - */ - public function buildStatuses( $ignore_html = false ) - { - if( !$this->flag_cache ) - { - $stat_set = array(); - $this->body = ''; - - $this->DB->build( array( - 'select' => 'stat.status, stat.title, stat.is_new, stat.is_complete', - 'from' => array( 'rc_status' => 'stat' ), - 'order' => 'stat.rorder ASC, star.points ASC', - 'add_join' => array( - array( - 'select' => 'star.img, star.width, star.height, star.points, star.is_png', - 'from' => array( 'rc_status_sev' => 'star' ), - 'where' => 'stat.status=star.status' - ) - ) - ) ); - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - if( ! $stat_set[ $row['status'] ] ) - { - $this->body .= ""; - - if( $row['is_new'] == 1 ) - { - $this->report_is_new = $row['status']; - } - elseif( $row['is_complete'] == 1 ) - { - $this->report_is_complete = $row['status']; - } - } - - $stat_set[ $row['status'] ] = true; - - $this->flag_cache[ $row['status'] ][ $row['points'] ] = array( - 'img' => $row['img'], - 'width' => $row['width'], - 'height' => $row['height'], - 'is_png' => $row['is_png'], - 'title' => $row['title'], - ); - - if( $row['points'] == 0 ) - { - $this->flag_cache[ $row['status'] ][ NULL ] = array( - 'img' => $row['img'], - 'width' => $row['width'], - 'height' => $row['height'], - 'is_png' => $row['is_png'], - 'title' => $row['title'], - ); - } - } - } - - return $ignore_html ? '' : $this->body; - } + + * Invision Power Services + * IP.Board v3.1.4 + * Library for reported content + * Last Updated: $LastChangedDate: 2010-10-19 11:56:25 -0400 (Tue, 19 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @author Based on original "Report Center" by Luke Scott + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 6997 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class reportLibrary +{ + /**#@+ + * Registry objects + * + * @var object + */ + protected $registry; + protected $DB; + protected $settings; + protected $request; + protected $lang; + protected $member; + protected $cache; + /**#@-*/ + + /** + * Group Ids + * + * @var array + */ + protected $member_group_ids; + + /** + * Array of plugin objects + * + * @var array + */ + public $plugins; + + /** + * Status for new reports + * + * @var integer + */ + public $report_is_new = 0; + + /** + * Status for complete reports + * + * @var integer + */ + public $report_is_complete = 0; + + /** + * Cache of status/flag images + * + * @var array + */ + public $flag_cache = array(); + + /** + * Cache of HTML status dropdown + * + * @var string + */ + public $flag_body = ''; + + /** + * Constructor + * + * @param object Registry object + * @return void + */ + public function __construct( ipsRegistry $registry ) + { + //----------------------------------------- + // 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->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + + $this->member_group_ids = array( $this->memberData['member_group_id'] ); + $this->member_group_ids = array_diff( array_merge( $this->member_group_ids, explode( ',', $this->memberData['mgroup_others'] ) ), array('') ); + } + + /** + * Rebuild the member cache array if it is outdated + * + * @return integer New 'total reports' count + */ + public function rebuildMemberCacheArray() + { + $this->DB->loadCacheFile( IPSLib::getAppDir('core') . '/sql/' . ips_DBRegistry::getDriverType() . '_report_queries.php', 'report_sql_queries' ); + + $class_perm = $this->buildQueryPermissions(); + + $total = $this->DB->buildAndFetch( array( + 'select' => 'COUNT(*) as reports', + 'from' => array( 'rc_reports_index' => 'rep' ), + 'where' => $class_perm . " AND stat.is_active=1", + 'add_join' => array( + array( + 'from' => array( 'rc_classes' => 'rcl' ), + 'where' => 'rcl.com_id=rep.rc_class' + ), + array( + 'from' => array( 'rc_status' => 'stat' ), + 'where' => 'stat.status=rep.status' + ), + ) + ) ); + + $reports_by_plugin = array(); + + $this->DB->build( array( + 'select' => 'rep.id, rep.title, rep.num_reports, rep.exdat1, rep.exdat2, rep.exdat3', + 'from' => array( 'rc_reports_index' => 'rep' ), + 'where' => $class_perm . " AND (stat.is_active=1 OR stat.is_new=1) AND rcl.onoff=1", + 'order' => 'stat.is_new ASC', + 'add_join' => array( + array( + 'select' => 'stat.is_active, stat.is_new', + 'from' => array( 'rc_status' => 'stat' ), + 'where' => 'stat.status=rep.status' + ), + array( + 'select' => 'rcl.com_id, rcl.com_id, rcl.my_class, rcl.extra_data', + 'from' => array( 'rc_classes' => 'rcl' ), + 'where' => 'rcl.com_id=rep.rc_class' + ), + + ) + ) ); + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + if( $row['my_class'] != '' ) + { + $reports_by_plugin[ $row['app'] ][ $row['my_class'] ][] = $row; + } + } + + $build_member_cache_array['report_temp'] = array(); + + foreach( $reports_by_plugin as $app => $plugins ) + { + foreach( $plugins as $plugin_name => $reports_array ) + { + $this->loadPlugin( $plugin_name, $app ); + $this->plugins[ $plugin_name ]->updateReportsTimestamp( $reports_array, $build_member_cache_array ); + } + } + + $build_member_cache_array['report_last_updated'] = time(); + $build_member_cache_array['report_num'] = $total['reports']; + + if( count($build_member_cache_array) > 0 ) + { + IPSMember::packMemberCache( $this->memberData['member_id'], $build_member_cache_array ); + } + + return $total['reports']; + } + + /** + * Builds permissions for several sql queries for various functions + * + * @param string based on mods or users + * @return string + */ + public function buildQueryPermissions( $check='mod' ) + { + //----------------------------------------- + // Are we checking user or mod permissions? + //----------------------------------------- + + if( $check == 'mod' ) + { + $col = 'mod_group_perm'; + } + else + { + $col = 'group_can_report'; + } + + //----------------------------------------- + // Get components we have access to... + //----------------------------------------- + + $this->DB->buildFromCache( 'get_class_permissions', array( 'COL' => $col, 'GROUP_IDS' => $this->member_group_ids ), 'report_sql_queries' ); + $res = $this->DB->execute(); + + while( $row = $this->DB->fetch( $res ) ) + { + if( $row['my_class'] != '' ) + { + $spec_perm = ''; + + $this->loadPlugin( $row['my_class'], $row['app'] ); + + if( !$this->plugins[ $row['my_class'] ] ) + { + continue; + } + + if( $row['extra_data'] && $row['extra_data'] != 'N;' ) + { + $this->plugins[ $row['my_class'] ]->_extra = unserialize( $row['extra_data'] ); + } + else + { + $this->plugins[ $row['my_class'] ]->_extra = array(); + } + + if( $this->plugins[ $row['my_class'] ]->getReportPermissions( $check, $row, $this->member_group_ids, $spec_perm ) ) + { + $cids[ $row['com_id'] ] = $spec_perm; + } + } + } + + return $this->DB->fetchLoadedClass('report_sql_queries')->join_com_permissions( array( 'NOTCACHE' => 1, 'COMS' => $cids ) ); + } + + /** + * Loads plugins into $this->plugins object for later use + * + * @param string plugin name (>name<.php) + * @return void + */ + public function loadPlugin( $plugin_name, $app ) + { + if( ! $this->plugins[ $plugin_name ] ) + { + if( file_exists( IPSLib::getAppDir( $app ) . '/extensions/reportPlugins/' . $plugin_name . '.php' ) ) + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $app ) . '/extensions/reportPlugins/' . $plugin_name . '.php', $plugin_name . '_plugin', $app ); + + $this->plugins[ $plugin_name ] = new $classToLoad( $this->registry ); + } + } + } + + /** + * Process a URL + * + * @param string URL + * @param string FURL Title + * @param string FURL Template + * @return string Full URL if existing URL was short + */ + public function processUrl( $url, $friendlyTitle='', $friendlyTemplate='' ) + { + if( $url && ! preg_match( "/(http|https)\:\/\//", $url ) ) + { + $returnUrl = str_replace( '/index.php?', '', $url ); + $returnUrl = $this->registry->output->buildSEOUrl( $returnUrl, 'public', $friendlyTitle, $friendlyTemplate ); + + return $returnUrl; + } + else + { + return $url; + } + } + + /** + * Fixes the member's RSS Key if none set + * + * @return void + */ + public function checkMemberRSSKey() + { + if( ! $this->memberData['_cache']['rc_rss_key'] ) + { + $new_rss_key = md5( uniqid( microtime(), true ) ); + + $this->DB->build( array( 'select' => '*', 'from' => 'rc_modpref', 'where' => "mem_id=" . $this->memberData['member_id'] ) ); + $this->DB->execute(); + + if( $this->DB->getTotalRows() == 1 ) + { + $this->DB->update( 'rc_modpref', array( 'rss_key' => $new_rss_key ), "mem_id=" . $this->memberData['member_id'] ); + } + else + { + $this->DB->insert( 'rc_modpref', array( 'rss_key' => $new_rss_key, 'mem_id' => $this->memberData['member_id'], 'rss_cache' => '' ) ); + } + + $memberCache = $this->memberData['_cache']; + $memberCache['rc_rss_key'] = $new_rss_key; + $this->member->setProperty( '_cache', $memberCache ); + + IPSMember::packMemberCache( $this->memberData['member_id'], array( 'rc_rss_key' => $new_rss_key ) ); + } + } + + /** + * Generates report form HTML + * + * @param string Title - What is being reported + * @param string URL - what the user can click on (title) + * @param array Extra data passed on to the form for processing + * @return string + */ + public function showReportForm( $name, $url, $ex_data=array() ) + { + $extra_input = ''; + + if( is_array( $ex_data ) && count( $ex_data ) > 0 ) + { + foreach( $ex_data as $bname => $value ) + { + $extra_input .= ""; + } + } + + return $this->registry->getClass('output')->getTemplate('reports')->basicReportForm( $name, $url, $extra_input ); + } + + /** + * Updates global 'cache time' which forces 'mod caches' to re-cache + * + * @return void + */ + public function updateCacheTime() + { + $cache = $this->cache->getCache('report_cache'); + $cache['last_updated'] = time(); + + $this->cache->setCache( 'report_cache', $cache, array( 'array' => 1, 'donow' => 1 ) ); + } + + /** + * Builds the status information (and maybe drop down html) + * + * @param boolean Do we need the drop down? + * @return string HTML body + */ + public function buildStatuses( $ignore_html = false ) + { + if( !$this->flag_cache ) + { + $stat_set = array(); + $this->body = ''; + + $this->DB->build( array( + 'select' => 'stat.status, stat.title, stat.is_new, stat.is_complete', + 'from' => array( 'rc_status' => 'stat' ), + 'order' => 'stat.rorder ASC, star.points ASC', + 'add_join' => array( + array( + 'select' => 'star.img, star.width, star.height, star.points, star.is_png', + 'from' => array( 'rc_status_sev' => 'star' ), + 'where' => 'stat.status=star.status' + ) + ) + ) ); + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + if( ! $stat_set[ $row['status'] ] ) + { + $this->body .= ""; + + if( $row['is_new'] == 1 ) + { + $this->report_is_new = $row['status']; + } + elseif( $row['is_complete'] == 1 ) + { + $this->report_is_complete = $row['status']; + } + } + + $stat_set[ $row['status'] ] = true; + + $this->flag_cache[ $row['status'] ][ $row['points'] ] = array( + 'img' => $row['img'], + 'width' => $row['width'], + 'height' => $row['height'], + 'is_png' => $row['is_png'], + 'title' => $row['title'], + ); + + if( $row['points'] == 0 ) + { + $this->flag_cache[ $row['status'] ][ NULL ] = array( + 'img' => $row['img'], + 'width' => $row['width'], + 'height' => $row['height'], + 'is_png' => $row['is_png'], + 'title' => $row['title'], + ); + } + } + } + + return $ignore_html ? '' : $this->body; + } } \ No newline at end of file diff --git a/upload/admin/applications/core/sources/classes/reportNotifications.php b/upload/admin/applications/core/sources/classes/reportNotifications.php index 5d8d45f8..bb2b3071 100644 --- a/upload/admin/applications/core/sources/classes/reportNotifications.php +++ b/upload/admin/applications/core/sources/classes/reportNotifications.php @@ -1,370 +1,323 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class reportNotifications -{ - /**#@+ - * Registry objects - * - * @access protected - * @var object - */ - protected $registry; - protected $DB; - protected $settings; - protected $request; - protected $lang; - protected $member; - protected $cache; - /**#@-*/ - - /** - * Messenger object - * - * @access protected - * @var object - */ - protected $messenger; - - /** - * Data for the members - * - * @access public - * @var array - */ - public $my_data; - - /** - * Data for the reported content - * - * @access public - * @var array - */ - public $my_report_data; - - /** - * Constructor - * - * @access public - * @param object Registry object - * @return void - */ - public function __construct( ipsRegistry $registry ) - { - //----------------------------------------- - // 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->cache = $this->registry->cache(); - $this->caches =& $this->registry->cache()->fetchCaches(); - $this->lang = $this->registry->getClass('class_localization'); - - require_once( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php' ); - $this->messenger = new messengerFunctions( $this->registry ); - } - - /** - * Initialize library - * - * @access public - * @param array Member data - * @param array Reported content - * @return void - */ - public function initNotify( $data, $report_data ) - { - $this->my_data = $data; - $this->my_report_data = $report_data; - } - - /** - * Send the notifications - * - * @access public - * @return void - */ - public function sendNotifications() - { - if( $this->my_data['PM'] && $this->settings['report_pm_enabled'] == 1 ) - { - $this->_sendPMNotifications( $this->my_data['PM'], $this->my_report_data ); - } - - if( $this->my_data['EMAIL'] && $this->settings['report_nemail_enabled'] == 1 ) - { - $this->_sendEmailNotifications( $this->my_data['EMAIL'], $this->my_report_data ); - } - - $this->_buildRSSFeed( $this->my_data['RSS'], $this->my_report_data ); - } - - /** - * Send the PM Notifications - * - * @access private - * @return void - */ - private function _sendPMNotifications( $data, $report_data ) - { - foreach( $data as $user ) - { - IPSText::getTextClass( 'email' )->getTemplate("report_emailpm"); - - IPSText::getTextClass( 'email' )->buildMessage( array( - 'MOD_NAME' => $user['name'], - 'USERNAME' => $this->memberData['members_display_name'], - 'LINK' => $this->registry->getClass('reportLibrary')->processUrl( $report_data['SAVED_URL'], $report_data['SEOTITLE'], $report_data['TEMPLATE'] ), - 'REPORTLINK'=> $this->settings['base_url'] . 'app=core&module=reports&do=show_report&rid=' . $report_data['REPORT_INDEX'], - 'REPORT' => $report_data['REPORT'], - ) - ); - - try - { - $this->messenger = new messengerFunctions( $this->registry ); - $this->messenger->sendNewPersonalTopic( $user['member_id'], - $this->memberData['member_id'], - array(), - $this->lang->words['subject_report'] . ' ' . $this->memberData['members_display_name'], - IPSText::getTextClass( 'editor' )->method == 'rte' ? nl2br(IPSText::getTextClass( 'email' )->message) : IPSText::getTextClass( 'email' )->message, - array( 'origMsgID' => 0, - 'fromMsgID' => 0, - 'postKey' => md5(microtime()), - 'trackMsg' => 0, - 'addToSentFolder' => 0, - 'hideCCUser' => 0, - 'forcePm' => 1, - 'isSystem' => TRUE - ) - ); - } - catch( Exception $error ) - { - $msg = $error->getMessage(); - - if( $msg != 'CANT_SEND_TO_SELF' ) - { - $toMember = IPSMember::load( $user['member_id'], 'core' ); - - if ( strstr( $msg, 'BBCODE_' ) ) - { - $msg = str_replace( 'BBCODE_', '', $msg ); - - $this->registry->output->showError( $msg, 10149 ); - } - else if ( isset($this->lang->words[ 'err_' . $msg ]) ) - { - $this->lang->words[ 'err_' . $msg ] = $this->lang->words[ 'err_' . $msg ]; - $this->lang->words[ 'err_' . $msg ] = str_replace( '#NAMES#' , implode( ",", $this->messenger->exceptionData ), $this->lang->words[ 'err_' . $msg ] ); - $this->lang->words[ 'err_' . $msg ] = str_replace( '#TONAME#' , $toMember['members_display_name'] , $this->lang->words[ 'err_' . $msg ] ); - $this->lang->words[ 'err_' . $msg ] = str_replace( '#FROMNAME#', $this->memberData['members_display_name'], $this->lang->words[ 'err_' . $msg ] ); - - $this->registry->output->showError( 'err_' . $msg, 10150 ); - } - else - { - $_msgString = $this->lang->words['err_UNKNOWN'] . ' ' . $msg; - - $this->registry->output->showError( 'err_UNKNOWN', 10151 ); - } - } - } - } - } - - /** - * Send the PM Notifications - * - * @access private - * @return void - */ - private function _sendEmailNotifications( $data, $report_data ) - { - foreach( $data as $user ) - { - IPSText::getTextClass( 'email' )->getTemplate( "report_emailpm", $user['language'] ); - - IPSText::getTextClass( 'email' )->buildMessage( array( - 'MOD_NAME' => $user['name'], - 'USERNAME' => $this->memberData['members_display_name'], - 'LINK' => $this->registry->getClass('reportLibrary')->processUrl($report_data['SAVED_URL'], $report_data['SEOTITLE'], $report_data['TEMPLATE'] ), - 'REPORTLINK'=> $this->settings['base_url'] . 'app=core&module=reports&do=show_report&rid=' . $report_data['REPORT_INDEX'], - 'REPORT' => $report_data['REPORT'], - ) - ); - - IPSText::getTextClass( 'email' )->subject = $this->lang->words['subject_report'] . ' ' . $this->memberData['members_display_name']; - IPSText::getTextClass( 'email' )->to = $user['email']; - - IPSText::getTextClass( 'email' )->sendMail(); - } - } - - /** - * Build a private RSS feed for the member to monitor reports - * - * @access private - * @return void - */ - private function _buildRSSFeed( $data=array(), $report_data ) - { - $ids = array(); - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_reports' ), 'core' ); - - if( is_array($data) AND count($data) ) - { - foreach( $data as $user ) - { - $ids[] = $user['member_id']; - } - } - - if( count( $ids ) == 0 ) - { - return; - } - - require_once( IPS_KERNEL_PATH . 'classRss.php' ); - - $status = array(); - - $this->DB->build( array( 'select' => 'status, is_new, is_complete', - 'from' => 'rc_status', - 'where' => "is_new=1 OR is_complete=1", - ) ); - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - if( $row['is_new'] == 1 ) - { - $status['new'] = $row['status']; - } - elseif( $row['is_complete'] == 1 ) - { - $status['complete'] = $row['status']; - } - } - - //----------------------------------------- - // Now, we loop over each of the member ids - //----------------------------------------- - - foreach( $ids as $id ) - { - //----------------------------------------- - // Clear out for new RSS doc and add channel - //----------------------------------------- - - $rss = new classRss(); - $channel_id = $rss->createNewChannel( array( 'title' => $this->lang->words['rss_feed_title'], - 'link' => $this->settings['board_url'], - 'description' => $this->lang->words['reports_rss_desc'], - 'pubDate' => $rss->formatDate( time() ) - ) ); - - //----------------------------------------- - // Now we need to find all open reports for - // this member - //----------------------------------------- - - $this->DB->build( array( - 'select' => 'i.*', - 'from' => array( 'rc_reports_index' => 'i' ), - 'where' => 's.is_active=1', - 'add_join' => array( - array( - 'from' => array( 'rc_status' => 's' ), - 'where' => 's.status=i.status', - 'type' => 'left', - ), - array( - 'select' => 'c.my_class, c.mod_group_perm', - 'from' => array( 'rc_classes' => 'c' ), - 'where' => 'c.com_id=i.rc_class', - 'type' => 'left', - ), - ) - ) ); - $outer = $this->DB->execute(); - - while( $r = $this->DB->fetch($outer) ) - { - //----------------------------------------- - // Fix stuff....this is hackish :( - //----------------------------------------- - - if( $r['my_class'] == 'post' ) - { - $r['FORUM_ID'] = $r['exdat1']; - } - - //----------------------------------------- - // Found all open reports, can we access? - //----------------------------------------- - - require_once( IPSLib::getAppdir('core') . '/sources/reportPlugins/' . $r['my_class'] . '.php' ); - $class = $r['my_class'] . '_plugin'; - $object = new $class( $this->registry ); - - $notify = $object->getNotificationList( IPSText::cleanPermString( $r['mod_group_perm'] ), $r ); - $pass = false; - - if( is_array($notify['RSS']) AND count($notify['RSS']) ) - { - foreach( $notify['RSS'] as $memberAccount ) - { - if( $memberAccount['mem_id'] == $id ) - { - $pass = true; - break; - } - } - } - - if( $pass ) - { - $url = $this->registry->getClass('reportLibrary')->processUrl( str_replace( '&', '&', $r['url'] ) ); - - $rss->addItemToChannel( $channel_id, array( 'title' => $url, - 'link' => $url, - 'description' => $r['title'], - 'content' => $r['title'], - 'pubDate' => $rss->formatDate( $r['date_updated'] ) - ) ); - } - } - - $rss->createRssDocument(); - - $this->DB->update( 'rc_modpref', array( 'rss_cache' => $rss->rss_document ), "mem_id=" . $id ); - } - } + + * Invision Power Services + * IP.Board v3.1.4 + * Notifications class for reported content + * Last Updated: $LastChangedDate: 2010-10-19 11:56:25 -0400 (Tue, 19 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @author Based on original "Report Center" by Luke Scott + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 6997 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class reportNotifications +{ + /**#@+ + * Registry objects + * + * @var object + */ + protected $registry; + protected $DB; + protected $settings; + protected $request; + protected $lang; + protected $member; + protected $cache; + /**#@-*/ + + /** + * Messenger object + * + * @var object + */ + protected $messenger; + + /** + * Data for the members + * + * @var array + */ + public $my_data; + + /** + * Data for the reported content + * + * @var array + */ + public $my_report_data; + + /** + * Constructor + * + * @param object Registry object + * @return void + */ + public function __construct( ipsRegistry $registry ) + { + //----------------------------------------- + // 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->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + $this->lang = $this->registry->getClass('class_localization'); + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php', 'messengerFunctions', 'members' ); + $this->messenger = new $classToLoad( $this->registry ); + } + + /** + * Initialize library + * + * @param array Member data + * @param array Reported content + * @return void + */ + public function initNotify( $data, $report_data ) + { + $this->my_data = $data; + $this->my_report_data = $report_data; + } + + /** + * Send the notifications + * + * @return void + */ + public function sendNotifications() + { + //----------------------------------------- + // Notifications library + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' ); + $notifyLibrary = new $classToLoad( $this->registry ); + + $_memberIds = array(); + + foreach( $this->my_data as $_data ) + { + $_memberIds[] = $_data['member_id']; + } + + $_memberData = IPSMember::load( $_memberIds ); + + foreach( $this->my_data as $user ) + { + //----------------------------------------- + // Don't send notification to self + //----------------------------------------- + + if( $user['member_id'] == $this->memberData['member_id'] ) + { + continue; + } + + $user = array_merge( $user, $_memberData[ $user['member_id'] ] ); + + IPSText::getTextClass( 'email' )->getTemplate( "report_emailpm", $user['language'] ); + + IPSText::getTextClass( 'email' )->buildMessage( array( + 'MOD_NAME' => $user['members_display_name'], + 'USERNAME' => $this->memberData['members_display_name'], + 'LINK' => $this->registry->getClass('reportLibrary')->processUrl( $this->my_report_data['SAVED_URL'], $this->my_report_data['SEOTITLE'], $this->my_report_data['TEMPLATE'] ), + 'REPORTLINK'=> $this->settings['base_url'] . 'app=core&module=reports&do=show_report&rid=' . $this->my_report_data['REPORT_INDEX'], + 'REPORT' => $this->my_report_data['REPORT'], + ) + ); + + $_subject = sprintf( + $this->lang->words['subject_report'], + $this->registry->output->buildSEOUrl( 'showuser=' . $this->memberData['member_id'], 'public', $this->memberData['members_seo_name'], 'showuser' ), + $this->memberData['members_display_name'], + $this->settings['base_url'] . 'app=core&module=reports&do=show_report&rid=' . $this->my_report_data['REPORT_INDEX'], + $this->registry->getClass('reportLibrary')->processUrl( $this->my_report_data['SAVED_URL'], $this->my_report_data['SEOTITLE'], $this->my_report_data['TEMPLATE'] ) + ); + $notifyLibrary->setMember( $user ); + $notifyLibrary->setFrom( $this->memberData ); + $notifyLibrary->setNotificationKey( 'report_center' ); + $notifyLibrary->setNotificationUrl( $this->settings['base_url'] . 'app=core&module=reports&do=show_report&rid=' . $this->my_report_data['REPORT_INDEX'] ); + $notifyLibrary->setNotificationText( IPSText::getTextClass('email')->message ); + $notifyLibrary->setNotificationTitle( $_subject ); + + try + { + $notifyLibrary->sendNotification(); + } + catch( Exception $e ){} + } + + $this->_buildRSSFeed( $this->my_data, $this->my_report_data ); + } + + /** + * Build a private RSS feed for the member to monitor reports + * + * @return void + */ + private function _buildRSSFeed( $data=array(), $report_data ) + { + $ids = array(); + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_reports' ), 'core' ); + + if( is_array($data) AND count($data) ) + { + foreach( $data as $user ) + { + $ids[] = intval($user['member_id']); + } + } + + if( count( $ids ) == 0 ) + { + return; + } + + $rssClassToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classRss.php', 'classRss' ); + + $status = array(); + + $this->DB->build( array( 'select' => 'status, is_new, is_complete', + 'from' => 'rc_status', + 'where' => "is_new=1 OR is_complete=1", + ) ); + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + if( $row['is_new'] == 1 ) + { + $status['new'] = $row['status']; + } + elseif( $row['is_complete'] == 1 ) + { + $status['complete'] = $row['status']; + } + } + + //----------------------------------------- + // Now, we loop over each of the member ids + //----------------------------------------- + + foreach( $ids as $id ) + { + if( !$id ) + { + continue; + } + + //----------------------------------------- + // Clear out for new RSS doc and add channel + //----------------------------------------- + + $rss = new $rssClassToLoad(); + $channel_id = $rss->createNewChannel( array( 'title' => $this->lang->words['rss_feed_title'], + 'link' => $this->settings['board_url'], + 'description' => $this->lang->words['reports_rss_desc'], + 'pubDate' => $rss->formatDate( time() ) + ) ); + + //----------------------------------------- + // Now we need to find all open reports for + // this member + //----------------------------------------- + + $this->DB->build( array( + 'select' => 'i.*', + 'from' => array( 'rc_reports_index' => 'i' ), + 'where' => 's.is_active=1', + 'add_join' => array( + array( + 'from' => array( 'rc_status' => 's' ), + 'where' => 's.status=i.status', + 'type' => 'left', + ), + array( + 'select' => 'c.my_class, c.mod_group_perm, c.app', + 'from' => array( 'rc_classes' => 'c' ), + 'where' => 'c.com_id=i.rc_class', + 'type' => 'left', + ), + ) + ) ); + $outer = $this->DB->execute(); + + while( $r = $this->DB->fetch($outer) ) + { + /* Deleted report plugin, skip */ + if( $r['my_class'] == '' ) + { + continue; + } + + //----------------------------------------- + // Fix stuff....this is hackish :( + //----------------------------------------- + + if( $r['my_class'] == 'post' ) + { + $r['FORUM_ID'] = $r['exdat1']; + } + + //----------------------------------------- + // Found all open reports, can we access? + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $r['app'] ) . '/extensions/reportPlugins/' . $r['my_class'] . '.php', $r['my_class'] . '_plugin', $r['app'] ); + $object = new $classToLoad( $this->registry ); + + $notify = $object->getNotificationList( IPSText::cleanPermString( $r['mod_group_perm'] ), $r ); + $pass = false; + + if( is_array($notify['RSS']) AND count($notify['RSS']) ) + { + foreach( $notify['RSS'] as $memberAccount ) + { + if( $memberAccount['mem_id'] == $id ) + { + $pass = true; + break; + } + } + } + + if( $pass ) + { + $url = $this->registry->getClass('reportLibrary')->processUrl( str_replace( '&', '&', $r['url'] ) ); + + $rss->addItemToChannel( $channel_id, array( 'title' => $url, + 'link' => $url, + 'description' => $r['title'], + 'content' => $r['title'], + 'pubDate' => $rss->formatDate( $r['date_updated'] ) + ) ); + } + } + + $rss->createRssDocument(); + + $this->DB->update( 'rc_modpref', array( 'rss_cache' => $rss->rss_document ), "mem_id=" . $id ); + } + } } \ No newline at end of file diff --git a/upload/admin/applications/core/sources/index.html b/upload/admin/applications/core/sources/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/sources/index.html +++ b/upload/admin/applications/core/sources/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/sources/reportPlugins/blog.php b/upload/admin/applications/core/sources/reportPlugins/blog.php deleted file mode 100644 index 8faada9c..00000000 --- a/upload/admin/applications/core/sources/reportPlugins/blog.php +++ /dev/null @@ -1,558 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class blog_plugin -{ - /**#@+ - * Registry objects - * - * @access protected - * @var object - */ - protected $registry; - protected $DB; - protected $settings; - protected $request; - protected $lang; - protected $member; - protected $cache; - /**#@-*/ - - /** - * Holds extra data for the plugin - * - * @access private - * @var array Data specific to the plugin - */ - public $_extra; - - /** - * Blog dat - * - * @access private - * @var array Data about the blog - */ - public $blog; - - /** - * Entry data - * - * @access private - * @var array Data about the entry - */ - public $entry; - - /** - * Constructor - * - * @access public - * @param object Registry object - * @return void - */ - public function __construct( ipsRegistry $registry ) - { - //----------------------------------------- - // 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->cache = $this->registry->cache(); - $this->caches =& $this->registry->cache()->fetchCaches(); - $this->lang = $this->registry->class_localization; - - /* Load the language */ - $registry->class_localization->loadLanguageFile( array( 'public_blog' ), 'blog' ); - } - - /** - * Display the form for extra data in the ACP - * - * @access public - * @param array Plugin data - * @param object HTML object - * @return string HTML to add to the form - */ - public function displayAdminForm( $plugin_data, &$html ) - { - return $html->addRow( $this->lang->words['r_supermod'], - sprintf( $this->lang->words['r_supermod_info'], $this->settings['_base_url'] ), - $this->registry->output->formYesNo('report_supermod', (!isset( $plugin_data['report_supermod'] )) ? 1 : $plugin_data['report_supermod'] ) - ); - } - - /** - * Process the plugin's form fields for saving - * - * @access public - * @param array Plugin data for save - * @return string Error message - */ - public function processAdminForm( &$save_data_array ) - { - $save_data_array['report_supermod'] = intval($this->request['report_supermod']); - - return ''; - } - - /** - * Update timestamp for report - * - * @access public - * @param array New reports - * @param array New members cache - * @return boolean - */ - public function updateReportsTimestamp( $new_reports, &$new_members_cache ) - { - return true; - } - - /** - * Get report permissions - * - * @access public - * @param string Type of perms to check - * @param array Permissions data - * @param array group ids - * @param string Special permissions - * @return boolean - */ - public function getReportPermissions( $check, $com_dat, $group_ids, &$to_return ) - { - if ( ! IPSLib::appIsInstalled('blog') ) - { - return false; - } - - if( $this->memberData['g_is_supmod'] == 1 && ( ! isset($this->_extra['report_supermod']) || $this->_extra['report_supermod'] == 1 ) ) - { - return true; - } - else - { - $this->DB->build( array( - 'select' => 'md.moderate_type, md.moderate_mg_id', - 'from' => array('blog_moderators' => 'md'), - 'add_join' => array( - array( - 'select' => 'm.member_id, m.name, m.email, m.member_group_id', - 'from' => array( 'members' => 'm' ), - 'where' => "(md.moderate_type='member' AND md.moderate_mg_id={$this->memberData['member_id']}) OR (md.moderate_type='group' AND md.moderate_mg_id IN(" . implode( ',', $group_ids ) . "))", - 'type' => 'inner' - ) - ), - ) ); - $this->DB->execute(); - - if ( $this->DB->getTotalRows() > 0 ) - { - return true; - } - else - { - return false; - } - } - } - - /** - * Show the report form for this module - * - * @access public - * @param array Application data - * @return string HTML form information - */ - public function reportForm( $com_dat ) - { - $ex_form_data = array( - 'blog_id' => intval($this->request['blog_id']), - 'comment_id' => intval($this->request['comment_id']), - 'entry_id' => intval($this->request['entry_id']), - 'st' => intval($this->request['st']) - ); - - if( $ex_form_data['entry_id'] < 1 || $ex_form_data['blog_id'] < 1 ) - { - $this->registry->output->showError( 'reports_blog_entry_id', 10152 ); - } - - $this->_loadBlog( $ex_form_data['blog_id'] ); - $this->_checkAccess( $ex_form_data['entry_id'] ); - - $this->settings['blog_url'] = $this->registry->getClass('blogFunctions')->getBlogUrl( $ex_form_data['blog_id'] ); - - $this->registry->output->setTitle( $this->lang->words['report_title'] ); - $this->registry->output->addNavigation( $this->lang->words['blog_title'], "app=blog" ); - $this->registry->output->addNavigation( $this->blog['blog_name'], $this->settings['blog_url'] ); - $this->registry->output->addNavigation( $this->entry['entry_name'], $this->settings['blog_url'] . "showentry={$this->entry['entry_id']}" ); - $this->registry->output->addNavigation( $this->lang->words['report_title'], '' ); - - if ( $this->request['comment_id'] ) - { - $url = $this->settings['base_url'] . "app=blog&blogid={$this->entry['blog_id']}&showentry={$ex_form_data['entry_id']}&show=comment&cid={$ex_form_data['comment_id']}"; - } - else - { - $url = $this->settings['base_url'] . "app=blog&blogid={$this->entry['blog_id']}&showentry={$ex_form_data['entry_id']}"; - } - - if ( $this->request['comment_id'] ) - { - $this->lang->words['report_title'] .= " (" . $this->lang->words['bg_comment'] . " #" . $this->request['comment_id'] . ')'; - } - - $this->lang->words['report_basic_title'] = ( $this->request['comment_id'] ) ? $this->lang->words['report_title'] : $this->lang->words['report_entry']; - $this->lang->words['report_basic_url_title'] = $this->lang->words['report_topic']; - $this->lang->words['report_basic_enter'] = $this->lang->words['report_message']; - - //----------------------------------------- - // Instead of dull output, lets make it - // blogerishes! - //----------------------------------------- - - return $this->registry->getClass('reportLibrary')->showReportForm( $this->entry['entry_name'], $url, $ex_form_data ); - } - - /** - * Get section and link - * - * @access public - * @param array Report data - * @return array Section/link - */ - public function giveSectionLinkTitle( $report_row ) - { - $cache = $this->cache->getCache('report_cache'); - - return array( - 'title' => $cache['blog_titles'][ $report_row['exdat1'] ], - 'url' => "/index.php?app=blog&blogid=" . $report_row['exdat1'], - ); - } - - /** - * Process a report and save the data appropriate - * - * @access public - * @param array Report data - * @return array Data from saving the report - */ - public function processReport( $com_dat ) - { - $blog_id = intval( $this->request['blog_id'] ); - $entry_id = intval( $this->request['entry_id'] ); - $comment_id = intval( $this->request['comment_id'] ); - - if( $entry_id < 1 || $blog_id < 1 ) - { - $this->registry->output->showError( 'reports_blog_entry_id', 10153 ); - } - - $this->_loadBlog( $blog_id ); - $this->_checkAccess( $entry_id ); - - if ( $comment_id ) - { - $url = "app=blog&blogid={$blog_id}&showentry={$entry_id}&show=comment&cid={$comment_id}"; - } - else - { - $url = "app=blog&blogid={$blog_id}&showentry={$entry_id}"; - } - - $return_data = array(); - $a_url = str_replace("&", "&", $url); - $uid = md5( $url . '_' . $com_dat['com_id'] ); - - $status = array(); - - $this->DB->build( array( 'select' => 'status, is_new, is_complete', - 'from' => 'rc_status', - 'where' => "is_new=1 OR is_complete=1" ) ); - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - if( $row['is_new'] == 1 ) - { - $status['new'] = $row['status']; - } - elseif( $row['is_complete'] == 1 ) - { - $status['complete'] = $row['status']; - } - } - - if ( $comment_id ) - { - $data = $this->DB->buildAndFetch( array( - 'select' => 'c.*', - 'from' => array( 'blog_comments' => 'c' ), - 'where' => 'c.comment_id=' . $comment_id, - 'add_join' => array( - array( - 'select' => 'e.*', - 'from' => array( 'blog_entries' => 'e' ), - 'where' => 'e.entry_id=c.entry_id', - 'type' => 'left', - ), - array( - 'select' => 'mem.member_id, mem.members_display_name', - 'from' => array( 'members' => 'mem' ), - 'where' => 'mem.member_id=c.member_id', - 'type' => 'left', - ), - ) - ) ); - - IPSText::getTextClass('bbcode')->parse_bbcode = 1; - IPSText::getTextClass('bbcode')->parse_html = 0; - IPSText::getTextClass('bbcode')->parse_emoticons = 1; - IPSText::getTextClass('bbcode')->parse_nl2br = 0; - IPSText::getTextClass('bbcode')->parsing_section = 'global'; - - $message = "[quote name='" . IPSText::getTextClass('bbcode')->makeQuoteSafe( $data['members_display_name'] ) . "']"; - $message .= "\n[url=" . $this->settings['base_url'] . $url . "]" . $this->lang->words['bg_comment'] . " #{$comment_id}[/url]\n"; - $message .= IPSText::getTextClass('bbcode')->preEditParse( $data['comment_text'] ); - $message .= "[/quote]\n\n"; - - $this->entry['entry_name'] .= ' (' . $this->lang->words['bg_comment'] . ' ' . $comment_id . ')'; - } - else - { - $data = $this->DB->buildAndFetch( array('select' => 'e.*', - 'from' => array( 'blog_entries' => 'e' ), - 'where' => 'e.entry_id=' . $entry_id, - 'add_join' => array( array( 'select' => 'mem.member_id, mem.members_display_name', - 'from' => array( 'members' => 'mem' ), - 'where' => 'mem.member_id=e.entry_author_id', - 'type' => 'left' ) ) ) ); - - IPSText::getTextClass('bbcode')->parse_bbcode = 1; - IPSText::getTextClass('bbcode')->parse_html = 0; - IPSText::getTextClass('bbcode')->parse_emoticons = 1; - IPSText::getTextClass('bbcode')->parse_nl2br = 0; - IPSText::getTextClass('bbcode')->parsing_section = 'global'; - - $message = "[quote name='" . IPSText::getTextClass('bbcode')->makeQuoteSafe( $data['members_display_name'] ) . "']"; - $message .= IPSText::getTextClass('bbcode')->preEditParse( $data['entry_short'] ); - $message .= "\n[url=" . $this->settings['base_url'] . $url . "]" . $this->lang->words['read_more_go_on'] . "[/url]\n"; - $message .= "[/quote]\n\n"; - } - - $message .= $this->request['message']; - - $this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports_index', 'where' => "uid='{$uid}'" ) ); - $this->DB->execute(); - - if( $this->DB->getTotalRows() == 0 ) - { - $built_report_main = array( - 'uid' => $uid, - 'title' => $this->entry['entry_name'], - 'status' => $status['new'], - 'url' => '/index.php?' . $a_url, - 'rc_class' => $com_dat['com_id'], - 'updated_by' => $this->memberData['member_id'], - 'date_updated' => time(), - 'date_created' => time(), - 'exdat1' => $blog_id, - 'exdat2' => $entry_id, - 'exdat3' => $comment_id - ); - $this->DB->insert( 'rc_reports_index', $built_report_main ); - $rid = $this->DB->getInsertId(); - } - else - { - $the_report = $this->DB->fetch(); - $rid = $the_report['id']; - $this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'] ), "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'; - - $build_report = array( - 'rid' => $rid, - 'report' => IPSText::getTextClass('bbcode')->preDbParse( $message ), - 'report_by' => $this->memberData['member_id'], - 'date_reported' => time(), - ); - - $this->DB->insert( 'rc_reports', $build_report ); - - $reports = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'rc_reports', 'where' => "rid='{$rid}'" ) ); - - $this->DB->update( 'rc_reports_index', array( 'num_reports' => $reports['total'] ), "id='{$rid}'" ); - - $cache = $this->cache->getCache('report_cache'); - - if( $cache['blog_titles'][ $this->blog['blog_id'] ] != $this->blog['blog_name'] ) - { - $cache['blog_titles'][ $this->blog['blog_id'] ] = $this->blog['blog_name']; - - $this->cache->setCache( 'report_cache', $cache, array( 'array' => 1, 'donow' => 1 ) ); - } - - $return_data['REDIRECT_URL'] = $a_url; - $return_data['REPORT_INDEX'] = $rid; - $return_data['SAVED_URL'] = '/index.php?' . $url; - $return_data['REPORT'] = $build_report['report']; - - return $return_data; - } - - /** - * Where to send user after report is submitted - * - * @access public - * @param array Report data - * @return void - */ - public function reportRedirect( $report_data ) - { - $this->registry->output->redirectScreen( $this->lang->words['report_sending'], $this->settings['base_url'] . $report_data['REDIRECT_URL'] ); - } - - /** - * Retrieve list of users to send notifications to - * - * @access public - * @param string Group ids - * @param array Report data - * @return array Array of users to PM/Email - */ - public function getNotificationList( $group_ids, $report_data ) - { - $notify = array(); - - $this->DB->build( array( - 'select' => 'noti.*', - 'from' => array( 'rc_modpref' => 'noti' ), - 'where' => 'mem.member_group_id IN(' . $group_ids . ')', - 'add_join' => array( - array( - 'select' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id', - 'from' => array( 'members' => 'mem' ), - 'where' => 'mem.member_id=noti.mem_id', - ) - ) - ) ); - $this->DB->execute(); - - if( $this->DB->getTotalRows() > 0 ) - { - while( $row = $this->DB->fetch() ) - { - if( $row['by_pm'] == 1 ) - { - $notify['PM'][] = $row; - } - if( $row['by_email'] == 1 ) - { - $notify['EMAIL'][] = $row; - } - - $notify['RSS'][] = $row; - } - } - - return $notify; - } - - /** - * Load up blog libs - * - * @access private - * @param integer Blog id - * @return void - */ - private function _loadBlog( $blog_id ) - { - require_once( IPSLib::getAppDir('blog') . '/app_class_blog.php' ); - $blog = new app_class_blog( $this->registry ); - - $this->blog = $this->registry->getClass('blogFunctions')->loadBlog( $blog_id ); - - $this->settings['blog_url'] = $this->registry->getClass('blogFunctions')->getBlogUrl( $this->blog['blog_id'] ); - } - - /** - * Check access - * - * @access private - * @param integer Entry id - * @return void - */ - private function _checkAccess($eid) - { - if ( ! $this->memberData['member_id'] ) - { - $this->registry->output->showError( 'reports_must_be_member' ); - } - - if ( ! $this->blog['blog_name'] ) - { - $this->registry->output->showError( 'blog_not_enabled', 10154 ); - } - - $this->entry = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'blog_entries', 'where' => "entry_id=" . $eid ) ); - - if ( !$this->entry['entry_id'] ) - { - $this->registry->output->showError( 'reports_no_entry', 10155 ); - } - - //----------------------------------------- - // Are we allowed to see draft entries? - //----------------------------------------- - - if ( $this->blog['allow_entry'] ) - { - $show_draft = $this->blog['blog_settings']['hidedraft'] ? false : true; - } - elseif ( $this->memberData['g_is_supmod'] or $this->memberData['_blogmod']['moderate_can_view_draft'] ) - { - $show_draft = true; - } - else - { - $show_draft = false; - } - - if ( $this->entry['entry_status'] == 'draft' and !$show_draft ) - { - $this->registry->output->showError( 'reports_cannot_view_entry', 10156, true ); - } - - } -} \ No newline at end of file diff --git a/upload/admin/applications/core/sources/reportPlugins/downloads.php b/upload/admin/applications/core/sources/reportPlugins/downloads.php deleted file mode 100644 index 41761262..00000000 --- a/upload/admin/applications/core/sources/reportPlugins/downloads.php +++ /dev/null @@ -1,425 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class downloads_plugin -{ - /**#@+ - * Registry objects - * - * @access protected - * @var object - */ - protected $registry; - protected $DB; - protected $settings; - protected $request; - protected $lang; - protected $member; - protected $cache; - /**#@-*/ - - /** - * Holds extra data for the plugin - * - * @access private - * @var array Data specific to the plugin - */ - public $_extra; - - /** - * Constructor - * - * @access public - * @param object Registry object - * @return void - */ - public function __construct( ipsRegistry $registry ) - { - //----------------------------------------- - // 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->cache = $this->registry->cache(); - $this->caches =& $this->registry->cache()->fetchCaches(); - $this->lang = $this->registry->class_localization; - } - - /** - * Display the form for extra data in the ACP - * - * @access public - * @param array Plugin data - * @param object HTML object - * @return string HTML to add to the form - */ - public function displayAdminForm( $plugin_data, &$html ) - { - $return = ''; - - $return .= $html->addRow( $this->lang->words['r_supermod'], - sprintf( $this->lang->words['r_supermod_info'], $this->settings['_base_url'] ), - $this->registry->output->formYesNo('report_supermod', (!isset( $plugin_data['report_supermod'] )) ? 1 : $plugin_data['report_supermod'] ) - ); - - $return .= $html->addRow( $this->lang->words['r_dlmod'], - "", - $this->registry->output->formYesNo('report_bypass', (!isset( $plugin_data['report_bypass'] )) ? 1 : $plugin_data['report_bypass'] ) - ); - - return $return; - } - - /** - * Process the plugin's form fields for saving - * - * @access public - * @param array Plugin data for save - * @return string Error message - */ - public function processAdminForm( &$save_data_array ) - { - $save_data_array['report_supermod'] = intval($this->request['report_supermod']); - $save_data_array['report_bypass'] = intval($this->request['report_bypass']); - - return ''; - } - - /** - * Update timestamp for report - * - * @access public - * @param array New reports - * @param array New members cache - * @return boolean - */ - public function updateReportsTimestamp( $new_reports, &$new_members_cache ) - { - return true; - } - - /** - * Get report permissions - * - * @access public - * @param string Type of perms to check - * @param array Permissions data - * @param array group ids - * @param string Special permissions - * @return boolean - */ - public function getReportPermissions( $check, $com_dat, $group_ids, &$to_return ) - { - if( $this->_extra['report_bypass'] == 0 - || ( $this->memberData['g_is_supmod'] == 1 && ( ! isset($this->_extra['report_supermod']) || $this->_extra['report_supermod'] == 1 ) ) ) - { - return true; - } - else - { - $cache = $this->cache->getCache('idm_mods'); - - /** - * If no idm_mods cache, we have no downloads moderators - */ - if( !count($cache) ) - { - return false; - } - else - { - /** - * Loop over the cache - */ - foreach( $cache as $k => $v ) - { - /** - * Can we moderate comments? - */ - if( $v['modcancomments'] ) - { - /** - * Check against member moderator - */ - if( $v['modtype'] == 2 AND $this->memberData['member_id'] == $v['modgmid'] ) - { - return true; - } - /** - * Check against group moderator - */ - else if( $v['modtype'] == 1 ) - { - /** - * Take into account secondary groups too - */ - $groups = array( $this->memberData['member_group_id'] ); - - if( $this->memberData['mgroup_others'] ) - { - $groups = array_merge( $groups, explode( ',', IPSText::cleanPermString( $this->memberData['mgroup_others'] ) ) ); - } - - /** - * Loop over our groups, if one is the modgmid, then we're a group mod - */ - foreach( $groups as $gid ) - { - if( $gid == $v['modgmid'] ) - { - return true; - } - } - } - } - } - } - } - - /** - * If we're still here, return false - */ - return false; - } - - /** - * Show the report form for this module - * - * @access public - * @param array Application data - * @return string HTML form information - */ - public function reportForm( $com_dat ) - { - $this->registry->class_localization->loadLanguageFile( array( 'public_downloads' ), 'downloads' ); - - $file = intval($this->request['file']); - $comment = intval($this->request['comment']); - $st = intval($this->request['st']); - - if( ! $file ) - { - $this->registry->output->showError( 'reports_no_file' ); - } - - $title = $this->DB->buildAndFetch( array( 'select' => 'file_name', 'from' => 'downloads_files', 'where' => 'file_id=' . intval($file) ) ); - - $ex_form_data = array( - 'file' => $file, - 'ctyp' => 'comment', - 'title' => $title['file_name'], - 'comment' => $comment, - 'st' => $st, - ); - - $this->registry->output->setTitle( $this->lang->words['report_file_page'] ); - $this->registry->output->addNavigation( $this->lang->words['downloads'], "app=downloads" ); - $this->registry->output->addNavigation( $this->lang->words['report_file_page'], '' ); - - $this->lang->words['report_basic_title'] = $this->lang->words['report_file_title']; - $this->lang->words['report_basic_url_title'] = $this->lang->words['report_file_title']; - $this->lang->words['report_basic_enter'] = $this->lang->words['report_file_msg']; - - $url = $this->settings['base_url'] . "app=downloads&showfile=" . $ex_form_data['file']; - - return $this->registry->getClass('reportLibrary')->showReportForm( $title['file_name'], $url, $ex_form_data ); - } - - /** - * Get section and link - * - * @access public - * @param array Report data - * @return array Section/link - */ - public function giveSectionLinkTitle( $report_row ) - { - return array( - 'title' => $this->lang->words['report_section_title_site_downloads'], - 'url' => "/index.php?app=downloads", - ); - } - - /** - * Process a report and save the data appropriate - * - * @access public - * @param array Report data - * @return array Data from saving the report - */ - public function processReport( $com_dat ) - { - $file = intval($this->request['file']); - $comment = intval($this->request['comment']); - $st = intval($this->request['st']); - $url = 'app=downloads&showfile=' . $file . '&st=' . $st . '&showcomments=1#comment' . $comment; - - if( $file < 1 ) - { - $this->registry->output->showError( 'reports_no_file', 10161 ); - } - - $return_data = array(); - $a_url = str_replace("&", "&", $url); - $uid = md5( 'idm_' . $con_type . '_' . $img . '_' . $comment . '_' . $com_dat['com_id'] ); - $status = array(); - - $this->DB->build( array( 'select' => 'status, is_new, is_complete', - 'from' => 'rc_status', - 'where' => "is_new=1 OR is_complete=1", - ) ); - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - if( $row['is_new'] == 1 ) - { - $status['new'] = $row['status']; - } - elseif( $row['is_complete'] == 1 ) - { - $status['complete'] = $row['status']; - } - } - - $this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports_index', 'where' => "uid='{$uid}'" ) ); - $this->DB->execute(); - - if( $this->DB->getTotalRows() == 0 ) - { - $built_report_main = array( - 'uid' => $uid, - 'title' => $this->request['title'], - 'status' => $status['new'], - 'url' => '/index.php?' . $a_url, - 'rc_class' => $com_dat['com_id'], - 'updated_by' => $this->memberData['member_id'], - 'date_updated' => time(), - 'date_created' => time(), - 'exdat1' => $file, - 'exdat2' => $comment, - 'exdat3' => $st - ); - - $this->DB->insert( 'rc_reports_index', $built_report_main ); - $rid = $this->DB->getInsertId(); - } - else - { - $the_report = $this->DB->fetch(); - $rid = $the_report['id']; - $this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'] ), "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'; - - $build_report = array( - 'rid' => $rid, - 'report' => IPSText::getTextClass('bbcode')->preDbParse( $this->request['message'] ), - 'report_by' => $this->memberData['member_id'], - 'date_reported' => time(), - ); - - $this->DB->insert( 'rc_reports', $build_report ); - - $reports = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'rc_reports', 'where' => "rid='{$rid}'" ) ); - - $this->DB->update( 'rc_reports_index', array( 'num_reports' => $reports['total'] ), "id='{$rid}'" ); - - $return_data = array( - 'REDIRECT_URL' => $a_url, - 'REPORT_INDEX' => $rid, - 'SAVED_URL' => '/index.php?' . $url, - 'REPORT' => $build_report['report'] - ); - - return $return_data; - } - - /** - * Where to send user after report is submitted - * - * @access public - * @param array Report data - * @return void - */ - public function reportRedirect( $report_data ) - { - $this->registry->output->redirectScreen( $this->lang->words['report_sending'], $this->settings['base_url'] . $report_data['REDIRECT_URL'] ); - } - - /** - * Retrieve list of users to send notifications to - * - * @access public - * @param string Group ids - * @param array Report data - * @return array Array of users to PM/Email - */ - public function getNotificationList( $group_ids, $report_data ) - { - $notify = array(); - - $this->DB->build( array( - 'select' => 'noti.*', - 'from' => array( 'rc_modpref' => 'noti' ), - 'where' => 'mem.member_group_id IN(' . $group_ids . ')', - 'add_join' => array( - array( - 'select' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id', - 'from' => array( 'members' => 'mem' ), - 'where' => 'mem.member_id=noti.mem_id', - ) - ) - ) ); - $this->DB->execute(); - - if( $this->DB->getTotalRows() > 0 ) - { - while( $row = $this->DB->fetch() ) - { - if( $row['by_pm'] == 1 ) - { - $notify['PM'][] = $row; - } - if( $row['by_email'] == 1 ) - { - $notify['EMAIL'][] = $row; - } - - $notify['RSS'][] = $row; - } - } - - return $notify; - } -} \ No newline at end of file diff --git a/upload/admin/applications/core/sources/reportPlugins/gallery.php b/upload/admin/applications/core/sources/reportPlugins/gallery.php deleted file mode 100644 index 73945260..00000000 --- a/upload/admin/applications/core/sources/reportPlugins/gallery.php +++ /dev/null @@ -1,435 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class gallery_plugin -{ - /**#@+ - * Registry objects - * - * @access protected - * @var object - */ - protected $registry; - protected $DB; - protected $settings; - protected $request; - protected $lang; - protected $member; - protected $cache; - /**#@-*/ - - /** - * Holds extra data for the plugin - * - * @access private - * @var array Data specific to the plugin - */ - public $_extra; - - /** - * Constructor - * - * @access public - * @param object Registry object - * @return void - */ - public function __construct( ipsRegistry $registry ) - { - //----------------------------------------- - // 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->cache = $this->registry->cache(); - $this->caches =& $this->registry->cache()->fetchCaches(); - $this->lang = $this->registry->class_localization; - } - - /** - * Display the form for extra data in the ACP - * - * @access public - * @param array Plugin data - * @param object HTML object - * @return string HTML to add to the form - */ - public function displayAdminForm( $plugin_data, &$html ) - { - $return = ''; - - $return .= $html->addRow( $this->lang->words['r_supermod'], - sprintf( $this->lang->words['r_supermod_info'], $this->settings['_base_url'] ), - $this->registry->output->formYesNo('report_supermod', (!isset( $plugin_data['report_supermod'] )) ? 1 : $plugin_data['report_supermod'] ) - ); - - $return .= $html->addRow( $this->lang->words['r_galmod'], - "", - $this->registry->output->formYesNo('report_bypass', (!isset( $plugin_data['report_bypass'] )) ? 1 : $plugin_data['report_bypass'] ) - ); - - return $return; - } - - /** - * Process the plugin's form fields for saving - * - * @access public - * @param array Plugin data for save - * @return string Error message - */ - public function processAdminForm( &$save_data_array ) - { - $save_data_array['report_supermod'] = intval($this->request['report_supermod']); - $save_data_array['report_bypass'] = intval($this->request['report_bypass']); - - return ''; - } - - /** - * Update timestamp for report - * - * @access public - * @param array New reports - * @param array New members cache - * @return boolean - */ - public function updateReportsTimestamp( $new_reports, &$new_members_cache ) - { - return true; - } - - /** - * Get report permissions - * - * @access public - * @param string Type of perms to check - * @param array Permissions data - * @param array group ids - * @param string Special permissions - * @return boolean - */ - public function getReportPermissions( $check, $com_dat, $group_ids, &$to_return ) - { - if( $this->_extra['report_bypass'] == 0 - || ( $this->memberData['g_is_supmod'] == 1 && ( ! isset($this->_extra['report_supermod']) || $this->_extra['report_supermod'] == 1 ) ) ) - { - return true; - } - else - { - $this->DB->build( array( - 'select' => 'g.g_id', - 'from' => array( 'groups' => 'g' ), - 'where' => "(g.g_mod_albums=1 OR g.g_is_supmod=1) AND m.member_id=" . $this->memberData['member_id'], - 'add_join' => array( - array( - 'select' => 'm.members_display_name, m.member_id, m.email', - 'from' => array( 'members' => 'm' ), - 'where' => "m.member_group_id = g.g_id OR m.mgroup_others LIKE " . $this->DB->buildConcat( array( array( '%', 'string' ), array( 'g.g_id' ), array( '%', 'string' ) ) ) , - ) - ) - ) ); - $res = $this->DB->execute(); - - if( $this->DB->getTotalRows($res) > 0 ) - { - return true; - } - else - { - return false; - } - } - } - - /** - * Show the report form for this module - * - * @access public - * @param array Application data - * @return string HTML form information - */ - public function reportForm( $com_dat ) - { - define( 'GALLERY_LIBS', IPS_ROOT_PATH . '/applications_addon/ips/gallery/sources/libs/' ); - require_once( GALLERY_LIBS . 'lib_gallery.php' ); - $this->registry->setClass( 'glib', new lib_gallery( $this->registry ) ); - - $this->registry->class_localization->loadLanguageFile( array( 'public_gallery' ), 'gallery' ); - - if( $this->request['ctyp'] == 'comment' ) - { - $comment_id = intval($this->request['comment_id']); - - $comment = $this->DB->buildAndFetch( array( 'select' => 'img_id', 'from' => 'gallery_comments', 'where' => "pid={$comment_id}" ) ); - $data = $this->registry->getClass('glib')->getImageInfo( $comment['img_id'] ); - - $ex_form_data = array( - 'img_id' => $comment['img_id'], - 'comment_id' => $comment_id, - 'ctyp' => 'comment', - 'st' => intval($this->request['st']), - 'title' => $data['caption'] . $this->lang->words['report_gallery_comment_suffix'], - ); - - $this->registry->output->setTitle( $this->lang->words['report_comment_page'] ); - $this->registry->output->addNavigation( $this->lang->words['gallery'], "app=gallery" ); - $this->registry->output->addNavigation( $this->lang->words['report_comment_page'], '' ); - - $this->lang->words['report_basic_title'] = $this->lang->words['report_comment_page']; - $this->lang->words['report_basic_url_title'] = $this->lang->words['report_comment_title']; - $this->lang->words['report_basic_enter'] = $this->lang->words['report_comment_msg']; - - return $this->registry->getClass('reportLibrary')->showReportForm( '', '', $ex_form_data ); - } - elseif( $this->request['ctyp'] == 'image' ) - { - if( $this->settings['gallery_disable_report_images'] ) - { - $this->registry->output->showError( 'reports_images_disabled', 10162 ); - } - - $img_id = intval($this->request['img_id']); - - if( ! $img_id ) - { - $this->registry->output->showError( 'reports_no_imageid', 10163 ); - } - - $data = $this->registry->getClass('glib')->getImageInfo( $img_id ); - $thumb = $this->registry->getClass('glib')->makeImageLink( $data, 1 ); - - $ex_form_data = array( - 'img_id' => $img_id, - 'ctyp' => 'image', - //'thumb' => $thumb, - 'title' => $data['caption'] . $this->lang->words['report_gallery_image_suffix'] - ); - - $this->registry->output->setTitle( $data['caption'] . $this->lang->words['report_gallery_image_suffix'] ); - $this->registry->output->addNavigation( $this->lang->words['gallery'], "app=gallery" ); - $this->registry->output->addNavigation( $data['caption'] . $this->lang->words['report_gallery_image_suffix'], '' ); - - $this->lang->words['report_basic_title'] = $this->lang->words['report_img_page']; - $this->lang->words['report_basic_url_title'] = $this->lang->words['report_img_title']; - $this->lang->words['report_basic_enter'] = $this->lang->words['report_img_msg']; - - $url = $this->settings['base_url'] . "app=gallery&module=images&section=viewimage&img=" . $ex_form_data['img_id']; - - return $this->registry->getClass('reportLibrary')->showReportForm( $data['caption'], $url, $ex_form_data ); - } - else - { - $this->registry->output->showError( 'reports_invalid_gtype', 10164 ); - } - } - - /** - * Get section and link - * - * @access public - * @param array Report data - * @return array Section/link - */ - public function giveSectionLinkTitle( $report_row ) - { - return array( - 'title' => $this->lang->words['report_section_title_site_gallery'], - 'url' => "/index.php?app=gallery", - ); - } - - /** - * Process a report and save the data appropriate - * - * @access public - * @param array Report data - * @return array Data from saving the report - */ - public function processReport( $com_dat ) - { - $con_type = $this->request['ctyp']; - - if( $con_type == 'image' ) - { - $img = $this->request['img_id']; - $url = 'app=gallery&module=images§ion=viewimage&img=' . $img; - } - elseif( $con_type == 'comment' ) - { - $img = $this->request['img_id']; - $comment = $this->request['comment_id']; - $st = intval($this->request['st']); - $url = 'app=gallery&module=images§ion=viewimage&img=' . $img . '&st=' . $st . '#' . $comment; - } - - if( $img < 1 ) - { - $this->registry->output->showError( 'reports_no_imageid', 10165 ); - } - - $return_data = array(); - $a_url = str_replace("&", "&", $url); - $uid = md5( 'gallery_' . $con_type . '_' . $img . '_' . $comment . '_' . $com_dat['com_id'] ); - $status = array(); - - $this->DB->build( array( 'select' => 'status, is_new, is_complete', - 'from' => 'rc_status', - 'where' => "is_new=1 OR is_complete=1", - ) ); - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - if( $row['is_new'] == 1 ) - { - $status['new'] = $row['status']; - } - elseif( $row['is_complete'] == 1 ) - { - $status['complete'] = $row['status']; - } - } - - $this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports_index', 'where' => "uid='{$uid}'" ) ); - $this->DB->execute(); - - if( $this->DB->getTotalRows() == 0 ) - { - $built_report_main = array( - 'uid' => $uid, - 'title' => $this->request['title'], - 'status' => $status['new'], - 'url' => '/index.php?' . $a_url, - 'rc_class' => $com_dat['com_id'], - 'updated_by' => $this->memberData['member_id'], - 'date_updated' => time(), - 'date_created' => time(), - 'img_preview' => $this->request['thumb'], - 'exdat1' => $img, - 'exdat2' => $comment, - 'exdat3' => $st - ); - - $this->DB->insert( 'rc_reports_index', $built_report_main ); - $rid = $this->DB->getInsertId(); - } - else - { - $the_report = $this->DB->fetch(); - $rid = $the_report['id']; - $this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'] ), "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'; - - $build_report = array( - 'rid' => $rid, - 'report' => IPSText::getTextClass('bbcode')->preDbParse( $this->request['message'] ), - 'report_by' => $this->memberData['member_id'], - 'date_reported' => time(), - ); - - $this->DB->insert( 'rc_reports', $build_report ); - - $reports = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'rc_reports', 'where' => "rid='{$rid}'" ) ); - - $this->DB->update( 'rc_reports_index', array( 'num_reports' => $reports['total'] ), "id='{$rid}'" ); - - $return_data = array( - 'REDIRECT_URL' => $a_url, - 'REPORT_INDEX' => $rid, - 'SAVED_URL' => '/index.php?' . $url, - 'REPORT' => $build_report['report'] - ); - - return $return_data; - } - - /** - * Where to send user after report is submitted - * - * @access public - * @param array Report data - * @return void - */ - public function reportRedirect( $report_data ) - { - $this->registry->output->redirectScreen( $this->lang->words['report_sending'], $this->settings['base_url'] . $report_data['REDIRECT_URL'] ); - } - - /** - * Retrieve list of users to send notifications to - * - * @access public - * @param string Group ids - * @param array Report data - * @return array Array of users to PM/Email - */ - public function getNotificationList( $group_ids, $report_data ) - { - $notify = array(); - - $this->DB->build( array( - 'select' => 'noti.*', - 'from' => array( 'rc_modpref' => 'noti' ), - 'where' => 'mem.member_group_id IN(' . $group_ids . ')', - 'add_join' => array( - array( - 'select' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id', - 'from' => array( 'members' => 'mem' ), - 'where' => 'mem.member_id=noti.mem_id', - ) - ) - ) ); - $this->DB->execute(); - - if( $this->DB->getTotalRows() > 0 ) - { - while( $row = $this->DB->fetch() ) - { - if( $row['by_pm'] == 1 ) - { - $notify['PM'][] = $row; - } - if( $row['by_email'] == 1 ) - { - $notify['EMAIL'][] = $row; - } - - $notify['RSS'][] = $row; - } - } - - return $notify; - } -} \ No newline at end of file diff --git a/upload/admin/applications/core/sources/reportPlugins/index.html b/upload/admin/applications/core/sources/reportPlugins/index.html deleted file mode 100644 index 203e7ede..00000000 --- a/upload/admin/applications/core/sources/reportPlugins/index.html +++ /dev/null @@ -1 +0,0 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file diff --git a/upload/admin/applications/core/sql/index.html b/upload/admin/applications/core/sql/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/sql/index.html +++ b/upload/admin/applications/core/sql/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/sql/mysql_report_queries.php b/upload/admin/applications/core/sql/mysql_report_queries.php index df2b5671..c1935bf9 100644 --- a/upload/admin/applications/core/sql/mysql_report_queries.php +++ b/upload/admin/applications/core/sql/mysql_report_queries.php @@ -1,193 +1,195 @@ -db =& $database; - } - - /** - * Creates a permissions where clause - repeated often, so cached to save us from typing - * - * @access public - * @param array Parameters - * @return sting Where clause - */ - public function join_com_permissions( $data=array() ) - { - $com_sql=''; - if( ! $data['NOTCACHE'] ) - { - print 'This is NOT a cached query. Do not run directly'; - exit; - } - if( is_array($data['COMS']) && count($data['COMS']) > 0 ) - { - while( list($k1, $v1) = each($data['COMS']) ) - { - $exch = array(); - $cids[] = $k1; - if( is_array( $v1 ) && count( $v1 ) ) - { - $com_sql .= ' AND (rcl.com_id!=' . $k1; - while( list($k2, $v2) = each($v1) ) - { - if( is_array($v2) && count($v2) > 0 ) - { - $proper = array(); - - foreach( $v2 as $_v2 ) - { - if( $_v2 ) - { - $proper[] = $_v2; - } - } - - if( count($proper) ) - { - $exch[] = 'rep.' . $k2 . ' IN(' . implode(',',$proper) . ')'; - } - } - elseif( is_numeric($value) && $value > 0 ) - { - $exch[] = 'rep.' . $k2 . '=' . $v2; - } - else - { - $exch[] = 'rep.' . $k2 . "='" . $this->db->addSlashes($v2) . "'"; - } - } - - if( count($exch) > 0 ) - { - $com_sql .= ' OR ' . implode(' AND ', $exch ) . ')'; - } - else - { - $com_sql .= ')'; - } - } - } - return 'rcl.com_id IN(' . implode( ',' , $cids ) . ')' . $com_sql; - } - else - { - return 'rcl.com_id < 0'; - } - } - - /** - * Grab the reports for the reported content index page - * - * @access public - * @param array Parameters - * @return string Database query - */ - public function reports_index( $data=array() ) - { - $time = time(); - - return "SELECT rep.*, rcl.my_class, rcl.extra_data, mem.members_display_name as n_updated_by, mem.members_seo_name as n_updated_seoname, mem.member_group_id, MAX(star.points) as points, " - . "((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/stat.minutes_to_apoint)) as built_points " - . "FROM " . $this->db->obj['sql_tbl_prefix'] . "rc_reports_index rep " - . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "members mem ON (mem.member_id=rep.updated_by) " - . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status stat ON (stat.status=rep.status) " - . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status_sev star ON (((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/stat.minutes_to_apoint))>=star.points AND star.status=rep.status) " - . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_classes rcl ON (rcl.com_id=rep.rc_class) " - . "WHERE ".$data['WHERE']." " - . "GROUP BY rep.id " - . "ORDER BY stat.rorder ASC, built_points DESC, rep.date_updated DESC " - . "LIMIT ".$data['START'].", ".$data['LIMIT'] ; - } - - /** - * Grab a report - * - * @access public - * @param array Parameters - * @return string Database query - */ - public function grab_report( $data=array() ) - { - $time = time(); - - return "SELECT mem.*, mem.title as member_title, reps.*, rcl.my_class, MAX(star.points) as points, " - . "rep.*, grop.g_is_supmod as iscop, s.id as session_id, pf.*, " - . "((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/stat.minutes_to_apoint)) as built_points " - . "FROM " . $this->db->obj['sql_tbl_prefix'] . "rc_reports reps " - . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "members mem ON (mem.member_id=reps.report_by) " - . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "profile_portal pf ON (mem.member_id=pf.pp_member_id) " - . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_reports_index rep ON (rep.id=reps.rid) " - . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "groups grop ON (grop.g_id=mem.member_group_id) " - . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "sessions s ON (s.member_id=mem.member_id) " - . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status stat ON (stat.status=rep.status) " - . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status_sev star ON (((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/stat.minutes_to_apoint))>=star.points AND star.status=rep.status) " - . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_classes rcl ON (rcl.com_id=rep.rc_class) " - . "WHERE " . $data['COM'] . " AND reps.rid= " . $data['rid'] . " " - . "GROUP BY reps.id " - . "ORDER BY reps.date_reported ASC "; - } - - /** - * Grab the new status based on points, etc. - * - * @access public - * @param array Parameters - * @return string Database query - */ - public function pull_new_status_single( $data=array() ) - { - $time = time(); - - return "SELECT rep.status, MAX(star.points) as points FROM " . $this->db->obj['sql_tbl_prefix'] . "rc_reports_index rep " - . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status stat ON (stat.status=rep.status) " - . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status_sev star ON (((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/stat.minutes_to_apoint))>=star.points AND star.status=rep.status) " - . "WHERE rep.id=".$data['ID']." " - . "GROUP BY rep.id LIMIT 1"; - } - - /** - * Get permissions to access a class - * - * @access public - * @param array Parameters - * @return string Database query - */ - public function get_class_permissions( $data=array() ) - { - return "SELECT com_id, my_class, extra_data FROM " . $this->db->obj['sql_tbl_prefix'] . "rc_classes WHERE onoff=1 AND " . $data['COL'] . " REGEXP '.*,(" . implode( '|' , $data['GROUP_IDS'] ) . "),.*'"; - } + + * Invision Power Services + * IP.Board v3.1.4 + * Reports content SQL query cache file + * Last Updated: $LastChangedDate: 2010-09-13 17:28:12 -0400 (Mon, 13 Sep 2010) $ + * + * + * @author $Author: terabyte $ + * @author Based on original "Report Center" by Luke Scott + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 6863 $ + * + */ + +class report_sql_queries +{ + /** + * Database object handle + * + * @var object + * @access private + */ + private $db; + + /** + * Constructor + * + * @access public + * @param object Database reference + * @return void + */ + public function __construct( &$database ) + { + $this->db =& $database; + } + + /** + * Creates a permissions where clause - repeated often, so cached to save us from typing + * + * @access public + * @param array Parameters + * @return sting Where clause + */ + public function join_com_permissions( $data=array() ) + { + $com_sql=''; + if( ! $data['NOTCACHE'] ) + { + print 'This is NOT a cached query. Do not run directly'; + exit; + } + if( is_array($data['COMS']) && count($data['COMS']) > 0 ) + { + while( list($k1, $v1) = each($data['COMS']) ) + { + $exch = array(); + $cids[] = $k1; + if( is_array( $v1 ) && count( $v1 ) ) + { + $com_sql .= ' AND (rcl.com_id!=' . $k1; + while( list($k2, $v2) = each($v1) ) + { + if( is_array($v2) && count($v2) > 0 ) + { + $proper = array(); + + foreach( $v2 as $_v2 ) + { + if( $_v2 ) + { + $proper[] = $_v2; + } + } + + if( count($proper) ) + { + $exch[] = 'rep.' . $k2 . ' IN(' . implode(',',$proper) . ')'; + } + } + elseif( is_numeric($v2) && $v2 > 0 ) + { + $exch[] = 'rep.' . $k2 . '=' . $v2; + } + else + { + $exch[] = 'rep.' . $k2 . "='" . $this->db->addSlashes($v2) . "'"; + } + } + + if( count($exch) > 0 ) + { + $com_sql .= ' OR ' . implode(' AND ', $exch ) . ')'; + } + else + { + $com_sql .= ')'; + } + } + } + return 'rcl.com_id IN(' . implode( ',' , $cids ) . ')' . $com_sql; + } + else + { + return 'rcl.com_id < 0'; + } + } + + /** + * Grab the reports for the reported content index page + * + * @access public + * @param array Parameters + * @return string Database query + */ + public function reports_index( $data=array() ) + { + $time = time(); + + return "SELECT rep.*, rcl.my_class, rcl.extra_data, mem.members_display_name as n_updated_by, mem.members_seo_name as n_updated_seoname, mem.member_group_id, MAX(star.points) as points, " + . "((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/stat.minutes_to_apoint)) as built_points " + . "FROM " . $this->db->obj['sql_tbl_prefix'] . "rc_reports_index rep " + . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "members mem ON (mem.member_id=rep.updated_by) " + . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status stat ON (stat.status=rep.status) " + . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status_sev star ON (((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/stat.minutes_to_apoint))>=star.points AND star.status=rep.status) " + . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_classes rcl ON (rcl.com_id=rep.rc_class) " + . "WHERE ".$data['WHERE']." " + . "GROUP BY rep.id " + . "ORDER BY stat.rorder ASC, built_points DESC, rep.date_updated DESC " + . "LIMIT ".$data['START'].", ".$data['LIMIT'] ; + } + + /** + * Grab a report + * + * @access public + * @param array Parameters + * @return string Database query + */ + public function grab_report( $data=array() ) + { + $time = time(); + + return "SELECT mem.*, mem.title as member_title, reps.*, rcl.my_class, MAX(star.points) as points, " + . "rep.*, grop.g_is_supmod as iscop, s.id as session_id, pf.*, " + . "((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/stat.minutes_to_apoint)) as built_points " + . "FROM " . $this->db->obj['sql_tbl_prefix'] . "rc_reports reps " + . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "members mem ON (mem.member_id=reps.report_by) " + . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "profile_portal pf ON (mem.member_id=pf.pp_member_id) " + . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_reports_index rep ON (rep.id=reps.rid) " + . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "groups grop ON (grop.g_id=mem.member_group_id) " + . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "sessions s ON (s.member_id=mem.member_id) " + . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status stat ON (stat.status=rep.status) " + . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status_sev star ON (((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/stat.minutes_to_apoint))>=star.points AND star.status=rep.status) " + . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_classes rcl ON (rcl.com_id=rep.rc_class) " + . "WHERE " . $data['COM'] . " AND reps.rid= " . $data['rid'] . " " + . "GROUP BY reps.id " + . "ORDER BY reps.date_reported ASC "; + } + + /** + * Grab the new status based on points, etc. + * + * @access public + * @param array Parameters + * @return string Database query + */ + public function pull_new_status_single( $data=array() ) + { + $time = time(); + + return "SELECT rep.status, MAX(star.points) as points FROM " . $this->db->obj['sql_tbl_prefix'] . "rc_reports_index rep " + . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status stat ON (stat.status=rep.status) " + . "LEFT JOIN " . $this->db->obj['sql_tbl_prefix'] . "rc_status_sev star ON (((rep.num_reports * stat.points_per_report)+FLOOR((({$time}-rep.date_created)/60)/stat.minutes_to_apoint))>=star.points AND star.status=rep.status) " + . "WHERE rep.id=".$data['ID']." " + . "GROUP BY rep.id LIMIT 1"; + } + + /** + * Get permissions to access a class + * + * @access public + * @param array Parameters + * @return string Database query + */ + public function get_class_permissions( $data=array() ) + { + return "SELECT com_id, my_class, extra_data, app FROM " . $this->db->obj['sql_tbl_prefix'] . "rc_classes WHERE onoff=1 AND " . $data['COL'] . " REGEXP '.*,(" . implode( '|' , $data['GROUP_IDS'] ) . "),.*'"; + } } \ No newline at end of file diff --git a/upload/admin/applications/core/tasks/cleanout.php b/upload/admin/applications/core/tasks/cleanout.php index 425cb37f..3a25d0bc 100644 --- a/upload/admin/applications/core/tasks/cleanout.php +++ b/upload/admin/applications/core/tasks/cleanout.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Task: Clean out 'dead' sessions, validations, registration image entires, etc - * Last Updated: $LastChangedDate: 2009-07-01 07:35:02 -0400 (Wed, 01 Jul 2009) $ + * Last Updated: $LastChangedDate: 2010-07-28 05:00:44 -0400 (Wed, 28 Jul 2010) $ + * * * @author $Author: matt $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th January 2004 - * @version $Rev: 4832 $ + * @version $Rev: 6708 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -111,6 +113,14 @@ class task_item $this->DB->delete( 'sessions', 'running_time < ' . ( IPS_UNIX_TIME_NOW - $this->settings['session_expiration'] ) ); + //----------------------------------------- + // Lost password requests + //----------------------------------------- + + $_cutoff = time() - ( $this->settings['lost_pw_prune'] * 60 * 60 * 24 ); + + $this->DB->delete( 'validating', 'lost_pass=1 AND entry_date < ' . $_cutoff ); + //----------------------------------------- // Log to log table - modify but dont delete //----------------------------------------- diff --git a/upload/admin/applications/core/tasks/contentcache.php b/upload/admin/applications/core/tasks/contentcache.php index 71b52409..276c76dd 100644 --- a/upload/admin/applications/core/tasks/contentcache.php +++ b/upload/admin/applications/core/tasks/contentcache.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Task: Prune back content cache - * Last Updated: $LastChangedDate: 2009-02-04 20:03:59 +0000 (Wed, 04 Feb 2009) $ + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th January 2004 - * @version $Rev: 3887 $ + * @version $Rev: 5713 $ */ if ( ! defined( 'IN_IPB' ) ) diff --git a/upload/admin/applications/core/tasks/index.html b/upload/admin/applications/core/tasks/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/tasks/index.html +++ b/upload/admin/applications/core/tasks/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/tasks/itemmarkers.php b/upload/admin/applications/core/tasks/itemmarkers.php index ed892bbc..6b9b1de2 100644 --- a/upload/admin/applications/core/tasks/itemmarkers.php +++ b/upload/admin/applications/core/tasks/itemmarkers.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Task: Update 'dead' markers - * Last Updated: $LastChangedDate: 2009-02-04 20:03:59 +0000 (Wed, 04 Feb 2009) $ + * Last Updated: $LastChangedDate: 2010-07-29 08:08:48 -0400 (Thu, 29 Jul 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: matt $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th January 2004 - * @version $Rev: 3887 $ + * @version $Rev: 6711 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -106,9 +108,15 @@ class task_item $this->registry->setClass( 'classItemMarking', new classItemMarking( $this->registry ) ); } - $itemsRemoved = $this->registry->getClass('classItemMarking')->manualCleanUp( 100 ); + $itemsRemoved = $this->registry->getClass('classItemMarking')->manualCleanUp( 50, 6 ); - $this->class->appendTaskLog( $this->task, "Cleaned up " . $itemsRemoved . " markers" ); + /* Remove 'deleted' items */ + $this->DB->delete( 'core_item_markers', 'item_is_deleted=1' ); + $c = $this->DB->getAffectedRows(); + + IPSDebug::addLogMessage( "$c item markers removed", 'markers_cleanout' ); + + $this->class->appendTaskLog( $this->task, "Cleaned up " . $itemsRemoved . " markers, removed " . $c . " unused rows" ); $this->class->unlockTask( $this->task ); } diff --git a/upload/admin/applications/core/tasks/logprune.php b/upload/admin/applications/core/tasks/logprune.php index d5c8405b..6f36f3a6 100644 --- a/upload/admin/applications/core/tasks/logprune.php +++ b/upload/admin/applications/core/tasks/logprune.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Task: Prune old logs - * Last Updated: $LastChangedDate: 2009-05-20 16:34:08 -0400 (Wed, 20 May 2009) $ + * Last Updated: $LastChangedDate: 2010-06-08 20:53:45 -0400 (Tue, 08 Jun 2010) $ + * * - * @author $Author: josh $ + * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th January 2004 - * @version $Rev: 4679 $ + * @version $Rev: 6485 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -108,6 +110,10 @@ class task_item $this->DB->delete( "spider_logs", "entry_date < " . (time() - (60*60*24*30)) ); } + //----------------------------------------- + // Spam Logs + //----------------------------------------- + //----------------------------------------- // Admin Login Logs //----------------------------------------- diff --git a/upload/admin/applications/core/tasks/mysqlcleanup.php b/upload/admin/applications/core/tasks/mysqlcleanup.php index 5f6dc25a..63df7900 100644 --- a/upload/admin/applications/core/tasks/mysqlcleanup.php +++ b/upload/admin/applications/core/tasks/mysqlcleanup.php @@ -1,152 +1,154 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class task_item -{ - /** - * Parent task manager class - * - * @access protected - * @var object - */ - protected $class; - - /** - * This task data - * - * @access protected - * @var array - */ - protected $task = array(); - - /** - * Prevent logging - * - * @access protected - * @var boolean - */ - protected $restrict_log = false; - - /**#@+ - * Registry Object Shortcuts - * - * @access protected - * @var object - */ - protected $registry; - protected $DB; - protected $settings; - protected $request; - protected $lang; - protected $member; - protected $cache; - /**#@-*/ - - /** - * Constructor - * - * @access public - * @param object ipsRegistry reference - * @param object Parent task class - * @param array This task data - * @return void - */ - public function __construct( ipsRegistry $registry, $class, $task ) - { - /* Make registry objects */ - $this->registry = $registry; - $this->DB = $this->registry->DB(); - $this->settings =& $this->registry->fetchSettings(); - $this->request =& $this->registry->fetchRequest(); - $this->lang = $this->registry->getClass('class_localization'); - $this->member = $this->registry->member(); - $this->memberData =& $this->registry->member()->fetchMemberData(); - $this->cache = $this->registry->cache(); - $this->caches =& $this->registry->cache()->fetchCaches(); - - $this->class = $class; - $this->task = $task; - } - - /** - * Run this task - * - * @access public - * @return void - */ - public function runTask() - { - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' ); - - //----------------------------------------- - // This is mysql only - //----------------------------------------- - - if ( strtolower( $this->settings['sql_driver'] ) != 'mysql' ) - { - $this->class->unlockTask( $this->task ); - return; - } - - //----------------------------------------- - // Clean out sleeping mysql processes - //----------------------------------------- - - $this->DB->return_die = true; - $resource = $this->DB->query( "SHOW PROCESSLIST", true ); - - while( $r = $this->DB->fetch($resource) ) - { - //----------------------------------------- - // Make sure we're only killing stuff on our db - //----------------------------------------- - - if( $r['db'] == $this->settings['sql_database'] - AND $r['Command'] == 'Sleep' - AND $r['Time'] > 60 ) - { - $this->DB->return_die = true; - $this->DB->query( "KILL {$r['Id']}" ); - - /* Log */ - IPSDebug::addLogMessage( 'Task - MySQL Clean Up Performed. Killed id ' . $r['Id'], 'mysqlCleanUp', $r ); - } - } - - $this->DB->return_die = false; - - //----------------------------------------- - // Log to log table - modify but dont delete - //----------------------------------------- - - $this->class->appendTaskLog( $this->task, $this->lang->words['task_mysqlcleanup'] ); - - //----------------------------------------- - // Unlock Task: DO NOT MODIFY! - //----------------------------------------- - - $this->class->unlockTask( $this->task ); - } - + + * Invision Power Services + * IP.Board v3.1.4 + * Task: Simple task to clean out sleeping mysql queries + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 27th January 2004 + * @version $Rev: 5713 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class task_item +{ + /** + * Parent task manager class + * + * @access protected + * @var object + */ + protected $class; + + /** + * This task data + * + * @access protected + * @var array + */ + protected $task = array(); + + /** + * Prevent logging + * + * @access protected + * @var boolean + */ + protected $restrict_log = false; + + /**#@+ + * Registry Object Shortcuts + * + * @access protected + * @var object + */ + protected $registry; + protected $DB; + protected $settings; + protected $request; + protected $lang; + protected $member; + protected $cache; + /**#@-*/ + + /** + * Constructor + * + * @access public + * @param object ipsRegistry reference + * @param object Parent task class + * @param array This task data + * @return void + */ + public function __construct( ipsRegistry $registry, $class, $task ) + { + /* Make registry objects */ + $this->registry = $registry; + $this->DB = $this->registry->DB(); + $this->settings =& $this->registry->fetchSettings(); + $this->request =& $this->registry->fetchRequest(); + $this->lang = $this->registry->getClass('class_localization'); + $this->member = $this->registry->member(); + $this->memberData =& $this->registry->member()->fetchMemberData(); + $this->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + + $this->class = $class; + $this->task = $task; + } + + /** + * Run this task + * + * @access public + * @return void + */ + public function runTask() + { + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' ); + + //----------------------------------------- + // This is mysql only + //----------------------------------------- + + if ( strtolower( $this->settings['sql_driver'] ) != 'mysql' ) + { + $this->class->unlockTask( $this->task ); + return; + } + + //----------------------------------------- + // Clean out sleeping mysql processes + //----------------------------------------- + + $this->DB->return_die = true; + $resource = $this->DB->query( "SHOW PROCESSLIST", true ); + + while( $r = $this->DB->fetch($resource) ) + { + //----------------------------------------- + // Make sure we're only killing stuff on our db + //----------------------------------------- + + if( $r['db'] == $this->settings['sql_database'] + AND $r['Command'] == 'Sleep' + AND $r['Time'] > 60 ) + { + $this->DB->return_die = true; + $this->DB->query( "KILL {$r['Id']}" ); + + /* Log */ + IPSDebug::addLogMessage( 'Task - MySQL Clean Up Performed. Killed id ' . $r['Id'], 'mysqlCleanUp', $r ); + } + } + + $this->DB->return_die = false; + + //----------------------------------------- + // Log to log table - modify but dont delete + //----------------------------------------- + + $this->class->appendTaskLog( $this->task, $this->lang->words['task_mysqlcleanup'] ); + + //----------------------------------------- + // Unlock Task: DO NOT MODIFY! + //----------------------------------------- + + $this->class->unlockTask( $this->task ); + } + } \ No newline at end of file diff --git a/upload/admin/applications/core/tasks/openidcleanup.php b/upload/admin/applications/core/tasks/openidcleanup.php index 173198e2..e22d03f5 100644 --- a/upload/admin/applications/core/tasks/openidcleanup.php +++ b/upload/admin/applications/core/tasks/openidcleanup.php @@ -1,175 +1,177 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class task_item -{ - /** - * Parent task manager class - * - * @access protected - * @var object - */ - protected $class; - - /** - * This task data - * - * @access protected - * @var array - */ - protected $task = array(); - - /** - * Prevent logging - * - * @access protected - * @var boolean - */ - protected $restrict_log = false; - - /**#@+ - * Registry Object Shortcuts - * - * @access protected - * @var object - */ - protected $registry; - protected $DB; - protected $settings; - protected $request; - protected $lang; - protected $member; - protected $cache; - /**#@-*/ - - /** - * Constructor - * - * @access public - * @param object ipsRegistry reference - * @param object Parent task class - * @param array This task data - * @return void - */ - public function __construct( ipsRegistry $registry, $class, $task ) - { - /* Make registry objects */ - $this->registry = $registry; - $this->DB = $this->registry->DB(); - $this->settings =& $this->registry->fetchSettings(); - $this->request =& $this->registry->fetchRequest(); - $this->lang = $this->registry->getClass('class_localization'); - $this->member = $this->registry->member(); - $this->memberData =& $this->registry->member()->fetchMemberData(); - $this->cache = $this->registry->cache(); - $this->caches =& $this->registry->cache()->fetchCaches(); - - $this->class = $class; - $this->task = $task; - } - - /** - * Run this task - * - * @access public - * @return void - */ - public function runTask() - { - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' ); - - //----------------------------------------- - // This is mysql only - //----------------------------------------- - - if ( strtolower( $this->settings['sql_driver'] ) != 'mysql' ) - { - $this->class->unlockTask( $this->task ); - return; - } - - //----------------------------------------- - // Clean out openid caches older than 24 hours - // For whatever reason the OpenID libraries - // seem to have an issue where caches can start - // to accumulate. On boards heavily using - // OpenID, it's possible to eventually fill up - // the cache directories, which causes all subsequent - // logins to fail. This task just clears out those - // caches once every 24 hours to keep that from happening. - //----------------------------------------- - - try - { - if( is_dir( DOC_IPS_ROOT_PATH . 'cache/openid' ) ) - { - if( is_dir( DOC_IPS_ROOT_PATH . 'cache/openid/associations' ) ) - { - foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'cache/openid/associations' ) as $cache ) - { - if( $cache->getMTime() < ( time() - ( 60 * 60 * 24 ) ) ) - { - @unlink( $cache->getPathname() ); - } - } - } - - if( is_dir( DOC_IPS_ROOT_PATH . 'cache/openid/nonces' ) ) - { - foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'cache/openid/nonces' ) as $cache ) - { - if( $cache->getMTime() < ( time() - ( 60 * 60 * 24 ) ) ) - { - @unlink( $cache->getPathname() ); - } - } - } - - if( is_dir( DOC_IPS_ROOT_PATH . 'cache/openid/temp' ) ) - { - foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'cache/openid/temp' ) as $cache ) - { - if( $cache->getMTime() < ( time() - ( 60 * 60 * 24 ) ) ) - { - @unlink( $cache->getPathname() ); - } - } - } - } - } catch ( Exception $e ) {} - - //----------------------------------------- - // Log to log table - modify but dont delete - //----------------------------------------- - - $this->class->appendTaskLog( $this->task, $this->lang->words['task_openidcleanup'] ); - - //----------------------------------------- - // Unlock Task: DO NOT MODIFY! - //----------------------------------------- - - $this->class->unlockTask( $this->task ); - } - + + * Invision Power Services + * IP.Board v3.1.4 + * Task: Cleanup for uncleared OpenID caches + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 27th January 2004 + * @version $Rev: 5713 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class task_item +{ + /** + * Parent task manager class + * + * @access protected + * @var object + */ + protected $class; + + /** + * This task data + * + * @access protected + * @var array + */ + protected $task = array(); + + /** + * Prevent logging + * + * @access protected + * @var boolean + */ + protected $restrict_log = false; + + /**#@+ + * Registry Object Shortcuts + * + * @access protected + * @var object + */ + protected $registry; + protected $DB; + protected $settings; + protected $request; + protected $lang; + protected $member; + protected $cache; + /**#@-*/ + + /** + * Constructor + * + * @access public + * @param object ipsRegistry reference + * @param object Parent task class + * @param array This task data + * @return void + */ + public function __construct( ipsRegistry $registry, $class, $task ) + { + /* Make registry objects */ + $this->registry = $registry; + $this->DB = $this->registry->DB(); + $this->settings =& $this->registry->fetchSettings(); + $this->request =& $this->registry->fetchRequest(); + $this->lang = $this->registry->getClass('class_localization'); + $this->member = $this->registry->member(); + $this->memberData =& $this->registry->member()->fetchMemberData(); + $this->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + + $this->class = $class; + $this->task = $task; + } + + /** + * Run this task + * + * @access public + * @return void + */ + public function runTask() + { + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' ); + + //----------------------------------------- + // This is mysql only + //----------------------------------------- + + if ( strtolower( $this->settings['sql_driver'] ) != 'mysql' ) + { + $this->class->unlockTask( $this->task ); + return; + } + + //----------------------------------------- + // Clean out openid caches older than 24 hours + // For whatever reason the OpenID libraries + // seem to have an issue where caches can start + // to accumulate. On boards heavily using + // OpenID, it's possible to eventually fill up + // the cache directories, which causes all subsequent + // logins to fail. This task just clears out those + // caches once every 24 hours to keep that from happening. + //----------------------------------------- + + try + { + if( is_dir( DOC_IPS_ROOT_PATH . 'cache/openid' ) ) + { + if( is_dir( DOC_IPS_ROOT_PATH . 'cache/openid/associations' ) ) + { + foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'cache/openid/associations' ) as $cache ) + { + if( $cache->getMTime() < ( time() - ( 60 * 60 * 24 ) ) ) + { + @unlink( $cache->getPathname() ); + } + } + } + + if( is_dir( DOC_IPS_ROOT_PATH . 'cache/openid/nonces' ) ) + { + foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'cache/openid/nonces' ) as $cache ) + { + if( $cache->getMTime() < ( time() - ( 60 * 60 * 24 ) ) ) + { + @unlink( $cache->getPathname() ); + } + } + } + + if( is_dir( DOC_IPS_ROOT_PATH . 'cache/openid/temp' ) ) + { + foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'cache/openid/temp' ) as $cache ) + { + if( $cache->getMTime() < ( time() - ( 60 * 60 * 24 ) ) ) + { + @unlink( $cache->getPathname() ); + } + } + } + } + } catch ( Exception $e ) {} + + //----------------------------------------- + // Log to log table - modify but dont delete + //----------------------------------------- + + $this->class->appendTaskLog( $this->task, $this->lang->words['task_openidcleanup'] ); + + //----------------------------------------- + // Unlock Task: DO NOT MODIFY! + //----------------------------------------- + + $this->class->unlockTask( $this->task ); + } + } \ No newline at end of file diff --git a/upload/admin/applications/core/tasks/optimize.php b/upload/admin/applications/core/tasks/optimize.php new file mode 100644 index 00000000..7684ce2a --- /dev/null +++ b/upload/admin/applications/core/tasks/optimize.php @@ -0,0 +1,159 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Task: Optimizes database tables daily + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 27th January 2004 + * @version $Rev: 5713 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class task_item +{ + /** + * Parent task manager class + * + * @access protected + * @var object + */ + protected $class; + + /** + * This task data + * + * @access protected + * @var array + */ + protected $task = array(); + + /** + * Prevent logging + * + * @access protected + * @var boolean + */ + protected $restrict_log = false; + + /** + * Tables to optimize. Initially I was just going to run + * optimize tables query against all tables, but Charles + * prefers this static list of tables, and so it shall be. + * + * @access protected + * @var array + */ + protected $charlesTables = array( + 'core_item_markers', + 'core_item_markers_storage', + 'inline_notifications', + 'cache_store', + 'content_cache_posts', + ); + + /**#@+ + * Registry Object Shortcuts + * + * @access protected + * @var object + */ + protected $registry; + protected $DB; + protected $settings; + protected $request; + protected $lang; + protected $member; + protected $cache; + /**#@-*/ + + /** + * Constructor + * + * @access public + * @param object ipsRegistry reference + * @param object Parent task class + * @param array This task data + * @return void + */ + public function __construct( ipsRegistry $registry, $class, $task ) + { + /* Make registry objects */ + $this->registry = $registry; + $this->DB = $this->registry->DB(); + $this->settings =& $this->registry->fetchSettings(); + $this->request =& $this->registry->fetchRequest(); + $this->lang = $this->registry->getClass('class_localization'); + $this->member = $this->registry->member(); + $this->memberData =& $this->registry->member()->fetchMemberData(); + $this->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + + $this->class = $class; + $this->task = $task; + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' ); + } + + /** + * Run this task + * + * @access public + * @return void + */ + public function runTask() + { + /* Not needed for mssql as per #23105 bug */ + if ( ipsRegistry::dbFunctions()->getDriverType() != 'mysql' ) + { + $this->class->unlockTask( $this->task ); + return; + } + + //$_tables = $this->DB->getTableNames(); + + //if( is_array($_tables) AND count($_tables) ) + //{ + // foreach( $_tables as $_table ) + // { + // $this->DB->query( "OPTIMIZE TABLE {$_table}" ); + // $this->DB->query( "ANALYZE TABLE {$_table}" ); + // } + //} + + $_tables = $this->charlesTables; + + if( is_array($_tables) AND count($_tables) ) + { + $PRE = ipsRegistry::dbFunctions()->getPrefix(); + ipsRegistry::dbFunctions()->prefix_changed = true; + + foreach( $_tables as $_table ) + { + $this->DB->query( "OPTIMIZE TABLE {$PRE}{$_table}" ); + $this->DB->query( "ANALYZE TABLE {$PRE}{$_table}" ); + } + + ipsRegistry::dbFunctions()->prefix_changed = false; + } + + $this->class->appendTaskLog( $this->task, sprintf( $this->lang->words['task__optimizedtables'], count($_tables) ) ); + + $this->class->unlockTask( $this->task ); + } + +} \ No newline at end of file diff --git a/upload/admin/applications/core/tasks/pop3email.php b/upload/admin/applications/core/tasks/pop3email.php new file mode 100644 index 00000000..70c4fce6 --- /dev/null +++ b/upload/admin/applications/core/tasks/pop3email.php @@ -0,0 +1,219 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Task: Incoming Email Handler - POP3 + * Last Updated: $LastChangedDate: 2010-06-25 07:37:32 -0400 (Fri, 25 Jun 2010) $ + * + * + * @author $Author: mark $ + * @copyright (c) 2010 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @since 25th June 2010 + * @version $Rev: 6575 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class task_item +{ + /** + * Parent task manager class + * + * @access protected + * @var object + */ + protected $class; + + /** + * This task data + * + * @access protected + * @var array + */ + protected $task = array(); + + /** + * Prevent logging + * + * @access protected + * @var boolean + */ + protected $restrict_log = false; + + /**#@+ + * Registry Object Shortcuts + * + * @access protected + * @var object + */ + protected $registry; + protected $DB; + protected $settings; + protected $request; + protected $lang; + protected $member; + protected $cache; + /**#@-*/ + + /** + * Constructor + * + * @access public + * @param object ipsRegistry reference + * @param object Parent task class + * @param array This task data + * @return void + */ + public function __construct( ipsRegistry $registry, $class, $task ) + { + /* Make registry objects */ + $this->registry = $registry; + $this->DB = $this->registry->DB(); + $this->settings =& $this->registry->fetchSettings(); + $this->request =& $this->registry->fetchRequest(); + $this->lang = $this->registry->getClass('class_localization'); + $this->member = $this->registry->member(); + $this->memberData =& $this->registry->member()->fetchMemberData(); + $this->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + + $this->class = $class; + $this->task = $task; + } + + /** + * Run this task + * + * @access public + * @return void + */ + public function runTask() + { + + //-------------------------------------- + // Init + //-------------------------------------- + + require_once( IPS_KERNEL_PATH . '/pop3class/pop3.php' ); + $this->pop3 = new pop3_class; + + $this->pop3->hostname = $this->settings['pop3_server']; + $this->pop3->port = $this->settings['pop3_port']; + $this->pop3->tls = $this->settings['pop3_tls']; + $this->pop3->realm = ''; + $this->pop3->workstation = ''; + $this->pop3->authentication_mechanism = 'USER'; + $this->pop3->debug = FALSE; + $this->pop3->html_debug = FALSE; + $this->pop3->join_continuation_header_lines = FALSE; + + $user = $this->settings['pop3_user']; + $password = $this->settings['pop3_password']; + $apop = FALSE; + + //-------------------------------------- + // Connect and login + //-------------------------------------- + + $open = $this->pop3->Open(); + if ( $open != '' ) + { + return; + } + + $login = $this->pop3->Login( $user, $password, $apop ); + if ( $login != '' ) + { + return; + } + + //-------------------------------------- + // Any messages? + //-------------------------------------- + + $messages = NULL; + $size = NULL; + $this->pop3->Statistics( $messages, $size ); + + if ( !$messages ) + { + return; + } + + //-------------------------------------- + // Well get them then! + //-------------------------------------- + + require_once ( IPS_KERNEL_PATH . 'classIncomingEmail.php' ); + + $result = $this->pop3->ListMessages( '', TRUE ); + + if ( is_array( $result ) and !empty( $result ) ) + { + foreach ( $result as $id => $messageID ) + { + $headers = NULL; + $body = NULL; + $getMessage = $this->RetrieveMessage( $id ); + if ( $getMessage === NULL ) + { + continue; + } + + $incomingEmail = new classIncomingEmail( $getMessage ); + $incomingEmail->route(); + } + } + + //-------------------------------------- + // Log off + //-------------------------------------- + + $this->pop3->Close(); + + //----------------------------------------- + // Cleanup + //----------------------------------------- + + $this->class->appendTaskLog( $this->task, $this->lang->words['task_pop3email'] ); + $this->class->unlockTask( $this->task ); + } + + protected function RetrieveMessage( $id ) + { + if( $this->pop3->PutLine( "RETR {$id}" ) == 0 ) + { + return NULL; + } + + $response = $this->pop3->GetLine(); + if ( $response != "+OK message follows" ) + { + return NULL; + } + + $message = ''; + while ( TRUE == TRUE ) + { + $line = $this->pop3->GetLine(); + if ( $line == '.' ) + { + break; + } + $message .= $line . "\n"; + } + + return $message; + } + +} \ No newline at end of file diff --git a/upload/admin/applications/core/tasks/rebuildstats.php b/upload/admin/applications/core/tasks/rebuildstats.php index 373ba9ae..1dd1b63f 100644 --- a/upload/admin/applications/core/tasks/rebuildstats.php +++ b/upload/admin/applications/core/tasks/rebuildstats.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Task: Rebuild stats - * Last Updated: $LastChangedDate: 2009-04-06 22:42:50 -0400 (Mon, 06 Apr 2009) $ + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th January 2004 - * @version $Rev: 4411 $ + * @version $Rev: 5713 $ */ if ( ! defined( 'IN_IPB' ) ) diff --git a/upload/admin/applications/core/xml/admin_core_language_pack.xml b/upload/admin/applications/core/xml/admin_core_language_pack.xml index 348dbb1b..974167ce 100644 --- a/upload/admin/applications/core/xml/admin_core_language_pack.xml +++ b/upload/admin/applications/core/xml/admin_core_language_pack.xml @@ -4,61 +4,61 @@ core admin_ajax - ls_view_more_settings - View more settings - Показать все настройки - 30005 - + ls_grouptitles + Groups + Группы + 31006 + 31006 0 core admin_ajax - ls_quick_search - Quick Search - Быстрый поиск - 30005 - + ls_view_more_groups + View more groups + Показать все группы + 31006 + 31006 0 core admin_ajax - ls_view_more_help - View more help files - Показать все разделы помощи - 30005 - + ls_groupresults + + + 31006 + 31006 0 core admin_ajax - ls_view_more_acp - View more ACP Pages - Показать все разделы АЦ - 30005 - + ls_view_more_mem + View more members + Показать всех пользователей + 31006 + 31006 0 core admin_ajax - ls_settings - Settings - Настройки - 30005 - + lsnoresults + No results + Нет результатов + 31006 + 31006 0 core admin_ajax - ls_help - Help Files - Разделы помощи - 30005 - + ls_members + Members + Пользователи + 31006 + 31006 0 @@ -67,2718 +67,118 @@ ls_acppages ACP Pages Разделы АЦ - 30005 - + 31006 + 31006 0 core - admin_applications - a_noid - No ID was passed. Please try again. - ID не задан. Попробуйте снова. - 30005 - + admin_ajax + livesearchmemid + ID: + ID: + 31006 + 31006 0 core - admin_applications - a_protectmod - This is a protected module. You cannot remove it. - Невозможно удалить защищенный модуль. - 30005 - - 0 - - - core - admin_applications - a_already - A module already exists in this application with a key of %s. - В данном приложении модуль уже существует с ключом %. - 30005 - 30005 - 0 - - - core - admin_applications - a_added - New Module Added - Новый модуль добавлен. - 30005 - 30005 - 0 - - - core - admin_applications - a_titlekey - You must enter a title AND a module key. - Вы должны ввести имя и ключ модуля. - 30005 - - 0 - - - core - admin_applications - a_insertupdated - %s items inserted, %s updated. - % объектов добавлено, % обновлено. - 30005 - - 0 - - - core - admin_applications - a_file404 - Could not find the file to open at: - Невозможно найти файл: - 30005 - - 0 - - - core - admin_applications - a_nofile - No upload file was found or no filename was specified. - Файл не загружен или имя файла не корректно. - 30005 - - 0 - - - core - admin_applications - a_removed - Module Removed - Модуль удален. - 30005 - - 0 - - - core - admin_applications - a_edited - Module Edited - Модуль отредактирован. - 30005 - - 0 - - - core - admin_applications - a_noparent - - - 30005 - - 0 - - - core - admin_applications - a_admin - Admin - Администраторские - 30005 - 30005 - 0 - - - core - admin_applications - a_public - Public - Публичные - 30005 - - 0 - - - core - admin_applications - a_modules - Modules - модули - 30005 - - 0 - - - core - admin_applications - a_mod_reposition - Module position change completed - Позиция модуля изменена. - 30005 - - 0 - - - core - admin_applications - a_recachecomplete - Recache complete - Обновление кешей завершено - 30005 - - 0 - - - core - admin_applications - a_protectapp - This is a protected application. You cannot remove this module. - Невозможно удалить защищенное приложение. - 30005 - - 0 - - - core - admin_applications - a_appremoved - Application Removed - Приложение удалено - 30005 - 30005 - 0 - - - core - admin_applications - a_titledirectory - You must enter a title AND a directory name. - Вы должны ввести заголовок и имя директории. - 30005 - - 0 - - - core - admin_applications - a_addnewapp - Add New Application - Добавить приложение - 30005 - 30005 - 0 - - - core - admin_applications - a_appadded - Application Added - Приложение добавлено - 30005 - 30005 - 0 - - - core - admin_applications - a_editapp - Edit Application Details... - Редактировать - 30005 - - 0 - - - core - admin_applications - a_newapp - New Application Added - Новое приложение добавлено - 30005 - - 0 - - - core - admin_applications - a_editappdone - Application edited - Приложение отредактировано - 30005 - - 0 - - - core - admin_applications - a_savechanges - Save Changes - Сохранить - 30005 - - 0 - - - core - admin_applications - a_editmod - Edit Module Details... - Редактировать - 30005 - - 0 - - - core - admin_applications - a_apps - Applications - Приложения - 30005 - 30005 - 0 - - - core - admin_applications - a_settings + admin_ajax + ls_settings Settings Настройки - 30005 - + 31006 + 31006 0 core - admin_applications - a_modtitle - Module Title - Имя модуля - 30005 - - 0 - - - core - admin_applications - a_modtype - Module Type - Тип модуля - 30005 - - 0 - - - core - admin_applications - a_modtitle_info - A short descriptive title. - Краткий заголовок. - 30005 - - 0 - - - core - admin_applications - a_moddesc_info - A short description for this module. - Краткое описание модуля. - 30005 - - 0 - - - core - admin_applications - a_moddesc - Module Description - Описание модуля - 30005 - - 0 - - - core - admin_applications - a_modkey - Module Key - Ключ модуля - 30005 - - 0 - - - core - admin_applications - a_modkey_info - The name of the directory containing the module files. This should be alphanumeric only with no spaces or special characters. - Имя директории, содержащей файлы модуля. Могут использоваться только цифры и буквы без пробелов и специальных символов. - 30005 - - 0 - - - core - admin_applications - a_modver - Module Version - Версия модуля - 30005 - - 0 - - - core - admin_applications - a_modver_info - The current version of this module. - Текущая версия модуля. - 30005 - - 0 - - - core - admin_applications - a_moden - Module Enabled - Модуль включен? - 30005 - - 0 - - - core - admin_applications - a_modpar_info - If you choose a parent module, it will appear under that main menu link. If you choose no parent, it will become a main menu link. - Если вы выберите родительский модуль, то ссылка появится под ним. Если родительский модуль не выбран, то ссылка будет в главном меню. - 30005 - - 0 - - - core - admin_applications - a_moden_info - If you disable the module, it will not appear in the menu. - Если вы отключите этот модуль, он не будет показан в меню. - 30005 - - 0 - - - core - admin_applications - a_modpar - Module Parent - Родительский модуль - 30005 - - 0 - - - core - admin_applications - a_modprot_info - A protected application cannot be removed or edited by administrators. - Защищенное приложение не может быть удалено или изменено администратором. - 30005 - - 0 - - - core - admin_applications - a_modprot - Module Protected - Защищенный модуль - 30005 - - 0 - - - core - admin_applications - a_enabled - Enabled - Включен - 30005 - - 0 - - - core - admin_applications - a_version - Version - Версия - 30005 - - 0 - - - core - admin_applications - a_save - Save - Сохранить - 30005 - - 0 - - - core - admin_applications - a_position - Position - Позиция - 30005 - - 0 - - - core - admin_applications - a_removemod - Remove Module... - Удалить - 30005 - - 0 - - - core - admin_applications - a_couldnotbefound - could not be found. - не найдено. - 30005 - - 0 - - - core - admin_applications - a_thedir - The directory - Директория - 30005 - - 0 - - - core - admin_applications - a_uploadxml - Upload XML file from your computer - Загрузить XML-файл с компьютера - 30005 - - 0 - - - core - admin_applications - a_importxml - Import XML File - Импортировать в XML-файл - 30005 - - 0 - - - core - admin_applications - a_nomods - This application does not yet have any modules. - Это приложение еще не имеет ни одного модуля. - 30005 - - 0 - - - core - admin_applications - a_protectedmod - This is a protected module - Это защищенный модуль. - 30005 - - 0 - - - core - admin_applications - a_filexml_info - - - 30005 - 30005 - 0 - - - core - admin_applications - a_filexml - OR enter the filename of the XML file]]> - ИЛИ введите имя XML-файла]]> - 30005 - - 0 - - - core - admin_applications - a_uploadxml_info - Duplicate entries will not be overwritten but the default setting and other options will be updated. - Существующие настройки будут обновлены, другие — добавлены. - 30005 - - 0 - - - core - admin_applications - a_import - Import - Импортировать - 30005 - - 0 - - - core - admin_applications - a_apptitle - Application Title - Имя приложения - 30005 - 30005 - 0 - - - core - admin_applications - a_apptitle_info - A short descriptive title - Краткий заголовок - 30005 - 30005 - 0 - - - core - admin_applications - a_appdesc - Application Description - Описание приложения - 30005 - 30005 - 0 - - - core - admin_applications - a_appdesc_info - A short description - Краткое описание - 30005 - 30005 - 0 - - - core - admin_applications - a_appauthor - Application Author - Автор приложения - 30005 - 30005 - 0 - - - core - admin_applications - a_appver - Application Version - Версия приложения - 30005 - 30005 - 0 - - - core - admin_applications - a_appptitle_info - Leaving this field blank will cause the application to not be shown on the front end, making it an admin only application.]]> - Если это поле не заполнено, то приложение не будет показано, и будет доступно только в Админцентре.]]> - 30005 - 30005 - 0 - - - core - admin_applications - a_appptitle - Public Title]]> - Публичное имя приложения ]]> - 30005 - 30005 - 0 - - - core - admin_applications - a_appen - Application Enabled - Приложение доступно - 30005 - 30005 - 0 - - - core - admin_applications - a_appprot - Application Protected - Приложение защищено - 30005 - 30005 - 0 - - - core - admin_applications - a_appprot_info - A protected application cannot be removed or edit by mere humans - Защищенное приложение не может быть удалено или изменено обычным пользователем - 30005 - 30005 - 0 - - - core - admin_applications - a_app - Application - Приложение - 30005 - 30005 - 0 - - - core - admin_applications - a_appdir_info - This directory must exist in the /admin/applications_addon/other directory - Эта директория должна существовать в /admin/applications_addon/other - 30005 - 30005 - 0 - - - core - admin_applications - a_appdir - Application Directory - Директория приложения - 30005 - 30005 - 0 - - - core - admin_applications - a_installedapps - Installed Applications - Установленные приложения - 30005 - - 0 - - - core - admin_applications - a_status - Status - Статус - 30005 - - 0 - - - core - admin_applications - a_manageadmin - Manage ADMIN Modules... - Администраторские модули - 30005 - - 0 - - - core - admin_applications - a_oh_kay - Up to date - Нет обновлений - 30005 - - 0 - - - core - admin_applications - a_removeapp - Remove Application... - Удалить - 30005 - - 0 - - - core - admin_applications - a_upgradeavail - Upgrade Available - Доступно обновление - 30005 - - 0 - - - core - admin_applications - a_rootapps - Root Applications - Базовые приложения - 30005 - - 0 - - - core - admin_applications - a_thirdparty - Third Party Add Ons - Сторонние дополнения - 30005 - - 0 - - - core - admin_applications - a_ips - IPS Add Ons - Дополнения IPS - 30005 - - 0 - - - core - admin_applications - a_author - Authors - Авторы - 30005 - 30005 - 0 - - - core - admin_applications - a_managepublic - Manage PUBLIC Modules... - Публичные модули - 30005 - - 0 - - - core - admin_applications - a__ips - IPS Add On / - Дополнение IPS / - 30005 - 30005 - 0 - - - core - admin_applications - a__rootapp - Root / - Корень / - 30005 - 30005 - 0 - - - core - admin_applications - a__thirdparty - Third Party Add On / - Стороннее дополнение / - 30005 - 30005 - 0 - - - core - admin_applications - a_unapps - Applications Not Installed - Нет установленных приложений - 30005 - - 0 - - - core - admin_applications - a_cantinstall_info - This application cannot be installed. Is it in the correct directory? You cannot install third party applications into the IPS directory or vice-versa. - Это приложение не может быть установлено. Убедитесь что оно в правильной директории. Нельзя устанавливать сторонние приложения в директорию IPS и наоборот. - 30005 - 30005 - 0 - - - core - admin_applications - a_cannotinstall - Cannot Install]]> - Не может быть установлено ]]> - 30005 - - 0 - - - core - admin_applications - a_install - Install - Установить - 30005 - - 0 - - - core - admin_applications - a_remove - Remove - Удалить - 30005 - - 0 - - - core - admin_applications - a_currentver - Current Version - Текущая версия - 30005 - - 0 - - - core - admin_applications - a_warning - WARNING, PLEASE READ - ПРЕДУПРЕЖДЕНИЕ, ПОЖАЛУЙСТА ПРОЧТИТЕ - 30005 - - 0 - - - core - admin_applications - a_continue - Continue - Продолжить - 30005 - - 0 - - - core - admin_applications - a_warning_info - CAN NOT be recovered. Only proceed if you are sure you do not need any of the data associated with the application. If you would like to keep this data but not use the application, you can disable the application instead of removing it.]]> - БЕЗ ВОЗМОЖНОСТИ ВОССТАНОВЛЕНИЯ. Продолжайте только в том случае, если уверены, что данные связанные с приложением вам не понадобятся. Если приложение более не нужно, но требуется сохранить данные, то вы можно просто отключить его.]]> - 30005 - - 0 - - - core - admin_applications - a_clickremove - Click here to remove this application - Нажмите для удаления приложения - 30005 - - 0 - - - core - admin_applications - a_hooks - Hooks - Модификации - 30005 - - 0 - - - core - admin_applications - a_hooks_info - Hooks can be used to modify your IP.Board installation to enhance or add new functionality. You should only install hooks from sources that you trust, as they have full PHP execution capabilities on your server. - Модификации используются для изменения или добавления функциональности в форум. Вам следует устанавливать модификации только из тех источников, которым вы доверяете. - 30005 - - 0 - - - core - admin_applications - a_installedhooks - Installed Hooks - Установленные модификации - 30005 - - 0 - - - core - admin_applications - a_uptodate - Up to Date - Нет обновлений - 30005 - - 0 - - - core - admin_applications - a_lastupdated - Last Updated - Последнее обновление - 30005 - - 0 - - - core - admin_applications - a_installed - Installed - Установлено - 30005 - - 0 - - - core - admin_applications - a_hook - Hook - Модификация - 30005 - - 0 - - - core - admin_applications - a_move - Move - Переместить - 30005 - - 0 - - - core - admin_applications - a_uninstallhook - Uninstall Hook - Удалить - 30005 - - 0 - - - core - admin_applications - a_enablehook - Enable Hook - Включить - 30005 - - 0 - - - core - admin_applications - a_disabledhook - Disabled Hooks - Отключенные модификации - 30005 - - 0 - - - core - admin_applications - a_checkhook - Check Requirements - Проверить требования - 30005 - - 0 - - - core - admin_applications - a_exporthook - Export Hook - Экспортировать - 30005 - - 0 - - - core - admin_applications - a_edithook - Edit Hook - Редактировать - 30005 - - 0 - - - core - admin_applications - a_deletehook - Delete Hook - Удалить - 30005 - - 0 - - - core - admin_applications - a_disablehook - Disable Hook - Отключить - 30005 - - 0 - - - core - admin_applications - a_viewhook - View Full Details - Полная информация - 30005 - - 0 - - - core - admin_applications - a_nohooks - There are currently no hooks enabled - Нет включенных модификаций - 30005 - - 0 - - - core - admin_applications - a_setuphook - Set Up New Hook - Настроить модификацию - 30005 - - 0 - - - core - admin_applications - a_installhook - Install a New Hook - Установить модификацию - 30005 - - 0 - - - core - admin_applications - a_hookxml - Select a hook XML file - Выбрать XML-файл модификации - 30005 - - 0 - - - core - admin_applications - a_nodishooks - There are currently no disabled hooks - Отключенных модификаций нет - 30005 - - 0 - - - core - admin_applications - a_hookversion_info - This is the version used to check for update available notifications - Эта версия используется для проверки обновлений - 30005 - - 0 - - - core - admin_applications - a_hookversion - Hook Version (long-version) - Версия модификации (длинный формат) - 30005 - - 0 - - - core - admin_applications - a_hookurl - Update URL - URL для обновлений - 30005 - - 0 - - - core - admin_applications - a_hooksite_info - (Optional) Enter your homepage so users can contact you - (Необязательно) Введите адрес вашего сайта - 30005 - - 0 - - - core - admin_applications - a_hooksite - Website - Веб-сайт - 30005 - - 0 - - - core - admin_applications - a_hookemail_info - (Optional) Enter your email address so the user can contact you - (Необязательно) Введите ваш e-mail - 30005 - 30005 - 0 - - - core - admin_applications - a_hookemail - Author Email - E-mail автора - 30005 - 30005 - 0 - - - core - admin_applications - a_hookauthor_info - Enter the author name to display for the user - Введите имя автора - 30005 - - 0 - - - core - admin_applications - a_hookauthor - Hook Author - Автор модификации - 30005 - - 0 - - - core - admin_applications - a_hookurl_info - - - 30005 - - 0 - - - core - admin_applications - a_enterzero - Enter 0 for no requirement limits. - Введите 0 для отмены ограничений. - 30005 - - 0 - - - core - admin_applications - a_boardversion - IP.Board Version - Версия IP.Board - 30005 - - 0 - - - core - admin_applications - a_min - Min - Мин. - 30005 - - 0 - - - core - admin_applications - a_hookrequirements - Hook Requirements - Требования модификации - 30005 - - 0 - - - core - admin_applications - a_longversionid - Use the long version ID to set minimum or maximum versions. - Используйте ID версии в длинном формате. - 30005 - - 0 - - - core - admin_applications - a_hookfiles - Hook Files - Файлы модификации - 30005 - - 0 - - - core - admin_applications - a_filenamedir - File name in hooks directory - Имя файла в директории модификации - 30005 - - 0 - - - core - admin_applications - a_phpminmax - Use the regular PHP version numbers to set the minimum or maximum versions. - Используйте стандартное написание версии PHP. - 30005 - - 0 - - - core - admin_applications - a_max - Max - Макс. - 30005 - - 0 - - - core - admin_applications - a_phpver - PHP Version - Версия PHP - 30005 - - 0 - - - core - admin_applications - a_filehooktype - File hook type - Тип файла модификации - 30005 - - 0 - - - core - admin_applications - a_fileclassname - - Имя класса - 30005 - - 0 - - - core - admin_applications - a_aoverloader - Action overloader - Перегрузчик действия - 30005 - 30005 - 0 - - - core - admin_applications - a_selectone - Select One - Выберите - 30005 - - 0 - - - core - admin_applications - a_templatehook - Template hook - Модификация шаблона - 30005 - - 0 - - - core - admin_applications - a_soverloader - Skin overloader - Перегрузчик стиля - 30005 - - 0 - - - core - admin_applications - a_classextend - The class this file extends - Класс расширяемый этим файлом - 30005 - - 0 - - - core - admin_applications - a_skingroup - The skin group this hook is in - Группа шаблонов, к которой принадлежит модификация - 30005 - - 0 - - - core - admin_applications - a_skinfunc - The skin function this hook is in - Шаблон, в котором находится модификация - 30005 - - 0 - - - core - admin_applications - a_typeoftemp - Type of template hook - Тип модификации шаблона - 30005 - - 0 - - - core - admin_applications - a_hookid - - ID модификации - 30005 - - 0 - - - core - admin_applications - a_hookloc - The hook location - Расположение модификации - 30005 - - 0 - - - core - admin_applications - a_addanother - Add Another File - Добавить файл - 30005 - 30005 - 0 - - - core - admin_applications - a_hookver - Hook Version - Версия модификации - 30005 - - 0 - - - core - admin_applications - a_authorsite - Author Website - Сайт автора - 30005 - - 0 - - - core - admin_applications - a_maximum - Maximum - Макс. - 30005 - - 0 - - - core - admin_applications - a_minimum - Minimum - Мин. - 30005 - - 0 - - - core - admin_applications - a_realfile - Real file name - Имя файла - 30005 - - 0 - - - core - admin_applications - a_storedfile - Stored file name - Сохраненное имя файла - 30005 - - 0 - - - core - admin_applications - a_fileuses - Files that this hook uses - Файлы используемые модификацией - 30005 - - 0 - - - core - admin_applications - a_wherehook - Where this hook shows - Где отображается модификация - 30005 - - 0 - - - core - admin_applications - a_willoverload - This hook will overload - Эта модификация перегружает - 30005 - - 0 - - - core - admin_applications - a_labeled - labeled - с меткой - 30005 - - 0 - - - core - admin_applications - a_showsin - This hook shows in - Эта модификация отображается в - 30005 - - 0 - - - core - admin_applications - a_prestartif - before the start of the if statement - до начала выражения if - 30005 - - 0 - - - core - admin_applications - a_poststartif - after the start of the if statement - после начала выражения if - 30005 - - 0 - - - core - admin_applications - a_preelse - before the start of the else statement - до начала выражения else - 30005 - - 0 - - - core - admin_applications - a_outerpost - after the end of the foreach statement - после завершения выражения foreach - 30005 - - 0 - - - core - admin_applications - a_innerpost - before the end of the foreach statement - перед завершением выражения foreach - 30005 - - 0 - - - core - admin_applications - a_innerpre - after the start of the foreach statement - после начала выражения foreach - 30005 - - 0 - - - core - admin_applications - a_outerpre - before the start of the foreach statement - перед началом выражения foreach - 30005 - - 0 - - - core - admin_applications - a_postendif - after the end of the if statement - после завершения выражения if - 30005 - - 0 - - - core - admin_applications - a_preendif - before the end of the if statement - перед завершением выражения if - 30005 - - 0 - - - core - admin_applications - a_postelse - after the start of the else statement - после начала выражения else - 30005 - - 0 - - - core - admin_applications - a_noyoucant - This hook is not supported on your system - Модификация не поддерживается системой - 30005 - - 0 - - - core - admin_applications - a_yesyoucan - You are able to use this hook - Вы можете использовать эту модификацию - 30005 - 30005 - 0 - - - core - admin_applications - a_ipbstatus - IP.Board Version Status - Состояние версии IP.Board - 30005 - - 0 - - - core - admin_applications - a_minphp - Minimum PHP Version - Минимальная версия PHP - 30005 - - 0 - - - core - admin_applications - a_willworkipb - This hook will work with the version of IP.Board you are using - Эта модификация будет работать с используемой версией IP.Board - 30005 - 30005 - 0 - - - core - admin_applications - a_youripb - Your IP.Board Version - Используемая версия IP.Board - 30005 - 30005 - 0 - - - core - admin_applications - a_maxipb - Maximum IP.Board Version - Максимальная версия IP.Board - 30005 - - 0 - - - core - admin_applications - a_minipb - Minimum IP.Board Version - Минимальная версия IP.Board - 30005 - - 0 - - - core - admin_applications - a_checkrequirements - Checking system requirements... - Проверка системных требований... - 30005 - - 0 - - - core - admin_applications - a_maxphp - Maximum PHP Version - Максимальная версия PHP - 30005 - - 0 - - - core - admin_applications - a_yourphp - Your PHP Version - Ваша версия PHP - 30005 - 30005 - 0 - - - core - admin_applications - a_phpstatus - PHP Version Status - Состояние версии PHP - 30005 - - 0 - - - core - admin_applications - a_willworkphp - This hook will work on the version of PHP you are using - Эта модификация будет работать с используемой версией PHP - 30005 - 30005 - 0 - - - core - admin_applications - a_nosettings - There are no settings being exported - Нет настроек для экпорта - 30005 - - 0 - - - core - admin_applications - a_nomodules - There are no modules being exported - Нет модулей для экспорта - 30005 - - 0 - - - core - admin_applications - a_nohelp - There are no help files being exported - Нет файлов помощи для экспорта - 30005 - - 0 - - - core - admin_applications - a_notasks - There are no tasks being exported - Нет задач для экспорта - 30005 - - 0 - - - core - admin_applications - a_noacp - There are no ACP help files being exported - Нет файлов Админцентра для экспорта - 30005 - - 0 - - - core - admin_applications - a_nodbchanges - There are no database changes being exported - Нет изменений базы данных для экспорта - 30005 - - 0 - - - core - admin_applications - a_noinun - There is no custom install/uninstall script configured - Нет настроенных скриптов установки/удаления - 30005 - - 0 - - - core - admin_applications - a_nolang - There are no language strings being exported - Нет языковых строк для экспорта - 30005 - - 0 - - - core - admin_applications - a_settings_info - You can include groups of settings and individual settings you wish to export with this hook - Вы можете выбрать как отдельные настройки так и их группы для экспорта с этой модификацией - 30005 - - 0 - - - core - admin_applications - a_exportsettings - Export Settings - Экспорт настроек - 30005 - - 0 - - - core - admin_applications - a_noskin - There are no skin templates being exported - Нет шаблонов стилей для экпорта - 30005 - - 0 - - - core - admin_applications - a_exportlang - Export Language Strings - Эспорт языковых строк - 30005 - - 0 - - - core - admin_applications - a_addsettings - Add Settings - Добавить настройки - 30005 - 30005 - 0 - - - core - admin_applications - a_lang_info - You can include entire language files, or language strings to add to existing files - Вы можете включить как отдельные языковые строки так и целые файлы - 30005 - - 0 - - - core - admin_applications - a_addlang - Add Language Bits - Добавить языковые строки - 30005 - 30005 - 0 - - - core - admin_applications - a_exportmod - Export Modules - Экспорт модулей - 30005 - - 0 - - - core - admin_applications - a_mod_info - You can include modules to be added to existing applications - Вы можете модули для добавления к существующим приложениям - 30005 - - 0 - - - core - admin_applications - a_addmod - Add Modules - Добавить модули - 30005 - 30005 - 0 - - - core - admin_applications - a_exporthelp - Export Help Files - Экспорт файлов помощи - 30005 - - 0 - - - core - admin_applications - a_addhelp - Add Help Files - Добавить файлы помощи - 30005 - 30005 - 0 - - - core - admin_applications - a_help_info - You can include help files to be exported with your hook - Вы можете добавить файлы помощи для экспорта с модификацией - 30005 - - 0 - - - core - admin_applications - a_exportacp - Export ACP Help Files - Экспорт файлов помощи Админцентра - 30005 - - 0 - - - core - admin_applications - a_acp_info - You can include ACP help files to be exported with your hook - Вы можете добавить файлы помощи Админцентра для экспорта с модификацией - 30005 - 30005 - 0 - - - core - admin_applications - a_addacp - Add ACP Help Files - Добавить файлы помощи Админцентра - 30005 - 30005 - 0 - - - core - admin_applications - a_exportskin - Export Skin Templates - Экспорт шаблонов стиля - 30005 - - 0 - - - core - admin_applications - a_skin_info - You can include entire skin files or individual skin templates - Вы можете добавить как весь файл стиля так и отдельные шаблоны - 30005 - - 0 - - - core - admin_applications - a_addskin - Add Skin Templates - Добавить шаблон стиля - 30005 - 30005 - 0 - - - core - admin_applications - a_exporttasks - Export Tasks - Экспорт задач - 30005 - - 0 - - - core - admin_applications - a_tasks_info - You can include tasks to be exported with your hook - Вы можете добавить задачи для экспорта с модификацией - 30005 - - 0 - - - core - admin_applications - a_db_info - You can include new database tables, changes to existing tables, insertions, and updates to be run - Вы можете добавить новые таблицы базы данных, изменения в существующих таблицах и обновления для запуска. - 30005 - - 0 - - - core - admin_applications - a_exportdb - Export Database Changes - Экспорт изменений базы данных - 30005 - - 0 - - - core - admin_applications - a_addtasks - Add Tasks - Добавить задачи - 30005 - 30005 - 0 - - - core - admin_applications - hook_form_version - Hook Version (human-readable) - Версия модификации - 30005 - 30005 - 0 - - - core - admin_applications - hook_form_desc_help - Brief description of what this hook does, this is for your reference only - Краткое описание того, что делает модификация. (Для ссылки) - 30005 - 30005 - 0 - - - core - admin_applications - hook_form_desc - Hook Description - Описание - 30005 - 30005 - 0 - - - core - admin_applications - hook_form_title_help - Title of the hook, this is for your reference only. - Название модификации (для справки). - 30005 - 30005 - 0 - - - core - admin_applications - hook_form_title - Hook Title - Название - 30005 - 30005 - 0 - - - core - admin_applications - hook_form_info - Hook Information - Информация - 30005 - 30005 - 0 - - - core - admin_applications - hook_form_basic_info - Basic Hook Information - Основная информация модификации - 30005 - 30005 - 0 - - - core - admin_applications - a_export - Export - Экспорт - 30005 - - 0 - - - core - admin_applications - hook_form_page_title - Create Hook - Создать модификацию - 30005 - 30005 - 0 - - - core - admin_applications - hook_form_page_info - - Используйте эту форму для создания заготовки модификации. - 30005 - 30005 - 0 - - - core - admin_applications - a_addscript - Add Custom Script - Добавить скрипт - 30005 - 30005 - 0 - - - core - admin_applications - a_adddb - Add Database Changes - Добавить изменения базы данных - 30005 - 30005 - 0 - - - core - admin_applications - a_exportscript - Export Custom Script - Экспорт скрипта - 30005 - - 0 - - - core - admin_applications - a_script_info - You can include a custom script which will be executed upon installation and uninstallation - Вы можете добавить скрипт, который будет выполнен в ходе установки и удаления - 30005 - - 0 - - - core - admin_applications - hook_form_version_help - Current version of this hook - Текущая версия модификации - 30005 - 30005 - 0 - - - core - admin_applications - hook_form_no_title - The hook title field can not be blank - Название модификации не может быть пустым - 30005 - 30005 - 0 - - - core - admin_applications - hook_form_button - Save Hook - Сохранить - 30005 - 30005 - 0 - - - core - admin_applications - hook_form_key - Hook Key - Ключ модификации - 30005 - 30005 - 0 - - - core - admin_applications - hook_form_key_desc - This is a unique key for your hook - Это уникальный ключ для модификации - 30005 - 30005 - 0 - - - core - admin_applications - h_noxml - There was no XML file uploaded. Please try again. - XML файл не загружен. Пожалуйста, попробуйте снова. - 30005 - - 0 - - - core - admin_applications - h_xmlwrong - The uploaded XML file does not appear to be a valid hook installation file. - Загруженный XML-файл не является установочным файлом модификации. - 30005 - - 0 - - - core - admin_applications - h_newhookin - New hook record inserted - Новая модификация добавлена - 30005 - - 0 - - - core - admin_applications - h_filesin - files inserted - Файлы добавлены - 30005 - 30005 - 0 - - - core - admin_applications - h_settinggin - setting groups inserted - групп настроек добавлено - 30005 - - 0 - - - core - admin_applications - h_followingacts - The collowing actions were done: - Выполнены следующие действия: - 30005 - 30005 - 0 - - - core - admin_applications - h_settingin - settings inserted - настроек добавлено - 30005 - - 0 - - - core - admin_applications - h_settingup - settings updated - настроек обновлено - 30005 - - 0 - - - core - admin_applications - h_langbitin - language bits inserted - языковых строк добавлено - 30005 - - 0 - - - core - admin_applications - h_langbitup - language bits updated - языковых строк обновлено - 30005 - - 0 - - - core - admin_applications - h_modup - modules updated - модулей обновлено - 30005 - - 0 - - - core - admin_applications - h_modin - modules inserted - модулей добавлено - 30005 - - 0 - - - core - admin_applications - h_helpin - help files inserted - файлов помощи добавлено - 30005 - 30005 - 0 - - - core - admin_applications - h_helpup - help files updated - файлов помощи обновлено - 30005 - 30005 - 0 - - - core - admin_applications - h_acpin - ACP help files inserted - файлов помощи Админцентра добавлено - 30005 - 30005 - 0 - - - core - admin_applications - h_acpup - ACP help files updated - файлов помощи Админцентра обновлено - 30005 - 30005 - 0 - - - core - admin_applications - h_taskup - tasks updated - задач обновлено - 30005 - - 0 - - - core - admin_applications - h_tempup - templates updated - шаблонов обновлено - 30005 - - 0 - - - core - admin_applications - h_tempin - templates inserted - шаблонов добавлено - 30005 - - 0 - - - core - admin_applications - h_taskin - tasks inserted - задач добавлено - 30005 - - 0 - - - core - admin_applications - h_dbcreated - database tables created - таблиц создано в базе данных - 30005 - 30005 - 0 - - - core - admin_applications - h_updateran - update queries run - UPDATE запросов выполнено - 30005 - + admin_ajax + ls_help + Help Files + Разделы помощи + 31006 + 31006 0 core - admin_applications - h_insertran - insert queries run - INSERT запросов выполнено - 30005 - - 0 - - - core - admin_applications - h_noexport - We could not find the hook you were attempting to export. - Модификация, которую вы пытаетесь экспортировать, не найдена. - 30005 - - 0 - - - core - admin_applications - h_dbaltered - database tables altered - таблиц базы данных изменено - 30005 - 30005 - 0 - - - core - admin_applications - h_hasbeenenabled - The hook has been enabled. - Модификация включена. - 30005 - 30005 + admin_ajax + ls_quick_search + Quick Search + Быстрый поиск + 31006 + 31006 0 core - admin_applications - h_innerpre - (inner.pre) After the foreach loop starts - (inner.pre) После начала цикла foreach - 30005 - - 0 - - - core - admin_applications - h_outerpre - (outer.pre) Before the foreach loop starts - (outer.pre) Перед началом цикла foreach - 30005 - - 0 - - - core - admin_applications - h_noedit - We could not find the hook you were attempting to edit. - Модификация, которую вы хотите изменить, не найдена. - 30005 - + admin_ajax + ls_view_more_acp + View more ACP Pages + Показать все разделы АЦ + 31006 + 31006 0 core - admin_applications - h_hasbeenun - The hook has been uninstalled. - Модификация удалена. - 30005 - 30005 + admin_ajax + ls_groups + Groups Form + Группы + 31006 + 31006 0 core - admin_applications - h_innerpost - (inner.post) Before the foreach loop ends - (inner.post) Перед завершением цикла foreach - 30005 - + admin_ajax + ls_view_more_help + View more help files + Показать все разделы помощи + 31006 + 31006 0 core - admin_applications - h_outerpost - (outer.post) After the foreach loop ends - (outer.post) После завершения цикла foreach - 30005 - + admin_ajax + ls_view_more_settings + View more settings + Показать все настройки + 31006 + 31006 0 core - admin_applications - h_prestartif - (pre.startif) Before the if statement starts - (pre.startif) Перед началом выражения if - 30005 - + admin_ajax + ls_forums + Forums + Форумы + 31006 + 31006 0 core - admin_applications - h_postelse - (post.else) After the else statement starts - (post.else) После начала выражения else - 30005 - + admin_ajax + ls_view_more_forums + View more forums + Показать все форумы + 31006 + 31006 0 core admin_applications - h_preelse - (pre.else) Before the else statement starts - (pre.else) Перед началом выражения else - 30005 - + h_selectid + Select a Hook ID + Выберите ID хука + 31006 + 31006 0 @@ -2787,48 +187,8 @@ h_preendif (pre.endif) Before the if statement ends (pre.endif) Перед завершением выражения if - 30005 - - 0 - - - core - admin_applications - h_poststartif - (post.startif) After the if statement starts - (post.startif) После начала выражения if - 30005 - - 0 - - - core - admin_applications - h_selectfile - Select a File - Выберите файл - 30005 - - 0 - - - core - admin_applications - h_selectid - Select a Hook ID - Выберите ID модификации - 30005 - - 0 - - - core - admin_applications - h_onefile - You must apply at least one file to this hook. - Необходимо приложить хотя бы один файл к этой модификации. - 30005 - + 31006 + 31006 0 @@ -2837,268 +197,428 @@ h_postendif (post.endif) After the if statement ends (post.endif) После завершения выражения if - 30005 - + 31006 + 31006 0 core admin_applications - h_selecttemp - Select a Template - Выберите шаблон - 30005 - + h_postelse + (post.else) After the else statement starts + (post.else) После начала выражения else + 31006 + 31006 0 core admin_applications - h_saved - Your hook has been successfully saved - Модификация успешно сохранена - 30005 - + h_preelse + (pre.else) Before the else statement starts + (pre.else) Перед началом выражения else + 31006 + 31006 0 core admin_applications - h_nodetails - We could not find the hook you were attempting to view details for. - Модификация, детали которой вы хотите просмотреть, не найдена. - 30005 - + h_poststartif + (post.startif) After the if statement starts + (post.startif) После начала выражения if + 31006 + 31006 0 core admin_applications - h_tooold - Your version of IP.Board is too old to support this hook. - Ваша версия форума слишком стара для использования этой модификации. - 30005 - + h_outerpost + (outer.post) After the foreach loop ends + (outer.post) После завершения цикла foreach + 31006 + 31006 0 core admin_applications - h_norequirements - We could not find the hook you were attempting to check the requirements for. - Модификация, для которой вы хотели проверить требования, не найдена. - 30005 - + h_prestartif + (pre.startif) Before the if statement starts + (pre.startif) Перед началом выражения if + 31006 + 31006 0 core admin_applications - h_toonew - Your version of IP.Board is too new to support this hook. - Модификация не поддерживает вашу, более новую версию форума. - 30005 - + h_innerpost + (inner.post) Before the foreach loop ends + (inner.post) Перед завершением цикла foreach + 31006 + 31006 0 core admin_applications - h_phpnew - Your PHP version is newer than the maximum allowed version for this hook. - Используемая версия PHP слишком высока для этой модификации. - 30005 - + h_innerpre + (inner.pre) After the foreach loop starts + (inner.pre) После начала цикла foreach + 31006 + 31006 0 core admin_applications - h_phpold - Your PHP version is older than the minimum required version for this hook. - Используемая версия PHP слишком низка для этой модификации. - 30005 - + h_outerpre + (outer.pre) Before the foreach loop starts + (outer.pre) Перед началом цикла foreach + 31006 + 31006 0 core admin_applications - postform_badmd5 - Bad key supplied - Указан не верный ключ - 30005 - 30005 + h_noedit + We could not find the hook you were attempting to edit. + Хук, который вы хотите изменить, не найден. + 31006 + 31006 0 core admin_applications - purchase_additional - Purchase Additional Applications - Приобрести дополнительные приложения - 30006 - 30006 + h_hasbeenun + The hook has been uninstalled. + Хук удален. + 31006 + 31006 0 core admin_applications - add_new_mod_public - Add New Public Module - Добавить публичный модуль - 30006 - 30006 + h_hasbeenenabled + The hook has been enabled. + Хук включен. + 31006 + 31006 0 core admin_applications - create_hook_link - Create New Hook - Создать модификацию - 30006 - 30006 + h_noexport + We could not find the hook you were attempting to export. + Хук, который вы пытаетесь экспортировать, не найден. + 31006 + 31006 0 core admin_applications - export_mods_as_xml - Export All As XML - Экспортировать все в XML - 30006 - 30006 + h_insertran + insert queries run + INSERT запросов выполнено + 31006 + 31006 0 core admin_applications - add_new_mod_admin - Add New Admin Module - Добавить администраторский модуль - 30006 - 30006 + h_updateran + update queries run + UPDATE запросов выполнено + 31006 + 31006 0 core admin_applications - build_sphinx_link - Build Sphinx Config - Создать конфигурацию Sphinx - 30006 - 30006 + h_dbcreated + database tables created + таблиц создано в базе данных + 31006 + 31006 0 core admin_applications - rebuild_furl_title - Rebuilds the friendly URL cache file from all apps - Обновить кеш дружественных URL всех приложений - 30006 - 30006 + h_dbaltered + database tables altered + таблиц базы данных изменено + 31006 + 31006 0 core admin_applications - export_xml - Export As XML - Экспорт в XML - 30006 - 30006 + h_taskup + tasks updated + задач обновлено + 31006 + 31006 0 core admin_applications - rebuild_furl_link - Rebuild FURL Cache - Обновить кеш ЧПУ - 30006 - 30006 + h_cssup + CSS updated + CSS обновлен + 31006 + 31006 0 core admin_applications - seo_cannot_write - Could not write to the cache file, please check permissions on /cache and /cache/furlCache.php - Невозможна запись в файл кеша, пожалуйста, проверьте права доступа к /cache и /cache/furlCache.php - 30006 - 30006 + h_taskin + tasks inserted + задач добавлено + 31006 + 31006 0 core admin_applications - recache_link - - Обновить кеш приложений - 30006 - 30006 + h_cssin + CSS inserted + CSS добавлен + 31006 + 31006 0 core admin_applications - seo_no_data - An error occurred; could not locate any data to write - Произошла ошибка: не обнаружены данные для записи - 30006 - 30006 + h_tempup + templates updated + шаблонов обновлено + 31006 + 31006 0 core admin_applications - module_form_edit_title - Edit module - Редактировать модуль - 30007 - 30007 + h_tempin + templates inserted + шаблонов добавлено + 31006 + 31006 0 core admin_applications - module_form_add_title - Add module - Добавить модуль - 30007 - + h_acpin + ACP help files inserted + файлов помощи Админцентра добавлено + 31006 + 31006 0 core admin_applications - toggle_app_enabled - Toggle enabled/disabled - Включить/отключить - 30008 - 30008 + h_acpup + ACP help files updated + файлов помощи Админцентра обновлено + 31006 + 31006 0 core admin_applications - app_toggled_ok - The application status has been toggled - Статус приложения изменен - 30008 - 30008 + h_modup + modules updated + модулей обновлено + 31006 + 31006 0 core admin_applications - cannot_find_tog_app - We could not find the application you were attempting to enable or disable. - Мы не можем найти приложение, с которым вы хотите произвести действие. - 30008 - 30008 + h_helpin + help files inserted + файлов помощи добавлено + 31006 + 31006 + 0 + + + core + admin_applications + h_helpup + help files updated + файлов помощи обновлено + 31006 + 31006 + 0 + + + core + admin_applications + h_modin + modules inserted + модулей добавлено + 31006 + 31006 + 0 + + + core + admin_applications + h_langbitin + language bits inserted + языковых строк добавлено + 31006 + 31006 + 0 + + + core + admin_applications + h_langbitup + language bits updated + языковых строк обновлено + 31006 + 31006 + 0 + + + core + admin_applications + h_settingup + settings updated + настроек обновлено + 31006 + 31006 + 0 + + + core + admin_applications + h_settingin + settings inserted + настроек добавлено + 31006 + 31006 + 0 + + + core + admin_applications + h_filesin + files inserted + Файлы добавлены + 31006 + 31006 + 0 + + + core + admin_applications + h_settinggin + setting groups inserted + групп настроек добавлено + 31006 + 31006 + 0 + + + core + admin_applications + h_newhookin + New hook record inserted + Новый хук добавлен. + 31006 + 31006 + 0 + + + core + admin_applications + h_followingacts + The collowing actions were done: + Выполнены следующие действия: + 31006 + 31006 + 0 + + + core + admin_applications + h_xmlwrong + The uploaded XML file does not appear to be a valid hook installation file. + Загруженный XML-файл не является установочным файлом хука. + 31006 + 31006 + 0 + + + core + admin_applications + h_noxml + There was no XML file uploaded. Please try again. + XML файл не загружен. Пожалуйста, попробуйте снова. + 31006 + 31006 + 0 + + + core + admin_applications + hook_disable_all + Disable all hooks + Отключить все хуки + 31006 + 31006 + 0 + + + core + admin_applications + hook_reenable_all + Reenable all hooks + Включить все хуки + 31006 + 31006 + 0 + + + core + admin_applications + hook_form_key_desc + This is a unique key for your hook + Это уникальный ключ для хука + 31006 + 31006 + 0 + + + core + admin_applications + hook_form_key + Hook Key + Ключ + 31006 + 31006 0 @@ -3106,19 +626,1809 @@ admin_applications hook_form_no_key You must supply a hook key for your hook - Необходимо ввести ключ модификации - 30011 - 30011 + Необходимо ввести ключ хука + 31006 + 31006 0 core admin_applications - a_appphide - Hide Tab - Скрыть вкладку - 30011 - 30011 + hook_form_button + Save Hook + Сохранить + 31006 + 31006 + 0 + + + core + admin_applications + hook_form_no_title + The hook title field can not be blank + Название хука не может быть пустым + 31006 + 31006 + 0 + + + core + admin_applications + hook_form_version_help + Current version of this hook + Текущая версия хука + 31006 + 31006 + 0 + + + core + admin_applications + hook_form_version + Hook Version (human-readable) + Версия хука + 31006 + 31006 + 0 + + + core + admin_applications + hook_form_desc_help + Brief description of what this hook does, this is for your reference only + Краткое описание того, что делает хук. (Для ссылки) + 31006 + 31006 + 0 + + + core + admin_applications + hook_form_desc + Hook Description + Описание + 31006 + 31006 + 0 + + + core + admin_applications + hook_form_title + Hook Title + Название + 31006 + 31006 + 0 + + + core + admin_applications + hook_form_title_help + Title of the hook, this is for your reference only. + Название хука (для справки). + 31006 + 31006 + 0 + + + core + admin_applications + hook_form_info + Hook Information + Информация + 31006 + 31006 + 0 + + + core + admin_applications + hook_form_basic_info + Basic Hook Information + Основная информация + 31006 + 31006 + 0 + + + core + admin_applications + hook_form_page_info + + Используйте эту форму для создания заготовки хука. + 31006 + 31006 + 0 + + + core + admin_applications + a_export + Export + Экспорт + 31006 + 31006 + 0 + + + core + admin_applications + hook_form_page_title + Create Hook + Создать хук + 31006 + 31006 + 0 + + + core + admin_applications + a_addscript + Add Custom Script + Добавить скрипт + 31006 + 31006 + 0 + + + core + admin_applications + a_script_info + You can include a custom script which will be executed upon installation and uninstallation + Вы можете добавить скрипт, который будет выполнен в ходе установки и удаления + 31006 + 31006 + 0 + + + core + admin_applications + a_exportscript + Export Custom Script + Экспорт скрипта + 31006 + 31006 + 0 + + + core + admin_applications + a_adddb + Add Database Changes + Добавить изменения базы данных + 31006 + 31006 + 0 + + + core + admin_applications + a_db_info + You can include new database tables, changes to existing tables, insertions, and updates to be run + Вы можете добавить новые таблицы базы данных, изменения в существующих таблицах и обновления для запуска. + 31006 + 31006 + 0 + + + core + admin_applications + a_exportdb + Export Database Changes + Экспорт изменений базы данных + 31006 + 31006 + 0 + + + core + admin_applications + a_addtasks + Add Tasks + Добавить задачи + 31006 + 31006 + 0 + + + core + admin_applications + a_exporttasks + Export Tasks + Экспорт задач + 31006 + 31006 + 0 + + + core + admin_applications + a_tasks_info + You can include tasks to be exported with your hook + Вы можете добавить задачи для экспорта с хуком + 31006 + 31006 + 0 + + + core + admin_applications + a_nocss + There are no css files being expored + Нет файлов css для экспорта + 31006 + 31006 + 0 + + + core + admin_applications + a_addcss + Add CSS Files + Добавить файл CSS + 31006 + 31006 + 0 + + + core + admin_applications + a_exportcss + Export Skin CSS + Экспорт CSS стиля + 31006 + 31006 + 0 + + + core + admin_applications + a_css_info + You can include css files to be added with your hook + Вы можете включить css файлы добавив вашу хук. + 31006 + 31006 + 0 + + + core + admin_applications + a_addskin + Add Skin Templates + Добавить шаблон стиля + 31006 + 31006 + 0 + + + core + admin_applications + a_skin_info + You can include entire skin files or individual skin templates + Вы можете добавить как весь файл стиля так и отдельные шаблоны + 31006 + 31006 + 0 + + + core + admin_applications + a_addacp + Add ACP Help Files + Добавить файлы помощи Админцентра + 31006 + 31006 + 0 + + + core + admin_applications + a_exportskin + Export Skin Templates + Экспорт шаблонов стиля + 31006 + 31006 + 0 + + + core + admin_applications + a_acp_info + You can include ACP help files to be exported with your hook + Вы можете добавить файлы помощи Админцентра для экспорта с хуком + 31006 + 31006 + 0 + + + core + admin_applications + a_addhelp + Add Help Files + Добавить файлы помощи + 31006 + 31006 + 0 + + + core + admin_applications + a_exportacp + Export ACP Help Files + Экспорт файлов помощи Админцентра + 31006 + 31006 + 0 + + + core + admin_applications + a_help_info + You can include help files to be exported with your hook + Вы можете добавить файлы помощи для экспорта с хуков + 31006 + 31006 + 0 + + + core + admin_applications + a_addmod + Add Modules + Добавить модули + 31006 + 31006 + 0 + + + core + admin_applications + a_exporthelp + Export Help Files + Экспорт файлов помощи + 31006 + 31006 + 0 + + + core + admin_applications + a_mod_info + You can include modules to be added to existing applications + Вы можете модули для добавления к существующим приложениям + 31006 + 31006 + 0 + + + core + admin_applications + a_exportmod + Export Modules + Экспорт модулей + 31006 + 31006 + 0 + + + core + admin_applications + a_addlang + Add Language Bits + Добавить языковые строки + 31006 + 31006 + 0 + + + core + admin_applications + a_lang_info + You can include entire language files, or language strings to add to existing files + Вы можете включить как отдельные языковые строки так и целые файлы + 31006 + 31006 + 0 + + + core + admin_applications + a_exportlang + Export Language Strings + Эспорт языковых строк + 31006 + 31006 + 0 + + + core + admin_applications + a_addsettings + Add Settings + Добавить настройки + 31006 + 31006 + 0 + + + core + admin_applications + a_settings_info + You can include groups of settings and individual settings you wish to export with this hook + Вы можете выбрать как отдельные настройки так и их группы для экспорта с этим хуком + 31006 + 31006 + 0 + + + core + admin_applications + a_exportsettings + Export Settings + Экспорт настроек + 31006 + 31006 + 0 + + + core + admin_applications + a_noskin + There are no skin templates being exported + Нет шаблонов стилей для экпорта + 31006 + 31006 + 0 + + + core + admin_applications + a_nolang + There are no language strings being exported + Нет языковых строк для экспорта + 31006 + 31006 + 0 + + + core + admin_applications + a_noinun + There is no custom install/uninstall script configured + Нет настроенных скриптов установки/удаления + 31006 + 31006 + 0 + + + core + admin_applications + a_nodbchanges + There are no database changes being exported + Нет изменений базы данных для экспорта + 31006 + 31006 + 0 + + + core + admin_applications + a_notasks + There are no tasks being exported + Нет задач для экспорта + 31006 + 31006 + 0 + + + core + admin_applications + a_noacp + There are no ACP help files being exported + Нет файлов Админцентра для экспорта + 31006 + 31006 + 0 + + + core + admin_applications + a_nohelp + There are no help files being exported + Нет файлов помощи для экспорта + 31006 + 31006 + 0 + + + core + admin_applications + a_willworkphp + This hook will work on the version of PHP you are using + Этот хук будет работать с используемой версией PHP + 31006 + 31006 + 0 + + + core + admin_applications + a_nosettings + There are no settings being exported + Нет настроек для экпорта + 31006 + 31006 + 0 + + + core + admin_applications + a_nomodules + There are no modules being exported + Нет модулей для экспорта + 31006 + 31006 + 0 + + + core + admin_applications + a_phpstatus + PHP Version Status + Состояние версии PHP + 31006 + 31006 + 0 + + + core + admin_applications + a_yourphp + Your PHP Version + Ваша версия PHP + 31006 + 31006 + 0 + + + core + admin_applications + a_maxphp + Maximum PHP Version + Максимальная версия PHP + 31006 + 31006 + 0 + + + core + admin_applications + a_ipbstatus + IP.Board Version Status + Состояние версии IP.Board + 31006 + 31006 + 0 + + + core + admin_applications + a_minphp + Minimum PHP Version + Минимальная версия PHP + 31006 + 31006 + 0 + + + core + admin_applications + a_willworkipb + This hook will work with the version of IP.Board you are using + Этот хук будет работать с данной версией IP.Board + 31006 + 31006 + 0 + + + core + admin_applications + a_youripb + Your IP.Board Version + Используемая версия IP.Board + 31006 + 31006 + 0 + + + core + admin_applications + a_minipb + Minimum IP.Board Version + Минимальная версия IP.Board + 31006 + 31006 + 0 + + + core + admin_applications + a_maxipb + Maximum IP.Board Version + Максимальная версия IP.Board + 31006 + 31006 + 0 + + + core + admin_applications + a_checkrequirements + Checking system requirements... + Проверка системных требований... + 31006 + 31006 + 0 + + + core + admin_applications + a_yesyoucan + You are able to use this hook + Вы можете использовать этот хук + 31006 + 31006 + 0 + + + core + admin_applications + a_noyoucant + This hook is not supported on your system + Хук не поддерживается системой + 31006 + 31006 + 0 + + + core + admin_applications + a_outerpost + after the end of the foreach statement + после завершения выражения foreach + 31006 + 31006 + 0 + + + core + admin_applications + a_innerpost + before the end of the foreach statement + перед завершением выражения foreach + 31006 + 31006 + 0 + + + core + admin_applications + a_innerpre + after the start of the foreach statement + после начала выражения foreach + 31006 + 31006 + 0 + + + core + admin_applications + a_outerpre + before the start of the foreach statement + перед началом выражения foreach + 31006 + 31006 + 0 + + + core + admin_applications + a_postendif + after the end of the if statement + после завершения выражения if + 31006 + 31006 + 0 + + + core + admin_applications + a_preendif + before the end of the if statement + перед завершением выражения if + 31006 + 31006 + 0 + + + core + admin_applications + a_postelse + after the start of the else statement + после начала выражения else + 31006 + 31006 + 0 + + + core + admin_applications + a_preelse + before the start of the else statement + до начала выражения else + 31006 + 31006 + 0 + + + core + admin_applications + a_poststartif + after the start of the if statement + после начала выражения if + 31006 + 31006 + 0 + + + core + admin_applications + a_prestartif + before the start of the if statement + до начала выражения if + 31006 + 31006 + 0 + + + core + admin_applications + a_labeled + labeled + с меткой + 31006 + 31006 + 0 + + + core + admin_applications + a_willoverload + This hook will overload + Этот хук перегружает + 31006 + 31006 + 0 + + + core + admin_applications + a_fileuses + Files that this hook uses + Файлы используемые хуком + 31006 + 31006 + 0 + + + core + admin_applications + a_realfile + Real file name + Имя файла + 31006 + 31006 + 0 + + + core + admin_applications + a_storedfile + Stored file name + Сохраненное имя файла + 31006 + 31006 + 0 + + + core + admin_applications + a_wherehook + Where this hook shows + Где отображается хук + 31006 + 31006 + 0 + + + core + admin_applications + a_showsin + This hook shows in + Этот хук отображается в + 31006 + 31006 + 0 + + + core + admin_applications + a_maximum + Maximum + Макс. + 31006 + 31006 + 0 + + + core + admin_applications + a_hookid + + ID хука + 31006 + 31006 + 0 + + + core + admin_applications + a_hookloc + The hook location + Расположение + 31006 + 31006 + 0 + + + core + admin_applications + a_addanother + Add Another File + Добавить файл + 31006 + 31006 + 0 + + + core + admin_applications + a_hookver + Hook Version + Версия + 31006 + 31006 + 0 + + + core + admin_applications + a_authorsite + Author Website + Сайт автора + 31006 + 31006 + 0 + + + core + admin_applications + a_minimum + Minimum + Мин. + 31006 + 31006 + 0 + + + core + admin_applications + a_typeoftemp + Type of template hook + Тип хука для шаблона + 31006 + 31006 + 0 + + + core + admin_applications + a_classextend + The class this file extends + Класс расширяемый этим файлом + 31006 + 31006 + 0 + + + core + admin_applications + a_datalocation + Data Location + Данные расположения + 31006 + 31006 + 0 + + + core + admin_applications + a_skingroup + The skin group this hook is in + Группа шаблонов, к которой принадлежит хук + 31006 + 31006 + 0 + + + core + admin_applications + a_skinfunc + The skin function this hook is in + Шаблон, в котором находится хук + 31006 + 31006 + 0 + + + core + admin_applications + a_datahook + Data hook + Данные хука + 31006 + 31006 + 0 + + + core + admin_applications + a_libraryhook + Library hook + Библиотека хуков + 31006 + 31006 + 0 + + + core + admin_applications + a_templatehook + Template hook + Хук для шаблона + 31006 + 31006 + 0 + + + core + admin_applications + a_soverloader + Skin overloader + Перегрузчик стиля + 31006 + 31006 + 0 + + + core + admin_applications + a_aoverloader + Action overloader + Перегрузчик действия + 31006 + 31006 + 0 + + + core + admin_applications + a_selectone + Select One + Выберите + 31006 + 31006 + 0 + + + core + admin_applications + a_filehooktype + File hook type + Тип файла хука + 31006 + 31006 + 0 + + + core + admin_applications + a_fileclassname + + Имя класса + 31006 + 31006 + 0 + + + core + admin_applications + a_filenamedir + File name in hooks directory + Имя файла в директории хука + 31006 + 31006 + 0 + + + core + admin_applications + a_hookfiles + Hook Files + Файлы хука + 31006 + 31006 + 0 + + + core + admin_applications + a_hookfile + File + Файл + 31006 + 31006 + 0 + + + core + admin_applications + a_phpminmax + Use the regular PHP version numbers to set the minimum or maximum versions. + Используйте стандартное написание версии PHP. + 31006 + 31006 + 0 + + + core + admin_applications + a_max + Max + Макс. + 31006 + 31006 + 0 + + + core + admin_applications + a_phpver + PHP Version + Версия PHP + 31006 + 31006 + 0 + + + core + admin_applications + a_min + Min + Мин. + 31006 + 31006 + 0 + + + core + admin_applications + a_longversionid + Use the long version ID to set minimum or maximum versions. + Используйте ID версии в длинном формате. + 31006 + 31006 + 0 + + + core + admin_applications + a_enterzero + Enter 0 for no requirement limits. + Введите 0 для отмены ограничений. + 31006 + 31006 + 0 + + + core + admin_applications + a_boardversion + IP.Board Version + Версия IP.Board + 31006 + 31006 + 0 + + + core + admin_applications + a_hookrequirements + Hook Requirements + Требования + 31006 + 31006 + 0 + + + core + admin_applications + a_hookurl + Update URL + URL для обновлений + 31006 + 31006 + 0 + + + core + admin_applications + a_hookurl_info + + + 31006 + 31006 + 0 + + + core + admin_applications + a_hooksite_info + (Optional) Enter your homepage so users can contact you + (Необязательно) Введите адрес вашего сайта + 31006 + 31006 + 0 + + + core + admin_applications + a_hooksite + Website + Веб-сайт + 31006 + 31006 + 0 + + + core + admin_applications + a_hookemail_info + (Optional) Enter your email address so the user can contact you + (Необязательно) Введите ваш e-mail + 31006 + 31006 + 0 + + + core + admin_applications + a_hookemail + Author Email + E-mail автора + 31006 + 31006 + 0 + + + core + admin_applications + a_hookauthor_info + Enter the author name to display for the user + Введите имя автора + 31006 + 31006 + 0 + + + core + admin_applications + a_hookversion_info + This is the version used to check for update available notifications + Эта версия используется для проверки обновлений + 31006 + 31006 + 0 + + + core + admin_applications + a_hookauthor + Hook Author + Автор хука + 31006 + 31006 + 0 + + + core + admin_applications + a_hookxml + Select a hook XML file + Выбрать XML-файл хука + 31006 + 31006 + 0 + + + core + admin_applications + a_hookversion + Hook Version (long-version) + Версия (длинный формат) + 31006 + 31006 + 0 + + + core + admin_applications + a_installhook + Install a New Hook + Установить хук + 31006 + 31006 + 0 + + + core + admin_applications + a_nodishooks + There are currently no disabled hooks + Отключенных хуков нет + 31006 + 31006 + 0 + + + core + admin_applications + a_uninstallhook + Uninstall Hook + Удалить + 31006 + 31006 + 0 + + + core + admin_applications + a_setuphook + Hook Setup + Настроить хук + 31006 + 31006 + 0 + + + core + admin_applications + a_disabledhook + Disabled Hooks + Отключенные хуки + 31006 + 31006 + 0 + + + core + admin_applications + a_enablehook + Enable Hook + Включить + 31006 + 31006 + 0 + + + core + admin_applications + a_exporthook + Export Hook + Экспортировать + 31006 + 31006 + 0 + + + core + admin_applications + a_checkhook + Check Requirements + Проверить требования + 31006 + 31006 + 0 + + + core + admin_applications + a_deletehook + Delete Hook + Удалить + 31006 + 31006 + 0 + + + core + admin_applications + a_edithook + Edit Hook + Редактировать + 31006 + 31006 + 0 + + + core + admin_applications + a_nohooks + There are currently no hooks enabled + Нет включенных хуков + 31006 + 31006 + 0 + + + core + admin_applications + a_disablehook + Disable Hook + Отключить + 31006 + 31006 + 0 + + + core + admin_applications + a_viewhook + View Full Details + Полная информация + 31006 + 31006 + 0 + + + core + admin_applications + a_move + Move + Переместить + 31006 + 31006 + 0 + + + core + admin_applications + a_lastupdated + Last Updated + Последнее обновление + 31006 + 31006 + 0 + + + core + admin_applications + a_uptodate + Up to Date + Нет обновлений + 31006 + 31006 + 0 + + + core + admin_applications + a_installed + Installed + Установлено + 31006 + 31006 + 0 + + + core + admin_applications + a_hook + Hook + Хук + 31006 + 31006 + 0 + + + core + admin_applications + a_installedhooks + Installed Hooks + Установленные хуки + 31006 + 31006 + 0 + + + core + admin_applications + a_hooks_info + Hooks can be used to modify your IP.Board installation to enhance or add new functionality. You should only install hooks from sources that you trust, as they have full PHP execution capabilities on your server. + Хуки (модификации) используются для изменения или добавления функциональности в форум. Вам следует устанавливать хуки только из тех источников, которым вы доверяете. + 31006 + 31006 + 0 + + + core + admin_applications + a_hooks + Hooks + Хуки + 31006 + 31006 + 0 + + + core + admin_applications + a_clickremove + Click here to remove this application + Нажмите для удаления приложения + 31006 + 31006 + 0 + + + core + admin_applications + a_warning + WARNING, PLEASE READ + ПРЕДУПРЕЖДЕНИЕ, ПОЖАЛУЙСТА ПРОЧТИТЕ + 31006 + 31006 + 0 + + + core + admin_applications + a_warning_info + CAN NOT be recovered. Only proceed if you are sure you do not need any of the data associated with the application. If you would like to keep this data but not use the application, you can disable the application instead of removing it.]]> + БЕЗ ВОЗМОЖНОСТИ ВОССТАНОВЛЕНИЯ. Продолжайте только в том случае, если уверены, что данные связанные с приложением вам не понадобятся. Если приложение более не нужно, но требуется сохранить данные, то вы можно просто отключить его.]]> + 31006 + 31006 + 0 + + + core + admin_applications + a_continue + Continue + Продолжить + 31006 + 31006 + 0 + + + core + admin_applications + a_remove + Remove + Удалить + 31006 + 31006 + 0 + + + core + admin_applications + a_currentver + Current Version + Текущая версия + 31006 + 31006 + 0 + + + core + admin_applications + a_cantinstall_info + This application cannot be installed. Is it in the correct directory? You cannot install third party applications into the IPS directory or vice-versa. + Это приложение не может быть установлено. Убедитесь что оно в правильной директории. Нельзя устанавливать сторонние приложения в директорию IPS и наоборот. + 31006 + 31006 + 0 + + + core + admin_applications + a_cannotinstall + Cannot Install]]> + Не может быть установлено ]]> + 31006 + 31006 + 0 + + + core + admin_applications + a_install + Install + Установить + 31006 + 31006 + 0 + + + core + admin_applications + a__rootapp + Root / + Корень / + 31006 + 31006 + 0 + + + core + admin_applications + a__ips + IPS Add On / + Дополнение IPS / + 31006 + 31006 + 0 + + + core + admin_applications + a__thirdparty + Third Party Add On / + Стороннее дополнение / + 31006 + 31006 + 0 + + + core + admin_applications + a_author + Authors + Авторы + 31006 + 31006 + 0 + + + core + admin_applications + a_managepublic + Manage PUBLIC Modules... + Публичные модули + 31006 + 31006 + 0 + + + core + admin_applications + a_unapps + Applications Not Installed + Неустановленные приложения + 31006 + 31006 + 0 + + + core + admin_applications + a_manageadmin + Manage ADMIN Modules... + Администраторские модули + 31006 + 31006 + 0 + + + core + admin_applications + a_oh_kay + Up to date + Нет обновлений + 31006 + 31006 + 0 + + + core + admin_applications + a_removeapp + Remove Application... + Удалить + 31006 + 31006 + 0 + + + core + admin_applications + a_upgradeavail + Upgrade Available + Доступно обновление + 31006 + 31006 + 0 + + + core + admin_applications + a_rootapps + Root Applications + Базовые приложения + 31006 + 31006 + 0 + + + core + admin_applications + a_thirdparty + Third Party Add Ons + Сторонние дополнения + 31006 + 31006 + 0 + + + core + admin_applications + a_installedapps + Installed Applications + Установленные приложения + 31006 + 31006 + 0 + + + core + admin_applications + a_ips + IPS Add Ons + Дополнения IPS + 31006 + 31006 + 0 + + + core + admin_applications + a_app + Application + Приложение + 31006 + 31006 + 0 + + + core + admin_applications + a_status + Status + Статус + 31006 + 31006 + 0 + + + core + admin_applications + a_appprot_info + A protected application cannot be removed or edit by mere humans + Защищенное приложение не может быть удалено или изменено обычным пользователем + 31006 + 31006 + 0 + + + core + admin_applications + a_appprot + Application Protected + Приложение защищено + 31006 + 31006 + 0 + + + core + admin_applications + a_appen + Application Enabled + Приложение доступно + 31006 + 31006 + 0 + + + core + admin_applications + a_appdir_info + This directory must exist in the /admin/applications_addon/other directory + Эта директория должна существовать в /admin/applications_addon/other + 31006 + 31006 + 0 + + + core + admin_applications + a_appdir + Application Directory + Директория приложения + 31006 + 31006 + 0 + + + core + admin_applications + a_appver + Application Version + Версия приложения + 31006 + 31006 + 0 + + + core + admin_applications + a_appdesc_info + A short description + Краткое описание + 31006 + 31006 + 0 + + + core + admin_applications + a_appauthor + Application Author + Автор приложения + 31006 + 31006 + 0 + + + core + admin_applications + a_appdesc + Application Description + Описание приложения + 31006 + 31006 0 @@ -3127,8 +2437,808 @@ a_appphide_desc Allows access to the application on the public side, but does not show a tab in the header Разрешить доступ к приложению для пользователей, но скрыть вкладку в шапке форума - 30011 - 30011 + 31006 + 31006 + 0 + + + core + admin_applications + a_appphide + Hide Tab + Скрыть вкладку + 31006 + 31006 + 0 + + + core + admin_applications + a_appptitle_info + Leaving this field blank will cause the application to not be shown on the front end, making it an admin only application.]]> + Если это поле не заполнено, то приложение не будет показано, и будет доступно только в Админцентре.]]> + 31006 + 31006 + 0 + + + core + admin_applications + a_appptitle + Public Title]]> + Публичное имя приложения ]]> + 31006 + 31006 + 0 + + + core + admin_applications + a_apptitle_info + A short descriptive title + Краткий заголовок + 31006 + 31006 + 0 + + + core + admin_applications + a_import + Import + Импортировать + 31006 + 31006 + 0 + + + core + admin_applications + a_apptitle + Application Title + Имя приложения + 31006 + 31006 + 0 + + + core + admin_applications + a_filexml + OR enter the filename of the XML file]]> + ИЛИ введите имя XML-файла]]> + 31006 + 31006 + 0 + + + core + admin_applications + a_filexml_info + + + 31006 + 31006 + 0 + + + core + admin_applications + a_uploadxml_info + Duplicate entries will not be overwritten but the default setting and other options will be updated. + Существующие настройки будут обновлены, другие — добавлены. + 31006 + 31006 + 0 + + + core + admin_applications + a_uploadxml + Upload XML file from your computer + Загрузить XML-файл с компьютера + 31006 + 31006 + 0 + + + core + admin_applications + a_nomods + This application does not yet have any modules. + Это приложение еще не имеет ни одного модуля. + 31006 + 31006 + 0 + + + core + admin_applications + a_importxml + Import XML File + Импортировать в XML-файл + 31006 + 31006 + 0 + + + core + admin_applications + a_removemod + Remove Module... + Удалить + 31006 + 31006 + 0 + + + core + admin_applications + a_protectedmod + This is a protected module + Это защищенный модуль. + 31006 + 31006 + 0 + + + core + admin_applications + a_position + Position + Позиция + 31006 + 31006 + 0 + + + core + admin_applications + a_thedir + The directory + Директория + 31006 + 31006 + 0 + + + core + admin_applications + a_couldnotbefound + could not be found. + не найдено. + 31006 + 31006 + 0 + + + core + admin_applications + a_version + Version + Версия + 31006 + 31006 + 0 + + + core + admin_applications + a_enabled + Enabled + Включен + 31006 + 31006 + 0 + + + core + admin_applications + a_save + Save + Сохранить + 31006 + 31006 + 0 + + + core + admin_applications + a_modprot_info + A protected application cannot be removed or edited by administrators. + Защищенное приложение не может быть удалено или изменено администратором. + 31006 + 31006 + 0 + + + core + admin_applications + a_modprot + Module Protected + Защищенный модуль + 31006 + 31006 + 0 + + + core + admin_applications + a_moden_info + If you disable the module, it will not appear in the menu. + Если вы отключите этот модуль, он не будет показан в меню. + 31006 + 31006 + 0 + + + core + admin_applications + a_moden + Module Enabled + Модуль включен? + 31006 + 31006 + 0 + + + core + admin_applications + a_modpar + Module Parent + Родительский модуль + 31006 + 31006 + 0 + + + core + admin_applications + a_modpar_info + If you choose a parent module, it will appear under that main menu link. If you choose no parent, it will become a main menu link. + Если вы выберите родительский модуль, то ссылка появится под ним. Если родительский модуль не выбран, то ссылка будет в главном меню. + 31006 + 31006 + 0 + + + core + admin_applications + a_modver_info + The current version of this module. + Текущая версия модуля. + 31006 + 31006 + 0 + + + core + admin_applications + a_modver + Module Version + Версия модуля + 31006 + 31006 + 0 + + + core + admin_applications + a_modkey + Module Key + Ключ модуля + 31006 + 31006 + 0 + + + core + admin_applications + a_modkey_info + The name of the directory containing the module files. This should be alphanumeric only with no spaces or special characters. + Имя директории, содержащей файлы модуля. Могут использоваться только цифры и буквы без пробелов и специальных символов. + 31006 + 31006 + 0 + + + core + admin_applications + a_moddesc_info + A short description for this module. + Краткое описание модуля. + 31006 + 31006 + 0 + + + core + admin_applications + a_moddesc + Module Description + Описание модуля + 31006 + 31006 + 0 + + + core + admin_applications + a_modtitle_info + A short descriptive title. + Краткий заголовок. + 31006 + 31006 + 0 + + + core + admin_applications + a_modtitle + Module Title + Имя модуля + 31006 + 31006 + 0 + + + core + admin_applications + a_modtype + Module Type + Тип модуля + 31006 + 31006 + 0 + + + core + admin_applications + a_settings + Settings + Настройки + 31006 + 31006 + 0 + + + core + admin_applications + a_apps + Applications + Приложения + 31006 + 31006 + 0 + + + core + admin_applications + a_editmod + Edit Module Details... + Редактировать + 31006 + 31006 + 0 + + + core + admin_applications + a_savechanges + Save Changes + Сохранить + 31006 + 31006 + 0 + + + core + admin_applications + a_editappdone + Application edited + Приложение отредактировано + 31006 + 31006 + 0 + + + core + admin_applications + a_addnewapp + Add New Application + Добавить приложение + 31006 + 31006 + 0 + + + core + admin_applications + a_editapp + Edit Application Details... + Редактировать + 31006 + 31006 + 0 + + + core + admin_applications + a_appadded + Application Added + Приложение добавлено + 31006 + 31006 + 0 + + + core + admin_applications + a_newapp + New Application Added + Новое приложение добавлено + 31006 + 31006 + 0 + + + core + admin_applications + a_titledirectory + You must enter a title AND a directory name. + Вы должны ввести заголовок и имя директории. + 31006 + 31006 + 0 + + + core + admin_applications + a_appremoved + Application Removed + Приложение удалено + 31006 + 31006 + 0 + + + core + admin_applications + a_protectapp + This is a protected application. You cannot remove this module. + Невозможно удалить защищенное приложение. + 31006 + 31006 + 0 + + + core + admin_applications + a_recachecomplete + Recache complete + Обновление кешей завершено + 31006 + 31006 + 0 + + + core + admin_applications + a_mod_reposition + Module position change completed + Позиция модуля изменена. + 31006 + 31006 + 0 + + + core + admin_applications + a_admin + Admin + Администраторские + 31006 + 31006 + 0 + + + core + admin_applications + a_modules + Modules + модули + 31006 + 31006 + 0 + + + core + admin_applications + a_public + Public + Публичные + 31006 + 31006 + 0 + + + core + admin_applications + a_noparent + + + 31006 + 31006 + 0 + + + core + admin_applications + a_edited + Module Edited + Модуль отредактирован. + 31006 + 31006 + 0 + + + core + admin_applications + a_added + New Module Added + Новый модуль добавлен. + 31006 + 31006 + 0 + + + core + admin_applications + a_titlekey + You must enter a title AND a module key. + Вы должны ввести имя и ключ модуля. + 31006 + 31006 + 0 + + + core + admin_applications + a_already + A module already exists in this application with a key of %s. + В данном приложении модуль уже существует с ключом %. + 31006 + 31006 + 0 + + + core + admin_applications + a_insertupdated + %s items inserted, %s updated. + % объектов добавлено, % обновлено. + 31006 + 31006 + 0 + + + core + admin_applications + a_file404 + Could not find the file to open at: + Невозможно найти файл: + 31006 + 31006 + 0 + + + core + admin_applications + a_nofile + No upload file was found or no filename was specified. + Файл не загружен или имя файла не корректно. + 31006 + 31006 + 0 + + + core + admin_applications + a_removed + Module Removed + Модуль удален. + 31006 + 31006 + 0 + + + core + admin_applications + a_protectmod + This is a protected module. You cannot remove it. + Невозможно удалить защищенный модуль. + 31006 + 31006 + 0 + + + core + admin_applications + a_noid + No ID was passed. Please try again. + ID не задан. Попробуйте снова. + 31006 + 31006 + 0 + + + core + admin_applications + purchase_additional + Purchase Additional Applications + Приобрести дополнительные приложения + 31006 + 31006 + 0 + + + core + admin_applications + add_new_mod_public + Add New Public Module + Добавить публичный модуль + 31006 + 31006 + 0 + + + core + admin_applications + create_hook_link + Create New Hook + Создать хук + 31006 + 31006 + 0 + + + core + admin_applications + export_mods_as_xml + Export All As XML + Экспортировать все в XML + 31006 + 31006 + 0 + + + core + admin_applications + add_new_mod_admin + Add New Admin Module + Добавить администраторский модуль + 31006 + 31006 + 0 + + + core + admin_applications + build_sphinx_link + Build Sphinx Config + Создать конфигурацию Sphinx + 31006 + 31006 + 0 + + + core + admin_applications + export_xml + Export As XML + Экспорт в XML + 31006 + 31006 + 0 + + + core + admin_applications + rebuild_furl_link + Rebuild FURL Cache + Обновить кеш ЧПУ + 31006 + 31006 + 0 + + + core + admin_applications + rebuild_furl_title + Rebuilds the friendly URL cache file from all apps + Обновить кеш дружественных URL всех приложений + 31006 + 31006 + 0 + + + core + admin_applications + recache_link + + Обновить кеш приложений + 31006 + 31006 + 0 + + + core + admin_applications + seo_no_data + An error occurred; could not locate any data to write + Произошла ошибка: не обнаружены данные для записи + 31006 + 31006 + 0 + + + core + admin_applications + seo_cannot_write + Could not write to the cache file, please check permissions on /cache and /cache/furlCache.php + Невозможна запись в файл кеша, пожалуйста, проверьте права доступа к /cache и /cache/furlCache.php + 31006 + 31006 + 0 + + + core + admin_applications + module_form_add_title + Add module + Добавить модуль + 31006 + 31006 + 0 + + + core + admin_applications + module_form_edit_title + Edit module + Редактировать модуль + 31006 + 31006 + 0 + + + core + admin_applications + app_toggled_ok + The application status has been toggled + Статус приложения изменен + 31006 + 31006 + 0 + + + core + admin_applications + cannot_find_tog_app + We could not find the application you were attempting to enable or disable. + Мы не можем найти приложение, с которым вы хотите произвести действие. + 31006 + 31006 + 0 + + + core + admin_applications + toggle_app_enabled + Toggle enabled/disabled + Включить/отключить + 31006 + 31006 0 @@ -3137,18 +3247,8 @@ furl_cache_rebuilt FURL Cache Rebuilt Обновление кеша ЧПУ - 30011 - 30011 - 0 - - - core - admin_applications - app_hooks_rebuilt - %s hooks installed, %s hooks updated, and %s hooks skipped - %s модификаций установлено, %s модификаций обновлено, и %s модификаций пропущено - 30011 - 30011 + 31006 + 31006 0 @@ -3157,8 +3257,18 @@ remove_dead_caches Remove Dead Caches Удалить старые кеши - 30011 - 30011 + 31006 + 31006 + 0 + + + core + admin_applications + app_hooks_rebuilt + %s hooks installed, %s hooks updated, and %s hooks skipped + %s хуков установлено, %s хуков обновлено, и %s хуков пропущено + 31006 + 31006 0 @@ -3166,9 +3276,9 @@ admin_applications rebuild_app_hooks Reimport Application Hooks - Переимпортировать модификации - 30011 - 30011 + Переимпортировать хуки + 31006 + 31006 0 @@ -3177,8 +3287,148 @@ hook_check_updates Check For Updates Проверить обновления - 30011 - 30011 + 31006 + 31006 + 0 + + + core + admin_applications + hook_h2_exporting + Exporting + Экспорт + 31006 + 31006 + 0 + + + core + admin_applications + addnewmodule_apps + Add New Module + Добавить модуль + 31006 + 31006 + 0 + + + core + admin_applications + cannot_toggle_defaults + You cannot disable the default System, Forum and Member applications. + Вы не можете отключить приложения Система, Форум и Пользователи. + 31006 + 31006 + 0 + + + core + admin_applications + a_hookapp + Application + Приложение + 31006 + 31006 + 0 + + + core + admin_applications + h_selectfile + Select a File + Выберите файл + 31006 + 31006 + 0 + + + core + admin_applications + h_selecttemp + Select a Template + Выберите шаблон + 31006 + 31006 + 0 + + + core + admin_applications + h_onefile + You must apply at least one file to this hook. + Необходимо приложить хотя бы один файл к этому хуку. + 31006 + 31006 + 0 + + + core + admin_applications + h_saved + Your hook has been successfully saved + Хук успешно сохранен + 31006 + 31006 + 0 + + + core + admin_applications + h_nodetails + We could not find the hook you were attempting to view details for. + Хук, детали которого вы хотите просмотреть, не найден. + 31006 + 31006 + 0 + + + core + admin_applications + h_norequirements + We could not find the hook you were attempting to check the requirements for. + Хук, для которого вы хотели проверить требования, не найден. + 31006 + 31006 + 0 + + + core + admin_applications + h_tooold + Your version of IP.Board is too old to support this hook. + Ваша версия форума слишком стара для использования этого хука. + 31006 + 31006 + 0 + + + core + admin_applications + h_toonew + Your version of IP.Board is too new to support this hook. + Хук не поддерживает вашу версию форума. + 31006 + 31006 + 0 + + + core + admin_applications + h_phpold + Your PHP version is older than the minimum required version for this hook. + Используемая версия PHP не подходит для этого хука. + 31006 + 31006 + 0 + + + core + admin_applications + h_phpnew + Your PHP version is newer than the maximum allowed version for this hook. + Используемая версия PHP не подходит для этого хука. + 31006 + 31006 0 @@ -3187,1298 +3437,18 @@ h_dir_notwritable Your hooks directory is not writable. Директория hooks не имеет прав на запись - 30012 - 30012 + 31006 + 31006 0 core - admin_global - no_login_methods - Could not load any login handlers - Не удалось загрузить модули авторизации - 30005 - 30005 - 0 - - - core - admin_global - page_1_of_1 - Page 1 of 1 - Страница 1 из 1 - 30005 - 30005 - 0 - - - core - admin_global - get_help - Get Help With This Page - Помощь - 30005 - - 0 - - - core - admin_global - get_help_title - Toggles inline help, providing assistance with the features on this page. - Переключить режим отображения помощи. - 30005 - - 0 - - - core - admin_global - sort_asc - Sort in ascending order - По возрастанию - 30005 - 30005 - 0 - - - core - admin_global - sort_desc - Sort in descending order - По убыванию - 30005 - 30005 - 0 - - - core - admin_global - rebuild_sphinx -
    You should now rebuild your sphinx.conf file and upload the new one to your server.]]>
    -
    Следующим шагом вы должны внести изменения в файл sphinx.conf и загрузить его на сервер. Так же, вероятно, вам нужно будет снова перестроить поисковый индекс, чтобы изменения вступили в силу. Пожалуйста ознакомьтесь с knowledgebase article для дополнительной информации.]]>
    - 30005 - 30005 - 0 -
    - - core - admin_global - session_timeout - You have been inactive for too long and your session has timed out - Время сессии истекло из-за бездействия - 30011 - 30011 - 0 - - - core - admin_global - redirect_halt_title - Redirect Halted Due To Errors - Перенаправление остановлено из-за ошибок - 30011 - 30011 - 0 - - - core - admin_global - close_help - Close Help - Закрыть - 30005 - - 0 - - - core - admin_global - help_new_window - Open this help topic in a new window - Открыть в новом окне - 30005 - - 0 - - - core - admin_global - a_options - Options - Опции - 30005 - - 0 - - - core - admin_global - my_checkall - Check all rows - Отметить все - 30005 - - 0 - - - core - admin_global - func_security_mismatch - Security Mismatch - please go back and reload the form before attempting to submit the form / press the button again - Проблема безопасности - пожалуйста вернитесь назад обновите форму и попытайтесь отправить ее снова. - 30005 - - 0 - - - core - admin_global - or - or - или - 30005 - 30005 - 0 - - - core - admin_global - in - in - в - 30005 - - 0 - - - core - admin_global - gbl_no_info - No Information - Нет данных - 30005 - - 0 - - - core - admin_global - and - and - и - 30005 - - 0 - - - core - admin_global - ajax_please_wait - Loading Data. Please Wait... - Загрузка. Подождите... - 30005 - - 0 - - - core - admin_global - gbl_log_out - Log Out - Выйти - 30005 - - 0 - - - core - admin_global - gbl_queries - Queries - запросов - 30005 - - 0 - - - core - admin_global - gbl_view_site - Go to board - Перейти к списку форумов - 30005 - - 0 - - - core - admin_global - gbl_page_redirecting - Please wait while this action executes - Подождите, сейчас Вы будете перенаправлены - 30005 - - 0 - - - core - admin_global - redirecting_to - Redirecting to: - Перемещение: - 30005 - 30005 - 0 - - - core - admin_global - page_will_refresh - The page will refresh automatically - Страница будет обновлена автоматически - 30005 - 30005 - 0 - - - core - admin_global - refresh_dont_wait - ( Click here if you do not wish to wait ) - ( Нажмите здесь, если не хотите ждать ) - 30005 - 30005 - 0 - - - core - admin_global - gbl_initializing - Initializing... - Инициализация... - 30005 - - 0 - - - core - admin_global - gbl_system_error - System Error - Системная ошибка - 30005 - - 0 - - - core - admin_global - ipb_message - IP.Board Message - Сообщение Invision Power Board - 30005 - - 0 - - - core - admin_global - gbl_go_back - Go Back - Назад - 30005 - - 0 - - - core - admin_global - gbl_go_to_module_home - Go to Module Home - Перейти на страницу модулей - 30005 - - 0 - - - core - admin_global - gbl_go_to_dashboard - Go to Dashboard - Перейти в панель управления - 30005 - - 0 - - - core - admin_global - edit - Edit... - Изменить - 30005 - - 0 - - - core - admin_global - delete - Delete - Удалить - 30005 - - 0 - - - core - admin_global - invalid_id - Invalid ID - Неверный ID - 30005 - - 0 - - - core - admin_global - time_-9.5 - (GMT - 9:30 hours) French Polynesia - (GMT - 9:30) Французская Полинезия - 30005 - 30005 - 0 - - - core - admin_global - time_-10 - (GMT - 10:00 hours) Hawaii - (GMT - 10:00) Гавайи - 30005 - 30005 - 0 - - - core - admin_global - time_-11 - (GMT - 11:00 hours) Midway Island, Samoa - (GMT - 11:00) о.Мидуэй, Самоа - 30005 - 30005 - 0 - - - core - admin_global - time_-12 - (GMT - 12:00 hours) Enitwetok, Kwajalien - (GMT - 12:00) Эневеток, Кваджалейн - 30005 - 30005 - 0 - - - core - admin_global - no - No - Нет - 30005 - 30005 - 0 - - - core - admin_global - yes - Yes - Да - 30005 - 30005 - 0 - - - core - admin_global - DESC - Descending - По убыванию - 30005 - - 0 - - - core - admin_global - ASC - Ascending - По возрастанию - 30005 - - 0 - - - core - admin_global - time_-7 - - (GMT - 7:00) Горное время (США и Канада), Аризона - 30005 - 30005 - 0 - - - core - admin_global - time_-8 - - (GMT - 8:00) Тихоокеанское время (США и Канада), Тихуана - 30005 - 30005 - 0 - - - core - admin_global - time_-9 - (GMT - 9:00 hours) Alaska - (GMT - 9:00) Аляска - 30005 - 30005 - 0 - - - core - admin_global - time_-6 - - (GMT - 6:00) Центральное время (США и Канада), Мехико - 30005 - 30005 - 0 - - - core - admin_global - time_-5 - - (GMT - 5:00) Восточное время (США и Канада), Богота, Лима, Кито - 30005 - 30005 - 0 - - - core - admin_global - time_-4 - (GMT - 4:00 hours) Atlantic Time (Canada), Caracas, La Paz - (GMT - 4:00) Атлантическое время (Канада), Каракас, Ла Пас, Сантьяго - 30005 - 30005 - 0 - - - core - admin_global - time_-3.5 - (GMT - 3:30 hours) Newfoundland - (GMT - 3:30) Ньюфаундленд - 30005 - 30005 - 0 - - - core - admin_global - time_-3 - (GMT - 3:00 hours) Brazil, Buenos Aires, Falkland Is. - (GMT - 3:00) Бразилия, Буэнос-Айрес, Джорджтаун, Гренландия - 30005 - 30005 - 0 - - - core - admin_global - time_-2 - (GMT - 2:00 hours) Mid-Atlantic, Ascention Is., St Helena - (GMT - 2:00) Среднеатлантическое время - 30005 - 30005 - 0 - - - core - admin_global - time_1 - (GMT + 1:00 hours) Brussels, Copenhagen, Madrid, Paris - (GMT + 1:00) Амстердам, Берлин, Брюссель, Мадрид, Париж, Рим - 30005 - - 0 - - - core - admin_global - time_-1 - (GMT - 1:00 hours) Azores, Cape Verde Islands - (GMT - 1:00) Азорские о-ва, о-ва Зеленого мыса - 30005 - 30005 - 0 - - - core - admin_global - time_0 - (GMT) Casablanca, Dublin, London, Lisbon, Monrovia - (GMT) Касабланка, Дублин, Эдинбург, Лиссабон, Лондон, Монровия - 30005 - 30005 - 0 - - - core - admin_global - time_2 - (GMT + 2:00 hours) Kaliningrad, South Africa - (GMT + 2:00) Каир, Хельсинки, Калининград, Южная Африка, Варшава - 30005 - - 0 - - - core - admin_global - time_3 - (GMT + 3:00 hours) Baghdad, Riyadh, Moscow, Nairobi - (GMT + 3:00) Багдад, Эр-Рияд, Москва, Найроби - 30005 - - 0 - - - core - admin_global - time_3.5 - (GMT + 3:30 hours) Tehran - (GMT + 3:30) Тегеран - 30005 - - 0 - - - core - admin_global - time_4.5 - (GMT + 4:30 hours) Kabul - (GMT + 4:30) Кабул - 30005 - - 0 - - - core - admin_global - time_4 - (GMT + 4:00 hours) Abu Dhabi, Baku, Muscat, Tbilisi - (GMT + 4:00) Абу-Даби, Баку, Мускат, Тбилиси - 30005 - - 0 - - - core - admin_global - time_5 - (GMT + 5:00 hours) Ekaterinburg, Karachi, Tashkent - (GMT + 5:00) Екатеринбург, Исламабад, Карачи, Ташкент - 30005 - - 0 - - - core - admin_global - time_5.75 - (GMT + 5:45 hours) Kathmandu - (GMT + 5:45) Катманду - 30005 - - 0 - - - core - admin_global - time_5.5 - (GMT + 5:30 hours) Bombay, Calcutta, Madras, New Delhi - (GMT + 5:30) Бомбей, Калькутта, Мадрас, Нью-Дели - 30005 - - 0 - - - core - admin_global - time_6 - (GMT + 6:00 hours) Almaty, Bangladesh, Dhakra - (GMT + 6:00) Алма-Ата, Коломбо, Дхака, Новосибирск, Омск - 30005 - - 0 - - - core - admin_global - time_6.5 - (GMT + 6:30 hours) Yangon, Naypyidaw, Bantam - GMT + 6:30) Янгон, Найпьидо, Бантам - 30005 - - 0 - - - core - admin_global - time_8 - (GMT + 8:00 hours) Hong Kong, Perth, Singapore, Taipei - (GMT + 8:00) Пекин, Гонконг, Перт, Сингапур, Тайпей - 30005 - 30005 - 0 - - - core - admin_global - time_7 - (GMT + 7:00 hours) Bangkok, Hanoi, Jakarta - (GMT + 7:00) Бангкок, Ханой, Джакарта, Красноярск - 30005 - - 0 - - - core - admin_global - time_8.75 - (GMT + 8:45 hours) Caiguna, Eucla - (GMT + 8:45) Кейгуна, Юкла - 30005 - 30005 - 0 - - - core - admin_global - time_9.5 - (GMT + 9:30 hours) Adelaide, Darwin - (GMT + 9:30) Аделаида, Дарвин - 30005 - 30005 - 0 - - - core - admin_global - time_9 - (GMT + 9:00 hours) Osaka, Sapporo, Seoul, Tokyo, Yakutsk - (GMT + 9:00) Осака, Саппоро, Сеул, Токио, Якутск - 30005 - 30005 - 0 - - - core - admin_global - time_10.5 - (GMT + 10:30 hours) Lord Howe Island - (GMT + 10:30) Остров Лорд-Хау - 30005 - - 0 - - - core - admin_global - time_10 - (GMT + 10:00 hours) Melbourne, Papua New Guinea, Sydney - (GMT + 10:00) Канберра, Мельбурн, Гуам, Сидней, Владивосток - 30005 - - 0 - - - core - admin_global - time_11 - (GMT + 11:00 hours) Magadan, New Caledonia, Solomon Is. - (GMT + 11:00) Магадан, Новая Каледония, Соломоновы о-ва - 30005 - - 0 - - - core - admin_global - time_11.5 - (GMT + 11:30 hours) Burnt Pine, Kingston - (GMT + 11:30) Бернт Пайн, Кингстон - 30005 - - 0 - - - core - admin_global - time_12 - (GMT + 12:00 hours) Auckland, Fiji, Marshall Islands - (GMT + 12:00) Окленд, Фиджи, Камчатка, Веллингтон, Маршалловы острова - 30005 - - 0 - - - core - admin_global - time_12.75 - (GMT + 12:45 hours) Chatham Islands - (GMT + 12:45) Острова Чатем - 30005 - - 0 - - - core - admin_global - time_13 - (GMT + 13:00 hours) Kamchatka, Anadyr - (GMT + 13:00) Камчатка, Анадырь - 30005 - - 0 - - - core - admin_global - tpl_gotolast - Go to last page - Перейти к последней странице - 30005 - 30005 - 0 - - - core - admin_global - time_14 - (GMT + 14:00 hours) Kiritimati - (GMT + 14:00) Киритимати (остров Рождества) - 30005 - - 0 - - - core - admin_global - tpl_gotofirst - Go to first page - Перейти на первую страницу - 30005 - 30005 - 0 - - - core - admin_global - tpl_next - Next page - Следующая страница - 30005 - 30005 - 0 - - - core - admin_global - tpl_prev - Previous Page - Предыдущая страница - 30005 - 30005 - 0 - - - core - admin_global - M_3 - March - Март - 30005 - - 0 - - - core - admin_global - M_2 - February - Февраль - 30005 - - 0 - - - core - admin_global - M_1 - January - Январь - 30005 - - 0 - - - core - admin_global - M_4 - April - Апрель - 30005 - - 0 - - - core - admin_global - M_5 - May - Май - 30005 - - 0 - - - core - admin_global - M_6 - June - Июнь - 30005 - 30005 - 0 - - - core - admin_global - M_7 - July - Июль - 30005 - 30005 - 0 - - - core - admin_global - M_8 - August - Август - 30005 - 30005 - 0 - - - core - admin_global - M_9 - September - Сентябрь - 30005 - 30005 - 0 - - - core - admin_global - M_10 - October - Октябрь - 30005 - - 0 - - - core - admin_global - M_11 - November - Ноябрь - 30005 - - 0 - - - core - admin_global - M_12 - December - Декабрь - 30005 - - 0 - - - core - admin_global - gl_linktext - Link text - Текст ссылки - 30005 - - 0 - - - core - admin_global - gl_url - URL - Адрес (URL) - 30005 - - 0 - - - core - admin_global - gl_gotohome - Go to: Administration Home - Управление пользователями - 30005 - - 0 - - - core - admin_global - gl_imageurl - Image URL - URL изображения - 30005 - - 0 - - - core - admin_global - gl_mylink - My link - Моя ссылка - 30005 - - 0 - - - core - admin_global - gl_emailaddress - Email Address - Е-mail адрес - 30005 - 30005 - 0 - - - core - admin_global - gl_emailme - Email me - Отравить мне письмо - 30005 - 30005 - 0 - - - core - admin_global - gl_example - Example - Пример - 30005 - - 0 - - - core - admin_global - gl_update - Update - Обновить - 30005 - - 0 - - - core - admin_global - gl_cancel_edit - Cancel Source Edit - Отменить редактирование - 30005 - - 0 - - - core - admin_global - gl_mediaurl - Media URL - Ссылка на ролик - 30005 - - 0 - - - core - admin_global - gl_insertlink - Insert Link - Вставить ссылку - 30005 - - 0 - - - core - admin_global - gl_add - Add - Добавить - 30005 - - 0 - - - core - admin_global - gl_insertimage - Insert Image - Вставить изображение - 30005 - - 0 - - - core - admin_global - gl_insertemail - Insert Email - Вставить e-mail - 30005 - 30005 - 0 - - - core - admin_global - gl_insertmedia - Insert Media - Добавить ролик - 30005 - - 0 - - - core - admin_global - gl_error - Error - Ошибка - 30005 - - 0 - - - core - admin_global - gl_pleasewait - Please Wait - Пожалуйста подождите - 30005 - - 0 - - - core - admin_global - gl_loading - Loading... - Загрузка... - 30005 - - 0 - - - core - admin_global - gl_loggedinas - Logged in as - Вы вошли под учетной записью - 30005 - - 0 - - - core - admin_global - gl_ipbadminarea - IPB3 Admin Area - Админцентр IPB3 - 30005 - - 0 - - - core - admin_global - gl_logo - Logo - Логотип - 30005 - - 0 - - - core - admin_global - gl_icon - Icon - Иконка - 30005 - - 0 - - - core - admin_global - gl_system - System - Система - 30005 - - 0 - - - core - admin_global - gl_forums - Forums - Форумы - 30005 - - 0 - - - core - admin_global - gl_members - Members - Пользователи - 30005 - - 0 - - - core - admin_global - gl_lookandfeel - - Внешний вид - 30005 - - 0 - - - core - admin_global - gl_support - Support - Поддержка - 30005 - - 0 - - - core - admin_global - gl_myapps - My Apps - Приложения - 30005 - - 0 - - - core - admin_global - gl_livesearch - Live Search in ACP - Поиск по АЦ - 30005 - - 0 - - - core - admin_global - gl_downloads - Downloads - Файловый менеджер - 30005 - - 0 - - - core - admin_global - gl_blog - Blog - Блоги - 30005 - - 0 - - - core - admin_global - gl_gallery - Gallery - Галерея - 30005 - - 0 - - - core - admin_global - gl_portal - Portal - Портал - 30005 - - 0 - - - core - admin_global - gl_subsmanager - Subscriptions - Подписки - 30005 - + admin_applications + postform_badmd5 + Bad key supplied + Указан не верный ключ + 31006 + 31006 0 @@ -4487,168 +3457,498 @@ gl_getsupport Get Support Поддержка - 30005 - + 31006 + 31006 0 core admin_global - gl_password - Password - Пароль - 30005 - + gl_subsmanager + Subscriptions + Подписки + 31006 + 31006 0 core admin_global - gl_pagejump - Jump To Page - Перейти к - 30005 - + gl_blog + Blog + Блоги + 31006 + 31006 0 core admin_global - gl_manageapps - Manage Applications - Управление приложениями - 30005 - + gl_downloads + Downloads + Файловый менеджер + 31006 + 31006 0 core admin_global - gl_signinname - Sign In Name - Логин - 30005 - + gl_livesearch + Live Search in ACP + Поиск по АЦ + 31006 + 31006 0 core admin_global - gl_ipsapp - Official IPS Application - Официальные приложения - 30005 - + gl_gallery + Gallery + Галерея + 31006 + 31006 0 core admin_global - gl_resources_title - Our resource site provides free and premium skins, modifications, articles and languages for your IP.Board - На нашем сайте вы сможете найти бесплатные стили, модификации и дополнительные языковые пакеты для вашего форума. - 30005 - + gl_portal + Portal + Портал + 31006 + 31006 0 core admin_global - gl_resources - Visit IPS Resources - Посетить форумы IBR - 30005 - + gl_myapps + My Apps + Приложения + 31006 + 31006 0 core admin_global - gl_getsupport_title - Get support by submitting a ticket to our technicians - Отправьте запрос в нашу службу поддержки - 30005 - + gl_lookandfeel + + Внешний вид + 31006 + 31006 0 core admin_global - gl_signin - Log In - Вход - 30005 - + gl_support + Support + Поддержка + 31006 + 31006 0 core admin_global - no_permission - You do not have permission to access this page - У вас нет прав для доступа к этой странице - 30006 - 30006 + gl_members + Members + Пользователи + 31006 + 31006 0 core admin_global - yesno_no - No - Нет - 30006 - 30006 + gl_system + System + Система + 31006 + 31006 0 core admin_global - yesno_yes - Yes - Да - 30006 - 30006 + gl_forums + Forums + Форумы + 31006 + 31006 0 core admin_global - acp_quick_help - Quick Help - Быстрая помощь - 30006 - + gl_icon + Icon + Иконка + 31006 + 31006 0 core admin_global - redirect_page_text - Redirecting... - Перенаправление... - 30007 - 30007 + gl_ipbadminarea + IPB3 Admin Area + Админцентр IPB3 + 31006 + 31006 0 core admin_global - show_all_emotes - Show All - Все - 30011 - 30011 + gl_logo + Logo + Логотип + 31006 + 31006 0 core admin_global - tpl_islast - Last - Последняя - 30011 - 30011 + gl_loggedinas + Logged in as + Вы вошли под учетной записью + 31006 + 31006 + 0 + + + core + admin_global + gl_loading + Loading... + Загрузка... + 31006 + 31006 + 0 + + + core + admin_global + gl_pleasewait + Please Wait + Пожалуйста подождите + 31006 + 31006 + 0 + + + core + admin_global + gl_insertmedia + Insert Media + Добавить ролик + 31006 + 31006 + 0 + + + core + admin_global + gl_error + Error + Ошибка + 31006 + 31006 + 0 + + + core + admin_global + gl_insertemail + Insert Email + Вставить e-mail + 31006 + 31006 + 0 + + + core + admin_global + gl_insertlink + Insert Link + Вставить ссылку + 31006 + 31006 + 0 + + + core + admin_global + gl_insertimage + Insert Image + Вставить изображение + 31006 + 31006 + 0 + + + core + admin_global + gl_mediaurl + Media URL + Ссылка на ролик + 31006 + 31006 + 0 + + + core + admin_global + gl_update + Update + Обновить + 31006 + 31006 + 0 + + + core + admin_global + gl_cancel_edit + Cancel Source Edit + Отменить редактирование + 31006 + 31006 + 0 + + + core + admin_global + gl_add + Add + Добавить + 31006 + 31006 + 0 + + + core + admin_global + gl_emailme + Email me + Отравить мне письмо + 31006 + 31006 + 0 + + + core + admin_global + gl_example + Example + Пример + 31006 + 31006 + 0 + + + core + admin_global + gl_emailaddress + Email Address + Е-mail адрес + 31006 + 31006 + 0 + + + core + admin_global + gl_mylink + My link + Моя ссылка + 31006 + 31006 + 0 + + + core + admin_global + gl_imageurl + Image URL + URL изображения + 31006 + 31006 + 0 + + + core + admin_global + gl_url + URL + Адрес (URL) + 31006 + 31006 + 0 + + + core + admin_global + gl_linktext + Link text + Текст ссылки + 31006 + 31006 + 0 + + + core + admin_global + gl_gotohome + Go to: Administration Home + Перейти на главную админцентра + 31006 + 31006 + 0 + + + core + admin_global + M_11 + November + Ноябрь + 31006 + 31006 + 0 + + + core + admin_global + M_12 + December + Декабрь + 31006 + 31006 + 0 + + + core + admin_global + M_9 + September + Сентябрь + 31006 + 31006 + 0 + + + core + admin_global + M_10 + October + Октябрь + 31006 + 31006 + 0 + + + core + admin_global + M_7 + July + Июль + 31006 + 31006 + 0 + + + core + admin_global + M_8 + August + Август + 31006 + 31006 + 0 + + + core + admin_global + M_5 + May + Май + 31006 + 31006 + 0 + + + core + admin_global + M_6 + June + Июнь + 31006 + 31006 + 0 + + + core + admin_global + M_4 + April + Апрель + 31006 + 31006 + 0 + + + core + admin_global + M_2 + February + Февраль + 31006 + 31006 + 0 + + + core + admin_global + M_3 + March + Март + 31006 + 31006 + 0 + + + core + admin_global + tpl_prev + Previous Page + Предыдущая страница + 31006 + 31006 + 0 + + + core + admin_global + M_1 + January + Январь + 31006 + 31006 + 0 + + + core + admin_global + tpl_next + Next page + Следующая страница + 31006 + 31006 0 @@ -4657,18 +3957,868 @@ tpl_isfirst First Первая - 30011 - 30011 + 31006 + 31006 0 core admin_global - redirect_halt_continue - Continue Anyway... - Всеравно продолжить - 30011 - 30011 + tpl_islast + Last + Последняя + 31006 + 31006 + 0 + + + core + admin_global + tpl_gotofirst + Go to first page + Перейти на первую страницу + 31006 + 31006 + 0 + + + core + admin_global + tpl_gotolast + Go to last page + Перейти к последней странице + 31006 + 31006 + 0 + + + core + admin_global + time_14 + (GMT + 14:00 hours) Kiritimati + (GMT + 14:00) Киритимати (остров Рождества) + 31006 + 31006 + 0 + + + core + admin_global + time_13 + (GMT + 13:00 hours) Kamchatka, Anadyr + (GMT + 13:00) Камчатка, Анадырь + 31006 + 31006 + 0 + + + core + admin_global + time_12.75 + (GMT + 12:45 hours) Chatham Islands + (GMT + 12:45) Острова Чатем + 31006 + 31006 + 0 + + + core + admin_global + time_11.5 + (GMT + 11:30 hours) Burnt Pine, Kingston + (GMT + 11:30) Бернт Пайн, Кингстон + 31006 + 31006 + 0 + + + core + admin_global + time_12 + (GMT + 12:00 hours) Auckland, Fiji, Marshall Islands + (GMT + 12:00) Окленд, Фиджи, Камчатка, Веллингтон, Маршалловы острова + 31006 + 31006 + 0 + + + core + admin_global + time_11 + (GMT + 11:00 hours) Magadan, New Caledonia, Solomon Is. + (GMT + 11:00) Магадан, Новая Каледония, Соломоновы о-ва + 31006 + 31006 + 0 + + + core + admin_global + time_10.5 + (GMT + 10:30 hours) Lord Howe Island + (GMT + 10:30) Остров Лорд-Хау + 31006 + 31006 + 0 + + + core + admin_global + time_10 + (GMT + 10:00 hours) Melbourne, Papua New Guinea, Sydney + (GMT + 10:00) Канберра, Мельбурн, Гуам, Сидней, Владивосток + 31006 + 31006 + 0 + + + core + admin_global + time_9 + (GMT + 9:00 hours) Osaka, Sapporo, Seoul, Tokyo, Yakutsk + (GMT + 9:00) Осака, Саппоро, Сеул, Токио, Якутск + 31006 + 31006 + 0 + + + core + admin_global + time_9.5 + (GMT + 9:30 hours) Adelaide, Darwin + (GMT + 9:30) Аделаида, Дарвин + 31006 + 31006 + 0 + + + core + admin_global + time_8.75 + (GMT + 8:45 hours) Caiguna, Eucla + (GMT + 8:45) Кейгуна, Юкла + 31006 + 31006 + 0 + + + core + admin_global + time_8 + (GMT + 8:00 hours) Hong Kong, Perth, Singapore, Taipei + (GMT + 8:00) Пекин, Гонконг, Перт, Сингапур, Тайпей + 31006 + 31006 + 0 + + + core + admin_global + time_7 + (GMT + 7:00 hours) Bangkok, Hanoi, Jakarta + (GMT + 7:00) Бангкок, Ханой, Джакарта, Красноярск + 31006 + 31006 + 0 + + + core + admin_global + time_6.5 + (GMT + 6:30 hours) Yangon, Naypyidaw, Bantam + GMT + 6:30) Янгон, Найпьидо, Бантам + 31006 + 31006 + 0 + + + core + admin_global + time_5.75 + (GMT + 5:45 hours) Kathmandu + (GMT + 5:45) Катманду + 31006 + 31006 + 0 + + + core + admin_global + time_6 + (GMT + 6:00 hours) Almaty, Bangladesh, Dhakra + (GMT + 6:00) Алма-Ата, Коломбо, Дхака, Новосибирск, Омск + 31006 + 31006 + 0 + + + core + admin_global + time_5.5 + (GMT + 5:30 hours) Bombay, Calcutta, Madras, New Delhi + (GMT + 5:30) Бомбей, Калькутта, Мадрас, Нью-Дели + 31006 + 31006 + 0 + + + core + admin_global + time_5 + (GMT + 5:00 hours) Ekaterinburg, Karachi, Tashkent + (GMT + 5:00) Екатеринбург, Исламабад, Карачи, Ташкент + 31006 + 31006 + 0 + + + core + admin_global + time_4.5 + (GMT + 4:30 hours) Kabul + (GMT + 4:30) Кабул + 31006 + 31006 + 0 + + + core + admin_global + time_4 + (GMT + 4:00 hours) Abu Dhabi, Baku, Muscat, Tbilisi + (GMT + 4:00) Абу-Даби, Баку, Мускат, Тбилиси + 31006 + 31006 + 0 + + + core + admin_global + time_3.5 + (GMT + 3:30 hours) Tehran + (GMT + 3:30) Тегеран + 31006 + 31006 + 0 + + + core + admin_global + time_3 + (GMT + 3:00 hours) Baghdad, Riyadh, Moscow, Nairobi + (GMT + 3:00) Багдад, Эр-Рияд, Москва, Найроби + 31006 + 31006 + 0 + + + core + admin_global + time_1 + (GMT + 1:00 hours) Brussels, Copenhagen, Madrid, Paris + (GMT + 1:00) Амстердам, Берлин, Брюссель, Мадрид, Париж, Рим + 31006 + 31006 + 0 + + + core + admin_global + time_2 + (GMT + 2:00 hours) Kaliningrad, South Africa + (GMT + 2:00) Каир, Хельсинки, Калининград, Южная Африка, Варшава + 31006 + 31006 + 0 + + + core + admin_global + time_0 + (GMT) Casablanca, Dublin, London, Lisbon, Monrovia + (GMT) Касабланка, Дублин, Эдинбург, Лиссабон, Лондон, Монровия + 31006 + 31006 + 0 + + + core + admin_global + time_-1 + (GMT - 1:00 hours) Azores, Cape Verde Islands + (GMT - 1:00) Азорские о-ва, о-ва Зеленого мыса + 31006 + 31006 + 0 + + + core + admin_global + time_-2 + (GMT - 2:00 hours) Mid-Atlantic, Ascention Is., St Helena + (GMT - 2:00) Среднеатлантическое время + 31006 + 31006 + 0 + + + core + admin_global + time_-3 + (GMT - 3:00 hours) Brazil, Buenos Aires, Falkland Is. + (GMT - 3:00) Бразилия, Буэнос-Айрес, Джорджтаун, Гренландия + 31006 + 31006 + 0 + + + core + admin_global + time_-3.5 + (GMT - 3:30 hours) Newfoundland + (GMT - 3:30) Ньюфаундленд + 31006 + 31006 + 0 + + + core + admin_global + time_-4 + (GMT - 4:00 hours) Atlantic Time (Canada), Caracas, La Paz + (GMT - 4:00) Атлантическое время (Канада), Каракас, Ла Пас, Сантьяго + 31006 + 31006 + 0 + + + core + admin_global + time_-5 + + (GMT - 5:00) Восточное время (США и Канада), Богота, Лима, Кито + 31006 + 31006 + 0 + + + core + admin_global + time_-6 + + (GMT - 6:00) Центральное время (США и Канада), Мехико + 31006 + 31006 + 0 + + + core + admin_global + time_-7 + + (GMT - 7:00) Горное время (США и Канада), Аризона + 31006 + 31006 + 0 + + + core + admin_global + time_-9.5 + (GMT - 9:30 hours) French Polynesia + (GMT - 9:30) Французская Полинезия + 31006 + 31006 + 0 + + + core + admin_global + time_-9 + (GMT - 9:00 hours) Alaska + (GMT - 9:00) Аляска + 31006 + 31006 + 0 + + + core + admin_global + time_-8 + + (GMT - 8:00) Тихоокеанское время (США и Канада), Тихуана + 31006 + 31006 + 0 + + + core + admin_global + time_-10 + (GMT - 10:00 hours) Hawaii + (GMT - 10:00) Гавайи + 31006 + 31006 + 0 + + + core + admin_global + time_-11 + (GMT - 11:00 hours) Midway Island, Samoa + (GMT - 11:00) о.Мидуэй, Самоа + 31006 + 31006 + 0 + + + core + admin_global + time_-12 + (GMT - 12:00 hours) Enitwetok, Kwajalien + (GMT - 12:00) Эневеток, Кваджалейн + 31006 + 31006 + 0 + + + core + admin_global + ASC + Ascending + По возрастанию + 31006 + 31006 + 0 + + + core + admin_global + DESC + Descending + По убыванию + 31006 + 31006 + 0 + + + core + admin_global + yes + Yes + Да + 31006 + 31006 + 0 + + + core + admin_global + no + No + Нет + 31006 + 31006 + 0 + + + core + admin_global + delete + Delete + Удалить + 31006 + 31006 + 0 + + + core + admin_global + invalid_id + Invalid ID + Неверный ID + 31006 + 31006 + 0 + + + core + admin_global + edit + Edit... + Изменить + 31006 + 31006 + 0 + + + core + admin_global + gbl_go_back + Go Back + Назад + 31006 + 31006 + 0 + + + core + admin_global + gbl_go_to_dashboard + Go to Dashboard + Перейти в панель управления + 31006 + 31006 + 0 + + + core + admin_global + gbl_go_to_module_home + Go to Module Home + Перейти на страницу модулей + 31006 + 31006 + 0 + + + core + admin_global + gbl_initializing + Initializing... + Инициализация... + 31006 + 31006 + 0 + + + core + admin_global + ipb_message + IP.Board Message + Сообщение Invision Power Board + 31006 + 31006 + 0 + + + core + admin_global + gbl_system_error + System Error + Системная ошибка + 31006 + 31006 + 0 + + + core + admin_global + redirecting_to + Redirecting to: + Перемещение: + 31006 + 31006 + 0 + + + core + admin_global + refresh_dont_wait + ( Click here if you do not wish to wait ) + ( Нажмите здесь, если не хотите ждать ) + 31006 + 31006 + 0 + + + core + admin_global + gbl_page_redirecting + Please wait while this action executes + Подождите, сейчас Вы будете перенаправлены + 31006 + 31006 + 0 + + + core + admin_global + page_will_refresh + The page will refresh automatically + Страница будет обновлена автоматически + 31006 + 31006 + 0 + + + core + admin_global + gbl_log_out + Log Out + Выйти + 31006 + 31006 + 0 + + + core + admin_global + gbl_queries + Queries + запросов + 31006 + 31006 + 0 + + + core + admin_global + gbl_view_site + Go to board + Перейти к списку форумов + 31006 + 31006 + 0 + + + core + admin_global + ajax_please_wait + Loading Data. Please Wait... + Загрузка. Подождите... + 31006 + 31006 + 0 + + + core + admin_global + in + in + в + 31006 + 31006 + 0 + + + core + admin_global + gbl_no_info + No Information + Нет данных + 31006 + 31006 + 0 + + + core + admin_global + and + and + и + 31006 + 31006 + 0 + + + core + admin_global + or + or + или + 31006 + 31006 + 0 + + + core + admin_global + func_security_mismatch + Security Mismatch - please go back and reload the form before attempting to submit the form / press the button again + Проблема безопасности - пожалуйста вернитесь назад обновите форму и попытайтесь отправить ее снова. + 31006 + 31006 + 0 + + + core + admin_global + my_checkall + Check all rows + Отметить все + 31006 + 31006 + 0 + + + core + admin_global + a_options + Options + Опции + 31006 + 31006 + 0 + + + core + admin_global + sort_asc + Sort in ascending order + По возрастанию + 31006 + 31006 + 0 + + + core + admin_global + sort_desc + Sort in descending order + По убыванию + 31006 + 31006 + 0 + + + core + admin_global + gl_getsupport_title + Get support by submitting a ticket to our technicians + Отправьте запрос в нашу службу поддержки + 31006 + 31006 + 0 + + + core + admin_global + rebuild_sphinx +
    You should now rebuild your sphinx.conf file and upload the new one to your server.]]>
    +
    Следующим шагом вы должны внести изменения в файл sphinx.conf и загрузить его на сервер. Так же, вероятно, вам нужно будет снова перестроить поисковый индекс, чтобы изменения вступили в силу. Пожалуйста ознакомьтесь с knowledgebase article для дополнительной информации.]]>
    + 31006 + 31006 + 0 +
    + + core + admin_global + close_help + Close Help + Закрыть + 31006 + 31006 + 0 + + + core + admin_global + help_new_window + Open this help topic in a new window + Открыть в новом окне + 31006 + 31006 + 0 + + + core + admin_global + get_help_title + Toggles inline help, providing assistance with the features on this page. + Переключить режим отображения помощи. + 31006 + 31006 + 0 + + + core + admin_global + get_help + Get Help With This Page + Помощь + 31006 + 31006 + 0 + + + core + admin_global + page_1_of_1 + Page 1 of 1 + Страница 1 из 1 + 31006 + 31006 + 0 + + + core + admin_global + no_login_methods + Could not load any login handlers + Не удалось загрузить модули авторизации + 31006 + 31006 + 0 + + + core + admin_global + no_permission + You do not have permission to access this page + У вас нет прав для доступа к этой странице + 31006 + 31006 + 0 + + + core + admin_global + yesno_no + No + Нет + 31006 + 31006 + 0 + + + core + admin_global + yesno_yes + Yes + Да + 31006 + 31006 + 0 + + + core + admin_global + acp_quick_help + Quick Help + Быстрая помощь + 31006 + 31006 + 0 + + + core + admin_global + redirect_page_text + Redirecting... + Перенаправление... + 31006 + 31006 + 0 + + + core + admin_global + reset_failed_logins + Reset Failed Logins... + Сбросить неудачные попытки входа + 31006 + 31006 0 @@ -4677,8 +4827,38 @@ redirect_repeat_step Repeat this step Повторить шаг - 30011 - 30011 + 31006 + 31006 + 0 + + + core + admin_global + redirect_halt_continue + Continue Anyway... + Все равно продолжить + 31006 + 31006 + 0 + + + core + admin_global + redirect_halt_title + Redirect Halted Due To Errors + Перенаправление остановлено из-за ошибок + 31006 + 31006 + 0 + + + core + admin_global + session_timeout + You have been inactive for too long and your session has timed out + Время сессии истекло из-за бездействия + 31006 + 31006 0 @@ -4687,8 +4867,8 @@ session_mismatchip Your current IP address does not match the one in our records IP адрес не соответствует адресу в сессии администратора - 30011 - 30011 + 31006 + 31006 0 @@ -4697,18 +4877,8 @@ session_noaccess You do not have access to the administrative CP Вы не имеете доступа к панеле администратора - 30011 - 30011 - 0 - - - core - admin_global - session_invalidmid - Member ID invalid - ID пользователя неверное - 30011 - 30011 + 31006 + 31006 0 @@ -4717,358 +4887,168 @@ session_nomemberid Could not retrieve a valid member id Не удалось получить id пользователя - 30011 - 30011 + 31006 + 31006 0 core - admin_hooks - hook_cannot_load - The hook could not be loaded - Модификация не может быть загружена - 30005 - + admin_global + session_invalidmid + Member ID invalid + ID пользователя неверное + 31006 + 31006 0 core - admin_hooks - hook_setting_groups - Setting groups: - Группа настроек: - 30005 - 30005 + admin_global + optgroup_other + Other + Другие + 31006 + 31006 0 core - admin_hooks - hook_settings - Settings: - Настройки: - 30005 - 30005 + admin_global + _laquo + + + 31006 + 31006 0 core - admin_hooks - hook_no_settings - There are no settings being exported - Нет новых настроек - 30005 - 30005 + admin_global + _raquo + + + 31006 + 31006 0 core - admin_hooks - hook_from - From - От - 30005 - 30005 + admin_global + _larr + + + 31006 + 31006 0 core - admin_hooks - hook_no_language - There are no language strings being exported - Нет новых языковых конструкций - 30005 - 30005 + admin_global + _rarr + + + 31006 + 31006 0 core - admin_hooks - hook_modules - Modules: - Модули: - 30005 - 30005 + admin_global + notemplatefiletoload + Could not locate template: %s + Не удалось загрузить шаблон: %s + 31006 + 31006 0 core - admin_hooks - hook_no_modules - There are no modules being exported - Нет новых модулей - 30005 - 30005 + admin_global + gl_resources + Visit IPS Resources + Посетить форумы IBR + 31006 + 31006 0 core - admin_hooks - hook_help - Help Files: - Помощь: - 30005 - 30005 + admin_global + gl_resources_title + Our resource site provides free and premium skins, modifications, articles and languages for your IP.Board + На нашем сайте вы сможете найти бесплатные стили, модификации и дополнительные языковые пакеты для вашего форума. + 31006 + 31006 0 core - admin_hooks - hook_no_help - There are no help files being exported - Нет новых разделов помощи - 30005 - 30005 + admin_global + gl_ipsapp + Official IPS Application + Официальные приложения + 31006 + 31006 0 core - admin_hooks - hook_no_skin - There are no skin templates being exported - Нет новых шаблонов стилей - 30005 - 30005 + admin_global + gl_signinname + Sign In Name + Логин + 31006 + 31006 0 core - admin_hooks - hook_tasks - Tasks: - Задачи: - 30005 - 30005 + admin_global + gl_password + Password + Пароль + 31006 + 31006 0 core - admin_hooks - hook_no_tasks - There are no tasks being exported - Нет новых задач - 30005 - 30005 + admin_global + gl_signin + Log In + Вход + 31006 + 31006 0 core - admin_hooks - hook_db_select - Select One - Выберите - 30005 - 30005 + admin_global + gl_manageapps + Manage Applications + Управление приложениями + 31006 + 31006 0 core - admin_hooks - hook_db_create - Create Table - Создать таблицу - 30005 - + admin_global + gl_pagejump + Jump To Page + Перейти к + 31006 + 31006 0 core - admin_hooks - hook_db_alter - Alter Table - Изменить таблицу - 30005 - - 0 - - - core - admin_hooks - hook_db_update - Update Data - Обновить данные - 30005 - 30005 - 0 - - - core - admin_hooks - hook_no_db - There are no database changes being exported - Нет изменений в базе данных - 30005 - 30005 - 0 - - - core - admin_hooks - hook_db_drop - Remove a Column - Удалить столбец - 30005 - - 0 - - - core - admin_hooks - hook_db_change - Change a Column - Изменить столбец - 30005 - - 0 - - - core - admin_hooks - hook_db_addnew - Add New Column - Добавить столбец - 30005 - - 0 - - - core - admin_hooks - hook_db_insert - Insert Data - Вставить данные - 30005 - 30005 - 0 - - - core - admin_hooks - hook_admin_module - (ADMIN) - (АДМИН) - 30005 - - 0 - - - core - admin_hooks - hook_no_custom - There is no custom install/uninstall script configured - Нет специального скрипта установки/удаления - 30005 - 30005 - 0 - - - core - admin_hooks - hook_public_module - (PUBLIC) - (ПОЛЬЗ) - 30005 - 30005 - 0 - - - core - admin_hooks - desc_newtable - Specify the new table name (no prefix) - Введите название новой таблицы (без префикса) - 30005 - - 0 - - - core - admin_hooks - desc_tabletype - Specify the table type (e.g. myisam or innodb) - Введите тип новой таблицы (напр-р, myisam, innodb) - 30005 - - 0 - - - core - admin_hooks - desc_field - Specify the field name - Введите название поля - 30005 - - 0 - - - core - admin_hooks - desc_altertype - Specify the type of alter statement - Введите - 30005 - - 0 - - - core - admin_hooks - desc_definition - Specify the field definition (e.g. varchar(255)) - Введите тип поля (например varchar(255)) - 30005 - - 0 - - - core - admin_hooks - desc_fieldnames - Specify the fields and indexes to add to the table, just as they appear in a SQL create table statement - Укажите какие поля и индексы необходимо добавить в таблицу, чтобы они появились в ее структуре - 30005 - - 0 - - - core - admin_hooks - desc_changefield - (Only if this is a change alter) specify the new field name - (В случае если происходит изменение) укажите новое имя поля - 30005 - - 0 - - - core - admin_hooks - desc_defaultvalue - Specify the default value - Укажите значение по-умолчанию - 30005 - - 0 - - - core - admin_hooks - desc_newvalue - Specify the new value - Укажите новое значение - 30005 - - 0 - - - core - admin_hooks - desc_data - Specify data to insert in format of column=value, column=value - Укажите данные для добавления в формате столбец=значение, столбец=значение - 30005 - + admin_global + show_all_emotes + Show All + Все + 31006 + 31006 0 @@ -5077,18 +5057,18 @@ desc_where Specify an optional where clause if needed Укажите значение выражения WHERE если это необходимо - 30005 - + 31006 + 31006 0 core admin_hooks - desc_revert - - - 30005 - + desc_newvalue + Specify the new value + Укажите новое значение + 31006 + 31006 0 @@ -5097,8 +5077,138 @@ desc_oldvalue Specify the old value (useful to revert data during uninstall) Укажите старое значение (удобно для восстановления состояния системы при удалении мода) - 30005 - + 31006 + 31006 + 0 + + + core + admin_hooks + desc_definition + Specify the field definition (e.g. varchar(255)) + Введите тип поля (например varchar(255)) + 31006 + 31006 + 0 + + + core + admin_hooks + desc_defaultvalue + Specify the default value + Укажите значение по умолчанию + 31006 + 31006 + 0 + + + core + admin_hooks + desc_changefield + (Only if this is a change alter) specify the new field name + (В случае если происходит изменение) укажите новое имя поля + 31006 + 31006 + 0 + + + core + admin_hooks + desc_field + Specify the field name + Введите название поля + 31006 + 31006 + 0 + + + core + admin_hooks + desc_altertype + Specify the type of alter statement + Введите тип изменяющего выражения + 31006 + 31006 + 0 + + + core + admin_hooks + desc_tabletype + Specify the table type (e.g. myisam or innodb) + Введите тип новой таблицы (напр-р, myisam, innodb) + 31006 + 31006 + 0 + + + core + admin_hooks + desc_fieldnames + Specify the fields and indexes to add to the table, just as they appear in a SQL create table statement + Укажите какие поля и индексы необходимо добавить в таблицу, чтобы они появились в ее структуре + 31006 + 31006 + 0 + + + core + admin_hooks + desc_existtable + Specify the table name (no prefix) + Введите название таблицы (без префикса) + 31006 + 31006 + 0 + + + core + admin_hooks + desc_newtable + Specify the new table name (no prefix) + Введите название новой таблицы (без префикса) + 31006 + 31006 + 0 + + + core + admin_hooks + hook_reenable_all + Reenabled all hooks + Хуки включены + 31006 + 31006 + 0 + + + core + admin_hooks + hook_disable_all_none + There were no active hooks to disable + Нет активных хуков для отключения + 31006 + 31006 + 0 + + + core + admin_hooks + hook_disabled_all + Disabled all hooks + Отключены все хуки + 31006 + 31006 + 0 + + + core + admin_hooks + hook_public_module + (PUBLIC) + (ПОЛЬЗ) + 31006 + 31006 0 @@ -5106,809 +5216,549 @@ admin_hooks hook_disabled The hook has been disabled - Модификация отключена - 30011 - 30011 + Хук отключен + 31006 + 31006 + 0 + + + core + admin_hooks + hook_admin_module + (ADMIN) + (АДМИН) + 31006 + 31006 + 0 + + + core + admin_hooks + hook_no_custom + There is no custom install/uninstall script configured + Нет специального скрипта установки/удаления + 31006 + 31006 + 0 + + + core + admin_hooks + hook_no_db + There are no database changes being exported + Нет изменений в базе данных + 31006 + 31006 + 0 + + + core + admin_hooks + hook_db_change + Change a Column + Изменить столбец + 31006 + 31006 + 0 + + + core + admin_hooks + hook_db_drop + Remove a Column + Удалить столбец + 31006 + 31006 + 0 + + + core + admin_hooks + hook_db_insert + Insert Data + Вставить данные + 31006 + 31006 + 0 + + + core + admin_hooks + hook_db_addnew + Add New Column + Добавить столбец + 31006 + 31006 + 0 + + + core + admin_hooks + hook_db_alter + Alter Table + Изменить таблицу + 31006 + 31006 + 0 + + + core + admin_hooks + hook_db_update + Update Data + Обновить данные + 31006 + 31006 + 0 + + + core + admin_hooks + hook_db_create + Create Table + Создать таблицу + 31006 + 31006 + 0 + + + core + admin_hooks + hook_no_css + There are no CSS files being exported + Нет CSS файлов для экспорта + 31006 + 31006 + 0 + + + core + admin_hooks + hook_db_select + Select One + Выберите + 31006 + 31006 + 0 + + + core + admin_hooks + hook_no_tasks + There are no tasks being exported + Нет новых задач + 31006 + 31006 + 0 + + + core + admin_hooks + hook_tasks + Tasks: + Задачи: + 31006 + 31006 + 0 + + + core + admin_hooks + hook_css + CSS Files: + CSS файлы: + 31006 + 31006 + 0 + + + core + admin_hooks + hook_no_skin + There are no skin templates being exported + Нет новых шаблонов стилей + 31006 + 31006 + 0 + + + core + admin_hooks + hook_no_help + There are no help files being exported + Нет новых разделов помощи + 31006 + 31006 + 0 + + + core + admin_hooks + hook_no_modules + There are no modules being exported + Нет новых модулей + 31006 + 31006 + 0 + + + core + admin_hooks + hook_help + Help Files: + Помощь: + 31006 + 31006 + 0 + + + core + admin_hooks + hook_modules + Modules: + Модули: + 31006 + 31006 + 0 + + + core + admin_hooks + hook_no_language + There are no language strings being exported + Нет новых языковых конструкций + 31006 + 31006 + 0 + + + core + admin_hooks + hook_from + From + От + 31006 + 31006 + 0 + + + core + admin_hooks + hook_settings + Settings: + Настройки: + 31006 + 31006 + 0 + + + core + admin_hooks + hook_no_settings + There are no settings being exported + Нет новых настроек + 31006 + 31006 + 0 + + + core + admin_hooks + hook_setting_groups + Setting groups: + Группа настроек: + 31006 + 31006 + 0 + + + core + admin_hooks + addanotherchange + Add Another Change + Добавить другие изменения + 31006 + 31006 + 0 + + + core + admin_hooks + hook_cannot_load + The hook could not be loaded + Хук не может быть загружен + 31006 + 31006 + 0 + + + core + admin_hooks + addanothertemplate + Add Another Template + Добавить другой шаблон + 31006 + 31006 + 0 + + + core + admin_hooks + selectone + Select One + Выберите один + 31006 + 31006 + 0 + + + core + admin_hooks + adddbchanges + Add Database Changes + Добавить изменение базы + 31006 + 31006 + 0 + + + core + admin_hooks + nomodifyset + Now modify the settings + Сейчас измените настройки + 31006 + 31006 + 0 + + + core + admin_hooks + addtemplates + Add Templates + Добавить шаблоны + 31006 + 31006 + 0 + + + core + admin_hooks + hookssavebutton + Save + Сохранить + 31006 + 31006 + 0 + + + core + admin_hooks + addanotherfile + Add Another File + Добавить другой файл + 31006 + 31006 + 0 + + + core + admin_hooks + nowselectbits + Now select template bits to add + Сейчас выберите шаблоны для добавления + 31006 + 31006 + 0 + + + core + admin_hooks + addtasks + Add Tasks + Добавить задачи + 31006 + 31006 + 0 + + + core + admin_hooks + oneormtasks + Select one or more tasks to export (do not forget to include the task PHP file for the user to upload) + Выберите одну или несколько задач для экспорта (не забудьте включить задачу в PHP файл для загрузки пользователем) + 31006 + 31006 + 0 + + + core + admin_hooks + nowselectstrings + Now select strings to add + Сейчас выберите строки для добавления + 31006 + 31006 + 0 + + + core + admin_hooks + addlanguage + Add Language + Добавить язык + 31006 + 31006 + 0 + + + core + admin_hooks + selectoneormorehelp + Select one or more help files to export + Выберите один или несколько файлов помощи для экспорта + 31006 + 31006 + 0 + + + core + admin_hooks + addhelpfiles + Add Help Files + Добавить файлы помощи + 31006 + 31006 + 0 + + + core + admin_hooks + pathcustomscript + + + 31006 + 31006 + 0 + + + core + admin_hooks + addcustomscript + Add Custom Script + Добавить пользовательский скрипт + 31006 + 31006 + 0 + + + core + admin_hooks + exportmodules + Select one or more modules to export + Выберите один или несколько модулей для экспорта + 31006 + 31006 + 0 + + + core + admin_hooks + addmodules + Add Modules + Добавить модуль + 31006 + 31006 + 0 + + + core + admin_hooks + indivsettingsex + Select one or more individual settings to export (any necessary group data will be included). If you need to export all settings in a group, use the previous option instead. + Выберете одну или несколько индивидуальных настроек для экспорта (все необходимые данные группы будут включены). Если необходимо экспортировать все настройки группы используйте предыдущую опцию. + 31006 + 31006 + 0 + + + core + admin_hooks + exportonesettings + Select one or more setting groups to export (all settings in the group will be exported) + Выберите одну или несколько настроек групп для экспорта (все настройки группы будут экспортированы) + 31006 + 31006 + 0 + + + core + admin_hooks + addsettings + Add Settings + Добавить настройки + 31006 + 31006 + 0 + + + core + admin_hooks + selectoneomorecss + Select one or more css files to export + Выберите один или несколько css файлов для экспорта + 31006 + 31006 + 0 + + + core + admin_hooks + selectafile + Select a File + Выберите файл + 31006 + 31006 + 0 + + + core + admin_hooks + addcss + Add CSS + Добавить CSS + 31006 + 31006 + 0 + + + core + admin_hooks + desc_data + Specify data to insert in format of column=value, column=value + Укажите данные для добавления в формате столбец=значение, столбец=значение + 31006 + 31006 + 0 + + + core + admin_hooks + desc_revert + + + 31006 + 31006 0 core admin_js - bit_skin_calendar - Calendar - Календарь - 30005 - - 1 - - - core - admin_js - bit_skin_boards - Board Index - Список форумов - 30005 - - 1 - - - core - admin_js - bit_skin_editors - Editor - Редактор сообщений - 30005 - - 1 - - - core - admin_js - bit_skin_emails - Emails - Система e-mail - 30005 - 30005 - 1 - - - core - admin_js - bit_skin_help - Help - Помощь - 30005 - - 1 - - - core - admin_js - bit_skin_global_other - Other Global Templates - Прочие - 30005 - - 1 - - - core - admin_js - bit_skin_global - Global Templates - Глобальные - 30005 - - 1 - - - core - admin_js - bit_skin_forum - Forum View - Список тем форума - 30005 - - 1 - - - core - admin_js - bit_skin_legends - Legends - Попапы BBкодов и смайликов - 30005 - - 1 - - - core - admin_js - bit_skin_login - Login Screen - Страница входа - 30005 - - 1 - - - core - admin_js - bit_skin_messaging - Messenger - Личные сообщения - 30005 - - 1 - - - core - admin_js - bit_skin_mlist - Member List - Список пользователей - 30005 - - 1 - - - core - admin_js - bit_skin_mod - Moderation - Система модерации - 30005 - - 1 - - - core - admin_js - bit_skin_online - Online List - Кто в онлайн - 30005 - - 1 - - - core - admin_js - bit_skin_poll - Polls - Опросы - 30005 - - 1 - - - core - admin_js - bit_skin_portal - Portal - Портал - 30005 - - 1 - - - core - admin_js - bit_skin_post - Post Screen - Страница отправки тем/сообщений - 30005 - - 1 - - - core - admin_js - bit_skin_printpage - Print View - Версия для печати - 30005 - - 1 - - - core - admin_js - bit_skin_profile - Profiles - Профили пользователей - 30005 - - 1 - - - core - admin_js - bit_skin_register - Registration Screen - Регистрация - 30005 - - 1 - - - core - admin_js - bit_skin_reports - Report Center - Система жалоб - 30005 - - 1 - - - core - admin_js - bit_skin_search - Search - Поиск - 30005 - - 1 - - - core - admin_js - bit_skin_stats - Statistics - Статистика - 30005 - - 1 - - - core - admin_js - bit_skin_subscriptions - Subscription Manager - Менеджер подписок - 30005 - - 1 - - - core - admin_js - bit_skin_topic - Topic View - Темы - 30005 - - 1 - - - core - admin_js - bit_skin_ucp - User Control Panel - Панель пользователя - 30005 - 30005 - 1 - - - core - admin_js - bit_skin_blog_actions - (Blog) Actions - (Блог) Действия - 30005 - - 1 - - - core - admin_js - bit_skin_blog_cblocks - (Blog) Content Blocks - (Блог) Дополнительные блоки - 30005 - - 1 - - - core - admin_js - bit_skin_blog_global - (Blog) Global - (Блог) Общие - 30005 - - 1 - - - core - admin_js - bit_skin_blog_list - (Blog) Listing - (Блог) Список - 30005 - - 1 - - - core - admin_js - bit_skin_blog_portal - (Blog) Portal Plugin - (Блог) Дополнение портала - 30005 - - 1 - - - core - admin_js - bit_skin_blog_post - (Blog) Post Screen - (Блог) Экран сообщения - 30005 - - 1 - - - core - admin_js - bit_skin_blog_show - (Blog) Blog View - (Блог) Просмотр блога - 30005 - - 1 - - - core - admin_js - bit_skin_blog_trackback - (Blog) Trackbacks - (Блог) Трекбеки - 30005 - - 1 - - - core - admin_js - bit_skin_blog_xml - (Blog) XML Output - (Блог) Вывод XML - 30005 - - 1 - - - core - admin_js - bit_skin_chatpara - (Chat) Parachat - (Чат) Parachat - 30005 - - 1 - - - core - admin_js - bit_skin_blog_ucp - (Blog) User Control Panel - (Блог) Панель управления пользователя - 30005 - - 1 - - - core - admin_js - bit_skin_chatsigma - (Chat) Sigmachat - (Чат) Sigmachat - 30005 - - 1 - - - core - admin_js - bit_skin_downloads - (Downloads) Download Manager - (Файлы) Файловый архив - 30005 - - 1 - - - core - admin_js - bit_skin_downloads_external - (Downloads) External Downloads - (Файлы) Внешние файлы - 30005 - - 1 - - - core - admin_js - bit_skin_downloads_submit - (Downloads) Submit Download - (Файлы) Загрузка файла - 30005 - - 1 - - - core - admin_js - bit_skin_downloads_ucp - (Downloads) User Control Panel - (Файлы) Панель пользователя - 30005 - - 1 - - - core - admin_js - bit_skin_gallery_albums - (Gallery) Albums - (Галерея) Альбомы - 30005 - - 1 - - - core - admin_js - bit_skin_gallery_cats - (Gallery) Categories - (Галерея) Категории - 30005 - - 1 - - - core - admin_js - bit_skin_gallery_comments - (Gallery) Comments - (Галерея) Комментарии - 30005 - - 1 - - - core - admin_js - bit_skin_gallery_favs - (Gallery) Favorites - (Галерея) Избранное - 30005 - - 1 - - - core - admin_js - bit_skin_gallery_global - (Gallery) Global - (Галерея) Общие - 30005 - - 1 - - - core - admin_js - bit_skin_gallery_imagelisting - (Gallery) Image Listing - (Галерея) Список изображений - 30005 - - 1 - - - core - admin_js - bit_skin_gallery_user - (Gallery) View User - (Галерея) Просмотр пользователя - 30005 - - 1 - - - core - admin_js - bit_skin_gallery_img - (Gallery) Show Image - (Галерея) Просмотр изображения - 30005 - - 1 - - - core - admin_js - bit_skin_gallery_post - (Gallery) Post Image - (Галерея) Добавление изображения - 30005 - - 1 - - - core - admin_js - a_outerpost - after the end of the foreach statement - после конструкции foreach - 30006 - - 1 - - - core - admin_js - a_innerpost - before the end of the foreach statement - перед концом конструкции foreach - 30006 - - 1 - - - core - admin_js - a_postelse - after the start of the else statement - после начала конструкции else - 30006 - - 1 - - - core - admin_js - a_preendif - before the end of the if statement - перед концом конструкции if - 30006 - - 1 - - - core - admin_js - a_postendif - after the end of the if statement - после конструкции if - 30006 - - 1 - - - core - admin_js - a_outerpre - before the start of the foreach statement - перед началом конструкции foreach - 30006 - - 1 - - - core - admin_js - a_innerpre - after the start of the foreach statement - после начала конструкции foreach - 30006 - - 1 - - - core - admin_js - a_preelse - before the start of the else statement - перед началом конструкции else - 30006 - - 1 - - - core - admin_js - a_poststartif - after the start of the if statement - после начала конструкции if - 30006 - - 1 - - - core - admin_js - a_prestartif - before the start of the if statement - перед началом конструкции if - 30006 - - 1 - - - core - admin_js - hook_hookid - - ID модификации - 30006 - 30006 - 1 - - - core - admin_js - hook_temptype - Type of template hook - Тип модификации шаблона - 30006 - 30006 - 1 - - - core - admin_js - hook_skinfunc - The skin function this hook is in - Шаблон, в котором находится модификация - 30006 - 30006 - 1 - - - core - admin_js - hook_extends - The class this file extends - Класс расширяемый этим файлом - 30006 - 30006 - 1 - - - core - admin_js - hook_skingroup - The skin group this hook is in - Группа шаблонов, к которой принадлежит модификация - 30006 - 30006 - 1 - - - core - admin_js - hook_filetype_template - Template hook - Модификация шаблона - 30006 - 30006 - 1 - - - core - admin_js - hook_filetype_skin - Skin overloader - Перезагрузчик стиля - 30006 - 30006 - 1 - - - core - admin_js - hook_classname - - Имя класса - 30006 - 30006 - 1 - - - core - admin_js - hook_filename - File name in hooks directory - Имя файла в директории модификации - 30006 - 30006 - 1 - - - core - admin_js - hook_filetype - - Тип файла модификации - 30006 - 30006 - 1 - - - core - admin_js - hook_filetype_select - Select One - Выберите - 30006 - 30006 - 1 - - - core - admin_js - hook_filetype_action - Action overloader - Перезагрузчик действия - 30006 - 30006 - 1 - - - core - admin_js - ua_exists - User Agent Exists - Такой User Agent уже существует - 30011 - 30011 - 1 - - - core - admin_js - forums_showmod - Show Moderator Options - Показать модераторские опции - 30011 - 30011 - 1 - - - core - admin_js - forums_hidemod - Hide Moderator Options - Скрыть модераторские опции - 30011 - 30011 - 1 - - - core - admin_js - ua_error_save2 - An error occurred while saving this user agent: - Произошла ошибка при сохранении User Agent: - 30011 - 30011 - 1 - - - core - admin_js - ua_form_incomplete - You must complete: User Agent Name, User Agent Key and Regex - Необходимо заполнить: Навзание User Agent, Ключ и Регулярное выражение - 30011 - 30011 - 1 - - - core - admin_js - ua_error_save - An error occurred while saving this user agent - Произошла ошибка при сохранении User Agent - 30011 - 30011 - 1 - - - core - admin_js - ua_error_remove2 - There was an error deleting this user agent: - Произошла ошибка при удалении User Agent: - 30011 - 30011 + ua_add_string + Add User Agent + Добавить User Agent + 31006 + 31006 1 @@ -5917,28 +5767,8 @@ ua_edit_string Edit User Agent Изменить User Agent - 30011 - 30011 - 1 - - - core - admin_js - ua_add_string - Add User Agent - Добавить User Agent - 30011 - 30011 - 1 - - - core - admin_js - ua_perm_remove - Are you sure you want to permanently remove this User Agent? - Вы действительно хотите удалить этот User Agent? - 30011 - 30011 + 31006 + 31006 1 @@ -5947,18 +5777,38 @@ ua_error_remove There was an error deleting this user agent Произошла ошибка при удалении User Agent - 30011 - 30011 + 31006 + 31006 1 core admin_js - cannot_compare_templates - You do not have permission to compare templates. - Вы не можете сравнивать шаблоны. - 30011 - 30011 + ua_error_remove2 + There was an error deleting this user agent: + Произошла ошибка при удалении User Agent: + 31006 + 31006 + 1 + + + core + admin_js + sk_error + Error: + Ошибка: + 31006 + 31006 + 1 + + + core + admin_js + ua_perm_remove + Are you sure you want to permanently remove this User Agent? + Вы действительно хотите удалить этот User Agent? + 31006 + 31006 1 @@ -5967,8 +5817,18 @@ cannot_compare_css You do not have permission to compare CSS files. Вы не можете сравнивать CSS файлы. - 30011 - 30011 + 31006 + 31006 + 1 + + + core + admin_js + cannot_compare_templates + You do not have permission to compare templates. + Вы не можете сравнивать шаблоны. + 31006 + 31006 1 @@ -5977,48 +5837,8 @@ unsaved_css_warn This css file has unsaved changes! Are you sure you want to close it? CSS файл имеет не сохраненные изменения! Вы действительно хотите закрыть его? - 30011 - 30011 - 1 - - - core - admin_js - unsaved_template_war - This template bit has unsaved changes! Are you sure you want to close it? - Шаблон имеет не сохраненные изменения! Вы действительно хотите закрыть его? - 30011 - 30011 - 1 - - - core - admin_js - revert_mesg - Reverting... - Отмена... - 30011 - 30011 - 1 - - - core - admin_js - tpl_savingproperties - Saving properties... - Сохранение настроек... - 30011 - 30011 - 1 - - - core - admin_js - tpl_savingvars - Saving variables... - Сохранение переменных... - 30011 - 30011 + 31006 + 31006 1 @@ -6027,8 +5847,48 @@ tpl_savegeneric Saving... Сохранение... - 30011 - 30011 + 31006 + 31006 + 1 + + + core + admin_js + unsaved_template_war + This template bit has unsaved changes! Are you sure you want to close it? + Шаблон имеет не сохраненные изменения! Вы действительно хотите закрыть его? + 31006 + 31006 + 1 + + + core + admin_js + tpl_savingvars + Saving variables... + Сохранение переменных... + 31006 + 31006 + 1 + + + core + admin_js + revert_mesg + Reverting... + Отмена... + 31006 + 31006 + 1 + + + core + admin_js + tpl_savingproperties + Saving properties... + Сохранение настроек... + 31006 + 31006 1 @@ -6037,18 +5897,8 @@ revert_css_file Are you sure you want to remove ALL customizations to this CSS file in this set? THIS CANNOT BE UNDONE. Вы действительно хотите отменить все изменения в CSS для этого стиля? ОПЕРАЦИЯ НЕ МОЖЕТ БЫТЬ ОТМЕНЕНА - 30011 - 30011 - 1 - - - core - admin_js - delete_css_file - Are you sure that you want to delete this CSS file from this set and all child sets? - Вы действительно хотите удалить этот CSS файл из этого стиля и всех его наследников? - 30011 - 30011 + 31006 + 31006 1 @@ -6057,8 +5907,8 @@ revert_template_bit Are you sure you want to remove ALL customizations to this bit in this set? THIS CANNOT BE UNDONE. Вы действительно хотите отменить все изменения в шаблонах для этого стиля? ОПЕРАЦИЯ НЕ МОЖЕТ БЫТЬ ОТМЕНЕНА - 30011 - 30011 + 31006 + 31006 1 @@ -6067,58 +5917,18 @@ delete_template_bit Are you sure you want to delete this template bit from this set and all child sets? THIS CANNOT BE UNDONE. Вы действительно хотите удалить этот шаблон из стиля и всех его наследников? ДЕЙСТВИЕ НЕ МОЖЕТ БЫТЬ ОТМЕНЕНО. - 30011 - 30011 + 31006 + 31006 1 core admin_js - templates_servererror - The server returned an error: - Сервер сообщил об ошибке: - 30011 - 30011 - 1 - - - core - admin_js - templates_error_add2 - There was an error adding this template bit: - Произошла ошибка при добавлении шаблона: - 30011 - 30011 - 1 - - - core - admin_js - templates_error_group - An error occurred generating the template groups - Произошла ошибка при создании групп шаблонов - 30011 - 30011 - 1 - - - core - admin_js - templates_noblank - The template name cannot be blank - Имя шаблона не может быть пустым - 30011 - 30011 - 1 - - - core - admin_js - templates_navigate - - Переход с данной страницы приведет к потере всех сделанных вами изменений. Продолжить? - 30011 - 30011 + delete_css_file + Are you sure that you want to delete this CSS file from this set and all child sets? + Вы действительно хотите удалить этот CSS файл из этого стиля и всех его наследников? + 31006 + 31006 1 @@ -6127,8 +5937,28 @@ templates_blankcss The css name cannot be blank Имя CSS не может быть пустым - 30011 - 30011 + 31006 + 31006 + 1 + + + core + admin_js + templates_servererror + The server returned an error: + Сервер сообщил об ошибке: + 31006 + 31006 + 1 + + + core + admin_js + templates_navigate + + Переход с данной страницы приведет к потере всех сделанных вами изменений. Продолжить? + 31006 + 31006 1 @@ -6137,38 +5967,38 @@ templates_loading Loading... Загрузка... - 30011 - 30011 + 31006 + 31006 1 core admin_js - ok_to_delete - PLEASE CONFIRM:\nOK to proceed with delete? - Нажмите ОК, для подтверждения удаления. - 30011 - 30011 + templates_noblank + The template name cannot be blank + Имя шаблона не может быть пустым + 31006 + 31006 1 core admin_js - page_multijump - Please enter a page number to jump to between 1 and - Введите номер страницы для перехода к ней - 30011 - 30011 + templates_error_group + An error occurred generating the template groups + Произошла ошибка при создании групп шаблонов + 31006 + 31006 1 core admin_js - templates_adding - Adding... - Добавление... - 30011 - 30011 + templates_error_add2 + There was an error adding this template bit: + Произошла ошибка при добавлении шаблона: + 31006 + 31006 1 @@ -6177,58 +6007,918 @@ templates_error_add There was an error adding this template bit Произошла ошибка при добавлении шаблона - 30011 - 30011 + 31006 + 31006 1 core - admin_login - no_acp_access - You do not have permission to access the ACP - У вас не достаточно прав для доступа в админ-центр - 30005 - 30005 - 0 + admin_js + templates_adding + Adding... + Добавление... + 31006 + 31006 + 1 core - admin_login - bad_email_password - Your login credentials were not valid - Введенные данные неверны - 30005 - 30005 - 0 + admin_js + page_multijump + Please enter a page number to jump to between 1 and + Введите номер страницы для перехода к ней + 31006 + 31006 + 1 core - admin_login - login_successful - Log in successful - Вы вошли - 30005 - 30005 - 0 + admin_js + ok_to_delete + PLEASE CONFIRM:\nOK to proceed with delete? + Нажмите ОК, для подтверждения удаления. + 31006 + 31006 + 1 core - admin_login - ipb_login - Invision Power Board: Log in - Invision Power Board: Вход - 30005 - 30005 - 0 + admin_js + a_outerpost + after the end of the foreach statement + после конструкции foreach + 31006 + 31006 + 1 core - admin_login - logout_complete - Log out complete - Вы вышли - 30005 - 30005 + admin_js + a_innerpost + before the end of the foreach statement + перед концом конструкции foreach + 31006 + 31006 + 1 + + + core + admin_js + a_innerpre + after the start of the foreach statement + после начала конструкции foreach + 31006 + 31006 + 1 + + + core + admin_js + a_outerpre + before the start of the foreach statement + перед началом конструкции foreach + 31006 + 31006 + 1 + + + core + admin_js + a_postendif + after the end of the if statement + после конструкции if + 31006 + 31006 + 1 + + + core + admin_js + a_preendif + before the end of the if statement + перед концом конструкции if + 31006 + 31006 + 1 + + + core + admin_js + a_postelse + after the start of the else statement + после начала конструкции else + 31006 + 31006 + 1 + + + core + admin_js + a_preelse + before the start of the else statement + перед началом конструкции else + 31006 + 31006 + 1 + + + core + admin_js + a_poststartif + after the start of the if statement + после начала конструкции if + 31006 + 31006 + 1 + + + core + admin_js + hook_hookid + + ID хука + 31006 + 31006 + 1 + + + core + admin_js + a_prestartif + before the start of the if statement + перед началом конструкции if + 31006 + 31006 + 1 + + + core + admin_js + hook_tempposi + Position of template hook + Расположение хука + 31006 + 31006 + 1 + + + core + admin_js + hook_skinfunc + The skin function this hook is in + Шаблон, в котором находится хук + 31006 + 31006 + 1 + + + core + admin_js + hook_temptype + Type of template hook + Тип хука для шаблона + 31006 + 31006 + 1 + + + core + admin_js + hook_data_location + Data Location + Расположение данных + 31006 + 31006 + 1 + + + core + admin_js + hook_extends + The class this file extends + Класс расширяемый этим файлом + 31006 + 31006 + 1 + + + core + admin_js + hook_skingroup + The skin group this hook is in + Группа шаблонов, к которой принадлежит хук + 31006 + 31006 + 1 + + + core + admin_js + hook_filetype_data + Data hook + Хук для данных + 31006 + 31006 + 1 + + + core + admin_js + hook_filetype_library + Library hook + Хук для библиотеки + 31006 + 31006 + 1 + + + core + admin_js + hook_filetype_template + Template hook + Хук для шаблона + 31006 + 31006 + 1 + + + core + admin_js + hook_filetype_skin + Skin overloader + Перезагрузчик стиля + 31006 + 31006 + 1 + + + core + admin_js + hook_filetype_select + Select One + Выберите + 31006 + 31006 + 1 + + + core + admin_js + hook_filetype_action + Action overloader + Перезагрузчик действия + 31006 + 31006 + 1 + + + core + admin_js + hook_filetype + + Тип файла хука + 31006 + 31006 + 1 + + + core + admin_js + hook_classname + + Имя класса + 31006 + 31006 + 1 + + + core + admin_js + hook_filename + File name in hooks directory + Имя файла в директории хука + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_gallery_user + (Gallery) View User + (Галерея) Просмотр пользователя + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_gallery_post + (Gallery) Post Image + (Галерея) Добавление изображения + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_gallery_img + (Gallery) Show Image + (Галерея) Просмотр изображения + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_gallery_imagelisting + (Gallery) Image Listing + (Галерея) Список изображений + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_gallery_global + (Gallery) Global + (Галерея) Общие + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_gallery_comments + (Gallery) Comments + (Галерея) Комментарии + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_gallery_favs + (Gallery) Favorites + (Галерея) Избранное + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_gallery_cats + (Gallery) Categories + (Галерея) Категории + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_gallery_albums + (Gallery) Albums + (Галерея) Альбомы + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_downloads_ucp + (Downloads) User Control Panel + (Файлы) Панель пользователя + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_downloads_submit + (Downloads) Submit Download + (Файлы) Загрузка файла + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_downloads_external + (Downloads) External Downloads + (Файлы) Внешние файлы + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_downloads + (Downloads) Download Manager + (Файлы) Файловый архив + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_chatsigma + (Chat) Sigmachat + (Чат) Sigmachat + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_chatpara + (Chat) Parachat + (Чат) Parachat + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_blog_xml + (Blog) XML Output + (Блог) Вывод XML + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_blog_ucp + (Blog) User Control Panel + (Блог) Панель управления пользователя + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_blog_trackback + (Blog) Trackbacks + (Блог) Трекбеки + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_blog_show + (Blog) Blog View + (Блог) Просмотр блога + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_blog_post + (Blog) Post Screen + (Блог) Экран сообщения + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_blog_portal + (Blog) Portal Plugin + (Блог) Дополнение портала + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_blog_list + (Blog) Listing + (Блог) Список + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_blog_global + (Blog) Global + (Блог) Общие + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_blog_cblocks + (Blog) Content Blocks + (Блог) Дополнительные блоки + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_blog_actions + (Blog) Actions + (Блог) Действия + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_ucp + User Control Panel + Панель пользователя + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_topic + Topic View + Темы + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_subscriptions + Subscription Manager + Менеджер подписок + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_stats + Statistics + Статистика + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_search + Search + Поиск + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_reports + Report Center + Система жалоб + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_register + Registration Screen + Регистрация + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_profile + Profiles + Профили пользователей + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_printpage + Print View + Версия для печати + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_post + Post Screen + Страница отправки тем/сообщений + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_portal + Portal + Портал + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_online + Online List + Кто в онлайн + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_poll + Polls + Опросы + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_mod + Moderation + Система модерации + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_messaging + Messenger + Личные сообщения + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_mlist + Member List + Список пользователей + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_login + Login Screen + Страница входа + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_help + Help + Помощь + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_legends + Legends + Попапы BBкодов и смайликов + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_global_other + Other Global Templates + Прочие + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_global + Global Templates + Глобальные + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_forum + Forum View + Список тем форума + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_editors + Editor + Редактор сообщений + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_emails + Emails + Система e-mail + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_boards + Board Index + Список форумов + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_calendar + Calendar + Календарь + 31006 + 31006 + 1 + + + core + admin_js + session_timed_out + Your Admin CP session has expired, please refresh the page and log back in + Ваша сессия истекла, пожалуйста обновите страницу и выполните вход повторно + 31006 + 31006 + 1 + + + core + admin_js + hook_application + Application + Приложение + 31006 + 31006 + 1 + + + core + admin_js + hookfilenumber + File # + Файл # + 31006 + 31006 + 1 + + + core + admin_js + ua_form_incomplete + You must complete: User Agent Name, User Agent Key and Regex + Необходимо заполнить: Навзание User Agent, Ключ и Регулярное выражение + 31006 + 31006 + 1 + + + core + admin_js + ua_error_save + An error occurred while saving this user agent + Произошла ошибка при сохранении User Agent + 31006 + 31006 + 1 + + + core + admin_js + ua_exists + User Agent Exists + Такой User Agent уже существует + 31006 + 31006 + 1 + + + core + admin_js + ua_error_save2 + An error occurred while saving this user agent: + Произошла ошибка при сохранении User Agent: + 31006 + 31006 + 1 + + + core + admin_js + forums_showmod + Show Moderator Options + Показать модераторские опции + 31006 + 31006 + 1 + + + core + admin_js + forums_hidemod + Hide Moderator Options + Скрыть модераторские опции + 31006 + 31006 + 1 + + + core + admin_js + editor_enter_list + Enter list item (or hit Cancel to finish list) + Введите объект списка (или нажмите Отмена для завершения списка) + 31006 + 31006 + 1 + + + core + admin_js + bit_skin_vkontakte + Формы для Вконтакте + Формы для Вконтакте + 31006 + 1 0 @@ -6237,18 +6927,8 @@ enter_username Username Логин - 30012 - 30012 - 0 - - - core - admin_login - enter_name_and_email - Username or Email Address - Логин или Email - 30012 - 30012 + 31006 + 31006 0 @@ -6257,1448 +6937,688 @@ enter_useremail Email Address Email - 30012 - 30012 + 31006 + 31006 + 0 + + + core + admin_login + enter_name_and_email + Username or Email Address + Логин или Email + 31006 + 31006 + 0 + + + core + admin_login + ipb_login + Invision Power Board: Log in + Invision Power Board: Вход + 31006 + 31006 + 0 + + + core + admin_login + logout_complete + Log out complete + Вы вышли + 31006 + 31006 + 0 + + + core + admin_login + login_successful + Log in successful + Вы вошли + 31006 + 31006 + 0 + + + core + admin_login + no_acp_access + You do not have permission to access the ACP + У вас не достаточно прав для доступа в админцентр + 31006 + 31006 + 0 + + + core + admin_login + bad_email_password + Your login credentials were not valid + Неверные данные для входа + 31006 + 31006 0 core admin_logs - nav_logssplash - Logs - Журнал - 30005 - 30005 + slog_response_1 + Probably not spam + Не спамер + 31006 + 31006 0 core admin_logs - nav_toolsmodule - - Инструменты и настройки - 30005 - 30005 + slog_response_0 + Service Error + Ошибка сервиса + 31006 + 31006 0 core admin_logs - error_log_code - Error Code - Код - 30005 - - 0 - - - core - admin_logs - error_log_ip - IP Address - IP-адрес - 30005 - - 0 - - - core - admin_logs - error_log_member - Member Name - Имя пользователя - 30005 - - 0 - - - core - admin_logs - error_log_uri - Error URI - URI - 30005 - - 0 - - - core - admin_logs - error_log_date - Date - Дата - 30005 - - 0 - - - core - admin_logs - error_log_error - Error Message - Сообщение - 30005 - - 0 - - - core - admin_logs - error_log_thelogs - Error Logs - Журнал ошибок - 30005 - - 0 - - - core - admin_logs - error_log_search - Search Error Logs - Поиск - 30005 - - 0 - - - core - admin_logs - error_log_removed - Error Log(s) Removed - Журнал ошибок удален - 30005 - - 0 - - - core - admin_logs - error_log_noresults - No Error Logs Found]]> - Ошибки не найдены ]]> - 30005 - - 0 - - - core - admin_logs - slog_nostring - You must enter a search string. - Вы должны ввести строку поиска. - 30005 - 30005 - 0 - - - core - admin_logs - slog_title - Search Engine Logs Manager - Управление журналом поисковых ботов - 30005 - 30005 - 0 - - - core - admin_logs - slog_lofi - (Lo-Fi) - Текстовая версия - 30005 - 30005 - 0 - - - core - admin_logs - slog_thelogs - Saved Search Engine Spider Logs - Список действий - 30005 - 30005 - 0 - - - core - admin_logs - slog_adminlog - Removed Search Engine Logs - Удаленные действия - 30005 - 30005 - 0 - - - core - admin_logs - slog_hits - Logged Hits - Хитов - 30005 - 30005 - 0 - - - core - admin_logs - slog_botname - Bot Name - Поисковый робот - 30005 - 30005 - 0 - - - core - admin_logs - slog_nologs - We could not find the bot logs you wish to remove. Please try again. - Невозможно найти действия поискового робота. - 30005 - 30005 - 0 - - - core - admin_logs - slog_last - Last Hit - Запущен - 30005 - 30005 - 0 - - - core - admin_logs - slog_viewall - View All - Все действия - 30005 - 30005 - 0 - - - core - admin_logs - slog_removeall - Remove All - Удалить все действия - 30005 - 30005 - 0 - - - core - admin_logs - slog_view - View - Просмотреть - 30005 - 30005 - 0 - - - core - admin_logs - slog_noresults + sslog_noresults No spam log entries - Действия не найдены ]]> - 30005 - 30005 + Записей не найдено + 31006 + 31006 0 core admin_logs - slog_remove - Remove - Удалить - 30005 - 30005 - 0 - - - core - admin_logs - slog_searchquery - in query string - в строке запроса - 30005 - 30005 - 0 - - - core - admin_logs - slog_searchfor - Search for... - Искать - 30005 - 30005 - 0 - - - core - admin_logs - slog_search - Search Spider Logs - Поиск действий - 30005 - 30005 - 0 - - - core - admin_logs - wlog_title - Warn Logs Manager - Журнал предупреждений - 30005 - - 0 - - - core - admin_logs - slog_spider_logs - Spider Logs - Журнал ошибок поисковых ботов - 30005 - 30005 - 0 - - - core - admin_logs - slog_ip - IP Address - IP-адрес - 30005 - 30005 - 0 - - - core - admin_logs - slog_time - Time of Action - Время действия - 30005 - 30005 - 0 - - - core - admin_logs - slog_querystring - Query String - Строка запроса - 30005 - 30005 - 0 - - - core - admin_logs - slog_searchbutton - Search - Найти - 30005 - 30005 - 0 - - - core - admin_logs - wlog_nostring - You must enter a search string. Please try again. - Вы должны ввести строку поиска. - 30005 - - 0 - - - core - admin_logs - wlog_hours - Hours - Часы - 30005 - 30005 - 0 - - - core - admin_logs - wlog_days - Days - Дни - 30005 - 30005 - 0 - - - core - admin_logs - wlog_deleted - Deleted Member (ID:%s) - Удаленный пользователь (ID:%s) - 30005 - 30005 - 0 - - - core - admin_logs - wlog_view - View - Просмотр - 30005 - - 0 - - - core - admin_logs - wlog_log - Log - Журнал - 30005 - 30005 - 0 - - - core - admin_logs - wlog_nofind - We could not find the member whose warn logs you were attempting to remove. Please try again. - Невозможно найти пользователя, записи которого вы пытаетесь удалить. Попробуйте еще раз. - 30005 - - 0 - - - core - admin_logs - wlog_removelogs - Removed warn logs for member ID:(%s) - Удалены записи для пользователя №: %s - 30005 - - 0 - - - core - admin_logs - wlog_contacted - View email - Посмотреть e-mail - 30005 - 30005 - 0 - - - core - admin_logs - wlog_showmessage - Show message - Посмотреть сообщение - 30005 - - 0 - - - core - admin_logs - wlog_nologs - We oculd not find the warn log entry. Please try again. - Невозможно найти записи в журнале. Попробуйте еще раз. - 30005 - - 0 - - - core - admin_logs - wlog_cantresolve - We cannot resolve the warn log ID. Please try again. - Невозможно определить ID записи в журнале. Попробуйте еще раз. - 30005 - 30005 - 0 - - - core - admin_logs - wlog_email - Email - E-mail - 30005 - 30005 - 0 - - - core - admin_logs - wlog_pm - PM - ЛС - 30005 - 30005 - 0 - - - core - admin_logs - wlog_notes - Entry Notes - Заметки - 30005 - - 0 - - - core - admin_logs - wlog_last10 - Last 10 Warn Entries - Последние 10 предупреждений - 30005 - 30005 - 0 - - - core - admin_logs - wlog_emailpm - Email/PM Sent - Отправлено e-mail/ЛС - 30005 - 30005 - 0 - - - core - admin_logs - wlog_warned - Warned Member - Пользователь - 30005 - - 0 - - - core - admin_logs - wlog_type - Type - Тип - 30005 - - 0 - - - core - admin_logs - wlog_warnedby - Warned By - Предупредил - 30005 - - 0 - - - core - admin_logs - wlog_date - Date - Дата - 30005 - 30005 - 0 - - - core - admin_logs - wlog_wascontacted - Contacted? - Уведомлен? - 30005 - - 0 - - - core - admin_logs - wlog_noresults - No Warn Logs Found]]> - Предупреждения не найдены ]]> - 30005 - - 0 - - - core - admin_logs - wlog_thelogs - Saved Warn Logs - Журнал - 30005 - - 0 - - - core - admin_logs - wlog_times - Times Warned - Кол-во предупреждений - 30005 - - 0 - - - core - admin_logs - wlog_member - Member - Пользователь - 30005 - - 0 - - - core - admin_logs - wlog_viewall - View All By Member - Просмотр записей - 30005 - - 0 - - - core - admin_logs - wlog_removeall - Remove All By Member - Удаление записей - 30005 - - 0 - - - core - admin_logs - wlog_viewlog - View - Посмотреть - 30005 - - 0 - - - core - admin_logs - wlog_remove - Remove - Удалить - 30005 - - 0 - - - core - admin_logs - wlog_search - Search Warn Logs - Поиск - 30005 - - 0 - - - core - admin_logs - wlog_searchfor - Search in... - Искать в - 30005 - - 0 - - - core - admin_logs - wlog_searchin - Search for... - Искать - 30005 - - 0 - - - core - admin_logs - wlog_searchbutton - Search - Поиск - 30005 - - 0 - - - core - admin_logs - wlog_modq - Mod Queue - Премодерация - 30005 - - 0 - - - core - admin_logs - wlog_susp - Suspended - Блокировка - 30005 - - 0 - - - core - admin_logs - wlog_viewnotes - View Notes - Заметка - 30005 - - 0 - - - core - admin_logs - wlog_nopost - Disabled Posting - Запрет отправки - 30005 - - 0 - - - core - admin_logs - wlog_warnnotes - Warn Notes - Заметка - 30005 - - 0 - - - core - admin_logs - wlog_log_from - From:]]> - От: ]]> - 30005 - 30005 - 0 - - - core - admin_logs - wlog_log_to - To:]]> - Кому: ]]> - 30005 - - 0 - - - core - admin_logs - wlog_log_sent - Sent:]]> - Дата: ]]> - 30005 - 30005 - 0 - - - core - admin_logs - wlog_warn_logs - Warn Logs - Журнал предупреждений - 30005 - - 0 - - - core - admin_logs - mlog_title - Moderator Logs Manager - Управление журналом модерирования - 30005 - 30005 - 0 - - - core - admin_logs - wlog_log_subject - Subject:]]> - Тема:]]> - 30005 - 30005 - 0 - - - core - admin_logs - mlog_nostring - You must enter a search string. Please try again. - Вы должны ввести строку поиска. - 30005 - - 0 - - - core - admin_logs - mlog_whatfield - We could not determine what field you were attempting to search. Please try again. - Невозможно определить поле для поиска. - 30005 - 30005 - 0 - - - core - admin_logs - mlog_topicid - Topic ID: ]]> - ID темы: ]]> - 30005 - 30005 - 0 - - - core - admin_logs - mlog_noid - You did not select a member ID to remove by. Please try again. - Вы не указали номер (ID) пользователя, которого хотите удалить. Пожалуйста, попробуйте еще раз. - 30005 - - 0 - - - core - admin_logs - mlog_removed - Removed Moderator Logs for member ID: - Удаленные действия модерирования для ID пользователя: - 30005 - - 0 - - - core - admin_logs - mlog_ip + slog_list_ip IP Address IP адрес - 30005 - + 31006 + 31006 0 core admin_logs - mlog_fid - Forum ID - ID форума - 30005 - + slog_list_email + E-Mail Address + E-mail адрес + 31006 + 31006 0 core admin_logs - mlog_last5 - Last 5 Moderator Actions - Последние 5 действий - 30005 - + slog_list_msg + Error Message + Ошибка + 31006 + 31006 0 core admin_logs - mlog_name - Member Name - Модератор - 30005 - - 0 - - - core - admin_logs - mlog_tid - Topic ID - ID темы - 30005 - 30005 - 0 - - - core - admin_logs - mlog_member - Member - Модератор - 30005 - - 0 - - - core - admin_logs - mlog_action - Action Performed - Действия - 30005 - - 0 - - - core - admin_logs - mlog_forum - Forum - Форум - 30005 - - 0 - - - core - admin_logs - mlog_topictitle - Topic Title - Тема - 30005 - 30005 - 0 - - - core - admin_logs - mlog_date + slog_list_date Date Дата - 30005 - + 31006 + 31006 0 core admin_logs - mlog_noresults - No Moderator Logs Found]]> - Действия не найдены ]]> - 30005 - + slog_list_code + Response + Ответ + 31006 + 31006 0 core admin_logs - mlog_thelogs - Saved Moderator Logs - Журнал модерирования - 30005 - 30005 + slog_list_id + ID + ID + 31006 + 31006 0 core admin_logs - mlog_removeall - Remove All By Member - Удаление всех действий - 30005 - + slog_spamlogs + Spam Service Logs + Журнал спам-сервиса + 31006 + 31006 0 core admin_logs - mlog_viewall - View All By Member - Просмотр всех действий - 30005 - 30005 + al_error_logs + Admin Login Logs + Журнал авторизации администраторов + 31006 + 31006 0 core admin_logs - mlog_view - View - Просмотреть - 30005 - 30005 + api_error_logs + XML-RPC API Logs + Журнал XML-RPC API + 31006 + 31006 0 core admin_logs - mlog_remove - Remove - Удалить - 30005 - + sched_error_logs + Scheduler Logs + Журнал задач + 31006 + 31006 0 core admin_logs - mlog_search - Search Moderator Logs - Поиск действий в журнале - 30005 - - 0 - - - core - admin_logs - mlog_searchfor - Search for... - Искать - 30005 - - 0 - - - core - admin_logs - mlog_searchbutton - Search - Искать - 30005 - - 0 - - - core - admin_logs - mlog_modlogs - Moderator Logs - Журнал модерирования - 30005 - - 0 - - - core - admin_logs - mlog_searchin - Search in... - Искать в - 30005 - 30005 - 0 - - - core - admin_logs - elog_noneselected - You did not select any email log entries to remove. Please try again. - Вы не выбрали записи в журнале для удаления. Попробуйте еще раз. - 30005 - 30005 - 0 - - - core - admin_logs - elog_removed - Removed email log entreis. - Записи в журнале удалены. - 30005 - 30005 - 0 - - - core - admin_logs - elog_results - (Search Results) - (Результаты поиска) - 30005 - - 0 - - - core - admin_logs - elog_title - Email Logs Manager - Управление журналом e-mail сообщений - 30005 - 30005 - 0 - - - core - admin_logs - elog_notsearched - You must enter something to search by. Please try again. - Для поиска вы должны ввести что-либо. Попробуйте еще раз. - 30005 - - 0 - - - core - admin_logs - elog_nomatches - No matches found in the email logs. - Совпадений не найдено в журнале. - 30005 - 30005 - 0 - - - core - admin_logs - elog_log_404 - We could not find the email error log entry you requested. - Невозможно найти запись в журнале. - 30005 - 30005 - 0 - - - core - admin_logs - elog_from_name - From Member - От - 30005 - - 0 - - - core - admin_logs - elog_to_name - To Member - Кому - 30005 - - 0 - - - core - admin_logs - elog_to - To Email Address - Кому (E-mail) - 30005 - 30005 - 0 - - - core - admin_logs - elog_from - From Email Address - От (E-mail) - 30005 - 30005 - 0 - - - core - admin_logs - elog_body - Email Body - Сообщение об ошибке - 30005 - 30005 - 0 - - - core - admin_logs - elog_subject - Email Subject - Тема письма - 30005 - 30005 - 0 - - - core - admin_logs - elog_exactly - is exactly - точно - 30005 - - 0 - - - core - admin_logs - elog_theemails - Logged Emails - Список отправленных писем - 30005 - 30005 - 0 - - - core - admin_logs - elog_loose - contains - содержит - 30005 - - 0 - - - core - admin_logs - elog_date - Date - Дата - 30005 - - 0 - - - core - admin_logs - elog_profile - - Профиль пользователя (В новом окне)) - 30005 - - 0 - - - core - admin_logs - elog_byid - ..by ID - по ID - 30005 - - 0 - - - core - admin_logs - elog_read - Read email... - Прочесть письмо - 30005 - 30005 - 0 - - - core - admin_logs - elog_show_title - Show all from this member - Показать все от этого пользователя - 30005 - - 0 - - - core - admin_logs - elog_noresults - No Email Logs Found]]> - Письма не найдены ]]> - 30005 - - 0 - - - core - admin_logs - elog_removeall - Remove All? - Удалить все? - 30005 - - 0 - - - core - admin_logs - elog_removechecked - Remove Checked - Удалить отмеченные - 30005 - - 0 - - - core - admin_logs - elog_search - Search Email Logs - Поиск записей - 30005 - - 0 - - - core - admin_logs - elog_searchbutton + alog_searchbutton Search Найти - 30005 - + 31006 + 31006 0 core admin_logs - elog_searchwhere - Search where]]> - Поиск в ]]> - 30005 - + alog_adminlogs + Admin Logs + Журнал администраторов + 31006 + 31006 0 core admin_logs - elog_log_from - From:]]> - От: ]]> - 30005 - + alog_searchin + Search in... + Искать в + 31006 + 31006 0 core admin_logs - elog_log_to - To:]]> - Кому: ]]> - 30005 - + alog_searchfor + Search for... + Искать + 31006 + 31006 0 core admin_logs - elog_log_sent + alog_saved + Saved Administration Logs + Журнал администрирования + 31006 + 31006 + 0 + + + core + admin_logs + alog_search + Search Admin Logs + Поиск действий в журнале + 31006 + 31006 + 0 + + + core + admin_logs + alog_viewall + View All By Member + Просмотр всех действий + 31006 + 31006 + 0 + + + core + admin_logs + alog_removeall + Remove All By Member + Удаление всех действий + 31006 + 31006 + 0 + + + core + admin_logs + alog_remove + Remove + Удалить + 31006 + 31006 + 0 + + + core + admin_logs + alog_noresults + No Results + Нет результатов + 31006 + 31006 + 0 + + + core + admin_logs + alog_view + View + Просмотреть + 31006 + 31006 + 0 + + + core + admin_logs + alog_date + Date + Дата + 31006 + 31006 + 0 + + + core + admin_logs + alog_member + Member + Пользователь + 31006 + 31006 + 0 + + + core + admin_logs + alog_last5 + Last 5 Admin Actions + Последние 5 действий + 31006 + 31006 + 0 + + + core + admin_logs + alog_sec + Section + Раздел + 31006 + 31006 + 0 + + + core + admin_logs + alog_do + do= {URL parameter} + do= {URL параметр} + 31006 + 31006 + 0 + + + core + admin_logs + alog_mod + Module + Модуль + 31006 + 31006 + 0 + + + core + admin_logs + alog_id + Member ID + ID администратора + 31006 + 31006 + 0 + + + core + admin_logs + alog_app + Application + Приложение + 31006 + 31006 + 0 + + + core + admin_logs + alog_ip + IP Address + IP адрес + 31006 + 31006 + 0 + + + core + admin_logs + alog_performed + Action(s) Performed + Действия + 31006 + 31006 + 0 + + + core + admin_logs + alog_whoselog + We could not determine whose logs you were attempting to remove. Please try again. + Невозможно определить, чью запись в журнале вы пытаетесь удалить. Попробуйте еще раз. + 31006 + 31006 + 0 + + + core + admin_logs + alog_nostring + You must enter a search string. Please try again. + Вы должны ввести строку поиска. Попробуйте еще раз. + 31006 + 31006 + 0 + + + core + admin_logs + alog_whatfield + We could not determine what field you were attempting to search. + Невозможно определить поле для поиска. + 31006 + 31006 + 0 + + + core + admin_logs + alog_title + Administration Logs Manager + Управление журналом действий администраторов + 31006 + 31006 + 0 + + + core + admin_logs + erlog_smtperror + SMTP Error Message: + SMTP сообщение ошибки: + 31006 + 31006 + 0 + + + core + admin_logs + erlog_smtpcode + SMTP Error Code: + SMTP код ошибки: + 31006 + 31006 + 0 + + + core + admin_logs + erlog_ipberror + IP.Board Error Message: + IP.Board сообщение ошибки: + 31006 + 31006 + 0 + + + core + admin_logs + erlog_log_subject + Subject]]> + Тема]]> + 31006 + 31006 + 0 + + + core + admin_logs + erlog_log_sent Sent:]]> Дата: ]]> - 30005 - + 31006 + 31006 0 core admin_logs - elog_log_ip - From IP:]]> - IP: ]]> - 30005 - + erlog_log_to + To:]]> + Кому: ]]> + 31006 + 31006 0 core admin_logs - elog_log_subject - Subject:]]> - Тема:]]> - 30005 - 30005 + erlog_searchbutton + Search + Найти + 31006 + 31006 0 core admin_logs - elog_emaillogs - Email Logs - Журнал e-mail сообщений - 30005 - + erlog_log_from + From:]]> + От:]]> + 31006 + 31006 0 core admin_logs - elog_email_err_logs - Email Error Logs - Журнал ошибок e-mail - 30005 - + erlog_searchwhere + Search where...]]> + Поиск в ]]> + 31006 + 31006 0 core admin_logs - erlog_removed - Removed email error log entries. - Записи в журнале удалены - 30005 - + erlog_removeall + Remove All? + Удалить все? + 31006 + 31006 0 core admin_logs - erlog_results - (Search Results) - (Резульаты поиска) - 30005 - + erlog_search + Search Email Error Logs + Поиск записей + 31006 + 31006 0 core admin_logs - erlog_title - Email Error Log Manager - Управление журналом ошибок e-mail сообщений - 30005 - + erlog_removechecked + Remove Checked + Удалить отмеченные + 31006 + 31006 0 core admin_logs - erlog_noneselected - You did not select any email error log entries to remove. Please try again. - Вы не выбрали записи в журнале для удаления. Попробуйте еще раз. - 30005 - + erlog_noresults + No Email Error Logs Found]]> + Ошибки не найдены ]]> + 31006 + 31006 + 0 + + + core + admin_logs + erlog_to + To + Кому + 31006 + 31006 + 0 + + + core + admin_logs + erlog_date + Date + Дата + 31006 + 31006 + 0 + + + core + admin_logs + erlog_reademail + Read Email + Читать письмо + 31006 + 31006 + 0 + + + core + admin_logs + erlog_exact + is exactly + точно + 31006 + 31006 + 0 + + + core + admin_logs + erlog_loose + contains + содержит + 31006 + 31006 + 0 + + + core + admin_logs + erlog_thelogs + Logged Email Errors + Список неотправленных писем + 31006 + 31006 + 0 + + + core + admin_logs + erlog_toemail + To Email Address + Кому (E-mail) + 31006 + 31006 + 0 + + + core + admin_logs + erlog_error + Error Message + Ошибка + 31006 + 31006 + 0 + + + core + admin_logs + erlog_fromemail + From Email Address + От (E-mail) + 31006 + 31006 + 0 + + + core + admin_logs + erlog_subject + Email Subject + Тема письма + 31006 + 31006 + 0 + + + core + admin_logs + erlog_noinfo + No Info]]> + Нет информации ]]> + 31006 + 31006 0 @@ -7708,98 +7628,8 @@ You must enter something to search by. Please try again. Вы должны ввести что-либо для поиска. Попробуйте еще раз. - 30005 - - 0 - - - core - admin_logs - erlog_to - To - Кому - 30005 - - 0 - - - core - admin_logs - erlog_thelogs - Logged Email Errors - Список неотправленных писем - 30005 - - 0 - - - core - admin_logs - erlog_loose - contains - содержит - 30005 - - 0 - - - core - admin_logs - erlog_exact - is exactly - точно - 30005 - - 0 - - - core - admin_logs - erlog_error - Error Message - Ошибка - 30005 - - 0 - - - core - admin_logs - erlog_toemail - To Email Address - Кому (E-mail) - 30005 - - 0 - - - core - admin_logs - erlog_fromemail - From Email Address - От (E-mail) - 30005 - - 0 - - - core - admin_logs - erlog_subject - Email Subject - Тема письма - 30005 - - 0 - - - core - admin_logs - erlog_noinfo - No Info]]> - Нет информации ]]> - 30005 - + 31006 + 31006 0 @@ -7808,438 +7638,1448 @@ erlog_404 We could not find the email error log entry you requested. Please try again. Невозможно найти записи в журнале. Попробуйте еще раз. - 30005 - + 31006 + 31006 0 core admin_logs - erlog_reademail - Read Email - Читать письмо - 30005 - + erlog_results + (Search Results) + (Результаты поиска) + 31006 + 31006 0 core admin_logs - erlog_date - Date - Дата - 30005 - + erlog_title + Email Error Log Manager + Управление журналом ошибок e-mail сообщений + 31006 + 31006 0 core admin_logs - erlog_noresults - No Email Error Logs Found]]> - Ошибки не найдены ]]> - 30005 - + erlog_removed + Removed email error log entries. + Записи в журнале удалены + 31006 + 31006 0 core admin_logs - erlog_removechecked - Remove Checked - Удалить отмеченные - 30005 - + elog_email_err_logs + Email Error Logs + Журнал ошибок e-mail + 31006 + 31006 0 core admin_logs - erlog_searchwhere - Search where...]]> - Поиск в ]]> - 30005 - + erlog_noneselected + You did not select any email error log entries to remove. Please try again. + Вы не выбрали записи в журнале для удаления. Попробуйте еще раз. + 31006 + 31006 0 core admin_logs - erlog_search - Search Email Error Logs - Поиск записей - 30005 - + elog_emaillogs + Email Logs + Журнал e-mail сообщений + 31006 + 31006 0 core admin_logs - erlog_searchbutton - Search - Найти - 30005 - + elog_log_subject + Subject:]]> + Тема:]]> + 31006 + 31006 0 core admin_logs - erlog_removeall - Remove All? - Удалить все? - 30005 - + elog_log_ip + From IP:]]> + IP: ]]> + 31006 + 31006 0 core admin_logs - erlog_log_from - From:]]> - От:]]> - 30005 - - 0 - - - core - admin_logs - erlog_log_to + elog_log_to To:]]> Кому: ]]> - 30005 - + 31006 + 31006 0 core admin_logs - erlog_log_subject - Subject]]> - Тема]]> - 30005 - - 0 - - - core - admin_logs - erlog_log_sent + elog_log_sent Sent:]]> Дата: ]]> - 30005 - + 31006 + 31006 0 core admin_logs - erlog_smtperror - SMTP Error Message: - SMTP сообщение ошибки: - 30005 - - 0 - - - core - admin_logs - erlog_smtpcode - SMTP Error Code: - SMTP код ошибки: - 30005 - - 0 - - - core - admin_logs - erlog_ipberror - IP.Board Error Message: - IP.Board сообщение ошибки: - 30005 - - 0 - - - core - admin_logs - alog_whatfield - We could not determine what field you were attempting to search. - Невозможно определить поле для поиска. - 30005 - - 0 - - - core - admin_logs - alog_whoselog - We could not determine whose logs you were attempting to remove. Please try again. - Невозможно определить, чью запись в журнале вы пытаетесь удалить. Попробуйте еще раз. - 30005 - - 0 - - - core - admin_logs - alog_ip - IP Address - IP адрес - 30005 - - 0 - - - core - admin_logs - alog_app - Application - Приложение - 30005 - - 0 - - - core - admin_logs - alog_id - Member ID - ID администратора - 30005 - - 0 - - - core - admin_logs - alog_mod - Module - Модуль - 30005 - - 0 - - - core - admin_logs - alog_sec - Section - Раздел - 30005 - - 0 - - - core - admin_logs - alog_do - do= {URL parameter} - do= {URL параметр} - 30005 - - 0 - - - core - admin_logs - alog_last5 - Last 5 Admin Actions - Последние 5 действий - 30005 - - 0 - - - core - admin_logs - alog_title - Administration Logs Manager - Управление журналом действий администраторов - 30005 - - 0 - - - core - admin_logs - alog_nostring - You must enter a search string. Please try again. - Вы должны ввести строку поиска. Попробуйте еще раз. - 30005 - - 0 - - - core - admin_logs - alog_performed - Action(s) Performed - Действия - 30005 - - 0 - - - core - admin_logs - alog_member - Member - Пользователь - 30005 - - 0 - - - core - admin_logs - alog_date - Date - Дата - 30005 - - 0 - - - core - admin_logs - alog_noresults - No Results - Нет результатов - 30005 - - 0 - - - core - admin_logs - alog_viewall - View All By Member - Просмотр всех действий - 30005 - - 0 - - - core - admin_logs - alog_remove - Remove - Удалить - 30005 - - 0 - - - core - admin_logs - alog_view - View - Просмотреть - 30005 - - 0 - - - core - admin_logs - alog_removeall - Remove All By Member - Удаление всех действий - 30005 - - 0 - - - core - admin_logs - alog_saved - Saved Administration Logs - Журнал администрирования - 30005 - - 0 - - - core - admin_logs - alog_searchin - Search in... - Искать в - 30005 - - 0 - - - core - admin_logs - alog_searchfor - Search for... - Искать - 30005 - - 0 - - - core - admin_logs - alog_search - Search Admin Logs - Поиск действий в журнале - 30005 - - 0 - - - core - admin_logs - alog_searchbutton + elog_searchbutton Search Найти - 30005 - + 31006 + 31006 0 core admin_logs - al_error_logs - Admin Login Logs - Журнал авторизации администраторов - 30005 - + elog_log_from + From:]]> + От: ]]> + 31006 + 31006 0 core admin_logs - sched_error_logs - Scheduler Logs - Журнал задач - 30005 - 30005 + elog_searchwhere + Search where]]> + Поиск в ]]> + 31006 + 31006 0 core admin_logs - api_error_logs - XML-RPC API Logs - Журнал XML-RPC API - 30005 - + elog_removeall + Remove All? + Удалить все? + 31006 + 31006 0 core admin_logs - alog_adminlogs - Admin Logs - Журнал администраторов - 30005 - + elog_search + Search Email Logs + Поиск записей + 31006 + 31006 + 0 + + + core + admin_logs + elog_removechecked + Remove Checked + Удалить отмеченные + 31006 + 31006 + 0 + + + core + admin_logs + elog_noresults + No Email Logs Found]]> + Письма не найдены ]]> + 31006 + 31006 + 0 + + + core + admin_logs + elog_byid + ..by ID + по ID + 31006 + 31006 + 0 + + + core + admin_logs + elog_profile + + Профиль пользователя (В новом окне)) + 31006 + 31006 + 0 + + + core + admin_logs + elog_read + Read email... + Прочесть письмо + 31006 + 31006 + 0 + + + core + admin_logs + elog_show_title + Show all from this member + Показать все от этого пользователя + 31006 + 31006 + 0 + + + core + admin_logs + elog_loose + contains + содержит + 31006 + 31006 + 0 + + + core + admin_logs + elog_theemails + Logged Emails + Список отправленных писем + 31006 + 31006 + 0 + + + core + admin_logs + elog_date + Date + Дата + 31006 + 31006 + 0 + + + core + admin_logs + elog_exactly + is exactly + точно + 31006 + 31006 + 0 + + + core + admin_logs + elog_to_name + To Member + Кому + 31006 + 31006 + 0 + + + core + admin_logs + elog_to + To Email Address + Кому (E-mail) + 31006 + 31006 + 0 + + + core + admin_logs + elog_from_name + From Member + От + 31006 + 31006 + 0 + + + core + admin_logs + elog_from + From Email Address + От (E-mail) + 31006 + 31006 + 0 + + + core + admin_logs + elog_body + Email Body + Сообщение об ошибке + 31006 + 31006 + 0 + + + core + admin_logs + elog_subject + Email Subject + Тема письма + 31006 + 31006 + 0 + + + core + admin_logs + elog_log_404 + We could not find the email error log entry you requested. + Невозможно найти запись в журнале. + 31006 + 31006 + 0 + + + core + admin_logs + elog_nomatches + No matches found in the email logs. + Совпадений не найдено в журнале. + 31006 + 31006 + 0 + + + core + admin_logs + elog_results + (Search Results) + (Результаты поиска) + 31006 + 31006 + 0 + + + core + admin_logs + elog_notsearched + You must enter something to search by. Please try again. + Для поиска вы должны ввести что-либо. Попробуйте еще раз. + 31006 + 31006 + 0 + + + core + admin_logs + elog_title + Email Logs Manager + Управление журналом e-mail сообщений + 31006 + 31006 + 0 + + + core + admin_logs + elog_removed + Removed email log entreis. + Записи в журнале удалены. + 31006 + 31006 + 0 + + + core + admin_logs + mlog_modlogs + Moderator Logs + Журнал модерирования + 31006 + 31006 + 0 + + + core + admin_logs + elog_noneselected + You did not select any email log entries to remove. Please try again. + Вы не выбрали записи в журнале для удаления. Попробуйте еще раз. + 31006 + 31006 + 0 + + + core + admin_logs + mlog_searchbutton + Search + Искать + 31006 + 31006 + 0 + + + core + admin_logs + mlog_searchin + Search in... + Искать в + 31006 + 31006 + 0 + + + core + admin_logs + mlog_searchfor + Search for... + Искать + 31006 + 31006 + 0 + + + core + admin_logs + mlog_remove + Remove + Удалить + 31006 + 31006 + 0 + + + core + admin_logs + mlog_search + Search Moderator Logs + Поиск действий в журнале + 31006 + 31006 + 0 + + + core + admin_logs + mlog_view + View + Просмотреть + 31006 + 31006 + 0 + + + core + admin_logs + mlog_removeall + Remove All By Member + Удаление всех действий + 31006 + 31006 + 0 + + + core + admin_logs + mlog_viewall + View All By Member + Просмотр всех действий + 31006 + 31006 + 0 + + + core + admin_logs + mlog_thelogs + Saved Moderator Logs + Журнал модерирования + 31006 + 31006 + 0 + + + core + admin_logs + mlog_topictitle + Topic Title + Тема + 31006 + 31006 + 0 + + + core + admin_logs + mlog_date + Date + Дата + 31006 + 31006 + 0 + + + core + admin_logs + mlog_noresults + No mobile notification log entries + Действия не найдены ]]> + 31006 + 31006 + 0 + + + core + admin_logs + mlog_forum + Forum + Форум + 31006 + 31006 + 0 + + + core + admin_logs + mlog_action + Action Performed + Действия + 31006 + 31006 + 0 + + + core + admin_logs + mlog_member + Member + Модератор + 31006 + 31006 + 0 + + + core + admin_logs + mlog_last5 + Last 5 Moderator Actions + Последние 5 действий + 31006 + 31006 + 0 + + + core + admin_logs + mlog_fid + Forum ID + ID форума + 31006 + 31006 + 0 + + + core + admin_logs + mlog_name + Member Name + Модератор + 31006 + 31006 + 0 + + + core + admin_logs + mlog_tid + Topic ID + ID темы + 31006 + 31006 + 0 + + + core + admin_logs + mlog_ip + IP Address + IP адрес + 31006 + 31006 + 0 + + + core + admin_logs + mlog_removed + Removed Moderator Logs for member ID: + Удаленные действия модерирования для ID пользователя: + 31006 + 31006 + 0 + + + core + admin_logs + mlog_noid + You did not select a member ID to remove by. Please try again. + Вы не указали номер (ID) пользователя, которого хотите удалить. Пожалуйста, попробуйте еще раз. + 31006 + 31006 + 0 + + + core + admin_logs + mlog_topicid + Topic ID: ]]> + ID темы: ]]> + 31006 + 31006 + 0 + + + core + admin_logs + mlog_whatfield + We could not determine what field you were attempting to search. Please try again. + Невозможно определить поле для поиска. + 31006 + 31006 + 0 + + + core + admin_logs + mlog_nostring + You must enter a search string. Please try again. + Вы должны ввести строку поиска. + 31006 + 31006 + 0 + + + core + admin_logs + wlog_warn_logs + Warn Logs + Журнал предупреждений + 31006 + 31006 + 0 + + + core + admin_logs + mlog_title + Moderator Logs Manager + Управление журналом модерирования + 31006 + 31006 + 0 + + + core + admin_logs + wlog_log_subject + Subject:]]> + Тема:]]> + 31006 + 31006 + 0 + + + core + admin_logs + wlog_log_sent + Sent:]]> + Дата: ]]> + 31006 + 31006 + 0 + + + core + admin_logs + wlog_log_to + To:]]> + Кому: ]]> + 31006 + 31006 + 0 + + + core + admin_logs + wlog_log_from + From:]]> + От: ]]> + 31006 + 31006 + 0 + + + core + admin_logs + wlog_warnnotes + Warn Notes + Заметка + 31006 + 31006 + 0 + + + core + admin_logs + wlog_viewnotes + View Notes + Заметка + 31006 + 31006 + 0 + + + core + admin_logs + wlog_susp + Suspended + Блокировка + 31006 + 31006 + 0 + + + core + admin_logs + wlog_nopost + Disabled Posting + Запрет отправки + 31006 + 31006 + 0 + + + core + admin_logs + wlog_modq + Mod Queue + Премодерация + 31006 + 31006 + 0 + + + core + admin_logs + wlog_searchfor + Search in... + Искать в + 31006 + 31006 + 0 + + + core + admin_logs + wlog_searchbutton + Search + Поиск + 31006 + 31006 + 0 + + + core + admin_logs + wlog_searchin + Search for... + Искать + 31006 + 31006 + 0 + + + core + admin_logs + wlog_remove + Remove + Удалить + 31006 + 31006 + 0 + + + core + admin_logs + wlog_search + Search Warn Logs + Поиск + 31006 + 31006 + 0 + + + core + admin_logs + wlog_viewlog + View + Посмотреть + 31006 + 31006 + 0 + + + core + admin_logs + wlog_removeall + Remove All By Member + Удаление записей + 31006 + 31006 + 0 + + + core + admin_logs + wlog_times + Times Warned + Кол-во предупреждений + 31006 + 31006 + 0 + + + core + admin_logs + wlog_viewall + View All By Member + Просмотр записей + 31006 + 31006 + 0 + + + core + admin_logs + wlog_member + Member + Пользователь + 31006 + 31006 + 0 + + + core + admin_logs + wlog_thelogs + Saved Warn Logs + Журнал + 31006 + 31006 + 0 + + + core + admin_logs + wlog_warnedby + Warned By + Предупредил + 31006 + 31006 + 0 + + + core + admin_logs + wlog_noresults + No Warn Logs Found]]> + Предупреждения не найдены ]]> + 31006 + 31006 + 0 + + + core + admin_logs + wlog_date + Date + Дата + 31006 + 31006 + 0 + + + core + admin_logs + wlog_wascontacted + Contacted? + Уведомлен? + 31006 + 31006 + 0 + + + core + admin_logs + wlog_warned + Warned Member + Пользователь + 31006 + 31006 + 0 + + + core + admin_logs + wlog_type + Type + Тип + 31006 + 31006 + 0 + + + core + admin_logs + wlog_last10 + Last 10 Warn Entries + Последние 10 предупреждений + 31006 + 31006 + 0 + + + core + admin_logs + wlog_notes + Entry Notes + Заметки + 31006 + 31006 + 0 + + + core + admin_logs + wlog_emailpm + Email/PM Sent + Отправлено e-mail/ЛС + 31006 + 31006 + 0 + + + core + admin_logs + wlog_email + Email + E-mail + 31006 + 31006 + 0 + + + core + admin_logs + wlog_cantresolve + We cannot resolve the warn log ID. Please try again. + Невозможно определить ID записи в журнале. Попробуйте еще раз. + 31006 + 31006 + 0 + + + core + admin_logs + wlog_pm + PM + ЛС + 31006 + 31006 + 0 + + + core + admin_logs + wlog_contacted + View email + Посмотреть e-mail + 31006 + 31006 + 0 + + + core + admin_logs + wlog_nologs + We oculd not find the warn log entry. Please try again. + Невозможно найти записи в журнале. Попробуйте еще раз. + 31006 + 31006 + 0 + + + core + admin_logs + wlog_showmessage + Show message + Посмотреть сообщение + 31006 + 31006 + 0 + + + core + admin_logs + wlog_removelogs + Removed warn logs for member ID:(%s) + Удалены записи для пользователя №: %s + 31006 + 31006 + 0 + + + core + admin_logs + wlog_nofind + We could not find the member whose warn logs you were attempting to remove. Please try again. + Невозможно найти пользователя, записи которого вы пытаетесь удалить. Попробуйте еще раз. + 31006 + 31006 + 0 + + + core + admin_logs + wlog_log + Log + Журнал + 31006 + 31006 + 0 + + + core + admin_logs + wlog_hours + Hours + Часы + 31006 + 31006 + 0 + + + core + admin_logs + wlog_deleted + Deleted Member (ID:%s) + Удаленный пользователь (ID:%s) + 31006 + 31006 + 0 + + + core + admin_logs + wlog_view + View + Просмотр + 31006 + 31006 + 0 + + + core + admin_logs + wlog_days + Days + Дни + 31006 + 31006 + 0 + + + core + admin_logs + wlog_title + Warn Logs Manager + Журнал предупреждений + 31006 + 31006 + 0 + + + core + admin_logs + wlog_nostring + You must enter a search string. Please try again. + Вы должны ввести строку поиска. + 31006 + 31006 + 0 + + + core + admin_logs + slog_spider_logs + Spider Logs + Журнал посещений поисковых ботов + 31006 + 31006 + 0 + + + core + admin_logs + slog_ip + IP Address + IP-адрес + 31006 + 31006 + 0 + + + core + admin_logs + slog_time + Time of Action + Время действия + 31006 + 31006 + 0 + + + core + admin_logs + slog_querystring + Query String + Строка запроса + 31006 + 31006 + 0 + + + core + admin_logs + slog_searchbutton + Search + Найти + 31006 + 31006 + 0 + + + core + admin_logs + slog_searchquery + in query string + в строке запроса + 31006 + 31006 + 0 + + + core + admin_logs + slog_searchfor + Search for... + Искать + 31006 + 31006 + 0 + + + core + admin_logs + slog_search + Search Spider Logs + Поиск действий + 31006 + 31006 + 0 + + + core + admin_logs + slog_noresults + No Spider Logs Found]]> + Действия не найдены ]]> + 31006 + 31006 + 0 + + + core + admin_logs + slog_remove + Remove + Удалить + 31006 + 31006 + 0 + + + core + admin_logs + slog_view + View + Просмотреть + 31006 + 31006 + 0 + + + core + admin_logs + slog_removeall + Remove All + Удалить все + 31006 + 31006 + 0 + + + core + admin_logs + slog_viewall + View All + Все действия + 31006 + 31006 + 0 + + + core + admin_logs + slog_last + Last Hit + Запущен + 31006 + 31006 + 0 + + + core + admin_logs + slog_hits + Logged Hits + Хитов + 31006 + 31006 + 0 + + + core + admin_logs + slog_botname + Bot Name + Поисковый робот + 31006 + 31006 + 0 + + + core + admin_logs + slog_thelogs + Saved Search Engine Spider Logs + Список действий + 31006 + 31006 + 0 + + + core + admin_logs + slog_adminlog + Removed Search Engine Logs + Удаленные действия + 31006 + 31006 + 0 + + + core + admin_logs + slog_nologs + We could not find the bot logs you wish to remove. Please try again. + Невозможно найти действия поискового робота. + 31006 + 31006 + 0 + + + core + admin_logs + slog_lofi + (Lo-Fi) + Текстовая версия + 31006 + 31006 + 0 + + + core + admin_logs + slog_nostring + You must enter a search string. + Вы должны ввести строку поиска. + 31006 + 31006 + 0 + + + core + admin_logs + slog_title + Search Engine Logs Manager + Управление журналом поисковых ботов + 31006 + 31006 + 0 + + + core + admin_logs + error_log_noresults + No Error Logs Found]]> + Ошибки не найдены ]]> + 31006 + 31006 + 0 + + + core + admin_logs + error_log_removed + Error Log(s) Removed + Журнал ошибок удален + 31006 + 31006 + 0 + + + core + admin_logs + error_log_search + Search Error Logs + Поиск + 31006 + 31006 + 0 + + + core + admin_logs + error_log_thelogs + Error Logs + Журнал ошибок + 31006 + 31006 + 0 + + + core + admin_logs + error_log_error + Error Message + Сообщение + 31006 + 31006 + 0 + + + core + admin_logs + error_log_date + Date + Дата + 31006 + 31006 + 0 + + + core + admin_logs + error_log_ip + IP Address + IP-адрес + 31006 + 31006 + 0 + + + core + admin_logs + error_log_member + Member Name + Имя пользователя + 31006 + 31006 + 0 + + + core + admin_logs + error_log_uri + Error URI + URI + 31006 + 31006 + 0 + + + core + admin_logs + error_log_code + Error Code + Код + 31006 + 31006 + 0 + + + core + admin_logs + nav_logssplash + Logs + Журнал + 31006 + 31006 + 0 + + + core + admin_logs + nav_toolsmodule + + Инструменты и настройки + 31006 + 31006 0 @@ -8248,28 +9088,148 @@ choose_splash Choose a log type to view Выберите журнал для просмотра - 30006 - + 31006 + 31006 0 core admin_logs - slog_api_connected - Test Spam API Connection Successfull! - Проверка соединения с Antispam успешна - 30011 - 30011 + sqllog_latest + Latest SQL Error Today (%s)
    %s
    ]]>
    + Последняя SQL ошибка (%s)
    %s
    ]]>
    + 31006 + 31006 0
    core admin_logs - slog_response_4 - Known spammer - Известный спамер - 30011 - 30011 + sqllog_noresults + + Хорошие новости - в журнале нет записей об ошибках в базе! + 31006 + 31006 + 0 + + + core + admin_logs + sqllog_size + File Size + Размер + 31006 + 31006 + 0 + + + core + admin_logs + sqllog_date + File Date + Дата + 31006 + 31006 + 0 + + + core + admin_logs + sqllog_name + File Name + Имя + 31006 + 31006 + 0 + + + core + admin_logs + sqllog_title + SQL Error Logs + Журнал ошибок SQL + 31006 + 31006 + 0 + + + core + admin_logs + mlog_sqlerrors + SQL Error Logs + Журнал SQL ошибок + 31006 + 31006 + 0 + + + core + admin_logs + sqllog_nofile + Could not locate a log to open + Не удалось найти файл журнала + 31006 + 31006 + 0 + + + core + admin_logs + sqllog_more_file + + + 31006 + 31006 + 0 + + + core + admin_logs + sqllog_removed + SQL error log file removed + Файл журнала ошибок удален + 31006 + 31006 + 0 + + + core + admin_logs + spamlog_sresults + We found %s records that matched your search term + Найдено %s записей, удовлетворяющих вашему запросу + 31006 + 31006 + 0 + + + core + admin_logs + spamlog_searchbutton + Search + Поиск + 31006 + 31006 + 0 + + + core + admin_logs + spamlog_searchlabel + Search spam logs for: + Найти: + 31006 + 31006 + 0 + + + core + admin_logs + spamlog_searchh3 + Search + Поиск + 31006 + 31006 0 @@ -8278,8 +9238,8 @@ slog_response_2 Possibly spam Вероятно спамер - 30011 - 30011 + 31006 + 31006 0 @@ -8288,98 +9248,28 @@ slog_response_3 Likely spam Возможно спамер - 30011 - 30011 + 31006 + 31006 0 core admin_logs - slog_response_1 - Probably not spam - Не спамер - 30011 - 30011 + slog_response_4 + Known spammer + Известный спамер + 31006 + 31006 0 core admin_logs - slog_response_0 - Service Error - Ошибка сервиса - 30011 - 30011 - 0 - - - core - admin_logs - slog_list_ip - IP Address - IP адрес - 30011 - 30011 - 0 - - - core - admin_logs - slog_list_email - E-Mail Address - E-mail адрес - 30011 - 30011 - 0 - - - core - admin_logs - slog_spamlogs - Spam Service Logs - Журнал спам-сервиса - 30011 - 30011 - 0 - - - core - admin_logs - slog_list_id - ID - ID - 30011 - 30011 - 0 - - - core - admin_logs - slog_list_date - Date - Дата - 30011 - 30011 - 0 - - - core - admin_logs - slog_list_code - Response - Ответ - 30011 - 30011 - 0 - - - core - admin_logs - slog_list_msg - Error Message - Ошибка - 30011 - 30011 + slog_api_connected + Test Spam API Connection Successfull! + Проверка соединения с Antispam успешна + 31006 + 31006 0 @@ -8388,755 +9278,88 @@ slog_api_failed Test Spam API Connection Failed Проверка соединения с Antispam неудачна - 30011 - 30011 + 31006 + 31006 0 core - admin_mycp - ds_log_all_title - Log To File Enabled - Включено журналирование в файлы - 30005 - 30005 + admin_logs + mlog_mobilelogs + Mobile Notifications Log + Журнал уведомлений мобильных клиентов + 31006 + 31006 0 core - admin_mycp - ds_log_all_desc - - - 30005 - 30005 + admin_logs + mlog_list_id + ID + ID + 31006 + 31006 0 core - admin_mycp - cp_spammeraccounts - Spammers - Спамеров - 30005 - + admin_logs + mlog_list_date + Date + Время + 31006 + 31006 0 core - admin_mycp - cp_acpnotes - You can use this section to keep notes for all members who access the Admin CP. It is globally editable by all admins who have access to the dashboard. - Вы можете использовать этот раздел, чтобы оставлять заметки всем пользователям, имеющим доступ в АЦ. Эта функция доступна всем администраторам, имеющим доступ в АЦ. - 30005 - + admin_logs + mlog_list_notification + Notification + Уведомление + 31006 + 31006 0 core - admin_mycp - cp_minutesago - minutes ago - минут назад - 30005 - + admin_logs + mlog_list_member + Sent To + Отправлено + 31006 + 31006 0 core - admin_mycp - cp_secondsago - seconds ago - секунд назад - 30005 - + admin_logs + mlog_list_sent + Sent + Введенные данные неверны + 31006 + 31006 0 core - admin_mycp - cp_index - Index - Главная - 30005 - - 0 - - - core - admin_mycp - cp_unlockedinstaller - Unlocked Installer - Не заблокированный мастер установки - 30005 - - 0 - - - core - admin_mycp - cp_installerpresent - Installer Present - Найден установщик системы - 30005 - - 0 - - - core - admin_mycp - cp_converterpresent - Converter Present - Найден скрипт конвертации - 30005 - - 0 - - - core - admin_mycp - cp_unfinishedupgrade - Unfinished Upgrade - Незаконченное обновление - 30005 - - 0 - - - core - admin_mycp - cp_yourphpversion - Your PHP Version (%s) is insufficient - Несоответствующая версия PHP (%s) - 30005 - 30005 - 0 - - - core - admin_mycp - cp_boardoffline - Board Offline - Форум закрыт - 30005 - - 0 - - - core - admin_mycp - cp_boardoffline1 - Your board is currently offline - Форум в настоящее время закрыт - 30005 - - 0 - - - core - admin_mycp - cp_boardoffline2 - Turn Board Online - Открыть форум - 30005 - - 0 - - - core - admin_mycp - cp_lastimportrun - Last import run - Последнее импортирование - 30005 - - 0 - - - core - admin_mycp - cp_settingsupdated - settings.xml has been updated - - 30005 - - 0 - - - core - admin_mycp - cp_lastxmlexport - Last XML export - Последнее экспортирование - 30005 - - 0 - - - core - admin_mycp - cp_settingsneedup - Settings Need Updating - Обновите настройки - 30005 - - 0 - - - core - admin_mycp - cp_modulessneedup - Modules Need Updating - Приложение: - 30005 - - 0 - - - core - admin_mycp - cp_taskssneedup - Tasks Need Updating - Приложение: - 30005 - - 0 - - - core - admin_mycp - cp_helpneedup - Help Files Need Updating - Приложение: - 30005 - - 0 - - - core - admin_mycp - cp_devnotes - Developer Notes - Заметки разработчика - 30005 - - 0 - - - core - admin_mycp - cp_clickhere_info - to reimport all apps to make sure your settings are up-to-date - для импортирования последних настроек - 30005 - - 0 - - - core - admin_mycp - cp_clickhere - Click Here - Нажмите здесь - 30005 - - 0 - - - core - admin_mycp - cp_bbcodeneedup - BBCodes Need Updating - Приложение: - 30005 - - 0 - - - core - admin_mycp - cp_welcomeipb3 - Welcome to IP.Board 3 - Панель управления IP.Board 3 - 30005 - 30005 - 0 - - - core - admin_mycp - cp_managevalidating - Manage Validation Queue - Ожидающие активации - 30005 - - 0 - - - core - admin_mycp - cp_managegroups - Manage User Groups - Группы - 30005 - - 0 - - - core - admin_mycp - cp_editsettings - Edit System Settings - Настройки системы - 30005 - - 0 - - - core - admin_mycp - cp_managemembers - Manage Members - Пользователи - 30005 - - 0 - - - core - admin_mycp - cp_skinmanager - Skin Manager - Стили - 30005 - - 0 - - - core - admin_mycp - cp_langmanager - Language Manager - Языки - 30005 - - 0 - - - core - admin_mycp - cp_manageforums - Manage Forums - Форумы - 30005 - - 0 - - - core - admin_mycp - cp_bulkmailer - Bulk Mailer - Рассылки - 30005 - - 0 - - - core - admin_mycp - cp_emoticonmanager - Emoticon Manager - Смайлики - 30005 - - 0 - - - core - admin_mycp - cp_find - Find - Найти - 30005 - - 0 - - - core - admin_mycp - cp_edit - Edit - Редактировать - 30005 - - 0 - - - core - admin_mycp - cp_go - Go - Ок - 30005 - - 0 - - - core - admin_mycp - cp_quicksearch - Quick Search - Быстрый поиск - 30005 - - 0 - - - core - admin_mycp - cp_members - members - пользователей - 30005 - - 0 - - - core - admin_mycp - cp_systemsettings - system settings - системные настройки - 30005 - - 0 - - - core - admin_mycp - cp_ipaddresses - IP addresses - IP адрес - 30005 - - 0 - - - core - admin_mycp - cp_systemstats - System Statistics - Статистика - 30005 - - 0 - - - core - admin_mycp - cp_usergroup - user group - группу - 30005 - - 0 - - - core - admin_mycp - cp_adminnotes - Admin Notes - Заметки - 30005 - - 0 - - - core - admin_mycp - cp_adminvalidationqueue - Admin Validation Queue - Очередь на активацию администратором - 30005 - - 0 - - - core - admin_mycp - cp_ipslatestnews - IPS Latest News - Последние новости - 30005 - - 0 - - - core - admin_mycp - cp_more - MORE - БОЛЬШЕ - 30005 - - 0 - - - core - admin_mycp - cp_yes - Yes - Да - 30005 - 30005 - 0 - - - core - admin_mycp - cp_ip - IP - IP-адрес - 30005 - - 0 - - - core - admin_mycp - cp_no - No - Нет - 30005 - - 0 - - - core - admin_mycp - cp_warning_converter - Simply visit this page to lock the converter and remove this message.]]> - Просто удалите директорию admin/applications_addon/ips/convert с сервера и данное предупреждение пропадет.]]> - 30005 - 30005 - 0 - - - core - admin_mycp - cp_registered - Registered - Зарегистрирован - 30005 - - 0 - - - core - admin_mycp - cp_view - View - Просмотр - 30005 - - 0 - - - core - admin_mycp - cp_savenotes - Save Admin Notes - Сохранить - 30005 - - 0 - - - core - admin_mycp - cp_from - from - из - 30005 - - 0 - - - core - admin_mycp - cp_totalmembers - Total Members - Пользователей - 30005 - - 0 - - - core - admin_mycp - cp_latestadminlogins - Latest Admin Logins - Последние посещения АЦ - 30005 - - 0 - - - core - admin_mycp - cp_awaitingvalidation - Awaiting Validation - Ожидают активации - 30005 - - 0 - - - core - admin_mycp - cp_onlinenow - Online Now - Сейчас на форуме - 30005 - - 0 - - - core - admin_mycp - cp_timeofaction - Time of action - Время действия - 30005 - - 0 - - - core - admin_mycp - cp_membername - Member Name - Пользователь - 30005 - - 0 - - - core - admin_mycp - cp_lastacpactions - Last 5 ACP Actions - Последние 5 действий АЦ - 30005 - - 0 - - - core - admin_mycp - cp_manage - Manage - Управление - 30005 - - 0 - - - core - admin_mycp - cp_resetwarning - Reset Warning - Сбросить предупреждения - 30005 - - 0 - - - core - admin_mycp - cp_awaitingmoderation - Awaiting Moderation - Ожидающих модерации - 30005 - - 0 - - - core - admin_mycp - cp_topics - Topics - Тем - 30005 - - 0 - - - core - admin_mycp - cp_php_warning - Some sections of the ACP may not operate until you upgrade.]]> - Некоторые разделы АЦ могут не работать, пока вы не обновите вашу версию PHP.]]> - 30005 - - 0 - - - core - admin_mycp - cp_posts - Posts - Сообщений - 30005 - - 0 - - - core - admin_mycp - cp_securityupdate - Security Update Available - Доступно обновление безопасности - 30005 - - 0 - - - core - admin_mycp - cp_emergency -
  • They were asked to clear their skin settings
  • They were asked to click a link to attempt access in the ACP
  • The ACP picked up the skin error and rebuilt the skin ID cache, the default skin and it may have turned on safe mode skins
  • What to do now
    • Firstly, if you don't wish to use safe mode skins, check the CHMOD value of the 'skin_cache' directory to make sure IPB can write into that directory
    • If the permissions are correct, check your 'System Settings -> General Configuration' settings to check the value of 'Safe Mode Skins' - disable if not required
    • As a precaution, rebuild all your skins by following the link below
    >> REBUILD ALL SKIN CACHES & REMOVE THIS WARNING <<]]>
    - -
  • Было предложено очистить настройки стиля
  • -
  • Было предложено перейти в админцентр
  • -
  • Был обновлен кеш стиля с ошибкой и, возможно, включены стили безопасного режима
  • -Что следует сделать ?
      -
    • Во-первых, если вы не хотите использовать стили безопасного режима, проверьте права доступа к директории 'skin_cache' и убедитесь, что IPB может производить запись файлов в нее.
    • -
    • Если права доступа верны, то проверьте настройку "Стили безопасного режима" в "Общих настройках" и выключите ее при необходимости.
    • -
    • Обновите кеш стилей для удаления этого предупреждения
    ]]>
    - 30005 - - 0 -
    - - core - admin_mycp - cp_installer_warning - Simply remove admin/install/index.php from your installation to remove this message.]]> - Сделать это можно просто удалив admin/install/index.php с сервера.]]> - 30005 - + admin_logs + mobilog_noresults + No mobile notification log entries + Нет записей в журнале + 31006 + 31006 0 core admin_mycp cp_newversion - New Version Avialable + New Version Available Доступна новая версия - 30005 - + 31006 + 31006 0 @@ -9145,8 +9368,8 @@ cp_version Version Версия - 30005 - + 31006 + 31006 0 @@ -9155,68 +9378,18 @@ cp_updateavailable Update Available Now Обновление доступно - 30005 - + 31006 + 31006 0 core admin_mycp - cp_onlinenow_info - (Includes Members and Guests) - (включая пользователей и гостей) - 30005 - - 0 - - - core - admin_mycp - cp_coppaaccounts - COPPA Accounts - COPPA - 30005 - - 0 - - - core - admin_mycp - cp_lockedaccounts - Locked Accounts - Заблокированных - 30005 - - 0 - - - core - admin_mycp - cp_upgrade_warning - here to complete.]]> - here для завершения.]]> - 30005 - - 0 - - - core - admin_mycp - cp_unlocked_warning - %s/install/index.php from your server at once!
    Leaving it on your server WILL compromise the security of your system.]]> - admin/install/index.php c вашего сервера!
    Оставив этот файл вы рискуете безопасностью.]]>
    - 30005 - - 0 - - - core - admin_mycp - cp_error - Error - Ошибка - 30005 - + cp_securityupdate + Security Update Available + Доступно обновление безопасности + 31006 + 31006 0 @@ -9225,68 +9398,18 @@ cp_moreinformation More Information Подробнее - 30005 - + 31006 + 31006 0 core admin_mycp - cp_availablenow - Available Now - Доступно - 30005 - - 0 - - - core - admin_mycp - cp_ipsblogs - IPS Latest Blogs - Последние блоги - 30005 - - 0 - - - core - admin_mycp - cp_ipsbulletin - IP.Board Bulletin - Сообщения IP.Board - 30005 - - 0 - - - core - admin_mycp - cp_activeadmins - Active Admins - Последние действия в АЦ - 30005 - - 0 - - - core - admin_mycp - cp_noticeupdate - NOTICE: UPDATE INFORMATION - Информация по обновлению - 30005 - - 0 - - - core - admin_mycp - cp_update_info - IPS Client Center and navigate to Your Downloads]]> - клиент-цент IBResource и перейдите на страницу Покупки]]> - 30005 - + cp_resetwarning + Reset Warning + Сбросить предупреждения + 31006 + 31006 0 @@ -9295,28 +9418,575 @@ cp_warning_rebuild
    >> REBUILD ALL SKIN CACHES & REMOVE THIS WARNING <<]]>

    >> Обновить кеши всех стилей <<]]>
    - 30005 - 30005 + 31006 + 31006 0
    core admin_mycp - cp_wannareset - Resetting the warning will NOT perform the upgrade for you!]]> - Продолжение удалит это предупреждение. Удаление этого предупреждения НЕ приведет к обновлению системы! - 30005 - 30005 + cp_upgrade_warning + here to complete.]]> + here для завершения.]]> + 31006 + 31006 0 core admin_mycp - cp_visitcc - VISIT IPS CLIENT AREA - ПОСЕТИТЬ КЛИЕНТ-ЦЕНТР - 30005 - + cp_emergency +
  • They were asked to clear their skin settings
  • They were asked to click a link to attempt access in the ACP
  • The ACP picked up the skin error and rebuilt the skin ID cache, the default skin and it may have turned on safe mode skins
  • What to do now
    • Firstly, if you don't wish to use safe mode skins, check the CHMOD value of the 'skin_cache' directory to make sure IPB can write into that directory
    • If the permissions are correct, check your 'System Settings -> General Configuration' settings to check the value of 'Safe Mode Skins' - disable if not required
    • As a precaution, rebuild all your skins by following the link below
    >> REBUILD ALL SKIN CACHES & REMOVE THIS WARNING <<]]>
    + +
  • Было предложено очистить настройки стиля
  • +
  • Было предложено перейти в админцентр
  • +
  • Был обновлен кеш стиля с ошибкой и, возможно, включены стили безопасного режима
  • +Что следует сделать ?
      +
    • Во-первых, если вы не хотите использовать стили безопасного режима, проверьте права доступа к директории 'skin_cache' и убедитесь, что IPB может производить запись файлов в нее.
    • +
    • Если права доступа верны, то проверьте настройку "Стили безопасного режима" в "Общих настройках" и выключите ее при необходимости.
    • +
    • Обновите кеш стилей для удаления этого предупреждения
    ]]>
    + 31006 + 31006 + 0 +
    + + core + admin_mycp + cp_installer_warning + Simply remove admin/install/index.php from your installation to remove this message.]]> + Сделать это можно просто удалив admin/install/index.php с сервера.]]> + 31006 + 31006 + 0 + + + core + admin_mycp + cp_unlocked_warning + %s/install/index.php from your server at once!
    Leaving it on your server WILL compromise the security of your system.]]> + admin/install/index.php c вашего сервера!
    Оставив этот файл вы рискуете безопасностью.]]>
    + 31006 + 31006 + 0 + + + core + admin_mycp + cp_error + Error + Ошибка + 31006 + 31006 + 0 + + + core + admin_mycp + cp_php_warning + Some sections of the ACP may not operate until you upgrade.]]> + Некоторые разделы АЦ могут не работать, пока вы не обновите вашу версию PHP.]]> + 31006 + 31006 + 0 + + + core + admin_mycp + cp_timeofaction + Time of action + Время действия + 31006 + 31006 + 0 + + + core + admin_mycp + cp_from + from + из + 31006 + 31006 + 0 + + + core + admin_mycp + cp_lastacpactions + Last 5 ACP Actions + Последние 5 действий АЦ + 31006 + 31006 + 0 + + + core + admin_mycp + cp_membername + Member Name + Пользователь + 31006 + 31006 + 0 + + + core + admin_mycp + cp_view + View + Просмотр + 31006 + 31006 + 0 + + + core + admin_mycp + cp_latestadminlogins + Latest Admin Logins + Последние посещения АЦ + 31006 + 31006 + 0 + + + core + admin_mycp + cp_savenotes + Save Admin Notes + Сохранить + 31006 + 31006 + 0 + + + core + admin_mycp + cp_registered + Registered + Зарегистрирован + 31006 + 31006 + 0 + + + core + admin_mycp + cp_warning_converter + Simply visit this page to lock the converter and remove this message.]]> + Просто удалите директорию admin/applications_addon/ips/convert с сервера и данное предупреждение пропадет.]]> + 31006 + 31006 + 0 + + + core + admin_mycp + cp_no + No + Нет + 31006 + 31006 + 0 + + + core + admin_mycp + cp_ip + IP + IP адрес + 31006 + 31006 + 0 + + + core + admin_mycp + cp_yes + Yes + Да + 31006 + 31006 + 0 + + + core + admin_mycp + cp_ipslatestnews + IPS Latest News + Последние новости + 31006 + 31006 + 0 + + + core + admin_mycp + cp_adminvalidationqueue + Admin Validation Queue + Очередь на активацию администратором + 31006 + 31006 + 0 + + + core + admin_mycp + cp_more + MORE + БОЛЬШЕ + 31006 + 31006 + 0 + + + core + admin_mycp + cp_adminnotes + Admin Notes + Заметки + 31006 + 31006 + 0 + + + core + admin_mycp + cp_ipaddresses + IP addresses + IP адрес + 31006 + 31006 + 0 + + + core + admin_mycp + cp_usergroup + user group + группу + 31006 + 31006 + 0 + + + core + admin_mycp + cp_systemsettings + system settings + системные настройки + 31006 + 31006 + 0 + + + core + admin_mycp + cp_go + Go + Ок + 31006 + 31006 + 0 + + + core + admin_mycp + cp_members + members + пользователей + 31006 + 31006 + 0 + + + core + admin_mycp + cp_edit + Edit + Редактировать + 31006 + 31006 + 0 + + + core + admin_mycp + cp_find + Find + Найти + 31006 + 31006 + 0 + + + core + admin_mycp + cp_emoticonmanager + Emoticon Manager + Смайлики + 31006 + 31006 + 0 + + + core + admin_mycp + cp_quicksearch + Quick Search + Быстрый поиск + 31006 + 31006 + 0 + + + core + admin_mycp + cp_bulkmailer + Bulk Mailer + Рассылки + 31006 + 31006 + 0 + + + core + admin_mycp + cp_langmanager + Language Manager + Языки + 31006 + 31006 + 0 + + + core + admin_mycp + cp_manageforums + Manage Forums + Форумы + 31006 + 31006 + 0 + + + core + admin_mycp + cp_skinmanager + Skin Manager + Стили + 31006 + 31006 + 0 + + + core + admin_mycp + cp_managegroups + Manage User Groups + Группы + 31006 + 31006 + 0 + + + core + admin_mycp + cp_managevalidating + Manage Validation Queue + Ожидающие активации + 31006 + 31006 + 0 + + + core + admin_mycp + cp_editsettings + Edit System Settings + Настройки системы + 31006 + 31006 + 0 + + + core + admin_mycp + cp_managemembers + Manage Members + Пользователи + 31006 + 31006 + 0 + + + core + admin_mycp + cp_welcomeipb3 + Welcome to IP.Board 3 + Панель управления IP.Board 3 + 31006 + 31006 + 0 + + + core + admin_mycp + cp_bbcodeneedup + BBCodes Need Updating + Приложение: + 31006 + 31006 + 0 + + + core + admin_mycp + cp_helpneedup + Help Files Need Updating + Приложение: + 31006 + 31006 + 0 + + + core + admin_mycp + cp_clickhere_info + to reimport all apps to make sure your settings are up-to-date + для импортирования последних настроек + 31006 + 31006 + 0 + + + core + admin_mycp + cp_devnotes + Developer Notes + Заметки разработчика + 31006 + 31006 + 0 + + + core + admin_mycp + cp_clickhere + Click Here + Нажмите здесь + 31006 + 31006 + 0 + + + core + admin_mycp + cp_lastxmlexport + Last XML export + Последнее экспортирование + 31006 + 31006 + 0 + + + core + admin_mycp + cp_settingsneedup + Settings Need Updating + Обновите настройки + 31006 + 31006 + 0 + + + core + admin_mycp + cp_modulessneedup + Modules Need Updating + Приложение: + 31006 + 31006 + 0 + + + core + admin_mycp + cp_taskssneedup + Tasks Need Updating + Приложение: + 31006 + 31006 + 0 + + + core + admin_mycp + cp_lastimportrun + Last import run + Последнее импортирование + 31006 + 31006 + 0 + + + core + admin_mycp + cp_settingsupdated + settings.xml has been updated + + 31006 + 31006 + 0 + + + core + admin_mycp + cp_boardoffline + Board Offline + Форум закрыт + 31006 + 31006 + 0 + + + core + admin_mycp + cp_boardoffline1 + Your board is currently offline + Форум в настоящее время закрыт + 31006 + 31006 + 0 + + + core + admin_mycp + cp_boardoffline2 + Turn Board Online + Открыть форум + 31006 + 31006 + 0 + + + core + admin_mycp + cp_yourphpversion + Your PHP Version (%s) is insufficient + Несоответствующая версия PHP (%s) + 31006 + 31006 + 0 + + + core + admin_mycp + cp_unfinishedupgrade + Unfinished Upgrade + Незаконченное обновление + 31006 + 31006 0 @@ -9325,238 +9995,98 @@ cp_unlocked_converter Unlocked Converter Present Найден незаблокированный скрипт конвертации форума - 30006 - + 31006 + 31006 0 core admin_mycp - pw_will_logout - Changing your password will log you out of the ACP upon submitting this form - При изменении пароля, вам прийдется повторно войти в АЦ - 30006 - 30006 + cp_converterpresent + Converter Present + Найден скрипт конвертации + 31006 + 31006 0 core admin_mycp - details_updated - Your details have been updated successfully - Ваши данные успешно обновлены - 30006 - 30006 + cp_unlockedinstaller + Unlocked Installer + Незаблокированный мастер установки + 31006 + 31006 0 core admin_mycp - change_not_match_pw - The two passwords supplied did not match - Введенные пароли не соответствуют друг другу. - 30006 - + cp_installerpresent + Installer Present + Найден установщик системы + 31006 + 31006 0 core admin_mycp - changed_password - Administrator updated his password - Администратор изменил пароль - 30006 - + cp_secondsago + seconds ago + секунд назад + 31006 + 31006 0 core admin_mycp - changed_email - Administrator updated his email address to %s - Администратор изменил e-mail адрес на %s - 30006 - + cp_minutesago + minutes ago + минут назад + 31006 + 31006 0 core admin_mycp - change_not_match - The email addresses supplied did not match - Введенные e-mail адреса не соответствуют друг другу. - 30006 - + cp_index + Index + Главная + 31006 + 31006 0 core admin_mycp - change_email_already_used - The email address you supplied is already in use - Введенный e-mail адрес уже используется - 30006 - + cp_spammeraccounts + Spammers + Спамеры + 31006 + 31006 0 core admin_mycp - already_using_email - You are already using that email address - Вы уже используете этот e-mail адрес - 30006 - + cp_acpnotes + You can use this section to keep notes for all members who access the Admin CP. It is globally editable by all admins who have access to the dashboard. + Вы можете использовать этот раздел, чтобы оставлять заметки всем пользователям, имеющим доступ в АЦ. Эта функция доступна всем администраторам, имеющим доступ в АЦ. + 31006 + 31006 0 core admin_mycp - change_nothing_update - You did not specify to change your email or password - Вы не ввели ничего для изменения e-mail адреса или пароля - 30006 - - 0 - - - core - admin_mycp - change_both_fields - You must fill in both fields - Вы должны заполнить оба поля - 30006 - - 0 - - - core - admin_mycp - change__pass_confirm - Confirm New Password - Подтверждение нового пароля - 30006 - - 0 - - - core - admin_mycp - change__pass - New Password - Новый пароль - 30006 - - 0 - - - core - admin_mycp - change_pass_details - Only fill in the fields if you wish to change your password - Заполните поля, если вы хотите изменить пароль - 30006 - - 0 - - - core - admin_mycp - change__email_confirm - Confirm New Email Address - Подтверждение нового е-mail адреса - 30006 - 30006 - 0 - - - core - admin_mycp - change__email - New Email Address - Новый е-mail адрес - 30006 - 30006 - 0 - - - core - admin_mycp - change__confirm - Update - Обновить - 30006 - - 0 - - - core - admin_mycp - change_email_details - Only fill in the fields if you wish to change your email address - Заполните поля, если вы хотите изменить е-mail адрес - 30006 - 30006 - 0 - - - core - admin_mycp - mycp_change_details - Change Details - Изменение данных - 30006 - 30006 - 0 - - - core - admin_mycp - minifywrite_head - Minify Disabled - Minify отключен - 30011 - 30011 - 0 - - - core - admin_mycp - furlcache_outofdate - FURL Cache Out Of Date - Кеш ЧПУ устарел - 30011 - 30011 - 0 - - - core - admin_mycp - rebuild_furl_cache - Rebuild FURL Cache - Обновить кеш ЧПУ - 30011 - 30011 - 0 - - - core - admin_mycp - fulltext_off - Fulltext Search Disabled - Полнотекстовый поиск отключен - 30011 - 30011 - 0 - - - core - admin_mycp - fulltext_turnon - You are using the traditional search method but have disabled fulltext searching. Fulltext searching provides for improved performance over traditional MySQL search lookups and should usually be enabled. - Сейчас форум использует обычный тип поиск, полнотекстовый отключен. - 30011 - 30011 + ds_log_all_desc + + + 31006 + 31006 0 @@ -9565,8 +10095,78 @@ fulltext_find Enable Fulltext Searching... Включить полнотекстовый поиск - 30011 - 30011 + 31006 + 31006 + 0 + + + core + admin_mycp + ds_log_all_title + Log To File Enabled + Включено журналирование в файлы + 31006 + 31006 + 0 + + + core + admin_mycp + fulltext_turnon + You are using the traditional search method but have disabled fulltext searching. Fulltext searching provides for improved performance over traditional MySQL search lookups and should usually be enabled. + Сейчас форум использует обычный тип поиск, полнотекстовый отключен. + 31006 + 31006 + 0 + + + core + admin_mycp + rebuild_furl_cache + Rebuild FURL Cache + Обновить кеш ЧПУ + 31006 + 31006 + 0 + + + core + admin_mycp + furlcache_outofdate_desc + The rule definitions for the %s application may be out of date. + Правила ЧПУ для %s приложения могут быть устаревшими. + 31006 + 31006 + 0 + + + core + admin_mycp + fulltext_off + Fulltext Search Disabled + Полнотекстовый поиск отключен + 31006 + 31006 + 0 + + + core + admin_mycp + furlcache_outofdate + FURL Cache Out Of Date + Кеш ЧПУ устарел + 31006 + 31006 + 0 + + + core + admin_mycp + minifywrite_head + Minify Disabled + Minify отключен + 31006 + 31006 0 @@ -9575,468 +10175,538 @@ minifynot_writeable You have Minify switched on in your settings but IP.Board cannot write to /cache/tmp. Please check permissions on that directory. If this message persists, please turn off minify. Minify включен в настройках вашего форума, но не может записывать данные в папку /cache/tmp. Пожалуйста, проверьте CHMOD права к ней. Если сообщение не уберется, выключите Minify. - 30011 - 30011 + 31006 + 31006 0 core - admin_palette - pal_upload - UPLOAD - ЗАГРУЗИТЬ - 30005 - + admin_mycp + pw_will_logout + Changing your password will log you out of the ACP upon submitting this form + При изменении пароля, вам прийдется повторно войти в АЦ + 31006 + 31006 0 core - admin_palette - pal_select_a_file - Select a file - Выберите файл - 30005 - + admin_mycp + changed_password + Administrator updated his password + Администратор изменил пароль + 31006 + 31006 0 core - admin_palette - pal_attachment_space_used - Attachment space used - Место под прикрепленные файлы использовано - 30005 - + admin_mycp + details_updated + Your details have been updated successfully + Ваши данные успешно обновлены + 31006 + 31006 0 core - admin_palette - pal_file_space_used - File space used - Файловое пространство использовано - 30005 - + admin_mycp + changed_email + Administrator updated his email address to %s + Администратор изменил e-mail адрес на %s + 31006 + 31006 0 core - admin_palette - pal_of - of - из - 30005 - + admin_mycp + change_not_match_pw + The two passwords supplied did not match + Введенные пароли не соответствуют друг другу. + 31006 + 31006 0 core - admin_palette - pal_max_single_upload_size - Max. single upload size: - Максимальный размер загружаемого файла: - 30005 - + admin_mycp + change_not_match + The email addresses supplied did not match + Введенные e-mail адреса не соответствуют друг другу. + 31006 + 31006 0 core - admin_palette - pal_max_single_upload_size_1 - Max. single upload size - Максимальный размер загружаемого файла: - 30005 - + admin_mycp + change_email_already_used + The email address you supplied is already in use + Введенный e-mail адрес уже используется + 31006 + 31006 0 core - admin_palette - pal_item - Item - Элемент - 30005 - + admin_mycp + already_using_email + You are already using that email address + Вы уже используете этот e-mail адрес + 31006 + 31006 0 core - admin_palette - pal_insert_item - Insert Item... - Вставить элемент - 30005 - + admin_mycp + change__pass + New Password + Новый пароль + 31006 + 31006 0 core - admin_palette - pal_legend - Legend - Подпись - 30005 - + admin_mycp + change__pass_confirm + Confirm New Password + Подтверждение нового пароля + 31006 + 31006 0 core - admin_palette - pal_pages - Pages - Страницы - 30005 - + admin_mycp + change_nothing_update + You did not specify to change your email or password + Вы не ввели ничего для изменения e-mail адреса или пароля + 31006 + 31006 0 core - admin_palette - pal_insert - Insert... - Вставить... - 30005 - + admin_mycp + change_both_fields + You must fill in both fields + Вы должны заполнить оба поля + 31006 + 31006 0 core - admin_palette - pal_back - Back - Назад - 30005 - + admin_mycp + change_pass_details + Only fill in the fields if you wish to change your password + Заполните поля, если вы хотите изменить пароль + 31006 + 31006 0 core - admin_palette - pal_template - template - шаблон - 30005 - + admin_mycp + change__email + New Email Address + Новый е-mail адрес + 31006 + 31006 0 core - admin_palette - pal_red_removed_text - Red: Removed Text - Красный: удаленный текст - 30005 - + admin_mycp + change__email_confirm + Confirm New Email Address + Подтверждение нового е-mail адреса + 31006 + 31006 0 core - admin_palette - pal_green_added_text - Green: Added Text - Зеленый: добавленный текст - 30005 - + admin_mycp + change__confirm + Update + Обновить + 31006 + 31006 0 core - admin_palette - pal_show_item - Show Item... - Показать элемент - 30005 - + admin_mycp + change_email_details + Only fill in the fields if you wish to change your email address + Заполните поля, если вы хотите изменить е-mail адрес + 31006 + 31006 0 core - admin_palette - pal_url - URL - URL - 30005 - + admin_mycp + mycp_change_details + Change Details + Изменение данных + 31006 + 31006 0 core - admin_palette - pal_delete_item - Delete Item... - Удалить элемент - 30005 - + admin_mycp + lc_title_expired + Support License Expired + Лицензия не активна + 31006 + 31006 0 core - admin_palette - pal_no_open_editors_to_extract_med - No open editors to extract media from - Ни один редактор не открыт для загрузки видео из - 30005 - + admin_mycp + lc_msg_expired + Your support license has expired, to continue receiving support and other services, please renew your license. + Срок активности вашей лицензии истек. Для возобновления сервиса поддержки и доступа к дистрибутивам необходимо продлить лицензию. + 31006 + 31006 0 core - admin_palette - pal_preview - Preview - Предпросмотр - 30005 - + admin_mycp + lc_title_notfound + URL License Missing + Отсутствует URL лицензии + 31006 + 31006 0 core - admin_palette - pal_images - Images - Изображения - 30005 - + admin_mycp + lc_msg_notfound + %s' which is not found in our system, please remove your key and then readd it with the correct URL, you can do this via the License Key section of the ACP.]]> + %s' не зарегистрировано в нашей системе, пожалуйста, свяжитесь с нашими менеджерами.]]> + 31006 + 31006 0 core - admin_palette - pal_urls - URLs - URLs - 30005 - + admin_mycp + lc_title_nokey + License Key Missing + Отсутствует ключ лицензии + 31006 + 31006 0 core - admin_palette - pal_templates - Templates - Шаблоны - 30005 - + admin_mycp + lc_msg_nokey + click here to enter it now and receive access to the services provided by your license!]]> + нажмите здесь, чтобы заполнить его сейчас.]]> + 31006 + 31006 0 core - admin_palette - pal_blocks - Blocks - Блоки - 30005 - + admin_mycp + cp_profilephotoerr_title + Your profile photo directory is not writable + Директория фотографий для профиля не имеет прав на запись + 31006 + 31006 0 core - admin_palette - pal_options - Options - Настройки - 30005 - + admin_mycp + cp_profilephotoerr_msg + %s' and make sure that it is writable.]]> + %s' и убедитесь, что есть права на запись]]> + 31006 + 31006 0 core - admin_palette - pal_bgroups - B.Groups - Группы - 30005 - + admin_mycp + cp_perfmodeon_title + Performance Mode Enabled + Режим производительности включен + 31006 + 31006 0 core - admin_palette - pal_close_library - Close Library - Закрыть библиотеку - 30005 - + admin_mycp + cp_perfmodeon_msg + Some features, such as messenger, are disabled while performance mode is enabled. + Некоторый возможности, такие как личные сообщения, отключены в режиме производительности. + 31006 + 31006 0 core - admin_palette - pal_extract_media - Extract Media... - Извлечь - 30005 - + admin_mycp + cp_gdnotinstalled_title + GD is not installed + GD не установлена + 31006 + 31006 0 core - admin_palette - pal_view_wrapped_html - View Wrapped HTML - Обработанный HTML - 30005 - + admin_mycp + cp_gdnotinstalled_msg + It appears that GD is not installed on your server, in order to use certain functionality, such as thumbnail generation, you will need to have it installed. + Это значит, что GD не установлена на вашем сервере, для того чтобы использовать функционал создания иконок, необходимо установить GD. + 31006 + 31006 0 core - admin_palette - pal_view_raw_html - View Raw HTML - Необработанный HTML - 30005 - + admin_mycp + cp_availablenow + Available Now + Доступно + 31006 + 31006 0 core - admin_palette - pal_attach_uploading_file - Uploading File... - Загрузка файла - 30005 - + admin_mycp + cp_ipsblogs + IPS Latest Blogs + Последние блоги + 31006 + 31006 0 core - admin_palette - pal_attach_no_items - There are no items currently - В настоящее время элементов нет - 30005 - + admin_mycp + cp_ipsbulletin + IP.Board Bulletin + Сообщения IP.Board + 31006 + 31006 0 core - admin_palette - pal_attach_init_progress - Initializing Attachments... - Инициализация прикрепленных файлов - 30005 - + admin_mycp + cp_activeadmins + Active Admins + Последние действия в АЦ + 31006 + 31006 0 core - admin_palette - pal_attach_upload_ok - - Загрузка завершена успешно. Загруженные файлы доступны в «Управление текущими файлами» - 30005 - + admin_mycp + cp_noticeupdate + NOTICE: UPDATE INFORMATION + Информация по обновлению + 31006 + 31006 0 core - admin_palette - pal_attach_upload_failed - Upload failed. Please ask the administrator to check the settings and permissions - Загрузка неудачна. Попросите администратора проверить настройки и права доступа - 30005 - + admin_mycp + cp_update_info + IPS Client Center and navigate to Your Downloads]]> + клиент-центр IBResource и перейдите на страницу Покупки]]> + 31006 + 31006 0 core - admin_palette - pal_attach_upload_too_big - Upload failed. The file was larger than the available space - Загрузка не удалась. Размер файла больше чем доступное пространство на диске - 30005 - + admin_mycp + cp_visitcc + VISIT IPS CLIENT AREA + ПОСЕТИТЬ КЛИЕНТ-ЦЕНТР + 31006 + 31006 0 core - admin_palette - pal_attach_no_upload - Upload failed. You did not select a file to upload - Загрузка не удалась. Не выбран файл для загрузки - 30005 - + admin_mycp + cp_wannareset + Resetting the warning will NOT perform the upgrade for you!]]> + Продолжение удалит это предупреждение. Удаление этого предупреждения НЕ приведет к обновлению системы! + 31006 + 31006 0 core - admin_palette - pal_attach_invalid_mime_type - Upload failed. You are not permitted to upload this type of file - Загрузка не удалась. Вам не разрешено загружать этот тип файлов - 30005 - + admin_mycp + cp_newversion_info + A new version of IP.Board is available now. + Доступна новая версия IP.Board + 31006 + 31006 0 core - admin_palette - pal_attach_no_upload_dir_perms - Upload failed. Please ask the administrator to ensure the uploads directory is writeable - Загрузка не удалась. Пожалуйста, сообщите администратору о неверных правах доступа к директории загружаемых файлов - 30005 - + admin_mycp + notificationcenter + Notification Center + Уведомления + 31006 + 31006 0 core - admin_palette - pal_attach_no_upload_dir - Upload failed. Please ask the administrator to ensure the uploads directory is available - Загрузка не удалась. Сообщите администратору о неверных правах доступа к директории загружаемых файлов - 30005 - + admin_mycp + ipboardlicenseerror + IP.Board License Message + Лицензия на IP.Board + 31006 + 31006 0 core - admin_palette - pal_attach_attach_remove - Delete attachment - Удалить прикрепленный файл - 30005 - + admin_mycp + licensenocomm + There was a problem communicating with the license verification server. + Возникла проблема при соединении с сервером проверки лицензии. + 31006 + 31006 0 core - admin_palette - pal_attach_ready - Attachment system ready - Система загрузки файлов готова - 30005 - + admin_mycp + suhosin_badvalue4 + Your host will need to change this in the php.ini file.]]> + Необходимо привести значение в соответствии с рекомендуемым, исправив его в php.ini файле. ]]> + 31006 + 31006 0 core - admin_palette - pal_attach_remove_warn - Proceed with attachment removal? - Удалить прикрепленный файл ? - 30005 - + admin_mycp + suhosin_badvalue3 + Your host will need to change this in the php.ini file.]]> + Необходимо привести значение в соответствии с рекомендуемым, исправив его в php.ini файле. ]]> + 31006 + 31006 0 core - admin_palette - pal_attach_attach_insert - Insert attachment into text editor - Добавить прикрепленный файл в сообщение - 30005 - + admin_mycp + suhosin_badvalue2 + Your host will need to change this in the php.ini file.]]> + Необходимо привести значение в соответствии с рекомендуемым, исправив его в php.ini файле. ]]> + 31006 + 31006 0 core - admin_palette - pal_attach_attach_removed - Attachment Removed - Прикрепленный файл удален - 30005 - + admin_mycp + suhosin_badvalue1 + Your host will need to change this in the php.ini file.]]> + Необходимо привести значение в соответствии с рекомендуемым, исправив его в php.ini файле. ]]> + 31006 + 31006 + 0 + + + core + admin_mycp + suhosin_notification + Suhosin Enabled + Включен Suhosin патч для PHP + 31006 + 31006 + 0 + + + core + admin_mycp + cp_upgradefinishfolder_msg + We have detected that %s is present on your server. You should remove this folder to prevent potential abuse. + Обнаружено наличие директории %s на вашем сервере. Вам необходимо удалить эту директорию в целях безопасности. + 31006 + 31006 + 0 + + + core + admin_mycp + cp_upgradefinishfolder + upgradeFinish Folder Detected + Обнаружена директория upgradeFinish + 31006 + 31006 + 0 + + + core + admin_mycp + cp_newversion_link + Click here for more information. + Подробнее + 31006 + 31006 + 0 + + + core + admin_mycp + cp_validations + Pending Validations + Ожидающие активации + 31006 + 31006 + 0 + + + core + admin_mycp + cp_validations_info + There are %d accounts awaiting validation. + На данный момент %s учетных записей, ожидающих активации. + 31006 + 31006 + 0 + + + core + admin_mycp + cp_validations_review + Click here to review. + Перейти к списку. + 31006 + 31006 0 @@ -10045,3212 +10715,468 @@ pal_attach_attach_removal Removing Attachment... Удаление прикрепленного файла... - 30005 - + 31006 + 31006 0 core - admin_posts - upload_failed - Upload failed. The BBCode XML file was missing, empty, or corrupted. - Загрузка не удалась. XML файл с BB-кодами либо пуст, либо содержит неверную структуру. - 30005 - 30005 + admin_palette + pal_attach_attach_removed + Attachment Removed + Прикрепленный файл удален + 31006 + 31006 0 core - admin_posts - bbcode_import_app - %s: %s BBcode inserted, %s updated - %s: %s BB-кодов добавлено, %s обновлено - 30005 - + admin_palette + pal_attach_attach_insert + Insert attachment into text editor + Добавить прикрепленный файл в сообщение + 31006 + 31006 0 core - admin_posts - no_bbcode_found_edit - We could not determine which BBCode you were attempting to edit. - Не удалось определить какой код вы хотите отредактировать. - 30005 - 30005 + admin_palette + pal_attach_remove_warn + Proceed with attachment removal? + Удалить прикрепленный файл ? + 31006 + 31006 0 core - admin_posts - bbcode_test - BBCode Test:

    ]]>
    - Тест BBCode:

    ]]>
    - 30005 - + admin_palette + pal_attach_ready + Attachment system ready + Система загрузки файлов готова + 31006 + 31006 0
    core - admin_posts - no_bbcode_found_delete - We could not find the BBCode you were attempting to delete. - Не удалось определить какой код вы хотите удалить. - 30005 - 30005 + admin_palette + pal_attach_attach_remove + Delete attachment + Удалить прикрепленный файл + 31006 + 31006 0 core - admin_posts - import_complete - BBCode XML file import completed. - Импорт XML файла BB-кода завершен. - 30005 - + admin_palette + pal_attach_no_upload_dir + Upload failed. Please ask the administrator to ensure the uploads directory is available + Загрузка не удалась. Сообщите администратору о неверных правах доступа к директории загружаемых файлов + 31006 + 31006 0 core - admin_posts - must_use_content - - Для не одиночных BB-кодов необходимо использовать тег {content} - 30005 - 30005 + admin_palette + pal_attach_no_upload_dir_perms + Upload failed. Please ask the administrator to ensure the uploads directory is writeable + Загрузка не удалась. Пожалуйста, сообщите администратору о неверных правах доступа к директории загружаемых файлов + 31006 + 31006 0 core - admin_posts - complete_form - You must complete the form fully. - Вы должны заполнить форму полностью. - 30005 - + admin_palette + pal_attach_invalid_mime_type + Upload failed. You are not permitted to upload this type of file + Загрузка не удалась. Вам не разрешено загружать этот тип файлов + 31006 + 31006 0 core - admin_posts - tag_already - The tag you entered is already in use. - Тег уже используется в системе. - 30005 - 30005 + admin_palette + pal_attach_no_upload + Upload failed. You did not select a file to upload + Загрузка не удалась. Не выбран файл для загрузки + 31006 + 31006 0 core - admin_posts - must_use_option - - Для BB-кодов с опциями необходимо использовать тег {option} - 30005 - 30005 + admin_palette + pal_attach_upload_too_big + Upload failed. The file was larger than the available space + Загрузка не удалась. Размер файла больше чем доступное пространство на диске + 31006 + 31006 0 core - admin_posts - m_import_complete - Media Tag XML file import completed - Импорт XML файла медиа-тегов завершен. - 30005 - 30005 + admin_palette + pal_attach_upload_failed + Upload failed. Please ask the administrator to check the settings and permissions + Загрузка неудачна. Попросите администратора проверить настройки и права доступа + 31006 + 31006 0 core - admin_posts - m_error_name - You must specify a Media Tag replacement title.]]> - Вы должны ввести название медиа-тега]]> - 30005 - 30005 + admin_palette + pal_attach_upload_ok + + Загрузка завершена успешно. Загруженные файлы доступны в «Управление текущими файлами» + 31006 + 31006 0 core - admin_posts - m_replace_removed - Media Tag replacement removed. - Медиа-тег удален - 30005 - 30005 + admin_palette + pal_attach_init_progress + Initializing Attachments... + Инициализация прикрепленных файлов + 31006 + 31006 0 core - admin_posts - m_upload_failed - Upload failed. The Media Tag XML file was missing, empty, or corrupted. - Загрузка не удалась. XML файл не найден или поврежден. - 30005 - 30005 + admin_palette + pal_attach_no_items + There are no items currently + В настоящее время элементов нет + 31006 + 31006 0 core - admin_posts - edited_bbcode - Custom BBCode Edited - Дополнительный BB-код изменен. - 30005 - + admin_palette + pal_attach_uploading_file + Uploading File... + Загрузка файла + 31006 + 31006 0 core - admin_posts - new_bbcode - New BBCode Added - Дополнительный BB-код добавлен. - 30005 - 30005 + admin_palette + pal_view_raw_html + View Raw HTML + Необработанный HTML + 31006 + 31006 0 core - admin_posts - m_manager - Media Tag Manager - Управление медиа-тегами - 30005 - 30005 + admin_palette + pal_view_wrapped_html + View Wrapped HTML + Обработанный HTML + 31006 + 31006 0 core - admin_posts - m_error_replace - You must specify Media Tag replacement HTML.]]> - Вы должны ввести шаблон замены медиа-тега.]]> - 30005 - 30005 + admin_palette + pal_extract_media + Extract Media... + Извлечь + 31006 + 31006 0 core - admin_posts - m_error_match - You must specify a Media Tag match string.]]> - Необходимо указать строку совпадения медиа-тега.]]> - 30005 - 30005 + admin_palette + pal_close_library + Close Library + Закрыть библиотеку + 31006 + 31006 0 core - admin_posts - m_tag_added - - - 30005 - 30005 + admin_palette + pal_bgroups + B.Groups + Группы + 31006 + 31006 0 core - admin_posts - m_tag_updated - - - 30005 - 30005 - 0 - - - core - admin_posts - bbcode_title - Custom BBCode - BB-код - 30005 - - 0 - - - core - admin_posts - add_edit - Add/Edit BBCode - Добавить/Изменить BB-код - 30005 - 30005 - 0 - - - core - admin_posts - your_bbcodes - Your Custom BBcodes - Пользовательские BB-коды - 30005 - 30005 - 0 - - - core - admin_posts - bbcode_options + admin_palette + pal_options Options - Параметры - 30005 - + Настройки + 31006 + 31006 0 core - admin_posts - test_parse - Test BBCode Parsing - Проверка работы BB-кодов - 30005 - 30005 + admin_palette + pal_blocks + Blocks + Блоки + 31006 + 31006 0 core - admin_posts - bbcode_tag - Custom BBCode Tag - Тег - 30005 - + admin_palette + pal_templates + Templates + Шаблоны + 31006 + 31006 0 core - admin_posts - import_new_bbcode - Import New BBCodes - Импортировать новые BB-коды - 30005 - + admin_palette + pal_urls + URLs + URLs + 31006 + 31006 0 core - admin_posts - bbcode_import - Import - Импортировать - 30005 - - 0 - - - core - admin_posts - enter_test_parse - Enter the post content to test parse here - Введите текст для проверки - 30005 - - 0 - - - core - admin_posts - export_bbcode - Export (XML) - Экспортировать - 30005 - - 0 - - - core - admin_posts - addnew_bbcode - Add BBCode - Добавить - 30005 - 30005 - 0 - - - core - admin_posts - upload_bbcode_dupe - Duplicate entries will not be imported - Существующие записи импортированы не будут. - 30005 - 30005 - 0 - - - core - admin_posts - upload_bbcode_xml - Upload XML BBCode List]]> - Загрузка XML списка BB-кодов ]]> - 30005 - 30005 - 0 - - - core - admin_posts - bbcode_header - Custom BBCodes - Пользовательские BB-коды - 30005 - 30005 - 0 - - - core - admin_posts - import_bbcode_all - Import (Apps) - Импорт из приложений - 30005 - - 0 - - - core - admin_posts - delete_bbcode - Delete BBCode... - Удалить - 30005 - - 0 - - - core - admin_posts - export_bbcode_all - Export (Apps) - Экспорт в приложения - 30005 - - 0 - - - core - admin_posts - edit_bbcode - Edit BBCode... - Изменить BB-код - 30005 - - 0 - - - core - admin_posts - available_sections - Available in all sections - Доступен во всех разделах - 30005 - 30005 - 0 - - - core - admin_posts - all_groups - All current and future groups - Все текущие и будущие группы - 30005 - 30005 - 0 - - - core - admin_posts - bbcache_action - Drop all %s cached items? - Удалить кеш всех %s объектов? - 30005 - 30005 - 0 - - - core - admin_posts - bbcache_title - Content Cache Enabled - Кеширование содержимого включено - 30005 - 30005 - 0 - - - core - admin_posts - bbcache_desc - The content cache is enabled which means that any changes to this BBCode will not be automatically applied to previous posts unless you remove all cached content. - Задействовано кеширование содержимого, это значит, что любые изменения этого BB-кода не будут автоматически применены к предыдущим сообщениям до тех пор пока не будет удалено кешированное содержимое. - 30005 - 30005 - 0 - - - core - admin_posts - bbcode_title_title - Custom BBCode Title - BB-код - 30005 - - 0 - - - core - admin_posts - bbcode_useinguide - Used on the BBCode help guides - Используется на страницах помощи по BB-кодам - 30005 - - 0 - - - core - admin_posts - bbcode_example - Custom BBCode Example - Пример использования - 30005 - 30005 - 0 - - - core - admin_posts - bbcode_description - Custom BBCode Description - Полное описание - 30005 - 30005 - 0 - - - core - admin_posts - bbcode_example_info - - Тег для примера: [tag]Здесь ваш пример![/tag]]]> - 30005 - 30005 - 0 - - - core - admin_posts - bbcode_aliases - Custom BBCode Aliases (Optional) - Псевдонимы (опционально) - 30005 - 30005 - 0 - - - core - admin_posts - bbcode_tag_info - tag]]> - tag]]> - 30005 - - 0 - - - core - admin_posts - bbcode_singletag_info - Example: [hr] to create a <hr /> HTML tag]]> - Пример: [hr] для HTML тега <hr />]]> - 30005 - - 0 - - - core - admin_posts - bbcode_singletag - Single Tag Only - Одиночный тег? - 30005 - - 0 - - - core - admin_posts - bbcode_aliases_info - - Список псевдонимов для данного тега (разделитель запятая) - 30005 - 30005 - 0 - - - core - admin_posts - bbcode_useoption - Use Option in tag? - Использовать опции в теге? - 30005 - - 0 - - - core - admin_posts - bbcode_useoption_info - - - 30005 - - 0 - - - core - admin_posts - bbcode_switch - Switch option and content? - Поменять option и content местами? - 30005 - - 0 - - - core - admin_posts - bbcode_switch_info - - - 30005 - - 0 - - - core - admin_posts - bbcode_noparse_info - Prevents parsing of other BBCodes within this BBCode - Предотвращает обработку других BB-кодов внутри этого BB-кода - 30005 - - 0 - - - core - admin_posts - bbcode_optional_info - Is the option value optional? - Значение option необязательно? - 30005 - - 0 - - - core - admin_posts - bbcode_optional - Option is optional? - option обязательно ? - 30005 - - 0 - - - core - admin_posts - bbcode_noparse - Prevent other codes parsing? - Предотвращать разбор вложенных кодов ? - 30005 - - 0 - - - core - admin_posts - bbcode_php_info_loc - - - 30005 - 30005 - 0 - - - core - admin_posts - bbcode_replace_info - <tag thing='{option}'>{content}</tag>]]> - <tag>{content}</tag>
    <tag thing='{option}'>{content}</tag>]]>
    - 30005 - - 0 -
    - - core - admin_posts - bbcode_replace - Custom BBCode Replacement - Шаблон замены BB-кода - 30005 - - 0 - - - core - admin_posts - bbcode_groups - Which groups can use this BBCode? - Каким группам разрешено использовать этот код ? - 30005 - 30005 - 0 - - - core - admin_posts - bbcode_groups_infp - If none selected, no groups can use the BBCode - Если ни одной группы не выбрано, то ни одна группа не сможет использовать BB-код - 30005 - 30005 - 0 - - - core - admin_posts - bbcode_whereused - Where can the BBCode be used? - Где BB-код может использоваться ? - 30005 - - 0 - - - core - admin_posts - bbcode_image - BBCode Image - Изображение BB-кода - 30005 - 30005 - 0 - - - core - admin_posts - bbcode_whereused_info - You can enable and disable this BBCode in different sections individually - Можно включать или отключать этот BB-код в разных разделах по отдельности - 30005 - - 0 - - - core - admin_posts - bbcode_php - OR PHP file to execute - ИЛИ PHP файл для исполнения - 30005 - - 0 - - - core - admin_posts - bbcode_php_info - Useful if you need to perform regular expressions or conditional parsing]]> - Используйте когда необходимо использовать регулярные выражения или условную обработку]]> - 30005 - - 0 - - - core - admin_posts - bbcode_image_info_loc - Image should be in public/style_images/(skin_directory)/rte_icons/ - Изображение должно находиться в директории public/style_images/(директория_стиля)/rte_icons/ - 30005 - - 0 - - - core - admin_posts - bbcode_optdial_info - - - 30005 - - 0 - - - core - admin_posts - bbcode_image_info - Button is used if populated, else bbcode is placed into editor other styles menu. - Если изображение указано, то оно будет отображаться в виде кнопки - 30005 - - 0 - - - core - admin_posts - bbcode_contdial_info - - - 30005 - 30005 - 0 - - - core - admin_posts - bbcode_optdial - - - 30005 - - 0 - - - core - admin_posts - bbcode_contdial - - - 30005 - 30005 - 0 - - - core - admin_posts - media_add_replace - Add Media Tag replacement - Добавить замену медиа-тега - 30005 - - 0 - - - core - admin_posts - media_edit - Edit Media Tag... - Изменить - 30005 - - 0 - - - core - admin_posts - media_edit_replace - Edit Media Tag replacement - Изменить медиа-тег - 30005 - - 0 - - - core - admin_posts - media_error - Form Error]]> - Ошибка формы ]]> - 30005 - - 0 - - - core - admin_posts - media_title_info - Used as a reference for the tag - Используется во всплывающей подсказке медиа-тега - 30005 - - 0 - - - core - admin_posts - media_title - Media Replacement Title - Название - 30005 - - 0 - - - core - admin_posts - media_add - Add Media Tag... - Добавить - 30005 - - 0 - - - core - admin_posts - bbcode_stripsearch_info - Removes content within this bbcode from the search results entirely. - Удаляет содержимое BB-кода из результатов поиска - 30005 - - 0 - - - core - admin_posts - bbcode_stripsearch - Strip from search results - Вырезать из результатов поиска - 30005 - - 0 - - - core - admin_posts - bbcode_protected_info - Prevents users from being able to delete this BBCode - Не позволять пользователям удалять этот BB-код - 30005 - - 0 - - - core - admin_posts - bbcode_protected - BBCode protected? - Защищенный BB-код ? - 30005 - - 0 - - - core - admin_posts - media_html - Media Replacement HTML - Шаблон замены медиа-тега - 30005 - - 0 - - - core - admin_posts - media_match_info -
    Ex: http://www.test.com/23423/
    Match: http://www.test.com/{1}/]]>
    -
    Пример: http://www.test.com/23423/
    Совпадение: http://www.test.com/{1}/]]>
    - 30005 - - 0 -
    - - core - admin_posts - media_match - Media Replacement Match - Медиа-тег - 30005 - - 0 - - - core - admin_posts - media_tag_title - Media Tag - Медиа-теги - 30005 - - 0 - - - core - admin_posts - media_current - Current Media Tag Replacements - Медиа-теги - 30005 - - 0 - - - core - admin_posts - media_html_info -
    Ex: <a href="http://www.testm.com/$1/">$1</a>
    Result: <a href="http://www.testm.com/23423/">23423</a>]]>
    -
    Пример: <a href="http://www.testm.com/$1/">$1</a>
    Совпадение: <a href="http://www.testm.com/23423/">23423</a>]]>
    - 30005 - - 0 -
    - - core - admin_posts - media_delete - Delete Media Tag... - Удалить - 30005 - - 0 - - - core - admin_posts - media_exports - Export Media Tags... - Экспортировать - 30005 - - 0 - - - core - admin_posts - media_export - Export Media Tag... - Экспортировать - 30005 - - 0 - - - core - admin_posts - media_import_button - Import - Импортировать - 30005 - - 0 - - - core - admin_posts - media_upload_desc - Duplicate entries will not be imported - Существующие записи импортированы не будут. - 30005 - 30005 - 0 - - - core - admin_posts - media_upload - Upload XML Media Tags]]> - Загрузка XML списка медиа-тегов]]> - 30005 - - 0 - - - core - admin_posts - media_import - Import New Media Tags - Импортировать новые медиа-теги - 30005 - - 0 - - - core - admin_posts - emo_fail - Upload failed, ipb_emoticons.xml was either missing or empty. - - 30005 - - 0 - - - core - admin_posts - media_name - Media - Медиа - 30005 - - 0 - - - core - admin_posts - emo_xml_good - Emoticon XML archive import completed. - Импорт XML файла смайликов завершен. - 30005 - - 0 - - - core - admin_posts - emo_ftp - - - 30005 - - 0 - - - core - admin_posts - emo_already - - - 30005 - - 0 - - - core - admin_posts - emo_specify - You must specify which emoticon group you wish to import into. - Вы должны указать в какую группу смайликов вы хотите осуществить импорт. - 30005 - - 0 - - - core - admin_posts - emo_nolocate - - Невозможно найти директорию смайликов. Убедитесь, что путь к директории смайликов корректен. - 30005 - - 0 - - - core - admin_posts - emo_title - Emoticon Management - Управление смайликами - 30005 - - 0 - - - core - admin_posts - emo_specify_ex - You must specify which emoticon group you wish to export. - Вы должны указать какую группу смайликов вы хотите экспортировать. - 30005 - - 0 - - - core - admin_posts - emo_complete - Uploads Complete! - Загрузка завершена! - 30005 - - 0 - - - core - admin_posts - emo_nogid - No emoticon group ID was passed - ID группы смайликов не найден - 30005 - - 0 - - - core - admin_posts - emo_mimes - You can only upload image files (jpeg, jpg, gif and png) - Возможна загрузка только файлов изображений (jpeg, jpg, gif и png) - 30005 - - 0 - - - core - admin_posts - emo_pickanother - - - 30005 - - 0 - - - core - admin_posts - emo_updated - Emoticons Updated! - Смайлики обновлены! - 30005 - - 0 - - - core - admin_posts - emo_removed - Emoticon Removed! - Смайлики удалены! - 30005 - - 0 - - - core - admin_posts - emo_onlydothis - You may only add, edit, and remove emoticons from the default set - В наборе по-умолчанию возможно только добавление, изменение и удаление смайликов - 30005 - - 0 - - - core - admin_posts - emo_noid - No emoticon ID was passed - ID смайлика не найден - 30005 - - 0 - - - core - admin_posts - emo_noset - No emoticon set was passed. - Набор смайликов не найден - 30005 - - 0 - - - core - admin_posts - emo_safemode - - - 30005 - - 0 - - - core - admin_posts - emo_a_to_z - No valid folder name was entered, please try again using only alphanumerics (A-Z, a-z, 0-9) - Введено неверное имя директории. Используйте только буквы и цифры (A-Z, a-z, 0-9) - 30005 - - 0 - - - core - admin_posts - emo_folder_rem - Emoticon folder removed. - Директория смайликов удалена. - 30005 - - 0 - - - core - admin_posts - emo_norename - You cannot rename the default folder. - - 30005 - - 0 - - - core - admin_posts - emo_control - Emoticon Control - Менеджер смайликов - 30005 - - 0 - - - core - admin_posts - emo_writeable - This folder is writeable and new emoticons can be added - Возможно добавление смайликов в эту директорию - 30005 - - 0 - - - core - admin_posts - emo_writeable_not - This folder is NOT writeable and the CHMOD must be changed - Запись в эту директорию невозможна. Пожалуйста, измените права доступа. - 30005 - - 0 - - - core - admin_posts - emo_manageemos - Manage Emoticons... - Менеджер смайликов - 30005 - - 0 - - - core - admin_posts - emo_setclickable - Set Clickable... - Нажимаемый - 30005 - - 0 - - - core - admin_posts - emo_does_NOT_describe - Keith J. Kacin - Keith J. Kacin - 30005 - - 0 - - - core - admin_posts - emo_wecantdoit - IP.Board cannot rename this folder for you. - IP.Board не может переименовать эту директорию - 30005 - - 0 - - - core - admin_posts - emo_folder_rename - Folder renamed. - Директория переименована. - 30005 - - 0 - - - core - admin_posts - emo_miss_dir - Missing directory name, please try again. - Не хватает названия директории. Попробуйте снова. - 30005 - - 0 - - - core - admin_posts - emo_folder_new - New folder added. - Директория добавлена. - 30005 - - 0 - - - core - admin_posts - emo_manage_set - Managing Set - Управление смайликами - 30005 - - 0 - - - core - admin_posts - emote_export - Export an Emoticon Pack - Экспорт директории - 30005 - - 0 - - - core - admin_posts - emote_export_which - Export which emoticon group?]]> - Какую директорию смайликов экспортировать?]]> - 30005 - - 0 - - - core - admin_posts - emote_xml_pack - An IP.Board Emoticon Pack is an XML archive file of the images and activation words (i.e. :smile:) - Содержимое директории будет упаковано в XML-архив с изображениями и маркерами вызова смайликов (например :smile:) - 30005 - - 0 - - - core - admin_posts - emote_export_button - Export - Экспортировать - 30005 - - 0 - - - core - admin_posts - emote_import - Import an Emoticon Pack - Импортирование директории - 30005 - - 0 - - - core - admin_posts - emote_import_which - Import into which emoticon group?]]> - В какую существующую директорию произвести импортирование? ]]> - 30005 - - 0 - - - core - admin_posts - emote_import_newgroup - OR Import into a new group named:]]> - ИЛИ Импортировать в новую директорию: ]]> - 30005 - - 0 - - - core - admin_posts - emote_import_name - Enter the name of the new emoticon group. - Введите название новой директории смайликов. - 30005 - - 0 - - - core - admin_posts - emote_import_over - Overwrite existing images and activation words?]]> - Перезаписать существующие изображение и маркеры вызова смайликов?]]> - 30005 - - 0 - - - core - admin_posts - emote_import_replace - If yes, new images replace old images. - Если выбрано «Да», новые изображения заменят старые. - 30005 - - 0 - - - core - admin_posts - emote_import_upload - Upload XML Emoticon Archive]]> - Загрузка XML списка смайликов ]]> - 30005 - - 0 - - - core - admin_posts - emote_import_button - Import - Импортировать - 30005 - - 0 - - - core - admin_posts - emote_import_browse - - - 30005 - - 0 - - - core - admin_posts - emote_assigned - Assigned Emoticons in set: - Список установленных смайликов в - 30005 - - 0 - - - core - admin_posts - emote_delete_title - Remove this emoticon... - Удалить этот смайлик - 30005 - - 0 - - - core - admin_posts - emote_update_button - Update Emoticons - Обновить - 30005 - - 0 - - - core - admin_posts - emote_clickable - Clickable? - Нажимаемый? - 30005 - - 0 - - - core - admin_posts - emote_unassigned - Unassigned Emoticons in set: - Список неустановленных смайликов в - 30005 - - 0 - - - core - admin_posts - emote_add - Add? ]]> - Добавить? ]]> - 30005 - - 0 - - - core - admin_posts - emote_text - Activation Text: - Текст активации: - 30005 - - 0 - - - core - admin_posts - emote_add_button - Add Checked Emoticons - Добавить выбранные - 30005 - - 0 - - - core - admin_posts - emote_addfolder - Add Folder - Создать - 30005 - - 0 - - - core - admin_posts - emote_editfolder - Edit Folder Name... - Переименовать - 30005 - - 0 - - - core - admin_posts - emote_addall_button - Add All Emoticons - Добавить все - 30005 - - 0 - - - core - admin_posts - emote_foldername - Folder name (alphanumerics only)]]> - Название директории (только буквы и цифры) ]]> - 30005 - - 0 - - - core - admin_posts - emote_current - Current Emoticon Folders - Текущие директории со смайликами - 30005 - - 0 - - - core - admin_posts - emote_close - Close - Закрыть - 30005 - - 0 - - - core - admin_posts - emote_options - Options - Опции - 30005 - - 0 - - - core - admin_posts - emote_emofolder - Emoticon Folder - Название директории - 30005 - - 0 - - - core - admin_posts - emote_upload - Upload? - Загрузка - 30005 - - 0 - - - core - admin_posts - emote_num_disk - # in Emoticon Folder - № директории - 30005 - - 0 - - - core - admin_posts - emote_num_group - # in Emoticon Group - № группы смайликов - 30005 - - 0 - - - core - admin_posts - emote_createnew - Create New Folder - Создать новую директорию - 30005 - - 0 - - - core - admin_posts - emote_uploadtofolders - Upload Emoticons into checked folders - Загрузить смайлики в выбранные директории - 30005 - - 0 - - - core - admin_posts - emote_uploademos - Upload Emoticons - Загрузка смайликов - 30005 - - 0 - - - core - admin_posts - emote_dontdeletedef - The default emoticon set cannot be deleted]]> - Невозможно удалить набор по-умолчанию]]> - 30005 - - 0 - - - core - admin_posts - emote_deletefolder - Delete Folder... - Удалить - 30005 - - 0 - - - core - admin_posts - emote_manageset - Manage this emoticon set - Управление смайликами этого набора - 30005 - - 0 - - - core - admin_posts - bwl_nofilter - No filter ID passed. Please try again. - ID фильтра не найден. - 30005 - - 0 - - - core - admin_posts - bwl_filter_new - New badword filter has been added. - Фильтр добавлен. - 30005 - - 0 - - - core - admin_posts - bwl_title - Badword List - Список нецензурных слов - 30005 - - 0 - - - core - admin_posts - bwl_filter_404 - We could not find that filter in the database. - Фильтр не найден в базе данных - 30005 - - 0 - - - core - admin_posts - bwl_filter_edited - Filter Edited! - Фильтр изменен! - 30005 - - 0 - - - core - admin_posts - bwl_noword - You must enter a word to replace. Please try again. - Необходимо ввести слово для замены. - 30005 - - 0 - - - core - admin_posts - bwl_filter_removed - Filter Removed! - Фильтр удален! - 30005 - - 0 - - - core - admin_posts - bwl_msg_long - The badword filter allows you to globally replace words from a members post, signature and topic title.

    Loose matching: If you entered 'hell' as a bad word, it will replace 'hell' and 'hello' with either your replacement if entered or 6 hashes (case insensitive)

    Exact matching: If you entered 'hell' as a bad word, it will replace 'hell' only with either your replacement if entered or 6 hashes (case insensitive)]]>
    - -Эти фильтры позволяют глобально заменять слова в сообщениях, подписях и названиях тем.

    -Фильтр по маске: Если вы ввели слово 'ад' как нецензурное, то слова 'ад' и 'администратор' будут заменены либо словом заменой либо решетками.

    -Точное совпадение: Если вы ввели слово 'ад' как нецензурное, то только слово 'ад' будет заменено. -
    Регистр символов не важен.]]>
    - 30005 - - 0 -
    - - core - admin_posts - bwl_loose - Loose - Маска - 30005 - - 0 - - - core - admin_posts - bwl_exact - Exact - Точный - 30005 - - 0 - - - core - admin_posts - bwl_upload_failed - Upload failed. The XML file is either missing or empty. Please try again. - Загрузка не удалась. XML файл не найден либо пуст. Попробуйте ещё раз. - 30005 - - 0 - - - core - admin_posts - bwl_upload_wrong - The import failed. The XML file is either empty or in the wrong format. Please try again. - Невозможно выполнить импортирование, поскольку в XML файле ошибка или он не имеет записей. - 30005 - - 0 - - - core - admin_posts - bwl_upload_good - The badword list has been imported! - Список фильтров успешно импортирован! - 30005 - - 0 - - - core - admin_posts - bwl_before - Before - Слово - 30005 - - 0 - - - core - admin_posts - bwl_after - After - Замена - 30005 - - 0 - - - core - admin_posts - bwl_current - Current Filters - Список фильтров - 30005 - - 0 - - - core - admin_posts - bwl_options - Options - Опции - 30005 - - 0 - - - core - admin_posts - bwl_filter_edit - Edit Badword Filter... - Изменить - 30005 - - 0 - - - core - admin_posts - bwl_method - Method - Метод - 30005 - - 0 - - - core - admin_posts - bwl_edit_filter - Edit Filter - Изменить фильтр - 30005 - - 0 - - - core - admin_posts - bwl_filter_remove - Remove Badword Filter... - Удалить - 30005 - - 0 - - - core - admin_posts - bwl_import_upload - Upload XML Badword List]]> - Загрузка XML-файла с фильтрами]]> - 30005 - - 0 - - - core - admin_posts - bwl_import - Import Badword List - Импортировать фильтры - 30005 - - 0 - - - core - admin_posts - bwl_export - Export Badword List - Экспортировать фильтры - 30005 - - 0 - - - core - admin_posts - bwl_filter_add - Add New Filter - Добавить фильтр - 30005 - - 0 - - - core - admin_posts - bwl_import_info - - - 30005 - - 0 - - - core - admin_posts - r_noid - No ID was passed. Please try again. - ID не найден. - 30005 - - 0 - - - core - admin_posts - r_overview_title - Report Center Overview - Обзор жалоб - 30005 - - 0 - - - core - admin_posts - r_overview - Overview - Обзор - 30005 - - 0 - - - core - admin_posts - r_missingfield - Missing required fields. - Незаполнены обязательные поля. - 30005 - - 0 - - - core - admin_posts - r_toggle - Plugin Toggled - Плагин переключен. - 30005 - - 0 - - - core - admin_posts - r_incchar - - - 30005 - - 0 - - - core - admin_posts - r_404file - Plugin file does not exist. - Файл плагина не существует. - 30005 - 30005 - 0 - - - core - admin_posts - r_finishplugin - Finish Plugin Settings - Закончить настройку плагина - 30005 - - 0 - - - core - admin_posts - r_plugincreate - Plugin Created - Плагин создан - 30005 - - 0 - - - core - admin_posts - r_plugnoexist - - Плагин не существует. - 30005 - - 0 - - - core - admin_posts - r_pluglocked - This plugin is locked. You cannot change this file. - Плагин заблокирован. Вы не можете изменить этот файл. - 30005 - - 0 - - - core - admin_posts - r_plugupdated - Plugin Updated - Плагин обновлен - 30005 - - 0 - - - core - admin_posts - r_deleteair - - Нельзя удалить то, чего и так нет! - 30005 - - 0 - - - core - admin_posts - r_plugin404 - We could not find that plugin ID. Please try again. - Невозможно найти ID плагина. - 30005 - - 0 - - - core - admin_posts - r_dellocked - This plugin is locked. It cannot be deleted. - Плагин заблокирован и не может быть удален. - 30005 - - 0 - - - core - admin_posts - r_statsever - - Статусы - 30005 - - 0 - - - core - admin_posts - r_imgdel - Image Deleted - Изображение удалено - 30005 - - 0 - - - core - admin_posts - r_imgsaved - Image Saved - Изображение сохранено - 30005 - - 0 - - - core - admin_posts - r_changepoints - There is an image under this status using the same number of points. Please change the number of points. - Другое изображение уже используется с этим количеством очков. Измените количество очков. - 30005 - - 0 - - - core - admin_posts - r_plugin_title - You can setup and manage your report center plugins in this section. - В этом разделе вы можете управлять плагинами жалоб, а также установить новые. - 30005 - - 0 - - - core - admin_posts - r_plugmanager - Plugin Manager - Управление плагинами - 30005 - - 0 - - - core - admin_posts - r_deleteplug - Plugin Deleted - Плагин удален - 30005 - - 0 - - - core - admin_posts - r_404status - You must enter a title for the status. - Нужно ввести название для этого статуса. - 30005 - 30005 - 0 - - - core - admin_posts - r_completenew - - Невозможно установить статус «Завершена», когда установлен статус «Новая» - 30005 - - 0 - - - core - admin_posts - r_newcomplete - - Невозможно установить статус «Новая», когда установлен статус «Завершена» - 30005 - - 0 - - - core - admin_posts - r_invpar - Invalid Parameter - Неверный параметр - 30005 - - 0 - - - core - admin_posts - r_onenew - - - 30005 - - 0 - - - core - admin_posts - r_statdel - Status Deleted - Статус удален - 30005 - - 0 - - - core - admin_posts - r_onecomplete - - - 30005 - - 0 - - - core - admin_posts - r_createnew - Create new status - Добавить статус - 30005 - - 0 - - - core - admin_posts - r_ppr - - «Баллов на жалобу» должно быть целым числом. - 30005 - - 0 - - - core - admin_posts - r_statcreated - Status Created - Статус создан - 30005 - - 0 - - - core - admin_posts - r_statsaved - Status Saved - Статус сохранен - 30005 - - 0 - - - core - admin_posts - r_mtp - - - 30005 - - 0 - - - core - admin_posts - r_nodata - No Data - Нет данных - 30005 - - 0 - - - core - admin_posts - r_last24 - Reports in the last 24 hours - Жалобы за последние 24 часа - 30005 - - 0 - - - core - admin_posts - r_top5 - Top Five Moderators - Топ 5 модераторов - 30005 - - 0 - - - core - admin_posts - r_statmanager - Status Manager - Управление статусами - 30005 - - 0 - - - core - admin_posts - r_movedno - Report Status cannot be respositioned. - Статус жалобы не может быть изменен. - 30005 - - 0 - - - core - admin_posts - r_movedyes - Report Status Repositioned - Статус жалобы изменен - 30005 - - 0 - - - core - admin_posts - config_rc_settings - Configure Settings - Изменить настройки - 30005 - - 0 - - - core - admin_posts - r_supermod_info - This plugin uses moderator assignments to determine what reports a moderator can see and manage. By default if a member is a super moderator he/she can see all the reports. Turning this off means moderator assignments are used exclusively. - Плагин использует ограничения модераторов для определения какие жалобы они могут видеть. По-умолчанию, если пользователь является супермодератором, то он может видеть все жалобы. Отключение этого приведет использованию ограничений модераторов. - 30005 - - 0 - - - core - admin_posts - r_supermod - Super moderators can view all the reports? - Супермодераторы могут просматривать все жалобы плагина? - 30005 - - 0 - - - core - admin_posts - r_dlmod - Respect Download Manager moderator rights? - Включить права Download Manager ? - 30005 - - 0 - - - core - admin_posts - postform_badmd5 - Key did not match - Ключ не совпадает с - 30005 - 30005 - 0 - - - core - admin_posts - r_regplugins - Registered Report Plugins - Зарегистрированные плагины жалоб - 30005 - - 0 - - - core - admin_posts - r_name - Name - Название - 30005 - - 0 - - - core - admin_posts - r_galmod - Respect Gallery moderator rights? - Включить права Gallery ? - 30005 - - 0 - - - core - admin_posts - r_options - Options - Опции - 30005 - - 0 - - - core - admin_posts - r_author - Author - Автор - 30005 - - 0 - - - core - admin_posts - r_enabled - Enabled - Включен - 30005 - - 0 - - - core - admin_posts - r_regnew - Register New Plugin... - Зарегистрировать новый плагин - 30005 - - 0 - - - core - admin_posts - r_editsettings - Edit Settings... - Изменить - 30005 - - 0 - - - core - admin_posts - r_toggleendis - Toggle Enabled/Disabled - Переключить - 30005 - - 0 - - - core - admin_posts - r_plugindetails - Change Plugin Details... - Изменить плагин - 30005 - - 0 - - - core - admin_posts - r_removeplugin - Remove Plugin... - Удалить плагин - 30005 - - 0 - - - core - admin_posts - r_repstatsev - - Статусы жалоб - 30005 - - 0 - - - core - admin_posts - r_images + admin_palette + pal_images Images Изображения - 30005 - + 31006 + 31006 0 core - admin_posts - r_position - Position - Позиция - 30005 - + admin_palette + pal_preview + Preview + Предпросмотр + 31006 + 31006 0 core - admin_posts - r_newstatus - Create New Status... - Добавить статус - 30005 - + admin_palette + pal_no_open_editors_to_extract_med + No open editors to extract media from + Ни один редактор не открыт для загрузки видео из + 31006 + 31006 0 core - admin_posts - r_new_report - New Report - Новая жалоба - 30005 - + admin_palette + pal_delete_item + Delete Item... + Удалить элемент + 31006 + 31006 0 core - admin_posts - r_complete_report - Complete Report - Завершить жалобу - 30005 - + admin_palette + pal_url + URL + URL + 31006 + 31006 0 core - admin_posts - r_active_report - Active Report - Активная жалоба - 30005 - + admin_palette + pal_show_item + Show Item... + Показать элемент + 31006 + 31006 0 core - admin_posts - r_addimg - Add Image... - Добавить изображение - 30005 - + admin_palette + pal_green_added_text + Green: Added Text + Зеленый: добавленный текст + 31006 + 31006 0 core - admin_posts - r_editstatus - Edit Status... - Изменить статус - 30005 - + admin_palette + pal_red_removed_text + Red: Removed Text + Красный: удаленный текст + 31006 + 31006 0 core - admin_posts - r_activeplugins - Active Plugins - Включенных плагинов - 30005 - + admin_palette + pal_template + template + шаблон + 31006 + 31006 0 core - admin_posts - r_totalcomments - Total Comments - Всего комментариев - 30005 - + admin_palette + pal_back + Back + Назад + 31006 + 31006 0 core - admin_posts - r_totalreports - Total Reports - Всего жалоб - 30005 - + admin_palette + pal_pages + Pages + Страницы + 31006 + 31006 0 core - admin_posts - r_removeimg - Remove Image... - Удалить изображение - 30005 - + admin_palette + pal_insert + Insert... + Вставить... + 31006 + 31006 0 core - admin_posts - r_editimg - Edit Image... - Изменить изображение - 30005 - + admin_palette + pal_legend + Legend + Подпись + 31006 + 31006 0 core - admin_posts - r_graphstats - Graph Stats - Статистический график - 30005 - + admin_palette + pal_insert_item + Insert Item... + Вставить элемент + 31006 + 31006 0 core - admin_posts - r_removestatus - Remove Status... - Удалить статус - 30005 - + admin_palette + pal_item + Item + Элемент + 31006 + 31006 0 core - admin_posts - r_whatcall - If you categorized reports by plugin, what would you call this section? - Как бы вы назвали жалобы этого плагина? - 30005 - 30005 + admin_palette + pal_max_single_upload_size_1 + Max. single upload size + Максимальный размер загружаемого файла: + 31006 + 31006 0 core - admin_posts - r_plugintitle - Plugin Title - Название плагина - 30005 - + admin_palette + pal_file_space_used + File space used + Файловое пространство использовано + 31006 + 31006 0 core - admin_posts - r_registernew - Register New Report Plugin - Регистрация нового плагина системы жалоб - 30005 - + admin_palette + pal_of + of + из + 31006 + 31006 0 core - admin_posts - r_authorname - Author Name - Автор - 30005 - + admin_palette + pal_max_single_upload_size + Max. single upload size: + Максимальный размер загружаемого файла: + 31006 + 31006 0 core - admin_posts - r_description - Brief Description - Краткое описание - 30005 - + admin_palette + pal_attachment_space_used + Attachment space used + Место под прикрепленные файлы использовано + 31006 + 31006 0 core - admin_posts - r_version - Version - Версия - 30005 - + admin_palette + pal_upload + UPLOAD + ЗАГРУЗИТЬ + 31006 + 31006 0 core - admin_posts - r_editplugin - Edit Report Plugin - Изменение плагина жалоб - 30005 - - 0 - - - core - admin_posts - r_save - Save - Сохранить - 30005 - - 0 - - - core - admin_posts - r_pluginfile - Plugin File - Файл плагина - 30005 - - 0 - - - core - admin_posts - r_authorurl - Author URL - URL адрес страницы автора - 30005 - - 0 - - - core - admin_posts - r_groups_submit - Groups that can submit reports - Группы пользователей, которые могут отправлять жалобы - 30005 - - 0 - - - core - admin_posts - r_groups_submit_info - Control which groups can submit reports in this plugin - Выберите группы пользователей, которые смогут отправлять жалобы этого плагина - 30005 - - 0 - - - core - admin_posts - r_pluginenabled - Plugin Enabled - Включить плагин? - 30005 - - 0 - - - core - admin_posts - r_safemode - Enable Safemode? (Cannot be deleted or edited by user) - Включить безопасный режим ? (Не может быть изменен или удален пользователем) - 30005 - - 0 - - - core - admin_posts - r_image - Image - Изображение - 30005 - - 0 - - - core - admin_posts - r_groups_info - Specify what groups can view and manage reports by this plugin. Specific permissions are handled by the plugin itself. - Выберите группы пользователей, которые смогут просматривать и управлять жалобами этого плагина. Специальные разрешения плагин обрабатывает сам. - 30005 - - 0 - - - core - admin_posts - r_groups - Groups that can view reports - Группы пользователей, которые могут просматривать жалобы - 30005 - - 0 - - - core - admin_posts - r_image_info - <#IMG_DIR#> to use a graphic from the user skin]]> - <#IMG_DIR#> для использования изображения из пользовательского стиля.]]> - 30005 - - 0 - - - core - admin_posts - r_confimage - Configure Image - Настройка изображения - 30005 - - 0 - - - core - admin_posts - r_points - Points - Баллы - 30005 - - 0 - - - core - admin_posts - r_width - Width - Ширина - 30005 - 30005 - 0 - - - core - admin_posts - r_height - Height - Высота - 30005 - - 0 - - - core - admin_posts - r_points_info - How many points are needed to display graphic. - Сколько необходимо баллов для показа изображения? - 30005 - - 0 - - - core - admin_posts - r_edit_status - Edit Status - Изменение статуса - 30005 - - 0 - - - core - admin_posts - r_create_status - Create Status - Создать статус - 30005 - - 0 - - - core - admin_posts - r_name_info - What would you like to call this status? - Как бы вы назвали этот статус? - 30005 - - 0 - - - core - admin_posts - r_pointsper - Points per report - Баллов на жалобу - 30005 - - 0 - - - core - admin_posts - r_nostattitle - You must enter a status title - Вы должны ввести название статуса - 30005 - - 0 - - - core - admin_posts - r_minutes - Minutes to one point - Минут на один балл - 30005 - - 0 - - - core - admin_posts - r_minutes_info - How many minutes it takes to gain a single point. Points are used in displaying severity images. - Количество минут на один балл. Баллы используются для показа соответствующего изображения. - 30005 - - 0 - - - core - admin_posts - r_pointsper_info - How many points a single report worth. Points are used in displaying severity images. - Количество баллов на жалобу. Баллы используются для показа соответствующего изображения. - 30005 - - 0 - - - core - admin_posts - r_messages_enter - Groups that can add themselves to conversations - Группы пользователей, которые могут добавлять себе в обсуждения - 30005 - - 0 - - - core - admin_posts - r_menter_desc - Specify which groups can add themselves to reported conversations - Выберите группы пользователей, которые смогут добавлять себя в обсуждения жалоб - 30005 - - 0 - - - core - admin_posts - ctype__blogent - Submitting entries in IP.Blog - Добавление записей в IP.Blog - 30006 - - 0 - - - core - admin_posts - ctype__blogcom - Submitting comments in IP.Blog - Добавление комментариев в IP.Blog - 30006 - - 0 - - - core - admin_posts - ctype__blogblc - IP.Blog Custom Blocks - Пользовательские блоки IP.Blog - 30006 - - 0 - - - core - admin_posts - ctype__idmfile - Submitting Files in IP.Downloads - Добавление файлов в IP.Downloads - 30006 - - 0 - - - core - admin_posts - ctype__pms - Private Messages - Личные сообщения - 30006 - - 0 - - - core - admin_posts - ctype__warn - Warn logs/notes - Журналы предупреждений/заметок - 30006 - - 0 - - - core - admin_posts - ctype__calendar - Calendar - Календарь - 30006 - - 0 - - - core - admin_posts - ctype__galimg - Submitting Images in IP.Gallery - Добавление изображений IP.Gallery - 30006 - - 0 - - - core - admin_posts - ctype__galcom - Submitting Comments in IP.Gallery - Добавление комментариев IP.Gallery - 30006 - - 0 - - - core - admin_posts - ctype__idmcom - Submitting Comments in IP.Downloads - Добавление комментариев IP.Downloads - 30006 - - 0 - - - core - admin_posts - r_points_sufix - Points - Баллов - 30006 - - 0 - - - core - admin_posts - ctype__aboutme - About Me - Обо мне - 30006 - - 0 - - - core - admin_posts - ctype__rules - Forum Rules - Правила форума - 30006 - - 0 - - - core - admin_posts - ctype__signatures - Signatures - Подписи - 30006 - - 0 - - - core - admin_posts - ctype__topics - Topics and Replies - Темы и ответы - 30006 - - 0 - - - core - admin_posts - ctype__announcement - Announcements - Объявления - 30006 - + admin_palette + pal_select_a_file + Select a file + Выберите файл + 31006 + 31006 0 @@ -13259,38 +11185,1892 @@ ctype__reports Reported Content Проблемный контент - 30006 - 30006 + 31006 + 31006 0 core admin_posts - emoticon_folder + config_rc_settings + Configure Settings + Изменить настройки + 31006 + 31006 + 0 + + + core + admin_posts + r_menter_desc + Specify which groups can add themselves to reported conversations + Выберите группы пользователей, которые смогут добавлять себя в обсуждения жалоб + 31006 + 31006 + 0 + + + core + admin_posts + r_messages_enter + Groups that can add themselves to conversations + Группы пользователей, которые могут добавлять себе в обсуждения + 31006 + 31006 + 0 + + + core + admin_posts + r_nostattitle + You must enter a status title + Вы должны ввести название статуса + 31006 + 31006 + 0 + + + core + admin_posts + r_minutes_info + How many minutes it takes to gain a single point. Points are used in displaying severity images. + Количество минут на один балл. Баллы используются для показа соответствующего изображения. + 31006 + 31006 + 0 + + + core + admin_posts + r_minutes + Minutes to one point + Минут на один балл + 31006 + 31006 + 0 + + + core + admin_posts + r_pointsper + Points per report + Баллов на жалобу + 31006 + 31006 + 0 + + + core + admin_posts + r_pointsper_info + How many points a single report worth. Points are used in displaying severity images. + Количество баллов на жалобу. Баллы используются для показа соответствующего изображения. + 31006 + 31006 + 0 + + + core + admin_posts + r_name_info + What would you like to call this status? + Как бы вы назвали этот статус? + 31006 + 31006 + 0 + + + core + admin_posts + r_create_status + Create Status + Создать статус + 31006 + 31006 + 0 + + + core + admin_posts + r_edit_status + Edit Status + Изменение статуса + 31006 + 31006 + 0 + + + core + admin_posts + r_height + Height + Высота + 31006 + 31006 + 0 + + + core + admin_posts + r_points + Points + Баллы + 31006 + 31006 + 0 + + + core + admin_posts + r_points_info + How many points are needed to display graphic. + Сколько необходимо баллов для показа изображения? + 31006 + 31006 + 0 + + + core + admin_posts + r_confimage + Configure Image + Настройка изображения + 31006 + 31006 + 0 + + + core + admin_posts + r_width + Width + Ширина + 31006 + 31006 + 0 + + + core + admin_posts + r_image_info + <#IMG_DIR#> to use a graphic from the user skin]]> + <#IMG_DIR#> для использования изображения из пользовательского стиля.]]> + 31006 + 31006 + 0 + + + core + admin_posts + r_safemode + Enable Safemode? (Cannot be deleted or edited by user) + Включить безопасный режим ? (Не может быть изменен или удален пользователем) + 31006 + 31006 + 0 + + + core + admin_posts + r_image + Image + Изображение + 31006 + 31006 + 0 + + + core + admin_posts + r_pluginenabled + Plugin Enabled + Включить плагин? + 31006 + 31006 + 0 + + + core + admin_posts + r_groups_submit + Groups that can submit reports + Группы пользователей, которые могут отправлять жалобы + 31006 + 31006 + 0 + + + core + admin_posts + r_groups_submit_info + Control which groups can submit reports in this plugin + Выберите группы пользователей, которые смогут отправлять жалобы этого плагина + 31006 + 31006 + 0 + + + core + admin_posts + r_groups_info + Specify what groups can view and manage reports by this plugin. Specific permissions are handled by the plugin itself. + Выберите группы пользователей, которые смогут просматривать и управлять жалобами этого плагина. Специальные разрешения плагин обрабатывает сам. + 31006 + 31006 + 0 + + + core + admin_posts + r_groups + Groups that can view reports + Группы пользователей, которые могут просматривать жалобы + 31006 + 31006 + 0 + + + core + admin_posts + r_editplugin + Edit Report Plugin + Изменение плагина жалоб + 31006 + 31006 + 0 + + + core + admin_posts + r_authorurl + Author URL + URL адрес страницы автора + 31006 + 31006 + 0 + + + core + admin_posts + r_pluginfile + Plugin File + Файл плагина + 31006 + 31006 + 0 + + + core + admin_posts + r_save + Save + Сохранить + 31006 + 31006 + 0 + + + core + admin_posts + r_authorname + Author Name + Автор + 31006 + 31006 + 0 + + + core + admin_posts + r_description + Brief Description + Краткое описание + 31006 + 31006 + 0 + + + core + admin_posts + r_version + Version + Версия + 31006 + 31006 + 0 + + + core + admin_posts + r_whatcall + If you categorized reports by plugin, what would you call this section? + Как бы вы назвали жалобы этого плагина? + 31006 + 31006 + 0 + + + core + admin_posts + r_plugintitle + Plugin Title + Название плагина + 31006 + 31006 + 0 + + + core + admin_posts + r_registernew + Register New Report Plugin + Регистрация нового плагина системы жалоб + 31006 + 31006 + 0 + + + core + admin_posts + r_activeplugins + Active Plugins + Включенных плагинов + 31006 + 31006 + 0 + + + core + admin_posts + r_graphstats + Graph Stats + Статистический график + 31006 + 31006 + 0 + + + core + admin_posts + r_totalcomments + Total Comments + Всего комментариев + 31006 + 31006 + 0 + + + core + admin_posts + r_removeimg + Remove Image... + Удалить изображение + 31006 + 31006 + 0 + + + core + admin_posts + r_totalreports + Total Reports + Всего жалоб + 31006 + 31006 + 0 + + + core + admin_posts + r_editimg + Edit Image... + Изменить изображение + 31006 + 31006 + 0 + + + core + admin_posts + r_addimg + Add Image... + Добавить изображение + 31006 + 31006 + 0 + + + core + admin_posts + r_editstatus + Edit Status... + Изменить статус + 31006 + 31006 + 0 + + + core + admin_posts + r_removestatus + Remove Status... + Удалить статус + 31006 + 31006 + 0 + + + core + admin_posts + r_active_report + Active Report + Активная жалоба + 31006 + 31006 + 0 + + + core + admin_posts + r_complete_report + Complete Report + Завершить жалобу + 31006 + 31006 + 0 + + + core + admin_posts + r_new_report + New Report + Новая жалоба + 31006 + 31006 + 0 + + + core + admin_posts + r_newstatus + Create New Status... + Добавить статус + 31006 + 31006 + 0 + + + core + admin_posts + r_images + Images + Изображения + 31006 + 31006 + 0 + + + core + admin_posts + r_position + Position + Позиция + 31006 + 31006 + 0 + + + core + admin_posts + r_repstatsev + + Статусы жалоб + 31006 + 31006 + 0 + + + core + admin_posts + r_removeplugin + Remove Plugin... + Удалить плагин + 31006 + 31006 + 0 + + + core + admin_posts + r_plugindetails + Change Plugin Details... + Изменить плагин + 31006 + 31006 + 0 + + + core + admin_posts + r_editsettings + Edit Settings... + Изменить + 31006 + 31006 + 0 + + + core + admin_posts + r_toggleendis + Toggle Enabled/Disabled + Переключить + 31006 + 31006 + 0 + + + core + admin_posts + r_enabled + Enabled + Включен + 31006 + 31006 + 0 + + + core + admin_posts + r_regnew + Register New Plugin... + Зарегистрировать новый плагин + 31006 + 31006 + 0 + + + core + admin_posts + r_name + Name + Название + 31006 + 31006 + 0 + + + core + admin_posts + r_author + Author + Автор + 31006 + 31006 + 0 + + + core + admin_posts + r_options + Options + Опции + 31006 + 31006 + 0 + + + core + admin_posts + r_regplugins + Registered Report Plugins + Зарегистрированные плагины жалоб + 31006 + 31006 + 0 + + + core + admin_posts + r_app + Application + Приложение + 31006 + 31006 + 0 + + + core + admin_posts + r_points_sufix + Points + Баллов + 31006 + 31006 + 0 + + + core + admin_posts + postform_badmd5 + Key did not match + Ключ не совпадает с + 31006 + 31006 + 0 + + + core + admin_posts + r_supermod + Super moderators can view all the reports? + Супермодераторы могут просматривать все жалобы плагина? + 31006 + 31006 + 0 + + + core + admin_posts + r_supermod_info + This plugin uses moderator assignments to determine what reports a moderator can see and manage. By default if a member is a super moderator he/she can see all the reports. Turning this off means moderator assignments are used exclusively. + Плагин использует ограничения модераторов для определения какие жалобы они могут видеть. По умолчанию, если пользователь является супермодератором, то он может видеть все жалобы. Отключение этого приведет использованию ограничений модераторов. + 31006 + 31006 + 0 + + + core + admin_posts + r_dlmod + Respect Download Manager moderator rights? + Включить права Download Manager ? + 31006 + 31006 + 0 + + + core + admin_posts + r_galmod + Respect Gallery moderator rights? + Включить права Gallery ? + 31006 + 31006 + 0 + + + core + admin_posts + r_last24 + Reports in the last 24 hours + Жалобы за последние 24 часа + 31006 + 31006 + 0 + + + core + admin_posts + r_top5 + Top Five Moderators + Топ 5 модераторов + 31006 + 31006 + 0 + + + core + admin_posts + r_statmanager + Status Manager + Управление статусами + 31006 + 31006 + 0 + + + core + admin_posts + r_movedno + Report Status cannot be respositioned. + Статус жалобы не может быть изменен. + 31006 + 31006 + 0 + + + core + admin_posts + r_movedyes + Report Status Repositioned + Статус жалобы изменен + 31006 + 31006 + 0 + + + core + admin_posts + r_statsaved + Status Saved + Статус сохранен + 31006 + 31006 + 0 + + + core + admin_posts + r_mtp + + + 31006 + 31006 + 0 + + + core + admin_posts + r_statcreated + Status Created + Статус создан + 31006 + 31006 + 0 + + + core + admin_posts + r_ppr + + «Баллов на жалобу» должно быть целым числом. + 31006 + 31006 + 0 + + + core + admin_posts + r_createnew + Create new status + Добавить статус + 31006 + 31006 + 0 + + + core + admin_posts + r_statdel + Status Deleted + Статус удален + 31006 + 31006 + 0 + + + core + admin_posts + r_onecomplete + + + 31006 + 31006 + 0 + + + core + admin_posts + r_invpar + Invalid Parameter + Неверный параметр + 31006 + 31006 + 0 + + + core + admin_posts + r_onenew + + + 31006 + 31006 + 0 + + + core + admin_posts + r_completenew + + Невозможно установить статус «Завершена», когда установлен статус «Новая» + 31006 + 31006 + 0 + + + core + admin_posts + r_newcomplete + + Невозможно установить статус «Новая», когда установлен статус «Завершена» + 31006 + 31006 + 0 + + + core + admin_posts + r_404status + You must enter a title for the status. + Нужно ввести название для этого статуса. + 31006 + 31006 + 0 + + + core + admin_posts + r_imgsaved + Image Saved + Изображение сохранено + 31006 + 31006 + 0 + + + core + admin_posts + r_changepoints + There is an image under this status using the same number of points. Please change the number of points. + Другое изображение уже используется с этим количеством очков. Измените количество очков. + 31006 + 31006 + 0 + + + core + admin_posts + r_imgdel + Image Deleted + Изображение удалено + 31006 + 31006 + 0 + + + core + admin_posts + r_statsever + + Статусы + 31006 + 31006 + 0 + + + core + admin_posts + r_plugin_title + You can setup and manage your report center plugins in this section. + В этом разделе вы можете управлять плагинами жалоб, а также установить новые. + 31006 + 31006 + 0 + + + core + admin_posts + r_plugmanager + Plugin Manager + Управление плагинами + 31006 + 31006 + 0 + + + core + admin_posts + r_deleteplug + Plugin Deleted + Плагин удален + 31006 + 31006 + 0 + + + core + admin_posts + r_dellocked + This plugin is locked. It cannot be deleted. + Плагин заблокирован и не может быть удален. + 31006 + 31006 + 0 + + + core + admin_posts + r_plugin404 + We could not find that plugin ID. Please try again. + Невозможно найти ID плагина. + 31006 + 31006 + 0 + + + core + admin_posts + r_deleteair + + Нельзя удалить то, чего и так нет! + 31006 + 31006 + 0 + + + core + admin_posts + r_pluglocked + This plugin is locked. You cannot change this file. + Плагин заблокирован. Вы не можете изменить этот файл. + 31006 + 31006 + 0 + + + core + admin_posts + r_plugnoexist + + Плагин не существует. + 31006 + 31006 + 0 + + + core + admin_posts + r_plugupdated + Plugin Updated + Плагин обновлен + 31006 + 31006 + 0 + + + core + admin_posts + r_finishplugin + Finish Plugin Settings + Закончить настройку плагина + 31006 + 31006 + 0 + + + core + admin_posts + r_plugincreate + Plugin Created + Плагин создан + 31006 + 31006 + 0 + + + core + admin_posts + r_404file + Plugin file does not exist. + Файл плагина не существует. + 31006 + 31006 + 0 + + + core + admin_posts + r_missingfield + Missing required fields. + Незаполнены обязательные поля. + 31006 + 31006 + 0 + + + core + admin_posts + r_incchar + + + 31006 + 31006 + 0 + + + core + admin_posts + r_toggle + Plugin Toggled + Плагин переключен. + 31006 + 31006 + 0 + + + core + admin_posts + r_overview_title + Report Center Overview + Обзор жалоб + 31006 + 31006 + 0 + + + core + admin_posts + r_noid + No ID was passed. Please try again. + ID не найден. + 31006 + 31006 + 0 + + + core + admin_posts + r_nodata + No Data + Нет данных + 31006 + 31006 + 0 + + + core + admin_posts + r_overview + Overview + Обзор + 31006 + 31006 + 0 + + + core + admin_posts + bwl_import_info + + + 31006 + 31006 + 0 + + + core + admin_posts + bwl_import + Import Badword List + Импортировать фильтры + 31006 + 31006 + 0 + + + core + admin_posts + bwl_import_upload + Upload XML Badword List]]> + Загрузка XML-файла с фильтрами]]> + 31006 + 31006 + 0 + + + core + admin_posts + bwl_export + Export Badword List + Экспортировать фильтры + 31006 + 31006 + 0 + + + core + admin_posts + bwl_before + Before + Слово + 31006 + 31006 + 0 + + + core + admin_posts + bwl_after + After + Замена + 31006 + 31006 + 0 + + + core + admin_posts + bwl_method + Method + Метод + 31006 + 31006 + 0 + + + core + admin_posts + bwl_current + Current Filters + Список фильтров + 31006 + 31006 + 0 + + + core + admin_posts + bwl_options + Options + Опции + 31006 + 31006 + 0 + + + core + admin_posts + bwl_filter_edit + Edit Badword Filter... + Изменить + 31006 + 31006 + 0 + + + core + admin_posts + bwl_filter_remove + Remove Badword Filter... + Удалить + 31006 + 31006 + 0 + + + core + admin_posts + bwl_filter_add + Add New Filter + Добавить фильтр + 31006 + 31006 + 0 + + + core + admin_posts + bwl_edit_filter + Edit Filter + Изменить фильтр + 31006 + 31006 + 0 + + + core + admin_posts + bwl_upload_good + The badword list has been imported! + Список фильтров успешно импортирован! + 31006 + 31006 + 0 + + + core + admin_posts + bwl_upload_wrong + The import failed. The XML file is either empty or in the wrong format. Please try again. + Невозможно выполнить импортирование, поскольку в XML файле ошибка или он не имеет записей. + 31006 + 31006 + 0 + + + core + admin_posts + bwl_upload_failed + Upload failed. The XML file is either missing or empty. Please try again. + Загрузка не удалась. XML файл не найден либо пуст. Попробуйте ещё раз. + 31006 + 31006 + 0 + + + core + admin_posts + bwl_exact + Exact + Точный + 31006 + 31006 + 0 + + + core + admin_posts + bwl_loose + Loose + Маска + 31006 + 31006 + 0 + + + core + admin_posts + bwl_msg_long + The badword filter allows you to globally replace words from a members post, signature and topic title.

    Loose matching: If you entered 'hell' as a bad word, it will replace 'hell' and 'hello' with either your replacement if entered or 6 hashes (case insensitive)

    Exact matching: If you entered 'hell' as a bad word, it will replace 'hell' only with either your replacement if entered or 6 hashes (case insensitive)]]>
    + +Эти фильтры позволяют глобально заменять слова в сообщениях, подписях и названиях тем.

    +Фильтр по маске: Если вы ввели слово 'ад' как нецензурное, то слова 'ад' и 'администратор' будут заменены либо словом заменой либо решетками.

    +Точное совпадение: Если вы ввели слово 'ад' как нецензурное, то только слово 'ад' будет заменено. +
    Регистр символов не важен.]]>
    + 31006 + 31006 + 0 +
    + + core + admin_posts + bwl_filter_new + New badword filter has been added. + Фильтр добавлен. + 31006 + 31006 + 0 + + + core + admin_posts + bwl_title + Badword List + Список нецензурных слов + 31006 + 31006 + 0 + + + core + admin_posts + bwl_filter_404 + We could not find that filter in the database. + Фильтр не найден в базе данных + 31006 + 31006 + 0 + + + core + admin_posts + bwl_filter_edited + Filter Edited! + Фильтр изменен! + 31006 + 31006 + 0 + + + core + admin_posts + bwl_noword + You must enter a word to replace. Please try again. + Необходимо ввести слово для замены. + 31006 + 31006 + 0 + + + core + admin_posts + bwl_nofilter + No filter ID passed. Please try again. + ID фильтра не найден. + 31006 + 31006 + 0 + + + core + admin_posts + bwl_filter_removed + Filter Removed! + Фильтр удален! + 31006 + 31006 + 0 + + + core + admin_posts + emote_deletefolder + Delete Folder... + Удалить + 31006 + 31006 + 0 + + + core + admin_posts + emote_manageset + Manage this emoticon set + Управление смайликами этого набора + 31006 + 31006 + 0 + + + core + admin_posts + emote_dontdeletedef + The default emoticon set cannot be deleted]]> + Невозможно удалить набор по умолчанию]]> + 31006 + 31006 + 0 + + + core + admin_posts + emote_uploademos + Upload Emoticons + Загрузка смайликов + 31006 + 31006 + 0 + + + core + admin_posts + emote_uploadtofolders + Upload Emoticons into checked folders + Загрузить смайлики в выбранные директории + 31006 + 31006 + 0 + + + core + admin_posts + emote_createnew + Create New Folder + Создать новую директорию + 31006 + 31006 + 0 + + + core + admin_posts + emote_num_group + # in Emoticon Group + № группы смайликов + 31006 + 31006 + 0 + + + core + admin_posts + emote_upload + Upload? + Загрузка + 31006 + 31006 + 0 + + + core + admin_posts + emote_num_disk + # in Emoticon Folder + № директории + 31006 + 31006 + 0 + + + core + admin_posts + emote_current + Current Emoticon Folders + Текущие директории со смайликами + 31006 + 31006 + 0 + + + core + admin_posts + emote_options + Options + Опции + 31006 + 31006 + 0 + + + core + admin_posts + emote_emofolder Emoticon Folder - Директория смайликов - 30006 - 30006 + Название директории + 31006 + 31006 0 core admin_posts - emoticon_folder_name - Folder name: - Имя директории: - 30006 - 30006 + emote_close + Close + Закрыть + 31006 + 31006 0 core admin_posts - custom_bbcode_head - Custom BBCode - Пользовательский BB-код - 30006 - 30006 + emote_foldername + Folder name (alphanumerics only)]]> + Название директории (только буквы и цифры) ]]> + 31006 + 31006 + 0 + + + core + admin_posts + emote_editfolder + Edit Folder Name... + Переименовать + 31006 + 31006 + 0 + + + core + admin_posts + emote_addall_button + Add All Emoticons + Добавить все + 31006 + 31006 + 0 + + + core + admin_posts + emote_addfolder + Add Folder + Создать + 31006 + 31006 + 0 + + + core + admin_posts + emote_text + Activation Text: + Текст активации: + 31006 + 31006 + 0 + + + core + admin_posts + emote_add_button + Add Checked Emoticons + Добавить выбранные + 31006 + 31006 + 0 + + + core + admin_posts + emote_add + Add? ]]> + Добавить? ]]> + 31006 + 31006 + 0 + + + core + admin_posts + emote_unassigned + Unassigned Emoticons in set: + Список неустановленных смайликов в + 31006 + 31006 + 0 + + + core + admin_posts + emote_update_button + Update Emoticons + Обновить + 31006 + 31006 + 0 + + + core + admin_posts + emote_clickable + Clickable? + Нажимаемый? + 31006 + 31006 + 0 + + + core + admin_posts + emote_assigned + Assigned Emoticons in set: + Список установленных смайликов в + 31006 + 31006 + 0 + + + core + admin_posts + emote_delete_title + Remove this emoticon... + Удалить этот смайлик + 31006 + 31006 + 0 + + + core + admin_posts + emote_import_button + Import + Импортировать + 31006 + 31006 + 0 + + + core + admin_posts + emote_import_upload + Upload XML Emoticon Archive]]> + Загрузка XML списка смайликов ]]> + 31006 + 31006 + 0 + + + core + admin_posts + emote_import_browse + + + 31006 + 31006 + 0 + + + core + admin_posts + emote_import_over + Overwrite existing images and activation words?]]> + Перезаписать существующие изображение и маркеры вызова смайликов?]]> + 31006 + 31006 + 0 + + + core + admin_posts + emote_import_replace + If yes, new images replace old images. + Если выбрано «Да», новые изображения заменят старые. + 31006 + 31006 + 0 + + + core + admin_posts + emote_import_name + Enter the name of the new emoticon group. + Введите название новой директории смайликов. + 31006 + 31006 + 0 + + + core + admin_posts + emote_import + Import an Emoticon Pack + Импортирование директории + 31006 + 31006 + 0 + + + core + admin_posts + emote_import_which + Import into which emoticon group?]]> + В какую существующую директорию произвести импортирование? ]]> + 31006 + 31006 + 0 + + + core + admin_posts + emote_import_newgroup + OR Import into a new group named:]]> + ИЛИ Импортировать в новую директорию: ]]> + 31006 + 31006 + 0 + + + core + admin_posts + emote_xml_pack + An IP.Board Emoticon Pack is an XML archive file of the images and activation words (i.e. :smile:) + Содержимое директории будет упаковано в XML-архив с изображениями и маркерами вызова смайликов (например :smile:) + 31006 + 31006 + 0 + + + core + admin_posts + emote_export_button + Export + Экспортировать + 31006 + 31006 + 0 + + + core + admin_posts + emote_export + Export an Emoticon Pack + Экспорт директории + 31006 + 31006 + 0 + + + core + admin_posts + emote_export_which + Export which emoticon group?]]> + Какую директорию смайликов экспортировать?]]> + 31006 + 31006 + 0 + + + core + admin_posts + emo_does_NOT_describe + Keith J. Kacin + Keith J. Kacin + 31006 + 31006 + 0 + + + core + admin_posts + emo_setclickable + Set Clickable... + Нажимаемый + 31006 + 31006 + 0 + + + core + admin_posts + emo_manageemos + Manage Emoticons... + Менеджер смайликов + 31006 + 31006 + 0 + + + core + admin_posts + emo_writeable_not + This folder is NOT writeable and the CHMOD must be changed + Запись в эту директорию невозможна. Пожалуйста, измените права доступа. + 31006 + 31006 + 0 + + + core + admin_posts + emo_manage_set + Managing Set + Управление смайликами + 31006 + 31006 + 0 + + + core + admin_posts + emo_writeable + This folder is writeable and new emoticons can be added + Возможно добавление смайликов в эту директорию + 31006 + 31006 + 0 + + + core + admin_posts + emo_control + Emoticon Control + Менеджер смайликов + 31006 + 31006 + 0 + + + core + admin_posts + emo_wecantdoit + IP.Board cannot rename this folder for you. + IP.Board не может переименовать эту директорию + 31006 + 31006 + 0 + + + core + admin_posts + emo_folder_rename + Folder renamed. + Директория переименована. + 31006 + 31006 + 0 + + + core + admin_posts + emo_folder_new + New folder added. + Директория добавлена. + 31006 + 31006 + 0 + + + core + admin_posts + emo_miss_dir + Missing directory name, please try again. + Не хватает названия директории. Попробуйте снова. + 31006 + 31006 + 0 + + + core + admin_posts + emo_safemode + + + 31006 + 31006 + 0 + + + core + admin_posts + emo_a_to_z + No valid folder name was entered, please try again using only alphanumerics (A-Z, a-z, 0-9) + Введено неверное имя директории. Используйте только буквы и цифры (A-Z, a-z, 0-9) + 31006 + 31006 + 0 + + + core + admin_posts + emo_noset + No emoticon set was passed. + Набор смайликов не найден + 31006 + 31006 + 0 + + + core + admin_posts + emo_norename + You cannot rename the default folder. + + 31006 + 31006 + 0 + + + core + admin_posts + emo_folder_rem + Emoticon folder removed. + Директория смайликов удалена. + 31006 + 31006 + 0 + + + core + admin_posts + emo_complete + Uploads Complete! + Загрузка завершена! + 31006 + 31006 0 @@ -13299,8 +13079,518 @@ no_emo_selected You did not select any files to upload Вы не выбрали ни одного файла для загрузки - 30008 - 30008 + 31006 + 31006 + 0 + + + core + admin_posts + emo_mimes + You can only upload image files (jpeg, jpg, gif and png) + Возможна загрузка только файлов изображений (jpeg, jpg, gif и png) + 31006 + 31006 + 0 + + + core + admin_posts + emo_updated + Emoticons Updated! + Смайлики обновлены! + 31006 + 31006 + 0 + + + core + admin_posts + emo_pickanother + + + 31006 + 31006 + 0 + + + core + admin_posts + emo_removed + Emoticon Removed! + Смайлики удалены! + 31006 + 31006 + 0 + + + core + admin_posts + emo_onlydothis + You may only add, edit, and remove emoticons from the default set + В наборе по умолчанию возможно только добавление, изменение и удаление смайликов + 31006 + 31006 + 0 + + + core + admin_posts + emo_nogid + No emoticon group ID was passed + ID группы смайликов не найден + 31006 + 31006 + 0 + + + core + admin_posts + emo_noid + No emoticon ID was passed + ID смайлика не найден + 31006 + 31006 + 0 + + + core + admin_posts + emo_title + Emoticon Management + Управление смайликами + 31006 + 31006 + 0 + + + core + admin_posts + emo_nolocate + + Невозможно найти директорию смайликов. Убедитесь, что путь к директории смайликов корректен. + 31006 + 31006 + 0 + + + core + admin_posts + emo_specify_ex + You must specify which emoticon group you wish to export. + Вы должны указать какую группу смайликов вы хотите экспортировать. + 31006 + 31006 + 0 + + + core + admin_posts + emo_xml_good + Emoticon XML archive import completed. + Импорт XML файла смайликов завершен. + 31006 + 31006 + 0 + + + core + admin_posts + emo_already + + + 31006 + 31006 + 0 + + + core + admin_posts + emo_ftp + + + 31006 + 31006 + 0 + + + core + admin_posts + emo_specify + You must specify which emoticon group you wish to import into. + Вы должны указать в какую группу смайликов вы хотите осуществить импорт. + 31006 + 31006 + 0 + + + core + admin_posts + emo_fail + Upload failed, ipb_emoticons.xml was either missing or empty. + + 31006 + 31006 + 0 + + + core + admin_posts + media_tag_title + Media Tag + Медиа-теги + 31006 + 31006 + 0 + + + core + admin_posts + emoticon_folder + Emoticon Folder + Директория смайликов + 31006 + 31006 + 0 + + + core + admin_posts + emoticon_folder_name + Folder name: + Имя директории: + 31006 + 31006 + 0 + + + core + admin_posts + media_exports + Export Media Tags... + Экспортировать + 31006 + 31006 + 0 + + + core + admin_posts + media_delete + Delete Media Tag... + Удалить + 31006 + 31006 + 0 + + + core + admin_posts + media_export + Export Media Tag... + Экспортировать + 31006 + 31006 + 0 + + + core + admin_posts + media_import_button + Import + Импортировать + 31006 + 31006 + 0 + + + core + admin_posts + media_upload + Upload XML Media Tags]]> + Загрузка XML списка медиа-тегов]]> + 31006 + 31006 + 0 + + + core + admin_posts + media_upload_desc + Duplicate entries will not be imported + Существующие записи импортированы не будут. + 31006 + 31006 + 0 + + + core + admin_posts + media_import + Import New Media Tags + Импортировать новые медиа-теги + 31006 + 31006 + 0 + + + core + admin_posts + media_name + Media + Медиа + 31006 + 31006 + 0 + + + core + admin_posts + media_current + Current Media Tag Replacements + Медиа-теги + 31006 + 31006 + 0 + + + core + admin_posts + media_html_info +
    Ex: <a href="http://www.testm.com/$1/">$1</a>
    Result: <a href="http://www.testm.com/23423/">23423</a>]]>
    +
    Пример: <a href="http://www.testm.com/$1/">$1</a>
    Совпадение: <a href="http://www.testm.com/23423/">23423</a>]]>
    + 31006 + 31006 + 0 +
    + + core + admin_posts + media_match_info +
    Ex: http://www.test.com/23423/
    Match: http://www.test.com/{1}/]]>
    +
    Пример: http://www.test.com/23423/
    Совпадение: http://www.test.com/{1}/]]>
    + 31006 + 31006 + 0 +
    + + core + admin_posts + media_html + Media Replacement HTML + Шаблон замены медиа-тега + 31006 + 31006 + 0 + + + core + admin_posts + media_title_info + Used as a reference for the tag + Используется во всплывающей подсказке медиа-тега + 31006 + 31006 + 0 + + + core + admin_posts + media_match + Media Replacement Match + Медиа-тег + 31006 + 31006 + 0 + + + core + admin_posts + media_title + Media Replacement Title + Название + 31006 + 31006 + 0 + + + core + admin_posts + media_error + Form Error]]> + Ошибка формы ]]> + 31006 + 31006 + 0 + + + core + admin_posts + media_edit_replace + Edit Media Tag replacement + Изменить медиа-тег + 31006 + 31006 + 0 + + + core + admin_posts + media_edit + Edit Media Tag... + Изменить + 31006 + 31006 + 0 + + + core + admin_posts + media_add_replace + Add Media Tag replacement + Добавить замену медиа-тега + 31006 + 31006 + 0 + + + core + admin_posts + media_add + Add Media Tag... + Добавить + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_stripsearch_info + Removes content within this bbcode from the search results entirely. + Удаляет содержимое BB-кода из результатов поиска + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_stripsearch + Strip from search results + Вырезать из результатов поиска + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_protected_info + Prevents users from being able to delete this BBCode + Не позволять пользователям удалять этот BB-код + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_protected + BBCode protected? + Защищенный BB-код ? + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_contdial_info + + + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_contdial + + + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_optdial_info + + + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_optdial + + + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_image_info_loc + Image should be in public/style_images/(skin_directory)/rte_icons/ + Изображение должно находиться в директории public/style_images/(директория_стиля)/rte_icons/ + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_image_info + Button is used if populated, else bbcode is placed into editor other styles menu. + Если изображение указано, то оно будет отображаться в виде кнопки + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_image + BBCode Image + Изображение BB-кода + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_whereused_info + You can enable and disable this BBCode in different sections individually + Можно включать или отключать этот BB-код в разных разделах по отдельности + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_whereused + Where can the BBCode be used? + Где BB-код может использоваться ? + 31006 + 31006 0 @@ -13309,28 +13599,758 @@ bbcode_assoc_app BBCode Application Приложение BB-кодов - 30008 - 30008 + 31006 + 31006 0 core admin_posts - tag_already_alias - %s]]> - %s]]> - 30011 - 30011 + bbcode_groups + Which groups can use this BBCode? + Каким группам разрешено использовать этот код ? + 31006 + 31006 0 core admin_posts - bbcode_alpha_num - You may only use alpha-numeric characters in the bbcode tag and aliases - В теге bb-кода можно использовать только цифры и буквы - 30011 - 30011 + bbcode_groups_infp + If none selected, no groups can use the BBCode + Если ни одной группы не выбрано, то ни одна группа не сможет использовать BB-код + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_php_info_loc + + + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_php_info + Useful if you need to perform regular expressions or conditional parsing]]> + Используйте когда необходимо использовать регулярные выражения или условную обработку]]> + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_php + OR PHP file to execute + ИЛИ PHP файл для исполнения + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_noparse_info + Prevents parsing of other BBCodes within this BBCode + Предотвращает обработку других BB-кодов внутри этого BB-кода + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_replace + Custom BBCode Replacement + Шаблон замены BB-кода + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_replace_info + <tag thing='{option}'>{content}</tag>
    Note: Javascript cannot be used.]]>
    + <tag>{content}</tag>
    <tag thing='{option}'>{content}</tag>]]>
    + 31006 + 31006 + 0 +
    + + core + admin_posts + bbcode_noparse + Prevent other codes parsing? + Предотвращать разбор вложенных кодов ? + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_switch_info + + + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_optional_info + Is the option value optional? + Значение option необязательно? + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_switch + Switch option and content? + Поменять option и content местами? + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_optional + Option is optional? + option обязательно ? + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_useoption + Use Option in tag? + Использовать опции в теге? + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_useoption_info + + + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_aliases_info + + Список псевдонимов для данного тега (разделитель запятая) + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_singletag + Single Tag Only + Одиночный тег? + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_singletag_info + Example: [hr] to create a <hr /> HTML tag]]> + Пример: [hr] для HTML тега <hr />]]> + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_aliases + Custom BBCode Aliases (Optional) + Псевдонимы (опционально) + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_example_info + + Тег для примера: [tag]Здесь ваш пример![/tag]]]> + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_tag_info + tag]]> + tag]]> + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_useinguide + Used on the BBCode help guides + Используется на страницах помощи по BB-кодам + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_description + Custom BBCode Description + Полное описание + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_example + Custom BBCode Example + Пример использования + 31006 + 31006 + 0 + + + core + admin_posts + ctype__topics + Topics and Replies + Темы и ответы + 31006 + 31006 + 0 + + + core + admin_posts + ctype__announcement + Announcements + Объявления + 31006 + 31006 + 0 + + + core + admin_posts + ctype__rules + Forum Rules + Правила форума + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_title_title + Custom BBCode Title + BB-код + 31006 + 31006 + 0 + + + core + admin_posts + available_sections + Available in all sections + Доступен во всех разделах + 31006 + 31006 + 0 + + + core + admin_posts + all_groups + All current and future groups + Все текущие и будущие группы + 31006 + 31006 + 0 + + + core + admin_posts + bbcache_action + Drop all %s cached items? + Удалить кеш всех %s объектов? + 31006 + 31006 + 0 + + + core + admin_posts + bbcache_desc + The content cache is enabled which means that any changes to this BBCode will not be automatically applied to previous posts unless you remove all cached content. + Задействовано кеширование содержимого, это значит, что любые изменения этого BB-кода не будут автоматически применены к предыдущим сообщениям до тех пор пока не будет удалено кешированное содержимое. + 31006 + 31006 + 0 + + + core + admin_posts + bbcache_title + Content Cache Enabled + Кеширование содержимого включено + 31006 + 31006 + 0 + + + core + admin_posts + custom_bbcode_head + Custom BBCode + Пользовательский BB-код + 31006 + 31006 + 0 + + + core + admin_posts + export_bbcode_all + Export (Apps) + Экспорт в приложения + 31006 + 31006 + 0 + + + core + admin_posts + import_bbcode_all + Import (Apps) + Импорт из приложений + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_header + Custom BBCodes + Пользовательские BB-коды + 31006 + 31006 + 0 + + + core + admin_posts + delete_bbcode + Delete BBCode... + Удалить + 31006 + 31006 + 0 + + + core + admin_posts + edit_bbcode + Edit BBCode... + Изменить BB-код + 31006 + 31006 + 0 + + + core + admin_posts + export_bbcode + Export (XML) + Экспортировать + 31006 + 31006 + 0 + + + core + admin_posts + addnew_bbcode + Add BBCode + Добавить + 31006 + 31006 + 0 + + + core + admin_posts + upload_bbcode_dupe + Duplicate entries will not be imported + Существующие записи импортированы не будут. + 31006 + 31006 + 0 + + + core + admin_posts + upload_bbcode_xml + Upload XML BBCode List]]> + Загрузка XML списка BB-кодов ]]> + 31006 + 31006 + 0 + + + core + admin_posts + import_new_bbcode + Import New BBCodes + Импортировать новые BB-коды + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_import + Import + Импортировать + 31006 + 31006 + 0 + + + core + admin_posts + enter_test_parse + Enter the post content to test parse here + Введите текст для проверки + 31006 + 31006 + 0 + + + core + admin_posts + test_parse + Test BBCode Parsing + Проверка работы BB-кодов + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_tag + Custom BBCode Tag + Тег + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_options + Options + Параметры + 31006 + 31006 + 0 + + + core + admin_posts + your_bbcodes + Your Custom BBcodes + Пользовательские BB-коды + 31006 + 31006 + 0 + + + core + admin_posts + add_edit + Add/Edit BBCode + Добавить/Изменить BB-код + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_title + Custom BBCode + BB-код + 31006 + 31006 + 0 + + + core + admin_posts + m_tag_updated + + + 31006 + 31006 + 0 + + + core + admin_posts + m_tag_added + + + 31006 + 31006 + 0 + + + core + admin_posts + m_error_replace + You must specify Media Tag replacement HTML.]]> + Вы должны ввести шаблон замены медиа-тега.]]> + 31006 + 31006 + 0 + + + core + admin_posts + m_manager + Media Tag Manager + Управление медиа-тегами + 31006 + 31006 + 0 + + + core + admin_posts + m_error_match + You must specify a Media Tag match string.]]> + Необходимо указать строку совпадения медиа-тега.]]> + 31006 + 31006 + 0 + + + core + admin_posts + m_error_name + You must specify a Media Tag replacement title.]]> + Вы должны ввести название медиа-тега]]> + 31006 + 31006 + 0 + + + core + admin_posts + m_replace_removed + Media Tag replacement removed. + Медиа-тег удален + 31006 + 31006 + 0 + + + core + admin_posts + m_import_complete + Media Tag XML file import completed + Импорт XML файла медиа-тегов завершен. + 31006 + 31006 + 0 + + + core + admin_posts + m_upload_failed + Upload failed. The Media Tag XML file was missing, empty, or corrupted. + Загрузка не удалась. XML файл не найден или поврежден. + 31006 + 31006 + 0 + + + core + admin_posts + edited_bbcode + Custom BBCode Edited + Дополнительный BB-код изменен. + 31006 + 31006 + 0 + + + core + admin_posts + new_bbcode + New BBCode Added + Дополнительный BB-код добавлен. + 31006 + 31006 + 0 + + + core + admin_posts + must_use_option + + Для BB-кодов с опциями необходимо использовать тег {option} + 31006 + 31006 + 0 + + + core + admin_posts + must_use_content + + Для не одиночных BB-кодов необходимо использовать тег {content} + 31006 + 31006 + 0 + + + core + admin_posts + complete_form + You must complete the form fully. + Вы должны заполнить форму полностью. + 31006 + 31006 + 0 + + + core + admin_posts + tag_already + The tag you entered is already in use. + Тег уже используется в системе. + 31006 + 31006 + 0 + + + core + admin_posts + no_bbcode_found_edit + We could not determine which BBCode you were attempting to edit. + Не удалось определить какой код вы хотите отредактировать. + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_test + BBCode Test:

    ]]>
    + Тест BBCode:

    ]]>
    + 31006 + 31006 + 0 +
    + + core + admin_posts + no_bbcode_found_delete + We could not find the BBCode you were attempting to delete. + Не удалось определить какой код вы хотите удалить. + 31006 + 31006 + 0 + + + core + admin_posts + import_complete + BBCode XML file import completed. + Импорт XML файла BB-кода завершен. + 31006 + 31006 + 0 + + + core + admin_posts + upload_failed + Upload failed. The BBCode XML file was missing, empty, or corrupted. + Загрузка не удалась. XML файл с BB-кодами либо пуст, либо содержит неверную структуру. + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_import_app + %s: %s BBcode inserted, %s updated + %s: %s BB-кодов добавлено, %s обновлено + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_customregex_info + Use this field to define a regular expression to filter the option content through before outputting to the page. If option value does not match expression, tag will not be parsed. + Используйте данное поле, чтобы указать регулярное выражение, при помощи которого будет осуществляться фильтрация содержимого, заключенного в теги бб-кода, при выводе. Если содержимое не удовлетворяет выражению, тег не будет обработан. + 31006 + 31006 + 0 + + + core + admin_posts + bbcode_customregex + Option Regular Expression Filter + Фильтр с использованием регулярных выражений + 31006 + 31006 0 @@ -13339,438 +14359,168 @@ must_use_unique_btag You must supply a unique bbcode tag. Необходимо использовать уникальное значение для bb-код тега. - 30011 - 30011 + 31006 + 31006 0 core - admin_security - sec_show - Show - Показать - 30005 - + admin_posts + bbcode_alpha_num + You may only use alpha-numeric characters in the bbcode tag and aliases + В теге bb-кода можно использовать только цифры и буквы + 31006 + 31006 0 core - admin_security - sec_show_all - Show All - все - 30005 - + admin_posts + tag_already_alias + %s]]> + %s]]> + 31006 + 31006 0 core - admin_security - sec_score_5_or_more - Score 5 or more - с рейтингом 5 или выше - 30005 - + admin_posts + pointssuffix + Points + баллов + 31006 + 31006 0 core - admin_security - sec_score_6_or_more - Score 6 or more - с рейтингом 6 или выше - 30005 - + admin_posts + ctype__signatures + Signatures + Подписи + 31006 + 31006 0 core - admin_security - sec_score_7_or_more - Score 7 or more - с рейтингом 7 или выше - 30005 - + admin_posts + ctype__aboutme + About Me + Обо мне + 31006 + 31006 0 core - admin_security - sec_score_8_or_more - Score 8 or more - с рейтингом 8 или выше - 30005 - + admin_posts + ctype__pms + Private Messages + Личные сообщения + 31006 + 31006 0 core - admin_security - sec_files_55k_or_larger - Files 55k or larger - файлы размером свыше 55k - 30005 - + admin_posts + ctype__warn + Warn logs/notes + Журналы предупреждений/заметок + 31006 + 31006 0 core - admin_security - sec_score_9_or_more - Score 9 or more - с рейтингом 9 или выше - 30005 - + admin_posts + ctype__calendar + Calendar + Календарь + 31006 + 31006 0 core - admin_security - sec_executable_files - Executable Files - Исполняемые файлы - 30005 - + admin_posts + ctype__galimg + Submitting Images in IP.Gallery + Добавление изображений IP.Gallery + 31006 + 31006 0 core - admin_security - sec_modified_in_the_past_30_days - Modified in the past 30 days - измененные за последние 30 дней - 30005 - + admin_posts + ctype__galcom + Submitting Comments in IP.Gallery + Добавление комментариев IP.Gallery + 31006 + 31006 0 core - admin_security - sec_last_modified - Last Modified - Последнее изменение - 30005 - + admin_posts + ctype__blogent + Submitting entries in IP.Blog + Добавление записей в IP.Blog + 31006 + 31006 0 core - admin_security - sec_file_size - (File Size) - (размер файла) - 30005 - + admin_posts + ctype__blogcom + Submitting comments in IP.Blog + Добавление комментариев в IP.Blog + 31006 + 31006 0 core - admin_security - sec_acp_htaccess_protection - ACP .htaccess protection - - 30005 - + admin_posts + ctype__blogblc + IP.Blog Custom Blocks + Пользовательские блоки IP.Blog + 31006 + 31006 0 core - admin_security - sec_information - information - информация - 30005 - + admin_posts + ctype__idmfile + Submitting Files in IP.Downloads + Добавление файлов в IP.Downloads + 31006 + 31006 0 core - admin_security - sec_invision_power_board_can_write - Invision Power Board can write .htaccess protection into your admin directory. - - 30005 - + admin_posts + ctype__idmcom + Submitting Comments in IP.Downloads + Добавление комментариев IP.Downloads + 31006 + 31006 0 core - admin_security - sec_using_this_tool_will_overwrite - Using this tool will overwrite any current protection in your admin directory. You will also be required to enter the username and password immediately after saving. - Используя этот инструмент, вы перезапишите любой имеющийся файл защиты в директории админцентра. После сохранения данных, вам будет предложено ввести указанные имя пользователя и пароль. Хотим заметить, что если вы переименуете директорию админцентра, вам так же будет необходимо удалить этот файл при помощи FTP-клиента — в противном случае доступ в админцентр для вас будет заблокирован. - 30005 - - 0 - - - core - admin_security - sec_please_note - Please note - Помните - 30005 - - 0 - - - core - admin_security - sec_your_installation_is_checked_a - Your installation is checked and suggestions are made on how to improve the security of your board. - При помощи настроек и инструментов ниже вы сможете проверить и повысить безопасность вашего IPB. - 30005 - - 0 - - - core - admin_security - sec_the_security_center_is_a_centr - The Security Center is a centralized repository of security tools and settings. - Центр безопасности — это хранилище инструментов и настроек, отвечающих за безопасность форума. - 30005 - - 0 - - - core - admin_security - sec_ipboard_security_center - IP.Board Security Center - Центр безопасности IP.Board - 30005 - - 0 - - - core - admin_security - sec_username - Username - Имя пользователя - 30005 - - 0 - - - core - admin_security - sec_cp_htaccess_protection - ACP .htaccess protection - - 30005 - - 0 - - - core - admin_security - sec_proceed - Proceed - Создать файл - 30005 - - 0 - - - core - admin_security - sec_ipboard_is_unable_to_write_int - IP.Board is unable to write into your admin directory - IP.Board не может создать файл в директории администратора - 30005 - - 0 - - - core - admin_security - sec_password - Password - Пароль - 30005 - - 0 - - - core - admin_security - sec_please_create_a_file_called_ht - - - 30005 - 30005 - 0 - - - core - admin_security - sec_please_create_a_file_called_ht_1 - - - 30005 - 30005 - 0 - - - core - admin_security - sec_renaming_the_cp_sitecontrol_di - - Изменение директории АЦ - 30005 - - 0 - - - core - admin_security - sec_ipboard_has_a_dedicated_direct - IP.Board has a dedicated directory for the administration center. To further enhance security, you can rename this ACP directory. - Invision Power Board обнаружил директорию админцентра. В целях повышения безопасности, вы можете изменить эту директорию. - 30005 - - 0 - - - core - admin_security - sec_locate_the_admin_directory_cho - - - 30005 - - 0 - - - core - admin_security - sec_first_youll_need_to_physically - - - 30005 - - 0 - - - core - admin_security - sec_step_1 - Step 1: - Шаг 1: - 30005 - - 0 - - - core - admin_security - sec_locate_the_initdataphp_file_th - - - 30005 - - 0 - - - core - admin_security - sec_near_the_top_of_this_file_youl - - В самом верху файла вы увидите следующие строки: - 30005 - - 0 - - - core - admin_security - sec_your_cp_directory_has_now_been - Your ACP directory has now been renamed. - Теперь директория вашего админцентра изменена. - 30005 - - 0 - - - core - admin_security - skin_header_admins - Members With ACP Access - Пользователи, имеющие доступ в АЦ - 30005 - - 0 - - - core - admin_security - skin_th_name - Name - Пользователь - 30005 - - 0 - - - core - admin_security - sec_change_the_line_define_cp_dire - define( 'CP_DIRECTORY', 'admin' ); to
    define( 'CP_DIRECTORY', 'admin_secret' );
    ]]>
    - define( 'CP_DIRECTORY', 'admin' ); на
    define( 'CP_DIRECTORY', 'admin_secret' );
    ]]>
    - 30005 - - 0 -
    - - core - admin_security - skin_th_primary_group - Primary Group - Основная группа - 30005 - - 0 - - - core - admin_security - skin_th_filesize - - - 30005 - - 0 - - - core - admin_security - skin_suspicious_files - Suspicious Files - Подозрительные файлы - 30005 - - 0 - - - core - admin_security - skin_header_virus - Unauthorized File Checked Folders - Проверенные директории - 30005 - - 0 - - - core - admin_security - skin_edit_member - Edit - Изменить - 30005 - + admin_posts + ctype__support + Support Requests in IP.Nexus + Запрос поддержки в IP.Commerce + 31006 + 31006 0 @@ -13779,8 +14529,8 @@ skin_th_email Email Address E-mail адрес - 30005 - 30005 + 31006 + 31006 0 @@ -13789,8 +14539,8 @@ skin_th_posts Posts Сообщений - 30005 - + 31006 + 31006 0 @@ -13799,8 +14549,28 @@ skin_th_ip IP Address IP адрес - 30005 - + 31006 + 31006 + 0 + + + core + admin_security + skin_th_name + Name + Пользователь + 31006 + 31006 + 0 + + + core + admin_security + skin_th_primary_group + Primary Group + Основная группа + 31006 + 31006 0 @@ -13809,8 +14579,378 @@ skin_th_secondary_group Secondary Groups Второстепенная группа - 30005 - + 31006 + 31006 + 0 + + + core + admin_security + skin_header_admins + Members With ACP Access + Пользователи, имеющие доступ в АЦ + 31006 + 31006 + 0 + + + core + admin_security + sec_your_cp_directory_has_now_been + Your ACP directory has now been renamed. + Теперь директория вашего админцентра изменена. + 31006 + 31006 + 0 + + + core + admin_security + sec_change_the_line_define_cp_dire + define( 'CP_DIRECTORY', 'admin' ); to
    define( 'CP_DIRECTORY', 'admin_secret' );
    ]]>
    + define( 'CP_DIRECTORY', 'admin' ); на
    define( 'CP_DIRECTORY', 'admin_secret' );
    ]]>
    + 31006 + 31006 + 0 +
    + + core + admin_security + sec_locate_the_initdataphp_file_th + + + 31006 + 31006 + 0 + + + core + admin_security + sec_near_the_top_of_this_file_youl + + В самом верху файла вы увидите следующие строки: + 31006 + 31006 + 0 + + + core + admin_security + sec_locate_the_admin_directory_cho + + + 31006 + 31006 + 0 + + + core + admin_security + sec_ipboard_has_a_dedicated_direct + IP.Board has a dedicated directory for the administration center. To further enhance security, you can rename this ACP directory. + Invision Power Board обнаружил директорию админцентра. В целях повышения безопасности, вы можете изменить эту директорию. + 31006 + 31006 + 0 + + + core + admin_security + sec_step_1 + Step 1: + Шаг 1: + 31006 + 31006 + 0 + + + core + admin_security + sec_first_youll_need_to_physically + + + 31006 + 31006 + 0 + + + core + admin_security + sec_renaming_the_cp_sitecontrol_di + + Изменение директории АЦ + 31006 + 31006 + 0 + + + core + admin_security + sec_please_create_a_file_called_ht + + + 31006 + 31006 + 0 + + + core + admin_security + sec_please_create_a_file_called_ht_1 + + + 31006 + 31006 + 0 + + + core + admin_security + sec_password + Password + Пароль + 31006 + 31006 + 0 + + + core + admin_security + sec_proceed + Proceed + Создать файл + 31006 + 31006 + 0 + + + core + admin_security + sec_cp_htaccess_protection + ACP .htaccess protection + + 31006 + 31006 + 0 + + + core + admin_security + sec_ipboard_is_unable_to_write_int + IP.Board is unable to write into your admin directory + IP.Board не может создать файл в директории администратора + 31006 + 31006 + 0 + + + core + admin_security + sec_username + Username + Имя пользователя + 31006 + 31006 + 0 + + + core + admin_security + sec_using_this_tool_will_overwrite + Using this tool will overwrite any current protection in your admin directory. You will also be required to enter the username and password immediately after saving. + Используя этот инструмент, вы перезапишите любой имеющийся файл защиты в директории админцентра. После сохранения данных, вам будет предложено ввести указанные имя пользователя и пароль. Хотим заметить, что если вы переименуете директорию админцентра, вам так же будет необходимо удалить этот файл при помощи FTP-клиента — в противном случае доступ в админцентр для вас будет заблокирован. + 31006 + 31006 + 0 + + + core + admin_security + sec_please_note + Please note + Помните + 31006 + 31006 + 0 + + + core + admin_security + sec_invision_power_board_can_write + Invision Power Board can write .htaccess protection into your admin directory. + + 31006 + 31006 + 0 + + + core + admin_security + sec_information + information + информация + 31006 + 31006 + 0 + + + core + admin_security + sec_acp_htaccess_protection + ACP .htaccess protection + + 31006 + 31006 + 0 + + + core + admin_security + sec_your_installation_is_checked_a + Your installation is checked and suggestions are made on how to improve the security of your board. + При помощи настроек и инструментов ниже вы сможете проверить и повысить безопасность вашего IPB. + 31006 + 31006 + 0 + + + core + admin_security + sec_the_security_center_is_a_centr + The Security Center is a centralized repository of security tools and settings. + Центр безопасности — это хранилище инструментов и настроек, отвечающих за безопасность форума. + 31006 + 31006 + 0 + + + core + admin_security + sec_ipboard_security_center + IP.Board Security Center + Центр безопасности IP.Board + 31006 + 31006 + 0 + + + core + admin_security + sec_last_modified + Last Modified + Последнее изменение + 31006 + 31006 + 0 + + + core + admin_security + sec_file_size + (File Size) + (размер файла) + 31006 + 31006 + 0 + + + core + admin_security + sec_executable_files + Executable Files + Исполняемые файлы + 31006 + 31006 + 0 + + + core + admin_security + sec_modified_in_the_past_30_days + Modified in the past 30 days + измененные за последние 30 дней + 31006 + 31006 + 0 + + + core + admin_security + sec_files_55k_or_larger + Files 55k or larger + файлы размером свыше 55k + 31006 + 31006 + 0 + + + core + admin_security + sec_score_9_or_more + Score 9 or more + с рейтингом 9 или выше + 31006 + 31006 + 0 + + + core + admin_security + sec_score_8_or_more + Score 8 or more + с рейтингом 8 или выше + 31006 + 31006 + 0 + + + core + admin_security + sec_score_7_or_more + Score 7 or more + с рейтингом 7 или выше + 31006 + 31006 + 0 + + + core + admin_security + sec_score_6_or_more + Score 6 or more + с рейтингом 6 или выше + 31006 + 31006 + 0 + + + core + admin_security + sec_score_5_or_more + Score 5 or more + с рейтингом 5 или выше + 31006 + 31006 + 0 + + + core + admin_security + sec_show_all + Show All + все + 31006 + 31006 + 0 + + + core + admin_security + sec_show + Show + Показать + 31006 + 31006 0 @@ -13819,428 +14959,48 @@ h3_title_security Security Tools Available Доступные инструменты - 30006 - + 31006 + 31006 0 core - admin_setup - error__up_to_date - This application is already up-to-date - Приложение последней версии - 30005 - + admin_security + skin_edit_member + Edit + Изменить + 31006 + 31006 0 core - admin_setup - error__cannot_init - Cannot initiate the set up class - Не удалось инициировать установочный класс - 30005 - + admin_security + skin_header_virus + Unauthorized File Checked Folders + Проверенные директории + 31006 + 31006 0 core - admin_setup - hooks_nofile - No hooks to install - Нет модификаций для установки - 30005 - + admin_security + skin_suspicious_files + Suspicious Files + Подозрительные файлы + 31006 + 31006 0 core - admin_setup - error__file_chmod - File is not writeable: %s - Нельзя записать в файл %s - 30005 - - 0 - - - core - admin_setup - error__file_missing - File does not exist: %s - Файл %s не существует - 30005 - - 0 - - - core - admin_setup - redir__nomore_modules - No more modules to run... - Больше нет модулей для запуска - 30005 - - 0 - - - core - admin_setup - error__file_needed - File does not exist: %s - Файл %s не существует - 30005 - - 0 - - - core - admin_setup - redir__replacements - Replacements inserted - Макросов добавлено - 30005 - - 0 - - - core - admin_setup - redir__cssfiles - %s css files added, %s updated in set %s - %s css добавлено, %s обновлено в стиле %s - 30005 - - 0 - - - core - admin_setup - redir__hooks - %s hooks added, %s updated - %s модификаций добавлено, %s обновлено - 30005 - - 0 - - - core - admin_setup - redir__appmodule_run - Application module run... - Запуск модуля - 30005 - - 0 - - - core - admin_setup - redir__sql_run - %s SQL queries run... - %s SQL запросов выполнено - 30005 - - 0 - - - core - admin_setup - redir__sql_tables - %s tables installed, %s skipped - %s таблиц добавлено, %s пропущено - 30005 - - 0 - - - core - admin_setup - redir__templates - %s templates added, %s updated in set %s - %s шаблонов добавлено, %s обновлено в стиле %s - 30005 - - 0 - - - core - admin_setup - redir__upgraded_to - Upgraded to %s, running next module... - Обновлено до версии %s, запуск следующего модуля - 30005 - - 0 - - - core - admin_setup - redir__nomore_sql - No more SQL queries to run - SQL запросов больше нет - 30005 - - 0 - - - core - admin_setup - redir__sql_indexes - %s indexes created - %s индексов добавлено - 30005 - - 0 - - - core - admin_setup - redir__sql_inserts - %s inserts added - %s данных добавлено - 30005 - - 0 - - - core - admin_setup - type__upgrade - Upgrade - Обновление - 30005 - - 0 - - - core - admin_setup - type__install - Install - Установка - 30005 - - 0 - - - core - admin_setup - cur_version_none - None - Нет - 30005 - - 0 - - - core - admin_setup - error__display - The following errors have been found: - Возникли следующие ошибки: - 30005 - - 0 - - - core - admin_setup - error__continue - Click here to continue regardless - Нажмите здесь, если все равно хотите продолжить - 30005 - - 0 - - - core - admin_setup - type__installation - installation - установка - 30005 - - 0 - - - core - admin_setup - redir__continue - Click here to continue (if not automatically redirected) - Для продолжения нажмите сюда, если вас не переместило автоматически - 30005 - - 0 - - - core - admin_setup - type__text - This %s is in progress... - %s выполняется - 30005 - - 0 - - - core - admin_setup - type__upgradet - upgrade - обновление - 30005 - - 0 - - - core - admin_setup - ipboard_setup_title - IP.Board Set Up Utility - Инструмент установки - 30005 - - 0 - - - core - admin_setup - progress_report - Progress Report: - Прогресс: - 30005 - - 0 - - - core - admin_setup - type__text_finished - This %s is now complete - %s завершен - 30005 - - 0 - - - core - admin_setup - return_to_overview - - Нажмите здесь для возвращения к списку приложений - 30005 - - 0 - - - core - admin_setup - ipboard_welcome_setup - Welcome to the IP.Board application set up utility. - Вас приветствует установщик IP.Board. - 30005 - - 0 - - - core - admin_setup - applications_title - Application - Приложение - 30005 - - 0 - - - core - admin_setup - please_correct_errors - Please correct these errors before attempting to continue: - Прежде чем продолжить необходимо исправить следующие ошибки: - 30005 - - 0 - - - core - admin_setup - upgrade_latest - upgrade to the latest version - обновление до последней версии - 30005 - - 0 - - - core - admin_setup - install_latest - install the latest version - установка последней версии - 30005 - - 0 - - - core - admin_setup - duplicate_tables - Duplicate Tables: - Существующие таблицы: - 30005 - - 0 - - - core - admin_setup - current_version - Current Version: - Текущая версия: - 30005 - - 0 - - - core - admin_setup - author_suffix - Author: - Автор: - 30005 - - 0 - - - core - admin_setup - version_suffix - Version: - Версия: - 30005 - - 0 - - - core - admin_setup - dup__skip - - Пропустить - 30005 - 30005 - 0 - - - core - admin_setup - dup__drop - Drop original tables and overwrite - Удалить оригинальные и создать новые - 30005 - 30005 + admin_security + skin_th_filesize + + + 31006 + 31006 0 @@ -14249,18 +15009,18 @@ bbcode_and_media BBCode and Media Tags imported Добавлены теги bb-кода и медиа-теги - 30005 - 30005 + 31006 + 31006 0 core admin_setup - redir__no_template_re - No skin templates added for this application, skipping template rebuild... - Нет шаблонов для добавления. Пропускаем обновление стилей. - 30005 - 30005 + redir__no_templates + No skin templates added... + Нет шаблонов для добавления + 31006 + 31006 0 @@ -14269,48 +15029,258 @@ continue_button Continue Продолжить - 30005 - 30005 + 31006 + 31006 0 core admin_setup - imported_x_help - Imported %s help files - Добавлено %s разделов помощи - 30005 - 30005 + redir__no_template_re + No skin templates added for this application, skipping template rebuild... + Нет шаблонов для добавления. Пропускаем обновление стилей. + 31006 + 31006 0 core admin_setup - no_bbcode_media - No bbcode or media tags to import - Нет bb-кодов и медиа-тегов для добавления - 30007 - 30007 + dup__skip + + Пропустить + 31006 + 31006 0 core admin_setup - imported_no_help - No help files to import - Нет разделов помощи для добавления - 30007 - 30007 + dup__drop + Drop original tables and overwrite + Удалить оригинальные и создать новые + 31006 + 31006 0 core admin_setup - no_tasks_for_import - No tasks to import - Нет задач для добавления - 30007 - 30007 + duplicate_tables + Duplicate Tables: + Существующие таблицы: + 31006 + 31006 + 0 + + + core + admin_setup + version_suffix + Version: + Версия: + 31006 + 31006 + 0 + + + core + admin_setup + author_suffix + Author: + Автор: + 31006 + 31006 + 0 + + + core + admin_setup + applications_title + Application + Приложение + 31006 + 31006 + 0 + + + core + admin_setup + current_version + Current Version: + Текущая версия: + 31006 + 31006 + 0 + + + core + admin_setup + please_correct_errors + Please correct these errors before attempting to continue: + Прежде чем продолжить необходимо исправить следующие ошибки: + 31006 + 31006 + 0 + + + core + admin_setup + upgrade_latest + upgrade to the latest version + обновление до последней версии + 31006 + 31006 + 0 + + + core + admin_setup + install_latest + install the latest version + установка последней версии + 31006 + 31006 + 0 + + + core + admin_setup + return_to_overview + + Нажмите здесь для возвращения к списку приложений + 31006 + 31006 + 0 + + + core + admin_setup + ipboard_setup_title + IP.Board Set Up Utility + Инструмент установки + 31006 + 31006 + 0 + + + core + admin_setup + ipboard_welcome_setup + Welcome to the IP.Board application set up utility. + Вас приветствует установщик IP.Board. + 31006 + 31006 + 0 + + + core + admin_setup + progress_report + Progress Report: + Прогресс: + 31006 + 31006 + 0 + + + core + admin_setup + type__text_finished + This %s is now complete + %s завершен + 31006 + 31006 + 0 + + + core + admin_setup + type__upgradet + upgrade + обновление + 31006 + 31006 + 0 + + + core + admin_setup + type__text + This %s is in progress... + %s выполняется + 31006 + 31006 + 0 + + + core + admin_setup + type__installation + installation + установка + 31006 + 31006 + 0 + + + core + admin_setup + redir__continue + Click here to continue (if not automatically redirected) + Для продолжения нажмите сюда, если вас не переместило автоматически + 31006 + 31006 + 0 + + + core + admin_setup + error__continue + Click here to continue regardless + Нажмите здесь, если все равно хотите продолжить + 31006 + 31006 + 0 + + + core + admin_setup + error__display + The following errors have been found: + Возникли следующие ошибки: + 31006 + 31006 + 0 + + + core + admin_setup + cur_version_none + None + Нет + 31006 + 31006 + 0 + + + core + admin_setup + type__install + Install + Установка + 31006 + 31006 + 0 + + + core + admin_setup + type__upgrade + Upgrade + Обновление + 31006 + 31006 0 @@ -14319,658 +15289,228 @@ redir__nolanguages There were no language bits to insert Нет языковых фраз для добавления - 30008 - 30008 + 31006 + 31006 0 core - admin_sql - query_executed_successfully - Query executed successfully - Запрос выполнен - 30005 - 30005 + admin_setup + redir__sql_indexes + %s indexes created + %s индексов добавлено + 31006 + 31006 0 core - admin_sql - my_noapp - The application you selected does not appear to be installed. - Приложение, которое вы выбрали, не установлено в системе - 30005 - 30005 + admin_setup + redir__sql_inserts + %s inserts added + %s данных добавлено + 31006 + 31006 0 core - admin_sql - my_si_progress - search index rebuild in progress - обновление поискового индекса - 30005 - + admin_setup + redir__sql_tables + %s tables installed, %s skipped + %s таблиц добавлено, %s пропущено + 31006 + 31006 0 core - admin_sql - my_processed - processed - обработано - 30005 - + admin_setup + redir__nomore_sql + No more SQL queries to run + SQL запросов больше нет + 31006 + 31006 0 core - admin_sql - my_si_complete - search index rebuild complete - обновление поискового индекса завершено - 30005 - + admin_setup + redir__sql_run + %s SQL queries run... + %s SQL запросов выполнено + 31006 + 31006 0 core - admin_sql - my_noloc_class - - - 30005 - 30005 + admin_setup + redir__appmodule_run + Application module run... + Запуск модуля + 31006 + 31006 0 core - admin_sql - my_noloc - - - 30005 - 30005 + admin_setup + redir__replacements + Replacements inserted + Макросов добавлено + 31006 + 31006 0 core - admin_sql - my_seltables - You must choose some tables to run this tool on! If not, that is just plain outright silly! - Необходимо выбрать таблицы, для которых будет запущен инструмент! - 30005 - + admin_setup + redir__cssfiles + %s css files added, %s updated in set %s + %s css добавлено, %s обновлено в стиле %s + 31006 + 31006 0 core - admin_sql - my_cantdo - Sorry, we do not allow one or more of those queries. Please run them from a seperate database management tool outside of IP.Board. - К сожалению наша система не позволяет выполнять подобные запросы. Вы можете выполнить их, используя иные средства управления базой данных. - 30005 - 30005 + admin_setup + redir__hooks + %s hooks added, %s updated + %s хуков добавлено, %s обновлено + 31006 + 31006 0 core - admin_sql - my_backupnav - MySQL Database Backup - Бэкап базы MySQL - 30005 - 30005 + admin_setup + redir__templates + %s templates added, %s updated in set %s + %s шаблонов добавлено, %s обновлено в стиле %s + 31006 + 31006 0 core - admin_sql - my_title - MySQL %s Toolbox - MySQL %s - 30005 - 30005 + admin_setup + redir__upgraded_to + Upgraded to %s, running next module... + Обновлено до версии %s, запуск следующего модуля + 31006 + 31006 0 core - admin_sql - my_tooold - - К сожалению версия MySQL, установленная у вас ниже чем 3.23.21. Управление MySQL не доступно. Да и вообще система не должна работать. - 30005 - 30005 + admin_setup + redir__nomore_modules + No more modules to run... + Больше нет модулей для запуска + 31006 + 31006 0 core - admin_sql - my_processes - MySQL Processes - Процессы - 30005 - + admin_setup + error__file_needed + File does not exist: %s + Файл %s не существует + 31006 + 31006 0 core - admin_sql - my_backuptitle - MySQL %s Backup - Резервирование %s - 30005 - 30005 + admin_setup + error__file_missing + File does not exist: %s + Файл %s не существует + 31006 + 31006 0 core - admin_sql - my_manual - Manual Query - Запрос - 30005 - 30005 + admin_setup + error__file_chmod + File is not writeable: %s + Нельзя записать в файл %s + 31006 + 31006 0 core - admin_sql - my_sysvar - MySQL System Variables - Значения системных параметров - 30005 - 30005 + admin_setup + error__up_to_date + This application is already up-to-date + Приложение последней версии + 31006 + 31006 0 core - admin_sql - my_runtime - MySQL Runtime Information - Информация о MySQL процессе - 30005 - + admin_setup + error__cannot_init + Cannot initiate the set up class + Не удалось инициировать установочный класс + 31006 + 31006 0 core - admin_sql - my_sqlerror - MySQL Error - Ошибка - 30005 - 30005 + admin_setup + hooks_nofile + No hooks to install + Нет хуков для установки + 31006 + 31006 0 core - admin_sql - my_successfully - Executed Successfully
    ]]>
    - Выполнен
    ]]>
    - 30005 - 30005 + admin_setup + no_tasks_for_import + No tasks to import + Нет задач для добавления + 31006 + 31006 0
    core - admin_sql - my_manually - Fix Manually]]> - Исправить вручную]]> - 30005 - 30005 + admin_setup + no_bbcode_media + No bbcode or media tags to import + Нет bb-кодов и медиа-тегов для добавления + 31006 + 31006 0 core - admin_sql - manual_noquery - No queries were found to run - Не удалось найти запросы для выполнения - 30005 - + admin_setup + imported_no_help + No help files to import + Нет разделов помощи для добавления + 31006 + 31006 0 core - admin_sql - manual_invalid - This query appears to be invalid: - Неверный запрос: - 30005 - - 0 - - - core - admin_sql - manual_notallowed - Sorry, those queries are not allowed for your safety - К сожалению, данные запросы запрещены для исполнения - 30005 - - 0 - - - core - admin_sql - my_automatically - Fix Automatically]]> - Исправить автоматически]]> - 30005 - 30005 - 0 - - - core - admin_sql - manual_error - Error - Ошибка - 30005 - - 0 - - - core - admin_sql - manual_loginlogs - - К сожалению, вы не можете удалять или обновлять данные в этой таблице - 30005 - - 0 - - - core - admin_sql - my_si_rows - Rows]]> - Ряды]]> - 30005 - - 0 - - - core - admin_sql - my_si_data - Search Inded Table Data - Поиск данных - 30005 - - 0 - - - core - admin_sql - my_si_indexsize - MySQL Index Size]]> - Размер индекса]]> - 30005 - - 0 - - - core - admin_sql - my_si_datasize - Data Size]]> - Размер данных]]> - 30005 - - 0 - - - core - admin_sql - my_si_searchable - Searchable Applications - Приложения для поиска - 30005 - - 0 - - - core - admin_sql - my_si_clickrebuild - to rebuild this applications search index.]]> - для перестройки поискового индекса этих приложений]]> - 30005 - - 0 - - - core - admin_sql - my_simple_backup - Simple Backup]]> - Простое резервирование]]> - 30005 - - 0 - - - core - admin_sql - my_si_entries - Entries - Записей - 30005 - - 0 - - - core - admin_sql - my_run - Run Query - Выполнить - 30005 - - 0 - - - core - admin_sql - my_runnew - Run a New Query - Выполнить новый запрос - 30005 - - 0 - - - core - admin_sql - my_gzipcontent - GZIP Content? - GZIP? - 30005 - 30005 - 0 - - - core - admin_sql - my_gzipnotes - Compresses content if possible, but can timeout on larger databases - Сжимать содержимое при возможности. Для больших баз возможно прерывание процесса по таймауту. - 30005 - 30005 - 0 - - - core - admin_sql - my_skinnoness_notes - Will not produce insert rows for sessions, admin_sessions, captcha. - Не будет включать данные для таблиц сессий, администраторских сессий, captcha - 30005 - 30005 - 0 - - - core - admin_sql - my_skinnoness - Skip non essential data? - Пропустить служебную информацию? - 30005 - 30005 - 0 - - - core - admin_sql - my_iferror - (If you get an SQL error, try checking this) - (Если возникает ошибка SQL, попробуйте это) - 30005 - 30005 - 0 - - - core - admin_sql - my_backticks - Add backticks around the table name? - Добавить backticks (`) вокруг имен таблиц? - 30005 - 30005 - 0 - - - core - admin_sql - my_createtable - - - 30005 - 30005 - 0 - - - core - admin_sql - my_start_backup - Start MySQL Backup - Начать резервирование - 30005 - 30005 - 0 - - - core - admin_sql - my_simple_text - Once you have clicked the link below, please wait until your browser prompts you with a dialogue box. This may take some time depending on the size of the database you are backing up. - После нажатия ссылки, дождитесь пока браузер не выведет вам диалоговое окно. Это может занять какое-то время в зависимости от размера базы данных, которую вы резервируете. - 30005 - - 0 - - - core - admin_sql - my_results - Results: Manual Query - Результаты ручного запроса - 30005 - - 0 - - - core - admin_sql - my_tables - IP.Board MySQL Tables - MySQL таблицы IP.Board - 30005 - 30005 - 0 - - - core - admin_sql - my_table - Table - Таблица - 30005 - 30005 - 0 - - - core - admin_sql - my_export - Export - Экспорт - 30005 - 30005 - 0 - - - core - admin_sql - my_rows - Rows - Ряды - 30005 - - 0 - - - core - admin_sql - my_optimize - Optimize Selected Tables - Оптимизировать выбранные таблицы - 30005 - 30005 - 0 - - - core - admin_sql - my_checkall - Check All - Отметить все - 30005 - 30005 - 0 - - - core - admin_sql - my_repair - Repair Selected Tables - Восстановить выбранные таблицы - 30005 - - 0 - - - core - admin_sql - my_go - Go! - Выполнить - 30005 - 30005 - 0 - - - core - admin_sql - my_analyze - Analyze Selected Tables - Анализировать выбранные таблицы - 30005 - - 0 - - - core - admin_sql - my_check - Check Selected Tables - Проверить выбранные таблицы - 30005 - 30005 - 0 - - - core - admin_sql - my_manadvanced - Manual Query
    Advanced Users Only]]>
    - SQL-запрос - 30005 - 30005 - 0 -
    - - core - admin_sql - mssqlTitle - MSSQL %s Toolbox - MSSQL %s - 30005 - - 0 - - - core - admin_sql - mssqlTables - IP.Board MySQL Tables - IP.Board MSSQL таблицы - 30005 - - 0 - - - core - admin_sql - mssqlTableSize - Table Size - Размер таблицы - 30005 - - 0 - - - core - admin_sql - mssqlIndexSize - Index Size - Размер индекса - 30005 - - 0 - - - core - admin_sql - mssqlTotalSize - Totals - Всего - 30005 - - 0 - - - core - admin_sql - mssqlProcesses - SQL Processes - Процессы - 30005 - - 0 - - - core - admin_sql - mssqlRuntime - SQL Runtime Information - Статистика SQL - 30005 - - 0 - - - core - admin_sql - mssql_backupnav - MSSQL Database Backup - Резервная копия MSSQL - 30005 - + admin_setup + imported_x_help + Imported %s help files + Добавлено %s разделов помощи + 31006 + 31006 0 @@ -14979,68 +15519,648 @@ mssqlSysvar SQL System Variables Системные переменные SQL - 30005 - + 31006 + 31006 0 core admin_sql - mssql_sysvar - MSSQL System Variables - Системные переменные MSSQL - 30005 - + mssqlRuntime + SQL Runtime Information + Статистика SQL + 31006 + 31006 0 core admin_sql - mssql_runtime - MSSQL Runtime Information - Статистика MSSQL - 30005 - + mssqlProcesses + SQL Processes + Процессы + 31006 + 31006 0 core admin_sql - mssql_backuptitle - MSSQL %s Backup - Резерваная копия %s MSSQL - 30005 - + mssqlTotalSize + Totals + Всего + 31006 + 31006 0 core admin_sql - mssql_processes - MSSQL Processes - Процессы MSSQL - 30005 - + mssqlIndexSize + Index Size + Размер индекса + 31006 + 31006 0 core admin_sql - mssql_sqlerror - MSSQL Error - Ошибка MSSQL - 30005 - + mssqlTables + IP.Board MySQL Tables + IP.Board SQL таблицы + 31006 + 31006 0 core admin_sql - not_supported - Unsupported - Не поддерживается - 30011 - 30011 + mssqlTableSize + Table Size + Размер таблицы + 31006 + 31006 + 0 + + + core + admin_sql + mssqlTitle + MSSQL %s Toolbox + MSSQL %s + 31006 + 31006 + 0 + + + core + admin_sql + my_manadvanced + Manual Query
    Advanced Users Only]]>
    + SQL-запрос + 31006 + 31006 + 0 +
    + + core + admin_sql + my_analyze + Analyze Selected Tables + Анализировать выбранные таблицы + 31006 + 31006 + 0 + + + core + admin_sql + my_go + Go! + Выполнить + 31006 + 31006 + 0 + + + core + admin_sql + my_check + Check Selected Tables + Проверить выбранные таблицы + 31006 + 31006 + 0 + + + core + admin_sql + my_repair + Repair Selected Tables + Восстановить выбранные таблицы + 31006 + 31006 + 0 + + + core + admin_sql + my_optimize + Optimize Selected Tables + Оптимизировать выбранные таблицы + 31006 + 31006 + 0 + + + core + admin_sql + my_checkall + Check All + Отметить все + 31006 + 31006 + 0 + + + core + admin_sql + my_tables + IP.Board MySQL Tables + MySQL таблицы IP.Board + 31006 + 31006 + 0 + + + core + admin_sql + my_table + Table + Таблица + 31006 + 31006 + 0 + + + core + admin_sql + my_rows + Rows + Ряды + 31006 + 31006 + 0 + + + core + admin_sql + my_export + Export + Экспорт + 31006 + 31006 + 0 + + + core + admin_sql + my_runnew + Run a New Query + Выполнить новый запрос + 31006 + 31006 + 0 + + + core + admin_sql + my_results + Results: Manual Query + Результаты ручного запроса + 31006 + 31006 + 0 + + + core + admin_sql + my_run + Run Query + Выполнить + 31006 + 31006 + 0 + + + core + admin_sql + my_gzipcontent + GZIP Content? + GZIP? + 31006 + 31006 + 0 + + + core + admin_sql + my_gzipnotes + Compresses content if possible, but can timeout on larger databases + Сжимать содержимое при возможности. Для больших баз возможно прерывание процесса по таймауту. + 31006 + 31006 + 0 + + + core + admin_sql + my_skinnoness_notes + Will not produce insert rows for sessions, admin_sessions, captcha. + Не будет включать данные для таблиц сессий, администраторских сессий, captcha + 31006 + 31006 + 0 + + + core + admin_sql + my_skinnoness + Skip non essential data? + Пропустить служебную информацию? + 31006 + 31006 + 0 + + + core + admin_sql + my_iferror + (If you get an SQL error, try checking this) + (Если возникает ошибка SQL, попробуйте это) + 31006 + 31006 + 0 + + + core + admin_sql + my_start_backup + Start MySQL Backup + Начать резервирование + 31006 + 31006 + 0 + + + core + admin_sql + my_createtable + + + 31006 + 31006 + 0 + + + core + admin_sql + my_backticks + Add backticks around the table name? + Добавить backticks (`) вокруг имен таблиц? + 31006 + 31006 + 0 + + + core + admin_sql + my_simple_text + Once you have clicked the link below, please wait until your browser prompts you with a dialogue box. This may take some time depending on the size of the database you are backing up. + После нажатия ссылки, дождитесь пока браузер не выведет вам диалоговое окно. Это может занять какое-то время в зависимости от размера базы данных, которую вы резервируете. + 31006 + 31006 + 0 + + + core + admin_sql + my_si_clickrebuild + to rebuild this applications search index.]]> + для перестройки поискового индекса этих приложений]]> + 31006 + 31006 + 0 + + + core + admin_sql + my_simple_backup + Simple Backup]]> + Простое резервирование]]> + 31006 + 31006 + 0 + + + core + admin_sql + my_si_entries + Entries + Записей + 31006 + 31006 + 0 + + + core + admin_sql + my_si_searchable + Searchable Applications + Приложения для поиска + 31006 + 31006 + 0 + + + core + admin_sql + my_si_indexsize + MySQL Index Size]]> + Размер индекса]]> + 31006 + 31006 + 0 + + + core + admin_sql + my_si_rows + Rows]]> + Ряды]]> + 31006 + 31006 + 0 + + + core + admin_sql + my_si_datasize + Data Size]]> + Размер данных]]> + 31006 + 31006 + 0 + + + core + admin_sql + my_si_data + Search Inded Table Data + Поиск данных + 31006 + 31006 + 0 + + + core + admin_sql + manual_notallowed + Sorry, those queries are not allowed for your safety + К сожалению, данные запросы запрещены для исполнения + 31006 + 31006 + 0 + + + core + admin_sql + manual_loginlogs + + К сожалению, вы не можете удалять или обновлять данные в этой таблице + 31006 + 31006 + 0 + + + core + admin_sql + manual_invalid + This query appears to be invalid: + Неверный запрос: + 31006 + 31006 + 0 + + + core + admin_sql + manual_noquery + No queries were found to run + Не удалось найти запросы для выполнения + 31006 + 31006 + 0 + + + core + admin_sql + manual_error + Error + Ошибка + 31006 + 31006 + 0 + + + core + admin_sql + my_automatically + Fix Automatically]]> + Исправить автоматически]]> + 31006 + 31006 + 0 + + + core + admin_sql + my_manually + Fix Manually]]> + Исправить вручную]]> + 31006 + 31006 + 0 + + + core + admin_sql + my_manual + Manual Query + Запрос + 31006 + 31006 + 0 + + + core + admin_sql + my_sqlerror + MySQL Error + Ошибка + 31006 + 31006 + 0 + + + core + admin_sql + my_successfully + Executed Successfully
    ]]>
    + Выполнен
    ]]>
    + 31006 + 31006 + 0 +
    + + core + admin_sql + my_sysvar + MySQL System Variables + Значения системных параметров + 31006 + 31006 + 0 + + + core + admin_sql + my_runtime + MySQL Runtime Information + Информация о MySQL процессе + 31006 + 31006 + 0 + + + core + admin_sql + my_processes + MySQL Processes + Процессы + 31006 + 31006 + 0 + + + core + admin_sql + my_tooold + + К сожалению версия MySQL, установленная у вас ниже чем 3.23.21. Управление MySQL не доступно. Да и вообще система не должна работать. + 31006 + 31006 + 0 + + + core + admin_sql + my_backuptitle + MySQL %s Backup + Резервирование %s + 31006 + 31006 + 0 + + + core + admin_sql + my_backupnav + MySQL Database Backup + Бэкап базы MySQL + 31006 + 31006 + 0 + + + core + admin_sql + my_title + MySQL %s Toolbox + MySQL %s + 31006 + 31006 + 0 + + + core + admin_sql + my_noloc + + + 31006 + 31006 + 0 + + + core + admin_sql + my_cantdo + Sorry, we do not allow one or more of those queries. Please run them from a seperate database management tool outside of IP.Board. + К сожалению наша система не позволяет выполнять подобные запросы. Вы можете выполнить их, используя иные средства управления базой данных. + 31006 + 31006 + 0 + + + core + admin_sql + my_seltables + You must choose some tables to run this tool on! If not, that is just plain outright silly! + Необходимо выбрать таблицы, для которых будет запущен инструмент! + 31006 + 31006 + 0 + + + core + admin_sql + my_noloc_class + + + 31006 + 31006 + 0 + + + core + admin_sql + my_si_progress + search index rebuild in progress + обновление поискового индекса + 31006 + 31006 + 0 + + + core + admin_sql + my_processed + processed + обработано + 31006 + 31006 + 0 + + + core + admin_sql + my_si_complete + search index rebuild complete + обновление поискового индекса завершено + 31006 + 31006 + 0 + + + core + admin_sql + my_noapp + The application you selected does not appear to be installed. + Приложение, которое вы выбрали, не установлено в системе + 31006 + 31006 + 0 + + + core + admin_sql + query_executed_successfully + Query executed successfully + Запрос выполнен + 31006 + 31006 0 @@ -15049,3132 +16169,148 @@ not_supported_desc This tool is not supported for your SQL engine Эта утилита не поддерживается вашим SQL сервером. - 30011 - 30011 + 31006 + 31006 0 core - admin_system - sym_add_new_task - Add New Task - Добавить задачу - 30005 - + admin_sql + not_supported + Unsupported + Не поддерживается + 31006 + 31006 0 core - admin_system - sym_export_tasksxml - Export tasks.xml - Экспортировать tasks.xml - 30005 - + admin_sql + backup_tool_warning_text + If you have access to phpMyAdmin or a similar tool, we recommend that you use that instead of the ACP backup utility. + Если у вас есть доступ к phpMyAdmin или другим подобным инструментам, то мы рекомендуем для создания резервной копии воспользоваться ими. + 31006 + 31006 0 core - admin_system - sym_manage_languages - Manage Languages - Управление языками - 30005 - + admin_sql + backup_tool_warning_title + SQL Backup Warning + Предупреждение + 31006 + 31006 0 core - admin_system - sym_import_tasksxml - Import tasks.xml - Импортировать tasks.xml - 30005 - + admin_sql + resultprefix + Result: + Результат: + 31006 + 31006 0 core - admin_system - sym_view_word_packs - View Word Packs - Просмотр слов - 30005 - + admin_sql + view_schematic + Table: %s + Таблица: %s + 31006 + 31006 0 core - admin_system - sym_word_out_of_date_check - Outdated Strings - Устаревшие строки - 30005 - + admin_sql + view_indexes + Indexes + Индексы + 31006 + 31006 0 core - admin_system - sym_edit_language_pack_information - Edit Language Info - Настройки языка - 30005 - + admin_sql + view_structure + Fields + Поля + 31006 + 31006 0 core - admin_system - sym_add_new_language_entry - Add String - Добавить строку - 30005 - + admin_sql + crashed_table_ohnoes + + + 31006 + 31006 0 core - admin_system - sym_find - Find - Найти - 30005 - + admin_sql + mssql_backupnav + MSSQL Database Backup + Резервная копия MSSQL + 31006 + 31006 0 core - admin_system - sys_title - Title - Задача - 30005 - + admin_sql + mssql_backuptitle + MSSQL %s Backup + Резерваная копия %s MSSQL + 31006 + 31006 0 core - admin_system - sym_submit - Submit - Отправить - 30005 - + admin_sql + mssql_processes + MSSQL Processes + Процессы MSSQL + 31006 + 31006 0 core - admin_system - sys_options - Options - Действия - 30005 - + admin_sql + mssql_runtime + MSSQL Runtime Information + Статистика MSSQL + 31006 + 31006 0 core - admin_system - sys_task_run - Task Run - Задача - 30005 - + admin_sql + mssql_sysvar + MSSQL System Variables + Системные переменные MSSQL + 31006 + 31006 0 core - admin_system - sys_date_run - Date Run - Дата запуска - 30005 - - 0 - - - core - admin_system - sys_task_manager_logs - Task Manager Logs - Журнал менеджера задач - 30005 - - 0 - - - core - admin_system - sys_log_info - Log Info - Результаты запуска - 30005 - - 0 - - - core - admin_system - sys_last_5_run_tasks - Last 5 Run Tasks - Последние 5 запущенных задач - 30005 - - 0 - - - core - admin_system - sys_view_task_manager_logs - View Task Manager Logs - Просмотр журнала менеджера задач - 30005 - - 0 - - - core - admin_system - sys_view_logs_for_task - View logs for task - Просмотр журнала задачи - 30005 - - 0 - - - core - admin_system - sys_show_n_log_entries - n log entries]]> - n записей ]]> - 30005 - - 0 - - - core - admin_system - sys_view_logs - View Logs - Просмотр записей - 30005 - - 0 - - - core - admin_system - sys_delete_logs_for_task - Delete logs for task - Удаление записей задачи - 30005 - - 0 - - - core - admin_system - sys_delete_task_manager_logs - Delete Task Manager Logs - Удалить записи менеджера задач - 30005 - - 0 - - - core - admin_system - sys_delete_logs - DELETE Logs - УДАЛИТЬ записи - 30005 - - 0 - - - core - admin_system - sys_delete_logs_older_than_n_days - n days]]> - n дней]]> - 30005 - - 0 - - - core - admin_system - sys_monday - Monday - Понедельник - 30005 - - 0 - - - core - admin_system - sys_sunday - Sunday - Воскресенье - 30005 - - 0 - - - core - admin_system - sys_tuesday - Tuesday - Вторник - 30005 - - 0 - - - core - admin_system - sys_wednesday - Wednesday - Среда - 30005 - - 0 - - - core - admin_system - sys_thursday - Thursday - Четверг - 30005 - - 0 - - - core - admin_system - sys_friday - Friday - Пятница - 30005 - - 0 - - - core - admin_system - sys_saturday - Saturday - Суббота - 30005 - - 0 - - - core - admin_system - sys_on_day - On day - День - 30005 - - 0 - - - core - admin_system - sys_on - On - - 30005 - - 0 - - - core - admin_system - sys_at - At - - 30005 - - 0 - - - core - admin_system - sys_on_every_hour - On every hour - Каждый час - 30005 - - 0 - - - core - admin_system - sys_every_minute - Every minute - Каждую минуту - 30005 - - 0 - - - core - admin_system - sys_every - Every - Каждые - 30005 - - 0 - - - core - admin_system - sys_minutes - minutes - минут - 30005 - - 0 - - - core - admin_system - sys_minutes_past_the_first_availab - minutes past the first available hour - минут спустя первого доступного часа - 30005 - - 0 - - - core - admin_system - sys_this_is_the_php_file_that_is_r - This is the PHP file that is run when the task is run. - Это PHP файл, который будет запускаться при запуске задачи. - 30005 - - 0 - - - core - admin_system - sys_task_php_file_to_run - Task PHP File To Run - PHP файл задачи для запуска - 30005 - - 0 - - - core - admin_system - sys_task_application - Task Application - Задача приложения - 30005 - - 0 - - - core - admin_system - sys_task_short_description - Task Short Description - Краткое описание задачи - 30005 - - 0 - - - core - admin_system - sys_task_title - Task Title - Название задачи - 30005 - - 0 - - - core - admin_system - sys_hours - hours - часов - 30005 - - 0 - - - core - admin_system - sys_time_options - Time Options - Опции времени - 30005 - - 0 - - - core - admin_system - sys_choose_every_minute_to_run_eac - - - 30005 - - 0 - - - core - admin_system - sys_task_time_minutes - Task Time: Minutes - Время задачи: минуты - 30005 - - 0 - - - core - admin_system - sys_will_write_to_the_task_log_eac - Will write to the task log each time the task is run, not recommended for regular tasks run every few minutes. - При включенной опции все выполнения задач будут записаны в базу данных, не рекомендуется для основных задач, выполняемых каждые 5-10 минут. - 30005 - - 0 - - - core - admin_system - sys_enable_task_logging - Enable Task Logging - Включить запись журнала действий - 30005 - - 0 - - - core - admin_system - sys_choose_every_day_to_run_each_d_1 - - - 30005 - - 0 - - - core - admin_system - sys_task_time_month_day - Task Time: Month Day - Время задачи: день месяца - 30005 - - 0 - - - core - admin_system - sys_choose_every_day_to_run_each_d - - - 30005 - - 0 - - - core - admin_system - sys_task_time_week_day - Task Time: Week Day - Время задачи: день недели - 30005 - - 0 - - - core - admin_system - sys_choose_every_hour_to_run_each_ - - - 30005 - - 0 - - - core - admin_system - sys_task_time_hours - Task Time: Hours - Время задачи: часы - 30005 - - 0 - - - core - admin_system - sys_if_you_are_using_cron_you_migh - If you are using CRON, you might wish to disable this task from the internal manager. - Если вы используете CRON, вы должны отключить вызов этой задачи здесь. - 30005 - - 0 - - - core - admin_system - sys_enable_task - Enable Task? - Включить задачу? - 30005 - - 0 - - - core - admin_system - sys_if_set_to_yes_this_will_not_be - - - 30005 - - 0 - - - core - admin_system - sys_task_safe_mode - Task Safe Mode - Безопасный режим - 30005 - - 0 - - - core - admin_system - sys_this_is_used_to_call_a_task_wh - This is used to call a task where the ID of the task might change - Это слово используется для задания, у которого ID может измениться - 30005 - - 0 - - - core - admin_system - sys_task_key - Task Key - Ключ задачи - 30005 - - 0 - - - core - admin_system - sys_system_schedular - System Scheduler - Менеджер задач - 30005 - - 0 - - - core - admin_system - sys_next_run - Next Run - Следующий запуск - 30005 - - 0 - - - core - admin_system - sys_wday - WDay - День недели - 30005 - - 0 - - - core - admin_system - sys_mday - MDay - День месяца - 30005 - - 0 - - - core - admin_system - sys_hour - Hour - Час - 30005 - - 0 - - - core - admin_system - sys_min - Min - Минута - 30005 - - 0 - - - core - admin_system - sys_how_curl_to_use_in_a_cron - Show CURL to use in a cron - Показать строку CURL для запуска задачи - 30005 - - 0 - - - core - admin_system - sys_edit_task - Edit Task... - Изменить - 30005 - - 0 - - - core - admin_system - sys_run - Run - Запуск - 30005 - - 0 - - - core - admin_system - sys_delete_task - Delete Task... - Удалить - 30005 - - 0 - - - core - admin_system - sys_unlock_task - Unlock Task... - Разблокировать - 30005 - - 0 - - - core - admin_system - sys_date - Date - Дата - 30005 - - 0 - - - core - admin_system - sys_all_times_gmt_gmt_time_now_is - All times GMT. GMT time now is: - Время по Гринвичу: - 30005 - - 0 - - - core - admin_system - sys_view_details - View Details - Подробности - 30005 - - 0 - - - core - admin_system - sys_last_5_acp_log_in_attempts - Last 5 ACP Log in Attempts - Последние 5 попыток входа в Админцентр - 30005 - - 0 - - - core - admin_system - sys_log - Log - Журнал - 30005 - - 0 - - - core - admin_system - sys_status - Status - Состояние - 30005 - - 0 - - - core - admin_system - sys_name - Name - Имя - 30005 - - 0 - - - core - admin_system - sys_system_overview - System Overview - Обзор системы - 30005 - - 0 - - - core - admin_system - sys_ipboard_version - IP.Board Version - Версия IP.Board - 30005 - - 0 - - - core - admin_system - sys_php_version - PHP Version - Версия PHP - 30005 - - 0 - - - core - admin_system - sys_disabled_funcs - Disabled PHP Functions - Отключенные PHP функции - 30005 - - 0 - - - core - admin_system - sys_safe_mod - Safe Mode - Безопасный режим - 30005 - - 0 - - - core - admin_system - sys_current_load - Current Server Load - Текущая загрузка сервера - 30005 - - 0 - - - core - admin_system - sys_sys_software - System Software - Программное обеспечение сервера - 30005 - - 0 - - - core - admin_system - sys_total_mem - Total Server Memory - Общая память сервера - 30005 - - 0 - - - core - admin_system - sys_avail_mem - Available Server Memory - Доступная память сервера - 30005 - - 0 - - - core - admin_system - sys_duplicate_entries_will_not_be_ - Duplicate entries will not be overwritten but the default setting and other options will be updated. - Существующие настройки будут обновлены, другие — добавлены. - 30005 - - 0 - - - core - admin_system - sys_or_enter_the_filename_of_the_x - OR enter the filename of the xml.gz language pack]]> - ИЛИ введите название XML-архива]]> - 30005 - - 0 - - - core - admin_system - l_badfile - There was no language pack information in the file you uploaded - Информация о языковом пакете в загруженном файле не найдена - 30005 - 30005 - 0 - - - core - admin_system - sys_the_file_must_be_uploaded_into - - - 30005 - 30005 - 0 - - - core - admin_system - sys_import - Import - Импорт - 30005 - - 0 - - - core - admin_system - sys_upload_xml_language_file_from_ - Upload language pack from your computer - Загрузка XML-архива с языковыми настройками - 30005 - - 0 - - - core - admin_system - sys_import_language_xml - Import Language XML - Импортирование XML-файла - 30005 - - 0 - - - core - admin_system - sys_version - Version - Версия - 30005 - - 0 - - - core - admin_system - sys_sql_version - SQL Version - Версия SQL - 30005 - - 0 - - - core - admin_system - sys_select_the_application_languag - Select the application language files to import - Выберите языковой файл приложения для импорта - 30005 - - 0 - - - core - admin_system - sys_developers_language_cache_impo - - Инструменты разработчика - 30005 - - 0 - - - core - admin_system - sys_indev_export_go - Export - Экспорт - 30005 - - 0 - - - core - admin_system - sys_indev_export - Export language files to application directories - Экспортировать языковые файлы в директории приложения - 30005 - - 0 - - - core - admin_system - indev_lang_export_done - All language files exported to application directories - Все языковые файлы экспортированы в директории приложения - 30005 - 30005 - 0 - - - core - admin_system - lang_upload_too_large - %s.]]> - %s.]]> - 30005 - 30005 - 0 - - - core - admin_system - sys_this_will_examine_the_corecach - for {app}_language.php files and import them into the database.]]> - на наличие файлов {app}_language.php и импортирует их в базу данных.]]> - 30005 - - 0 - - - core - admin_system - lang_upload_other_error - An error occurred while attempting to upload the language pack. - В ходе загрузки языка произошла ошибка. - 30005 - 30005 - 0 - - - core - admin_system - language_list_title - Language - Название - 30005 - 30005 - 0 - - - core - admin_system - language_list_date - Date Example - Формат даты - 30005 - 30005 - 0 - - - core - admin_system - language_list_page_title - Localization Manager - Управление языками - 30005 - 30005 - 0 - - - core - admin_system - language_list_money - Currency Example - Формат валюты - 30005 - 30005 - 0 - - - core - admin_system - language_list_local - Locale - Локаль - 30005 - 30005 - 0 - - - core - admin_system - language_list_translate - Translate in Admin CP... - Перевести - 30005 - 30005 - 0 - - - core - admin_system - language_list_default - Default - По-умолчанию - 30005 - 30005 - 0 - - - core - admin_system - language_word_pack_go - Go - Отправить - 30005 - 30005 - 0 - - - core - admin_system - language_word_pack_edit - Edit word pack - Редактирование слов - 30005 - 30005 - 0 - - - core - admin_system - language_word_pack_current - Default Value - Значение по-умолчанию - 30005 - 30005 - 0 - - - core - admin_system - language_word_pack_new - New Value - Новое значение - 30005 - 30005 - 0 - - - core - admin_system - language_form_edit_title - Edit Language Pack Information - Редактирование языка - 30005 - 30005 - 0 - - - core - admin_system - language_form_edit_button - Save Changes - Сохранить - 30005 - 30005 - 0 - - - core - admin_system - language_word_pack_edited - Word pack updated - Слова обновлены - 30005 - 30005 - 0 - - - core - admin_system - language_form_edit_info - Language Pack Information


    You can configure basic language pack settings here

    ]]>
    - Настройки языка


    Здесь вы можете настроить основные параметры языкового пакета

    ]]>
    - 30005 - 30005 - 0 -
    - - core - admin_system - language_form_new_title - Create a new language pack - Создать новый язык - 30005 - 30005 - 0 - - - core - admin_system - language_form_new_button - Add this language - Добавить этот язык - 30005 - 30005 - 0 - - - core - admin_system - language_pack_created - Language pack created - Язык создан - 30005 - 30005 - 0 - - - core - admin_system - language_form_new_info - Language Pack Information


    You can configure basic language pack settings here

    ]]>
    - Настройки языка


    Здесь вы можете настроить основные параметры языкового пакета

    ]]>
    - 30005 - 30005 - 0 -
    - - core - admin_system - language_form_title - Language Title - Название языка - 30005 - 30005 - 0 - - - core - admin_system - language_form_locale - Language Locale - Локаль языка - 30005 - 30005 - 0 - - - core - admin_system - language_title_missing - Language title can not be blank - Название языка не может быть пустым - 30005 - 30005 - 0 - - - core - admin_system - language_locale_missing - Language locale can not be blank - Локаль языка не может быть пустой - 30005 - 30005 - 0 - - - core - admin_system - language_form_default - Default Language? - Использовать по-умолчанию - 30005 - 30005 - 0 - - - core - admin_system - language_pack_updated - Language pack information updated - Настройки языка обновлены - 30005 - 30005 - 0 - - - core - admin_system - language_word_revert - Language customization has been reverted - Изменения в языке отменены - 30005 - 30005 - 0 - - - core - admin_system - language_pack_name - Pack Name - Набор слов - 30005 - 30005 - 0 - - - core - admin_system - language_key - Key - Ключ - 30005 - 30005 - 0 - - - core - admin_system - language_default - Default Text - Текст по-умолчанию - 30005 - 30005 - 0 - - - core - admin_system - language_out_of_date_entries - Out of Date Entries - Устаревшие записи - 30005 - 30005 - 0 - - - core - admin_system - sy_devexport - Export Installer XML - Экспортировать XML установщика - 30005 - - 0 - - - core - admin_system - sy_devtemplate - Template HTML - Шаблон HTML - 30005 - - 0 - - - core - admin_system - sy_devemail - Email Templates - Шаблоны E-mail - 30005 - 30005 - 0 - - - core - admin_system - language_customized_entries - Customized Entries - Измененные записи - 30005 - 30005 - 0 - - - core - admin_system - sy_go - Go - Отправить - 30005 - - 0 - - - core - admin_system - language_total_entries - Total Entries - Всего записей - 30005 - 30005 - 0 - - - core - admin_system - sy_devcontent - Content Templates - Шаблоны содержания - 30005 - - 0 - - - core - admin_system - sy_devskin - Skin Set - Стиль - 30005 - - 0 - - - core - admin_system - sy_devfile - File Types - Типы файлов - 30005 - - 0 - - - core - admin_system - sy_devgroups - Groups - Группы - 30005 - - 0 - - - core - admin_system - sy_devpages - Pages - Страницы - 30005 - - 0 - - - core - admin_system - sy_devlogin - Log In Auth - Авторизация - 30005 - - 0 - - - core - admin_system - sy_devcomponents - Components - Компоненты - 30005 - - 0 - - - core - admin_system - sy_devtaks - Tasks - Задачи - 30005 - - 0 - - - core - admin_system - d_vtitle - IP.Board Diagnostics - Version Checker - Диагностика IP.Board - Проверка версии - 30005 - 30005 - 0 - - - core - admin_system - d_vnav - Version Check Results - Результаты проверки версии - 30005 - 30005 - 0 - - - core - admin_system - d_ptitle - IP.Board Diagnostics - Permission Checker - Диагностика IP.Board - Проверка прав доступа - 30005 - 30005 - 0 - - - core - admin_system - d_vinfo - Version Information - Информация о версии - 30005 - 30005 - 0 - - - core - admin_system - d_wfound - has whitespace at the beginning or end of the file - имеет пробелы в начале или конце файла - 30005 - 30005 - 0 - - - core - admin_system - d_wnav - Whitespace Check Results - Результаты проверки на пробелы - 30005 - 30005 - 0 - - - core - admin_system - d_wtitle - IP.Board Diagnostics - Whitespace Checker - Диагностика IP.Board - Проверка на пробелы - 30005 - 30005 - 0 - - - core - admin_system - d_pyes - is writable - имеет права на запись - 30005 - 30005 - 0 - - - core - admin_system - d_pno - The following file or folder is not writable - Не возможна запись в следующую директорию или файл - 30005 - - 0 - - - core - admin_system - d_p404 - We could not find the file or folder - Файл или директория не найдены - 30005 - - 0 - - - core - admin_system - d_pnav - Permission Check Results - Результаты проверки прав доступа - 30005 - - 0 - - - core - admin_system - d_ititle - IP.Board Diagnostics - Database Index Checker - Диагностика IP.Board - Проверка индексов базы данных - 30005 - - 0 - - - core - admin_system - d_wclear - All files appear to be in good order - Похоже, что все файлы в порядке - 30005 - 30005 - 0 - - - core - admin_system - d_iupload - You must upload: /install/sql/%s_tables.php from the IP.Board installation package for your current version to run this tool. - Вы должны загрузить: /install/sql/%s_tables.php из дистрибутива IP.Board вашей текущей версии для запуска этого инструмента. - 30005 - - 0 - - - core - admin_system - d_iexecuted - Executed Successfully
    ]]>
    - Успешно выполнен
    ]]>
    - 30005 - - 0 -
    - - core - admin_system - d_ierror - SQL Error: - Ошибка SQL: - 30005 - - 0 - - - core - admin_system - d_idomanual - - - 30005 - 30005 - 0 - - - core - admin_system - d_isorry - Sorry, those queries are not allowed for your safety. - Извините, эти запросы запрещены в целях безопасности. - 30005 - - 0 - - - core - admin_system - d_inav - Database Index Results - Результаты проверки индексов базы данных - 30005 - - 0 - - - core - admin_system - d_ierrors - WARNING: ERRORS FOUND - ВНИМАНИЕ: НАЙДЕНЫ ОШИБКИ - 30005 - - 0 - - - core - admin_system - d_inoprocess - There was an error and we could not process your %s_tables.php file. Please reupload it. - Произошла ошибка и ваш файл %s_tables.php не был обработан. Пожалуйста, перезагрузите его. - 30005 - - 0 - - - core - admin_system - d_ifixall_link - Would you like us to attempt to fix them for you? - Хотите попытаться исправить все в автоматическом режиме ? - 30005 - - 0 - - - core - admin_system - d_icongrats - There were no errors found with your database indexes. - Ошибок в индексах базы данных не найдено. - 30005 - 30005 - 0 - - - core - admin_system - d_ifixall - We have found problems with your database, and have listed them below. - В базе данных обнаружены ошибки. - 30005 - - 0 - - - core - admin_system - d_itable - Table - Таблица - 30005 - - 0 - - - core - admin_system - d_inoerrors - No Errors Found - Ошибок не найдено - 30005 - - 0 - - - core - admin_system - d_iindex - Index Name - Название индекса - 30005 - - 0 - - - core - admin_system - d_inauto - Click here to fix this table's indexes]]> - Нажмите здесь для исправления индексов этой таблицы ]]> - 30005 - - 0 - - - core - admin_system - d_iauto - Click here to fix this table]]> - Нажмите здесь для исправления таблицы ]]> - 30005 - 30005 - 0 - - - core - admin_system - d_ifix - Fix - Исправить - 30005 - - 0 - - - core - admin_system - d_iresults - Database Index Results - Результаты проверки индексов базы данных - 30005 - - 0 - - - core - admin_system - d_iman - , or you can run the following queries manually: - или вы можете выполнить следующие запросы вручную. - 30005 - - 0 - - - core - admin_system - d_dtitle - IP.Board Diagnostics - Database Structure Checker - Диагностика IP.Board - Проверка структуры базы данных - 30005 - 30005 - 0 - - - core - admin_system - d_dnav - Database Structure Results - Результат проверки структуры базы данных - 30005 - 30005 - 0 - - - core - admin_system - d_dstatus - Status - Состояние - 30005 - 30005 - 0 - - - core - admin_system - d_dtbl - Table - Таблица - 30005 - 30005 - 0 - - - core - admin_system - d_atotal - Total Physical Memory - Всего физической памяти - 30005 - 30005 - 0 - - - core - admin_system - d_aavail - Available Physical Memory - Доступно физической памяти - 30005 - 30005 - 0 - - - core - admin_system - d_aphpinfo - PHP INFO - PHP INFO - 30005 - 30005 - 0 - - - core - admin_system - d_atitle - IP.Board Diagnostics - Диагностика IP.Board - 30005 - 30005 - 0 - - - core - admin_system - d_dfix - Fix - Исправить - 30005 - 30005 - 0 - - - core - admin_system - d_aoff - OFF - ВЫКЛЮЧЕН - 30005 - 30005 - 0 - - - core - admin_system - ll_noid - No log for that ID found. - Не найдено записей для этого ID. - 30005 - 30005 - 0 - - - core - admin_system - d_aunable - Unable to obtain process information]]> - Не возможно получить информацию о процессе ]]> - 30005 - 30005 - 0 - - - core - admin_system - d_anoinfo - No Information]]> - Нет данных ]]> - 30005 - 30005 - 0 - - - core - admin_system - d_aon - ON - ВКЛЮЧЕН - 30005 - 30005 - 0 - - - core - admin_system - w_nav - Welcome - Добро пожаловать - 30005 - - 0 - - - core - admin_system - ll_title - ACP Log-in Attempts - Попытки входа в админцентр - 30005 - 30005 - 0 - - - core - admin_system - q_html - Posting HTML - Отправка HTML - 30005 - 30005 - 0 - - - core - admin_system - q_html_info -
    Warning!
    Allowing a member to post HTML is a very dangerous thing, you should not enable this functionality on any group that will use it maliciously. Although IPB tries to filter some of the more harmful content, it is NOT foolproof and this tag CAN be used to steal session cookies, redirect members and destroy the topic view layout.
    Invision Power Board and Invision Power Services will not be held responsible for any misfortune that occurs from the usage of this tag.

    Use it wisely!]]>
    -
    Внимание!
    Разрешение пользователям использовать HTML очень опасно, не следует разрешать это делать группам, которые могут использовать это в плохих целях. Хотя IPB пытается удалить вредоносное содержимое, это НЕ является гарантией безопасности. Это может быть использовано для кражи сессионных куки, перенаправления на другую страницу или для нарушения вывода страницы темы.
    Invision Power Board и Invision Power Services не несут никакой ответственности за не правильное использование этой опции.

    Используйте с умом!]]>
    - 30005 - 30005 - 0 -
    - - core - admin_system - ll_msg - The red cross indicates an error when logging in and a green tick indicates a successful log in.]]> - Красный крест показывает ошибку входа, а зеленая галочка показывает успешный вход.]]> - 30005 - 30005 - 0 - - - core - admin_system - q_multi_info - For example, if one of your multi-moderation actions allowed the topic to be moved and you do not allow move permissions the moderator will still be able to use the topic multi-moderation and move the topic.]]> - Например, если одно из Ваших правил мультимодерации, настроено на перемещение тем, но Вы запретили в настройках одного из модераторов перемещать темы, данный модератор всё равно сможет перемещать темы при помощи функции мультимодерации.]]> - 30005 - - 0 - - - core - admin_system - q_multi - Moderators and Topic Multi-Moderation - Модерация и мультимодерация тем - 30005 - - 0 - - - core - admin_system - q_upload - Upload Permissions - Права доступа загрузки файлов - 30005 - - 0 - - - core - admin_system - q_upload_info -
  • You have entered a reasonable numerical figure in the groups 'Max upload file size' field.
  • You have edited the forum permissions for this group and checked the 'Upload' checkbox. This allows you to control in which forums this group can upload to.

    Warning!
    If, when posting, no post is made and you are returned back to the board index, disable this groups upload by entering 0 into this field. This will turn off the mutli-part form the uploads use.]]> -
  • Вы ввели достаточное значение в поле «Дисковая квота на хранение всех файлов (включая личные сообщения и сообщения в темах)»
  • Вы изменили права доступа к форумам и отметили поле "Загрузка"


  • Внимание!
    Если при добавлении сообщения вас перебрасывает на главную страницу, укажите значение 0 для этого поля. Это приведет к отключению формы загрузки.]]> - 30005 - - 0 -
    - - core - admin_system - q_bots_info - Invision Power can take advantage of separating the bots from the real users and you can then ensure that they are getting adequate information to help with search engine ranking.

    Warning!
    Invision Power Board recognises the search engine spiders and crawlers by their user_agent. Please keep in mind that it's not impossible to fake this and a malicious user could pose as a harmless search engine spider.
    This is not a problem as by default the spider will have guest permissions, but it's something that you should keep in mind when allowing permissions.

    Also keep in mind that most search engines do NOT search dynamically generated website for fear of crashing the server with the constant reading of topics.]]>
    - Форум может отделять роботов от реальных пользователей и предоставлять им только необходимую информацию, тем самым повышая форум в выдаче поисковика.

    Внимание!
    Invision Power Board распознает поисковых роботов по их user_agent. Так как его легко подделать, злоумышленник может выдать себя за поискового робота.
    Имейте это ввиду при изменении прав поисковых роботов.

    Так же имейте ввиду, что многие поисковые системы не индексируют динамический создаваемый сайт, чтобы не нарушать работу сервера постоянными запросами.]]>
    - 30005 - 30005 - 0 -
    - - core - admin_system - q_bots - What are Search Engine Spiders? - Кто такие Поисковые роботы ? - 30005 - 30005 - 0 - - - core - admin_system - q_promote - Group Promotion - Продвижение группы - 30005 - - 0 - - - core - admin_system - q_captcha - Registration CAPTCHA - CAPTHCA при регистрации - 30005 - 30005 - 0 - - - core - admin_system - q_captcha_info -
    When enabled, a random 6 digit numerical string is generated and shown in a graphical format (to prevent advanced bots from reading the source page). The user must enter this string exactly when registering or the account will not be created.]]>
    -
    6 произвольных цифр показывается в виде картинки. Пользователь должен точно ввести показанные цифры для продолжения регистрации.

    Это поможет защитить форум от атак и рассылки нежелательных писем.]]>
    - 30005 - 30005 - 0 -
    - - core - admin_system - q_promote_info -
    Many administrators use this feature to set up a 'Senior Members' group with more functionality (such as a longer edit time, larger post uploads) and even allow access to otherwise hidden forums - when your members have made enough posts, they are promoted to this group allowing you to intice more posting and allow for a more restrictive set of permissions for newcomers.

    Warning!
    Use this feature carefully and always check the information before proceeding.
    It is possible to advance to an Admin group - you have been warned.]]>
    -
    -Многие администраторы используют эту опцию для выделения "опытных" пользователей с набором расширенных прав (таких как больший объем загружаемых файлов, более длинное время редактирования) и разрешения доступа к скрытым форумам. -

    Внимание!
    -Используйте эту функцию внимательно и проверьте настройки перед продолжением.
    Возможно продвижение в группу Администраторов!]]>
    - 30005 - - 0 -
    - - core - admin_system - q_bulk - Bulk Emailing - Массовая рассылка - 30005 - 30005 - 0 - - - core - admin_system - q_components - Components Menu System - Система меню компонентов - 30005 - 30005 - 0 - - - core - admin_system - q_components_info - Menu text is the actual menu item text. IE: Tools and Settings.
    Menu URL is the final part of the URL. No need to add the full URL or the 'section=components&act=blog' part unless this is a redirect. IE: code={code}
    Menu Redirect if yes, complete the 'act={}§ion={}&do={}' part of the URL in the URL box or the redirect may not work.
    Perm Bit and Perm Lang is the ACP restriction perm bit. Entries: add, remove, edit, rebuild, recount, recache all have language entries. Any other bit names will require adding into the Perm Bit Language box. Eg: If the perm bit was 'tools', you may enter 'Allow TOOLS Access'.
    ]]>
    - Текст меню это текст которы будет отображаться с меню.Например, Настройки.
    -URL пункта - это последнаяя часть ссылки. Здесь не требуется задавать полную ссылку.IE: code={code}
    -Перенаправление. Заполните 'act={}§ion={}&do={}' в URL иначе перенаправление не сработает. -
    Ключ доступа и языка служат для доступа к меню в Админцентре. Например, если ключ 'tools', то текст может быть 'Разрешить доступ к TOOLS'.]]>
    - 30005 - 30005 - 0 -
    - - core - admin_system - s_deep_bad - The scanner has not been run in over a month]]> - Сканер не запускали более месяца.]]> - 30005 - - 0 - - - core - admin_system - q_nohelp - No help information is available for this function at present. - Нет дополнительно информации для этой функции в данное время. - 30005 - - 0 - - - core - admin_system - s_deep - IP.Board Executables Deep Scan - Глубокое сканирование - 30005 - - 0 - - - core - admin_system - s_runtool - Run Tool Now - Запустить - 30005 - - 0 - - - core - admin_system - s_htaccess - IP.Board ACP .htaccess Protection - Защита файлом .htaccess Админцентра - 30005 - - 0 - - - core - admin_system - s_learnmore - Learn More - Подробнее - 30005 - - 0 - - - core - admin_system - s_deep_good - The scanner was last run: ]]> - Сканер последний раз запускали:]]> - 30005 - - 0 - - - core - admin_system - s_htaccess_good - IP.Board has located an ACP .htaccess file.]]> - IPB обнаружил .htaccess файл в директории админцентра.]]> - 30005 - - 0 - - - core - admin_system - s_htaccess_bad - IP.Board cannot locate an ACP .htaccess file.]]> - IPB не обнаружил .htaccess файл в директории админцентра.]]> - 30005 - - 0 - - - core - admin_system - s_toggle - Toggle Now - Переключить - 30005 - - 0 - - - core - admin_system - q_bulk_info - Overview
    Bulk emailing allows you to target a specific section of your community or email all your registered members.

    Settings
    You can choose which user groups will receive the email and elect to override the user set 'Allow Admin Emails' function. It is NOT recommended that you do override this however.
    Allowed Tags
    Although the email system sends the mail via BCC to preserve system resources, you can add in dynamic content with the following tags.
    {board_name} will return the name of your board
    {reg_total} will return the total number of registered members
    {total_posts} will return the total number of posts
    {busy_count} will return the most number of online users
    {busy_time} will return the date of the most online users
    {board_url} will return the URL to the board

    As the email is sent via BCC, it is not possible to include the members username, password or other user profile data.]]>
    - Обзор
    -Массовая рассылка позволяет отправлять всем пользователям форума или отдельным группам. -

    Настройки
    -Вы можете выбрать какие группы пользователей получат письма. Письма можно отправлять в обход опции "Получать письма от администрации", однако делать это не рекомендуется. -
    Разрешены теги
    -Хотя почтовая система рассылает письма через BCC для экономии системных ресурсов, вы можете добавлять динамическое содержимое с помощью некоторых тегов.
    -{board_name} - будет заменено на название вашего форума;
    {reg_total} - вернет число зарегистрированных пользователей;
    {total_posts} - общее число сообщений;
    {busy_count} - максимум пользователей онлайн;
    {busy_time} - время, когда был зарегистрирован максимум пользователей;
    {board_url} - ссылка на форум -

    -Так как письма рассылаются через BCC, нет возможности включить в письма имя пользователя, пароль или другие данные профиля.]]>
    - 30005 - 30005 - 0 -
    - - core - admin_system - s_phpcgi - IP.Board PHP/CGI .htaccess Protection - Защита PHP/CGI файлом .htaccess - 30005 - - 0 - - - core - admin_system - s_phpcgi_bad - IP.Board cannot locate any .htaccess files.]]> - IPB не обнаружил какие-либо .htaccess файлы.]]> - 30005 - - 0 - - - core - admin_system - s_phpcgi_good - IP.Board has located some .htaccess files.]]> - IPB обнаружил .htaccess файлы.]]> - 30005 - - 0 - - - core - admin_system - s_conf - - - 30005 - - 0 - - - core - admin_system - s_conf_good - "conf_global.php" is NOT writeable.]]> - "conf_global.php" не доступен для записи.]]> - 30005 - - 0 - - - core - admin_system - s_completeform - You must complete the form. Please try again. - Вы должны полностью заполнить форму. - 30005 - - 0 - - - core - admin_system - s_rename_bad - The admin directory has not been renamed.]]> - Директория админцентра не переименована.]]> - 30005 - - 0 - - - core - admin_system - s_rename_good - The admin directory HAS been renamed.]]> - Директория админцентра ПЕРЕИМЕНОВАНА.]]> - 30005 - - 0 - - - core - admin_system - s_rename - - Название директории Админцентра - 30005 - - 0 - - - core - admin_system - s_conf_bad - "conf_global.php" is writeable.]]> - "conf_global.php" доступен для записи.]]> - 30005 - - 0 - - - core - admin_system - s_htaccess_nav - ACP .htaccess - .htaccess Админцентра - 30005 - - 0 - - - core - admin_system - s_written - Authentication files written - Файл аутентификации записан - 30005 - - 0 - - - core - admin_system - s_allex_bad - %s of %s files are rating 7/10 or more.
    If you're unsure of their origin, please investigate them immediately.]]>
    - %s из %s файлов имеют рейтинг 7/10 или более. Если вы не уверены в происхождении этих файлов, то немедленно просмотрите их.]]> - 30005 - - 0 -
    - - core - admin_system - s_allex_good - If you're unsure of their origin, please investigate them immediately.]]> - Глубокое сканирование обнаружило %s файлов. Если вы не уверены в происхождении этих файлов, то немедленно просмотрите их. - 30005 - - 0 - - - core - admin_system - s_allex - All Executables - Все исполняемые - 30005 - - 0 - - - core - admin_system - s_deep_nav - Deep Scan - Глубокое сканирование - 30005 - - 0 - - - core - admin_system - s_skipped - Skipped %s, could not write into it... - Пропущен %s, запись в него невозможна... - 30005 - - 0 - - - core - admin_system - s_written_to - Written .htaccess to %s... - .htaccess записан в %s... - 30005 - - 0 - - - core - admin_system - s_chmod_bad - Could not complete the process.
    Please use your FTP client to change the CHMOD value of 'conf_global.php' to 0444.]]>
    - Невозможно выполнить операцию.
    Воспользуйтесь FTP клиентом и измените атрибуты доступа к файлу 'conf_global.php' на 0444.]]>
    - 30005 - - 0 -
    - - core - admin_system - s_chmod_good - CHMOD change completed. - Изменение прав доступа к файлам завершено. - 30005 - - 0 - - - core - admin_system - s_rename_nav - Rename the admin directory - Переименовать директорию Админцентра - 30005 - - 0 - - - core - admin_system - s_virus_good - The unauthorized file checker was last run: ]]> - Сканер на подозрительные файлы последний раз запускали:]]> - 30005 - - 0 - - - core - admin_system - s_virus_bad - The unauthorized file checker has not been run in over a week]]> - Сканер на подозрительные файлы не запускали более недели.]]> - 30005 - - 0 - - - core - admin_system - s_virus - IP.Board Unauthorized File Checker - Сканер подозрительных файлов - 30005 - - 0 - - - core - admin_system - s_virus_none - No Suspicious Files Detected - Подозрительных файлов не обнаружено. - 30005 - - 0 - - - core - admin_system - s_virus_located - If you're unsure of their origin, please remove them immediately.]]> - Если вы не уверены в их происхождении, то немедленно удалите их.]]> - 30005 - - 0 - - - core - admin_system - s_virus_nolocated - Please scan regularly to ensure that your system is secure.]]> - Пожалуйста, выполняйте проверку как можно чаще, чтобы содержать систему в безопасности.]]> - 30005 - - 0 - - - core - admin_system - t_removed - Selected Task Logs Removed - Выбранное записи удалены - 30005 - - 0 - - - core - admin_system - s_virus_found - Suspicious Files Detected - Обнаружены подозрительные файлы - 30005 - - 0 - - - core - admin_system - t_deleted - Task deleted - Задача удалена - 30005 - - 0 - - - core - admin_system - t_nodelete - You are unable to delete this task. - Вам не позволено удалять эту задачу. - 30005 - - 0 - - - core - admin_system - t_noid - No ID was passed. Please try again. - Не указан ID. Пожалуйста, попробуйте снова. - 30005 - - 0 - - - core - admin_system - t_locknomore - Task lock removed - Задача разблокирована - 30005 - - 0 - - - core - admin_system - t_notask - No task to run. - Нет задачи для запуска - 30005 - - 0 - - - core - admin_system - t_locked - This task was locked at %s and cannot be ran until unlocked. - Эта задача была заблокирована в %s и не может быть запущена до разблокирования. - 30005 - - 0 - - - core - admin_system - t_disabled - This task has been disabled. Please enable the task before running it. - Эта задача была отключена. Пожалуйста, включите задачу перед запуском. - 30005 - - 0 - - - core - admin_system - t_nolocate - Cannot locate: %s/tasks/%s - Не возможно найти: %s/tasks/%s - 30005 - - 0 - - - core - admin_system - t_ran - Task ran successfully - Задача успешно запущена - 30005 - - 0 - - - core - admin_system - t_saved - Task Saved Successfully - Задача успешно сохранена - 30005 - - 0 - - - core - admin_system - t_enterfile - You must enter a filename for the task to run. - Вы должны ввести имя PHP файла запуска задачи - 30005 - - 0 - - - core - admin_system - t_edited - Task Edited Successfully - Задача успешно изменена - 30005 - - 0 - - - core - admin_system - t_entertitle - You must enter a task title. - Вы должны ввести название задачи. - 30005 - - 0 - - - core - admin_system - t_noedit - You are unable to edit this task. - Вам не позволено изменять эту задачу. - 30005 - - 0 - - - core - admin_system - t_create - Create New Task - Создать новую задачу - 30005 - - 0 - - - core - admin_system - t_creating - Creating New Task - Создание новой задачи - 30005 - - 0 - - - core - admin_system - t_minute - Every Minute - Каждую минуту - 30005 - - 0 - - - core - admin_system - t_hour - Every Hour - Каждый час - 30005 - - 0 - - - core - admin_system - t_dayweek - Every Week Day - Каждый день недели - 30005 - - 0 - - - core - admin_system - t_daymonth - Every Day of the Month - Каждый день месяца - 30005 - - 0 - - - core - admin_system - t_am - am - am - 30005 - - 0 - - - core - admin_system - t_midday - Midday - Полдень - 30005 - - 0 - - - core - admin_system - t_midnight - 0 - Midnight - 0 - Полночь - 30005 - - 0 - - - core - admin_system - t_pm - pm - pm - 30005 - 30005 - 0 - - - core - admin_system - t_monday - Monday - Понедельник - 30005 - - 0 - - - core - admin_system - t_tuesday - Tuesday - Вторник - 30005 - - 0 - - - core - admin_system - t_sunday - Sunday - Воскресенье - 30005 - - 0 - - - core - admin_system - t_adding - Adding Task - Добавление задачи - 30005 - - 0 - - - core - admin_system - t_saturday - Saturday - Суббота - 30005 - - 0 - - - core - admin_system - t_friday - Friday - Пятница - 30005 - - 0 - - - core - admin_system - t_thursday - Thursday - Четверг - 30005 - - 0 - - - core - admin_system - t_wednesday - Wednesday - Среда - 30005 - - 0 - - - core - admin_system - t_editing - Editing Task: %s - Изменение задачи: %s - 30005 - - 0 - - - core - admin_system - t_lockedcaps - (LOCKED) - (ЗАБЛОКИРОВАНА) - 30005 - - 0 - - - core - admin_system - t_disabledcaps - (DISABLED) - (ОТКЛЮЧЕНА) - 30005 - - 0 - - - core - admin_system - t_import_single - Import a task - Импортировать задачу - 30005 - - 0 - - - core - admin_system - t_exported - All tasks have been exported to the xml folder for their application - Все задачи были экспортированы в xml и размещены в директориях приложений - 30005 - - 0 - - - core - admin_system - t_export_single - Export task - Экспортировать - 30005 - - 0 - - - core - admin_system - t_inserted - %s tasks added, %s updated - %s заданий добавлено, %s обновлено - 30005 - - 0 - - - core - admin_system - t_noupdate - No task information to update - Нет информации для обновления - 30005 - - 0 - - - core - admin_system - t_import404 - %s could not be found. Please check the file and try again. - %s не найден. Пожалуйста, проверьте файл и попробуйте снова. - 30005 - - 0 - - - core - admin_system - upload_task_xml - Upload a task.xml file - Загрузить tasks.xml файл - 30005 - - 0 - - - core - admin_system - upload_task_dupe - If the task already exists it will be updated - Если задача уже существует, она будет обновлена - 30005 - - 0 - - - core - admin_system - t_simport_success - The task has been imported successfully - Задача успешно импортирована - 30005 - - 0 - - - core - admin_system - l_removed - Language pack removed - Язык удален - 30005 - 30005 - 0 - - - core - admin_system - l_packreq - Word Pack is a required field - Набор слов - это обязательное поле - 30005 - 30005 - 0 - - - core - admin_system - task_import_button - Upload - Загрузить - 30005 - - 0 - - - core - admin_system - tupload_failed - The task upload failed. - Загрузка задачи не удалась. - 30005 - - 0 - - - core - admin_system - l_updated - Language entry update - Обновление записи языка - 30005 - 30005 - 0 - - - core - admin_system - l_added - New language entry added - Новая запись языка добавлена - 30005 - 30005 - 0 - - - core - admin_system - l_textreq - Default Text is a required fields - Текст по-умолчанию - это обязательное поле - 30005 - 30005 - 0 - - - core - admin_system - l_keyreq - Word Key is a required field - Ключевое слово - это обязательное поле - 30005 - 30005 - 0 - - - core - admin_system - l_addnewfull - Add New Entry


    You can add a new entry to the word pack here.

    ]]>
    - Добавление новой записи


    Здесь вы можете добавить новую запись в список слов.

    ]]>
    - 30005 - 30005 - 0 -
    - - core - admin_system - l_addnew - Add new entry - Добавить - 30005 - 30005 - 0 - - - core - admin_system - l_edit - Edit entry - Редактировать запись - 30005 - 30005 - 0 - - - core - admin_system - l_addthis - Add this entry - Добавить эту запись - 30005 - 30005 + admin_sql + mssql_sqlerror + MSSQL Error + Ошибка MSSQL + 31006 + 31006 0 @@ -18183,288 +16319,58 @@ l_editentry Edit Entry


    You can change the information for a word pack entry here.

    ]]>
    Редактирование записи


    Здесь вы можете изменить запись из набора слов .

    ]]>
    - 30005 - 30005 + 31006 + 31006 0
    core admin_system - l_xmlexport - Export Application: - Экспорт языка приложения - 30005 - 30005 + l_edit + Edit entry + Редактировать запись + 31006 + 31006 0 core admin_system - l_noopen - Could not find the file to open at: - Не возможно найти файл для открытия: - 30005 - 30005 + l_addthis + Add this entry + Добавить эту запись + 31006 + 31006 0 core admin_system - l_xmlexportfull - Export Language Pack - Экспорт языка - 30005 - 30005 + l_addnewfull + Add New Entry


    You can add a new entry to the word pack here.

    ]]>
    + Добавление новой записи


    Здесь вы можете добавить новую запись в список слов.

    ]]>
    + 31006 + 31006 0
    core admin_system - l_savechanges - Save Changes - Сохранить - 30005 - 30005 + l_updated + Language entry update + Обновление записи языка + 31006 + 31006 0 core admin_system - l_updatedcount - Updated %s language bits, inserted %s language bits. - %s записей обновлено, %s добавлено. - 30005 - 30005 - 0 - - - core - admin_system - l_nofile - No upload file was found and no filename was specified. - Не найден загруженный файл и не указано имя файла. - 30005 - 30005 - 0 - - - core - admin_system - l_nowrite - Could not write to - Невозможна запись в - 30005 - 30005 - 0 - - - core - admin_system - l_copied - Language pack copied - Язык скопирован - 30005 - 30005 - 0 - - - core - admin_system - l_noapp - You did not select any applications. - Вы не выбрали ни одного приложения - 30005 - 30005 - 0 - - - core - admin_system - language_list_copy - Copy language pack... - Скопировать язык - 30005 - 30005 - 0 - - - core - admin_system - language_is_rtl - Display right to left? - Отображать справа налево - 30005 - 30005 - 0 - - - core - admin_system - l_nowords - There were no language strings to import - Нет записей для импорта - 30005 - 30005 - 0 - - - core - admin_system - lang_search_results - Search Results - Результаты поиска - 30005 - 30005 - 0 - - - core - admin_system - l_wordpack_prefix - In word pack: - В наборе слов: - 30005 - 30005 - 0 - - - core - admin_system - l_remove_pack - Delete... - Удалить - 30005 - 30005 - 0 - - - core - admin_system - language_wordpack_removed - The word pack has been removed - Набор слов удален - 30005 - 30005 - 0 - - - core - admin_system - language_word_removed - The word has been removed - Слово удалено - 30005 - 30005 - 0 - - - core - admin_system - chckr_fix - Fix - Исправить - 30006 - 30006 - 0 - - - core - admin_system - chckr_status - Status - Состояние - 30006 - 30006 - 0 - - - core - admin_system - chckr_table - Table - Таблица - 30006 - 30006 - 0 - - - core - admin_system - last_5_version_history - Version History (Last 5) - История обновлений (последние 5) - 30006 - 30006 - 0 - - - core - admin_system - system_processes - System Processes - Процессы системы - 30006 - - 0 - - - core - admin_system - starting_admin_import - Starting Admin import... - Запуск импорта - 30006 - - 0 - - - core - admin_system - cannot_delete_default_lang - You cannot delete the default language pack - Вы не можете удалить языковой пакет, использующийся по-умолчанию - 30006 - 30006 - 0 - - - core - admin_system - lang_reimport_done - Language Re-Import Done - Повторное импортирование языка завершено - 30006 - 30006 - 0 - - - core - admin_system - importing_x_langs - : Importing %s languages... - : Импортирование %s языков... - 30006 - 30006 - 0 - - - core - admin_system - run_task_now - Run task now -- id: - Запусть задачу сейчас -- id: - 30006 - - 0 - - - core - admin_system - rebuild_lang_from_xml - Rebuild From XML... - Обновить из XML - 30006 - + l_addnew + Add new entry + Добавить + 31006 + 31006 0 @@ -18473,318 +16379,78 @@ l_keydup The word key you entered is already in this word pack, please use a different key. Ключ уже существует в наборе. Пожалуйста, используйте другое слово. - 30007 - 30007 + 31006 + 31006 0 core admin_system - sys_loaded_ext - Loaded Extensions - Загруженные дополнения - 30008 - 30008 + l_added + New language entry added + Новая запись языка добавлена + 31006 + 31006 0 core admin_system - language_list_recache - Recache all... - Перекешировать все... - 30008 - 30008 + l_textreq + Default Text is a required fields + Текст по умолчанию - это обязательное поле + 31006 + 31006 0 core admin_system - language_recache_done - Recache complete - Кеширование завершено - 30008 - 30008 + l_removed + Language pack removed + Язык удален + 31006 + 31006 0 core admin_system - language_list_translate_ext - Translate Externally... - Перевести через файлы - 30011 - 30011 + l_packreq + Word Pack is a required field + Набор слов - это обязательное поле + 31006 + 31006 0 core admin_system - logindetail_get - GET Data (URL Data) - Данные GET (данные из URL) - 30011 - 30011 + l_keyreq + Word Key is a required field + Ключевое слово - это обязательное поле + 31006 + 31006 0 core admin_system - logindetail_success - Success - Успешно - 30011 - 30011 + tupload_failed + The task upload failed. + Загрузка задачи не удалась. + 31006 + 31006 0 core admin_system - logindetail_post - POST Data (Form Data) - Данные POST (данные формы) - 30011 - 30011 - 0 - - - core - admin_system - logindetail_time - Log in Time - Время входа - 30011 - 30011 - 0 - - - core - admin_system - logindetail_ip - IP Address - IP адрес - 30011 - 30011 - 0 - - - core - admin_system - logindetail_username - Username - Имя пользователя - 30011 - 30011 - 0 - - - core - admin_system - logindetail_basic - Basics - Основные - 30011 - 30011 - 0 - - - core - admin_system - ext_translation_detected - here to go there now.
    You will not be able to start a new session until you finish the current one.]]>
    - сюда чтобы вернуться к ней.
    Вы не можете начинать новый перевод, пока не завершите старый.]]>
    - 30011 - 30011 - 0 -
    - - core - admin_system - ext_all_killed - Translation Session Removed - Сессия перевода удалена - 30011 - 30011 - 0 - - - core - admin_system - ext_tbl_submit - Import Selected Files - Импортировать выбранные файлы - 30011 - 30011 - 0 - - - core - admin_system - ext_tbl_db - Last DB Update - Последнее изменение в базе - 30011 - 30011 - 0 - - - core - admin_system - ext_tbl_local - Last Local Edit - Последнее локальное изменение - 30011 - 30011 - 0 - - - core - admin_system - ext_title_for - External Translation For - Перевод для - 30011 - 30011 - 0 - - - core - admin_system - ext_recache - recache this set to view the changes throughout the board.]]> - перекешировать для того, чтобы увидеть изменения на форуме.]]> - 30011 - 30011 - 0 - - - core - admin_system - ext_top_title - External File Translation - Перевод через файлы - 30011 - 30011 - 0 - - - core - admin_system - ext_top_desc - Before editing, please set your text editor to save files as UTF-8 regardless of the character set your board uses.]]> - Перед редактированием настройте в вашем текстовом редакторе кодировку UTF-8, потому что форум использует ее.]]> - 30011 - 30011 - 0 - - - core - admin_system - ext_button_finish - Finish And Remove - Завершить и удалить - 30011 - 30011 - 0 - - - core - admin_system - ext_button_unselect - Unselect All - Снять все отметки - 30011 - 30011 - 0 - - - core - admin_system - ext_button_selectall - Select All - Выбрать все - 30011 - 30011 - 0 - - - core - admin_system - ext_button_smodified - Select Modified - Выбрать измененные - 30011 - 30011 - 0 - - - core - admin_system - ext_tbl_file - File - Файл - 30011 - 30011 - 0 - - - core - admin_system - ext_file_written - Imported %s (%s added entries, %s updated) - Импортировано %s (%s добавленных записей, %s обновленных) - 30011 - 30011 - 0 - - - core - admin_system - ext_no_selected_files - You did not select any files to import! - Вы не выбрали ни одного файла для импортирования! - 30011 - 30011 - 0 - - - core - admin_system - ext_no_translate_files - Could not locate a valid translate session. This could be because there are no files in the translate directory anymore - Невозможно найти корректную сессию перевода. Это могло пройзойти, потому что там нет файлов для перевода. - 30011 - 30011 - 0 - - - core - admin_system - ext_chmod_translate_dir - - Сделайте, чтобы PHP могло записывать данные в директорию /translate/. CHMOD 777. - 30011 - 30011 - 0 - - - core - admin_system - perm_check_results - Permissions Check Results - Результаты проверки прав - 30011 - 30011 - 0 - - - core - admin_system - ext_no_translate_dir - root forum directory (the same directory that contains your 'initdata.php' file and 'admin' folder). Please make sure PHP has write permissions into this directory. CHMOD 0777 if in doubt.]]> - Пожалуйста, создайте директорию /translate/ в корневой директории форума. И сделайте права CHMOD на нее 0777. - 30011 - 30011 + t_simport_success + The task has been imported successfully + Задача успешно импортирована + 31006 + 31006 0 @@ -18793,1827 +16459,5333 @@ l_nolangbits There were no language bits for that language pack В этом языковом пакете нет фраз. - 30012 - 30012 + 31006 + 31006 0 core - admin_templates - ss_hiddentoggled - Visibility toggled. Note: hiding from the public drop down still allows access via direct URL and via user agent mapping. To fully restrict access please edit the settings and restrict by member group. - Видимость переключена. Примечание: скрытие стиля из списка не запрещает просматривать форум в этом стиле при указании ID стиля в URL, он так же будет доступен и пользователям, попадающим под user agent. Для полного запрета использования стиля необходимо изменить настройки пользовательских групп. - 30005 - + admin_system + task_import_button + Upload + Загрузить + 31006 + 31006 0 core - admin_templates - ss_canttoggle - You cannot toggle the visibility of a default skin - Базовый стиль не может быть скрыт - 30005 - + admin_system + upload_task_xml + Upload a task.xml file + Загрузить tasks.xml файл + 31006 + 31006 0 core - admin_templates - ss_minify_desc - This will remove whitespace and comments to reduce filesize. Changes will take affect next time you recache this skin. - Будут удалены пробелы и комментарии для уменьшения размера файла. Изменения вступят в силу при следующем перекешировании стиля. - 30005 - + admin_system + upload_task_dupe + If the task already exists it will be updated + Если задача уже существует, она будет обновлена + 31006 + 31006 0 core - admin_templates - ss_minify - Compress Cached CSS? - Сжимать кешированные CSS? - 30005 - + admin_system + t_exported + All tasks have been exported to the xml folder for their application + Все задачи были экспортированы в xml и размещены в директориях приложений + 31006 + 31006 0 core - admin_templates - ss_hidden - This set is hidden from the public drop down. Click to make visible - Стиль не отображается в списке стилей. Сделать его видимым. - 30005 - + admin_system + t_export_single + Export task + Экспортировать + 31006 + 31006 0 core - admin_templates - ss_not_hidden - This set is NOT hidden from the public drop down. Click to hide - Стиль отображается в списке стилей. Скрыть его. - 30005 - + admin_system + t_import_single + Import a task + Импортировать задачу + 31006 + 31006 0 core - admin_templates - ss_defaultdone - Skin set made default - Стиль отмечен как основной. - 30005 - + admin_system + t_inserted + %s tasks added, %s updated + %s заданий добавлено, %s обновлено + 31006 + 31006 0 core - admin_templates - tt_ss_of_off - Click to make this set the default set for this output engine - Отметить стиль как основной для данного формата вывода. - 30005 - + admin_system + t_lockedcaps + (LOCKED) + (ЗАБЛОКИРОВАНА) + 31006 + 31006 0 core - admin_templates - sk_cleanup_templates_exp - - Инструмент позволяет очистить базу от старых и потерянных шаблонов, которые больше не используются в системе. - 30005 - + admin_system + t_import404 + %s could not be found. Please check the file and try again. + %s не найден. Пожалуйста, проверьте файл и попробуйте снова. + 31006 + 31006 0 core - admin_templates - sk_run_tool - Run Tool + admin_system + t_noupdate + No task information to update + Нет информации для обновления + 31006 + 31006 + 0 + + + core + admin_system + t_editing + Editing Task: %s + Изменение задачи: %s + 31006 + 31006 + 0 + + + core + admin_system + t_disabledcaps + (DISABLED) + (ОТКЛЮЧЕНА) + 31006 + 31006 + 0 + + + core + admin_system + t_saturday + Saturday + Суббота + 31006 + 31006 + 0 + + + core + admin_system + t_adding + Adding Task + Добавление задачи + 31006 + 31006 + 0 + + + core + admin_system + t_friday + Friday + Пятница + 31006 + 31006 + 0 + + + core + admin_system + t_tuesday + Tuesday + Вторник + 31006 + 31006 + 0 + + + core + admin_system + t_wednesday + Wednesday + Среда + 31006 + 31006 + 0 + + + core + admin_system + t_thursday + Thursday + Четверг + 31006 + 31006 + 0 + + + core + admin_system + t_monday + Monday + Понедельник + 31006 + 31006 + 0 + + + core + admin_system + t_midday + Midday + Полдень + 31006 + 31006 + 0 + + + core + admin_system + t_am + am + am + 31006 + 31006 + 0 + + + core + admin_system + t_pm + pm + pm + 31006 + 31006 + 0 + + + core + admin_system + t_sunday + Sunday + Воскресенье + 31006 + 31006 + 0 + + + core + admin_system + t_dayweek + Every Week Day + Каждый день недели + 31006 + 31006 + 0 + + + core + admin_system + t_daymonth + Every Day of the Month + Каждый день месяца + 31006 + 31006 + 0 + + + core + admin_system + t_midnight + 0 - Midnight + 0 - Полночь + 31006 + 31006 + 0 + + + core + admin_system + t_enterfile + You must enter a filename for the task to run. + Вы должны ввести имя PHP файла запуска задачи + 31006 + 31006 + 0 + + + core + admin_system + t_edited + Task Edited Successfully + Задача успешно изменена + 31006 + 31006 + 0 + + + core + admin_system + t_saved + Task Saved Successfully + Задача успешно сохранена + 31006 + 31006 + 0 + + + core + admin_system + t_noedit + You are unable to edit this task. + Вам не позволено изменять эту задачу. + 31006 + 31006 + 0 + + + core + admin_system + t_create + Create New Task + Создать новую задачу + 31006 + 31006 + 0 + + + core + admin_system + t_creating + Creating New Task + Создание новой задачи + 31006 + 31006 + 0 + + + core + admin_system + task_edit_title + Editing Task: %s + Редактирование задачи: %s + 31006 + 31006 + 0 + + + core + admin_system + edittask_button + Edit Task + Изменить + 31006 + 31006 + 0 + + + core + admin_system + t_minute + Every Minute + Каждую минуту + 31006 + 31006 + 0 + + + core + admin_system + t_hour + Every Hour + Каждый час + 31006 + 31006 + 0 + + + core + admin_system + t_nolocate + Cannot locate: %s/tasks/%s + Не возможно найти: %s/tasks/%s + 31006 + 31006 + 0 + + + core + admin_system + t_entertitle + You must enter a task title. + Вы должны ввести название задачи. + 31006 + 31006 + 0 + + + core + admin_system + s_virus_nolocated + Please scan regularly to ensure that your system is secure.]]> + Пожалуйста, выполняйте проверку как можно чаще, чтобы содержать систему в безопасности.]]> + 31006 + 31006 + 0 + + + core + admin_system + t_removed + Selected Task Logs Removed + Выбранное записи удалены + 31006 + 31006 + 0 + + + core + admin_system + t_nodelete + You are unable to delete this task. + Вам не позволено удалять эту задачу. + 31006 + 31006 + 0 + + + core + admin_system + t_deleted + Task deleted + Задача удалена + 31006 + 31006 + 0 + + + core + admin_system + t_locknomore + Task lock removed + Задача разблокирована + 31006 + 31006 + 0 + + + core + admin_system + t_noid + No ID was passed. Please try again. + Не указан ID. Пожалуйста, попробуйте снова. + 31006 + 31006 + 0 + + + core + admin_system + t_notask + No task to run. + Нет задачи для запуска + 31006 + 31006 + 0 + + + core + admin_system + t_disabled + This task has been disabled. Please enable the task before running it. + Эта задача была отключена. Пожалуйста, включите задачу перед запуском. + 31006 + 31006 + 0 + + + core + admin_system + t_locked + This task was locked at %s and cannot be ran until unlocked. + Эта задача была заблокирована в %s и не может быть запущена до разблокирования. + 31006 + 31006 + 0 + + + core + admin_system + t_ran + Task ran successfully + Задача успешно запущена + 31006 + 31006 + 0 + + + core + admin_system + s_virus_bad + The unauthorized file checker has not been run in over a week]]> + Сканер на подозрительные файлы не запускали более недели.]]> + 31006 + 31006 + 0 + + + core + admin_system + s_virus + IP.Board Unauthorized File Checker + Сканер подозрительных файлов + 31006 + 31006 + 0 + + + core + admin_system + s_virus_found + Suspicious Files Detected + Обнаружены подозрительные файлы + 31006 + 31006 + 0 + + + core + admin_system + s_virus_none + No Suspicious Files Detected + Подозрительных файлов не обнаружено. + 31006 + 31006 + 0 + + + core + admin_system + s_virus_located + If you're unsure of their origin, please remove them immediately.]]> + Если вы не уверены в их происхождении, то немедленно удалите их.]]> + 31006 + 31006 + 0 + + + core + admin_system + s_skipped + Skipped %s, could not write into it... + Пропущен %s, запись в него невозможна... + 31006 + 31006 + 0 + + + core + admin_system + s_deep_nav + Deep Scan + Глубокое сканирование + 31006 + 31006 + 0 + + + core + admin_system + s_allex + All Executables + Все исполняемые + 31006 + 31006 + 0 + + + core + admin_system + s_allex_good + If you're unsure of their origin, please investigate them immediately.]]> + Глубокое сканирование обнаружило %s файлов. Если вы не уверены в происхождении этих файлов, то немедленно просмотрите их. + 31006 + 31006 + 0 + + + core + admin_system + s_allex_bad + %s of %s files are rating 7/10 or more.
    If you're unsure of their origin, please investigate them immediately.]]>
    + %s из %s файлов имеют рейтинг 7/10 или более. Если вы не уверены в происхождении этих файлов, то немедленно просмотрите их.]]> + 31006 + 31006 + 0 +
    + + core + admin_system + s_virus_good + The unauthorized file checker was last run: ]]> + Сканер на подозрительные файлы последний раз запускали:]]> + 31006 + 31006 + 0 + + + core + admin_system + s_written_to + Written .htaccess to %s... + .htaccess записан в %s... + 31006 + 31006 + 0 + + + core + admin_system + s_completeform + You must complete the form. Please try again. + Вы должны полностью заполнить форму. + 31006 + 31006 + 0 + + + core + admin_system + s_written + Authentication files written + Файл аутентификации записан + 31006 + 31006 + 0 + + + core + admin_system + s_htaccess_nav + ACP .htaccess + .htaccess Админцентра + 31006 + 31006 + 0 + + + core + admin_system + s_rename_nav + Rename the admin directory + Переименовать директорию Админцентра + 31006 + 31006 + 0 + + + core + admin_system + s_chmod_good + CHMOD change completed. + Изменение прав доступа к файлам завершено. + 31006 + 31006 + 0 + + + core + admin_system + s_chmod_bad + Could not complete the process.
    Please use your FTP client to change the CHMOD value of 'conf_global.php' to 0444.]]>
    + Невозможно выполнить операцию.
    Воспользуйтесь FTP клиентом и измените атрибуты доступа к файлу 'conf_global.php' на 0444.]]>
    + 31006 + 31006 + 0 +
    + + core + admin_system + s_rename_bad + The admin directory has not been renamed.]]> + Директория админцентра не переименована.]]> + 31006 + 31006 + 0 + + + core + admin_system + s_conf + + + 31006 + 31006 + 0 + + + core + admin_system + s_conf_good + "conf_global.php" is NOT writeable.]]> + "conf_global.php" не доступен для записи.]]> + 31006 + 31006 + 0 + + + core + admin_system + s_conf_bad + "conf_global.php" is writeable.]]> + "conf_global.php" доступен для записи.]]> + 31006 + 31006 + 0 + + + core + admin_system + s_rename + + Название директории Админцентра + 31006 + 31006 + 0 + + + core + admin_system + s_rename_good + The admin directory HAS been renamed.]]> + Директория админцентра ПЕРЕИМЕНОВАНА.]]> + 31006 + 31006 + 0 + + + core + admin_system + s_toggle + Toggle Now + Переключить + 31006 + 31006 + 0 + + + core + admin_system + s_phpcgi + IP.Board PHP/CGI .htaccess Protection + Защита PHP/CGI файлом .htaccess + 31006 + 31006 + 0 + + + core + admin_system + s_phpcgi_good + IP.Board has located some .htaccess files.]]> + IPB обнаружил .htaccess файлы.]]> + 31006 + 31006 + 0 + + + core + admin_system + s_phpcgi_bad + IP.Board cannot locate any .htaccess files.]]> + IPB не обнаружил какие-либо .htaccess файлы.]]> + 31006 + 31006 + 0 + + + core + admin_system + q_nohelp + No help information is available for this function at present. + Нет дополнительно информации для этой функции в данное время. + 31006 + 31006 + 0 + + + core + admin_system + s_deep + IP.Board Executables Deep Scan + Глубокое сканирование + 31006 + 31006 + 0 + + + core + admin_system + s_deep_bad + The scanner has not been run in over a month]]> + Сканер не запускали более месяца.]]> + 31006 + 31006 + 0 + + + core + admin_system + s_runtool + Run Tool Now Запустить - 30005 - + 31006 + 31006 0 core - admin_templates - sk_cleanup_title - Clean Up Tools - Инструменты очистки - 30005 - + admin_system + s_deep_good + The scanner was last run: ]]> + Сканер последний раз запускали:]]> + 31006 + 31006 0 core - admin_templates - sk_cleanup_templates - Clean Up Templates Database - Очистка базы данных - 30005 - + admin_system + s_learnmore + Learn More + Подробнее + 31006 + 31006 0 core - admin_templates - tt_ss_of - This is the default set for this output engine - Этот стиль отмечен как основной для данного формата вывода. - 30005 - + admin_system + s_htaccess + IP.Board ACP .htaccess Protection + Защита файлом .htaccess Админцентра + 31006 + 31006 0 core - admin_templates - templates_NO_SUCH_TEMPLATE - We could not find the template bit you were attempting to edit. Reload the form and try again. - Система не смогла найти шаблон, который вы пытаетесь изменить. Попробуйте обновить форму и попробовать снова. - 30005 - + admin_system + s_htaccess_good + IP.Board has located an ACP .htaccess file.]]> + IPB обнаружил .htaccess файл в директории админцентра.]]> + 31006 + 31006 0 core - admin_templates - templates_TEMPLATE_EXISTS - The template bit name already exists in this group. Please give the template a different name. - Шаблон с таким именем уже существует в данной группе. - 30005 - + admin_system + s_htaccess_bad + IP.Board cannot locate an ACP .htaccess file.]]> + IPB не обнаружил .htaccess файл в директории админцентра.]]> + 31006 + 31006 0 core - admin_templates - templates_SYNTAX_INCORRECT - There is a syntax error in the template, usually caused by PHP code not properly formed. Please correct the error and hit save again. - В шаблоне обнаружена ошибка синтаксиса. Проверьте правильность содержимого шаблона и попробуйте сохранить его снова. - 30005 - + admin_system + q_components_info + Menu text is the actual menu item text. IE: Tools and Settings.
    Menu URL is the final part of the URL. No need to add the full URL or the 'section=components&act=blog' part unless this is a redirect. IE: code={code}
    Menu Redirect if yes, complete the 'act={}§ion={}&do={}' part of the URL in the URL box or the redirect may not work.
    Perm Bit and Perm Lang is the ACP restriction perm bit. Entries: add, remove, edit, rebuild, recount, recache all have language entries. Any other bit names will require adding into the Perm Bit Language box. Eg: If the perm bit was 'tools', you may enter 'Allow TOOLS Access'.
    ]]>
    + Текст меню это текст которы будет отображаться с меню.Например, Настройки.
    +URL пункта - это последнаяя часть ссылки. Здесь не требуется задавать полную ссылку.IE: code={code}
    +Перенаправление. Заполните 'act={}§ion={}&do={}' в URL иначе перенаправление не сработает. +
    Ключ доступа и языка служат для доступа к меню в Админцентре. Например, если ключ 'tools', то текст может быть 'Разрешить доступ к TOOLS'.]]>
    + 31006 + 31006 0
    core - admin_templates - tool_template_clean_desc - Result: %s cache entries removed, %s template entries removed - Результат: удалено %s кешей и %s шаблонов - 30005 - + admin_system + q_components + Components Menu System + Система меню компонентов + 31006 + 31006 0 core - admin_templates - tool_css_clean_run - CSS Database Cleanup Performed - Очистка CSS выполнена - 30005 - + admin_system + q_captcha + Registration CAPTCHA + CAPTHCA при регистрации + 31006 + 31006 0 core - admin_templates - tool_template_clean_run - Template Database Cleanup Performed - Очистка шаблонов выполнена - 30005 - 30005 + admin_system + q_captcha_info +
    When enabled, a random 6 digit numerical string is generated and shown in a graphical format (to prevent advanced bots from reading the source page). The user must enter this string exactly when registering or the account will not be created.]]>
    +
    6 произвольных цифр показывается в виде картинки. Пользователь должен точно ввести показанные цифры для продолжения регистрации.

    Это поможет защитить форум от атак и рассылки нежелательных писем.]]>
    + 31006 + 31006 0
    core - admin_templates - tool_css_clean_desc - Result: %s cache entries removed, %s CSS entries removed - Результат: удалено %s кешей и %s CSS - 30005 - + admin_system + q_bulk_info + Overview
    Bulk emailing allows you to target a specific section of your community or email all your registered members.

    Settings
    You can choose which user groups will receive the email and elect to override the user set 'Allow Admin Emails' function. It is NOT recommended that you do override this however.
    Allowed Tags
    Although the email system sends the mail via BCC to preserve system resources, you can add in dynamic content with the following tags.
    {board_name} will return the name of your board
    {reg_total} will return the total number of registered members
    {total_posts} will return the total number of posts
    {busy_count} will return the most number of online users
    {busy_time} will return the date of the most online users
    {board_url} will return the URL to the board

    As the email is sent via BCC, it is not possible to include the members username, password or other user profile data.]]>
    + Обзор
    +Массовая рассылка позволяет отправлять всем пользователям форума или отдельным группам. +

    Настройки
    +Вы можете выбрать какие группы пользователей получат письма. Письма можно отправлять в обход опции "Получать письма от администрации", однако делать это не рекомендуется. +
    Разрешены теги
    +Хотя почтовая система рассылает письма через BCC для экономии системных ресурсов, вы можете добавлять динамическое содержимое с помощью некоторых тегов.
    +{board_name} - будет заменено на название вашего форума;
    {reg_total} - вернет число зарегистрированных пользователей;
    {total_posts} - общее число сообщений;
    {busy_count} - максимум пользователей онлайн;
    {busy_time} - время, когда был зарегистрирован максимум пользователей;
    {board_url} - ссылка на форум +

    +Так как письма рассылаются через BCC, нет возможности включить в письма имя пользователя, пароль или другие данные профиля.]]>
    + 31006 + 31006 0
    core - admin_templates - sk_cleanup_css_exp - - Инструмент позволяет очистить систему от потерянных и старых CSS, которые уже не используются - 30005 - + admin_system + q_bulk + Bulk Emailing + Массовая рассылка + 31006 + 31006 0 core - admin_templates - sk_cleanup_css - Clean Up CSS Database - Очистка CSS - 30005 - + admin_system + q_promote_info +
    Many administrators use this feature to set up a 'Senior Members' group with more functionality (such as a longer edit time, larger post uploads) and even allow access to otherwise hidden forums - when your members have made enough posts, they are promoted to this group allowing you to intice more posting and allow for a more restrictive set of permissions for newcomers.

    Warning!
    Use this feature carefully and always check the information before proceeding.
    It is possible to advance to an Admin group - you have been warned.]]>
    +
    +Многие администраторы используют эту опцию для выделения "опытных" пользователей с набором расширенных прав (таких как больший объем загружаемых файлов, более длинное время редактирования) и разрешения доступа к скрытым форумам. +

    Внимание!
    +Используйте эту функцию внимательно и проверьте настройки перед продолжением.
    Возможно продвижение в группу Администраторов!]]>
    + 31006 + 31006 0
    core - admin_templates - tool_cache_clean_desc - Result: %s css cache files removed, %s template cache files removed - Результат: удалено %s кешей css, %s кешей шаблонов - 30005 - + admin_system + q_promote + Group Promotion + Продвижение группы + 31006 + 31006 0 core - admin_templates - tool_cache_clean_run - Cache File Cleanup Performed - Очистка файлов кеша выполнена - 30005 - + admin_system + q_upload_info +
  • You have entered a reasonable numerical figure in the groups 'Max upload file size' field.
  • You have edited the forum permissions for this group and checked the 'Upload' checkbox. This allows you to control in which forums this group can upload to.

    Warning!
    If, when posting, no post is made and you are returned back to the board index, disable this groups upload by entering 0 into this field. This will turn off the mutli-part form the uploads use.]]> +
  • Вы ввели достаточное значение в поле «Дисковая квота на хранение всех файлов (включая личные сообщения и сообщения в темах)»
  • Вы изменили права доступа к форумам и отметили поле "Загрузка"


  • Внимание!
    Если при добавлении сообщения вас перебрасывает на главную страницу, укажите значение 0 для этого поля. Это приведет к отключению формы загрузки.]]> + 31006 + 31006 0
    core - admin_templates - sk_clean_caches - Clean File Caches For: - Очистить кеш файлы: - 30005 - + admin_system + q_upload + Upload Permissions + Права доступа загрузки файлов + 31006 + 31006 0 core - admin_templates - sk_clean_caches_cb_css - CSS Files - CSS файлы - 30005 - + admin_system + q_bots_info + Invision Power can take advantage of separating the bots from the real users and you can then ensure that they are getting adequate information to help with search engine ranking.

    Warning!
    Invision Power Board recognises the search engine spiders and crawlers by their user_agent. Please keep in mind that it's not impossible to fake this and a malicious user could pose as a harmless search engine spider.
    This is not a problem as by default the spider will have guest permissions, but it's something that you should keep in mind when allowing permissions.

    Also keep in mind that most search engines do NOT search dynamically generated website for fear of crashing the server with the constant reading of topics.]]>
    + Форум может отделять роботов от реальных пользователей и предоставлять им только необходимую информацию, тем самым повышая форум в выдаче поисковика.

    Внимание!
    Invision Power Board распознает поисковых роботов по их user_agent. Так как его легко подделать, злоумышленник может выдать себя за поискового робота.
    Имейте это ввиду при изменении прав поисковых роботов.

    Так же имейте ввиду, что многие поисковые системы не индексируют динамический создаваемый сайт, чтобы не нарушать работу сервера постоянными запросами.]]>
    + 31006 + 31006 0
    core - admin_templates - sk_clean_caches_cb_tem - Template Files - Файлы шаблона - 30005 - + admin_system + q_bots + What are Search Engine Spiders? + Кто такие Поисковые роботы ? + 31006 + 31006 0 core - admin_templates - sk_revert_customizations - Revert all CSS and Template Customizations... - Отменить все изменения CSS и шаблонов - 30005 - + admin_system + q_multi_info + For example, if one of your multi-moderation actions allowed the topic to be moved and you do not allow move permissions the moderator will still be able to use the topic multi-moderation and move the topic.]]> + Например, если одно из Ваших правил мультимодерации, настроено на перемещение тем, но Вы запретили в настройках одного из модераторов перемещать темы, данный модератор всё равно сможет перемещать темы при помощи функции мультимодерации.]]> + 31006 + 31006 0 core - admin_templates - sk_revert_templates - template customizations - изменений шаблонов - 30005 - + admin_system + q_multi + Moderators and Topic Multi-Moderation + Модерация и мультимодерация тем + 31006 + 31006 0 core - admin_templates - sk_revert_title - Reverting Customizations for: - Отмена изменений для: - 30005 - + admin_system + q_html_info +
    Warning!
    Allowing a member to post HTML is a very dangerous thing, you should not enable this functionality on any group that will use it maliciously. Although IPB tries to filter some of the more harmful content, it is NOT foolproof and this tag CAN be used to steal session cookies, redirect members and destroy the topic view layout.
    Invision Power Board and Invision Power Services will not be held responsible for any misfortune that occurs from the usage of this tag.

    Use it wisely!]]>
    +
    Внимание!
    Разрешение пользователям использовать HTML очень опасно, не следует разрешать это делать группам, которые могут использовать это в плохих целях. Хотя IPB пытается удалить вредоносное содержимое, это НЕ является гарантией безопасности. Это может быть использовано для кражи сессионных куки, перенаправления на другую страницу или для нарушения вывода страницы темы.
    Invision Power Board и Invision Power Services не несут никакой ответственности за не правильное использование этой опции.

    Используйте с умом!]]>
    + 31006 + 31006 0
    core - admin_templates - sk_revert_desc - Please select which customizations to remove. The default template, CSS, and replacement items will be restored once the customizations have been removed. There is no undo. - Выберите изменения для удаления. После удаления будут восстановлены шаблоны и стили по-умолчанию. Это действие нельзя отменить. - 30005 - + admin_system + q_html + Posting HTML + Отправка HTML + 31006 + 31006 0 core - admin_templates - sk_revert_replacements - replacement customizations - изменений макросов - 30005 - + admin_system + w_nav + Welcome + Добро пожаловать + 31006 + 31006 0 core - admin_templates - sk_revert_css - CSS customizations - изменений CSS - 30005 - + admin_system + ll_msg + The red cross indicates an error when logging in and a green tick indicates a successful log in.]]> + Красный крест показывает ошибку входа, а зеленая галочка показывает успешный вход.]]> + 31006 + 31006 0 core - admin_templates - ie_replace_added - %s replacement(s) imported - %s макросов импортировано - 30005 - 30005 + admin_system + ll_title + ACP Log-in Attempts + Попытки входа в админцентр + 31006 + 31006 0 core - admin_templates - cs_nav2 - Manage CSS in - Управление CSS в - 30005 - 30005 + admin_system + d_aunable + Unable to obtain process information]]> + Не возможно получить информацию о процессе ]]> + 31006 + 31006 0 core - admin_templates - cs_nav1 - - Управление стилями и шаблонами - 30005 - 30005 + admin_system + ll_noid + No log for that ID found. + Не найдено записей для этого ID. + 31006 + 31006 0 core - admin_templates - sk_revert_button - Revert Customizations - Отменить изменения - 30005 - + admin_system + d_aon + ON + ВКЛЮЧЕН + 31006 + 31006 0 core - admin_templates - ss_revertcomplete - Revert Complete - Отмена завершена - 30005 - + admin_system + d_aoff + OFF + ВЫКЛЮЧЕН + 31006 + 31006 0 core - admin_templates - ie_importfail - Import Failed: - Ошибка импортирования: - 30005 - 30005 + admin_system + d_anoinfo + No Information]]> + Нет данных ]]> + 31006 + 31006 0 core - admin_templates - ie_importfail_no - Import Failed: Nothing to import! - Ошибка импортирования: Нечего импортировать! - 30005 - 30005 + admin_system + d_aavail + Available Physical Memory + Доступно физической памяти + 31006 + 31006 0 core - admin_templates - ie_set_imported - %s template(s) added, %s replacement(s) added, %s CSS file(s) added.]]> - шаблонов добавлено: %s, заменено: %s, CSS файлов добавлено: %s]]> - 30005 - 30005 + admin_system + d_atotal + Total Physical Memory + Всего физической памяти + 31006 + 31006 0 core - admin_templates - ie_none - - None - - Никакую - 30005 - 30005 + admin_system + d_dfix + Fix + Исправить + 31006 + 31006 0 core - admin_templates - ie_images_added - %s image(s) added - Изображений добавлено: %s - 30005 - 30005 + admin_system + d_atitle + IP.Board Diagnostics + Диагностика IP.Board + 31006 + 31006 0 core - admin_templates - ie_ex_skin - Export customizations in this skin only - Экспортировать изменения только этого стиля - 30005 - 30005 + admin_system + d_aphpinfo + PHP INFO + PHP INFO + 31006 + 31006 0 core - admin_templates - re_nav2 - Manage Replacements in - Редактировать макросы в - 30005 - 30005 + admin_system + d_dstatus + Status + Состояние + 31006 + 31006 0 core - admin_templates - ie_ex_skin_p - Export customizations in this skin and any parent skins - Экспортировать изменения этого стиля и родительских - 30005 - 30005 + admin_system + d_dtbl + Table + Таблица + 31006 + 31006 0 core - admin_templates - re_nav1 - - Управление стилями и шаблонами - 30005 - 30005 + admin_system + d_dnav + Database Structure Results + Результат проверки структуры базы данных + 31006 + 31006 0 core - admin_templates - sr_sometext - You must enter some text to search by - Вы не ввели значение для поиска. - 30005 - + admin_system + d_dtitle + IP.Board Diagnostics - Database Structure Checker + Диагностика IP.Board - Проверка структуры базы данных + 31006 + 31006 0 core - admin_templates - sr_nomatches - No Matches Found! - Не найдено ни одной записи, соответствующей искомой строке. Попробуйте еще раз и расширьте диапазон поиска. - 30005 - + admin_system + d_iman + , or you can run the following queries manually: + или вы можете выполнить следующие запросы вручную. + 31006 + 31006 0 core - admin_templates - sd_nosession - Could not get the current template compare session. - Невозможно получить текущую сессию сравнения шаблонов. - 30005 - 30005 + admin_system + d_inauto + Click here to fix this table's indexes]]> + Нажмите здесь для исправления индексов этой таблицы ]]> + 31006 + 31006 0 core - admin_templates - sd_noid - No skin ID passed. Please try again. - Не найден ID стиля. Попробуйте еще раз. - 30005 - 30005 + admin_system + d_iauto + Click here to fix this table]]> + Нажмите здесь для исправления таблицы ]]> + 31006 + 31006 0 core - admin_templates - sd_removed - Differences report removed - Отчет об изменениях удален - 30005 - 30005 + admin_system + d_iresults + Database Index Results + Результаты проверки индексов базы данных + 31006 + 31006 0 core - admin_templates - sd_title - Comparison from skin set: - Сравнение для стиля: - 30005 - 30005 + admin_system + d_itable + Table + Таблица + 31006 + 31006 0 core - admin_templates - sd_entertitle - You must enter a title - Вы должны ввести название - 30005 - 30005 + admin_system + d_iindex + Index Name + Название индекса + 31006 + 31006 0 core - admin_templates - sd_nocontent - There was no content in the file to process - Файл не был загружен - 30005 - 30005 + admin_system + d_ifix + Fix + Исправить + 31006 + 31006 0 core - admin_templates - ss_masterwritten - Master skin has been written - Базовый стиль записан - 30005 - + admin_system + d_ifixall_link + Would you like us to attempt to fix them for you? + Хотите попытаться исправить все в автоматическом режиме ? + 31006 + 31006 0 core - admin_templates - ss_setremoved - Set Removed - Стиль удален - 30005 - + admin_system + d_icongrats + There were no errors found with your database indexes. + Ошибок в индексах базы данных не найдено. + 31006 + 31006 0 core - admin_templates - ss_authkeyerror - Authorization Key Error - Ошибка ключа авторизации - 30005 - + admin_system + d_ifixall + We have found problems with your database, and have listed them below. + В базе данных обнаружены ошибки. + 31006 + 31006 0 core - admin_templates - ss_cannotremove - Cannot remove this skin set - Невозможно удалить стиль - 30005 - + admin_system + d_ierrors + WARNING: ERRORS FOUND + ВНИМАНИЕ: НАЙДЕНЫ ОШИБКИ + 31006 + 31006 0 core - admin_templates - ss_noid - No ID was passed. Please try again. - ID не найден. Попробуйте еще раз. - 30005 - + admin_system + d_inoerrors + No Errors Found + Ошибок не найдено + 31006 + 31006 0 core - admin_templates - ss_imgdirnoexist - The image directory you selected does not exist. - Выбранная директория изображений не существует. - 30005 - + admin_system + d_inoprocess + There was an error and we could not process your %s_tables.php file. Please reupload it. + Произошла ошибка и ваш файл %s_tables.php не был обработан. Пожалуйста, перезагрузите его. + 31006 + 31006 0 core - admin_templates - ss_nogroupaccess - No group has access to this skin. At least ensure that one group has access. - Хотя бы одна группа пользователей должна иметь доступ к стилю. - 30005 - + admin_system + d_iupload + You must upload: /install/sql/%s_tables.php from the IP.Board installation package for your current version to run this tool. + Вы должны загрузить: /install/sql/%s_tables.php из дистрибутива IP.Board вашей текущей версии для запуска этого инструмента. + 31006 + 31006 0 core - admin_templates - ss_specifyname - You must specify a set name. - Вы должны ввести имя для этого пакета. - 30005 - + admin_system + d_iexecuted + Executed Successfully
    ]]>
    + Успешно выполнен
    ]]>
    + 31006 + 31006 0
    core - admin_templates - ss_emodirnoexist - The emoticons directory you selected does not exist. - Выбранная директория смайликов не существует. - 30005 - + admin_system + d_ierror + SQL Error: + Ошибка SQL: + 31006 + 31006 0 core - admin_templates - ss_skinsetsaved - Skin Set Saved - Настройки стиля сохранены - 30005 - + admin_system + d_idomanual + + + 31006 + 31006 0 core - admin_templates - ss_dontmoveintoself - You cannot move this skin set into its own parent tree - Нельзя наследовать стиль от самого себя - 30005 - + admin_system + d_inav + Database Index Results + Результаты проверки индексов базы данных + 31006 + 31006 0 core - admin_templates - ss_saveset - Save Set - Сохранить стиль - 30005 - + admin_system + d_isorry + Sorry, those queries are not allowed for your safety. + Извините, эти запросы запрещены в целях безопасности. + 31006 + 31006 0 core - admin_templates - ss_unavailable - Unavailable, IP.Board cannot write into your 'public/style_css' folder]]> - Недоступно, IP.Board не может записывать файлы в директорию 'public/style_css' ]]> - 30005 - 30005 + admin_system + d_ititle + IP.Board Diagnostics - Database Index Checker + Диагностика IP.Board - Проверка индексов базы данных + 31006 + 31006 0 core - admin_templates - ss_edituserset - Edit User Set - Редактирование стиля - 30005 - + admin_system + d_wfound + has whitespace at the beginning or end of the file + имеет пробелы в начале или конце файла + 31006 + 31006 0 core - admin_templates - ss_manageskinsets - Manage Skin Sets - Управление стилем - 30005 - + admin_system + d_wclear + All files appear to be in good order + Похоже, что все файлы в порядке + 31006 + 31006 0 core - admin_templates - ss_addnewset - Add New Set - Создание нового стиля - 30005 - + admin_system + d_wtitle + IP.Board Diagnostics - Whitespace Checker + Диагностика IP.Board - Проверка на пробелы + 31006 + 31006 0 core - admin_templates - te_nav1 - - Управление стилями и шаблонами - 30005 - + admin_system + d_wnav + Whitespace Check Results + Результаты проверки на пробелы + 31006 + 31006 0 core - admin_templates - te_nav2 - Manage Templates in - Управление шаблонами в - 30005 - + admin_system + d_pyes + is writable + имеет права на запись + 31006 + 31006 0 core - admin_templates - to_recache_done - Skin set(s) recached successfully - Кеширование стилей завершено - 30005 - 30005 + admin_system + d_pno + The following file or folder is not writable + Не возможна запись в следующую директорию или файл + 31006 + 31006 0 core - admin_templates - to_writetoprs - Cannot write to /public/resources/skins/ - Невозможна запись в /public/resources/skins/ - 30005 - 30005 + admin_system + d_p404 + We could not find the file or folder + Файл или директория не найдены + 31006 + 31006 0 core - admin_templates - to_replacerecached - Replacements recached for - Завершено кеширование макросов для - 30005 - 30005 + admin_system + d_pnav + Permission Check Results + Результаты проверки прав доступа + 31006 + 31006 0 core - admin_templates - to_wrote - Wrote - Записано - 30005 - + admin_system + d_ptitle + IP.Board Diagnostics - Permission Checker + Диагностика IP.Board - Проверка прав доступа + 31006 + 31006 0 core - admin_templates - to_couldnotwrite - Could not write - Невозможна запись - 30005 - 30005 + admin_system + d_vinfo + Version Information + Информация о версии + 31006 + 31006 0 core - admin_templates - to_xmltempsavedout - XML Templates Saved Out - XML шаблоны сохранены - 30005 - + admin_system + d_vnav + Version Check Results + Результаты проверки версии + 31006 + 31006 0 core - admin_templates - to_resultbuild - Result of building for release... - Результат сборки для релиза... - 30005 - 30005 + admin_system + d_vtitle + IP.Board Diagnostics - Version Checker + Диагностика IP.Board - Проверка версии + 31006 + 31006 0 core - admin_templates - to_alldone - All Done! - Завершено! - 30005 - 30005 + admin_system + chckr_fix + Fix + Исправить + 31006 + 31006 0 core - admin_templates - to_masterskinrebuilt - Master rebuilt for set for set ID: - Базовый стиль обновлен для ID: - 30005 - 30005 + admin_system + chckr_table + Table + Таблица + 31006 + 31006 0 core - admin_templates - to_resultxmlimp - Result of template XML importing... - Результат XML импорта шаблонов... - 30005 - 30005 + admin_system + chckr_status + Status + Состояние + 31006 + 31006 0 core - admin_templates - to_masterreplace - Master Replacements Rebuilt - Базовые макросы обновлены - 30005 - 30005 + admin_system + last_5_version_history + Version History (Last 5) + История обновлений (последние 5) + 31006 + 31006 0 core - admin_templates - to_mastercssrebuilt - - - 30005 - 30005 + admin_system + system_processes + System Processes + Процессы системы + 31006 + 31006 0 core - admin_templates - to_rebuildcomplete - Rebuild complete - Обновление завершено - 30005 - 30005 + admin_system + sy_devtaks + Tasks + Задачи + 31006 + 31006 0 core - admin_templates - to_membersupdated - members updated - пользователей обновлено - 30005 - 30005 + admin_system + sy_devcomponents + Components + Компоненты + 31006 + 31006 0 core - admin_templates - to_recachedset - Recached set: - Обновлен кеш стиля: - 30005 - 30005 + admin_system + sy_devlogin + Log In Auth + Авторизация + 31006 + 31006 0 core - admin_templates - to_phprebuilt - PHP Templates Rebuilt For: - PHP шаблоны пересозданы для: - 30005 - 30005 + admin_system + sy_devgroups + Groups + Группы + 31006 + 31006 0 core - admin_templates - to_templatetools - Template Tools - Инструменты - 30005 - 30005 + admin_system + sy_devfile + File Types + Типы файлов + 31006 + 31006 0 core - admin_templates - um_removed - Remapping removed - Переназначение удалено - 30005 - + admin_system + sy_devpages + Pages + Страницы + 31006 + 31006 0 core - admin_templates - um_added - Skin Remap Added - Переназначение для стиля добавлено - 30005 - + admin_system + sy_devskin + Skin Set + Стиль + 31006 + 31006 0 core - admin_templates - um_entireform - You must complete the entire form. Please try again. - Форма должна быть заполнена полностью. - 30005 - + admin_system + sy_devcontent + Content Templates + Шаблоны содержания + 31006 + 31006 0 core - admin_templates - to_noapps - No apps to rebuild! - Нет приложения для обновления. - 30005 - 30005 + admin_system + sy_devtemplate + Template HTML + Шаблон HTML + 31006 + 31006 0 core - admin_templates - to_masterhtml - - - 30005 - 30005 + admin_system + sy_devemail + Email Templates + Шаблоны E-mail + 31006 + 31006 0 core - admin_templates - um_edited - Skin Remap Edited - Переназначение для стиля изменено - 30005 - + admin_system + sy_go + Go + Отправить + 31006 + 31006 0 core - admin_templates - to_forumsupdated - forums updated - форумов обновлено - 30005 - 30005 + admin_system + sy_devexport + Export Installer XML + Экспортировать XML установщика + 31006 + 31006 0 core - admin_templates - um_isexactly - Is Exactly - В точности - 30005 - + admin_system + language_total_entries + Total Entries + Всего записей + 31006 + 31006 0 core - admin_templates - um_contains - Contains - Содержит - 30005 - + admin_system + language_out_of_date_entries + Out of Date Entries + Устаревшие записи + 31006 + 31006 0 core - admin_templates - um_addnew - Add New Skin Remap - Добавить переназначение - 30005 - + admin_system + language_default + Default Text + Текст по умолчанию + 31006 + 31006 0 core - admin_templates - um_editremap - Edit Remapping - Редактировать переназначения - 30005 - + admin_system + language_customized_entries + Customized Entries + Измененные записи + 31006 + 31006 0 core - admin_templates - um_noid - No ID was passed. Please try again. - Не указан ID. Попробуйте ещё раз. - 30005 - + admin_system + language_pack_name + Pack Name + Набор слов + 31006 + 31006 0 core - admin_templates - um_nav1 - - Управление стилями и шаблонами - 30005 - + admin_system + language_key + Key + Ключ + 31006 + 31006 0 core - admin_templates - um_nav2 - Manage URL Remapping in - Управление переназначениями URL для - 30005 - + admin_system + language_word_revert + Language customization has been reverted + Изменения в языке отменены + 31006 + 31006 0 core - admin_templates - um_savechanges + admin_system + language_pack_updated + Language pack information updated + Настройки языка обновлены + 31006 + 31006 + 0 + + + core + admin_system + language_title_missing + Language title can not be blank + Название языка не может быть пустым + 31006 + 31006 + 0 + + + core + admin_system + language_locale_missing + Language locale can not be blank + Локаль языка не может быть пустой + 31006 + 31006 + 0 + + + core + admin_system + language_form_default + Default Language? + Использовать по умолчанию + 31006 + 31006 + 0 + + + core + admin_system + language_form_title + Language Title + Название языка + 31006 + 31006 + 0 + + + core + admin_system + language_form_locale + Language Locale + Локаль языка + 31006 + 31006 + 0 + + + core + admin_system + language_form_new_info + Language Pack Information


    You can configure basic language pack settings here

    ]]>
    + Настройки языка


    Здесь вы можете настроить основные параметры языкового пакета

    ]]>
    + 31006 + 31006 + 0 +
    + + core + admin_system + language_pack_created + Language pack created + Язык создан + 31006 + 31006 + 0 + + + core + admin_system + language_form_new_button + Add this language + Добавить этот язык + 31006 + 31006 + 0 + + + core + admin_system + language_form_new_title + Create a new language pack + Создать новый язык + 31006 + 31006 + 0 + + + core + admin_system + language_form_edit_info + Language Pack Information


    You can configure basic language pack settings here

    ]]>
    + Настройки языка


    Здесь вы можете настроить основные параметры языкового пакета

    ]]>
    + 31006 + 31006 + 0 +
    + + core + admin_system + language_form_edit_button Save Changes Сохранить - 30005 - + 31006 + 31006 0 core - admin_templates - ua_nav1 - - Управление стилями и шаблонами - 30005 - + admin_system + language_word_pack_edited + Word pack updated + Слова обновлены + 31006 + 31006 0 core - admin_templates - ua_saved - User Agent Settings Saved - Настройки user agent сохранены - 30005 - + admin_system + language_form_edit_title + Edit Language Pack Information + Редактирование языка + 31006 + 31006 0 core - admin_templates - el_wrongformat - The file you uploaded is not in the correct format. It has to be one of the following: GIF, JPG/JPEG, or PNG. - Загруженный файл имеет не верное расширение. Оно должно быть одним из следующих: GIF, JPG/JPEG, PNG. - 30005 - 30005 + admin_system + language_word_pack_current + Default Value + Значение по умолчанию + 31006 + 31006 0 core - admin_templates - el_chmod - - - 30005 - 30005 + admin_system + language_word_pack_new + New Value + Новое значение + 31006 + 31006 0 core - admin_templates - el_nofile - You must either upload a new logo or enter a URL for a new logo. Please try again - Вы должны либо загрузить новый логотип, либо ввести ссылку на существующий - 30005 - 30005 + admin_system + language_word_pack_edit + Edit word pack + Редактирование слов + 31006 + 31006 0 core - admin_templates - el_noskinid - No skin set ID was passed. Please try again, ensuring you select a skin - Не передан ID стиля. Попробуйте еще раз. - 30005 - 30005 + admin_system + language_word_pack_go + Go + Отправить + 31006 + 31006 0 core - admin_templates - ua_nav2 - Manage User Agents in - Управление User Agents в - 30005 - + admin_system + language_list_default + Default + По умолчанию + 31006 + 31006 0 core - admin_templates - sm_skinnone - Select One - Выберите - 30005 - + admin_system + language_list_translate_ext + Translate Externally... + Перевести через файлы + 31006 + 31006 0 core - admin_templates - sk_ajax_noperm - You do not have permission to use this function - У вас нет прав для использования этой функции - 30005 - + admin_system + language_list_translate + Translate in Admin CP... + Перевести + 31006 + 31006 0 core - admin_templates - sk_writemaster - - Записать шаблоны в директорию базового стиля - 30005 - 30005 + admin_system + language_list_date + Date Example + Формат даты + 31006 + 31006 0 core - admin_templates - sk_close - Close - Закрыть - 30005 - + admin_system + language_list_money + Currency Example + Формат валюты + 31006 + 31006 0 core - admin_templates - el_log - Logo Changed and Skin Set Caches Rebuilt (Skin ID: %s ) - Логотип изменен, кеш стиля обновлен (ID стиля: %s) - 30005 - 30005 + admin_system + language_list_local + Locale + Локаль + 31006 + 31006 0 core - admin_templates - sk_removedhtml - Removed HTML - Удаленный HTML - 30005 - - 0 - - - core - admin_templates - sk_urlnewlogo - URL to new logo - Ссылка на логотип - 30005 - - 0 - - - core - admin_templates - sk_easylogochanger - Easy Logo Changer - Простая смена логотипа - 30005 - - 0 - - - core - admin_templates - sk_elc_warning - WARNING: Unable to upload into '/public/style_images/'. If you wish to upload a file, please CHMOD that directory now!]]> - ВНИМАНИЕ: Невозможно загрузить файл в '/public/style_images/'. Если вы хотите загрузить файл, то измените права доступа к этой директории.]]> - 30005 - 30005 - 0 - - - core - admin_templates - sk_addedhtml - Added HTML - Добавленный HTML - 30005 - 30005 - 0 - - - core - admin_templates - sk_applywhichset - Apply to which skin set? - Применить к следующему набору стилей: - 30005 - - 0 - - - core - admin_templates - sk_applywhichset_info - This will change the replacement macro for your board header. You can revert at any time. - Если вы уже изменяли шапку стиля из «Управления шаблонами», то это действие удалит все ваши изменения. - 30005 - - 0 - - - core - admin_templates - sk_uploadlogo_info - Browse your computer for a logo to upload. Filename must end in .gif, .jpg, .jpeg or .png - Выберите файл для загрузки с вашего компьютера. Файл должен иметь разрешение .gif, .jpg, .jpeg или .png - 30005 - - 0 - - - core - admin_templates - sk_urlnewlogo_info - You can use a relative URL or a full URL starting with http:// - Вы можете использовать относительные ссылки или полный URL, начинающийся с http:// - 30005 - - 0 - - - core - admin_templates - sk_uploadlogo - OR upload a new logo]]> - ИЛИ загрузить новый логотип]]> - 30005 - - 0 - - - core - admin_templates - sk_save - Save - Сохранить - 30005 - - 0 - - - core - admin_templates - sk_continue - Continue - Искать и заменить - 30005 - - 0 - - - core - admin_templates - sk_replaceselected - Replace Selected - Заменить выбранные - 30005 - - 0 - - - core - admin_templates - sk_submit - Submit - Установить - 30005 - - 0 - - - core - admin_templates - sk_selectskinset - Select a skin set - Выберите стиль - 30005 - - 0 - - - core - admin_templates - sk_searchfor - Search For - Поиск по... - 30005 - - 0 - - - core - admin_templates - sk_searchininfo - Search in selected set and all parents including the master set. - Также искать в родительских стилях, включая главный стиль. - 30005 - - 0 - - - core - admin_templates - sk_run - Run - Запуск - 30005 - - 0 - - - core - admin_templates - sk_searchreplaceinfo - - - 30005 - - 0 - - - core - admin_templates - sk_title_export - export - экспорт - 30005 - - 0 - - - core - admin_templates - sk_regularexpression - Regular Expression - Включить регулярные выражения? - 30005 - - 0 - - - core - admin_templates - sk_searchandreplace - Search and Replace - Поиск и замена - 30005 - - 0 - - - core - admin_templates - sk_replacewith_info - (Optional: Ommitting will perform just a search) - (Опционально: Если вы хотите сделать замену) - 30005 - - 0 - - - core - admin_templates - sk_exported - Exported - Экспортировано - 30005 - 30005 - 0 - - - core - admin_templates - sk_replacewith - Replace With - Заменить на... - 30005 - - 0 - - - core - admin_templates - sk_new - New - Новый - 30005 - - 0 - - - core - admin_templates - sk_howmanytemps - %s new template bits, %s changed template bits - Новых шаблонов: %s , измененных шаблонов: %s - 30005 - 30005 - 0 - - - core - admin_templates - sk_changed - Changed - Изменен - 30005 - - 0 - - - core - admin_templates - sk_skindiffreport - Skin Differences Report - Отчет сравнения стилей - 30005 - - 0 - - - core - admin_templates - sk_viewdiffs - View Differences - Просмотр различий - 30005 - - 0 - - - core - admin_templates - sk_skindiff - Skin Differences - Различия стилей - 30005 - - 0 - - - core - admin_templates - sk_nodiffs - No skin differences to show - Нет отчетов сравнения стилей - 30005 - - 0 - - - core - admin_templates - sk_bitsof - template bits of %s processed - шаблонов %s обработано - 30005 - - 0 - - - core - admin_templates - sk_processing - Processing - Обработка - 30005 - - 0 - - - core - admin_templates - sk_error - Error - Ошибка - 30005 - 30005 - 0 - - - core - admin_templates - sk_clickviewreport - Click here to view the report]]> - Нажмите здесь для просмотра отчета]]> - 30005 - - 0 - - - core - admin_templates - sk_skindiffreports - Skin Differences Reports - Отчет сравнения стилей - 30005 - - 0 - - - core - admin_templates - sk_difftitle - Difference Title + admin_system + language_list_title + Language Название - 30005 - + 31006 + 31006 0 core - admin_templates - sk_created - Created - Создано - 30005 - + admin_system + language_list_page_title + Localization Manager + Управление языками + 31006 + 31006 0 core - admin_templates - sk_removediffresults - REMOVE Difference Results - УДАЛИТЬ результаты сравнения - 30005 - + admin_system + sys_this_will_examine_the_corecach + for {app}_language.php files and import them into the database.]]> + на наличие файлов {app}_language.php и импортирует их в базу данных.]]> + 31006 + 31006 0 core - admin_templates - sk_viewdiffresults - View Difference Results - Просмотр результатов сравнения - 30005 - + admin_system + indev_lang_export_done + All language files exported to application directories + Все языковые файлы экспортированы в директории приложения + 31006 + 31006 0 core - admin_templates - sk_import + admin_system + lang_upload_other_error + An error occurred while attempting to upload the language pack. + В ходе загрузки языка произошла ошибка. + 31006 + 31006 + 0 + + + core + admin_system + lang_upload_too_large + %s.]]> + %s.]]> + 31006 + 31006 + 0 + + + core + admin_system + sys_indev_export_go + Export + Экспорт + 31006 + 31006 + 0 + + + core + admin_system + sys_indev_export + Export language files to application directories + Экспортировать языковые файлы в директории приложения + 31006 + 31006 + 0 + + + core + admin_system + sys_select_the_application_languag + Select the application language files to import + Выберите языковой файл приложения для импорта + 31006 + 31006 + 0 + + + core + admin_system + sys_developers_language_cache_impo + + Инструменты разработчика + 31006 + 31006 + 0 + + + core + admin_system + l_badfile + There was no language pack information in the file you uploaded + Информация о языковом пакете в загруженном файле не найдена + 31006 + 31006 + 0 + + + core + admin_system + sys_import Import Импорт - 30005 - 30005 + 31006 + 31006 0 core - admin_templates - sk_createhtmlexport - Create HTML Export - Экспортировать в HTML - 30005 - + admin_system + sys_the_file_must_be_uploaded_into + + + 31006 + 31006 0 core - admin_templates - sk_createnewskindiff - Create New Skin Differences Report - Создать новый отчет сравнения стилей - 30005 - + admin_system + sys_or_enter_the_filename_of_the_x + OR enter the filename of the xml.gz language pack]]> + ИЛИ введите название XML-архива]]> + 31006 + 31006 0 core - admin_templates - sk_skipnewmiss - Skip all new/missing template bits? - Пропускать все новые/ошибочные шаблоны? - 30005 - + admin_system + sys_duplicate_entries_will_not_be_ + Duplicate entries will not be overwritten but the default setting and other options will be updated. + Существующие настройки будут обновлены, другие — добавлены. + 31006 + 31006 0 core - admin_templates - sk_enterdifftitle - Enter a new skin difference title - Введите название - 30005 - 30005 + admin_system + sys_upload_xml_language_file_from_ + Upload language pack from your computer + Загрузка XML-архива с языковыми настройками + 31006 + 31006 0 core - admin_templates - sk_difftitle_info - This title can be anything and will be used in the list above when the comparison is completed - Это название будет использовано в списке выше, когда сравнение будет завершено. - 30005 - + admin_system + sys_import_language_xml + Import Language XML + Импортирование XML-файла + 31006 + 31006 0 core - admin_templates - sk_selectskinxml_info - - Будет произведено сравнение с HTML шаблонами главного стиля - 30005 - + admin_system + sys_version + Version + Версия + 31006 + 31006 0 core - admin_templates - sk_selectskinxml - Select a valid XML skin export file from your computer. - Выберите корректный файл «ipb_templates.xml». - 30005 - + admin_system + sys_sql_version + SQL Version + Версия SQL + 31006 + 31006 0 core - admin_templates - sk_urlmapfor - URL Map For - Переназначения URL для - 30005 - + admin_system + sys_avail_mem + Available Server Memory + Доступная память сервера + 31006 + 31006 0 core - admin_templates - sk_skipnewmiss_info - If you are comparing an old ipb_templates.xml file from an older IPB release, then you may wish to disable this. If you are comparing an XML file from a customized skin set, you should enable this. - - 30005 - + admin_system + sys_total_mem + Total Server Memory + Общая память сервера + 31006 + 31006 0 core - admin_templates - sk_generalsettings - General Settings - Основные настройки - 30005 - 30005 + admin_system + sys_current_load + Current Server Load + Текущая загрузка сервера + 31006 + 31006 0 core - admin_templates - sk_title + admin_system + sys_safe_mod + Safe Mode + Безопасный режим + 31006 + 31006 + 0 + + + core + admin_system + sys_sys_software + System Software + Программное обеспечение сервера + 31006 + 31006 + 0 + + + core + admin_system + sys_disabled_funcs + Disabled PHP Functions + Отключенные PHP функции + 31006 + 31006 + 0 + + + core + admin_system + sys_php_version + PHP Version + Версия PHP + 31006 + 31006 + 0 + + + core + admin_system + sys_ipboard_version + IP.Board Version + Версия IP.Board + 31006 + 31006 + 0 + + + core + admin_system + sys_status + Status + Состояние + 31006 + 31006 + 0 + + + core + admin_system + sys_log + Log + Журнал + 31006 + 31006 + 0 + + + core + admin_system + sys_system_overview + System Overview + Обзор системы + 31006 + 31006 + 0 + + + core + admin_system + sys_name + Name + Имя + 31006 + 31006 + 0 + + + core + admin_system + sys_last_5_acp_log_in_attempts + Last 5 ACP Log in Attempts + Последние 5 попыток входа в Админцентр + 31006 + 31006 + 0 + + + core + admin_system + sys_date + Date + Дата + 31006 + 31006 + 0 + + + core + admin_system + sys_view_details + View Details + Подробности + 31006 + 31006 + 0 + + + core + admin_system + sys_all_times_gmt_gmt_time_now_is + All times GMT. GMT time now is: + Время по Гринвичу: + 31006 + 31006 + 0 + + + core + admin_system + sys_delete_task + Delete Task... + Удалить + 31006 + 31006 + 0 + + + core + admin_system + sys_unlock_task + Unlock Task... + Разблокировать + 31006 + 31006 + 0 + + + core + admin_system + sys_edit_task + Edit Task... + Изменить + 31006 + 31006 + 0 + + + core + admin_system + sys_run + Run + Запуск + 31006 + 31006 + 0 + + + core + admin_system + sys_how_curl_to_use_in_a_cron + Show CURL to use in a cron + Показать строку CURL для запуска задачи + 31006 + 31006 + 0 + + + core + admin_system + sys_wday + WDay + День недели + 31006 + 31006 + 0 + + + core + admin_system + sys_mday + MDay + День месяца + 31006 + 31006 + 0 + + + core + admin_system + sys_min + Min + Минута + 31006 + 31006 + 0 + + + core + admin_system + sys_hour + Hour + Час + 31006 + 31006 + 0 + + + core + admin_system + sys_system_schedular + System Scheduler + Менеджер задач + 31006 + 31006 + 0 + + + core + admin_system + sys_next_run + Next Run + Следующий запуск + 31006 + 31006 + 0 + + + core + admin_system + sys_if_set_to_yes_this_will_not_be + + + 31006 + 31006 + 0 + + + core + admin_system + sys_task_safe_mode + Task Safe Mode + Безопасный режим + 31006 + 31006 + 0 + + + core + admin_system + sys_this_is_used_to_call_a_task_wh + This is used to call a task where the ID of the task might change + Это слово используется для задания, у которого ID может измениться + 31006 + 31006 + 0 + + + core + admin_system + sys_task_key + Task Key + Ключ задачи + 31006 + 31006 + 0 + + + core + admin_system + sys_enable_task + Enable Task? + Включить задачу? + 31006 + 31006 + 0 + + + core + admin_system + sys_if_you_are_using_cron_you_migh + If you are using CRON, you might wish to disable this task from the internal manager. + Если вы используете CRON, вы должны отключить вызов этой задачи здесь. + 31006 + 31006 + 0 + + + core + admin_system + sys_will_write_to_the_task_log_eac + Will write to the task log each time the task is run, not recommended for regular tasks run every few minutes. + При включенной опции все выполнения задач будут записаны в базу данных, не рекомендуется для основных задач, выполняемых каждые 5-10 минут. + 31006 + 31006 + 0 + + + core + admin_system + sys_enable_task_logging + Enable Task Logging + Включить запись журнала действий + 31006 + 31006 + 0 + + + core + admin_system + sys_choose_every_day_to_run_each_d_1 + + + 31006 + 31006 + 0 + + + core + admin_system + sys_task_time_month_day + Task Time: Month Day + Время задачи: день месяца + 31006 + 31006 + 0 + + + core + admin_system + sys_choose_every_hour_to_run_each_ + + + 31006 + 31006 + 0 + + + core + admin_system + sys_task_time_week_day + Task Time: Week Day + Время задачи: день недели + 31006 + 31006 + 0 + + + core + admin_system + sys_choose_every_day_to_run_each_d + + + 31006 + 31006 + 0 + + + core + admin_system + sys_task_time_hours + Task Time: Hours + Время задачи: часы + 31006 + 31006 + 0 + + + core + admin_system + sys_choose_every_minute_to_run_eac + + + 31006 + 31006 + 0 + + + core + admin_system + sys_time_options + Time Options + Опции времени + 31006 + 31006 + 0 + + + core + admin_system + sys_task_time_minutes + Task Time: Minutes + Время задачи: минуты + 31006 + 31006 + 0 + + + core + admin_system + sys_this_is_the_php_file_that_is_r + This is the PHP file that is run when the task is run. + Это PHP файл, который будет запускаться при запуске задачи. + 31006 + 31006 + 0 + + + core + admin_system + sys_task_title + Task Title + Название задачи + 31006 + 31006 + 0 + + + core + admin_system + sys_task_short_description + Task Short Description + Краткое описание задачи + 31006 + 31006 + 0 + + + core + admin_system + sys_task_application + Task Application + Задача приложения + 31006 + 31006 + 0 + + + core + admin_system + sys_task_php_file_to_run + Task PHP File To Run + PHP файл задачи для запуска + 31006 + 31006 + 0 + + + core + admin_system + sys_every_minute + Every minute + Каждую минуту + 31006 + 31006 + 0 + + + core + admin_system + sys_every + Every + Каждые + 31006 + 31006 + 0 + + + core + admin_system + sys_minutes + minutes + минут + 31006 + 31006 + 0 + + + core + admin_system + sys_minutes_past_the_first_availab + minutes past the first available hour + минут спустя первого доступного часа + 31006 + 31006 + 0 + + + core + admin_system + sys_hours + hours + часов + 31006 + 31006 + 0 + + + core + admin_system + sys_on_every_hour + On every hour + Каждый час + 31006 + 31006 + 0 + + + core + admin_system + sys_at + At + В + 31006 + 31006 + 0 + + + core + admin_system + sys_tuesday + Tuesday + Вторник + 31006 + 31006 + 0 + + + core + admin_system + sys_wednesday + Wednesday + Среда + 31006 + 31006 + 0 + + + core + admin_system + sys_thursday + Thursday + Четверг + 31006 + 31006 + 0 + + + core + admin_system + sys_friday + Friday + Пятница + 31006 + 31006 + 0 + + + core + admin_system + sys_saturday + Saturday + Суббота + 31006 + 31006 + 0 + + + core + admin_system + sys_on_day + On day + День + 31006 + 31006 + 0 + + + core + admin_system + sys_on + On + В + 31006 + 31006 + 0 + + + core + admin_system + sys_monday + Monday + Понедельник + 31006 + 31006 + 0 + + + core + admin_system + sys_sunday + Sunday + Воскресенье + 31006 + 31006 + 0 + + + core + admin_system + sys_delete_logs + DELETE Logs + УДАЛИТЬ записи + 31006 + 31006 + 0 + + + core + admin_system + sys_delete_logs_older_than_n_days + n days]]> + n дней]]> + 31006 + 31006 + 0 + + + core + admin_system + sys_delete_logs_for_task + Delete logs for task + Удаление записей задачи + 31006 + 31006 + 0 + + + core + admin_system + sys_view_task_manager_logs + View Task Manager Logs + Просмотр журнала менеджера задач + 31006 + 31006 + 0 + + + core + admin_system + sys_view_logs_for_task + View logs for task + Просмотр журнала задачи + 31006 + 31006 + 0 + + + core + admin_system + sys_show_n_log_entries + n log entries]]> + n записей ]]> + 31006 + 31006 + 0 + + + core + admin_system + sys_view_logs + View Logs + Просмотр записей + 31006 + 31006 + 0 + + + core + admin_system + sys_delete_task_manager_logs + Delete Task Manager Logs + Удалить записи менеджера задач + 31006 + 31006 + 0 + + + core + admin_system + sys_last_5_run_tasks + Last 5 Run Tasks + Последние 5 запущенных задач + 31006 + 31006 + 0 + + + core + admin_system + sys_log_info + Log Info + Результаты запуска + 31006 + 31006 + 0 + + + core + admin_system + sys_date_run + Date Run + Дата запуска + 31006 + 31006 + 0 + + + core + admin_system + sys_task_manager_logs + Task Manager Logs + Журнал менеджера задач + 31006 + 31006 + 0 + + + core + admin_system + sys_task_run + Task Run + Задача + 31006 + 31006 + 0 + + + core + admin_system + sys_loaded_ext + Loaded Extensions + Загруженные дополнения + 31006 + 31006 + 0 + + + core + admin_system + logindetail_get + GET Data (URL Data) + Данные GET (данные из URL) + 31006 + 31006 + 0 + + + core + admin_system + logindetail_post + POST Data (Form Data) + Данные POST (данные формы) + 31006 + 31006 + 0 + + + core + admin_system + logindetail_time + Log in Time + Время входа + 31006 + 31006 + 0 + + + core + admin_system + logindetail_success + Success + Успешно + 31006 + 31006 + 0 + + + core + admin_system + logindetail_ip + IP Address + IP адрес + 31006 + 31006 + 0 + + + core + admin_system + logindetail_username + Username + Имя пользователя + 31006 + 31006 + 0 + + + core + admin_system + logindetail_basic + Basics + Основные + 31006 + 31006 + 0 + + + core + admin_system + cannot_delete_default_lang + You cannot delete the default language pack + Вы не можете удалить языковой пакет, использующийся по умолчанию + 31006 + 31006 + 0 + + + core + admin_system + lang_reimport_done + Language Re-Import Done + Повторное импортирование языка завершено + 31006 + 31006 + 0 + + + core + admin_system + importing_x_langs + : Importing %s languages... + : Импортирование %s языков... + 31006 + 31006 + 0 + + + core + admin_system + starting_admin_import + Starting Admin import... + Запуск импорта + 31006 + 31006 + 0 + + + core + admin_system + rebuild_lang_from_xml + Rebuild From XML... + Обновить из XML + 31006 + 31006 + 0 + + + core + admin_system + run_task_now + Run task now -- id: + Запусть задачу сейчас -- id: + 31006 + 31006 + 0 + + + core + admin_system + sys_options + Options + Действия + 31006 + 31006 + 0 + + + core + admin_system + sym_submit + Submit + Отправить + 31006 + 31006 + 0 + + + core + admin_system + sys_title Title - Название - 30005 + Задача + 31006 + 31006 + 0 + + + core + admin_system + sym_word_out_of_date_check + Outdated Strings + Устаревшие строки + 31006 + 31006 + 0 + + + core + admin_system + sym_add_new_language_entry + Add String + Добавить строку + 31006 + 31006 + 0 + + + core + admin_system + sym_find + Find + Найти + 31006 + 31006 + 0 + + + core + admin_system + sym_view_word_packs + View Word Packs + Просмотр слов + 31006 + 31006 + 0 + + + core + admin_system + sym_edit_language_pack_information + Edit Language Info + Настройки языка + 31006 + 31006 + 0 + + + core + admin_system + sym_import_tasksxml + Import tasks.xml + Импортировать tasks.xml + 31006 + 31006 + 0 + + + core + admin_system + sym_manage_languages + Manage Languages + Управление языками + 31006 + 31006 + 0 + + + core + admin_system + sym_export_tasksxml + Export tasks.xml + Экспортировать tasks.xml + 31006 + 31006 + 0 + + + core + admin_system + sym_add_new_task + Add New Task + Добавить задачу + 31006 + 31006 + 0 + + + core + admin_system + language_list_recache + Recache all... + Перекешировать все... + 31006 + 31006 + 0 + + + core + admin_system + language_recache_done + Recache complete + Кеширование завершено + 31006 + 31006 + 0 + + + core + admin_system + ext_all_killed + Translation Session Removed + Сессия перевода удалена + 31006 + 31006 + 0 + + + core + admin_system + ext_translation_detected + here to go there now.
    You will not be able to start a new session until you finish the current one.]]>
    + сюда чтобы вернуться к ней.
    Вы не можете начинать новый перевод, пока не завершите старый.]]>
    + 31006 + 31006 + 0 +
    + + core + admin_system + ext_tbl_submit + Import Selected Files + Импортировать выбранные файлы + 31006 + 31006 + 0 + + + core + admin_system + ext_tbl_db + Last DB Update + Последнее изменение в базе + 31006 + 31006 + 0 + + + core + admin_system + ext_tbl_local + Last Local Edit + Последнее локальное изменение + 31006 + 31006 + 0 + + + core + admin_system + ext_tbl_file + File + Файл + 31006 + 31006 + 0 + + + core + admin_system + ext_button_smodified + Select Modified + Выбрать измененные + 31006 + 31006 + 0 + + + core + admin_system + ext_button_selectall + Select All + Выбрать все + 31006 + 31006 + 0 + + + core + admin_system + ext_button_unselect + Unselect All + Снять все отметки + 31006 + 31006 + 0 + + + core + admin_system + ext_button_finish + Finish And Remove + Завершить и удалить + 31006 + 31006 + 0 + + + core + admin_system + ext_top_desc + Before editing, please set your text editor to save files as UTF-8 regardless of the character set your board uses.]]> + Перед редактированием настройте в вашем текстовом редакторе кодировку UTF-8, потому что форум использует ее.]]> + 31006 + 31006 + 0 + + + core + admin_system + ext_top_title + External File Translation + Перевод через файлы + 31006 + 31006 + 0 + + + core + admin_system + ext_recache + recache this set to view the changes throughout the board.]]> + перекешировать для того, чтобы увидеть изменения на форуме.]]> + 31006 + 31006 + 0 + + + core + admin_system + ext_title_for + External Translation For + Перевод для + 31006 + 31006 + 0 + + + core + admin_system + ext_file_written + Imported %s (%s added entries, %s updated) + Импортировано %s (%s добавленных записей, %s обновленных) + 31006 + 31006 + 0 + + + core + admin_system + ext_no_selected_files + You did not select any files to import! + Вы не выбрали ни одного файла для импортирования! + 31006 + 31006 + 0 + + + core + admin_system + ext_no_translate_files + Could not locate a valid translate session. This could be because there are no files in the translate directory anymore + Невозможно найти корректную сессию перевода. Это могло пройзойти, потому что там нет файлов для перевода. + 31006 + 31006 + 0 + + + core + admin_system + ext_chmod_translate_dir + + Сделайте, чтобы PHP могло записывать данные в директорию /translate/. CHMOD 777. + 31006 + 31006 + 0 + + + core + admin_system + ext_no_translate_dir + root forum directory (the same directory that contains your 'initdata.php' file and 'admin' folder). Please make sure PHP has write permissions into this directory. CHMOD 0777 if in doubt.]]> + Пожалуйста, создайте директорию /translate/ в корневой директории форума. И сделайте права CHMOD на нее 0777. + 31006 + 31006 + 0 + + + core + admin_system + perm_check_results + Permissions Check Results + Результаты проверки прав + 31006 + 31006 + 0 + + + core + admin_system + lang_pack_protected + Can not translate protected language pack + Невозможно перевести защищенный пакет языков + 31006 + 31006 + 0 + + + core + admin_system + cannot_delete_protected_lang + Can not delete protected language pack + Невозможно удалить защищенный пакет языков + 31006 + 31006 + 0 + + + core + admin_system + langpackaddapp + Application + Приложение + 31006 + 31006 + 0 + + + core + admin_system + nolangpacksgroup + There are no word packs for this application + Нет языковых пакетов для данного приложения + 31006 + 31006 + 0 + + + core + admin_system + logindetails + Log in Details + Данные авторизации + 31006 + 31006 + 0 + + + core + admin_system + ipaddyprefix + IP: + IP: + 31006 + 31006 + 0 + + + core + admin_system + selectimeunitsabove + Select time units above + Выберите единицу времени + 31006 + 31006 + 0 + + + core + admin_system + taskthereforrun + Task will therefore run: + Задача будет запущена: + 31006 + 31006 + 0 + + + core + admin_system + connections__output1 + Output (first 2000 characters): + Ответ (первые 2000 символов) + 31006 + 31006 + 0 + + + core + admin_system + connections__headers1 + HTTPS Headers (https://www.invisionpower.com/) + HTTPS заголовки (https://www.invisionpower.com/) + 31006 + 31006 + 0 + + + core + admin_system + connections__message + This tool is designed to verify that your server can make outbound connections to another server. Many features in IP.Board require outbound connection capability (such as IP.Chat, License verification, and Facebook Connect), and this tool verifies the underlying outbound connectivity is functioning correctly. + Данный инструмент позволяет проверить возможность создание внешних сетевых соединений на вашем системе. Большое количество функций в IP.Board требуют возможности устанавливать такие соединения. + 31006 + 31006 + 0 + + + core + admin_system + connections__output + Output (first 2000 characters): + Ответ (первые 2000 символов) + 31006 + 31006 + 0 + + + core + admin_system + connections__headers + HTTP Headers (http://www.invisionpower.com/) + HTTP заголовки (http://www.invisionpower.com/) + 31006 + 31006 + 0 + + + core + admin_system + connectionchecker + Connection Checker + Проверка сетевых соединений + 31006 + 31006 + 0 + + + core + admin_system + cp_view + View + Просмотр + 31006 + 31006 + 0 + + + core + admin_system + cp_posts + Posts + Сообщений + 31006 + 31006 + 0 + + + core + admin_system + cp_topics + Topics + Тем + 31006 + 31006 + 0 + + + core + admin_system + cp_awaitingmoderation + Awaiting Moderation + Ожидающих подтверждения + 31006 + 31006 + 0 + + + core + admin_system + cp_manage + Manage + Управление + 31006 + 31006 + 0 + + + core + admin_system + cp_onlinenow_info + (Includes Members and Guests) + (включая гостей и пользователей) + 31006 + 31006 + 0 + + + core + admin_system + cp_spammeraccounts + Spammers + Спамеры + 31006 + 31006 + 0 + + + core + admin_system + cp_coppaaccounts + COPPA Accounts + COPPA + 31006 + 31006 + 0 + + + core + admin_system + cp_lockedaccounts + Locked Accounts + Заблокированных + 31006 + 31006 + 0 + + + core + admin_system + cp_awaitingvalidation + Awaiting Validation + Ожидающих подтверждения + 31006 + 31006 + 0 + + + core + admin_system + cp_onlinenow + Online Now + Онлайн + 31006 + 31006 + 0 + + + core + admin_system + cp_totalmembers + Total Members + Пользователей + 31006 + 31006 + 0 + + + core + admin_system + cp_systemstats + System Statistics + Статистика + 31006 + 31006 + 0 + + + core + admin_system + l_savechanges + Save Changes + Сохранить + 31006 + 31006 + 0 + + + core + admin_system + l_xmlexport + Export Application: + Экспорт языка приложения + 31006 + 31006 + 0 + + + core + admin_system + l_xmlexportfull + Export Language Pack + Экспорт языка + 31006 + 31006 + 0 + + + core + admin_system + l_noopen + Could not find the file to open at: + Не возможно найти файл для открытия: + 31006 + 31006 + 0 + + + core + admin_system + l_nofile + No upload file was found and no filename was specified. + Не найден загруженный файл и не указано имя файла. + 31006 + 31006 + 0 + + + core + admin_system + l_updatedcount + Updated %s language bits, inserted %s language bits. + %s записей обновлено, %s добавлено. + 31006 + 31006 + 0 + + + core + admin_system + l_nowrite + Could not write to + Невозможна запись в + 31006 + 31006 + 0 + + + core + admin_system + l_noapp + You did not select any applications. + Вы не выбрали ни одного приложения + 31006 + 31006 + 0 + + + core + admin_system + l_copied + Language pack copied + Язык скопирован + 31006 + 31006 + 0 + + + core + admin_system + language_list_copy + Copy language pack... + Скопировать язык + 31006 + 31006 + 0 + + + core + admin_system + language_is_rtl + Display right to left? + Отображать справа налево + 31006 + 31006 + 0 + + + core + admin_system + l_nowords + There were no language strings to import + Нет записей для импорта + 31006 + 31006 + 0 + + + core + admin_system + lang_search_results + Search Results + Результаты поиска + 31006 + 31006 + 0 + + + core + admin_system + l_wordpack_prefix + In word pack: + В наборе слов: + 31006 + 31006 + 0 + + + core + admin_system + language_word_removed + The word has been removed + Слово удалено + 31006 + 31006 + 0 + + + core + admin_system + language_wordpack_removed + The word pack has been removed + Набор слов удален + 31006 + 31006 + 0 + + + core + admin_system + l_remove_pack + Delete... + Удалить + 31006 + 31006 + 0 + + + core + admin_templates + sk_doupgrade + Check this if you are uploading an upgrade for an existing skin + Проверьте это если вы загружаете или обновляете существующий стиль + 31006 + 31006 + 0 + + + core + admin_templates + sk_useimageset + Use Image Set + Какую директорию с изображениями использовать в этом стиле? + 31006 0 core admin_templates - sk_title_info - The title is for your information only so you can distinguish between items. - Необходим для различия переназначений в списке. - 30005 + sk_intoroot + + Этот файл должен быть загружен в корневую директорию вашего форума. + 31006 + 31006 + 0 + + + core + admin_templates + sk_newsetname + New Skin Set Name + Название стиля: + 31006 + 31006 + 0 + + + core + admin_templates + sk_leaveblank + Leave blank to use the name in the XMLArchive. + Оставьте поле пустым, если хотите, чтобы использовать название шаблонов из XML-архива + 31006 + 31006 + 0 + + + core + admin_templates + sk_upgrade + Upgrade existing skin? + Обновить существующий стиль? + 31006 + 31001 + 0 + + + core + admin_templates + sk_ornamearchive + OR enter the filename of the XMLArchive]]> + ИЛИ введите название файла-архива]]> + 31006 0 core admin_templates - sk_type_info - - - 30005 + sk_xmlorxmlgz + + + 31006 0 core admin_templates - sk_url - URL - URL - 30005 - - 0 - - - core - admin_templates - sk_url_info - Enter the string to match in the query string - Введите строку для совпадения со строкой запроса - 30005 - - 0 - - - core - admin_templates - sk_urlremappingfor - URL Remapping For - Переназначения URL для - 30005 - - 0 - - - core - admin_templates - sk_mappedurls - Mapped URLs - Переназначенные URLы - 30005 - - 0 - - - core - admin_templates - sk_addnewurl - Add New URL - Добавить URL - 30005 - - 0 - - - core - admin_templates - sk_added - Added - Добавлено - 30005 + sk_uploadxmlarchive + Upload XML(Archive) Skin Set + Загрузка XML-архива с шаблонами + 31006 30005 0 core admin_templates - sk_editmapping - Edit Mapping - Редактировать переназначение - 30005 + sk_fail_images + IP.Board cannot write to your /public/style_images/ directory which means imports may fail! + Невозможна запись в директорию /public/style_images/, импорт невозможен. + 31006 + 31006 + 0 + + + core + admin_templates + sk_fail_cache + IP.Board cannot write to your /cache/skin_cache/ directory which means imports may fail! + Невозможна запись в директорию /cache/skin_cache/, импорт невозможен. + 31006 + 31006 + 0 + + + core + admin_templates + sk_export + Export + Экспорт + 31006 + 31006 + 0 + + + core + admin_templates + sk_importskinset + Import Skin Set + Импорт шаблонов стиля + 31006 + 31006 + 0 + + + core + admin_templates + sk_cssapphide_desc + Will not include this CSS file if not in the application specified above + Этот CSS не будет включатся, если указанное приложение не активно + 31006 + 31006 + 0 + + + core + admin_templates + sk_cssapphide + + Скрыть, если ключ приложения не совпадает с текущим ? + 31006 + 31006 + 0 + + + core + admin_templates + sk_cssattributes_desc + + + 31006 + 31006 + 0 + + + core + admin_templates + sk_cssattributes + Attributes + Атрибуты + 31006 + 31006 + 0 + + + core + admin_templates + sk_cssmodules_desc + Separate many with comma]]> + Разделяются запятыми.]]> + 31006 + 31006 + 0 + + + core + admin_templates + sk_cssmodules + Module Keys + Ключи модуля + 31006 + 31006 + 0 + + + core + admin_templates + sk_cssapp + Application Key + Ключ приложения + 31006 + 31006 + 0 + + + core + admin_templates + sk_cssapp_desc + Used to tie this CSS file to a particular application + Используется для привязки CSS к определенному приложению + 31006 + 31006 + 0 + + + core + admin_templates + sk_cssposition_desc + Position this css file is inserted in the page + Позиция вставки этого файла + 31006 + 31006 + 0 + + + core + admin_templates + sk_cssposition + Include Position + Включить позицию + 31006 + 31006 + 0 + + + core + admin_templates + sk_add + Add + Добавить + 31006 + 31006 + 0 + + + core + admin_templates + sk_datavariables + Data Variables + Переменные данных + 31006 + 31006 + 0 + + + core + admin_templates + sk_group + Add to Group + Добавить в группу + 31006 + 31006 + 0 + + + core + admin_templates + sk_newgroup + or Create New Group]]> + или Создать новую группу]]> + 31006 + 31006 + 0 + + + core + admin_templates + sk_alphanumericonly + Alphanumerics only, no spaces + Только цифры и буквы, без пробелов + 31006 + 31006 + 0 + + + core + admin_templates + sk_cssname + CSS File Name + Имя CSS-файла + 31006 + 31006 + 0 + + + core + admin_templates + sk_variables + Variables + Переменные + 31006 0 core admin_templates - sk_removemapping - REMOVE Mapping - Удалить переназначение - 30005 + sk_cssprops + CSS Properties + СSS свойства + 31006 + 31006 + 0 + + + core + admin_templates + sk_addbit + Add New Bit + Добавить новый + 31006 + 31006 + 0 + + + core + admin_templates + sk_addcssfile + Add CSS File + Добавить CSS-файл + 31006 + 31006 + 0 + + + core + admin_templates + sk_editvariables + Edit Template Variables + Изменить переменные шаблона + 31006 + 31006 + 0 + + + core + admin_templates + sk_bitname + Template Bit Name + Название шаблона + 31006 + 31006 + 0 + + + core + admin_templates + sk_comparediff + Compare Differences + Сравнить различия + 31006 + 31006 + 0 + + + core + admin_templates + sk_templates + Templates + Шаблоны + 31006 + 30005 + 0 + + + core + admin_templates + sk_css + CSS + CSS + 31006 + 31006 + 0 + + + core + admin_templates + sk_updateproperties + Update properties + Обновить свойства + 31006 + 30005 + 0 + + + core + admin_templates + sk_editcssprops + Edit CSS Properties (Advanced Users) + Редактирование CSS (для опытных) + 31006 + 31006 + 0 + + + core + admin_templates + sk_editcss + Edit CSS + Изменить CSS + 31006 + 31006 + 0 + + + core + admin_templates + sk_edittemplates + Edit Templates + Редактирование шаблонов + 31006 + 31006 + 0 + + + core + admin_templates + sk_editingset + Editing Set + Редактирование стиля + 31006 + 31006 + 0 + + + core + admin_templates + sk_editreplacevar + Edit Replacement Variables + Редактировать макросы + 31006 + 31006 + 0 + + + core + admin_templates + sk_l_new_full + Added Template Bit + Добавленные шаблоны + 31006 + 31006 + 0 + + + core + admin_templates + sk_l_new + New + Новый + 31006 + 31006 + 0 + + + core + admin_templates + sk_l_inherited_full + Inherited changed from parent set + Измененные наследования + 31006 + 31006 + 0 + + + core + admin_templates + sk_l_modified_full + Modified in this set + Измененные в этом стиле + 31006 + 31006 + 0 + + + core + admin_templates + sk_l_inherited + Inherited + Наследованные + 31006 + 31006 + 0 + + + core + admin_templates + sk_l_modified + Modified + Измененные + 31006 + 31006 + 0 + + + core + admin_templates + sk_l_default + Default + По умолчанию + 31006 + 31006 + 0 + + + core + admin_templates + sk_l_default_full + Unmodified in this set + Не измененные в этом стиле + 31006 + 31006 + 0 + + + core + admin_templates + sk_revertreplace + Revert This Replacement + Отменить этот макрос + 31006 0 core admin_templates - sk_noremapping - There are no skin set URL remappings set up for this skin set currently. - Переназначений URL для этого стиля ещё не создано. - 30005 + sk_editreplace + Edit This Replacement + Изменить макрос + 31006 + 31006 + 0 + + + core + admin_templates + sk_removereplace + Remove This Replacement + Удалить этот макрос + 31006 0 core admin_templates - sk_type - Type - Тип - 30005 + sk_legend + Legend + Легенда + 31006 + 31006 + 0 + + + core + admin_templates + sk_replacementadd + Add New Replacement + Добавить макрос + 31006 + + 0 + + + core + admin_templates + sk_replacecontent + Replace Content + Заменяется на + 31006 + + 0 + + + core + admin_templates + sk_replacekey + Replace Key + Ключ замены + 31006 + + 0 + + + core + admin_templates + sk_replaceinset + Replacements In Set + Макросы стиля + 31006 + + 0 + + + core + admin_templates + sk_editskinsettings + Edit Skin Settings + Настройки стиля + 31006 + 31006 + 0 + + + core + admin_templates + sk_edittempcss + + Редактирование шаблонов и CSS + 31006 + 31006 + 0 + + + core + admin_templates + sk_icon + Icon + Иконка + 31006 + 31006 + 0 + + + core + admin_templates + sk_replace_info + {style_images_url} can be used. When displayed in the skin, this tag gets converted into the appropriate image URL for this skin.]]> + {style_images_url} там где необходим URL к изображениям стиля.]]> + 31006 + + 0 + + + core + admin_templates + sk_cancel + Cancel + Отмена + 31006 + 31006 + 0 + + + core + admin_templates + sk_replacements + Replacements + Макросы + 31006 + + 0 + + + core + admin_templates + sk_cssfilename + CSS File Name + Имя CSS-файла + 31006 + 31006 + 0 + + + core + admin_templates + sk_position + Position + Позиция + 31006 + + 0 + + + core + admin_templates + sk_usestyleurl + {style_images_url} inplace of your IMG dir URL.
    For Example: {style_images_url}/image.png is parsed as: %s/image.png]]>
    + {style_images_url} там где нужен URL директории изображений.
    Например: +{style_images_url}/image.png выведет %s/image.png]]>
    + 31006 + + 0 +
    + + core + admin_templates + sk_editing + Editing + Редактирование + 31006 + 31006 + 0 + + + core + admin_templates + sk_differences + Difference Report + Отчет о различиях + 31006 + 31006 + 0 + + + core + admin_templates + sk_modifiedcss + Modified CSS in this skin set + Измененные CSS в этом стиле + 31006 + 31006 + 0 + + + core + admin_templates + sk_newcss + New CSS in this skin set + Новые CSS в этом стиле + 31006 + 31006 + 0 + + + core + admin_templates + sk_revert + Revert + Отменить + 31006 + + 0 + + + core + admin_templates + sk_cssfor + CSS For + CSS для + 31006 + 31006 + 0 + + + core + admin_templates + sk_unmodifiedcss + Unmodified CSS in this skin set + Не измененные CSS в этом стиле + 31006 + 30005 + 0 + + + core + admin_templates + sk_unmodifiedcss2 + Unmodified CSS in this skin set, but modified CSS in parent skin(s) + Не измененные CSS в этом стиле, но измененные в родительском + 31006 + 30005 + 0 + + + core + admin_templates + sk_addnewsettoparent + Add A New Set To This Parent + Добавить стиль для этого родителя + 31006 + 31006 + 0 + + + core + admin_templates + sk_addnewcss + Add New CSS File + Добавить CSS-файл + 31006 + 31006 + 0 + + + core + admin_templates + sk_manageurlmapping + Manage URL Mapping + Управление переназначениями по URL + 31006 + 31006 + 0 + + + core + admin_templates + sk_manageuagentmapping + Manage User Agent Mapping + Управление переназначениями по User Agent + 31006 + 31006 + 0 + + + core + admin_templates + sk_managetempcss + + Управление шаблонами и CSS + 31006 + 31006 + 0 + + + core + admin_templates + sk_managereplacements + Manage Replacements + Управление макросами + 31006 + 31006 + 0 + + + core + admin_templates + sk_pleasebuildthem + Please build them now! + Пожалуйста, обновите их сейчас! + 31006 + + 0 + + + core + admin_templates + sk_editsettings + Edit Settings + Настройки + 31006 + 31006 + 0 + + + core + admin_templates + sk_setname + Set Name + Название + 31006 + + 0 + + + core + admin_templates + sk_outputformat + Output Format + Формат + 31006 + + 0 + + + core + admin_templates + sk_notempcache + No template caches found! + Кеш шаблонов не найден! + 31006 + + 0 + + + core + admin_templates + sk_skinsets + Skin Sets + Стили + 31006 + + 0 + + + core + admin_templates + sk_importnewskin + Import New Skin Set + Импортировать стиль + 31006 + 31006 + 0 + + + core + admin_templates + sk_skinmanagement + Skin Management + Управление стилями + 31006 + + 0 + + + core + admin_templates + sk_addnewrootskin + Add New Skin Set + Создать новый стиль + 31006 + 31006 + 0 + + + core + admin_templates + sk_removeskinset + Remove Skin Set + Удалить стиль + 31006 + + 0 + + + core + admin_templates + sk_pleaseconfirminfo + You are about to remove skin set %s
    There is no way to undo this action, and this is the last confirmation screen. Only press the button below if you mean to do this!]]>
    + Удаление стиля %s
    +Это действие нельзя отменить. Нажмите на кнопку ниже для продолжения.]]>
    + 31006 + + 0 +
    + + core + admin_templates + sk_pleaseconfirm + Please Confirm + Подтвердите выполнение + 31006 + + 0 + + + core + admin_templates + sk_removingset + Removing Set + Удаление стиля + 31006 + + 0 + + + core + admin_templates + sk_rebuildreplacements + Rebuild Replacements + Обновить макросы + 31006 + + 0 + + + core + admin_templates + sk_forapps + For Applications + Для приложений + 31006 + 31006 + 0 + + + core + admin_templates + sk_templatexmllast + templates.xml last updated + templates.xml обновлен + 31006 + 30005 + 0 + + + core + admin_templates + sk_rebuildcss + Rebuild CSS + Обновить CSS + 31006 + + 0 + + + core + admin_templates + sk_rebuild + Rebuild + Обновить + 31006 + + 0 + + + core + admin_templates + sk_rebuildhtml + Rebuild HTML + Обновить HTML + 31006 + + 0 + + + core + admin_templates + sk_rebuildmasterdata + Rebuild Master Skin Data + Обновить данные базового стиля + 31006 + + 0 + + + core + admin_templates + sk_reset + Reset + Переустановить + 31006 + + 0 + + + core + admin_templates + sk_wheretheyuse + Where They Use + Использующих стиль + 31006 + + 0 + + + core + admin_templates + sk_usedefault + Use Default + По умолчанию + 31006 + + 0 + + + core + admin_templates + sk_resetto + Reset For + Переустановить на + 31006 + + 0 + + + core + admin_templates + sk_forums + Forums + Форумов + 31006 + 31006 + 0 + + + core + admin_templates + sk_resetskinusage + Reset Skin Set Usage + Переустановка стилей + 31006 + + 0 + + + core + admin_templates + sk_members + Members + Пользователей + 31006 + 31006 + 0 + + + core + admin_templates + sk_allskinsets + All Skin Sets + Все стили + 31006 + 31006 + 0 + + + core + admin_templates + sk_skintools + Skin Tools + Обновление HTML шаблонов + 31006 + + 0 + + + core + admin_templates + sk_recacheskinsets + Recache Skin Sets + Обновление кеш-файлов + 31006 + + 0 + + + core + admin_templates + sk_setauthorurl + Set Author Website Address + Домашняя страница + 31006 + + 0 + + + core + admin_templates + sk_setauthorname + Set Author Name + Имя + 31006 + + 0 + + + core + admin_templates + sk_useemoset_info + Choose which set of emoticons to assign to this skin. + Выберите, какие смайлики будут использоваться в этом стиле. + 31006 + + 0 + + + core + admin_templates + sk_setauthor + Set Author + Сведения об авторе + 31006 + + 0 + + + core + admin_templates + sk_imageoptions + Image Options + Настройки изображений + 31006 + 31006 + 0 + + + core + admin_templates + sk_useimgdir + Use image directory? + Директория с изображениями + 31006 + + 0 + + + core + admin_templates + sk_useimgdir_info + The image directory will be used in place of {style_images_url} in CSS and replacements. + Директория изображений будет заменяться {style_images_url} в CSS и макросах. + 31006 + + 0 + + + core + admin_templates + sk_useemoset + Use emoticons set? + Используемые смайлики + 31006 + + 0 + + + core + admin_templates + sk_cachecss_info + Warning: Changing this value will re-cache any cached stylesheet information. Please make sure that you have synchronized any cache files with the database.]]> + Внимание: Изменение значения этой опции обновит все кеши CSS стилей. Убедитесь, что все ваши кеши CSS синхронизированы с базой данных.]]> + 31006 + 31006 + 0 + + + core + admin_templates + sk_cachecss + Cache CSS to text files? + Кешировать CSS стили в файл? + 31006 + 31006 + 0 + + + core + admin_templates + sk_cssoptions + CSS Options + Hастройки CSS + 31006 + 31006 + 0 + + + core + admin_templates + sk_hideskin_info + If you are choosing to tie user-agents to this skin, you may wish to remove it from the drop down list + Если стилю назначены user-agent, то, возможно, вы хотите скрыть его в меню выбора стиля. + 31006 + 31006 + 0 + + + core + admin_templates + sk_hideskin + Hide this skin from the drop down list? + Скрыть от пользователей? + 31006 + 31006 + 0 + + + core + admin_templates + sk_skinsetkey + Skin Set Key? + Ключ стиля + 31006 + + 0 + + + core + admin_templates + sk_optional + Optional + Не обязательно + 31006 + + 0 + + + core + admin_templates + sk_selectwhichgroups + Select which groups have access to this skin. + Выберите группы пользователей, которые будут иметь доступ к стилю. + 31006 + + 0 + + + core + admin_templates + sk_selectmorethanone + You may select more than one. + Вы можете выбрать несколько групп. + 31006 + + 0 + + + core + admin_templates + sk_setasdefault + Set as default skin? + Установить как стиль по умолчанию. + 31006 + + 0 + + + core + admin_templates + sk_setasdefault_info + Make this the default skin? + Сделать стилем по умолчанию? + 31006 + + 0 + + + core + admin_templates + sk_skinsetparent + Skin Set Parent? + Родительский стиль + 31006 + + 0 + + + core + admin_templates + sk_defaultalready + Skin set as default already. + Стиль уже является стилем по умолчанию. + 31006 + 31006 + 0 + + + core + admin_templates + sk_temp_diff + Template Differences + Различия шаблонов + 31006 + 30005 + 0 + + + core + admin_templates + sk_selectallgroups + Select ALL current and future groups or... + Доступен всем группам пользователей + 31006 + + 0 + + + core + admin_templates + sk_setoutputformat + Set Output Format + Формат + 31006 + + 0 + + + core + admin_templates + sk_setperms + Set Permissions + Настройки доступа + 31006 + + 0 + + + core + admin_templates + sk_settitle + Set Title + Название + 31006 + + 0 + + + core + admin_templates + sk_basics + Basics + Основные + 31006 + 31006 + 0 + + + core + admin_templates + sk_groups + Groups + Группы + 31006 + 31006 + 0 + + + core + admin_templates + sk_uagentmappingfor + User Agent Mapping for + Переназначения по User Agent для + 31006 + 30005 + 0 + + + core + admin_templates + sk_versions + Versions + Версии + 31006 + + 0 + + + core + admin_templates + sk_useragents + User Agents + User Agents + 31006 0 @@ -20625,1639 +21797,1857 @@ Вы можете назначить группы или отдельных агентов к стилю.
    ЗАМЕЧАНИЕ: Вы можете назначить одинаковый user-agent к разным стилям. Если это произойдет, то IP.Board выберет первый доступный стиль, что может не совпасть с вашим выбором.]]>
    - 30005 + 31006 0 core admin_templates - sk_versions - Versions - Версии - 30005 + sk_noremapping + There are no skin set URL remappings set up for this skin set currently. + Переназначений URL для этого стиля ещё не создано. + 31006 0 core admin_templates - sk_uagentmappingfor - User Agent Mapping for - Переназначения по User Agent для - 30005 + sk_removemapping + REMOVE Mapping + Удалить переназначение + 31006 0 core admin_templates - sk_groups - Groups - Группы - 30005 + sk_editmapping + Edit Mapping + Редактировать переназначение + 31006 + 31006 + 0 + + + core + admin_templates + sk_mappedurls + Mapped URLs + Переназначенные URLы + 31006 + 31006 + 0 + + + core + admin_templates + sk_added + Added + Добавлено + 31006 + 31006 + 0 + + + core + admin_templates + sk_addnewurl + Add New URL + Добавить URL + 31006 + 31006 + 0 + + + core + admin_templates + sk_urlremappingfor + URL Remapping For + Переназначения URL для + 31006 + + 0 + + + core + admin_templates + sk_url + URL + URL + 31006 30005 0 core admin_templates - sk_setperms - Set Permissions - Настройки доступа - 30005 + sk_url_info + Enter the string to match in the query string + Введите строку для совпадения со строкой запроса + 31006 0 core admin_templates - sk_useragents - User Agents - User Agents - 30005 - + sk_type_info + + + 31006 + 30005 0 core admin_templates - sk_basics - Basics - Основные - 30005 - + sk_title_info + The title is for your information only so you can distinguish between items. + Необходим для различия переназначений в списке. + 31006 + 30005 0 core admin_templates - sk_setoutputformat - Set Output Format - Формат - 30005 - + sk_type + Type + Тип + 31006 + 30005 0 core admin_templates - sk_settitle - Set Title + sk_title + Title Название - 30005 - - 0 - - - core - admin_templates - sk_selectallgroups - Select ALL current and future groups or... - Доступен всем группам пользователей - 30005 - - 0 - - - core - admin_templates - sk_selectmorethanone - You may select more than one. - Вы можете выбрать несколько групп. - 30005 - - 0 - - - core - admin_templates - sk_setasdefault - Set as default skin? - Установить как стиль по-умолчанию. - 30005 - - 0 - - - core - admin_templates - sk_selectwhichgroups - Select which groups have access to this skin. - Выберите группы пользователей, которые будут иметь доступ к стилю. - 30005 - - 0 - - - core - admin_templates - sk_defaultalready - Skin set as default already. - Стиль уже является стилем по-умолчанию. - 30005 - - 0 - - - core - admin_templates - sk_setasdefault_info - Make this the default skin? - Сделать стилем по умолчанию? - 30005 - - 0 - - - core - admin_templates - sk_temp_diff - Template Differences - Различия шаблонов - 30005 - - 0 - - - core - admin_templates - sk_optional - Optional - Не обязательно - 30005 - - 0 - - - core - admin_templates - sk_skinsetparent - Skin Set Parent? - Родительский стиль - 30005 - - 0 - - - core - admin_templates - sk_skinsetkey - Skin Set Key? - Ключ стиля - 30005 - - 0 - - - core - admin_templates - sk_hideskin - Hide this skin from the drop down list? - Скрыть от пользователей? - 30005 + 31006 30005 0 core admin_templates - sk_hideskin_info - If you are choosing to tie user-agents to this skin, you may wish to remove it from the drop down list - Если стилю назначены user-agent, то, возможно, вы хотите скрыть его в меню выбора стиля. - 30005 - 30005 - 0 - - - core - admin_templates - sk_cachecss_info - Warning: Changing this value will re-cache any cached stylesheet information. Please make sure that you have synchronized any cache files with the database.]]> - Внимание: Изменение значения этой опции обновит все кеши CSS стилей. Убедитесь, что все ваши кеши CSS синхронизированы с базой данных.]]> - 30005 + sk_urlmapfor + URL Map For + Переназначения URL для + 31006 0 core admin_templates - sk_cssoptions - CSS Options - Hастройки CSS - 30005 + sk_generalsettings + General Settings + Основные настройки + 31006 + 31006 + 0 + + + core + admin_templates + sk_selectskinxml_info + + Будет произведено сравнение с HTML шаблонами главного стиля + 31006 0 core admin_templates - sk_cachecss - Cache CSS to text files? - Кешировать CSS стили в файл? - 30005 + sk_selectskinxml + Select a valid XML skin export file from your computer. + Выберите корректный файл «ipb_templates.xml». + 31006 0 core admin_templates - sk_useemoset_info - Choose which set of emoticons to assign to this skin. - Выберите, какие смайлики будут использоваться в этом стиле. - 30005 + sk_skipnewmiss_info + If you are comparing an old ipb_templates.xml file from an older IPB release, then you may wish to disable this. If you are comparing an XML file from a customized skin set, you should enable this. + + 31006 0 core admin_templates - sk_imageoptions - Image Options - Настройки изображений - 30005 - 30005 + sk_enterdifftitle + Enter a new skin difference title + Введите название + 31006 + 31006 0 core admin_templates - sk_useemoset - Use emoticons set? - Используемые смайлики - 30005 + sk_skipnewmiss + Skip all new/missing template bits? + Пропускать все новые/ошибочные шаблоны? + 31006 0 core admin_templates - sk_useimgdir_info - The image directory will be used in place of {style_images_url} in CSS and replacements. - Директория изображений будет заменяться {style_images_url} в CSS и макросах. - 30005 + sk_createnewskindiff + Create New Skin Differences Report + Создать новый отчет сравнения стилей + 31006 + 31006 + 0 + + + core + admin_templates + sk_removediffresults + REMOVE Difference Results + УДАЛИТЬ результаты сравнения + 31006 0 core admin_templates - sk_setauthor - Set Author - Сведения об авторе - 30005 + sk_createhtmlexport + Create HTML Export + Экспортировать в HTML + 31006 + 31006 + 0 + + + core + admin_templates + sk_import + Import + Импорт + 31006 + 31006 + 0 + + + core + admin_templates + sk_viewdiffresults + View Merge Results + Просмотр результатов сравнения + 31006 0 core admin_templates - sk_useimgdir - Use image directory? - Директория с изображениями - 30005 - - 0 - - - core - admin_templates - sk_setauthorurl - Set Author Website Address - Домашняя страница - 30005 - - 0 - - - core - admin_templates - sk_setauthorname - Set Author Name - Имя - 30005 - - 0 - - - core - admin_templates - sk_skintools - Skin Tools - Обновление HTML шаблонов - 30005 - - 0 - - - core - admin_templates - sk_allskinsets - All Skin Sets - Все стили - 30005 - - 0 - - - core - admin_templates - sk_recacheskinsets - Recache Skin Sets - Обновление кеш-файлов - 30005 - - 0 - - - core - admin_templates - sk_forums - Forums - Форумов - 30005 - 30005 - 0 - - - core - admin_templates - sk_usedefault - Use Default - По-умолчанию - 30005 - - 0 - - - core - admin_templates - sk_members - Members - Пользователей - 30005 - - 0 - - - core - admin_templates - sk_resetskinusage - Reset Skin Set Usage - Переустановка стилей - 30005 - - 0 - - - core - admin_templates - sk_resetto - Reset For - Переустановить на - 30005 - - 0 - - - core - admin_templates - sk_reset - Reset - Переустановить - 30005 - - 0 - - - core - admin_templates - sk_wheretheyuse - Where They Use - Использующих стиль - 30005 - - 0 - - - core - admin_templates - sk_rebuildmasterdata - Rebuild Master Skin Data - Обновить данные базового стиля - 30005 - - 0 - - - core - admin_templates - sk_rebuild - Rebuild - Обновить - 30005 - - 0 - - - core - admin_templates - sk_rebuildhtml - Rebuild HTML - Обновить HTML - 30005 - - 0 - - - core - admin_templates - sk_rebuildreplacements - Rebuild Replacements - Обновить макросы - 30005 - - 0 - - - core - admin_templates - sk_rebuildcss - Rebuild CSS - Обновить CSS - 30005 - - 0 - - - core - admin_templates - sk_templatexmllast - templates.xml last updated - templates.xml обновлен - 30005 - - 0 - - - core - admin_templates - sk_forapps - For Applications - Для приложений - 30005 - 30005 - 0 - - - core - admin_templates - sk_outputformat - Output Format - Формат - 30005 - - 0 - - - core - admin_templates - sk_removingset - Removing Set - Удаление стиля - 30005 - - 0 - - - core - admin_templates - sk_notempcache - No template caches found! - Кеш шаблонов не найден! - 30005 - - 0 - - - core - admin_templates - sk_setname - Set Name + sk_difftitle + Title Название - 30005 + 31006 + 31006 + 0 + + + core + admin_templates + sk_created + Created + Создано + 31006 + 31006 + 0 + + + core + admin_templates + sk_skindiffreports + Template Merge Reports + Отчет сравнения стилей + 31006 0 core admin_templates - sk_pleaseconfirm - Please Confirm - Подтвердите выполнение - 30005 + sk_clickviewreport + Click here to view the report]]> + Нажмите здесь для просмотра отчета]]> + 31006 + 31006 + 0 + + + core + admin_templates + sk_processing + Processing + Обработка + 31006 0 core admin_templates - sk_pleaseconfirminfo - You are about to remove skin set %s
    There is no way to undo this action, and this is the last confirmation screen. Only press the button below if you mean to do this!]]>
    - Удаление стиля %s
    -Это действие нельзя отменить. Нажмите на кнопку ниже для продолжения.]]>
    - 30005 + sk_bitsof + template bits of %s processed + шаблонов %s обработано + 31006 + 31006 + 0 +
    + + core + admin_templates + sk_error + Error + Ошибка + 31006 + 31006 + 0 + + + core + admin_templates + sk_skindiff + Skin Differences + Различия стилей + 31006 0 core admin_templates - sk_editsettings - Edit Settings - Настройки - 30005 - 30005 - 0 - - - core - admin_templates - sk_managetempcss - - Управление шаблонами и CSS - 30005 + sk_nodiffs + No skin differences to show + Нет отчетов сравнения стилей + 31006 0 core admin_templates - sk_managereplacements - Manage Replacements - Управление макросами - 30005 + sk_viewdiffs + View Differences + Просмотр различий + 31006 0 core admin_templates - sk_pleasebuildthem - Please build them now! - Пожалуйста, обновите их сейчас! - 30005 + sk_changed + Changed + Изменен + 31006 + 31006 + 0 + + + core + admin_templates + sk_skindiffreport + Template Merge Report + Отчет сравнения стилей + 31006 0 core admin_templates - sk_skinsets - Skin Sets - Стили - 30005 - - 0 - - - core - admin_templates - sk_skinmanagement - Skin Management - Управление стилями - 30005 - - 0 - - - core - admin_templates - sk_addnewrootskin - Add New Skin Set - Создать новый стиль - 30005 - - 0 - - - core - admin_templates - sk_removeskinset - Remove Skin Set - Удалить стиль - 30005 - - 0 - - - core - admin_templates - sk_manageuagentmapping - Manage User Agent Mapping - Управление переназначениями по User Agent - 30005 - - 0 - - - core - admin_templates - sk_manageurlmapping - Manage URL Mapping - Управление переназначениями по URL - 30005 - - 0 - - - core - admin_templates - sk_cssfor - CSS For - CSS для - 30005 - - 0 - - - core - admin_templates - sk_unmodifiedcss - Unmodified CSS in this skin set - Не измененные CSS в этом стиле - 30005 - - 0 - - - core - admin_templates - sk_addnewsettoparent - Add A New Set To This Parent - Добавить стиль для этого родителя - 30005 - - 0 - - - core - admin_templates - sk_addnewcss - Add New CSS File - Добавить CSS-файл - 30005 - 30005 - 0 - - - core - admin_templates - sk_unmodifiedcss2 - Unmodified CSS in this skin set, but modified CSS in parent skin(s) - Не измененные CSS в этом стиле, но измененные в родительском - 30005 - - 0 - - - core - admin_templates - sk_modifiedcss - Modified CSS in this skin set - Измененные CSS в этом стиле - 30005 - - 0 - - - core - admin_templates - sk_editing - Editing - Редактирование - 30005 - - 0 - - - core - admin_templates - sk_differences - Difference Report - Отчет о различиях - 30005 - - 0 - - - core - admin_templates - sk_usestyleurl - {style_images_url} inplace of your IMG dir URL.
    For Example: {style_images_url}/image.png is parsed as: %s/image.png]]>
    - {style_images_url} там где нужен URL директории изображений.
    Например: -{style_images_url}/image.png выведет %s/image.png]]>
    - 30005 - - 0 -
    - - core - admin_templates - sk_cssfilename - CSS File Name - Имя CSS-файла - 30005 - - 0 - - - core - admin_templates - sk_position - Position - Позиция - 30005 - - 0 - - - core - admin_templates - sk_replaceinset - Replacements In Set - Макросы стиля - 30005 - - 0 - - - core - admin_templates - sk_edittempcss - - Редактирование шаблонов и CSS - 30005 - 30005 - 0 - - - core - admin_templates - sk_editskinsettings - Edit Skin Settings - Настройки стиля - 30005 - 30005 - 0 - - - core - admin_templates - sk_icon - Icon - Иконка - 30005 - 30005 - 0 - - - core - admin_templates - sk_replace_info - {style_images_url} can be used. When displayed in the skin, this tag gets converted into the appropriate image URL for this skin.]]> - {style_images_url} там где необходим URL к изображениям стиля.]]> - 30005 - - 0 - - - core - admin_templates - sk_revert - Revert - Отменить - 30005 - - 0 - - - core - admin_templates - sk_newcss - New CSS in this skin set - Новые CSS в этом стиле - 30005 - - 0 - - - core - admin_templates - sk_legend - Legend - Легенда - 30005 - 30005 - 0 - - - core - admin_templates - sk_replacecontent - Replace Content - Заменяется на - 30005 - - 0 - - - core - admin_templates - sk_replacements - Replacements - Макросы - 30005 - - 0 - - - core - admin_templates - sk_replacekey - Replace Key - Ключ замены - 30005 - - 0 - - - core - admin_templates - sk_removereplace - Remove This Replacement - Удалить этот макрос - 30005 - - 0 - - - core - admin_templates - sk_cancel - Cancel - Отмена - 30005 - - 0 - - - core - admin_templates - sk_replacementadd - Add New Replacement - Добавить макрос - 30005 - - 0 - - - core - admin_templates - sk_revertreplace - Revert This Replacement - Отменить этот макрос - 30005 - - 0 - - - core - admin_templates - sk_l_default - Default - По-умолчанию - 30005 - 30005 - 0 - - - core - admin_templates - sk_editreplace - Edit This Replacement - Изменить макрос - 30005 - - 0 - - - core - admin_templates - sk_l_default_full - Unmodified in this set - Не измененные в этом стиле - 30005 - 30005 - 0 - - - core - admin_templates - sk_l_modified - Modified - Измененные - 30005 - - 0 - - - core - admin_templates - sk_l_modified_full - Modified in this set - Измененные в этом стиле - 30005 - - 0 - - - core - admin_templates - sk_l_inherited - Inherited - Наследованные - 30005 - - 0 - - - core - admin_templates - sk_l_inherited_full - Inherited changed from parent set - Измененные наследования - 30005 - - 0 - - - core - admin_templates - sk_l_new + sk_new New Новый - 30005 + 31006 + 31006 + 0 + + + core + admin_templates + sk_howmanytemps + %s new template bits, %s changed template bits + Новых шаблонов: %s , измененных шаблонов: %s + 31006 + 31006 + 0 + + + core + admin_templates + sk_regularexpression + Regular Expression + Включить регулярные выражения? + 31006 0 core admin_templates - sk_l_new_full - Added Template Bit - Добавленные шаблоны - 30005 - - 0 - - - core - admin_templates - sk_editreplacevar - Edit Replacement Variables - Редактировать макросы - 30005 + sk_title_export + export + экспорт + 31006 30005 0 core admin_templates - sk_editingset - Editing Set - Редактирование стиля - 30005 + sk_exported + Exported + Экспортировано + 31006 + 31006 + 0 + + + core + admin_templates + sk_replacewith + Replace With + Заменить на... + 31006 0 core admin_templates - sk_edittemplates - Edit Templates - Редактирование шаблонов - 30005 + sk_replacewith_info + (Optional: Ommitting will perform just a search) + (Опционально: Если вы хотите сделать замену) + 31006 + + 0 + + + core + admin_templates + sk_searchininfo + Search in selected set and all parents including the master set. + Также искать в родительских стилях, включая главный стиль. + 31006 + + 0 + + + core + admin_templates + sk_searchfor + Search For + Поиск по... + 31006 + + 0 + + + core + admin_templates + sk_searchandreplace + Search and Replace + Поиск и замена + 31006 + + 0 + + + core + admin_templates + sk_selectskinset + Select a skin set + Выберите стиль + 31006 + + 0 + + + core + admin_templates + sk_searchreplaceinfo + + + 31006 + + 0 + + + core + admin_templates + sk_run + Run + Запуск + 31006 + + 0 + + + core + admin_templates + sk_save + Save + Сохранить + 31006 + + 0 + + + core + admin_templates + sk_continue + Continue + Искать и заменить + 31006 + 31006 + 0 + + + core + admin_templates + sk_submit + Submit + Установить + 31006 30005 0 core admin_templates - sk_editcss - Edit CSS - Изменить CSS - 30005 + sk_replaceselected + Replace Selected + Заменить выбранные + 31006 0 core admin_templates - sk_editcssprops - Edit CSS Properties (Advanced Users) - Редактирование CSS (для опытных) - 30005 - - 0 - - - core - admin_templates - sk_updateproperties - Update properties - Обновить свойства - 30005 - - 0 - - - core - admin_templates - sk_comparediff - Compare Differences - Сравнить различия - 30005 - - 0 - - - core - admin_templates - sk_css - CSS - CSS - 30005 - - 0 - - - core - admin_templates - sk_templates - Templates - Шаблоны - 30005 - - 0 - - - core - admin_templates - sk_cssprops - CSS Properties - СSS свойства - 30005 - - 0 - - - core - admin_templates - sk_variables - Variables - Переменные - 30005 - - 0 - - - core - admin_templates - sk_addbit - Add New Bit - Добавить новый - 30005 + sk_uploadlogo_info + Browse your computer for a logo to upload. Filename must end in .gif, .jpg, .jpeg or .png + Выберите файл для загрузки с вашего компьютера. Файл должен иметь разрешение .gif, .jpg, .jpeg или .png + 31006 30005 0 core admin_templates - sk_addcssfile - Add CSS File - Добавить CSS-файл - 30005 + sk_uploadlogo + OR upload a new logo]]> + ИЛИ загрузить новый логотип]]> + 31006 30005 0 core admin_templates - sk_editvariables - Edit Template Variables - Изменить переменные шаблона - 30005 + sk_urlnewlogo_info + You can use a relative URL or a full URL starting with http:// + Вы можете использовать относительные ссылки или полный URL, начинающийся с http:// + 31006 + + 0 + + + core + admin_templates + sk_urlnewlogo + URL to new logo + Ссылка на логотип + 31006 + + 0 + + + core + admin_templates + sk_applywhichset_info + This will change the replacement macro for your board header. You can revert at any time. + Если вы уже изменяли шапку стиля из «Управления шаблонами», то это действие удалит все ваши изменения. + 31006 + 31006 + 0 + + + core + admin_templates + sk_applywhichset + Apply to which skin set? + Применить к следующему набору стилей: + 31006 + 31006 + 0 + + + core + admin_templates + sk_elc_warning + WARNING: Unable to upload into '/public/style_images/'. If you wish to upload a file, please CHMOD that directory now!]]> + ВНИМАНИЕ: Невозможно загрузить файл в '/public/style_images/'. Если вы хотите загрузить файл, то измените права доступа к этой директории.]]> + 31006 + 31006 + 0 + + + core + admin_templates + sk_addedhtml + Added HTML + Добавленный HTML + 31006 + 31006 + 0 + + + core + admin_templates + sk_easylogochanger + Easy Logo Changer + Простая смена логотипа + 31006 + 31006 + 0 + + + core + admin_templates + sk_close + Close + Закрыть + 31006 + 31006 + 0 + + + core + admin_templates + sk_removedhtml + Removed HTML + Удаленный HTML + 31006 + + 0 + + + core + admin_templates + sk_ajax_noperm + You do not have permission to use this function + У вас нет прав для использования этой функции + 31006 + 31006 + 0 + + + core + admin_templates + sk_writemaster + + Записать шаблоны в директорию базового стиля + 31006 30005 0 core admin_templates - sk_bitname - Template Bit Name - Название шаблона - 30005 - + el_log + Logo Changed and Skin Set Caches Rebuilt (Skin ID: %s ) + Логотип изменен, кеш стиля обновлен (ID стиля: %s) + 31006 + 31006 0 core admin_templates - sk_cssname - CSS File Name - Имя CSS-файла - 30005 - + el_wrongformat + The file you uploaded is not in the correct format. It has to be one of the following: GIF, JPG/JPEG, or PNG. + Загруженный файл имеет не верное расширение. Оно должно быть одним из следующих: GIF, JPG/JPEG, PNG. + 31006 + 31006 0 core admin_templates - sk_cssposition_desc - Position this css file is inserted in the page - Позиция вставки этого файла - 30005 - + el_chmod + + + 31006 + 31006 0 core admin_templates - sk_cssposition - Include Position - Включить позицию - 30005 - - 0 - - - core - admin_templates - sk_datavariables - Data Variables - Переменные данных - 30005 - - 0 - - - core - admin_templates - sk_add - Add - Добавить - 30005 + ua_nav2 + Manage User Agents in + Управление User Agents в + 31006 30005 0 core admin_templates - sk_newgroup - or Create New Group]]> - или Создать новую группу]]> - 30005 + sm_skinnone + Select One + Выберите + 31006 0 core admin_templates - sk_group - Add to Group - Добавить в группу - 30005 + el_noskinid + No skin set ID was passed. Please try again, ensuring you select a skin + Не передан ID стиля. Попробуйте еще раз. + 31006 + 31006 + 0 + + + core + admin_templates + el_nofile + You must either upload a new logo or enter a URL for a new logo. Please try again + Вы должны либо загрузить новый логотип, либо ввести ссылку на существующий + 31006 + 31006 + 0 + + + core + admin_templates + ua_saved + User Agent Settings Saved + Настройки user agent сохранены + 31006 30005 0 core admin_templates - sk_alphanumericonly - Alphanumerics only, no spaces - Только цифры и буквы, без пробелов - 30005 - - 0 - - - core - admin_templates - sk_cssapp - Application Key - Ключ приложения - 30005 - - 0 - - - core - admin_templates - sk_cssapp_desc - Used to tie this CSS file to a particular application - Используется для привязки CSS к определенному приложению - 30005 - - 0 - - - core - admin_templates - sk_cssattributes_desc - - - 30005 - - 0 - - - core - admin_templates - sk_cssmodules - Module Keys - Ключи модуля - 30005 - - 0 - - - core - admin_templates - sk_cssmodules_desc - Separate many with comma]]> - Разделяются запятыми.]]> - 30005 - - 0 - - - core - admin_templates - sk_cssattributes - Attributes - Атрибуты - 30005 - - 0 - - - core - admin_templates - sk_cssapphide - - Скрыть, если ключ приложения не совпадает с текущим ? - 30005 - - 0 - - - core - admin_templates - sk_cssapphide_desc - Will not include this CSS file if not in the application specified above - Этот CSS не будет включатся, если указанное приложение не активно - 30005 - - 0 - - - core - admin_templates - sk_export - Export - Экспорт - 30005 + ua_nav1 + + Управление стилями и шаблонами + 31006 30005 0 core admin_templates - sk_fail_cache - IP.Board cannot write to your /cache/skin_cache/ directory which means imports may fail! - Невозможна запись в директорию /cache/skin_cache/, импорт невозможен. - 30005 + um_nav2 + Manage URL Remapping in + Управление переназначениями URL для + 31006 30005 0 core admin_templates - sk_importskinset - Import Skin Set - Импорт шаблонов стиля - 30005 + um_nav1 + + Управление стилями и шаблонами + 31006 30005 0 core admin_templates - sk_uploadxmlarchive - Upload XML(Archive) Skin Set - Загрузка XML-архива с шаблонами - 30005 - - 0 - - - core - admin_templates - sk_fail_images - IP.Board cannot write to your /public/style_images/ directory which means imports may fail! - Невозможна запись в директорию /public/style_images/, импорт невозможен. - 30005 + um_editremap + Edit Remapping + Редактировать переназначения + 31006 30005 0 core admin_templates - sk_ornamearchive - OR enter the filename of the XMLArchive]]> - ИЛИ введите название файла-архива]]> - 30005 - - 0 - - - core - admin_templates - sk_intoroot - - Этот файл должен быть загружен в корневую директорию вашего форума. - 30005 + um_savechanges + Save Changes + Сохранить + 31006 30005 0 core admin_templates - sk_xmlorxmlgz - - - 30005 - - 0 - - - core - admin_templates - sk_newsetname - New Skin Set Name - Название стиля: - 30005 - - 0 - - - core - admin_templates - sk_xr_info - Replacements are exported into XML format. This option may not work properly if your server has safemode enabled. - Если сервер работает в безопасном режиме - эта опция может работать некоректно.]]> - 30005 - - 0 - - - core - admin_templates - sk_xi_info - Image sets are exported into the XMLarchive format. This is not suitable for safemode users and in such a case we recommend you manually download via FTP and ZIP the images. - Изображения экпортируются в формате XMLarchive. Этот метод не подходит, если используется безопасный режим PHP. Для таких случаев рекомендуется скачать изображения вручную через FTP. - 30005 - - 0 - - - core - admin_templates - sk_xs_info2 - Please choose how deep this export should look for customizations. - Опция позволяет установить глубину экспорта изменений стиля. - 30005 - - 0 - - - core - admin_templates - sk_xs_info - Please select which skin set (HTML templates, CSS and Replacements) you wish to export. - Пожалуйста, выберите стиль для экспорта. - 30005 - - 0 - - - core - admin_templates - sk_exportreplaces - Export Replacements - Экспорт макросов - 30005 + um_noid + No ID was passed. Please try again. + Не указан ID. Попробуйте ещё раз. + 31006 30005 0 core admin_templates - sk_exportimages - Export Skin Images - Экспорт изображений - 30005 + um_isexactly + Is Exactly + В точности + 31006 30005 0 core admin_templates - sk_fromskinset - From Skin Set - Какие макросы экспортировать? - 30005 + um_addnew + Add New Skin Remap + Добавить переназначение + 31006 30005 0 core admin_templates - sk_imageset - Image Set - Какие изображения экспортировать? - 30005 + um_contains + Contains + Содержит + 31006 30005 0 core admin_templates - sk_skinset - Skin Set - Какой стиль экспортировать? - 30005 - - 0 - - - core - admin_templates - sk_exporttemplates - Export Skin Templates - Экспорт стилей - 30005 + um_added + Skin Remap Added + Переназначение для стиля добавлено + 31006 30005 0 core admin_templates - sk_uploadxmlreplace - Upload XML Replacements Set - Загрузка XML-архива с макросами - 30005 - - 0 - - - core - admin_templates - sk_importreplacements - Import Replacements - Импорт макросов - 30005 + um_edited + Skin Remap Edited + Переназначение для стиля изменено + 31006 30005 0 core admin_templates - sk_none - None - Никакой - 30005 - - 0 - - - core - admin_templates - sk_applytoskin_info - If you do not wish to assign to a skin set, leave on -None-. - Если вы не хотите сейчас выбрать это, выберите «Никакой». - 30005 - - 0 - - - core - admin_templates - sk_applytoskin - Apply To Skin Set - Какой стиль использовать с импортируемой директорией? - 30005 - - 0 - - - core - admin_templates - sk_newimgsetname - New Image Set Name - Название директории изображений: - 30005 - - 0 - - - core - admin_templates - sk_uploadimgxml - Upload XML(Archive) Image Set - Загрузка XML-архива с изображениями - 30005 - - 0 - - - core - admin_templates - sk_importimgset - Import Image Set - Импорт изображений - 30005 + um_removed + Remapping removed + Переназначение удалено + 31006 30005 0 core admin_templates - sk_useimageset_info - If you have not yet uploaded the image set, leave on -None-. - Если вы не хотите сейчас выбрать это, выберите «Никакую». - 30005 - - 0 - - - core - admin_templates - sk_useimageset - Use Image Set - Какую директорию с изображениями использовать в этом стиле? - 30005 - - 0 - - - core - admin_templates - sk_leaveblank - Leave blank to use the name in the XMLArchive. - Оставьте поле пустым, если хотите, чтобы использовать название шаблонов из XML-архива - 30005 + um_entireform + You must complete the entire form. Please try again. + Форма должна быть заполнена полностью. + 31006 30005 0 core admin_templates - ss_importexport - Skin Import/Export - Импорт/Экспорт стилей - 30006 + to_templatetools + Template Tools + Инструменты + 31006 + 30005 + 0 + + + core + admin_templates + to_rebuildcomplete + Rebuild complete + Обновление завершено + 31006 + 30005 + 0 + + + core + admin_templates + to_recachedset + Recached set: + Обновлен кеш стиля: + 31006 + 30005 + 0 + + + core + admin_templates + to_phprebuilt + PHP Templates Rebuilt For: + PHP шаблоны пересозданы для: + 31006 + 30005 + 0 + + + core + admin_templates + to_noapps + No apps to rebuild! + Нет приложения для обновления. + 31006 + 30005 + 0 + + + core + admin_templates + to_masterhtml + + + 31006 + 30005 + 0 + + + core + admin_templates + to_membersupdated + members updated + пользователей обновлено + 31006 + 30005 + 0 + + + core + admin_templates + to_forumsupdated + forums updated + форумов обновлено + 31006 + 30005 + 0 + + + core + admin_templates + to_masterskinrebuilt + Master rebuilt for set for set ID: + Базовый стиль обновлен для ID: + 31006 + 30005 + 0 + + + core + admin_templates + to_resultxmlimp + Result of template XML importing... + Результат XML импорта шаблонов... + 31006 + 30005 + 0 + + + core + admin_templates + to_masterreplace + Master Replacements Rebuilt + Базовые макросы обновлены + 31006 + 30005 + 0 + + + core + admin_templates + to_mastercssrebuilt + + + 31006 + 30005 + 0 + + + core + admin_templates + to_resultrebuild + Skin data successfully imported + Стиль успешно импортирован + 31006 + 30011 + 0 + + + core + admin_templates + to_alldone + All Done! + Завершено! + 31006 + 30005 + 0 + + + core + admin_templates + to_resultbuild + Result of building for release... + Результат сборки для релиза... + 31006 + 30005 + 0 + + + core + admin_templates + to_xmltempsavedout + XML Templates Saved Out + XML шаблоны сохранены + 31006 + 30005 + 0 + + + core + admin_templates + to_wrote + Wrote + Записано + 31006 + 30005 + 0 + + + core + admin_templates + to_replacerecached + Replacements recached for + Завершено кеширование макросов для + 31006 + 30005 + 0 + + + core + admin_templates + to_couldnotwrite + Could not write + Невозможна запись + 31006 + 30005 + 0 + + + core + admin_templates + to_writetoprs + Cannot write to /public/resources/skins/ + Невозможна запись в /public/resources/skins/ + 31006 + 30005 + 0 + + + core + admin_templates + te_nav1 + + Управление стилями и шаблонами + 31006 + 30005 + 0 + + + core + admin_templates + te_nav2 + Manage Templates in + Управление шаблонами в + 31006 + 30005 + 0 + + + core + admin_templates + to_recache_done + Skin set(s) recached successfully + Кеширование стилей завершено + 31006 + 30005 + 0 + + + core + admin_templates + ss_saveset + Save Set + Сохранить стиль + 31006 + 30005 + 0 + + + core + admin_templates + ss_manageskinsets + Manage Skin Sets + Управление стилем + 31006 + 30005 + 0 + + + core + admin_templates + ss_addnewset + Add New Set + Создание нового стиля + 31006 0 + + core + admin_templates + ss_edituserset + Edit User Set + Редактирование стиля + 31006 + + 0 + + + core + admin_templates + ss_skinsetsaved + Skin Set Saved + Настройки стиля сохранены + 31006 + 30005 + 0 + + + core + admin_templates + ss_unavailable + Unavailable, IP.Board cannot write into your 'public/style_css' folder]]> + Недоступно, IP.Board не может записывать файлы в директорию 'public/style_css' ]]> + 31006 + 30005 + 0 + + + core + admin_templates + ss_emodirnoexist + The emoticons directory you selected does not exist. + Выбранная директория смайликов не существует. + 31006 + + 0 + + + core + admin_templates + ss_dontmoveintoself + You cannot move this skin set into its own parent tree + Нельзя наследовать стиль от самого себя + 31006 + + 0 + + + core + admin_templates + ss_imgdirnoexist + The image directory you selected does not exist. + Выбранная директория изображений не существует. + 31006 + + 0 + + + core + admin_templates + ss_specifyname + You must specify a set name. + Вы должны ввести имя для этого пакета. + 31006 + 30005 + 0 + + + core + admin_templates + ss_nogroupaccess + No group has access to this skin. At least ensure that one group has access. + Хотя бы одна группа пользователей должна иметь доступ к стилю. + 31006 + 30005 + 0 + + + core + admin_templates + ss_setremoved + Set Removed + Стиль удален + 31006 + 30005 + 0 + + + core + admin_templates + ss_noid + No ID was passed. Please try again. + ID не найден. Попробуйте еще раз. + 31006 + 30005 + 0 + + + core + admin_templates + ss_masterwritten + Master skin has been written + Базовый стиль записан + 31006 + 30005 + 0 + + + core + admin_templates + ss_cannotremove + Cannot remove this skin set + Невозможно удалить стиль + 31006 + + 0 + + + core + admin_templates + ss_authkeyerror + Authorization Key Error + Ошибка ключа авторизации + 31006 + + 0 + + + core + admin_templates + sd_nocontent + There was no content in the file to process + Файл не был загружен + 31006 + 31006 + 0 + + + core + admin_templates + sd_noid + No skin ID passed. Please try again. + Не найден ID стиля. Попробуйте еще раз. + 31006 + 31006 + 0 + + + core + admin_templates + sd_title + Comparison from skin set: + Сравнение для стиля: + 31006 + 31006 + 0 + + + core + admin_templates + sd_entertitle + You must enter a title + Вы должны ввести название + 31006 + 31006 + 0 + + + core + admin_templates + sd_removed + Differences report removed + Отчет об изменениях удален + 31006 + 31006 + 0 + + + core + admin_templates + sr_nomatches + No Matches Found! + Не найдено ни одной записи, соответствующей искомой строке. Попробуйте еще раз и расширьте диапазон поиска. + 31006 + + 0 + + + core + admin_templates + sd_nosession + Could not get the current template compare session. + Невозможно получить текущую сессию сравнения шаблонов. + 31006 + 31006 + 0 + + + core + admin_templates + re_nav2 + Manage Replacements in + Редактировать макросы в + 31006 + 31006 + 0 + + + core + admin_templates + sr_sometext + You must enter some text to search by + Вы не ввели значение для поиска. + 31006 + + 0 + + + core + admin_templates + re_nav1 + + Управление стилями и шаблонами + 31006 + 31006 + 0 + + + core + admin_templates + ie_ex_skin_p + Export customizations in this skin and any parent skins + Экспортировать изменения этого стиля и родительских + 31006 + 31006 + 0 + + + core + admin_templates + ie_none + - None - + Никакую + 31006 + 31006 + 0 + + + core + admin_templates + ie_ex_skin + Export customizations in this skin only + Экспортировать изменения только этого стиля + 31006 + 31006 + 0 + + + core + admin_templates + ie_set_upgraded + %s template(s) edited, %s replacement(s) edited, %s CSS file(s) edited.]]> + шаблонов добавлено: %s, заменено: %s, CSS файлов добавлено: %s]]> + 31006 + 31006 + 0 + + + core + admin_templates + ie_set_imported + %s template(s) added, %s replacement(s) added, %s CSS file(s) added.]]> + шаблонов добавлено: %s, заменено: %s, CSS файлов добавлено: %s]]> + 31006 + 31006 + 0 + + + core + admin_templates + ie_images_added + %s image(s) added + Изображений добавлено: %s + 31006 + 31006 + 0 + + + core + admin_templates + ie_importfail + Import Failed: + Ошибка импортирования: + 31006 + 31006 + 0 + + + core + admin_templates + ie_importfail_no + Import Failed: Nothing to import! + Ошибка импортирования: Нечего импортировать! + 31006 + 31006 + 0 + + + core + admin_templates + ie_replace_added + %s replacement(s) imported + %s макросов импортировано + 31006 + 31006 + 0 + + + core + admin_templates + cs_nav2 + Manage CSS in + Управление CSS в + 31006 + 31006 + 0 + + + core + admin_templates + ss_revertcomplete + Revert Complete + Отмена завершена + 31006 + 30005 + 0 + + + core + admin_templates + cs_nav1 + + Управление стилями и шаблонами + 31006 + 31006 + 0 + + + core + admin_templates + sk_revert_button + Revert Customizations + Отменить изменения + 31006 + + 0 + + + core + admin_templates + sk_revert_replacements + replacement customizations + изменений макросов + 31006 + + 0 + + + core + admin_templates + sk_revert_css + CSS customizations + изменений CSS + 31006 + + 0 + + + core + admin_templates + sk_revert_templates + template customizations + изменений шаблонов + 31006 + + 0 + + + core + admin_templates + sk_revert_desc + Please select which customizations to remove. The default template, CSS, and replacement items will be restored once the customizations have been removed. There is no undo. + Выберите изменения для удаления. После удаления будут восстановлены шаблоны и стили по умолчанию. Это действие нельзя отменить. + 31006 + + 0 + + + core + admin_templates + sk_revert_title + Reverting Customizations for: + Отмена изменений для: + 31006 + + 0 + + + core + admin_templates + sk_revert_customizations + Revert all CSS and Template Customizations... + Отменить все изменения CSS и шаблонов + 31006 + 30005 + 0 + + + core + admin_templates + sk_clean_caches_cb_tem + Template Files + Файлы шаблона + 31006 + 31006 + 0 + + + core + admin_templates + sk_clean_caches_cb_css + CSS Files + CSS файлы + 31006 + 31006 + 0 + + + core + admin_templates + sk_clean_caches + Clean File Caches For: + Очистить кеш файлы: + 31006 + 31006 + 0 + + + core + admin_templates + sk_cleanup_css_exp + + Инструмент позволяет очистить систему от потерянных и старых CSS, которые уже не используются + 31006 + 31006 + 0 + + + core + admin_templates + sk_cleanup_css + Clean Up CSS Database + Очистка CSS + 31006 + 31006 + 0 + + + core + admin_templates + tool_cache_clean_desc + Result: %s css cache files removed, %s template cache files removed + Результат: удалено %s кешей css, %s кешей шаблонов + 31006 + 30005 + 0 + + + core + admin_templates + tool_cache_clean_run + Cache File Cleanup Performed + Очистка файлов кеша выполнена + 31006 + + 0 + + + core + admin_templates + tool_css_clean_desc + Result: %s cache entries removed, %s CSS entries removed + Результат: удалено %s кешей и %s CSS + 31006 + + 0 + + + core + admin_templates + tool_css_clean_run + CSS Database Cleanup Performed + Очистка CSS выполнена + 31006 + + 0 + + + core + admin_templates + tool_template_clean_desc + Result: %s cache entries removed, %s template entries removed + Результат: удалено %s кешей и %s шаблонов + 31006 + + 0 + + + core + admin_templates + tool_template_clean_run + Template Database Cleanup Performed + Очистка шаблонов выполнена + 31006 + 30005 + 0 + + + core + admin_templates + templates_TEMPLATE_EXISTS + The template bit name already exists in this group. Please give the template a different name. + Шаблон с таким именем уже существует в данной группе. + 31006 + 30005 + 0 + + + core + admin_templates + templates_SYNTAX_INCORRECT + There is a syntax error in the template, usually caused by PHP code not properly formed. Please correct the error and hit save again. + В шаблоне обнаружена ошибка синтаксиса. Проверьте правильность содержимого шаблона и попробуйте сохранить его снова. + 31006 + 30005 + 0 + + + core + admin_templates + templates_NO_SUCH_TEMPLATE + We could not find the template bit you were attempting to edit. Reload the form and try again. + Система не смогла найти шаблон, который вы пытаетесь изменить. Попробуйте обновить форму и попробовать снова. + 31006 + 30005 + 0 + + + core + admin_templates + sk_cleanup_templates_exp + + Инструмент позволяет очистить базу от старых и потерянных шаблонов, которые больше не используются в системе. + 31006 + 31006 + 0 + + + core + admin_templates + sk_cleanup_title + Clean Up Tools + Инструменты очистки + 31006 + 31006 + 0 + + + core + admin_templates + sk_cleanup_templates + Clean Up Templates Database + Очистка базы данных + 31006 + 31006 + 0 + + + core + admin_templates + sk_run_tool + Run Tool + Запустить + 31006 + + 0 + + + core + admin_templates + tt_ss_of + This is the default set for this output engine + Этот стиль отмечен, как основной, для данного формата вывода. + 31006 + 30005 + 0 + + + core + admin_templates + tt_ss_of_off + Click to make this set the default set for this output engine + Отметить стиль, как основной, для данного формата вывода. + 31006 + 30005 + 0 + + + core + admin_templates + ss_not_hidden + This set is NOT hidden from the public drop down. Click to hide + Стиль отображается в списке стилей. Скрыть его. + 31006 + 30005 + 0 + + + core + admin_templates + ss_defaultdone + Skin set made default + Стиль отмечен как основной. + 31006 + + 0 + + + core + admin_templates + ss_hidden + This set is hidden from the public drop down. Click to make visible + Стиль не отображается в списке стилей. Сделать его видимым. + 31006 + + 0 + + + core + admin_templates + ss_hiddentoggled + Visibility toggled. Note: hiding from the public drop down still allows access via direct URL and via user agent mapping. To fully restrict access please edit the settings and restrict by member group. + Видимость переключена. Примечание: скрытие стиля из списка не запрещает просматривать форум в этом стиле при указании ID стиля в URL, он так же будет доступен и пользователям, попадающим под user agent. Для полного запрета использования стиля необходимо изменить настройки пользовательских групп. + 31006 + + 0 + + + core + admin_templates + ss_canttoggle + You cannot toggle the visibility of a default skin + Базовый стиль не может быть скрыт + 31006 + + 0 + + + core + admin_templates + ss_minify + Compress Cached CSS? + Сжимать кешированные CSS? + 31006 + 30005 + 0 + + + core + admin_templates + ss_minify_desc + This will remove whitespace and comments to reduce filesize. Changes will take affect next time you recache this skin. + Будут удалены пробелы и комментарии для уменьшения размера файла. Изменения вступят в силу при следующем перекешировании стиля. + 31006 + 30005 + 0 + core admin_templates none_root_set None - Root Skin Set Никакой - Базовый стиль - 30006 - 30006 + 31006 + 31006 0 core admin_templates - used_in_plus_others - (Used in %s and %s other(s)) - (Используется в %s и в %s других) - 30006 + ss_importexport + Skin Import/Export + Импорт/Экспорт стилей + 31006 0 @@ -22267,8 +23657,18 @@ used_in_no_others (Used in %s) (Используется в %s) - 30006 - + 31006 + 30006 + 0 + + + core + admin_templates + used_in_plus_others + (Used in %s and %s other(s)) + (Используется в %s и в %s других) + 31006 + 30006 0 @@ -22277,8 +23677,8 @@ reset_for Reset For: Переустановить для: - 30006 - 30006 + 31006 + 31006 0 @@ -22287,8 +23687,8 @@ uagent_mapping User Agent Mapping Переназначение по User Agent - 30006 - + 31006 + 30006 0 @@ -22297,38 +23697,8 @@ sandr_search_results_for Search Results For: Результаты поиска для: - 30007 - 30007 - 0 - - - core - admin_templates - sk_importnewskin - Import New Skin Set - Ипортировать стиль - 30011 - 30011 - 0 - - - core - admin_templates - to_resultrebuild - Skin data successfully imported - Стиль успешно импортирован - 30011 - 30011 - 0 - - - core - admin_templates - sk_for_apps_desc - - Укажите приложения, которые вы хотите включить в экспорт - 30011 - 30011 + 31006 + 31006 0 @@ -22337,8 +23707,8 @@ export_inc_cal_etc inc. Calendar, Chat and Portal apps в т.ч., Календарь, Чат и Портал - 30011 - 30011 + 31006 + 31006 0 @@ -22347,8 +23717,18 @@ sk_for_apps Include Templates For Applications: Включая шаблоны для приложений: - 30011 - 30011 + 31006 + 31006 + 0 + + + core + admin_templates + sk_for_apps_desc + + Укажите приложения, которые вы хотите включить в экспорт + 31006 + 31006 0 @@ -22357,8 +23737,8 @@ diff_folder_error Folder %s was missing or empty Директория %s отсутствует или пуста - 30011 - 30011 + 31006 + 31006 0 @@ -22367,48 +23747,8 @@ diff_folder_path Or enter the name of a folder (in root forum folder) that contains valid application template XML files]]> ИЛИ введите имя директории (в корневой директории форума), содержащей XML файлы шаблонов приложения]]> - 30011 - 30011 - 0 - - - core - admin_templates - ajax_missing_data - Missing Data - Отсутствуют данные - 30011 - 30011 - 0 - - - core - admin_templates - add_repl_f_tpl - Add Replacement - Добаваить макрос - 30011 - 30011 - 0 - - - core - admin_templates - rep_key_f_tpl - Replacement Key - Ключ - 30011 - 30011 - 0 - - - core - admin_templates - rep_ctn_f_tpl - Replacement Content - Содержимое - 30011 - 30011 + 31006 + 31006 0 @@ -22417,2100 +23757,1350 @@ addrep_btn_f_tpl Add Replacement Добавить макрос - 30011 - 30011 + 31006 + 31006 0 core - admin_tools - re_1xto20 - 2.0.0 Upgrade Tools]]> - 2.0.0]]> - 30005 - 30005 + admin_templates + rep_ctn_f_tpl + Replacement Content + Содержимое + 31006 + 31006 0 core - admin_tools - re_20to21 - 2.1.0 Upgrade Tools]]> - 2.1.0]]> - 30005 - 30005 + admin_templates + add_repl_f_tpl + Add Replacement + Добавить макрос + 31006 + 31006 0 core - admin_tools - re_21to22 - 2.2.0 Upgrade Tools]]> - 2.2.0]]> - 30005 - 30005 + admin_templates + rep_key_f_tpl + Replacement Key + Ключ + 31006 + 31006 0 core - admin_tools - re_title - - Инструменты пересчета и обновления - 30005 + admin_templates + ajax_missing_data + Missing Data + Отсутствуют данные + 31006 + 31006 + 0 + + + core + admin_templates + sd_exception + There was an error initiating the skin merge report. + Возникла ошибка при подготовке отчета объединения стилей. + 31006 + 31006 + 0 + + + core + admin_templates + fatalnotemplsafe + Fatal! %scache/skin_cache not writeable - please change permissions via FTP or turn on Safe Mode + %scache/skin_cache не доступен для записи, попробуйте изменить права доступа через FTP-клиент или включите безопасный режим стилей в настройках форума + 31006 + 31006 + 0 + + + core + admin_templates + templatefilenowrite + cache/skin_cache/cacheid_%s/%s.php not writeable - cannot cache to PHP file + cache/skin_cache/cacheid_%s/%s.php не имеет прав на запись - не удалось создать файл PHP кеша + 31006 + 31002 + 0 + + + core + admin_templates + fatalnotemplatew + Fatal! cannot create: cache/skin_cache/cacheid_%s/ + Не удалось создать cache/skin_cache/cacheid_%s/ + 31006 + 31006 + 0 + + + core + admin_templates + safemodeenablednow + Safe Mode Enabled: Skipping Writing CSS Cache Files + Включен режим безопасности стилей: пропущено создание CSS кешей + 31006 + 31006 + 0 + + + core + admin_templates + fatalnotwreite + Fatal! %s/style_css not writeable - please change permissions via FTP or turn on Safe Mode + %s/style_css не доступен для записи, попробуйте изменить права доступа через FTP-клиент или включите безопасный режим стилей в настройках форума + 31006 + 31006 + 0 + + + core + admin_templates + cssfilenotwriteable + public/style_css/css_%s/%s.css not writeable + public/style_css/css_%s/%s.css не доступен на запись + 31006 + 31006 + 0 + + + core + admin_templates + cssdirnotwritaaaable + public/style_css/css_%s/ not writeable + public/style_css/css_%s/ не доступен на запись + 31006 + 31006 + 0 + + + core + admin_templates + couldnotcreatecssdir + Fatal! cannot create: public/style_css/css_%s/ + Не удалось создать public/style_css/css_%s/ + 31006 + 31006 + 0 + + + core + admin_templates + basicnothingtowritepre + Error: No content to write for + Ошибка записи: отсутствует содержимое для записи + 31006 + 31006 + 0 + + + core + admin_templates + basiccouldnotwrite + Error: Could not write + Ошибка записи + 31006 + 31006 + 0 + + + core + admin_templates + basicwrittenpre + Wrote: + Записан: + 31006 + 31006 + 0 + + + core + admin_templates + cpltrebuildfromcaches + Completed database rebuild from PHP cache files. + Кеш стилей в базе обновлен из PHP файлов. + 31006 + 31006 + 0 + + + core + admin_templates + tplbitimported + %s imported (Added %s; updated %s template bits) + %s импортирова (добавлено %s; обновлено %s шаблонов) + 31006 + 31002 + 0 + + + core + admin_templates + couldnotfindlineeol + Could not find any line endings in %s, skipping file... + Похоже что файл %s пустой, пропускаем... + 31006 + 31006 + 0 + + + core + admin_templates + couldnotopenfile + Could not open %s for reading, skipping file... + Не удалось прочитать файл %s, пропускаем... + 31006 + 31006 + 0 + + + core + admin_templates + basicimportedpre + Imported + Импортирован + 31006 + 31006 + 0 + + + core + admin_templates + finishedcachinghtml + Done HTML templates rebuild... (Skin Set: %s) + Закончено обновление HTML шаблонов (Стиль: %s) + 31006 + 31006 + 0 + + + core + admin_templates + templatescreatedmsg + Templates for %s - %s created + Шаблон для %s - %s создан + 31006 + 31002 + 0 + + + core + admin_templates + csscreatedmsg + CSS for %s - %s created + CSS для %s - %s создан + 31006 + 31006 + 0 + + + core + admin_templates + nothingtoexportfor + Nothing to export for + Нет данных для экспорта для + 31006 + 31006 + 0 + + + core + admin_templates + css_isnotwritable + is not writeable + не может быть записан + 31006 + 31006 + 0 + + + core + admin_templates + nogroupsforexportapp + Nothing to export for %s: No template bits + Нет данных для экспорта для %s + 31006 + 31006 + 0 + + + core + admin_templates + nothingtoexportforapp + Nothing to export for %s: No groups set in information.xml + Нет данных для экспорта для %s, отсутствуют данные групп в information.xml + 31006 + 31006 + 0 + + + core + admin_templates + noreplacementstoexport + No replacements to export + Нет макросов для экспорта + 31006 + 31006 + 0 + + + core + admin_templates + nocsstoexport + No CSS to export for + Нет CSS для экспорта для + 31006 + 31006 + 0 + + + core + admin_templates + couldnotlocate + Could not locate: + Не удалось найти: + 31006 + 31006 + 0 + + + core + admin_templates + xmldirnotwrite + /xml/ is not writeable + /xml/ не имеет прав на запись + 31006 + 31002 + 0 + + + core + admin_templates + importnothingtoimport + : Nothing to import + : нет данных для импорта + 31006 + 31006 + 0 + + + core + admin_templates + importaddupdate + %s: %s updated, %s added + %s: %s обновлено, %s добавлено + 31006 + 31006 + 0 + + + core + admin_templates + noinfoxml + The info.xml file is empty or was not included + info.xml пуст или отсутсвует + 31006 + 31006 + 0 + + + core + admin_templates + imagedirnotexists + Image directory %s does not exist + Директория изображений %s не существует + 31006 + 31006 + 0 + + + core + admin_templates + xmldirmissing + /xml/ does not exist + /xml/ не существует + 31006 + 31002 + 0 + + + core + admin_templates + imagediralreadyexists + The directory public/style_images/%s already exists + Директория public/style_images/%s уже существует + 31006 + 31006 + 0 + + + core + admin_templates + imagedircannotcreate + Could not create public/style_images/%s. Please check file permissions and try again. + Не удалось создать public/style_images/%s. Пожалуйста убедитесь, что права доступа выставленны правильно и повторите попытку. + 31006 + 31006 + 0 + + + core + admin_templates + cannotwriteimageset + Could not write the image set to disk + Не удалось записать пакет изображений + 31006 + 31006 + 0 + + + core + admin_templates + sk_useimageset_info + If you have not yet uploaded the image set, leave on -None-. + Если вы не хотите сейчас выбрать это, выберите «Никакую». + 31006 0 core - admin_tools - re_runtool - - - 30005 - + admin_templates + emptyxmlarchivei + The XMLArchive is empty + XML-архив пуст + 31006 + 31006 0 core - admin_tools - re_processed - Processed topic - Обработана тема - 30005 - + admin_templates + invalidxmlarchivei + The content was not a valid XMLArchive + Не является XML-архивом + 31006 + 31006 0 core - admin_tools - re_resized - Resized: - Изменен размер: - 30005 - + admin_templates + appxmlrecachedfor + App XML Written For %s + Записан XML для %s + 31006 + 31006 0 core - admin_tools - re_noremove - Could not remove: - Невозможно удалить: - 30005 - + admin_templates + appcssrecachedfor + App CSS Written For %s + Записан CSS для %s + 31006 + 31006 0 core - admin_tools - re_rebuildcomp - Rebuild completed
    ]]>
    - Обновление завершено
    ]]>
    - 30005 - + admin_templates + cssrecached_for + CSS Recached for %s + Кеш CSS обновлен для %s + 31006 + 31006 0
    core - admin_tools - re_thisgoeshere - Up to %s processed so far, continuing...]]> - Обработано %s. Продолжаем... - + admin_templates + templatesrecached_for + PHP Templates Recached for %s + Обновлены PHP кеши для %s + 31006 + 31002 + 0 + + + core + admin_templates + aborted_suffix + ABORTED + ОТМЕНЕНО + 31006 + 31006 + 0 + + + core + admin_templates + replacerebuilt + Replacements Rebuilt + Макросы обновлены + 31006 + 31006 + 0 + + + core + admin_templates + reprebuilt_for + Replacements Rebuilt for %s + Макросы обновлены для %s + 31006 + 31006 + 0 + + + core + admin_templates + htmlrebuilt_for + HTML Rebuilt for %s + Обновление для %s + 31006 + 31006 + 0 + + + core + admin_templates + cssrebuilt_for + CSS Rebuilt for %s + CSS обновлен для %s + 31006 + 31006 + 0 + + + core + admin_templates + masterdircreatetitle + master_skin Directory Creation Results + Результаты создания master_skin директории + 31006 + 31006 + 0 + + + core + admin_templates + cannotcreatemasterdir + Could not create directory: %scache/skin_cache/master_skin please create it via FTP and run the tool again + Не удалось создать директорию: %scache/skin_cache/master_skin, попробуйте создать ее вручную, используя FTP клиент + 31006 + 31006 + 0 + + + core + admin_templates + ajax_cssmlll + Merging CSS file changes + Внесение изменений в CSS + 31006 + 31006 + 0 + + + core + admin_templates + skindiff_okmsg + Items updated + Элементы обновлены + 31006 + 31006 + 0 + + + core + admin_templates + ajax_tbmlll + Merging template bit changes + Результаты объединения шаблонов + 31006 + 31006 + 0 + + + core + admin_templates + ajax_cssdprocess + %s of %s CSS files processed... + %s из %s CSS файлов обработано... + 31006 + 31006 + 0 + + + core + admin_templates + ajax_cssdlll + Checking for CSS file differences + Проверка изменений в CSS + 31006 + 31006 + 0 + + + core + admin_templates + ajax_tbdprocess + %s of %s template bits processed... + %s из %s шаблонов обработано... + + 31006 + 31006 + 0 + + + core + admin_templates + ajax_invalidsession + Could not locate a valid differences session + Не удалось найти сессию + 31006 + 31006 + 0 + + + core + admin_templates + ajax_tbdlll + Checking for template bit differences + Поиск различий в шаблонах + 31006 + 31006 + 0 + + + core + admin_templates + ajax_changescommitted + . Changes committed + . Изменений применено + 31006 + 31006 + 0 + + + core + admin_templates + ajax_noconflicts + no conflicts + нет конфликтов + 31006 + 31006 + 0 + + + core + admin_templates + ajax_mergeconflicts + merge conflicts + конфликтов + 31006 + 31006 + 0 + + + core + admin_templates + ajax_resolvedconflicts + resolved conflicts + решенных конфликтов + 31006 + 31006 + 0 + + + core + admin_templates + ajax_newitem4thisv + New item for this version + Новый элемент + 31006 + 31006 + 0 + + + core + admin_templates + ajax_nosuchitemid + No such item ID + Нет элемента с таким ID + 31006 + 31006 + 0 + + + core + admin_templates + ajax_nokeyfound + No Key Found + Не найден ключ + 31006 + 31006 + 0 + + + core + admin_templates + runnewreporton + Run a new report on: + Запустить для: + 31006 + 31006 + 0 + + + core + admin_templates + nopreviouslystoredtemp + The merge tool is not available as you have no previously stored templates + Инструмент объединения не доступен, так как у вас нет старых шаблонов + 31006 + 31006 + 0 + + + core + admin_templates + minutepatience + Each step can take a few minutes, please be patient + Каждый шаг может занять несколько минут. + 31006 + 31006 + 0 + + + core + admin_templates + resolve__go + Go + Ок + 31006 + 31006 + 0 + + + core + admin_templates + resolvealluncommit + Revert Changes + Отменить изменения + 31006 + 31006 + 0 + + + core + admin_templates + resolveallcommit + Save Changes To Skin + Сохранить изменения в стиль + 31006 + 31006 + 0 + + + core + admin_templates + resolveallnewdefault + Auto Resolve: New Default Skin Wins + Автоматически: приоритет оригинальным изменениям + 31006 + 31006 + 0 + + + core + admin_templates + resolveallcustom + Auto Resolve: Your Custom Skin Wins + Автоматически: приоритет пользовательским изменениям + 31006 + 31006 + 0 + + + core + admin_templates + mergewithselected + With Selected: + С выбранным: + 31006 + 31006 + 0 + + + core + admin_templates + manuallyresolveconflict + Manually Edit/Resolve Conflicts... + Разрешение конфликтов вручную + 31006 + 31006 + 0 + + + core + admin_templates + viewmergepreview + View Merge Preview... + Предпросмотр объединения + 31006 + 31004 + 0 + + + core + admin_templates + menu__oldnew + + + 31006 + 31006 + 0 + + + core + admin_templates + menu__viewnewdef + View new default item + Просмотр нового + 31006 + 31006 + 0 + + + core + admin_templates + menu__viewcustomized + View customized item + Просмотр измененного + 31006 + 31006 + 0 + + + core + admin_templates + menu__vieworigdef + View original default item + Просмотр оригинального + 31006 + 31006 + 0 + + + core + admin_templates + changescommitted + . Changes committed + Изменения приняты + 31006 + 31006 + 0 + + + core + admin_templates + noconflicts + no conflicts + нет конфликтов + 31006 + 31006 + 0 + + + core + admin_templates + mergeconflicts + merge conflicts + объединить конфликты + 31006 + 31006 + 0 + + + core + admin_templates + resolvedconflicts + resolved conflicts + решенные конфликты + 31006 + 31006 + 0 + + + core + admin_templates + mergereportdiffs + %s differences + %s различий + 31006 + 31006 + 0 + + + core + admin_templates + mergereportnoconflict + No conflicts + Нет конфликтов + 31006 + 31006 + 0 + + + core + admin_templates + mergenewitemversion + New item for this version + Новое для этой версии + 31006 + 31006 + 0 + + + core + admin_templates + mergereportconflicts + %s conflicts + %s конфликтов + 31006 + 31006 + 0 + + + core + admin_templates + mergereportnewitem + New item + Новое + 31006 + 31006 + 0 + + + core + admin_templates + mergereportdifferences + %s differences + %s различий + 31006 + 31006 + 0 + + + core + admin_templates + resolve__new + Resolve: New Wins + Решить: приоритет новым изменениям + 31006 + 31006 + 0 + + + core + admin_templates + resolve__custom + Resolve: Custom Wins + Решить: приоритет пользовательским изменениям + 31006 + 31006 + 0 + + + core + admin_templates + merge__showcommita + Committed + Внесено + 31006 + 31006 + 0 + + + core + admin_templates + merge__showcommit + Uncommitted + Не внесено + 31006 + 31006 + 0 + + + core + admin_templates + merge__showmerged + Merged + Объединено + 31006 + 31006 + 0 + + + core + admin_templates + merge__showconflict + Conflicted + Конфликтует + 31006 + 31006 + 0 + + + core + admin_templates + merge__showall + New/No Conflict + Новое/Без конфликтов + 31006 + 31006 + 0 + + + core + admin_templates + mergeexportprefix + + + 31006 + 31006 + 0 + + + core + admin_templates + mergerepoptions + Show... + Показать + 31006 + 31006 + 0 + + + core + admin_templates + mergereporttitle + Merge Report + Отчет объединения + 31006 + 31006 + 0 + + + core + admin_templates + ss_keynogoodyo + You cannot use that Skin Key as it is already in use. Please select another. + Вы не можете использовать этот ключ, так как он уже используется другим стилем. Пожалуйста, выберите другой. + 31006 + 31004 + 0 + + + core + admin_templates + importmastercss + + + 31006 + 31006 + 0 + + + core + admin_templates + exportmastercss + + + 31006 + 31006 + 0 + + + core + admin_templates + importmastertempl + + + 31006 + 31006 + 0 + + + core + admin_templates + exportmastertempl + + + 31006 + 31006 + 0 + + + core + admin_templates + runmergereports + Run Merge Report... + Запустить + 31006 + 31006 + 0 + + + core + admin_templates + merge_done_desc + All your templates have been saved and are now 'live' on your board
    You can optionally edit them further or uncommit ('revert') the changes by using the checkboxes and drop down box.
    ]]>
    + Все ваши шаблоны сохранены и сейчас отображаются на 'живом' форуме
    При желании вы можете редактировать их дальше или отозвать (Обратить) сделанные изменения, просто проставив галочки напротив нужных и выбрать нужную операцию в выпадающем меню.
    ]]>
    + 31006 + 31006 + 0 +
    + + core + admin_templates + merge_uncommitted_desc + You have %s items with uncommitted ('unsaved') changes.
    This means that although the items are now merged, they need to be committed ('saved') before the changes will show on your board. Please use the checkboxes and drop down to commit these changes.
    ]]>
    + У вас %s отозванных несохраненных изменений.
    Хоть элементы сейчас и объединены, но они требуют сохранения для того, чтобы они появились на работающем форуме. Вы можете сделать это просто проставив галочки напротив нужных пунктов и выбрать нужную операцию в выпадающем меню.
    ]]>
    + 31006 + 31006 + 0 +
    + + core + admin_templates + merge_conflicts_desc + You have %s items with conflicts that need resolving.
    This means that the items could not be automatically 'merged'. You need to either edit them manually to 'resolve' the conflicts or use the 'resolve all' option to determine the final template.
    ]]>
    + У вас %s конфликтов, требующих исправления.
    Это означает, что эти элементы не могут быть автоматически объединены. Вам нужно или исправить конфликтные моменты вручную или использовать опцию 'Исправить все' для формирования окончательного шаблона.
    ]]>
    + 31006 + 31006 + 0 +
    + + core + admin_templates + ie_importfail_old_version + IP.Board %s. You are currently running IP.Board %s.
    You can continue but the skin may have errors or missing functionality.

    Continue and import skin]]>
    + IP.Board %s. Вы используете версию %s.
    Данную операцию можно продолжить, однако возможны проблемы в работе этого стиля.

    Продолжить ]]>
    - 30005 - + 31006 + 31006 0
    core - admin_tools - re_removedorph - Removed orphan: - Удален: - 30005 - + admin_templates + sk_importimgset + Import Image Set + Импорт изображений + 31006 + 31006 0 core - admin_tools - re_21to22_info - These tools will clean up and rebuild content from an upgrade from the IP.Board 2.1.x series - Этот инструмент проведет очистку и обновление содержимого после перехода с IP.Board 2.1.x - 30005 + admin_templates + sk_uploadimgxml + Upload XML(Archive) Image Set + Загрузка XML-архива с изображениями + 31006 30005 0 core - admin_tools - re_1xto20_info - These tools will clean up and rebuild content from an upgrade from the IP.Board 1.x.x series - Этот инструмент проведет очистку и обновление содержимого после перехода с IP.Board 1.x.x - 30005 - 30005 + admin_templates + sk_newimgsetname + New Image Set Name + Название директории изображений: + 31006 + 31006 0 core - admin_tools - re_dupe2 - Remove Duplicate System Setting Groups from IPB 2.1.x - Удаление повторяющихся настроек в 2.1.х - 30005 - + admin_templates + sk_applytoskin + Apply To Skin Set + Какой стиль использовать с импортируемой директорией? + 31006 + 31006 0 core - admin_tools - re_dupe2_info - - Инструмент позволяет очистить настройки форума от дубликатов, которые могут возникнуть при обновлении форума с версии 2.0.х - 30005 - + admin_templates + sk_applytoskin_info + If you do not wish to assign to a skin set, leave on -None-. + Если вы не хотите сейчас выбрать это, выберите «Никакой». + 31006 + 31006 0 core - admin_tools - re_20to21_info - These tools will clean up and rebuild content from an upgrade from the IP.Board 2.0.x series - Этот инструмент проведет очистку и обновление содержимого после перехода с IP.Board 2.0.x - 30005 - 30005 - 0 - - - core - admin_tools - re_events - Convert 2.0.x Calendar Events to 2.1.x Format - Конвертация событий календаря 2.0.х в формат версии 2.1.х - 30005 - - 0 - - - core - admin_tools - re_events_info - - Инструмент позволяет преобразовать события календаря созданные в версии 2.0.х в новый формат, используемый в версии 2.1.х. Используйте данный инструмент после ручного обновления. - 30005 - - 0 - - - core - admin_tools - re_polls - Convert 2.0.x Polls to 2.1.x Format - Конвертация опросов 2.0.х в формат версии 2.1.х - 30005 - - 0 - - - core - admin_tools - re_polls_info - - Инструмент позволяет преобразовать опросы созданные в версии 2.0.х в новый формат, используемый в версии 2.1.х. Используйте данный инструмент после ручного обновления. - 30005 - - 0 - - - core - admin_tools - re_dupe1_info - This tool finds the duplicates which have a greater ID than the original.]]> - Инструмент позволяет очистить настройки форума от дубликатов, которые могут возникнуть в результате конвертации форума с другой форумной системы или при обновлении форума с версии 1.х.х. - 30005 - - 0 - - - core - admin_tools - re_s_total - Recount total topics and posts - Пересчитать количество тем и сообщений? - 30005 - - 0 - - - core - admin_tools - re_percycle - Per Cycle - за цикл - 30005 - - 0 - - - core - admin_tools - re_stats - Recount Statistics - Пересчет статистики - 30005 - - 0 - - - core - admin_tools - re_dupe1 - Remove Duplicate System Settings from IPB 2.0.x - Удаление повторяющихся настроек в 2.0.x - 30005 - - 0 - - - core - admin_tools - re_s_members - Recount Members - Пересчитать количество пользователей? - 30005 - - 0 - - - core - admin_tools - re_ban - - Восстановление бан фильтров - 30005 - 30005 - 0 - - - core - admin_tools - re_ban_info - Running this tool attempts to import your old ban settings. Old entries will not overwrite new entries.]]> - Инструмент позволяет восстановить фильтры бана, которые могли быть потеряны в результате обновления с 1.х.х. При восстановлении, новые настройки не удаляются. - 30005 - 30005 - 0 - - - core - admin_tools - re_converge_info - This tool finds these members and restores them into the default member group and asks them to change their email address.]]> - Инструмент позволяет найти пользователей, чья учетная запись содержит дублирующий e-mail адрес, а аккаунт переведен в группу ожидающих активации. Такое может произойти в результате обновления или же конвертации форума с другой форумной системы. - 30005 - 30005 - 0 - - - core - admin_tools - re_converge - - Поиск и восстановление пользователей - 30005 - - 0 - - - core - admin_tools - re_s_last - Reset last registered member - Сбросить информацию о последнем зарегистрированном пользователе? - 30005 - - 0 - - - core - admin_tools - re_forums_info - This will recount replies, views, and the topic starter and last poster for all your forums. - Инструмент позволяет обновить счетчики, а так же информацию о последней теме и авторе для всех ваших форумов. - 30005 - - 0 - - - core - admin_tools - re_s_most - - Сбросить информацию о рекорде посещаемости? - 30005 - - 0 - - - core - admin_tools - re_forums - Resynchronize Forums - Синхронизация форумов - 30005 - - 0 - - - core - admin_tools - re_rebuild - - - 30005 - - 0 - - - core - admin_tools - re_topics - Resynchronize Topics - Синхронизация тем - 30005 - 30005 - 0 - - - core - admin_tools - re_topics_info - This will recount replies, attachment count and the topic starter and last poster for all your topics. - Инструмент позволяет обновить счетчики, а так же информацию о последнем авторе для всех ваших тем. - 30005 - 30005 - 0 - - - core - admin_tools - re_rebuild_info - This will rebuild the submitted content including BBCode, custom bbcode, HTML (where allowed) and emoticons. This is only necessary upon upgrading to IP.Board 3.0, and does not need to be run more than once. - Инструмент обновляет содержимое всего контента. Осуществляется перестройка оформления BB-кодов, HTML, смайликов внутри контента. Данный инструмент нужено запустить только единожды - после обновления до IP.Board 3.0 - 30005 - - 0 - - - core - admin_tools - re_rebuildbutton - Rebuild Content - Перестроение контента - 30005 - - 0 - - - core - admin_tools - re_seouser_info - This will reset the SEO display name for all members - Инструмент сбрасывает все SEO имена пользователей - 30005 - - 0 - - - core - admin_tools - re_seouser - - Обновление SEO имен пользователей - 30005 - - 0 - - - core - admin_tools - re_user - Rebuild User Names - Обновление имен пользователей - 30005 - 30005 - 0 - - - core - admin_tools - re_user_info - - Обновление сохраненных имен пользователей в сообщениях, темах, журналах и т.д. Полезно, если вы недавно вручную меняли имена пользователей. - 30005 - 30005 - 0 - - - core - admin_tools - re_count_info - THERE IS NO UNDO!]]> - ЭТО ДЕЙСТВИЕ НЕЛЬЗЯ ОТМЕНИТЬ!]]> - 30005 - - 0 - - - core - admin_tools - re_thumb - Rebuild Attachment Thumbnails - Обновить изображения предпросмотра - 30005 - - 0 - - - core - admin_tools - re_count - Rebuild User Post Counts - Обновление счетчиков пользователей - 30005 - - 0 - - - core - admin_tools - re_pphoto_info - This is moderately resource intensive.]]> - Для этого инструмента требуется большее количество ресурсов.]]> - 30005 - - 0 - - - core - admin_tools - re_pphoto - Rebuild Profile Photo Thumbnails - Обновить фотографии пользователей - 30005 - - 0 - - - core - admin_tools - re_data - Rebuild Attachment Data - Обновить информацию о прикрепленных файлах - 30005 - - 0 - - - core - admin_tools - re_data_info - This is moderately resource intensive.]]> - Для этого инструмента требуется большее количество ресурсов.]]> - 30005 - - 0 - - - core - admin_tools - re_thumb_info - This is moderately resource intensive.]]> - Для этого инструмента требуется большее количество ресурсов.]]> - 30005 - - 0 - - - core - admin_tools - re_orph_info - This is moderately resource intensive.]]> - Для этого инструмента требуется большее количество ресурсов.]]> - 30005 - - 0 - - - core - admin_tools - re_orph - Remove Orphaned Attachments - Удалить потерянные файлы - 30005 - - 0 - - - core - admin_tools - re_uphoto - Remove Orphaned Uploaded Photos - Удалить потерянные фотографии - 30005 - 30005 - 0 - - - core - admin_tools - re_av_info - This is moderately resource intensive.]]> - Для этого инструмента требуется большее количество ресурсов.]]> - 30005 - 30005 - 0 - - - core - admin_tools - re_av - Remove Orphaned Uploaded Avatars - Удалить потерянные аватары - 30005 - 30005 - 0 - - - core - admin_tools - remenu_posts - Post Content - Сообщений - 30005 - 30005 - 0 - - - core - admin_tools - remenu_pms - Private Messages - Личных сообщений - 30005 - 30005 - 0 - - - core - admin_tools - re_uphoto_info - This is moderately resource intensive.]]> - Для этого инструмента требуется большее количество ресурсов.]]> - 30005 - 30005 - 0 - - - core - admin_tools - remenu_announce - Announcements - Объявлений - 30005 - 30005 - 0 - - - core - admin_tools - remenu_events - Calendar Events - Событий календаря - 30005 - - 0 - - - core - admin_tools - l_noconfigfile - We could not find the configuration file. - Не удалось найти конфигурационный файл - 30005 - 30005 - 0 - - - core - admin_tools - l_noconfig - This login method does not have any configuration options. - Метод авторизации не содержит опций для настройки - 30005 - 30005 - 0 - - - core - admin_tools - remenu_none + admin_templates + sk_none None - Ничего - 30005 - 30005 - 0 - - - core - admin_tools - l_404 - We could not find the login method you were attempting to configure, check, enable, uninstall, or edit. Please try again. - Не удалось найти метод авторизации, который вы пытаетесь настроить, проверить, включить/отключить или изменить. Попробуйте еще раз. - 30005 - 30005 - 0 - - - core - admin_tools - remenu_aboutme - About Me Content - Сведений О себе - 30005 - 30005 - 0 - - - core - admin_tools - remenu_sigs - Signatures - Подписей - 30005 - 30005 - 0 - - - core - admin_tools - l_added - New Log In Method Added - Новый метод авторизации добавлен - 30005 - 30005 - 0 - - - core - admin_tools - l_form - You must complete the entire form. - Необходимо заполнить форму полностью. - 30005 - 30005 - 0 - - - core - admin_tools - l_confup - Configuration successfully updated for %s - Настройки метода авторизации %s обновлены - 30005 - 30005 - 0 - - - core - admin_tools - l_confwrite - /conf.php must be writable - please CHMOD this file 0777 - /conf.php должен иметь права на запись - пожалуйста сделайте CHMOD 777 данному файлу - 30005 - 30005 - 0 - - - core - admin_tools - l_email - Email Address - E-mail адрес - 30005 - 30005 - 0 - - - core - admin_tools - l_username - Username - Имя пользователя - 30005 - 30005 - 0 - - - core - admin_tools - l_title - Log In Authentication Manager - Управление модулями авторизации - 30005 - 30005 - 0 - - - core - admin_tools - l_nav - Manage Log In Authentication - Управление модулями авторизации - 30005 - 30005 - 0 - - - core - admin_tools - l_already - The Log In method you requested to install is already installed. - Метод авторизации уже установлен в системе - 30005 - 30005 - 0 - - - core - admin_tools - l_yesinstalled - Log In method was successfully installed! - Метод авторизации успешно установлен в систему - 30005 - 30005 - 0 - - - core - admin_tools - l_msg -  ]]> -   ]]> - 30005 - 30005 - 0 - - - core - admin_tools - l_edited - Log In Method Edited - Метод авторизации изменен - 30005 - 30005 - 0 - - - core - admin_tools - l_registernew - Register New Log In Method - Добавить метод авторизации - 30005 - 30005 - 0 - - - core - admin_tools - l_uninstalled - Log In method was successfully uninstalled - Модуль авторизации удален - 30005 - 30005 - 0 - - - core - admin_tools - l_installer404 - We could not find the installer file for the Log In method you wish to install. - Не удалось найти скрипт установщика для устанавливаемого метода авторизации - 30005 - 30005 - 0 - - - core - admin_tools - l_enabled - enabled - включен - 30005 - 30005 - 0 - - - core - admin_tools - l_disabled - disabled - отключен - 30005 - 30005 - 0 - - - core - admin_tools - a_title - XML-RPC API Logs - Записи XML-RPC API - 30005 - - 0 - - - core - admin_tools - l_moveto - We could not determine where you were trying to move the Log In method to. - Невозможно определить куда был перемещен метод авторизации. - 30005 - 30005 - 0 - - - core - admin_tools - a_lognoid - No log for that ID found. - Не найдено записей для этого ID. - 30005 - 30005 - 0 - - - core - admin_tools - l_installed - Installed Login Handlers - Установленные модули авторизации - 30005 - 30005 - 0 - - - core - admin_tools - l_others - Other Available Login Handlers - Дополнительные модули авторизации - 30005 - 30005 - 0 - - - core - admin_tools - l_successfully - Login In method was successfully - Метод авторизации - 30005 - 30005 - 0 - - - core - admin_tools - a_detail - XML-RPC Log Detail - Журнал XML-RPC - 30005 - 30005 - 0 - - - core - admin_tools - a_msg3 - The XML-RPC system is not enabled!
    All API requests will fail. Click here to enable it]]>
    - XML-RPC система отключена
    API запросы не обрабатываются. Включить ]]>
    - 30005 - - 0 -
    - - core - admin_tools - a_msg2 - You may create API users for use with the XML-RPC system which allows other applications to access IP.Board data - Вы можете создавать API пользователей для использования с XML-RPC системой, которая позволяет другим приложениям использовать данные из IP.Board. - 30005 - - 0 - - - core - admin_tools - a_disabled - XML-RPC System Disabled - XML-RPC система отключена - 30005 - 30005 - 0 - - - core - admin_tools - a_savechanges - Save Changes - Сохранить - 30005 - - 0 - - - core - admin_tools - a_edituser - Edit API User: - Редактирование API пользователя: - 30005 - 30005 - 0 - - - core - admin_tools - a_createnew - Create New API User - Создать API пользователя - 30005 - 30005 - 0 - - - core - admin_tools - a_edited - API User Edited - API пользователь изменен - 30005 - 30005 - 0 - - - core - admin_tools - a_added - API User Added - API пользователь успешно добавлен - 30005 - 30005 - 0 - - - core - admin_tools - a_entertitle - You must enter a title - Вы должны ввести название - 30005 - 30005 - 0 - - - core - admin_tools - a_noapikey - No API user key passed! - Ключ API не найден! - 30005 - - 0 - - - core - admin_tools - a_user404 - The API user could not be found. - Невозможно найти API пользователя. - 30005 - - 0 - - - core - admin_tools - a_removed - API User successfully removed. - API пользователь успешно удален. - 30005 - - 0 - - - core - admin_tools - a_whatuser - Could not determine the user to remove. - Пользователь для удаления не найден. - 30005 - - 0 - - - core - admin_tools - a_msg - The red cross indicates an error during the request and a green tick indicates a successful request.]]> - Красный крест означает ошибку, а зеленая галочка говорит о том, что запрос прошел успешно.]]> - 30005 - - 0 - - - core - admin_tools - a_log - Log - Запись - 30005 - 30005 - 0 - - - core - admin_tools - a_msg4 - You may create API users for use with the XML-RPC system which allows other applications to access IP.Board data - Вы можете создавать API пользователей для использования с XML-RPC системой, которая позволяет другим приложениям использовать данные из IP.Board. - 30005 - - 0 - - - core - admin_tools - a_requestlog - XML-RPC Request Log - Журнал XML-RPC запросов - 30005 - - 0 - - - core - admin_tools - a_date - Date - Дата - 30005 - 30005 - 0 - - - core - admin_tools - a_status - Status - Статус - 30005 - - 0 - - - core - admin_tools - a_restrictip - API Restrict IP]]> - API IP ограничение]]> - 30005 - - 0 - - - core - admin_tools - a_restrictip_info - Optional: You may enter the IP Address of the server you only wish to grant access. This increases security and is recommended.]]> - Опционально: Вы можете ввести IP адрес сервера. Рекомендуется для повышения безопасности.]]> - 30005 - - 0 - - - core - admin_tools - a_usertitle - API User Title]]> - API заголовок пользователя]]> - 30005 - - 0 - - - core - admin_tools - a_key_info - This key is automatically generated and will be re-generated if you refresh this form. - Этот ключ автоматически создается и перегенерируется при обновлении этой формы. - 30005 - 30005 - 0 - - - core - admin_tools - a_userkey - API User Key]]> - API пользовательский ключ]]> - 30005 - - 0 - - - core - admin_tools - a_userbasics - API User Basics]]> - API пользователь]]> - 30005 - - 0 - - - core - admin_tools - a_create - Create New API User... - Создать нового API пользователя - 30005 - 30005 - 0 - - - core - admin_tools - a_createone - Would you like to create one? - Создать? - 30005 - 30005 - 0 - - - core - admin_tools - a_nousers - There are no API users currently. - На текущий момент API пользователей нет. - 30005 - - 0 - - - core - admin_tools - a_remove - Remove API User... - Удалить - 30005 - - 0 - - - core - admin_tools - a_edit - Edit API User... - Изменить - 30005 - 30005 - 0 - - - core - admin_tools - a_user - API User - API пользователь - 30005 - - 0 - - - core - admin_tools - a_users - XML-RPC API Users - XML-RPC API пользователи - 30005 - - 0 - - - core - admin_tools - a_viewdetails - View Details - Подробности - 30005 - - 0 - - - core - admin_tools - a_basics - Basics]]> - Основы]]> - 30005 - 30005 - 0 - - - core - admin_tools - a_key - API Key - API ключ - 30005 - 30005 - 0 - - - core - admin_tools - a_ip - IP Address - IP адрес - 30005 - 30005 - 0 - - - core - admin_tools - a_time - Time - Время - 30005 - - 0 - - - core - admin_tools - a_success - Success - Успешность - 30005 - - 0 - - - core - admin_tools - a_formdata - XML-RPC Data (Form Data)]]> - Данные XML-RPC (Данные формы)]]> - 30005 - 30005 - 0 - - - core - admin_tools - a_allowaccess - Allow access to - Разрешить доступ в - 30005 - 30005 - 0 - - - core - admin_tools - a_save - Save - Сохранить - 30005 - - 0 - - - core - admin_tools - s_nofile - No upload file was found or no filename was specified. - Загруженный файл не найден. - 30005 - - 0 - - - core - admin_tools - s_noopen - Could not find the file to open at: %s - Невозможно открыть файл: %s - 30005 - - 0 - - - core - admin_tools - s_noneupdate - No settings to update. - Нет настроек для обновления. - 30005 - - 0 - - - core - admin_tools - a_usertitle_info - The title is just a name for your records for easier identification. - Заголовок для пользователя для простоты запоминания. - 30005 - - 0 - - - core - admin_tools - a_permissions - API Permissions]]> - Ограничения API]]> - 30005 - - 0 - - - core - admin_tools - s_cantremove - You cannot remove this setting group as it still contains active settings. Please remove the settings inside it first. - Невозможно удаить группу настроек так как в ней есть активные настройки. - 30005 - 30005 - 0 - - - core - admin_tools - s_remove - Setting Group Removed - Группа настроек удалена - 30005 - - 0 - - - core - admin_tools - s_recounted - Setting Group Recounted - Группа настроек пересчитана. - 30005 - - 0 - - - core - admin_tools - s_upandin - %s settings updated. %s settings inserted. - %s настроек обновлено. %s настроек добавлено. - 30005 - - 0 - - - core - admin_tools - s_added - New Setting Group Added - Группа настроек добавлена - 30005 - 30005 - 0 - - - core - admin_tools - s_createnew - Create New Setting Group - Создать новую группу настроек - 30005 - 30005 - 0 - - - core - admin_tools - s_noid - No ID was passed. Please try again. - ID не найден. - 30005 - - 0 - - - core - admin_tools - s_notitle - You must enter a title for this group. - Вы должны ввести название группы. - 30005 - - 0 - - - core - admin_tools - s_editsetting - Edit Setting %s - Редактирование настройки %s - 30005 - - 0 - - - core - admin_tools - s_savechanges - Save Changes - Создать - 30005 - - 0 - - - core - admin_tools - s_title - Add New Setting Group - Добавить группу настроек - 30005 - - 0 - - - core - admin_tools - s_edited - Setting Group Edited - Группа настроек отредактирована - 30005 - - 0 - - - core - admin_tools - s_nogroup - No group was passed. Please try again. - Группа не найдена. - 30005 - - 0 - - - core - admin_tools - s_editor - Full Editor - Расширенный редактор - 30005 - - 0 - - - core - admin_tools - s_input - Text Input - Текст (одна строка) - 30005 - - 0 - - - core - admin_tools - s_dropdown - Drop Down - Выпадающее меню - 30005 - 30005 - 0 - - - core - admin_tools - s_yes_no - Yes/No Radio Buttons - Кнопки Да/Нет - 30005 - - 0 - - - core - admin_tools - s_textarea - Text Area - Текст (несколько строк) - 30005 - - 0 - - - core - admin_tools - s_multi - Multi-Select - Мульти выбор - 30005 - - 0 - - - core - admin_tools - setting_keywords_desc - You can enter keywords that will be searched when someone uses the ACP quick search to pull up this setting (space or comma separated) - Вы можете ввести несколько ключей (разделенных запятой или пробелом) для быстрого поиска настройки - 30005 - 30005 - 0 - - - core - admin_tools - s_global_dd - Global Settings - Общие настройки - 30005 - - 0 - - - core - admin_tools - s_sometoexport - You must select SOME settings to export! - Необходимо выбрать 1 или более настроек для экспорта! - 30005 - - 0 - - - core - admin_tools - s_deleted - Configuration Setting Deleted - Настройка удалена - 30005 - 30005 - 0 - - - core - admin_tools - s_revertedback - Configuration setting reverted back to default. - Настройка сброшена на значение по-умолчанию - 30005 - - 0 - - - core - admin_tools - s_updated - Settings updated - Настройки обновлены - 30005 - - 0 - - - core - admin_tools - s_added2 - New Setting Added - Настройка добавлена - 30005 - 30005 - 0 - - - core - admin_tools - s_edited2 - Setting Edited - Настройка отредактирована - 30005 - - 0 - - - core - admin_tools - s_edit - Edit - Изменить - 30005 - - 0 - - - core - admin_tools - s_nofields - No fields were passed to be saved. Please try again. - Нет полей для сохранения. - 30005 - - 0 - - - core - admin_tools - s_delete - Delete - Удалить - 30005 - 30005 - 0 - - - core - admin_tools - s_revertback - Revert to default value - Отменить - 30005 - - 0 - - - core - admin_tools - s_set4group - Settings for group: %s - Настройки группы: %s - 30005 - - 0 - - - core - admin_tools - s_searchedfor - Searched for: %s - Поиск: %s - 30005 - - 0 - - - core - admin_tools - s_nomatches - %s produced no matches. Please try another phrase.]]> - %s не дал результатов.]]> - 30005 - - 0 - - - core - admin_tools - setting_keywords - Setting Keywords - Ключи - 30005 - 30005 - 0 - - - core - admin_tools - s_createnewtitle - Create New Setting - Создать новую настройку - 30005 - 30005 - 0 - - - core - admin_tools - s_ishidden - (Hidden) - (скрытая) - 30005 - - 0 - - - core - admin_tools - choose_export - Choose settings to export - Выберите настройки для экспорта - 30005 - - 0 - - - core - admin_tools - choose_to_export_single - Export Selected Settings - Экспорт - 30005 - - 0 - - - core - admin_tools - c_title - Cache Management - Управление кешем - 30005 - 30005 - 0 - - - core - admin_tools - c_recachethecachegetitgotitgood - Cache re-cached - Кеш обновлен - 30005 - 30005 - 0 - - - core - admin_tools - c_processed - processed... - продолжаем... - 30005 - 30005 - 0 - - - core - admin_tools - export_helptitle - Export Selected System Settings - Экспорт выбранных настроек - 30005 - 30005 - 0 - - - core - admin_tools - export_selected - EXPORT SELECTED - ЭКСПОРТ ВЫБРАННЫХ - 30005 - 30005 - 0 - - - core - admin_tools - ua_addnewtitle - Add New User Agent Group - Новая группа User Agent - 30005 + Никакой + 31006 0 core - admin_tools - c_msg - You can check and rebuild your caches from this control panel. - Вы можете проверить кеши или перестроить их - 30005 - + admin_templates + sk_importreplacements + Import Replacements + Импорт макросов + 31006 + 31006 0 core - admin_tools - export_group - Export this group - Экспортировать - 30005 + admin_templates + sk_uploadxmlreplace + Upload XML Replacements Set + Загрузка XML-архива с макросами + 31006 30005 0 core - admin_tools - conf_desc_search - In Group: - В группе: - 30005 - + admin_templates + sk_exporttemplates + Export Skin Templates + Экспорт стилей + 31006 + 31006 0 core - admin_tools - c_noid - No ID was passed. Please try again. - ID не найден. - 30005 + admin_templates + sk_skinset + Skin Set + Какой стиль экспортировать? + 31006 0 core - admin_tools - ua_editua - Edit User Agent Group %s - Изменение группы %s - 30005 - + admin_templates + sk_imageset + Image Set + Какие изображения экспортировать? + 31006 + 31006 0 core - admin_tools - ua_savechanges - Save Changes - Сохранить - 30005 - + admin_templates + sk_fromskinset + From Skin Set + Какие макросы экспортировать? + 31006 + 31006 0 core - admin_tools - postform_badmd5 - Key did not match - Ключ не совпадает - 30005 - 30005 + admin_templates + sk_exportimages + Export Skin Images + Экспорт изображений + 31006 + 31006 0 core - admin_tools - ua_nav1 - Manage User Agent Groups - Управление группами User Agent - 30005 - + admin_templates + sk_exportreplaces + Export Replacements + Экспорт макросов + 31006 + 31006 0 core - admin_tools - ua_addnewbutton - Add New Group - Добавить группу - 30005 + admin_templates + sk_xs_info + Please select which skin set (HTML templates, CSS and Replacements) you wish to export. + Пожалуйста, выберите стиль для экспорта. + 31006 0 core - admin_tools - ua_noid - No ID was passed. Please try again. - UD не найден. - 30005 + admin_templates + sk_xs_info2 + Please choose how deep this export should look for customizations. + Опция позволяет установить глубину экспорта изменений стиля. + 31006 0 core - admin_tools - ua_nav2 - Manage User Agents - Управление User Agents - 30005 + admin_templates + sk_xi_info + Image sets are exported into the XMLarchive format. This is not suitable for safemode users and in such a case we recommend you manually download via FTP and ZIP the images. + Изображения экпортируются в формате XMLarchive. Этот метод не подходит, если используется безопасный режим PHP. Для таких случаев рекомендуется скачать изображения вручную через FTP. + 31006 0 core - admin_tools - ua_unknown - Unknown Group - Неизвестная группа - 30005 + admin_templates + sk_xr_info + Replacements are exported into XML format. This option may not work properly if your server has safemode enabled. + Если сервер работает в безопасном режиме - эта опция может работать некоректно.]]> + 31006 0 - - core - admin_tools - qa_deleted - The question has been deleted. - Вопрос удален. - 30005 - 30005 - 0 - - - core - admin_tools - qa_noid - We could not determine which question you were trying to delete. - Невозможно определить вопрос для удаления. - 30005 - 30005 - 0 - - - core - admin_tools - qa_help_title - Registration Question and Answer Challenges - Вопросы и ответы при регистрации - 30005 - 30005 - 0 - - - core - admin_tools - qa_noeditid - We could not determine which question you were trying to edit. - Невозможно определить вопрос для изменения. - 30005 - 30005 - 0 - - - core - admin_tools - qa_delete - Delete... - Удалить - 30005 - 30005 - 0 - - - core - admin_tools - qa_none - There are no challenge questions created yet - Нет созданных вопросов. - 30005 - 30005 - 0 - - - core - admin_tools - qa_edit - Edit... - Изменить - 30005 - 30005 - 0 - - - core - admin_tools - qa_current - Current Questions - Текущие вопросы - 30005 - 30005 - 0 - - - core - admin_tools - qa_addlink - Add New Question - Добавить вопрос - 30005 - 30005 - 0 - - - core - admin_tools - qa_form_question - Question - Вопрос - 30005 - 30005 - 0 - - - core - admin_tools - qa_not_on_title - - Внимание: система вопрос и ответ не задействована - 30005 - 30005 - 0 - core admin_tools qa_not_on_desc here to switch the system on]]> здесь]]> - 30005 - 30005 + 31006 + 31006 0 core admin_tools - qa_editbutton - Edit Question - Изменить вопрос - 30005 - 30005 - 0 - - - core - admin_tools - qa_addbutton - Add Question - Добавить вопрос - 30005 - 30005 - 0 - - - core - admin_tools - qa_404 - We could not determine which question you were trying to edit. - Невозможно определить вопрос для редактирования - 30005 - 30005 + qa_not_on_title + + Внимание: система вопрос и ответ не задействована + 31006 + 31006 0 @@ -24519,18 +25109,8 @@ qa_options Options Настройки - 30005 - 30005 - 0 - - - core - admin_tools - qa_addlog - Added a registration question - Добавить вопрос для регистрации - 30005 - 30005 + 31006 + 31006 0 @@ -24539,18 +25119,8 @@ qa_edited Edited a registration question Изменить вопрос для регистрации - 30005 - 30005 - 0 - - - core - admin_tools - perf_help_title - Toggle Performance Mode - Переключение режима производительности - 30005 - 30005 + 31006 + 31006 0 @@ -24559,198 +25129,2270 @@ qa_form_answers Valid answers. One per line. Правильные ответы. Один на строку. - 30005 - 30005 + 31006 + 31006 0 core admin_tools - perf_enabled_setting - Enabled setting: %s - Включена настройка: %s - 30005 - 30005 + qa_addlog + Added a registration question + Добавить вопрос для регистрации + 31006 + 31006 0 core admin_tools - qa_no_question - You must enter a question. - Необходимо ввести вопрос. - 30005 - 30005 + qa_form_question + Question + Вопрос + 31006 + 31006 0 core admin_tools - perf_current - Current Status - Текущее состояние: - 30005 - 30005 + qa_editbutton + Edit Question + Изменить вопрос + 31006 + 31006 0 core admin_tools - qa_no_answer - You must enter an answer. - Необходимо ввести ответ. - 30005 - 30005 + qa_addbutton + Add Question + Добавить вопрос + 31006 + 31006 0 core admin_tools - perf_toggle - Toggle now - Переключить - 30005 - 30005 + qa_none + There are no challenge questions created yet + Нет созданных вопросов. + 31006 + 31006 0 core admin_tools - perf_on - ENABLED - ВКЛЮЧЕН - 30005 - 30005 + qa_noeditid + We could not determine which question you were trying to edit. + Невозможно определить вопрос для изменения. + 31006 + 31006 0 core admin_tools - perf_off - Disabled - Отключен - 30005 - 30005 + qa_404 + We could not determine which question you were trying to edit. + Невозможно определить вопрос для редактирования + 31006 + 31006 0 core admin_tools - perf_disabled_setting - Disabled setting: %s - Отключена настройка: %s - 30005 - 30005 + qa_current + Current Questions + Текущие вопросы + 31006 + 31006 0 core admin_tools - perf_dispms - Disabled private conversations - Отключены личные беседы - 30005 - 30005 + qa_edit + Edit... + Изменить + 31006 + 31006 0 core admin_tools - perf_discal - Disabled calendar - Отключен календарь - 30005 - 30005 + qa_delete + Delete... + Удалить + 31006 + 31006 0 core admin_tools - perf_disabled_group - - - 30005 - 30005 + qa_addlink + Add New Question + Добавить вопрос + 31006 + 31006 0 core admin_tools - perf_enabled_group - - - 30005 - 30005 + qa_help_title + Registration Question and Answer Challenges + Вопросы и ответы при регистрации + 31006 + 31006 0 core admin_tools - perf_encal - Enabled calendar - Включен календарь - 30005 - 30005 + qa_deleted + The question has been deleted. + Вопрос удален. + 31006 + 31006 0 core admin_tools - perf_dishooks - Disabled hooks - Отключены модификации (хуки) - 30005 - 30005 + qa_noid + We could not determine which question you were trying to delete. + Невозможно определить вопрос для удаления. + 31006 + 31006 0 core admin_tools - perf_disonline - Disabled online list - Отключен список онлайн - 30005 - 30005 + postform_badmd5 + Key did not match + Ключ не совпадает + 31006 + 31006 0 core admin_tools - perf_enpms - Enabled private conversations - Включенные личны беседы - 30005 - 30005 + ua_unknown + Unknown Group + Неизвестная группа + 31006 + 31006 0 core admin_tools - settings_nofile - There were no settings to import - Нет настрооек для импорта - 30005 - 30005 + ua_nav2 + Manage User Agents + Управление User Agents + 31006 + 31006 0 core admin_tools - perf_enhooks - Enabled hooks - Включены модификации (хуки) - 30005 - 30005 + ua_nav1 + Manage User Agent Groups + Управление группами User Agent + 31006 + 31006 0 core admin_tools - perf_enonline - Enabled online list - Включен онлайн список - 30005 - 30005 + ua_savechanges + Save Changes + Сохранить + 31006 + 31006 + 0 + + + core + admin_tools + ua_noid + No ID was passed. Please try again. + UD не найден. + 31006 + 31006 + 0 + + + core + admin_tools + ua_editua + Edit User Agent Group %s + Изменение группы %s + 31006 + 31006 + 0 + + + core + admin_tools + cache__posts + posts + сообщений + 31006 + 31006 + 0 + + + core + admin_tools + ua_addnewtitle + Add New User Agent Group + Новая группа User Agent + 31006 + 31006 + 0 + + + core + admin_tools + ua_addnewbutton + Add New Group + Добавить группу + 31006 + 31006 + 0 + + + core + admin_tools + cache__of + of + из + 31006 + 31006 + 0 + + + core + admin_tools + served_data + %s cached]]> + %s закешировано]]> + 31006 + 31006 + 0 + + + core + admin_tools + no_monitoring_data + No monitoring data available + Мониторинг отключен + 31006 + 31006 + 0 + + + core + admin_tools + c_title + Cache Management + Управление кешем + 31006 + 31006 + 0 + + + core + admin_tools + c_msg + You can check and rebuild your caches from this control panel. + Вы можете проверить кеши или перестроить их + 31006 + 31006 + 0 + + + core + admin_tools + c_processed + processed... + продолжаем... + 31006 + 31006 + 0 + + + core + admin_tools + c_recachethecachegetitgotitgood + Cache re-cached + Кеш обновлен + 31006 + 31006 + 0 + + + core + admin_tools + c_noid + No ID was passed. Please try again. + ID не найден. + 31006 + 31006 + 0 + + + core + admin_tools + export_group + Export this group + Экспортировать + 31006 + 31006 + 0 + + + core + admin_tools + conf_desc_search + In Group: + В группе: + 31006 + 31006 + 0 + + + core + admin_tools + choose_to_export_single + Export Selected Settings + Экспорт + 31006 + 31006 + 0 + + + core + admin_tools + export_selected + EXPORT SELECTED + ЭКСПОРТ ВЫБРАННЫХ + 31006 + 31006 + 0 + + + core + admin_tools + choose_export + Choose settings to export + Выберите настройки для экспорта + 31006 + 31006 + 0 + + + core + admin_tools + export_helptitle + Export Selected System Settings + Экспорт выбранных настроек + 31006 + 31006 + 0 + + + core + admin_tools + s_global_dd + Global Settings + Общие настройки + 31006 + 31006 + 0 + + + core + admin_tools + s_createnewtitle + Create New Setting + Создать новую настройку + 31006 + 31006 + 0 + + + core + admin_tools + s_ishidden + (Hidden) + (скрытая) + 31006 + 31006 + 0 + + + core + admin_tools + setting_keywords + Setting Keywords + Ключи + 31006 + 31006 + 0 + + + core + admin_tools + setting_keywords_desc + You can enter keywords that will be searched when someone uses the ACP quick search to pull up this setting (space or comma separated) + Вы можете ввести несколько ключей (разделенных запятой или пробелом) для быстрого поиска настройки + 31006 + 31006 + 0 + + + core + admin_tools + s_sometoexport + You must select SOME settings to export! + Необходимо выбрать 1 или более настроек для экспорта! + 31006 + 31006 + 0 + + + core + admin_tools + s_revertedback + Configuration setting reverted back to default. + Настройка сброшена на значение по умолчанию + 31006 + 31006 + 0 + + + core + admin_tools + s_deleted + Configuration Setting Deleted + Настройка удалена + 31006 + 31006 + 0 + + + core + admin_tools + s_edited2 + Setting Edited + Настройка отредактирована + 31006 + 31006 + 0 + + + core + admin_tools + s_added2 + New Setting Added + Настройка добавлена + 31006 + 31006 + 0 + + + core + admin_tools + s_updated + Settings updated + Настройки обновлены + 31006 + 31006 + 0 + + + core + admin_tools + s_edit + Edit + Изменить + 31006 + 31006 + 0 + + + core + admin_tools + s_nofields + No fields were passed to be saved. Please try again. + Нет полей для сохранения. + 31006 + 31006 + 0 + + + core + admin_tools + s_delete + Delete + Удалить + 31006 + 31006 + 0 + + + core + admin_tools + s_set4group + Settings for group: %s + Настройки группы: %s + 31006 + 31006 + 0 + + + core + admin_tools + s_revertback + Revert to default value + Отменить + 31006 + 31006 + 0 + + + core + admin_tools + s_nomatches + %s produced no matches. Please try another phrase.]]> + %s не дал результатов.]]> + 31006 + 31006 + 0 + + + core + admin_tools + s_searchedfor + Searched for: %s + Поиск: %s + 31006 + 31006 + 0 + + + core + admin_tools + s_nogroup + No group was passed. Please try again. + Группа не найдена. + 31006 + 31006 + 0 + + + core + admin_tools + s_editor + Full Editor + Расширенный редактор + 31006 + 31006 + 0 + + + core + admin_tools + s_multi + Multi-Select + Мульти выбор + 31006 + 31006 + 0 + + + core + admin_tools + s_name_autocomplete + Member Name Auto Complete Field + Поле имени пользователя с автодополнением + 31006 + 31006 + 0 + + + core + admin_tools + s_dropdown + Drop Down + Выпадающее меню + 31006 + 31006 + 0 + + + core + admin_tools + s_yes_no + Yes/No Radio Buttons + Кнопки Да/Нет + 31006 + 31006 + 0 + + + core + admin_tools + s_textarea + Text Area + Текст (несколько строк) + 31006 + 31006 + 0 + + + core + admin_tools + s_input + Text Input + Текст (одна строка) + 31006 + 31006 + 0 + + + core + admin_tools + s_edited + Setting Group Edited + Группа настроек отредактирована + 31006 + 31006 + 0 + + + core + admin_tools + s_added + New Setting Group Added + Группа настроек добавлена + 31006 + 31006 + 0 + + + core + admin_tools + s_title + Add New Setting Group + Добавить группу настроек + 31006 + 31006 + 0 + + + core + admin_tools + s_editsetting + Edit Setting %s + Редактирование настройки %s + 31006 + 31006 + 0 + + + core + admin_tools + s_savechanges + Save Changes + Создать + 31006 + 31006 + 0 + + + core + admin_tools + s_nokeyword + You must enter a keyword for this group. + Вы должны ввести ключевое слово для этой группы + 31006 + 31006 + 0 + + + core + admin_tools + s_noid + No ID was passed. Please try again. + ID не найден. + 31006 + 31006 + 0 + + + core + admin_tools + s_notitle + You must enter a title for this group. + Вы должны ввести название группы. + 31006 + 31006 + 0 + + + core + admin_tools + s_recounted + Setting Group Recounted + Группа настроек пересчитана. + 31006 + 31006 + 0 + + + core + admin_tools + s_createnew + Create New Setting Group + Создать новую группу настроек + 31006 + 31006 + 0 + + + core + admin_tools + s_remove + Setting Group Removed + Группа настроек удалена + 31006 + 31006 + 0 + + + core + admin_tools + s_cantremove + You cannot remove this setting group as it still contains active settings. Please remove the settings inside it first. + Невозможно удаить группу настроек так как в ней есть активные настройки. + 31006 + 31006 + 0 + + + core + admin_tools + s_noneupdate + No settings to update. + Нет настроек для обновления. + 31006 + 31006 + 0 + + + core + admin_tools + s_upandin + %s settings updated. %s settings inserted. + %s настроек обновлено. %s настроек добавлено. + 31006 + 31006 + 0 + + + core + admin_tools + s_nofile + No upload file was found or no filename was specified. + Загруженный файл не найден. + 31006 + 31006 + 0 + + + core + admin_tools + s_noopen + Could not find the file to open at: %s + Невозможно открыть файл: %s + 31006 + 31006 + 0 + + + core + admin_tools + a_permissions + API Permissions]]> + Ограничения API]]> + 31006 + 31006 + 0 + + + core + admin_tools + a_allowaccess + Allow access to + Разрешить доступ в + 31006 + 31006 + 0 + + + core + admin_tools + a_save + Save + Сохранить + 31006 + 31006 + 0 + + + core + admin_tools + s_missing_key_data + You must supply at least a title and key. + Для отправки формы, как минимум, необходимо указать название и ключ. + 31006 + 31006 + 0 + + + core + admin_tools + s_keyinuse_already + The setting key you selected is already in use. + Ключ настроек, выбранный вами, уже используется в системе. + 31006 + 31006 + 0 + + + core + admin_tools + a_restrictip + API Restrict IP]]> + API IP ограничение]]> + 31006 + 31006 + 0 + + + core + admin_tools + a_restrictip_info + Optional: You may enter the IP Address of the server you only wish to grant access. This increases security and is recommended.]]> + Опционально: Вы можете ввести IP адрес сервера. Рекомендуется для повышения безопасности.]]> + 31006 + 31006 + 0 + + + core + admin_tools + a_usertitle_info + The title is just a name for your records for easier identification. + Заголовок для пользователя для простоты запоминания. + 31006 + 31006 + 0 + + + core + admin_tools + a_userbasics + API User Basics]]> + API пользователь]]> + 31006 + 31006 + 0 + + + core + admin_tools + a_userkey + API User Key]]> + API пользовательский ключ]]> + 31006 + 31006 + 0 + + + core + admin_tools + a_key_info + This key is automatically generated and will be re-generated if you refresh this form. + Этот ключ автоматически создается и перегенерируется при обновлении этой формы. + 31006 + 31006 + 0 + + + core + admin_tools + a_usertitle + API User Title]]> + API заголовок пользователя]]> + 31006 + 31006 + 0 + + + core + admin_tools + a_createone + Would you like to create one? + Создать? + 31006 + 31006 + 0 + + + core + admin_tools + a_create + Create New API User... + Создать нового API пользователя + 31006 + 31006 + 0 + + + core + admin_tools + a_edit + Edit API User... + Изменить + 31006 + 31006 + 0 + + + core + admin_tools + a_remove + Remove API User... + Удалить + 31006 + 31006 + 0 + + + core + admin_tools + a_nousers + There are no API users currently. + На текущий момент API пользователей нет. + 31006 + 31006 + 0 + + + core + admin_tools + a_user + API User + API пользователь + 31006 + 31006 + 0 + + + core + admin_tools + a_log + Log + Запись + 31006 + 31006 + 0 + + + core + admin_tools + a_viewdetails + View Details + Подробности + 31006 + 31006 + 0 + + + core + admin_tools + a_users + XML-RPC API Users + XML-RPC API пользователи + 31006 + 31006 + 0 + + + core + admin_tools + a_formdata + XML-RPC Data (Form Data)]]> + Данные XML-RPC (Данные формы)]]> + 31006 + 31006 + 0 + + + core + admin_tools + a_requestlog + XML-RPC Request Log + Журнал XML-RPC запросов + 31006 + 31006 + 0 + + + core + admin_tools + a_date + Date + Дата + 31006 + 31006 + 0 + + + core + admin_tools + a_status + Status + Статус + 31006 + 31006 + 0 + + + core + admin_tools + a_ip + IP Address + IP адрес + 31006 + 31006 + 0 + + + core + admin_tools + a_time + Time + Время + 31006 + 31006 + 0 + + + core + admin_tools + a_success + Success + Успешность + 31006 + 31006 + 0 + + + core + admin_tools + a_basics + Basics]]> + Основы]]> + 31006 + 31006 + 0 + + + core + admin_tools + a_key + API Key + API ключ + 31006 + 31006 + 0 + + + core + admin_tools + a_detail + XML-RPC Log Detail + Журнал XML-RPC + 31006 + 31006 + 0 + + + core + admin_tools + a_msg4 + You may create API users for use with the XML-RPC system which allows other applications to access IP.Board data + Вы можете создавать API пользователей для использования с XML-RPC системой, которая позволяет другим приложениям использовать данные из IP.Board. + 31006 + 31006 + 0 + + + core + admin_tools + a_msg3 + The XML-RPC system is not enabled!
    All API requests will fail. Click here to enable it]]>
    + XML-RPC система отключена
    API запросы не обрабатываются. Включить ]]>
    + 31006 + 31006 + 0 +
    + + core + admin_tools + a_savechanges + Save Changes + Сохранить + 31006 + 31006 + 0 + + + core + admin_tools + a_disabled + XML-RPC System Disabled + XML-RPC система отключена + 31006 + 31006 + 0 + + + core + admin_tools + a_msg2 + You may create API users for use with the XML-RPC system which allows other applications to access IP.Board data + Вы можете создавать API пользователей для использования с XML-RPC системой, которая позволяет другим приложениям использовать данные из IP.Board. + 31006 + 31006 + 0 + + + core + admin_tools + a_edited + API User Edited + API пользователь изменен + 31006 + 31006 + 0 + + + core + admin_tools + a_createnew + Create New API User + Создать API пользователя + 31006 + 31006 + 0 + + + core + admin_tools + a_edituser + Edit API User: + Редактирование API пользователя: + 31006 + 31006 + 0 + + + core + admin_tools + a_added + API User Added + API пользователь успешно добавлен + 31006 + 31006 + 0 + + + core + admin_tools + a_whatuser + Could not determine the user to remove. + Пользователь для удаления не найден. + 31006 + 31006 + 0 + + + core + admin_tools + a_user404 + The API user could not be found. + Невозможно найти API пользователя. + 31006 + 31006 + 0 + + + core + admin_tools + a_removed + API User successfully removed. + API пользователь успешно удален. + 31006 + 31006 + 0 + + + core + admin_tools + a_entertitle + You must enter a title + Вы должны ввести название + 31006 + 31006 + 0 + + + core + admin_tools + a_noapikey + No API user key passed! + Ключ API не найден! + 31006 + 31006 + 0 + + + core + admin_tools + l_rename_conf +
    • %s
    ]]>
    +
    • %s
    ]]>
    + 31006 + 31006 + 0 +
    + + core + admin_tools + a_lognoid + No log for that ID found. + Не найдено записей для этого ID. + 31006 + 31006 + 0 + + + core + admin_tools + a_title + XML-RPC API Logs + Записи XML-RPC API + 31006 + 31006 + 0 + + + core + admin_tools + a_msg + The red cross indicates an error during the request and a green tick indicates a successful request.]]> + Красный крест означает ошибку, а зеленая галочка говорит о том, что запрос прошел успешно.]]> + 31006 + 31006 + 0 + + + core + admin_tools + l_moveto + We could not determine where you were trying to move the Log In method to. + Невозможно определить куда был перемещен метод авторизации. + 31006 + 31006 + 0 + + + core + admin_tools + l_yesinstalled + Log In method was successfully installed! + Метод авторизации успешно установлен в систему + 31006 + 31006 + 0 + + + core + admin_tools + l_already + The Log In method you requested to install is already installed. + Метод авторизации уже установлен в системе + 31006 + 31006 + 0 + + + core + admin_tools + l_uninstalled + Log In method was successfully uninstalled + Модуль авторизации удален + 31006 + 31006 + 0 + + + core + admin_tools + l_installer404 + We could not find the installer file for the Log In method you wish to install. + Не удалось найти скрипт установщика для устанавливаемого метода авторизации + 31006 + 31006 + 0 + + + core + admin_tools + l_disabled + disabled + отключен + 31006 + 31006 + 0 + + + core + admin_tools + l_installed + Installed Login Handlers + Установленные модули авторизации + 31006 + 31006 + 0 + + + core + admin_tools + l_others + Other Available Login Handlers + Дополнительные модули авторизации + 31006 + 31006 + 0 + + + core + admin_tools + l_successfully + Login In method was successfully + Метод авторизации + 31006 + 31006 + 0 + + + core + admin_tools + l_enabled + enabled + включен + 31006 + 31006 + 0 + + + core + admin_tools + l_msg +  ]]> +   ]]> + 31006 + 31006 + 0 + + + core + admin_tools + l_username_or_email + Username or Email Address + Имя пользователя или Email адрес + 31006 + 31006 + 0 + + + core + admin_tools + l_nav + Manage Log In Authentication + Управление модулями авторизации + 31006 + 31006 + 0 + + + core + admin_tools + l_title + Log In Authentication Manager + Управление модулями авторизации + 31006 + 31006 + 0 + + + core + admin_tools + l_username + Username + Имя пользователя + 31006 + 31006 + 0 + + + core + admin_tools + l_email + Email Address + E-mail адрес + 31006 + 31006 + 0 + + + core + admin_tools + l_registernew + Register New Log In Method + Добавить метод авторизации + 31006 + 31006 + 0 + + + core + admin_tools + l_added + New Log In Method Added + Новый метод авторизации добавлен + 31006 + 31006 + 0 + + + core + admin_tools + l_edited + Log In Method Edited + Метод авторизации изменен + 31006 + 31006 + 0 + + + core + admin_tools + l_confwrite + /conf.php must be writable - please CHMOD this file 0777 + /conf.php должен иметь права на запись - пожалуйста сделайте CHMOD 777 данному файлу + 31006 + 31006 + 0 + + + core + admin_tools + l_confup + Configuration successfully updated for %s + Настройки метода авторизации %s обновлены + 31006 + 31006 + 0 + + + core + admin_tools + l_form + You must complete the entire form. + Необходимо заполнить форму полностью. + 31006 + 31006 + 0 + + + core + admin_tools + l_noconfig + This login method does not have any configuration options. + Метод авторизации не содержит опций для настройки + 31006 + 31006 + 0 + + + core + admin_tools + l_noconfigfile + We could not find the configuration file. + Не удалось найти конфигурационный файл + 31006 + 31006 + 0 + + + core + admin_tools + l_404 + We could not find the login method you were attempting to configure, check, enable, uninstall, or edit. Please try again. + Не удалось найти метод авторизации, который вы пытаетесь настроить, проверить, включить/отключить или изменить. Попробуйте еще раз. + 31006 + 31006 + 0 + + + core + admin_tools + remenu_aboutme + About Me Content + Сведений О себе + 31006 + 31006 + 0 + + + core + admin_tools + remenu_rules + Forum Rules + Правила форума + 31006 + 31006 + 0 + + + core + admin_tools + remenu_none + None + Ничего + 31006 + 31006 + 0 + + + core + admin_tools + re_msgcount + Rebuild User Messenger Totals + Пересчитать сообщения в личном ящике + 31006 + 31006 + 0 + + + core + admin_tools + re_msgcount_info + This will recount members total messages and folder counts + Будут пересчитаны сообщения пользователей и счетчики папок + 31006 + 31006 + 0 + + + core + admin_tools + remenu_sigs + Signatures + Подписей + 31006 + 31006 + 0 + + + core + admin_tools + remenu_announce + Announcements + Объявлений + 31006 + 31006 + 0 + + + core + admin_tools + re_uphoto + Remove Orphaned Uploaded Photos + Удалить потерянные фотографии + 31006 + 31006 + 0 + + + core + admin_tools + re_uphoto_info + This is moderately resource intensive.]]> + Для этого инструмента требуется большее количество ресурсов.]]> + 31006 + 31006 + 0 + + + core + admin_tools + remenu_events + Calendar Events + Событий календаря + 31006 + 31006 + 0 + + + core + admin_tools + remenu_pms + Private Messages + Личных сообщений + 31006 + 31006 + 0 + + + core + admin_tools + re_av_info + This is moderately resource intensive.]]> + Для этого инструмента требуется большее количество ресурсов.]]> + 31006 + 31006 + 0 + + + core + admin_tools + remenu_posts + Post Content + Сообщений + 31006 + 31006 + 0 + + + core + admin_tools + re_av + Remove Orphaned Uploaded Avatars + Удалить потерянные аватары + 31006 + 31006 + 0 + + + core + admin_tools + re_orph_info + This is moderately resource intensive.]]> + Для этого инструмента требуется большее количество ресурсов.]]> + 31006 + 31006 + 0 + + + core + admin_tools + re_data_info + This is moderately resource intensive.]]> + Для этого инструмента требуется большее количество ресурсов.]]> + 31006 + 31006 + 0 + + + core + admin_tools + re_orph + Remove Orphaned Attachments + Удалить потерянные файлы + 31006 + 31006 + 0 + + + core + admin_tools + re_data + Rebuild Attachment Data + Обновить информацию о прикрепленных файлах + 31006 + 31006 + 0 + + + core + admin_tools + re_thumb_info + This is moderately resource intensive.]]> + Для этого инструмента требуется большее количество ресурсов.]]> + 31006 + 31006 + 0 + + + core + admin_tools + re_thumb + Rebuild Attachment Thumbnails + Обновить изображения предпросмотра + 31006 + 31006 + 0 + + + core + admin_tools + re_pphoto_info + This is moderately resource intensive.]]> + Для этого инструмента требуется большее количество ресурсов.]]> + 31006 + 31006 + 0 + + + core + admin_tools + re_pphoto + Rebuild Profile Photo Thumbnails + Обновить фотографии пользователей + 31006 + 31006 + 0 + + + core + admin_tools + re_count_info + THERE IS NO UNDO!]]> + ЭТО ДЕЙСТВИЕ НЕЛЬЗЯ ОТМЕНИТЬ!]]> + 31006 + 31006 + 0 + + + core + admin_tools + re_user + Rebuild User Names + Обновление имен пользователей + 31006 + 31006 + 0 + + + core + admin_tools + re_user_info + + Обновление сохраненных имен пользователей в сообщениях, темах, журналах и т.д. Полезно, если вы недавно вручную меняли имена пользователей. + 31006 + 31006 + 0 + + + core + admin_tools + re_count + Rebuild User Post Counts + Обновление счетчиков пользователей + 31006 + 31006 + 0 + + + core + admin_tools + re_seouser + + Обновление SEO имен пользователей + 31006 + 31006 + 0 + + + core + admin_tools + re_seouser_info + This will reset the SEO display name for all members + Инструмент сбрасывает все SEO имена пользователей + 31006 + 31006 + 0 + + + core + admin_tools + re_rebuildbutton + Rebuild Content + Перестроение контента + 31006 + 31006 + 0 + + + core + admin_tools + re_rebuild_info + This will rebuild the submitted content including BBCode, custom bbcode, HTML (where allowed) and emoticons. This is only necessary upon upgrading to IP.Board 3.0, and does not need to be run more than once. + Инструмент обновляет содержимое всего контента. Осуществляется перестройка оформления BB-кодов, HTML, смайликов внутри контента. Данный инструмент нужено запустить только единожды - после обновления до IP.Board 3.0 + 31006 + 31006 + 0 + + + core + admin_tools + re_topics_info + This will recount replies, attachment count and the topic starter and last poster for all your topics. + Инструмент позволяет обновить счетчики, а так же информацию о последнем авторе для всех ваших тем. + 31006 + 31006 + 0 + + + core + admin_tools + re_rebuild + + + 31006 + 31006 + 0 + + + core + admin_tools + re_topics + Resynchronize Topics + Синхронизация тем + 31006 + 31006 + 0 + + + core + admin_tools + re_s_most + + Сбросить информацию о рекорде посещаемости? + 31006 + 31006 + 0 + + + core + admin_tools + re_forums_info + This will recount replies, views, and the topic starter and last poster for all your forums. + Инструмент позволяет обновить счетчики, а так же информацию о последней теме и авторе для всех ваших форумов. + 31006 + 31006 + 0 + + + core + admin_tools + re_forums + Resynchronize Forums + Синхронизация форумов + 31006 + 31006 + 0 + + + core + admin_tools + re_s_last + Reset last registered member + Сбросить информацию о последнем зарегистрированном пользователе? + 31006 + 31006 + 0 + + + core + admin_tools + re_stats + Recount Statistics + Пересчет статистики + 31006 + 31006 + 0 + + + core + admin_tools + re_s_total + Recount total topics and posts + Пересчитать количество тем и сообщений? + 31006 + 31006 + 0 + + + core + admin_tools + re_s_members + Recount Members + Пересчитать количество пользователей? + 31006 + 31006 + 0 + + + core + admin_tools + re_percycle + Per Cycle + за цикл + 31006 + 31006 + 0 + + + core + admin_tools + re_ban_info + Running this tool attempts to import your old ban settings. Old entries will not overwrite new entries.]]> + Инструмент позволяет восстановить фильтры бана, которые могли быть потеряны в результате обновления с 1.х.х. При восстановлении, новые настройки не удаляются. + 31006 + 31006 + 0 + + + core + admin_tools + re_ban + + Восстановление бан фильтров + 31006 + 31006 + 0 + + + core + admin_tools + re_converge_info + This tool finds these members and restores them into the default member group and asks them to change their email address.]]> + Инструмент позволяет найти пользователей, чья учетная запись содержит дублирующий e-mail адрес, а аккаунт переведен в группу ожидающих активации. Такое может произойти в результате обновления или же конвертации форума с другой форумной системы. + 31006 + 31006 + 0 + + + core + admin_tools + re_converge + + Поиск и восстановление пользователей + 31006 + 31006 + 0 + + + core + admin_tools + re_dupe1_info + This tool finds the duplicates which have a greater ID than the original.]]> + Инструмент позволяет очистить настройки форума от дубликатов, которые могут возникнуть в результате конвертации форума с другой форумной системы или при обновлении форума с версии 1.х.х. + 31006 + 31006 + 0 + + + core + admin_tools + re_dupe1 + Remove Duplicate System Settings from IPB 2.0.x + Удаление повторяющихся настроек в 2.0.x + 31006 + 31006 + 0 + + + core + admin_tools + re_polls_info + + Инструмент позволяет преобразовать опросы созданные в версии 2.0.х в новый формат, используемый в версии 2.1.х. Используйте данный инструмент после ручного обновления. + 31006 + 31006 + 0 + + + core + admin_tools + re_polls + Convert 2.0.x Polls to 2.1.x Format + Конвертация опросов 2.0.х в формат версии 2.1.х + 31006 + 31006 + 0 + + + core + admin_tools + re_events_info + + Инструмент позволяет преобразовать события календаря созданные в версии 2.0.х в новый формат, используемый в версии 2.1.х. Используйте данный инструмент после ручного обновления. + 31006 + 31006 + 0 + + + core + admin_tools + re_1xto20_info + These tools will clean up and rebuild content from an upgrade from the IP.Board 1.x.x series + Этот инструмент проведет очистку и обновление содержимого после перехода с IP.Board 1.x.x + 31006 + 31006 + 0 + + + core + admin_tools + re_dupe2 + Remove Duplicate System Setting Groups from IPB 2.1.x + Удаление повторяющихся настроек в 2.1.х + 31006 + 31006 + 0 + + + core + admin_tools + re_dupe2_info + + Инструмент позволяет очистить настройки форума от дубликатов, которые могут возникнуть при обновлении форума с версии 2.0.х + 31006 + 31006 + 0 + + + core + admin_tools + re_events + Convert 2.0.x Calendar Events to 2.1.x Format + Конвертация событий календаря 2.0.х в формат версии 2.1.х + 31006 + 31006 + 0 + + + core + admin_tools + re_20to21_info + These tools will clean up and rebuild content from an upgrade from the IP.Board 2.0.x series + Этот инструмент проведет очистку и обновление содержимого после перехода с IP.Board 2.0.x + 31006 + 31006 + 0 + + + core + admin_tools + re_21to22_info + These tools will clean up and rebuild content from an upgrade from the IP.Board 2.1.x series + Этот инструмент проведет очистку и обновление содержимого после перехода с IP.Board 2.1.x + 31006 + 31006 + 0 + + + core + admin_tools + re_21to22 + 2.2.0 Upgrade Tools]]> + 2.2.0]]> + 31006 + 31006 + 0 + + + core + admin_tools + re_20to21 + 2.1.0 Upgrade Tools]]> + 2.1.0]]> + 31006 + 31006 + 0 + + + core + admin_tools + re_1xto20 + 2.0.0 Upgrade Tools]]> + 2.0.0]]> + 31006 + 31006 + 0 + + + core + admin_tools + re_230to300 + 3.0.x Upgrade Tools]]> + 3.0.x]]> + 31006 + 31006 + 0 + + + core + admin_tools + re_runtool + + + 31006 + 31006 + 0 + + + core + admin_tools + re_processed + Processed topic + Обработана тема + 31006 + 31006 + 0 + + + core + admin_tools + re_title + + Инструменты пересчета и обновления + 31006 + 31006 + 0 + + + core + admin_tools + re_pmsconverted + All PMs converted + Все личные сообщения успешно конвертированы + 31006 + 31006 + 0 + + + core + admin_tools + re_msgsconverted + PMs have already been converted. No action required + Личные сообщения уже сконвертированы, никакие действия не требуются + 31006 + 31006 + 0 + + + core + admin_tools + re_300pms + Convert 2.x PMs To 3.0.x Format + Конвертировать личные сообщения из 2.x в формат 3.0.x + 31006 + 31006 + 0 + + + core + admin_tools + re_300pms_info + If you chose to skip PM conversion during the upgrade and cannot run the shell tool, then please run this tool + + 31006 + 31006 + 0 + + + core + admin_tools + re_noresizefound + Could not find file to resize: + Невозможно найти файл: + 31006 + 31006 + 0 + + + core + admin_tools + re_resized + Resized: + Изменен размер: + 31006 + 31006 + 0 + + + core + admin_tools + re_noremove + Could not remove: + Невозможно удалить: + 31006 + 31006 + 0 + + + core + admin_tools + re_thisgoeshere + Up to %s processed so far, continuing...]]> + Обработано %s. Продолжаем... + +]]> + 31006 + 31006 + 0 + + + core + admin_tools + re_rebuildcomp + Rebuild completed
    ]]>
    + Обновление завершено
    ]]>
    + 31006 + 31006 0
    @@ -24759,68 +27401,18 @@ re_attachedok Attached file OK: Прикрепленный файл: - 30005 - 30005 + 31006 + 31006 0 core admin_tools - re_statscenter - Recount Statistics Section - Раздел пересчета статистики - 30005 - - 0 - - - core - admin_tools - re_pollconverted - Polls converted]]> - Опросы сконвертированы]]> - 30005 - - 0 - - - core - admin_tools - re_calconverted - Calendar events converted]]> - События календаря сконвертированы]]> - 30005 - - 0 - - - core - admin_tools - re_pollstartto - Polls: %s to %s of %s completed...]]> - Опросы: с %s по %s из %s завершено]]> - 30005 - - 0 - - - core - admin_tools - re_keepingid - KEEPING: %s ID %s - Сохранение: %s ID %s - 30005 - - 0 - - - core - admin_tools - re_nothing - Nothing to recount! - Ничего не выбрано для пересчета! - 30005 - + re_removedorph + Removed orphan: + Удален: + 31006 + 31006 0 @@ -24829,8 +27421,48 @@ re_statsrecount Statistics Recounted Статистика пересчитана - 30005 - + 31006 + 31006 + 0 + + + core + admin_tools + re_statscenter + Recount Statistics Section + Раздел пересчета статистики + 31006 + 31006 + 0 + + + core + admin_tools + re_nothing + Nothing to recount! + Ничего не выбрано для пересчета! + 31006 + 31006 + 0 + + + core + admin_tools + re_pollstartto + Polls: %s to %s of %s completed...]]> + Опросы: с %s по %s из %s завершено]]> + 31006 + 31006 + 0 + + + core + admin_tools + re_pollconverted + Polls converted]]> + Опросы сконвертированы]]> + 31006 + 31006 0 @@ -24839,8 +27471,8 @@ re_calalready Calendar events already converted. Календарные события уже конвертированы. - 30005 - + 31006 + 31006 0 @@ -24849,8 +27481,18 @@ re_calstartto Calendar events: %s to %s completed...]]> Календарные события: c %s по %s завершено.]]> - 30005 - + 31006 + 31006 + 0 + + + core + admin_tools + re_calconverted + Calendar events converted]]> + События календаря сконвертированы]]> + 31006 + 31006 0 @@ -24859,8 +27501,18 @@ re_calremoved You cannot run this tool as the old calendar_events table has been removed. Запуск инструмента невозможен, так как таблица calendar_events была удалена. - 30005 - + 31006 + 31006 + 0 + + + core + admin_tools + re_keepingid + KEEPING: %s ID %s + Сохранение: %s ID %s + 31006 + 31006 0 @@ -24869,8 +27521,8 @@ re_duplicatetitle %s]]> %s]]> - 30005 - + 31006 + 31006 0 @@ -24879,8 +27531,8 @@ re_deletingid Deleting: %s ID %s Удаление: %s ID %s - 30005 - + 31006 + 31006 0 @@ -24889,48 +27541,8 @@ re_deletetitle %s duplicate setting titles deletes and %s duplicate settings deleted. Удалено повторяющихся названий: %s, повторяющихся настроек: %s - 30005 - - 0 - - - core - admin_tools - h_edit - Edit - Изменить - 30005 - 30005 - 0 - - - core - admin_tools - h_remove - Remove - Удалить - 30005 - 30005 - 0 - - - core - admin_tools - h_addnew - Add New Help File - Добавить раздел помощи - 30005 - 30005 - 0 - - - core - admin_tools - re_bansimport - %s IP address(es) imported, %s email address(es) imported, %s name(s) imported. - %s IP-адресов импортировано, %s адресов e-mail импортировано, %s имен импортировано. - 30005 - 30005 + 31006 + 31006 0 @@ -24939,28 +27551,8 @@ re_convergerest %s members found and restored. %s пользователей восстановлено. - 30005 - - 0 - - - core - admin_tools - h_current - Current Help Files - Разделы помощи - 30005 - 30005 - 0 - - - core - admin_tools - h_ftitle - Title - Название - 30005 - 30005 + 31006 + 31006 0 @@ -24969,18 +27561,68 @@ h_export Export XML into App Dirs Экспортировать XML - 30005 - 30005 + 31006 + 31006 0 core admin_tools - h_filetext - Help File Text - Текст - 30005 - 30005 + h_current + Current Help Files + Разделы помощи + 31006 + 31006 + 0 + + + core + admin_tools + h_ftitle + Title + Название + 31006 + 31006 + 0 + + + core + admin_tools + h_edit + Edit + Изменить + 31006 + 31006 + 0 + + + core + admin_tools + h_remove + Remove + Удалить + 31006 + 31006 + 0 + + + core + admin_tools + h_addnew + Add New Help File + Добавить раздел помощи + 31006 + 31006 + 0 + + + core + admin_tools + re_bansimport + %s IP address(es) imported, %s email address(es) imported, %s name(s) imported. + %s IP-адресов импортировано, %s адресов e-mail импортировано, %s имен импортировано. + 31006 + 31006 0 @@ -24989,58 +27631,18 @@ h_fileapp Help File Application Приложение - 30005 - 30005 + 31006 + 31006 0 core admin_tools - h_filetitle - Help File Title - Название - 30005 - 30005 - 0 - - - core - admin_tools - h_filedesc - Help File Description - Краткое описание - 30005 - 30005 - 0 - - - core - admin_tools - h_import_added - App: %s - %s added, %s updated help files inserted - Приложение: %s - %s добавлено, %s обновленных файлов помощи добавлено - 30005 - 30005 - 0 - - - core - admin_tools - h_exported - Help Files Exported as XML - Файлы помощи экспортированы в XML - 30005 - 30005 - 0 - - - core - admin_tools - h_import - Import App XML Files - Импортировать XML - 30005 - 30005 + h_filetext + Help File Text + Текст + 31006 + 31006 0 @@ -25049,18 +27651,48 @@ h_imported XML Files Imported Файлы XML импортированы - 30005 - 30005 + 31006 + 31006 0 core admin_tools - h_addlog - Added a help file - Добавлен файл помощи - 30005 - 30005 + h_import_added + App: %s - %s added, %s updated help files inserted + Приложение: %s - %s добавлено, %s обновленных файлов помощи добавлено + 31006 + 31006 + 0 + + + core + admin_tools + h_exported + Help Files Exported as XML + Файлы помощи экспортированы в XML + 31006 + 31006 + 0 + + + core + admin_tools + h_filetitle + Help File Title + Название + 31006 + 31006 + 0 + + + core + admin_tools + h_filedesc + Help File Description + Краткое описание + 31006 + 31006 0 @@ -25069,18 +27701,28 @@ h_title Help File Management Управление разделами помощи - 30005 - 30005 + 31006 + 31006 0 core admin_tools - h_addbutton - Add this Help File - Добавить этот файл помощи - 30005 - 30005 + h_addlog + Added a help file + Добавлен файл помощи + 31006 + 31006 + 0 + + + core + admin_tools + h_import + Import App XML Files + Импортировать XML + 31006 + 31006 0 @@ -25089,8 +27731,18 @@ h_editbutton Edit this Help File Изменить раздел помощи - 30005 - 30005 + 31006 + 31006 + 0 + + + core + admin_tools + h_addbutton + Add this Help File + Добавить этот файл помощи + 31006 + 31006 0 @@ -25099,28 +27751,8 @@ h_404 We could not find that help file in the database. Please try again. Файл помощи не найден в базе данных. - 30005 - 30005 - 0 - - - core - admin_tools - h_added - Added a help file - Файл помощи добавлен - 30005 - 30005 - 0 - - - core - admin_tools - h_edited - Edited help files - Измененные файлы помощи - 30005 - 30005 + 31006 + 31006 0 @@ -25129,8 +27761,28 @@ h_entertitle You must enter a title. Please try again. Необходимо ввести название. - 30005 - 30005 + 31006 + 31006 + 0 + + + core + admin_tools + h_added + Added a help file + Файл помощи добавлен + 31006 + 31006 + 0 + + + core + admin_tools + h_edited + Edited help files + Измененные файлы помощи + 31006 + 31006 0 @@ -25139,8 +27791,8 @@ h_removed Removed a help file Файл помощи удален - 30005 - 30005 + 31006 + 31006 0 @@ -25149,8 +27801,8 @@ h_noid You must pass a valid ID. Please try again. ID не найден. - 30005 - 30005 + 31006 + 31006 0 @@ -25159,38 +27811,8 @@ ua_rebuild_master Rebuild Default User Agents Обновить стандартные User Agents - 30005 - - 0 - - - core - admin_tools - t_import - Import - Импортировать - 30005 - 30005 - 0 - - - core - admin_tools - t_l_nomethods - There are no %s login methods available - Нет %s доступных методов авторизации - 30005 - - 0 - - - core - admin_tools - t_l_html3_info - - - 30005 - + 31006 + 31006 0 @@ -25199,18 +27821,18 @@ t_l_uninstall Uninstall... Удалить - 30005 - + 31006 + 31006 0 core admin_tools - t_l_export - Export... - Экспортировать - 30005 - 30005 + t_import + Import + Импортировать + 31006 + 31006 0 @@ -25219,8 +27841,18 @@ t_l_configdetails Configure Details... Настроить - 30005 - 30005 + 31006 + 31006 + 0 + + + core + admin_tools + t_l_export + Export... + Экспортировать + 31006 + 31006 0 @@ -25229,8 +27861,8 @@ t_l_disable Disable Отключить - 30005 - 30005 + 31006 + 31006 0 @@ -25239,18 +27871,18 @@ t_l_enable Enable Включить - 30005 - 30005 + 31006 + 31006 0 core admin_tools - t_l_html_info - Enter the HTML to add or replace the log in form. - Введите HTML код для замены формы авторизации или для добавление к ней. - 30005 - + t_l_nomethods + There are no %s login methods available + Нет %s доступных методов авторизации + 31006 + 31006 0 @@ -25259,8 +27891,18 @@ t_l_html3 Log In HTML Replace Form]]> HTML код формы для замены]]> - 30005 - + 31006 + 31006 + 0 + + + core + admin_tools + t_l_html3_info + + + 31006 + 31006 0 @@ -25269,8 +27911,8 @@ t_l_html2_info Enter the HTML to add or replace the ACP log in form. Введите HTML код для замены формы авторизации Админцентра или для добавление к ней. - 30005 - + 31006 + 31006 0 @@ -25279,8 +27921,18 @@ t_l_html2 ACP Log In Form HTML]]> HTML код формы Админцентра для замены]]> - 30005 - + 31006 + 31006 + 0 + + + core + admin_tools + t_l_html_info + Enter the HTML to add or replace the log in form. + Введите HTML код для замены формы авторизации или для добавление к ней. + 31006 + 31006 0 @@ -25289,8 +27941,8 @@ t_l_type Login Type]]> Тип]]> - 30005 - + 31006 + 31006 0 @@ -25299,38 +27951,8 @@ t_l_html Log In Form HTML]]> HTML код формы]]> - 30005 - 30005 - 0 - - - core - admin_tools - t_uaregex - Regex: - Регулярное выражение: - 30005 - - 0 - - - core - admin_tools - t_uacapture - Regex Capture Version Number? - Версия User Agent в Regex - 30005 - - 0 - - - core - admin_tools - t_uacapture_desc - (If yes, enter the parenthesis # you wish to capture) - (если необходимо получать версию агента, введите номер группы regex, в который сохраняется версия) - 30005 - + 31006 + 31006 0 @@ -25339,38 +27961,38 @@ t_configdetails Configuration Details for Детали настроек для - 30005 - 30005 + 31006 + 31006 0 core admin_tools - t_ua_position - User Agent Position: - Позиция: - 30005 - + t_uacapture_desc + (If yes, enter the parenthesis # you wish to capture) + (если необходимо получать версию агента, введите номер группы regex, в который сохраняется версия) + 31006 + 31006 0 core admin_tools - t_uaname - User Agent Name: - Название - 30005 - + t_uaregex + Regex: + Регулярное выражение: + 31006 + 31006 0 core admin_tools - t_uaname_desc - (Example: Firefox) - (Например: Firefox) - 30005 - + t_uacapture + Regex Capture Version Number? + Версия User Agent в Regex + 31006 + 31006 0 @@ -25379,8 +28001,18 @@ t_uaother Other Иное - 30005 - + 31006 + 31006 + 0 + + + core + admin_tools + t_ua_position + User Agent Position: + Позиция: + 31006 + 31006 0 @@ -25389,8 +28021,8 @@ t_uasearchengine Search Engine Поисковик - 30005 - + 31006 + 31006 0 @@ -25399,28 +28031,8 @@ t_uabrowser Web Browser Веб-браузер - 30005 - - 0 - - - core - admin_tools - t_uatype - User Agent Type: - Тип - 30005 - - 0 - - - core - admin_tools - t_uakey - User Agent Key: - Ключ - 30005 - + 31006 + 31006 0 @@ -25429,8 +28041,28 @@ t_uakey_desc (Alphanumerics and underscore only; Example: firefox) - 30005 - + 31006 + 31006 + 0 + + + core + admin_tools + t_uatype + User Agent Type: + Тип + 31006 + 31006 + 0 + + + core + admin_tools + t_uakey + User Agent Key: + Ключ + 31006 + 31006 0 @@ -25439,8 +28071,28 @@ t_ua_editing Editing: Редактирование: - 30005 - + 31006 + 31006 + 0 + + + core + admin_tools + t_uaname + User Agent Name: + Название + 31006 + 31006 + 0 + + + core + admin_tools + t_uaname_desc + (Example: Firefox) + (Например: Firefox) + 31006 + 31006 0 @@ -25449,28 +28101,8 @@ t_uaposition Position: Позиция: - 30005 - - 0 - - - core - admin_tools - t_ua_longtext -
    It is also recommended that you allow 'Explorer', 'Netscape' and 'Mozilla' to be positioned last. Many other browsers contain 'Explorer' or 'Mozilla' in the user agent which could lead to incorrect identifications.]]>
    -
    Так же рекомендуется ставить 'Explorer', 'Netscape' и 'Mozilla' на последнее место, так как многие браузеры содержат 'Explorer' или 'Mozilla' в своих user agent строках, что может привести к неправильной их идентификации.]]>
    - 30005 - - 0 -
    - - core - admin_tools - t_uaaddnew - Add New User Agent - Добавить User Agent - 30005 - + 31006 + 31006 0 @@ -25479,78 +28111,28 @@ t_uamanagement User Agent Management Список User Agent - 30005 - + 31006 + 31006 0 core admin_tools - t_ua_removeg - Remove Group... - Удалить - 30005 - + t_uaaddnew + Add New User Agent + Добавить User Agent + 31006 + 31006 0 core admin_tools - t_uasave - Save - Сохранить - 30005 - - 0 - - - core - admin_tools - t_uaclose - Close - Закрыть - 30005 - - 0 - - - core - admin_tools - t_ua_groups - User Agent Groups - Группы User Agent - 30005 - - 0 - - - core - admin_tools - t_ua_editg - Edit Group... - Изменить - 30005 - - 0 - - - core - admin_tools - t_ua_none - create one?]]> - создать одну.]]> - 30005 - - 0 - - - core - admin_tools - t_ua_nonein - Click me to build the master User Agent list]]> - Создать базовый список]]> - 30005 - + t_ua_longtext +
    It is also recommended that you allow 'Explorer', 'Netscape' and 'Mozilla' to be positioned last. Many other browsers contain 'Explorer' or 'Mozilla' in the user agent which could lead to incorrect identifications.]]>
    +
    Так же рекомендуется ставить 'Explorer', 'Netscape' и 'Mozilla' на последнее место, так как многие браузеры содержат 'Explorer' или 'Mozilla' в своих user agent строках, что может привести к неправильной их идентификации.]]>
    + 31006 + 31006 0
    @@ -25559,48 +28141,78 @@ t_ua_information Information Информация - 30005 - + 31006 + 31006 0 core admin_tools - t_uaediting - Editing Versions for - Редактирование версии для - 30005 - + t_ua_nonein + Click me to build the master User Agent list]]> + Создать базовый список]]> + 31006 + 31006 0 core admin_tools - t_uaversions - Versions - Версии - 30005 - + t_ua_none + create one?]]> + создать одну.]]> + 31006 + 31006 0 core admin_tools - t_uaconfigure - Configure - Настроить - 30005 - + t_ua_removeg + Remove Group... + Удалить + 31006 + 31006 0 core admin_tools - t_uatitle - User Agent Group Title]]> - Название группы]]> - 30005 - + t_ua_editg + Edit Group... + Изменить + 31006 + 31006 + 0 + + + core + admin_tools + t_uaclose + Close + Закрыть + 31006 + 31006 + 0 + + + core + admin_tools + t_ua_groups + User Agent Groups + Группы User Agent + 31006 + 31006 + 0 + + + core + admin_tools + t_uasave + Save + Сохранить + 31006 + 31006 0 @@ -25609,18 +28221,38 @@ t_ua_info Leave it blank to match all versions of this user-agent.]]> Не заполняйте поле, если нет необходимости определять версию user-agent.]]> - 30005 - + 31006 + 31006 0 core admin_tools - t_uaallavail - All Available Agents (Click to add to group) - Доступные агенты (нажатие добавляет в группу) - 30005 - + t_uaediting + Editing Versions for + Редактирование версии для + 31006 + 31006 + 0 + + + core + admin_tools + t_uaversions + Versions + Версии + 31006 + 31006 + 0 + + + core + admin_tools + t_uaconfigure + Configure + Настроить + 31006 + 31006 0 @@ -25629,18 +28261,8 @@ t_uaremove Remove Удалить - 30005 - - 0 - - - core - admin_tools - t_uagroups - - Агенты этой группы - 30005 - + 31006 + 31006 0 @@ -25649,48 +28271,48 @@ tol_add_this_option_into_the_setti Add this option into the settings cache? Добавить в кеш - 30005 - + 31006 + 31006 0 core admin_tools - tol_start_setting_group - Start setting group? - Начинает новую группу настроек - 30005 - + t_uatitle + User Agent Group Title]]> + Название группы]]> + 31006 + 31006 0 core admin_tools - tol_enter_title_here_or_leave_blan - Enter title here or leave blank to not start a setting group - Введите название группы или оставьте поле пустым - 30005 - + t_uagroups + + Агенты этой группы + 31006 + 31006 0 core admin_tools - tol_end_setting_group - End setting group? - Завершает группу настроек - 30005 - + t_uaallavail + All Available Agents (Click to add to group) + Доступные агенты (нажатие добавляет в группу) + 31006 + 31006 0 core admin_tools - tol_end_an_opened_setting_group - End an opened setting group - Опция закрывает открытую ранее группу настроек - 30005 - + t_uaedit + Edit + Изменить + 31006 + 31006 0 @@ -25699,28 +28321,28 @@ tol_make_a_default_setting_cannot_ Make a default setting (cannot be removed by user)? Настройка по умолчанию? - 30005 - + 31006 + 31006 0 core admin_tools - tol_use_for_creating_form_element_ - Drop down box use: Key=Value; one per line.]]> - Например для выпадающего список в данном поле перечисляются значения полей в виде: Ключ=Значение]]> - 30005 - 30005 + tol_enter_title_here_or_leave_blan + Enter title here or leave blank to not start a setting group + Введите название группы или оставьте поле пустым + 31006 + 31006 0 core admin_tools - tol_raw_php_code_to_eval_before_sh - Raw PHP code to eval before showing and saving? - PHP, исполняемый при показе и сохранении настройки - 30005 - + tol_start_setting_group + Start setting group? + Начинает новую группу настроек + 31006 + 31006 0 @@ -25729,18 +28351,28 @@ tol_036show_1_is_set_when_showing_ $save = 1; is set when saving the setting.
    Use $key and $value when writing PHP code.]]>
    Параметр $save имеет значение 1 - когда происходит сохранение значения настройки
    Параметры $key и $value обозначают, соответственно, ключ и значение настройки]]>
    - 30005 - + 31006 + 31006 0
    core admin_tools - tol_setting_current_value - Setting Current Value? - Текущее значение настройки - 30005 - + tol_raw_php_code_to_eval_before_sh + Raw PHP code to eval before showing and saving? + PHP, исполняемый при показе и сохранении настройки + 31006 + 31006 + 0 + + + core + admin_tools + tol_use_for_creating_form_element_ + Drop down box use: Key=Value; one per line.]]> + Например для выпадающего список в данном поле перечисляются значения полей в виде: Ключ=Значение]]> + 31006 + 31006 0 @@ -25749,8 +28381,8 @@ tol_setting_extra Setting Extra? Дополнительные параметры - 30005 - + 31006 + 31006 0 @@ -25759,28 +28391,8 @@ tol_setting_default_value Setting Default Value? Значение настройки по умолчанию - 30005 - - 0 - - - core - admin_tools - tol_setting_description - Setting Description? - Описание - 30005 - - 0 - - - core - admin_tools - tol_setting_group - Setting Group? - Группа - 30005 - + 31006 + 31006 0 @@ -25789,8 +28401,8 @@ tol_setting_type Setting Type? Тип - 30005 - + 31006 + 31006 0 @@ -25799,18 +28411,8 @@ tol_setting_key Setting Key? Ключ - 30005 - - 0 - - - core - admin_tools - tol_setting_position - Setting Position? - Позиция в списке - 30005 - + 31006 + 31006 0 @@ -25819,18 +28421,48 @@ tol_setting_title Setting title? Название - 30005 - + 31006 + 31006 0 core admin_tools - tol_hide_from_main_settings_list - Hide from main settings list? - Не выводить в списке настроек - 30005 - + tol_setting_position + Setting Position? + Позиция в списке + 31006 + 31006 + 0 + + + core + admin_tools + tol_setting_description + Setting Description? + Описание + 31006 + 31006 + 0 + + + core + admin_tools + tol_setting_group + Setting Group? + Группа + 31006 + 31006 + 0 + + + core + admin_tools + tol_setting_current_value + Setting Current Value? + Текущее значение настройки + 31006 + 31006 0 @@ -25839,8 +28471,18 @@ tol_update_settings Update Settings Применить - 30005 - 30005 + 31006 + 31006 + 0 + + + core + admin_tools + tol_hide_from_main_settings_list + Hide from main settings list? + Не выводить в списке настроек + 31006 + 31006 0 @@ -25849,8 +28491,8 @@ tol_used_to_pull_this_from_the_db_ Used to pull this from the DB without relying on an ID Используется для получения настройки из базы данных без ID - 30005 - 30005 + 31006 + 31006 0 @@ -25859,8 +28501,8 @@ tol_setting_group_keyword Setting Group Keyword? Ключ - 30005 - + 31006 + 31006 0 @@ -25869,8 +28511,8 @@ tol_setting_group_description Setting Group Description? Описание - 30005 - + 31006 + 31006 0 @@ -25879,8 +28521,8 @@ tol_setting_group_tab Setting Group Tab? Принадлежит закладке - 30005 - + 31006 + 31006 0 @@ -25889,8 +28531,8 @@ tol_go Go Отправить - 30005 - + 31006 + 31006 0 @@ -25899,8 +28541,8 @@ tol_setting_group_title Setting Group Title? Название - 30005 - + 31006 + 31006 0 @@ -25909,48 +28551,8 @@ tol_setting_group_application Setting Group Application? Приложение - 30005 - - 0 - - - core - admin_tools - tol_the_file_must_be_uploaded_into - - - 30005 - 30005 - 0 - - - core - admin_tools - tol_import_xml_settings - Import XML Settings - Импортирование настроек - 30005 - - 0 - - - core - admin_tools - tol_upload_xml_settings_file_from_ - Upload XML settings file from your computer - Загрузка файла XML с настройками - 30005 - 30005 - 0 - - - core - admin_tools - tol_duplicate_entries_will_not_be_ - - - 30005 - + 31006 + 31006 0 @@ -25959,8 +28561,18 @@ tol_search_settings Search Settings... Поиск настроек - 30005 - + 31006 + 31006 + 0 + + + core + admin_tools + tol_the_file_must_be_uploaded_into + + + 31006 + 31006 0 @@ -25969,48 +28581,38 @@ tol_or_enter_the_filename_of_the_x OR enter the filename of the XML settings file]]> ИЛИ введите название файла]]> - 30005 - + 31006 + 31006 0 core admin_tools - tol_recount_settings_group - Recount Settings Group... - Пересчитать - 30005 - + tol_duplicate_entries_will_not_be_ + + + 31006 + 31006 0 core admin_tools - tol_folder - Folder - Директория - 30005 - + tol_upload_xml_settings_file_from_ + Upload XML settings file from your computer + Загрузка файла XML с настройками + 31006 + 31006 0 core admin_tools - tol_manage_settings - Manage Settings... - Перейти к настройкам - 30005 - - 0 - - - core - admin_tools - tol_edit_settings_group - Edit Settings Group... - Редактировать - 30005 - + tol_import_xml_settings + Import XML Settings + Импортирование настроек + 31006 + 31006 0 @@ -26019,68 +28621,48 @@ tol_delete_settings_group Delete Settings Group... Удалить - 30005 - + 31006 + 31006 0 core admin_tools - tol_loaded_on_initialization - Loaded on Initialization - ЗАГРУЖАЕТСЯ в начале работы форума - 30005 - + tol_recount_settings_group + Recount Settings Group... + Пересчитать + 31006 + 31006 0 core admin_tools - tol_loaded_on_initialization_canno - Loaded on Initialization (Cannot unload) - Загружается в начале работы форума (не может быть отключен) - 30005 - + tol_edit_settings_group + Edit Settings Group... + Редактировать + 31006 + 31006 0 core admin_tools - tol_not_loaded_on_initialization - NOT loaded on Initialization - НЕ ЗАГРУЖАЕТСЯ в начале работы форума - 30005 - + tol_folder + Folder + Директория + 31006 + 31006 0 core admin_tools - tol_recache_cache - Recache Cache... - Обновить - 30005 - - 0 - - - core - admin_tools - tol_view_cache - View Cache.. - Посмотреть содержимое - 30005 - 30005 - 0 - - - core - admin_tools - tol_total_cache_size - Total Cache Size - Общий размер кеша - 30005 - 30005 + tol_manage_settings + Manage Settings... + Перейти к настройкам + 31006 + 31006 0 @@ -26089,48 +28671,68 @@ tol_recache_all Recache All Перестроить весь кеш - 30005 - + 31006 + 31006 0 core admin_tools - tol_diagnostics - Diagnostics... - Проверить - 30005 - + tol_total_cache_size + Total Cache Size + Общий размер кеша + 31006 + 31006 0 core admin_tools - tol_global_caches - Global Caches - Система - 30005 - + tol_recache_cache + Recache Cache... + Обновить + 31006 + 31006 0 core admin_tools - tol_cache_management - Cache Management - Управление кешем - 30005 - + tol_view_cache + View Cache.. + Посмотреть содержимое + 31006 + 31006 0 core admin_tools - tol_size - Size - Размер - 30005 - + tol_not_loaded_on_initialization + NOT loaded on Initialization + НЕ ЗАГРУЖАЕТСЯ в начале работы форума + 31006 + 31006 + 0 + + + core + admin_tools + tol_loaded_on_initialization_canno + Loaded on Initialization (Cannot unload) + Загружается в начале работы форума (не может быть отключен) + 31006 + 31006 + 0 + + + core + admin_tools + tol_loaded_on_initialization + Loaded on Initialization + ЗАГРУЖАЕТСЯ в начале работы форума + 31006 + 31006 0 @@ -26139,8 +28741,48 @@ tol_init_state Init State Подключение - 30005 - + 31006 + 31006 + 0 + + + core + admin_tools + tol_size + Size + Размер + 31006 + 31006 + 0 + + + core + admin_tools + tol_global_caches + Global Caches + Система + 31006 + 31006 + 0 + + + core + admin_tools + tol_cache_management + Cache Management + Управление кешем + 31006 + 31006 + 0 + + + core + admin_tools + tol_diagnostics + Diagnostics... + Проверить + 31006 + 31006 0 @@ -26149,8 +28791,8 @@ tol_install Install... Установить - 30005 - + 31006 + 31006 0 @@ -26159,18 +28801,8 @@ tol_edit_details Edit Details... Редактировать - 30005 - - 0 - - - core - admin_tools - tol_enable_safemode - Enable Safemode? - Включить режим безопасности? - 30005 - + 31006 + 31006 0 @@ -26179,8 +28811,18 @@ tol_cannot_be_deleted_or_edited_by Cannot be deleted or edited by user Не может быть удалена или изменена - 30005 - + 31006 + 31006 + 0 + + + core + admin_tools + tol_enable_safemode + Enable Safemode? + Включить режим безопасности? + 31006 + 31006 0 @@ -26189,17 +28831,7 @@ tol_if_yes_this_log_in_will_be_ena - 30005 - - 0 - - - core - admin_tools - tol_log_in_user_log_out_url - Log In User Log Out URL - URL завершения сессии - 30005 + 31006 0 @@ -26209,38 +28841,18 @@ tol_the_url_for_the_place_to_log_o (Optional) The URL to send the user to when they request to log out. (Не обязательно) URL для перенаправления пользователя для выхода из системы. - 30005 - 30005 + 31006 + 31006 0 core admin_tools - tol_log_in_user_register_url - Log In User Register URL - URL регистрации - 30005 - - 0 - - - core - admin_tools - tol_log_in_files_folder_name - Log In Files Folder Name - Имя директории с файлами модуля - 30005 - - 0 - - - core - admin_tools - tol_the_main_folder_the_php_files_ - E.G: If ./sources/loginauth/internal/auth.php then enter: internal]]> - Например: Если файл './sources/loginauth/internal/auth.php', то директория - internal]]> - 30005 - 30005 + tol_log_in_user_log_out_url + Log In User Log Out URL + URL завершения сессии + 31006 + 31006 0 @@ -26249,8 +28861,8 @@ tol_the_url_for_the_place_to_log_i (Optional) The URL to send the user to when they request to log in. (Не обязательно) URL для перенаправления пользователя для авторизации - 30005 - 30005 + 31006 + 31006 0 @@ -26259,8 +28871,18 @@ tol_log_in_user_log_in_url Log In User Log In URL URL формы авторизации - 30005 - + 31006 + 31006 + 0 + + + core + admin_tools + tol_log_in_user_register_url + Log In User Register URL + URL регистрации + 31006 + 31006 0 @@ -26269,18 +28891,8 @@ tol_the_url_for_the_place_to_regis (Optional) The URL to send the user to when they attempt to register a new account. (Не обязательно) URL для перенаправления пользователя желающего пройти регистрацию. - 30005 - 30005 - 0 - - - core - admin_tools - tol_the_url_for_the_place_they_can - (Optional) The URL to send a user to when they request to change their email address or password. - (Не обязательно) URL для переадресации пользователя, желающего сменить e-mail или пароль. - 30005 - 30005 + 31006 + 31006 0 @@ -26289,8 +28901,38 @@ tol_log_in_user_maintenance_url Log In User Maintenance URL Служебный URL для пользователей - 30005 - + 31006 + 31006 + 0 + + + core + admin_tools + tol_the_url_for_the_place_they_can + (Optional) The URL to send a user to when they request to change their email address or password. + (Не обязательно) URL для переадресации пользователя, желающего сменить e-mail или пароль. + 31006 + 31006 + 0 + + + core + admin_tools + tol_the_main_folder_the_php_files_ + E.G: If ./sources/loginauth/internal/auth.php then enter: internal]]> + Например: Если файл './sources/loginauth/internal/auth.php', то директория - internal]]> + 31006 + 31006 + 0 + + + core + admin_tools + tol_log_in_files_folder_name + Log In Files Folder Name + Имя директории с файлами модуля + 31006 + 31006 0 @@ -26299,18 +28941,8 @@ tol_a_short_description_for_this_l A short description for this log in method Короткое описание модуля авторизации - 30005 - - 0 - - - core - admin_tools - tol_log_in_title - Log In Title - Название - 30005 - + 31006 + 31006 0 @@ -26319,8 +28951,18 @@ tol_log_in_description Log In Description Описание - 30005 - + 31006 + 31006 + 0 + + + core + admin_tools + tol_log_in_title + Log In Title + Название + 31006 + 31006 0 @@ -26329,8 +28971,8 @@ tol_writeable Writeable Доступен на запись - 30005 - 30005 + 31006 + 31006 0 @@ -26339,8 +28981,8 @@ tol_exists Exists Существует - 30005 - + 31006 + 31006 0 @@ -26349,8 +28991,8 @@ tol_file_name File Name Имя файла - 30005 - + 31006 + 31006 0 @@ -26359,8 +29001,8 @@ tol_log_in_has_settings Log In Has Settings Модуль имеет настройки? - 30005 - + 31006 + 31006 0 @@ -26369,8 +29011,8 @@ tol_log_in_installed Log In Installed Модуль установлен? - 30005 - + 31006 + 31006 0 @@ -26379,8 +29021,8 @@ tol_log_in_enabled Log In Enabled Модуль включен? - 30005 - + 31006 + 31006 0 @@ -26389,38 +29031,8 @@ tol_diagnostics_title Log In Method Diagnostics Отчет о проверке модуля - 30005 - - 0 - - - core - admin_tools - tol_add_new_setting_group - Add New Setting Group - Добавить группу настроек - 30005 - - 0 - - - core - admin_tools - tol_diagnostics_for - Diagnostics for - Отчет для - 30005 - - 0 - - - core - admin_tools - tol_options - Options - Действия - 30005 - + 31006 + 31006 0 @@ -26429,8 +29041,28 @@ tol_register_new_log_in_method Add Log In Method Добавить метод - 30005 - 30005 + 31006 + 31006 + 0 + + + core + admin_tools + tol_diagnostics_for + Diagnostics for + Отчет для + 31006 + 31006 + 0 + + + core + admin_tools + tol_options + Options + Действия + 31006 + 31006 0 @@ -26439,8 +29071,8 @@ tol_registered_log_in_authenticati Registered Log In Authentication Methods Модули авторизации - 30005 - 30005 + 31006 + 31006 0 @@ -26449,18 +29081,18 @@ tol_settings Settings Настройки - 30005 - 30005 + 31006 + 31006 0 core admin_tools - cc_processed - Removal Completed: %s items removed - Удаление завершено: %s позиций удалено - 30005 - 30005 + tol_add_new_setting_group + Add New Setting Group + Добавить группу настроек + 31006 + 31006 0 @@ -26469,8 +29101,18 @@ perf_help_information Режим производительности позволяет легко перевести вашу систему в состояние, при котором будут отключены ресурсоемкие возможности, не являющиеся критичными для функционирования форума. При переключении в данный режим, старые настройки запоминаются и вы в любой момент снова можете вернуться к ним. Рекомендуется использовать данный режим в случаях внезапного повышения нагрузки на систему (например, в результате лавинообразного трафика). - 30005 - 30005 + 31006 + 31006 + 0 + + + core + admin_tools + cc_processed + Removal Completed: %s items removed + Удаление завершено: %s позиций удалено + 31006 + 31006 0 @@ -26479,8 +29121,8 @@ cc_sigs Cached Signatures Кешированных подписей - 30005 - 30005 + 31006 + 31006 0 @@ -26489,18 +29131,8 @@ cc_posts Cached Posts Сообщений в кеше - 30005 - 30005 - 0 - - - core - admin_tools - cc_header - Cached Content - Кеш содержимого - 30005 - 30005 + 31006 + 31006 0 @@ -26509,8 +29141,18 @@ cc_remove_seven Remove items older than %s days Удалить записи старше %s дней - 30005 - 30005 + 31006 + 31006 + 0 + + + core + admin_tools + cc_header + Cached Content + Кеш содержимого + 31006 + 31006 0 @@ -26519,58 +29161,8 @@ cc_remove_all Remove all items Очистить полностью - 30005 - 30005 - 0 - - - core - admin_tools - cache__posts - posts - сообщений - 30006 - 30006 - 0 - - - core - admin_tools - cache__of - of - из - 30006 - 30006 - 0 - - - core - admin_tools - no_monitoring_data - No monitoring data available - Мониторинг отключен - 30006 - 30006 - 0 - - - core - admin_tools - served_data - %s cached]]> - %s закешировано]]> - 30006 - 30006 - 0 - - - core - admin_tools - t_uaedit - Edit - Изменить - 30006 - 30006 + 31006 + 31006 0 @@ -26579,88 +29171,8 @@ login_manage_enabled Enabled? Включен? - 30006 - 30006 - 0 - - - core - admin_tools - re_msgcount_info - This will recount members total messages and folder counts - Будут пересчитаны сообщения пользователей и счетчики папок - 30008 - 30008 - 0 - - - core - admin_tools - re_msgcount - Rebuild User Messenger Totals - Пересчитать сообщения в личном ящике - 30008 - 30008 - 0 - - - core - admin_tools - re_230to300 - 3.0.x Upgrade Tools]]> - 3.0.x]]> - 30008 - 30008 - 0 - - - core - admin_tools - re_300pms_info - If you chose to skip PM conversion during the upgrade and cannot run the shell tool, then please run this tool - - 30008 - 30008 - 0 - - - core - admin_tools - re_msgsconverted - PMs have already been converted. No action required - Личные сообщения уже сконвертированы, никакие действия не требуются - 30008 - 30008 - 0 - - - core - admin_tools - re_300pms - Convert 2.x PMs To 3.0.x Format - Конвертировать личные сообщения из 2.x в формат 3.0.x - 30008 - 30008 - 0 - - - core - admin_tools - re_pmsconverted - All PMs converted - Все личные сообщения успешно конвертированы - 30008 - 30008 - 0 - - - core - admin_tools - re_noresizefound - Could not find file to resize: - Невозможно найти файл: - 30008 - 30008 + 31006 + 31006 0 @@ -26669,18 +29181,8 @@ setting_staff_tag ( STAFF ) ( АДМ ) - 30008 - 30008 - 0 - - - core - admin_tools - remenu_rules - Forum Rules - Правила форума - 30011 - 30011 + 31006 + 31006 0 @@ -26689,8 +29191,8 @@ add_setting_button Add New Setting Добавить настройку - 30011 - 30011 + 31006 + 31006 0 @@ -26699,8 +29201,8 @@ settings_h_prefix Settings: Настройки: - 30011 - 30011 + 31006 + 31006 0 @@ -26709,8 +29211,8 @@ noneed_rebuild_again You do not need to rebuild this content again. Содержимое уже обновлено - 30011 - 30011 + 31006 + 31006 0 @@ -26719,8 +29221,8 @@ rebuild_process_f Processed forum %s Обработан форум %s - 30012 - 30012 + 31006 + 31006 0 @@ -26729,8 +29231,889 @@ tools300pms Checked %s PMs so far. This cycle: Private Messages converted into conversations.. Обработано %s личных сообщений. - 30012 - 30012 + 31006 + 31006 + 0 + + + core + admin_tools + sl_deletebook + Delete + Удалить + 31006 + 31006 + 0 + + + core + admin_tools + sl_editbook + Edit... + Изменить + 31006 + 31006 + 0 + + + core + admin_tools + sl_title + Title + Название + 31006 + 31006 + 0 + + + core + admin_tools + sl_m_title + Share Link Services + Сервисы публикации ссылок + 31006 + 31006 + 0 + + + core + admin_tools + sl_services + Services + Сервисы + 31006 + 31006 + 0 + + + core + admin_tools + sl_add + Add Service + Добавить сервис + 31006 + 31006 + 0 + + + core + admin_tools + sl_icon_info + Images are located in public/style_extra/sharelinks/ + Изображения расположены в public/style_extra/sharelinks/ + 31006 + 31006 + 0 + + + core + admin_tools + sl_icon + Icon + Иконка + 31006 + 31006 + 0 + + + core + admin_tools + sl_url_info + + + 31006 + 31006 + 0 + + + core + admin_tools + sl_url + URL + URL + 31006 + 31006 + 0 + + + core + admin_tools + sl_current_title + Share Services + Сервисы публикации ссылок + 31006 + 31006 + 0 + + + core + admin_tools + license_key_server_error + There was an error contacting the license server, please try again later + Ошибка соединения с сервером, повторите попытку позже + + 31006 + 31006 + 0 + + + core + admin_tools + license_cache + click here to refresh the data.]]> + нажмите сюда чтобы обновить данные]]> + 31006 + 31006 + 0 + + + core + admin_tools + license_url + Forum URL + Адрес форума + 31006 + 31006 + 0 + + + core + admin_tools + license_activate + Activate Your License + Данные лицензии + 31006 + 31006 + 0 + + + core + admin_tools + license_addons + License Addons + Добавление лицензии + 31006 + 31006 + 0 + + + core + admin_tools + license_key + License Key + Ключ лицензии + 31006 + 31006 + 0 + + + core + admin_tools + license_services + License Services + Сервис лицензии + 31006 + 31006 + 0 + + + core + admin_tools + login_method_missing_functions + PHP functions required by this login method are missing: %s + Запрос php функции данного метода авторизации утерян: %s + 31006 + 31006 + 0 + + + core + admin_tools + pop3_okay + Test successful: %d messages found. + Тест успешен. Найдено %s сообщений. + 31006 + 31006 + 0 + + + core + admin_tools + pop3_err_stats + Could not retrieve mailbox statistics + Не удалось получить статистику ящика + 31006 + 31006 + 0 + + + core + admin_tools + pop3_err_login + Could not log in + Не удалось идентифицироваться + 31006 + 31006 + 0 + + + core + admin_tools + pop3_err_connect + Could not connect to the server + Не удалось соединится с сервером + 31006 + 31006 + 0 + + + core + admin_tools + ie_test_pop3 + Test POP3 + Проверка POP3 + 31006 + 31006 + 0 + + + core + admin_tools + ie_delete_done + Rule Deleted + Правило удалено + 31006 + 31006 + 0 + + + core + admin_tools + ie_sendto + Send to: + Отправить: + 31006 + 31006 + 0 + + + core + admin_tools + ie_deleted + Deleted Incoming Email Rule %s + Удалено правил для входящих Email адресов %s + 31006 + 31006 + 0 + + + core + admin_tools + ie_saved + Rule Saved + Правило сохранено + 31006 + 31006 + 0 + + + core + admin_tools + ie_added + Added Incoming Email Rule %s + Добавлено правил для входящих Email %s + 31006 + 31006 + 0 + + + core + admin_tools + ie_updated + Altered Incoming Email Rule %s + Изменено правил для входящих Email адресов %s + 31006 + 31006 + 0 + + + core + admin_tools + ie_save + Save Rule + Сохранить + 31006 + 31006 + 0 + + + core + admin_tools + ie_ignore + Ignore Message + Игнорируемые сообщения + 31006 + 31006 + 0 + + + core + admin_tools + ie_rule + Rule + Правило + 31006 + 31006 + 0 + + + core + admin_tools + ie_ct_regx + Matches Regular Expression + Удовлетворяет регулярному выражению + 31006 + 31006 + 0 + + + core + admin_tools + ie_ct_eqls + Equals + Совпадение + 31006 + 31006 + 0 + + + core + admin_tools + ie_ct_ctns + Contains + Содержимое + 31006 + 31006 + 0 + + + core + admin_tools + ie_cf_body + Body + Сообщение + 31006 + 31006 + 0 + + + core + admin_tools + ie_cf_sbjt + Subject + Тема + 31006 + 31006 + 0 + + + core + admin_tools + ie_cf_to + Destination Email + Адресат + 31006 + 31006 + 0 + + + core + admin_tools + ie_cf_from + Sender Email + Исходящий Email + 31006 + 31006 + 0 + + + core + admin_tools + ie_not_found + Could not locate the rule you are trying to edit. + Не найдено правило для изменения + 31006 + 31006 + 0 + + + core + admin_tools + ie_none + No rules to show + Нет правил для отображения + 31006 + 31006 + 0 + + + core + admin_tools + ie_action + Action + Действие + 31006 + 31006 + 0 + + + core + admin_tools + ie_criteria + Criteria + Критерий + 31006 + 31006 + 0 + + + core + admin_tools + ie_edit + Edit Rule + Изменить + 31006 + 31006 + 0 + + + core + admin_tools + ie_add + Add Rule + Добавить правило + 31006 + 31006 + 0 + + + core + admin_tools + ie_title + Incoming Email Rules + Правила для входящих Email адресов + 31006 + 31006 + 0 + + + core + admin_tools + sl_formerror + Form Error + Ошибка формы + 31006 + 31006 + 0 + + + core + admin_tools + sl_removed + Share link service removed + Сервис удален + 31006 + 31006 + 0 + + + core + admin_tools + sl_updated + + + 31006 + 31006 + 0 + + + core + admin_tools + sl_added + + + 31006 + 31006 + 0 + + + core + admin_tools + sl_must_key + You must enter a key + Вы должны ввести ключ + 31006 + 31006 + 0 + + + core + admin_tools + sl_must_url + You must enter a URL format + Вы должны ввести формат сслыки + 31006 + 31006 + 0 + + + core + admin_tools + sl_must_title + You must enter a title + Вы должны ввести название + 31006 + 31006 + 0 + + + core + admin_tools + sl_form_enabled + Enabled + Включено + 31006 + 31006 + 0 + + + core + admin_tools + sl_form_canonical + Use Canonical URL + Использовать стандартную ссылку + 31006 + 31006 + 0 + + + core + admin_tools + sl_form_key_info + It is also used as the icon file name: /public/style_extra/sharelinks/KEY.png]]> + А также используется в имени файла иконки метода: /public/style_extra/sharelinks/KEY.png]]> + 31006 + 31006 + 0 + + + core + admin_tools + sl_form_key + Key + Ключ + 31006 + 31006 + 0 + + + core + admin_tools + sl_form_url_info + + + 31006 + 31006 + 0 + + + core + admin_tools + sl_form_url + URL Format + Формат ссылки + 31006 + 31006 + 0 + + + core + admin_tools + sl_form_title + Link Service Name + Название + 31006 + 31006 + 0 + + + core + admin_tools + sl_form_edit_button + Save Changes + Сохранить + 31006 + 31006 + 0 + + + core + admin_tools + sl_form_edit_title + Edit link sharing service + Изменить ссылку публичного сервиса + 31006 + 31006 + 0 + + + core + admin_tools + sl_form_new_button + Add + Добавить + 31006 + 31006 + 0 + + + core + admin_tools + sl_form_new_title + Add new link share service + Добавление нового сервиса публикации ссылок + 31006 + 31006 + 0 + + + core + admin_tools + uaversions + Versions: + Версии: + 31006 + 31006 + 0 + + + core + admin_tools + removelicensekey + Remove License Key + Удалить ключ + 31006 + 31006 + 0 + + + core + admin_tools + editloginmethod + Edit Log In Method + Редактирование метода входа + 31006 + 31006 + 0 + + + core + admin_tools + qa_no_question + You must enter a question. + Необходимо ввести вопрос. + 31006 + 31006 + 0 + + + core + admin_tools + qa_no_answer + You must enter an answer. + Необходимо ввести ответ. + 31006 + 31006 + 0 + + + core + admin_tools + perf_help_title + Toggle Performance Mode + Переключение режима производительности + 31006 + 31006 + 0 + + + core + admin_tools + perf_current + Current Status + Текущее состояние: + 31006 + 31006 + 0 + + + core + admin_tools + perf_on + ENABLED + ВКЛЮЧЕН + 31006 + 31006 + 0 + + + core + admin_tools + perf_off + Disabled + Отключен + 31006 + 31006 + 0 + + + core + admin_tools + perf_toggle + Toggle now + Переключить + 31006 + 31006 + 0 + + + core + admin_tools + perf_enabled_setting + Enabled setting: %s + Включена настройка: %s + 31006 + 31006 + 0 + + + core + admin_tools + perf_disabled_setting + Disabled setting: %s + Отключена настройка: %s + 31006 + 31006 + 0 + + + core + admin_tools + perf_enabled_group + + + 31006 + 31006 + 0 + + + core + admin_tools + perf_disabled_group + + + 31006 + 31006 + 0 + + + core + admin_tools + perf_dispms + Disabled private conversations + Отключены личные беседы + 31006 + 31006 + 0 + + + core + admin_tools + perf_discal + Disabled calendar + Отключен календарь + 31006 + 31006 + 0 + + + core + admin_tools + perf_disonline + Disabled online list + Отключен список онлайн + 31006 + 31006 + 0 + + + core + admin_tools + perf_dishooks + Disabled hooks + Отключены хуки + 31006 + 31006 + 0 + + + core + admin_tools + perf_enpms + Enabled private conversations + Включенные личные беседы + 31006 + 31006 + 0 + + + core + admin_tools + perf_encal + Enabled calendar + Включен календарь + 31006 + 31006 + 0 + + + core + admin_tools + perf_enonline + Enabled online list + Включен онлайн список + 31006 + 31006 + 0 + + + core + admin_tools + perf_enhooks + Enabled hooks + Включены хуки + 31006 + 31006 + 0 + + + core + admin_tools + settings_nofile + There were no settings to import + Нет настрооек для импорта + 31006 + 31006 0 diff --git a/upload/admin/applications/core/xml/core_bbcode.xml b/upload/admin/applications/core/xml/core_bbcode.xml index 7388ab78..e8c89cb1 100644 --- a/upload/admin/applications/core/xml/core_bbcode.xml +++ b/upload/admin/applications/core/xml/core_bbcode.xml @@ -24,13 +24,14 @@ 0 core + 2 Выровнять по правому краю Выравнивание содержимого поля для размещения сообщений по правому краю right - {content}]]> + {content}]]> 0 0 @@ -48,13 +49,14 @@ 0 core + 3 Выровнять по левому краю Выравнивание содержимого поля для размещения сообщений по левому краю left - {content}]]> + {content}]]> 0 0 @@ -72,13 +74,14 @@ 0 core + 4 Выровнять по центру Выравнивание содержимого поля для размещения сообщений по центру center - {content}]]> + {content}]]> 0 0 @@ -96,13 +99,14 @@ 0 core + 5 Ссылка на тему Данный тег позволяет легко создать ссылку на тему topic - {content}]]> + {content}]]> 1 0 @@ -120,13 +124,14 @@ 0 core + 6 Ссылка на сообщение Данный тег позволяет легко создать ссылку на сообщение post - {content}]]> + {content}]]> 1 0 @@ -144,6 +149,7 @@ 0 core + 8 @@ -151,7 +157,7 @@ Тег скрытого текста spoiler - Скрытый текст + Скрытый текст
    ]]>
    0 @@ -169,8 +175,9 @@ 0 - 0 + 1 core +
    9 @@ -195,6 +202,7 @@ 0 core + 9 @@ -219,6 +227,7 @@ 0 core + 14 @@ -243,6 +252,7 @@ 0 core + 15 @@ -267,6 +277,7 @@ 0 core + 16 @@ -291,6 +302,7 @@ 0 core + 17 @@ -317,6 +329,7 @@ 0 core + 18 @@ -345,6 +358,7 @@ print_r($variable);[/php]]]> 0 core + 19 @@ -355,11 +369,9 @@ print_r($variable);[/php]]]> {content} ]]> 0 - -
    +

    Привет, Мир!

    -
    -[/html]]]>
    + [/html]]]> 0 @@ -375,6 +387,7 @@ print_r($variable);[/php]]]> 0 core +
    20 @@ -401,6 +414,7 @@ print_r($variable);[/php]]]> 0 core + 21 @@ -431,6 +445,7 @@ print_r($variable);[/php]]]> 0 core + 22 @@ -457,6 +472,7 @@ print_r($variable);[/php]]]> 0 core + 23 @@ -481,6 +497,7 @@ print_r($variable);[/php]]]> 0 core + 24 @@ -507,6 +524,7 @@ print_r($variable);[/php]]]> 0 core + 25 @@ -531,6 +549,7 @@ print_r($variable);[/php]]]> 0 core + 26 @@ -564,6 +583,7 @@ print_r($variable);[/php]]]> 0 core + 27 @@ -588,6 +608,7 @@ print_r($variable);[/php]]]> 0 core + 28 @@ -612,6 +633,7 @@ print_r($variable);[/php]]]> 0 core + 29 @@ -636,6 +658,7 @@ print_r($variable);[/php]]]> 0 core + 30 @@ -662,6 +685,7 @@ print_r($variable);[/php]]]> 0 core + 31 @@ -686,6 +710,7 @@ print_r($variable);[/php]]]> 0 core + 32 @@ -710,6 +735,7 @@ print_r($variable);[/php]]]> 0 core + 33 @@ -734,6 +760,7 @@ print_r($variable);[/php]]]> 0 core + 34 @@ -742,7 +769,7 @@ print_r($variable);[/php]]]> font {content}]]> 1 - + 0 @@ -758,6 +785,7 @@ print_r($variable);[/php]]]> 0 core + 35 @@ -782,6 +810,7 @@ print_r($variable);[/php]]]> 0 core + 36 @@ -799,13 +828,14 @@ print_r($variable);[/php]]]> all defaults.php 2 - 0 + 1 1 video,movie,flash,blogmedia,youtube 1 0 core + 35 @@ -830,13 +860,14 @@ print_r($variable);[/php]]]> 0 core + 36 Ссылка на блог Создание ссылки на конкретный блог в системе. blog - {content}]]> + {content}]]> 1 0 @@ -854,13 +885,14 @@ print_r($variable);[/php]]]> 0 core + 37 Ссылка на запись в блоге Создание ссылки на запись в блоге. entry - {content}]]> + {content}]]> 1 0 @@ -878,13 +910,14 @@ print_r($variable);[/php]]]> 0 core + - 39 + 38 Twitter twitter - @{content}]]> + @{content}]]> 0 0 @@ -900,8 +933,9 @@ print_r($variable);[/php]]]> 0 twitter.png - 1 + 0 core + diff --git a/upload/admin/applications/core/xml/core_help.xml b/upload/admin/applications/core/xml/core_help.xml index beec56de..d66ea187 100644 --- a/upload/admin/applications/core/xml/core_help.xml +++ b/upload/admin/applications/core/xml/core_help.xml @@ -13,7 +13,7 @@
    "Поиск по ключевым словам" здесь вы можете ввести ключ, по которому необходимо осуществить поиск.

    -"Поиск по автору" данное поле необходимо заполнить, если вы хотите найти публикации от определенного пользователя. По мере ввода имени пользователя, вам будут предложены варианты имен пользователей, которые подходят к уже введенному.
    +"Поиск по автору" данное поле необходимо заполнить, если вы хотите найти публикации от определенного пользователя. По мере ввода имени пользователя, вам будут предложены варианты имен пользователей, которые подходят уже введенному.

    "Поиск по дате" вы можете ограничить поиск определенным временным интервалом. Для этого необходимо вызвать при помощи кнопки календарь и в нем выбрать нужную дату.

    @@ -25,7 +25,7 @@ Вы можете использовать поиск внутри конкретных разделов или тем. Под списком каждого раздела или темы есть форма "Поиск по форуму" и "Поиск по теме" - просто введите ключевое слово в данное поле и нажмите кнопку ОК чтобы запустить контекстный поиск.

    Результаты
    -Результаты поиска представляются страницей с закладками. Закладки определяют по какой части форума осуществляется поиск. Например, результаты под закладкой "Форумы" собраны при поиске по темам и сообщениям форумов, а результаты под закладкой "Пользователи" - при поиске по списку пользователей.
    +Результаты поиска представляются страницей с закладками. Закладки определяют, по какой части форума осуществляется поиск. Например, результаты под закладкой "Форумы" собраны при поиске по темам и сообщениям форумов, а результаты под закладкой "Пользователи" - при поиске по списку пользователей.

    Вы можете сортировать результаты поиска по релевантности или по дате.

    @@ -120,9 +120,9 @@ Игнорируемые пользователи
    На этой странице вы можете настроить игнорирование пользователей, а так же что именно вы не хотите получать от них.

    -Для добавления пользователя в список, введите его имя в поле "Имя пользователя". По мере ввода имени вам будут предложены варианты имен пользователей, удовлетворяющих тому что вы вводите. Теперь необходимо определить что именно вы не хотите получать. Отмечаю опцию "Игнорировать личные сообщения" вы запрещаете пользователю отправлять вам личные сообщения, выбирая опцию "Игнорировать сообщения", вы отключаете показ всех сообщений данного пользователя в темах. Вы можете выбрать обе опции, для полного игнорирования пользователя на форуме. После того как нужные поля будут заполнены нажмите кнопку Сохранить.
    +Для добавления пользователя в список, введите его имя в поле "Имя пользователя". По мере ввода имени вам будут предложены варианты имен пользователей, удовлетворяющих тому, что вы вводите. Теперь необходимо определить, что именно вы не хотите получать. Отмечаю опцию "Игнорировать личные сообщения" вы запрещаете пользователю отправлять вам личные сообщения, выбирая опцию "Игнорировать сообщения", вы отключаете показ всех сообщений данного пользователя в темах. Вы можете выбрать обе опции, для полного игнорирования пользователя на форуме. После того как нужные поля будут заполнены нажмите кнопку Сохранить.

    -Заметим что некоторые группы пользователей имеют иммунитет к игнорированию, вы не сможете игнорировать пользователей из таких групп.
    +Заметим, что некоторые группы пользователей имеют иммунитет к игнорированию, вы не сможете игнорировать пользователей из таких групп.

    Если вы решили прекратить игнорировать пользователя просто нажмите кнопку "Удалить", так же вы в любой момент можете изменить что именно вы не хотите получать от пользователя.]]> Редактирование контактной и персональной информации, аватаров, подписи, настроек форума, смена языка и стиля. @@ -158,9 +158,9 @@

    Восстановление забытого пароля
    -Если вы забыли свой пароль то на странице входа есть ссылка "Я забыл свой пароль". Пройдя по ней вы попадете на форму восстановления пароля. В этой форме вам необходимо будет ввести ваши имя пользователя или email (которые вы указывали при регистрации) и форум вышлет вам новые данные на ваш e-mail.
    +Если вы забыли свой пароль то на странице входа есть ссылка "Я забыл свой пароль". Пройдя по ней, вы попадете на форму восстановления пароля. В этой форме вам необходимо будет ввести ваши имя пользователя или email (которые вы указывали при регистрации) и форум вышлет вам новые данные на ваш e-mail.

    -Не пытайтесь подобрать свой пароль, наш форум при большом количестве не верных попыток авторизации блокирует аккаунт. Поэтому лучше восстановить пароль, прежде чем система заблокирует вас, в противном случае вы не сможете воспользоваться своей учетной записью, даже с новым (восстановленным) паролем до тех пор пока администратор не снимет блокировку с вашей учетной записи, или блокировка не снимется автоматически.
    +Не пытайтесь подобрать свой пароль, наш форум при большом количестве неверных попыток авторизации блокирует аккаунт. Поэтому лучше восстановить пароль, прежде чем система заблокирует вас, в противном случае вы не сможете воспользоваться своей учетной записью, даже с новым (восстановленным) паролем до тех пор, пока администратор не снимет блокировку с вашей учетной записи, или блокировка не снимется автоматически.


    Выход
    @@ -171,10 +171,10 @@ Связь с администрацией форума - +
    Заметим, что если вы нашли нарушение на форуме и хотите привлечь внимание администрации форума, вы просто можете воспользоваться кнопкой " Жалоба", которая обычно находится рядом с содержимым.]]>
    - Подробно о том как связаться с администарцией форума + Подробно о том, как связаться с администарцией форума 10 core
    diff --git a/upload/admin/applications/core/xml/core_lofi_css.xml b/upload/admin/applications/core/xml/core_lofi_css.xml deleted file mode 100644 index 192c531c..00000000 --- a/upload/admin/applications/core/xml/core_lofi_css.xml +++ /dev/null @@ -1,1768 +0,0 @@ - - - - 3 - 1260269077 - calendar_select - .calendar_date_select { - color:white; - border:#777 1px solid; - display:block; - width:195px; - z-index: 1000; -} -/* this is a fun ie6 hack to get drop downs to stay behind the popup window. This should always be just underneath .calendar_date_select */ -iframe.ie6_blocker { - position: absolute; - z-index: 999; -} - -.calendar_date_select thead th { - font-weight:bold; - background-color: #000; - border-top:1px solid #777; - border-bottom:2px solid #333; - color: white !important; -} - -.calendar_date_select .cds_buttons { - text-align:center; - padding:5px 0px; - background-color: #555; -} - -.calendar_date_select .cds_footer { - background-color: black; - padding:3px; - font-size:12px; - text-align:center; -} - -.calendar_date_select table { - margin: 0px; - padding: 0px; -} - - -.calendar_date_select .cds_header { - background-color: #ccc; - border-bottom: 2px solid #aaa; - text-align:center; -} - -.calendar_date_select .cds_header span { - font-size:15px; - color: black; - font-weight: bold; -} - -.calendar_date_select select { font-size:11px;} - -.calendar_date_select .cds_header a:hover { - color: white; -} -.calendar_date_select .cds_header a { - width:22px; - height:20px; - text-decoration: none; - font-size:14px; - color:black !important; -} - -.calendar_date_select .cds_header a.prev { - float:left; -} -.calendar_date_select .cds_header a.next { - float:right; -} -.calendar_date_select .cds_header a.close { - float:right; - display:none; -} - -.calendar_date_select .cds_header select.month { - width:90px; -} - -.calendar_date_select .cds_header select.year { - width:61px; -} - -.calendar_date_select .cds_buttons a { - color: white; - font-size: 9px; -} -.calendar_date_select td { - font-size:12px; - width: 24px; - height: 21px; - text-align:center; - vertical-align: middle; - background-color: #666666; -} -.calendar_date_select td.weekend { - background-color: #606060; -} - -.calendar_date_select td div { - color: #fff; -} -.calendar_date_select td div.other { - color: #888; -} -.calendar_date_select td.selected div { - color:black; -} - -.calendar_date_select tbody td { - border-bottom: 1px solid #555; -} -.calendar_date_select td.selected { - background-color:white; -} - -.calendar_date_select td:hover { - background-color:#ccc; -} - -.calendar_date_select td.today { - border: 1px dashed #999; -} - -.calendar_date_select td.disabled div { - color: #454545; -} - - -.fieldWithErrors .calendar_date_select { - border: 2px solid red; -} - 1 - core - 0 - - 0 - - 0 - 0 - - - 3 - 1260269077 - ipb_bbcode - /***************************************************************/ -/* IP.Board 3 CSS */ -/* ___________________________________________________________ */ -/* By Rikki Tissier */ -/* (c)2008 Invision Power Services */ -/***************************************************************/ -/* ipb_bbcode.css - BBCode CSS */ -/***************************************************************/ - -/* NOTE: This CSS file styles bbcodes throughout IPB. It is - recommended that you DO NOT change these styles if you are - creating a skin since it may interfere with user expectation - of what certain BBCodes look like. */ - -strong.bbc { font-weight: bold !important; } -em.bbc { font-style: italic !important; } -span.bbc_underline { text-decoration: underline !important; } -div.bbc_center { text-align: center; } -div.bbc_left { text-align: left; } -div.bbc_right { text-align: right; } -div.bbc_indent { margin-left: 50px; } -del.bbc { text-decoration: line-through !important; } -ul.bbc { list-style: disc outside; margin-left: 30px; } - ul.bbc ul.bbc { list-style-type: circle; } - ul.bbc ul.bbc ul.bbc { list-style-type: square; } -ol.bbc { list-style: decimal outside; margin-left: 30px; } - ol.bbc ol.bbc { list-style-type: lower-roman; } -hr.bbc { display: block; border-top: 2px solid #777; } -div.bbc_spoiler { } -div.bbc_spoiler span { font-weight: bold; } -div.bbc_spoiler_wrapper { border: 1px inset #777; padding: 4px; } -div.bbc_spoiler_content { } -input.bbc_spoiler_show { width: 45px; font-size: .7em; margin: 0px; padding: 0px; } - 1 - core - 0 - - 0 - - 0 - 0 - - - 3 - 1260269077 - ipb_editor - - 1 - core - 0 - - 0 - - 0 - 0 - - - 3 - 1260269077 - ipb_ie - #search { - position: absolute !important; - right: 0px !important; - float: none !important; - display: block !important; - width: 250px; -} - - #search label, - #search input { - float: left !important; - } - - #search .submit_input { - font-size: 1em; - } - - #search label { - margin: 4px 6px; - } - -#ipboard_body .input_submit { - padding: 2px 5px; - font-size: 90%; -} - -#ipboard_body .tab_bar li.active { - margin-top: -5px; -} - -#ipboard_body .popupWrapper { - padding-top: 6px; -} - -#ipboard_body .ipb_palette { - min-width: 130px; - max-width: 255px; -} - -#ipboard_body #conversation .post_block { - position: static !important; - clear: both !important; -} - -#ipboard_body #conversation ul.post_controls { - padding-bottom: 0; - height: 32px; -} - -/*#ipboard_body .user_controls li img { - margin: 4px 0; -} - -#ipboard_body .user_controls li { - margin: 0 4px 0 0; - text-align: center; -}*/ - 0 - core - 0 - - 0 - - 0 - 0 - - - 3 - 1260269077 - ipb_print - - 1 - core - 0 - - 0 - - 0 - 0 - - - 3 - 1260269077 - ipb_reset - - 0 - core - 0 - - 0 - - 0 - 0 - - - 3 - 1260269077 - ipb_styles - - 0 - core - 0 - - 0 - - 0 - 0 - - - 3 - 1260269078 - lightbox - #hoverNav{ left: 0;} -#hoverNav a{ outline: none;} - -#prevLink, #nextLink{ width: 49%; height: 100%; background-image: url(data:image/gif;base64,AAAA); /* Trick IE into showing hover */ display: block; } -#prevLink { left: 0; float: left;} -#nextLink { right: 0; float: right;} -#prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; } -#nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; } - -#imageDataContainer{ font: 10px Verdana, Helvetica, sans-serif; background-color: #fff; margin: 0 auto; line-height: 1.4em; overflow: auto; width: 100% ; } - -#imageData{ padding:0 10px; color: #666; } -#imageData #imageDetails{ width: 70%; float: left; text-align: left; } -#imageData #caption{ font-weight: bold; } -#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; } -#imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; outline: none;} - -#overlay{ position: absolute; top: 0; left: 0; z-index: 90; width: 100%; height: 500px; background-color: #000; }]]> - 1 - core - 0 - - 0 - - 0 - 0 - - diff --git a/upload/admin/applications/core/xml/core_lofi_templates.xml b/upload/admin/applications/core/xml/core_lofi_templates.xml deleted file mode 100644 index 4d188a83..00000000 --- a/upload/admin/applications/core/xml/core_lofi_templates.xml +++ /dev/null @@ -1,1978 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/upload/admin/applications/core/xml/core_mediatag.xml b/upload/admin/applications/core/xml/core_mediatag.xml index ce25d6ac..bb5997ec 100644 --- a/upload/admin/applications/core/xml/core_mediatag.xml +++ b/upload/admin/applications/core/xml/core_mediatag.xml @@ -2,49 +2,56 @@ - 1 YouTube - http://(|www.)youtube.com/watch?v={2} - ]]> + http://(\w+.|)youtube.com/watch?v={2} + ]]> + 1 + 6 - 2 Google Video http://video.google.com/videoplay?docid={1} ]]> + 2 + 4 - 3 MySpace Video - - ]]> + + ]]> + 3 + 1 - 4 GameTrailers - http://www.gametrailers.com/video/{1}/{2} - ]]> + http://www.gametrailers.com/{1}/{2}/{3} + ]]> + 4 + 3 - 5 Слайдшоу Flickr http://www.flickr.com/photos/{1}/sets/{2}/ ]]> + 5 + 2 - 6 MP3 {1}.mp3 - ]]> + + + +]]> + 6 + 5 - 8 Flash ролик/игра {1}.swf - - - {text.no_flash_available} -]]> + ]]> + 7 + 7 diff --git a/upload/admin/applications/core/xml/core_mobile_css.xml b/upload/admin/applications/core/xml/core_mobile_css.xml new file mode 100644 index 00000000..0341c307 --- /dev/null +++ b/upload/admin/applications/core/xml/core_mobile_css.xml @@ -0,0 +1,841 @@ + + + + 0 + 1288018126 + calendar_select + + 1 + core + 0 + + 0 + + 0 + 0 + mobile + + + 0 + 1288018126 + ipb_bbcode + /***************************************************************/ +/* IP.Board 3 CSS */ +/* ___________________________________________________________ */ +/* By Rikki Tissier */ +/* (c)2008 Invision Power Services */ +/***************************************************************/ +/* ipb_bbcode.css - BBCode CSS */ +/***************************************************************/ + +/* NOTE: This CSS file styles bbcodes throughout IPB. It is + recommended that you DO NOT change these styles if you are + creating a skin since it may interfere with user expectation + of what certain BBCodes look like. */ + +strong.bbc { font-weight: bold !important; } +em.bbc { font-style: italic !important; } +span.bbc_underline { text-decoration: underline !important; } +div.bbc_center { text-align: center; } +div.bbc_left { text-align: left; } +div.bbc_right { text-align: right; } +div.bbc_indent { margin-left: 50px; } +del.bbc { text-decoration: line-through !important; } +ul.bbc { list-style: disc outside; margin-left: 30px; } + ul.bbc ul.bbc { list-style-type: circle; } + ul.bbc ul.bbc ul.bbc { list-style-type: square; } +ol.bbc { list-style: decimal outside; margin-left: 30px; } + ol.bbc ol.bbc { list-style-type: lower-roman; } +hr.bbc { display: block; border-top: 2px solid #777; } +div.bbc_spoiler { } +div.bbc_spoiler span { font-weight: bold; } +div.bbc_spoiler_wrapper { border: 1px inset #777; padding: 4px; } +div.bbc_spoiler_content { } +input.bbc_spoiler_show { width: 45px; font-size: .7em; margin: 0px; padding: 0px; } + 1 + core + 0 + + 0 + + 0 + 0 + mobile + + + 0 + 1288018126 + ipb_editor + + 1 + core + 0 + + 0 + + 0 + 0 + mobile + + + 0 + 1288018126 + ipb_ie + #search { + position: absolute !important; + right: 0px !important; + float: none !important; + display: block !important; + width: 250px; +} + + #search label, + #search input { + float: left !important; + } + + #search .submit_input { + font-size: 1em; + } + + #search label { + margin: 4px 6px; + } + +#ipboard_body .input_submit { + padding: 2px 5px; + font-size: 90%; +} + +#ipboard_body .tab_bar li.active { + margin-top: -5px; +} + +#ipboard_body .popupWrapper { + padding-top: 6px; +} + +#ipboard_body .ipb_palette { + min-width: 130px; + max-width: 255px; +} + +#ipboard_body #conversation .post_block { + position: static !important; + clear: both !important; +} + +#ipboard_body #conversation ul.post_controls { + padding-bottom: 0; + height: 32px; +} + +/*#ipboard_body .user_controls li img { + margin: 4px 0; +} + +#ipboard_body .user_controls li { + margin: 0 4px 0 0; + text-align: center; +}*/ + 0 + core + 0 + + 0 + + 0 + 0 + mobile + + + 0 + 1288018126 + ipb_print + + 1 + core + 0 + + 0 + + 0 + 0 + mobile + + + 0 + 1288018126 + ipb_reset + + 0 + core + 0 + + 0 + + 0 + 0 + mobile + + + 0 + 1288018126 + ipb_styles + + 1 + core + 0 + + 0 + + 0 + 0 + mobile + + + 0 + 1288018126 + lightbox + #hoverNav{ left: 0;} +#hoverNav a{ outline: none;} + +#prevLink, #nextLink{ width: 49%; height: 100%; background-image: url(data:image/gif;base64,AAAA); /* Trick IE into showing hover */ display: block; } +#prevLink { left: 0; float: left;} +#nextLink { right: 0; float: right;} +#prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; } +#nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; } + +#imageDataContainer{ font: 10px Verdana, Helvetica, sans-serif; background-color: #fff; margin: 0 auto; line-height: 1.4em; overflow: auto; width: 100% ; } + +#imageData{ padding:0 10px; color: #666; } +#imageData #imageDetails{ width: 70%; float: left; text-align: left; } +#imageData #caption{ font-weight: bold; } +#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; } +#imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; outline: none;} + +#overlay{ position: absolute; top: 0; left: 0; z-index: 90; width: 100%; height: 500px; background-color: #000; }]]> + 1 + core + 0 + + 0 + + 0 + 0 + mobile + + diff --git a/upload/admin/applications/core/xml/core_mobile_templates.xml b/upload/admin/applications/core/xml/core_mobile_templates.xml new file mode 100644 index 00000000..89245d1c --- /dev/null +++ b/upload/admin/applications/core/xml/core_mobile_templates.xml @@ -0,0 +1,3421 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/upload/admin/applications/core/xml/core_root_css.xml b/upload/admin/applications/core/xml/core_root_css.xml index 717e5f96..86a8ce60 100644 --- a/upload/admin/applications/core/xml/core_root_css.xml +++ b/upload/admin/applications/core/xml/core_root_css.xml @@ -2,7 +2,7 @@ 0 - 1260269066 + 1288018123 calendar_select .calendar_date_select { color:white; @@ -145,10 +145,156 @@ iframe.ie6_blocker { 0 0 + root 0 - 1260269066 + 1288018123 + ipb_common + #hoverNav{ left: 0;} +#hoverNav a{ outline: none;} +#prevLink, #nextLink{ width: 49%; height: 100%; background-image: url({style_images_url}/spacer.gif); /* Trick IE into showing hover */ display: block; } +#prevLink { left: 0; float: left;} +#nextLink { right: 0; float: right;} +#prevLink:hover, #prevLink:visited:hover { background: url({style_images_url}/lightbox/prevlabel.gif) left 15% no-repeat; } +#nextLink:hover, #nextLink:visited:hover { background: url({style_images_url}/lightbox/nextlabel.gif) right 15% no-repeat; } +#imageDataContainer{ font: 10px Verdana, Helvetica, sans-serif; background-color: #fff; margin: 0 auto; line-height: 1.4em; overflow: auto; width: 100% ; } +#imageData{ padding:0 10px; color: #666; } +#imageData #imageDetails{ width: 70%; float: left; text-align: left; } +#imageData #caption{ font-weight: bold; } +#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; } +#imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; outline: none;} +#overlay{ position: fixed; top: 0; left: 0; z-index: 15000 !important; width: 100%; height: 500px; background-color: #000; } + +/************************************************************************/ +/* BBCODE STYLES */ +/* NOTE: These selectors style bbcodes throughout IPB. It is recommended that you DO NOT change these + styles if you are creating a skin since it may interfere with user expectation + of what certain BBCodes look like (quote boxes are an exception to this). */ + +strong.bbc { font-weight: bold !important; } +em.bbc { font-style: italic !important; } +span.bbc_underline { text-decoration: underline !important; } +acronym.bbc { border-bottom: 1px dotted #000; } +span.bbc_center, div.bbc_center { text-align: center; display: block; } +span.bbc_left, div.bbc_left { text-align: left; display: block; } +span.bbc_right , div.bbc_right { text-align: right; display: block; } +div.bbc_indent { margin-left: 50px; } +del.bbc { text-decoration: line-through !important; } +ul.bbc { list-style: disc outside; margin-left: 30px; } + ul.bbc ul.bbc { list-style-type: circle; } + ul.bbc ul.bbc ul.bbc { list-style-type: square; } +ul.bbcol.decimal { margin-left: 30px; list-style-type: decimal; } + ul.bbcol.lower-alpha { margin-left: 30px; list-style-type: lower-alpha; } + ul.bbcol.upper-alpha { margin-left: 30px; list-style-type: upper-alpha; } + ul.bbcol.lower-roman { margin-left: 30px; list-style-type: lower-roman; } + ul.bbcol.upper-roman { margin-left: 30px; list-style-type: upper-roman; } +hr.bbc { display: block; border-top: 2px solid #777; } +div.bbc_spoiler { } +div.bbc_spoiler span.spoiler_title { font-weight: bold; } +div.bbc_spoiler_wrapper { border: 1px inset #777; padding: 4px; } +div.bbc_spoiler_content { } +input.bbc_spoiler_show { width: 45px; font-size: .7em; margin: 0px; padding: 0px; } +pre.prettyprint { padding: 5px; background: #f8f8f8; border: 1px solid #c9c9c9; overflow: auto; margin-left: 10px; font-size: 11px; line-height: 140%; } +.bbc_member, .bbc_url, .bbc_email { color: inherit; } + +/* Quote boxes */ +p.citation { + background: #d3e9dc url({style_images_url}/citation_bg.png) no-repeat right; + color: #2b3730; + font-size: 0.9em; + font-weight: bold; + border-width: 1px 1px 0 3px; + border-style: solid; + border-color: #6fa987; + padding: 5px 8px; +} + + div.blockquote { + background: #f3f9f6; + font-size: 0.9em; + border-width: 1px 1px 1px 3px; + border-style: solid; + border-color: #6fa987; + margin: 0px; + margin-top: 0px; + } + + div.blockquote p.citation { + background-color: #e5d2e9; + color: #413544; + border-color: #ae7eb9; + } + + div.blockquote div.blockquote { + background: #f9f5fa; + font-size: 1em; + border-color: #ae7eb9; + margin: -0px 15px 0px 15px; + } + + div.blockquote div.blockquote p.citation { + background-color: #e9e7d1; + color: #474534; + border-color: #b2ab72; + } + + div.blockquote div.blockquote div.blockquote { + background: #f9f8f3; + border-color: #b2ab72; + } + + div.blockquote p.citation { + margin: 6px 15px 0 15px; + font-size: 1em; + } + +div.quote { + padding: 12px; +} + +div.quote p.blockquote { + margin-left: -12px; +} + +cite { + display: block; + font-weight: bold; +} + + blockquote cite { + font-size: 1em; + }]]> + 1 + core + 0 + + 0 + + 0 + 0 + root + + + 0 + 1288018123 ipb_editor 0 0 + root 0 - 1260269066 + 1288018123 + ipb_help + + 0 + core + 0 + + 0 + help + 0 + 0 + root + + + 0 + 1288018123 ipb_ie 0 0 + root 0 - 1260269066 + 1288018123 ipb_login_register 1 core @@ -727,10 +986,11 @@ input#openid { global 0 0 + root 0 - 1260269066 + 1288018123 ipb_print 1 core @@ -827,18 +1153,131 @@ h1, h2, h3 { 0 0 + root 0 - 1260269066 + 1288018123 ipb_search - /************************************************************************/ + ul > li { + padding: 10px 0; +} + + #main_search_form fieldset li.no_label { + padding: 4px 0 10px 235px; + font-size: 13px; + } + +#main_search_form fieldset > ul > li > label { + width: 220px; + padding-right: 10px; + text-align: right; + display: inline-block; + vertical-align: top; +} + +#main_search_form fieldset .input_text { + border: 1px solid #b6b6b6; + font-size: 15px; + padding: 2px; +} + + #main_search_form fieldset .input { + width: 400px; + } + + #main_search_form fieldset .input_text.date { + width: 158px; + padding-right: 25px; + } + + #main_search_form #date_start_icon, + #main_search_form #date_end_icon { + margin-left: -20px; + } + +#main_search_form .search_app { + font-size: 12px; + display: inline-block; + padding: 8px 10px; + margin-right: 4px; + font-weight: bold; + border: 1px solid transparent; + cursor: pointer; +} + + #main_search_form .search_app.active { + background: #2b4f74; + border: 1px solid #1d3652; + color: #fff; + border-radius: 3px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + } + +#main_search_form .app_chooser > ul { + margin-left: 230px; + margin-top: -5px; +} + +#main_search_form .search_msg { + border-bottom: 1px solid #f0f0f0; + display: block; + font-size: 12px; + padding: 0 0 5px 230px; + margin-bottom: 15px; + color: #5c5c5c; +} + +/* OLD STYLES */ +/*#main_search_form { } #search_info { @@ -876,13 +1315,12 @@ h1, h2, h3 { #search_info .input_select { width: 40%; } - + */ div#search_results { border-bottom: 4px solid #d5dde5; margin-bottom: 8px; } - /* Main information*/ div#search_results span.icon { float: left; margin-right: 15px; @@ -970,7 +1408,38 @@ div#search_results { .tab_filters ul.padded { padding-top: 10px; - } + } + +/* as forum stuffs */ +.maintitle.links, +.maintitle a { + text-decoration: none; + font-size: 12px; +} +.entry-content.search { + /*height: 200px; + overflow:auto;*/ +} + +.col_f_icon { + width: 1%; +} + +.col_f_topic { + width: 39%; +} + +.col_f_starter { + width: 10%; +} + +.col_f_views { + width: 5%; +} + +.col_f_post { + width: 15%; +}]]> 2 core 1 @@ -979,13 +1448,14 @@ div#search_results { search 0 0 + root 0 - 1260269066 + 1288018123 ipb_styles div { padding: 8px; } - - .userpopup { - font-size: 0.9em; - } - + .userpopup dl { border-bottom: 1px solid #d4d4d4; padding-bottom: 10px; @@ -2375,9 +3191,6 @@ li.field.checkbox .input_radio { .info dt { float: left; -} - -.info dt { font-weight: bold; padding: 3px 6px; clear: both; @@ -2409,7 +3222,7 @@ li.field.checkbox .input_radio { font-size: 0.9em; display: block; margin: auto 0px auto 6px; - -moz-outline: 0; + outline: 0; } .topic_buttons li span { @@ -2437,6 +3250,10 @@ li.field.checkbox .input_radio { .topic_buttons li.disabled { background: transparent url({style_images_url}/topic_button_left_disabled.png) no-repeat top left; } + .topic_buttons li.disabled a { + background: transparent url({style_images_url}/topic_button_right_disabled.png) no-repeat top right; + color: #555555; + } .topic_buttons li.disabled span { background: transparent url({style_images_url}/topic_button_right_disabled.png) no-repeat top right; color: #8f8e8e; @@ -2536,11 +3353,15 @@ ul.pagination li.total { display: block; } +ul.pagination li.pagejump img { + margin-top: -4px; +} + ul.pagination li { background: #fff; font-size: 0.9em; border: 1px solid #cfcfcf; - margin: 0 2px 0 2px; + margin: 0 1px 0 1px; float: left; } @@ -2589,6 +3410,8 @@ ul.mini_pagination { } #topic_mod_2 { + border-top-left-radius: 0px; + border-top-right-radius: 0px; -moz-border-radius-topleft: 0px; -moz-border-radius-topright: 0px; -webkit-border-top-left-radius: 0px; @@ -2626,6 +3449,7 @@ ul.mini_pagination { .tab_bar { font-size: 0.9em; + border-radius: 6px 6px 0 0; -moz-border-radius: 6px 6px 0 0; -webkit-border-top-left-radius: 6px; -webkit-border-top-right-radius: 6px; @@ -2657,6 +3481,7 @@ ul.mini_pagination { .tab_bar li.active { font-weight: bold; font-size: 1.1em; + border-radius: 4px 4px 0 0; -moz-border-radius: 4px 4px 0 0; -webkit-border-top-left-radius: 4px; -webkit-border-top-right-radius: 4px; @@ -2780,6 +3605,7 @@ ul.mini_pagination { .user_controls li a { display: inline-block; background-color: #d5dee5; + border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; padding: 3px; @@ -2831,7 +3657,7 @@ a.toggle { width: 25px; height: 100%; display: block; - -moz-outline: 0; + outline: 0; } #latest_news { @@ -2848,6 +3674,7 @@ a.toggle { div#categories { width: 76%; + overflow: hidden; } div#categories.no_sidebar { @@ -2858,26 +3685,33 @@ div#categories { #index_stats { padding-bottom: 25px; margin-bottom: 20px; - margin-top: 25px; + margin-top: 0px; width: 22%; } .sidebar_toggle { text-align: right; - padding: 0px 3px; - height: 20px; - right: 15px; + padding: 4px 3px; + height: 18px; + width: 10px; + right: 4px; position: absolute; - -moz-outline: 0; + outline: 0; } #open_sidebar.sidebar_toggle { right: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; -moz-border-radius-top-right: 0; -moz-border-radius-bottom-right: 0; -webkit-border-top-right-radius: 0; -webkit-border-bottom-right-radius: 0; } + + #open_sidebar, #close_sidebar { + outline: none; + } .category_block h3.collapsed { border-bottom: 8px solid #b6c7db; @@ -2888,6 +3722,30 @@ div#categories { /*padding-bottom: 6px;*/ } + +.index_stats_collapse +{ + text-indent: -3000em; + padding-bottom: 2px; + width: 15px; + height: 15px; + display: block; + float: right; + outline: 0; +} + +.index_stats_collapse.open +{ + background-image: url({style_images_url}/cat_minimize_small.png); + opacity:0.6; +} + +.index_stats_collapse.close +{ + background-image: url({style_images_url}/cat_maximize_small.png); + opacity:0.6; +} + .statistics { padding: 15px; margin: 10px 0px 0 0px; @@ -3016,15 +3874,16 @@ body .stats_list { /************************************************************************/ /* FORUM VIEW (& RELATED) STYLES */ +.topic_preview, ul.topic_moderation { margin-top: -2px; z-index: 300; } - ul.topic_moderation li { float: left; } + .topic_preview a, ul.topic_moderation li a { padding: 0 3px; display: block; @@ -3043,6 +3902,7 @@ img.mini_rate { .topic_prefix { font-size: 0.8em; font-weight: bold; + border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; padding: 0px 4px; @@ -3102,6 +3962,16 @@ img.mini_rate { margin-left: 4px; } +.maintitle .desclinks { + color: #d5dde5; + font-size: 0.6em; + padding-top: 4px; +} + +.maintitle .desclinks a { + text-decoration: none; +} + /************************************************************************/ /* TOPIC VIEW (& RELATED) STYLES */ @@ -3163,6 +4033,10 @@ input.post_mod { margin: 10px 10px 0 6px; } + .signature a { + text-decoration: underline; + } + .post_block { margin: 0 0 1px 0; position: relative; @@ -3234,6 +4108,7 @@ input.post_mod { .rep_bar { background: #e4ebf2; font-size: 0.8em; + border-top-left-radius: 5px; -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; padding: 0 10px; @@ -3262,6 +4137,7 @@ p.rep_highlight { background: #D5DEE5; color: #1d3652; padding: 5px; + border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; font-size: 0.8em; @@ -3637,7 +4513,6 @@ div.post_form fieldset.attachments span.desc { .comment_wrap .comment { line-height: 150%; padding: 5px; - margin: 8px; } .comment_wrap { position: relative; @@ -3690,6 +4565,53 @@ div.post_form fieldset.attachments span.desc { float: left; } + .comment_options li a, + .comment .cleft a { + text-decoration: none; + } + +#commentReply { + margin-left: 70px; +} + +#commentUser { + padding-top:0px; + padding-left: 10px; + float: left; +} + +#commentButtons { + margin: 0px 0px 10px 0px; + text-align: right; +} + +/* New comment styles */ +.comment .post_wrap .cleft { + float: left; + margin-left: 65px; + padding-left: 5px; + position: absolute; + display: inline-box; +} + +.comment_wrap .comment.gallery_row_off, +.comment_wrap .comment.row1, +.comment_wrap .comment.row2 { + margin-bottom: 0px; + margin-top: 0px; + margin-left: 0px; + padding-left: 0px; + border-bottom: 0px; +} + +.comment_wrap .comment.row2 { + padding-top: 5px; +} + +.comment_content { + padding: 10px 0px 10px 0px; +} + /************************************************************************/ /* REPUTATION STYLES */ @@ -3725,163 +4647,10 @@ div.post_form fieldset.attachments span.desc { }*/ -/************************************************************************/ -/* LIGHTBOX STYLES */ - -#lightbox{ position: absolute; left: 0; width: 100%; z-index: 16000 !important; text-align: center; line-height: 0;} -#lightbox img{ width: auto; height: auto;} -#lightbox a img{ border: none; } -#outerImageContainer{ position: relative; background-color: #fff; width: 250px; height: 250px; margin: 0 auto; } -#imageContainer{ padding: 10px; } -#loading{ position: absolute; top: 40%; left: 0%; height: 25%; width: 100%; text-align: center; line-height: 0; } -#hoverNav{ position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 10; } -#imageContainer>#hoverNav{ left: 0;} -#hoverNav a{ outline: none;} -#prevLink, #nextLink{ width: 49%; height: 100%; background-image: url({style_images_url}/spacer.gif); /* Trick IE into showing hover */ display: block; } -#prevLink { left: 0; float: left;} -#nextLink { right: 0; float: right;} -#prevLink:hover, #prevLink:visited:hover { background: url({style_images_url}/lightbox/prevlabel.gif) left 15% no-repeat; } -#nextLink:hover, #nextLink:visited:hover { background: url({style_images_url}/lightbox/nextlabel.gif) right 15% no-repeat; } -#imageDataContainer{ font: 10px Verdana, Helvetica, sans-serif; background-color: #fff; margin: 0 auto; line-height: 1.4em; overflow: auto; width: 100% ; } -#imageData{ padding:0 10px; color: #666; } -#imageData #imageDetails{ width: 70%; float: left; text-align: left; } -#imageData #caption{ font-weight: bold; } -#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; } -#imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; outline: none;} -#overlay{ position: absolute; top: 0; left: 0; z-index: 15000 !important; width: 100%; height: 500px; background-color: #000; } /************************************************************************/ -/* BBCODE STYLES */ -/* NOTE: These selectors style bbcodes throughout IPB. It is recommended that you DO NOT change these - styles if you are creating a skin since it may interfere with user expectation - of what certain BBCodes look like (quote boxes are an exception to this). */ - -strong.bbc { font-weight: bold !important; } -em.bbc { font-style: italic !important; } -span.bbc_underline { text-decoration: underline !important; } -acronym.bbc { border-bottom: 1px dotted #000; } -div.bbc_center { text-align: center; } -div.bbc_left { text-align: left; } -div.bbc_right { text-align: right; } -div.bbc_indent { margin-left: 50px; } -del.bbc { text-decoration: line-through !important; } -ul.bbc { list-style: disc outside; margin-left: 30px; } - ul.bbc ul.bbc { list-style-type: circle; } - ul.bbc ul.bbc ul.bbc { list-style-type: square; } -ul.bbcol.decimal { margin-left: 30px; list-style-type: decimal; } - ul.bbcol.lower-alpha { margin-left: 30px; list-style-type: lower-alpha; } - ul.bbcol.upper-alpha { margin-left: 30px; list-style-type: upper-alpha; } - ul.bbcol.lower-roman { margin-left: 30px; list-style-type: lower-roman; } - ul.bbcol.upper-roman { margin-left: 30px; list-style-type: upper-roman; } -hr.bbc { display: block; border-top: 2px solid #777; } -div.bbc_spoiler { } -div.bbc_spoiler span { font-weight: bold; } -div.bbc_spoiler_wrapper { border: 1px inset #777; padding: 4px; } -div.bbc_spoiler_content { } -input.bbc_spoiler_show { width: 45px; font-size: .7em; margin: 0px; padding: 0px; } -pre.prettyprint { padding: 5px; background: #f8f8f8; border: 1px solid #c9c9c9; overflow: auto; margin-left: 10px; font-size: 11px; line-height: 140%; } - -/* Quote boxes */ -p.citation { - background: #d3e9dc url({style_images_url}/citation_bg.png) no-repeat right; - color: #2b3730; - font-size: 0.9em; - font-weight: bold; - border-width: 1px 1px 0 3px; - border-style: solid; - border-color: #6fa987; - padding: 5px 8px; -} - - div.blockquote { - background: #f3f9f6; - font-size: 0.9em; - border-width: 1px 1px 1px 3px; - border-style: solid; - border-color: #6fa987; - margin: 0px; - margin-top: 0px; - } - - div.blockquote p.citation { - background-color: #e5d2e9; - color: #413544; - border-color: #ae7eb9; - } - - div.blockquote div.blockquote { - background: #f9f5fa; - font-size: 1em; - border-color: #ae7eb9; - margin: -0px 15px 0px 15px; - } - - div.blockquote div.blockquote p.citation { - background-color: #e9e7d1; - color: #474534; - border-color: #b2ab72; - } - - div.blockquote div.blockquote div.blockquote { - background: #f9f8f3; - border-color: #b2ab72; - } - - div.blockquote p.citation { - margin: 6px 15px 0 15px; - font-size: 1em; - } - -div.quote { - padding: 12px; -} - -div.quote p.blockquote { - margin-left: -12px; -} - -cite { - display: block; - font-weight: bold; -} - - blockquote cite { - font-size: 1em; - } - -/************************************************************************/ -/* HELP & PORTAL STYLES */ +/* PORTAL STYLES */ -#help_topics { - border: 1px solid #d5dde5; -} - -#help_topics li { - background-image: url({style_images_url}/help.png); - background-repeat: no-repeat; - background-position: 9px 12px; - padding: 10px 32px; - margin-bottom: 2px; -} - - #help_topics li h3 { - padding: 2px 0 0 0; - } - -.help_doc { - padding: 10px; - border: 1px solid #d5dde5; -} - #help_topics .help_doc ul, - #help_topics .help_doc ol { - padding: 8px 0; - } - - #help_topics .help_doc li { - background: none; - padding: 2px; - } - #index_stats.portal { margin-top: 0px; @@ -3900,6 +4669,364 @@ cite { #portal_active_users ul { margin-bottom: 15px; +} + +/************************************************************************/ +/* Status updates */ + +#status_recent_actions { + width: 20%; +} + +.status_profile_page { + width: 65%; + margin-right: 10px; + float: left; +} + +.status_profile_actions +{ + width: 30%; + padding: 10px; + float: left; +} + +.status_action_left +{ + margin-left:4px; + float: left; +} +.status_action_right +{ + margin-left: 35px; +} + +#status_standalone_page { + width: 76%; +} + +#status_wrapper { +} + + #status_wrapper .right { + padding-bottom: 8px; + padding-right: 8px; + } + + #status_wrapper p.no-status, .status_profile_actions p.no-status { + padding: 10px; + text-align: center; + font-size: 1.1em; + } + + .status_profile_actions p.no-status { + padding: 4px; + } + +.status_main_wrap { + margin-bottom: 20px; + margin: 10px; + padding: 15px; + background: #fff; + -moz-box-shadow: #e5e5e5 2px 2px 2px; + -webkit-box-shadow: #e5e5e5 2px 2px 2px; +} + + .status_main_wrap a { + text-decoration: none; + } + +.status_main_photo { + float: left; +} + +.status_main_content { + margin-left: 65px; + word-wrap: break-word; +} + +.status_main_content h4 { + font-weight:normal; + font-size:1.2em; +} + +.status_main_content h4 .su_links a { font-weight: normal; } + +.status_main_content p { + padding: 6px 0px 6px 0px; +} + +.status_main_content h4 a { + font-weight:bold; + text-decoration: none; +} + +.status_mini_wrap { + padding: 7px; + font-size: 0.95em; + margin-top: 2px; +} +.status_mini_photo { + float: left; +} + +.status_mini_content { + margin-left: 35px; +} + +.status_mini_content p { + font-size:10px; + padding: 4px 0px 4px 0px; +} + +.status_mini_content h5 { + font-weight:normal; + padding-top: 4px; + font-size:1.0em; +} + +.status_mini_content h5 a { + font-weight:bold; +} + +.status_textarea { + width: 99%; +} + +.status_submit { + padding-right: 5px; + text-align: right; +} + +.status_replies_many { + height: 300px; + overflow: auto; +} + +.status_update { + background: #2b4f74; + color: #fff; + padding: 15px 12px; +} + .status_update input + { + font-size: 1.1em; + } + + .status_update .desc + { + color: #FFFFFF; + } + + .status_profile_actions div + { + padding:5px 0px 5px 0px; + } + +.status_main_content h4 a.su_links { font-weight: normal;} + +/* Fiddle with some stuffs for the status hook */ +#statusHook{ + background: #FFFFFF; + padding: 0px; +} + #statusHook h3 { + margin:0px; + padding: 5px; + } + + #statusHook .status_main_photo { + padding:6px; + } + + #statusHook .status_main_content { + margin-left: 0px; + } + + #statusHook .status_main_content h4 { + font-size: 0.95em; + padding: 2px 6px 0px 6px; + margin-left:28px; + line-height: 125%; + } + + #statusHook .status_main_content p { + padding: 2px 6px 2px 6px; + margin-left:28px; + } + + #statusHook .status_update { + margin-bottom: 0px; + padding: 6px; + } + + #statusHook .status_main_wrap { + margin: 0; + background-color: #f1f4f7; + border-bottom:2px solid #e4ebf2; + padding: 4px; + -moz-box-shadow: none; + -webkit-box-shadow: none; + } + + #statusHook .status_mini_wrap { + background-color: #fafbfc !important; + } + + #statusHook .status_mini_wrap h5 + { + color: #606060; + font-size: 0.9em; + } + + #statusHook .status_mini_content { + margin-left: 45px; + } + #statusHook #statusUpdate, + #statusHook #statusSubmit { + font-size: 0.9em !important; + } + + #statusUpdate { + padding: 2px; + } + + #statusHook .status_feedback { + /*border-left: 2px solid #e4ebf2;*/ + margin: 0 -4px -4px 10px; + } + + #statusHook .status_update .desc + { + color: #606060; + } + + .status_inactive { + color: gray; + } + + .status_smallspace { + font-size: 1.0em; + } + +#notificationlog table td a, #likesList table td a { + text-decoration: underline; +} + +#chat-tab-count { + background-color: #d5dde5; + font-weight: bold; + font-size: 0.8em; + padding: 2px 5px; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + color: #000; + text-decoration: none; + z-index: 5000; +} + +/* Favorites */ +.ips_like { + background-color: #f1f4f7; + padding: 8px 4px 4px 4px; + color: #878787; + font-size: 1em; + min-height: 18px; + font-size: 0.9em; + line-height: 130%; + clear: both; +} +.ips_like a +{ + color: #878787; +} + +.ips_like a.ftoggle { + float: right; + /*background: #e4ebf2 url({style_images_url}/icons/thumb_up.png) no-repeat left 2px;*/ + border:1px solid #CBCBCB; + padding: 3px 4px 2px 4px; + color: #656565; + font-size:0.8em; + text-decoration: none; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + margin-top: -4px; +} + +.ips_like a.ftoggle.on { + /*background: #e4ebf2 url({style_images_url}/icons/fave_on_small.png) no-repeat left 2px;*/ +} + +.ips_like a.ftoggle._newline, +.ips_like a.ftoggle.on._newline { + float:none; + margin-top: 5px; + margin-left: auto; + margin-right: 0; + display: block; + width: 70px; + text-align: center; +} + +.ips_like a:hover.ftoggle.on, +.ips_like a:hover.ftoggle { + background-color: #d5dde5; +} + +/* Fave pop-up */ +.likepop { + padding:4px; +} + +.likepop div { + min-height: 60px; + display: block; +} +.likepop img { + float: left; + margin-top: 4px; + margin-left: 4px; +} + +.likepop div em { + float: right; + padding-top: 8px; + padding-right: 8px; +} +.likepop div div { + margin-left: 62px; + padding-top: 8px; +} + +.likepop div div strong { + font-size: 1.1em; +} + +.likepop div div p { + margin-top:6px; + line-height: 150%; +} + + +/* reduce images in topic pop-up */ +#topicPreview img +{ + max-width: 200px; + max-height: 200px; + clear:both; +} + +.facebook-like { + float: left; +} + +.boxShadow { + -webkit-box-shadow: rgba(0, 0, 0, 0.58) 0px 12px 25px; + -moz-box-shadow: rgba(0, 0, 0, 0.64) 0px 12px 25px; + box-shadow: rgba(0, 0, 0, 0.58) 0px 12px 25px; }]]> 1 core @@ -3909,10 +5036,11 @@ cite { 0 0 + root 0 - 1260269066 + 1288018123 ipb_ucp /************************************************************************/ /* IP.Board 3 CSS - By Rikki Tissier - (c)2008 Invision Power Services */ @@ -3920,6 +5048,10 @@ cite { /* ipb_ucp.css - UserCP styles */ /************************************************************************/ +#fbUserBox p.desc { + left: 0px; +} + #usercp_menu { text-align: right; font-size: 0.9em; @@ -3943,6 +5075,7 @@ cite { color: #fff; font-weight: bold; font-size: 1.05em; + border-radius: 4px 0 0 4px; -moz-border-radius: 4px 0 0 4px; -webkit-border-top-left-radius: 4px; -webkit-border-bottom-left-radius: 4px; @@ -3997,7 +5130,17 @@ div.avatar_gallery { #usercp_content .post { padding: 20px; - } + } + +/* Notify styles */ +#usercp_content .notification_table td.notify_title { + font-size: 0.9em; + padding-left: 15px; +} + +#usercp_content .notification_table td { + border-color: #ededed; +} 1 core 1 @@ -4006,5 +5149,6 @@ div.avatar_gallery { usercp 0 0 + root diff --git a/upload/admin/applications/core/xml/core_root_templates.xml b/upload/admin/applications/core/xml/core_root_templates.xml index 22cb7ba2..e1f4e2e3 100644 --- a/upload/admin/applications/core/xml/core_root_templates.xml +++ b/upload/admin/applications/core/xml/core_root_templates.xml @@ -12,7 +12,7 @@
    ]]> ajaxEditBox - 1260269067 + 1288194260 0 0 0 + root @@ -465,10 +469,11 @@ ipb.editors[ '{$editor_id}' ] = new ipb.editor( '{$editor_id}', USE_RTE );
    ]]> boardRules - 1260269067 + 1288194260 0 0 0 + root + + - - - + + + + + - + + + + + + + + + + @@ -1828,7 +2238,7 @@ function contact_admin() { request['xml']"> @@ -1843,16 +2253,17 @@ function contact_admin() { ]]> helpShowSection - 1260269068 + 1288194260 0 0 0 + root @@ -1892,21 +2304,22 @@ function contact_admin() {

    ]]> errors - 1260269068 + 1288194260 0 0 0 + root
    + + - - - - - @@ -2941,6 +3338,7 @@ $hidden
  • + {$this->lang->words['report_basic_desc']}
  • {$extra_data} @@ -2952,10 +3350,11 @@ $hidden ]]> basicReportForm - 1260269068 + 1288194260 0 0 0 + root
    + + - + + + + + @@ -4214,10 +4964,11 @@ $hidden
    ]]> group_strip - 1260269068 + 1288194260 0 0 0 + root
    diff --git a/upload/admin/applications/core/xml/core_settings.xml b/upload/admin/applications/core/xml/core_settings.xml index a34fdcdf..fe8733c2 100644 --- a/upload/admin/applications/core/xml/core_settings.xml +++ b/upload/admin/applications/core/xml/core_settings.xml @@ -28,6 +28,24 @@ general 0 + + Мета тег: image_src + Facebook используют данный тег при публикации и/или синхронизации содержимого. Максимальные размеры изображения 130px x 110px. Макрос {style_image_url} может использоваться для указания URL до директории изображений стиля. + 1 + input + meta_imagesrc + {style_image_url}/meta_image.png + + + 1 + 2 + + 0 + 1 + + general + 0 + Название сайта Показывается в навигационном меню форума. @@ -49,7 +67,7 @@ Адрес сайта - 4 + 1 input home_url @@ -143,9 +161,9 @@ 0 - Путь до skin_cache, style_avatars, style_emoticons, style_images + Путь до директории кеша Необязательно для заполнения -
    Опция позволяет определить путь до директории где расположены поддиректории skin_cache, style_avatars, style_emoticons, style_images. Данная настройка может быть полезна для форумов, работающих на нескольких серверах, в целях распределения нагрузки.
    +
    Опция позволяет определить путь до директории, где расположены поддиректории skin_cache, style_avatars, style_emoticons, style_images. Данная настройка может быть полезна для форумов, работающих на нескольких серверах, в целях распределения нагрузки.
    Пример значения поля: /home/srv/clustered_data/forums/ ]]>
    1 @@ -163,10 +181,30 @@ general 0
    + + URL к директории кеша + Необязательно для заполнения +
    + Если вы изменили «Путь до директории кеша», необходимо также указать и URL до него.]]>
    + 1 + input + ipb_cache_url + + + + 1 + 8 + + 0 + 1 + + general + 0 +
    URL к директории изображений Необязательно для заполнения -
    URL адрес ведущий к изображениям, используемым в стиле форума (style_images). Данная настройка может быть полезна для форумов, работающих на нескольких серверах, в целях распределения нагрузки.
    +
    URL адрес, ведущий к изображениям, используемым в стиле форума (style_images). Данная настройка может быть полезна для форумов, работающих на нескольких серверах, в целях распределения нагрузки.
    Пример заполнения поля: http://img.domain.ru/forums/]]>
    1 input @@ -204,24 +242,6 @@ general 0
    - - Система помощи по АЦ - Отключить систему подсказок в АЦ - 1 - yes_no - acp_tutorial_mode - 1 - - - 1 - 10 - - 0 - 1 - - general - 0 - Убрать ссылку на форум из навигации Список пользователей general 0 + + Включить возможность делиться ссылками + На страницах с контентом будут добавлены ссылки для публикации контента в различных сервисах. Данная возможность может быть отключена для конкретных форумов непосредственно в настройках самих форумов. + 1 + yes_no + sl_enable + 1 + + + 1 + 14 + Публикация ссылок + 0 + 1 + + general + 0 + + + Разрешить список опубликованных материалов + Так как нет возможности проверять права доступа для опубликованных на сервисах материалов вы можете полностью отключить отображение списков таких материалов. + 1 + yes_no + sl_publicdata + 1 + + + 1 + 15 + + 0 + 1 + + general + 0 + 1 log_prune @@ -509,6 +565,24 @@ Invision Power Board> Список пользователей fbconnect 0 + + ID приложения + ID выдается после создания Facebook Application. + 3 + input + fbc_appid + + + + 1 + 3 + + 0 + 1 + + fbconnect + 0 + Приватный ключ @@ -528,7 +602,7 @@ Invision Power Board> Список пользователей 0 - Пользовательская группа по-умолчанию + Пользовательская группа по умолчанию В эту группу будут попадать все пользователи, создавшие свой аккаунт на форуме через аккаунт Facebook. Опция не распространяет своего действия на пользователей, которые добавили свой Facebook аккаунт после обычной регистрации на форуме. 3 dropdown @@ -545,6 +619,224 @@ Invision Power Board> Список пользователей fbconnect 0 + + + + 3 + multi + fbc_bot_group + 2 + #show_groups# + + 1 + 5 + + 0 + 1 + + fbconnect + 0 + + + + Какую локаль необходимо использовать для виджетов Facebook. Полный список локалей: http://wiki.developers.facebook.com/index.php/Facebook_Locales + 3 + input + fb_locale + ru_RU + + + 1 + 6 + + 0 + 1 + + fbconnect + 0 + + + + Какое имя использовать в качестве отображаемого, при создании учетной записи на форуме и входе через Facebook. + 3 + dropdown + fb_realname + any + any=на выбор пользователя +prefilled=на выбор пользователя, но заполнить данными имени из facebook +enforced=использовать имя из facebook + + 1 + 7 + + 0 + 1 + + fbconnect + 0 + + + 1 + twitterconnect + Интеграция с Twitter + Настройки для соединения с Twitter + + core + 0 + + + Включить интеграцию с Twitter + здесь]]> + 4 + yes_no + tc_enabled + 0 + + + 1 + 1 + + 0 + 1 + + twitterconnect + 0 + + + Consumer Key + + 4 + input + tc_token + + + + 1 + 2 + + 0 + 1 + + twitterconnect + 0 + + + Consumer Secret + + 4 + input + tc_secret + + + + 1 + 3 + + 0 + 1 + + twitterconnect + 0 + + + Пользовательская группа по умолчанию + В эту группу будут попадать все пользователи, создавшие свой аккаунт на форуме через аккаунт Twitter. Опция не распространяет своего действия на пользователей, которые добавили свой Twitter аккаунт после обычной регистрации на форуме. + 4 + dropdown + tc_mgid + 3 + #show_groups# + + 1 + 4 + + 0 + 1 + + twitterconnect + 0 + + + 1 + vk + Интеграция с Вконтакте + Настройки для соединения с Вконтакте + System + core + 0 + + + Включить соединение с Вконтакте? + здесь]]> + 5 + yes_no + vk_enabled + 0 + + + 1 + 1 + + 0 + 1 + vk, vkontakte + vk + 0 + + + ID приложения + ID выдается после создания приложения Вконтакте. + 5 + input + vk_api_id + + + + 1 + 2 + + 0 + 1 + + vk + 0 + + + Защищенный ключ + Защищенный ключ выдается после создания приложения Вконтакте + 5 + input + vk_secret + + + + 1 + 4 + + 0 + 1 + + vk + 0 + + + Пользовательская группа по умолчанию + В эту группу будут попадать все пользователи, создавшие свой аккаунт на форуме через аккаунт Вконтакте. Опция не распространяет своего действия на пользователей, которые добавили свой Вконтакте аккаунт после обычной регистрации на форуме. + 5 + dropdown + vk_mgid + 3 + #show_groups# + + 1 + 5 + + 0 + 1 + + vk + 0 + 1 cookies @@ -557,7 +849,7 @@ Invision Power Board> Список пользователей Домен .domain.ru для установки cookies, которые будут действовать как на основном домене (domain.ru) так и на всех субдоменах данного домена.]]> - 4 + 6 input cookie_domain @@ -575,7 +867,7 @@ Invision Power Board> Список пользователей Префикс Используйте префикс, если у вас установлено несколько форумов на одном домене. - 4 + 6 input cookie_id @@ -593,7 +885,7 @@ Invision Power Board> Список пользователей Путь - 4 + 6 input cookie_path @@ -620,7 +912,7 @@ Invision Power Board> Список пользователей Метод отправки почты Выберите способ, которым будет отправляться почта с форума. Если PHP функция mail() не работает или не доступна, используйте SMTP. Если вы не уверены, что необходимо выбрать в данном параметре, проконсультируйтесь с вашим хостинг-провайдером. - 5 + 7 dropdown mail_method mail @@ -639,7 +931,7 @@ smtp=SMTP Email адрес для писем На этот email будут приходить все письма - 5 + 7 input email_in @@ -657,7 +949,7 @@ smtp=SMTP Email адрес для поля От Данный email будет виден в поле От, во всех письмах, пришедших от форума. - 5 + 7 input email_out @@ -674,8 +966,8 @@ smtp=SMTP Адрес сервера - - 5 + + 7 input smtp_host localhost @@ -692,8 +984,8 @@ smtp=SMTP Порт сервера - По-умолчанию 25 - 5 + По умолчанию 25 + 7 input smtp_port 25 @@ -710,8 +1002,8 @@ smtp=SMTP - - 5 + Некоторые SMTP сервера требуют особого формата адресов. Если у вас есть проблема с отправкой писем, попробуйте включить или отключить эту опцию + 7 yes_no mail_wrap_brackets 0 @@ -729,7 +1021,7 @@ smtp=SMTP Имя пользователя на сервере - 5 + 7 input smtp_user @@ -747,7 +1039,7 @@ smtp=SMTP Пароль пользователя - 5 + 7 input smtp_pass @@ -762,10 +1054,29 @@ smtp=SMTP email 0 + + Дополнительные опции для функции + + 7 + input + php_mail_extra + + + + 1 + 9 + Настройки PHP Mail + 1 + 1 + + email + 0 + Настройка SMTP HELO Выберите тип, необходимый для вашего SMTP сервера. - 9 + 7 dropdown smtp_helo HELO @@ -781,25 +1092,6 @@ EHLO=EHLO email 0 - - Дополнительные опции для функции - - 5 - input - php_mail_extra - - - - 1 - 9 - Настройки PHP Mail - 1 - 1 - - email - 0 - 1 ipconverge @@ -812,7 +1104,7 @@ EHLO=EHLO Включить IP.Converge? Если опция включена, IPB будет производить идентификацию через IP.Converge. - 6 + 8 yes_no ipconverge_enabled 0 @@ -830,7 +1122,7 @@ EHLO=EHLO Адрес IP.Converge Корневой URL адрес приложения IP.Converge. - 6 + 8 input ipconverge_url @@ -848,7 +1140,7 @@ EHLO=EHLO Идентификационный номер (Product ID) IP.Converge Номер, полученный от IP.Converge сервера. - 6 + 8 input ipconverge_pid @@ -875,7 +1167,7 @@ EHLO=EHLO Включить XML-RPC API При включении данной системы программы-клиенты смогут использовать XML-RPC интерфейс форума. - 7 + 9 yes_no xmlrpc_enable 0 @@ -893,7 +1185,7 @@ EHLO=EHLO Журналирование Позволяет указать тип записей для журнала XML-RPC. Если вы выбираете Все, то в журнал записываются все запросы XML-RPC, если - Ошибки, то в журнал записываются проблемные запросы. - 7 + 9 dropdown xmlrpc_log_type all @@ -912,7 +1204,7 @@ failed=Ошибки Время жизни записей журнала За какой промежуток времени хранить записи журнала. Например, если вы введете значение опции 30, то в журнале будут записи за последние 30 дней. - 7 + 9 input xmlrpc_log_expire 30 @@ -931,33 +1223,15 @@ failed=Ошибки 1 securityandprivacy Настройки безопасности - Настройки при помощи которых вы можете настроить требуемые параметры безопасности на форуме + Настройки, при помощи которых вы можете настроить требуемые параметры безопасности на форуме System core 0 - - Включить Captcha? - - 8 - yes_no - bot_antispam - 1 - - - 1 - 1 - - 0 - 1 - - securityandprivacy - 0 - Механизм генерации Captcha Можно выбрать использование стороннего сервиса reCAPTHCHA или же использовать GD библиотеку. - 8 + 10 dropdown bot_antispam_type recaptcha @@ -977,7 +1251,7 @@ default=с использованием GD Включить систему вопрос-ответ? '>настроить вопросы и ответы, используемые системой.]]> - 8 + 10 yes_no registration_qanda 0 @@ -998,7 +1272,7 @@ default=с использованием GD Включить Captcha при отправке сообщений гостями? При включенной опции, гостям необходимо будет пройти CAPTCHA тест, при попытке добавления темы или сообщения. - 8 + 10 yes_no guest_captcha 1 @@ -1016,7 +1290,7 @@ default=с использованием GD Использовать шрифты - 8 + 10 yes_no captcha_allow_fonts 1 @@ -1034,7 +1308,7 @@ default=с использованием GD Публичный ключ (Public Key) Получить ключ]]> - 8 + 10 input recaptcha_public_key 6LcpWAMAAAAAAA4klDtDNuDH6LsGgBX5mBoJ3naK @@ -1052,7 +1326,7 @@ default=с использованием GD Приватный ключ (Private Key) Получить ключ]]> - 8 + 10 input recaptcha_private_key 6LcpWAMAAAAAAETX5jHd9NlPtIHJA4G-ra3X2RQB @@ -1070,7 +1344,7 @@ default=с использованием GD Язык интерфейса - 8 + 10 dropdown recaptcha_language ru @@ -1095,7 +1369,7 @@ tr=Turkish Оформление Вы можете выбрать одну из стандартных тем, которая будет использоваться для оформления формы вывода reCAPTCHA. - 8 + 10 dropdown recaptcha_theme clean @@ -1116,7 +1390,7 @@ blackglass=Blackglass Разрешить динамические изображения? Если опция включена, пользователи могут размещать изображения, генерируемые PHP/CGI скриптами. Иногда их используют вместо подписи, но пользователи могут воспользоваться ими, чтобы записать в них опасный код для взлома форума. - 8 + 10 yes_no allow_dynamic_img 0 @@ -1134,7 +1408,7 @@ blackglass=Blackglass Разрешить X_FORWARDED_FOR? Если данная опция включена, то система будет учитывать заголовки X_FORWARDED_FOR при получении IP-адреса пользователя. Это бывает полезно в Интранет сетях, когда REMOTE_ADDR один и тот же для всех пользователей сети. Однако данный заголовок очень легко изменить, и этим фактом могут воспользоваться с целью подмены IP адреса. - 8 + 10 yes_no xforward_matching 0 @@ -1152,7 +1426,7 @@ blackglass=Blackglass Метод восстановления забытого пароля - 8 + 10 dropdown lp_method random @@ -1170,8 +1444,8 @@ choose=разрешить пользователю самому ввести н Время жизни ключа авторизации пользователя - В течении указанного промежутка времени, ключ авторизации (он устанавливается в cookie пользователя) будет считаться действительным. По истечению указанного срока, пользователю выставляется новый ключ. Чем меньше временной интервал, тем больше защищены пользователи от кражи cookies. - 8 + В течение указанного промежутка времени, ключ авторизации (он устанавливается в cookie пользователя) будет считаться действительным. По истечению указанного срока, пользователю выставляется новый ключ. Чем меньше временной интервал, тем больше защищены пользователи от кражи cookies. + 10 dropdown login_key_expire 7 @@ -1192,7 +1466,7 @@ choose=разрешить пользователю самому ввести н Сбрасывать ключ авторизации при каждом входе? - 8 + 10 yes_no login_change_key 0 @@ -1210,7 +1484,7 @@ choose=разрешить пользователю самому ввести н Длительность сессии Число секунд, проходящее до того, как сессия пользователя истечёт и будет удалена. Чем меньше это число, тем меньше шансов, что сессию перехватят. - 8 + 10 input session_expiration 3600 @@ -1228,7 +1502,7 @@ choose=разрешить пользователю самому ввести н Учитывать IP адрес пользователя при проверке сессии? Если функция включена, IP адрес пользователя должен совпадать со значением, хранимым в таблице сессий. Отключите данную функцию в интранете, когда многие пользователи имеют один и тот же IP адрес. - 8 + 10 yes_no match_ipaddress 1 @@ -1246,7 +1520,7 @@ choose=разрешить пользователю самому ввести н Учитывать браузер пользователя при проверке сессии? Данная функция еще более снижает вероятность перехвата сессии, но это значит, что сессия пользователя прекратиться, если он одновременно воспользуется несколькими браузерами. - 8 + 10 yes_no match_browser 0 @@ -1264,8 +1538,8 @@ choose=разрешить пользователю самому ввести н Количество неудачных попыток авторизоваться - Совет : Установите 0, чтобы отключить функцию.]]> - 8 +Совет: Установите 0, чтобы отключить функцию.]]> + 10 input ipb_bruteforce_attempts 3 @@ -1284,7 +1558,7 @@ choose=разрешить пользователю самому ввести н Сбрасывать счетчик неудачных попыток через Х минут Совет: Установите 0, чтобы не сбрасывать неудавшиеся попытки. ]]> - 8 + 10 input ipb_bruteforce_period 15 @@ -1303,7 +1577,7 @@ choose=разрешить пользователю самому ввести н Автоматически разблокировать учетную запись? Совет: Отключение данной функции потребует разблокировать учетные записи вручную во вкладке Система.]]> - 8 + 10 yes_no ipb_bruteforce_unlock 1 @@ -1321,7 +1595,7 @@ choose=разрешить пользователю самому ввести н Использовать защищенную форму для отправки письма пользователю? Опция позволяет скрыть e-mail адреса пользователя от других пользователей. Это способствует защите электронных адресов пользователей от разглашения. - 8 + 10 yes_no use_mail_form 1 @@ -1339,7 +1613,7 @@ choose=разрешить пользователю самому ввести н Запретить размещать flash? Опция позволяет запретить использование flash во всей системе. - 8 + 10 yes_no disable_flash 1 @@ -1357,7 +1631,7 @@ choose=разрешить пользователю самому ввести н Разрешить отправку изображений? Опытные программисты могут создавать скрипты и под видом изображений загружать их на сервер. IP.Board ограничивает потенциальный урон от подобных действий. Эту функцию следует отключать только в крайних случаях. - 8 + 10 yes_no allow_images 1 @@ -1375,7 +1649,7 @@ choose=разрешить пользователю самому ввести н Убрать ссылку на АЦ с форума? - 8 + 10 yes_no security_remove_acp_link 0 @@ -1393,7 +1667,7 @@ choose=разрешить пользователю самому ввести н Использовать https протокол для форм входа? Использование протокола HTTPS, позволяет защитить передачу логина и пароля. Использовать данную опцию можно только в случае правильной настройки web-сервера. - 8 + 10 yes_no logins_over_https 0 @@ -1411,7 +1685,7 @@ choose=разрешить пользователю самому ввести н Использовать активацию учетных записей пользователей? - 8 + 10 dropdown reg_auth_type user @@ -1432,7 +1706,7 @@ admin=активация администратором Удалять неактивированные учетные записи после X дней Включение этой опции позволяет удалять все учётные записи автоматически, если они не были активированы в течение указанного количества дней. Введите 0, чтобы не удалять автоматически неподтвержденные регистрации. - 8 + 10 input validate_day_prune 0 @@ -1450,7 +1724,7 @@ admin=активация администратором Уведомлять при регистрации нового пользователя? Включение опции позволяет уведомлять администрацию о каждой новой регистрации пользователя на форуме. - 8 + 10 yes_no new_reg_notify 0 @@ -1468,7 +1742,7 @@ admin=активация администратором Уведомлять при появлении нового спамера? Включение опции позволяет уведомлять администрацию, если какой-либо пользователь был отмечен как спамер. - 8 + 10 yes_no spm_notify 0 @@ -1484,9 +1758,9 @@ admin=активация администратором 0 - Пользователю, отмеченному как спамер запрещено + Пользователю, отмеченному как спамер, запрещено - 8 + 10 dropdown spm_option disable @@ -1507,9 +1781,9 @@ unapprove=отправлять PM/сообщения/темы и скрываю Скрывать сообщения за X дней при отметке пользователя как спамер +В значении опции необходимо указать количество дней, за которые сообщения от пользователя, помеченного как спамер, будут скрыты. Например, если указать 3 дня, то при отметке пользователя спамером, все его сообщения за предыдущие 3 дня будут скрыты.
    Вы можете ввести значение 0, тогда все сообщения пользователя будут скрыты.]]>
    - 8 + 10 input spm_post_days 3 @@ -1527,7 +1801,7 @@ unapprove=отправлять PM/сообщения/темы и скрываю Заставлять посетителей авторизоваться, чтобы увидеть форум? Если эта настройка включена, посетители должны будут либо авторизоваться, либо зарегистрироваться перед тем, как продолжить просмотр форума. - 8 + 10 yes_no force_login 0 @@ -1545,7 +1819,7 @@ unapprove=отправлять PM/сообщения/темы и скрываю Отключить регистрацию? Включение этой настройки полностью отключает возможность регистрации посетителей на форуме. - 8 + 10 yes_no no_reg 0 @@ -1562,8 +1836,8 @@ unapprove=отправлять PM/сообщения/темы и скрываю Удалять коды chr(0xCA) при вводе? - может стать причиной пропадения символов в сообщениях в кодировках, отличных от западной.]]> - 8 + может стать причиной пропадания символов в сообщениях в кодировках, отличных от западной.]]> + 10 yes_no strip_space_chr 0 @@ -1581,7 +1855,7 @@ unapprove=отправлять PM/сообщения/темы и скрываю Отключает возможность пользователей жаловаться на сообщения. - 8 + 10 yes_no disable_reportpost 0 @@ -1599,7 +1873,7 @@ unapprove=отправлять PM/сообщения/темы и скрываю Флуд-контроль — интервал задержки Если оставить настройку пустой, флуд-контроль будет отключён. Не относится к пользователям, принадлежащим к группе, которой разрешено обходить флуд-контроль.]]> - 8 + 10 input flood_control 10 @@ -1617,7 +1891,7 @@ unapprove=отправлять PM/сообщения/темы и скрываю Разрешить пользователям просматривать список активных пользователей? Если настройка включена, пользователи и посетители получат возможность просматривать списки активных пользователей. Темы и форумы, которые пользователь не имеет право просматривать, не показываются. - 8 + 10 yes_no allow_online_list 1 @@ -1635,7 +1909,7 @@ unapprove=отправлять PM/сообщения/темы и скрываю Показывать версию IPB? - 15 + 10 yes_no ipb_display_version 0 @@ -1653,7 +1927,7 @@ unapprove=отправлять PM/сообщения/темы и скрываю Отключить возможность анонимной авторизации? - 8 + 10 yes_no disable_anonymous 0 @@ -1671,7 +1945,7 @@ unapprove=отправлять PM/сообщения/темы и скрываю Отключить возможность администраторам видеть анонимных пользователей на форуме? - 8 + 10 yes_no disable_admin_anon 0 @@ -1689,7 +1963,7 @@ unapprove=отправлять PM/сообщения/темы и скрываю Отключить возможность администраторов видеть IP-адреса пользователей на форуме? - 8 + 10 yes_no disable_online_ip 0 @@ -1704,105 +1978,6 @@ unapprove=отправлять PM/сообщения/темы и скрываю securityandprivacy 0 - - 1 - searchenginespiders - Настройки отслеживания поисковых роботов - Группа опций содержит настройки, позволяющие настроить систему отслеживания роботов поисковых систем. - System - core - 0 - - - Включить отслеживание поисковых роботов? - Данная опция позволяет включить механизм определения поисковых роботов среди пользователей форума. Если опция отключена, настройки ниже не будут иметь силы. - 9 - yes_no - spider_sense - 1 - - - 1 - 1 - - 0 - 1 - - searchenginespiders - 0 - - - Журналировать действия поисковых роботов? - Опция позволяет включить ведение подробного журнала посещения поисковым роботом вашего форума. Данную настройку имеет смысл включать на короткое время, только для анализа индексируемости вашего форума. При большом количестве поисковых роботов на вашем форуме, из-за этой настройки может возникнуть большая нагрузка на сервер. - 9 - yes_no - spider_visit - 0 - - - 1 - 2 - - 0 - 1 - - searchenginespiders - 0 - - - Считать ботов членами групп? - Эта функция поможет ограничить доступ бота к определенным частям форума, выставляя соответствующие права для группы к которой будут относится боты. - 9 - dropdown - spider_group - 2 - #show_groups# - - 1 - 3 - - 0 - 1 - - searchenginespiders - 0 - - - Показывать ботов в списке активных пользователей? - - 9 - yes_no - spider_active - 1 - - - 1 - 5 - - 0 - 1 - - searchenginespiders - 0 - - - Помечать ботов в списке активных пользователей, как скрытых? - При включении этой опции, имена ботов будут видны только администраторам. - 9 - yes_no - spider_anon - 0 - - - 1 - 6 - - 1 - 1 - - searchenginespiders - 0 - 1 searchsetup @@ -1818,7 +1993,7 @@ unapprove=отправлять PM/сообщения/темы и скрываю
    ]]>
    - 10 + 12 dropdown search_method traditional @@ -1837,7 +2012,7 @@ sphinx=Sphinx Включить полнотекстовый поиск? Работает, если выбран традиционный тип поиска. Если база данных настроена некорректно, то полнотекстовый (fulltext) поиск может плохо искать по ключевым словам на русском языке. - 10 + 12 yes_no use_fulltext 1 @@ -1853,15 +2028,18 @@ sphinx=Sphinx 0 - Минимальная длина ключевого слова - Тип поиска словосочетаний + - 10 - input - min_search_word - 4 - min_search_word +При типе "И" в результатах будут только те материалы, которые содержат оба слова. + +Опция имеет силу только для «Традиционного» поиска]]> + 12 + dropdown + s_andor_type + and + and=И + or=ИЛИ 1 3 @@ -1873,18 +2051,15 @@ sphinx=Sphinx 0 - Ограничить результаты поиска по темам и сообщениям - - 25 - dropdown - search_hardlimit - 200 - 100=100 -200=200 -300=300 -400=400 -500=500 -1000=1000 + Минимальная длина ключевого слова + + 12 + input + min_search_word + 4 + min_search_word 1 4 @@ -1898,14 +2073,37 @@ sphinx=Sphinx Количество отображаемых на одной странице результатов Пол умолчанию 25. - 10 + 12 input search_per_page 25 1 - 4 + 5 + + 0 + 1 + + searchsetup + 0 + + + Ограничить результаты поиска по темам и сообщениям + + 12 + dropdown + search_hardlimit + 200 + 100=100 +200=200 +300=300 +400=400 +500=500 +1000=1000 + + 1 + 6 0 1 @@ -1918,7 +2116,7 @@ sphinx=Sphinx не будут отображаться в результатах "просмотра новых публикаций". Зажав клавишу Ctrl можно выбрать несколько разделов.]]> - 10 + 12 multi vnp_block_forums @@ -1941,7 +2139,25 @@ if ( $show == 1 ) $key = 'vnp_block_forums[]'; }]]> 1 - 4 + 7 + + 0 + 1 + + searchsetup + 0 + + + + Количество дней считается с момента последнего сообщения пользователя. Таким образом, если последний раз пользователь отправлял сообщение/тему в марте, и вы указали в настройках лимит в 30 дней, то поиск будет искать все темы/сообщения за февраль (т.е. 30-ю днями ранее последней даты отправки сообщения). + 12 + input + search_ucontent_days + 365 + + + 1 + 8 0 1 @@ -1952,14 +2168,14 @@ $key = 'vnp_block_forums[]'; Скрыть уведомление о полнотекстовом поиске? Если вы используете традиционный и обычный тип поиска, а ваш SQL сервер поддерживает полнотекстовый поиск, то на главной странице админцентра будет отображаться соответствующее уведомление. Вы можете скрыть его, включив данную опцию. - 10 + 12 yes_no hide_ftext_note 0 1 - 5 + 9 0 0 @@ -1967,36 +2183,18 @@ $key = 'vnp_block_forums[]'; searchsetup 0 - - - - 25 - input - search_ucontent_days - 365 - - - 0 - 5 - - 0 - 1 - - searchsetup - 0 - Адрес сервера Адрес вашего сервера Sphinx. По умолчанию 127.0.0.1. - 10 + 12 input search_sphinx_server 127.0.0.1 1 - 6 + 10 Настройки Sphinx поиска 0 1 @@ -2008,14 +2206,14 @@ $key = 'vnp_block_forums[]'; Порт Порт, используемый для соединения с вашим Sphinx сервером. По умолчанию 3312. - 10 + 12 input search_sphinx_port 3312 1 - 7 + 11 0 1 @@ -2024,16 +2222,34 @@ $key = 'vnp_block_forums[]'; 0 - Базовый пуль + Базовый путь Базовый путь для индексов и логов Sphinx. - 10 + 12 input sphinx_base_path /var/sphinx 1 - 8 + 12 + + 0 + 1 + + searchsetup + 0 + + + Включить поддержку расширенных запросов + перестроить все Sphinx индексы]]> + 12 + yes_no + sphinx_wildcard + 0 + + + 1 + 13 0 1 @@ -2053,7 +2269,7 @@ $key = 'vnp_block_forums[]'; Кодировка страниц форума Кодировка для всех HTML страниц системы. Мы настоятельно рекомендуем использовать UTF-8 - 11 + 13 input gb_char_set UTF-8 @@ -2069,29 +2285,32 @@ $key = 'vnp_block_forums[]'; 0 - Включить безопасный режим для стилей? - В безопасном режиме работы стилей система подключает шаблоны стилей из базы данных. В обычном режиме, система использует шаблоны стилей из кеш-файлов, хранящихся в директории cache. Безопасный режим необходим в случае проблем с чтением стилей из кеш-файлов, например, когда появляются PHP ошибки, связанные с safemode и/или open_basedir. - 11 - yes_no - safe_mode_skins - 0 - + Способ перекодировки текста + Не все способы могут поддерживаться сервером + 13 + dropdown + charset_conv_method + mb + internal=Внтренний + mb=mb функции + recode=recode + iconv=iconv 1 2 0 1 - + multibyte, utf8, utf-8, charset, recode, iconv, mb, internal serverenvironment 0 - Отключить GZIP? - GZIP позволяет быстрее отправлять страницы клиентам, сжимая их и экономя трафик, однако, не все серверы позволяют использовать данный формат, а некоторые серверы используют GZIP по-умолчанию. - 11 + Включить безопасный режим для стилей? + В безопасном режиме работы стилей система подключает шаблоны стилей из базы данных. В обычном режиме, система использует шаблоны стилей из кеш-файлов, хранящихся в директории cache. Безопасный режим необходим в случае проблем с чтением стилей из кеш-файлов, например, когда появляются PHP ошибки, связанные с safemode и/или open_basedir. + 13 yes_no - disable_gzip + safe_mode_skins 0 @@ -2105,14 +2324,13 @@ $key = 'vnp_block_forums[]'; 0 - Версия GD - - 11 - dropdown - gd_version - 2 - 1=GD1 -2=GD2 + Отключить AJAX для текстов + Полезно для сайтов имеющих проблемы с неверным отображением символов национальных кодировок, не поддерживаемых PHP. + 13 + yes_no + disable_text_ajax + 0 + 1 4 @@ -2124,31 +2342,32 @@ $key = 'vnp_block_forums[]'; 0 - Принудительно отправлять HTTP заголовки? - - 24 + Отключить GZIP? + GZIP позволяет быстрее отправлять страницы клиентам, сжимая их и экономя трафик, однако, не все серверы позволяют использовать данный формат, а некоторые серверы используют GZIP по умолчанию. + 13 yes_no - print_headers + disable_gzip 0 1 5 - 1 + 0 1 serverenvironment 0 - Отправлять HTTP заголовки для отключения кеширования? - Примечание: Необходимо активировать опцию выше, чтобы данная настройка имела действие.]]> - 11 - yes_no - nocache - 1 - + Версия GD + + 13 + dropdown + gd_version + 2 + 1=GD1 +2=GD2 1 6 @@ -2160,11 +2379,11 @@ $key = 'vnp_block_forums[]'; 0 - Убрать страницы переадресации? - Включение опциии позволяет убрать страницу переадресации, используемую для информирования пользователя о его последнем действии. Переадресация будет происходить напрямую, без отображения данной страницы. - 11 + Принудительно отправлять HTTP заголовки? + + 13 yes_no - ipb_remove_redirect_pages + print_headers 0 @@ -2178,15 +2397,13 @@ $key = 'vnp_block_forums[]'; 0 - Тип переадресации - Способы переадресации для браузера. Опция позволеят решить проблему не отображения страниц после отправки ответа, перехода к новой теме раздела и т.п - 11 - dropdown - header_redirect - - location=Location type (*nix savvy) -refresh=Refresh (Windows savvy) -html=HTML META redirect (Если другие варианты не работают...) + Отправлять HTTP заголовки для отключения кеширования? + Примечание: Необходимо активировать опцию выше, чтобы данная настройка имела действие.]]> + 13 + yes_no + nocache + 1 + 1 8 @@ -2197,18 +2414,56 @@ html=HTML META redirect (Если другие варианты не работ serverenvironment 0 + + Убрать страницы переадресации? + Включение опции позволяет убрать страницу переадресации, используемую для информирования пользователя о его последнем действии. Переадресация будет происходить напрямую, без отображения данной страницы. + 13 + yes_no + ipb_remove_redirect_pages + 0 + + + 1 + 9 + + 1 + 1 + + serverenvironment + 0 + + + Тип переадресации + Способы переадресации для браузера. Опция позволяет решить проблему не отображения страниц после отправки ответа, перехода к новой теме раздела и т.п + 13 + dropdown + header_redirect + + location=Location type (*nix savvy) +refresh=Refresh (Windows savvy) +html=HTML META redirect (Если другие варианты не работают...) + + 1 + 10 + + 0 + 1 + + serverenvironment + 0 + Использовать сокеты? Включение данной опции позволит использовать механизм сокетов для работы форума с внешними ресурсами (например, для получения RSS потоков). - 11 + 13 yes_no enable_sockets 1 1 - 9 + 11 0 1 @@ -2219,14 +2474,14 @@ html=HTML META redirect (Если другие варианты не работ Имя пользователя Это имя пользователя будет использоваться во всех .htaccess файлах. - 11 + 13 input http_auth_username 1 - 10 + 12 HTTP-авторизация 0 1 @@ -2237,14 +2492,14 @@ html=HTML META redirect (Если другие варианты не работ Пароль Этот пароль будет использоваться во всех файлах .htaccess. - 11 + 13 input http_auth_password 1 - 11 + 13 1 1 @@ -2253,30 +2508,253 @@ html=HTML META redirect (Если другие варианты не работ 0 - Перенаправление на новые URL? - Включение данной опции позволяет перенаправить посетителя, пришедшего по старому адресу, вида showxxxx=x, на новый ЧПУ адрес страницы. - 11 + 1 + adcodeintegration + Настройки системы рекламы + Данные опции позволяют настроить рекламные площадки форума + + core + 0 + + + Включить систему + Опция позволяет включить или отключить систему показа рекламы на форуме + 14 yes_no - seo_r_on + ad_code_global_enabled 0 1 - 12 - Дружественные URL (ЧПУ) + 1 + Основные настройки 0 1 - serverenvironment + adcodeintegration 0 - Использовать «301» перенаправление? - При включении этой опции для редиректа на новые ЧПУ адреса со старых, будет использоваться заголовок «301 Moved Permanently», что означает, что страница перенесена навсегда. Настройка имеет SEO значение. - 11 - yes_no - seo_r301 - 0 + Группы без просмотра рекламы + Выбранные группы не будут видеть рекламу на форуме + 14 + multi + ad_code_exempt_groups + + #show_groups# + + 1 + 2 + + 0 + 1 + + adcodeintegration + 0 + + + Код для добавления в шапку + Данный код будет вставлен в шапку форума + 14 + textarea + ad_code_global_header + + + + 1 + 3 + + 0 + 1 + ad,advertisement,code,header + adcodeintegration + 0 + + + Код для добавления в подвал + Данный код будет добавлен в подвал форума + 14 + textarea + ad_code_global_footer + + + + 1 + 4 + + 0 + 1 + ad,code,advertisement,footer + adcodeintegration + 0 + + + Код для добавления в шапку + Данный код будет вставляться только на главной странице форума. Опция перекрывает значение, указанное в параметре «Код для добавления в шапку» основных настроек. + 14 + textarea + ad_code_board_index_header + + + + 1 + 5 + Главная страница + 0 + 1 + + adcodeintegration + 0 + + + Код для добавления в подвал + Данный код будет вставляться только на главной странице форума. Опция перекрывает значение, указанное в параметре «Код для добавления в подвал» основных настроек. + 14 + textarea + ad_code_board_index_footer + + + + 1 + 6 + + 0 + 1 + + adcodeintegration + 0 + + + Код для добавления в боковую панель + Данный код будет вставлен в боковую панель главной страницы + 14 + textarea + ad_code_board_sidebar + + + + 1 + 7 + + 0 + 1 + + adcodeintegration + 0 + + + Код для добавления в шапку + Данный код будет вставляться только на странице тем форума. Опция перекрывает значение, указанное в параметре «Код для добавления в шапку» основных настроек. + 14 + textarea + ad_code_forum_view_header + + + + 1 + 8 + Страница тем форума + 0 + 1 + + adcodeintegration + 0 + + + Код для добавления в подвал + Данный код будет вставляться только на странице тем форума. Опция перекрывает значение, указанное в параметре «Код для добавления в подвал» основных настроек. + 14 + textarea + ad_code_forum_view_footer + + + + 1 + 9 + + 0 + 1 + + adcodeintegration + 0 + + + Код для добавления после первой темы + Данный код будет вставлен после первой темы в списке тем форума + 14 + textarea + ad_code_forum_view_topic_code + + + + 1 + 10 + + 0 + 1 + + adcodeintegration + 0 + + + Код для добавления в шапку + Данный код будет вставляться только на странице темы форума. Опция перекрывает значение, указанное в параметре «Код для добавления в шапку» основных настроек. + 14 + textarea + ad_code_topic_view_header + + + + 1 + 11 + Страница темы + 0 + 1 + + adcodeintegration + 0 + + + Код для добавления в подвал + Данный код будет вставляться только на странице темы форума. Опция перекрывает значение, указанное в параметре «Код для добавления в подвал» основных настроек. + 14 + textarea + ad_code_topic_view_footer + + + + 1 + 12 + + 0 + 1 + + adcodeintegration + 0 + + + Код для добавления после первого сообщения + Данный код будет добавлен после первого сообщения темы + 14 + textarea + ad_code_topic_view_code + 1 @@ -2285,73 +2763,7 @@ html=HTML META redirect (Если другие варианты не работ 0 1 - serverenvironment - 0 - - - Тип URL - /index.php/forum/2-news/
    -При типе URL «Запрос» - /index.php?/forum/2-news/

    -Выбор типа ограничивается так же программным обеспечением сервера. Следует знать, что если используется веб сервер Apache и PHP его модуль, то можно использовать оба типа URL. Если же сервер на платформе Windows или PHP установлен как CGI, то использовать можно только тип «Запрос»]]>
    - 11 - dropdown - url_type - query_string - path_info=Путь -query_string=Запрос - - 1 - 14 - - 0 - 1 - - serverenvironment - 0 -
    - - Использовать .htaccess mod_rewrite? - -]]> - 11 - yes_no - htaccess_mod_rewrite - 0 - - ', nl2br( $this->registry->adminFunctions->fetchModRewrite() ), $r['conf_description'] ); -}]]> - 1 - 15 - - 0 - 1 - - serverenvironment - 0 - - - Тип обработки неверных URL? - -Например, при отключенной опции, адреса:
    -/forum/2-my-forum (и)
    /forum/2-random-text
    ведут на одну и ту же страницу.
    При включении этой опции, вторая ссылка будет вести на несуществующую страницу, и будет запущен выбранный механизм обработки неверного URL. Настройка имеет SEO значение.]]>
    - 11 - dropdown - seo_bad_url - nothing - - - 1 - 16 - - 1 - 1 - 301, redirect, friendly urls - serverenvironment + adcodeintegration 0
    @@ -2365,8 +2777,8 @@ redirect=Перенаправить на правильный URL («301»)]]> Лимит загрузки сервера - Вы можете отключить лимит просто не заполняя данное поле.]]> - 12 + Вы можете отключить лимит, просто не заполняя данное поле.]]> + 15 input load_limit @@ -2384,7 +2796,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Отключить кеширование (prefetch)? Некоторые веб-оптимизаторы могут кешировать страницы перед запросом пользователя. Это существенно ускоряет загрузку страницы пользователем, однако, создает дополнительную нагрузку на сервер. - 12 + 15 yes_no disable_prefetching 1 @@ -2402,7 +2814,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Включить кеширование? Если включить данную опцию, некоторые данные будут кешироваться для сохранения ресурсов сервера. - 12 + 15 yes_no cc_on 1 @@ -2421,7 +2833,7 @@ redirect=Перенаправить на правильный URL («301»)]]>Включить мониторинг? Важно: не включайте настройку на загруженном форуме. Это может привести к сильной потери производительности!]]> - 12 + 15 yes_no cc_monitor 0 @@ -2440,7 +2852,7 @@ redirect=Перенаправить на правильный URL («301»)]]>Кеширование сообщений Введите 0 для отключения кеширования сообщений.]]> - 12 + 15 input cc_posts 7 @@ -2458,7 +2870,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Кеширование подписей Введите 0 для отключения кеширования подписей.]]> - 12 + 15 input cc_sigs 180 @@ -2476,7 +2888,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Показывать дополнительные поля профиля при просмотре тем? Если включить данную опцию форум будет использовать «тяжелый» запрос к базе данных «LEFT JOIN...», который сделает выборку необходимых данных из соответствующей таблицы. - 12 + 15 yes_no custom_profile_topic 1 @@ -2494,7 +2906,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Кешировать календари и дни рождения? Не рекомендуется, если ваш форум НЕ посещается ежедневно. - 12 + 15 yes_no cache_calendar 1 @@ -2512,7 +2924,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Период отсутствия, через которое пользователь считается неактивным (в минутах) - 12 + 15 input au_cutoff 15 @@ -2529,8 +2941,8 @@ redirect=Перенаправить на правильный URL («301»)]]> Разрешить отслеживание подписки на изменения? - - 12 + При включенной опции IP.Board будет определять факт подписки на изменения в темах и форумах, и показывать соответствующую кнопку «Подписаться» или «Отписаться». Это добавляет по одному дополнительному запросу при просмотре списка тем и списка форумов. + 15 yes_no cpu_watch_update 1 @@ -2548,7 +2960,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Немедленно обновлять просмотры темы? Если данная опция включена, счетчик количества просмотров темы будет обновляться каждый раз, когда кто-нибудь просматривает данную тему. Если она отключена, то просмотры темы будут записываться в другую таблицу и обновляться каждые 3 часа. Это значительно уменьшит загрузку таблицы тем, если ваш форум очень посещаемый - 12 + 15 yes_no update_topic_views_immediately 0 @@ -2566,7 +2978,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Отмечать темы, в которые отвечал пользователь? - 12 + 15 yes_no show_user_posted 1 @@ -2583,9 +2995,9 @@ redirect=Перенаправить на правильный URL («301»)]]> Удалять длительные поисковые запросы? - + Введите 0 для отключения удаления.]]> - 12 + 15 input kill_search_after 30 @@ -2603,7 +3015,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Отключить «Пользователи, просматривающие данный форум»? Позволяет уменьшить количество запросов на 1 при каждом просмотре форума - 12 + 15 yes_no no_au_forum 0 @@ -2621,7 +3033,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Отключить «Пользователи, просматривающие данную тему»? Позволяет уменьшить количество запросов на 1 при каждом просмотре темы - 12 + 15 yes_no no_au_topic 0 @@ -2639,7 +3051,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Отключить краткое изложение темы? Отключить отображение краткого изложения темы внизу страницы, на которой пишется ответ в тему? - 12 + 15 yes_no disable_summary 0 @@ -2657,7 +3069,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Показывать активных пользователей? - 12 + 15 yes_no show_active 1 @@ -2675,7 +3087,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Разрешить пользователям пользоваться поиском? - 12 + 15 yes_no allow_search 1 @@ -2693,7 +3105,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Разрешить показ результатов поиска в виде заголовков тем? Настройка позволяет добавить опцию «Показывать результаты в виде заголовков тем» в расширенную форму поиска. Вводится дополнительная группировка. - 12 + 15 yes_no enable_show_as_titles 0 @@ -2711,7 +3123,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Показывать статистику форума? Отображение статистики форума внизу главной страницы. - 12 + 15 yes_no show_totals 1 @@ -2729,7 +3141,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Отключить статистику профилей? Статистика посещений профилей пользователями на большом форуме может создавать большую нагрузку. - 12 + 15 yes_no disable_profile_stats 0 @@ -2747,7 +3159,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Максимальное количество символов в слове Ограничивает использование длинных слов без пробелов, которые могут растянуть таблицы в ширину, искажая их. Рекомендуемое значение — 80-100 символов. - 12 + 15 input post_wordwrap 0 @@ -2765,7 +3177,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Отключить подфорумы на главной странице форума Отключить отображение подфорумов на главной странице форума? - 12 + 15 yes_no disable_subforum_show 0 @@ -2782,8 +3194,8 @@ redirect=Перенаправить на правильный URL («301»)]]> Показывать упрощенное выпадающее меню быстрого перехода? - Удаление под-форумов разделов из выпадающего меню, полезно, когда таких под-форумов много. - 12 + Удаление подфорумов разделов из выпадающего меню, полезно, когда таких подфорумов много. + 15 yes_no short_forum_jump 0 @@ -2801,7 +3213,7 @@ redirect=Перенаправить на правильный URL («301»)]]> Подгружать javascript файлы из серверов Google Включив эту функцию, некоторые javascript файлы будут загружаться из серверов Google, что позволит немного снизить нагрузку на ваш сервер. - 12 + 15 yes_no remote_load_js 0 @@ -2820,7 +3232,7 @@ redirect=Перенаправить на правильный URL («301»)]]>Сжать javascript? Опция не работает, если включена загрузка javascript из Google.]]> - 12 + 15 yes_no use_minify 1 @@ -2836,9 +3248,9 @@ redirect=Перенаправить на правильный URL («301»)]]>0 - Включить отслеживание прочитанности тем? + Включить отслеживание прочитанных тем? - 12 + 15 yes_no topic_marking_enable 1 @@ -2846,7 +3258,7 @@ redirect=Перенаправить на правильный URL («301»)]]> 1 28 - Отслеживание статуса прочитанности тем + Отслеживание статуса прочитанных тем 0 1 @@ -2854,28 +3266,41 @@ redirect=Перенаправить на правильный URL («301»)]]>0 - Частота сохранения статуса прочитанности? - Статусы прочитанности тем хранятся в базе данных, их обновление достаточно ресурсоемкая операция. Потому IP.Board на время работы пользователя с форумом сохраняет статусы в сессии пользователя. Данная опция позволяет настроить время через которое статусы из сессии будут добавляться в базу. Чем больше время тем меньше нагрузка, но больше риск потери статусов, чем меньше время, тем меньше риск потери, но выше нагрузка. - 12 - dropdown - topic_marking_save_freq - session - page=При каждом переходе по форуму -min-1=Каждую минуту -min-3=Каждые 3 минуты -min-5=Каждые 5 минут -min-10=Каждые 10 минут -session=По окончанию сессии + Отключить отслеживание через Cookie + Даже если вы отключили систему отслеживания выше, форум будет продолжать отслеживать статусы с использованием cookies. Вы можете полностью отключить отслеживание, включив эту опцию, что позволит несколько разгрузить сервер при больших нагрузках. + 15 + yes_no + topic_marking_noquery + 0 + 1 29 - 1 + 0 1 cpusaving 0 + + Ограничение циклов разбора bb-кода + Анализатор bb-кодов будет пробегать тексты сообщений указанное количество раз. + 15 + input + max_bbcodes_per_post + 2000 + + + 1 + 30 + Прочее + 0 + 1 + limit, parse + cpusaving + 0 + 1 boardoffline @@ -2889,7 +3314,7 @@ session=По окончанию сессии
    Перевести форум в режим offline? Форум будет доступен только тем, кто имеет права для просмотра форума в режиме offline. (настраивается в правах групп пользователей) - 13 + 16 yes_no board_offline 0 @@ -2907,7 +3332,7 @@ session=По окончанию сессии
    Сообщение Данное сообщение будет выведено тем пользователям, которые не могут использовать форум в режиме offline. - 13 + 16 editor offline_msg @@ -2922,6 +3347,243 @@ session=По окончанию сессии
    boardoffline 0
    + + 1 + seo + Поисковая оптимизация (SEO) + Настройки для улучшения работы форума с поисковыми системами + System + core + 0 + + + Включить отслеживание поисковых роботов? + Данная опция позволяет включить механизм определения поисковых роботов среди пользователей форума. Если опция отключена, настройки ниже не будут иметь силы. + 35 + yes_no + spider_sense + 1 + + + 1 + 1 + + 0 + 1 + + seo + 0 + + + Журналировать действия поисковых роботов? + Опция позволяет включить ведение подробного журнала посещения поисковым роботом вашего форума. Данную настройку имеет смысл включать на короткое время, только для анализа индексируемости вашего форума. При большом количестве поисковых роботов на вашем форуме, из-за этой настройки может возникнуть большая нагрузка на сервер. + 35 + yes_no + spider_visit + 0 + + + 1 + 2 + + 0 + 1 + + seo + 0 + + + Считать ботов членами групп? + Эта функция поможет ограничить доступ бота к определенным частям форума, выставляя соответствующие права для группы, к которой будут относится боты. + 35 + dropdown + spider_group + 2 + #show_groups# + + 1 + 3 + + 0 + 1 + + seo + 0 + + + Показывать ботов в списке активных пользователей? + + 35 + yes_no + spider_active + 1 + + + 1 + 5 + + 0 + 1 + + seo + 0 + + + Помечать ботов в списке активных пользователей, как скрытых? + При включении этой опции, имена ботов будут видны только администраторам. + 35 + yes_no + spider_anon + 0 + + + 1 + 6 + + 1 + 1 + + seo + 0 + + + Перенаправление на новые URL? + Включение данной опции позволяет перенаправить посетителя, пришедшего по старому адресу, вида showxxxx=x, на новый ЧПУ адрес страницы. + 35 + yes_no + seo_r_on + 0 + + + 1 + 14 + Дружественные URL (ЧПУ) + 0 + 1 + + seo + 0 + + + Тип URL + /index.php/forum/2-news/
    +При типе URL «Запрос» - /index.php?/forum/2-news/

    +Выбор типа ограничивается так же программным обеспечением сервера. Следует знать, что если используется веб сервер Apache и PHP его модуль, то можно использовать оба типа URL. Если же сервер на платформе Windows или PHP установлен как CGI, то использовать можно только тип «Запрос»]]>
    + 35 + dropdown + url_type + query_string + path_info=Путь +query_string=Запрос + + 1 + 15 + + 0 + 1 + + seo + 0 +
    + + Использовать .htaccess mod_rewrite? + +]]> + 35 + yes_no + htaccess_mod_rewrite + 0 + + ', nl2br( $this->registry->adminFunctions->fetchModRewrite() ), $r['conf_description'] ); +}]]> + 1 + 16 + + 0 + 1 + + seo + 0 + + + Тип обработки неверных URL? + +Например, при отключенной опции, адреса:
    +/forum/2-my-forum (и)
    /forum/2-random-text
    ведут на одну и ту же страницу.
    При включении этой опции, вторая ссылка будет вести на несуществующую страницу, и будет запущен выбранный механизм обработки неверного URL. Настройка имеет SEO значение.]]>
    + 35 + dropdown + seo_bad_url + nothing + + + 1 + 17 + + 1 + 1 + 301, redirect, friendly urls + seo + 0 +
    + + Title + Укажите текст, который будет использоваться в мета-теге title. Если оставить поле пустым, будет использоваться название форума. + 35 + input + seo_index_title + + + + 1 + 19 + SEO для главной страницы + 0 + 1 + seo,title + seo + 0 + + + Description + Укажите текст, который будет использоваться в мета-теге description + 35 + textarea + seo_index_md + + + + 1 + 20 + + 0 + 1 + + seo + 0 + + + Keywords + Укажите текст, который будет использоваться в мета-теге keywords + 35 + textarea + seo_index_mk + + + + 1 + 20 + + 0 + 1 + + seo + 0 + 1 ipbcopyright @@ -2934,18 +3596,12 @@ session=По окончанию сессии
    Ключ для удаления копирайта Данный ключ вы должны получить у IPS. - 14 + 17 input ipb_copy_number - + 1 1 @@ -2958,7 +3614,7 @@ session=По окончанию сессии Не показывать копирайт? - 14 + 17 yes_no ips_cp_purchase 0 @@ -2989,7 +3645,7 @@ session=По окончанию сессии Ключ вы получаете вместе с письмом об активации вашей покупки IP.Board.
    НЕ УДАЛЯЙТЕ ИЛИ РЕДАКТИРУЙТЕ ДАННЫЙ КЛЮЧ, ЕСЛИ ВЫ НЕ УВЕРЕНЫ В СВОИХ ДЕЙСТВИЯХ!]]>
    - 15 + 18 input ipb_reg_number @@ -3008,7 +3664,7 @@ session=По окончанию сессии Отображать информацию о том, на кого зарегистрирована лицензия? Лицензия зарегистрирована на: «…»]]> - 15 + 18 yes_no ipb_reg_show 0 @@ -3026,7 +3682,7 @@ session=По окончанию сессии Например: Иван Иванов, IBResource]]> - 15 + 18 input ipb_reg_name @@ -3053,7 +3709,7 @@ session=По окончанию сессии Использовать регистрационную систему COPPA? COPPA на вашем форуме потребует, чтобы все дети младше 13 лет имели письменное разрешение от родителей, отправленное по факсу или почте.]]> - 16 + 19 yes_no use_coppa 0 @@ -3071,7 +3727,7 @@ session=По окончанию сессии Номер факса для получения заявлений - 16 + 19 input coppa_fax @@ -3089,7 +3745,7 @@ session=По окончанию сессии Почтовый адрес для получения заявлений - 16 + 19 textarea coppa_address @@ -3107,7 +3763,7 @@ session=По окончанию сессии Дополнительная COPPA информация Этот текст будет отображен в форме заполнения заявления родительского разрешения на посещение форума. - 16 + 19 editor coppa_consent_extra @@ -3134,7 +3790,7 @@ session=По окончанию сессии Часовой пояс сервера Если вы выбрали правильный часовой пояс, а показания часов отличаются на час, то это связано с летним/зимним временем. Пользователи вашего форума могут откорректировать эту функцию в Настройках форума при помощи Панели управления пользователя.]]> - 17 + 20 dropdown time_offset 3 @@ -3164,7 +3820,7 @@ session=По окончанию сессии Корректировка времени сервера Текущее время в системе (с использованием всех настроек):
    <-T->]]>
    - 17 + 20 input time_adjust 0 @@ -3186,7 +3842,7 @@ $r['conf_description'] = str_replace( '<-T->', $d_date, $r['conf_description'] ) Использовать относительные даты? - 17 + 20 dropdown time_use_relative 1 @@ -3207,7 +3863,7 @@ $r['conf_description'] = str_replace( '<-T->', $d_date, $r['conf_description'] ) Формат относительных дат {--} заменяется на «сегодня» или «вчера» - 17 + 20 input time_use_relative_format {--}, %H:%M @@ -3225,7 +3881,7 @@ $r['conf_description'] = str_replace( '<-T->', $d_date, $r['conf_description'] ) Автоматический перевод часов Включение данной опции позволяет автоматически производить переход пользователей с летнее/зимнее время. - 17 + 20 yes_no time_dst_auto_correction 1 @@ -3243,14 +3899,14 @@ $r['conf_description'] = str_replace( '<-T->', $d_date, $r['conf_description'] ) Полный формат PHP strftime]]> - 17 + 20 input clock_long %d %B %Y - %H:%M 1 - 8 + 6 Формат дат 0 1 @@ -3261,13 +3917,31 @@ $r['conf_description'] = str_replace( '<-T->', $d_date, $r['conf_description'] ) Сокращенный формат PHP strftime]]> - 17 + 20 input clock_short %d %b %Y %H:%M 1 + 7 + + 0 + 1 + + date + 0 + + + Альтернативный сокращенный формат + PHP strftime]]> + 20 + input + clock_short2 + %d %B %Y + + + 1 8 0 @@ -3279,7 +3953,7 @@ $r['conf_description'] = str_replace( '<-T->', $d_date, $r['conf_description'] ) Краткий формат PHP strftime]]> - 17 + 20 input clock_tiny %d %b %Y - %H:%M @@ -3297,14 +3971,14 @@ $r['conf_description'] = str_replace( '<-T->', $d_date, $r['conf_description'] ) Формат даты PHP strftime]]> - 17 + 20 input clock_date %d %b %Y 1 - 11 + 10 1 1 @@ -3315,14 +3989,14 @@ $r['conf_description'] = str_replace( '<-T->', $d_date, $r['conf_description'] ) Формат даты регистрации PHP strftime]]> - 17 + 20 input clock_joined %d %B %y 1 - 12 + 11 0 1 diff --git a/upload/admin/applications/core/xml/core_tasks.xml b/upload/admin/applications/core/xml/core_tasks.xml index 45cccd87..f50d8f59 100644 --- a/upload/admin/applications/core/xml/core_tasks.xml +++ b/upload/admin/applications/core/xml/core_tasks.xml @@ -59,7 +59,7 @@ 23 Очистка MySQL mysqlcleanup.php - 1259856570 + 1272329640 -1 -1 -1 @@ -77,7 +77,7 @@ 24 Очистка кеша OpenID openidcleanup.php - 1259856570 + 1272331800 -1 -1 1 @@ -109,6 +109,42 @@ 0 core + + 43 + Получение входящих Email из POP3 + pop3email.php + 1277458860 + -1 + -1 + -1 + 30 + 97bef57d1cf04d235ca478525b6fae76 + 0 + Получение писем из POP3 email аккаунта + 0 + pop3email + 0 + 0 + core + + + 48 + Оптимизация таблиц базы + optimize.php + 1272340800 + -1 + -1 + 4 + 0 + 744340321463798339137791259fea46 + 1 + Оптимизация таблиц базы один раз в день + 1 + optimizetables + 0 + 0 + core + 26 Очистка кеша diff --git a/upload/admin/applications/core/xml/core_xmlskin_css.xml b/upload/admin/applications/core/xml/core_xmlskin_css.xml index 7a56bc05..424be605 100644 --- a/upload/admin/applications/core/xml/core_xmlskin_css.xml +++ b/upload/admin/applications/core/xml/core_xmlskin_css.xml @@ -1,8 +1,8 @@ - 2 - 1260269068 + 0 + 1288018125 calendar_select .calendar_date_select { color:white; @@ -145,10 +145,11 @@ iframe.ie6_blocker { 0 0 + xmlskin - 2 - 1260269068 + 0 + 1288018125 ipb_bbcode /***************************************************************/ /* IP.Board 3 CSS */ @@ -191,10 +192,11 @@ input.bbc_spoiler_show { width: 45px; font-size: .7em; margin: 0px; padding: 0p 0 0 + xmlskin - 2 - 1260269068 + 0 + 1288018125 ipb_editor 0 0 + xmlskin - 2 - 1260269068 + 0 + 1288018125 ipb_ie #search { position: absolute !important; @@ -498,10 +501,11 @@ input.bbc_spoiler_show { width: 45px; font-size: .7em; margin: 0px; padding: 0p 0 0 + xmlskin - 2 - 1260269068 + 0 + 1288018125 ipb_print 0 0 + xmlskin - 2 - 1260269068 + 0 + 1288018125 ipb_reset 0 0 + xmlskin - 2 - 1260269068 + 0 + 1288018125 ipb_styles 0 0 + xmlskin - 2 - 1260269068 + 0 + 1288018125 lightbox 0 0 + xmlskin diff --git a/upload/admin/applications/core/xml/core_xmlskin_templates.xml b/upload/admin/applications/core/xml/core_xmlskin_templates.xml index 538e7b99..8a52f945 100644 --- a/upload/admin/applications/core/xml/core_xmlskin_templates.xml +++ b/upload/admin/applications/core/xml/core_xmlskin_templates.xml @@ -1,385 +1,117 @@ - + - - - - - - - - - - - - + + + @@ -388,20 +120,22 @@ defaultHeader - 1260269070 - 1 + 1288194261 + 0 0 0 + xmlskin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -583,230 +685,22 @@ $html errors - 1260269071 - 1 + 1288194261 + 0 0 0 + xmlskin - - - - - - - - - - - - - - - - - - - - - - - - - @@ -815,180 +709,242 @@ $html completePartialLogin - 1260269071 - 1 + 1288194261 + 0 0 0 + xmlskin - - - - - - + + + + + + + + + + @@ -997,60 +953,578 @@ $html basicReportForm - 1260269071 - 1 + 1288194261 + 0 0 0 + xmlskin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/upload/admin/applications/core/xml/hooks.xml b/upload/admin/applications/core/xml/hooks.xml new file mode 100644 index 00000000..526aefe4 --- /dev/null +++ b/upload/admin/applications/core/xml/hooks.xml @@ -0,0 +1,19 @@ + + + + vkontakte.xml + 1 + + + unreadnotifications.xml + 1 + + + adcodesidebar.xml + 1 + + + sharelinks.xml + 0 + + \ No newline at end of file diff --git a/upload/admin/applications/core/xml/hooks/adcodesidebar.xml b/upload/admin/applications/core/xml/hooks/adcodesidebar.xml new file mode 100644 index 00000000..97006ee8 --- /dev/null +++ b/upload/admin/applications/core/xml/hooks/adcodesidebar.xml @@ -0,0 +1,71 @@ + + + + + Блок рекламы + Вывод рекламы в правом блоке на главной странице + Invision Power Services, Inc. + + + + + 1.0.0 + + + boardIndexSideBarAdCode + + + + + boardIndexSideBarAdCode.php + templateHooks + boardIndexSideBarAdCode + + registry = ipsRegistry::instance(); + $this->settings =& $this->registry->fetchSettings(); + } + + public function getOutput() + { + if( $this->registry->getClass('IPSAdCode')->userCanViewAds() ) + { + return $this->registry->getClass('IPSAdCode')->getAdCode('ad_code_board_sidebar'); + } + else + { + return ''; + } + } + +}]]> + + + + + + + + + + + + + + diff --git a/upload/admin/applications/core/xml/hooks/index.html b/upload/admin/applications/core/xml/hooks/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/core/xml/hooks/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/xml/hooks/sharelinks.xml b/upload/admin/applications/core/xml/hooks/sharelinks.xml new file mode 100644 index 00000000..3e8b066e --- /dev/null +++ b/upload/admin/applications/core/xml/hooks/sharelinks.xml @@ -0,0 +1,56 @@ + + + + + Опубликованные ссылки + Вывод информации о последних опубликованных ссылках + Invision Power Services + + + + + 1.0.0 + 10001 + + sharelinks + + + + + boardIndexShareLinks.php + templateHooks + boardIndexShareLinks + + hookGateway = new core_hookGateway( $registry ); + } + + public function getOutput() + { + return $this->hookGateway->shareLinks(); + } +}]]> + + + + + + + + + + + + + + diff --git a/upload/admin/applications/core/xml/hooks/unreadnotifications.xml b/upload/admin/applications/core/xml/hooks/unreadnotifications.xml new file mode 100644 index 00000000..803da0a6 --- /dev/null +++ b/upload/admin/applications/core/xml/hooks/unreadnotifications.xml @@ -0,0 +1,62 @@ + + + + + Уведомления + Вывод не прочитанных уведомлений пользвателя на главной странице + Invision Power Services, Inc + + + + + 1.0.0 + 10000 + + unread_notifications + + + + + boardIndexNotifications.php + templateHooks + boardIndexNotifications + + registry = ipsRegistry::instance(); + $this->memberData =& $this->registry->member()->fetchMemberData(); + } + + public function getOutput() + { + //----------------------------------------- + // Notifications library + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' ); + $notifyLibrary = new $classToLoad( $this->registry ); + $notifyLibrary->setMember( $this->memberData ); + return $notifyLibrary->getBoardIndexHook(); + } +}]]> + + + + + + + + + + + + + + diff --git a/upload/admin/applications/core/xml/hooks/vkontakte.xml b/upload/admin/applications/core/xml/hooks/vkontakte.xml new file mode 100644 index 00000000..583042d0 --- /dev/null +++ b/upload/admin/applications/core/xml/hooks/vkontakte.xml @@ -0,0 +1,308 @@ + + + + + Формы авторизации Vkontakte + Добавление форм Vkontakte в шаблоны + IBResource, LTD + + + + + 1.0.1 + 10001 + + ibr_vkontakte_forms + + + + + vkontakte.php + templateHooks + vk_frame + + output->getTemplate('vkontakte')->vkUserBoxes(); + } + } +}]]> + + + vkontakte.php + templateHooks + vk_lim + + output->getReplacement('lim_vkontakte'); + } + } +}]]> + + + vkontakte.php + templateHooks + vk_button + + output->getTemplate('vkontakte')->vkUserBoxPlaceholder(); + } + } +}]]> + + + + + + core + admin_js + bit_skin_vkontakte + Формы для Вконтакте + + 0 + + + + + + + 0 + skin_vkontakte + + membersVkontakteConnect + + 1280738635 + 1 + 1 + 1 + 1 + + + + + 1 + skin_vkontakte + +
    +
    + + + + + + + +
    + +
    +
    + +
    + {$this->lang->words['remote_no_password']} +

    {$this->lang->words['remote_no_password_1']} {$this->lang->words['remote_no_password_2']} +

    +
    +
    +
    +

    {$this->lang->words['vk_disassociate']}

    +

    {$this->lang->words['vk_revoke']}

    +

    {$this->lang->words['vk_disassociate_desc']}

    +

    +
    +
    + + +]]>
    + membersVkontakteConnect + $isConnected + 1280738657 + 1 + 1 + 1 + 1 + + +
    + + 0 + skin_vkontakte + + + + Open API IPB Gateway + + + + + + + +]]> + showLoginVkFrame + + 1279887574 + 1 + 1 + 1 + 0 + root + + + + 0 + skin_vkontakte + settings['_original_base_url']}/public/js/ips.vkontakte.js"> + + + + + + +]]> + vkUserBoxes + + 1279887617 + 1 + 1 + 1 + 0 + root + + + + 0 + skin_vkontakte + {$this->lang->words['vk_login_title']} +

    +

    +
    +
    +

    +
    ]]>
    + vkUserBoxPlaceholder + + 1279887584 + 1 + 1 + 1 + 0 + root + +
    +
    + + + + + + +
    diff --git a/upload/admin/applications/core/xml/index.html b/upload/admin/applications/core/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/core/xml/index.html +++ b/upload/admin/applications/core/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/xml/information.xml b/upload/admin/applications/core/xml/information.xml index b7ebf8c7..14047da8 100644 --- a/upload/admin/applications/core/xml/information.xml +++ b/upload/admin/applications/core/xml/information.xml @@ -10,6 +10,7 @@ + diff --git a/upload/admin/applications/core/xml/public_core_language_pack.xml b/upload/admin/applications/core/xml/public_core_language_pack.xml index 7558eff0..7c8e295b 100644 --- a/upload/admin/applications/core/xml/public_core_language_pack.xml +++ b/upload/admin/applications/core/xml/public_core_language_pack.xml @@ -3,562 +3,186 @@ core - public_editors - js_template_url - URL - URL - 30005 - - 0 - - - core - public_editors - js_template_link - Link text - Текст ссылки - 30005 - - 0 - - - core - public_editors - js_template_insert_link - Insert Link - Вставить ссылку - 30005 - - 0 - - - core - public_editors - js_template_default - My link - Моя ссылка - 30005 - - 0 - - - core - public_editors - js_template_imageurl - Image URL - URL для изображения - 30005 - - 0 - - - core - public_editors - js_template_insert_img - Insert Image - Вставить изображение - 30005 - - 0 - - - core - public_editors - js_template_email_url - Email Address - Адрес электронной почты - 30005 - 30005 - 0 - - - core - public_editors - js_template_email_me - Email me - Пишите мне - 30005 - 30005 - 0 - - - core - public_editors - js_template_media_url - Media URL - Медиа URL - 30005 - - 0 - - - core - public_editors - js_template_insert_email - Insert Email - Вставить e-mail - 30005 - 30005 - 0 - - - core - public_editors - js_template_example - Example - Пример - 30005 - - 0 - - - core - public_editors - js_template_insert_media - Insert Media - добавить медиа - 30005 - - 0 - - - core - public_editors - js_tt_help - Help - помощь - 30005 - - 0 - - - core - public_editors - js_template_add - Add - Добавить - 30005 - - 0 - - - core - public_editors - use_full_editor - Use Full Editor - Расширенная форма - 30005 - - 0 - - - core - public_editors - save_changes - Save Changes - Сохранить - 30005 - 30005 - 0 - - - core - public_editors - show_edited_by - - Добавить надпись «Отредактировано...» - 30005 - 30005 - 0 - - - core - public_editors - reason_for_edit - Reason for edit: - Причина редактирования - 30005 - 30005 - 0 - - - core - public_editors - js_template_cancel_source - Cancel Source Edit - Отключить редактирование кода - 30005 - - 0 - - - core - public_editors - js_template_update - Update - Обновить - 30005 - - 0 - - - core - public_editors - js_tt_link - Insert link - Вставить ссылку - 30005 - 30005 - 0 - - - core - public_editors - js_tt_image - Insert image - Вставить изображение - 30005 - 30005 - 0 - - - core - public_editors - js_tt_quote - Insert quotation + public_comments + mq_image_add + MultiQuote Цитата - 30005 - 30005 + 31006 + 31006 0 core - public_editors - js_tt_code - Insert code snippet - Код - 30005 - 30005 + public_comments + comment_reply + Reply + Ответить + 31006 + 31006 0 core - public_editors - js_tt_email - Insert email address - Вставить адрес электронной почты - 30005 - 30005 + public_comments + permalink + Permalink: + Ссылка: + 31006 + 31006 0 core - public_editors - js_tt_media - Insert media - Медиа - 30005 - 30005 + public_comments + view_it_anyway + View it anyway? + Посмотреть? + 31006 + 31006 0 core - public_editors - js_tt_strike - Strikethrough - Зачеркнутый - 30005 - 30005 + public_comments + view_comment + View comment + Посмотреть + 31006 + 31006 0 core - public_editors - js_tt_sub - Subscript - Нижний индекс - 30005 - 30005 + public_comments + ignored_comments_not + This comment is hidden because you have chosen to ignore posts by + Комментарий скрыт, так как вы игнорируете сообщения от + 31006 + 31006 0 core - public_editors - js_tt_sup - Superscript - Верхний индекс - 30005 - 30005 + public_comments + comments_header + Comments + Комментарии + 31006 + 31006 0 core - public_editors - box_font_desc - Choose a font to use - Выберите шрифт - 30005 - 30005 + public_comments + edit_link + Edit + Изменить + 31006 + 31006 0 core - public_editors - box_size_desc - Choose a font size - Выберите размер - 30005 - 30005 + public_comments + delete_link + Delete + Удалить + 31006 + 31006 0 core - public_editors - js_tt_emoticons - Emoticons - Смайлики - 30005 - 30005 + public_comments + delete_comment + Delete comment + Удалить + 31006 + 31006 0 core - public_editors - js_tt_spellcheck - Spellcheck - Проверить орфографию - 30005 - 30005 + public_comments + edit_comment + Editing comment from: + Редактирование комментария от: + 31006 + 31006 0 core - public_editors - box_other_desc - Other available styles - Другие стили - 30005 - 30005 + public_comments + comment_save + Save + Сохранить + 31006 + 31006 0 core - public_editors - js_tt_switcheditor - Switch between standard and rich text editor - Переключение между стандартным и визуальным редакторами - 30005 - 30005 + public_comments + report_link + Report + Жалоба + 31006 + 31006 0 core - public_editors - the_max_length - 0 - - 30005 - + public_comments + check_all + Check all + Выбрать все + 31006 + 31006 0 core - public_editors - override - 0 - - 30005 - + public_comments + comment_button_post + Add Comment + Добавить + 31006 + 31006 0 core - public_editors - js_tt_htmlsource - Toggle HTML source - Отобразить HTML код - 30005 - 30005 + public_comments + comment_notice_subject + %s]]> + %s]]> + 31006 + 31006 0 core - public_editors - js_tt_noformat - Remove formatting - Удалить форматирование - 30005 - 30005 - 0 - - - core - public_editors - box_font - Fonts - Шрифт - 30005 - 30005 - 0 - - - core - public_editors - box_size - Sizes - Размер - 30005 - - 0 - - - core - public_editors - box_other - Other styles - Спец. элементы - 30005 - - 0 - - - core - public_editors - js_tt_redo - Redo - Отменить ввод - 30005 - 30005 - 0 - - - core - public_editors - js_tt_undo - Undo - Вернуть ввод - 30005 - 30005 - 0 - - - core - public_editors - js_tt_bold - Bold - Полужирный - 30005 - - 0 - - - core - public_editors - js_tt_italic - Italic - Курсив - 30005 - - 0 - - - core - public_editors - js_tt_underline - Underline - Подчеркнутый - 30005 - 30005 - 0 - - - core - public_editors - js_tt_font_col - Text color - Цвет текста - 30005 - - 0 - - - core - public_editors - js_tt_indent - Indent - Увеличить отступ - 30005 - - 0 - - - core - public_editors - js_tt_outdent - Outdent - Уменьшить отступ - 30005 - 30005 - 0 - - - core - public_editors - js_tt_back_col - Background color - Цвет фона - 30005 - - 0 - - - core - public_editors - js_tt_left - Align left - По левому краю - 30005 - - 0 - - - core - public_editors - js_tt_jfull - Justify full - Растянуть - 30005 - - 0 - - - core - public_editors - js_tt_right - Align right - По правому краю - 30005 - 30005 - 0 - - - core - public_editors - js_tt_center - Align center - По центру - 30005 - - 0 - - - core - public_editors - js_tt_list - Insert list - Вставить список - 30005 - + public_comments + comment_notifications + , + +<#AUTHOR#> has just commented on "<#TITLE#>". + +<#COMMENT#> + +You can review the new comment here: +<#URL#>]]> + , + +<#AUTHOR#> прокоментировал "<#TITLE#>". + +<#COMMENT#> + +Коментарий расположен по следующему адресу: +<#URL#>]]> + 31006 + 31006 0 @@ -567,38 +191,8 @@ editor_unloaded_atm Tip: click inside this box to load the editor Нажмите для загрузки текстового редактора - 30005 - - 0 - - - core - public_editors - show_all_emoticons - Show all emoticons - Показать все смайлики - 30006 - 30006 - 0 - - - core - public_editors - js_tt_resizesmall - Decrease editor size - Уменьшить размер редактора - 30007 - 30007 - 0 - - - core - public_editors - js_tt_resizebig - Increase editor size - Увеличить размер редактора - 30007 - 30007 + 31006 + 31006 0 @@ -607,208 +201,598 @@ show_all_emotes Show All Все - 30011 - 30011 + 31006 + 31006 0 core - public_emails - email_member - Email Member - Отправить письмо - 30005 + public_editors + js_tt_resizesmall + Decrease editor size + Уменьшить размер редактора + 31006 + 31006 + 0 + + + core + public_editors + js_tt_resizebig + Increase editor size + Увеличить размер редактора + 31006 + 31006 + 0 + + + core + public_editors + js_tt_list + Insert list + Вставить список + 31006 + 31006 + 0 + + + core + public_editors + js_tt_jfull + Justify full + Растянуть + 31006 + 31006 + 0 + + + core + public_editors + js_tt_right + Align right + По правому краю + 31006 + 31006 + 0 + + + core + public_editors + js_tt_center + Align center + По центру + 31006 + 31006 + 0 + + + core + public_editors + js_tt_left + Align left + По левому краю + 31006 + 31006 + 0 + + + core + public_editors + js_tt_outdent + Outdent + Уменьшить отступ + 31006 + 31006 + 0 + + + core + public_editors + js_tt_indent + Indent + Увеличить отступ + 31006 + 31006 + 0 + + + core + public_editors + js_tt_font_col + Text color + Цвет текста + 31006 + 31006 + 0 + + + core + public_editors + js_tt_back_col + Background color + Цвет фона + 31006 + 31006 + 0 + + + core + public_editors + js_tt_underline + Underline + Подчеркнутый + 31006 + 31006 + 0 + + + core + public_editors + js_tt_bold + Bold + Полужирный + 31006 + 31006 + 0 + + + core + public_editors + js_tt_italic + Italic + Курсив + 31006 + 31006 + 0 + + + core + public_editors + js_tt_redo + Redo + Отменить ввод + 31006 + 31006 + 0 + + + core + public_editors + box_other + Other styles + Спец. элементы + 31006 + 31006 + 0 + + + core + public_editors + js_tt_undo + Undo + Вернуть ввод + 31006 + 31006 + 0 + + + core + public_editors + box_size + Sizes + Размер + 31006 + 31006 + 0 + + + core + public_editors + box_font + Fonts + Шрифт + 31006 + 31006 + 0 + + + core + public_editors + js_tt_htmlsource + Toggle HTML source + Отобразить HTML код + 31006 + 31006 + 0 + + + core + public_editors + js_tt_noformat + Remove formatting + Удалить форматирование + 31006 + 31006 + 0 + + + core + public_editors + override + 0 + + 31006 0 core - public_emails - emailing_prefix - Emailing - Письмо - 30005 + public_editors + the_max_length + 0 + + 31006 0 core - public_emails - forum_langbit - Forum - Форум - 30005 - + public_editors + js_tt_switcheditor + Switch between standard and rich text editor + Переключение между стандартным и визуальным редакторами + 31006 + 31006 0 core - public_emails - exceeded_flood - The mail could not be sent because you have already sent an email within the last %s minutes - Вы не можете отправлять более одного письма в течение %s минут - 30005 - + public_editors + js_tt_spellcheck + Spellcheck + Проверить орфографию + 31006 + 31006 0 core - public_emails - imp_text - IMPORTANT: To prevent malicious use, all emails sent via this form are logged and the contents recorded and available to the administrators. DO NOT email user names, passwords or any personal details. - ВАЖНО: для предотвращения возможного неправомерного использования данной возможности, все письма, отправленные через эту форму заносятся в специальный журнал, доступный администрации форума. НИ В КОЕМ случае не отправляйте пароли, логины или любую другую личную информацию. - 30005 - + public_editors + js_tt_emoticons + Emoticons + Смайлики + 31006 + 31006 0 core - public_emails - topic_langbit - Topic - Тема - 30005 - + public_editors + box_other_desc + Other available styles + Другие стили + 31006 + 31006 0 core - public_emails - no_message - You must enter some content for the email - Вы должны ввести текст письма - 30005 - + public_editors + box_size_desc + Choose a font size + Выберите размер + 31006 + 31006 0 core - public_emails - exceeded_quota - The mail could not be sent because you have exceeded your alloted quota of %s emails a day - Количество разрешенных писем в день - %s. Вы исчерпали данный лимит. - 30005 - + public_editors + box_font_desc + Choose a font to use + Выберите шрифт + 31006 + 31006 0 core - public_emails - gen_error - You are not logged in or able to send emails - Для использования этой возможности вы должны быть авторизованы и иметь необходимые права доступа - 30005 - + public_editors + js_tt_sup + Superscript + Верхний индекс + 31006 + 31006 0 core - public_emails - no_subject - You must enter a subject for the email - Необходимо ввести тему письма - 30005 - + public_editors + js_tt_strike + Strikethrough + Зачеркнутый + 31006 + 31006 0 core - public_emails - to_name - - Кому (имя друга): - 30005 - + public_editors + js_tt_sub + Subscript + Нижний индекс + 31006 + 31006 0 core - public_emails - send_lang - Send this email in - Язык письма - 30005 - + public_editors + js_tt_media + Insert media + Медиа + 31006 + 31006 0 core - public_emails - submit_send - Send Email - Отправить - 30005 - + public_editors + js_tt_code + Insert code snippet + Код + 31006 + 31006 0 core - public_emails - to_email - Send to (Email Address): - Отправить на e-mail: - 30005 - + public_editors + js_tt_quote + Insert quotation + Цитата + 31006 + 31006 0 core - public_emails - message - Message - Сообщение - 30005 - + public_editors + js_tt_email + Insert email address + Вставить адрес электронной почты + 31006 + 31006 0 core - public_emails - subject - Subject - Тема - 30005 - + public_editors + js_tt_link + Insert link + Вставить ссылку + 31006 + 31006 0 core - public_emails - redirect - The email has been sent - Письмо отправлено - 30005 - + public_editors + js_tt_image + Insert image + Вставить изображение + 31006 + 31006 0 core - public_emails - member_address_title - Members Email Address - E-mail адрес пользователей - 30005 - + public_editors + js_tt_help + Help + помощь + 31006 + 31006 0 core - public_emails - title - Send a page to a friend - Отправить ссылку на страницу другу - 30005 - + public_editors + show_all_emoticons + Show all emoticons + Показать все смайлики + 31006 + 31006 0 core - public_emails - msg_txt - Note: By using this form, the recipient will be able to view your email address - Примечание: получатель письма узнает ваш e-mail адрес - 30005 - + public_editors + use_full_editor + Use Full Editor + Расширенная форма + 31006 + 31006 + 0 + + + core + public_editors + show_edited_by + + Добавить надпись «Отредактировано...» + 31006 + 31006 + 0 + + + core + public_editors + save_changes + Save Changes + Сохранить + 31006 + 31006 + 0 + + + core + public_editors + reason_for_edit + Reason for edit: + Причина редактирования + 31006 + 31006 + 0 + + + core + public_editors + js_template_update + Update + Обновить + 31006 + 31006 + 0 + + + core + public_editors + js_template_cancel_source + Cancel Source Edit + Отключить редактирование кода + 31006 + 31006 + 0 + + + core + public_editors + js_template_add + Add + Добавить + 31006 + 31006 + 0 + + + core + public_editors + js_template_example + Example + Пример + 31006 + 31006 + 0 + + + core + public_editors + js_template_insert_media + Insert Media + добавить медиа + 31006 + 31006 + 0 + + + core + public_editors + js_template_media_url + Media URL + Медиа URL + 31006 + 31006 + 0 + + + core + public_editors + js_template_insert_email + Insert Email + Вставить e-mail + 31006 + 31006 + 0 + + + core + public_editors + js_template_email_me + Email me + Пишите мне + 31006 + 31006 + 0 + + + core + public_editors + js_template_email_url + Email Address + Адрес электронной почты + 31006 + 31006 + 0 + + + core + public_editors + js_template_insert_img + Insert Image + Вставить изображение + 31006 + 31006 + 0 + + + core + public_editors + js_template_imageurl + Image URL + URL для изображения + 31006 + 31006 + 0 + + + core + public_editors + js_template_insert_link + Insert Link + Вставить ссылку + 31006 + 31006 + 0 + + + core + public_editors + js_template_default + My link + Моя ссылка + 31006 + 31006 + 0 + + + core + public_editors + js_template_link + Link text + Текст ссылки + 31006 + 31006 + 0 + + + core + public_editors + js_template_url + URL + URL + 31006 + 31006 0 @@ -817,18 +801,28 @@ email_sent_txt Thanks, the email has been successfully sent to Спасибо, письмо успешно отправлено - 30005 - + 31006 + 31006 0 core public_emails - email_sent - The email has been sent - Письмо отправлено - 30005 - + member_address_title + Members Email Address + E-mail адрес пользователей + 31006 + 31006 + 0 + + + core + public_emails + msg_txt + Note: By using this form, the recipient will be able to view your email address + Примечание: получатель письма узнает ваш e-mail адрес + 31006 + 31006 0 @@ -837,8 +831,8 @@ show_address_text Для отправки e-mail письма пользователю воспользуйтесь размещенной ниже ссылкой. IPB не показывает e-mail адреса для защиты от спам-ботов. - 30005 - + 31006 + 31006 0 @@ -847,18 +841,288 @@ send_email_to Send an email to Отправка письма для - 30005 - + 31006 + 31006 0 core public_emails - email_recepient - Recipient - Адресат - 30005 - + title + Send a page to a friend + Отправить ссылку на страницу другу + 31006 + 31006 + 0 + + + core + public_emails + redirect + The email has been sent + Письмо отправлено + 31006 + 31006 + 0 + + + core + public_emails + subject + Subject + Тема + 31006 + 31006 + 0 + + + core + public_emails + message + Message + Сообщение + 31006 + 31006 + 0 + + + core + public_emails + to_email + Send to (Email Address): + Отправить на e-mail: + 31006 + 31006 + 0 + + + core + public_emails + submit_send + Send Email + Отправить + 31006 + 31006 + 0 + + + core + public_emails + to_name + + Кому (имя друга): + 31006 + 31006 + 0 + + + core + public_emails + send_lang + Send this email in + Язык письма + 31006 + 31006 + 0 + + + core + public_emails + no_subject + You must enter a subject for the email + Необходимо ввести тему письма + 31006 + 31006 + 0 + + + core + public_emails + gen_error + You are not logged in or able to send emails + Для использования этой возможности вы должны быть авторизованы и иметь необходимые права доступа + 31006 + 31006 + 0 + + + core + public_emails + exceeded_flood + The mail could not be sent because you have already sent an email within the last %s minutes + Вы не можете отправлять более одного письма в течение %s минут + 31006 + 31006 + 0 + + + core + public_emails + no_message + You must enter some content for the email + Вы должны ввести текст письма + 31006 + 31006 + 0 + + + core + public_emails + exceeded_quota + The mail could not be sent because you have exceeded your alloted quota of %s emails a day + Количество разрешенных писем в день - %s. Вы исчерпали данный лимит. + 31006 + 31006 + 0 + + + core + public_emails + imp_text + IMPORTANT: To prevent malicious use, all emails sent via this form are logged and the contents recorded and available to the administrators. DO NOT email user names, passwords or any personal details. + ВАЖНО: для предотвращения возможного неправомерного использования данной возможности, все письма, отправленные через эту форму заносятся в специальный журнал, доступный администрации форума. НИ В КОЕМ случае не отправляйте пароли, логины или любую другую личную информацию. + 31006 + 31006 + 0 + + + core + public_emails + forum_langbit + Forum + Форум + 31006 + 31006 + 0 + + + core + public_emails + topic_langbit + Topic + Тема + 31006 + 31006 + 0 + + + core + public_emails + emailing_prefix + Emailing + Письмо + 31006 + 31006 + 0 + + + core + public_emails + email_member + Email Member + Отправить письмо + 31006 + 31006 + 0 + + + core + public_emails + tweet_ok + Your tweet was successful! + Tweet отправлен! + 31006 + 31006 + 0 + + + core + public_emails + twitter_chrs_left + chars left. Shortened URL will be auto-added + символов осталось. Сокращение ссылок будет применено автоматически. + 31006 + 31006 + 0 + + + core + public_emails + twitter_share + Share + Поделиться + 31006 + 31006 + 0 + + + core + public_emails + share_via_twitter + Share Via Twitter + Поделиться через Twitter + 31006 + 31006 + 0 + + + core + public_emails + email_sent + The email has been sent + Письмо отправлено + 31006 + 31006 + 0 + + + core + public_emails + facebook_share + Share + Поделиться + 31006 + 31006 + 0 + + + core + public_emails + share_via_facebook + Share Via Facebook + Поделиться через Facebook + 31006 + 31006 + 0 + + + core + public_emails + fbc_comment_desc + You can optionally leave a comment below + Вы можете оставить комментарий + 31006 + 31006 + 0 + + + core + public_emails + facebook_post_ok + The link was posted successfully + Ссылка была отправлена + 31006 + 31006 + 0 + + + core + public_emails + err_reg_code + The Captcha input was incorrect. Please try again. + Вы не правильно ввели защитный код. Пожалуйста попробуйте снова. + 31006 + 31006 0 @@ -867,8 +1131,18 @@ email_friend Use this feature to let a friend know about this topic! Используйте эту возможность для отправки ссылки на эту тему друзьям - 30005 - + 31006 + 31006 + 0 + + + core + public_emails + email_recepient + Recipient + Адресат + 31006 + 31006 0 @@ -877,505 +1151,330 @@ email_details Enter the email details Введите e-mail данные - 30005 - + 31006 + 31006 0 core public_email_content - header - - - 30005 - + email_member + , + +<#FROM_NAME#> has sent you this email from <#BOARD_ADDRESS#>. + + +<#MESSAGE#> + +--------------------------------------------------- +Please note that <#BOARD_NAME#> has no control over the +contents of this message. +--------------------------------------------------- + +]]> + + +<#MEMBER_NAME#>, + +<#FROM_NAME#> отправил вам письмо. + +--------------------------------------------------- + <#MESSAGE#> +--------------------------------------------------- + +Имейте в виду, что форум не несет ответственность за содержание данного письма. +]]> + 31006 + 31006 0 core public_email_content - footer + subject__complete_reg + Account: %s, validated at %s + Учетная запись: %s, подтверждена %s + 31006 + 31006 + 0 + + + core + public_email_content + complete_reg team. -<#BOARD_ADDRESS#> +An administrator has accepted your registration request or email address change at <#BOARD_NAME#>. You may now log in with +your chosen details and access your full user account at <#BOARD_ADDRESS#> ]]> - , <#BOARD_ADDRESS#> ]]> - 30005 - 30005 + . + +Поздравляем! + +Администратор успешно активировал вашу регистрацию (или смену e-mail адреса). +Теперь вы можете войти на форум и пользоваться всеми возможностями полноценного пользователя. + +Адрес форума: <#BOARD_ADDRESS#> +]]> + 31006 + 31006 0 core public_email_content - new_comment_request - , - -<#COMMENT_NAME#> has left you a comment that requires your approval. - -As you've chosen to approve all new comments the new comment will not appear on your -profile until it's been approved. - -Log in and then manage your comments: <#LINK#> -]]> - , <#COMMENT_NAME#> оставил комментарий в вашем профиле. Так как у вас включена премодерация комментариев, для того, чтобы он появился, необходимо вам его активировать, в противном случае удалить. Сделать это можно по ссылке: <#LINK#>]]> - 30005 - 30005 + subject__subs_no_post + %s replied to %s]]> + %s ответил в тему %s]]> + 31006 + 31006 0 core public_email_content - new_friend_request - , - -<#FRIEND_NAME#> wants to be your friend! - -This message has been sent because <#FRIEND_NAME#> has added you to their friends -list. As you've chosen to approve all friend requests, you will need to visit your -friends list and approve them. - -Log in and then manage your friends: <#LINK#> -]]> - , <#FRIEND_NAME#> хочет стать вашим другом! Так как у вас включена проверка желающих стать вашими друзьями, то для того, чтобы он появился в вашем списке друзей, его запрос необходимо подтвердить (или отклонить). Сделать это можно по ссылке: <#LINK#>]]> - 30005 - 30005 - 0 - - - core - public_email_content - subject__new_friend_added - Friend Added - Друг добавлен - 30005 - 30005 - 0 - - - core - public_email_content - new_friend_added - , - -<#FRIEND_NAME#> has successfully added you to their friends list. - -Manage your friends: <#LINK#> -]]> - , <#FRIEND_NAME#> стал вашим другом. -Управление списком ваших друзей: <#LINK#>]]> - 30005 - 30005 - 0 - - - core - public_email_content - subject__new_comment_request - New Comment Pending Approval - Новый комментарий ожидает подтверждения - 30005 - 30005 - 0 - - - core - public_email_content - personal_convo_new_convo + subs_no_post , -<#POSTER#> has sent you a new personal conversation entitled "<#TITLE#>". +<#POSTER#> has just posted a reply to a topic that you have subscribed to titled "<#TITLE#>". -<#POSTER#> said: -====================================================================== -<#TEXT#> -====================================================================== +The topic can be found here: +<#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost -PLEASE DO NOT REPLY DIRECTLY TO THIS EMAIL! -You can reply to this personal conversation by following the link below: +If you have configured in your control panel to receive immediate topic reply notifications, you may receive an +email for each reply made to this topic. Otherwise, only 1 email is sent per board visit for each subscribed topic. +This is to limit the amount of mail that is sent to your inbox. -<#BOARD_ADDRESS#><#LINK#> +Unsubscribing: +-------------- + +You can unsubscribe at any time by logging into your control panel and clicking on the "Manage Watched Topics" link in the "Forums" tab. ]]> - , <#POSTER#> отправил вам сообщение с заголовком "<#TITLE#>". -<#POSTER#> сказал: ====================================================================== -<#TEXT#> -Вы можете просмотреть беседу с ним, пройдя по указанной ниже ссылке: -<#BOARD_ADDRESS#><#LINK#> + , <#POSTER#> опубликовал ответ в тему "<#TITLE#>", на которую вы подписаны. + +---------------------------------------------------------------------- +<#POST#> +---------------------------------------------------------------------- + +Адрес темы: <#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost + +В теме могут быть и другие ответы, однако вами задано, чтобы приходило только одно письмо с уведомлением (на каждую тему) между вашими визитами на форум. + +Отписаться: +-------------- +Вы можете управлять своими подписками в боковом блоке «Подписки» вкладки «Обсуждения» на форуме. ]]> - 30005 - 30005 + 31006 + 31006 0 core public_email_content - subject__personal_convo_new_convo - You have been sent a new personal conversation - Вы успешно начали новую беседу, отправив сообщение - 30005 - 30005 - 0 - - - core - public_email_content - subject__new_friend_request - New Friend Request - Запрос на дружбу - 30005 - 30005 - 0 - - - core - public_email_content - subject__new_friend_approved - New Friend Approved - Новый друг активирован - 30005 - 30005 - 0 - - - core - public_email_content - new_friend_approved - , - -<#FRIEND_NAME#> has approved your friend request! - -Log in and then manage your friends: <#LINK#> -]]> - , <#FRIEND_NAME#> принял предложение стать вашим другом! Управление вашим списком друзей по ссылке: <#LINK#>]]> - 30005 - 30005 - 0 - - - core - public_email_content - account_created + subs_with_post , -Your account has been created successfully at <#BOARD_NAME#>. +<#POSTER#> has just posted a reply to a topic that you have subscribed to titled "<#TITLE#>". -If we were waiting on a parental consent form, this means the form has been received and documented. - -Your details are as follows: - -Username: <#NAME#> -Email Address: <#EMAIL#> -Password: <#PASSWORD#> - -Please be aware that we do not store a plain text copy of your password, and you can change your password at any time through your control panel on the site. - -Visit this link to join into our discussions! - -<#BOARD_ADDRESS#> -]]> - - -<#NAME#>, Ваша учетная запись успешно создана. Если мы ждали от вас «разрешения от родителей», это сообщение означает, что оно было получено и сохранено. Ваши данные следующие. - -Имя пользователя: <#NAME#> -Пароль: <#PASSWORD#> -E-mail: <#EMAIL#> - -Пожалуйста, запомните, что мы не храним ваш пароль, но вы можете его изменить в любой время в ваших личных данных. - -Удачного общения! - -! <#BOARD_ADDRESS#> -]]> - 30005 - 30005 - 0 - - - core - public_email_content - subject__account_created - Your account has been created - Ваша учетная запись успешно создана - 30005 - 30005 - 0 - - - core - public_email_content - error_log_notification - -The error message is: <#MESSAGE#> -The user who saw this error is: <#VIEWER#> -The IP address of this user is: <#IP_ADDRESS#> - -Please login to your Admin Control Panel to use the error log viewer tool for further information. - -<#BOARD_ADDRESS#> -]]> - -Сообщение: <#MESSAGE#> -Пользователь, кто обнаружил ошибку: <#VIEWER#> -Его IP-адрес: <#IP_ADDRESS#> - -Более подробную информация вы можете получить, просмотрев журнал error_log. - -<#BOARD_ADDRESS#> -]]> - 30005 - 30005 - 0 - - - core - public_email_content - subject__error_log_notification - An error has been generated on your site - На вашем форуме возникла ошибка - 30005 - 30005 - 0 - - - core - public_email_content - personal_convo_invite - , - -<#POSTER#> has added you to their personal conversation entitled "<#TITLE#>". - -You can read this personal conversation by following the link below: - -<#BOARD_ADDRESS#><#LINK#> -]]> - , <#POSTER#> добавил вас к личной беседе "<#TITLE#>". -Вы можете прочитать диалог по указанной ниже ссылке: -<#BOARD_ADDRESS#><#LINK#> -]]> - 30005 - 30005 - 0 - - - core - public_email_content - subject__personal_convo_invite - You have been added to a personal conversation - Вы успешно добавлены к личной беседе - 30005 - 30005 - 0 - - - core - public_email_content - personal_convo_new_reply - , - -<#POSTER#> has replied to a personal conversation entitled "<#TITLE#>". - -<#POSTER#> said: -====================================================================== -<#TEXT#> -====================================================================== - -PLEASE DO NOT REPLY DIRECTLY TO THIS EMAIL! -You can reply to this personal conversation by following the link below: - -<#BOARD_ADDRESS#><#LINK#> -]]> - , <#POSTER#> ответил в личную беседу "<#TITLE#>". -<#POSTER#> сказал: -<#TEXT#> -Вы можете просмотреть полный диалог беседы по указанной ниже ссылке: -<#BOARD_ADDRESS#><#LINK#> -]]> - 30005 - 30005 - 0 - - - core - public_email_content - subject__personal_convo_new_reply - A reply has been made to a personal conversation - В личной беседе появился новый ответ - 30005 - 30005 - 0 - - - core - public_email_content - new_post_queue_notify - . - -A new post has been entered into the moderation queue and is awaiting -approval. - ----------------------------------- -Topic: <#TOPIC#> -Forum: <#FORUM#> -Author: <#POSTER#> -Time: <#DATE#> -Manage Queue: <#LINK#> ----------------------------------- +---------------------------------------------------------------------- <#POST#> ----------------------------------- +---------------------------------------------------------------------- -If you no longer require notification, you can stop these emails by simply -removing your email address from the forum settings options. +The topic can be found here: +<#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost -<#BOARD_ADDRESS#> + +If you have configured in your control panel to receive immediate topic reply notifications, you may receive an +email for each reply made to this topic. Otherwise, only 1 email is sent per board visit for each subscribed topic. +This is to limit the amount of mail that is sent to your inbox. + +Unsubscribing: +-------------- + +You can unsubscribe at any time by logging into your control panel and clicking on the "Manage Watched Topics" link in the "Forums" tab. ]]> - - -На форуме появилось новое сообщение для проверки и публикации/удаления модератором. - -Тема: <#TOPIC#> -Форум: <#FORUM#> -Автор: <#POSTER#> -Время: <#DATE#> - -Для совершения действий с сообщением перейдите по ссылке: <#LINK#> ----------------------------------- -Если вы больше не хотите получать такие уведомления, удалите ваш e-mail адрес в настройках форума. - -Адрес форума: <#BOARD_ADDRESS#>]]> - 30005 - 30005 - 0 - - - core - public_email_content - subject__new_post_queue_notify - New Post Awaiting Approval - Новое сообщение, требующее активации - 30005 - 30005 - 0 - - - core - public_email_content - new_topic_queue_notify - . - -A new topic has been entered into the moderation queue and is awaiting -approval. - ----------------------------------- -Topic: <#TOPIC#> -Forum: <#FORUM#> -Author: <#POSTER#> -Time: <#DATE#> -Manage Queue: <#LINK#> ----------------------------------- -<#POST#> ----------------------------------- - -If you no longer require notification, you can stop these emails by simply -removing your email address from the forum settings options. - -<#BOARD_ADDRESS#> - -]]> - - -На форуме появилось новая тема для проверки и публикации/удаления модератором. - -Тема: <#TOPIC#> -Форум: <#FORUM#> -Автор: <#POSTER#> -Время: <#DATE#> - -Для совершения действий с темой перейдите по ссылке: <#LINK#> ----------------------------------- -Если вы больше не хотите получать такие уведомления, удалите ваш e-mail адрес в настройках форума. - -Адрес форума: <#BOARD_ADDRESS#> + , <#POSTER#> опубликовал ответ в тему "<#TITLE#>", на которую вы подписаны. + +---------------------------------------------------------------------- +<#POST#> +---------------------------------------------------------------------- + +Адрес темы: <#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost + +Если у вас включена немедленная доставка уведомлений о новых сообщениях в этой теме, вы будете получать письмо с уведомлением на каждый новый ответ в тему. В противном случае только одно такое письмо со всеми новыми ответами будет приходить между каждым вашим визитом на форум. + +Вы можете управлять своими подписками в боковом блоке «Подписки» вкладки «Обсуждения» на форуме. ]]> - 30005 - 30005 + 31006 + 31006 0 core public_email_content - subject__new_topic_queue_notify - New Topic Awaiting Approval - Новая тема, требующая активации - 30005 - 30005 + subject__subs_new_topic + %s posted topic %s]]> + %s создал тему %s]]> + 31006 + 31006 0 core public_email_content - new_comment_added - , + subs_new_topic + , -<#COMMENT_NAME#> has left you a comment on your profile. +<#POSTER#> has just posted a new topic entitled "<#TITLE#>" in forum "<#FORUM#>". -Manage your comments: <#LINK#> +---------------------------------------------------------------------- +<#POST#> +---------------------------------------------------------------------- + +The topic can be found here: +<#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#> + +Please note that if you wish to get email notification of any replies to this topic, you will have to click on the +"Track this Topic" link shown on the topic page, or by visiting the link below: +<#BOARD_ADDRESS#>?app=core&module=usercp&tab=forums&area=watch&watch=topic&do=list&tid=<#TOPIC_ID#> + + +Unsubscribing: +-------------- + +You can unsubscribe at any time by logging into your control panel and clicking on the "Manage Watched Forums" link in the "Forums" tab. +If you are not subscribed to any forums and wish to stop receiving notification, uncheck the setting +"Send me any updates sent by the board administrator" found in 'My Settings' under 'General Settings' in the "Settings" tab. ]]> - , - -<#COMMENT_NAME#> оставил комментарий в вашем профиле. - -Управление такими комментариями по ссылке: <#LINK#> ]]> - 30005 - 30005 + , <#POSTER#> открыл новую тему "<#TITLE#>" в разделе "<#FORUM#>". + +---------------------------------------------------------------------- +<#POST#> +---------------------------------------------------------------------- + +Адрес темы: <#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#> + +Имейте в виду, что вы можете подписаться на уведомления о новых ответах в этой теме. Это можно сделать как из самой темы, так и нажав на указанную ниже ссылку: <#BOARD_ADDRESS#>?app=core&module=usercp&tab=forums&area=watch&watch=topic&do=list&tid=<#TOPIC_ID#> + +Отписаться: +-------------- +Вы можете управлять своими подписками в боковом блоке «Подписки» вкладки «Обсуждения» на форуме. +Если вы не хотите больше получать никаких уведомлений с форума просто отключите соответствующую опцию « Сообщать мне обо всех изменениях, проводимых администратором форума.» в вашем профиле в меню «Общие настройки». +]]> + 31006 + 31006 0 core public_email_content - subject__new_comment_added - New Comment - Новый комментарий - 30005 - 30005 + forward_page + + + +<#THE_MESSAGE#> + +--------------------------------------------------- +Please note that <#BOARD_NAME#> has no control over the +contents of this message. +--------------------------------------------------- +]]> + + +<#TO_NAME#> + +--------------------------------------------------- +<#THE_MESSAGE#> +--------------------------------------------------- + +Имейте в виду, что форум не несет ответственность за содержание данного письма. +]]> + 31006 + 31006 0 core public_email_content - reg_validate + subject__subs_with_post + %s replied to %s]]> + %s ответил в тему %s]]> + 31006 + 31006 + 0 + + + core + public_email_content + lost_pass_email_pass , This email has been sent from <#BOARD_ADDRESS#>. -You have received this email because this email address -was used during registration for our forums. -If you did not register at our forums, please disregard this -email. You do not need to unsubscribe or take any further action. +This email completes your lost password request. ------------------------------------------------ -Activation Instructions +YOUR NEW PASSWORD ------------------------------------------------ -Thank you for registering. -We require that you "validate" your registration to ensure that -the email address you entered was correct. This protects against +Your username is: <#USERNAME#> +Your email address is: <#EMAIL#> +Your new password is: <#PASSWORD#> + +Log in here: <#LOGIN#> + +Please be careful to use the correct information (username or email address) to login to the site. + +------------------------------------------------ +CHANGING YOUR PASSWORD +------------------------------------------------ + +Once you've logged in, you can visit your User CP to +change your password. + +User CP: <#THE_LINK#> + +]]> + + +<#NAME#>, Вы создали новый пароль. + +------------------------------------------------ НОВЫЙ ПАРОЛЬ +------------------------------------------------ +Имя пользователя: <#USERNAME#> +Пароль: <#PASSWORD#> +E-mail: <#EMAIL#> + +Войти на форум с новыми данными: <#LOGIN#> + +------------------------------------------------ ИЗМЕНЕНИЕ ПАРОЛЯ +---------------------------------------- +После входа вы можете изменить свой пароль в своих личных данных: <#THE_LINK#> +]]> + 31006 + 31006 + 0 + + + core + public_email_content + newemail + , +This email has been sent from <#BOARD_ADDRESS#>. + +You have received this email because you requested an +email address change. + +------------------------------------------------ +Activation Instructions Below +------------------------------------------------ + +We require that you "validate" your email address change to ensure that +you instigated this action. This protects against unwanted spam and malicious abuse. To activate your account, simply click on the following link: @@ -1403,278 +1502,115 @@ Validation Key: <#CODE#> Please copy and paste, or type those numbers into the corresponding fields in the form. -If you still cannot validate your account, it's possible that the account has been removed. -If this is the case, please contact an administrator to rectify the problem. +Once the activation is complete, you may need to log back in to update your member group +permissions. + +------------------------------------------------ +Help! I get an error! +------------------------------------------------ + +If you cannot re-activate your account, it's possible that the account has been removed or you +are in the process of another activation, such as registering or changing your registered email address. +If this is the case, then please complete the previous activation. +If the error persists, please contact an administrator to rectify the problem. -Thank you for registering and enjoy your stay! ]]> - , - -В форуме по адресу <#BOARD_ADDRESS#> появилась регистрационная запись, -в которой был указал ваш электронный адрес (e-mail). - -Если вы не понимаете, о чем идет речь — просто проигнорируйте это сообщение! - -Если же именно вы решили зарегистрироваться в форуме по адресу <#BOARD_ADDRESS#>, -то вам следует подтвердить свою регистрацию и тем самым активировать вашу учетную запись. -Подтверждение регистрации производится один раз и необходимо для повышения безопасности форума и защиты его от злоумышленников. -Чтобы активировать вашу учетную запись, необходимо перейти по ссылке: -<#THE_LINK#> -Активация произойдет автоматически. - -Если таким способом активировать учетную запись не удалось, попробуйте сделать это вручную. Пройдите по ссылке -<#MAN_LINK#> -и введите указанные ниже ID пользователя и код активации (не пароль!) в соответствующие поля. - -=================================== -ID пользователя: <#ID#> -Код активации: <#CODE#> -=================================== - -После активации учетной записи вы сможете войти в форум, используя выбранные вами имя пользователя (login) и пароль. С этого момента вы сможете оставлять сообщения. - -Пожалуйста, не забудьте заполнить свои личные данные. - -Благодарим за регистрацию!]]> - 30005 - 30005 + ! + +Вы получили это письмо, потому что выслали запрос на изменение E-mail. + +------------------------------------------------ +Инструкция по активации +------------------------------------------------ + +Вам необходимо будет активировать изменение e-mail адреса, это необходимо для проверки того, что это действие сделали именно вы. Также это требуется для защиты от нежелательных злоупотреблений и спама. + +Для активации учетной записи зайдите по ссылке: + +<#THE_LINK#> + +------------------------------------------------ +Не сработало? +------------------------------------------------ + +Если подтвердить вам не удалось, зайдите по ссылке + +<#MAN_LINK#> + +и введите указанные ниже ID пользователя и код активации (не пароль!) в соответствующие поля. + +=================================== +ID пользователя: <#ID#> +Код активации: <#CODE#> +=================================== + +Если ничего не получается, свяжитесь с администратором форума!]]> + 31006 + 31006 0 core public_email_content - send_text - + admin_newuser + +------------------------------------------------ +Log in name: <#LOG_IN_NAME#> +Display name: <#DISPLAY_NAME#> +Email: <#EMAIL#> +IP Address: <#IP#> +Date: <#DATE#> +------------------------------------------------ + +You can turn off user notification in the Admin Control Panel + +Have a super day! ]]> - - -Сообщаю, что вам будет интересно прочитать указанную по ссылке страницу: -<#THE LINK#> ]]> - 30005 - 30005 + зарегистрировался <#DATE#> + +(вы можете отключить подобные уведомления в админцентре)]]> + 31006 + 31006 0 core public_email_content - digest_topic_daily - , + possibleSpammer + " for today. +Hello, ----------------------------------------------------------------------- +You have received this email because you chose to be notified when a possible spammer is flagged. +Name: <#MEMBER_NAME#> +Email: <#EMAIL#> +IP: <#IP#> +Registered: <#DATE#> +You can view this user here: <#LINK#> -<#CONTENT#> - - - - ----------------------------------------------------------------------- - -The topic can be found here: -<#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost - -Unsubscribing: --------------- - -You can unsubscribe at any time by logging into your control panel and clicking on the "Manage Watched Topics" link in the "Forums" tab. +Have a super day! ]]> - , - -Это письмо содержит обзор сообщений темы «<#TITLE#>» за сегодня: - ----------------------------------------------------------------------- -<#CONTENT#> ----------------------------------------------------------------------- - -Адрес темы: <#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost - -Отписаться: --------------- -Вы можете управлять своими подписками в боковом блоке «Подписки» вкладки «Обсуждения» на форуме. -]]> - 30005 - 30005 - 0 - - - core - public_email_content - subject__digest_topic_daily - Your daily new posts digest - Обзор новых сообщений за день - 30005 - 30005 - 0 - - - core - public_email_content - digest_topic_weekly - , - -This your weekly new topics digest! - ----------------------------------------------------------------------- - - - -<#CONTENT#> - - - - ----------------------------------------------------------------------- - -The forum can be found here: -<#BOARD_ADDRESS#>?showforum=<#FORUM_ID#> - -Unsubscribing: --------------- - -You can unsubscribe at any time by logging into your control panel and clicking on the "Manage Watched Forums" link in the "Forums" tab. -]]> - , - -Это письмо содержит обзор сообщений темы «<#TITLE#>» за последнюю неделю: - ----------------------------------------------------------------------- -<#CONTENT#> ----------------------------------------------------------------------- - -Адрес темы: <#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost - -Отписаться: --------------- -Вы можете управлять своими подписками в боковом блоке «Подписки» вкладки «Обсуждения» на форуме.]]> - 30005 - 30005 - 0 - - - core - public_email_content - subject__digest_topic_weekly - Your weekly new posts digest - Обзор новых сообщений за неделю - 30005 - 30005 - 0 - - - core - public_email_content - digest_forum_daily - , - -This your daily new topics digest! - ----------------------------------------------------------------------- - - - -<#CONTENT#> - - - - ----------------------------------------------------------------------- - -The forum can be found here: -<#BOARD_ADDRESS#>?showforum=<#FORUM_ID#> - -Unsubscribing: --------------- - -You can unsubscribe at any time by logging into your control panel and clicking on the "Manage Watched Forums" link in the "Forums" tab. -]]> - , - -Это письмо содержит обзор новых тем за сегодня: - ----------------------------------------------------------------------- -<#CONTENT#> ----------------------------------------------------------------------- - -Раздел форума, на который вы подписались, по ссылке: -<#BOARD_ADDRESS#>?showforum=<#FORUM_ID#> - -Отписаться: --------------- -Вы можете управлять своими подписками в боковом блоке «Подписки» вкладки «Обсуждения» на форуме.]]> - 30005 - 30005 - 0 - - - core - public_email_content - subject__digest_forum_daily - Your daily new topics digest - Обзор новых тем за день - 30005 - 30005 - 0 - - - core - public_email_content - digest_forum_weekly - , - -This is the digest of this weeks posts in forum <#FORUM_NAME#>. - ----------------------------------------------------------------------- - - - -<#CONTENT#> - - - - ----------------------------------------------------------------------- - -The forum can be found here: -<#BOARD_ADDRESS#>?showforum=<#FORUM_ID#> - -Unsubscribing: --------------- - -You can unsubscribe at any time by logging into your control panel and clicking on the "Manage Watched Topics" link in the "Forums" tab. -]]> - , - -Это письмо содержит обзор новых тем за последнюю неделю: - ----------------------------------------------------------------------- -<#CONTENT#> ----------------------------------------------------------------------- - -Раздел форума, на который вы подписались, по ссылке: -<#BOARD_ADDRESS#>?showforum=<#FORUM_ID#> - -Отписаться: --------------- -Вы можете управлять своими подписками в боковом блоке «Подписки» вкладки «Обсуждения» на форуме.]]> - 30005 - 30005 - 0 - - - core - public_email_content - subject__digest_forum_weekly - Your weekly new topics digest - Обзор новых тем за неделю - 30005 - 30005 + +E-mail: <#EMAIL#> +IP-адрес: <#IP#> +Дата регистрации: <#DATE#> + +Просмотреть другую информацию и возможные действия по пользователю можно по ссылке: +<#LINK#>]]> + 31006 + 31006 0 @@ -1740,116 +1676,73 @@ If the error persists, please contact an administrator to rectify the problem. IP address of sender: <#IP_ADDRESS#> ]]> - ! - -Вы получили это письмо, поскольку был сделан запрос на восстановление вашего пароля в форуме «<#BOARD_NAME #>». -Если вы не делали такой запрос, проигнорируйте и удалите это сообщение. - - -Если же вы в самом деле забыли свой пароль, заново активируйте вашу учетную запись. - -Чтобы активировать вашу учетную запись, необходимо перейти по ссылке -<#THE_LINK#> -Активация произойдет автоматически. - -Если таким способом сбросить пароль не удалось, попробуйте активировать вручную. Пройдите по ссылке -<#MAN_LINK#> -и введите указанные ниже ID пользователя и код активации (не пароль!) в соответствующие поля. - -=================================== -ID пользователя: <#ID#> -Код активации: <#CODE#> -=================================== - -После активации учетной записи следуйте инструкциям по восстановлению пароля, которые будет сообщать вам форум. - -Если ничего не получается, свяжитесь с администратором форума! + ! + +Вы получили это письмо, поскольку был сделан запрос на восстановление вашего пароля в форуме «<#BOARD_NAME #>». +Если вы не делали такой запрос, проигнорируйте и удалите это сообщение. + + +Если же вы в самом деле забыли свой пароль, заново активируйте вашу учетную запись. + +Чтобы активировать вашу учетную запись, необходимо перейти по ссылке +<#THE_LINK#> +Активация произойдет автоматически. + +Если таким способом сбросить пароль не удалось, попробуйте активировать вручную. Пройдите по ссылке +<#MAN_LINK#> +и введите указанные ниже ID пользователя и код активации (не пароль!) в соответствующие поля. + +=================================== +ID пользователя: <#ID#> +Код активации: <#CODE#> +=================================== + +После активации учетной записи следуйте инструкциям по восстановлению пароля, которые будет сообщать вам форум. + +Если ничего не получается, свяжитесь с администратором форума! (IP адрес отправителя: <#IP_ADDRESS#>)]]> - 30005 - 30005 + 31006 + 31006 0 core public_email_content - possibleSpammer - send_text + -Hello, +From, -You have received this email because you chose to be notified when a possible spammer is flagged. - -Name: <#MEMBER_NAME#> -Email: <#EMAIL#> -IP: <#IP#> -Registered: <#DATE#> - -You can view this user here: <#LINK#> - -Have a super day! +<#USER NAME#> ]]> - -E-mail: <#EMAIL#> -IP-адрес: <#IP#> -Дата регистрации: <#DATE#> - -Просмотреть другую информацию и возможные действия по пользователю можно по ссылке: -<#LINK#>]]> - 30005 - 30005 + + +Сообщаю, что вам будет интересно прочитать указанную по ссылке страницу: +<#THE LINK#> ]]> + 31006 + 31006 0 core public_email_content - admin_newuser - -Display name: <#DISPLAY_NAME#> -Email: <#EMAIL#> -IP Address: <#IP#> -Date: <#DATE#> ------------------------------------------------- - -You can turn off user notification in the Admin Control Panel - -Have a super day! -]]> - зарегистрировался <#DATE#> - -(вы можете отключить подобные уведомления в админцентре)]]> - 30005 - 30005 - 0 - - - core - public_email_content - newemail + reg_validate , This email has been sent from <#BOARD_ADDRESS#>. -You have received this email because you requested an -email address change. +You have received this email because this email address +was used during registration for our forums. +If you did not register at our forums, please disregard this +email. You do not need to unsubscribe or take any further action. ------------------------------------------------ -Activation Instructions Below +Activation Instructions ------------------------------------------------ -We require that you "validate" your email address change to ensure that -you instigated this action. This protects against +Thank you for registering. +We require that you "validate" your registration to ensure that +the email address you entered was correct. This protects against unwanted spam and malicious abuse. To activate your account, simply click on the following link: @@ -1877,2934 +1770,913 @@ Validation Key: <#CODE#> Please copy and paste, or type those numbers into the corresponding fields in the form. -Once the activation is complete, you may need to log back in to update your member group -permissions. - ------------------------------------------------- -Help! I get an error! ------------------------------------------------- - -If you cannot re-activate your account, it's possible that the account has been removed or you -are in the process of another activation, such as registering or changing your registered email address. -If this is the case, then please complete the previous activation. -If the error persists, please contact an administrator to rectify the problem. +If you still cannot validate your account, it's possible that the account has been removed. +If this is the case, please contact an administrator to rectify the problem. +Thank you for registering and enjoy your stay! ]]> - ! - -Вы получили это письмо, потому что выслали запрос на изменение E-mail. - ------------------------------------------------- -Инструкция по активации ------------------------------------------------- - -Вам необходимо будет активировать изменение e-mail адреса, это необходимо для проверки того, что это действие сделали именно вы. Также это требуется для защиты от нежелательных злоупотреблений и спама. - -Для активации учетной записи зайдите по ссылке: - -<#THE_LINK#> - ------------------------------------------------- -Не сработало? ------------------------------------------------- - -Если подтвердить вам не удалось, зайдите по ссылке - -<#MAN_LINK#> - -и введите указанные ниже ID пользователя и код активации (не пароль!) в соответствующие поля. - -=================================== -ID пользователя: <#ID#> -Код активации: <#CODE#> -=================================== - -Если ничего не получается, свяжитесь с администратором форума!]]> - 30005 - 30005 + , + +В форуме по адресу <#BOARD_ADDRESS#> появилась регистрационная запись, +в которой был указал ваш электронный адрес (e-mail). + +Если вы не понимаете, о чем идет речь — просто проигнорируйте это сообщение! + +Если же именно вы решили зарегистрироваться в форуме по адресу <#BOARD_ADDRESS#>, +то вам следует подтвердить свою регистрацию и тем самым активировать вашу учетную запись. +Подтверждение регистрации производится один раз и необходимо для повышения безопасности форума и защиты его от злоумышленников. +Чтобы активировать вашу учетную запись, необходимо перейти по ссылке: +<#THE_LINK#> +Активация произойдет автоматически. + +Если таким способом активировать учетную запись не удалось, попробуйте сделать это вручную. Пройдите по ссылке +<#MAN_LINK#> +и введите указанные ниже ID пользователя и код активации (не пароль!) в соответствующие поля. + +=================================== +ID пользователя: <#ID#> +Код активации: <#CODE#> +=================================== + +После активации учетной записи вы сможете войти в форум, используя выбранные вами имя пользователя (login) и пароль. С этого момента вы сможете оставлять сообщения. + +Пожалуйста, не забудьте заполнить свои личные данные. + +Благодарим за регистрацию!]]> + 31006 + 31006 0 core public_email_content - subject__subs_with_post - ] New Reply Notification]]> - ] Уведомление о новом ответе]]> - 30005 - 30005 + subject__digest_topic_daily + Your daily new posts digest + Обзор новых сообщений за день + 31006 + 31006 0 core public_email_content - lost_pass_email_pass - , -This email has been sent from <#BOARD_ADDRESS#>. - -This email completes your lost password request. - ------------------------------------------------- -YOUR NEW PASSWORD ------------------------------------------------- - -Your username is: <#USERNAME#> -Your email address is: <#EMAIL#> -Your new password is: <#PASSWORD#> - -Log in here: <#LOGIN#> - -Please be careful to use the correct information (username or email address) to login to the site. - ------------------------------------------------- -CHANGING YOUR PASSWORD ------------------------------------------------- - -Once you've logged in, you can visit your User CP to -change your password. - -User CP: <#THE_LINK#> - -]]> - - -<#NAME#>, Вы создали новый пароль. - ------------------------------------------------- НОВЫЙ ПАРОЛЬ ------------------------------------------------- -Имя пользователя: <#USERNAME#> -Пароль: <#PASSWORD#> -E-mail: <#EMAIL#> - -Войти на форум с новыми данными: <#LOGIN#> - ------------------------------------------------- ИЗМЕНЕНИЕ ПАРОЛЯ ----------------------------------------- -После входа вы можете изменить свой пароль в своих личных данных: <#THE_LINK#> -]]> - 30005 - 30005 - 0 - - - core - public_email_content - forward_page - - - -<#THE_MESSAGE#> - ---------------------------------------------------- -Please note that <#BOARD_NAME#> has no control over the -contents of this message. ---------------------------------------------------- -]]> - - -<#TO_NAME#> - ---------------------------------------------------- -<#THE_MESSAGE#> ---------------------------------------------------- - -Имейте в виду, что форум не несет ответственность за содержание данного письма. -]]> - 30005 - 30005 - 0 - - - core - public_email_content - subs_with_post + digest_topic_daily , -<#POSTER#> has just posted a reply to a topic that you have subscribed to titled "<#TITLE#>". +This is the digest of posts in topic "<#TITLE#>" for today. ---------------------------------------------------------------------- -<#POST#> + + + +<#CONTENT#> + + + + ---------------------------------------------------------------------- The topic can be found here: <#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost - - -If you have configured in your control panel to receive immediate topic reply notifications, you may receive an -email for each reply made to this topic. Otherwise, only 1 email is sent per board visit for each subscribed topic. -This is to limit the amount of mail that is sent to your inbox. - Unsubscribing: -------------- You can unsubscribe at any time by logging into your control panel and clicking on the "Manage Watched Topics" link in the "Forums" tab. ]]> - , <#POSTER#> опубликовал ответ в тему "<#TITLE#>", на которую вы подписаны. - ----------------------------------------------------------------------- -<#POST#> ----------------------------------------------------------------------- - -Адрес темы: <#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost - -Если у вас включена немедленная доставка уведомлений о новых сообщениях в этой теме, вы будете получать письмо с уведомлением на каждый новый ответ в тему. В противном случае только одно такое письмо со всеми новыми ответами будет приходить между каждым вашим визитом на форум. - -Вы можете управлять своими подписками в боковом блоке «Подписки» вкладки «Обсуждения» на форуме. + , + +Это письмо содержит обзор сообщений темы «<#TITLE#>» за сегодня: + +---------------------------------------------------------------------- +<#CONTENT#> +---------------------------------------------------------------------- + +Адрес темы: <#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost + +Отписаться: +-------------- +Вы можете управлять своими подписками в боковом блоке «Подписки» вкладки «Обсуждения» на форуме. ]]> - 30005 - 30005 + 31006 + 31006 0 core public_email_content - subs_new_topic + subject__digest_topic_weekly + Your weekly new posts digest + Обзор новых сообщений за неделю + 31006 + 31006 + 0 + + + core + public_email_content + digest_topic_weekly , -<#POSTER#> has just posted a new topic entitled "<#TITLE#>" in forum "<#FORUM#>". +This your weekly new topics digest! ---------------------------------------------------------------------- -<#POST#> + + + +<#CONTENT#> + + + + ---------------------------------------------------------------------- -The topic can be found here: -<#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#> - -Please note that if you wish to get email notification of any replies to this topic, you will have to click on the -"Track this Topic" link shown on the topic page, or by visiting the link below: -<#BOARD_ADDRESS#>?app=core&module=usercp&tab=forums&area=watch&watch=topic&do=list&tid=<#TOPIC_ID#> - +The forum can be found here: +<#BOARD_ADDRESS#>?showforum=<#FORUM_ID#> Unsubscribing: -------------- You can unsubscribe at any time by logging into your control panel and clicking on the "Manage Watched Forums" link in the "Forums" tab. -If you are not subscribed to any forums and wish to stop receiving notification, uncheck the setting -"Send me any updates sent by the board administrator" found in 'My Settings' under 'General Settings' in the "Settings" tab. ]]> - , <#POSTER#> открыл новую тему "<#TITLE#>" в разделе "<#FORUM#>". - ----------------------------------------------------------------------- -<#POST#> ----------------------------------------------------------------------- - -Адрес темы: <#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#> - -Имейте в виду, что вы можете подписаться на уведомления о новых ответах в этой теме. Это можно сделать как из самой темы, так и нажав на указанную ниже ссылку: <#BOARD_ADDRESS#>?app=core&module=usercp&tab=forums&area=watch&watch=topic&do=list&tid=<#TOPIC_ID#> - -Отписаться: --------------- -Вы можете управлять своими подписками в боковом блоке «Подписки» вкладки «Обсуждения» на форуме. -Если вы не хотите больше получать никаких уведомлений с форума просто отключите соответствующую опцию « Сообщать мне обо всех изменениях, проводимых администратором форума.» в вашем профиле в меню «Общие настройки». -]]> - 30005 - 30005 + , + +Это письмо содержит обзор сообщений темы «<#TITLE#>» за последнюю неделю: + +---------------------------------------------------------------------- +<#CONTENT#> +---------------------------------------------------------------------- + +Адрес темы: <#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost + +Отписаться: +-------------- +Вы можете управлять своими подписками в боковом блоке «Подписки» вкладки «Обсуждения» на форуме.]]> + 31006 + 31006 0 core public_email_content - subject__subs_new_topic - ] New Topic Notification]]> - ] Уведомление о новой теме]]> - 30005 - 30005 + subject__digest_forum_daily + Your daily new topics digest + Обзор новых тем за день + 31006 + 31006 0 core public_email_content - subject__subs_no_post - ] New Reply Notification]]> - ] Уведомление о новом ответе]]> - 30005 - 30005 - 0 - - - core - public_email_content - subs_no_post + digest_forum_daily , -<#POSTER#> has just posted a reply to a topic that you have subscribed to titled "<#TITLE#>". +This your daily new topics digest! -The topic can be found here: -<#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost +---------------------------------------------------------------------- -If you have configured in your control panel to receive immediate topic reply notifications, you may receive an -email for each reply made to this topic. Otherwise, only 1 email is sent per board visit for each subscribed topic. -This is to limit the amount of mail that is sent to your inbox. + + +<#CONTENT#> + + + + +---------------------------------------------------------------------- + +The forum can be found here: +<#BOARD_ADDRESS#>?showforum=<#FORUM_ID#> + +Unsubscribing: +-------------- + +You can unsubscribe at any time by logging into your control panel and clicking on the "Manage Watched Forums" link in the "Forums" tab. +]]> + , + +Это письмо содержит обзор новых тем за сегодня: + +---------------------------------------------------------------------- +<#CONTENT#> +---------------------------------------------------------------------- + +Раздел форума, на который вы подписались, по ссылке: +<#BOARD_ADDRESS#>?showforum=<#FORUM_ID#> + +Отписаться: +-------------- +Вы можете управлять своими подписками в боковом блоке «Подписки» вкладки «Обсуждения» на форуме.]]> + 31006 + 31006 + 0 + + + core + public_email_content + subject__digest_forum_weekly + Your weekly new topics digest + Обзор новых тем за неделю + 31006 + 31006 + 0 + + + core + public_email_content + digest_forum_weekly + , + +This is the digest of this weeks posts in forum <#FORUM_NAME#>. + +---------------------------------------------------------------------- + + + +<#CONTENT#> + + + + +---------------------------------------------------------------------- + +The forum can be found here: +<#BOARD_ADDRESS#>?showforum=<#FORUM_ID#> Unsubscribing: -------------- You can unsubscribe at any time by logging into your control panel and clicking on the "Manage Watched Topics" link in the "Forums" tab. ]]> - , <#POSTER#> опубликовал ответ в тему "<#TITLE#>", на которую вы подписаны. + , + +Это письмо содержит обзор новых тем за последнюю неделю: + +---------------------------------------------------------------------- +<#CONTENT#> +---------------------------------------------------------------------- + +Раздел форума, на который вы подписались, по ссылке: +<#BOARD_ADDRESS#>?showforum=<#FORUM_ID#> + +Отписаться: +-------------- +Вы можете управлять своими подписками в боковом блоке «Подписки» вкладки «Обсуждения» на форуме.]]> + 31006 + 31006 + 0 + + + core + public_email_content + subject__new_post_queue_notify + New Post Awaiting Approval + Новое сообщение, требующее активации + 31006 + 31006 + 0 + + + core + public_email_content + new_post_queue_notify + . + +A new post has been entered into the moderation queue and is awaiting +approval. + +---------------------------------- +Topic: <#TOPIC#> +Forum: <#FORUM#> +Author: <#POSTER#> +Time: <#DATE#> +Manage Queue: <#LINK#> +---------------------------------- <#POST#> ----------------------------------------------------------------------- +---------------------------------- -Адрес темы: <#BOARD_ADDRESS#>?showtopic=<#TOPIC_ID#>&view=getnewpost +If you no longer require notification, you can stop these emails by simply +removing your email address from the forum settings options. -В теме могут быть и другие ответы, однако вами задано, чтобы приходило только одно письмо с уведомлением (на каждую тему) между вашими визитами на форум. - -Отписаться: --------------- -Вы можете управлять своими подписками в боковом блоке «Подписки» вкладки «Обсуждения» на форуме. -]]> - 30005 - 30005 - 0 - - - core - public_email_content - email_member - , - -<#FROM_NAME#> has sent you this email from <#BOARD_ADDRESS#>. - - -<#MESSAGE#> - ---------------------------------------------------- -Please note that <#BOARD_NAME#> has no control over the -contents of this message. ---------------------------------------------------- +<#BOARD_ADDRESS#> ]]> - - -<#MEMBER_NAME#>, - -<#FROM_NAME#> отправил вам письмо. - ---------------------------------------------------- - <#MESSAGE#> ---------------------------------------------------- - -Имейте в виду, что форум не несет ответственность за содержание данного письма. -]]> - 30005 - 30005 + + +На форуме появилось новое сообщение для проверки и публикации/удаления модератором. + +Тема: <#TOPIC#> +Форум: <#FORUM#> +Автор: <#POSTER#> +Время: <#DATE#> + +Для совершения действий с сообщением перейдите по ссылке: <#LINK#> +---------------------------------- +Если вы больше не хотите получать такие уведомления, удалите ваш e-mail адрес в настройках форума. + +Адрес форума: <#BOARD_ADDRESS#>]]> + 31006 + 31006 0 core public_email_content - complete_reg + subject__new_topic_queue_notify + New Topic Awaiting Approval + Новая тема, требующая активации + 31006 + 31006 + 0 + + + core + public_email_content + new_topic_queue_notify + . + +A new topic has been entered into the moderation queue and is awaiting +approval. + +---------------------------------- +Topic: <#TOPIC#> +Forum: <#FORUM#> +Author: <#POSTER#> +Time: <#DATE#> +Manage Queue: <#LINK#> +---------------------------------- +<#POST#> +---------------------------------- + +If you no longer require notification, you can stop these emails by simply +removing your email address from the forum settings options. + +<#BOARD_ADDRESS#> + +]]> + + +На форуме появилось новая тема для проверки и публикации/удаления модератором. + +Тема: <#TOPIC#> +Форум: <#FORUM#> +Автор: <#POSTER#> +Время: <#DATE#> + +Для совершения действий с темой перейдите по ссылке: <#LINK#> +---------------------------------- +Если вы больше не хотите получать такие уведомления, удалите ваш e-mail адрес в настройках форума. + +Адрес форума: <#BOARD_ADDRESS#> +]]> + 31006 + 31006 + 0 + + + core + public_email_content + post_was_quoted + . + +The post that was quoted can be found here: + +<#ORIGINAL_POST#> + +The post that <#MEMBER_NAME#> submitted can be found here: + +<#NEW_POST#> + +---------------------------------- +<#POST#> +---------------------------------- + +If you no longer wish to receive notifications of quoted posts, you can adjust your preferences on the +board by clicking My Settings, and then choosing Notification Options. + +<#BOARD_ADDRESS#> + +]]> + . + +Прочитать сообщение от <#MEMBER_NAME#> вы можете по ссылке: + +<#NEW_POST#> + +---------------------------------- +<#POST#> +---------------------------------- + +Если вы больше не хотите получать уведомления о цитировании ваших сообщений, вы можете изменить необходимые параметры в настройках вашего профиля в разделе «Настройки уведомлений». + +<#BOARD_ADDRESS#>]]> + 31006 + 31006 + 0 + + + core + public_email_content + subject__new_comment_added + New comment from %s]]> + Новый комментарий от %s]]> + 31006 + 31006 + 0 + + + core + public_email_content + new_comment_added + , + +<#COMMENT_NAME#> has left you a comment on your profile. + +Manage your comments: <#LINK#> +]]> + , + +<#COMMENT_NAME#> оставил комментарий в вашем профиле. + +Управление такими комментариями по ссылке: <#LINK#> ]]> + 31006 + 31006 + 0 + + + core + public_email_content + subject__post_was_quoted + %s quoted a post you made]]> + %s процитировал ваше сообщение]]> + 31006 + 31006 + 0 + + + core + public_email_content + subject__new_comment_request + New comment from %s pending approval]]> + Новый комментарий от %s ожидает подтверждения]]> + 31006 + 31006 + 0 + + + core + public_email_content + new_comment_request + , + +<#COMMENT_NAME#> has left you a comment that requires your approval. + +As you've chosen to approve all new comments the new comment will not appear on your +profile until it's been approved. + +Log in and then manage your comments: <#LINK#> +]]> + , <#COMMENT_NAME#> оставил комментарий в вашем профиле. Так как у вас включена премодерация комментариев, для того, чтобы он появился, необходимо вам его активировать, в противном случае удалить. Сделать это можно по ссылке: <#LINK#>]]> + 31006 + 31006 + 0 + + + core + public_email_content + new_friend_request + , + +<#FRIEND_NAME#> wants to be your friend! + +This message has been sent because <#FRIEND_NAME#> has added you to their friends +list. As you've chosen to approve all friend requests, you will need to visit your +friends list and approve them. + +Log in and then manage your friends: <#LINK#> +]]> + , <#FRIEND_NAME#> хочет стать вашим другом! Так как у вас включена проверка желающих стать вашими друзьями, то для того, чтобы он появился в вашем списке друзей, его запрос необходимо подтвердить (или отклонить). Сделать это можно по ссылке: <#LINK#>]]> + 31006 + 31006 + 0 + + + core + public_email_content + subject__new_friend_added + %s added you as a friend]]> + %s добавил вас в друзья]]> + 31006 + 31006 + 0 + + + core + public_email_content + new_friend_added + , + +<#FRIEND_NAME#> has successfully added you to their friends list. + +Manage your friends: <#LINK#> +]]> + , <#FRIEND_NAME#> стал вашим другом. +Управление списком ваших друзей: <#LINK#>]]> + 31006 + 31006 + 0 + + + core + public_email_content + subject__new_friend_approved + %s approved your friend request]]> + %s активировал дружбу с вами]]> + 31006 + 31006 + 0 + + + core + public_email_content + new_friend_approved + , + +<#FRIEND_NAME#> has approved your friend request! + +Log in and then manage your friends: <#LINK#> +]]> + , <#FRIEND_NAME#> принял предложение стать вашим другом! Управление вашим списком друзей по ссылке: <#LINK#>]]> + 31006 + 31006 + 0 + + + core + public_email_content + subject__new_friend_request + %s sent you a friend request]]> + %s хочет дружить с вами]]> + 31006 + 31006 + 0 + + + core + public_email_content + subject__account_created + Your account has been created + Ваша учетная запись успешно создана + 31006 + 31006 + 0 + + + core + public_email_content + account_created + , + +Your account has been created successfully at <#BOARD_NAME#>. + +If we were waiting on a parental consent form, this means the form has been received and documented. + +Your details are as follows: + +Username: <#NAME#> +Email Address: <#EMAIL#> +Password: <#PASSWORD#> + +Please be aware that we do not store a plain text copy of your password, and you can change your password at any time through your control panel on the site. + +Visit this link to join into our discussions! + +<#BOARD_ADDRESS#> +]]> + , + +Ваша учетная запись успешно создана на форуме <#BOARD_NAME#> + +Данные для доступа к форумам следующие: + +Имя пользователя: <#NAME#> +Пароль: <#PASSWORD#> +E-mail: <#EMAIL#> + +Пожалуйста, запомните, что мы не храним ваш пароль, но вы можете его изменить в любой время в ваших личных данных. + +Приятного общения! + +<#BOARD_ADDRESS#> +]]> + 31006 + 31006 + 0 + + + core + public_email_content + subject__error_log_notification + An error has been generated on your site + На вашем форуме возникла ошибка + 31006 + 31006 + 0 + + + core + public_email_content + error_log_notification + +The error message is: <#MESSAGE#> +The user who saw this error is: <#VIEWER#> +The IP address of this user is: <#IP_ADDRESS#> + +Please login to your Admin Control Panel to use the error log viewer tool for further information. + +<#BOARD_ADDRESS#> +]]> + +Сообщение: <#MESSAGE#> +Пользователь, кто обнаружил ошибку: <#VIEWER#> +Его IP-адрес: <#IP_ADDRESS#> + +Более подробную информация вы можете получить, просмотрев журнал error_log. + +<#BOARD_ADDRESS#> +]]> + 31006 + 31006 + 0 + + + core + public_email_content + subject__personal_convo_invite + %s has added you to a personal conversation]]> + %s приглашает вас принять участие в беседе]]> + 31006 + 31006 + 0 + + + core + public_email_content + personal_convo_invite + , + +<#POSTER#> has added you to their personal conversation entitled "<#TITLE#>". + +You can read this personal conversation by following the link below: + +<#BOARD_ADDRESS#><#LINK#> +]]> + , <#POSTER#> добавил вас к личной беседе "<#TITLE#>". +Вы можете прочитать диалог по указанной ниже ссылке: +<#BOARD_ADDRESS#><#LINK#> +]]> + 31006 + 31006 + 0 + + + core + public_email_content + personal_convo_new_reply + , + +<#POSTER#> has replied to a personal conversation entitled "<#TITLE#>". + +<#POSTER#> said: +====================================================================== +<#TEXT#> +====================================================================== + +PLEASE DO NOT REPLY DIRECTLY TO THIS EMAIL! +You can reply to this personal conversation by following the link below: + +<#BOARD_ADDRESS#><#LINK#> +]]> + , <#POSTER#> ответил в личную беседу "<#TITLE#>". +<#POSTER#> сказал: +<#TEXT#> +Вы можете просмотреть полный диалог беседы по указанной ниже ссылке: +<#BOARD_ADDRESS#><#LINK#> +]]> + 31006 + 31006 + 0 + + + core + public_email_content + subject__personal_convo_new_reply + %s has replied to a personal conversation]]> + %s написал новое сообщение в личной беседе]]> + 31006 + 31006 + 0 + + + core + public_email_content + subject__personal_convo_new_convo + %s started a new personal conversation with you]]> + %s начал новую беседу с вами]]> + 31006 + 31006 + 0 + + + core + public_email_content + personal_convo_new_convo + , + +<#POSTER#> has sent you a new personal conversation entitled "<#TITLE#>". + +<#POSTER#> said: +====================================================================== +<#TEXT#> +====================================================================== + +PLEASE DO NOT REPLY DIRECTLY TO THIS EMAIL! +You can reply to this personal conversation by following the link below: + +<#BOARD_ADDRESS#><#LINK#> +]]> + , <#POSTER#> отправил вам сообщение с заголовком "<#TITLE#>". +<#POSTER#> сказал: ====================================================================== +<#TEXT#> +Вы можете просмотреть беседу с ним, пройдя по указанной ниже ссылке: +<#BOARD_ADDRESS#><#LINK#> +]]> + 31006 + 31006 + 0 + + + core + public_email_content + new_status + , + +<#OWNER#> has just posted a new status update. + +====================================================================== +<#STATUS#> +====================================================================== + + +You can turn off status notification by visiting <#URL#> +]]> + , + +<#OWNER#> только что обновил статус. + +====================================================================== +<#STATUS#> +====================================================================== + + +Вы можете отключить уведомления по адресу <#URL#>]]> + 31006 + 31006 + 0 + + + core + public_email_content + subject__other_status_reply + %s has replied to %s's status]]> + %s прокомментировал %s статус]]> + 31006 + 31006 + 0 + + + core + public_email_content + subject__status_reply + %s has replied to your status]]> + %s прокомментировал ваш статус]]> + 31006 + 31006 + 0 + + + core + public_email_content + status_reply + , + +<#POSTER#> <#BLURB#> + +Status: (<#OWNER#>) <#STATUS#> +====================================================================== +<#TEXT#> +====================================================================== + + +You can turn off status notification by visiting <#URL#> +]]> + , + +<#POSTER#> <#BLURB#> + +Статус: (<#OWNER#>) <#STATUS#> +====================================================================== +<#TEXT#> +====================================================================== + + +Вы можете отключить уведомления по адресу <#URL#>]]> + 31006 + 31006 + 0 + + + core + public_email_content + subject__new_status + <#OWNER#> has posted a new status update]]> + <#OWNER#> обновил свой статус]]> + 31006 + 31006 + 0 + + + core + public_email_content + email_convo + , + +Attached to this message is a HTML file containing a personal conversation archive: +Conversation title: <#TITLE#> +Conversation started: <#DATE#> +<#LINK#> +]]> + , + +К письму прикреплен архив личной переписки: +Название: <#TITLE#> +Начало: <#DATE#> +<#LINK#>]]> + 31006 + 31006 + 0 + + + core + public_email_content + header + + + 31006 + + 0 + + + core + public_email_content + footer . You may now log in with -your chosen details and access your full user account at <#BOARD_ADDRESS#> +The <#BOARD_NAME#> team. +<#BOARD_ADDRESS#> ]]> - . - -Поздравляем! - -Администратор успешно активировал вашу регистрацию (или смену e-mail адреса). -Теперь вы можете войти на форум и пользоваться всеми возможностями полноценного пользователя. - -Адрес форума: <#BOARD_ADDRESS#> -]]> - 30005 - 30005 + , <#BOARD_ADDRESS#> ]]> + 31006 + 31006 0 core public_email_content - subject__complete_reg - Account: %s, validated at %s - Учетная запись: %s, подтверждена %s - 30011 - 30011 - 0 - - - core - public_error - er_useful_links - Useful Links - Полезные ссылки - 30005 - - 0 - - - core - public_error - error_title - An Error Occurred - Ошибка - 30005 - - 0 - - - core - public_error - er_lost_pass - Forgotten Password Recovery - Восстановление пароля - 30005 - - 0 - - - core - public_error - er_register - Register a new account - Регистрация - 30005 - - 0 - - - core - public_error - er_contact_admin - Contact the forums administrator - Связь с администрацией форума - 30005 - - 0 - - - core - public_error - er_help_files - Our help documentation - Разделы помощи - 30005 - - 0 - - - core - public_error - fbc_authorization_screwup - An error occurred while attempting to authorize this Facebook Connect action - Возникла ошибка при попытке авторизоваться с использованием Facebook - 30005 - 30005 - 0 - - - core - public_error - error_back - Go Back - Назад - 30005 - - 0 - - - core - public_error - command_file_missing - The requested action could not be performed, because we could not locate the following file: %s - Запрашиваемое действие не может быть выполнено. Требуемый файл: %s не найден - 30005 - - 0 - - - core - public_error - command_class_incorrect - The requested action could not be performed, there are no valid commands classes in the requested file: %s - Запрашиваемое действие не может быть выполнено. В файле: %s не найдены необходимые классы действий. - 30005 - - 0 - - - core - public_error - no_login_methods - Could not load any login handlers - Не удалось загрузить модули авторизации - 30005 - - 0 - - - core - public_error - fbc_authorization_already_linked - That member account is already linked to a Facebook profile - Пользовательская запись уже присоединена к Facebook - 30005 - 30005 - 0 - - - core - public_error - must_agree_to_terms - You must agree to the registration terms. - Необходимо принять правила пользования форумом. - 30005 - - 0 - - - core - public_error - no_permission_to_attach - You do not have permission to use the attachments system. - Вы не можете прикреплять файлы. - 30005 - - 0 - - - core - public_error - no_permission_for_display_names - You do not have permission to change your display name. - Вы не можете изменить имя пользователя. - 30005 - - 0 - - - core - public_error - search_off - Search is not enabled on the forums at this time. - В данный момент поиск на форуме отключен. - 30005 - - 0 - - - core - public_error - no_permission_to_search - You do not have permission to use the search system. - Вы не можете использовать поиск на форуме. - 30005 - - 0 - - - core - public_error - bad_logout_key - The link you followed to logout appears to be badly formed. Please go back and click the link again. - Выйти не удалось. Ссылка «Выход» имеет неверный формат. Пожалуйста, вернитесь назад и попробуйте еще раз. - 30005 - - 0 - - - core - public_error - bad_delete_cookies_key - The link you followed to delete your cookies appears to be badly formed. Please go back and click the link again. - Очистить cookies не удалось. Ссылка «Очистить cookies» имеет неверный формат. Пожалуйста, вернитесь назад и попробуйте еще раз. - 30005 - - 0 - - - core - public_error - validation_key_incorrect - The validation key you supplied to reset your password does not appear to be valid. - Не удалось сбросить пароль. Ключ валидации неверный. - 30005 - - 0 - - - core - public_error - no_view_board - You are not allowed to visit this forum. - Вы не можете просматривать форум. - 30005 - - 0 - - - core - public_error - you_are_banned - You are not allowed to visit this forum. - Вам запрещено просматривать форум. - 30005 - - 0 - - - core - public_error - lostpass_no_member - We could not find the member account for the user id you supplied. - Пользователя с такими данными не существует. - 30005 - - 0 - - - core - public_error - uid_key_incorrect - The user id you supplied to reset your password does not appear to be valid. - Неверный идентификатор пользователя. - 30005 - - 0 - - - core - public_error - lostpass_not_validating - The member specified is not presently awaiting validation for a lost password request. - Пользователь не запрашивал восстановление пароля. - 30005 - - 0 - - - core - public_error - lostpass_new_reg - Your account is awaiting admin validation. An admin will take a look at it as soon as possible. - Ваша учетная запись ожидает подтверждения администратора. - 30005 - - 0 - - - core - public_error - lostpass_not_lostpass - - Ваш запрос на восстановление пароля на самом деле не является запросом на восстановление пароля. Вы не понимаете о чем это, к сожалению мы тоже. Пожалуйста свяжитесь с администрацией форума и сообщите им об этой ошибке. - 30005 - - 0 - - - core - public_error - lostpass_key_wrong - The validation key supplied does not match the key we have on record. Please verify it is correct and resubmit the request. - Ключ валидации не совпадает с ключем, хранящимся в наших записях. Вероятно, вам следует повторить отправку запроса. - 30005 - - 0 - - - core - public_error - lostpass_external_fail - There was an error changing your password in one of our external systems. Please notify an administrator. - Возникла проблема со сменой пароля. Сообщите об этом администрации форума. - 30005 - - 0 - - - core - public_error - lostpass_name_email - You did not supply your name or email address. - Вы не ввели имя или e-mail. - 30005 - 30005 - 0 - - - core - public_error - lostpass_no_user - We could not find the member account for the name or email address you supplied. Please verify the information and resubmit the form. - К сожалению нам не удалось найти пользователя с такими данными. Пожалуйста проверьте отправляемую информацию. - 30005 - 30005 - 0 - - - core - public_error - lostpass_no_mid - We found your member account, but there is no member id set for the account. Please notify an administrator. - Пользователь найден, однако, его запись повреждена. Пожалуйста, сообщите об этом администрации форума. - 30005 - - 0 - - - core - public_error - partial_reg_noid - We could not find the partial registration record, or your member account. Please notify an administrator. - Пользователь найден, однако, его запись повреждена. Пожалуйста, сообщите об этом администрации форума. - 30005 - - 0 - - - core - public_error - coppa_form_fill - You must select your birthday from the dropdown menus before you can continue. - Вы должны указать ваш день рождения прежде чем продолжить регистрацию. - 30005 - - 0 - - - core - public_error - no_validate_key - We could not find the validation request you are attempting to verify. - Неверный ключ активации - 30005 - - 0 - - - core - public_error - validate_admin_turn - You have completed your portion of the validation request already. An administrator must approve your account before you have full access. - Спасибо за активацию аккаунта. Администрация форума должна проверить вашу учетную запись, прежде чем вы получите полный доступ к форуму. - 30005 - - 0 - - - core - public_error - validation_key_invalid - Your validation key did not match the one in our records. Please verify the link you followed or contact an administrator for assistance. - Неверный ключ активации - 30005 - - 0 - - - core - public_error - registration_disabled - The administrator is currently not accepting new membership registrations. - В данный момент регистрация на форуме отключена. - 30005 - - 0 - - - core - public_error - reports_cant_report - You do not have permission to report the item you are attempting to report. - У вас не достаточно прав для отправки жалобы. - 30005 - - 0 - - - core - public_error - awaiting_coppa - You must have your parent or guardian complete the COPPA form and submit it to the administrator before your member account can be created. - Необходимо чтобы ваши родители или опекуны заполнили форму COPPA и отправили ее администрации форума перед созданием учетной записи на форуме. - 30005 - - 0 - - - core - public_error - reports_what_now - We could not determine what type of content you are attempting to report. - Не удалось определить тип содержимого, на которое вы хотите отправить жалобу. - 30005 - - 0 - - - core - public_error - reports_no_topic - Well, we thought there was an open report on this topic but perhaps we were wrong. Go back and try reporting the topic again. - В системе не найдено запрашиваемой жалобы. Вероятно стоит повторить отправку жалобы на тему. - 30005 - - 0 - - - core - public_error - reports_need_tidcid - You did not submit enough information for us to find the report you requested. - Отправленных данных не достаточно, чтобы система смогла найти запрашиваемую жалобу. - 30005 - - 0 - - - core - public_error - no_report_none_perm - - У вас не достаточно прав чтобы завершить то, что вы хотите. - 30005 - - 0 - - - core - public_error - no_report_prune_perm - You do not have permission to prune or delete reports. - У вас не достаточно прав чтобы удалять жалобы. - 30005 - - 0 - - - core - public_error - report_not_found - The report that you are attempting to view could not be found. - Жалоба не найдена. - 30005 - - 0 - - - core - public_error - no_reports_permission - You do not have permission to access the report center. - У вас нет доступа к системе жалоб. - 30005 - - 0 - - - core - public_error - help_no_id - The help topic you requested could not be found. - Раздел помощи, запрошенный вами, не удалось найти. - 30005 - - 0 - - - core - public_error - reputation_missing_data - Your reputation submission could not be saved because not all of the necessary information was provided. - Репутация не может быть изменена, так как в запросе отсутствуют необходимые данные. - 30005 - - 0 - - - core - public_error - han_login_create_failed - Your account could not be created in our external system properly. Please notify an administrator. - Не удалось добавить вашу учетную запись во внешнюю базу пользователей. Пожалуйста свяжитесь с администрацией форума. - 30005 - - 0 - - - core - public_error - reports_no_comment - We could not find the report you are attempting to submit a comment to. - Не удалось сохранить комментарий к жалобе, так как в запросе отсутствуют необходимые данные. - 30005 - - 0 - - - core - public_error - reports_no_rid - We could not find the report you are attempting to view. - Жалоба не найдена. - 30005 - - 0 - - - core - public_error - reports_cant_empty - You must submit a message with your report. - Необходимо написать жалобу, прежде чем отправить ее. - 30005 - - 0 - - - core - public_error - reports_like_whoa - - Количество жалоб, отмеченных как удаляемые не совпадают с количеством жалоб, которые хотите удалить вы. - 30005 - - 0 - - - core - public_error - search_plugin_class - We could not find a file to appropriately search our systems. - Не найден соответствующий плагин поиска. - 30005 - - 0 - - - core - public_error - search_invalid_plugin - We could not find a file to appropriately search our systems. - Не найден соответствующий плагин поиска. - 30005 - - 0 - - - core - public_error - search_plugin_file - We could not find a file to appropriately search our systems. - Не найден соответствующий плагин поиска. - 30005 - - 0 - - - core - public_error - sphinx_api_missing - Search is not available as the Sphinx API is not available, please contact an administrator about this issue - Поиск не доступен. Отсутствует Sphinx API. Пожалуйста, свяжитесь с администрацией форума. - 30005 - - 0 - - - core - public_error - usercp_bad_tab - We could not find the section of the User Control Panel you requested. - Не удалось найти запрашиваемую вами секцию пользовательской панели. - 30005 - - 0 - - - core - public_error - search_no_term - You must specify a search term. - Необходимо ввести ключ поиска. - 30005 - - 0 - - - core - public_error - reports_cannot_view_entry - You do not have permission to report this blog entry. - У вас нет прав чтобы отправить жалобу на эту запись блога. - 30005 - - 0 - - - core - public_error - reports_no_entry - We could not find the blog entry that you are attempting to report. - Системе не удалось найти запись в блоге на которую вы пытаетесь отправить жалобу. - 30005 - - 0 - - - core - public_error - reports_must_be_member - You must be a registered member and logged in to our site in order to report this content. - Для отправки жалобы вам необходимо быть зарегистрированным и авторизованным пользователем. - 30005 - - 0 - - - core - public_error - reports_blog_entry_id - We could not determine which blog or entry you are attempting to report. - Системе не удалось найти запись в блоге или сам блог на которую(ый) вы пытаетесь отправить жалобу. - 30005 - - 0 - - - core - public_error - reports_input_not_match - The data you submitted does not match the expected format. - Данные, отправленные вами, не соответствуют необходимому формату. - 30005 - - 0 - - - core - public_error - reports_no_file - We could not determine which file you were attempting to report. - Системе не удалось найти файл на который вы пытаетесь отправить жалобу. - 30005 - - 0 - - - core - public_error - reports_images_disabled - We are not accepting reports on images at this time. - Система жалоб на изображения галереи в данный момент отключена. - 30005 - - 0 - - - core - public_error - reports_no_imageid - We could not determine which gallery image you were attempting to report. - Системе не удалось найти изображение в галерее на которое вы пытаетесь отправить жалобу. - 30005 - - 0 - - - core - public_error - reports_invalid_gtype - We could not determine what gallery content you were attempting to report. - Системе не удалось найти контент в галерее на который вы пытаетесь отправить жалобу. - 30005 - - 0 - - - core - public_error - reports_no_msg - We could not find the private message you were attempting to report. - Системе не удалось найти личное сообщение на которое вы пытаетесь отправить жалобу. - 30005 - - 0 - - - core - public_error - reports_no_member - We could not find the member profile you were attempting to report - Системе не удалось найти пользователя на чей профиль вы пытаетесь отправить жалобу. - 30005 - - 0 - - - core - public_error - reports_missing_tidpid - We could not determine which topic or post you were attempting to report. - Системе не удалось найти тему или сообщение на которую(ое) вы пытаетесь отправить жалобу. - 30005 - - 0 - - - core - public_error - usercp_forums_bad_key - Your secure key, used to protect your account settings, did not match the one submitted. Please go back, reload the form, and try again. - Ключ безопасности не совпадает с отправленным. Вернитесь назад, обновите форму и попробуйте снова. - 30005 - - 0 - - - core - public_error - announcements_supermods - Only super-moderators have access to manage announcements on our site. - Управление объявлениями доступно только супер-модераторам. - 30005 - - 0 - - - core - public_error - forum_already_subscribed - You are already subscribed to the topic or forum you are attempting to subscribe to. - Вы уже подписаны на эту тему или форум. - 30005 - 30005 - 0 - - - core - public_error - usercp_forums_must_login - The forum you are attempting to subscribe to requires you to enter a password. Please go login to the forum before subscribing to it. - Вы пытаетесь подписаться на форум, защищенный паролем. Прежде чем вы сможете подписаться на него, вам необходимо вернуться назад и ввести пароль для данного форума. - 30005 - - 0 - - - core - public_error - usercp_forums_no_perms - You do not have permission to read topics in this forum. - У вас нет прав для просмотра тем в данном форуме. - 30005 - - 0 - - - core - public_error - usercp_forums_no_topic - We could not find the topic you wish to subscribe to. - Системе не удалось найти тему на которую вы пытаетесь подписаться. - 30005 - - 0 - - - core - public_error - contact_what_action - - Неверное использование функций форума. - 30005 - - 0 - - - core - public_error - contact_need_message - You did not specify why you are reporting this post. - Вы не указали причину по которой отправляете жалобу. - 30005 - - 0 - - - core - public_error - members_only_mail - Only members may contact other members through our forums. - Только зарегистрированные пользователи могут отправлять e-mail письма друг другу. - 30005 - 30005 - 0 - - - core - public_error - mail_member_no_mid - We could not determine which member you were attempting to send an email to. - Система не смогла найти пользователя, которому вы пытаетесь отправить e-mail. - 30005 - 30005 - 0 - - - core - public_error - no_member_mail - Sorry, you are not permitted to send an email via this board. - Извините, но вам не доступна возможность отправки e-mail писем с форума. - 30005 - 30005 - 0 - - - core - public_error - announcement_no_perms - You do not have permission to read the requested announcement. - У вас нет прав чтобы прочитать запрашиваемое объявление. - 30005 - - 0 - - - core - public_error - announcement_id_missing - We could not determine which announcement you were attempting to view. - Система не смогла найти объявление, которое вы пытаетесь посмотреть. - 30005 - - 0 - - - core - public_error - email_address_invalid - The email address you entered is not in a valid format. Please check it and resubmit the form. - Введенный вами e-mail адрес неверный. Пожалуйста проверьте его и отправьте форму снова. - 30005 - 30005 - 0 - - - core - public_error - forward_only_members - Only members can forward topics from our forums. - Отправка темы по e-mail доступна только зарегистрированным пользователям. - 30005 - - 0 - - - core - public_error - forward_no_fid - We could not determine which form the topic is in. - Системе не удалось найти форум, которому принадлежит данная тема. - 30005 - 30005 - 0 - - - core - public_error - forward_no_tid - We could not determine which topic you were attempting to forward. - Темы, которую вы пытаетесь отправить, не существует. - 30005 - - 0 - - - core - public_error - mail_member_private - Sorry, but this member does not wish to be contacted by email through this board. - К сожалению пользователь не желает получать email письма от других пользователей форума. - 30005 - - 0 - - - core - public_error - mail_member_no_member - We could not find the member you were attempting to send an email to. - Система не смогла найти пользователя, которому вы пытаетесь отправить e-mail. - 30005 - 30005 - 0 - - - core - public_error - attach_missing_tid - We could not determine which topic you were attempting to view attachments from. - Система не смогла найти тему к которой принадлежат прикрепленные файлы, которые вы пытаетесь посмотреть. - 30005 - - 0 - - - core - public_error - forums_no_access - You do not have permission to view topics in this forum. - У вас нет прав для просмотра тем в данном форуме. - 30005 - 30005 - 0 - - - core - public_error - forums_no_id - We could not find the forum you were attempting to view. - Система не смогла найти форум, который вы пытаетесь посмотреть. - 30005 - 30005 - 0 - - - core - public_error - findpost_missing_topic - We could not find the topic that this post belongs to. - Система не смогла найти тему к которой принадлежит это сообщение. - 30005 - 30005 - 0 - - - core - public_error - findpost_missing_pid - We could not find the post you were attempting to view. - Система не смогла найти сообщение, которое вы пытаетесь посмотреть. - 30005 - 30005 - 0 - - - core - public_error - attach_no_forum_perm - You do not have permission to view attachments in the forum this topic is in. - У вас нет прав для просмотра прикрепленный файлов в форуме в котором находится тема с прикреплениями. - 30005 - - 0 - - - core - public_error - attach_no_attachments - The specified topic does not have any attachments to view. - Указанная тема не содержит прикрепленных файлов. - 30005 - - 0 - - - core - public_error - forums_no_rules - There are no forum-specific rules configured for this forum. Please refer to the board rules instead. - Данный раздел не имеет каких-то особенных правил. Пожалуйста ознакомьтесь с основными правилами форума. - 30005 - 30005 - 0 - - - core - public_error - forums_why_l_gt_1 - Why is the L greater than 1? Looks kinda suspicious if you ask me. - Почему L больше 1? Потому что гладиолус! - 30005 - 30005 - 0 - - - core - public_error - forums_wrong_pass - Sorry, but the password you entered is not correct. Please contact an administrator for assistance. - К сожалению введенный вами пароль не верен. Обратитесь к администрации форума за помощью. - 30005 - 30005 - 0 - - - core - public_error - forums_bad_filter - The topic filter settings you submitted are not valid. Please go back and reset your topic filter settings. - Параметры фильтрации темы неверны. Пожалуйста вернитесь назад и обновите настройки фильтра темы. - 30005 - 30005 - 0 - - - core - public_error - topics_no_fid - We could not determine which forum this topic is in. - Система не смогла найти форум, которому принадлежит тема. - 30005 - - 0 - - - core - public_error - topics_no_tid - We could not determine which topic you were attempting to view. - Система не смогла найти тему, которую вы пытаетесь посмотреть. - 30005 - - 0 - - - core - public_error - topic_not_approved - You do not have permission to view this topic. - У вас нет прав для просмотра этой темы. - 30005 - - 0 - - - core - public_error - topic_rate_locked - You are not allowed to rate topics that are locked. - Вы не можете оценивать закрытые темы. - 30005 - - 0 - - - core - public_error - topic_rate_no_perm - You do not have permission to rate this topic. - У вас нет прав для выставления рейтинга этой теме. - 30005 - - 0 - - - core - public_error - forums_pass_blank - This forum requires a password to gain access to it. Please go back and fill in the password field before submitting the form. - Данный форум защищен паролем. Пожалуйста вернитесь назад и заполните поле пароля, прежде чем снова отправить форму. - 30005 - 30005 - 0 - - - core - public_error - markread_no_id - We could not find the forum id you were attempting to mark as read. - Система не смогла найти форум, который вы хотите пометить прочтенным. - 30005 - - 0 - - - core - public_error - topics_post_not_in_topic - You requested a post that is not part of this topic. Please verify the URL you clicked or contact an administrator. - Вы запросили сообщение, которое не является частью данной темы. Проверьте правильность ссылки, по которой вы нажали или обратитесь к администрации форума. - 30005 - - 0 - - - core - public_error - topics_none_older - There are no older topics in this forum. - В форуме не осталось старых тем. - 30005 - - 0 - - - core - public_error - topics_none_newer - There are no newer topics in this forum. - В форуме не осталось новых тем. - 30005 - - 0 - - - core - public_error - topic_vote_not_enough - You must cast your vote in each question of the poll. - Необходимо ответить на каждый вопрос опроса. - 30005 - - 0 - - - core - public_error - topic_vote_already - You have already voted in this poll. You are only allowed to vote in a poll once. - Вы уже голосовали в этом опросе. - 30005 - - 0 - - - core - public_error - topic_vote_noreply - You do not have permission to vote in this poll. - Вы не можете оставлять сообщения в данном опросе. - 30005 - - 0 - - - core - public_error - topic_vote_locked - You are not allowed to vote in polls that are locked. - Вы не можете голосовать в опросах, которые закрыты. - 30005 - - 0 - - - core - public_error - topic_cannot_vote - You do not have permission to vote in this poll. - Вы не можете голосовать в данном опросе. - 30005 - - 0 - - - core - public_error - tracker_only_members - Only registered members can subscribe to topics on our forums. Why not register an account? - Опция отслеживания тем доступна только нашим зарегистрированным пользователям. Почему бы не зарегистрироваться сейчас? - 30005 - - 0 - - - core - public_error - tracker_no_fid - We could not determine which forum the topic you are attempting to subscribe to is in. - Системе не удалось найти форум темы на которую вы пытаетесь подписаться. - 30005 - - 0 - - - core - public_error - mod_no_mid - We could not determine which member you were attempting to edit. - Системе не удалось найти пользователя, профиль которого вы пытаетесь отредактировать. - 30005 - - 0 - - - core - public_error - tracker_already_track - You are already subscribed to this topic. - Вы уже подписаны на эту тему. - 30005 - - 0 - - - core - public_error - tracker_no_tid - We could not determine which topic you are attempting to subscribe to. - Тема, на которую вы пытаетесь подписаться, не существует. - 30005 - - 0 - - - core - public_error - topics_not_yours2 - You cannot view this topic because it is not your topic and the administrator has specified that you can only view your own topics in this forum. - Вы пытаетесь просмотреть тему, автором которой вы не являетесь. В данном разделе форума вы можете просматривать только свои темы. - 30005 - - 0 - - - core - public_error - topics_not_yours - You cannot view this topic because it is not your topic and the administrator has specified that you can only view your own topics. - Вы пытаетесь просмотреть тему, автором которой вы не являетесь. Вы можете просматривать только свои темы. - 30005 - - 0 - - - core - public_error - mod_only_supermods - Only supermoderators have access to perform this function. - Данная возможность доступна только супер-модераторам. - 30005 - - 0 - - - core - public_error - mod_no_forum_move - We could not find the forum you were attempting to place the topic into. - Вы пытаетесь перенести тему в несуществующий форум. - 30005 - - 0 - - - core - public_error - mod_need_title - You must specify the topic title of the new topic. - Вы должны ввести название новой темы. - 30005 - - 0 - - - core - public_error - mod_delete_first_post - You cannot delete the first post in a topic. You should delete the topic itself instead. - Вы пытаетесь удалить первое сообщение в теме. Этого делать нельзя. Если вам нужно удалить тему, воспользуйтесь специально предназначенной для этого опцией. - 30005 - - 0 - - - core - public_error - mod_too_much_split - You cannot split all posts within this topic to another topic. You must leave at least one post in this topic. - Вы пытаетесь перенести все сообщения темы, этого делать нельзя. В старой теме должно остаться хотя бы одно сообщение. - 30005 - - 0 - - - core - public_error - mod_not_enough_split - There are not enough posts in this topic to split it. - В этой теме недостаточно сообщений для того чтобы разделить ее. - 30005 - - 0 - - - core - public_error - mod_no_tid - We could not determine which topic you were attempting to moderate. - Темы не существует. - 30005 - - 0 - - - core - public_error - mod_topic_unpinned - The topic you are attempting to unpin is not currently pinned. - Вы пытаетесь опустить уже опущенную тему. - 30005 - - 0 - - - core - public_error - mod_topic_pinned - The topic you are attempting to pin is already pinned. - Вы пытаетесь поднять уже поднятую тему. - 30005 - - 0 - - - core - public_error - mod_admin_edit - You are not permitted to edit an administrator. - Вы не можете редактировать профиль администратора. - 30005 - - 0 - - - core - public_error - mod_only_one_pid - You must select more than one post for moderation. - Необходимо выбрать более одного сообщения для осуществления этого действия. - 30005 - - 0 - - - core - public_error - mod_no_pids - You did not select any posts for moderation. - Вы не выбрали ни одного сообщения для осуществления этого действия. - 30005 - - 0 - - - core - public_error - mod_merge_posts - - Недостаточно данных для завершения этого действия. Пожалуйста убедитесь, что форма была правильно заполнена. - 30005 - - 0 - - - core - public_error - mod_no_close_topic - You do not have permission to close this topic. - Вы не можете закрыть эту тему. - 30005 - - 0 - - - core - public_error - mod_forum_no_posts - The forum you are attempting to move the topic to does not allow posting or displaying of topics. As a result the topic would be sucked into a black hole and lost in oblivion. How about you try a different forum? - Вы пытаетесь перенести тему в форум где запрещен просмотр тем или отправка сообщений. - 30005 - - 0 - - - core - public_error - mod_no_delete_topic - You do not have permission to delete this topic. - Вы не можете удалить эту тему. - 30005 - - 0 - - - core - public_error - mod_missing_url_title - You must fill in the form completely. You omitted either the URL of the topic or the new topic title. - Похоже что вы не заполнили форму надлежащим образом. Вы пропустили или URL, или название новой темы. - 30005 - - 0 - - - core - public_error - mod_missing_old_topic - We could not find one of the topics you were attempting to merge. - Не существует одной из тем, которые вы пытаетесь объединить. - 30005 - - 0 - - - core - public_error - mod_same_topics - You cannot merge a topic into itself. That would be illogical captain! (tm) - Вы пытаетесь объединить тему саму с собой. Это же не логично! - 30005 - - 0 - - - core - public_error - moderate_no_permission - You do not have permission to carry out that function. - Вы не можете использовать эту возможность. - 30005 - - 0 - - - core - public_error - mod_no_move_forum - We could not determine which forum you were attempting to move the topic into. - Форума, куда вы пытаетесь перенести тему, не существует. - 30005 - - 0 - - - core - public_error - mod_no_move_save - Why, oh why, would you attempt to move a topic into the same forum it is already in? Do YOU see the logic in that? - Вы пытаетесь переместить тему в тот же самый форум, в котором она находится сейчас. - 30005 - - 0 - - - core - public_error - mod_no_topic_title - You must specify the topic title. - Вы должны указать название темы. - 30005 - - 0 - - - core - public_error - mod_um_what_now - - Действие, которое вы пытаетесь произвести, не существует в системе. - 30005 - - 0 - - - core - public_error - mod_no_open_opened - The topic you are attempting to open is already open. - Вы пытаетесь открыть уже открытую тему. - 30005 - - 0 - - - core - public_error - mod_no_delete_post_find - We could not find the post you were attempting to delete. - Сообщение, которое вы пытаетесь удалить, не существует. - 30005 - - 0 - - - core - public_error - mod_topics_merge_two - You need to select at least two topics in order to merge them. - Для объединения необходимо выбрать как минимум две темы. - 30005 - - 0 - - - core - public_error - mod_no_prune_member - We could not find the member whose topics you are attempting to prune. - Пользователь, чьи сообщения вы пытаетесь удалить, не существует. - 30005 - - 0 - - - core - public_error - mod_no_prune_topics - We could not find any topics to prune that met your filter criteria. - Системе не удалось найти сообщения для удаления, удовлетворяющие вашему фильтру. - 30005 - - 0 - - - core - public_error - mod_no_open_perms - You do not have permission to open this topic. - Вы не можете открыть эту тему. - 30005 - - 0 - - - core - public_error - mod_bad_tid - You appear to have submitted an invalid topic. - Идентификатор темы неверен. - 30005 - - 0 - - - core - public_error - mod_bad_pid - You appear to have submitted an invalid post. - Идентификатор сообщения неверен. - 30005 - - 0 - - - core - public_error - mod_bad_fid - You appear to have submitted an invalid forum. - Идентификатор форума неверен. - 30005 - - 0 - - - core - public_error - multimod_no_topic - We could not determine which topic you were attempting to take action against. - Темы не существует. - 30005 - - 0 - - - core - public_error - multimod_no_perms - You do not have permission to use this multi-moderation tool on this topic. - Вы не можете использовать мульти-модерацию на данной теме. - 30005 - - 0 - - - core - public_error - mod_stupid_beggar - Out of all the options in all the drop down, you had to choose one with dashed lines, well done. Go back and behave yourself. - Отлично, вы только что умудрились из всех опций в списке выбрать самую бесполезную, состоящую из одних черточек. Вернитесь назад и исправьте ошибку. - 30005 - - 0 - - - core - public_error - mod_no_authorization_key - We use an authorization key to verify you really submitted the form, and the authorization key was not supplied with your form submission or was invalid. Please go back, reload the form and try to submit it again. - Для подтверждения того, что именно вы отправили формы используется ключ авторизации. Вместе с этой формой ключ не был отправлен либо он неверный. Пожалуйста, вернитесь назад, обновите страницу и попробуйте отправить снова. - 30005 - - 0 - - - core - public_error - mod_no_mm_id - We could not determine which multi-moderation tool you were attempting to use. - Невозможно определить какой инструмент мультимодерации вы пытаетесь использовать. - 30005 - - 0 - - - core - public_error - mod_no_multimod - You do not have permission to use this multi-moderation tool. - Вы не можете использовать функцию мульти-модерации. - 30005 - - 0 - - - core - public_error - forums_not_enough_posts - You do not have enough posts to view topics in this forum. - Вы еще не набрали необходимого количества сообщений чтобы просматривать список тем данного форума. - 30005 - 30005 - 0 - - - core - public_error - forums_no_permission - You do not have permission to view this forum. - Вы не можете просматривать этот форум. - 30005 - 30005 - 0 - - - core - public_error - forums_no_view_topic - You do not have permission to view this topic. - Вы не можете просматривать эту тему. - 30005 - 30005 - 0 - - - core - public_error - posting_bad_auth_key - Your secure key, used to verify you are posting the topic, did not match the one submitted. Please go back, reload the form, and try again. - Ваш ключ безопасности, использующийся для проверки того, что именно вы отправляете данные формы не совпал с отправленным. Пожалуйста, вернитесь назад, обновите страницу и попробуйте отправить снова. - 30005 - - 0 - - - core - public_error - flood_control - The administrator has limited the number of new posts you can submit within a short time frame. Please wait %s seconds before replying or posting a new topic. - Стоит делать передышку в %s секунд между отправками новых тем и сообщений. - 30005 - 30005 - 0 - - - core - public_error - posting_off_susp - Your posting rights have been temporarily suspended. The suspension is due to end %s. - Вам запретили общаться на форуме до %s. - 30005 - - 0 - - - core - public_error - posting_restricted - Your posting rights have been removed by an administrator. - Вам запрещено общаться на форуме. - 30005 - - 0 - - - core - public_error - posting_bad_action - We could not determine what action you were attempting to take. - Невозможно определить что пытаетесь сделать. - 30005 - - 0 - - - core - public_error - multimod_not_found - We could not determine which multi-moderation tool you were attempting to use. - Запрашиваемое действие мульти-модерации не существует в системе. - 30005 - - 0 - - - core - public_error - posting_not_enough_posts - You do not have enough posts to post in this forum. - Вы еще не набрали необходимое количество сообщений, чтобы отправлять сообщения в данном форуме. - 30005 - - 0 - - - core - public_error - forums_no_guests - You must be logged in to see this forum. - Для просмотра этого форума вы должны быть авторизованным пользователем. - 30005 - 30005 - 0 - - - core - public_error - post_too_long - Your post was too long. Please go back and shorten it a little. - Сообщение слишком длинное. - 30005 - - 0 - - - core - public_error - post_too_short - You must enter a post. - Сообщение слишком короткое. - 30005 - - 0 - - - core - public_error - posting_mismatch_topic - There was a problem loading the post you are attempting to edit. Please notify an administrator. - При попытке редактирования сообщения возникла проблема. Пожалуйста сообщите об этом администрации форума. - 30005 - - 0 - - - core - public_error - customfields_empty - - - 30005 - - 0 - - - core - public_error - customfields_invalid - - - 30005 - - 0 - - - core - public_error - member_bad_birthday - You must enter for your birthday at least the month and day of your birthday. - Вы должны указать как минимум месяц и день вашего дня рождения. - 30005 - - 0 - - - core - public_error - members_sig_too_long - Your signature exceeds the maximum allowed length. Please go back and shorten it a little. - У вас слишком длинная подпись. Попробуйте ее немного сократить. - 30005 - - 0 - - - core - public_error - members_profile_disabled - You are not permitted to modify all or some of your profile information. - Вы не можете изменять некоторую информацию в своем профиле. - 30005 - - 0 - - - core - public_error - pp_friend_timeflood - You cannot re-add a friend for five minutes after removing them - Вы не можете добавить этого пользователя в друзья, потому что менее пяти минут назад вы отказались от дружбы с ним. - 30005 - - 0 - - - core - public_error - friends_not_enabled - The friends feature is not enabled on this board. - Возможность добавления пользователей в друзья на данном форуме отключена. - 30005 - - 0 - - - core - public_error - members_tool_supmod - You do not have permission to access this moderator tool. - Вы не имеете доступа к этой модераторской возможности. - 30005 - - 0 - - - core - public_error - cannot_view_memberlist - You do not have permission to view the member listing. - Вы не можете просматривать список пользователей. - 30005 - - 0 - - - core - public_error - customfields_toobig - - - 30005 - - 0 - - - core - public_error - messenger_disabled - You are not allowed to use the private messaging system. - Вы не можете пользоваться личными сообщениями. - 30005 - - 0 - - - core - public_error - messenger_you_be_banned_yo - You have been banned from this personal conversation. - К сожалению вам закрыли доступ к этой переписке. - 30005 - - 0 - - - core - public_error - messenger_no_msgid - We could not determine which message you were attempting to view. - Сообщения, которое вы пытаетесь просмотреть, не существует. - 30005 - - 0 - - - core - public_error - messenger_bad_key - Your secure key, used to verify your identity, did not match the one submitted. Please go back, reload the form, and try again. - Ключ безопасности, который подтверждает вашу личность, не совпадает с отправленным. Пожалуйста, вернитесь назад, обновите страницу и попробуйте отправить снова. - 30005 - - 0 - - - core - public_error - messenger_no_guests - You must be logged in to use the private messaging system. - Для использования личных сообщений необходимо войти в систему. - 30005 - - 0 - - - core - public_error - photos_no_id - - Пользователя, чью фотографию вы пытаетесь посмотреть, не существует. - 30005 - - 0 - - - core - public_error - photos_profiles_off - You are not permitted to view member profiles. - Вы не можете просматривать пользовательские профили. - 30005 - - 0 - - - core - public_error - status_off - You are not permitted to change your status. - Вы не можете изменять статус. - 30005 - - 0 - - - core - public_error - dnames_no_id - - Не существует истории изменения имен для запрашиваемого вами пользователя. - 30005 - - 0 - - - core - public_error - dnames_off - The administrator does not allow members to change their display names. - Возможность изменения имени пользователя отключена администратором. - 30005 - - 0 - - - core - public_error - dname_profiles_off - You are not permitted to view member profiles. - Вы не можете просматривать профили пользователей. - 30005 - - 0 - - - core - public_error - comments_profiles - You are not permitted to view member profiles. - Вы не можете просматривать профили пользователей. - 30005 - - 0 - - - core - public_error - onlinelist_disabled - You are not permitted to view our online list. - Вы не можете просматривать список онлайн пользователей. - 30005 - - 0 - - - core - public_error - settings_profiles_off - You are not permitted to view member profiles. - Вы не можете просматривать профили пользователей. - 30005 - - 0 - - - core - public_error - warn_system_off - The warn system is presently disabled. - Система предупреждений отключена. - 30005 - - 0 - - - core - public_error - profiles_off - You are not permitted to view member profiles. - Вы не можете просматривать профили пользователей. - 30005 - - 0 - - - core - public_error - profiles_no_member - We could not find the member whose profile you were attempting to view. - Вы запросили профиль несуществующего пользователя. - 30005 - - 0 - - - core - public_error - warn_past_max_high - - На данный момент предупредить пользователя невозможно - 30005 - - 0 - - - core - public_error - warn_member_notes - You do not have permission to access this area of the site. - Вы не можете воспользоваться данной возможностью. - 30005 - - 0 - - - core - public_error - warn_no_user - We could not find the requested user. Please go back and try again. - Запрошенный вами пользователь не существует. Попробуйте вернуться назад и повторить попытку. - 30005 - - 0 - - - core - public_error - warn_no_access - You do not have permission to access this area of the site. - Вы не можете воспользоваться данной возможностью. - 30005 - - 0 - - - core - public_error - warn_bad_key - Your secure key, used to verify your identity, did not match the one submitted. Please go back, reload the form, and try again. - Ключ безопасности, который подтверждает вашу личность, не совпадает с отправленным. Пожалуйста, вернитесь назад, обновите страницу и попробуйте отправить снова. - 30005 - - 0 - - - core - public_error - warn_past_max_low - - На данный момент времени понизить уровень предупреждений у данного пользователя невозможно. - 30005 - - 0 - - - core - public_error - warned_already - This member has been warned once already within the allotted time allowed. - Вы пытаетесь предупредить пользователя, который уже был предупрежден. - 30005 - - 0 - - - core - public_error - warn_protected_member - The member you are attempting to warn is protected from such actions. - Вы пытаетесь предупредить пользователя, который защищен от подобных действий. - 30005 - - 0 - - - core - public_error - calendar_delete_no_perm - You do not have permission to delete this calendar event. - Вы не можете удалять события из этого календаря. - 30005 - - 0 - - - core - public_error - calendar_bad_delete - We could not find the event you were attempting to delete. - Удаляемое вами событие не существует. - 30005 - - 0 - - - core - public_error - cal_no_perm - You do not have permission to view this calendar or this calendar does not exist. - Вы не можете просматривать этот календарь, либо календарь просто не существует в системе. - 30005 - - 0 - - - core - public_error - calendar_post_too_long - Your event details were too large. Please shorten it up a little. - Описание события велико. Попробуйте сократить его и повторить добавление события. - 30005 - - 0 - - - core - public_error - calendar_post_too_short - You must submit event details in order to save this event. - Для добавления события необходимо более подробно описать его. - 30005 - - 0 - - - core - public_error - calendar_no_edit_perm - You do not have permission to edit this calendar event. - Вы не можете редактировать события этого календаря. - 30005 - - 0 - - - core - public_error - calendar_no_post_perm - You do not have permission to add events to this calendar. - Вы не можете добавлять новые события в этот календарь. - 30005 - - 0 - - - core - public_error - calendar_no_guests - You must be logged in to save events to our calendar. - Добавлять события в календарь могут только авторизованные пользователи. - 30005 - - 0 - - - core - public_error - calendar_event_not_found - We could not find that calendar event. - Запрашиваемое вами событие не найдено. - 30005 - - 0 - - - core - public_error - calendar_dmy_missing - The day, month or year values supplied in the URL do not appear to valid. - Значения даты, месяца или года, переданные по ссылке не верны. - 30005 - - 0 - - - core - public_error - calendar_bad_approve - You do not have permission to approve this calendar event. - У вас нет прав для удаления этого события. - 30005 - - 0 - - - core - public_error - calendar_bad_key - There was a problem authenticating your request. Please go back and click the link again. - Ошибка безопасности. Пожалуйста вернитесь назад и попробуйте снова. - 30005 - - 0 - - - core - public_error - calendar_no_title - You must submit a valid event title in order to save this event. - Необходимо указать название события - 30005 - - 0 - - - core - public_error - calendar_range_wrong - The end date for a ranged or recurring event must occur after the start date. - Дата окончания события должна быть после даты начала. - 30005 - - 0 - - - core - public_error - calendar_title_too_long - The calendar title cannot be longer than 64 characters. - Название события не может превышать 64 символов. - 30005 - - 0 - - - core - public_error - calendar_invalid_date - The date you chose for the event is not a valid date. For example, February 30th and April 31st are invalid dates. Please verify your input and resubmit the form. - Выбранная вами дата неверна. Например не может быть 30 февраля или 31 апреля. Пожалуйста убедитесь в правильности ввода даты и отправьте форму снова. - 30005 - - 0 - - - core - public_error - calendar_invalid_date_view - You requested to see events for an invalid date. Please go back and try again. - Вы пытаетесь вывести события для неверной даты. Пожалуйста вернитесь назад и попробуйте снова. - 30005 - - 0 - - - core - public_error - no_chat_account_number - The chat room has not been properly setup by the administrator (the chat room account number has not been supplied). - Чат не установлен. - 30005 - - 0 - - - core - public_error - calendar_no_birthdays - We did not find any birthdays on this date. - В этот день дней рождения не найдено. - 30005 - - 0 - - - core - public_error - no_chat_default_room - The administrator has not configured a default chat room yet. - Чат не настроен. - 30005 - - 0 - - - core - public_error - no_chat_access - You do not have access to our chat room. - У вас нет доступа к нашему чату. - 30005 - - 0 - - - core - public_error - portal_not_enabled - The portal has not been enabled. Please contact an administrator. - Портал не включен. - 30005 - - 0 - - - core - public_error - no_chat_service_type - The administrator has not configured the service type for the chat room yet. - Данный сервис чата не настроен. - 30005 - - 0 - - - core - public_error - server_too_busy - Sorry, the server is too busy to handle your request, please try again in a moment - Приносим свои изменения. Сервер в данный момент слишком перегружен. Зайдите позже. - 30005 - - 0 - - - core - public_error - account_susp - Your account has been temporarily suspended. This suspension is due to end on %s. - Ваша учетная запись заблокирована. Срок окончания блокировки: %s. - 30005 - - 0 - - - core - public_error - attach_no_attachment - We could not find the attachment you were attempting to view. - Запрашиваемый вами прикрепленный файл не найден. - 30005 - - 0 - - - core - public_error - no_such_user - We could not find the member you requested. - Запрашиваемый вами пользователь не найден. - 30005 - - 0 - - - core - public_error - no_permission_to_download - You do not have permission to view this attachment. - У вас не достаточно прав для загрузки данного прикрепленного файла. - 30005 - - 0 - - - core - public_error - err_attach_not_attached - You do not have permission to view this attachment. - У вас не достаточно прав для просмотра этого прикрепленного файла. - 30005 - - 0 - - - core - public_error - attach_file_missing - We could not find the attachment you were attempting to view. - Запрашиваемый вами прикрепленный файл не найден. - 30005 - - 0 - - - core - public_error - reports_no_event - We could not determine which event you were attempting to report. - Системе не удалось найти событие на которое вы пытаетесь отправить жалобу. - 30005 - - 0 - - - core - public_error - messenger_no_delete_permission - You do not have permission to delete this topic. - У вас не достаточно прав для удаления темы. - 30005 - - 0 - - - core - public_error - reg_off - The board administrator is no longer accepting any new registrations at the moment. - Администрация отключила регистрацию на форуме. - 30005 - - 0 - - - core - public_error - no_archive_messages - Sorry, no personal messages were found using that search critera. Try again and broaden the scope. - К сожалению по данному поисковому запросу личных сообщений не найдено. Попробуйте расширить критерии поиска и повторить. - 30005 - - 0 - - - core - public_error - upload_failed - The upload failed. Please contact a member of staff to help rectify the problem. - Загрузка не удалась. Пожалуйста сообщите об этом администрации форума. - 30005 - - 0 - - - core - public_error - no_ignore_id - We could not find the member you were attempting to ignore. - Системе не удалось найти пользователя, которого вы хотите занести в список игнорируемых. - 30005 - - 0 - - - core - public_error - no_friend_mid - Only members have access to the friends feature. - Возможность «Друзья» доступна только зарегистрированным пользователям. - 30005 - - 0 - - - core - public_error - erl_enter_name - Your account username - Логин - 30005 - - 0 - - - core - public_error - erl_enter_pass - Your account password - Пароль - 30005 - - 0 - - - core - public_error - bad_email_message - The email message contained data you are not allowed to send. Please contact an administrator with any questions. - В вашем письме содержится не допустимая информация. Вы можете связаться с администрацией форума за дополнительными разъяснениями. - 30005 - 30005 - 0 - - - core - public_error - exp_text - - Возникла ошибка. Если вы не уверены, что правильно используете функцию, советуем вам обратиться к нашей системе помощи за дополнительной информацией. - 30005 - - 0 - - - core - public_error - erl_log_in_submit - Log In - Войти - 30005 - - 0 - - - core - public_error - stf_no_email - You must enter the email address of the person you are sending this page to - Необходимо ввести e-mail адрес человека, которому вы хотите отправить эту страницу - 30005 - 30005 - 0 - - - core - public_error - stf_no_msg - You must enter a message to send - Необходимо ввести текст сообщения - 30005 - - 0 - - - core - public_error - stf_no_subject - You must enter a subject for the email - Необходимо ввести тему сообщения - 30005 - 30005 - 0 - - - core - public_error - stf_no_name - You must enter the name of the person you are sending this page to - Необходимо ввести имя получателя - 30005 - + subject__email_convo + Personal Conversation Archive + Архив личной переписки + 31006 + 31006 0 @@ -4813,38 +2685,8 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> missing_files Sorry, some required files are missing. Please go back and try again. Отсутствуют необходимые для работы файлы. Вернитесь назад и попробуйте снова. - 30005 - - 0 - - - core - public_error - complete_form - You must complete the form fully before proceeding. Please go back and check the data you entered. - Необходимо заполнить форму полностью. Пожалуйста вернитесь назад и проделайте это. - 30005 - - 0 - - - core - public_error - forgot_pass - Forgotten your password? - Забыли пароль? - 30005 - 30005 - 0 - - - core - public_error - pass_link - Click here! - Вам сюда! - 30005 - + 31006 + 31006 0 @@ -4853,68 +2695,2538 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> no_permission Sorry, but you do not have permission to use this feature. If you are not logged in, you may do so using the form below if available. К сожалению вы не можете воспользоваться этой возможностью. Если вы еще не вошли на форум, возможно, сделав это вы сможете воспользоваться ей. - 30005 - + 31006 + 31006 0 core public_error - incorrect_use - Incorrect use of one of the board files. - Не правильное обращение к одному из файлов форума. - 30005 - + forgot_pass + Forgotten your password? + Забыли пароль? + 31006 + 31006 0 core public_error - poss_hack_attempt - We are treating that action as a possible hack attempt. This action will be logged and the board administrator will be informed via email. - Система определила данное действие как попытку взлома. О данном факте было сообщено администратору форума. - 30005 - 30005 + pass_link + Click here! + Вам сюда! + 31006 + 31006 0 core public_error - no_guests - - К сожалению данная возможность не доступна для гостей. - 30005 - + complete_form + You must complete the form fully before proceeding. Please go back and check the data you entered. + Необходимо заполнить форму полностью. Пожалуйста вернитесь назад и проделайте это. + 31006 + 31006 0 core public_error - pass_blank - Your password field was not complete - Вы не ввели пароль. - 30005 - + stf_no_name + You must enter the name of the person you are sending this page to + Необходимо ввести имя получателя + 31006 + 31006 0 core public_error - del_post - Authorization mismatch - please go back and try again. If you have been trying to access a function incorrectly, please use the proper method. - Ошибка безопасности - пожалуйста вернитесь назад и попробуйте снова. - 30005 - + stf_no_subject + You must enter a subject for the email + Необходимо ввести тему сообщения + 31006 + 31006 0 core public_error - err_UNKNOWN - An unknown error occurred - Возникла ошибка - 30007 - + stf_no_msg + You must enter a message to send + Необходимо ввести текст сообщения + 31006 + 31006 + 0 + + + core + public_error + stf_no_email + You must enter the email address of the person you are sending this page to + Необходимо ввести e-mail адрес человека, которому вы хотите отправить эту страницу + 31006 + 31006 + 0 + + + core + public_error + exp_text + + Возникла ошибка. Если вы не уверены, что правильно используете функцию, советуем вам обратиться к нашей системе помощи за дополнительной информацией. + 31006 + 31006 + 0 + + + core + public_error + erl_log_in_submit + Log In + Войти + 31006 + 31006 + 0 + + + core + public_error + erl_enter_name + Your account username + Логин + 31006 + 31006 + 0 + + + core + public_error + erl_enter_pass + Your account password + Пароль + 31006 + 31006 + 0 + + + core + public_error + no_friend_mid + Only members have access to the friends feature. + Возможность «Друзья» доступна только зарегистрированным пользователям. + 31006 + 31006 + 0 + + + core + public_error + bad_email_message + The email message contained data you are not allowed to send. Please contact an administrator with any questions. + В вашем письме содержится не допустимая информация. Вы можете связаться с администрацией форума за дополнительными разъяснениями. + 31006 + 31006 + 0 + + + core + public_error + no_ignore_id + We could not find the member you were attempting to ignore. + Системе не удалось найти пользователя, которого вы хотите занести в список игнорируемых. + 31006 + 31006 + 0 + + + core + public_error + no_archive_messages + Sorry, no personal messages were found using that search critera. Try again and broaden the scope. + К сожалению по данному поисковому запросу личных сообщений не найдено. Попробуйте расширить критерии поиска и повторить. + 31006 + 31006 + 0 + + + core + public_error + upload_failed + The upload failed. Please contact a member of staff to help rectify the problem. + Загрузка не удалась. Пожалуйста сообщите об этом администрации форума. + 31006 + 31006 + 0 + + + core + public_error + reg_off + The board administrator is no longer accepting any new registrations at the moment. + Администрация отключила регистрацию на форуме. + 31006 + 31006 + 0 + + + core + public_error + messenger_no_delete_permission + You do not have permission to delete this topic. + У вас не достаточно прав для удаления темы. + 31006 + 31006 + 0 + + + core + public_error + reports_no_event + We could not determine which event you were attempting to report. + Системе не удалось найти событие на которое вы пытаетесь отправить жалобу. + 31006 + 31006 + 0 + + + core + public_error + err_attach_not_attached + You do not have permission to view this attachment. + У вас не достаточно прав для просмотра этого прикрепленного файла. + 31006 + 31006 + 0 + + + core + public_error + attach_file_missing + We could not find the attachment you were attempting to view. + Запрашиваемый вами прикрепленный файл не найден. + 31006 + 31006 + 0 + + + core + public_error + no_permission_to_download + You do not have permission to view this attachment. + У вас не достаточно прав для загрузки данного прикрепленного файла. + 31006 + 31006 + 0 + + + core + public_error + attach_no_attachment + We could not find the attachment you were attempting to view. + Запрашиваемый вами прикрепленный файл не найден. + 31006 + 31006 + 0 + + + core + public_error + no_such_user + We could not find the member you requested. + Запрашиваемый вами пользователь не найден. + 31006 + 31006 + 0 + + + core + public_error + server_too_busy + Sorry, the server is too busy to handle your request, please try again in a moment + Приносим свои изменения. Сервер в данный момент слишком перегружен. Зайдите позже. + 31006 + 31006 + 0 + + + core + public_error + account_susp + Your account has been temporarily suspended. This suspension is due to end on %s. + Ваша учетная запись заблокирована. Срок окончания блокировки: %s. + 31006 + 31006 + 0 + + + core + public_error + portal_not_enabled + The portal has not been enabled. Please contact an administrator. + Портал не включен. + 31006 + 31006 + 0 + + + core + public_error + no_chat_service_type + The administrator has not configured the service type for the chat room yet. + Данный сервис чата не настроен. + 31006 + 31006 + 0 + + + core + public_error + no_chat_access + You do not have access to our chat room. + У вас нет доступа к нашему чату. + 31006 + 31006 + 0 + + + core + public_error + no_chat_default_room + The administrator has not configured a default chat room yet. + Чат не настроен. + 31006 + 31006 + 0 + + + core + public_error + calendar_no_birthdays + We did not find any birthdays on this date. + В этот день дней рождения не найдено. + 31006 + 31006 + 0 + + + core + public_error + no_chat_account_number + The chat room has not been properly setup by the administrator (the chat room account number has not been supplied). + Чат не установлен. + 31006 + 31006 + 0 + + + core + public_error + calendar_invalid_date + The date you chose for the event is not a valid date. For example, February 30th and April 31st are invalid dates. Please verify your input and resubmit the form. + Выбранная вами дата неверна. Например не может быть 30 февраля или 31 апреля. Пожалуйста убедитесь в правильности ввода даты и отправьте форму снова. + 31006 + 31006 + 0 + + + core + public_error + calendar_invalid_date_view + You requested to see events for an invalid date. Please go back and try again. + Вы пытаетесь вывести события для неверной даты. Пожалуйста вернитесь назад и попробуйте снова. + 31006 + 31006 + 0 + + + core + public_error + calendar_range_wrong + The end date for a ranged or recurring event must occur after the start date. + Дата окончания события должна быть после даты начала. + 31006 + 31006 + 0 + + + core + public_error + calendar_title_too_long + The calendar title cannot be longer than 64 characters. + Название события не может превышать 64 символов. + 31006 + 31006 + 0 + + + core + public_error + calendar_no_title + You must submit a valid event title in order to save this event. + Необходимо указать название события + 31006 + 31006 + 0 + + + core + public_error + calendar_post_too_long + Your event details were too large. Please shorten it up a little. + Описание события велико. Попробуйте сократить его и повторить добавление события. + 31006 + 31006 + 0 + + + core + public_error + calendar_post_too_short + You must submit event details in order to save this event. + Для добавления события необходимо более подробно описать его. + 31006 + 31006 + 0 + + + core + public_error + calendar_no_post_perm + You do not have permission to add events to this calendar. + Вы не можете добавлять новые события в этот календарь. + 31006 + 31006 + 0 + + + core + public_error + calendar_no_edit_perm + You do not have permission to edit this calendar event. + Вы не можете редактировать события этого календаря. + 31006 + 31006 + 0 + + + core + public_error + calendar_no_guests + You must be logged in to save events to our calendar. + Добавлять события в календарь могут только авторизованные пользователи. + 31006 + 31006 + 0 + + + core + public_error + calendar_event_not_found + We could not find that calendar event. + Запрашиваемое вами событие не найдено. + 31006 + 31006 + 0 + + + core + public_error + calendar_dmy_missing + The day, month or year values supplied in the URL do not appear to valid. + Значения даты, месяца или года, переданные по ссылке не верны. + 31006 + 31006 + 0 + + + core + public_error + calendar_bad_approve + You do not have permission to approve this calendar event. + У вас нет прав для удаления этого события. + 31006 + 31006 + 0 + + + core + public_error + calendar_bad_key + There was a problem authenticating your request. Please go back and click the link again. + Ошибка безопасности. Пожалуйста вернитесь назад и попробуйте снова. + 31006 + 31006 + 0 + + + core + public_error + cal_no_perm + You do not have permission to view this calendar or this calendar does not exist. + Вы не можете просматривать этот календарь, либо календарь просто не существует в системе. + 31006 + 31006 + 0 + + + core + public_error + calendar_bad_delete + We could not find the event you were attempting to delete. + Удаляемое вами событие не существует. + 31006 + 31006 + 0 + + + core + public_error + calendar_delete_no_perm + You do not have permission to delete this calendar event. + Вы не можете удалять события из этого календаря. + 31006 + 31006 + 0 + + + core + public_error + warned_already + This member has been warned once already within the allotted time allowed. + Вы пытаетесь предупредить пользователя, который уже был предупрежден. + 31006 + 31006 + 0 + + + core + public_error + warn_protected_member + The member you are attempting to warn is protected from such actions. + Вы пытаетесь предупредить пользователя, который защищен от подобных действий. + 31006 + 31006 + 0 + + + core + public_error + warn_past_max_low + + На данный момент времени понизить уровень предупреждений у данного пользователя невозможно. + 31006 + 31006 + 0 + + + core + public_error + warn_bad_key + Your secure key, used to verify your identity, did not match the one submitted. Please go back, reload the form, and try again. + Ключ безопасности, который подтверждает вашу личность, не совпадает с отправленным. Пожалуйста, вернитесь назад, обновите страницу и попробуйте отправить снова. + 31006 + 31006 + 0 + + + core + public_error + warn_past_max_high + + На данный момент предупредить пользователя невозможно + 31006 + 31006 + 0 + + + core + public_error + warn_member_notes + You do not have permission to access this area of the site. + Вы не можете воспользоваться данной возможностью. + 31006 + 31006 + 0 + + + core + public_error + warn_no_user + We could not find the requested user. Please go back and try again. + Запрошенный вами пользователь не существует. Попробуйте вернуться назад и повторить попытку. + 31006 + 31006 + 0 + + + core + public_error + warn_no_access + You do not have permission to access this area of the site. + Вы не можете воспользоваться данной возможностью. + 31006 + 31006 + 0 + + + core + public_error + warn_system_off + The warn system is presently disabled. + Система предупреждений отключена. + 31006 + 31006 + 0 + + + core + public_error + settings_profiles_off + You are not permitted to view member profiles. + Вы не можете просматривать профили пользователей. + 31006 + 31006 + 0 + + + core + public_error + profiles_off + You are not permitted to view member profiles. + Вы не можете просматривать профили пользователей. + 31006 + 31006 + 0 + + + core + public_error + profiles_no_member + We could not find the member whose profile you were attempting to view. + Вы запросили профиль несуществующего пользователя. + 31006 + 31006 + 0 + + + core + public_error + photos_no_id + + Пользователя, чью фотографию вы пытаетесь посмотреть, не существует. + 31006 + 31006 + 0 + + + core + public_error + status_off + You are not permitted to change your status. + Вы не можете изменять статус. + 31006 + 31006 + 0 + + + core + public_error + photos_profiles_off + You are not permitted to view member profiles. + Вы не можете просматривать пользовательские профили. + 31006 + 31006 + 0 + + + core + public_error + dnames_no_id + + Не существует истории изменения имен для запрашиваемого вами пользователя. + 31006 + 31006 + 0 + + + core + public_error + dnames_off + The administrator does not allow members to change their display names. + Возможность изменения имени пользователя отключена администратором. + 31006 + 31006 + 0 + + + core + public_error + onlinelist_disabled + You are not permitted to view our online list. + Вы не можете просматривать список онлайн пользователей. + 31006 + 31006 + 0 + + + core + public_error + comments_profiles + You are not permitted to view member profiles. + Вы не можете просматривать профили пользователей. + 31006 + 31006 + 0 + + + core + public_error + dname_profiles_off + You are not permitted to view member profiles. + Вы не можете просматривать профили пользователей. + 31006 + 31006 + 0 + + + core + public_error + messenger_you_be_banned_yo + You have been banned from this personal conversation. + К сожалению вам закрыли доступ к этой переписке. + 31006 + 31006 + 0 + + + core + public_error + messenger_no_msgid + We could not determine which message you were attempting to view. + Сообщения, которое вы пытаетесь просмотреть, не существует. + 31006 + 31006 + 0 + + + core + public_error + messenger_bad_key + Your secure key, used to verify your identity, did not match the one submitted. Please go back, reload the form, and try again. + Ключ безопасности, который подтверждает вашу личность, не совпадает с отправленным. Пожалуйста, вернитесь назад, обновите страницу и попробуйте отправить снова. + 31006 + 31006 + 0 + + + core + public_error + messenger_disabled + You are not allowed to use the private messaging system. + Вы не можете пользоваться личными сообщениями. + 31006 + 31006 + 0 + + + core + public_error + messenger_no_guests + You must be logged in to use the private messaging system. + Для использования личных сообщений необходимо войти в систему. + 31006 + 31006 + 0 + + + core + public_error + cannot_view_memberlist + You do not have permission to view the member listing. + Вы не можете просматривать список пользователей. + 31006 + 31006 + 0 + + + core + public_error + customfields_toobig + + + 31006 + 31006 + 0 + + + core + public_error + customfields_empty + + + 31006 + 31006 + 0 + + + core + public_error + customfields_invalid + + + 31006 + 31006 + 0 + + + core + public_error + member_bad_birthday + You must enter for your birthday at least the month and day of your birthday. + Вы должны указать как минимум месяц и день вашего дня рождения. + 31006 + 31006 + 0 + + + core + public_error + members_sig_too_long + Your signature exceeds the maximum allowed length. Please go back and shorten it a little. + У вас слишком длинная подпись. Попробуйте ее немного сократить. + 31006 + 31006 + 0 + + + core + public_error + members_profile_disabled + You are not permitted to modify all or some of your profile information. + Вы не можете изменять некоторую информацию в своем профиле. + 31006 + 31006 + 0 + + + core + public_error + pp_friend_timeflood + You cannot re-add a friend for five minutes after removing them + Вы не можете добавить этого пользователя в друзья, потому что менее пяти минут назад вы отказались от дружбы с ним. + 31006 + 31006 + 0 + + + core + public_error + friends_not_enabled + The friends feature is not enabled on this board. + Возможность добавления пользователей в друзья на данном форуме отключена. + 31006 + 31006 + 0 + + + core + public_error + posting_mismatch_topic + There was a problem loading the post you are attempting to edit. Please notify an administrator. + При попытке редактирования сообщения возникла проблема. Пожалуйста сообщите об этом администрации форума. + 31006 + 31006 + 0 + + + core + public_error + members_tool_supmod + You do not have permission to access this moderator tool. + Вы не имеете доступа к этой модераторской возможности. + 31006 + 31006 + 0 + + + core + public_error + post_too_short + You must enter a post. + Сообщение слишком короткое. + 31006 + 31006 + 0 + + + core + public_error + post_too_long + Your post was too long. Please go back and shorten it a little. + Сообщение слишком длинное. + 31006 + 31006 + 0 + + + core + public_error + forums_no_guests + You must be logged in to see this forum. + Для просмотра этого форума вы должны быть авторизованным пользователем. + 31006 + 31006 + 0 + + + core + public_error + posting_not_enough_posts + You do not have enough posts to post in this forum. + Вы еще не набрали необходимое количество сообщений, чтобы отправлять сообщения в данном форуме. + 31006 + 31006 + 0 + + + core + public_error + forums_no_permission + You do not have permission to view this forum. + Вы не можете просматривать этот форум. + 31006 + 31006 + 0 + + + core + public_error + forums_no_view_topic + You do not have permission to view this topic. + Вы не можете просматривать эту тему. + 31006 + 31006 + 0 + + + core + public_error + forums_not_enough_posts + You do not have enough posts to view topics in this forum. + Вы еще не набрали необходимого количества сообщений чтобы просматривать список тем данного форума. + 31006 + 31006 + 0 + + + core + public_error + posting_bad_auth_key + Your secure key, used to verify you are posting the topic, did not match the one submitted. Please go back, reload the form, and try again. + Ваш ключ безопасности, использующийся для проверки того, что именно вы отправляете данные формы не совпал с отправленным. Пожалуйста, вернитесь назад, обновите страницу и попробуйте отправить снова. + 31006 + 31006 + 0 + + + core + public_error + flood_control + The administrator has limited the number of new posts you can submit within a short time frame. Please wait %s seconds before replying or posting a new topic. + Стоит делать передышку в %s секунд между отправками новых тем и сообщений. + 31006 + 31006 + 0 + + + core + public_error + posting_restricted + Your posting rights have been removed by an administrator. + Вам запрещено общаться на форуме. + 31006 + 31006 + 0 + + + core + public_error + posting_off_susp + Your posting rights have been temporarily suspended. The suspension is due to end %s. + Вам запретили общаться на форуме до %s. + 31006 + 31006 + 0 + + + core + public_error + posting_bad_action + We could not determine what action you were attempting to take. + Невозможно определить что пытаетесь сделать. + 31006 + 31006 + 0 + + + core + public_error + multimod_not_found + We could not determine which multi-moderation tool you were attempting to use. + Запрашиваемое действие мульти-модерации не существует в системе. + 31006 + 31006 + 0 + + + core + public_error + multimod_no_topic + We could not determine which topic you were attempting to take action against. + Темы не существует. + 31006 + 31006 + 0 + + + core + public_error + multimod_no_perms + You do not have permission to use this multi-moderation tool on this topic. + Вы не можете использовать мульти-модерацию на данной теме. + 31006 + 31006 + 0 + + + core + public_error + mod_bad_fid + You appear to have submitted an invalid forum. + Идентификатор форума неверен. + 31006 + 31006 + 0 + + + core + public_error + mod_bad_tid + You appear to have submitted an invalid topic. + Идентификатор темы неверен. + 31006 + 31006 + 0 + + + core + public_error + mod_bad_pid + You appear to have submitted an invalid post. + Идентификатор сообщения неверен. + 31006 + 31006 + 0 + + + core + public_error + mod_no_authorization_key + We use an authorization key to verify you really submitted the form, and the authorization key was not supplied with your form submission or was invalid. Please go back, reload the form and try to submit it again. + Для подтверждения того, что именно вы отправили формы используется ключ авторизации. Вместе с этой формой ключ не был отправлен либо он неверный. Пожалуйста, вернитесь назад, обновите страницу и попробуйте отправить снова. + 31006 + 31006 + 0 + + + core + public_error + mod_no_mm_id + We could not determine which multi-moderation tool you were attempting to use. + Невозможно определить какой инструмент мультимодерации вы пытаетесь использовать. + 31006 + 31006 + 0 + + + core + public_error + mod_no_multimod + You do not have permission to use this multi-moderation tool. + Вы не можете использовать функцию мульти-модерации. + 31006 + 31006 + 0 + + + core + public_error + mod_um_what_now + + Действие, которое вы пытаетесь произвести, не существует в системе. + 31006 + 31006 + 0 + + + core + public_error + mod_stupid_beggar + Out of all the options in all the drop down, you had to choose one with dashed lines, well done. Go back and behave yourself. + Отлично, вы только что умудрились из всех опций в списке выбрать самую бесполезную, состоящую из одних черточек. Вернитесь назад и исправьте ошибку. + 31006 + 31006 + 0 + + + core + public_error + mod_no_prune_topics + We could not find any topics to prune that met your filter criteria. + Системе не удалось найти сообщения для удаления, удовлетворяющие вашему фильтру. + 31006 + 31006 + 0 + + + core + public_error + mod_no_prune_member + We could not find the member whose topics you are attempting to prune. + Пользователь, чьи сообщения вы пытаетесь удалить, не существует. + 31006 + 31006 + 0 + + + core + public_error + mod_topics_merge_two + You need to select at least two topics in order to merge them. + Для объединения необходимо выбрать как минимум две темы. + 31006 + 31006 + 0 + + + core + public_error + mod_no_open_perms + You do not have permission to open this topic. + Вы не можете открыть эту тему. + 31006 + 31006 + 0 + + + core + public_error + mod_no_topic_title + You must specify the topic title. + Вы должны указать название темы. + 31006 + 31006 + 0 + + + core + public_error + mod_no_open_opened + The topic you are attempting to open is already open. + Вы пытаетесь открыть уже открытую тему. + 31006 + 31006 + 0 + + + core + public_error + mod_no_delete_post_find + We could not find the post you were attempting to delete. + Сообщение, которое вы пытаетесь удалить, не существует. + 31006 + 31006 + 0 + + + core + public_error + mod_no_move_save + Why, oh why, would you attempt to move a topic into the same forum it is already in? Do YOU see the logic in that? + Вы пытаетесь переместить тему в тот же самый форум, в котором она находится сейчас. + 31006 + 31006 + 0 + + + core + public_error + moderate_no_permission + You do not have permission to carry out that function. + Вы не можете использовать эту возможность. + 31006 + 31006 + 0 + + + core + public_error + mod_no_move_forum + We could not determine which forum you were attempting to move the topic into. + Форума, куда вы пытаетесь перенести тему, не существует. + 31006 + 31006 + 0 + + + core + public_error + mod_same_topics + You cannot merge a topic into itself. That would be illogical captain! (tm) + Вы пытаетесь объединить тему саму с собой. Это же не логично! + 31006 + 31006 + 0 + + + core + public_error + mod_missing_old_topic + We could not find one of the topics you were attempting to merge. + Не существует одной из тем, которые вы пытаетесь объединить. + 31006 + 31006 + 0 + + + core + public_error + mod_missing_url_title + You must fill in the form completely. You omitted either the URL of the topic or the new topic title. + Похоже что вы не заполнили форму надлежащим образом. Вы пропустили или URL, или название новой темы. + 31006 + 31006 + 0 + + + core + public_error + mod_no_close_topic + You do not have permission to close this topic. + Вы не можете закрыть эту тему. + 31006 + 31006 + 0 + + + core + public_error + mod_no_delete_topic + You do not have permission to delete this topic. + Вы не можете удалить эту тему. + 31006 + 31006 + 0 + + + core + public_error + mod_merge_posts + + Недостаточно данных для завершения этого действия. Пожалуйста убедитесь, что форма была правильно заполнена. + 31006 + 31006 + 0 + + + core + public_error + mod_only_one_pid + You must select more than one post for moderation. + Необходимо выбрать более одного сообщения для осуществления этого действия. + 31006 + 31006 + 0 + + + core + public_error + mod_no_pids + You did not select any posts for moderation. + Вы не выбрали ни одного сообщения для осуществления этого действия. + 31006 + 31006 + 0 + + + core + public_error + mod_forum_no_posts + The forum you are attempting to move the topic to does not allow posting or displaying of topics. As a result the topic would be sucked into a black hole and lost in oblivion. How about you try a different forum? + Вы пытаетесь перенести тему в форум где запрещен просмотр тем или отправка сообщений. + 31006 + 31006 + 0 + + + core + public_error + mod_need_title + You must specify the topic title of the new topic. + Вы должны ввести название новой темы. + 31006 + 31006 + 0 + + + core + public_error + mod_no_forum_move + We could not find the forum you were attempting to place the topic into. + Вы пытаетесь перенести тему в несуществующий форум. + 31006 + 31006 + 0 + + + core + public_error + mod_delete_first_post + You cannot delete the first post in a topic. You should delete the topic itself instead. + Вы пытаетесь удалить первое сообщение в теме. Этого делать нельзя. Если вам нужно удалить тему, воспользуйтесь специально предназначенной для этого опцией. + 31006 + 31006 + 0 + + + core + public_error + mod_not_enough_split + There are not enough posts in this topic to split it. + В этой теме недостаточно сообщений для того чтобы разделить ее. + 31006 + 31006 + 0 + + + core + public_error + mod_too_much_split + You cannot split all posts within this topic to another topic. You must leave at least one post in this topic. + Вы пытаетесь перенести все сообщения темы, этого делать нельзя. В старой теме должно остаться хотя бы одно сообщение. + 31006 + 31006 + 0 + + + core + public_error + mod_topic_pinned + The topic you are attempting to pin is already pinned. + Вы пытаетесь поднять уже поднятую тему. + 31006 + 31006 + 0 + + + core + public_error + mod_topic_unpinned + The topic you are attempting to unpin is not currently pinned. + Вы пытаетесь опустить уже опущенную тему. + 31006 + 31006 + 0 + + + core + public_error + mod_no_tid + We could not determine which topic you were attempting to moderate. + Темы не существует. + 31006 + 31006 + 0 + + + core + public_error + mod_no_mid + We could not determine which member you were attempting to edit. + Системе не удалось найти пользователя, профиль которого вы пытаетесь отредактировать. + 31006 + 31006 + 0 + + + core + public_error + mod_only_supermods + Only supermoderators have access to perform this function. + Данная возможность доступна только супермодераторам. + 31006 + 31006 + 0 + + + core + public_error + mod_admin_edit + You are not permitted to edit an administrator. + Вы не можете редактировать профиль администратора. + 31006 + 31006 + 0 + + + core + public_error + tracker_already_track + You are already subscribed to this topic. + Вы уже подписаны на эту тему. + 31006 + 31006 + 0 + + + core + public_error + tracker_only_members + Only registered members can subscribe to topics on our forums. Why not register an account? + Опция отслеживания тем доступна только нашим зарегистрированным пользователям. Почему бы не зарегистрироваться сейчас? + 31006 + 31006 + 0 + + + core + public_error + tracker_no_fid + We could not determine which forum the topic you are attempting to subscribe to is in. + Системе не удалось найти форум темы на которую вы пытаетесь подписаться. + 31006 + 31006 + 0 + + + core + public_error + tracker_no_tid + We could not determine which topic you are attempting to subscribe to. + Тема, на которую вы пытаетесь подписаться, не существует. + 31006 + 31006 + 0 + + + core + public_error + topics_not_yours2 + You cannot view this topic because it is not your topic and the administrator has specified that you can only view your own topics in this forum. + Вы пытаетесь просмотреть тему, автором которой вы не являетесь. В данном разделе форума вы можете просматривать только свои темы. + 31006 + 31006 + 0 + + + core + public_error + topics_not_yours + You cannot view this topic because it is not your topic and the administrator has specified that you can only view your own topics. + Вы пытаетесь просмотреть тему, автором которой вы не являетесь. Вы можете просматривать только свои темы. + 31006 + 31006 + 0 + + + core + public_error + topics_post_not_in_topic + You requested a post that is not part of this topic. Please verify the URL you clicked or contact an administrator. + Вы запросили сообщение, которое не является частью данной темы. Проверьте правильность ссылки, по которой вы нажали или обратитесь к администрации форума. + 31006 + 31006 + 0 + + + core + public_error + topics_none_older + There are no older topics in this forum. + В форуме не осталось старых тем. + 31006 + 31006 + 0 + + + core + public_error + topics_none_newer + There are no newer topics in this forum. + В форуме не осталось новых тем. + 31006 + 31006 + 0 + + + core + public_error + topic_vote_not_enough + You must cast your vote in each question of the poll. + Необходимо ответить на каждый вопрос опроса. + 31006 + 31006 + 0 + + + core + public_error + topic_vote_noreply + You do not have permission to vote in this poll. + Вы не можете оставлять сообщения в данном опросе. + 31006 + 31006 + 0 + + + core + public_error + topic_vote_already + You have already voted in this poll. You are only allowed to vote in a poll once. + Вы уже голосовали в этом опросе. + 31006 + 31006 + 0 + + + core + public_error + topic_vote_locked + You are not allowed to vote in polls that are locked. + Вы не можете голосовать в опросах, которые закрыты. + 31006 + 31006 + 0 + + + core + public_error + topic_cannot_vote + You do not have permission to vote in this poll. + Вы не можете голосовать в данном опросе. + 31006 + 31006 + 0 + + + core + public_error + topic_rate_locked + You are not allowed to rate topics that are locked. + Вы не можете оценивать закрытые темы. + 31006 + 31006 + 0 + + + core + public_error + topic_rate_no_perm + You do not have permission to rate this topic. + У вас нет прав для выставления рейтинга этой теме. + 31006 + 31006 + 0 + + + core + public_error + topics_no_fid + We could not determine which forum this topic is in. + Система не смогла найти форум, которому принадлежит тема. + 31006 + 31006 + 0 + + + core + public_error + topic_not_approved + You do not have permission to view this topic. + У вас нет прав для просмотра этой темы. + 31006 + 31006 + 0 + + + core + public_error + topics_no_tid + We could not determine which topic you were attempting to view. + Система не смогла найти тему, которую вы пытаетесь посмотреть. + 31006 + 31006 + 0 + + + core + public_error + markread_no_id + We could not find the forum id you were attempting to mark as read. + Система не смогла найти форум, который вы хотите пометить прочтенным. + 31006 + 31006 + 0 + + + core + public_error + forums_wrong_pass + Sorry, but the password you entered is not correct. Please contact an administrator for assistance. + К сожалению введенный вами пароль не верен. Обратитесь к администрации форума за помощью. + 31006 + 31006 + 0 + + + core + public_error + forums_bad_filter + The topic filter settings you submitted are not valid. Please go back and reset your topic filter settings. + Параметры фильтрации темы неверны. Пожалуйста вернитесь назад и обновите настройки фильтра темы. + 31006 + 31006 + 0 + + + core + public_error + forums_pass_blank + This forum requires a password to gain access to it. Please go back and fill in the password field before submitting the form. + Данный форум защищен паролем. Пожалуйста вернитесь назад и заполните поле пароля, прежде чем снова отправить форму. + 31006 + 31006 + 0 + + + core + public_error + forums_why_l_gt_1 + Why is the L greater than 1? Looks kinda suspicious if you ask me. + Почему L больше 1? Потому что гладиолус! + 31006 + 31006 + 0 + + + core + public_error + forums_no_rules + There are no forum-specific rules configured for this forum. Please refer to the board rules instead. + Данный раздел не имеет каких-то особенных правил. Пожалуйста ознакомьтесь с основными правилами форума. + 31006 + 31006 + 0 + + + core + public_error + forums_no_access + You do not have permission to view topics in this forum. + У вас нет прав для просмотра тем в данном форуме. + 31006 + 31006 + 0 + + + core + public_error + forums_no_id + We could not find the forum you were attempting to view. + Система не смогла найти форум, который вы пытаетесь посмотреть. + 31006 + 31006 + 0 + + + core + public_error + findpost_missing_pid + We could not find the post you were attempting to view. + Система не смогла найти сообщение, которое вы пытаетесь посмотреть. + 31006 + 31006 + 0 + + + core + public_error + findpost_missing_topic + We could not find the topic that this post belongs to. + Система не смогла найти тему к которой принадлежит это сообщение. + 31006 + 31006 + 0 + + + core + public_error + attach_no_forum_perm + You do not have permission to view attachments in the forum this topic is in. + У вас нет прав для просмотра прикрепленный файлов в форуме в котором находится тема с прикреплениями. + 31006 + 31006 + 0 + + + core + public_error + attach_no_attachments + The specified topic does not have any attachments to view. + Указанная тема не содержит прикрепленных файлов. + 31006 + 31006 + 0 + + + core + public_error + attach_missing_tid + We could not determine which topic you were attempting to view attachments from. + Система не смогла найти тему к которой принадлежат прикрепленные файлы, которые вы пытаетесь посмотреть. + 31006 + 31006 + 0 + + + core + public_error + announcement_no_perms + You do not have permission to read the requested announcement. + У вас нет прав чтобы прочитать запрашиваемое объявление. + 31006 + 31006 + 0 + + + core + public_error + announcement_id_missing + We could not determine which announcement you were attempting to view. + Система не смогла найти объявление, которое вы пытаетесь посмотреть. + 31006 + 31006 + 0 + + + core + public_error + email_address_invalid + The email address you entered is not in a valid format. Please check it and resubmit the form. + Введенный вами e-mail адрес неверный. Пожалуйста проверьте его и отправьте форму снова. + 31006 + 31006 + 0 + + + core + public_error + forward_only_members + Only members can forward topics from our forums. + Отправка темы по e-mail доступна только зарегистрированным пользователям. + 31006 + 31006 + 0 + + + core + public_error + forward_no_tid + We could not determine which topic you were attempting to forward. + Темы, которую вы пытаетесь отправить, не существует. + 31006 + 31006 + 0 + + + core + public_error + forward_no_fid + We could not determine which form the topic is in. + Системе не удалось найти форум, которому принадлежит данная тема. + 31006 + 31006 + 0 + + + core + public_error + mail_member_private + Sorry, but this member does not wish to be contacted by email through this board. + К сожалению пользователь не желает получать email письма от других пользователей форума. + 31006 + 31006 + 0 + + + core + public_error + mail_member_no_member + We could not find the member you were attempting to send an email to. + Система не смогла найти пользователя, которому вы пытаетесь отправить e-mail. + 31006 + 31006 + 0 + + + core + public_error + no_member_mail + Sorry, you are not permitted to send an email via this board. + Извините, но вам не доступна возможность отправки e-mail писем с форума. + 31006 + 31006 + 0 + + + core + public_error + mail_member_no_mid + We could not determine which member you were attempting to send an email to. + Система не смогла найти пользователя, которому вы пытаетесь отправить e-mail. + 31006 + 31006 + 0 + + + core + public_error + members_only_mail + Only members may contact other members through our forums. + Только зарегистрированные пользователи могут отправлять e-mail письма друг другу. + 31006 + 31006 + 0 + + + core + public_error + contact_what_action + + Неверное использование функций форума. + 31006 + 31006 + 0 + + + core + public_error + contact_need_message + You did not specify why you are reporting this post. + Вы не указали причину по которой отправляете жалобу. + 31006 + 31006 + 0 + + + core + public_error + usercp_forums_must_login + The forum you are attempting to subscribe to requires you to enter a password. Please go login to the forum before subscribing to it. + Вы пытаетесь подписаться на форум, защищенный паролем. Прежде чем вы сможете подписаться на него, вам необходимо вернуться назад и ввести пароль для данного форума. + 31006 + 31006 + 0 + + + core + public_error + forum_already_subscribed + You are already subscribed to the topic or forum you are attempting to subscribe to. + Вы уже подписаны на эту тему или форум. + 31006 + 31006 + 0 + + + core + public_error + usercp_forums_no_topic + We could not find the topic you wish to subscribe to. + Системе не удалось найти тему на которую вы пытаетесь подписаться. + 31006 + 31006 + 0 + + + core + public_error + usercp_forums_no_perms + You do not have permission to read topics in this forum. + У вас нет прав для просмотра тем в данном форуме. + 31006 + 31006 + 0 + + + core + public_error + usercp_forums_bad_key + Your secure key, used to protect your account settings, did not match the one submitted. Please go back, reload the form, and try again. + Ключ безопасности не совпадает с отправленным. Вернитесь назад, обновите форму и попробуйте снова. + 31006 + 31006 + 0 + + + core + public_error + reports_missing_tidpid + We could not determine which topic or post you were attempting to report. + Системе не удалось найти тему или сообщение на которую(ое) вы пытаетесь отправить жалобу. + 31006 + 31006 + 0 + + + core + public_error + announcements_supermods + Only super-moderators have access to manage announcements on our site. + Управление объявлениями доступно только супермодераторам. + 31006 + 31006 + 0 + + + core + public_error + reports_no_member + We could not find the member profile you were attempting to report + Системе не удалось найти пользователя на чей профиль вы пытаетесь отправить жалобу. + 31006 + 31006 + 0 + + + core + public_error + reports_no_msg + We could not find the private message you were attempting to report. + Системе не удалось найти личное сообщение на которое вы пытаетесь отправить жалобу. + 31006 + 31006 + 0 + + + core + public_error + reports_invalid_gtype + We could not determine what gallery content you were attempting to report. + Системе не удалось найти контент в галерее на который вы пытаетесь отправить жалобу. + 31006 + 31006 + 0 + + + core + public_error + reports_no_imageid + We could not determine which gallery image you were attempting to report. + Системе не удалось найти изображение в галерее на которое вы пытаетесь отправить жалобу. + 31006 + 31006 + 0 + + + core + public_error + reports_no_file + We could not determine which file you were attempting to report. + Системе не удалось найти файл на который вы пытаетесь отправить жалобу. + 31006 + 31006 + 0 + + + core + public_error + reports_images_disabled + We are not accepting reports on images at this time. + Система жалоб на изображения галереи в данный момент отключена. + 31006 + 31006 + 0 + + + core + public_error + reports_input_not_match + The data you submitted does not match the expected format. + Данные, отправленные вами, не соответствуют необходимому формату. + 31006 + 31006 + 0 + + + core + public_error + reports_cannot_view_entry + You do not have permission to report this blog entry. + У вас нет прав чтобы отправить жалобу на эту запись блога. + 31006 + 31006 + 0 + + + core + public_error + reports_no_entry + We could not find the blog entry that you are attempting to report. + Системе не удалось найти запись в блоге на которую вы пытаетесь отправить жалобу. + 31006 + 31006 + 0 + + + core + public_error + reports_must_be_member + You must be a registered member and logged in to our site in order to report this content. + Для отправки жалобы вам необходимо быть зарегистрированным и авторизованным пользователем. + 31006 + 31006 + 0 + + + core + public_error + reports_blog_entry_id + We could not determine which blog or entry you are attempting to report. + Системе не удалось найти запись в блоге или сам блог на которую(ый) вы пытаетесь отправить жалобу. + 31006 + 31006 + 0 + + + core + public_error + search_no_term + You must specify a search term. + Необходимо ввести ключ поиска. + 31006 + 31006 + 0 + + + core + public_error + usercp_bad_tab + We could not find the section of the User Control Panel you requested. + Не удалось найти запрашиваемую вами секцию пользовательской панели. + 31006 + 31006 + 0 + + + core + public_error + search_plugin_file + We could not find a file to appropriately search our systems. + Не найден соответствующий плагин поиска. + 31006 + 31006 + 0 + + + core + public_error + sphinx_api_missing + Search is not available as the Sphinx API is not available, please contact an administrator about this issue + Поиск не доступен. Отсутствует Sphinx API. Пожалуйста, свяжитесь с администрацией форума. + 31006 + 31006 + 0 + + + core + public_error + search_invalid_plugin + We could not find a file to appropriately search our systems. + Не найден соответствующий плагин поиска. + 31006 + 31006 + 0 + + + core + public_error + search_plugin_class + We could not find a file to appropriately search our systems. + Не найден соответствующий плагин поиска. + 31006 + 31006 + 0 + + + core + public_error + reports_like_whoa + + Количество жалоб, отмеченных как удаляемые не совпадают с количеством жалоб, которые хотите удалить вы. + 31006 + 31006 + 0 + + + core + public_error + reports_no_comment + We could not find the report you are attempting to submit a comment to. + Не удалось сохранить комментарий к жалобе, так как в запросе отсутствуют необходимые данные. + 31006 + 31006 + 0 + + + core + public_error + reports_no_rid + We could not find the report you are attempting to view. + Жалоба не найдена. + 31006 + 31006 + 0 + + + core + public_error + reports_cant_report + You do not have permission to report the item you are attempting to report. + У вас не достаточно прав для отправки жалобы. + 31006 + 31006 + 0 + + + core + public_error + reports_cant_empty + You must submit a message with your report. + Необходимо написать жалобу, прежде чем отправить ее. + 31006 + 31006 + 0 + + + core + public_error + reports_what_now + We could not determine what type of content you are attempting to report. + Не удалось определить тип содержимого, на которое вы хотите отправить жалобу. + 31006 + 31006 + 0 + + + core + public_error + reports_need_tidcid + You did not submit enough information for us to find the report you requested. + Отправленных данных не достаточно, чтобы система смогла найти запрашиваемую жалобу. + 31006 + 31006 + 0 + + + core + public_error + reports_no_topic + Well, we thought there was an open report on this topic but perhaps we were wrong. Go back and try reporting the topic again. + В системе не найдено запрашиваемой жалобы. Вероятно стоит повторить отправку жалобы на тему. + 31006 + 31006 + 0 + + + core + public_error + no_report_none_perm + + У вас не достаточно прав чтобы завершить то, что вы хотите. + 31006 + 31006 + 0 + + + core + public_error + report_not_found + The report that you are attempting to view could not be found. + Жалоба не найдена. + 31006 + 31006 + 0 + + + core + public_error + no_report_prune_perm + You do not have permission to prune or delete reports. + У вас не достаточно прав чтобы удалять жалобы. + 31006 + 31006 + 0 + + + core + public_error + no_reports_permission + You do not have permission to access the report center. + У вас нет доступа к системе жалоб. + 31006 + 31006 + 0 + + + core + public_error + help_no_id + The help topic you requested could not be found. + Раздел помощи, запрошенный вами, не удалось найти. + 31006 + 31006 + 0 + + + core + public_error + han_login_create_failed + Your account could not be created in our external system properly. Please notify an administrator. + Не удалось добавить вашу учетную запись во внешнюю базу пользователей. Пожалуйста свяжитесь с администрацией форума. + 31006 + 31006 + 0 + + + core + public_error + reputation_missing_data + Your reputation submission could not be saved because not all of the necessary information was provided. + Репутация не может быть изменена, так как в запросе отсутствуют необходимые данные. + 31006 + 31006 + 0 + + + core + public_error + awaiting_coppa + You must have your parent or guardian complete the COPPA form and submit it to the administrator before your member account can be created. + Необходимо чтобы ваши родители или опекуны заполнили форму COPPA и отправили ее администрации форума перед созданием учетной записи на форуме. + 31006 + 31006 + 0 + + + core + public_error + registration_disabled + The administrator is currently not accepting new membership registrations. + В данный момент регистрация на форуме отключена. + 31006 + 31006 + 0 + + + core + public_error + validation_key_invalid + Your validation key did not match the one in our records. Please verify the link you followed or contact an administrator for assistance. + Неверный ключ активации + 31006 + 31006 + 0 + + + core + public_error + validate_admin_turn + You have completed your portion of the validation request already. An administrator must approve your account before you have full access. + Спасибо за активацию аккаунта. Администрация форума должна проверить вашу учетную запись, прежде чем вы получите полный доступ к форуму. + 31006 + 31006 + 0 + + + core + public_error + no_validate_key + We could not find the validation request you are attempting to verify. + Неверный ключ активации + 31006 + 31006 + 0 + + + core + public_error + partial_reg_noid + We could not find the partial registration record, or your member account. Please notify an administrator. + Пользователь найден, однако, его запись повреждена. Пожалуйста, сообщите об этом администрации форума. + 31006 + 31006 + 0 + + + core + public_error + coppa_form_fill + You must select your birthday from the dropdown menus before you can continue. + Вы должны указать ваш день рождения прежде чем продолжить регистрацию. + 31006 + 31006 + 0 + + + core + public_error + lostpass_no_mid + We found your member account, but there is no member id set for the account. Please notify an administrator. + Пользователь найден, однако, его запись повреждена. Пожалуйста, сообщите об этом администрации форума. + 31006 + 31006 + 0 + + + core + public_error + lostpass_name_email + You did not supply your name or email address. + Вы не ввели имя или e-mail. + 31006 + 31006 + 0 + + + core + public_error + lostpass_no_user + We could not find the member account for the name or email address you supplied. Please verify the information and resubmit the form. + К сожалению нам не удалось найти пользователя с такими данными. Пожалуйста проверьте отправляемую информацию. + 31006 + 31006 + 0 + + + core + public_error + lostpass_external_fail + There was an error changing your password in one of our external systems. Please notify an administrator. + Возникла проблема со сменой пароля. Сообщите об этом администрации форума. + 31006 + 31006 + 0 + + + core + public_error + lostpass_not_lostpass + + Ваш запрос на восстановление пароля на самом деле не является запросом на восстановление пароля. Вы не понимаете о чем это, к сожалению мы тоже. Пожалуйста свяжитесь с администрацией форума и сообщите им об этой ошибке. + 31006 + 31006 + 0 + + + core + public_error + lostpass_key_wrong + The validation key supplied does not match the key we have on record. Please verify it is correct and resubmit the request. + Ключ валидации не совпадает с ключем, хранящимся в наших записях. Вероятно, вам следует повторить отправку запроса. + 31006 + 31006 + 0 + + + core + public_error + lostpass_new_reg + Your account is awaiting admin validation. An admin will take a look at it as soon as possible. + Ваша учетная запись ожидает подтверждения администратора. + 31006 + 31006 + 0 + + + core + public_error + lostpass_not_validating + The member specified is not presently awaiting validation for a lost password request. + Пользователь не запрашивал восстановление пароля. + 31006 + 31006 + 0 + + + core + public_error + lostpass_no_member + We could not find the member account for the user id you supplied. + Пользователя с такими данными не существует. + 31006 + 31006 + 0 + + + core + public_error + uid_key_incorrect + The user id you supplied to reset your password does not appear to be valid. + Неверный идентификатор пользователя. + 31006 + 31006 + 0 + + + core + public_error + validation_key_incorrect + The validation key you supplied to reset your password does not appear to be valid. + Не удалось сбросить пароль. Ключ валидации неверный. + 31006 + 31006 + 0 + + + core + public_error + no_view_board_b + You are not allowed to visit this forum. + Вы не можете просматривать форум. + 31006 + 31006 + 0 + + + core + public_error + no_view_board + You are not allowed to visit this forum. + Вы не можете просматривать форум. + 31006 + 31006 + 0 + + + core + public_error + you_are_banned + You are not allowed to visit this forum. + Вам запрещено просматривать форум. + 31006 + 31006 + 0 + + + core + public_error + bad_logout_key + The link you followed to logout appears to be badly formed. Please go back and click the link again. + Выйти не удалось. Ссылка «Выход» имеет неверный формат. Пожалуйста, вернитесь назад и попробуйте еще раз. + 31006 + 31006 + 0 + + + core + public_error + bad_delete_cookies_key + The link you followed to delete your cookies appears to be badly formed. Please go back and click the link again. + Очистить cookies не удалось. Ссылка «Очистить cookies» имеет неверный формат. Пожалуйста, вернитесь назад и попробуйте еще раз. + 31006 + 31006 + 0 + + + core + public_error + no_permission_to_search + You do not have permission to use the search system. + Вы не можете использовать поиск на форуме. + 31006 + 31006 + 0 + + + core + public_error + search_off + Search is not enabled on the forums at this time. + В данный момент поиск на форуме отключен. + 31006 + 31006 + 0 + + + core + public_error + no_permission_for_display_names + You do not have permission to change your display name. + Вы не можете изменить имя пользователя. + 31006 + 31006 + 0 + + + core + public_error + no_permission_to_attach + You do not have permission to use the attachments system. + Вы не можете прикреплять файлы. + 31006 + 31006 + 0 + + + core + public_error + must_agree_to_terms + You must agree to the registration terms. + Необходимо принять правила пользования форумом. + 31006 + 31006 + 0 + + + core + public_error + command_file_missing + The requested action could not be performed, because we could not locate the following file: %s + Запрашиваемое действие не может быть выполнено. Требуемый файл: %s не найден + 31006 + 31006 + 0 + + + core + public_error + command_class_incorrect + The requested action could not be performed, there are no valid commands classes in the requested file: %s + Запрашиваемое действие не может быть выполнено. В файле: %s не найдены необходимые классы действий. + 31006 + 31006 + 0 + + + core + public_error + no_login_methods + Could not load any login handlers + Не удалось загрузить модули авторизации + 31006 + 31006 0 @@ -4923,2228 +5235,298 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> fbc_disabled Facebook Connect is not enabled Facebook Connect отключен - 30011 - 30011 + 31006 + 31006 0 core - public_global - quick_subject - Subject - Тема - 30005 - + public_error + fbc_authorization_already_linked + That member account is already linked to a Facebook profile + Пользовательская запись уже присоединена к Facebook + 31006 + 31006 0 core - public_global - quick_send_to - Sending a PM to - Отправка личного сообщения для - 30005 - 30005 + public_error + fbc_authorization_screwup + An error occurred while attempting to authorize this Facebook Connect action + Возникла ошибка при попытке авторизоваться с использованием Facebook + 31006 + 31006 0 core - public_global - quick_message - Message - Сообщение - 30005 - + public_error + error_back + Go Back + Назад + 31006 + 31006 0 core - public_global - find_posts - Find Posts - Найти сообщения - 30005 - 30005 + public_error + er_help_files + Our help documentation + Разделы помощи + 31006 + 31006 0 core - public_global - quick_send_button - Send - Отправить - 30005 - + public_error + er_register + Register a new account + Регистрация + 31006 + 31006 0 core - public_global - find_topics - Find Topics - Найти темы - 30005 - 30005 + public_error + er_contact_admin + Contact the forums administrator + Связь с администрацией форума + 31006 + 31006 0 core - public_global - manage_ignored_users - Manage Ignored Users - Игнорируемые - 30005 - + public_error + er_lost_pass + Forgotten Password Recovery + Восстановление пароля + 31006 + 31006 0 core - public_global - _stopwords_ - about,all,and,been,can,cant,for,has,here,just,me,new,next,not,old,out,our,said,saw,that,thats,the,their,then,theyll,this,was,were,well,will,with,what,whats,when,where,why,you - about,all,and,can,cant,for,just,me,new,not,old,out,the,then,theyll,this,was,were,well,will,with,what,whats,when,where,why,you,о,и,на,в,к,под,из,подо,из,перед,по,за,без,до,от,при,через,с,у,без - 30005 - + public_error + error_title + An Error Occurred + Ошибка + 31006 + 31006 0 core - public_global - view_profile - View Profile - Просмотр профиля - 30005 - + public_error + er_useful_links + Useful Links + Полезные ссылки + 31006 + 31006 0 core - public_global - pm_member - PM this member - Отправить сообщение - 30005 - + public_error + err_UNKNOWN + An unknown error occurred + Возникла ошибка + 31006 + 31006 0 core - public_global - users_photo - - фотография - 30005 - 30005 + public_error + bad_notify_id + We could not find the notification you were attempting to view. + Не удалось найти уведомление, которое вы пытаетесь просмотреть + 31006 + 31006 0 core - public_global - photo - Photo - Фотография - 30005 - 30005 + public_error + twit_not_remote + You cannot log in with your Twitter credentials for this member. You must log in with your forum credentials using the normal log in form + Вы не можете авторизоваться с использованием Twitter-аккаунта. Вам необходимо войти в систему используя обычны способ входа. + 31006 + 31006 0 core - public_global - icon - Icon - Иконка - 30005 - + public_error + twit_not_on + Twitter connect is not enabled + Интеграция с Twitter не включена + 31006 + 31006 0 core - public_global - my_profile - My Profile - Профиль - 30005 - + public_error + twit_ohnoes + An error occurred while trying to authorize this Twitter connection + Возникла ошибка при попытке проверки соединения с Twitter + 31006 + 31006 0 core - public_global - your_profile - Your Profile - Ваш профиль - 30005 - + public_error + moderate_no_permission_deleted_items + One or more deleted items cannot be restored as you do not have permission to restore them + Вы не можете восстанавливать удаленные публикации + 31006 + 31006 0 core - public_global - view_gallery - View gallery - Перейти к галерее - 30005 - + public_error + search_invalid_id + Invalid member id + Неверный ID пользователя + 31006 + 31006 0 core - public_global - view_blog - View blog - Перейти к блогу - 30005 - + public_error + incorrect_furl + here to return back to the forum's home]]> + главную страницу форума.]]> + 31006 + 31006 0 core - public_global - warn_increase - Increase warning - добавить предупреждение - 30005 - + public_error + twitter_app_error + + Есть проблема с настройками вашего Twitter-приложения. Пожалуйста, убедитесь, что в приложении не указан тип Desktop application он должен быть Browser + 31006 + 31006 0 core - public_global - warn_level - Warning level: - Уровень предупреждения: - 30005 - + public_error + no_remote_reg + The administrator has disabled all registrations and as such, you are not able to complete your log in at this time. + Администрация отключила возможность регистрации на форуме. + 31006 + 31006 0 core - public_global - warn_status - Warn Status - Предупреждения - 30005 - + public_error + fb_not_remote + You cannot log in with your Facebook credentials for this member. You must log in with your forum credentials using the normal log in form + Вы не можете зайти на форум с использованием этого Facebook-аккаунта. Вам необходимо зайти на форум используя обычные данные. + 31006 + 31006 0 core - public_global - warn_view_history - View warn history - Посмотреть историю предупреждений - 30005 - + public_error + fb_ohnoes + An error occurred while trying to authorize this Facebook connection + Возникла ошибка при авторизации через Facebook + 31006 + 31006 0 core - public_global - warn_decrease - Decrease warning - снять предупреждения - 30005 - + public_error + fb_not_on + Facebook connect is not enabled + Facebook Connect отключен + 31006 + 31006 0 core - public_global - check_all - Check all - Выбрать все - 30005 - + public_error + forward_turned_off + Sorry, this feature has been disabled + К сожалению в данный момент возможность отключена. + 31006 + 31006 0 core - public_global - add - Add - Добавить - 30005 - 30005 + public_error + login_no_authkey + We encountered a problem processing your login request. Please try again. + Произошла ошибка в процессе авторизации. Пожалуйста попробуйте позже. + 31006 + 31006 0 core - public_global - minus - Minus - Минус - 30005 - + public_error + no_guests + + К сожалению данная возможность не доступна для гостей. + 31006 + 31006 0 core - public_global - captcah_new - - Не можете прочитать? Нажмите здесь чтобы создать новое изображение. - 30005 - + public_error + incorrect_use + Incorrect use of one of the board files. + Не правильное обращение к одному из файлов форума. + 31006 + 31006 0 core - public_global - not_signed_in - You are not signed in - Вы не вошли - 30005 - + public_error + poss_hack_attempt + We are treating that action as a possible hack attempt. This action will be logged and the board administrator will be informed via email. + Система определила данное действие как попытку взлома. О данном факте было сообщено администратору форума. + 31006 + 31006 0 core - public_global - click_login - Click here to log in - Войти - 30005 - + public_error + del_post + Authorization mismatch - please go back and try again. If you have been trying to access a function incorrectly, please use the proper method. + Ошибка безопасности - пожалуйста вернитесь назад и попробуйте снова. + 31006 + 31006 0 core - public_global - attempt_login - Attempt to log in - Попробовать войти в систему - 30005 - 30005 - 0 - - - core - public_global - board_offline_desc - This board is currently offline. - Форумы в данный момент отключены - 30005 - - 0 - - - core - public_global - board_offline - Board Offline - Форум отключен - 30005 - - 0 - - - core - public_global - click_toggle - Click to Toggle - Нажмите для переключения - 30005 - - 0 - - - core - public_global - homepage_title - Homepage - Перейти на сайт - 30005 - - 0 - - - core - public_global - go_to_discussion - Go to Forums - Перейти к списку форумов - 30005 - - 0 - - - core - public_global - discussion - Forums - Обсуждения - 30005 - - 0 - - - core - public_global - go_to_memberlist - Go to Member List - Перейти к списку пользователей - 30005 - - 0 - - - core - public_global - go_to_prefix - Go to - Перейти к - 30005 - - 0 - - - core - public_global - sent_new_convo - sent you a new conversation - хочет начать личную беседу с вами - 30005 - 30005 - 0 - - - core - public_global - pc_replies - Replies: - Ответов: - 30005 - 30005 - 0 - - - core - public_global - pc_subject - Subject: - Тема: - 30005 - 30005 - 0 - - - core - public_global - replied_convo - replied to a conversation - ответил в личной беседе - 30005 - - 0 - - - core - public_global - pc_sent - Sent: - Отправлено: - 30005 - 30005 - 0 - - - core - public_global - ignore_conversation - Ignore This Notification - Игнорировать - 30005 - - 0 - - - core - public_global - nav_return_to - Return to - Вернуться к - 30005 - 30005 - 0 - - - core - public_global - rss_feed - RSS Feed - RSS поток - 30005 - - 0 - - - core - public_global - board_rules - Board Rules - Правила форума - 30005 - - 0 - - - core - public_global - skin_and_lang - Skin and Language - Внешний вид - 30005 - - 0 - - - core - public_global - override_browser_theme - Click here to manually choose a theme - Нажмите сюда для выбора темы - 30005 - - 0 - - - core - public_global - skin_browser_set - You are using a theme designed for your browser. - Вы используете тему наиболее подходящую для вашего браузера - 30005 - - 0 - - - core - public_global - theme_prefix - Theme: - Стиль: - 30005 - - 0 - - - core - public_global - language_prefix - Language: - Язык: - 30005 - - 0 - - - core - public_global - exec_stats - Execution Stats - Статистика работы системы - 30005 - 30005 - 0 - - - core - public_global - go_to_top - Go to top - Наверх - 30005 - - 0 - - - core - public_global - time_now - Time Now: - Сейчас: - 30005 - - 0 - - - core - public_global - back_to_top - Back to top - Наверх - 30005 - 30005 - 0 - - - core - public_global - delete_all_cookies_title - Delete cookies set by this board - Очистить cookies установленные системой - 30005 - - 0 - - - core - public_global - delete_my_cookies - Delete My Cookies - Очистить cookies - 30005 - - 0 - - - core - public_global - mark_all_as_read - Mark all as read - Отметить все как прочтенное - 30005 - - 0 - - - core - public_global - mark_board_as_read - Mark Board As Read - Отметить все сообщения прочитанными - 30005 - - 0 - - - core - public_global - lightbox_label - Image - Изображение - 30005 - - 0 - - - core - public_global - lightbox_of - of - из - 30005 - - 0 - - - core - public_global - generic_date - Date - Дата - 30005 - - 0 - - - core - public_global - remove_friend - Remove Friend - Удалить из друзей - 30005 - - 0 - - - core - public_global - add_friend - Add as Friend - Добавить в друзья - 30005 - 30005 - 0 - - - core - public_global - page_title_page - - Page - - Страница - 30005 - - 0 - - - core - public_global - report - Report - Жалоба - 30005 - - 0 - - - core - public_global - or - or - или - 30005 - - 0 - - - core - public_global - jump_to_content - Jump to content - Перейти к содержимому - 30005 - - 0 - - - core - public_global - cancel - Cancel - Отмена - 30005 - - 0 - - - core - public_global - login_to_acp - Log in to your Admin CP - Вход в админцентр форума - 30005 - - 0 - - - core - public_global - mod_tools - Mod Tools: - Модерирование: - 30005 - - 0 - - - core - public_global - ip_lookup - IP Lookup - Определение IP - 30005 - - 0 - - - core - public_global - post_announcement - Manage Announcement - Создание объявления - 30005 - - 0 - - - core - public_global - view_reports - View active reports - Просмотреть активные жалобы - 30005 - - 0 - - - core - public_global - go_home - Go to board index - Перейти к списку форумов - 30005 - - 0 - - - core - public_global - your_cp - My Settings - Настройки - 30005 - - 0 - - - core - public_global - logo - Logo - Логотип - 30005 - - 0 - - - core - public_global - manage_friends - Manage Friends - Друзья - 30005 - - 0 - - - core - public_global - go_to_my_blog - Go to my blog - Перейти в свой блог - 30005 - - 0 - - - core - public_global - my_blog - My Blog - Мой блог - 30005 - - 0 - - - core - public_global - go_to_my_gallery - Go to my gallery - Перейти в свою галерею - 30005 - - 0 - - - core - public_global - my_gallery - My Gallery - Моя галерея - 30005 - - 0 - - - core - public_global - view_help - View help - Перейти к помощи - 30005 - - 0 - - - core - public_global - advanved_help - Advanced Search - Расширенный поиск - 30005 - 30005 - 0 - - - core - public_global - advanced - Advanced - Расширенный - 30005 - 30005 - 0 - - - core - public_global - resized_image - Resized to #{percent}% (was #{width} x #{height}) - Click image to enlarge - Уменьшено на #{percent}% (#{width} x #{height}) - Нажмите для увеличения - 30005 - - 0 - - - core - public_global - board_offline_title - Board Message - Сообщение - 30005 - - 0 - - - core - public_global - task_cleanout - Old reg_images, sessions and search results removed - Старые коды подтверждения, сессии и результаты поиска удалены - 30005 - - 0 - - - core - public_global - attach_notallowed - Uploading is not allowed - Загрузка запрещена - 30005 - 30005 - 0 - - - core - public_global - attach_unlimited - Unlimited - не ограничено - 30005 - 30005 - 0 - - - core - public_global - task_statsrebuilt - Statistics rebuilt - Статистика обновлена - 30005 - - 0 - - - core - public_global - task_logprune - Log tables pruned - Журналы очищены - 30005 - - 0 - - - core - public_global - task_dailycleanout - %s XML-RPC logs removed, %s orphaned attachments removed, and %s subscriptions pruned - %s XML-RPC записей журнала удалено, %s потерянных прикрепленных файлов удалено, %s подписок очищено и %s маркеров прочтения тем удалено - 30005 - - 0 - - - core - public_global - task_weeklydigest - - Еженедельный отчет о темах и сообщениях отправлен - 30005 - - 0 - - - core - public_global - task_updateviews - Topic views counter updated - Количество просмотров тем обновлено - 30005 - - 0 - - - core - public_global - task_rssimport - RSS Import completed (%s) - Импорт RSS завершен (%s) - 30005 - - 0 - - - core - public_global - task_dailydigest - - Ежедневный отчет о темах и сообщениях отправлен - 30005 - - 0 - - - core - public_global - task_calendars - Calendar recached - Обновление кешей календаря завершено - 30005 - - 0 - - - core - public_global - task_announcements - Announcements updated - Объявления обновлены - 30005 - - 0 - - - core - public_global - task_openidcleanup - OpenID temporary caches cleared out - OpenID кеши очищены - 30005 - - 0 - - - core - public_global - task_mysqlcleanup - Cleaned up sleeping mysql processes - Убиты «заснувшие» mysql процессы - 30005 - - 0 - - - core - public_global - task_profileviews - Profile views counter updated - Счетчик просмотров профилей обновлен - 30005 - - 0 - - - core - public_global - task_removevalidating - %s old validating members pruned - %s старых аккаунтов, ожидающих активации, удалено - 30005 - - 0 - - - core - public_global - task_removelocked - %s locked members pruned - %s старых аккаунтов, ожидающих активации, удалено - 30005 - - 0 - - - core - public_global - reputation_offline - Rating System Offline - Система рейтинга отключена - 30005 - - 0 - - - core - public_global - reputation_guest - You must be logged in to use the reputation system - Вы должны войти в систему, чтобы воспользоваться системой рейтинга - 30005 - - 0 - - - core - public_global - reputation_invalid - Invalid Rating - Неверный рейтинг - 30005 - - 0 - - - core - public_global - reputation_yourown - You are now allowed to vote on your own content - Вы не можете голосовать за собственный контент - 30005 - - 0 - - - core - public_global - reputation_quota_pos - You have reached your quota of positive votes for the day - Вы исчерпали лимит положительных оценок на сегодня - 30005 - - 0 - - - core - public_global - reputation_quota_neg - You have reached your quota of negative votes for the day - Вы исчерпали лимит отрицательных оценок на сегодня - 30005 - - 0 - - - core - public_global - gbl_captcha_title - Security Code - Код безопасности - 30005 - 30005 - 0 - - - core - public_global - glb_captcha_image - Your unique security code - Код безопасности - 30005 - - 0 - - - core - public_global - gbl_captcha_image_desc - If you do not see any numbers, or see broken images, please contact a board administrator to rectify the problem. - Если вы не видите никаких чисел или видите не все числа, пожалуйста сообщите об этом администрации форума. - 30005 - 30005 - 0 - - - core - public_global - rss_board_offline - Our board is offline temporarily and RSS feeds are unavailable during this time - Наша система в данный момент отключена. RSS не доступен. - 30005 - - 0 - - - core - public_global - reputation_protected - Can not modify that groups reputation - Вы не можете изменить репутацию у пользователя этой группы - 30005 - - 0 - - - core - public_global - bbc_member_bbcode - Member profile - Профиль пользователя - 30005 - - 0 - - - core - public_global - reputation_config - The configuration file for the reputation voting is missing or corrupt. - Конфигурация системы рейтинг отсутствует или повреждена. - 30005 - - 0 - - - core - public_global - glb_captcha_text - Please enter the 6 character code shown in the image. If you cannot read the code, click the image to generate a new one. Case sensitive. - Пожалуйста введите 6 символов указанных на картинке. Если вы не можете прочитать символы на картинке, нажмите на картинку, чтобы получить другую. Код регистрозависим (различаются заглавные и прописные символы) - 30005 - - 0 - - - core - public_global - glb_captcha_enter - Confirm security code - Подтвердите код безопасности - 30005 - - 0 - - - core - public_global - bbc_email - E-mail Link - E-mail - 30005 - 30005 - 0 - - - core - public_global - bbc_external_link - External link - Ссылка - 30005 - - 0 - - - core - public_global - bbc_quote - Quote - Цитата - 30005 - - 0 - - - core - public_global - bbc_full_cite - %s, on %s, said: - %s (%s) писал: - 30005 - - 0 - - - core - public_global - bbc_name_cite - %s said: - %s сказал: - 30005 - - 0 - - - core - public_global - bbc_date_cite - From %s: - От %s - 30005 - 30005 - 0 - - - core - public_global - report_member_bar - Active Reports - активные жалобы - 30005 - - 0 - - - core - public_global - partial_login - The login was successful! - Вы вошли в систему! - 30005 - - 0 - - - core - public_global - m_group - Group: - Группа: - 30005 - - 0 - - - core - public_global - report_menu_mark_complete - Mark Complete - Пометить как решенная - 30005 - - 0 - - - core - public_global - report_center_rss - Report Center RSS Feed - RSS системы жалоб - 30005 - - 0 - - - core - public_global - m_joined - Joined: - Регистрация: - 30005 - - 0 - - - core - public_global - report_menu_view_report - View Report - Просмотр - 30005 - - 0 - - - core - public_global - m_posts - Posts: - Сообщений: - 30005 - - 0 - - - core - public_global - modlogs_pinned - Pinned topic from post form - Тема поднята - 30005 - - 0 - - - core - public_global - modlogs_closed - Closed topic from post form - Тема закрыта - 30005 - - 0 - - - core - public_global - modlogs_pinclose - - Тема закрыта и поднята - 30005 - - 0 - - - core - public_global - modlogs_unpinned - Unpinned topic from post form - Тема опущена - 30005 - - 0 - - - core - public_global - modlogs_opened - Opened topic from post form - Тема открыта - 30005 - - 0 - - - core - public_global - modlogs_pinopen - - Тема поднята и открыта - 30005 - - 0 - - - core - public_global - modlogs_unpinclose - - Тема опущена и закрыта - 30005 - - 0 - - - core - public_global - modlogs_unpinopen - - Тема опущена и открыта - 30005 - - 0 - - - core - public_global - ajax_topicstate - Altered topic state (opened/closed) from forum view - Изменен статус темы (открыта/закрыта) - 30005 - 30005 - 0 - - - core - public_global - ajax_topictitle - - - 30005 - 30005 - 0 - - - core - public_global - mailto_erroronforums - Error on the forums - Ошибка на форуме - 30005 - - 0 - - - core - public_global - bbcode_img_alt - Posted Image - Изображение - 30005 - 30005 - 0 - - - core - public_global - stats_sec - sec - сек - 30005 - - 0 - - - core - public_global - stats_queries - queries - запросов - 30005 - - 0 - - - core - public_global - global_guestname - Guest - Гость - 30005 - - 0 - - - core - public_global - global_pm_read - Read Message - Читать сообщение - 30005 - - 0 - - - core - public_global - global_page_jump - Jump to page - Перейти к странице - 30005 - - 0 - - - core - public_global - au_reading - Reading (%s)... - Читает %s - 30005 - 30005 - 0 - - - core - public_global - time_seconds_ago - %s seconds ago - %s секунд назад - 30005 - - 0 - - - core - public_global - au_posting - Posting (%s)... - Отвечает в %s - 30005 - 30005 - 0 - - - core - public_global - time_less_hour - An hour ago - час назад - 30005 - - 0 - - - core - public_global - time_minutes_ago - %s minutes ago - %s минут назад - 30005 - - 0 - - - core - public_global - time_less_minute - A minute ago - минуту назад - 30005 - - 0 - - - core - public_global - time_hours_ago - %s hours ago - %s часов назад - 30005 - - 0 - - - core - public_global - time_less_day - A day ago - вчера - 30005 - - 0 - - - core - public_global - time_days_ago - %s days ago - %s дней назад - 30005 - - 0 - - - core - public_global - time_less_week - A week ago - неделю назад - 30005 - - 0 - - - core - public_global - time_weeks_ago - %s weeks ago - %s недель назад - 30005 - - 0 - - - core - public_global - time_today - Today - Сегодня - 30005 - - 0 - - - core - public_global - time_yesterday - Yesterday - Вчера - 30005 - - 0 - - - core - public_global - tpl_gotolast - Go to last page - Перейти к последней странице - 30005 - - 0 - - - core - public_global - tpl_gotofirst - Go to first page - Перейти к первой странице - 30005 - - 0 - - - core - public_global - tpl_next - Next page - Следующая страница - 30005 - - 0 - - - core - public_global - tpl_prev - Previous Page - Предыдущая страница - 30005 - - 0 - - - core - public_global - resend_val - Resend Validation - Повторно выслать письмо активации - 30005 - - 0 - - - core - public_global - email_address - Email Address - E-mail адрес - 30005 - 30005 - 0 - - - core - public_global - tpl_pages - Pages - Страниц - 30005 - - 0 - - - core - public_global - sf_bytes - bytes - байт - 30005 - - 0 - - - core - public_global - sf_mb - MB - МБ - 30005 - - 0 - - - core - public_global - sf_k - K - К - 30005 - - 0 - - - core - public_global - err_select - Select All - Выбрать все - 30005 - 30005 - 0 - - - core - public_global - bi_markread - Mark forum as read? - Пометить форум как прочтенный? - 30005 - - 0 - - - core - public_global - err_title - Post Data Saved! - Содержимое сообщения сохранено! - 30005 - 30005 - 0 - - - core - public_global - tt_poll_vote - Add your vote to this poll - Проголосовать! - 30005 - - 0 - - - core - public_global - tt_gounread - Go to the first unread post - Перейти к первому непрочитанному сообщению - 30005 - - 0 - - - core - public_global - err_expl - - Данные следующего сообщения успешно сохранены. Иногда случается, что при нажатии на кнопку «Назад» заполненные в поля данные теряются, поэтому вы можете скопировать текст и только потом вернуться на предыдущую страницу. - 30005 - 30005 - 0 - - - core - public_global - tt_poll_show - View poll results before adding your vote - Посмотреть распределение голосов - 30005 - - 0 - - - core - public_global - tt_poll_null - View results, but forfeit your vote in this poll - Посмотреть распределение голосов. Вы потеряете право голоса! - 30005 - - 0 - - - core - public_global - tt_poll_svote - Go back and show the voting options - Вернуться к голосованию - 30005 - 30005 - 0 - - - core - public_global - sj_home - Forum Home - К списку форумов - 30005 - - 0 - - - core - public_global - ps_first - First - Первая - 30005 - - 0 - - - core - public_global - sj_search - Search - Поиск - 30005 - - 0 - - - core - public_global - live_chat - Live Chat - Чат - 30005 - - 0 - - - core - public_global - sj_help - Help - Помощь - 30005 - - 0 - - - core - public_global - ps_last - Last - Последняя - 30005 - - 0 - - - core - public_global - page_1_of_1 - Page 1 of 1 - Страница 1 из 1 - 30005 - - 0 - - - core - public_global - tb_mlist - Members - Пользователи - 30005 - - 0 - - - core - public_global - gzip_off - GZIP Disabled - GZIP отключен - 30005 - - 0 - - - core - public_global - gzip_on - GZIP Enabled - GZIP включен - 30005 - - 0 - - - core - public_global - warn_offline - (OFFLINE) - (OFFLINE) - 30005 - - 0 - - - core - public_global - cp_tool_tip - Edit my settings, such as signature, avatar and more... - Редактировать настройки (подпись, аватар и тп) - 30005 - - 0 - - - core - public_global - view_new_posts - View New Content - Просмотр новых публикаций - 30005 - - 0 - - - core - public_global - jmp_go - Go - ОК - 30005 - - 0 - - - core - public_global - forum_jump - Forum Jump - Быстрый переход - 30005 - 30005 - 0 - - - core - public_global - yes - Yes - Да - 30005 - - 0 - - - core - public_global - no - No - Нет - 30005 - - 0 - - - core - public_global - submit_li - Log in - Войти - 30005 - - 0 - - - core - public_global - thanks - Thanks - Спасибо - 30005 - - 0 - - - core - public_global - pass - Password - Пароль - 30005 - - 0 - - - core - public_global - transfer_you - Please wait while we transfer you... - Подождите, сейчас Вы будете перенаправлены - 30005 - - 0 - - - core - public_global - you_last_visit - Last Visit: - Последнее посещение: - 30005 - - 0 - - - core - public_global - admin_cp - Admin CP - Перейти в панель администрирования системы - 30005 - 30005 - 0 - - - core - public_global - M_2 - February - Февраль - 30005 - - 0 - - - core - public_global - M_1 - January - Январь - 30005 - - 0 - - - core - public_global - M_3 - March - Март - 30005 - - 0 - - - core - public_global - M_4 - April - Апрель - 30005 - - 0 - - - core - public_global - M_5 - May - Май - 30005 - - 0 - - - core - public_global - M_6 - June - Июнь - 30005 - - 0 - - - core - public_global - M_7 - July - Июль - 30005 - - 0 - - - core - public_global - M_8 - August - Август - 30005 - - 0 - - - core - public_global - M_9 - September - Сентябрь - 30005 - - 0 - - - core - public_global - M_10 - October - Октябрь - 30005 - - 0 - - - core - public_global - M_11 - November - Ноябрь - 30005 - - 0 - - - core - public_global - M_12 - December - Декабрь - 30005 - - 0 - - - core - public_global - D_0 - Sunday - Воскресенье - 30005 - 30005 - 0 - - - core - public_global - D_1 - Monday - Понедельник - 30005 - 30005 - 0 - - - core - public_global - D_2 - Tuesday - Вторник - 30005 - 30005 - 0 - - - core - public_global - D_3 - Wednesday - Среда - 30005 - 30005 - 0 - - - core - public_global - D_4 - Thursday - Четверг - 30005 - 30005 + public_error + pass_blank + Your password field was not complete + Вы не ввели пароль. + 31006 + 31006 0 @@ -7153,248 +5535,268 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> D_5 Friday Пятница - 30005 - 30005 + 31006 + 31006 0 core public_global - D_6 - Saturday - Суббота - 30005 - 30005 + D_3 + Wednesday + Среда + 31006 + 31006 0 core public_global - name - Name - Имя - 30005 - + D_4 + Thursday + Четверг + 31006 + 31006 0 core public_global - register - Register - Регистрация - 30005 - + D_2 + Tuesday + Вторник + 31006 + 31006 0 core public_global - logged_in_as - Signed in as - Вошли как - 30005 - + M_12 + December + Декабрь + 31006 + 31006 0 core public_global - msg_new - New - Новых - 30005 - - 0 - - - core - public_global - offline - Sorry, the boards are offline at the moment - Система в данный момент отключена - 30005 - - 0 - - - core - public_global - log_out - Sign Out - Выход - 30005 - - 0 - - - core - public_global - dont_wait - Or click here if you do not wish to wait - Или нажмите сюда, если не хотите ждать - 30005 - - 0 - - - core - public_global - sign_in - Sign In - Вход - 30005 - - 0 - - - core - public_global - your_messenger - Messenger - Личные сообщения - 30005 - - 0 - - - core - public_global - stand_by - Please stand by... - Подождите... - 30005 - - 0 - - - core - public_global - D_7 + D_0 Sunday Воскресенье - 30006 - 30006 + 31006 + 31006 0 core public_global - macro__useronline - User is online - Пользователь онлайн - 30006 - + D_1 + Monday + Понедельник + 31006 + 31006 0 core public_global - macro__view_post - View Post - Просмотр сообщения - 30006 - + M_11 + November + Ноябрь + 31006 + 31006 0 core public_global - macro__useroffline - User is offline - Пользователь офлайн - 30006 - + M_10 + October + Октябрь + 31006 + 31006 0 core public_global - macro__pip - Pip - Pip - 30006 - + M_9 + September + Сентябрь + 31006 + 31006 0 core public_global - macro__tracking - Tracking - Подписаться - 30006 - 30006 + M_7 + July + Июль + 31006 + 31006 0 core public_global - macro__useredit - Edit - Изменить - 30006 - 30006 + M_8 + August + Август + 31006 + 31006 0 core public_global - macro__user - User - Пользователь - 30006 - 30006 + M_5 + May + Май + 31006 + 31006 0 core public_global - macro__voted - Voted - Проголосовал - 30006 - 30006 + M_6 + June + Июнь + 31006 + 31006 0 core public_global - macro__edit - Edit icon - Изменить - 30006 - 30006 + M_4 + April + Апрель + 31006 + 31006 0 core public_global - macro__report - Report Icon - Жалоба - 30006 - 30006 + M_2 + February + Февраль + 31006 + 31006 0 core public_global - macro__reply - Reply Icon - Ответить - 30006 - 30006 + M_3 + March + Март + 31006 + 31006 0 core public_global - macro__delete - Delete icon - Удалить - 30006 - 30006 + M_1 + January + Январь + 31006 + 31006 + 0 + + + core + public_global + admin_cp + Admin CP + Перейти в панель администрирования системы + 31006 + 31006 + 0 + + + core + public_global + transfer_you + Please wait while we transfer you... + Подождите, сейчас Вы будете перенаправлены + 31006 + 31006 + 0 + + + core + public_global + thanks + Thanks + Спасибо + 31006 + 31006 + 0 + + + core + public_global + you_last_visit + Last Visit: + Последнее посещение: + 31006 + 31006 + 0 + + + core + public_global + pass + Password + Пароль + 31006 + 31006 + 0 + + + core + public_global + no + No + Нет + 31006 + 31006 + 0 + + + core + public_global + submit_li + Log in + Войти + 31006 + 31006 + 0 + + + core + public_global + yes + Yes + Да + 31006 + 31006 + 0 + + + core + public_global + forum_jump + Forum Jump + Быстрый переход + 31006 + 31006 0 @@ -7403,8 +5805,2218 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> forum_home Forum Home Главная - 30008 - 30008 + 31006 + 31006 + 0 + + + core + public_global + cp_tool_tip + Edit my settings, such as signature, avatar and more... + Редактировать настройки (подпись, аватар и тп) + 31006 + 31006 + 0 + + + core + public_global + warn_offline + (OFFLINE) + (OFFLINE) + 31006 + 31006 + 0 + + + core + public_global + jmp_go + Go + ОК + 31006 + 31006 + 0 + + + core + public_global + view_new_posts + View New Content + Просмотр новых публикаций + 31006 + 31006 + 0 + + + core + public_global + tb_mlist + Members + Пользователи + 31006 + 31006 + 0 + + + core + public_global + gzip_on + GZIP Enabled + GZIP включен + 31006 + 31006 + 0 + + + core + public_global + gzip_off + GZIP Disabled + GZIP отключен + 31006 + 31006 + 0 + + + core + public_global + page_1_of_1 + Page 1 of 1 + Страница 1 из 1 + 31006 + 31006 + 0 + + + core + public_global + ps_first + First + Первая + 31006 + 31006 + 0 + + + core + public_global + ps_last + Last + Последняя + 31006 + 31006 + 0 + + + core + public_global + sj_help + Help + Помощь + 31006 + 31006 + 0 + + + core + public_global + live_chat + Live Chat + Чат + 31006 + 31006 + 0 + + + core + public_global + sj_home + Forum Home + К списку форумов + 31006 + 31006 + 0 + + + core + public_global + sj_search + Search + Поиск + 31006 + 31006 + 0 + + + core + public_global + tt_poll_svote + Go back and show the voting options + Вернуться к голосованию + 31006 + 31006 + 0 + + + core + public_global + tt_poll_show + View poll results before adding your vote + Посмотреть распределение голосов + 31006 + 31006 + 0 + + + core + public_global + tt_poll_null + View results, but forfeit your vote in this poll + Посмотреть распределение голосов. Вы потеряете право голоса! + 31006 + 31006 + 0 + + + core + public_global + tt_poll_vote + Add your vote to this poll + Проголосовать! + 31006 + 31006 + 0 + + + core + public_global + tt_gounread + Go to the first unread post + Перейти к первому непрочитанному сообщению + 31006 + 31006 + 0 + + + core + public_global + bi_markread + Mark forum as read? + Пометить форум как прочтенный? + 31006 + 31006 + 0 + + + core + public_global + err_select + Select All + Выбрать все + 31006 + 31006 + 0 + + + core + public_global + err_title + Post Data Saved! + Содержимое сообщения сохранено! + 31006 + 31006 + 0 + + + core + public_global + err_expl + + Данные следующего сообщения успешно сохранены. Иногда случается, что при нажатии на кнопку «Назад» заполненные в поля данные теряются, поэтому вы можете скопировать текст и только потом вернуться на предыдущую страницу. + 31006 + 31006 + 0 + + + core + public_global + sf_mb + MB + МБ + 31006 + 31006 + 0 + + + core + public_global + sf_k + K + К + 31006 + 31006 + 0 + + + core + public_global + sf_bytes + bytes + байт + 31006 + 31006 + 0 + + + core + public_global + sf_gb + GB + ГБ + 31006 + 31006 + 0 + + + core + public_global + tpl_pages + Pages + Страниц + 31006 + 31006 + 0 + + + core + public_global + resend_val + Resend Validation + Повторно выслать письмо активации + 31006 + 31006 + 0 + + + core + public_global + email_address + Email Address + E-mail адрес + 31006 + 31006 + 0 + + + core + public_global + tpl_prev + Previous Page + Предыдущая страница + 31006 + 31006 + 0 + + + core + public_global + next + Next + Вперед + 31006 + 31006 + 0 + + + core + public_global + prev + Prev + Назад + 31006 + 31006 + 0 + + + core + public_global + tpl_next + Next page + Следующая страница + 31006 + 31006 + 0 + + + core + public_global + tpl_gotolast + Go to last page + Перейти к последней странице + 31006 + 31006 + 0 + + + core + public_global + tpl_gotofirst + Go to first page + Перейти к первой странице + 31006 + 31006 + 0 + + + core + public_global + time_yesterday + Yesterday + Вчера + 31006 + 31006 + 0 + + + core + public_global + time_weeks_ago + %s weeks ago + %s недель назад + 31006 + 31006 + 0 + + + core + public_global + time_today + Today + Сегодня + 31006 + 31006 + 0 + + + core + public_global + time_less_week + A week ago + неделю назад + 31006 + 31006 + 0 + + + core + public_global + time_less_day + A day ago + вчера + 31006 + 31006 + 0 + + + core + public_global + time_days_ago + %s days ago + %s дней назад + 31006 + 31006 + 0 + + + core + public_global + time_hours_ago + %s hours ago + %s часов назад + 31006 + 31006 + 0 + + + core + public_global + time_less_hour + An hour ago + час назад + 31006 + 31006 + 0 + + + core + public_global + time_less_minute + A minute ago + минуту назад + 31006 + 31006 + 0 + + + core + public_global + time_minutes_ago + %s minutes ago + %s минут назад + 31006 + 31006 + 0 + + + core + public_global + time_seconds_ago + %s seconds ago + %s секунд назад + 31006 + 31006 + 0 + + + core + public_global + au_reading + Reading (%s)... + Читает %s + 31006 + 31006 + 0 + + + core + public_global + au_posting + Posting (%s)... + Отвечает в %s + 31006 + 31006 + 0 + + + core + public_global + global_page_jump + Jump to page + Перейти к странице + 31006 + 31006 + 0 + + + core + public_global + global_pm_read + View Notification + Читать сообщение + 31006 + 31006 + 0 + + + core + public_global + global_pm_read_short + View + Просмотр + 31006 + 31006 + 0 + + + core + public_global + global_guestname + Guest + Гость + 31006 + 31006 + 0 + + + core + public_global + stats_sec + sec + сек + 31006 + 31006 + 0 + + + core + public_global + stats_queries + queries + запросов + 31006 + 31006 + 0 + + + core + public_global + mailto_erroronforums + Error on the forums + Ошибка на форуме + 31006 + 31006 + 0 + + + core + public_global + bbcode_img_alt + Posted Image + Изображение + 31006 + 31006 + 0 + + + core + public_global + ajax_topictitle + + + 31006 + 31006 + 0 + + + core + public_global + ajax_topicstate + Altered topic state (opened/closed) from forum view + Изменен статус темы (открыта/закрыта) + 31006 + 31006 + 0 + + + core + public_global + modlogs_unpinopen + + Тема опущена и открыта + 31006 + 31006 + 0 + + + core + public_global + modlogs_unpinclose + + Тема опущена и закрыта + 31006 + 31006 + 0 + + + core + public_global + modlogs_pinopen + + Тема поднята и открыта + 31006 + 31006 + 0 + + + core + public_global + modlogs_opened + Opened topic from post form + Тема открыта + 31006 + 31006 + 0 + + + core + public_global + modlogs_unpinned + Unpinned topic from post form + Тема опущена + 31006 + 31006 + 0 + + + core + public_global + modlogs_pinclose + + Тема закрыта и поднята + 31006 + 31006 + 0 + + + core + public_global + modlogs_pinned + Pinned topic from post form + Тема поднята + 31006 + 31006 + 0 + + + core + public_global + modlogs_closed + Closed topic from post form + Тема закрыта + 31006 + 31006 + 0 + + + core + public_global + m_posts + Posts: + Сообщений: + 31006 + 31006 + 0 + + + core + public_global + m_joined + Joined: + Регистрация: + 31006 + 31006 + 0 + + + core + public_global + m_group + Group: + Группа: + 31006 + 31006 + 0 + + + core + public_global + partial_login + The login was successful! + Вы вошли в систему! + 31006 + 31006 + 0 + + + core + public_global + report_center_rss + Report Center RSS Feed + RSS системы жалоб + 31006 + 31006 + 0 + + + core + public_global + report_menu_view_report + View Report + Просмотр + 31006 + 31006 + 0 + + + core + public_global + report_menu_mark_complete + Mark Complete + Пометить как решенная + 31006 + 31006 + 0 + + + core + public_global + bbc_date_cite + From %s: + От %s + 31006 + 31006 + 0 + + + core + public_global + report_member_bar + Active Reports + Активных жалоб: + 31006 + 31006 + 0 + + + core + public_global + bbc_quote + Quote + Цитата + 31006 + 31006 + 0 + + + core + public_global + bbc_full_cite + %s, on %s, said: + %s (%s) писал: + 31006 + 31006 + 0 + + + core + public_global + bbc_name_cite + %s said: + %s сказал: + 31006 + 31006 + 0 + + + core + public_global + bbc_external_link + External link + Ссылка + 31006 + 31006 + 0 + + + core + public_global + bbc_member_bbcode + Member profile + Профиль пользователя + 31006 + 31006 + 0 + + + core + public_global + bbc_email + E-mail Link + E-mail + 31006 + 31006 + 0 + + + core + public_global + glb_captcha_text + Please enter the 6 character code shown in the image. If you cannot read the code, click the image to generate a new one. Case sensitive. + Пожалуйста введите 6 символов указанных на картинке. Если вы не можете прочитать символы на картинке, нажмите на картинку, чтобы получить другую. Код регистрозависим (различаются заглавные и прописные символы) + 31006 + 31006 + 0 + + + core + public_global + glb_captcha_enter + Confirm security code + Подтвердите код безопасности + 31006 + 31006 + 0 + + + core + public_global + gbl_captcha_image_desc + If you do not see any numbers, or see broken images, please contact a board administrator to rectify the problem. + Если вы не видите никаких чисел или видите не все числа, пожалуйста сообщите об этом администрации форума. + 31006 + 31006 + 0 + + + core + public_global + glb_captcha_image + Your unique security code + Код безопасности + 31006 + 31006 + 0 + + + core + public_global + gbl_captcha_title + Security Code + Код безопасности + 31006 + 31006 + 0 + + + core + public_global + rss_board_offline + Our board is offline temporarily and RSS feeds are unavailable during this time + Наша система в данный момент отключена. RSS не доступен. + 31006 + 31006 + 0 + + + core + public_global + reputation_protected + Can not modify that groups reputation + Вы не можете изменить репутацию у пользователя этой группы + 31006 + 31006 + 0 + + + core + public_global + reputation_config + The configuration file for the reputation voting is missing or corrupt. + Конфигурация системы рейтинг отсутствует или повреждена. + 31006 + 31006 + 0 + + + core + public_global + reputation_quota_neg + You have reached your quota of negative votes for the day + Вы исчерпали лимит отрицательных оценок на сегодня + 31006 + 31006 + 0 + + + core + public_global + reputation_quota_pos + You have reached your quota of positive votes for the day + Вы исчерпали лимит положительных оценок на сегодня + 31006 + 31006 + 0 + + + core + public_global + reputation_invalid + Invalid Rating + Неверный рейтинг + 31006 + 31006 + 0 + + + core + public_global + reputation_yourown + You are now allowed to vote on your own content + Вы не можете голосовать за собственный контент + 31006 + 31006 + 0 + + + core + public_global + reputation_guest + You must be logged in to use the reputation system + Вы должны войти в систему, чтобы воспользоваться системой рейтинга + 31006 + 31006 + 0 + + + core + public_global + reputation_offline + Rating System Offline + Система рейтинга отключена + 31006 + 31006 + 0 + + + core + public_global + task_openidcleanup + OpenID temporary caches cleared out + OpenID кеши очищены + 31006 + 31006 + 0 + + + core + public_global + task_mobileNotifications + Mobile notifications sent + Отправлены уведомления мобильным клиентам + 31006 + 31006 + 0 + + + core + public_global + task_profileviews + Profile views counter updated + Счетчик просмотров профилей обновлен + 31006 + 31006 + 0 + + + core + public_global + task_mysqlcleanup + Cleaned up sleeping mysql processes + Убиты «заснувшие» mysql процессы + 31006 + 31006 + 0 + + + core + public_global + task_removevalidating + %s old validating members pruned + %s старых аккаунтов, ожидающих активации, удалено + 31006 + 31006 + 0 + + + core + public_global + task_removelocked + %s locked members pruned + %s старых аккаунтов, ожидающих активации, удалено + 31006 + 31006 + 0 + + + core + public_global + task_dailycleanout + %s XML-RPC logs removed, %s orphaned attachments removed, and %s subscriptions pruned + %s XML-RPC записей журнала удалено, %s потерянных прикрепленных файлов удалено, %s подписок очищено и %s маркеров прочтения тем удалено + 31006 + 31006 + 0 + + + core + public_global + task_weeklydigest + + Еженедельный отчет о темах и сообщениях отправлен + 31006 + 31006 + 0 + + + core + public_global + task_updateviews + Topic views counter updated + Количество просмотров тем обновлено + 31006 + 31006 + 0 + + + core + public_global + task_rssimport + RSS Import completed (%s) + Импорт RSS завершен (%s) + 31006 + 31006 + 0 + + + core + public_global + task_dailydigest + + Ежедневный отчет о темах и сообщениях отправлен + 31006 + 31006 + 0 + + + core + public_global + task_calendars + Calendar recached + Обновление кешей календаря завершено + 31006 + 31006 + 0 + + + core + public_global + task_announcements + Announcements updated + Объявления обновлены + 31006 + 31006 + 0 + + + core + public_global + task_pop3email + Checked for incoming Emails + Проверка входящих Email + 31006 + 31006 + 0 + + + core + public_global + task_statsrebuilt + Statistics rebuilt + Статистика обновлена + 31006 + 31006 + 0 + + + core + public_global + task_logprune + Log tables pruned + Журналы очищены + 31006 + 31006 + 0 + + + core + public_global + task_cleanout + Old reg_images, sessions and search results removed + Старые коды подтверждения, сессии и результаты поиска удалены + 31006 + 31006 + 0 + + + core + public_global + attach_notallowed + Uploading is not allowed + Загрузка запрещена + 31006 + 31006 + 0 + + + core + public_global + attach_unlimited + Unlimited + не ограничено + 31006 + 31006 + 0 + + + core + public_global + board_offline_title + Board Message + Сообщение + 31006 + 31006 + 0 + + + core + public_global + resized_image + Resized to #{percent}% (was #{width} x #{height}) - Click image to enlarge + Уменьшено на #{percent}% (#{width} x #{height}) - Нажмите для увеличения + 31006 + 31006 + 0 + + + core + public_global + advanced + Advanced + Расширенный + 31006 + 31006 + 0 + + + core + public_global + go_to_my_gallery + Go to my gallery + Перейти в свою галерею + 31006 + 31006 + 0 + + + core + public_global + my_gallery + My Gallery + Моя галерея + 31006 + 31006 + 0 + + + core + public_global + view_help + View help + Перейти к помощи + 31006 + 31006 + 0 + + + core + public_global + advanved_help + Advanced Search + Расширенный поиск + 31006 + 31006 + 0 + + + core + public_global + my_blog + My Blog + Мой блог + 31006 + 31006 + 0 + + + core + public_global + client_area + Client Area + Клиент-центр + 31006 + 31006 + 0 + + + core + public_global + manage_friends + Manage Friends + Друзья + 31006 + 31006 + 0 + + + core + public_global + go_to_my_blog + Go to my blog + Перейти в свой блог + 31006 + 31006 + 0 + + + core + public_global + your_cp + My Settings + Настройки + 31006 + 31006 + 0 + + + core + public_global + logo + Logo + Логотип + 31006 + 31006 + 0 + + + core + public_global + go_home + Go to board index + Перейти к списку форумов + 31006 + 31006 + 0 + + + core + public_global + view_reports + View active reports + Просмотреть жалобы + 31006 + 31006 + 0 + + + core + public_global + post_announcement + Manage Announcements + Создание объявления + 31006 + 31006 + 0 + + + core + public_global + mod_tools + Mod Tools: + Модерирование: + 31006 + 31006 + 0 + + + core + public_global + ip_lookup + IP Lookup + Определение IP + 31006 + 31006 + 0 + + + core + public_global + login_to_acp + Log in to your Admin CP + Вход в админцентр форума + 31006 + 31006 + 0 + + + core + public_global + jump_to_content + Jump to content + Перейти к содержимому + 31006 + 31006 + 0 + + + core + public_global + cancel + Cancel + Отмена + 31006 + 31006 + 0 + + + core + public_global + report + Report + Жалоба + 31006 + 31006 + 0 + + + core + public_global + or + or + или + 31006 + 31006 + 0 + + + core + public_global + remove_friend + Remove Friend + Удалить из друзей + 31006 + 31006 + 0 + + + core + public_global + page_title_page + - Page + - Страница + 31006 + 31006 + 0 + + + core + public_global + add_friend + Add as Friend + Добавить в друзья + 31006 + 31006 + 0 + + + core + public_global + generic_date + Date + Дата + 31006 + 31006 + 0 + + + core + public_global + lightbox_of + of + из + 31006 + 31006 + 0 + + + core + public_global + lightbox_label + Image + Изображение + 31006 + 31006 + 0 + + + core + public_global + mark_all_as_read + Mark all as read + Отметить все как прочтенное + 31006 + 31006 + 0 + + + core + public_global + mark_board_as_read + Mark Board As Read + Отметить все сообщения прочитанными + 31006 + 31006 + 0 + + + core + public_global + delete_my_cookies + Delete My Cookies + Очистить cookies + 31006 + 31006 + 0 + + + core + public_global + delete_all_cookies_title + Delete cookies set by this board + Очистить cookies, установленные системой + 31006 + 31006 + 0 + + + core + public_global + back_to + Back to + Вернуться к + 31006 + 31006 + 0 + + + core + public_global + back_to_top + Back to top + Наверх + 31006 + 31006 + 0 + + + core + public_global + go_to_top + Go to top + Наверх + 31006 + 31006 + 0 + + + core + public_global + exec_stats + Execution Stats + Статистика работы системы + 31006 + 31006 + 0 + + + core + public_global + time_now + Time Now: + Сейчас: + 31006 + 31006 + 0 + + + core + public_global + theme_prefix + Theme: + Стиль: + 31006 + 31006 + 0 + + + core + public_global + language_prefix + Language: + Язык: + 31006 + 31006 + 0 + + + core + public_global + override_browser_theme + Click here to manually choose a theme + Нажмите сюда для выбора темы + 31006 + 31006 + 0 + + + core + public_global + skin_browser_set + You are using a theme designed for your browser. + Вы используете тему наиболее подходящую для вашего браузера + 31006 + 31006 + 0 + + + core + public_global + rss_feed + RSS Feed + RSS поток + 31006 + 31006 + 0 + + + core + public_global + skin_and_lang + Skin and Language + Внешний вид + 31006 + 31006 + 0 + + + core + public_global + board_rules + Board Rules + Правила форума + 31006 + 31006 + 0 + + + core + public_global + pc_replies + Replies: + Ответов: + 31006 + 31006 + 0 + + + core + public_global + pc_sent + Sent: + Отправлено: + 31006 + 31006 + 0 + + + core + public_global + ignore_conversation + Ignore This Notification + Игнорировать + 31006 + 31006 + 0 + + + core + public_global + nav_return_to + Return to + Вернуться к + 31006 + 31006 + 0 + + + core + public_global + pc_subject + Subject: + Тема: + 31006 + 31006 + 0 + + + core + public_global + replied_convo + replied to a conversation + ответил в личной беседе + 31006 + 31006 + 0 + + + core + public_global + go_to_prefix + Go to %s + Перейти к + 31006 + 31006 + 0 + + + core + public_global + sent_new_convo + sent you a new conversation + хочет начать личную беседу с вами + 31006 + 31006 + 0 + + + core + public_global + go_to_memberlist + Go to Member List + Перейти к списку пользователей + 31006 + 31006 + 0 + + + core + public_global + discussion + Forums + Обсуждения + 31006 + 31006 + 0 + + + core + public_global + home + Home + На главную + 31006 + 31006 + 0 + + + core + public_global + go_to_discussion + Go to Forums + Перейти к списку форумов + 31006 + 31006 + 0 + + + core + public_global + homepage_title + Homepage + Перейти на сайт + 31006 + 31006 + 0 + + + core + public_global + minus + Minus + Минус + 31006 + 31006 + 0 + + + core + public_global + add + Add + Добавить + 31006 + 31006 + 0 + + + core + public_global + captcah_new + + Не можете прочитать? Нажмите здесь чтобы создать новое изображение. + 31006 + 31006 + 0 + + + core + public_global + not_signed_in + You are not signed in + Вы не вошли + 31006 + 31006 + 0 + + + core + public_global + click_login + Click here to log in + Войти + 31006 + 31006 + 0 + + + core + public_global + board_offline_desc + This board is currently offline. + Форумы в данный момент отключены + 31006 + 31006 + 0 + + + core + public_global + attempt_login + Attempt to log in + Попробовать войти в систему + 31006 + 31006 + 0 + + + core + public_global + check_all + Check all + Выбрать все + 31006 + 31006 + 0 + + + core + public_global + click_toggle + Click to Toggle + Нажмите для переключения + 31006 + 31006 + 0 + + + core + public_global + board_offline + Board Offline + Форум отключен + 31006 + 31006 + 0 + + + core + public_global + warn_status + Warn Status + Предупреждения + 31006 + 31006 + 0 + + + core + public_global + warn_level + Warning level: + Уровень предупреждения: + 31006 + 31006 + 0 + + + core + public_global + warn_view_history + View warn history + Посмотреть историю предупреждений + 31006 + 31006 + 0 + + + core + public_global + warn_decrease + Decrease warning + снять предупреждения + 31006 + 31006 + 0 + + + core + public_global + view_gallery + View gallery + Перейти к галерее + 31006 + 31006 + 0 + + + core + public_global + warn_increase + Increase warning + добавить предупреждение + 31006 + 31006 + 0 + + + core + public_global + view_blog + View blog + Перейти к блогу + 31006 + 31006 + 0 + + + core + public_global + pm_member + PM this member + Отправить сообщение + 31006 + 31006 + 0 + + + core + public_global + photo + Photo + Фотография + 31006 + 31006 + 0 + + + core + public_global + users_photo + + фотография + 31006 + 31006 + 0 + + + core + public_global + icon + Icon + Иконка + 31006 + 31006 + 0 + + + core + public_global + their_profile + + + 31006 + 31006 + 0 + + + core + public_global + my_profile + My Profile + Профиль + 31006 + 31006 + 0 + + + core + public_global + your_profile + Your Profile + Ваш профиль + 31006 + 31006 + 0 + + + core + public_global + view_profile + View Profile + Просмотр профиля + 31006 + 31006 + 0 + + + core + public_global + _stopwords_ + about,all,and,been,can,cant,for,has,here,just,me,new,next,not,old,out,our,said,saw,that,thats,the,their,then,theyll,this,was,were,well,will,with,what,whats,when,where,why,you + about,all,and,can,cant,for,just,me,new,not,old,out,the,then,theyll,this,was,were,well,will,with,what,whats,when,where,why,you,о,и,на,в,к,под,из,подо,из,перед,по,за,без,до,от,при,через,с,у,без + 31006 + 31006 + 0 + + + core + public_global + find_posts + Find Posts + Найти сообщения + 31006 + 31006 + 0 + + + core + public_global + find_topics + Find Topics + Найти темы + 31006 + 31006 + 0 + + + core + public_global + use_full_editor + Use full messenger + Полная форма отправки + 31006 + 31006 + 0 + + + core + public_global + manage_ignored_users + Manage Ignored Users + Игнорируемые + 31006 + 31006 + 0 + + + core + public_global + quick_send_to + Sending a PM to + Отправка личного сообщения для + 31006 + 31006 + 0 + + + core + public_global + quick_send_button + Send + Отправить + 31006 + 31006 + 0 + + + core + public_global + quick_message + Message + Сообщение + 31006 + 31006 + 0 + + + core + public_global + quick_subject + Subject + Тема + 31006 + 31006 + 0 + + + core + public_global + macro__show + Show + Показать + 31006 + 31006 + 0 + + + core + public_global + macro__view_post + View Post + Просмотр сообщения + 31006 + 31006 + 0 + + + core + public_global + macro__useronline + User is online + Пользователь онлайн + 31006 + 31006 + 0 + + + core + public_global + macro__pip + Pip + Pip + 31006 + 31006 + 0 + + + core + public_global + macro__tracking + Tracking + Подписаться + 31006 + 31006 + 0 + + + core + public_global + macro__useroffline + User is offline + Пользователь офлайн + 31006 + 31006 + 0 + + + core + public_global + macro__useredit + Edit + Изменить + 31006 + 31006 + 0 + + + core + public_global + macro__voted + Voted + Проголосовал + 31006 + 31006 + 0 + + + core + public_global + macro__user + User + Пользователь + 31006 + 31006 + 0 + + + core + public_global + D_6 + Saturday + Суббота + 31006 + 31006 + 0 + + + core + public_global + macro__edit + Edit icon + Изменить + 31006 + 31006 + 0 + + + core + public_global + macro__delete + Delete icon + Удалить + 31006 + 31006 + 0 + + + core + public_global + macro__reply + Reply Icon + Ответить + 31006 + 31006 + 0 + + + core + public_global + macro__report + Report Icon + Жалоба + 31006 + 31006 0 @@ -7413,38 +8025,8 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> pm_this_member PM this member Отправить ЛС - 30008 - 30008 - 0 - - - core - public_global - ajax_nohtml_return - There was an error attempting to retrieve the HTML to display - Возникла ошибка при получении HTML для вывода - 30011 - 30011 - 0 - - - core - public_global - ajax_avatar_dir - Could not locate that directory - Не удалось найти директорию - 30011 - 30011 - 0 - - - core - public_global - ajax_incomplete_data - Incomplete Data - Неверные данные - 30011 - 30011 + 31006 + 31006 0 @@ -7453,98 +8035,758 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> emoticons_template_title Emoticons Смайлики - 30011 - 30011 + 31006 + 31006 0 core - public_help - topic_text - Here is the topic you chose to view - Выбранный вами раздел помощи - 30005 + public_global + mark_pc_read + Mark As Read + Отметить прочтенным + 31006 + 31006 + 0 + + + core + public_global + configure_notifications + Notification Settings + Настройки уведомлений + 31006 + 31006 + 0 + + + core + public_global + notifications_viewall + View All Notifications + Все уведомления + 31006 + 31006 + 0 + + + core + public_global + notify_toggle + Toggle the notification excerpt + Переключить + 31006 + 31006 + 0 + + + core + public_global + nomore_notifications_4u + We could not find any more unread notifications for you + У вас нет непрочитанных уведомлений + 31006 + 31006 + 0 + + + core + public_global + notifylogin_error + You must be logged in to view your notifications + Для просмотра уведомлений необходимо зайти в систему + 31006 + 31006 + 0 + + + core + public_global + unread_notification_suffix + unread notifications + непрочитанных уведомлений + 31006 + 31006 + 0 + + + core + public_global + manage_notifications + You have %s unread notifications + У вас %s непрочитанных уведомлений + 31006 + 31006 + 0 + + + core + public_global + gbl_sharelink_with + Share this link via + Поделиться ссылкой через + 31006 + 31006 + 0 + + + core + public_global + view_topic_preview + View topic preview + Предпросмотр темы + 31006 + 31006 + 0 + + + core + public_global + status_creator_facebook + Facebook + Facebook + 31006 + 31006 + 0 + + + core + public_global + status_creator_twitter + Twitter + Twitter + 31006 + 31006 + 0 + + + core + public_global + status_creator_ipb + Board + Форум + 31006 + 31006 + 0 + + + core + public_global + su_via + via + через + 31006 + 31006 + 0 + + + core + public_global + context_search_forum + This forum + Этот форум + 31006 + 31006 + 0 + + + core + public_global + context_search_topic + This topic + Эта тема + 31006 + 31006 + 0 + + + core + public_global + context_search_title + Search section: + Искать в: + 31006 + 31006 + 0 + + + core + public_global + gbl_find_my_content + Find My Content + Публикации пользователя + 31006 + 31006 + 0 + + + core + public_global + my_content_link + My Content + Мои публикации + 31006 + 31006 + 0 + + + core + public_global + active_users_detail + %s members, %s guests, %s anonymous users + %s пользователей, %s гостей, %s скрытых пользователей + 31006 + 31006 + 0 + + + core + public_global + _larr + + + 31006 + 31006 + 0 + + + core + public_global + _raquo + + + 31006 + 31006 + 0 + + + core + public_global + _laquo + + + 31006 + 31006 + 0 + + + core + public_global + notify__sent + + + 31006 0 core - public_help - no_help_topics - There are no help topics yet - В данный момент в системе нет разделов помощи - 30005 - + public_global + _rarr + + + 31006 + 31006 0 core - public_help - help_topics - Help Topics - Разделы помощи - 30005 - + public_global + more + More + Дальше + 31006 + 31006 0 core - public_help - help_topic - Help Topic - Раздел помощи - 30005 - + public_global + full_version + Full Version + Полная версия + 31006 + 31006 0 core - public_help - page_title - View Help Topics - Просмотр разделов помощи - 30005 - + public_global + task__optimizedtables + %s database tables optimized + %s таблиц оптимизировано + 31006 + 31006 0 core - public_help - help_read_document - Read document - Прочитать - 30005 - + public_global + nonotifications_list + You do not have any notifications + У вас нет уведомлений + 31006 + 31006 0 core - public_help - help_txt - Choose a topic from the list, or search for a topic - Выберите интересующий вас раздел помощи или воспользуйтесь поиском - 30005 - + public_global + gbl_fb_no_app_id + Facebook Application ID]]> + Facebook Application]]> + 31006 + 31006 0 core - public_help - choose_file - Choose a Topic - Выберите раздел - 30005 - + public_global + acp_sessiontimeout + Your ACP session has expired. Please refresh the page to log back in. + Сессия истекла. Пожалуйста, обновите страницу и повторите вход в систему. + 31006 + 31006 0 core - public_help - help_back_list_title - Back to list - Назад к списку - 30005 - + public_global + ap_np_msg + You do not have permission for this action + Вы не имеете права на выполнение этого действия. + 31006 + 31006 + 0 + + + core + public_global + ap_error + Notice + Уведомление + 31006 + 31006 + 0 + + + core + public_global + status_creator_ipbmobiphone + Mobile App + Mobile App + 31006 + 31006 + 0 + + + core + public_global + mob_view_new_posts + New Content + Новые публикации + 31006 + 31006 + 0 + + + core + public_global + mob_status_updates + Status Updates + Обновления статуса + 31006 + 31006 + 0 + + + core + public_global + licensed_to + Licensed to: + Лицензия зарегистрирована на: + 31006 + 31006 + 0 + + + core + public_global + lim_windows + Log in with Windows Live + Войти с использованием Windows Live + 31006 + 31006 + 0 + + + core + public_global + lim_twitter + Log in with Twitter + Вход с использованием Twitter + 31006 + 31006 + 0 + + + core + public_global + lim_facebook + Log in with Facebook + Войти с использованием Facebook + 31006 + 31006 + 0 + + + core + public_global + lim_openid + Log in with OpenID + Войти с использованием OpenID + 31006 + 31006 + 0 + + + core + public_global + on + on + в + 31006 + 31006 + 0 + + + core + public_global + loadingtext + Loading... + Загрузка... + 31006 + 31006 + 0 + + + core + public_global + freeiphoneapp + Get the free IP.Board App for iPhone now! + Установите бесплатное приложение на iPhone для IP.Board + 31006 + 31006 + 0 + + + core + public_global + _rssimportnotoc + No title or content + Нет содержимого или названия + 31006 + 31006 + 0 + + + core + public_global + _rssimportcode + Code: + Код: + 31006 + 31006 + 0 + + + core + public_global + _rssimportsource + Source + Источник + 31006 + 31006 + 0 + + + core + public_global + rssappoffline + The requested RSS feed could not be retrieved + Не удалось получить запрашиваемый RSS + 31006 + 31006 + 0 + + + core + public_global + unset_button + Unlike + Не нравится + 31006 + 31006 + 0 + + + core + public_global + unset_fave_words + If you unlike this you will no longer receive any notifications + Если вам это не нравится вы больше ну будете получать какие-либо уведомления + 31006 + 31006 + 0 + + + core + public_global + unset_fave_title + Unlike + Не нравится + 31006 + 31006 + 0 + + + core + public_global + fave_and + and + и + 31006 + 31006 + 0 + + + core + public_global + fave_formatted_me + You like this + Вам понравилось это + 31006 + 31006 + 0 + + + core + public_global + fave_moi + You + Вы + 31006 + 31006 + 0 + + + core + public_global + fave_formatted_more + %s others like this]]> + %s другим]]> + 31006 + 31006 + 0 + + + core + public_global + fave_formatted_one_more + 1 other like this]]> + еще одному]]> + 31006 + 31006 + 0 + + + core + public_global + fave_formatted_one + %s likes this + %s понравилось это + 31006 + 31006 + 0 + + + core + public_global + fave_formatted_many + %s like this + Понравилось: %s + 31006 + 31006 + 0 + + + core + public_global + your_likes + My Liked Content + Мне нравится + 31006 + 31006 + 0 + + + core + public_global + D_7 + Sunday + Воскресенье + 31006 + 31006 + 0 + + + core + public_global + name + Name + Имя + 31006 + 31006 + 0 + + + core + public_global + register + Register Now! + Регистрация + 31006 + 31006 + 0 + + + core + public_global + logged_in_as + Signed in as + Вошли как + 31006 + 31006 + 0 + + + core + public_global + new_user + New user? + Новый пользователь? + 31006 + 31006 + 0 + + + core + public_global + msg_new + New + Новых + 31006 + 31006 + 0 + + + core + public_global + offline + Sorry, the boards are offline at the moment + Система в данный момент отключена + 31006 + 31006 + 0 + + + core + public_global + log_out + Sign Out + Выход + 31006 + 31006 + 0 + + + core + public_global + dont_wait + Or click here if you do not wish to wait + Или нажмите сюда, если не хотите ждать + 31006 + 31006 + 0 + + + core + public_global + stand_by + Please stand by... + Подождите... + 31006 + 31006 + 0 + + + core + public_global + your_messenger + Messenger + Личные сообщения + 31006 + 31006 + 0 + + + core + public_global + sign_in + + Вход + 31006 + 31006 + 0 + + + core + public_global + ajax_incomplete_data + Incomplete Data + Неверные данные + 31006 + 31006 + 0 + + + core + public_global + ajax_nohtml_return + There was an error attempting to retrieve the HTML to display + Возникла ошибка при получении HTML для вывода + 31006 + 31006 + 0 + + + core + public_global + ajax_avatar_dir + Could not locate that directory + Не удалось найти директорию + 31006 + 31006 + 0 + + + core + public_global + lim_vkontakte + Вход с использованием Вконтакте + Вход с использованием Вконтакте + 31004 + 31004 0 @@ -7553,1038 +8795,108 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> help_return_list Return to the list of topics Вернуться к списку разделов - 30005 - 30005 + 31006 + 31006 + 0 + + + core + public_help + help_back_list_title + Back to list + Назад к списку + 31006 + 31006 + 0 + + + core + public_help + help_read_document + Read document + Прочитать + 31006 + 31006 + 0 + + + core + public_help + page_title + View Help Topics + Просмотр разделов помощи + 31006 + 31006 + 0 + + + core + public_help + help_topic + Help Topic + Раздел помощи + 31006 + 31006 + 0 + + + core + public_help + help_topics + Help Topics + Разделы помощи + 31006 + 31006 + 0 + + + core + public_help + help_txt + Choose a topic from the list, or search for a topic + Выберите интересующий вас раздел помощи или воспользуйтесь поиском + 31006 + 31006 + 0 + + + core + public_help + choose_file + Choose a Topic + Выберите раздел + 31006 + 31006 + 0 + + + core + public_help + topic_text + Here is the topic you chose to view + Выбранный вами раздел помощи + 31006 + 31006 + 0 + + + core + public_help + no_help_topics + There are no help topics yet + В данный момент в системе нет разделов помощи + 31006 + 31006 0 core public_js - error_occured - An error occurred - Возникла ошибка - 30005 - 30005 - 1 - - - core - public_js - loading - Loading... - Загрузка - 30005 - 30005 - 1 - - - core - public_js - no_permission - You do not have permission for this action - У вас нет прав для совершения этого действия - 30005 - 30005 - 1 - - - core - public_js - cannot_readd_friend - You cannot re-add this friend for five minutes after removing them - В течение пяти минут вы не можете снова добавить только что удаленного пользователя в друзья. - 30005 - 30005 - 1 - - - core - public_js - rtg_poor - Poor - Плохо - 30005 - 30005 - 1 - - - core - public_js - friend_already - This member is already on your friends list - Пользователь уже ваш друг - 30005 - 30005 - 1 - - - core - public_js - action_failed - Action failed - Действие не выполнено - 30005 - 30005 - 1 - - - core - public_js - error - Error - Ошибка - 30005 - 30005 - 1 - - - core - public_js - error_security - Security Error - Ошибка защиты - 30005 - 30005 - 1 - - - core - public_js - delete_confirm - Are you sure you want to continue? - Вы действительно хотите продолжить? - 30005 - 30005 - 1 - - - core - public_js - rtg_ok - Okay - Средне - 30005 - 30005 - 1 - - - core - public_js - available - - - 30005 - 30005 - 1 - - - core - public_js - rtg_nbad - Not Bad - Не плохо - 30005 - 30005 - 1 - - - core - public_js - rtg_good - Good - Хорошо - 30005 - 30005 - 1 - - - core - public_js - rtg_awesome - Awesome! - Замечательно! - 30005 - 30005 - 1 - - - core - public_js - member_no_exist - That member does not exist! - Пользователь не существует - 30005 - 30005 - 1 - - - core - public_js - rtg_already - - Вы уже проголосовали за эту запись - 30005 - 30005 - 1 - - - core - public_js - too_long - - - 30005 - 30005 - 1 - - - core - public_js - invalid_chars - - - 30005 - 30005 - 1 - - - core - public_js - rtg_topic_locked - This topic is locked - Тема закрыта - 30005 - 30005 - 1 - - - core - public_js - too_short - - - 30005 - 30005 - 1 - - - core - public_js - is_required - - - 30005 - 30005 - 1 - - - core - public_js - not_available - - - 30005 - 30005 - 1 - - - core - public_js - email_doesnt_match - - - 30005 - 30005 - 1 - - - core - public_js - email_in_use - - - 30005 - 30005 - 1 - - - core - public_js - email_banned - - - 30005 - 30005 - 1 - - - core - public_js - invalid_email - - - 30005 - 30005 - 1 - - - core - public_js - pass_doesnt_match - - - 30005 - - 1 - - - core - public_js - pass_too_short - - - 30005 - - 1 - - - core - public_js - pass_too_long - - - 30005 - - 1 - - - core - public_js - delete_post_confirm - Are you sure you want to delete this post? - Вы уверены что хотите удалить это сообщение? - 30005 - 30005 - 1 - - - core - public_js - copy_topic_link - Copy the permalink below to store the direct address to this post in your clipboard - Прямая ссылка на сообщение - 30005 - 30005 - 1 - - - core - public_js - set_as_spammer - Are you sure you want to flag this user as a spam account? - Вы уверены что хотите пометить пользователя как спамера? - 30005 - 30005 - 1 - - - core - public_js - is_spammer - This account has been flagged as a spam account - Этот пользователь уже отмечен как спамер - 30005 - 30005 - 1 - - - core - public_js - poll_not_enough_choices - - Один из вопросов не содержит достаточного количества вариантов выбора, вариантов должно быть не меньше двух! - 30005 - - 1 - - - core - public_js - poll_no_more_choices - You cannot add any more choices to this question - Вы больше не можете добавлять варианты к вопросу. - 30005 - - 1 - - - core - public_js - poll_no_more_q - You cannot add any more questions to this poll! - Вы больше не можете добавлять вопросы к опросу - 30005 - - 1 - - - core - public_js - poll_stats - - - 30005 - - 1 - - - core - public_js - editor_enter_list - Enter list item (or hit Cancel to finish list) - Введите пункт списка - 30005 - 30005 - 1 - - - core - public_js - click_to_show_opts - Click to configure post options - Нажмите для управления опциями сообщения - 30005 - 30005 - 1 - - - core - public_js - delete_topic_confirm - Are you sure you want to delete this topic? - Вы действительно хотите удалить эту тему? - 30005 - 30005 - 1 - - - core - public_js - with_selected - With Selected ({num}) - С отмеченными ({num}) - 30005 - 30005 - 1 - - - core - public_js - click_to_attach - Click To Attach Files - Нажмите чтобы прикрепить файлы - 30005 - 30005 - 1 - - - core - public_js - att_select_files - Select files - Выберите файлы - 30005 - 30005 - 1 - - - core - public_js - post_empty - Your post is empty - Ваше сообщение пусто - 30005 - - 1 - - - core - public_js - upload_no_file - No file was selected for upload - Вы не выбрали файл для загрузки - 30005 - 30005 - 1 - - - core - public_js - invalid_mime_type - - Вы не можете загружать файлы подобного типа - 30005 - 30005 - 1 - - - core - public_js - upload_limit_hit - Upload limit exceeded - Превышен лимит - 30005 - 30005 - 1 - - - core - public_js - upload_failed - This upload failed - Загрузка не удалась - 30005 - 30005 - 1 - - - core - public_js - upload_too_big - This file was too big to upload - Размер файла превышает допустимый для загрузки размер - 30005 - 30005 - 1 - - - core - public_js - silly_server - The server returned an error during upload - Возникла ошибка при загрузке файла - 30005 - 30005 - 1 - - - core - public_js - upload_done - - - 30005 - 30005 - 1 - - - core - public_js - pending - Pending - Ожидает - 30005 - - 1 - - - core - public_js - upload_progress - - - 30005 - 30005 - 1 - - - core - public_js - uploading - Uploading... - Загрузка... - 30005 - 30005 - 1 - - - core - public_js - reached_max_folders - You have reached the maximum number of allowed folders - Вы достигли лимита на количество папок - 30005 - 30005 - 1 - - - core - public_js - upload_queue - You have attempted to queue too many files. The number of files you can queue is: - Вы попытались загрузить слишком много файлов. Допустимо одновременно загружать не более - 30005 - 30005 - 1 - - - core - public_js - upload_skipped - Upload Skipped - Загрузка пропущена - 30005 - 30005 - 1 - - - core - public_js - delete_pm_many_confirm - Are you sure you wish to delete these conversations? - Вы действительно хотите удалить эти переписки? - 30005 - 30005 - 1 - - - core - public_js - delete_pm_confirm - Are you sure you wish to permanently delete this conversation? - Вы действительно хотите удалить эту переписку? - 30005 - 30005 - 1 - - - core - public_js - delete_reply_confirm - Are you sure you want to delete this reply? - Вы действительно хотите удалить этот ответ? - 30005 - 30005 - 1 - - - core - public_js - folder_not_found - Cannot find that folder - Не удалось найти папку - 30005 - 30005 - 1 - - - core - public_js - folder_protected - Cannot perform that action on a protected folder - Не удалось совершить действие. Папка защищена. - 30005 - 30005 - 1 - - - core - public_js - cant_delete_folder - - Вы не можете удалить защищенную папку. - 30005 - 30005 - 1 - - - core - public_js - must_enter_name - You must enter a name - Необходимо ввести имя - 30005 - 30005 - 1 - - - core - public_js - confirm_delete - Are you sure you want to delete this folder? ALL messages in it will be deleted. This cannot be undone! - Вы действительно хотите удалить эту папку? Будут удалены ВСЕ сообщения, содержащиеся в ней. Данное действие НЕ ОБРАТИМО! - 30005 - 30005 - 1 - - - core - public_js - confirm_empty - Are you sure you want to empty this folder? - Вы действительно хотите очистить эту папку? - 30005 - 30005 - 1 - - - core - public_js - prof_comment_perm - You do not have permission to post comments on this profile - У вас не достаточно прав чтобы оставить комментарий в этом профиле - 30005 - 30005 - 1 - - - core - public_js - prof_comment_empty - You must enter a comment - Вы должны ввести текст комментария - 30005 - 30005 - 1 - - - core - public_js - enter_unlimited_names - Enter names - Введите имена - 30005 - 30005 - 1 - - - core - public_js - enter_x_names - - - 30005 - 30005 - 1 - - - core - public_js - prof_comment_mod - Your comment was added, but requires approval by this member before it will be displayed - Ваш комментарий был добавлен. Подождите пока владелец профиля, одобрит его, затем он появится в общем списке. - 30005 - 30005 - 1 - - - core - public_js - fail_config - Failed to save configuration - Не удалось сохранить настройки - 30005 - 30005 - 1 - - - core - public_js - fail_cblock - Failed to save content block changes - Не удалось сохранить изменения внутри блока - 30005 - 30005 - 1 - - - core - public_js - option_is_empty - - Данная настройка тега должна быть заполнена - 30005 - - 1 - - - core - public_js - js_rte_errorloadingiespell - Error loading ieSpell. Exception: - Не удалось загрузить ieSpell. Ошибка: - 30005 - 30005 - 1 - - - core - public_js - js_rte_erroriespell - ieSpell was not detected. Click OK to go to the download page. - ieSpell не обнаружен. Нажмите OK для перехода на страницу загрузки - 30005 - 30005 - 1 - - - core - public_js - idm_msg_email - You did not enter an email address to send the email to - Вы не ввели e-mail адрес - 30005 - 30005 - 1 - - - core - public_js - blog_revert_header - Are you sure you want to revert your header? - Вы действительно хотите вернуть заголовок к прежнему виду? - 30005 - 30005 - 1 - - - core - public_js - idm_msg_text - You did not enter any text to email to the user - Вы не ввели сообщение - 30005 - 30005 - 1 - - - core - public_js - trouble_uploading - Trouble uploading? - Проблемы с загрузкой? - 30005 - 30005 - 1 - - - core - public_js - switch_to_advanced - Try our advanced uploader which supports multiple file uploading (modern browser required) - Воспользуйтесь нашим новым менеджером для загрузки сразу нескольких файлов (требуется современный браузер) - 30005 - 30005 - 1 - - - core - public_js - save_folder - ]]> - ]]> - 30005 - 30005 - 1 - - - core - public_js - invalid_folder_name - The folder name is invalid - Имя директории неверное - 30005 - 30005 - 1 - - - core - public_js - idm_comment_empty - Comment is empty - Комментарий пуст - 30005 - 30005 - 1 - - - core - public_js - idm_invalid_file - Invalid File - Файл неверный - 30005 - 30005 - 1 - - - core - public_js - prof_update_tooltip - Update my status - Обновить мой статус - 30006 - 30006 - 1 - - - core - public_js - prof_update_button - Update - Обновить - 30006 - 30006 - 1 - - - core - public_js - message_sent - Message Sent - Сообщение отправлено - 30006 - 30006 - 1 - - - core - public_js - unapprove - Unapprove - Скрыть - 30006 - 30006 - 1 - - - core - public_js - approve - Approve - Показать - 30006 - 30006 - 1 - - - core - public_js - vote_updated - Vote updated! - Голос обновлен! - 30007 - 30007 - 1 - - - core - public_js - vote_success - Vote saved! - Голос сохранен! - 30007 - 30007 - 1 - - - core - public_js - post_empty_post - - Нельзя отправлять пустое сообщение. Введите какой-либо текст в редакторе. - 30007 - 30007 - 1 - - - core - public_js - post_empty_title - You must enter a topic title! - Вы должны ввести название темы ! - 30007 - 30007 - 1 - - - core - public_js - post_empty_username - You must enter a username - Вы должны ввести имя пользователя - 30007 - 30007 - 1 - - - core - public_js - quickpm_msg_blank - Your message is blank - Введите сообщение - 30011 - 30011 - 1 - - - core - public_js - quickpm_enter_subject - Please enter a subject - Введите тему - 30011 - 30011 - 1 - - - core - public_js - usercp_photo_upload - You have not selected a file to upload - Вы не выбрали файл для загрузки - 30011 - 30011 - 1 - - - core - public_js - gallery_rotate_failed - There was an error rotating the image - Возникла проблема при повороте изображения - 30012 - 30012 - 1 - - - core - public_js - go_to_category - Go to this category - Перейти к категории - 30012 - 30012 - 1 - - - core - public_js - max_notes_reached - You cannot add any more notes to this image, because you have reached the maximum number allowed - Вы исчерпали лимит доступных примечаний для данного изображения. - 30012 - 30012 - 1 - - - core - public_js - note_confirm_delete - Are you sure you want to delete this note? - Вы хотите удалить примечание? - 30012 - 30012 + required_data_missing + Some required data was missing + Часть необходимых данных отсутствует + 31006 + 31006 1 @@ -8593,38 +8905,8 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> note_save_empty Your note cannot be empty; click the Delete link for this note if you do not wish to keep it Ваше примечание пусто; удалите его, если оно отправлено по ошибке - 30012 - 30012 - 1 - - - core - public_js - required_data_missing - Some required data was missing - Часть необходимых данных отсутствует - 30012 - 30012 - 1 - - - core - public_js - note_no_permission_e - You do not have permission to edit this note - Вы не можете редактировать примечания - 30012 - 30012 - 1 - - - core - public_js - note_no_permission_a - You do not have permission to add notes to this image - Вы не можете добавлять примечания к этому изображению - 30012 - 30012 + 31006 + 31006 1 @@ -8633,8 +8915,88 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> note_no_permission_d Вы не можете удалять примечания - 30012 - 30012 + 31006 + 31006 + 1 + + + core + public_js + note_no_permission_a + You do not have permission to add notes to this image + Вы не можете добавлять примечания к этому изображению + 31006 + 31006 + 1 + + + core + public_js + idm_invalid_file + Invalid File + Файл неверный + 31006 + 31006 + 1 + + + core + public_js + idm_comment_empty + Comment is empty + Комментарий пуст + 31006 + 31006 + 1 + + + core + public_js + note_no_permission_e + You do not have permission to edit this note + Вы не можете редактировать примечания + 31006 + 31006 + 1 + + + core + public_js + idm_msg_text + You did not enter any text to email to the user + Вы не ввели сообщение + 31006 + 31006 + 1 + + + core + public_js + idm_msg_email + You did not enter an email address to send the email to + Вы не ввели e-mail адрес + 31006 + 31006 + 1 + + + core + public_js + blog_publish_now + Publish Now + Опубликовать + 31006 + 31006 + 1 + + + core + public_js + blog_save_draft + Save Draft + В черновики + 31006 + 31006 1 @@ -8643,8 +9005,28 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> blog_cat_exists That category already exists Категория уже существует - 30012 - 30012 + 31006 + 31006 + 1 + + + core + public_js + fail_config + Failed to save configuration + Не удалось сохранить настройки + 31006 + 31006 + 1 + + + core + public_js + blog_revert_header + Are you sure you want to revert your header? + Вы действительно хотите вернуть заголовок к прежнему виду? + 31006 + 31006 1 @@ -8653,498 +9035,1158 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> blog_uncategorized Uncategorized Без категории - 30012 - 30012 + 31006 + 31006 1 core - public_login - register_now - Register Now - Зарегистрироваться - 30005 - 30005 + public_js + fail_cblock + Failed to save content block changes + Не удалось сохранить изменения внутри блока + 31006 + 31006 + 1 + + + core + public_js + option_is_empty + + Данная настройка тега должна быть заполнена + 31006 + 31006 + 1 + + + core + public_js + js_rte_errorloadingiespell + Error loading ieSpell. Exception: + Не удалось загрузить ieSpell. Ошибка: + 31006 + 31006 + 1 + + + core + public_js + prof_update_default + + О чем ты сейчас думаешь? + 31006 + 31006 + 1 + + + core + public_js + js_rte_erroriespell + ieSpell was not detected. Click OK to go to the download page. + ieSpell не обнаружен. Нажмите OK для перехода на страницу загрузки + 31006 + 31006 + 1 + + + core + public_js + prof_update_button + Update + Обновить + 31006 + 31006 + 1 + + + core + public_js + prof_comment_mod + Your comment was added, but requires approval by this member before it will be displayed + Ваш комментарий был добавлен. Подождите пока владелец профиля, одобрит его, затем он появится в общем списке. + 31006 + 31006 + 1 + + + core + public_js + prof_comment_perm + You do not have permission to post comments on this profile + У вас не достаточно прав чтобы оставить комментарий в этом профиле + 31006 + 31006 + 1 + + + core + public_js + prof_comment_empty + You must enter a comment + Вы должны ввести текст комментария + 31006 + 31006 + 1 + + + core + public_js + enter_unlimited_names + Enter names + Введите имена + 31006 + 31006 + 1 + + + core + public_js + save_folder + ]]> + ]]> + 31006 + 31006 + 1 + + + core + public_js + enter_x_names + + + 31006 + 31006 + 1 + + + core + public_js + invalid_folder_name + The folder name is invalid + Имя директории неверное + 31006 + 31006 + 1 + + + core + public_js + confirm_delete + Are you sure you want to delete this folder? ALL messages in it will be deleted. This cannot be undone! + Вы действительно хотите удалить эту папку? Будут удалены ВСЕ сообщения, содержащиеся в ней. Данное действие НЕ ОБРАТИМО! + 31006 + 31006 + 1 + + + core + public_js + cant_delete_folder + + Вы не можете удалить защищенную папку. + 31006 + 31006 + 1 + + + core + public_js + confirm_empty + Are you sure you want to empty this folder? + Вы действительно хотите очистить эту папку? + 31006 + 31006 + 1 + + + core + public_js + must_enter_name + You must enter a name + Необходимо ввести имя + 31006 + 31006 + 1 + + + core + public_js + folder_protected + Cannot perform that action on a protected folder + Не удалось совершить действие. Папка защищена. + 31006 + 31006 + 1 + + + core + public_js + folder_not_found + Cannot find that folder + Не удалось найти папку + 31006 + 31006 + 1 + + + core + public_js + delete_pm_confirm + Are you sure you wish to permanently delete this conversation? + Вы действительно хотите удалить эту переписку? + 31006 + 31006 + 1 + + + core + public_js + delete_reply_confirm + Are you sure you want to delete this reply? + Вы действительно хотите удалить этот ответ? + 31006 + 31006 + 1 + + + core + public_js + delete_pm_many_confirm + Are you sure you wish to delete these conversations? + Вы действительно хотите удалить эти переписки? + 31006 + 31006 + 1 + + + core + public_js + message_sent + Message Sent + Сообщение отправлено + 31006 + 31006 + 1 + + + core + public_js + reached_max_folders + You have reached the maximum number of allowed folders + Вы достигли лимита на количество папок + 31006 + 31006 + 1 + + + core + public_js + upload_queue + You have attempted to queue too many files. The number of files you can queue is: + Вы попытались загрузить слишком много файлов. Допустимо одновременно загружать не более + 31006 + 31006 + 1 + + + core + public_js + upload_skipped + Upload Skipped + Загрузка пропущена + 31006 + 31006 + 1 + + + core + public_js + pending + Pending + Ожидает + 31006 + 31006 + 1 + + + core + public_js + upload_done + + + 31006 + 31006 + 1 + + + core + public_js + uploading + Uploading... + Загрузка... + 31006 + 31006 + 1 + + + core + public_js + silly_server + The server returned an error during upload + Возникла ошибка при загрузке файла + 31006 + 31006 + 1 + + + core + public_js + upload_progress + + + 31006 + 31006 + 1 + + + core + public_js + upload_limit_hit + Upload limit exceeded + Превышен лимит + 31006 + 31006 + 1 + + + core + public_js + upload_too_big + This file was too big to upload + Размер файла превышает допустимый для загрузки размер + 31006 + 31006 + 1 + + + core + public_js + upload_failed + This upload failed + Загрузка не удалась + 31006 + 31006 + 1 + + + core + public_js + upload_no_file + No file was selected for upload + Вы не выбрали файл для загрузки + 31006 + 31006 + 1 + + + core + public_js + invalid_mime_type + + Вы не можете загружать файлы подобного типа + 31006 + 31006 + 1 + + + core + public_js + switch_to_advanced + Try our advanced uploader which supports multiple file uploading (modern browser required) + Воспользуйтесь нашим новым менеджером для загрузки сразу нескольких файлов (требуется современный браузер) + 31006 + 31006 + 1 + + + core + public_js + trouble_uploading + Trouble uploading? + Проблемы с загрузкой? + 31006 + 31006 + 1 + + + core + public_js + att_select_files + Select files + Выберите файлы + 31006 + 31006 + 1 + + + core + public_js + click_to_attach + Click To Attach Files + Нажмите чтобы прикрепить файлы + 31006 + 31006 + 1 + + + core + public_js + post_empty + Your post is empty + Ваше сообщение пусто + 31006 + 31006 + 1 + + + core + public_js + poll_stats + + + 31006 + 31006 + 1 + + + core + public_js + editor_enter_list + Enter list item (or hit Cancel to finish list) + Введите пункт списка + 31006 + 31006 + 1 + + + core + public_js + delete_topic_confirm + Are you sure you want to delete this topic? + Вы действительно хотите удалить эту тему? + 31006 + 31006 + 1 + + + core + public_js + click_to_show_opts + Click to configure post options + Нажмите для управления опциями сообщения + 31006 + 31006 + 1 + + + core + public_js + with_selected + With Selected ({num}) + С отмеченными ({num}) + 31006 + 31006 + 1 + + + core + public_js + unapprove + Unapprove + Скрыть + 31006 + 31006 + 1 + + + core + public_js + justgo + Go + Ок + 31006 + 31006 + 1 + + + core + public_js + approve + Approve + Показать + 31006 + 31006 + 1 + + + core + public_js + poll_no_more_choices + You cannot add any more choices to this question + Вы больше не можете добавлять варианты к вопросу. + 31006 + 31006 + 1 + + + core + public_js + poll_no_more_q + You cannot add any more questions to this poll! + Вы больше не можете добавлять вопросы к опросу + 31006 + 31006 + 1 + + + core + public_js + poll_not_enough_choices + + Один из вопросов не содержит достаточного количества вариантов выбора, вариантов должно быть не меньше двух! + 31006 + 31006 + 1 + + + core + public_js + is_spammer + This account has been flagged as a spam account + Этот пользователь уже отмечен как спамер + 31006 + 31006 + 1 + + + core + public_js + set_as_spammer + Are you sure you want to flag this user as a spam account? + Вы уверены что хотите пометить пользователя как спамера? + 31006 + 31006 + 1 + + + core + public_js + copy_topic_link + Copy the permalink below to store the direct address to this post in your clipboard + Прямая ссылка на сообщение + 31006 + 31006 + 1 + + + core + public_js + delete_post_confirm + Are you sure you want to delete this post? + Вы уверены что хотите удалить это сообщение? + 31006 + 31006 + 1 + + + core + public_js + vote_updated + Vote updated! + Голос обновлен! + 31006 + 31006 + 1 + + + core + public_js + vote_success + Vote saved! + Голос сохранен! + 31006 + 31006 + 1 + + + core + public_js + pass_too_long + + + 31006 + 31006 + 1 + + + core + public_js + pass_too_short + + + 31006 + 31006 + 1 + + + core + public_js + pass_doesnt_match + + + 31006 + 31006 + 1 + + + core + public_js + invalid_email + + + 31006 + 31006 + 1 + + + core + public_js + email_in_use + + + 31006 + 31006 + 1 + + + core + public_js + email_banned + + + 31006 + 31006 + 1 + + + core + public_js + email_doesnt_match + + + 31006 + 31006 + 1 + + + core + public_js + not_available + + + 31006 + 31006 + 1 + + + core + public_js + too_long + + + 31006 + 31006 + 1 + + + core + public_js + invalid_chars + + + 31006 + 31006 + 1 + + + core + public_js + too_short + + + 31006 + 31006 + 1 + + + core + public_js + is_required + + + 31006 + 31006 + 1 + + + core + public_js + rtg_already + + Вы уже проголосовали за эту запись + 31006 + 31006 + 1 + + + core + public_js + available + + + 31006 + 31006 + 1 + + + core + public_js + rtg_topic_locked + This topic is locked + Тема закрыта + 31006 + 31006 + 1 + + + core + public_js + rtg_good + Good + Хорошо + 31006 + 31006 + 1 + + + core + public_js + rtg_awesome + Awesome! + Замечательно! + 31006 + 31006 + 1 + + + core + public_js + rtg_nbad + Not Bad + Не плохо + 31006 + 31006 + 1 + + + core + public_js + rtg_ok + Okay + Средне + 31006 + 31006 + 1 + + + core + public_js + rtg_poor + Poor + Плохо + 31006 + 31006 + 1 + + + core + public_js + quickpm_msg_blank + Your message is blank + Введите сообщение + 31006 + 31006 + 1 + + + core + public_js + quickpm_enter_subject + Please enter a subject + Введите тему + 31006 + 31006 + 1 + + + core + public_js + member_no_exist + That member does not exist! + Пользователь не существует + 31006 + 31006 + 1 + + + core + public_js + friend_already + This member is already on your friends list + Пользователь уже ваш друг + 31006 + 31006 + 1 + + + core + public_js + cannot_readd_friend + You cannot re-add this friend for five minutes after removing them + В течение пяти минут вы не можете снова добавить только что удаленного пользователя в друзья. + 31006 + 31006 + 1 + + + core + public_js + no_permission + You do not have permission for this action + У вас нет прав для совершения этого действия + 31006 + 31006 + 1 + + + core + public_js + delete_confirm + Are you sure you want to continue? + Вы действительно хотите продолжить? + 31006 + 31006 + 1 + + + core + public_js + error_security + Security Error + Ошибка защиты + 31006 + 31006 + 1 + + + core + public_js + error + Error + Ошибка + 31006 + 31006 + 1 + + + core + public_js + action_failed + Action failed + Действие не выполнено + 31006 + 31006 + 1 + + + core + public_js + error_occured + An error occurred + Возникла ошибка + 31006 + 31006 + 1 + + + core + public_js + loading + Loading... + Загрузка + 31006 + 31006 + 1 + + + core + public_js + post_empty_post + + Нельзя отправлять пустое сообщение. Введите какой-либо текст в редакторе. + 31006 + 31006 + 1 + + + core + public_js + post_empty_title + You must enter a topic title! + Вы должны ввести название темы! + 31006 + 31006 + 1 + + + core + public_js + post_empty_username + You must enter a username + Вы должны ввести имя пользователя + 31006 + 31006 + 1 + + + core + public_js + spoiler_hide + Hide + Скрыть + 31006 + 31006 + 1 + + + core + public_js + usercp_photo_upload + You have not selected a file to upload + Вы не выбрали файл для загрузки + 31006 + 31006 + 1 + + + core + public_js + spoiler_show + Show + Показать + 31006 + 31006 + 1 + + + core + public_js + messenger_cancel + Cancel + Отменить + 31006 + 31006 + 1 + + + core + public_js + messenger_edit + Edit + Изменить + 31006 + 31006 + 1 + + + core + public_js + search_default_value + Search... + Искать... + 31006 + 31006 + 1 + + + core + public_js + signin_badopenid + Supplied OpenID url is invalid + Введенный OpenID не может быть правильным + 31006 + 31006 + 1 + + + core + public_js + signin_nopassword + No password entered + Не введен пароль + 31006 + 31006 + 1 + + + core + public_js + signin_nosigninname + No sign in name entered + Не введено имя + 31006 + 31006 + 1 + + + core + public_js + max_notes_reached + You cannot add any more notes to this image, because you have reached the maximum number allowed + Вы исчерпали лимит доступных примечаний для данного изображения. + 31006 + 31006 + 1 + + + core + public_js + note_confirm_delete + Are you sure you want to delete this note? + Вы хотите удалить примечание? + 31006 + 31006 + 1 + + + core + public_js + go_to_category + Go to this category + Перейти к категории + 31006 + 31006 + 1 + + + core + public_js + gallery_rotate_failed + There was an error rotating the image + Возникла проблема при повороте изображения + 31006 + 31006 + 1 + + + core + public_like + freq_offline + Only when not online + Только когда не в сети + 31006 + 31006 0 core - public_login - retrieve_pw - Retrieve password - Восстановление пароля - 30005 - 30005 + public_like + freq_immediate + Instantly + Моментально + 31006 + 31006 0 core - public_login - wrong_auth - Username or password incorrect. - Логин или пароль неверны. - 30005 - 30005 + public_like + label_anon_desc + Do not show me in like summary + Не показывать меня + 31006 + 31006 0 core - public_login - flagged_remote - Our central login system has determined that you must first login at the application you originally registered at before you can login to these forums. - Централизованная система входа сообщила о том, что вы должны авторизоваться в той системе где вы первоначально были зарегистрированы, прежде чем пытаться авторизоваться на этом форуме. - 30005 - 30005 + public_like + label_anon + Like Anonymously + Анонимно + 31006 + 31006 0 core - public_login - bruteforce_account_unlock - Your account will automatically be unlocked in %s minutes - Ваша учетная запись заблокирована на %s минут - 30005 - 30005 + public_like + label_freq + Frequency + Частота + 31006 + 31006 0 core - public_login - complete_form - You must complete both fields - Необходимо заполнить оба поля - 30005 - 30005 + public_like + label_notify + Receive notification of %s + Получать уведомления для %s + 31006 + 31006 0 core - public_login - reg_not_log_in - You are now registered, taking you to the sign in form - Вы успешно зарегистрировались. Переходим на страницу авторизации. - 30005 - 30005 + public_like + fave_title + Like + Нравится + 31006 + 31006 0 core - public_login - not_logged_in - You are not signed in, taking you to the sign in form - Вы не авторизованы. Переходим на страницу авторизации - 30005 - 30005 + public_like + freq_weekly + Weekly + Еженедельно + 31006 + 31006 0 core - public_login - email_log_in - Your email address change has been approved, returning you to the board index - E-mail адрес успешно изменен. Переходим к списку форумов - 30005 - 30005 - 0 - - - core - public_login - logged_in - You are signed in, returning you to the board index - Вы вошли. Переходим к списку форумов - 30005 - 30005 - 0 - - - core - public_login - wrong_openid - We could not verify your identity through OpenID. Please try again, or choose another login method. - Мы не смогли подтвердить ваш аккаунт через OpenID. Попробуйте еще раз или воспользуйтесь другим способом авторизации. - 30005 - - 0 - - - core - public_login - email_not_log_in - Your email address change has been approved, taking you to the sign in form - E-mail адрес успешно изменен. Переходим на страницу авторизации - 30005 - 30005 - 0 - - - core - public_login - pass_log_in - Your password change has been approved, returning you to the board index - Пароль успешно изменен. Переходим к списку форумов. - 30005 - 30005 - 0 - - - core - public_login - pass_not_log_in - Your password change has been approved, taking you to the sign in form - Пароль успешно изменен. Переходим на страницу авторизации - 30005 - 30005 - 0 - - - core - public_login - please_log_in - Please enter your details below to sign in - Введите ваши данные для авторизации - 30005 - 30005 - 0 - - - core - public_login - reg_log_in - You are now registered and signed in, returning you to the board index - Вы зарегистрированы и авторизованы. Переходим к списку форумов. - 30005 - 30005 - 0 - - - core - public_login - admin_force_log_in - The board administrator requires all members to sign in - Администрация форума запретила просмотр форума гостям. Необходимо войти на форум. - 30005 - 30005 - 0 - - - core - public_login - enter_name_and_email - Username or email address: - Имя пользователя или e-mail адрес: - 30005 - 30005 - 0 - - - core - public_login - enter_username - Username: - Имя пользователя: - 30005 - 30005 - 0 - - - core - public_login - enter_useremail - Email address: - E-mail адрес: - 30005 - 30005 - 0 - - - core - public_login - enter_name_and_pass - Enter your sign in name and password - Введите ваши имя пользователя и пароль - 30005 - 30005 - 0 - - - core - public_login - thanks_for_logout - You are now signed out - Вы вышли - 30005 - 30005 - 0 - - - core - public_login - use_openid - Use OpenID - Использовать OpenID - 30005 - 30005 - 0 - - - core - public_login - sign_in_here - Sign in here - Вход здесь - 30005 - 30005 - 0 - - - core - public_login - have_openid - Have an OpenID? - Есть OpenID? - 30005 - 30005 - 0 - - - core - public_login - enter_pass - Password: - Пароль: - 30005 - 30005 - 0 - - - core - public_login - sign_in_openid - Sign in with OpenID - Войти с использованием OpenID - 30005 - 30005 - 0 - - - core - public_login - openid - OpenID: - OpenID: - 30005 - 30005 - 0 - - - core - public_login - openid_example - Example: http://username.myprovider.com - Например: http://username.ya.ru - 30005 - 30005 - 0 - - - core - public_login - regular_signin - Regular sign in - Обычный вход - 30005 - 30005 - 0 - - - core - public_login - use_regular - Use regular sign in - Использовать обычный вход - 30005 - 30005 - 0 - - - core - public_login - sign_in_options - Sign in options - Опции - 30005 - 30005 - 0 - - - core - public_login - notrecommended - This is not recommended for shared computers - Не включайте, если используете общедоступный компьютер - 30005 - 30005 - 0 - - - core - public_login - rememberme - Remember me - Запомнить меня - 30005 - 30005 - 0 - - - core - public_login - form_invisible - Sign in anonymously - Скрытность - 30005 - 30005 - 0 - - - core - public_login - anon_name - - Не отображать меня в списке активных пользователей - 30005 - 30005 - 0 - - - core - public_login - log_in - Sign In - Вход - 30005 - 30005 - 0 - - - core - public_login - sign_in_button - Sign In - Войти - 30005 - 30005 - 0 - - - core - public_login - not_a_member - Not a member? - Еще не зарегистрированы? - 30005 - 30005 - 0 - - - core - public_login - login_forgotten_pass - - Я забыл свой пароль - 30005 - 30005 - 0 - - - core - public_login - fb_login_title - Facebook Log In - Вход с использованием Facebook - 30005 - 30005 - 0 - - - core - public_login - login_w_facebook - Log in with facebook - Вход с использованием Facebook - 30005 - 30005 - 0 - - - core - public_login - welcome_prefix - Welcome, - Здравствуйте, - 30005 - 30005 - 0 - - - core - public_login - fb_new_account - Complete log in with new account - Войти с созданием новой учетной записи - 30005 - 30005 - 0 - - - core - public_login - fb_link_account - link to an existing account - связать с существующей учетной записью - 30005 - 30005 - 0 - - - core - public_login - fb_link_complete - Link and complete log in - Связать и войти - 30005 - 30005 - 0 - - - core - public_login - fb_link_pass - Pass: - Пароль: - 30005 - 30005 - 0 - - - core - public_login - fb_link_email - Email: - E-mail: - 30005 - 30005 - 0 - - - core - public_login - fb_complete_login - Complete log in - Войти - 30005 - 30005 + public_like + freq_daily + Daily + Ежедневно + 31006 + 31006 0 @@ -9153,8 +10195,8 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> fb_no_forum_acct We could not locate a linked forum account: Система не смогла найти связанную учетную запись: - 30005 - + 31006 + 31006 0 @@ -9163,58 +10205,168 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> fb_logged_in You are logged into Facebook. Вы вошли в Facebook. - 30005 - 30005 + 31006 + 31006 0 core public_login - macro__openidlogo - OpenID Logo - Логотип OpenID - 30006 - 30006 + welcome_prefix + Welcome, + Здравствуйте, + 31006 + 31006 0 core public_login - macro__openidicon - OpenID Icon - Иконка OpenID - 30006 - 30006 + login_w_facebook + Sign in with your Facebook account + Вход с использованием Facebook + 31006 + 31006 0 core public_login - macro__signin - Sign in icon - Иконка входа - 30006 - 30006 + fb_login_title + Facebook Sign In + Вход с использованием Facebook + 31006 + 31006 0 core public_login - macro__help - Help - Помощь - 30006 - 30006 + login_forgotten_pass + + Я забыл свой пароль + 31006 + 31006 0 core public_login - macro__register - Register - Регистрация - 30006 - 30006 + not_a_member + Not a member? + Еще не зарегистрированы? + 31006 + 31006 + 0 + + + core + public_login + log_in + Sign In + Вход + 31006 + 31006 + 0 + + + core + public_login + sign_in_button + Sign In + Войти + 31006 + 31006 + 0 + + + core + public_login + anon_name + + Не отображать меня в списке активных пользователей + 31006 + 31006 + 0 + + + core + public_login + form_invisible + Sign in anonymously + Скрытность + 31006 + 31006 + 0 + + + core + public_login + notrecommended + This is not recommended for shared computers + Не включайте, если используете общедоступный компьютер + 31006 + 31006 + 0 + + + core + public_login + rememberme + Remember me + Запомнить меня + 31006 + 31006 + 0 + + + core + public_login + sign_in_options + Sign in options + Опции + 31006 + 31006 + 0 + + + core + public_login + use_regular + Use regular sign in + Использовать обычный вход + 31006 + 31006 + 0 + + + core + public_login + regular_signin + Regular sign in + Обычный вход + 31006 + 31006 + 0 + + + core + public_login + openid + OpenID: + OpenID: + 31006 + 31006 + 0 + + + core + public_login + openid_example + Example: http://username.myprovider.com + Например: http://username.ya.ru + 31006 + 31006 0 @@ -9223,8 +10375,8 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> signin_with_live Click here to sign in using Windows Live Нажмите здесь чтобы войти под учетной записью Windows Live - 30011 - 30011 + 31006 + 31006 0 @@ -9233,8 +10385,18 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> sign_in_winlive Sign in with Windows Live Войти с использованием Windows Live - 30011 - 30011 + 31006 + 31006 + 0 + + + core + public_login + sign_in_openid + Sign in with OpenID + Войти с использованием OpenID + 31006 + 31006 0 @@ -9243,8 +10405,18 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> have_msnlive Have Windows Live? Есть Windows Live? - 30011 - 30011 + 31006 + 31006 + 0 + + + core + public_login + use_openid + Use OpenID + Использовать OpenID + 31006 + 31006 0 @@ -9253,18 +10425,208 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> use_live Use Windows Live Использовать Windows Live - 30011 - 30011 + 31006 + 31006 0 core public_login - macro__liveicon - Live Icon - Иконка Live - 30011 - 30011 + have_openid + Have an OpenID? + Есть OpenID? + 31006 + 31006 + 0 + + + core + public_login + sign_in_here + Sign in here + Вход здесь + 31006 + 31006 + 0 + + + core + public_login + enter_name_and_email + Username or email address: + Имя пользователя или e-mail адрес: + 31006 + 31006 + 0 + + + core + public_login + enter_pass + Password: + Пароль: + 31006 + 31006 + 0 + + + core + public_login + enter_username + Username: + Имя пользователя: + 31006 + 31006 + 0 + + + core + public_login + enter_useremail + Email address: + E-mail адрес: + 31006 + 31006 + 0 + + + core + public_login + enter_name_and_pass + Enter your sign in name and password + Введите ваши имя пользователя и пароль + 31006 + 31006 + 0 + + + core + public_login + thanks_for_logout + You are now signed out + Вы вышли + 31006 + 31006 + 0 + + + core + public_login + admin_force_log_in + The board administrator requires all members to sign in + Администрация форума запретила просмотр форума гостям. Необходимо авторизоваться на форуме. + 31006 + 31006 + 0 + + + core + public_login + pass_not_log_in + Your password change has been approved, taking you to the sign in form + Пароль успешно изменен. Переходим на страницу авторизации + 31006 + 31006 + 0 + + + core + public_login + please_log_in + Please enter your details below to sign in + Введите ваши данные для авторизации + 31006 + 31006 + 0 + + + core + public_login + email_not_log_in + Your email address change has been approved, taking you to the sign in form + E-mail адрес успешно изменен. Переходим на страницу авторизации + 31006 + 31006 + 0 + + + core + public_login + pass_log_in + Your password change has been approved, returning you to the board index + Пароль успешно изменен. Переходим к списку форумов. + 31006 + 31006 + 0 + + + core + public_login + email_log_in + Your email address change has been approved, returning you to the board index + E-mail адрес успешно изменен. Переходим к списку форумов + 31006 + 31006 + 0 + + + core + public_login + reg_not_log_in + You are now registered, taking you to the sign in form + Вы успешно зарегистрировались. Переходим на страницу авторизации. + 31006 + 31006 + 0 + + + core + public_login + reg_log_in + You are now registered and signed in, returning you to the board index + Вы зарегистрированы и авторизованы. Переходим к списку форумов. + 31006 + 31006 + 0 + + + core + public_login + logged_in + You are signed in, returning you to the board index + Вы вошли. Переходим к списку форумов + 31006 + 31006 + 0 + + + core + public_login + not_logged_in + You are not signed in, taking you to the sign in form + Вы не авторизованы. Переходим на страницу авторизации + 31006 + 31006 + 0 + + + core + public_login + wrong_auth + Username or password incorrect. + Логин или пароль неверны. + 31006 + 31006 + 0 + + + core + public_login + wrong_openid + We could not verify your identity through OpenID. Please try again, or choose another login method. + Мы не смогли подтвердить ваш аккаунт через OpenID. Попробуйте еще раз или воспользуйтесь другим способом авторизации. + 31006 + 31006 0 @@ -9273,1168 +10635,528 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> bruteforce_account_lock Your account is currently locked due to consecutive failed login attempts and will remain locked until an administrator unlocks it. Ваша учетная запись заблокирована из-за большого количества неудачных попыток входа. Запись будет разблокирована администратором. - 30012 - 30012 + 31006 + 31006 0 core - public_register - reg_step4_spam - Verify you are a human - Шаг 4: Защитный код - 30005 - - 0 - - - core - public_register - reg_step3_spam - Verify you are a human - Шаг 3: Защитный код - 30005 - - 0 - - - core - public_register - fb_welcome - Welcome, - Здравствуйте, - 30005 - - 0 - - - core - public_register - recover_password - Recover Password - Восстановление пароля - 30005 - 30005 - 0 - - - core - public_register - lost_your_password - - При помощи данной формы вы можете сбросить ваш текущий пароль. - 30005 - - 0 - - - core - public_register + public_login complete_form - Please complete the form fully - Пожалуйста полностью заполните форму - 30005 - + You must complete both fields + Необходимо заполнить оба поля + 31006 + 31006 0 core - public_register - why_register - Why register? - Зачем регистрироваться? - 30005 - + public_login + bruteforce_account_unlock + Your account will automatically be unlocked in %s minutes + Ваша учетная запись заблокирована на %s минут + 31006 + 31006 0 core - public_register - reg_free - - Регистрация на нашем форуме крайне проста и абсолютно бесплатна. Мы узнаем немножко информации о вас, и вы через мгновение сможете пользоваться всеми возможностями форума. - 30005 - 30005 + public_login + register_now + Register Now + Зарегистрироваться + 31006 + 31006 0 core - public_register - ready_register - Ready to register? - Готовы зарегистрироваться? - 30005 - 30005 - 0 - - - core - public_register - reg_errors_found - Errors were found with your registration. Please correct the highlighted fields below. - В процессе проверки регистрации были найдены ошибки в заполнении формы. Пожалуйста исправьте их и продолжите регистрацию. - 30005 - 30005 - 0 - - - core - public_register - goto_signin - Go to sign in - Перейти на страницу входа - 30005 - - 0 - - - core - public_register - sign_in_page - sign in page - страницу входа - 30005 - - 0 - - - core - public_register - forum_terms - - Правила форума - 30005 - - 0 - - - core - public_register - following_errors - The following errors were found: - Обнаружены следующие ошибки: - 30005 - - 0 - - - core - public_register - reg_with_facebook - Register Using Facebook - Зарегистрироваться через Facebook - 30005 - - 0 - - - core - public_register - log_with_facebook - Log in with facebook - Вход с использованием Facebook - 30005 - - 0 - - - core - public_register - already_account - If you already have an account, you can go directly to the - Если вы уже зарегистрированы на нашем форуме, вы можете проследовать сразу на - 30005 - - 0 - - - core - public_register - reg_step1 - Account Information - Шаг 1: Данные учетной записи - 30005 - - 0 - - - core - public_register - reg_enter_email - Enter your e-mail address - E-mail адрес - 30005 - 30005 - 0 - - - core - public_register - dname_desc_two - characters long. - символов - 30005 - - 0 - - - core - public_register - dname_desc_one - The name that will be shown next to your topics, posts, etc. This should be between 3 and - Имя пользователя будет отображаться во всех ваших темах, сообщениях и т.п. Должно содержать не менее 3, но и не более - 30005 - - 0 - - - core - public_register - reg_choose_dname - Choose a display name - Имя пользователя - 30005 - 30005 - 0 - - - core - public_register - reg_choose_user - Choose a username - Логин - 30005 - 30005 - 0 - - - core - public_register - char_cant_use - [ ] | ; , $ \ < > "]]> - - 30005 - - 0 - - - core - public_register - reg_enter_email_desc - So that we can verify your identity, and keep you updated - Для того чтобы мы могли подтвердить вашу регистрацию - 30005 - 30005 - 0 - - - core - public_register - reg_reenter_email - Re-enter your e-mail address - Подтвердите e-mail адрес - 30005 - 30005 - 0 - - - core - public_register - reg_choose_password - Choose your password - Пароль - 30005 - 30005 - 0 - - - core - public_register - reg_choose_password_desc - You should choose a strong password, between 3 and 32 characters - Вы должны использовать сложный пароль, содержащий не менее 3 и не более 32 символов - 30005 - 30005 - 0 - - - core - public_register - reg_reenter_password - Re-enter your password - Подтвердите пароль - 30005 - - 0 - - - core - public_register - reg_step2 - Board Options - Шаг 2: Настройки форума - 30005 - - 0 - - - core - public_register - receive_admin_emails - Receive email from administrators - Получать e-mail от администрации форума - 30005 - 30005 - 0 - - - core - public_register - receive_member_emails - Receive email from other members - Получать e-mail от других пользователей - 30005 - 30005 - 0 - - - core - public_register - time_zone - Time Zone - Часовой пояс - 30005 - - 0 - - - core - public_register - auto_dst_detection - Enable automatic DST detection? - Автоматический переход на зимнее/летнее время - 30005 - - 0 - - - core - public_register - reg_step3 - Additional Information - Шаг 3: Дополнительная информация - 30005 - - 0 - - - core - public_register - fb_logged_in - You are logged into Facebook - Вы вошли в Facebook - 30005 - - 0 - - - core - public_register - fb_complete_reg - Complete Registration Now - Завершить регистрацию - 30005 - - 0 - - - core - public_register - fb_reg_with - You can register here using your Facebook Account! - Вы можете зарегистрироваться здесь используя ваш аккаунт в Facebook! - 30005 - - 0 - - - core - public_register - qa_question_title - Your registration question - Вопрос - 30005 - 30005 - 0 - - - core - public_register - qa_title - Challenge Question - Вопрос - 30005 - 30005 - 0 - - - core - public_register - err_q_and_a - Your answer to the challenge question was not valid. Please try again. - Вы дали неверный ответ на вопрос при регистрации. Попробуйте еще раз. - 30005 - - 0 - - - core - public_register - select_year - Year - Год - 30005 - - 0 - - - core - public_register - qa_question_desc - Enter the answer to your question. Case-insensitive. - Введите ответ на вопрос (регистр букв не важен) - 30005 - 30005 - 0 - - - core - public_register - coppa_continue_button - Continue - Продолжить - 30005 - - 0 - - - core - public_register - validation_complete - Validation Complete - Активация завершена - 30005 - - 0 - - - core - public_register - select_month - Month - Месяц - 30005 - - 0 - - - core - public_register - select_day - Day - День - 30005 - - 0 - - - core - public_register - coppa_clickhere - Click here to print the parental consent form - Нажмите здесь для распечатки соглашения - 30005 - - 0 - - - core - public_register - coppa_additional_info - COPPA Information - Информация COPPA - 30005 - - 0 - - - core - public_register - coppa_form_fill - You must input your birthday completely - Вы должны ввести полную дату рождения - 30005 - - 0 - - - core - public_register - coppa_admin_remtext - - Не забудьте создать учетную запись для этого пользователя и сообщить ему, что он учетная запись готова к использованию - 30005 - - 0 - - - core - public_register - coppa_admin_reminder - Admin Reminder - Напоминание администратору - 30005 - - 0 - - - core - public_register - just_admin_validation - After registration your account will then be entered into the administration queue for review and approval. - После регистрации ваш аккаунт будет добавлен в очередь на проверку и утверждение администратором. - 30005 - - 0 - - - core - public_register - reg_error_username_none - The username must be between 3 and %s characters - Логин должен быть не менее 3 и не более %s символов - 30005 - 30005 - 0 - - - core - public_register - reg_error_no_name - You must enter a name longer than 3 characters and shorter than %s. - Имя пользователя должно быть не менее 3 и не более %s символов - 30005 - 30005 - 0 - - - core - public_register - lp_random_pass_subject - Your new password - Ваш новый пароль - 30005 - - 0 - - - core - public_register - reg_error_email_invalid - or contains illegal characters: [ ] ; # & ! * ' " < > % ( ) { } \ ?]]> - - 30005 - 30005 - 0 - - - core - public_register - lp_random_pass - Click the proceed button below to have a new password emailed to the email address registered to your account. - Нажмите кнопку продолжить чтобы выслать новый пароль на e-mail адрес указанный вами при регистрации. - 30005 - 30005 - 0 - - - core - public_register - lpass_text_random - An email has been sent to your registered email address containing your new password. - Письмо с новым паролем было отправлено на email адрес, указанный вами при регистрации. - 30005 - - 0 - - - core - public_register - reg_error_email_ban - The email address you used is not accepted by this board. Please select a different email address. - Указанный вами e-mail адрес запрещен для использования на данном форуме. - 30005 - 30005 - 0 - - - core - public_register - coppa_bounce - You must either cancel your registration or have your parent complete the COPPA registration form and send it to us - Вы должны отменить регистрацию или попросить одного из родителей заполнить форму COPPA и отправить ее нам. - 30005 - - 0 - - - core - public_register - clogin_done - You are now logged in - Вы вошли - 30005 - - 0 - - - core - public_register - clogin_submit - Continue... - Продолжить - 30005 - - 0 - - - core - public_register - clogin_title - Welcome to our forum - Добро пожаловать на наш форум - 30005 - - 0 - - - core - public_register - clogin_text - - Вы в первый раз заходите на наш форум. Нам необходимо получить от вас еще немножко информации, прежде чем вы сможете приступить к работе с форумом. - 30005 - - 0 - - - core - public_register - reg_error_chars - - - 30005 - 30005 - 0 - - - core - public_register - dname_name - display name]]> - Введите имя пользователя - 30005 - - 0 - - - core - public_register - reg_error_username_taken - The username is already taken by another member - Данный логин уже занят кем-то другим - 30005 - 30005 - 0 - - - core - public_register - lp_text - insensitive.
    Once you have submitted the form, you will receive an email asking for validation of this request to ensure that no malicious use has occurred. This email will also contain a link that you must click for further instruction.]]>
    - не чувствительны к регистру букв.
    После отправки формы, вы получите письмо с просьбой о подтверждении запроса, а так же ссылкой на дальнейшие инструкции.]]>
    - 30005 - 30005 - 0 -
    - - core - public_register - new_registration_email_spammer - Possible Spammer Registered at - Возможно спам-регистрация на - 30005 - 30005 - 0 - - - core - public_register - new_registration_email1 - New Registration at - Новая регистрация на - 30005 - 30005 - 0 - - - core - public_register - new_registration_email - Registration at - Регистрация на - 30005 - 30005 - 0 - - - core - public_register - reg_error_email_nm - The email addresses do not match - Введенные e-mail адреса не совпадают - 30005 - 30005 - 0 - - - core - public_register - user_name - log in username]]> - Введите логин - 30005 - - 0 - - - core - public_register - reg_error_email_taken - The email address is already in use by another member - Указанный e-mail адрес уже кем-то используется - 30005 - 30005 - 0 - - - core - public_register - user_admin_validation - After successful validation your account will then be entered into the administration queue for review and approval. - После успешной активации вашей учетной записи, он будет добавлен в очередь для подтверждения администратором. - 30005 - - 0 - - - core - public_register - tc_title - - Регистрация - 30005 - - 0 - - - core - public_register - email_address_confirm - Confirm Email Address - Подтверждение E-mail - 30005 - 30005 - 0 - - - core - public_register - cf_optional - Optional Information - Дополнительная информация - 30005 - - 0 - - - core - public_register - email_address - Enter your Email Address - E-mail адрес - 30005 - 30005 - 0 - - - core - public_register - rv_done - Your revalidation request was successful
    A revalidation email has been sent to the registered address for that member. Please check your email within the next few minutes - including any 'junk mail' or 'spam' folders you may have.]]>
    - Повторное письмо с активацией отправлено
    Письмо было отправлено на email адрес, указанный при регистрации. Через несколько минут проверьте ваш email. Возможно наши письма распознаются вашим почтовым клиентом как спам, если снова не найдете письма проверьте это.]]>
    - 30005 - 30005 - 0 -
    - - core - public_register - rv_ins - Please enter your sign in name below to search for any pending validation requests. If any are found, the email will be resent to the email address you registered with. - Введите логин, указанный при регистрации, для поиска незавершенной активации. Если такая активация будет найдена, вам повторно будет выслано письмо с деталями активации вашей учетной записи. - 30005 - 30005 - 0 - - - core - public_register - rv_title - Resend validation email - Отправка повторной активации - 30005 - 30005 - 0 - - - core - public_register - rv_process - Revalidation Process - Повторная активация - 30005 - - 0 - - - core - public_register - rv_name - Sign in name - Логин - 30005 - - 0 - - - core - public_register - rv_go - Search and Send - Найти и отправить - 30005 - - 0 - - - core - public_register - lpass_text - An email containing further activation instructions has been sent. This email should be received within the next 10 minutes (usually instantly). - Письмо с дальнейшими инструкциями было отправлено на ваш e-mail адрес, указанный при регистрации. Письмо приходит в течение 10 минут (обычно моментально). - 30005 - 30005 - 0 - - - core - public_register - lpf_title - Lost Password Recovery + public_login + retrieve_pw + Retrieve password Восстановление пароля - 30005 - + 31006 + 31006 + 0 + + + core + public_login + macro__liveicon + Live Icon + Иконка Live + 31006 + 31006 + 0 + + + core + public_login + flagged_remote + Our central login system has determined that you must first login at the application you originally registered at before you can login to these forums. + Централизованная система входа сообщила о том, что вы должны авторизоваться в той системе где вы первоначально были зарегистрированы, прежде чем пытаться авторизоваться на этом форуме. + 31006 + 31006 + 0 + + + core + public_login + fb_new_account + Complete log in with new account + Войти с созданием новой учетной записи + 31006 + 31006 + 0 + + + core + public_login + macro__openidicon + OpenID Icon + Иконка OpenID + 31006 + 31006 + 0 + + + core + public_login + macro__openidlogo + OpenID Logo + Логотип OpenID + 31006 + 31006 + 0 + + + core + public_login + macro__signin + Sign in icon + Иконка входа + 31006 + 31006 + 0 + + + core + public_login + macro__register + Register + Регистрация + 31006 + 31006 + 0 + + + core + public_login + macro__help + Help + Помощь + 31006 + 31006 + 0 + + + core + public_login + login_w_twitter_desc + click here]]> + нажмите здесь]]> + 31006 + 31006 + 0 + + + core + public_login + login_w_twitter + Sign in with your Twitter account + Вход с использованием Twitter + 31006 + 31006 + 0 + + + core + public_login + twitter_login_title + Twitter Sign In + Вход через Twitter + 31006 + 31006 + 0 + + + core + public_login + twitter_connect_account_desc + this page to connect your forum account with your Twitter account]]> + эту страницу чтобы связать вашу запись с аккаунтом в Twitter]]> + 31006 + 31006 + 0 + + + core + public_login + twitter_connect_account_title + Connecting Twitter + Связывание с Twitter + 31006 + 31006 + 0 + + + core + public_login + fb_link_account + link to an existing account + связать с существующей учетной записью + 31006 + 31006 + 0 + + + core + public_login + fb_link_email + Email: + E-mail: + 31006 + 31006 + 0 + + + core + public_login + fb_link_pass + Pass: + Пароль: + 31006 + 31006 + 0 + + + core + public_login + fb_link_complete + Link and complete log in + Связать и войти + 31006 + 31006 + 0 + + + core + public_login + fb_complete_login + Complete log in + Войти + 31006 + 31006 + 0 + + + core + public_login + vk_login_title + Вход через Вконтакте + Вход через Вконтакте + 31003 + 31003 + 0 + + + core + public_login + login_w_vkontakte + Вход с использованием Вконтакте + Вход с использованием Вконтакте + 31003 + 31003 + 0 + + + core + public_login + vk_complete_login + Войти на форум + Войти на форум + 31003 + 31003 + 0 + + + core + public_login + vk_logout + Выйти из Вконтакте + Выйти из Вконтакте + 31003 + 31003 + 0 + + + core + public_login + vk_logged_in + Вы вошли в Вконтакте + Вы вошли в Вконтакте + 31003 + 31003 0 core public_register - lpf_pass1 - Enter a new password - Новый пароль - 30005 - + nav_reg + Registration + Регистрация + 31006 + 31006 0 core public_register - tc_text - In order to proceed, you must agree to the following: - Прежде чем продолжить регистрацию, вам необходимо ознакомиться с нашими правилами. - 30005 - + auth_text +
    The board administrator has chosen to require validation for all email addresses. Within the next 10 minutes (usually instantly) you'll receive an email with instructions on the next step. Don't worry, it won't take long before you can post!

    The email has been sent to]]>
    +
    Администрация форума требует подтверждения всех e-mail адресов. В следующие 10 минут (обычно мгновенно) вы получите письмо с инструкциями по активации вашей учетной записи. Следуйте всем инструкциям в письме и вы сможете воспользоваться всеми возможностями форума уже через несколько минут!

    Письмо было выслано на адрес ]]>
    + 31006 + 31006 0
    core public_register - tc_regbut - Continue Registration - Продолжить регистрацию - 30005 - + agree_submit + I have read, understood and agree to these rules and conditions + Я ознакомился с правилами и условиями, и принимаю их. + 31006 + 31006 0 core public_register - lpf_pass11 - It must be no more than 32 characters and no less than 3 characters - Не должен быть длиннее 32 символов и короче 3 - 30005 - + std_text + Please ensure that you complete all the fields fully, taking particular care over the password fields. + Пожалуйста убедитесь, что все поля формы заполнены. Особенно тщательно проверьте поля паролей. + 31006 + 31006 0 core public_register - err_cf_to_long - You have entered more data than allowed in this field - Вы ввели слишком много данных в поле чем это необходимо - 30005 - + reg_success + Registration Successful + Регистрация завершена. + 31006 + 31006 0 core public_register - err_complete_form - This field is required and must be completed - Данное поле обязательно для заполнения - 30005 - + thank_you + Thank you + Спасибо, + 31006 + 31006 0 core public_register - lpf_pass22 - It must match exactly - Должен полностью совпадать с предыдущим - 30005 - + registration_process + Registration Process + Регистрация + 31006 + 31006 0 core public_register - lpf_pass2 - Re-enter your new password - Введите пароль еще раз - 30005 - + preview_reg_text + Your registration has been successful. The administrator wishes to preview all new registered accounts before posting permissions are granted. The administrator has been notified of your registration. + Ваша регистрация завершена. Администрация форума проверяет все новые учетные записи, перед предоставлением полного доступа к форуму. Администратор уже оповещен о вашей регистрации. + 31006 + 31006 0 core public_register - err_no_username - You must enter a valid username between 3 and 32 characters - Вы должны ввести пароль не длиннее 32 и не короче 3 символов - 30005 - + dumb_text + Please ensure that you complete the form fully. The information you need will be in the email that was sent to you. + Пожалуйста убедитесь, что все поля формы заполнены. Вся необходимая информация будет выслана письмом на ваш e-mail адрес. + 31006 + 31006 0 core public_register - errors_found - The Following Errors Were Found - Обнаружены следующие ошибки: - 30005 - + email_validate_text + You will be sent an email to the email address you give after registering. Please read the email carefully, you will need to validate your account by clicking on a link in the email. + Вам будет выслан e-mail на адрес указанный при регистрации. Пожалуйста внимательно ознакомьтесь с ним, вам необходимо будет проследовать по ссылке в письме, чтобы активировать вашу учетную запись. + 31006 + 31006 0 core public_register - err_invalid - The data you entered in this field is in an invalid format - Данные, введенные в поле, неверного формата - 30005 - + registration_form + Registration Form + Регистрация + 31006 + 31006 0 core public_register - coppa_form_text - to the administrator of the board before a child under the age of 13 can complete the registration process.
    For further information, please Contact the forums administrator]]>
    - администратору форума перед тем, как ребенок не достигший 13 лет сможет зарегистрироваться на форуме.
    За дополнительной информацией, пожалуйста, Обратитесь к администратору форума ]]>
    - 30005 - + activation_form + Activation Form + Форма активации + 31006 + 31006 0
    core public_register - coppa_link - Please select your birthday - Укажите дату вашего рождения - 30005 - + lp_subject + Password recovery information from + Информация о восстановлении пароля с + 31006 + 31006 0 core public_register - cp2_text -
    Once the parental consent form has been received, an account will be created for you with the information supplied, and an email will be sent to the provided email address to notify you that your account is ready for use. You can then change your account details from your 'My Controls' area upon logging in with your new account.]]>
    -
    Как только администрация форума получит разрешение от ваших родителей, учетная запись для вас будет создана.]]>
    - 30005 - 30005 + lp_email_or + OR Enter your email address + ИЛИ ваш e-mail + 31006 + 31006 0
    core public_register - coppa_email_subject - COPPA Registration Information - COPPA Информация регистрации - 30005 - + lp_send + Proceed + Продолжить + 31006 + 31006 0 core public_register - coppa_link_form - permission form - форма разрешения - 30005 - + lp_user_name + Enter your account username + Введите ваш логин + 31006 + 31006 0 core public_register - err_no_validations - There are no pending validation requests for that member. Please check the name and try again - Не найдено ни одной ожидающей активации для данного пользователя. Проверьте введенный логин и повторите попытку. - 30005 - + cpf_phone + Phone Number + Номер телефона + 31006 + 31006 0 core public_register - err_reg_code - The registration code did not match the one displayed, a new code has been generated, please try again - Неверный защитный код. Был создан новый, повторите попытку. - 30005 - + cpf_date + Date + Дата + 31006 + 31006 0 core public_register - err_invalid_email - The email address entered was not a valid email address - Введенный e-mail адрес неверный - 30005 - 30005 + lost_pass_form + Lost Password Form + Восстановление пароля + 31006 + 31006 0 core public_register - ne_subject - Email change request at - Запрос на изменение e-mail на - 30005 - 30005 + cpf_email + Email Address + E-mail адрес + 31006 + 31006 0 core public_register - email_reg_subj - Registration at - Регистрация на - 30005 - + cpf_relation + Relation to child + Отношение к ребенку + 31006 + 31006 0 core public_register - coppa_form - COPPA Form - Форма COPPA - 30005 - + cpf_signature + Signature + Подпись + 31006 + 31006 0 core public_register - coppa_info - COPPA Information - Информация COPPA - 30005 - + cpf_name + Parent / Legal Guardian FULL name + Полное имя родителя/опекуна + 31006 + 31006 0 core public_register - coppa_title - COPPA Registration - Регистрация COPPA - 30005 - + cpf_fax + Fax Number:]]> + Номер факса:]]> + 31006 + 31006 0 core public_register - cpf_perm_parent -
    Please print this form out, complete it and fax it to the number specified (if present) or mail to the mailing address below.]]>
    -
    Пожалуйста, распечатайте эту форму, заполните ее и перешлите по факсу на наш номер. Если факса не имеется, вы можете переслать эту форму по нижеуказанному адресу.]]>
    - 30005 - - 0 -
    - - core - public_register - cpf_title - COPPA Permission Form - - 30005 - - 0 - - - core - public_register - cp_success - Your registration was successful! Redirecting you to the consent form - Ваша регистрация принята! Сейчас вы будете перемещены к форме разрешения - 30005 - - 0 - - - core - public_register - cp2_title - Our COPPA registration policy - Наше регистрационное соглашение COPPA - 30005 - + cpf_address + Mailing Address:]]> + Адрес для писем:]]> + 31006 + 31006 0 @@ -10444,308 +11166,228 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#>
    I understand that I may consent to the collection of necessary information about my child without permitting the site to disclose such information to third parties. I also understand that the site will not collect more information about my child than is reasonably necessary to participate on the site.

    I confirm that the information that the child has supplied is correct. I understand that the profile information may be changed by entering a password and I understand that I may ask for this registration profile to be removed. I understand that I can contact the owner of this site at any time to determine what information about my child has been collected, to confirm how that information is used, and to request that the site no longer collect information about my child.]]>

    Я подтверждаю, что информация, предоставленная ребенком верна. Я соглашаюсь, что информация профиля может быть изменена только после ввода пароля. И я принимаю то что, я могу затребовать удаления этого профиля в любой момент.]]>
    - 30005 - + 31006 + 31006 0
    core public_register - cpf_name - Parent / Legal Guardian FULL name - Полное имя родителя/опекуна - 30005 - + cp2_title + Our COPPA registration policy + Наше регистрационное соглашение COPPA + 31006 + 31006 0 core public_register - cpf_relation - Relation to child - Отношение к ребенку - 30005 - + cp_success + Your registration was successful! Redirecting you to the consent form + Ваша регистрация принята! Сейчас вы будете перемещены к форме разрешения + 31006 + 31006 0 core public_register - cpf_fax - Fax Number:]]> - Номер факса:]]> - 30005 - + cpf_title + COPPA Permission Form + Форма разрешения COPPA + 31006 + 31006 0 core public_register - cpf_address - Mailing Address:]]> - Адрес для писем:]]> - 30005 - + cpf_perm_parent +
    Please print this form out, complete it and fax it to the number specified (if present) or mail to the mailing address below.]]>
    +
    Пожалуйста, распечатайте эту форму, заполните ее и перешлите по факсу на наш номер. Если факса не имеется, вы можете переслать эту форму по нижеуказанному адресу.]]>
    + 31006 + 31006 0
    core public_register - lp_send - Proceed - Продолжить - 30005 - 30005 + coppa_email_subject + COPPA Registration Information + COPPA Информация регистрации + 31006 + 31006 0 core public_register - lp_user_name - Enter your account username - Введите ваш логин - 30005 - 30005 + cp2_text +
    Once the parental consent form has been received, an account will be created for you with the information supplied, and an email will be sent to the provided email address to notify you that your account is ready for use. You can then change your account details from your 'My Controls' area upon logging in with your new account.]]>
    +
    Как только администрация форума получит разрешение от ваших родителей, учетная запись для вас будет создана.]]>
    + 31006 + 31006 0
    core public_register - lp_email_or - OR Enter your email address - ИЛИ ваш e-mail - 30005 - 30005 + coppa_link + Please select your birthday + Укажите дату вашего рождения + 31006 + 31006 0 core public_register - lost_pass_form - Lost Password Form - Восстановление пароля - 30005 - + coppa_form_text + to the administrator of the board before a child under the age of 13 can complete the registration process.
    For further information, please Contact the forums administrator]]>
    + администратору форума перед тем, как ребенок не достигший 13 лет сможет зарегистрироваться на форуме.
    За дополнительной информацией, пожалуйста, Обратитесь к администратору форума ]]>
    + 31006 + 31006 0
    core public_register - cpf_date - Date - Дата - 30005 - + coppa_link_form + permission form + форма разрешения + 31006 + 31006 0 core public_register - cpf_phone - Phone Number - Номер телефона - 30005 - + coppa_info + COPPA Information + Информация COPPA + 31006 + 31006 0 core public_register - cpf_email - Email Address - E-mail адрес - 30005 - 30005 + coppa_form + COPPA Form + Форма COPPA + 31006 + 31006 0 core public_register - cpf_signature - Signature - Подпись - 30005 - + ne_subject + Email change request at + Запрос на изменение e-mail на + 31006 + 31006 0 core public_register - lp_subject - Password recovery information from - Информация о восстановлении пароля с - 30005 - 30005 + coppa_title + COPPA Registration + Регистрация COPPA + 31006 + 31006 0 core public_register - activation_form - Activation Form - Форма активации - 30005 - + email_reg_subj + Registration at + Регистрация на + 31006 + 31006 0 core public_register - registration_form - Registration Form - Регистрация - 30005 - 30005 + err_no_validations + There are no pending validation requests for that member. Please check the name and try again + Не найдено ни одной ожидающей активации для данного пользователя. Проверьте введенный логин и повторите попытку. + 31006 + 31006 0 core public_register - email_validate_text - You will be sent an email to the email address you give after registering. Please read the email carefully, you will need to validate your account by clicking on a link in the email. - Вам будет выслан e-mail на адрес указанный при регистрации. Пожалуйста внимательно ознакомьтесь с ним, вам необходимо будет проследовать по ссылке в письме, чтобы активировать вашу учетную запись. - 30005 - 30005 + err_reg_code + The registration code did not match the one displayed, a new code has been generated, please try again + Неверный защитный код. Был создан новый, повторите попытку. + 31006 + 31006 0 core public_register - dumb_header - Account Activation - Активация учетной записи - 30005 - + err_invalid_email + The email address entered was not a valid email address + Введенный e-mail адрес неверный + 31006 + 31006 0 core public_register - val_key - Validation Key: - Ключ активации: - 30005 - + err_no_username + You must enter a valid username between 3 and 32 characters + Вы должны ввести пароль не длиннее 32 и не короче 3 символов + 31006 + 31006 0 core public_register - user_id - User ID: - ID пользователя: - 30005 - + err_invalid + The data you entered in this field is in an invalid format + Данные, введенные в поле, неверного формата + 31006 + 31006 0 core public_register - dumb_text - Please ensure that you complete the form fully. The information you need will be in the email that was sent to you. - Пожалуйста убедитесь, что все поля формы заполнены. Вся необходимая информация будет выслана письмом на ваш e-mail адрес. - 30005 - 30005 + errors_found + The Following Errors Were Found + Обнаружены следующие ошибки: + 31006 + 31006 0 core public_register - agree_submit - I have read, understood and agree to these rules and conditions - Я ознакомился с правилами и условиями, и принимаю их. - 30005 - + err_complete_form + This field is required and must be completed + Данное поле обязательно для заполнения + 31006 + 31006 0 core public_register - std_text - Please ensure that you complete all the fields fully, taking particular care over the password fields. - Пожалуйста убедитесь, что все поля формы заполнены. Особенно тщательно проверьте поля паролей. - 30005 - - 0 - - - core - public_register - reg_success - Registration Successful - Регистрация завершена. - 30005 - - 0 - - - core - public_register - registration_process - Registration Process - Регистрация - 30005 - 30005 - 0 - - - core - public_register - thank_you - Thank you - Спасибо, - 30005 - 30005 - 0 - - - core - public_register - preview_reg_text - Your registration has been successful. The administrator wishes to preview all new registered accounts before posting permissions are granted. The administrator has been notified of your registration. - Ваша регистрация завершена. Администрация форума проверяет все новые учетные записи, перед предоставлением полного доступа к форуму. Администратор уже оповещен о вашей регистрации. - 30005 - 30005 - 0 - - - core - public_register - auth_text -
    The board administrator has chosen to require validation for all email addresses. Within the next 10 minutes (usually instantly) you'll receive an email with instructions on the next step. Don't worry, it won't take long before you can post!

    The email has been sent to]]>
    -
    Администрация форума требует подтверждения всех e-mail адресов. В следующие 10 минут (обычно мгновенно) вы получите письмо с инструкциями по активации вашей учетной записи. Следуйте всем инструкциям в письме и вы сможете воспользоваться всеми возможностями форума уже через несколько минут!

    Письмо было выслано на адрес ]]>
    - 30005 - 30005 - 0 -
    - - core - public_register - nav_reg - Registration - Регистрация - 30005 - 30005 - 0 - - - core - public_register - dumb_submit - Proceed - Продолжить - 30005 - 30005 - 0 - - - core - public_register - passwords_not_match - The password fields did not match - Введенные пароли не совпадают - 30008 - 30008 + err_cf_to_long + You have entered more data than allowed in this field + Вы ввели слишком много данных в поле чем это необходимо + 31006 + 31006 0 @@ -10754,8 +11396,418 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> new_password New Password Новый пароль - 30011 - 30011 + 31006 + 31006 + 0 + + + core + public_register + lpf_pass1 + Enter a new password + Новый пароль + 31006 + 31006 + 0 + + + core + public_register + lpf_pass11 + It must be no more than 32 characters and no less than 3 characters + Не должен быть длиннее 32 символов и короче 3 + 31006 + 31006 + 0 + + + core + public_register + lpf_pass2 + Re-enter your new password + Введите пароль еще раз + 31006 + 31006 + 0 + + + core + public_register + lpf_pass22 + It must match exactly + Должен полностью совпадать с предыдущим + 31006 + 31006 + 0 + + + core + public_register + rv_name + Sign in name + Логин + 31006 + 31006 + 0 + + + core + public_register + lpass_text + An email containing further activation instructions has been sent. This email should be received within the next 10 minutes (usually instantly). + Письмо с дальнейшими инструкциями было отправлено на ваш e-mail адрес, указанный при регистрации. Письмо приходит в течение 10 минут (обычно моментально). + 31006 + 31006 + 0 + + + core + public_register + lpf_title + Lost Password Recovery + Восстановление пароля + 31006 + 31006 + 0 + + + core + public_register + rv_ins_both + Please enter your sign in name or email below to search for any pending validation requests. If any are found, the email will be resent to the email address you registered with. + Введите логин или email, указанный при регистрации, для поиска незавершенной активации. Если такая активация будет найдена, вам повторно будет выслано письмо с деталями активации вашей учетной записи. + 31006 + 31006 + 0 + + + core + public_register + rv_go + Search and Send + Найти и отправить + 31006 + 31006 + 0 + + + core + public_register + rv_ins_email + Please enter your sign in email below to search for any pending validation requests. If any are found, the email will be resent to the email address you registered with. + Введите email, указанный при регистрации, для поиска незавершенной активации. Если такая активация будет найдена, вам повторно будет выслано письмо с деталями активации вашей учетной записи. + 31006 + 31006 + 0 + + + core + public_register + rv_ins_name + Please enter your sign in name below to search for any pending validation requests. If any are found, the email will be resent to the email address you registered with. + Введите логин, указанный при регистрации, для поиска незавершенной активации. Если такая активация будет найдена, вам повторно будет выслано письмо с деталями активации вашей учетной записи. + 31006 + 31006 + 0 + + + core + public_register + email_address_confirm + Confirm Email Address + Подтверждение E-mail + 31006 + 31006 + 0 + + + core + public_register + email_address + Enter your Email Address + E-mail адрес + 31006 + 31006 + 0 + + + core + public_register + rv_title + Resend validation email + Отправка повторной активации + 31006 + 31006 + 0 + + + core + public_register + rv_process + Revalidation Process + Повторная активация + 31006 + 31006 + 0 + + + core + public_register + rv_done + Your revalidation request was successful
    A revalidation email has been sent to the registered address for that member. Please check your email within the next few minutes - including any 'junk mail' or 'spam' folders you may have.]]>
    + Повторное письмо с активацией отправлено
    Письмо было отправлено на email адрес, указанный при регистрации. Через несколько минут проверьте ваш email. Возможно наши письма распознаются вашим почтовым клиентом как спам, если снова не найдете письма проверьте это.]]>
    + 31006 + 31006 + 0 +
    + + core + public_register + tc_regbut + Continue Registration + Продолжить регистрацию + 31006 + 31006 + 0 + + + core + public_register + cf_optional + Optional Information + Дополнительная информация + 31006 + 31006 + 0 + + + core + public_register + user_name + log in username]]> + Введите логин + 31006 + 31006 + 0 + + + core + public_register + tc_title + + Регистрация + 31006 + 31006 + 0 + + + core + public_register + tc_text + In order to proceed, you must agree to the following: + Прежде чем продолжить регистрацию, вам необходимо ознакомиться с нашими правилами. + 31006 + 31006 + 0 + + + core + public_register + reg_error_email_taken + The email address is already in use by another member + Указанный e-mail адрес уже кем-то используется + 31006 + 31006 + 0 + + + core + public_register + user_admin_validation + After successful validation your account will then be entered into the administration queue for review and approval. + После успешной активации вашей учетной записи, он будет добавлен в очередь для подтверждения администратором. + 31006 + 31006 + 0 + + + core + public_register + reg_error_email_nm + The email addresses do not match + Введенные e-mail адреса не совпадают + 31006 + 31006 + 0 + + + core + public_register + reg_error_username_taken + The username is already taken by another member + Данный логин уже занят кем-то другим + 31006 + 31006 + 0 + + + core + public_register + dname_name + display name]]> + Введите имя пользователя + 31006 + 31006 + 0 + + + core + public_register + reg_error_chars + + + 31006 + 31006 + 0 + + + core + public_register + clogin_submit + Continue... + Продолжить + 31006 + 31006 + 0 + + + core + public_register + clogin_done + You are now logged in + Вы вошли + 31006 + 31006 + 0 + + + core + public_register + clogin_title + Welcome to our forum + Добро пожаловать на наш форум + 31006 + 31006 + 0 + + + core + public_register + clogin_text + + Вы в первый раз заходите на наш форум. Нам необходимо получить от вас еще немножко информации, прежде чем вы сможете приступить к работе с форумом. + 31006 + 31006 + 0 + + + core + public_register + coppa_bounce + You must either cancel your registration or have your parent complete the COPPA registration form and send it to us + Вы должны отменить регистрацию или попросить одного из родителей заполнить форму COPPA и отправить ее нам. + 31006 + 31006 + 0 + + + core + public_register + new_registration_email + Registration at + Регистрация на + 31006 + 31006 + 0 + + + core + public_register + new_registration_email1 + New Registration at + Новая регистрация на + 31006 + 31006 + 0 + + + core + public_register + new_registration_email_spammer + Possible Spammer Registered at + Возможно спам-регистрация на + 31006 + 31006 + 0 + + + core + public_register + reg_error_email_ban + The email address you used is not accepted by this board. Please select a different email address. + Указанный вами e-mail адрес запрещен для использования на данном форуме. + 31006 + 31006 + 0 + + + core + public_register + lpass_text_random + An email has been sent to your registered email address containing your new password. + Письмо с новым паролем было отправлено на email адрес, указанный вами при регистрации. + 31006 + 31006 + 0 + + + core + public_register + lp_random_pass + Click the proceed button below to have a new password emailed to the email address registered to your account. + Нажмите кнопку продолжить чтобы выслать новый пароль на e-mail адрес указанный вами при регистрации. + 31006 + 31006 + 0 + + + core + public_register + reg_error_email_invalid + or contains illegal characters: [ ] ; # & ! * ' " < > % ( ) { } \ ?]]> + + 31006 + 31006 + 0 + + + core + public_register + lp_random_pass_subject + Your new password + Ваш новый пароль + 31006 + 31006 + 0 + + + core + public_register + lp_text + insensitive.
    Once you have submitted the form, you will receive an email asking for validation of this request to ensure that no malicious use has occurred. This email will also contain a link that you must click for further instruction.]]>
    + не чувствительны к регистру букв.
    После отправки формы, вы получите письмо с просьбой о подтверждении запроса, а так же ссылкой на дальнейшие инструкции.]]>
    + 31006 + 31006 0
    @@ -10764,8 +11816,568 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> reg_error_no_name_spec Be aware that some special characters use more than 1 character. Помните, что некоторые специальные символы используют более чем 1 символ. - 30011 - 30011 + 31006 + 31006 + 0 + + + core + public_register + reg_error_username_none + The username must be between 3 and %s characters + Логин должен быть не менее 3 и не более %s символов + 31006 + 31006 + 0 + + + core + public_register + reg_error_no_name + You must enter a name longer than 3 characters and shorter than %s. + Имя пользователя должно быть не менее 3 и не более %s символов + 31006 + 31006 + 0 + + + core + public_register + just_admin_validation + After registration your account will then be entered into the administration queue for review and approval. + После регистрации ваш аккаунт будет добавлен в очередь на проверку и утверждение администратором. + 31006 + 31006 + 0 + + + core + public_register + coppa_admin_remtext + + Не забудьте создать учетную запись для этого пользователя и сообщить ему, что он учетная запись готова к использованию + 31006 + 31006 + 0 + + + core + public_register + coppa_admin_reminder + Admin Reminder + Напоминание администратору + 31006 + 31006 + 0 + + + core + public_register + coppa_clickhere + Click here to print the parental consent form + Нажмите здесь для распечатки соглашения + 31006 + 31006 + 0 + + + core + public_register + select_day + Day + День + 31006 + 31006 + 0 + + + core + public_register + select_year + Year + Год + 31006 + 31006 + 0 + + + core + public_register + coppa_continue_button + Continue + Продолжить + 31006 + 31006 + 0 + + + core + public_register + coppa_form_fill + You must input your birthday completely + Вы должны ввести полную дату рождения + 31006 + 31006 + 0 + + + core + public_register + coppa_additional_info + COPPA Information + Информация COPPA + 31006 + 31006 + 0 + + + core + public_register + select_month + Month + Месяц + 31006 + 31006 + 0 + + + core + public_register + validation_complete + Validation Complete + Активация завершена + 31006 + 31006 + 0 + + + core + public_register + err_q_and_a + Your answer to the challenge question was not valid. Please try again. + Вы дали неверный ответ на вопрос при регистрации. Попробуйте еще раз. + 31006 + 31006 + 0 + + + core + public_register + qa_question_desc + Enter the answer to your question. Case-insensitive. + Введите ответ на вопрос (регистр букв не важен) + 31006 + 31006 + 0 + + + core + public_register + qa_title + Challenge Question + Вопрос + 31006 + 31006 + 0 + + + core + public_register + qa_question_title + Your registration question + Вопрос + 31006 + 31006 + 0 + + + core + public_register + fb_complete_reg + Complete Registration Now + Завершить регистрацию + 31006 + 31006 + 0 + + + core + public_register + fb_reg_with + You can register here using your Facebook Account! + Вы можете зарегистрироваться здесь используя ваш аккаунт в Facebook! + 31006 + 31006 + 0 + + + core + public_register + fb_logged_in + You are logged into Facebook + Вы вошли в Facebook + 31006 + 31006 + 0 + + + core + public_register + reg_step3 + Additional Information + Шаг 3: Дополнительная информация + 31006 + 31006 + 0 + + + core + public_register + auto_dst_detection + Enable automatic DST detection? + Автоматический переход на зимнее/летнее время + 31006 + 31006 + 0 + + + core + public_register + time_zone + Time Zone + Часовой пояс + 31006 + 31006 + 0 + + + core + public_register + reg_step2 + Board Options + Шаг 2: Настройки форума + 31006 + 31006 + 0 + + + core + public_register + receive_admin_emails + Receive email from administrators + Получать e-mail от администрации форума + 31006 + 31006 + 0 + + + core + public_register + receive_member_emails + Receive email from other members + Получать e-mail от других пользователей + 31006 + 31006 + 0 + + + core + public_register + reg_reenter_password + Re-enter your password + Подтвердите пароль + 31006 + 31006 + 0 + + + core + public_register + reg_choose_password_desc + You should choose a strong password, between 3 and 32 characters + Вы должны использовать сложный пароль, содержащий не менее 3 и не более 32 символов + 31006 + 31006 + 0 + + + core + public_register + reg_reenter_email + Re-enter your e-mail address + Подтвердите e-mail адрес + 31006 + 31006 + 0 + + + core + public_register + reg_choose_password + Choose your password + Пароль + 31006 + 31006 + 0 + + + core + public_register + reg_enter_email + Enter your e-mail address + E-mail адрес + 31006 + 31006 + 0 + + + core + public_register + reg_enter_email_desc + So that we can verify your identity, and keep you updated + Для того чтобы мы могли подтвердить вашу регистрацию + 31006 + 31006 + 0 + + + core + public_register + dname_desc_one + The name that will be shown next to your topics, posts, etc. This should be between 3 and + Имя пользователя будет отображаться во всех ваших темах, сообщениях и т.п. Должно содержать не менее 3, но и не более + 31006 + 31006 + 0 + + + core + public_register + dname_desc_two + characters long. + символов + 31006 + 31006 + 0 + + + core + public_register + reg_choose_dname + Choose a display name + Имя пользователя + 31006 + 31006 + 0 + + + core + public_register + char_cant_use + [ ] | ; , $ \ < > "]]> + + 31006 + 31006 + 0 + + + core + public_register + reg_choose_user + Choose a username + Логин + 31006 + 31006 + 0 + + + core + public_register + reg_step1 + Account Information + Шаг 1: Данные учетной записи + 31006 + 31006 + 0 + + + core + public_register + reg_errors_found + Errors were found with your registration. Please correct the highlighted fields below. + В процессе проверки регистрации были найдены ошибки в заполнении формы. Пожалуйста исправьте их и продолжите регистрацию. + 31006 + 31006 + 0 + + + core + public_register + sign_in_page + sign in page + страницу входа + 31006 + 31006 + 0 + + + core + public_register + goto_signin + Go to sign in + Перейти на страницу входа + 31006 + 31006 + 0 + + + core + public_register + already_account + If you already have an account, you can go directly to the + Если вы уже зарегистрированы на нашем форуме, вы можете проследовать сразу на + 31006 + 31006 + 0 + + + core + public_register + reg_free + + Регистрация на нашем форуме крайне проста и абсолютно бесплатна. Мы узнаем немножко информации о вас, и вы через мгновение сможете пользоваться всеми возможностями форума. + 31006 + 31006 + 0 + + + core + public_register + ready_register + Ready to register? + Готовы зарегистрироваться? + 31006 + 31006 + 0 + + + core + public_register + why_register + Why register? + Зачем регистрироваться? + 31006 + 31006 + 0 + + + core + public_register + fb_welcome + Welcome, + Здравствуйте, + 31006 + 31006 + 0 + + + core + public_register + lost_your_password + + При помощи данной формы вы можете сбросить ваш текущий пароль. + 31006 + 31006 + 0 + + + core + public_register + recover_password + Recover Password + Восстановление пароля + 31006 + 31006 + 0 + + + core + public_register + complete_form + Please complete the form fully + Пожалуйста полностью заполните форму + 31006 + 31006 + 0 + + + core + public_register + forum_terms + + Правила форума + 31006 + 31006 + 0 + + + core + public_register + following_errors + The following errors were found: + Обнаружены следующие ошибки: + 31006 + 31006 + 0 + + + core + public_register + reg_with_facebook + Register Using Facebook + Зарегистрироваться через Facebook + 31006 + 31006 + 0 + + + core + public_register + passwords_not_match + The password fields did not match + Введенные пароли не совпадают + 31006 + 31006 + 0 + + + core + public_register + log_with_facebook + Log in with facebook + Вход с использованием Facebook + 31006 + 31006 + 0 + + + core + public_register + reg_step4_spam + Verify you are a human + Шаг 4: Защитный код + 31006 + 31006 + 0 + + + core + public_register + reg_step3_spam + Verify you are a human + Шаг 3: Защитный код + 31006 + 31006 0 @@ -10774,788 +12386,288 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> register Register Регистрация - 30011 - 30011 + 31006 + 31006 + 0 + + + core + public_register + connect_unknown + An unknown error occured. Please continue logging in with a new account and contact an admin to merge your accounts + Возникла неизвестная ошибка. Пожалуйста, попробуйте продолжить начатое действие и сообщите о возникшей ошибке администрации форума. + 31006 + 31006 + 0 + + + core + public_register + connect_already_linked + The forum account %s is already connected to a %s user + Учетная запись %s уже связана с пользователем %s + 31006 + 31006 + 0 + + + core + public_register + connect_incorrect_details + Incorrect email address or password + Неверные email или пароль + 31006 + 31006 + 0 + + + core + public_register + connect_sub + %s, you're almost there!]]> + %s, вы уже здесь!]]> + 31006 + 31006 + 0 + + + core + public_register + connect_sub_desc + %s for the first time, we just need a few more details before we can proceed.]]> + %s в первый раз, поэтому нам необходимо получить еще немного информации о вас.]]> + 31006 + 31006 + 0 + + + core + public_register + connect_desc + forum account or connect your %s account to your existing forum account.]]> + учетную запись на форуме либо присоединить ваш %s аккаунт к уже существующей.]]> + 31006 + 31006 + 0 + + + core + public_register + connect_password + + Введите пароль от учетной записи на форуме + 31006 + 31006 + 0 + + + core + public_register + connect_username + + Введите email вашего учетной записи на форуме + 31006 + 31006 + 0 + + + core + public_register + connect_account_desc + do already have forum account, complete this section:]]> + уже есть учетная запись на форуме. пожалуйста, заполните эти поля:]]> + 31006 + 31006 + 0 + + + core + public_register + connect_account_submit + Connect Accounts + Связать + 31006 + 31006 + 0 + + + core + public_register + new_account_desc + do not have a forum account, complete this section:]]> + еще нет учетной записи на форуме, пожалуйста заполните следующие поля:]]> + 31006 + 31006 + 0 + + + core + public_register + login_w_twitter + Sign in with your Twitter account + Вход с использованием Twitter + 31006 + 31006 + 0 + + + core + public_register + new_account_title + Create a new forum account + Создание новой учетной записи + 31006 + 31006 + 0 + + + core + public_register + new_account_submit + Create New Account + Создать учетную запись + 31006 + 31006 + 0 + + + core + public_register + connect_account_title + Connect to an existing forum account + Присоединить к существующей учетной записи + 31006 + 31006 + 0 + + + core + public_register + twitter_login_title + Twitter Sign In + Вход через Twitter + 31006 + 31006 + 0 + + + core + public_register + login_w_facebook + Sign in with your Facebook account + Войти с использованием Facebook + 31006 + 31006 + 0 + + + core + public_register + fb_login_title + Facebook Sign In + Вход через Facebook + 31006 + 31006 + 0 + + + core + public_register + dumb_submit + Proceed + Продолжить + 31006 + 31006 + 0 + + + core + public_register + dumb_header + Account Activation + Активация учетной записи + 31006 + 31006 + 0 + + + core + public_register + val_key + Validation Key: + Ключ активации: + 31006 + 31006 + 0 + + + core + public_register + user_id + User ID: + ID пользователя: + 31006 + 31006 0 core public_reports - reported_content_summary - Reported content from across your board - Жалобы не контент со всего форума - 30005 - 30005 + report_msg_page + Report this message to a moderator + Пожаловаться модератору на сообщение + 31006 + 31006 0 core public_reports - view_report - View report - Просмотр - 30005 - - 0 - - - core - public_reports - report_updated - Updated: - Отправлено: - 30005 - 30005 - 0 - - - core - public_reports - go_to_section - Go to section - Просмотр - 30005 - - 0 - - - core - public_reports - no_reports - There are no reports to view - Нет жалоб для рассмотрения - 30005 - 30005 - 0 - - - core - public_reports - report_by - By: - Автор: - 30005 - - 0 - - - core - public_reports - select_all_reports - Select all reports - Отметить все жалобы - 30005 - - 0 - - - core - public_reports - view_member - View member - Просмотр профиля - 30005 - - 0 - - - core - public_reports - configure_notifications - Configure Notifications - Опции уведомлений - 30005 - - 0 - - - core - public_reports - report_about_intro - This report is regarding - Жалоба относится к - 30005 - 30005 - 0 - - - core - public_reports - report_view_reported - View reported content - Посмотреть содержимое - 30005 - - 0 - - - core - public_reports - report_join_pm - Join the private conversation - Присоединится к личной переписке - 30005 - - 0 - - - core - public_reports - report_about_pm - a private message titled - личному сообщению: - 30005 - 30005 - 0 - - - core - public_reports - delete_report - Delete Report - Удалить жалобу - 30005 - - 0 - - - core - public_reports - current_status - Current Status: - Текущий статус: - 30005 - - 0 - - - core - public_reports - change_status_title - Change status - Изменить статус - 30005 - - 0 - - - core - public_reports - mark_status_as - Mark as - Пометить как - 30005 - - 0 - - - core - public_reports - change_current_status - Change Current Status - Изменить текущий статус - 30005 - - 0 - - - core - public_reports - reports_h2 - Reports - Жалобы - 30005 - 30005 - 0 - - - core - public_reports - posted_prefix - Posted - Отправлено - 30005 - 30005 - 0 - - - core - public_reports - no_comments_on_report - There are no comments on this report yet. - Комментариев пока нет. - 30005 - 30005 - 0 - - - core - public_reports - comments_h2 - Comments - Комментарии - 30005 - - 0 - - - core - public_reports - post_button - Post - Опубликовать - 30005 - 30005 - 0 - - - core - public_reports - add_comment_title - Add Comment - Добавить комментарий - 30005 - - 0 - - - core - public_reports - reporting_title - Report: - Название темы: - 30005 - 30005 - 0 - - - core - public_reports - view_content - View content - Посмотреть содержимое - 30005 - - 0 - - - core - public_reports - status - Status - Статус - 30005 - - 0 - - - core - public_reports - with_selected - with selected - с отмеченными - 30005 - - 0 - - - core - public_reports - reports_messenger - Messenger - Личный ящик - 30005 - 30005 - 0 - - - core - public_reports - reports_rss_desc - Shows new reports from the report center. - Посмотреть новые жалобы - 30005 - 30005 - 0 - - - core - public_reports - report_section_title_site_downloads - Download Manager - Файловый архив - 30005 - - 0 - - - core - public_reports - report_section_title_msg - Private Message + report_msg_title + Private Message Title Личное сообщение - 30005 - + 31006 + 31006 0 core public_reports - report_section_title_mem - Member Profile - Профиль пользователя - 30005 - + report_msg_msg + Enter your report

    ]]>
    + Жалоба
    Примечание: копия личного сообщения будет включена в жалобу]]>
    + 31006 + 31006 0
    core public_reports - report_mem_msg - Enter your report]]> - Введите текст жалобы - 30005 - + report_file_msg + Enter your report

    ]]>
    + Введите жалобу

    Примечание: Модератор будет проинформирован о ссылке на файл.

    ]]>
    + 31006 + 31006 0
    core public_reports - report_mem_title - Member Name - Пользователь - 30005 - + report_file_title + File Name + Имя файла + 31006 + 31006 0 core public_reports - report_mem_page - Report this profile to a moderator - Сообщить о профиле пользователя - 30005 - - 0 - - - core - public_reports - report_section_title_cal - Calendar Event - Календарное событие - 30005 - - 0 - - - core - public_reports - report_cal_page - Report this event to a moderator - Сообщить о событии - 30005 - - 0 - - - core - public_reports - report_cal_title - Event Title - Событие - 30005 - - 0 - - - core - public_reports - report_cal_msg - Enter your report]]> - Введите текст жалобы - 30005 - - 0 - - - core - public_reports - rss_feed_title - Report Notification - Уведомления о жалобах - 30005 - - 0 - - - core - public_reports - report_actions - Report Options - Опции - 30005 - 30005 - 0 - - - core - public_reports - report_actions_mark_optgroup - Mark Report As - Пометить жалобу как - 30005 - 30005 - 0 - - - core - public_reports - report_prune_message_done - Pruning reports... - Удаление жалоб - 30005 - - 0 - - - core - public_reports - report_prune_message_none - Nothing to prune... - По заданному критерию жалоб не найдено - 30005 - - 0 - - - core - public_reports - older_than - older than - размещенных больше чем - 30005 - 30005 - 0 - - - core - public_reports - report_prune_days_box - days - дней назад - 30005 - - 0 - - - core - public_reports - main_title - Report Center - Система жалоб - 30005 - - 0 - - - core - public_reports - list_title - Reports - Жалобы - 30005 - - 0 - - - core - public_reports - list_header_title - Title - Название - 30005 - - 0 - - - core - public_reports - list_header_section - Section - Секция - 30005 - - 0 - - - core - public_reports - list_header_updated_by - Updated By - Последнее сообщение - 30005 - - 0 - - - core - public_reports - list_header_last_updated - Last Updated - Последнее обновление - 30005 - - 0 - - - core - public_reports - list_header_reports - Reports - Жалоб - 30005 - - 0 - - - core - public_reports - report_basic_submit - Submit Report - Отправить жалобу - 30005 - - 0 - - - core - public_reports - report_basic_enter - Enter your report
    Please note: The moderator will be made aware of the link to the page you are reporting.

    This form is to be used ONLY for reporting objectional content, etc and is not to be used as a method of communicating with moderators for other reasons.
    ]]>
    -
    Примечание: вам не нужно указывать здесь тему и сообщение, модератор автоматически получит эту информацию.

    Пожалуйста, используйте эту возможность форума только для жалоб о некорректном сообщении. Для связи с модератором используйте личные сообщения.]]>
    - 30005 - - 0 -
    - - core - public_reports - report_basic_url_title - Reporting Page - Сообщение о - 30005 - - 0 - - - core - public_reports - report_basic_title - Report this page to a moderator - Сообщить о - 30005 - - 0 - - - core - public_reports - list_header_comments - Comments - Комментариев - 30005 - - 0 - - - core - public_reports - report_sending - Sending Report... - Отправка жалобы - 30005 - - 0 - - - core - public_reports - report_page_title_unknown - Unknown Title - Нет заголовка - 30005 - - 0 - - - core - public_reports - report_option_delete - Delete Reports - Удалить - 30005 - - 0 - - - core - public_reports - report_option_prune - Prune Reports - Очистить от жалоб - 30005 - - 0 - - - core - public_reports - redirect_mark_status - Marking Reports... - Изменение статуса жалобы - 30005 - 30005 - 0 - - - core - public_reports - redirect_delete_report - Deleting Reports... - Удаление жалобы - 30005 - 30005 - 0 - - - core - public_reports - active_users_members - %s members: - %s пользователей: - 30005 - - 0 - - - core - public_reports - active_users_title - %s user(s) are viewing - %s человек просматривают эту страницу - 30005 - - 0 - - - core - public_reports - report_post_enter - Enter your report
    Please note: The moderator will be made aware of the link to the post and the topic title.

    This form is to be used ONLY for reporting objectional content, etc and is not to be used as a method of communicating with moderators for other reasons.
    ]]>
    -
    Примечание: вам не нужно указывать здесь тему и сообщение, модератор автоматически получит эту информацию.

    Пожалуйста, используйте эту возможность форума только для жалоб о некорректном сообщении. Для связи с модератором используйте личные сообщения.]]>
    - 30005 - - 0 -
    - - core - public_reports - active_users_detail - %s members, %s guests, %s anonymous users]]> - %s пользователей, %s гостей, %s скрытых пользователей - 30005 - - 0 - - - core - public_reports - report_post_url_title - Topic Title - Тема - 30005 - - 0 - - - core - public_reports - report_post_title - Report this post to a moderator - Отправить жалобу модератору на это сообщение - 30005 - - 0 - - - core - public_reports - report_ajax_tab_notif_meth - Notification Methods - Уведомление - 30005 - 30005 - 0 - - - core - public_reports - report_settings_pm_desc - Receive a notification through private message when a report is received. - Получать уведомления о новых жалобах по личной почте. - 30005 - - 0 - - - core - public_reports - report_settings_by_pm - Notification by Private Message? - Отправлять уведомления личным сообщением? - 30005 - - 0 - - - core - public_reports - report_comment_saved - Your comment has been saved successfully - Ваш комментарий был успешно добавлен - 30005 - - 0 - - - core - public_reports - reports_methods_saved - Your notification preferences have been saved - Настройки уведомлений были сохранены - 30005 - 30005 - 0 - - - core - public_reports - report_settings_by_alert - Notification by Board Alert?
    Receive a notification through a board alert when a report is received. You will see this alert while browsing the forums, and you don't have to fill up your private message box.]]>
    - Уведомление через оповещение форума
    Получать уведомления о новых жалобах во всплывающем информационном окне. ]]>
    - 30005 - - 0 -
    - - core - public_reports - report_settings_by_email - Notification by Email? - Отправлять уведомления на адрес электронной почты? - 30005 - 30005 + report_file_page + Report this file to a moderator + Пожаловаться модератору на файл + 31006 + 31006 0 @@ -11564,18 +12676,18 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> report_settings_save Save Сохранить - 30005 - + 31006 + 31006 0 core public_reports report_settings_options - Report Options + Notifications Опции - 30005 - + 31006 + 31006 0 @@ -11584,8 +12696,8 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> report_section_title_site_gallery Site Gallery Галерея - 30005 - 30005 + 31006 + 31006 0 @@ -11594,18 +12706,848 @@ your chosen details and access your full user account at <#BOARD_ADDRESS#> report_gallery_comment_suffix - Comment - комментарий - 30005 - 30005 + 31006 + 31006 + 0 + + + core + public_reports + report_gallery_image_suffix + - Image + - изображение + 31006 + 31006 + 0 + + + core + public_reports + report_settings_by_alert + Notification by Board Alert?
    Receive a notification through a board alert when a report is received. You will see this alert while browsing the forums, and you don't have to fill up your private message box.]]>
    + Уведомление через оповещение форума
    Получать уведомления о новых жалобах во всплывающем информационном окне. ]]>
    + 31006 + 31006 + 0 +
    + + core + public_reports + report_settings_by_email + Notification by Email? + Отправлять уведомления на адрес электронной почты? + 31006 + 31006 + 0 + + + core + public_reports + report_settings_pm_desc + Receive a notification through private message when a report is received. + Получать уведомления о новых жалобах по личной почте. + 31006 + 31006 + 0 + + + core + public_reports + reports_methods_saved + Your notification preferences have been saved + Настройки уведомлений были сохранены + 31006 + 31006 + 0 + + + core + public_reports + report_comment_saved + Your comment has been saved successfully + Ваш комментарий был успешно добавлен + 31006 + 31006 + 0 + + + core + public_reports + report_settings_by_pm + Notification by Private Message? + Отправлять уведомления личным сообщением? + 31006 + 31006 + 0 + + + core + public_reports + report_ajax_tab_notif_meth + Notification Methods + Уведомление + 31006 + 31006 + 0 + + + core + public_reports + active_users_members + %s members: + %s пользователей: + 31006 + 31006 + 0 + + + core + public_reports + active_users_title + %s user(s) are viewing + %s человек просматривают эту страницу + 31006 + 31006 + 0 + + + core + public_reports + active_users_detail + %s members, %s guests, %s anonymous users]]> + %s пользователей, %s гостей, %s скрытых пользователей + 31006 + 31006 + 0 + + + core + public_reports + redirect_delete_report + Deleting Reports... + Удаление жалобы + 31006 + 31006 + 0 + + + core + public_reports + redirect_mark_status + Marking Reports... + Изменение статуса жалобы + 31006 + 31006 + 0 + + + core + public_reports + report_option_prune + Prune Reports + Очистить от жалоб + 31006 + 31006 + 0 + + + core + public_reports + report_option_delete + Delete Reports + Удалить + 31006 + 31006 + 0 + + + core + public_reports + report_page_title_unknown + Unknown Title + Нет заголовка + 31006 + 31006 + 0 + + + core + public_reports + report_sending + Sending Report... + Отправка жалобы + 31006 + 31006 + 0 + + + core + public_reports + report_post_enter + Enter your report]]> +
    Примечание: вам не нужно указывать здесь тему и сообщение, модератор автоматически получит эту информацию.

    Пожалуйста, используйте эту возможность форума только для жалоб о некорректном сообщении. Для связи с модератором используйте личные сообщения.]]>
    + 31006 + 31006 + 0 +
    + + core + public_reports + report_basic_submit + Submit Report + Отправить жалобу + 31006 + 31006 + 0 + + + core + public_reports + report_post_url_title + Topic Title + Тема + 31006 + 31006 + 0 + + + core + public_reports + report_basic_desc + This form is to be used ONLY for reporting objectionable content and is not to be used as a method of communicating with moderators for other reasons.]]> + Внимание: данная форма не предназначена для связи с администрацией форума, используйте ее только для указания на нарушающие правила форума публикации! + 31006 + 31006 + 0 + + + core + public_reports + report_post_title + Report this post to a moderator + Отправить жалобу модератору на это сообщение + 31006 + 31006 + 0 + + + core + public_reports + report_basic_enter + Enter your report]]> +
    Примечание: вам не нужно указывать здесь тему и сообщение, модератор автоматически получит эту информацию.

    Пожалуйста, используйте эту возможность форума только для жалоб о некорректном сообщении. Для связи с модератором используйте личные сообщения.]]>
    + 31006 + 31006 + 0 +
    + + core + public_reports + report_basic_url_title + Reporting Page + Сообщение о + 31006 + 31006 + 0 + + + core + public_reports + report_basic_title + Report this page to a moderator + Сообщить о + 31006 + 31006 + 0 + + + core + public_reports + list_header_comments + Comments + Комментариев + 31006 + 31006 + 0 + + + core + public_reports + list_header_last_updated + Last Updated + Последнее обновление + 31006 + 31006 + 0 + + + core + public_reports + list_header_reports + Reports + Жалоб + 31006 + 31006 + 0 + + + core + public_reports + list_header_section + Section + Секция + 31006 + 31006 + 0 + + + core + public_reports + list_header_title + Title + Название + 31006 + 31006 + 0 + + + core + public_reports + list_header_updated_by + Updated By + Последнее сообщение + 31006 + 31006 + 0 + + + core + public_reports + main_title + Report Center + Система жалоб + 31006 + 31006 + 0 + + + core + public_reports + list_title + Reports + Жалобы + 31006 + 31006 + 0 + + + core + public_reports + report_prune_days_box + days + дней назад + 31006 + 31006 + 0 + + + core + public_reports + older_than + older than + размещенных больше чем + 31006 + 31006 + 0 + + + core + public_reports + report_prune_message_none + Nothing to prune... + По заданному критерию жалоб не найдено + 31006 + 31006 + 0 + + + core + public_reports + report_prune_message_done + Pruning reports... + Удаление жалоб + 31006 + 31006 + 0 + + + core + public_reports + report_actions_mark_optgroup + Mark Report As + Пометить жалобу как + 31006 + 31006 + 0 + + + core + public_reports + report_actions + Report Options + Опции + 31006 + 31006 + 0 + + + core + public_reports + rss_feed_title + Report Notification + Уведомления о жалобах + 31006 + 31006 + 0 + + + core + public_reports + report_cal_msg + Enter your report]]> + Введите текст жалобы + 31006 + 31006 + 0 + + + core + public_reports + report_cal_title + Event Title + Событие + 31006 + 31006 + 0 + + + core + public_reports + report_cal_page + Report this event to a moderator + Сообщить о событии + 31006 + 31006 + 0 + + + core + public_reports + report_section_title_cal + Calendar Event + Календарное событие + 31006 + 31006 + 0 + + + core + public_reports + report_mem_title + Member Name + Пользователь + 31006 + 31006 + 0 + + + core + public_reports + report_mem_msg + Enter your report]]> + Введите текст жалобы + 31006 + 31006 + 0 + + + core + public_reports + report_mem_page + Report this profile to a moderator + Сообщить о профиле пользователя + 31006 + 31006 + 0 + + + core + public_reports + report_section_title_mem + Member Profile + Профиль пользователя + 31006 + 31006 + 0 + + + core + public_reports + report_section_title_msg + Private Message + Личное сообщение + 31006 + 31006 + 0 + + + core + public_reports + report_section_title_site_downloads + Download Manager + Файловый архив + 31006 + 31006 + 0 + + + core + public_reports + reports_rss_desc + Shows new reports from the report center. + Посмотреть новые жалобы + 31006 + 31006 + 0 + + + core + public_reports + reports_messenger + Messenger + Личный ящик + 31006 + 31006 + 0 + + + core + public_reports + with_selected + with selected + с отмеченными + 31006 + 31006 + 0 + + + core + public_reports + status + Status + Статус + 31006 + 31006 + 0 + + + core + public_reports + view_content + View content + Посмотреть содержимое + 31006 + 31006 + 0 + + + core + public_reports + post_button + Post + Опубликовать + 31006 + 31006 + 0 + + + core + public_reports + reporting_title + Report: + Название темы: + 31006 + 31006 + 0 + + + core + public_reports + add_comment_title + Add Comment + Добавить комментарий + 31006 + 31006 + 0 + + + core + public_reports + no_comments_on_report + There are no comments on this report yet. + Комментариев пока нет. + 31006 + 31006 + 0 + + + core + public_reports + posted_prefix + Posted + Отправлено + 31006 + 31006 + 0 + + + core + public_reports + comments_h2 + Comments + Комментарии + 31006 + 31006 + 0 + + + core + public_reports + reports_h2 + Reports + Жалобы + 31006 + 31006 + 0 + + + core + public_reports + change_status_title + Change status + Изменить статус + 31006 + 31006 + 0 + + + core + public_reports + mark_status_as + Mark as + Пометить как + 31006 + 31006 + 0 + + + core + public_reports + current_status + Current Status: + Текущий статус: + 31006 + 31006 + 0 + + + core + public_reports + change_current_status + Change Current Status + Изменить текущий статус + 31006 + 31006 + 0 + + + core + public_reports + delete_report + Delete Report + Удалить жалобу + 31006 + 31006 + 0 + + + core + public_reports + report_join_pm + Join the private conversation + Присоединится к личной переписке + 31006 + 31006 + 0 + + + core + public_reports + report_view_reported + View reported content + Посмотреть содержимое + 31006 + 31006 + 0 + + + core + public_reports + report_about_pm + a private message titled + личному сообщению: + 31006 + 31006 + 0 + + + core + public_reports + report_about_intro + This report is regarding + Жалоба относится к + 31006 + 31006 + 0 + + + core + public_reports + configure_notifications + Configure Notifications + Опции уведомлений + 31006 + 31006 + 0 + + + core + public_reports + no_reports + There are no reports to view + Нет жалоб для рассмотрения + 31006 + 31006 + 0 + + + core + public_reports + view_member + View member + Просмотр профиля + 31006 + 31006 + 0 + + + core + public_reports + report_by + By: + Автор: + 31006 + 31006 + 0 + + + core + public_reports + report_updated + Updated: + Отправлено: + 31006 + 31006 + 0 + + + core + public_reports + go_to_section + Go to section + Просмотр + 31006 + 31006 + 0 + + + core + public_reports + view_report + View report + Просмотр + 31006 + 31006 + 0 + + + core + public_reports + select_all_reports + Select all reports + Отметить все жалобы + 31006 + 31006 + 0 + + + core + public_reports + reported_content_summary + Reported content from across your board + Жалобы не контент со всего форума + 31006 + 31006 + 0 + + + core + public_reports + reports_no_plugin + The report center module for the content you are trying to report is not configured correctly. + Система жалоб для данного типа публикаций не настроена. + 31006 + 31006 + 0 + + + core + public_reports + reports_no_comment_text + You did not submit a comment to save. + Вы не ввели комментарий. + 31006 + 31006 + 0 + + + core + public_reports + no_permission_addreport + You do not have permission to add yourself to private conversations. + Вы не можете добавить себя в личную беседу. + 31006 + 31006 0 core public_reports subject_report - Report from - Жалоба от - 30005 - 30005 + %s has reported something]]> + %s оставил жалобу на следующее]]> + 31006 + 31006 0 @@ -11619,7 +13561,7 @@ You have been sent this communication from <#USERNAME#> via the "Report this to ------------------------------------------------ -Post Link: <#LINK#> +Content Reported: <#LINK#> Report Link: <#REPORTLINK#> ------------------------------------------------ @@ -11629,750 +13571,20 @@ Report: ------------------------------------------------ ]]> - , -Вам было отправлено уведомление от <#USERNAME#> через кнопку «Жалоба». - ------------------------------------------------- - -Ссылка: <#LINK#> - ------------------------------------------------- - -Жалоба: <#REPORT#> - + , +Вам было отправлено уведомление от <#USERNAME#> через кнопку «Жалоба». + +------------------------------------------------ + +Ссылка: <#LINK#> + +------------------------------------------------ + +Жалоба: <#REPORT#> + ------------------------------------------------ ]]> - 30005 - 30005 - 0 - - - core - public_reports - report_msg_msg - Enter your report

    Please note: A copy of the private message will be included with the report.

    ]]>
    - Жалоба
    Примечание: копия личного сообщения будет включена в жалобу]]>
    - 30005 - 30005 - 0 -
    - - core - public_reports - report_msg_title - Private Message Title - Личное сообщение - 30005 - 30005 - 0 - - - core - public_reports - report_msg_page - Report this message to a moderator - Пожаловаться модератору на сообщение - 30005 - 30005 - 0 - - - core - public_reports - report_file_msg - Enter your report

    Please note: The moderator will be made aware of the link to the file.

    ]]>
    - Введите жалобу

    Примечание: Модератор будет проинформирован о ссылке на файл.

    ]]>
    - 30005 - 30005 - 0 -
    - - core - public_reports - report_file_title - File Name - Имя файла - 30005 - 30005 - 0 - - - core - public_reports - report_gallery_image_suffix - - Image - - изображение - 30005 - 30005 - 0 - - - core - public_reports - report_file_page - Report this file to a moderator - Пожаловаться модератору на файл - 30005 - 30005 - 0 - - - core - public_reports - no_permission_addreport - You do not have permission to add yourself to private conversations. - Вы не можете добавить себя в личную беседу. - 30011 - 30011 - 0 - - - core - public_reports - reports_no_comment_text - You did not submit a comment to save. - Вы не ввели комментарий. - 30011 - 30011 - 0 - - - core - public_search - attach_header - Attachments - прикрепленных файлов - 30005 - 30005 - 0 - - - core - public_search - search - Search - Поиск - 30005 - - 0 - - - core - public_search - optional_fields - All fields are optional, but you must submit at least one search criteria. - Обязательных к заполнению полей нет, но вы должны заполнить хотя бы одно. - 30005 - 30005 - 0 - - - core - public_search - find_words - words]]> - Поиск по ключевым словам - 30005 - 30005 - 0 - - - core - public_search - search_titles_only - Search titles only - Искать только в названиях тем - 30005 - 30005 - 0 - - - core - public_search - removed_search_terms - The following search terms are not allowed and were removed from your query: - Одно из введенных вами слов запрещено при использовании поиска: - 30005 - - 0 - - - core - public_search - show_as_titles - Show results as titles - Показывать результаты в виде заголовков тем - 30005 - 30005 - 0 - - - core - public_search - find_author - author]]> - Поиск по автору - 30005 - 30005 - 0 - - - core - public_search - find_date - date]]> - Поиск по дате от - 30005 - 30005 - 0 - - - core - public_search - to - to - до - 30005 - 30005 - 0 - - - core - public_search - forum_topic_also - Also in this topic - Также в этой теме - 30005 - 30005 - 0 - - - core - public_search - search_by - by - автор: - 30005 - - 0 - - - core - public_search - view_result - View result - Просмотр - 30005 - 30005 - 0 - - - core - public_search - forum_replies - replies - ответов - 30005 - 30005 - 0 - - - core - public_search - find_forum - forum]]> - Искать в форуме - 30005 - 30005 - 0 - - - core - public_search - forum_forum - Forum - Форум - 30005 - 30005 - 0 - - - core - public_search - calendar_event - Event - Событие - 30005 - 30005 - 0 - - - core - public_search - forum_topic - Topic - Тема - 30005 - 30005 - 0 - - - core - public_search - member_member - Member - Пользователь - 30005 - 30005 - 0 - - - core - public_search - member_joined - Joined on - Регистрация: - 30005 - 30005 - 0 - - - core - public_search - core_help - Help - Помощь - 30005 - 30005 - 0 - - - core - public_search - gallery_comments - comments - комментариев - 30005 - 30005 - 0 - - - core - public_search - gallery_image - Image - Изображение - 30005 - 30005 - 0 - - - core - public_search - gallery_comment - Comment - Комментарий - 30005 - 30005 - 0 - - - core - public_search - generic_content - Content - Контент - 30005 - 30005 - 0 - - - core - public_search - gallery_posted_by - Posted by - Отправил - 30005 - 30005 - 0 - - - core - public_search - search_tab_members - Members - Пользователи - 30005 - 30005 - 0 - - - core - public_search - search_tab_forums - Forums - Форумы - 30005 - - 0 - - - core - public_search - my_results - My Results - Мои результаты - 30005 - 30005 - 0 - - - core - public_search - your_search_results - results - результатов - 30005 - 30005 - 0 - - - core - public_search - your_search_returned - returned - вернул - 30005 - 30005 - 0 - - - core - public_search - your_search - Your search for the term - Поиск по слову - 30005 - 30005 - 0 - - - core - public_search - sort_by_relevance - Sort by Relevance - Сортировать по релевантности - 30005 - 30005 - 0 - - - core - public_search - sort_by_date - Sort by Date - Сортировать по дате - 30005 - 30005 - 0 - - - core - public_search - no_results_found - No results found - Поиск не дал результатов - 30005 - - 0 - - - core - public_search - no_results_found_for - for - по - 30005 - - 0 - - - core - public_search - active_content - Active content in the last %s - Активные публикации за последние 24 часа - 30005 - 30005 - 0 - - - core - public_search - active_have_been - There have been - Опубликовано - 30005 - 30005 - 0 - - - core - public_search - active_entries - entries in the last %s - сообщений за последние 24 часа - 30005 - 30005 - 0 - - - core - public_search - active_all - All Active Content - Все активные публикации - 30005 - 30005 - 0 - - - core - public_search - active_none - No active content found - По вашему запросу ничего не найдено - 30005 - 30005 - 0 - - - core - public_search - new_content - New content - Новые публикации - 30005 - - 0 - - - core - public_search - new_content_there - There are - Добавлено - 30005 - - 0 - - - core - public_search - new_content_entries - new entries - новых сообщений - 30005 - - 0 - - - core - public_search - new_content_all - All New Content - Все новые публикации - 30005 - - 0 - - - core - public_search - new_content_none - Sorry, no new content found. - Новых публикаций не найдено. - 30005 - - 0 - - - core - public_search - user_posts_title_posts - posts - сообщения - 30005 - 30005 - 0 - - - core - public_search - user_posts_title_topics - topics - темы - 30005 - 30005 - 0 - - - core - public_search - user_posts_title_all - All - Все - 30005 - 30005 - 0 - - - core - public_search - user_posts_title_member - by - пользователя - 30005 - 30005 - 0 - - - core - public_search - user_posts_have_been - There have been - Найдено - 30005 - 30005 - 0 - - - core - public_search - user_posts_all - All User Content - Все публикации пользователя - 30005 - 30005 - 0 - - - core - public_search - search_term_long - - Строка содержит более %s символов. Пожалуйста, вернитесь назад и попробуйте ввести более короткую строку. - 30005 - 30005 - 0 - - - core - public_search - quick_search - Quick Search - Быстрый поиск - 30005 - - 0 - - - core - public_search - user_posts_none - There is no information to show. - По вашему запросу ничего не найдено. - 30005 - 30005 - 0 - - - core - public_search - search_invalid_date_range - The date range you selected for your search is invalid, please ensure that the start date is not later than the end date - Выбранные даты неверны, убедитесь что начальная дата не позже, чем конечная - 30005 - - 0 - - - core - public_search - livesearch_thisforum - This Forum - Поиск по форуму - 30005 - 30005 - 0 - - - core - public_search - see_all_ps - See all %s results - Вывести все %s результатов - 30005 - 30005 - 0 - - - core - public_search - search_term_short - - - 30005 - 30005 - 0 - - - core - public_search - livesearch_thistopic - This Topic - Поиск по теме - 30005 - 30005 - 0 - - - core - public_search - search_invalid_date_future - One or both of the dates in your search are in the future, please check your date range and try again - Одна из выбранных вами дат еще не наступила, проверьте выбранные даты и попробуйте еще раз. - 30005 - 30005 - 0 - - - core - public_search - livesearch_helpfiles - Help Files - Помощь - 30005 - 30005 - 0 - - - core - public_search - no_xml_permission - Sorry, but you do not have permission to use the search feature. - Вы не можете пользоваться поиском. - 30005 - 30005 - 0 - - - core - public_search - active_posts_title - Active content - Активные темы - 30005 - 30005 + 31006 + 31006 0 @@ -12381,28 +13593,18 @@ Report: user_posts_title All %s by %s Все %s %s - 30005 - 30005 + 31006 + 31006 0 core public_search - new_posts_title - New content - Новые публикации - 30005 - 30005 - 0 - - - core - public_search - xml_flood - Flood control is enabled. Please wait at least %s seconds before attempting to search again - Флуд контроль включен. Вы сможете воспользоваться поиском через %s секунд. - 30005 - 30005 + active_posts_title + Active content + Активные темы + 31006 + 31006 0 @@ -12411,8 +13613,8 @@ Report: search_form Search Form Форма поиска - 30005 - 30005 + 31006 + 31006 0 @@ -12421,8 +13623,28 @@ Report: search_results Search Results Результаты поиска - 30005 - 30005 + 31006 + 31006 + 0 + + + core + public_search + no_xml_permission + Sorry, but you do not have permission to use the search feature. + Вы не можете пользоваться поиском. + 31006 + 31006 + 0 + + + core + public_search + xml_flood + Flood control is enabled. Please wait at least %s seconds before attempting to search again + Флуд контроль включен. Вы сможете воспользоваться поиском через %s секунд. + 31006 + 31006 0 @@ -12431,18 +13653,598 @@ Report: search_off Sorry, the administrator has taken the search engine offline for the moment. Please try again later Администратор отключил функцию поиска. Пожалуйста, попробуйте позже - 30005 - 30005 + 31006 + 31006 0 core public_search - do_search - Perform the search - Найти - 30005 - 30005 + livesearch_thisforum + This Forum + Поиск по форуму + 31006 + 31006 + 0 + + + core + public_search + livesearch_thistopic + This Topic + Поиск по теме + 31006 + 31006 + 0 + + + core + public_search + search_invalid_date_future + One or both of the dates in your search are in the future, please check your date range and try again + Одна из выбранных вами дат еще не наступила, проверьте выбранные даты и попробуйте еще раз. + 31006 + 31006 + 0 + + + core + public_search + search_invalid_date_range + The date range you selected for your search is invalid, please ensure that the start date is not later than the end date + Выбранные даты неверны, убедитесь что начальная дата не позже, чем конечная + 31006 + 31006 + 0 + + + core + public_search + search_term_long + + Строка содержит более %s символов. Пожалуйста, вернитесь назад и попробуйте ввести более короткую строку. + 31006 + 31006 + 0 + + + core + public_search + search_term_short + + + 31006 + 31006 + 0 + + + core + public_search + see_all_ps + See all %s results + Вывести все %s результатов + 31006 + 31006 + 0 + + + core + public_search + quick_search + Quick Search + Быстрый поиск + 31006 + 31006 + 0 + + + core + public_search + user_posts_none + There is no information to show. + По вашему запросу ничего не найдено. + 31006 + 31006 + 0 + + + core + public_search + user_posts_all + All User Content + Все публикации пользователя + 31006 + 31006 + 0 + + + core + public_search + user_posts_have_been + There have been + Найдено + 31006 + 31006 + 0 + + + core + public_search + user_posts_title_member + by + пользователя + 31006 + 31006 + 0 + + + core + public_search + user_posts_title_posts + posts + сообщения + 31006 + 31006 + 0 + + + core + public_search + user_posts_title_topics + topics + темы + 31006 + 31006 + 0 + + + core + public_search + user_posts_title_all + All + Все + 31006 + 31006 + 0 + + + core + public_search + new_content_all + All New Content + Все новые публикации + 31006 + 31006 + 0 + + + core + public_search + new_content_none + Sorry, no new content found. + Новых публикаций не найдено. + 31006 + 31006 + 0 + + + core + public_search + new_content_entries + new entries + новых сообщений + 31006 + 31006 + 0 + + + core + public_search + new_content + New content + Новые публикации + 31006 + 31006 + 0 + + + core + public_search + new_content_there + There are + Добавлено + 31006 + 31006 + 0 + + + core + public_search + active_none + No active content found + По вашему запросу ничего не найдено + 31006 + 31006 + 0 + + + core + public_search + active_all + All Active Content + Все активные публикации + 31006 + 31006 + 0 + + + core + public_search + active_have_been + There have been + Опубликовано + 31006 + 31006 + 0 + + + core + public_search + active_entries + entries in the last %s + сообщений за последние % + 31006 + 31006 + 0 + + + core + public_search + active_content + Active content in the last %s + Активные публикации за последние % + 31006 + 31006 + 0 + + + core + public_search + no_results_found + No results found + Поиск не дал результатов + 31006 + 31006 + 0 + + + core + public_search + no_results_found_for + for + по + 31006 + 31006 + 0 + + + core + public_search + sort_by_date + Sort by Date + Сортировать по дате + 31006 + 31006 + 0 + + + core + public_search + my_results + My Results + Мои результаты + 31006 + 31006 + 0 + + + core + public_search + sort_by_relevance + Sort by Relevance + Сортировать по релевантности + 31006 + 31006 + 0 + + + core + public_search + your_search_returned + returned + вернул + 31006 + 31006 + 0 + + + core + public_search + your_search_results + results + результатов + 31006 + 31006 + 0 + + + core + public_search + your_search + Your search for the term + Поиск по слову + 31006 + 31006 + 0 + + + core + public_search + generic_content + Content + Контент + 31006 + 31006 + 0 + + + core + public_search + gallery_comment + Comment + Комментарий + 31006 + 31006 + 0 + + + core + public_search + gallery_posted_by + Posted by + Отправил + 31006 + 31006 + 0 + + + core + public_search + gallery_comments + comments + комментариев + 31006 + 31006 + 0 + + + core + public_search + gallery_image + Image + Изображение + 31006 + 31006 + 0 + + + core + public_search + member_member + Member + Пользователь + 31006 + 31006 + 0 + + + core + public_search + member_joined + Joined on + Регистрация: + 31006 + 31006 + 0 + + + core + public_search + core_help + Help + Помощь + 31006 + 31006 + 0 + + + core + public_search + calendar_event + Event + Событие + 31006 + 31006 + 0 + + + core + public_search + forum_forum + Forum + Форум + 31006 + 31006 + 0 + + + core + public_search + forum_replies + replies + ответов + 31006 + 31006 + 0 + + + core + public_search + forum_topic_also + Also in this topic + Также в этой теме + 31006 + 31006 + 0 + + + core + public_search + forum_topic + Topic + Тема + 31006 + 31006 + 0 + + + core + public_search + search_by + by + автор: + 31006 + 31006 + 0 + + + core + public_search + view_result + View result + Просмотр + 31006 + 31006 + 0 + + + core + public_search + to + to + + 31006 + 31006 + 0 + + + core + public_search + find_forum + forum]]> + Искать в форуме + 31006 + 31006 + 0 + + + core + public_search + find_date + date]]> + дате]]> + 31006 + 31006 + 0 + + + core + public_search + find_author + author]]> + автору]]> + 31006 + 31006 + 0 + + + core + public_search + show_as_titles + Show results as titles + Показывать результаты в виде заголовков тем + 31006 + 31006 + 0 + + + core + public_search + search_titles_only + Search titles only + Искать только в названиях тем + 31006 + 31006 + 0 + + + core + public_search + find_words + words]]> + Поиск по ключевым словам + 31006 + 31006 + 0 + + + core + public_search + removed_search_terms + The following search terms are not allowed and were removed from your query: + Одно из введенных вами слов запрещено при использовании поиска: + 31006 + 31006 + 0 + + + core + public_search + optional_fields + All fields are optional, but you must submit at least one search criteria. + Обязательных к заполнению полей нет, но вы должны заполнить хотя бы одно. + 31006 + 31006 + 0 + + + core + public_search + search + Search + Поиск + 31006 + 31006 + 0 + + + core + public_search + attach_header + Attachments + прикрепленных файлов + 31006 + 31006 0 @@ -12451,18 +14253,78 @@ Report: s_update Update Обновить - 30008 - 30008 + 31006 + 31006 + 0 + + + core + public_search + s_forum_asposts + As posts + как сообщения + 31006 + 31006 + 0 + + + core + public_search + s_forum_astopics + As a topic list + как список тем + 31006 + 31006 + 0 + + + core + public_search + s_forum_content + Search in]]> + Искать в]]> + 31006 + 31006 + 0 + + + core + public_search + s_forum_display + Display results]]> + Показать результаты]]> + 31006 + 31006 0 core public_search s_forum_stuff_2 - Results have %s minimum posts or %s minimum views - Результаты, содержащие минимум %s сообщений или минимум %s просмотров - 30008 - 30008 + %s posts and %s views + %s сообщениями и %s просмотрами + 31006 + 31006 + 0 + + + core + public_search + s_forum_desc + discussions]]> + обсуждений]]> + 31006 + 31006 + 0 + + + core + public_search + s_forum_stuff + at least]]> + с не менее: ]]> + 31006 + 31006 0 @@ -12470,29 +14332,9 @@ Report: public_search s_search_type_o_0 Descending (z-a) - По убыванию (я-а) - 30008 - 30008 - 0 - - - core - public_search - s_forum_stuff - where:]]> - откуда: ]]> - 30008 - 30008 - 0 - - - core - public_search - s_search_type_o_1 - Ascending (a-z) - По возрастанию (а-я) - 30008 - 30008 + по убыванию (я-а) + 31006 + 31006 0 @@ -12501,8 +14343,18 @@ Report: s_search_type_1 Relevance релевантности - 30008 - 30008 + 31006 + 31006 + 0 + + + core + public_search + s_search_type_o_1 + Ascending (a-z) + по возрастанию (а-я) + 31006 + 31006 0 @@ -12510,9 +14362,19 @@ Report: public_search s_search_type_0 Last Update Time - дате - 30008 - 30008 + дате обновления + 31006 + 31006 + 0 + + + core + public_search + s_show_topics_only + Show results as topics + Показать только заголовки тем + 31006 + 31006 0 @@ -12520,29 +14382,19 @@ Report: public_search s_search_type sorting]]> - отсортированы по ]]> - 30008 - 30008 + Сортировать результаты по ]]> + 31006 + 31006 0 core public_search - s_show_topics_only - Do not show a post preview - Показать только заголовки тем - 30008 - 30008 - 0 - - - core - public_search - s_search_posts - Search posts only - Искать только сообщения - 30008 - 30008 + s_search_topics_posts + + Названиях тем и сообщениях + 31006 + 31006 0 @@ -12551,48 +14403,28 @@ Report: s_mark_all_read (Mark all items as read) (Отметить все как прочтенное) - 30008 - 30008 + 31006 + 31006 0 core public_search - in - in - в - 30011 - 30011 + s_search_posts + Posts only + Искать только сообщения + 31006 + 31006 0 core public_search - filters - Search Options - Параметры - 30011 - 30011 - 0 - - - core - public_search - show_results_in - Show results for: - Показать результаты за: - 30011 - 30011 - 0 - - - core - public_search - actperiod_year - year - год - 30011 - 30011 + search_section + section]]> + Раздел для поиска]]> + 31006 + 31006 0 @@ -12601,8 +14433,8 @@ Report: forum_showas_post_info Post Information Информация о сообщении - 30011 - 30011 + 31006 + 31006 0 @@ -12611,8 +14443,18 @@ Report: active_go Go Ок - 30011 - 30011 + 31006 + 31006 + 0 + + + core + public_search + actperiod_year + year + год + 31006 + 31006 0 @@ -12621,8 +14463,8 @@ Report: actperiod_months 6 months 6 месяцев - 30011 - 30011 + 31006 + 31006 0 @@ -12631,8 +14473,8 @@ Report: actperiod_month month месяц - 30011 - 30011 + 31006 + 31006 0 @@ -12641,18 +14483,8 @@ Report: actperiod_weeks 2 weeks 2 недели - 30011 - 30011 - 0 - - - core - public_search - actperiod_week - week - неделя - 30011 - 30011 + 31006 + 31006 0 @@ -12661,18 +14493,18 @@ Report: actperiod_today 24 hours 24 часа - 30011 - 30011 + 31006 + 31006 0 core public_search - getactive_for - Active in the last... - Активные за последние - 30011 - 30011 + actperiod_week + week + неделя + 31006 + 31006 0 @@ -12681,18 +14513,18 @@ Report: sr_as_post_string Posted on %s by %s Отправлено %s автор %s - 30011 - 30011 + 31006 + 31006 0 core public_search - your_topics_limited - %s]]> - %s]]> - 30011 - 30011 + getactive_for + Active in the last... + Активные за последние + 31006 + 31006 0 @@ -12701,18 +14533,18 @@ Report: your_content_by_date since %s c %s - 30011 - 30011 + 31006 + 31006 0 core public_search - your_search_limited - %s limited to the first %s]]> - %s ограничены первыми %s]]> - 30011 - 30011 + your_topics_limited + %s]]> + %s]]> + 31006 + 31006 0 @@ -12721,3778 +14553,388 @@ Report: your_posts_limited %s]]> %s]]> - 30011 - 30011 + 31006 + 31006 0 core - public_usercp - op_dd_email - Notify Via Email - Уведомлять по e-mail - 30005 - 30005 + public_search + your_search_limited + %s limited to the first %s]]> + %s ограничены первыми %s]]> + 31006 + 31006 0 core - public_usercp - op_dd_none - No Notification - Не уведомлять - 30005 - + public_search + s_andor_or + any words + любые слова + 31006 + 31006 0 core - public_usercp - op_dd_pm - Notify Via Personal Message (PM) - Уведомлять личным сообщением (PM) - 30005 - + public_search + s_andor_quotes + + + 31006 + 31006 0 core - public_usercp - op_dd_disabled - Disabled - Allow addition without approving - Выключено — разрешить добавление без подтверждения - 30005 - - 0 - - - core - public_usercp - op_dd_enabled - Enabled - Only add when I approve them - Включено — добавлять только когда я это разрешил - 30005 - - 0 - - - core - public_usercp - dname_group_restrict_date - You cannot change your display name until %s - Вы не сможете изменить ваше имя пользователя до %s - 30005 - - 0 - - - core - public_usercp - sig_group_restrict_date - You cannot change your signature until %s - Вы не сможете изменить вашу подпись до %s - 30005 - - 0 - - - core - public_usercp - dname_group_restrict_posts - You cannot change your display name until you have %s more approved posts - Вы не сможете изменить ваше имя пользователя пока у вас не будет более %s утвержденных сообщений - 30005 - - 0 - - - core - public_usercp - sig_group_restrict_posts - You cannot change your signature until you have %s more approved posts - Вы не сможете изменить вашу подпись пока у вас не будет более %s утвержденных сообщений - 30005 - - 0 - - - core - public_usercp - h_topic_starter - Topic Starter - Автор - 30005 - - 0 - - - core - public_usercp - h_last_action - Last Action - Последнее сообщение - 30005 - - 0 - - - core - public_usercp - h_topic_title - Topic Title - Название темы - 30005 - - 0 - - - core - public_usercp - h_replies - Replies - Ответов - 30005 - - 0 - - - core - public_usercp - cannot_get_email - You cannot currently receive emails from this forum - Вы не можете получать письма с этого форума - 30005 - 30005 - 0 - - - core - public_usercp - h_hits + public_search + forum_sort_views Views - Просмотров - 30005 - + просмотрам + 31006 + 31006 0 core - public_usercp - click_allow_email - Click here to allow email from this forum - Нажмите здесь, чтобы получать письма с этого форума - 30005 - 30005 + public_search + s_andor_and + all words + все слова + 31006 + 31006 0 core - public_usercp - fb_using_email - You are using a Facebook email address - Вы используете Facebook e-mail адрес - 30005 - 30005 + public_search + forum_sort_posts + Replies + сообщениям + 31006 + 31006 0 core - public_usercp - cannot_get_email_2 - Until you allow emails from this forum, you will not receive topic subscription notifications, new personal message notifications, etc. - Пока вы не разрешите получать письма с этого форума, вы не сможете получать уведомления о событиях в отслеживаемых темах, уведомления о новых личных сообщениях и т.п. - 30005 - 30005 - 0 - - - core - public_usercp - avatar - Avatar - Аватар - 30005 - - 0 - - - core - public_usercp - fb_email_not_allowed_desc - You have not given this forum permission to send emails via your facebook account. You will need to click the link in the box above to allow this before you can configure any Facebook Connect options. - У вас недостаточно прав для отправки e-mail письма через facebook профиль. Вам нужно нажать на ссылку в вышеуказанном блоке для решения этой проблемы. Прежде чем вы сможете настраивать опции соединения с Facebook. - 30005 - 30005 - 0 - - - core - public_usercp - fb_email_not_allowed - Email Not Allowed - Отправка e-mail писем запрещена - 30005 - 30005 - 0 - - - core - public_usercp - member_title_desc - Your member title is shown beside posts you make - Ваш статус отображается с вашими сообщениями - 30005 - - 0 - - - core - public_usercp - member_title - Member Title - Статус - 30005 - - 0 - - - core - public_usercp - profile_information - Profile Information - Данные профиля - 30005 - - 0 - - - core - public_usercp - fb_connect_mismatch - Facebook Connect Mismatch - Нет соединения с Facebook - 30005 - - 0 - - - core - public_usercp - fb_connect_mismatch_desc - Facebook account you are currently logged into is already linked to another forum account.
    You will need to log out of Facebook before returning here if you want to configure these options.]]>
    - учетная запись на Facebook уже используется другим пользователем форума.
    Вам нужно выйти из Facebook прежде чем дальше настраивать ваши опции.]]>
    - 30005 - - 0 -
    - - core - public_usercp - fb_config - You will need to connect with Facebook before you can configure your options. - Вам нужно войти через Facebook, прежде чем настраивать эти опции. - 30005 - - 0 - - - core - public_usercp - fb_logged_in_as - You are logged into Facebook as - Вы авторизованы на Facebook как - 30005 - - 0 - - - core - public_usercp - fb_last_syncd - This information is updated once every 24 hours. Last synchronized: - Эта информация обновляется каждые 24 часа. Последнее обновление: - 30005 - - 0 - - - core - public_usercp - fb_sync_aboutme - "About Me" with my Facebook "About Me"]]> - «Обо мне» на форуме и на Facebook.]]> - 30005 - - 0 - - - core - public_usercp - fb_sync_status - Status with my Facebook status]]> - статус на форуме на ваш статус в Facebook.]]> - 30005 - - 0 - - - core - public_usercp - fb_sync_avatar - Avatar with my Facebook picture]]> - аватар аватаром из Facebook ]]> - 30005 - - 0 - - - core - public_usercp - fb_sync_photo - Profile Picture with my Facebook picture]]> - фото из Facebook ]]> - 30005 - - 0 - - - core - public_usercp - fb_sync_options - Facebook to Forum Account Synchronization Options - Опции синхронизации учетной записи Facebook и этого форума - 30005 - - 0 - - - core - public_usercp - fb_disassociate - Disassociate Facebook - Отключить связь с аккаунтом в Facebook - 30005 - - 0 - - - core - public_usercp - fb_sync_now - Synchronize Now - Синхронизировать - 30005 - - 0 - - - core - public_usercp - fb_never - Never - Никогда - 30005 - - 0 - - - core - public_usercp - fb_disassociate_info_2 - change your email address - изменение вашего e-mail адреса - 30005 - 30005 - 0 - - - core - public_usercp - fb_disassociate_desc - This will log you out, remove the account link from Facebook and will remove the Facebook Application. - Выйти из учетной записи, удалить соединение с Facebook и удалить приложение Facebook - 30005 - - 0 - - - core - public_usercp - fb_disassociate_info_1 - If you disassociate your forum account, you will not be able to use the Forgotton Password feature to retrieve your forum account password. It is recommended you - Если вы отключаете связь Facebook с учетной записью на форуме, вы не сможете использовать функцию восстановления пароля на форуме. - 30005 - - 0 - - - core - public_usercp - fb_disassociate_info_3 - and choose an email address outside of Facebook if you wish to continue using this forum account after you have disassociated your forum account from Facebook. There is no undo. - и выберите e-mail вне Facebook если хотите продолжить использовать эту учетную запись на форуме, но отвязать ее от Facebook. Это действие нельзя отменить. - 30005 - 30005 - 0 - - - core - public_usercp - fb_disassociate_now - Disassociate Account Now - Отвязать учетную запись - 30005 - - 0 - - - core - public_usercp - sig_restrictions - Signature Restrictions - Ограничения подписи - 30005 - - 0 - - - core - public_usercp - sig_restrictions_contain - Your signature may contain: - Подпись может содержать: - 30005 - - 0 - - - core - public_usercp - topic_title - Topic title - Название темы - 30005 - - 0 - - - core - public_usercp - sig_max_imagesr - Up to %s images - До %s изображений - 30005 - - 0 - - - core - public_usercp - sig_max_imagesr_nl - Any number images - Любое количество изображений - 30005 - - 0 - - - core - public_usercp - sig_max_imgsize - Images up to %s x %s pixels - Изображения размером до %s х %s пикселей - 30005 - - 0 - - - core - public_usercp - sig_max_urls - Up to %s URLs - До %s ссылок - 30005 - - 0 - - - core - public_usercp - sig_max_imgsize_nl - Images of any size - Изображения любого размера - 30005 - - 0 - - - core - public_usercp - settings_for_ucp - Settings for - Настройки для - 30005 - - 0 - - - core - public_usercp - admin_emailpassword - Because you have administrator access on this board, you must utilize the admin control panel to change your email address or password. This measure is taken for security purposes. In the Admin CP, navigate to the System tab, and click on Change My Details. You will be able to change your email address and password from this page. - Вы имеете доступ администратора, поэтому для изменения e-mail адреса или пароля вам необходимо перейти в АЦ. Эта мера принимается в целях безопасности. В АЦ перейдите на вкладку Пользователи, нажмите Управление пользователями, найдите вашу учетную запись и нажмите на ваше имя. На этой странице вы сможете изменить свой e-mail адрес и пароль. - 30005 - 30005 - 0 - - - core - public_usercp - sig_imagetoobig - This image is larger than the maximum allowed dimensions of %s x %s.]]> - Это изображение больше максимально допустимого размера %s х %s.]]> - 30005 - - 0 - - - core - public_usercp - sig_toomanylines - You may only use up to %s lines of text in your signature. - Подпись не должна быть больше %s строк - 30005 - - 0 - - - core - public_usercp - sig_toomanyurls - You may only use up to %s urls in your signature. - Подпись может содержать не более %s ссылок - 30005 - - 0 - - - core - public_usercp - sig_toomanyimages - You may only use up to %s images in your signature. - Подпись может содержать не более %s изображений - 30005 - - 0 - - - core - public_usercp - m_facebook - Manage Facebook Connect - Соединение с Facebook - 30005 - - 0 - - - core - public_usercp - sig_max_lines_nl - Any number of lines - Любое количество строк - 30005 - - 0 - - - core - public_usercp - sig_max_lines - Up to %s lines - До %s строк - 30005 - - 0 - - - core - public_usercp - sig_max_urls_nl - Any number of URLs - Любое количество ссылок - 30005 - - 0 - - - core - public_usercp - cancel_edit - Cancel edit - Отмена - 30005 - - 0 - - - core - public_usercp - ucp_attach_allowance - Your attachment allowance is - Занято - 30005 - - 0 - - - core - public_usercp - ucp_full - full - допустимого места - 30005 - - 0 - - - core - public_usercp - ucp_user_attach - User Attachments - Файлы пользователя - 30005 - - 0 - - - core - public_usercp - ucp_view_org - View original topic - Посмотреть оригинальную тему - 30005 - - 0 - - - core - public_usercp - ucp_select_category - Select a Category - Выберите категорию - 30005 - - 0 - - - core - public_usercp - ucp_gravatar_enter_email - Gravatar e-mail address]]> - Gravatar]]> - 30005 - - 0 - - - core - public_usercp - ucp_reply_since - topic(s) have new replies since your last visit - тем содержат новые ответы с момента вашего последнего посещения - 30005 - - 0 - - - core - public_usercp - ucp_watched_forums - Watched Forums - Отслеживаемые форумы - 30005 - - 0 - - - core - public_usercp - ucp_remove_avatar - Remove My Avatar - Удалить аватар - 30005 - - 0 - - - core - public_usercp - ucp_ignored_users - Ignored Users - Игнорируемые пользователи - 30005 - - 0 - - - core - public_usercp - ucp_ignore_posts - Ignore Posts - Игнорировать сообщения - 30005 - - 0 - - - core - public_usercp - ucp_ignore_msgs - Ignore Messages - Игнорировать личные сообщения - 30005 - - 0 - - - core - public_usercp - ucp_members_name - - Имя пользователя - 30005 - - 0 - - - core - public_usercp - ucp_comments - Comments - Комментарии - 30005 - - 0 - - - core - public_usercp - ucp_comment_approval - Comment Approval - Модерировать новые комментарии? - 30005 - - 0 - - - core - public_usercp - ucp_ignore_pc - Ignore Personal Conversations - Игнорировать личные сообщения - 30005 - - 0 - - - core - public_usercp - ucp_comment_notify_type - Comment Notification Type - Уведомлять о новых комментариях? - 30005 - - 0 - - - core - public_usercp - ucp_enable_comments - Enable Profile Comments - Разрешить комментирование профиля - 30005 - - 0 - - - core - public_usercp - ucp_friends - Friends - Друзья - 30005 - - 0 - - - core - public_usercp - ucp_show_friends_profile - Show my friends in my profile - Показывать друзей в профиле - 30005 - - 0 - - - core - public_usercp - ucp_friend_notify - Friend Notification Type - Уведомлять о новых друзьях? - 30005 - - 0 - - - core - public_usercp - ucp_friend_approve - Friend Approval - Модерировать запросы на дружбу? - 30005 - - 0 - - - core - public_usercp - ucp_show_x_latest - Show X latest visitors on my profile - Показывать X последних посетителей профиля - 30005 - - 0 - - - core - public_usercp - ucp_birthday_select - Select Your Birthday - Введите дату рождения - 30005 - - 0 - - - core - public_usercp - ucp_birthday_optional - Entering your birthday is optional - Ввод дня рождения не является обязательным - 30005 - - 0 - - - core - public_usercp - ucp_required_info - Required Information - Требуемая информация - 30005 - - 0 - - - core - public_usercp - ucp_other_info - Other Information - Другая информация - 30005 - - 0 - - - core - public_usercp - ucp_remove_photo - Remove My Photo - Удалить фотографию - 30005 - - 0 - - - core - public_usercp - ucp_dst_effect - Is DST currently in effect? - Перейти на летнее время? - 30005 - - 0 - - - core - public_usercp - ucp_dst_now - Currently in DST? - Уже на летнем времени? - 30005 - - 0 - - - core - public_usercp - ucp_announcements - Announcements - Объявления - 30005 - - 0 - - - core - public_usercp - ucp_topic_display_mode - Topic Display Mode - Режимы отображения тем - 30005 - - 0 - - - core - public_usercp - ucp_standard - Standard - Стандартный - 30005 - - 0 - - - core - public_usercp - ucp_outline_explain - All posts in a topic are shown in tree display, with one thread at a time shown. - Все сообщения показываются в древовидном списке. - 30005 - - 0 - - - core - public_usercp - ucp_linearplus_explain - The first post is always shown at the top of the page, with other posts shown one after the other. - Первое сообщение всегда показывается вверху страницы. Остальные сообщения показываются друг за другом. - 30005 - - 0 - - - core - public_usercp - ucp_standard_explain - Posts are shown one after the other. - Сообщения показываются друг за другом. - 30005 - - 0 - - - core - public_usercp - ucp_outline - Outline - Древовидный - 30005 - - 0 - - - core - public_usercp - ucp_linearplus - Linear + - Линейный - 30005 - - 0 - - - core - public_usercp - pagetitle_bit - User CP - Профиль пользователя - 30005 - - 0 - - - core - public_usercp - called_invalid_function - The page you requested was not valid. - Запрошенная вами страница не существует. - 30005 - - 0 - - - core - public_usercp - securehash_not_secure - Your security key was not valid. - Неверный ключ безопасности - 30005 - - 0 - - - core - public_usercp - passwords_not_matchy - The passwords do not match - Пароли не совпадают - 30005 - - 0 - - - core - public_usercp - current_pw_bad - Your current password is incorrect - Неверный текущий пароль - 30005 - - 0 - - - core - public_usercp - new_pw_too_long - Your new password is too long - Новый пароль слишком длинный - 30005 - - 0 - - - core - public_usercp - complete_entire_form - You must complete the entire form - Вы должны заполнить всю форму - 30005 - - 0 - - - core - public_usercp - hanlogin_pw_failed - The password change failed - Невозможно изменить пароль - 30005 - - 0 - - - core - public_usercp - name_change_tooshort - The name must be more than 3 characters and less than %s characters - Имя должно быть больше 3 и меньше %s символов. - 30005 - - 0 - - - core - public_usercp - name_change_noload - We could not load the member - Невозможно загрузить пользователя - 30005 - - 0 - - - core - public_usercp - name_taken_change - That name is already in use, please choose another. - Это имя уже используется другим пользователем, пожалуйста выберите другое. - 30005 - - 0 - - - core - public_usercp - pw_change_successful - Your password change was successful - Пароль успешно изменен - 30005 - - 0 - - - core - public_usercp - name_change_noperm - That name is already in use, please choose another. - Это имя уже используется другим пользователем, пожалуйста выберите другое. - 30005 - - 0 - - - core - public_usercp - name_change_illegal - The name contains illegal characters. - Имя содержит недопустимые символы. - 30005 - - 0 - - - core - public_usercp - name_change_taken - That name is already in use, please choose another. - Это имя уже используется другим пользователем, пожалуйста выберите другое. - 30005 - - 0 - - - core - public_usercp - email_not_valid - You must enter valid email addresses. - Вы должны ввести верный e-mail адрес. - 30005 - 30005 - 0 - - - core - public_usercp - emails_no_matchy - The entered email addresses do not match. - Введенные e-mail адреса не совпадают. - 30005 - 30005 - 0 - - - core - public_usercp - email_is_taken - That email address is already in use. - Этот e-mail адрес уже используется другим пользователем. - 30005 - 30005 - 0 - - - core - public_usercp - name_change_no_more - You are not permitted to make any more changes to your display name - Вы больше не можете изменить ваше имя пользователя - 30005 - - 0 - - - core - public_usercp - captcha_email_invalid - That CAPTCHA input did not match the CAPTCHA image. - Введенная строка не соответствует строке на изображении. - 30005 - - 0 - - - core - public_usercp - removeav_notexist - The member does not exist - Пользователь не существует - 30005 - - 0 - - - core - public_usercp - change_aboutme - Change About Me Page - Информация о себе - 30005 - - 0 - - - core - public_usercp - removeav_noperm - - У вас недостаточно прав для редактирования аватара администратора - 30005 - - 0 - - - core - public_usercp - change_settings - Change Profile Information - Изменить данные профиля - 30005 - - 0 - - - core - public_usercp - ignoreuser_nomem - We could not find a member that matches that name - Не удалось найти пользователя с таким именем - 30005 - - 0 - - - core - public_usercp - ignoreuser_cannot - You cannot ignore that member - Вы не можете игнорировать этого пользователя - 30005 - - 0 - - - core - public_usercp - ignoreuser_already - You are already choosing to ignore items from that member - Пользователь уже находится в списке игнорируемых - 30005 - - 0 - - - core - public_usercp - ignoreuser_noid - We could not find the member you were attempting to ignore. - Не удалось найти пользователя, которого вы хотите добавить в список - 30005 - - 0 - - - core - public_usercp - ignoreuser_success - You are now ignoring the user - Пользователь добавлен в список игнорируемых - 30005 - - 0 - - - core - public_usercp - noignoreuser_success - You are no longer ignoring the user - Пользователь удален из списка игнорируемых - 30005 - - 0 - - - core - public_usercp - noignoreuser_noid - We could not find the member you were attempting to remove from your ignore list, or you are not ignoring that user - Не удалось найти пользователя, которого вы хотите удалить из списка игнорируемых. - 30005 - - 0 - - - core - public_usercp - saveavatar_noimg - The upload failed - you may only upload an image file - Загрузка не удалась - вы можете загрузить только изображение - 30005 - - 0 - - - core - public_usercp - saveavatar_nofile - The upload failed - there was no image to upload - Загрузка не удалась - изображение не загружено - 30005 - - 0 - - - core - public_usercp - saveavatar_noperm - - У вас недостаточно прав для редактирования аватара администратора - 30005 - - 0 - - - core - public_usercp - saveavatar_nomem - The member does not exist - Пользователь не существует - 30005 - - 0 - - - core - public_usercp - saveavatar_toobig - The upload failed - the file was too large - Загрузка не удалась - файл слишком большой - 30005 - - 0 - - - core - public_usercp - saveavatar_chmod - The upload failed - there was a problem moving the avatar to the uploads directory. Please verify permissions are set correctly on the uploads folder. - Загрузка не удалась - возникла ошибка при перемещении аватара в директорию загрузки. Пожалуйста, проверьте права доступа к директории загрузки. - 30005 - 30005 - 0 - - - core - public_usercp - saveavatar_badimg - The upload failed - there was a problem processing the image - Загрузка не удалась - возникла ошибка при обработке изображения - 30005 - - 0 - - - core - public_usercp - saveavatar_noimg2 - We could not determine the avatar you were trying to update with - Невозможно определить аватар, который вы хотите обновить на - 30005 - - 0 - - - core - public_usercp - saveavatar_badimgext - You cannot link to that type of image - Вы не можете сделать ссылку на этот тип изображения - 30005 - - 0 - - - core - public_usercp - identity_url_desc - You can associate an OpenID identity URL with your account - Вы можете связать ваш OpenID с вашей учетной записью. - 30005 - - 0 - - - core - public_usercp - identity_url - Your Identity URL - Ваш OpenID - 30005 - - 0 - - - core - public_usercp - identity_url_h3 - OpenID Options - Настройки OpenID - 30005 - - 0 - - - core - public_usercp - cp_current_aboutme - - Текущая информация о себе - 30005 - - 0 - - - core - public_usercp - m_notes - Manage Notes - Заметки - 30005 - - 0 - - - core - public_usercp - cp_edit_aboutme - - Изменить информацию о себе - 30005 - - 0 - - - core - public_usercp - identity_url_assoc - That identity url is already in use by another account - Этот OpenID уже используется другим пользователем - 30005 - - 0 - - - core - public_usercp - m_choose_comm_type - Choose the type of notification for when comments are added - Выберите тип уведомления о новых комментариях - 30005 - - 0 - - - core - public_usercp - m_choose_cmod_type - Choose the type of moderation for when comments are added - Выберите тип модерации новых комментариев - 30005 - - 0 - - - core - public_usercp - m_choose_friend_type - Choose the type of notification for when new friends are added - Выберите тип уведомления о новых друзьях - 30005 - - 0 - - - core - public_usercp - ucp_op_pm_title - Personal Messenger Options - Настройки личных сообщений - 30005 - - 0 - - - core - public_usercp - ucp_op_pm - Disable my personal messenger - Не принимать личные сообщения - 30005 - - 0 - - - core - public_usercp - m_choose_fmod_type - Choose the type of moderation for when new friends are added - Выберите тип модерации для добавления в друзья - 30005 - - 0 - - - core - public_usercp - ucp_op_pm_desc - If you disable your personal messenger, you will not be able to start or participate in personal conversations. - Если вы отключите использование вами личных сообщений, вы не сможете отправлять и получать личные сообщения. - 30005 - - 0 - - - core - public_usercp - dname_choose - Enter a new display name - Введите новое имя пользователя - 30005 - - 0 - - - core - public_usercp - dname_change_ok - Display name changed successfully - Имя пользователя успешно изменено - 30005 - - 0 - - - core - public_usercp - dname_choose2 - - - 30005 - - 0 - - - core - public_usercp - sub_added - Your subscription has been added - Подписка успешно добавлена - 30005 - - 0 - - - core - public_usercp - dname_password2 - This is to ensure security on your account - Это гарантирует безопасность вашей учетной записи - 30005 - - 0 - - - core - public_usercp - dname_password - Enter your current password - Введите ваш текущий пароль - 30005 - - 0 - - - core - public_usercp - m_dname_change - Change Display Name - Изменить имя пользователя - 30005 - - 0 - - - core - public_usercp - dname_string - You are permitted to make %s changes in a %s day period.

    Changing your display name will not affect your log in details.]]>
    - Вам разрешено делать %s изменений каждые %s дней.

    Изменение имени никак не отражается на вашем логине.]]>
    - 30005 - - 0 -
    - - core - public_usercp - pp_cannot_find_member - Please reload the page and try again. If you continue to experience problems, please contact an administrator. - Перезагрузите страничку и попробуйте еще раз. Если не помогает - обратитесь к администратору. - 30007 - - 0 - - - core - public_usercp - dname_title - Change Display Name - Изменить имя пользователя - 30005 - - 0 - - - core - public_usercp - settings_time_txt2 - The time (including your current adjustment) is: - Текущее время (включая ваши настройки часового пояса): - 30005 - - 0 - - - core - public_usercp - dst_error - An error occurred when trying to automatically change your DST settings. If the error continues, please switch off auto DST correction. - Произошла ошибка при попытке автоматически изменить ваши настройки перехода на летнее время. Если ошибка продолжается, пожалуйста, отключите автокоррекцию перехода на летнее время. - 30005 - - 0 - - - core - public_usercp - dst_correction_title - DST Correction - Коррекция перехода на летнее время - 30005 - - 0 - - - core - public_usercp - dst_auto2 - If selected, your DST setting is automatically adjusted when you next load the board index - Если выбрано, то ваши настройки перехода на летнее время будут автоматически применены, когда в следующий раз вы войдете на главную страницу форума. - 30005 - - 0 - - - core - public_usercp - ucp_title_posting - Posting Settings - Настройки доступа - 30005 - - 0 - - - core - public_usercp - subs_for - for - на - 30005 - - 0 - - - core - public_usercp - auto_track_type - If enabled, choose default notification type: - Если включено, выберите тип уведомления: - 30005 - - 0 - - - core - public_usercp - auto_track - Watch every topic I reply to - Включить уведомления на e-mail? - 30005 - - 0 - - - core - public_usercp - attach_inpm - Personal Message - Личное сообщение - 30005 - - 0 - - - core - public_usercp - attach_topicmoved - Unavailable]]> - Тема перемещена]]> - 30005 - - 0 - - - core - public_usercp - conv_email_warning - PLEASE change your email address immediately.]]> - Немедленно измените свой e-mail адрес.]]> - 30005 - 30005 - 0 - - - core - public_usercp - conv_email_warning_title - EMAIL WARNING - E-MAIL ПРЕДУПРЕЖДЕНИЕ - 30005 - 30005 - 0 - - - core - public_usercp - announce_by - By: - Автор: - 30005 - 30005 - 0 - - - core - public_usercp - announce_edit - Edit - Изменить - 30005 - 30005 - 0 - - - core - public_usercp - announce_delete - Delete - Удалить - 30005 - 30005 - 0 - - - core - public_usercp - flash_text - Allows for an upload progress bar and multiple file uploads, but does not work on all browsers - Позволяет использовать flash для прогресс-бара и загрузки нескольких файлов. Работает не во всех браузерах. - 30005 - - 0 - - - core - public_usercp - enable_flash - Enable flash uploader? - Включить загрузку файлов с использованием flash - 30005 - - 0 - - - core - public_usercp - rte_text - Rich Text Editor requires IE6+, Mozilla / Firefox 3.0+, Safari 4+, Google Chrome, or Opera 9+ - Визуальный редактор требует Internet Explorer 6+, Mozilla / Firefox или Opera 9+ - 30005 - - 0 - - - core - public_usercp - enable_rte - Enable visual (RTE) editor? - Использовать визуальный редактор - 30005 - - 0 - - - core - public_usercp - subs_c_title - Subscription Information - Информация о подписках - 30005 - - 0 - - - core - public_usercp - subs_c_type - Type - Тип - 30005 - - 0 - - - core - public_usercp - subs_exp_text - You will receive a notification when a new reply is made to a topic you are subscribed to.]]> - При подписке на форум вы будете уведомлены обо всех новых сообщениях в этой теме.]]> - 30005 - - 0 - - - core - public_usercp - subs_delayed_desc - - При выборе этой опции вы будете уведомлены о новых темах или ответах во время своего отсутствия на форуме. - 30005 - - 0 - - - core - public_usercp - subs_delayed - Delayed Email Notification - Уведомление с задержкой - 30005 - 30005 - 0 - - - core - public_usercp - subs_daily - Daily Email Digest - Ежедневное уведомление - 30005 - 30005 - 0 - - - core - public_usercp - subs_immediate_desc - This option will send out a notification immediately after a reply has been made, regardless of your activity. - При выборе этой опции вы будете уведомлены о новых темах или ответах, независимо от того, присутствуете ли вы или отсутствуете на форуме. - 30005 - - 0 - - - core - public_usercp - subs_immediate - Immediate Email Notification - Немедленное уведомление - 30005 - 30005 - 0 - - - core - public_usercp - subs_none_title - No Email Notification - Не уведомлять - 30005 - 30005 - 0 - - - core - public_usercp - subs_weekly_desc - This option will send out a weekly digest showing all new replies for the week - При выборе этой опции вы будете еженедельно получать краткое уведомление обо всех новых сообщениях за текущую неделю. - 30005 - - 0 - - - core - public_usercp - subs_weekly - Weekly Email Digest - Еженедельное уведомление - 30005 - 30005 - 0 - - - core - public_usercp - subs_daily_desc - This option will send out a daily digest showing all new replies for the day - При выборе этой опции вы будете ежедневно получать краткое уведомление обо всех новых темах и сообщениях за текущий день. - 30005 - - 0 - - - core - public_usercp - subsf_delayed_desc - - При выборе этой опции вы будете уведомлены о новых темах во время своего отсутствия на форуме. - 30005 - - 0 - - - core - public_usercp - subsf_delayed - Delayed Email Notification - Уведомление с задержкой - 30005 - 30005 - 0 - - - core - public_usercp - subsf_immediate_desc - This option will send out a notification immediately after a new topic has been made, regardless of your activity. - При выборе этой опции вы будете уведомлены о новых темах , независимо от того, присутствуете ли вы или отсутствуете на форуме. - 30005 - - 0 - - - core - public_usercp - subsf_immediate - Immediate Email Notification - Немедленное уведомление - 30005 - 30005 - 0 - - - core - public_usercp - subsf_daily_desc - This option will send out a daily digest showing all new topics and all updated topics for the day - При выборе этой опции вы будете ежедневно получать краткое уведомление обо всех новых темах и сообщениях за текущий день. - 30005 - - 0 - - - core - public_usercp - subsf_daily - Daily Email Digest - Ежедневное уведомление - 30005 - 30005 - 0 - - - core - public_usercp - subsf_weekly_desc - This option will send out a weekly digest showing all new topics and all updated topics for the week - При выборе этой опции вы будете еженедельно получать краткое уведомление обо всех новых темах и сообщениях за текущую неделю. - 30005 - - 0 - - - core - public_usercp - subsf_weekly - Weekly Email Digest - Еженедельное уведомление - 30005 - 30005 - 0 - - - core - public_usercp - subsf_exp_text - You will receive a notification when a new topic is posted in a forum you are subscribed to. Digests will also include updated topics.]]> - При подписке на форум вы будете уведомлены обо всех новых темах в этом форуме, а при подписке на тему получите уведомления уже о всех новых сообщениях в этой теме.]]> - 30005 - - 0 - - - core - public_usercp - subs_none_desc - This option will not send out any email notification, but will retain the topic in your subscriptions panel. - При выборе этой опции вы не будете получать никаких уведомлений на e-mail, но все новые и обновленные темы будут сохранены на вашей личной странице подписок. - 30005 - 30005 - 0 - - - core - public_usercp - subsf_none_desc - This option will not send out any email notification but will retain the forum in your subscriptions panel. - При выборе этой опции вы не будете получать никаких уведомлений на e-mail, но все новые и обновленные форумы будут сохранены на вашей личной странице подписок. - 30005 - 30005 - 0 - - - core - public_usercp - subsf_none_title - No Email Notification - Не уведомлять - 30005 - 30005 - 0 - - - core - public_usercp - announce_page_disabled - (Not Active) - (Отключено) - 30005 - - 0 - - - core - public_usercp - subs_c_change - Change to: - Изменить на: - 30005 - - 0 - - - core - public_usercp - subs_submit - Proceed - Выполнить действие - 30005 - - 0 - - - core - public_usercp - announce_del1 - Are you sure you wish to delete this announcement? - Вы действительно хотите удалить это объявление? - 30005 - 30005 - 0 - - - core - public_usercp - announce_del2 - Ok, no action taken! - Действие отменено! - 30005 - 30005 - 0 - - - core - public_usercp - announce_error_forums - You must choose at least one forum for this announcement. - Вы должны выбрать хотя бы один форум для этого объявления. - 30005 - 30005 - 0 - - - core - public_usercp - announce_error_date - The start or end date is not a real date, please check the dates entered. - Дата начала или завершения указана в неправильном формате. Проверьте введенные данные. - 30005 - 30005 - 0 - - - core - public_usercp - announce_title + public_search + forum_sort_title Title - Заголовок - 30005 - + заголовку + 31006 + 31006 0 core - public_usercp - announce_error_title - You must enter a title and content for this announcement. - Вы должны ввести заголовок и текст объявления. - 30005 - + public_search + search_cpt_undelete + Restore Deleted Topics + Восстановить удаленные темы + 31006 + 31006 0 core - public_usercp - announce_author - Author - Автор - 30005 - 30005 + public_search + search_cpt_delete + Delete Topics + Удалить темы + 31006 + 31006 0 core - public_usercp - announce_end - Ends - Окончание - 30005 - 30005 + public_search + search_cpt_unapprove + Un-approve Topics (Set Invisible) + Скрыть темы + 31006 + 31006 0 core - public_usercp - announce_starts - Starts - Начало - 30005 - + public_search + search_cpt_approve + Approve Topics (Set Visible) + Опубликовать темы + 31006 + 31006 0 core - public_usercp - announce_forums - Forums - Форумы - 30005 - + public_search + s_p_unapprove + Set Invisible (Unapprove Posts) + Скрыть + 31006 + 31006 0 core - public_usercp - announce_current - Current Announcements - Текущие объявления - 30005 - 30005 - 0 - - - core - public_usercp - announce_add - Add Announcement - Создание объявления - 30005 - 30005 - 0 - - - core - public_usercp - announce_none - There are no announcements - Нет ни одного объявления - 30005 - - 0 - - - core - public_usercp - announce_form_title - Announcement Title - Заголовок объявления - 30005 - - 0 - - - core - public_usercp - announce_button_edit - Edit Announcement - Отредактировать объявление - 30005 - 30005 - 0 - - - core - public_usercp - announce_form_end - End Date (MM-DD-YYYY) - Дата завершения (ДД.ММ.ГГГГ) - 30005 - - 0 - - - core - public_usercp - announce_form_startdesc - Leave blank to not use a start date - Не заполняйте, если не хотите использовать дату начала - 30005 - - 0 - - - core - public_usercp - announce_form_start - Start Date (MM-DD-YYYY) - Дата начала (ДД.ММ.ГГГГ) - 30005 - - 0 - - - core - public_usercp - menu_announcements - Manage Announcements - Объявления - 30005 - - 0 - - - core - public_usercp - cp_edit_user - Member Look-up - Поиск пользователя - 30005 - - 0 - - - core - public_usercp - announce_form_enable - Enable this announcement - Опубликовать объявление - 30005 - - 0 - - - core - public_usercp - announce_page_allforums - All Forums - Все форумы - 30005 - - 0 - - - core - public_usercp - announce_form_options - Options - Опции - 30005 - - 0 - - - core - public_usercp - announce_use_nlbr - Parse newlines (if HTML enabled)? - Включить обработку новых строк (если HTML включен)? - 30005 - - 0 - - - core - public_usercp - announce_form_allforums - -- All Forums -- - -- Все форумы -- - 30005 - - 0 - - - core - public_usercp - announce_use_html - Enable HTML? - Включить HTML? - 30005 - - 0 - - - core - public_usercp - announce_form_forums2 - You may choose more than one - Можете выбрать несколько форумов - 30005 - - 0 - - - core - public_usercp - announce_form_forums - Activate in Forums - Показывать в форумах - 30005 - - 0 - - - core - public_usercp - announce_form_enddesc - Leave blank to not use an end date - Не заполняйте, если не хотите использовать дату завершения - 30005 - - 0 - - - core - public_usercp - cp_find_user - Enter part, or all of the username you wish to edit - Введите часть или полное имя пользователя - 30005 - - 0 - - - core - public_usercp - ip_warn_text - Please Note: You may enter a wildcard '*' (without quotes) as the last part of the IP address.
    For example, 127.*.*.* will match all IP address that start with 127.
    127.1.0.* will match all IP addresses that start with 127.1.0.
    An error will occur if you attempt to use a wildcard in the middle of the IP address. For example, 127.*.0.1 will return an error.]]>
    - Примечание: Вы можете использовать маску '*' (без кавычек) вместо последних частей IP адреса.
    Пример: При использовании 127.*.*.* будут найдены все IP адреса, начинающиеся с 127.
    При использовании 127.1.0.* будут найдены все IP адреса, начинающиеся с 127.1.0.
    При использовании маски в середине IP адреса, произойдет ошибка и вы получите сообщение об ошибке. Пример. Использование 127.*.0.1 выдаст ошибку.]]>
    - 30005 - - 0 -
    - - core - public_usercp - ip_enter - Enter the IP address]]> - Введите IP адрес]]> - 30005 - - 0 - - - core - public_usercp - ip_submit - Run Tool - Начать поиск - 30005 - - 0 - - - core - public_usercp - ip_resolve_result - %s

    Try visiting nic.com to get more information by running this match via WHOIS.]]>
    - %s

    Можете посетить nic.com для получения дополнительной информации через WHOIS.]]>
    - 30005 - - 0 -
    - - core - public_usercp - cp_no_matches - There was no data returned from your search input, please try again - Ничего не найдено по вашему запросу. Вернитесь назад и попробуйте снова. - 30005 - - 0 - - - core - public_usercp - ipp_found - Your search returned (at least) the following number of matching posts: - Кол-во найденных по вашему запросу сообщений: - 30005 - - 0 - - - core - public_usercp - cp_find_submit - Find user - Найти пользователя - 30005 - - 0 - - - core - public_usercp - ip_desc_text - Resolve IP Address: This option will allow you to look up an IP address for more information (note, you must enter all 4 parts of the IP address to use this tool)
    Find Posts with this IP: This option will run a search for all posts associated with this IP address (limited to 500 results)
    Find members who registered with this IP: This tool will run a seach for all members who registered with the entered IP address]]>
    - Определение IP адреса: С помощью этой опции вы сможете узнать об IP адресе более подробные сведения (примечание, вы должны ввести все 4 части IP адреса для использования этого средства)
    Поиск сообщений с этим IP: Эта функция запустит поиск всех сообщений, отправленных с этого IP адреса (не более 500 сообщений)
    Поиск пользователей, зарегистрированных с этого IP: Эта функция запустит поиск всех пользователей, зарегистрированных с этого IP адреса]]>
    - 30005 - - 0 -
    - - core - public_usercp - ip_resolve - Resolve - Определение - 30005 - - 0 - - - core - public_usercp - ip_posts - Find Posts - Найти сообщения - 30005 - - 0 - - - core - public_usercp - ip_members - Find Members - Поиск пользователей - 30005 - - 0 - - - core - public_usercp - ipm_ip - IP Address - IP адрес - 30005 - - 0 - - - core - public_usercp - ipm_title - Member Search Results - Результаты поиска пользователей - 30005 - - 0 - - - core - public_usercp - ipm_name - Name - Имя - 30005 - - 0 - - - core - public_usercp - ipm_reg - Date Registered - Дата регистрации - 30005 - - 0 - - - core - public_usercp - ipm_options - Options - Опции - 30005 - - 0 - - - core - public_usercp - ipm_group - Group - Группа - 30005 - - 0 - - - core - public_usercp - ipm_posts - Posts - Сообщения - 30005 - - 0 - - - core - public_usercp - ipm_edit - Edit Member - Редактировать - 30005 - - 0 - - - core - public_usercp - menu_ipsearch - IP Address Look-up Tool - Определение IP адресов - 30005 - - 0 - - - core - public_usercp - menu_memsearch - Member Look-up Tool - Поиск пользователей - 30005 - - 0 - - - core - public_usercp - attach_title - Attachment - Файл - 30005 - - 0 - - - core - public_usercp - m_attach - Manage Attachments - Прикрепленные файлы - 30005 - - 0 - - - core - public_usercp - attach_date - Date - Дата - 30005 - - 0 - - - core - public_usercp - attach_topic - Topic - Тема - 30005 - - 0 - - - core - public_usercp - attach_hsize - Size - Размер - 30005 - - 0 - - - core - public_usercp - attach_delete - Delete Selected - Удалить выбранные - 30005 - - 0 - - - core - public_usercp - attach_space_count - - - 30005 - - 0 - - - core - public_usercp - attach_space_used - You have used %s of %s - Вами использовано %s из допустимых %s - 30005 - - 0 - - - core - public_usercp - attach_space_unl - You have used %s of global upload space. - Вы используете %s от общего дискового пространства. - 30005 - - 0 - - - core - public_usercp - m_ignore_users - Manage Ignored Users - Игнорируемые пользователи - 30005 - - 0 - - - core - public_usercp - mi5_title - Manage your ignored users - Управление списком игнорируемых пользователей - 30005 - - 0 - - - core - public_usercp - mi5_name - Name - Имя - 30005 - - 0 - - - core - public_usercp - pph_change - Change Photo - Изменить фотографию - 30005 - - 0 - - - core - public_usercp - pph_current - Currently Used Photo - Используемая фотография - 30005 - 30005 - 0 - - - core - public_usercp - pph_desc - This section will allow you to specify a photo to be used in your profile which is viewable by other board members. - Здесь вы можете загрузить фотографию, которая будет видна другим пользователям в вашем профиле. - 30005 - - 0 - - - core - public_usercp - pph_title - Your Personal Photo - Ваша фотография - 30005 - 30005 - 0 - - - core - public_usercp - av_as_desc - - Если ваше изображение слишком большое, оно будет автоматически уменьшено до нужных размеров. - 30005 - - 0 - - - core - public_usercp - av_autosize - Image Scale On - Масштабирование изображения - 30005 - - 0 - - - core - public_usercp - av_t_na - No avatar selected - Аватар не выбран - 30005 - - 0 - - - core - public_usercp - av_text_url - Your avatar must be no bigger than %s pixels by %s pixels in size. - Размер вашего аватара не должен превышать %s на %s пикселей. - 30005 - - 0 - - - core - public_usercp - av_t_gravatar - Gravatar - Gravatar - 30005 - - 0 - - - core - public_usercp - av_t_local - Gallery Avatar - Аватар галереи - 30005 - - 0 - - - core - public_usercp - av_t_url - Offsite File - Ссылка URL - 30005 - - 0 - - - core - public_usercp - av_t_upload - Uploaded File - Загруженный файл - 30005 - - 0 - - - core - public_usercp - av_allowed_files - %s]]> - %s]]> - 30005 - - 0 - - - core - public_usercp - av_text_upload - Uploaded avatars from your computer must be no larger than %s KB. - Загружаемый с компьютера аватар должен быть не более %s килобайт. - 30005 - - 0 - - - core - public_usercp - av_settings - Your Avatar Settings - Настройки аватара - 30005 - - 0 - - - core - public_usercp - av_current - Your Current Avatar - Текущий аватар - 30005 - - 0 - - - core - public_usercp - av_upload - Upload a new image from your computer - Загрузите аватар со своего компьютера - 30005 - - 0 - - - core - public_usercp - av_url - Enter a URL to an online avatar image - Введите ссылку на файл вашего аватара - 30005 - - 0 - - - core - public_usercp - av_go_gal - Choose an avatar from one of our galleries - Выберите аватар в одной из наших галерей - 30005 - - 0 - - - core - public_usercp - av_root - Base Gallery - Базовая галерея - 30005 - - 0 - - - core - public_usercp - ec_passy - Your Current Password - Текущий пароль - 30005 - - 0 - - - core - public_usercp - pph_max - ]]> - Объем всех фотографий не должен превышать %s килобайт. - 30005 - - 0 - - - core - public_usercp - pph_max2 - Photos must be no bigger than %s pixels by %s pixels. - Фотографии должны быть не больше %s на %s пикселей. - 30005 - 30005 - 0 - - - core - public_usercp - mi5_addem - Add a new user to your list - Добавить новых пользователей в список - 30005 - - 0 - - - core - public_usercp - mi5_remove - Remove + public_search + s_p_delete + Delete Posts Удалить - 30005 - + 31006 + 31006 0 core - public_usercp - mi5_posts - Posts - Сообщений - 30005 - + public_search + s_p_undelete + Restore Deleted Posts + Восстановить удаленные сообщения + 31006 + 31006 0 core - public_usercp - mi5_group - Group - Группа - 30005 - + public_search + s_p_approve + Set Visible (Approve Posts) + Опубликовать + 31006 + 31006 0 core - public_usercp - pph_as_desc - - Если ваше изображение слишком большое, оно будет автоматически уменьшено до нужных размеров. - 30005 - + public_search + s_msin_comments + Profile Comments + Комментарии к профилю + 31006 + 31006 0 core - public_usercp - pph_upload - Upload an image from your computer - Загрузить фотографию со своего компьютера - 30005 - + public_search + s_msin_members + Members + Пользователи + 31006 + 31006 0 core - public_usercp - pph_autosize - Image Scale On - Масштабирование изображения - 30005 - + public_search + s_search_sort_creation_date + Date Added + Дате добавления + 31006 + 31006 0 core - public_usercp - m_change_photo - Change Photo - Изменить фотографию - 30005 - + public_search + s_member_sin + Search In + Искать в + 31006 + 31006 0 core - public_usercp - forum_subs_none - You are not subscribed to any forums at present - В данный момент вы не подписаны ни на один из существующих форумов - 30005 - + public_search + s_participation_range + (Search limited from %s) + (учитываются публикации только с %s) + 31006 + 31006 0 core - public_usercp - f_none - -- - -- - 30005 - + public_search + s_participation_msg + There have been %s items by %s + %s публикаций создано %s + 31006 + 31006 0 core - public_usercp - forum_subs_header - Manage Watched Forums - Ваши подписки на форумы - 30005 - + public_search + s_participation_title + + Публикации %s + 31006 + 31006 0 core - public_usercp + public_search + no_search_app + + + 31006 + 31006 + 0 + + + core + public_search + new_content_since + since + начиная с + 31006 + 31006 + 0 + + + core + public_search + nosdeletereason + No reason given + Без причины + 31006 + 31006 + 0 + + + core + public_search + s_search_in + Search in + Искать в + 31006 + 31006 + 0 + + + core + public_search + topicdeletedyb + Topic deleted by + Тема удалена + 31006 + 31006 + 0 + + + core + public_search + viewallp_opt_dd + View all posts by %s + Все сообщения %s + 31006 + 31006 + 0 + + + core + public_search + viewallt_opt_dd + View all topics %s has started + Все темы %s + 31006 + 31006 + 0 + + + core + public_search + viewall_opt_dd + View all topics %s has posted in or started + Все темы в которых принимал участие %s + 31006 + 31006 + 0 + + + core + public_search + matchlabel + Match + Совпадение + 31006 + 31006 + 0 + + + core + public_search + sr_as_lastpost_string + Last post on %s by %s + Последнее сообщение %s от %s + 31006 + 31006 + 0 + + + core + public_search + searchresult_leftby + Left by + Отправил + 31006 + 31006 + 0 + + + core + public_search + new_posts_title + New content + Новые публикации + 31006 + 31006 + 0 + + + core + public_search + do_search + Search Now + Найти + 31006 + 31006 + 0 + + + core + public_search + filters + Search Options + Параметры + 31006 + 31006 + 0 + + + core + public_search in - In: - В: - 30005 - + in + в + 31006 + 31006 0 core - public_usercp - by - By: - От: - 30005 - - 0 - - - core - public_usercp - ft_posts - Replies - Ответов - 30005 - - 0 - - - core - public_usercp - ft_forum - Forum - Форум - 30005 - - 0 - - - core - public_usercp - subs_none - There are no subscriptions to show, try selecting a less restrictive date range - Вы не подписаны ни на одну тему. Выберите другой диапазон даты. - 30005 - - 0 - - - core - public_usercp - ft_topics - Topics - Тем - 30005 - - 0 - - - core - public_usercp - subs_all - the beginning - Все время - 30005 - - 0 - - - core - public_usercp - show_topics_from - Show topics from: - Показать темы за: - 30005 - - 0 - - - core - public_usercp - subs_day - Last %s days - Последние %s дней - 30005 - - 0 - - - core - public_usercp - subs_today - Last day - Последний день - 30005 - - 0 - - - core - public_usercp - ft_last_post - Last Post - Последнее сообщение - 30005 - - 0 - - - core - public_usercp - auto_prune - Note: Subscriptions are pruned if there is no reply to the topic after %s days - Примечание: подписка будет отменена, если в теме не будет ответов в течение %s дней - 30005 - - 0 - - - core - public_usercp - no_auto_prune - Subscription auto pruning is switched off at present - Автоотмена подписки выключена в данное время - 30005 - - 0 - - - core - public_usercp - pp_use_default - Use forum default - По умолчанию - 30005 - - 0 - - - core - public_usercp - m_sig_info - Change Signature - Изменить подпись - 30005 - - 0 - - - core - public_usercp - cp_current_sig - Your current Signature - Текущая подпись - 30005 - - 0 - - - core - public_usercp - lp_subject - Email address change at - Изменение e-mail адреса для - 30005 - 30005 - 0 - - - core - public_usercp - with_selected - with selected - от выбранных - 30005 - - 0 - - - core - public_usercp - subs_delete - Unsubscribe - Отписаться - 30005 - - 0 - - - core - public_usercp - m_avatar_info - Change Avatar - Изменить аватар - 30005 - - 0 - - - core - public_usercp - change_email_title - Change your registered email address - Изменение e-mail адреса - 30005 - 30005 - 0 - - - core - public_usercp - cp_edit_sig - Edit Signature - Изменение подписи - 30005 - - 0 - - - core - public_usercp - ce_current - Your current email address: ]]> - Ваш текущий e-mail адрес: ]]> - 30005 - 30005 - 0 - - - core - public_usercp - ce_new_email2 - Confirm the new email address - Повторите новый e-mail адрес - 30005 - 30005 - 0 - - - core - public_usercp - ce_new_email - Enter your new email address - Введите новый e-mail адрес - 30005 - 30005 - 0 - - - core - public_usercp - ce_auth -
    PLEASE NOTE: You will have to re-activate your account after changing your email address.
    An email will be sent to the email address you specify below, outlining what you need to do.

    Proceeding with this action will log you out. It is strongly recommended that you reset your password before changing your email address if you are unable to remember your password.]]>
    -
    ПРИМЕЧАНИЕ: После изменения e-mail адреса вы должны будете переактивировать вашу учетную запись.
    На ваш e-mail адрес будет отправлено письмо с подробными инструкциями о дальнейших действиях.

    Вы должны будете переавторизоваться. Настоятельно рекомендуем вам, перед изменением e-mail адреса, воспользоваться функцией восстановления пароля, если вы его не помните.]]>
    - 30005 - 30005 - 0 -
    - - core - public_usercp - pp_number_topics - topics to show for each forum page:]]> - Количество тем на страницу форума - 30005 - - 0 - - - core - public_usercp - pp_number_posts - posts to show for each topic page:]]> - Количество сообщений на страницу темы - 30005 - - 0 - - - core - public_usercp - ce_redirect - An email has been sent, redirecting to the activation screen - Письмо на e-mail отправлено. Сейчас вы перейдете на страницу активации - 30005 - 30005 - 0 - - - core - public_usercp - pass_change_text - You may change your password here. We will attempt to update your current session after your successful password change. If, however, you do experience difficulties, please try logging out and logging back in before contacting a staff member to help resolve the problem - Здесь вы можете изменить ваш пароль. После успешного изменения пароля, форум попытается обновить ваш сеанс. При возникновении каких-либо проблем, попробуйте переавторизоваться. Если ничего не получится, обратитесь к Администратору форума для разрешения проблемы. - 30005 - - 0 - - - core - public_usercp - note_pad_empty - You may store post snippets, or any other information you need to keep here - Здесь вы можете хранить отрывки сообщений или любую другую важную информацию - 30005 - - 0 - - - core - public_usercp - notes_saved_msg - Notes Saved - Заметки сохранены - 30005 - - 0 - - - core - public_usercp - width - Width - Высота - 30005 - - 0 - - - core - public_usercp - height - Height - Ширина - 30005 - - 0 - - - core - public_usercp - avatar_pre_title - Pre-installed avatars - Предустановленные аватары - 30005 - - 0 - - - core - public_usercp - no - No - Нет - 30005 - - 0 - - - core - public_usercp - yes - Yes - Да - 30005 - - 0 - - - core - public_usercp - privacy_settings - Privacy Settings - Настройки приватности - 30005 - - 0 - - - core - public_usercp - avatar_url_title - Your image avatars - Загрузка личного аватара - 30005 - - 0 - - - core - public_usercp - account_pass_title - Your Password - Новый пароль - 30005 - 30005 - 0 - - - core - public_usercp - account_pass_new2 - Please confirm your NEW password - Подтверждение нового пароля - 30005 - 30005 - 0 - - - core - public_usercp - subs_replies - Replies - Ответов - 30005 - - 0 - - - core - public_usercp - settings_viewimg - View images in posts, such as smilies and posted images? - Отображать картинки в сообщениях (например смайлики, изображения)? - 30005 - - 0 - - - core - public_usercp - hide_email_desc - Enabling this option will deny other members sending you an email via the board. - При включении этой функции, пользователи форума не смогут отправлять вам письма из форума. - 30005 - 30005 - 0 - - - core - public_usercp - hide_email - Hide my email address from other members - Скрыть мой e-mail адрес от других пользователей. - 30005 - 30005 - 0 - - - core - public_usercp - pm_reminder_desc - Enabling this option will send an email notification of any new personal messages sent to you. - При включении этой функции, вы будете уведомлены по e-mail каждый раз при получении нового личного сообщения. - 30005 - 30005 - 0 - - - core - public_usercp - pm_reminder - e-mail when I get a new personal message]]> - e-mail при получении новых личных сообщений.]]> - 30005 - - 0 - - - core - public_usercp - subs_view - Views - Просмотров - 30005 - - 0 - - - core - public_usercp - subs_start - Subscribed on - Подписан - 30005 - - 0 - - - core - public_usercp - subs_topic - Topic - Тема - 30005 - - 0 - - - core - public_usercp - settings_viewava - - Отображать аватары пользователей в темах? - 30005 - - 0 - - - core - public_usercp - board_prefs - View/Posting/Email Prefs - Настройки форума - 30005 - 30005 - 0 - - - core - public_usercp - subs_header - Current Subscriptions - Текущие подписки - 30005 - - 0 - - - core - public_usercp - t_title - Your control panel - Ваша панель управления - 30005 - - 0 - - - core - public_usercp - settings_dopopup - on the board when I get a new personal message]]> - форума при получении нового личного сообщения.]]> - 30005 - - 0 - - - core - public_usercp - email - Email Settings - Настройки E-mail - 30005 - 30005 - 0 - - - core - public_usercp - subs_last_post - Last Post - Последнее сообщение - 30005 - - 0 - - - core - public_usercp - settings_dopopup_desc - Enabling this option will alert you of a new personal message when you visit the board - При включении этой функции, вы будете уведомлены о получении нового личного сообщения при посещении форума. - 30005 - - 0 - - - core - public_usercp - send_full_msg - Include a copy of the post when emailing me from a watched topic - Добавлять копию сообщения из подписанных тем в отправляемое письмо-уведомление - 30005 - 30005 - 0 - - - core - public_usercp - settings_display - Board Display Settings - Настройки отображения форума - 30005 - - 0 - - - core - public_usercp - account_pass_old - Enter your CURRENT password - Текущий пароль - 30005 - 30005 - 0 - - - core - public_usercp - admin_send - Send me any updates sent by the board administrator - Сообщать мне обо всех изменениях, проводимых администратором форума. - 30005 - 30005 - 0 - - - core - public_usercp - send_full_msg_desc - Enabling this option will send a plain text version of the post in the watched topic email. - При включении этой функции, копия нового сообщения, в простом текстовом формате, будет выслана вам на e-mail. - 30005 - 30005 - 0 - - - core - public_usercp - subs_title - Manage Watched Topics - Ваши подписки на темы - 30005 - - 0 - - - core - public_usercp - subs_by - By: - Автор: - 30005 - - 0 - - - core - public_usercp - settings_time - Time Zone - Часовой пояс - 30005 - - 0 - - - core - public_usercp - account_pass_new - Enter your NEW password - Введите ваш НОВЫЙ пароль - 30005 - 30005 - 0 - - - core - public_usercp - settings_viewsig - - Отображать подписи пользователей в темах? - 30005 - - 0 - - - core - public_usercp - admin_send_desc - Enabling this option will add your email address to the administrators mail list and you will receive any updates sent. - При включении этой функции, ваш e-mail адрес будет добавлен к списку e-mail адресов администратора и вы, всякий раз будете уведомлены по e-mail, о любых изменениях на форуме. - 30005 - 30005 - 0 - - - core - public_usercp - ucp_general_settings - General Settings - Общие настройки - 30005 - - 0 - - - core - public_usercp - ucp_change_email - Change Email Address - Изменение E-mail адреса - 30005 - 30005 + public_search + show_results_in + Show results for: + Показать результаты за: + 31006 + 31006 0 @@ -16501,488 +14943,3708 @@ Report: ucp_title Your Options Настройки - 30005 - + 31006 + 31006 0 core public_usercp - ucp_change_name - Change Display Name - Изменение имени пользователя - 30005 - + admin_send_desc + Enabling this option will add your email address to the administrators mail list and you will receive any updates sent. + При включении этой функции, ваш e-mail адрес будет добавлен к списку e-mail адресов администратора и вы, всякий раз будете уведомлены по e-mail, о любых изменениях на форуме. + 31006 + 31006 0 core public_usercp - ucp_change_password - Change Password - Изменение пароля - 30005 - + admin_send + Send me any updates sent by the board administrator + Сообщать мне обо всех изменениях, проводимых администратором форума. + 31006 + 31006 0 core public_usercp - time_-12 - (GMT - 12:00 hours) Enitwetok, Kwajalien - (GMT - 12:00) Эневеток, Кваджалейн - 30005 - + account_pass_old + Enter your CURRENT password + Текущий пароль + 31006 + 31006 0 core public_usercp - ok_email_changed - - Ваш e-mail адрес обновлен. Помните, что с этого момента вам необходимо входить в систему с вашим новым e-mail адресом. - 30005 - 30005 + subs_by + By: + Автор: + 31006 + 31006 0 core public_usercp - time_5.5 - (GMT + 5:30 hours) Bombay, Calcutta, Madras, New Delhi - (GMT + 5:30) Бомбей, Калькутта, Мадрас, Нью-Дели - 30005 - + subs_title + Manage Watched Topics + Ваши подписки на темы + 31006 + 31006 0 core public_usercp - time_5.75 - (GMT + 5:45 hours) Kathmandu - (GMT + 5:45) Катманду - 30005 - + settings_time + Time Zone + Часовой пояс + 31006 + 31006 0 core public_usercp - time_6 - (GMT + 6:00 hours) Almaty, Bangladesh, Dhakra - (GMT + 6:00) Алма-Ата, Коломбо, Дхака, Новосибирск, Омск - 30005 - + settings_viewsig + + Отображать подписи пользователей в темах? + 31006 + 31006 0 core public_usercp - time_4.5 - (GMT + 4:30 hours) Kabul - (GMT + 4:30) Кабул - 30005 - + account_pass_new + Enter your NEW password + Введите ваш НОВЫЙ пароль + 31006 + 31006 0 core public_usercp - time_5 - (GMT + 5:00 hours) Ekaterinburg, Karachi, Tashkent - (GMT + 5:00) Екатеринбург, Исламабад, Карачи, Ташкент - 30005 - + send_full_msg_desc + Enabling this option will send a plain text version of the post in the watched topic email. + При включении этой функции, копия нового сообщения, в простом текстовом формате, будет выслана вам на e-mail. + 31006 + 31006 0 core public_usercp - time_4 - (GMT + 4:00 hours) Abu Dhabi, Baku, Muscat, Tbilisi - (GMT + 4:00) Абу-Даби, Баку, Мускат, Тбилиси - 30005 - + send_full_msg + Include a copy of the post when emailing me from a watched topic + Добавлять копию сообщения из подписанных тем в отправляемое письмо-уведомление + 31006 + 31006 0 core public_usercp - time_3.5 - (GMT + 3:30 hours) Tehran - (GMT + 3:30) Тегеран - 30005 - + email + Email Settings + Настройки E-mail + 31006 + 31006 0 core public_usercp - time_3 - (GMT + 3:00 hours) Baghdad, Riyadh, Moscow, Nairobi - (GMT + 3:00) Багдад, Эр-Рияд, Москва, Найроби - 30005 - + settings_display + Board Display Settings + Настройки отображения форума + 31006 + 31006 0 core public_usercp - time_2 - (GMT + 2:00 hours) Kaliningrad, South Africa - (GMT + 2:00) Каир, Хельсинки, Калининград, Южная Африка, Варшава - 30005 - + subs_view + Views + Просмотров + 31006 + 31006 0 core public_usercp - time_-1 - (GMT - 1:00 hours) Azores, Cape Verde Islands - (GMT - 1:00) Азорские о-ва, о-ва Зеленого мыса - 30005 - + subs_last_post + Last Post + Последнее сообщение + 31006 + 31006 0 core public_usercp - time_0 - (GMT) Casablanca, Dublin, London, Lisbon, Monrovia - (GMT) Касабланка, Дублин, Эдинбург, Лиссабон, Лондон, Монровия - 30005 - + subs_start + Subscribed on + Подписан + 31006 + 31006 0 core public_usercp - time_1 - (GMT + 1:00 hours) Brussels, Copenhagen, Madrid, Paris - (GMT + 1:00) Амстердам, Берлин, Брюссель, Мадрид, Париж, Рим - 30005 - + settings_viewava + + Отображать аватары пользователей в темах? + 31006 + 31006 0 core public_usercp - time_-2 - (GMT - 2:00 hours) Mid-Atlantic, Ascention Is., St Helena - (GMT - 2:00) Среднеатлантическое время - 30005 - + subs_topic + Topic + Тема + 31006 + 31006 0 core public_usercp - time_-3.5 - (GMT - 3:30 hours) Newfoundland - (GMT - 3:30) Ньюфаундленд - 30005 - + rboard_prefs + Board Preferences + Настройки + 31006 + 31006 0 core public_usercp - time_-3 - (GMT - 3:00 hours) Brazil, Buenos Aires, Falkland Is. - (GMT - 3:00) Бразилия, Буэнос-Айрес, Джорджтаун, Гренландия - 30005 - + board_prefs + Notification Preferences + Настройки форума + 31006 + 31006 0 core public_usercp - time_-4 - (GMT - 4:00 hours) Atlantic Time (Canada), Caracas, La Paz - (GMT - 4:00) Атлантическое время (Канада), Каракас, Ла Пас, Сантьяго - 30005 - + subs_header + Current Subscriptions + Текущие подписки + 31006 + 31006 0 core public_usercp - time_-4.5 - (GMT - 4:30 hours) Bolivarian Time - (GMT - 4:30) Боливарианское время - 30005 - + t_title + Your control panel + Ваша панель управления + 31006 + 31006 0 core public_usercp - time_-5 - - (GMT - 5:00) Восточное время (США и Канада), Богота, Лима, Кито - 30005 - + settings_viewimg + View images in posts, such as smilies and posted images? + Отображать картинки в сообщениях (например, смайлики, изображения)? + 31006 + 31006 0 core public_usercp - time_-7 - - (GMT - 7:00) Горное время (США и Канада), Аризона - 30005 - + account_pass_title + Your Password + Новый пароль + 31006 + 31006 0 core public_usercp - time_-6 - - (GMT - 6:00) Центральное время (США и Канада), Мехико - 30005 - + account_pass_new2 + Please confirm your NEW password + Подтверждение нового пароля + 31006 + 31006 0 core public_usercp - time_-8 - - (GMT - 8:00) Тихоокеанское время (США и Канада), Тихуана - 30005 - + hide_email_desc + Enabling this option will deny other members sending you an email via the board. + При включении этой функции, пользователи форума не смогут отправлять вам письма из форума. + 31006 + 31006 0 core public_usercp - time_-9.5 - (GMT - 9:30 hours) French Polynesia - (GMT - 9:30) Французская Полинезия - 30005 - + avatar_url_title + Your image avatars + Загрузка личного аватара + 31006 + 31006 0 core public_usercp - time_-9 - (GMT - 9:00 hours) Alaska - (GMT - 9:00) Аляска - 30005 - + hide_email + Hide my email address from other members + Скрыть мой e-mail адрес от других пользователей. + 31006 + 31006 0 core public_usercp - time_-10 - (GMT - 10:00 hours) Hawaii - (GMT - 10:00) Гавайи - 30005 - + subs_replies + Replies + Ответов + 31006 + 31006 0 core public_usercp - time_-11 - (GMT - 11:00 hours) Midway Island, Samoa - (GMT - 11:00) о.Мидуэй, Самоа - 30005 - + yes + Yes + Да + 31006 + 31006 0 core public_usercp - time_6.5 - (GMT + 6:30 hours) Yangon, Naypyidaw, Bantam - (GMT + 6:30) Янгон, Найпьидо, Бантам - 30005 - + privacy_settings + Privacy Settings + Настройки приватности + 31006 + 31006 0 core public_usercp - time_7 - (GMT + 7:00 hours) Bangkok, Hanoi, Jakarta - (GMT + 7:00) Бангкок, Ханой, Джакарта, Красноярск - 30005 - + height + Height + Ширина + 31006 + 31006 0 core public_usercp - time_8.75 - (GMT + 8:45 hours) Caiguna, Eucla - (GMT + 8:45) Кейгуна, Юкла - 30005 - + avatar_pre_title + Pre-installed avatars + Предустановленные аватары + 31006 + 31006 0 core public_usercp - time_8 - (GMT + 8:00 hours) Hong Kong, Perth, Singapore, Taipei - (GMT + 8:00) Пекин, Гонконг, Перт, Сингапур, Тайпей - 30005 - + no + No + Нет + 31006 + 31006 0 core public_usercp - time_9.5 - (GMT + 9:30 hours) Adelaide, Darwin - (GMT + 9:30) Аделаида, Дарвин - 30005 - + notes_saved_msg + Notes Saved + Заметки сохранены + 31006 + 31006 0 core public_usercp - time_9 - (GMT + 9:00 hours) Osaka, Sapporo, Seoul, Tokyo, Yakutsk - (GMT + 9:00) Осака, Саппоро, Сеул, Токио, Якутск - 30005 - + pass_change_text + You may change your password here. We will attempt to update your current session after your successful password change. If, however, you do experience difficulties, please try logging out and logging back in before contacting a staff member to help resolve the problem + Здесь вы можете изменить ваш пароль. После успешного изменения пароля, форум попытается обновить ваш сеанс. При возникновении каких-либо проблем, попробуйте переавторизоваться. Если ничего не получится, обратитесь к Администратору форума для разрешения проблемы. + 31006 + 31006 0 core public_usercp - time_10 - (GMT + 10:00 hours) Melbourne, Papua New Guinea, Sydney - (GMT + 10:00) Канберра, Мельбурн, Гуам, Сидней, Владивосток - 30005 - + width + Width + Высота + 31006 + 31006 0 core public_usercp - time_10.5 - (GMT + 10:30 hours) Lord Howe Island - (GMT + 10:30) Остров Лорд-Хау - 30005 - + note_pad_empty + You may store post snippets, or any other information you need to keep here + Здесь вы можете хранить отрывки сообщений или любую другую важную информацию + 31006 + 31006 0 core public_usercp - time_11 - (GMT + 11:00 hours) Magadan, New Caledonia, Solomon Is. - (GMT + 11:00) Магадан, Новая Каледония, Соломоновы о-ва - 30005 - + ce_current + Your current email address: ]]> + Ваш текущий e-mail адрес: ]]> + 31006 + 31006 0 core public_usercp - time_11.5 - (GMT + 11:30 hours) Burnt Pine, Kingston - (GMT + 11:30) Бернт Пайн, Кингстон - 30005 - + ce_auth +
    PLEASE NOTE: You will have to re-activate your account after changing your email address.
    An email will be sent to the email address you specify below, outlining what you need to do.

    Proceeding with this action will log you out. It is strongly recommended that you reset your password before changing your email address if you are unable to remember your password.]]>
    +
    ПРИМЕЧАНИЕ: После изменения e-mail адреса вы должны будете переактивировать вашу учетную запись.
    На ваш e-mail адрес будет отправлено письмо с подробными инструкциями о дальнейших действиях.

    Вы должны будете переавторизоваться. Настоятельно рекомендуем вам, перед изменением e-mail адреса, воспользоваться функцией восстановления пароля, если вы его не помните.]]>
    + 31006 + 31006 0
    core public_usercp - time_12 - (GMT + 12:00 hours) Auckland, Fiji, Marshall Islands - (GMT + 12:00) Окленд, Фиджи, Камчатка, Веллингтон, Маршалловы острова - 30005 - + ce_redirect + An email has been sent, redirecting to the activation screen + Письмо на e-mail отправлено. Сейчас вы перейдете на страницу активации + 31006 + 31006 0 core public_usercp - time_12.75 - (GMT + 12:45 hours) Chatham Islands - (GMT + 12:45) Острова Чатем - 30005 - + ce_new_email2 + Confirm the new email address + Повторите новый e-mail адрес + 31006 + 31006 0 core public_usercp - ucp__settings_saved - Settings Saved - Настройки сохранены - 30005 - + ce_new_email + Enter your new email address + Введите новый e-mail адрес + 31006 + 31006 0 core public_usercp - time_14 - (GMT + 14:00 hours) Kiritimati - (GMT + 14:00) Киритимати (остров Рождества) - 30005 - 30005 + change_email_title + Change your registered email address + Изменение e-mail адреса + 31006 + 31006 0 core public_usercp - time_13 - (GMT + 13:00 hours) Kamchatka, Anadyr - (GMT + 13:00) Камчатка, Анадырь - 30005 - 30005 + with_selected + with selected + от выбранных + 31006 + 31006 0 core public_usercp - ucp__save_changes - Save Changes - Сохранить - 30005 - 30005 + cp_current_sig + Your current Signature + Текущая подпись + 31006 + 31006 0 core public_usercp - tab__forums + cp_edit_sig + Edit Signature + Изменение подписи + 31006 + 31006 + 0 + + + core + public_usercp + subs_delete + Unsubscribe + Отписаться + 31006 + 31006 + 0 + + + core + public_usercp + m_sig_info + Change Signature + Изменить подпись + 31006 + 31006 + 0 + + + core + public_usercp + m_avatar_info + Change Avatar + Изменить аватар + 31006 + 31006 + 0 + + + core + public_usercp + lp_subject + Email address change at + Изменение e-mail адреса для + 31006 + 31006 + 0 + + + core + public_usercp + pp_use_default + Use forum default + По умолчанию + 31006 + 31006 + 0 + + + core + public_usercp + pp_number_topics + topics to show for each forum page:]]> + Количество тем на страницу форума + 31006 + 31006 + 0 + + + core + public_usercp + pp_number_posts + posts to show for each topic page:]]> + Количество сообщений на страницу темы + 31006 + 31006 + 0 + + + core + public_usercp + no_auto_prune + Subscription auto pruning is switched off at present + Автоотмена подписки выключена в данное время + 31006 + 31006 + 0 + + + core + public_usercp + auto_prune + Note: Subscriptions are pruned if there is no reply to the topic after %s days + Примечание: подписка будет отменена, если в теме не будет ответов в течение %s дней + 31006 + 31006 + 0 + + + core + public_usercp + subs_none + There are no subscriptions to show, try selecting a less restrictive date range + Вы не подписаны ни на одну тему. Выберите другой диапазон даты. + 31006 + 31006 + 0 + + + core + public_usercp + subs_all + the beginning + Все время + 31006 + 31006 + 0 + + + core + public_usercp + show_topics_from + Show topics from: + Показать темы за: + 31006 + 31006 + 0 + + + core + public_usercp + ft_posts + Replies + Ответов + 31006 + 31006 + 0 + + + core + public_usercp + ft_topics + Topics + Тем + 31006 + 31006 + 0 + + + core + public_usercp + ft_last_post + Last Post + Последнее сообщение + 31006 + 31006 + 0 + + + core + public_usercp + subs_today + Last day + Последний день + 31006 + 31006 + 0 + + + core + public_usercp + subs_day + Last %s days + Последние %s дней + 31006 + 31006 + 0 + + + core + public_usercp + by + By: + От: + 31006 + 31006 + 0 + + + core + public_usercp + ft_forum + Forum + Форум + 31006 + 31006 + 0 + + + core + public_usercp + in + In: + В: + 31006 + 31006 + 0 + + + core + public_usercp + forum_subs_none + You are not subscribed to any forums at present + В данный момент вы не подписаны ни на один из существующих форумов + 31006 + 31006 + 0 + + + core + public_usercp + f_none + -- + -- + 31006 + 31006 + 0 + + + core + public_usercp + forum_subs_header + Manage Watched Forums + Ваши подписки на форумы + 31006 + 31006 + 0 + + + core + public_usercp + pph_change + Change Photo + Изменить фотографию + 31006 + 31006 + 0 + + + core + public_usercp + pph_upload + Upload an image from your computer + Загрузить фотографию со своего компьютера + 31006 + 31006 + 0 + + + core + public_usercp + pph_autosize + Image Scale On + Масштабирование изображения + 31006 + 31006 + 0 + + + core + public_usercp + pph_as_desc + + Если ваше изображение слишком большое, оно будет автоматически уменьшено до нужных размеров. + 31006 + 31006 + 0 + + + core + public_usercp + m_change_photo + Change Photo + Изменить фотографию + 31006 + 31006 + 0 + + + core + public_usercp + pph_current + Currently Used Photo + Используемая фотография + 31006 + 31006 + 0 + + + core + public_usercp + pph_desc + This section will allow you to specify a photo to be used in your profile which is viewable by other board members. + Здесь вы можете загрузить фотографию, которая будет видна другим пользователям в вашем профиле. + 31006 + 31006 + 0 + + + core + public_usercp + pph_title + Your Personal Photo + Ваша фотография + 31006 + 31006 + 0 + + + core + public_usercp + av_autosize + Image Scale On + Масштабирование изображения + 31006 + 31006 + 0 + + + core + public_usercp + av_as_desc + + Если ваше изображение слишком большое, оно будет автоматически уменьшено до нужных размеров. + 31006 + 31006 + 0 + + + core + public_usercp + av_text_url + Your avatar must be no bigger than %s pixels by %s pixels in size. + Размер вашего аватара не должен превышать %s на %s пикселей. + 31006 + 31006 + 0 + + + core + public_usercp + av_t_gravatar + Gravatar + Gravatar + 31006 + 31006 + 0 + + + core + public_usercp + av_t_na + No avatar selected + Аватар не выбран + 31006 + 31006 + 0 + + + core + public_usercp + av_t_url + Offsite File + Ссылка URL + 31006 + 31006 + 0 + + + core + public_usercp + av_t_local + Gallery Avatar + Аватар галереи + 31006 + 31006 + 0 + + + core + public_usercp + av_allowed_files + %s]]> + %s]]> + 31006 + 31006 + 0 + + + core + public_usercp + av_t_upload + Uploaded File + Загруженный файл + 31006 + 31006 + 0 + + + core + public_usercp + av_current + Your Current Avatar + Текущий аватар + 31006 + 31006 + 0 + + + core + public_usercp + av_settings + Your Avatar Settings + Настройки аватара + 31006 + 31006 + 0 + + + core + public_usercp + av_text_upload + Uploaded avatars from your computer must be no larger than %s KB. + Загружаемый с компьютера аватар должен быть не более %s килобайт. + 31006 + 31006 + 0 + + + core + public_usercp + av_url + Enter a URL to an online avatar image + Введите ссылку на файл вашего аватара + 31006 + 31006 + 0 + + + core + public_usercp + av_upload + Upload a new image from your computer + Загрузите аватар со своего компьютера + 31006 + 31006 + 0 + + + core + public_usercp + av_go_gal + Choose an avatar from one of our galleries + Выберите аватар в одной из наших галерей + 31006 + 31006 + 0 + + + core + public_usercp + pph_max + ]]> + Объем всех фотографий не должен превышать %s килобайт. + 31006 + 31006 + 0 + + + core + public_usercp + ec_passy + Your Current Password + Текущий пароль + 31006 + 31006 + 0 + + + core + public_usercp + av_root + Base Gallery + Базовая галерея + 31006 + 31006 + 0 + + + core + public_usercp + mi5_posts + Posts + Сообщений + 31006 + 31006 + 0 + + + core + public_usercp + mi5_remove + Remove + Удалить + 31006 + 31006 + 0 + + + core + public_usercp + mi5_addem + Add a new user to your list + Добавить новых пользователей в список + 31006 + 31006 + 0 + + + core + public_usercp + pph_max2 + Photos must be no bigger than %s pixels by %s pixels. + Фотографии должны быть не больше %s на %s пикселей. + 31006 + 31006 + 0 + + + core + public_usercp + mi5_name + Name + Имя + 31006 + 31006 + 0 + + + core + public_usercp + mi5_group + Group + Группа + 31006 + 31006 + 0 + + + core + public_usercp + m_ignore_users + Manage Ignored Users + Игнорируемые пользователи + 31006 + 31006 + 0 + + + core + public_usercp + mi5_title + Manage your ignored users + Управление списком игнорируемых пользователей + 31006 + 31006 + 0 + + + core + public_usercp + attach_space_used + You have used %s of %s + Вами использовано %s из допустимых %s + 31006 + 31006 + 0 + + + core + public_usercp + attach_space_unl + You have used %s of global upload space. + Вы используете %s от общего дискового пространства. + 31006 + 31006 + 0 + + + core + public_usercp + attach_delete + Delete Selected + Удалить выбранные + 31006 + 31006 + 0 + + + core + public_usercp + attach_space_count + + + 31006 + 31006 + 0 + + + core + public_usercp + attach_topic + Topic + Тема + 31006 + 31006 + 0 + + + core + public_usercp + attach_date + Date + Дата + 31006 + 31006 + 0 + + + core + public_usercp + attach_hsize + Size + Размер + 31006 + 31006 + 0 + + + core + public_usercp + attach_title + Attachment + Файл + 31006 + 31006 + 0 + + + core + public_usercp + menu_memsearch + Member Look-up Tool + Поиск пользователей + 31006 + 31006 + 0 + + + core + public_usercp + m_attach + Manage Attachments + Прикрепленные файлы + 31006 + 31006 + 0 + + + core + public_usercp + menu_ipsearch + IP Address Look-up Tool + Определение IP адресов + 31006 + 31006 + 0 + + + core + public_usercp + ipm_edit + Edit Member + Редактировать + 31006 + 31006 + 0 + + + core + public_usercp + ipm_group + Group + Группа + 31006 + 31006 + 0 + + + core + public_usercp + ipm_reg + Date Registered + Дата регистрации + 31006 + 31006 + 0 + + + core + public_usercp + ipm_options + Options + Опции + 31006 + 31006 + 0 + + + core + public_usercp + ipm_posts + Posts + Сообщения + 31006 + 31006 + 0 + + + core + public_usercp + ipm_name + Name + Имя + 31006 + 31006 + 0 + + + core + public_usercp + ipm_ip + IP Address + IP адрес + 31006 + 31006 + 0 + + + core + public_usercp + ipm_title + Member Search Results + Результаты поиска пользователей + 31006 + 31006 + 0 + + + core + public_usercp + cp_no_matches + There was no data returned from your search input, please try again + Ничего не найдено по вашему запросу. Вернитесь назад и попробуйте снова. + 31006 + 31006 + 0 + + + core + public_usercp + ip_resolve + Resolve + Определение + 31006 + 31006 + 0 + + + core + public_usercp + ip_posts + Find Posts + Найти сообщения + 31006 + 31006 + 0 + + + core + public_usercp + ip_members + Find Members + Поиск пользователей + 31006 + 31006 + 0 + + + core + public_usercp + ip_resolve_result + %s

    Try visiting nic.com to get more information by running this match via WHOIS.]]>
    + %s

    Можете посетить nic.com для получения дополнительной информации через WHOIS.]]>
    + 31006 + 31006 + 0 +
    + + core + public_usercp + ip_submit + Run Tool + Начать поиск + 31006 + 31006 + 0 + + + core + public_usercp + ip_enter + Enter the IP address]]> + Введите IP адрес]]> + 31006 + 31006 + 0 + + + core + public_usercp + ip_warn_text + Please Note: You may enter a wildcard '*' (without quotes) as the last part of the IP address.
    For example, 127.*.*.* will match all IP address that start with 127.
    127.1.0.* will match all IP addresses that start with 127.1.0.
    An error will occur if you attempt to use a wildcard in the middle of the IP address. For example, 127.*.0.1 will return an error.]]>
    + Примечание: Вы можете использовать маску '*' (без кавычек) вместо последних частей IP адреса.
    Пример: При использовании 127.*.*.* будут найдены все IP адреса, начинающиеся с 127.
    При использовании 127.1.0.* будут найдены все IP адреса, начинающиеся с 127.1.0.
    При использовании маски в середине IP адреса, произойдет ошибка и вы получите сообщение об ошибке. Пример. Использование 127.*.0.1 выдаст ошибку.]]>
    + 31006 + 31006 + 0 +
    + + core + public_usercp + cp_find_submit + Find user + Найти пользователя + 31006 + 31006 + 0 + + + core + public_usercp + ipp_found + Your search returned (at least) the following number of matching posts: + Кол-во найденных по вашему запросу сообщений: + 31006 + 31006 + 0 + + + core + public_usercp + ip_desc_text + Resolve IP Address: This option will allow you to look up an IP address for more information (note, you must enter all 4 parts of the IP address to use this tool)
    Find Posts with this IP: This option will run a search for all posts associated with this IP address (limited to 500 results)
    Find members who registered with this IP: This tool will run a seach for all members who registered with the entered IP address]]>
    + Определение IP адреса: С помощью этой опции вы сможете узнать об IP адресе более подробные сведения (примечание, вы должны ввести все 4 части IP адреса для использования этого средства)
    Поиск сообщений с этим IP: Эта функция запустит поиск всех сообщений, отправленных с этого IP адреса (не более 500 сообщений)
    Поиск пользователей, зарегистрированных с этого IP: Эта функция запустит поиск всех пользователей, зарегистрированных с этого IP адреса]]>
    + 31006 + 31006 + 0 +
    + + core + public_usercp + announce_page_allforums + All Forums + Все форумы + 31006 + 31006 + 0 + + + core + public_usercp + announce_form_enable + Enable this announcement + Опубликовать объявление + 31006 + 31006 + 0 + + + core + public_usercp + menu_announcements + Manage Announcements + Объявления + 31006 + 31006 + 0 + + + core + public_usercp + cp_edit_user + Member Look-up + Поиск пользователя + 31006 + 31006 + 0 + + + core + public_usercp + cp_find_user + Enter part, or all of the username you wish to edit + Введите часть или полное имя пользователя + 31006 + 31006 + 0 + + + core + public_usercp + announce_form_forums2 + You may choose more than one + Можете выбрать несколько форумов + 31006 + 31006 + 0 + + + core + public_usercp + announce_form_allforums + -- All Forums -- + -- Все форумы -- + 31006 + 31006 + 0 + + + core + public_usercp + announce_use_html + Enable HTML? + Включить HTML? + 31006 + 31006 + 0 + + + core + public_usercp + announce_use_nlbr + Parse newlines (if HTML enabled)? + Включить обработку новых строк (если HTML включен)? + 31006 + 31006 + 0 + + + core + public_usercp + announce_form_options + Options + Опции + 31006 + 31006 + 0 + + + core + public_usercp + announce_form_startdesc + Leave blank to not use a start date + Не заполняйте, если не хотите использовать дату начала + 31006 + 31006 + 0 + + + core + public_usercp + announce_form_enddesc + Leave blank to not use an end date + Не заполняйте, если не хотите использовать дату завершения + 31006 + 31006 + 0 + + + core + public_usercp + announce_form_forums + Activate in Forums + Показывать в форумах + 31006 + 31006 + 0 + + + core + public_usercp + announce_form_start + Start Date (MM-DD-YYYY) + Дата начала (ДД.ММ.ГГГГ) + 31006 + 31006 + 0 + + + core + public_usercp + announce_form_end + End Date (MM-DD-YYYY) + Дата завершения (ДД.ММ.ГГГГ) + 31006 + 31006 + 0 + + + core + public_usercp + announce_form_title + Announcement Title + Заголовок объявления + 31006 + 31006 + 0 + + + core + public_usercp + announce_none + There are no announcements + Нет ни одного объявления + 31006 + 31006 + 0 + + + core + public_usercp + announce_button_edit + Edit Announcement + Отредактировать объявление + 31006 + 31006 + 0 + + + core + public_usercp + announce_current + Current Announcements + Текущие объявления + 31006 + 31006 + 0 + + + core + public_usercp + announce_add + Add Announcement + Создание объявления + 31006 + 31006 + 0 + + + core + public_usercp + announce_starts + Starts + Начало + 31006 + 31006 + 0 + + + core + public_usercp + announce_forums Forums Форумы - 30006 - 30006 + 31006 + 31006 0 core public_usercp - tab__members - Profile - Профиль - 30006 - 30006 + announce_end + Ends + Окончание + 31006 + 31006 0 core public_usercp - tab__core - Settings - Настройки - 30006 - 30006 + announce_title + Title + Заголовок + 31006 + 31006 + 0 + + + core + public_usercp + announce_author + Author + Автор + 31006 + 31006 + 0 + + + core + public_usercp + announce_error_forums + You must choose at least one forum for this announcement. + Вы должны выбрать хотя бы один форум для этого объявления. + 31006 + 31006 + 0 + + + core + public_usercp + announce_error_title + You must enter a title and content for this announcement. + Вы должны ввести заголовок и текст объявления. + 31006 + 31006 + 0 + + + core + public_usercp + announce_error_date + The start or end date is not a real date, please check the dates entered. + Дата начала или завершения указана в неправильном формате. Проверьте введенные данные. + 31006 + 31006 + 0 + + + core + public_usercp + announce_del1 + Are you sure you wish to delete this announcement? + Вы действительно хотите удалить это объявление? + 31006 + 31006 + 0 + + + core + public_usercp + announce_del2 + Ok, no action taken! + Действие отменено! + 31006 + 31006 + 0 + + + core + public_usercp + subs_c_change + Change to: + Изменить на: + 31006 + 31006 + 0 + + + core + public_usercp + announce_page_disabled + (Not Active) + (Отключено) + 31006 + 31006 + 0 + + + core + public_usercp + subs_submit + Proceed + Выполнить действие + 31006 + 31006 + 0 + + + core + public_usercp + subsf_none_title + No Notification + Не уведомлять + 31006 + 31006 + 0 + + + core + public_usercp + subsf_none_desc + This option will not send out any notification but will retain the forum in your subscriptions panel. + При выборе этой опции вы не будете получать никаких уведомлений на e-mail, но все новые и обновленные форумы будут сохранены на вашей личной странице подписок. + 31006 + 31006 + 0 + + + core + public_usercp + subsf_weekly_desc + This option will send out a weekly digest showing all new topics and all updated topics for the week + При выборе этой опции вы будете еженедельно получать краткое уведомление обо всех новых темах и сообщениях за текущую неделю. + 31006 + 31006 + 0 + + + core + public_usercp + subsf_weekly + Weekly Digest + Еженедельное уведомление + 31006 + 31006 + 0 + + + core + public_usercp + subsf_daily + Daily Digest + Ежедневное уведомление + 31006 + 31006 + 0 + + + core + public_usercp + subsf_daily_desc + This option will send out a daily digest showing all new topics and all updated topics for the day + При выборе этой опции вы будете ежедневно получать краткое уведомление обо всех новых темах и сообщениях за текущий день. + 31006 + 31006 + 0 + + + core + public_usercp + subsf_immediate_desc + This option will send out a notification immediately after a new topic has been made, regardless of your activity. + При выборе этой опции вы будете уведомлены о новых темах , независимо от того, присутствуете ли вы или отсутствуете на форуме. + 31006 + 31006 + 0 + + + core + public_usercp + subsf_immediate + Immediate Notification + Немедленное уведомление + 31006 + 31006 + 0 + + + core + public_usercp + subsf_delayed_desc + + При выборе этой опции вы будете уведомлены о новых темах во время своего отсутствия на форуме. + 31006 + 31006 + 0 + + + core + public_usercp + subsf_delayed + Delayed Notification + Уведомление с задержкой + 31006 + 31006 + 0 + + + core + public_usercp + subsf_exp_text + You will receive a notification when a new topic is posted in a forum you are subscribed to. Digests will also include updated topics.]]> + При подписке на форум вы будете уведомлены обо всех новых темах в этом форуме, а при подписке на тему получите уведомления уже о всех новых сообщениях в этой теме.]]> + 31006 + 31006 + 0 + + + core + public_usercp + subs_none_title + No Notification + Не уведомлять + 31006 + 31006 + 0 + + + core + public_usercp + subs_none_desc + This option will not send out any notifications, but will retain the topic in your subscriptions panel. + При выборе этой опции вы не будете получать никаких уведомлений на e-mail, но все новые и обновленные темы будут сохранены на вашей личной странице подписок. + 31006 + 31006 + 0 + + + core + public_usercp + subs_weekly + Weekly Digest + Еженедельное уведомление + 31006 + 31006 + 0 + + + core + public_usercp + subs_weekly_desc + This option will send out a weekly digest showing all new replies for the week + При выборе этой опции вы будете еженедельно получать краткое уведомление обо всех новых сообщениях за текущую неделю. + 31006 + 31006 + 0 + + + core + public_usercp + subs_daily_desc + This option will send out a daily digest showing all new replies for the day + При выборе этой опции вы будете ежедневно получать краткое уведомление обо всех новых темах и сообщениях за текущий день. + 31006 + 31006 + 0 + + + core + public_usercp + subs_daily + Daily Digest + Ежедневное уведомление + 31006 + 31006 + 0 + + + core + public_usercp + subs_immediate + Immediate Notification + Немедленное уведомление + 31006 + 31006 + 0 + + + core + public_usercp + subs_immediate_desc + This option will send out a notification immediately after a reply has been made, regardless of your activity. + При выборе этой опции вы будете уведомлены о новых темах или ответах, независимо от того, присутствуете ли вы или отсутствуете на форуме. + 31006 + 31006 + 0 + + + core + public_usercp + subs_delayed + Delayed Notification + Уведомление с задержкой + 31006 + 31006 + 0 + + + core + public_usercp + subs_delayed_desc + + При выборе этой опции вы будете уведомлены о новых темах или ответах во время своего отсутствия на форуме. + 31006 + 31006 + 0 + + + core + public_usercp + subs_for + for + на + 31006 + 31006 + 0 + + + core + public_usercp + subs_c_title + Subscription Information + Информация о подписках + 31006 + 31006 + 0 + + + core + public_usercp + subs_c_type + Type + Тип + 31006 + 31006 + 0 + + + core + public_usercp + subs_exp_text + You will receive a notification when a new reply is made to a topic you are subscribed to.]]> + При подписке на форум вы будете уведомлены обо всех новых сообщениях в этой теме.]]> + 31006 + 31006 + 0 + + + core + public_usercp + auto_track_type + If enabled, choose default notification type: + Если включено, выберите тип уведомления: + 31006 + 31006 + 0 + + + core + public_usercp + auto_track + Watch every topic I reply to + Включить уведомления на e-mail? + 31006 + 31006 + 0 + + + core + public_usercp + attach_topicmoved + Unavailable]]> + Тема перемещена]]> + 31006 + 31006 + 0 + + + core + public_usercp + attach_inpm + Personal Message + Личное сообщение + 31006 + 31006 + 0 + + + core + public_usercp + conv_email_warning_title + EMAIL WARNING + E-MAIL ПРЕДУПРЕЖДЕНИЕ + 31006 + 31006 + 0 + + + core + public_usercp + conv_email_warning + PLEASE change your email address immediately.]]> + Немедленно измените свой e-mail адрес.]]> + 31006 + 31006 + 0 + + + core + public_usercp + announce_edit + Edit + Изменить + 31006 + 31006 + 0 + + + core + public_usercp + announce_by + By: + Автор: + 31006 + 31006 + 0 + + + core + public_usercp + announce_delete + Delete + Удалить + 31006 + 31006 + 0 + + + core + public_usercp + enable_flash + Enable flash uploader? + Включить загрузку файлов с использованием flash + 31006 + 31006 + 0 + + + core + public_usercp + flash_text + Allows for an upload progress bar and multiple file uploads, but does not work on all browsers + Позволяет использовать flash для прогресс-бара и загрузки нескольких файлов. Работает не во всех браузерах. + 31006 + 31006 + 0 + + + core + public_usercp + rte_text + Rich Text Editor requires IE6+, Mozilla / Firefox 3.0+, Safari 4+, Google Chrome, or Opera 9+ + Визуальный редактор требует Internet Explorer 6+, Mozilla / Firefox или Opera 9+ + 31006 + 31006 + 0 + + + core + public_usercp + ucp_title_posting + Posting Settings + Настройки доступа + 31006 + 31006 + 0 + + + core + public_usercp + enable_rte + Enable visual (RTE) editor? + Использовать визуальный редактор + 31006 + 31006 + 0 + + + core + public_usercp + settings_time_txt2 + The time (including your current adjustment) is: + Текущее время (включая ваши настройки часового пояса): + 31006 + 31006 + 0 + + + core + public_usercp + dst_correction_title + DST Correction + Коррекция перехода на летнее время + 31006 + 31006 + 0 + + + core + public_usercp + dst_auto2 + If selected, your DST setting is automatically adjusted when you next load the board index + Если выбрано, то ваши настройки перехода на летнее время будут автоматически применены, когда в следующий раз вы войдете на главную страницу форума. + 31006 + 31006 + 0 + + + core + public_usercp + dst_error + An error occurred when trying to automatically change your DST settings. If the error continues, please switch off auto DST correction. + Произошла ошибка при попытке автоматически изменить ваши настройки перехода на летнее время. Если ошибка продолжается, пожалуйста, отключите автокоррекцию перехода на летнее время. + 31006 + 31006 + 0 + + + core + public_usercp + m_dname_change + Change Display Name + Изменить имя пользователя + 31006 + 31006 + 0 + + + core + public_usercp + dname_title + Change Display Name + Изменить имя пользователя + 31006 + 31006 + 0 + + + core + public_usercp + dname_string + You are permitted to make %s changes in a %s day period.

    Changing your display name will not affect your log in details.]]>
    + Вам разрешено делать %s изменений каждые %s дней.

    Изменение имени никак не отражается на вашем логине.]]>
    + 31006 + 31006 + 0 +
    + + core + public_usercp + dname_password2 + This is to ensure security on your account + Это гарантирует безопасность вашей учетной записи + 31006 + 31006 + 0 + + + core + public_usercp + dname_password + Enter your current password + Введите ваш текущий пароль + 31006 + 31006 + 0 + + + core + public_usercp + dname_choose2 + + + 31006 + 31006 + 0 + + + core + public_usercp + dname_change_ok + Display name changed successfully + Имя пользователя успешно изменено + 31006 + 31006 + 0 + + + core + public_usercp + dname_choose + Enter a new display name + Введите новое имя пользователя + 31006 + 31006 + 0 + + + core + public_usercp + sub_added + Your subscription has been added + Подписка успешно добавлена + 31006 + 31006 + 0 + + + core + public_usercp + ucp_op_pm_desc + If you disable your personal messenger, you will not be able to start or participate in personal conversations. + Если вы отключите использование вами личных сообщений, вы не сможете отправлять и получать личные сообщения. + 31006 + 31006 + 0 + + + core + public_usercp + ucp_op_pm + Disable my personal messenger + Не принимать личные сообщения + 31006 + 31006 + 0 + + + core + public_usercp + m_choose_fmod_type + Choose the type of moderation for when new friends are added + Выберите тип модерации для добавления в друзья + 31006 + 31006 + 0 + + + core + public_usercp + m_choose_cmod_type + Choose the type of moderation for when comments are added + Выберите тип модерации новых комментариев + 31006 + 31006 + 0 + + + core + public_usercp + m_choose_comm_type + Choose the type of notification for when comments are added + Выберите тип уведомления о новых комментариях + 31006 + 31006 + 0 + + + core + public_usercp + m_choose_friend_type + Choose the type of notification for when new friends are added + Выберите тип уведомления о новых друзьях + 31006 + 31006 + 0 + + + core + public_usercp + cp_current_aboutme + + Текущая информация о себе + 31006 + 31006 + 0 + + + core + public_usercp + identity_url_assoc + That identity url is already in use by another account + Этот OpenID уже используется другим пользователем + 31006 + 31006 + 0 + + + core + public_usercp + cp_edit_aboutme + + Изменить информацию о себе + 31006 + 31006 + 0 + + + core + public_usercp + identity_url_desc + You can associate an OpenID identity URL with your account + Вы можете связать ваш OpenID с вашей учетной записью. + 31006 + 31006 + 0 + + + core + public_usercp + identity_url + Your Identity URL + Ваш OpenID + 31006 + 31006 + 0 + + + core + public_usercp + identity_url_h3 + OpenID Options + Настройки OpenID + 31006 + 31006 + 0 + + + core + public_usercp + m_notes + Manage Notes + Заметки + 31006 + 31006 + 0 + + + core + public_usercp + saveavatar_badimgext + You cannot link to that type of image + Вы не можете сделать ссылку на этот тип изображения + 31006 + 31006 + 0 + + + core + public_usercp + saveavatar_chmod + The upload failed - there was a problem moving the avatar to the uploads directory. Please verify permissions are set correctly on the uploads folder. + Загрузка не удалась - возникла ошибка при перемещении аватара в директорию загрузки. Пожалуйста, проверьте права доступа к директории загрузки. + 31006 + 31006 + 0 + + + core + public_usercp + saveavatar_badimg + The upload failed - there was a problem processing the image + Загрузка не удалась - возникла ошибка при обработке изображения + 31006 + 31006 + 0 + + + core + public_usercp + saveavatar_noimg2 + We could not determine the avatar you were trying to update with + Невозможно определить аватар, который вы хотите обновить на + 31006 + 31006 + 0 + + + core + public_usercp + saveavatar_noimg + The upload failed - you may only upload an image file + Загрузка не удалась - вы можете загрузить только изображение + 31006 + 31006 + 0 + + + core + public_usercp + saveavatar_toobig + The upload failed - the file was too large + Загрузка не удалась - файл слишком большой + 31006 + 31006 + 0 + + + core + public_usercp + saveavatar_noperm + + У вас недостаточно прав для редактирования аватара администратора + 31006 + 31006 + 0 + + + core + public_usercp + saveavatar_nofile + The upload failed - there was no image to upload + Загрузка не удалась - изображение не загружено + 31006 + 31006 + 0 + + + core + public_usercp + saveavatar_nomem + The member does not exist + Пользователь не существует + 31006 + 31006 + 0 + + + core + public_usercp + noignoreuser_noid + We could not find the member you were attempting to remove from your ignore list, or you are not ignoring that user + Не удалось найти пользователя, которого вы хотите удалить из списка игнорируемых. + 31006 + 31006 + 0 + + + core + public_usercp + noignoreuser_success + You are no longer ignoring the user + Пользователь удален из списка игнорируемых + 31006 + 31006 + 0 + + + core + public_usercp + ignoreuser_success + You are now ignoring the user + Пользователь добавлен в список игнорируемых + 31006 + 31006 + 0 + + + core + public_usercp + ignoreuser_cannot + You cannot ignore that member + Вы не можете игнорировать этого пользователя + 31006 + 31006 + 0 + + + core + public_usercp + ignoreuser_already + You are already choosing to ignore items from that member + Пользователь уже находится в списке игнорируемых + 31006 + 31006 + 0 + + + core + public_usercp + ignoreuser_noid + We could not find the member you were attempting to ignore. + Не удалось найти пользователя, которого вы хотите добавить в список + 31006 + 31006 + 0 + + + core + public_usercp + removeav_noperm + + У вас недостаточно прав для редактирования аватара администратора + 31006 + 31006 + 0 + + + core + public_usercp + ignoreuser_nomem + We could not find a member that matches that name + Не удалось найти пользователя с таким именем + 31006 + 31006 + 0 + + + core + public_usercp + removeav_notexist + The member does not exist + Пользователь не существует + 31006 + 31006 + 0 + + + core + public_usercp + change_settings + Change Profile Information + Изменить данные профиля + 31006 + 31006 + 0 + + + core + public_usercp + change_aboutme + Change About Me Page + Информация о себе + 31006 + 31006 + 0 + + + core + public_usercp + captcha_email_invalid + That CAPTCHA input did not match the CAPTCHA image. + Введенная строка не соответствует строке на изображении. + 31006 + 31006 + 0 + + + core + public_usercp + emails_no_matchy + The entered email addresses do not match. + Введенные e-mail адреса не совпадают. + 31006 + 31006 + 0 + + + core + public_usercp + email_not_valid + You must enter valid email addresses. + Вы должны ввести верный e-mail адрес. + 31006 + 31006 + 0 + + + core + public_usercp + email_is_taken + That email address is already in use. + Этот e-mail адрес уже используется другим пользователем. + 31006 + 31006 + 0 + + + core + public_usercp + name_change_taken + That name is already in use, please choose another. + Это имя уже используется другим пользователем, пожалуйста выберите другое. + 31006 + 31006 + 0 + + + core + public_usercp + name_change_no_more + You are not permitted to make any more changes to your display name + Вы больше не можете изменить ваше имя пользователя + 31006 + 31006 + 0 + + + core + public_usercp + name_change_illegal + The name contains illegal characters. + Имя содержит недопустимые символы. + 31006 + 31006 + 0 + + + core + public_usercp + name_change_tooshort + The name must be more than 3 characters and less than %s characters + Имя должно быть больше 3 и меньше %s символов. + 31006 + 31006 + 0 + + + core + public_usercp + name_change_noload + We could not load the member + Невозможно загрузить пользователя + 31006 + 31006 + 0 + + + core + public_usercp + name_change_noperm + That name is already in use, please choose another. + Это имя уже используется другим пользователем, пожалуйста выберите другое. + 31006 + 31006 + 0 + + + core + public_usercp + name_taken_change + That name is already in use, please choose another. + Это имя уже используется другим пользователем, пожалуйста выберите другое. + 31006 + 31006 + 0 + + + core + public_usercp + pw_change_successful + Your password change was successful + Пароль успешно изменен + 31006 + 31006 + 0 + + + core + public_usercp + new_pw_too_long + Your new password is too long + Новый пароль слишком длинный + 31006 + 31006 + 0 + + + core + public_usercp + hanlogin_pw_failed + The password change failed + Невозможно изменить пароль + 31006 + 31006 + 0 + + + core + public_usercp + current_pw_bad + Your current password is incorrect + Неверный текущий пароль + 31006 + 31006 + 0 + + + core + public_usercp + passwords_not_matchy + The passwords do not match + Пароли не совпадают + 31006 + 31006 + 0 + + + core + public_usercp + called_invalid_function + The page you requested was not valid. + Запрошенная вами страница не существует. + 31006 + 31006 + 0 + + + core + public_usercp + pagetitle_bit + User CP + Профиль пользователя + 31006 + 31006 + 0 + + + core + public_usercp + complete_entire_form + You must complete the entire form + Вы должны заполнить всю форму + 31006 + 31006 + 0 + + + core + public_usercp + ucp_outline_explain + All posts in a topic are shown in tree display, with one thread at a time shown. + Все сообщения показываются в древовидном списке. + 31006 + 31006 + 0 + + + core + public_usercp + ucp_announcements + Announcements + Объявления + 31006 + 31006 + 0 + + + core + public_usercp + securehash_not_secure + Your security key was not valid. + Неверный ключ безопасности + 31006 + 31006 + 0 + + + core + public_usercp + ucp_outline + Outline + Древовидный + 31006 + 31006 + 0 + + + core + public_usercp + ucp_standard_explain + Posts are shown one after the other. + Сообщения показываются друг за другом. + 31006 + 31006 + 0 + + + core + public_usercp + ucp_linearplus_explain + The first post is always shown at the top of the page, with other posts shown one after the other. + Первое сообщение всегда показывается вверху страницы. Остальные сообщения показываются друг за другом. + 31006 + 31006 + 0 + + + core + public_usercp + ucp_standard + Standard + Стандартный + 31006 + 31006 + 0 + + + core + public_usercp + ucp_linearplus + Linear + + Линейный + 31006 + 31006 + 0 + + + core + public_usercp + ucp_required_info + Required Information + Требуемая информация + 31006 + 31006 + 0 + + + core + public_usercp + ucp_other_info + Other Information + Другая информация + 31006 + 31006 + 0 + + + core + public_usercp + ucp_remove_photo + Remove My Photo + Удалить фотографию + 31006 + 31006 + 0 + + + core + public_usercp + ucp_dst_now + Currently in DST? + Уже на летнем времени? + 31006 + 31006 + 0 + + + core + public_usercp + ucp_dst_effect + Is DST currently in effect? + Перейти на летнее время? + 31006 + 31006 + 0 + + + core + public_usercp + ucp_topic_display_mode + Topic Display Mode + Режимы отображения тем + 31006 + 31006 + 0 + + + core + public_usercp + ucp_birthday_select + Select Your Birthday + Введите дату рождения + 31006 + 31006 + 0 + + + core + public_usercp + ucp_birthday_optional + Entering your birthday is optional + Ввод дня рождения не является обязательным + 31006 + 31006 + 0 + + + core + public_usercp + ucp_show_x_latest + Show X latest visitors on my profile + Показывать X последних посетителей профиля + 31006 + 31006 + 0 + + + core + public_usercp + ucp_friend_approve + Friend Approval + Модерировать запросы на дружбу? + 31006 + 31006 + 0 + + + core + public_usercp + ucp_friends + Friends + Друзья + 31006 + 31006 + 0 + + + core + public_usercp + ucp_show_friends_profile + Show my friends in my profile + Показывать друзей в профиле + 31006 + 31006 + 0 + + + core + public_usercp + ucp_friend_notify + Friend Notification Type + Уведомлять о новых друзьях? + 31006 + 31006 + 0 + + + core + public_usercp + ucp_comment_approval + Comment Approval + Модерировать новые комментарии? + 31006 + 31006 + 0 + + + core + public_usercp + ucp_comment_notify_type + Comment Notification Type + Уведомлять о новых комментариях? + 31006 + 31006 + 0 + + + core + public_usercp + ucp_comments + Comments + Комментарии + 31006 + 31006 + 0 + + + core + public_usercp + ucp_enable_comments + Enable Profile Comments + Разрешить комментирование профиля + 31006 + 31006 + 0 + + + core + public_usercp + ucp_members_name + + Имя пользователя + 31006 + 31006 + 0 + + + core + public_usercp + ucp_ignore_pc + Ignore Personal Conversations + Игнорировать личные сообщения + 31006 + 31006 + 0 + + + core + public_usercp + ucp_ignored_users + Ignored Users + Игнорируемые пользователи + 31006 + 31006 + 0 + + + core + public_usercp + ucp_ignore_posts + Ignore Posts + Игнорировать сообщения + 31006 + 31006 + 0 + + + core + public_usercp + ucp_ignore_msgs + Ignore Messages + Игнорировать личные сообщения + 31006 + 31006 + 0 + + + core + public_usercp + ucp_reply_since + topic(s) have new replies since your last visit + тем содержат новые ответы с момента вашего последнего посещения + 31006 + 31006 + 0 + + + core + public_usercp + ucp_select_category + Select a Category + Выберите категорию + 31006 + 31006 + 0 + + + core + public_usercp + ucp_watched_forums + Watched Forums + Отслеживаемые форумы + 31006 + 31006 + 0 + + + core + public_usercp + ucp_full + full + допустимого места + 31006 + 31006 + 0 + + + core + public_usercp + ucp_user_attach + User Attachments + Файлы пользователя + 31006 + 31006 + 0 + + + core + public_usercp + ucp_view_org + View original topic + Посмотреть оригинальную тему + 31006 + 31006 + 0 + + + core + public_usercp + ucp_remove_avatar + Remove My Avatar + Удалить аватар + 31006 + 31006 + 0 + + + core + public_usercp + ucp_gravatar_enter_email + Gravatar e-mail address]]> + Gravatar]]> + 31006 + 31006 + 0 + + + core + public_usercp + ucp_attach_allowance + Your attachment allowance is + Занято + 31006 + 31006 + 0 + + + core + public_usercp + settings_for_ucp + Settings for + Настройки для + 31006 + 31006 + 0 + + + core + public_usercp + cancel_edit + Cancel edit + Отмена + 31006 + 31006 + 0 + + + core + public_usercp + admin_emailpassword + Because you have administrator access on this board, you must utilize the admin control panel to change your email address or password. This measure is taken for security purposes. In the Admin CP, navigate to the System tab, and click on Change My Details. You will be able to change your email address and password from this page. + Вы имеете доступ администратора, поэтому для изменения e-mail адреса или пароля вам необходимо перейти в АЦ. Эта мера принимается в целях безопасности. В АЦ перейдите на вкладку Пользователи, нажмите Управление пользователями, найдите вашу учетную запись и нажмите на ваше имя. На этой странице вы сможете изменить свой e-mail адрес и пароль. + 31006 + 31006 + 0 + + + core + public_usercp + sig_toomanyurls + You may only use up to %s urls in your signature. + Подпись может содержать не более %s ссылок + 31006 + 31006 + 0 + + + core + public_usercp + sig_toomanylines + You may only use up to %s lines of text in your signature. + Подпись не должна быть больше %s строк + 31006 + 31006 + 0 + + + core + public_usercp + sig_imagetoobig + This image is larger than the maximum allowed dimensions of %s x %s.]]> + Это изображение больше максимально допустимого размера %s х %s.]]> + 31006 + 31006 + 0 + + + core + public_usercp + sig_toomanyimages + You may only use up to %s images in your signature. + Подпись может содержать не более %s изображений + 31006 + 31006 + 0 + + + core + public_usercp + sig_max_urls_nl + Any number of URLs + Любое количество ссылок + 31006 + 31006 + 0 + + + core + public_usercp + sig_max_lines + Up to %s lines + До %s строк + 31006 + 31006 + 0 + + + core + public_usercp + sig_max_lines_nl + Any number of lines + Любое количество строк + 31006 + 31006 + 0 + + + core + public_usercp + m_facebook + Manage Facebook Connect + Соединение с Facebook + 31006 + 31006 + 0 + + + core + public_usercp + sig_max_imgsize_nl + Images of any size + Изображения любого размера + 31006 + 31006 + 0 + + + core + public_usercp + sig_max_urls + Up to %s URLs + До %s ссылок + 31006 + 31006 + 0 + + + core + public_usercp + sig_max_imagesr_nl + Any number images + Любое количество изображений + 31006 + 31006 + 0 + + + core + public_usercp + sig_max_imgsize + Images up to %s x %s pixels + Изображения размером до %s х %s пикселей + 31006 + 31006 + 0 + + + core + public_usercp + topic_title + Topic title + Название темы + 31006 + 31006 + 0 + + + core + public_usercp + sig_max_imagesr + Up to %s images + До %s изображений + 31006 + 31006 + 0 + + + core + public_usercp + sig_restrictions + Signature Restrictions + Ограничения подписи + 31006 + 31006 + 0 + + + core + public_usercp + sig_restrictions_contain + Your signature may contain: + Подпись может содержать: + 31006 + 31006 + 0 + + + core + public_usercp + fb_disassociate_now + Disassociate Account Now + Отвязать учетную запись + 31006 + 31006 + 0 + + + core + public_usercp + fb_disassociate_info_3 + and choose an email address outside of Facebook if you wish to continue using this forum account after you have disassociated your forum account from Facebook. There is no undo. + и выберите e-mail вне Facebook если хотите продолжить использовать эту учетную запись на форуме, но отвязать ее от Facebook. Это действие нельзя отменить. + 31006 + 31006 + 0 + + + core + public_usercp + fb_disassociate_info_2 + change your email address + изменение вашего e-mail адреса + 31006 + 31006 + 0 + + + core + public_usercp + fb_disassociate_info_1 + If you disassociate your forum account, you will not be able to use the Forgotton Password feature to retrieve your forum account password. It is recommended you + Если вы отключаете связь Facebook с учетной записью на форуме, вы не сможете использовать функцию восстановления пароля на форуме. + 31006 + 31006 + 0 + + + core + public_usercp + fb_using_email + You are using a Facebook email address + Вы используете Facebook e-mail адрес + 31006 + 31006 + 0 + + + core + public_usercp + fb_sync_now + Synchronize Now + Синхронизировать + 31006 + 31006 + 0 + + + core + public_usercp + fb_disassociate + Disassociate Facebook + Отключить связь с аккаунтом в Facebook + 31006 + 31006 + 0 + + + core + public_usercp + fb_disassociate_desc + This will log you out, remove the account link from Facebook and will remove the Facebook Application. + Выйти из учетной записи, удалить соединение с Facebook и удалить приложение Facebook + 31006 + 31006 + 0 + + + core + public_usercp + fb_never + Never + Никогда + 31006 + 31006 + 0 + + + core + public_usercp + fb_sync_aboutme + "About Me" with my Facebook "About Me"]]> + «Обо мне» на форуме и на Facebook.]]> + 31006 + 31006 + 0 + + + core + public_usercp + fb_last_syncd + This information is updated once every 24 hours. Last synchronized: + Эта информация обновляется каждые 24 часа. Последнее обновление: + 31006 + 31006 + 0 + + + core + public_usercp + fb_sync_avatar + Avatar with my Facebook picture]]> + аватар аватаром из Facebook ]]> + 31006 + 31006 + 0 + + + core + public_usercp + fb_sync_options + Facebook to Forum Account Synchronization Options + Опции синхронизации учетной записи Facebook и этого форума + 31006 + 31006 + 0 + + + core + public_usercp + fb_sync_photo + Profile Picture with my Facebook picture]]> + фото из Facebook ]]> + 31006 + 31006 + 0 + + + core + public_usercp + fb_logged_in_as + You are logged into Facebook as + Вы авторизованы на Facebook как + 31006 + 31006 + 0 + + + core + public_usercp + fb_config + Facebook and reloading this page.]]> + Вам нужно войти через Facebook, прежде чем настраивать эти опции. + 31006 + 31006 + 0 + + + core + public_usercp + fb_connect_mismatch + Facebook Connect Mismatch + Нет соединения с Facebook + 31006 + 31006 + 0 + + + core + public_usercp + fb_connect_mismatch_desc + Facebook account you are currently logged into is already linked to another forum account.
    You will need to log out of Facebook before returning here if you want to configure these options.]]>
    + учетная запись на Facebook уже используется другим пользователем форума.
    Вам нужно выйти из Facebook прежде чем дальше настраивать ваши опции.]]>
    + 31006 + 31006 + 0 +
    + + core + public_usercp + fb_email_not_allowed_desc + You have not given this forum permission to send emails via your facebook account. You will need to click the link in the box above to allow this before you can configure any Facebook Connect options. + У вас недостаточно прав для отправки e-mail письма через facebook профиль. Вам нужно нажать на ссылку в вышеуказанном блоке для решения этой проблемы. Прежде чем вы сможете настраивать опции соединения с Facebook. + 31006 + 31006 + 0 + + + core + public_usercp + member_title_desc + Your member title is shown beside posts you make + Ваш статус отображается с вашими сообщениями + 31006 + 31006 + 0 + + + core + public_usercp + fb_email_not_allowed + Email Not Allowed + Отправка e-mail писем запрещена + 31006 + 31006 + 0 + + + core + public_usercp + member_title + Member Title + Статус + 31006 + 31006 + 0 + + + core + public_usercp + avatar + Avatar + Аватар + 31006 + 31006 + 0 + + + core + public_usercp + profile_information + Profile Information + Данные профиля + 31006 + 31006 + 0 + + + core + public_usercp + click_allow_email + Click here to allow email from this forum + Нажмите здесь, чтобы получать письма с этого форума + 31006 + 31006 + 0 + + + core + public_usercp + cannot_get_email_2 + Until you allow emails from this forum, you will not receive topic subscription notifications, new personal message notifications, etc. + Пока вы не разрешите получать письма с этого форума, вы не сможете получать уведомления о событиях в отслеживаемых темах, уведомления о новых личных сообщениях и т.п. + 31006 + 31006 + 0 + + + core + public_usercp + h_hits + Views + Просмотров + 31006 + 31006 + 0 + + + core + public_usercp + cannot_get_email + You cannot currently receive emails from this forum + Вы не можете получать письма с этого форума + 31006 + 31006 + 0 + + + core + public_usercp + h_replies + Replies + Ответов + 31006 + 31006 + 0 + + + core + public_usercp + h_topic_starter + Topic Starter + Автор + 31006 + 31006 + 0 + + + core + public_usercp + h_last_action + Last Action + Последнее сообщение + 31006 + 31006 + 0 + + + core + public_usercp + h_topic_title + Topic Title + Название темы + 31006 + 31006 + 0 + + + core + public_usercp + sig_group_restrict_posts + You cannot change your signature until you have %s more approved posts + Вы не сможете изменить вашу подпись пока у вас не будет более %s утвержденных сообщений + 31006 + 31006 + 0 + + + core + public_usercp + sig_group_restrict_date + You cannot change your signature until %s + Вы не сможете изменить вашу подпись до %s + 31006 + 31006 + 0 + + + core + public_usercp + dname_group_restrict_posts + You cannot change your display name until you have %s more approved posts + Вы не сможете изменить ваше имя пользователя пока у вас не будет более %s утвержденных сообщений + 31006 + 31006 + 0 + + + core + public_usercp + op_dd_enabled + Enabled - Only add when I approve them + Включено — добавлять только когда я это разрешил + 31006 + 31006 + 0 + + + core + public_usercp + dname_group_restrict_date + You cannot change your display name until %s + Вы не сможете изменить ваше имя пользователя до %s + 31006 + 31006 + 0 + + + core + public_usercp + op_dd_pm + Notify Via Personal Message (PM) + Уведомлять личным сообщением (PM) + 31006 + 31006 + 0 + + + core + public_usercp + op_dd_disabled + Disabled - Allow addition without approving + Выключено — разрешить добавление без подтверждения + 31006 + 31006 + 0 + + + core + public_usercp + op_dd_email + Notify Via Email + Уведомлять по e-mail + 31006 + 31006 + 0 + + + core + public_usercp + op_dd_none + No Notification + Не уведомлять + 31006 + 31006 + 0 + + + core + public_usercp + pp_cannot_find_member + Please reload the page and try again. If you continue to experience problems, please contact an administrator. + Перезагрузите страничку и попробуйте еще раз. Если не помогает - обратитесь к администратору. + 31006 + 31006 0 @@ -16991,28 +18653,8 @@ Report: pp_upload_to_big The file you uploaded is too large. Файл, который вы пытаетесь загрузить слишком большой. - 30007 - 30007 - 0 - - - core - public_usercp - pp_invalid_file_extension - The file type you tried to upload is not allowed. - Тип файла, который вы пытаетесь загрузить, не разрешен для загрузки. - 30007 - 30007 - 0 - - - core - public_usercp - pp_no_photo_upload_permission - You do not have permission to upload a personal photo. - Вам не разрешено загружать фотографию. - 30007 - 30007 + 31006 + 31006 0 @@ -17021,58 +18663,58 @@ Report: pp_upload_failed The upload failed. Please notify an administrator. Загрузка не удалась. Сообщите администратору. - 30007 - 30007 + 31006 + 31006 0 core public_usercp - ucp_title_search - Search Settings - Настройка поиска - 30008 - 30008 + pp_invalid_file_extension + The file type you tried to upload is not allowed. + Тип файла, который вы пытаетесь загрузить, не разрешен для загрузки. + 31006 + 31006 0 core public_usercp - ucp_vnc_type - View New Content Method - Тип новых публикаций - 30008 - 30008 + pp_no_photo_upload_permission + You do not have permission to upload a personal photo. + Вам не разрешено загружать фотографию. + 31006 + 31006 0 core public_usercp - ucp_vnc_type_0 - Show me all new content since my last visit - публикации с момента последнего посещения - 30008 - 30008 + tab__core + Settings + Настройки + 31006 + 31006 0 core public_usercp - ucp_vnc_type_1 - Show me all content that I have not read - публикации которые я еще не читал - 30008 - 30008 + tab__forums + Forums + Форумы + 31006 + 31006 0 core public_usercp - ucp_forum_search_display - Forum Results Display - Результаты - 30008 - 30008 + tab__members + Profile + Профиль + 31006 + 31006 0 @@ -17081,28 +18723,8 @@ Report: your_browser_norte Your browser does not support the RTE Ваш браузер не поддерживает визуальный редактор - 30008 - 30008 - 0 - - - core - public_usercp - ucp_forum_search_display_1 - Show results as a list - Показать результаты в виде списка - 30008 - 30008 - 0 - - - core - public_usercp - ucp_forum_search_display_0 - Show results like a forum - Показать результаты в виде форумов - 30008 - 30008 + 31006 + 31006 0 @@ -17111,8 +18733,2378 @@ Report: admin_val_no_email_chg You cannot change your email address until the administrator validates your account. Вы не можете сменить email адрес, до тех пор пока администратор не активирует вашу учетную запись. - 30012 - 30012 + 31006 + 31006 + 0 + + + core + public_usercp + ucp_forum_search_display_1 + Show results as a list + Показать результаты в виде списка + 31006 + 31006 + 0 + + + core + public_usercp + ucp_forum_search_display_0 + Show results like a forum + Показать результаты в виде форумов + 31006 + 31006 + 0 + + + core + public_usercp + ucp_vnc_type_1 + Show me all content that I have not read + публикации, которые я еще не читал + 31006 + 31006 + 0 + + + core + public_usercp + ucp_forum_search_display + Forum Results Display + Результаты + 31006 + 31006 + 0 + + + core + public_usercp + ucp_vnc_type_0 + Show me all new content since my last visit + публикации с момента последнего посещения + 31006 + 31006 + 0 + + + core + public_usercp + ucp_title_search + Search Settings + Настройка поиска + 31006 + 31006 + 0 + + + core + public_usercp + ucp_vnc_type + View New Content Method + Тип новых публикаций + 31006 + 31006 + 0 + + + core + public_usercp + ucp_status_notify_all + Notify me by e-mail when a reply is made to any status I have replied to + Уведомлять меня по email о комментариях к статусам, которые я тоже прокомментировал + 31006 + 31006 + 0 + + + core + public_usercp + ucp_status_notify_mine + Notify me by e-mail when I get a reply to my status updates + Уведомлять меня по email о комментариях к обновлениям моего статуса + 31006 + 31006 + 0 + + + core + public_usercp + ucp_status_email + Status Update Settings + Настройки обновления статуса + 31006 + 31006 + 0 + + + core + public_usercp + notify_type_mobile + Mobile + Мобильный + 31006 + 31006 + 0 + + + core + public_usercp + m_twitter + Manage Twitter Connect + Cоединение с Twitter + 31006 + 31006 + 0 + + + core + public_usercp + twitter_config + You will need to connect with Twitter before you can configure your options. + Необходимо иметь связанный Twitter-аккаунт прежде чем что-то настраивать. + 31006 + 31006 + 0 + + + core + public_usercp + notify_type_inline + Inline Notification + Внутрисистемное уведомление + 31006 + 31006 + 0 + + + core + public_usercp + notify_type_pm + Personal Conversation + Личное сообщение + 31006 + 31006 + 0 + + + core + public_usercp + notify_type_email + Email + Email + 31006 + 31006 + 0 + + + core + public_usercp + notifytitle_other + Other Notifications + Прочие уведомления + 31006 + 31006 + 0 + + + core + public_usercp + notifytitle_status_updates + Status Updates + Обновления статуса + 31006 + 31006 + 0 + + + core + public_usercp + notifytitle_topics_posts + + Темы и сообщения + 31006 + 31006 + 0 + + + core + public_usercp + notifytitle_profiles_friends + + Профиль и друзья + 31006 + 31006 + 0 + + + core + public_usercp + notifytitle_private_msgs + Private Messages + Личные сообщения + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__file_approved + File I submitted is approved + Отправленный мной файл одобрен + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__new_file + File I am watching is updated + Отслеживаемый файл обновлен + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__friend_request_approve + Friend request approved + Подтверждение моего запроса на дружбу + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__ccs_notifications + Article subscriptions + Подписка на статью + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__reply_any_status + Replies to statuses I have replied to + Комментарий к статусу, который я тоже прокомментировал + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__reply_your_status + Replies to my statuses + Прокоментирован мой статус + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__invite_private_message + Invited to a conversation + Приглашение в личную беседу + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__friend_status_update + Friends status updates + Изменене статуса у друга + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__reply_private_message + Replies to conversations + Новое сообщение в личной беседе + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__new_private_message + New conversation + Новая беседа + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__friend_request_pending + Pending friend request + Новый запрос на дружбу + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__profile_comment_pending + Pending comments + Не подтвержденный комментарий + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__friend_request + Adds me as a friend + Добавили в друзья + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__profile_comment + Profile comments + Комментарий в профиле + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__new_reply + Topic Replies + Новый ответ в теме + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__post_quoted + My posts being quoted + Мое сообщение процитировано + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__new_topic_queue + Topic pending approval + Новая тема, ожидающая подтверждения + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__report_center + Reported content + Жалоба на публикацию + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__new_topic + New topics + Новая тема + 31006 + 31006 + 0 + + + core + public_usercp + notify__short__reputation_received + Received reputation points + Изменена репутация + 31006 + 31006 + 0 + + + core + public_usercp + notify__file_approved + Notification method to use when a file I submitted is approved + Способ уведомления при публикации отправленного мной файла + 31006 + 31006 + 0 + + + core + public_usercp + notify__friend_request_approve + Notify me when someone approves a friend request I make + Способ уведомления при подтверждении моего запроса на дружбу + 31006 + 31006 + 0 + + + core + public_usercp + notify__new_filecomment + Notification method to use when a file I like receives a new comment + Способ уведомления о новых комментариях для файлов, которые мне нравятся + 31006 + 31006 + 0 + + + core + public_usercp + notify__updated_file + Notification method to use when a file I like is updated + Способ уведомления об обновлении файла, который мне нравится + 31006 + 31006 + 0 + + + core + public_usercp + notify__new_file + Notification method to use when a file I am watching is updated + Способ уведомления при обновлении отслеживаемого мной файла + 31006 + 31006 + 0 + + + core + public_usercp + notify__item_shipped + + Способ уведомления меня при отгрузке покупки + 31006 + 31006 + 0 + + + core + public_usercp + notify__commission_earned + Notify me when I earn commission + Способ уведомления при получении коммиссии + 31006 + 31006 + 0 + + + core + public_usercp + notify__staff_support_new + Notify me when a customer creates a new support request + Способ уведомления при создании пользователем новго вопроса + 31006 + 31006 + 0 + + + core + public_usercp + notify__staff_support_reply + Notify me when a customer replies to a new support request + Способ уведомления при ответе пользователем в вопрос + 31006 + 31006 + 0 + + + core + public_usercp + notify__support_reply + Notify me when a staff member replies to my support request + Способ уведомления при ответе в мой вопрос + 31006 + 31006 + 0 + + + core + public_usercp + notify__payment_failed + Notify me if my payment fails + Способ уведомления при неудачном платеже + 31006 + 31006 + 0 + + + core + public_usercp + notify__invoice_expired + Notify me when an invoice expires + Способ уведомления при истечении срока счета + 31006 + 31006 + 0 + + + core + public_usercp + notify__payment_received + Notify me when my payment is received + Способ уведомления при прохождении платежа + 31006 + 31006 + 0 + + + core + public_usercp + notify__ccs_notifications + Notification method to use for article subscriptions + Способ уведомления для подписки на статьи + 31006 + 31006 + 0 + + + core + public_usercp + notify__new_invoice + Notify me when an invoice is generated + Способ уведомления при выставлении счета + 31006 + 31006 + 0 + + + core + public_usercp + notify__reply_any_status + Notify me of replies to status updates I have replied to + Уведомлять меня о комментариях к статусам, которые я тоже прокомментировал + 31006 + 31006 + 0 + + + core + public_usercp + notify__reply_your_status + Notify me of replies to my status updates + Способ уведомления при комментировании обновления моего статуса + 31006 + 31006 + 0 + + + core + public_usercp + notify__friend_status_update + Notify me when one of my friends updates their status + Способ уведомления при обновлении статуса у друга + 31006 + 31006 + 0 + + + core + public_usercp + notify__invite_private_message + Notify me when I am invited to a personal conversation + Способ уведомления при приглашении меня в личную беседу + 31006 + 31006 + 0 + + + core + public_usercp + notify__new_private_message + Notify me when I receive a new personal conversation + Способ уведомления при добавлении меня в личную беседу + 31006 + 31006 + 0 + + + core + public_usercp + notify__reply_private_message + Notify me of replies to my personal conversations + Способ уведомления при появлении нового сообщения в личной беседе + 31006 + 31006 + 0 + + + core + public_usercp + notify__friend_request + Notify me when someone adds me as a friend + Способ уведомления при добавлении меня в друзья + 31006 + 31006 + 0 + + + core + public_usercp + notify__friend_request_pending + Notify me when I have a pending friend request + Способ уведомления при появлении у меня ожидающего запроса на дружбу + 31006 + 31006 + 0 + + + core + public_usercp + notify__profile_comment + Notify me of comments made on my profile + Способ уведомления при комментировании моего профиля + 31006 + 31006 + 0 + + + core + public_usercp + notify__profile_comment_pending + Notify me of comments made on my profile pending approval + Способ уведомления при появлении комментарием моего профиля, ожидающих подтверждения + 31006 + 31006 + 0 + + + core + public_usercp + notify__post_quoted + Notify me when someone quotes my posts + Способ уведомления при цитировании моих сообщений + 31006 + 31006 + 0 + + + core + public_usercp + notify__new_topic_queue + Notification method to use when a topic is pending approval + Способ уведомления при появлении темы, ожидающей модерации + 31006 + 31006 + 0 + + + core + public_usercp + notify__new_reply + Notification method to use for topic replies and reply digests + Способ уведомления при добавлении ответов в тему + 31006 + 31006 + 0 + + + core + public_usercp + notify__new_topic + Notification method to use for new topics and topic digests + Способ уведомления при создании новой темы + 31006 + 31006 + 0 + + + core + public_usercp + notify__report_center + Notify me of reported content + Способ уведомления при появлении жалобы + 31006 + 31006 + 0 + + + core + public_usercp + notification_options + Notification Options + Настройки уведомлений + 31006 + 31006 + 0 + + + core + public_usercp + notify__new_comment + Notify me of new comments + Уведомлять о новых комментариях + 31006 + 31006 + 0 + + + core + public_usercp + notify__reputation_received + Notify me when I receive reputation points + Способ уведомления при изменении моего рейтинга + 31006 + 31006 + 0 + + + core + public_usercp + notifications_info_acp + Not all notification methods may be available for all notification events. + Некоторые методы уведомлений могут быть недоступны для событий в системе. + 31006 + 31006 + 0 + + + core + public_usercp + admin_no_notify_config + The administrator does not allow you to override this configuration + Администратор запретил изменять этот параметр + 31006 + 31006 + 0 + + + core + public_usercp + notopt__email + Email + Email + 31006 + 31006 + 0 + + + core + public_usercp + notopt__pm + Personal Conversation + Личная переписка + 31006 + 31006 + 0 + + + core + public_usercp + notopt__inline + Inline Notifications + Внутрисистемные уведомления + 31006 + 31006 + 0 + + + core + public_usercp + notopt__mobile + Mobile + Мобильный + 31006 + 31006 + 0 + + + core + public_usercp + th_sent + Sent + Отправлено + 31006 + 31006 + 0 + + + core + public_usercp + th_notification + Notification + Уведомление + 31006 + 31006 + 0 + + + core + public_usercp + notifications_table_head + Inline notifications for this user + Внутрисистемные уведомления для пользователя + 31006 + 31006 + 0 + + + core + public_usercp + arch_notifications_head + Saved Notifications + Полученные уведомления + 31006 + 31006 + 0 + + + core + public_usercp + m_notifications + Notification Options + Настройки уведомлений + 31006 + 31006 + 0 + + + core + public_usercp + notifications_none + You have no saved notifications + У вас нет уведомлений + 31006 + 31006 + 0 + + + core + public_usercp + ndel_selected + Delete Selected + Удалить отмеченное + 31006 + 31006 + 0 + + + core + public_usercp + m_arch_notify + Your Notifications + Уведомления + 31006 + 31006 + 0 + + + core + public_usercp + notifyview_date + Sent: + Отправлено: + 31006 + 31006 + 0 + + + core + public_usercp + notify_rem_suc + Notifications successfully removed + Уведомления удалены + 31006 + 31006 + 0 + + + core + public_usercp + no_notify_del + You did not select any notifications to delete + Вы не выбрали уведомления для удаления + 31006 + 31006 + 0 + + + core + public_usercp + like_notify_yes + You have selected to receive notifications + Вы хотите быть уведомлены + 31006 + 31006 + 0 + + + core + public_usercp + like_is_anon + You are liking this content anonymously + Вам нравится это, но вы предпочли не афишировать это + 31006 + 31006 + 0 + + + core + public_usercp + likes_none + You have not liked any content yet + Ничего нет + 31006 + 31006 + 0 + + + core + public_usercp + th_like_notification + Notifications + Уведомления + 31006 + 31006 + 0 + + + core + public_usercp + th_like_anon + Anonymous + Анонимно + 31006 + 31006 + 0 + + + core + public_usercp + th_like_title + Content + Контент + 31006 + 31006 + 0 + + + core + public_usercp + likes_table_head + Listing of liked content for this user + Пользователю нравится + 31006 + 31006 + 0 + + + core + public_usercp + arch_likes_head + Liked Content + Нравится + 31006 + 31006 + 0 + + + core + public_usercp + likes_rem_suc + Liked content successfully updated + Успешно обновлено + 31006 + 31006 + 0 + + + core + public_usercp + no_likes_del + You did not select any liked content to stop liking + Вы ничего не выбрали + 31006 + 31006 + 0 + + + core + public_usercp + tc_sync_options_desc + If you have Facebook syncronized, you may not wish to check all the options as they can overwrite each other + Если у вас уже настроена синхронизация с Facebook, изменение данных параметров могут перекрыть уже настроенные параметры Facebook + 31006 + 31006 + 0 + + + core + public_usercp + tc_disassociate_now + Disassociate Account Now + Убрать + 31006 + 31006 + 0 + + + core + public_usercp + tc_disassociate_desc + This will log you out and remove the account link from Twitter + Позволяет вам убрать связь с Twitter-аккаунтом для данной учетной записи форума. + 31006 + 31006 + 0 + + + core + public_usercp + tc_sync_now + Synchronize Now + Обновить сейчас + 31006 + 31006 + 0 + + + core + public_usercp + tc_disassociate + Disassociate Twitter + Убрать связь с Twitter-аккаунтом + 31006 + 31006 + 0 + + + core + public_usercp + tc_never + Never + никогда + 31006 + 31006 + 0 + + + core + public_usercp + tc_last_syncd + This information is updated once every 3 hours. Last synchronized: + Эта информация обновляется каждые 3 часа. Последний раз: + 31006 + 31006 + 0 + + + core + public_usercp + tc_sync_aboutme + "About Me" with my Twitter "About Me"]]> + "Обо мне" данными из моего Twitter-аккаунта]]> + 31006 + 31006 + 0 + + + core + public_usercp + tc_sync_bgimg + Profile Background with my Twitter background]]> + фоновое изображение профиля фоном из моего Twitter-аккаунта]]> + 31006 + 31006 + 0 + + + core + public_usercp + tc_sync_status_out + Twitter Status with my Forum status (Export your status)]]> + Twitter-статус статусом из моего профиля на форуме]]> + 31006 + 31006 + 0 + + + core + public_usercp + tc_sync_status_in + Forum Status with my Twitter status (Import a status)]]> + статус статусом из моего Twitter-аккаунта]]> + 31006 + 31006 + 0 + + + core + public_usercp + tc_sync_avatar + Avatar with my Twitter picture]]> + аватар картинкой из моего Twitter-аккаунта]]> + 31006 + 31006 + 0 + + + core + public_usercp + tc_sync_photo + Profile Picture with my Twitter picture]]> + фотографию картинкой из моего Twitter-аккаунта]]> + 31006 + 31006 + 0 + + + core + public_usercp + tc_sync_options + Twitter to Forum Account Synchronization Options + Параметры синхронизации учетной записи форума и аккаунта Twitter + 31006 + 31006 + 0 + + + core + public_usercp + tc_logged_in_as + You are logged into Twitter as + Вы вошли в Twitter под + 31006 + 31006 + 0 + + + core + public_usercp + tc_config + You will need to connect with Twitter before you can configure your options. + Вам необходимо связать запись с Twitter-аккаунтом прежде чем вы сможете что-то настроить. + 31006 + 31006 + 0 + + + core + public_usercp + fbp_read_stream_desc + This is required so the board can read your latest status updates and wall posts for use when synchronizing statuses. + Это необходимо чтобы система могла получать ваши статусы и сообщения на вашей стене. + 31006 + 31006 + 0 + + + core + public_usercp + fbp_publish_stream_desc + with your permission.]]> + с вашего разрешения.]]> + 31006 + 31006 + 0 + + + core + public_usercp + fbp_email_access_desc + This is required so the board can send you topic notifications, etc. + Необходимо для того, чтобы система могла высылать вам уведомления о темах и т.п. + 31006 + 31006 + 0 + + + core + public_usercp + fbp_email_access + Email Access + Email доступ + 31006 + 31006 + 0 + + + core + public_usercp + fbp_publish_stream + Publish Stream + Поток публикаци + 31006 + 31006 + 0 + + + core + public_usercp + fbp_read_stream + Read Stream + Поток чтения + 31006 + 31006 + 0 + + + core + public_usercp + fbp_offline_access_desc + with your permission even when you are not actively logged into Facebook.]]> + с вашего разрешения даже когда вы не зашли в Facebook.]]> + 31006 + 31006 + 0 + + + core + public_usercp + fbp_offline_access + Offline Access + Offline доступ + 31006 + 31006 + 0 + + + core + public_usercp + ucp_cust_remove_imgs + Remove background image + Убрать фоновое изображение + 31006 + 31006 + 0 + + + core + public_usercp + fbp_request + Request Permission + Запрос разрешения + 31006 + 31006 + 0 + + + core + public_usercp + fbp_title + Facebook Connect Permission Check + Проверка прав Facebook + 31006 + 31006 + 0 + + + core + public_usercp + ucp_cust_remove_t + Remove All Customizations + Убрать все персонализации + 31006 + 31006 + 0 + + + core + public_usercp + ucp_cust_remove + Remove Customizations + Убрать персонализацию + 31006 + 31006 + 0 + + + core + public_usercp + pp_view_profile + + + 31006 + 31006 + 0 + + + core + public_usercp + pp_bgimg_ext_bad + You can only upload png, jpg, or gif images + Разрешено загружать png, jpg, или gif + 31006 + 31006 + 0 + + + core + public_usercp + pp_bgimg_url_bad + The URL must start with http:// and not contain the following characters: ( * + URL начинаться с http:// и не должен содержать символы: ( * + 31006 + 31006 + 0 + + + core + public_usercp + pp_no_bgimg_upload_permission + You do not have permission to upload a background image. + Вам не разрешего загружать изображение для подложки + 31006 + 31006 + 0 + + + core + public_usercp + ucp_cust_bg_tile_d + If checked, the image will be tiled (good for patterns). If unchecked, the image will be fixed and shown once (good for photos) + При выборе, фон будет заполнен изображением (хорошо для изображений-паттернов). Если опция отключена, то изображение будет зафиксировано на странице и показано единожды (хорошо для фотографий) + 31006 + 31006 + 0 + + + core + public_usercp + ucp_cust_bg_preview + Current Background + Текущий фон + 31006 + 31006 + 0 + + + core + public_usercp + ucp_cust_bg_tile + Tile Image + Заполнить изображением + 31006 + 31006 + 0 + + + core + public_usercp + ucp_cust_bg_color_d + Enter a hex value, EG ff0000 + Введите шестнадцатеричое значение, напр-р ff0000 + 31006 + 31006 + 0 + + + core + public_usercp + ucp_cust_bg_color + Background Color + Цвет + 31006 + 31006 + 0 + + + core + public_usercp + ucp_cust_bg_image_upl_d + + Максимальный размер в КБ: %s + 31006 + 31006 + 0 + + + core + public_usercp + ucp_cust_bg_image_upl + Choose a file to upload + Выберите файл для загрузки + 31006 + 31006 + 0 + + + core + public_usercp + ucp_cust_bg_image_img_d + The URL must start with http://. Only png, jpg and gifs are accepted + Ссылка должна начинаться с http://. В качестве изображений принимаются только png, jpg и gif. + 31006 + 31006 + 0 + + + core + public_usercp + ucp_cust_bg_image_img + Enter a URL to an image + Введите ссылку на изображение + 31006 + 31006 + 0 + + + core + public_usercp + ucp_cust_bg_image + Background Image + Изображение + 31006 + 31006 + 0 + + + core + public_usercp + ucp_cust_bg + Profile Background + Фон профиля + 31006 + 31006 + 0 + + + core + public_usercp + ucp_customize_msg + This page allows you to customize your profile background. These customizations will be shown to all members visiting your profile page. + На данной странице вы можете персонализировать свой профиль, а именно изменить фон. Изменения будут видны всем пользователям, просматривающим ваш профиль. + 31006 + 31006 + 0 + + + core + public_usercp + m_customize + Profile Customization + Персонализация профиля + 31006 + 31006 + 0 + + + core + public_usercp + show_notification_popup_desc + This option will cause a popup to be displayed when there is a new notification for you to review + При включении данной опции, при каждом новом уведомлении будет выводится всплывающее сообщение, сигнализирующее о получении уведомления для вас. + 31006 + 31006 + 0 + + + core + public_usercp + show_notification_popup + Show popup when I receive a new inline notification + Показывать всплывающее сообщение при получении внутрисистемного уведомления + 31006 + 31006 + 0 + + + core + public_usercp + fb_sync_status + Facebook Status with my Forum status (Export your status)]]> + статус в Facebook на статус на форуме.]]> + 31006 + 31006 + 0 + + + core + public_usercp + fb_sync_status_in + Forum Status with my Facebook status (Import a status)]]> + статус на форуме на ваш статус в Facebook.]]> + 31006 + 31006 + 0 + + + core + public_usercp + twitter_revoke + Twitter Connections page to revoke access before clicking the button below]]> + страницу Twitter Connections для отключения доступа форуму прежде чем нажать на кнопку ниже]]> + 31006 + 31006 + 0 + + + core + public_usercp + facebook_av_warning + If you have your Twitter Connect preferences set to import an avatar, it may overwite this preference + Если вы установили импорт аватара из Twitter, данная настройка изменит это + 31006 + 31006 + 0 + + + core + public_usercp + twitter_av_warning + If you have your Facebook Connect preferences set to import an avatar, it may overwite this preference + Если у вас уже настроена синхронизация аватара с Facebook, изменение данной опции перекроет эту настройку + 31006 + 31006 + 0 + + + core + public_usercp + pf__unlimited + Unlimited + Не ограничено + 31006 + 31006 + 0 + + + core + public_usercp + view_notification_logcontent + View content + Просмотр + 31006 + 31006 + 0 + + + core + public_usercp + view_notification_logentry + View notification + Просмотр + 31006 + 31006 + 0 + + + core + public_usercp + remote_no_password_2 + please click here to set a password + нажмите здесь для установки пароля + 31006 + 31006 + 0 + + + core + public_usercp + remote_no_password_1 + If you would like to set a local password for this forum so you can use the mobile skin or log in directly + Вы можете установить локальный пароль, чтобы заходить на форум или мобильную версию напрямую. + 31006 + 31006 + 0 + + + core + public_usercp + remote_no_password + Set a local password + Установить локальный пароль + 31006 + 31006 + 0 + + + core + public_usercp + remote_pass_set + You can set a local password here. This will allow you to log in directly to the forums and browse the site from your mobile device. This is optional and will not change how you currently log in + Вы можете установить локальный пароль, чтобы заходить на форум или мобильную версию напрямую. Установка пароля опциональна и не влияет на существующий процесс авторизации. + 31006 + 31006 + 0 + + + core + public_usercp + enter_pass_remote2 + Confirm your local password + Подтвердите локальный пароль + 31006 + 31006 + 0 + + + core + public_usercp + enter_pass_remote1 + Enter a local password + Введите локальный пароль + 31006 + 31006 + 0 + + + core + public_usercp + goback + Go Back + Вернуться + 31006 + 31006 + 0 + + + core + public_usercp + notificationlog_mar + Mark All Read + Отметить все + 31006 + 31006 + 0 + + + core + public_usercp + deletenotification + Delete + Удалить + 31006 + 31006 + 0 + + + core + public_usercp + m_likesystem + Content You Like + Вам нравится + 31006 + 31006 + 0 + + + core + public_usercp + no_likes_for_del + You did not select any liked content to moderate + Вы ничего не выбрали + 31006 + 31006 + 0 + + + core + public_usercp + update_selected + Update Selected + Обновить + 31006 + 31006 + 0 + + + core + public_usercp + like_mod__change_noanon + Change like preference to visible + Убрать анонимность + 31006 + 31006 + 0 + + + core + public_usercp + like_mod__change_anon + Change like preference to anonymous + Изменить на анонимное + 31006 + 31006 + 0 + + + core + public_usercp + like_mod__change_offline + Change notifications to offline + Изменить уведомления на оффлайновые + 31006 + 31006 + 0 + + + core + public_usercp + like_mod__change_immediate + Change notifications to immediate + Изменить уведомление на мгновенное + 31006 + 31006 + 0 + + + core + public_usercp + like_mod__change_nonotify + Stop notifying me of updates + Не уведомлять меня + 31006 + 31006 + 0 + + + core + public_usercp + like_mod__change_donotify + Notify me of updates + Уведомлять меня об обновлениях + 31006 + 31006 + 0 + + + core + public_usercp + like_mod__delete + Stop liking + Не нравится + 31006 + 31006 + 0 + + + core + public_usercp + like_mod__chose + Choose Action + Выберите действие + 31006 + 31006 + 0 + + + core + public_usercp + like_notify_freq_weekly + Weekly Digest + Еженедельно + 31006 + 31006 + 0 + + + core + public_usercp + like_notify_freq_daily + Daily Digest + Ежедневно + 31006 + 31006 + 0 + + + core + public_usercp + like_notify_freq_offline + Offline + Оффлайн + 31006 + 31006 + 0 + + + core + public_usercp + like_notify_freq_immediate + Immediate + Мгновенно + 31006 + 31006 + 0 + + + core + public_usercp + view_liked_content + View this content you like + Просмотр + 31006 + 31006 + 0 + + + core + public_usercp + th_like_on + Liked On + Понравилось + 31006 + 31006 + 0 + + + core + public_usercp + like_parent_from + from + из + 31006 + 31006 + 0 + + + core + public_usercp + ucp_change_email + Change Email Address + Изменение E-mail адреса + 31006 + 31006 + 0 + + + core + public_usercp + ucp_general_settings + General Settings + Общие настройки + 31006 + 31006 + 0 + + + core + public_usercp + ucp_change_password + Change Password + Изменение пароля + 31006 + 31006 + 0 + + + core + public_usercp + ucp_change_name + Change Display Name + Изменение имени пользователя + 31006 + 31006 + 0 + + + core + public_usercp + ok_email_changed + + Ваш e-mail адрес обновлен. Помните, что с этого момента вам необходимо входить в систему с вашим новым e-mail адресом. + 31006 + 31006 + 0 + + + core + public_usercp + time_-12 + (GMT - 12:00 hours) Enitwetok, Kwajalien + (GMT - 12:00) Эневеток, Кваджалейн + 31006 + 31006 + 0 + + + core + public_usercp + time_-11 + (GMT - 11:00 hours) Midway Island, Samoa + (GMT - 11:00) о.Мидуэй, Самоа + 31006 + 31006 + 0 + + + core + public_usercp + time_-10 + (GMT - 10:00 hours) Hawaii + (GMT - 10:00) Гавайи + 31006 + 31006 + 0 + + + core + public_usercp + time_-9.5 + (GMT - 9:30 hours) French Polynesia + (GMT - 9:30) Французская Полинезия + 31006 + 31006 + 0 + + + core + public_usercp + time_-9 + (GMT - 9:00 hours) Alaska + (GMT - 9:00) Аляска + 31006 + 31006 + 0 + + + core + public_usercp + time_-8 + + (GMT - 8:00) Тихоокеанское время (США и Канада), Тихуана + 31006 + 31006 + 0 + + + core + public_usercp + time_-7 + + (GMT - 7:00) Горное время (США и Канада), Аризона + 31006 + 31006 + 0 + + + core + public_usercp + time_-6 + + (GMT - 6:00) Центральное время (США и Канада), Мехико + 31006 + 31006 + 0 + + + core + public_usercp + time_-5 + + (GMT - 5:00) Восточное время (США и Канада), Богота, Лима, Кито + 31006 + 31006 + 0 + + + core + public_usercp + time_-4.5 + (GMT - 4:30 hours) Bolivarian Time + (GMT - 4:30) Боливарианское время + 31006 + 31006 + 0 + + + core + public_usercp + time_-4 + (GMT - 4:00 hours) Atlantic Time (Canada), Caracas, La Paz + (GMT - 4:00) Атлантическое время (Канада), Каракас, Ла Пас, Сантьяго + 31006 + 31006 + 0 + + + core + public_usercp + time_-3.5 + (GMT - 3:30 hours) Newfoundland + (GMT - 3:30) Ньюфаундленд + 31006 + 31006 + 0 + + + core + public_usercp + time_-3 + (GMT - 3:00 hours) Brazil, Buenos Aires, Falkland Is. + (GMT - 3:00) Бразилия, Буэнос-Айрес, Джорджтаун, Гренландия + 31006 + 31006 + 0 + + + core + public_usercp + time_-2 + (GMT - 2:00 hours) Mid-Atlantic, Ascention Is., St Helena + (GMT - 2:00) Среднеатлантическое время + 31006 + 31006 + 0 + + + core + public_usercp + time_-1 + (GMT - 1:00 hours) Azores, Cape Verde Islands + (GMT - 1:00) Азорские о-ва, о-ва Зеленого мыса + 31006 + 31006 + 0 + + + core + public_usercp + time_0 + (GMT) Casablanca, Dublin, London, Lisbon, Monrovia + (GMT) Касабланка, Дублин, Эдинбург, Лиссабон, Лондон, Монровия + 31006 + 31006 + 0 + + + core + public_usercp + time_1 + (GMT + 1:00 hours) Brussels, Copenhagen, Madrid, Paris + (GMT + 1:00) Амстердам, Берлин, Брюссель, Мадрид, Париж, Рим + 31006 + 31006 + 0 + + + core + public_usercp + time_2 + (GMT + 2:00 hours) Kaliningrad, South Africa + (GMT + 2:00) Каир, Хельсинки, Калининград, Южная Африка, Варшава + 31006 + 31006 + 0 + + + core + public_usercp + time_3 + (GMT + 3:00 hours) Baghdad, Riyadh, Moscow, Nairobi + (GMT + 3:00) Багдад, Эр-Рияд, Москва, Найроби + 31006 + 31006 + 0 + + + core + public_usercp + time_3.5 + (GMT + 3:30 hours) Tehran + (GMT + 3:30) Тегеран + 31006 + 31006 + 0 + + + core + public_usercp + time_4 + (GMT + 4:00 hours) Abu Dhabi, Baku, Muscat, Tbilisi + (GMT + 4:00) Абу-Даби, Баку, Мускат, Тбилиси + 31006 + 31006 + 0 + + + core + public_usercp + time_4.5 + (GMT + 4:30 hours) Kabul + (GMT + 4:30) Кабул + 31006 + 31006 + 0 + + + core + public_usercp + time_5 + (GMT + 5:00 hours) Ekaterinburg, Karachi, Tashkent + (GMT + 5:00) Екатеринбург, Исламабад, Карачи, Ташкент + 31006 + 31006 + 0 + + + core + public_usercp + time_5.5 + (GMT + 5:30 hours) Bombay, Calcutta, Madras, New Delhi + (GMT + 5:30) Бомбей, Калькутта, Мадрас, Нью-Дели + 31006 + 31006 + 0 + + + core + public_usercp + time_5.75 + (GMT + 5:45 hours) Kathmandu + (GMT + 5:45) Катманду + 31006 + 31006 + 0 + + + core + public_usercp + time_6 + (GMT + 6:00 hours) Almaty, Bangladesh, Dhakra + (GMT + 6:00) Алма-Ата, Коломбо, Дхака, Новосибирск, Омск + 31006 + 31006 + 0 + + + core + public_usercp + time_6.5 + (GMT + 6:30 hours) Yangon, Naypyidaw, Bantam + (GMT + 6:30) Янгон, Найпьидо, Бантам + 31006 + 31006 + 0 + + + core + public_usercp + time_7 + (GMT + 7:00 hours) Bangkok, Hanoi, Jakarta + (GMT + 7:00) Бангкок, Ханой, Джакарта, Красноярск + 31006 + 31006 + 0 + + + core + public_usercp + time_8 + (GMT + 8:00 hours) Hong Kong, Perth, Singapore, Taipei + (GMT + 8:00) Пекин, Гонконг, Перт, Сингапур, Тайпей + 31006 + 31006 + 0 + + + core + public_usercp + time_8.75 + (GMT + 8:45 hours) Caiguna, Eucla + (GMT + 8:45) Кейгуна, Юкла + 31006 + 31006 + 0 + + + core + public_usercp + time_9 + (GMT + 9:00 hours) Osaka, Sapporo, Seoul, Tokyo, Yakutsk + (GMT + 9:00) Осака, Саппоро, Сеул, Токио, Якутск + 31006 + 31006 + 0 + + + core + public_usercp + time_9.5 + (GMT + 9:30 hours) Adelaide, Darwin + (GMT + 9:30) Аделаида, Дарвин + 31006 + 31006 + 0 + + + core + public_usercp + time_10 + (GMT + 10:00 hours) Melbourne, Papua New Guinea, Sydney + (GMT + 10:00) Канберра, Мельбурн, Гуам, Сидней, Владивосток + 31006 + 31006 + 0 + + + core + public_usercp + time_10.5 + (GMT + 10:30 hours) Lord Howe Island + (GMT + 10:30) Остров Лорд-Хау + 31006 + 31006 + 0 + + + core + public_usercp + time_11 + (GMT + 11:00 hours) Magadan, New Caledonia, Solomon Is. + (GMT + 11:00) Магадан, Новая Каледония, Соломоновы о-ва + 31006 + 31006 + 0 + + + core + public_usercp + time_11.5 + (GMT + 11:30 hours) Burnt Pine, Kingston + (GMT + 11:30) Бернт Пайн, Кингстон + 31006 + 31006 + 0 + + + core + public_usercp + time_12 + (GMT + 12:00 hours) Auckland, Fiji, Marshall Islands + (GMT + 12:00) Окленд, Фиджи, Камчатка, Веллингтон, Маршалловы острова + 31006 + 31006 + 0 + + + core + public_usercp + time_12.75 + (GMT + 12:45 hours) Chatham Islands + (GMT + 12:45) Острова Чатем + 31006 + 31006 + 0 + + + core + public_usercp + time_13 + (GMT + 13:00 hours) Kamchatka, Anadyr + (GMT + 13:00) Камчатка, Анадырь + 31006 + 31006 + 0 + + + core + public_usercp + time_14 + (GMT + 14:00 hours) Kiritimati + (GMT + 14:00) Киритимати (остров Рождества) + 31006 + 31006 + 0 + + + core + public_usercp + ucp__settings_saved + Settings Saved + Настройки сохранены + 31006 + 31006 + 0 + + + core + public_usercp + ucp__save_changes + Save Changes + Сохранить + 31006 + 31006 + 0 + + + core + public_usercp + m_vkontakte + Соединение с Вконтакте + Соединение с Вконтакте + 31003 + 31003 + 0 + + + core + public_usercp + vk_config + Необходимо иметь связанный с Vkontakte аккаунт прежде чем что-то настраивать. + Необходимо иметь связанный с Вконтакте аккаунт прежде чем что-то настраивать. + 31004 + 31004 + 0 + + + core + public_usercp + vk_disassociate + Убрать связь с аккаунтом Вконтакте + Убрать связь с аккаунтом Вконтакте + 31004 + 31004 + 0 + + + core + public_usercp + vk_disassociate_desc + Позволяет вам убрать связь с аккаунтом Вконтакте для данной учетной записи форума. + Позволяет вам убрать связь с аккаунтом Вконтакте для данной учетной записи форума. + 31004 + 31004 + 0 + + + core + public_usercp + vk_logged_in + Вы вошли в Вконтакте + Вы вошли в Вконтакте + 31004 + 31004 + 0 + + + core + public_usercp + vk_revoke + страницу Приложения Вконтакте для отключения доступа форуму прежде чем нажать на кнопку ниже]]> + страницу Приложения Вконтакте для отключения доступа форуму прежде чем нажать на кнопку ниже]]> + 31004 + 31004 0
    diff --git a/upload/admin/applications/core/xml/versions.xml b/upload/admin/applications/core/xml/versions.xml index 325e75bc..d29ef79c 100644 --- a/upload/admin/applications/core/xml/versions.xml +++ b/upload/admin/applications/core/xml/versions.xml @@ -236,4 +236,36 @@ 3.0.5 30012 + + 3.1.0 Beta 1 + 31000 + + + 3.1.0 Beta 2 + 31001 + + + 3.1.0 Beta 3 + 31002 + + + 3.1.0 + 31003 + + + 3.1.1 + 31004 + + + 3.1.2 + 31005 + + + 3.1.3 + 31006 + + + 3.1.4 + 31007 + \ No newline at end of file diff --git a/upload/admin/applications/forums/app_class_forums.php b/upload/admin/applications/forums/app_class_forums.php index f2559f3f..f7cf663f 100644 --- a/upload/admin/applications/forums/app_class_forums.php +++ b/upload/admin/applications/forums/app_class_forums.php @@ -1,19 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Forums application initialization - * Last Updated: $LastChangedDate: 2009-12-01 17:42:17 -0500 (Tue, 01 Dec 2009) $ + * Last Updated: $LastChangedDate: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * * - * @author $Author: josh $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 14th May 2003 - * @version $Rev: 5501 $ + * @version $Rev: 7003 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -27,7 +28,6 @@ class app_class_forums /**#@+ * Registry Object Shortcuts * - * @access protected * @var object */ protected $registry; @@ -36,13 +36,14 @@ class app_class_forums protected $request; protected $lang; protected $member; + protected $memberData; protected $cache; + protected $caches; /**#@-*/ /** * Constructor * - * @access public * @param object ipsRegistry reference * @return void */ @@ -64,9 +65,9 @@ class app_class_forums try { require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" ); - require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/admin_forum_functions.php" ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/admin_forum_functions.php", 'admin_forum_functions', 'forums' ); - $this->registry->setClass( 'class_forums', new admin_forum_functions( $registry ) ); + $this->registry->setClass( 'class_forums', new $classToLoad( $registry ) ); $this->registry->getClass('class_forums')->strip_invisible = 0; } catch( Exception $error ) @@ -78,8 +79,8 @@ class app_class_forums { try { - require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" ); - $this->registry->setClass( 'class_forums', new class_forums( $registry ) ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' ); + $this->registry->setClass( 'class_forums', new $classToLoad( $registry ) ); $this->registry->getClass('class_forums')->strip_invisible = 1; } catch( Exception $error ) @@ -117,7 +118,7 @@ class app_class_forums 'where' => "tid=" . $this->request['t'], ) ); } - + $this->registry->getClass('class_forums')->topic_cache = $topic; $this->request['f'] = $topic['forum_id']; @@ -132,14 +133,14 @@ class app_class_forums // Set up moderators //----------------------------------------- - $this->memberData = $this->registry->getClass('class_forums')->setUpModerator( $this->memberData ); + $this->memberData = IPSMember::setUpModerator( $this->memberData ); } /** - * Do some set up after ipsRegistry::init() - * - * @access public - */ + * Do some set up after ipsRegistry::init() + * + * @return void + */ public function afterOutputInit() { if ( isset( $_GET['showtopic'] ) AND $_GET['showtopic'] != '' AND is_array( $this->registry->getClass('class_forums')->topic_cache ) ) @@ -160,11 +161,16 @@ class app_class_forums /* Add canonical tag */ $this->registry->getClass('output')->addCanonicalTag( ( $this->request['st'] ) ? 'showtopic=' . $topic['tid'] . '&st=' . $this->request['st'] : 'showtopic=' . $topic['tid'], $topic['title_seo'], 'showtopic' ); + + /* Store root doc URL */ + $this->registry->getClass('output')->storeRootDocUrl( $this->registry->getClass('output')->buildSEOUrl( 'showtopic=' . $topic['tid'], 'publicNoSession', $topic['title_seo'], 'showtopic' ) ); } else if ( isset( $_GET['showforum'] ) AND $_GET['showforum'] != '' ) { - $data = $this->registry->getClass('class_forums')->forumsFetchData( $_GET['showforum'] ); - + $_GET['showforum'] = intval($_GET['showforum']); + ipsRegistry::$request['showforum'] = intval(ipsRegistry::$request['showforum']); + + $data = $this->registry->getClass('class_forums')->forumsFetchData( $_GET['showforum'] ); if ( IPB_USE_ONLY_ID_FURL ) { $data['name_seo'] = $data['id']; @@ -181,6 +187,32 @@ class app_class_forums if( $data['id'] ) { $this->registry->getClass('output')->addCanonicalTag( ( $this->request['st'] ) ? 'showforum=' . $data['id'] . '&st=' . $this->request['st'] : 'showforum=' . $data['id'], $data['name_seo'], 'showforum' ); + + /* Store root doc URL */ + $this->registry->getClass('output')->storeRootDocUrl( $this->registry->getClass('output')->buildSEOUrl( 'showforum=' . $data['id'], 'publicNoSession', $data['name_seo'], 'showforum' ) ); + } + } + else if ( isset( $_GET['showannouncement'] ) AND $_GET['showannouncement'] != '' ) + { + //$announce = $this->DB->buildAndFetch( array( 'select' => 'announce_id, announce_title', + // 'from' => 'announcements', + // 'where' => 'announce_id=' . intval( $_GET['showannouncement'] ) ) ); + $announce = $this->caches['announcements'][ intval( $_GET['showannouncement'] ) ]; + + if ( $announce['announce_id'] ) + { + $_seoTitle = $announce['announce_seo_title'] ? $announce['announce_seo_title'] : IPSText::makeSeoTitle( $announce['announce_title'] ); + + $this->registry->getClass('output')->checkPermalink( $_seoTitle ); + + /* Add canonical tag */ + if( $announce['announce_id'] ) + { + $this->registry->getClass('output')->addCanonicalTag( 'showannouncement=' . $announce['announce_id'] . ( $_GET['f'] ? '&f=' . intval($_GET['f']) : '&f=0' ), $_seoTitle, 'showannouncement' ); + + /* Store root doc URL */ + $this->registry->getClass('output')->storeRootDocUrl( $this->registry->getClass('output')->buildSEOUrl( 'showannouncement=' . $announce['announce_id'] . ( $_GET['f'] ? '&f=' . intval($_GET['f']) : '&f=0' ), 'publicNoSession', $_seoTitle, 'showannouncement' ) ); + } } } } diff --git a/upload/admin/applications/forums/extensions/admin/group_form.php b/upload/admin/applications/forums/extensions/admin/group_form.php index 13c00cf6..b5af91d0 100644 --- a/upload/admin/applications/forums/extensions/admin/group_form.php +++ b/upload/admin/applications/forums/extensions/admin/group_form.php @@ -1,106 +1,107 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class admin_group_form__forums implements admin_group_form -{ - /** - * Tab name - * This can be left blank and the application title will - * be used - * - * @access public - * @var string Tab name - */ - public $tab_name = ""; - - - /** - * Returns content for the page. - * - * @access public - * @author Brandon Farber - * @param array Group data - * @param integer Number of tabs used so far - * @return array Array of tabs, content - */ - public function getDisplayContent( $group=array(), $tabsUsed = 2 ) - { - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = ipsRegistry::getClass('output')->loadTemplate('cp_skin_group_form', 'forums'); - - //----------------------------------------- - // Load lang - //----------------------------------------- - - ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_forums' ), 'forums' ); - - //----------------------------------------- - // Show... - //----------------------------------------- - - return array( 'tabs' => $this->html->acp_group_form_tabs( $group, ( $tabsUsed + 1 ) ), 'content' => $this->html->acp_group_form_main( $group, ( $tabsUsed + 1 ) ), 'tabsUsed' => 1 ); - } - - /** - * Process the entries for saving and return - * - * @access public - * @author Brandon Farber - * @return array Array of keys => values for saving - */ - public function getForSave() - { - $return = array( - 'g_other_topics' =>ipsRegistry::$request['g_other_topics'], - 'g_post_new_topics' =>ipsRegistry::$request['g_post_new_topics'], - 'g_reply_own_topics' =>ipsRegistry::$request['g_reply_own_topics'], - 'g_reply_other_topics' =>ipsRegistry::$request['g_reply_other_topics'], - 'g_edit_posts' =>ipsRegistry::$request['g_edit_posts'], - 'g_edit_cutoff' =>ipsRegistry::$request['g_edit_cutoff'], - 'g_delete_own_posts' =>ipsRegistry::$request['g_delete_own_posts'], - 'g_open_close_posts' =>ipsRegistry::$request['g_open_close_posts'], - 'g_delete_own_topics' =>ipsRegistry::$request['g_delete_own_topics'], - 'g_post_polls' =>ipsRegistry::$request['g_post_polls'], - 'g_vote_polls' =>ipsRegistry::$request['g_vote_polls'], - 'g_can_remove' =>ipsRegistry::$request['g_can_remove'] ? intval(ipsRegistry::$request['g_can_remove'] ) : 0, - 'g_append_edit' =>ipsRegistry::$request['g_append_edit'], - 'g_avoid_q' =>ipsRegistry::$request['g_avoid_q'], - 'g_avoid_flood' =>ipsRegistry::$request['g_avoid_flood'], - 'g_post_closed' =>ipsRegistry::$request['g_post_closed'], - 'g_edit_topic' =>ipsRegistry::$request['g_edit_topic'], - 'g_topic_rate_setting' => intval(ipsRegistry::$request['g_topic_rate_setting']), - 'g_mod_preview' => ipsRegistry::$request['g_mod_preview'], - 'g_mod_post_unit' => intval( ipsRegistry::$request['g_mod_post_unit'] ), - 'g_ppd_unit' => intval( ipsRegistry::$request['g_ppd_unit'] ), - 'g_ppd_limit' => intval( ipsRegistry::$request['g_ppd_limit'] ), - ); - - return $return; - } - - + + * Invision Power Services + * IP.Board v3.1.4 + * Group property updater (Forums) + * Last Updated: $Date: 2010-09-29 20:23:38 -0400 (Wed, 29 Sep 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 6925 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class admin_group_form__forums implements admin_group_form +{ + /** + * Tab name + * This can be left blank and the application title will + * be used + * + * @access public + * @var string Tab name + */ + public $tab_name = ""; + + + /** + * Returns content for the page. + * + * @access public + * @author Brandon Farber + * @param array Group data + * @param integer Number of tabs used so far + * @return array Array of tabs, content + */ + public function getDisplayContent( $group=array(), $tabsUsed = 2 ) + { + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = ipsRegistry::getClass('output')->loadTemplate('cp_skin_group_form', 'forums'); + + //----------------------------------------- + // Load lang + //----------------------------------------- + + ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_forums' ), 'forums' ); + + //----------------------------------------- + // Show... + //----------------------------------------- + + return array( 'tabs' => $this->html->acp_group_form_tabs( $group, ( $tabsUsed + 1 ) ), 'content' => $this->html->acp_group_form_main( $group, ( $tabsUsed + 1 ) ), 'tabsUsed' => 1 ); + } + + /** + * Process the entries for saving and return + * + * @access public + * @author Brandon Farber + * @return array Array of keys => values for saving + */ + public function getForSave() + { + $return = array( + 'g_other_topics' =>ipsRegistry::$request['g_other_topics'], + 'g_post_new_topics' =>ipsRegistry::$request['g_post_new_topics'], + 'g_reply_own_topics' =>ipsRegistry::$request['g_reply_own_topics'], + 'g_reply_other_topics' =>ipsRegistry::$request['g_reply_other_topics'], + 'g_edit_posts' =>ipsRegistry::$request['g_edit_posts'], + 'g_edit_cutoff' =>ipsRegistry::$request['g_edit_cutoff'], + 'g_delete_own_posts' =>ipsRegistry::$request['g_delete_own_posts'], + 'g_open_close_posts' =>ipsRegistry::$request['g_open_close_posts'], + 'g_delete_own_topics' =>ipsRegistry::$request['g_delete_own_topics'], + 'g_post_polls' =>ipsRegistry::$request['g_post_polls'], + 'g_vote_polls' =>ipsRegistry::$request['g_vote_polls'], + 'g_append_edit' =>ipsRegistry::$request['g_append_edit'], + 'g_avoid_q' =>ipsRegistry::$request['g_avoid_q'], + 'g_avoid_flood' =>ipsRegistry::$request['g_avoid_flood'], + 'g_post_closed' =>ipsRegistry::$request['g_post_closed'], + 'g_edit_topic' =>ipsRegistry::$request['g_edit_topic'], + 'g_topic_rate_setting' => intval(ipsRegistry::$request['g_topic_rate_setting']), + 'g_mod_preview' => ipsRegistry::$request['g_mod_preview'], + 'g_mod_post_unit' => intval( ipsRegistry::$request['g_mod_post_unit'] ), + 'g_ppd_unit' => intval( ipsRegistry::$request['g_ppd_unit'] ), + 'g_ppd_limit' => intval( ipsRegistry::$request['g_ppd_limit'] ), + ); + + return $return; + } + + } \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/admin/index.html b/upload/admin/applications/forums/extensions/admin/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/extensions/admin/index.html +++ b/upload/admin/applications/forums/extensions/admin/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/admin/member_form.php b/upload/admin/applications/forums/extensions/admin/member_form.php index 9971c5cf..548ddbc4 100644 --- a/upload/admin/applications/forums/extensions/admin/member_form.php +++ b/upload/admin/applications/forums/extensions/admin/member_form.php @@ -1,138 +1,140 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class admin_member_form__forums implements admin_member_form -{ - /** - * Tab name - * This can be left blank and the application title will - * be used - * - * @access public - * @var string Tab name - */ - public $tab_name = ""; - - - /** - * Returns sidebar links for this tab - * You may return an empty array or FALSE to not have - * any links show in the sidebar for this block. - * - * The links must have 'section=xxxxx&module=xxxxx[&do=xxxxxx]'. The rest of the URL - * is added automatically. - * - * The image must be a full URL or blank to use a default image. - * - * Use the format: - * $array[] = array( 'img' => '', 'url' => '', 'title' => '' ); - * - * @access public - * @author Matt Mecham - * @param array Member data - * @return array Array of links - */ - public function getSidebarLinks( $member=array() ) - { - - //----------------------------------------- - // Load lang - //----------------------------------------- - - ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_forums' ), 'forums' ); - - - $array = array(); - - $array[] = array( 'img' => '', - 'url' => 'section=tools&module=tools&do=deleteposts', - 'title' => ipsRegistry::getClass('class_localization')->words['m_deltitle'] ); - - $array[] = array( 'img' => '', - 'url' => 'section=tools&module=tools&do=deletesubscriptions', - 'title' => ipsRegistry::getClass('class_localization')->words['m_delsubs'] ); - - return $array; - } - - /** - * Returns content for the page. - * - * @access public - * @author Matt Mecham - * @param array Member data - * @return array Array of tabs, content - */ - public function getDisplayContent( $member=array() ) - { - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = ipsRegistry::getClass('output')->loadTemplate('cp_skin_member_form', 'forums'); - - //----------------------------------------- - // Load lang - //----------------------------------------- - - ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_forums' ), 'forums' ); - ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_member_form' ), 'forums' ); - - //----------------------------------------- - // Get member data - //----------------------------------------- - - // $member = IPSMember::load( $member['member_id'], 'extendedProfile' ); - $member['_avatar'] = str_replace( ' $this->html->acp_member_form_tabs( $member ), 'content' => $this->html->acp_member_form_main( $member ) ); - } - - /** - * Process the entries for saving and return - * - * @access public - * @author Brandon Farber - * @return array Multi-dimensional array (core, extendedProfile) for saving - */ - public function getForSave() - { - $return = array( 'core' => array(), 'extendedProfile' => array() ); - - $return['core']['posts'] = intval(ipsRegistry::$request['posts']); - $return['core']['view_avs'] = intval(ipsRegistry::$request['view_avs']); - $return['core']['view_img'] = intval(ipsRegistry::$request['view_img']); - $return['core']['restrict_post'] = ipsRegistry::$request['post_indef'] ? 1 : ( ipsRegistry::$request['post_timespan'] > 0 ? IPSMember::processBanEntry( array( 'timespan' => intval(ipsRegistry::$request['post_timespan']), 'unit' => ipsRegistry::$request['post_units'] ) ) : '' ); - $return['core']['mod_posts'] = ipsRegistry::$request['mod_indef'] ? 1 : ( ipsRegistry::$request['mod_timespan'] > 0 ? IPSMember::processBanEntry( array( 'timespan' => intval(ipsRegistry::$request['mod_timespan']), 'unit' => ipsRegistry::$request['mod_units'] ) ) : '' ); - $return['core']['org_perm_id'] = ipsRegistry::$request['org_perm_id'] ? ',' . implode( ",", ipsRegistry::$request['org_perm_id'] ) . ',' : ''; - - return $return; - } - - + + * Invision Power Services + * IP.Board v3.1.4 + * Member property updater (AJAX) + * Last Updated: $Date: 2010-03-22 22:39:27 -0400 (Mon, 22 Mar 2010) $ + * + * + * @author $Author: josh $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Revision: 5986 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class admin_member_form__forums implements admin_member_form +{ + /** + * Tab name + * This can be left blank and the application title will + * be used + * + * @access public + * @var string Tab name + */ + public $tab_name = ""; + + + /** + * Returns sidebar links for this tab + * You may return an empty array or FALSE to not have + * any links show in the sidebar for this block. + * + * The links must have 'section=xxxxx&module=xxxxx[&do=xxxxxx]'. The rest of the URL + * is added automatically. + * + * The image must be a full URL or blank to use a default image. + * + * Use the format: + * $array[] = array( 'img' => '', 'url' => '', 'title' => '' ); + * + * @access public + * @author Matt Mecham + * @param array Member data + * @return array Array of links + */ + public function getSidebarLinks( $member=array() ) + { + + //----------------------------------------- + // Load lang + //----------------------------------------- + + ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_forums' ), 'forums' ); + + + $array = array(); + + $array[] = array( 'img' => '', + 'url' => 'section=tools&module=tools&do=deleteposts', + 'title' => ipsRegistry::getClass('class_localization')->words['m_deltitle'] ); + + $array[] = array( 'img' => '', + 'url' => 'section=tools&module=tools&do=deletesubscriptions', + 'title' => ipsRegistry::getClass('class_localization')->words['m_delsubs'] ); + + return $array; + } + + /** + * Returns content for the page. + * + * @access public + * @author Matt Mecham + * @param array Member data + * @return array Array of tabs, content + */ + public function getDisplayContent( $member=array(), $tabsUsed=5 ) + { + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = ipsRegistry::getClass('output')->loadTemplate('cp_skin_member_form', 'forums'); + + //----------------------------------------- + // Load lang + //----------------------------------------- + + ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_forums' ), 'forums' ); + ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_member_form' ), 'forums' ); + + //----------------------------------------- + // Get member data + //----------------------------------------- + + // $member = IPSMember::load( $member['member_id'], 'extendedProfile' ); + $member['_avatar'] = str_replace( ' $this->html->acp_member_form_tabs( $member, ( $tabsUsed + 1 ) ), 'content' => $this->html->acp_member_form_main( $member, ( $tabsUsed + 1 ) ), 'tabsUsed' => 1 ); + } + + /** + * Process the entries for saving and return + * + * @access public + * @author Brandon Farber + * @return array Multi-dimensional array (core, extendedProfile) for saving + */ + public function getForSave() + { + $return = array( 'core' => array(), 'extendedProfile' => array() ); + + $return['core']['posts'] = intval(ipsRegistry::$request['posts']); + $return['core']['view_avs'] = intval(ipsRegistry::$request['view_avs']); + $return['core']['view_img'] = intval(ipsRegistry::$request['view_img']); + $return['core']['restrict_post'] = ipsRegistry::$request['post_indef'] ? 1 : ( ipsRegistry::$request['post_timespan'] > 0 ? IPSMember::processBanEntry( array( 'timespan' => intval(ipsRegistry::$request['post_timespan']), 'unit' => ipsRegistry::$request['post_units'] ) ) : '' ); + $return['core']['mod_posts'] = ipsRegistry::$request['mod_indef'] ? 1 : ( ipsRegistry::$request['mod_timespan'] > 0 ? IPSMember::processBanEntry( array( 'timespan' => intval(ipsRegistry::$request['mod_timespan']), 'unit' => ipsRegistry::$request['mod_units'] ) ) : '' ); + $return['core']['org_perm_id'] = ipsRegistry::$request['org_perm_id'] ? ',' . implode( ",", ipsRegistry::$request['org_perm_id'] ) . ',' : ''; + + return $return; + } + + } \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/attachments/index.html b/upload/admin/applications/forums/extensions/attachments/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/forums/extensions/attachments/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/sources/classes/attach/plugin_post.php b/upload/admin/applications/forums/extensions/attachments/plugin_post.php similarity index 95% rename from upload/admin/applications/core/sources/classes/attach/plugin_post.php rename to upload/admin/applications/forums/extensions/attachments/plugin_post.php index 9eff677b..7c89b79e 100644 --- a/upload/admin/applications/core/sources/classes/attach/plugin_post.php +++ b/upload/admin/applications/forums/extensions/attachments/plugin_post.php @@ -1,19 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * IP.Board post attachments plugin - * Last Updated: $Date: 2009-09-22 17:31:43 -0400 (Tue, 22 Sep 2009) $ + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * * - * @author $Author: josh $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Core - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 6/24/2008 - * @version $Revision: 5141 $ + * @version $Revision: 7003 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -27,7 +28,6 @@ class plugin_post extends class_attach /** * Module type * - * @access public * @var string */ public $module = 'post'; @@ -35,7 +35,6 @@ class plugin_post extends class_attach /** * Constructor * - * @access public * @param object ipsRegistry reference * @return void */ @@ -48,8 +47,8 @@ class plugin_post extends class_attach { try { - require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" ); - $this->registry->setClass( 'class_forums', new class_forums( $registry ) ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' ); + $this->registry->setClass( 'class_forums', new $classToLoad( $registry ) ); } catch( Exception $error ) { @@ -59,14 +58,13 @@ class plugin_post extends class_attach $this->registry->getClass('class_forums')->strip_invisible = 1; $this->registry->getClass('class_forums')->forumsInit(); - $this->memberData = $this->registry->getClass('class_forums')->setUpModerator( $this->memberData ); + $this->memberData = IPSMember::setUpModerator( $this->memberData ); } } /** * Checks the attachment and checks for download / show perms * - * @access public * @param integer Attachment id * @return array Attachment data */ @@ -197,7 +195,6 @@ class plugin_post extends class_attach /** * Check the attachment and make sure its OK to display * - * @access public * @param array Array of ids * @param array Array of relationship ids * @return array Attachment data @@ -224,6 +221,7 @@ class plugin_post extends class_attach if ( is_array( $rel_ids ) and count( $rel_ids ) ) { + $rel_ids = array_map( 'intval', $rel_ids ); // We need to reset the array - this query bit will return everything we need, but // if we "OR" join the above query bit with this one, it causes bigger mysql loads $query_bits = array(); @@ -298,7 +296,6 @@ class plugin_post extends class_attach /** * Recounts number of attachments for the articles row * - * @access public * @param string Post key * @param integer Related ID * @param array Arguments for query @@ -338,7 +335,6 @@ class plugin_post extends class_attach /** * Recounts number of attachments for the articles row * - * @access public * @param array Attachment data * @return boolean */ @@ -416,7 +412,6 @@ class plugin_post extends class_attach * Returns TRUE or FALSE * IT really does * - * @access public * @param array Ids to check against * @return boolean */ @@ -430,7 +425,6 @@ class plugin_post extends class_attach * Returns TRUE or FALSE * IT really does * - * @access public * @param array Attachment data * @return boolean */ @@ -510,14 +504,13 @@ class plugin_post extends class_attach * Return 'space_allowed' as 0 to allow unlimited uploads * Return 'max_single_upload' as 0 to not set a limit * - * @access public * @param string MD5 post key * @param id Member ID * @return array [ 'space_used', 'space_left', 'space_allowed', 'max_single_upload' ] */ public function getSpaceAllowance( $post_key='', $member_id='' ) { - $max_php_size = intval( IPSLib::getMaxPostSize() ); + $max_php_size = IPSLib::getMaxPostSize(); $member_id = intval( $member_id ? $member_id : $this->memberData['member_id'] ); $forum_id = intval( ipsRegistry::$request['forum_id'] ? ipsRegistry::$request['forum_id'] : ipsRegistry::$request['f'] ); $space_left = 0; @@ -525,7 +518,7 @@ class plugin_post extends class_attach $space_allowed = 0; $max_single_upload = 0; $space_calculated = 0; - + if ( $post_key ) { //----------------------------------------- @@ -687,7 +680,6 @@ class plugin_post extends class_attach * You can omit any of these settings and IPB will use the default * settings (which are the ones entered into the ACP for post thumbnails) * - * @access public * @return boolean */ public function getSettings() @@ -696,5 +688,4 @@ class plugin_post extends class_attach return true; } - } \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/coreExtensions.php b/upload/admin/applications/forums/extensions/coreExtensions.php index 59d335fd..4138f3ea 100644 --- a/upload/admin/applications/forums/extensions/coreExtensions.php +++ b/upload/admin/applications/forums/extensions/coreExtensions.php @@ -1,636 +1,828 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -$_PERM_CONFIG = array( 'Forum' ); - -class forumsPermMappingForum -{ - /** - * Mapping of keys to columns - * - * @access private - * @var array - */ - private $mapping = array( - 'view' => 'perm_view', - 'read' => 'perm_2', - 'reply' => 'perm_3', - 'start' => 'perm_4', - 'upload' => 'perm_5', - 'download' => 'perm_6' - ); - - /** - * Mapping of keys to names - * - * @access private - * @var array - */ - private $perm_names = array( - 'view' => 'Show Forum', - 'read' => 'Read Topics', - 'reply' => 'Reply Topics', - 'start' => 'Start Topics', - 'upload' => 'Upload', - 'download' => 'Download', - ); - - /** - * Mapping of keys to background colors for the form - * - * @access private - * @var array - */ - private $perm_colors = array( - 'view' => '#fff0f2', - 'read' => '#effff6', - 'reply' => '#edfaff', - 'start' => '#f0f1ff', - 'upload' => '#fffaee', - 'download' => '#ffeef9', - ); - - /** - * Method to pull the key/column mapping - * - * @access public - * @return array - */ - public function getMapping() - { - return $this->mapping; - } - - /** - * Method to pull the key/name mapping - * - * @access public - * @return array - */ - public function getPermNames() - { - return $this->perm_names; - } - - /** - * Method to pull the key/color mapping - * - * @access public - * @return array - */ - public function getPermColors() - { - return $this->perm_colors; - } - - /** - * Retrieve the permission items - * - * @access public - * @return array - */ - public function getPermItems() - { - require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/forums/class_forums.php' ); - require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/forums/admin_forum_functions.php' ); - - $forumfunc = new admin_forum_functions( ipsRegistry::instance() ); - $forumfunc->forumsInit(); - - $forum_data = $forumfunc->adForumsForumData(); - - $_return_arr = array(); - foreach( $forum_data as $r ) - { - $return_arr[$r['id']] = array( - 'title' => $r['depthed_name'], - 'perm_view' => $r['perm_view'], - 'perm_2' => $r['perm_2'], - 'perm_3' => $r['perm_3'], - 'perm_4' => $r['perm_4'], - 'perm_5' => $r['perm_5'], - 'perm_6' => $r['perm_6'], - 'perm_7' => $r['perm_7'], - 'restrict' => $r['parent_id'] == 'root' ? 'perm_view' : '', - ); - } - - return $return_arr; - - } -} - -/** - * Invision Power Services - * IP.Board v3.0.5 - * Item Marking - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ - * - * @author $Author: bfarber $ - * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board - * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Rev: 4948 $ - * - */ - -class itemMarking__forums -{ - /** - * Field Convert Data Remap Array - * - * This is where you can map your app_key_# numbers to application savvy fields - * - * @access private - * @var array - */ - private $_convertData = array( 'forumID' => 'item_app_key_1' ); - - /**#@+ - * Registry Object Shortcuts - * - * @access protected - * @var object - */ - protected $registry; - protected $DB; - protected $settings; - protected $request; - protected $lang; - protected $member; - protected $cache; - /**#@-*/ - - /** - * I'm a constructor, twisted constructor - * - * @access public - * @param object ipsRegistry reference - * @return void - */ - public function __construct( ipsRegistry $registry ) - { - /* Make objects */ - $this->registry = $registry; - $this->DB = $this->registry->DB(); - $this->settings =& $this->registry->fetchSettings(); - $this->request =& $this->registry->fetchRequest(); - $this->lang = $this->registry->getClass('class_localization'); - $this->member = $this->registry->member(); - $this->memberData =& $this->registry->member()->fetchMemberData(); - $this->cache = $this->registry->cache(); - $this->caches =& $this->registry->cache()->fetchCaches(); - } - - /** - * Convert Data - * Takes an array of app specific data and remaps it to the DB table fields - * - * @access public - * @param array - * @return array - */ - public function convertData( $data ) - { - $_data = array(); - - foreach( $data as $k => $v ) - { - if ( isset($this->_convertData[$k]) ) - { - # Make sure we use intval here as all 'forum' app fields - # are integers. - $_data[ $this->_convertData[ $k ] ] = intval( $v ); - } - else - { - $_data[ $k ] = $v; - } - } - - return $_data; - } - - /** - * Fetch unread count - * - * Grab the number of items truly unread - * This is called upon by 'markRead' when the number of items - * left hits zero (or less). - * - * - * @access public - * @param array Array of data - * @param array Array of read itemIDs - * @param int Last global reset - * @return integer Last unread count - */ - public function fetchUnreadCount( $data, $readItems, $lastReset ) - { - $count = 0; - $lastItem = 0; - $approved = $this->memberData['is_mod'] ? ' AND approved IN (0,1) ' : ' AND approved=1 '; - $readItems = is_array( $readItems ) ? $readItems : array( 0 ); - - if ( $data['forumID'] ) - { - $_count = $this->DB->buildAndFetch( array( - 'select' => 'COUNT(*) as cnt, MIN(last_post) as lastItem', - 'from' => 'topics', - 'where' => "forum_id=" . intval( $data['forumID'] ) . " {$approved} AND tid NOT IN(".implode(",",array_keys($readItems)).") AND last_post > ".intval($lastReset) . " AND state != 'link'" - ) ); - - $count = intval( $_count['cnt'] ); - $lastItem = intval( $_count['lastItem'] ); - } - - return array( 'count' => $count, - 'lastItem' => $lastItem ); - } -} - -/** - * Invision Power Services - * IP.Board v3.0.5 - * Fetch Skin - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ - * - * @author $Author: bfarber $ - * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board - * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Rev: 4948 $ - * - */ - -class fetchSkin__forums -{ - /**#@+ - * Registry Object Shortcuts - * - * @access protected - * @var object - */ - protected $registry; - protected $DB; - protected $settings; - protected $request; - protected $lang; - protected $member; - protected $cache; - /**#@-*/ - - /** - * I'm a constructor, twisted constructor - * - * @access public - * @param object ipsRegistry reference - * @return void - */ - public function __construct( ipsRegistry $registry ) - { - /* Make objects */ - $this->registry = $registry; - $this->DB = $this->registry->DB(); - $this->settings =& $this->registry->fetchSettings(); - $this->request =& $this->registry->fetchRequest(); - $this->lang = $this->registry->getClass('class_localization'); - $this->member = $this->registry->member(); - $this->memberData =& $this->registry->member()->fetchMemberData(); - $this->cache = $this->registry->cache(); - $this->caches =& $this->registry->cache()->fetchCaches(); - - /* Check for class_forums */ - if( ipsRegistry::isClassLoaded('class_forums') !== TRUE ) - { - require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" ); - $this->registry->setClass( 'class_forums', new class_forums( $registry ) ); - $this->registry->class_forums->forumsInit(); - } - } - - /** - * Returns a skin ID or FALSE - * - * @access public - * @author Matt Mecham - * @return mixed INT or FALSE if no skin found / required - */ - public function fetchSkin() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $useSkinID = FALSE; - $_keys = array_keys( $_REQUEST ); - - //----------------------------------------- - // OK, viewing a forum or WHAT? - //----------------------------------------- - - if ( count( array_intersect( array( 'showtopic', 'showforum' ), $_keys ) ) OR ( $this->request['module'] == 'post' ) ) - { - $cache = $this->registry->class_forums->forum_by_id; - $eff = intval( $this->request['f'] ); - - //----------------------------------------- - // Do we have a skin for a particular forum? - //----------------------------------------- - - if ( $eff ) - { - if ( isset( $cache[ $eff ]['skin_id'] ) && $cache[ $eff ]['skin_id'] ) - { - $useSkinID = $cache[ $eff ]['skin_id']; - } - } - } - - return $useSkinID; - } -} - -/** - * Invision Power Services - * IP.Board v3.0.5 - * Library: Handle public session data - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ - * - * @author $Author: bfarber $ - * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board - * @subpackage Forums - * @link http://www.iinvisionpower.com - * @since 12th March 2002 - * @version $Revision: 4948 $ - * - */ - -class publicSessions__forums -{ - /** - * Return session variables for this application - * - * current_appcomponent, current_module and current_section are automatically - * stored. This function allows you to add specific variables in. - * - * @access public - * @author Matt Mecham - * @return array - */ - public function getSessionVariables() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $array = array( 'location_1_type' => '', - 'location_1_id' => 0, - 'location_2_type' => '', - 'location_2_id' => 0 ); - - //----------------------------------------- - // FORUM - //----------------------------------------- - - if ( ipsRegistry::$request['module'] == 'forums' AND ( isset( ipsRegistry::$request['f'] ) AND ipsRegistry::$request['f'] ) ) - { - $array = array( - 'location_2_type' => 'forum', - 'location_2_id' => intval(ipsRegistry::$request['f']) ); - } - - //----------------------------------------- - // TOPIC - //----------------------------------------- - - else if ( ipsRegistry::$request['module'] == 'forums' AND ipsRegistry::$request['section'] == 'topics' AND ( isset( ipsRegistry::$request['t'] ) AND ipsRegistry::$request['t'] ) ) - { - $array = array( - 'location_1_type' => 'topic', - 'location_1_id' => intval(ipsRegistry::$request['t']), - 'location_2_type' => 'forum', - 'location_2_id' => intval(ipsRegistry::$request['f']) ); - } - - //----------------------------------------- - // POST - //----------------------------------------- - - else if ( ipsRegistry::$request['module'] == 'post' AND ( isset( ipsRegistry::$request['f'] ) AND ipsRegistry::$request['f'] ) ) - { - $array = array( - 'location_1_type' => 'topic', - 'location_1_id' => intval(ipsRegistry::$request['t']), - 'location_2_type' => 'forum', - 'location_2_id' => intval(ipsRegistry::$request['f']) ); - } - - return $array; - } - - - /** - * Parse/format the online list data for the records - * - * @access public - * @author Brandon Farber - * @param array Online list rows to check against - * @return array Online list rows parsed - */ - public function parseOnlineEntries( $rows ) - { - if( !is_array($rows) OR !count($rows) ) - { - return $rows; - } - - //----------------------------------------- - // Init - //----------------------------------------- - - $forums_raw = array(); - $forums = array(); - $topics_raw = array(); - $topics = array(); - $posts_raw = array(); - $posts = array(); - $final = array(); - - //----------------------------------------- - // Extract the topic/forum data - //----------------------------------------- - - foreach( $rows as $row ) - { - if( $row['current_appcomponent'] != 'forums' OR !$row['current_module'] ) - { - continue; - } - - if( $row['current_section'] == 'forums' ) - { - $forums_raw[ $row['location_2_id'] ] = ''; - } - else if( $row['current_section'] == 'topics' ) - { - $topics_raw[ $row['location_1_id'] ] = $row['location_1_id']; - } - else if( $row['current_section'] == 'post' ) - { - $forums_raw[ $row['location_2_id'] ] = ''; - $topics_raw[ $row['location_1_id'] ] = $row['location_1_id']; - } - } - - //----------------------------------------- - // Get the forums, if you dare - //----------------------------------------- - - if( !class_exists('app_class_forums') OR !ipsRegistry::getClass('class_forums') ) - { - require_once( IPSLib::getAppDir( 'forums' ) . '/app_class_forums.php' ); - $app_class_forums = new app_class_forums( ipsRegistry::instance() ); - - if( count($forums_raw) ) - { - foreach( ipsRegistry::getClass('class_forums')->forum_by_id as $fid => $forum ) - { - if( isset($forums_raw[$fid]) ) - { - if( ipsRegistry::getClass( 'permissions' )->check( 'view', $forum ) !== false ) - { - $forums[ $fid ] = $forum['name']; - } - } - } - } - } - - //----------------------------------------- - // Get the topics, if you care - //----------------------------------------- - - if( count($topics_raw) ) - { - ipsRegistry::DB()->build( array( 'select' => 't.tid, t.title, t.forum_id', - 'from' => array( 'topics' => 't' ), - 'where' => 't.approved=1 AND t.tid IN(' . implode( ',', $topics_raw ) . ') AND ' . ipsRegistry::getClass('permissions')->buildPermQuery('p'), - 'add_join' => array( - array( - 'from' => array( 'permission_index' => 'p' ), - 'where' => "p.perm_type_id=t.forum_id AND p.app='forums' AND p.perm_type='forum'", - 'type' => 'left', - ), - ) - ) ); - $tr = ipsRegistry::DB()->execute(); - - while( $r = ipsRegistry::DB()->fetch($tr) ) - { - if( count( ipsRegistry::getClass('class_forums')->forum_by_id[ $r['forum_id'] ] ) ) - { - if( ipsRegistry::getClass( 'permissions' )->check( 'read', ipsRegistry::getClass('class_forums')->forum_by_id[ $r['forum_id'] ] ) !== false ) - { - $topics[ $r['tid'] ] = $r['title']; - } - } - } - } - - //----------------------------------------- - // Put humpty dumpty together again - //----------------------------------------- - - foreach( $rows as $row ) - { - if( $row['current_appcomponent'] != 'forums' ) - { - $final[ $row['id'] ] = $row; - - continue; - } - - if( !$row['current_module'] ) - { - $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['board_index']; - $final[ $row['id'] ] = $row; - - continue; - } - - if( $row['current_section'] == 'forums' ) - { - if( isset($forums[ $row['location_2_id'] ]) ) - { - $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_sf']; - $row['where_line_more'] = $forums[ $row['location_2_id'] ]; - $row['where_link'] = 'showforum=' . $row['location_2_id']; - $row['_whereLinkSeo'] = ipsRegistry::getClass('output')->formatUrl( ipsRegistry::getClass('output')->buildUrl( "showforum=".$row['location_2_id'], 'public' ), IPSText::makeSeoTitle( $forums[ $row['location_2_id'] ] ), 'showforum' ); - } - } - else if( $row['current_section'] == 'topics' ) - { - if( isset($topics[ $row['location_1_id'] ]) ) - { - $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_st']; - $row['where_line_more'] = $topics[ $row['location_1_id'] ]; - $row['where_link'] = 'showtopic=' . $row['location_1_id']; - $row['_whereLinkSeo'] = ipsRegistry::getClass('output')->formatUrl( ipsRegistry::getClass('output')->buildUrl( "showtopic=".$row['location_1_id'], 'public' ), IPSText::makeSeoTitle( $topics[ $row['location_1_id'] ] ), 'showtopic' ); - } - } - else if( $row['current_section'] == 'post' ) - { - if( $row['location_1_id'] ) - { - if( isset($topics[ $row['location_1_id'] ]) ) - { - $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_postrep']; - $row['where_line_more'] = $topics[ $row['location_1_id'] ]; - $row['where_link'] = 'showtopic=' . $row['location_1_id']; - $row['_whereLinkSeo'] = ipsRegistry::getClass('output')->formatUrl( ipsRegistry::getClass('output')->buildUrl( "showtopic=".$row['location_1_id'], 'public' ), IPSText::makeSeoTitle( $topics[ $row['location_1_id'] ] ), 'showtopic' ); - } - } - else if( $row['location_2_id'] ) - { - if( isset($forums[ $row['location_2_id'] ]) ) - { - $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_postnew']; - $row['where_line_more'] = $forums[ $row['location_2_id'] ]; - $row['where_link'] = 'showforum=' . $row['location_2_id']; - $row['_whereLinkSeo'] = ipsRegistry::getClass('output')->formatUrl( ipsRegistry::getClass('output')->buildUrl( "showforum=".$row['location_2_id'], 'public' ), IPSText::makeSeoTitle( $forums[ $row['location_2_id'] ] ), 'showforum' ); - } - } - } - - $final[ $row['id'] ] = $row; - } - - return $final; - } + + * Invision Power Services + * IP.Board v3.1.4 + * Forum permissions mappings + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * + * + * @author $author$ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 7003 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +/** + * Class name must be (app)ShareLinks + */ +class forumsShareLinks +{ + function __construct() + { + $this->DB = ipsRegistry::DB(); + $this->registry = ipsRegistry::instance(); + } + + /** + * Deconstruct the URL + * + * An array of URL bits are passed ( array( 'showtopic' => 100, 'pid' => '123' ) ). + * This function should attempt to return formatted data: + * + * + * array( 'data_app' => '', + * 'data_type' => '', + * 'data_primary_id' => 0, + * 'data_secondary_id' => 0 ) + * + * log_data_app MUST be set if you find a match. Leave blank to confirm no match + * + * @param array + * @return array + */ + public function deconstructUrl( $url ) + { + $ret = array( 'data_app' => '', + 'data_type' => '', + 'data_primary_id' => 0, + 'data_secondary_id' => 0 ); + + if ( is_array( $url ) AND count( $url ) ) + { + if ( isset( $url['showtopic'] ) ) + { + $ret['data_app'] = 'forums'; + $ret['data_type'] = 'topic'; + $ret['data_primary_id'] = $url['showtopic']; + } + else if ( $url['module'] == 'forums' AND $url['section'] == 'topics' ) + { + $ret['data_app'] = 'forums'; + $ret['data_type'] = 'topic'; + $ret['data_primary_id'] = $url['tid']; + } + } + + return $ret; + } + + /** + * Process links data + * + * Array will be $key => array( log_data_app =>, log_data_type =>, log_data_primary_id =>, ) + * + * MUST be returned: + * $key => array( 'title' => 'My Great Topic', + * 'url' => URL, SEO where appropriate, + * 'published' => unix time stamp, + * 'icon' => icon relative to /style_images/master (16x16 icon) + * + * @param array + * @return array + */ + public function processData( $array ) + { + $topics = array(); + $final = array(); + $return = array(); + + /* Ensure forums class is loaded */ + if ( ! $this->registry->isClassLoaded('class_forums') ) + { + try + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' ); + $this->registry->setClass( 'class_forums', new $classToLoad( $this->registry ) ); + $this->registry->getClass('class_forums')->strip_invisible = 1; + + $this->registry->getClass('class_forums')->forumsInit(); + } + catch( Exception $error ) + { + IPS_exception_error( $error ); + } + } + + /* Here we go again */ + if ( is_array( $array ) and count( $array ) ) + { + foreach( $array as $key => $data ) + { + if ( $data['log_data_type'] == 'topic' ) + { + $topics[] = intval( $data['log_data_primary_id'] ); + } + } + + if ( count( $topics ) ) + { + $this->DB->build( array( 'select' => 'tid, title, title_seo, start_date, forum_id', + 'from' => 'topics', + 'where' => 'tid IN (' . implode( ',', $topics ) . ')' ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + /* Quick permission check */ + if ( ! $this->registry->getClass('class_forums')->forumsCheckAccess( $row['forum_id'], 0, 'forum', $row, true ) ) + { + $url = $this->registry->output->buildUrl( 'showtopic='. $row['tid'], 'publicNoSession' ); + $title = 'Protected Topic'; + } + else + { + $url = $this->registry->output->buildSEOUrl( 'showtopic='. $row['tid'], 'publicNoSession', $row['title_seo'], 'showtopic' ); + $title = $row['title']; + } + + $final[ $row['tid'] ] = array( 'title' => $title, + 'url' => $url, + 'published' => $row['start_date'], + 'icon' => 'page_topic.png' ); + } + } + + /* Sigh */ + if ( is_array( $final ) ) + { + foreach( $array as $key => $data ) + { + $return[ $key ] = isset($final[ $data['log_data_primary_id'] ]) ? $final[ $data['log_data_primary_id'] ] : array(); + } + + return $return; + } + + return array(); + } + + return array(); + } + + /** + * Process links data + * + * Array will be array( data_app =>, data_type =>, data_primary_id =>, ) + * + * Return TRUE for permission OK, FALSE for no permission + * + * @param array + * @return array + */ + public function permissionCheck( $array ) + { + /* Ensure forums class is loaded */ + if ( ! $this->registry->isClassLoaded('class_forums') ) + { + try + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' ); + $this->registry->setClass( 'class_forums', new $classToLoad( $this->registry ) ); + $this->registry->getClass('class_forums')->strip_invisible = 1; + + $this->registry->getClass('class_forums')->forumsInit(); + } + catch( Exception $error ) + { + IPS_exception_error( $error ); + } + } + + /* Quick permission check */ + if ( $array['data_type'] == 'topic' ) + { + $topic = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'topics', + 'where' => 'tid=' . intval( $array['data_primary_id'] ) ) ); + + + if ( $this->registry->getClass('class_forums')->forumsCheckAccess( $topic['forum_id'], 0, 'forum', $topic, true ) ) + { + return TRUE; + } + } + + return FALSE; + } + +} + +$_PERM_CONFIG = array( 'Forum' ); + +class forumsPermMappingForum +{ + /** + * Mapping of keys to columns + * + * @var array + */ + private $mapping = array( + 'view' => 'perm_view', + 'read' => 'perm_2', + 'reply' => 'perm_3', + 'start' => 'perm_4', + 'upload' => 'perm_5', + 'download' => 'perm_6' + ); + + /** + * Mapping of keys to names + * + * @var array + */ + private $perm_names = array( + 'view' => 'Show Forum', + 'read' => 'Read Topics', + 'reply' => 'Reply Topics', + 'start' => 'Start Topics', + 'upload' => 'Upload', + 'download' => 'Download', + ); + + /** + * Mapping of keys to background colors for the form + * + * @var array + */ + private $perm_colors = array( + 'view' => '#fff0f2', + 'read' => '#effff6', + 'reply' => '#edfaff', + 'start' => '#f0f1ff', + 'upload' => '#fffaee', + 'download' => '#ffeef9', + ); + + /** + * Method to pull the key/column mapping + * + * @return array + */ + public function getMapping() + { + return $this->mapping; + } + + /** + * Method to pull the key/name mapping + * + * @return array + */ + public function getPermNames() + { + return $this->perm_names; + } + + /** + * Method to pull the key/color mapping + * + * @return array + */ + public function getPermColors() + { + return $this->perm_colors; + } + + /** + * Retrieve the permission items + * + * @return array + */ + public function getPermItems() + { + require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/admin_forum_functions.php", 'admin_forum_functions', 'forums' ); + + $forumfunc = new $classToLoad( ipsRegistry::instance() ); + $forumfunc->forumsInit(); + + $forum_data = $forumfunc->adForumsForumData(); + + $return_arr = array(); + foreach( $forum_data as $r ) + { + $return_arr[$r['id']] = array( + 'title' => $r['depthed_name'], + 'perm_view' => $r['perm_view'], + 'perm_2' => $r['perm_2'], + 'perm_3' => $r['perm_3'], + 'perm_4' => $r['perm_4'], + 'perm_5' => $r['perm_5'], + 'perm_6' => $r['perm_6'], + 'perm_7' => $r['perm_7'], + 'restrict' => $r['parent_id'] == 'root' ? 'perm_view' : '', + ); + } + + return $return_arr; + + } +} + +/** + *
    + * Invision Power Services
    + * IP.Board v3.1.4
    + * Item Marking
    + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $
    + * 
    + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 7003 $ + */ + +class itemMarking__forums +{ + /** + * Field Convert Data Remap Array + * + * This is where you can map your app_key_# numbers to application savvy fields + * + * @var array + */ + private $_convertData = array( 'forumID' => 'item_app_key_1' ); + + /**#@+ + * Registry Object Shortcuts + * + * @var object + */ + protected $registry; + protected $DB; + protected $settings; + protected $request; + protected $lang; + protected $member; + protected $memberData; + protected $cache; + protected $caches; + /**#@-*/ + + /** + * I'm a constructor, twisted constructor + * + * @param object ipsRegistry reference + * @return void + */ + public function __construct( ipsRegistry $registry ) + { + /* Make objects */ + $this->registry = $registry; + $this->DB = $this->registry->DB(); + $this->settings =& $this->registry->fetchSettings(); + $this->request =& $this->registry->fetchRequest(); + $this->lang = $this->registry->getClass('class_localization'); + $this->member = $this->registry->member(); + $this->memberData =& $this->registry->member()->fetchMemberData(); + $this->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + } + + /** + * Convert Data + * Takes an array of app specific data and remaps it to the DB table fields + * + * @param array + * @return array + */ + public function convertData( $data ) + { + $_data = array(); + + foreach( $data as $k => $v ) + { + if ( isset($this->_convertData[$k]) ) + { + # Make sure we use intval here as all 'forum' app fields + # are integers. + $_data[ $this->_convertData[ $k ] ] = intval( $v ); + } + else + { + $_data[ $k ] = $v; + } + } + + return $_data; + } + + /** + * Fetch unread count + * + * Grab the number of items truly unread + * This is called upon by 'markRead' when the number of items + * left hits zero (or less). + * + * + * @param array Array of data + * @param array Array of read itemIDs + * @param int Last global reset + * @return integer Last unread count + */ + public function fetchUnreadCount( $data, $readItems, $lastReset ) + { + $count = 0; + $lastItem = 0; + $approved = $this->memberData['is_mod'] ? ' AND approved IN (0,1) ' : ' AND approved=1 '; + $readItems = is_array( $readItems ) ? $readItems : array( 0 ); + + if ( $data['forumID'] ) + { + $_count = $this->DB->buildAndFetch( array( + 'select' => 'COUNT(*) as cnt, MIN(last_post) as lastItem', + 'from' => 'topics', + 'where' => "forum_id=" . intval( $data['forumID'] ) . " {$approved} AND tid NOT IN(".implode(",",array_keys($readItems)).") AND last_post > ".intval($lastReset) . " AND state != 'link'" + ) ); + + $count = intval( $_count['cnt'] ); + $lastItem = intval( $_count['lastItem'] ); + } + + return array( 'count' => $count, + 'lastItem' => $lastItem ); + } +} + +/** + *
    + * Invision Power Services
    + * IP.Board v3.1.4
    + * Fetch Skin
    + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $
    + * 
    + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 7003 $ + */ + +class fetchSkin__forums +{ + /**#@+ + * Registry Object Shortcuts + * + * @var object + */ + protected $registry; + protected $DB; + protected $settings; + protected $request; + protected $lang; + protected $member; + protected $memberData; + protected $cache; + protected $caches; + /**#@-*/ + + /** + * I'm a constructor, twisted constructor + * + * @access public + * @param object ipsRegistry reference + * @return void + */ + public function __construct( ipsRegistry $registry ) + { + /* Make objects */ + $this->registry = $registry; + $this->DB = $this->registry->DB(); + $this->settings =& $this->registry->fetchSettings(); + $this->request =& $this->registry->fetchRequest(); + $this->lang = $this->registry->getClass('class_localization'); + $this->member = $this->registry->member(); + $this->memberData =& $this->registry->member()->fetchMemberData(); + $this->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + + /* Check for class_forums */ + if( ipsRegistry::isClassLoaded('class_forums') !== TRUE ) + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' ); + $this->registry->setClass( 'class_forums', new $classToLoad( $registry ) ); + $this->registry->class_forums->forumsInit(); + } + } + + /** + * Returns a skin ID or FALSE + * + * @access public + * @author Matt Mecham + * @return mixed INT or FALSE if no skin found / required + */ + public function fetchSkin() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $useSkinID = FALSE; + $_keys = array_keys( $_REQUEST ); + + //----------------------------------------- + // OK, viewing a forum or WHAT? + //----------------------------------------- + + if ( count( array_intersect( array( 'showtopic', 'showforum' ), $_keys ) ) OR ( $this->request['module'] == 'post' ) ) + { + $cache = $this->registry->class_forums->forum_by_id; + $eff = intval( $this->request['f'] ); + + //----------------------------------------- + // Do we have a skin for a particular forum? + //----------------------------------------- + + if ( $eff ) + { + if ( isset( $cache[ $eff ]['skin_id'] ) && $cache[ $eff ]['skin_id'] ) + { + $useSkinID = $cache[ $eff ]['skin_id']; + } + } + } + + return $useSkinID; + } +} + +/** + *
    + * Invision Power Services
    + * IP.Board v3.1.4
    + * Library: Handle public session data
    + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $
    + * 
    + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 12th March 2002 + * @version $Revision: 7003 $ + */ + +class publicSessions__forums +{ + /** + * Return session variables for this application + * + * current_appcomponent, current_module and current_section are automatically + * stored. This function allows you to add specific variables in. + * + * @access public + * @author Matt Mecham + * @return array + */ + public function getSessionVariables() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $array = array( 'location_1_type' => '', + 'location_1_id' => 0, + 'location_2_type' => '', + 'location_2_id' => 0 ); + + //----------------------------------------- + // FORUM + //----------------------------------------- + + if ( ipsRegistry::$request['module'] == 'forums' AND ( isset( ipsRegistry::$request['f'] ) AND ipsRegistry::$request['f'] ) ) + { + $array = array( + 'location_2_type' => 'forum', + 'location_2_id' => intval(ipsRegistry::$request['f']) ); + } + + //----------------------------------------- + // TOPIC + //----------------------------------------- + + else if ( ipsRegistry::$request['module'] == 'forums' AND ipsRegistry::$request['section'] == 'topics' AND ( isset( ipsRegistry::$request['t'] ) AND ipsRegistry::$request['t'] ) ) + { + $array = array( + 'location_1_type' => 'topic', + 'location_1_id' => intval(ipsRegistry::$request['t']), + 'location_2_type' => 'forum', + 'location_2_id' => intval(ipsRegistry::$request['f']) ); + } + + //----------------------------------------- + // POST + //----------------------------------------- + + else if ( ipsRegistry::$request['module'] == 'post' AND ( isset( ipsRegistry::$request['f'] ) AND ipsRegistry::$request['f'] ) ) + { + $array = array( + 'location_1_type' => 'topic', + 'location_1_id' => intval(ipsRegistry::$request['t']), + 'location_2_type' => 'forum', + 'location_2_id' => intval(ipsRegistry::$request['f']) ); + } + + return $array; + } + + + /** + * Parse/format the online list data for the records + * + * @access public + * @author Brandon Farber + * @param array Online list rows to check against + * @return array Online list rows parsed + */ + public function parseOnlineEntries( $rows ) + { + if( !is_array($rows) OR !count($rows) ) + { + return $rows; + } + + //----------------------------------------- + // Init + //----------------------------------------- + + $forums_raw = array(); + $forums = array(); + $topics_raw = array(); + $topics = array(); + $posts_raw = array(); + $posts = array(); + $final = array(); + + //----------------------------------------- + // Extract the topic/forum data + //----------------------------------------- + + foreach( $rows as $row ) + { + if( $row['current_appcomponent'] != 'forums' OR !$row['current_module'] ) + { + continue; + } + + if( $row['current_section'] == 'forums' ) + { + $forums_raw[ $row['location_2_id'] ] = ''; + } + else if( $row['current_section'] == 'topics' ) + { + $topics_raw[ $row['location_1_id'] ] = $row['location_1_id']; + } + else if( $row['current_section'] == 'post' ) + { + $forums_raw[ $row['location_2_id'] ] = ''; + $topics_raw[ $row['location_1_id'] ] = $row['location_1_id']; + } + } + + //----------------------------------------- + // Get the forums, if you dare + //----------------------------------------- + + if( !class_exists('app_class_forums') OR !ipsRegistry::getClass('class_forums') ) + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/app_class_forums.php', 'app_class_forums', 'forums' ); + $app_class_forums = new $classToLoad( ipsRegistry::instance() ); + + if( count($forums_raw) ) + { + foreach( ipsRegistry::getClass('class_forums')->forum_by_id as $fid => $forum ) + { + if( isset($forums_raw[$fid]) ) + { + if( ipsRegistry::getClass( 'permissions' )->check( 'view', $forum ) !== false ) + { + $forums[ $fid ] = $forum['name']; + } + } + } + } + } + + //----------------------------------------- + // Get the topics, if you care + //----------------------------------------- + + if( count($topics_raw) ) + { + ipsRegistry::DB()->build( array( 'select' => 't.tid, t.title, t.forum_id', + 'from' => array( 'topics' => 't' ), + 'where' => 't.approved=1 AND t.tid IN(' . implode( ',', $topics_raw ) . ') AND ' . ipsRegistry::getClass('permissions')->buildPermQuery('p'), + 'add_join' => array( + array( + 'from' => array( 'permission_index' => 'p' ), + 'where' => "p.perm_type_id=t.forum_id AND p.app='forums' AND p.perm_type='forum'", + 'type' => 'left', + ), + ) + ) ); + $tr = ipsRegistry::DB()->execute(); + + while( $r = ipsRegistry::DB()->fetch($tr) ) + { + if( count( ipsRegistry::getClass('class_forums')->forum_by_id[ $r['forum_id'] ] ) ) + { + if( ipsRegistry::getClass( 'permissions' )->check( 'read', ipsRegistry::getClass('class_forums')->forum_by_id[ $r['forum_id'] ] ) !== false ) + { + $topics[ $r['tid'] ] = $r['title']; + } + } + } + } + + //----------------------------------------- + // Put humpty dumpty together again + //----------------------------------------- + + foreach( $rows as $row ) + { + if( $row['current_appcomponent'] != 'forums' ) + { + $final[ $row['id'] ] = $row; + + continue; + } + + if( !$row['current_module'] ) + { + $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['board_index']; + $final[ $row['id'] ] = $row; + + continue; + } + + if( $row['current_section'] == 'forums' ) + { + if( isset($forums[ $row['location_2_id'] ]) ) + { + $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_sf']; + $row['where_line_more'] = $forums[ $row['location_2_id'] ]; + $row['where_link'] = 'showforum=' . $row['location_2_id']; + $row['_whereLinkSeo'] = ipsRegistry::getClass('output')->formatUrl( ipsRegistry::getClass('output')->buildUrl( "showforum=".$row['location_2_id'], 'public' ), IPSText::makeSeoTitle( $forums[ $row['location_2_id'] ] ), 'showforum' ); + } + } + else if( $row['current_section'] == 'topics' ) + { + if( isset($topics[ $row['location_1_id'] ]) ) + { + $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_st']; + $row['where_line_more'] = $topics[ $row['location_1_id'] ]; + $row['where_link'] = 'showtopic=' . $row['location_1_id']; + $row['_whereLinkSeo'] = ipsRegistry::getClass('output')->formatUrl( ipsRegistry::getClass('output')->buildUrl( "showtopic=".$row['location_1_id'], 'public' ), IPSText::makeSeoTitle( $topics[ $row['location_1_id'] ] ), 'showtopic' ); + } + } + else if( $row['current_section'] == 'post' ) + { + if( $row['location_1_id'] ) + { + if( isset($topics[ $row['location_1_id'] ]) ) + { + $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_postrep']; + $row['where_line_more'] = $topics[ $row['location_1_id'] ]; + $row['where_link'] = 'showtopic=' . $row['location_1_id']; + $row['_whereLinkSeo'] = ipsRegistry::getClass('output')->formatUrl( ipsRegistry::getClass('output')->buildUrl( "showtopic=".$row['location_1_id'], 'public' ), IPSText::makeSeoTitle( $topics[ $row['location_1_id'] ] ), 'showtopic' ); + } + } + else if( $row['location_2_id'] ) + { + if( isset($forums[ $row['location_2_id'] ]) ) + { + $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_postnew']; + $row['where_line_more'] = $forums[ $row['location_2_id'] ]; + $row['where_link'] = 'showforum=' . $row['location_2_id']; + $row['_whereLinkSeo'] = ipsRegistry::getClass('output')->formatUrl( ipsRegistry::getClass('output')->buildUrl( "showforum=".$row['location_2_id'], 'public' ), IPSText::makeSeoTitle( $forums[ $row['location_2_id'] ] ), 'showforum' ); + } + } + } + + $final[ $row['id'] ] = $row; + } + + return $final; + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/coreVariables.php b/upload/admin/applications/forums/extensions/coreVariables.php index 82bb669c..a1e6da49 100644 --- a/upload/admin/applications/forums/extensions/coreVariables.php +++ b/upload/admin/applications/forums/extensions/coreVariables.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Core variables extensions * Defines the reset array, which caches to load, how to recache those caches, and the bitwise array - * Last Updated: $Date: 2009-12-07 21:57:46 -0500 (Mon, 07 Dec 2009) $ + * Last Updated: $Date: 2010-09-15 19:24:12 -0400 (Wed, 15 Sep 2010) $ + * * * @author $author$ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Rev: 5529 $ + * @link http://www.invisionpower.com + * @version $Rev: 6882 $ **/ if ( ! defined( 'IN_IPB' ) ) @@ -37,7 +39,7 @@ if ( ( isset( $_REQUEST['CODE'] ) AND $_REQUEST['CODE'] ) or ( isset( $_REQUEST[ $_LOAD = array(); # BOARD INDEX -if ( ( ! $_GET['section'] AND ! $_GET['module'] ) OR ( $_GET['module'] == 'forums' AND $_GET['section'] == 'boards' ) ) +if ( ( ( !isset($_GET['section']) OR ! $_GET['section'] ) AND ( !isset($_GET['module']) OR ! $_GET['module'] ) ) OR ( $_GET['module'] == 'forums' AND $_GET['section'] == 'boards' ) ) { $_LOAD['chatting'] = 1; $_LOAD['birthdays'] = 1; @@ -48,7 +50,7 @@ if ( ( ! $_GET['section'] AND ! $_GET['module'] ) OR ( $_GET['module'] == 'forum } # TOPIC -if ( isset( $_GET['showtopic'] ) OR $_GET['module'] == 'forums' AND $_GET['section'] == 'topics' ) +if ( isset( $_GET['showtopic'] ) OR ( isset($_GET['module']) AND isset($_GET['section']) AND $_GET['module'] == 'forums' AND $_GET['section'] == 'topics' ) ) { $_LOAD['badwords'] = 1; $_LOAD['emoticons'] = 1; @@ -57,10 +59,11 @@ if ( isset( $_GET['showtopic'] ) OR $_GET['module'] == 'forums' AND $_GET['secti $_LOAD['ranks'] = 1; $_LOAD['profilefields'] = 1; $_LOAD['reputation_levels'] = 1; + $_LOAD['sharelinks'] = 1; } # Forum -if ( isset( $_GET['showforum'] ) OR $_GET['module'] == 'forums' AND $_GET['section'] == 'forums' ) +if ( isset( $_GET['showforum'] ) OR ( isset($_GET['module']) AND isset($_GET['section']) AND $_GET['module'] == 'forums' AND $_GET['section'] == 'forums' ) ) { $_LOAD['ranks'] = 1; $_LOAD['reputation_levels'] = 1; @@ -71,8 +74,8 @@ if ( isset( $_GET['showforum'] ) OR $_GET['module'] == 'forums' AND $_GET['secti $_LOAD['bbcode'] = 1; } -# POST -if ( $_GET['module'] == 'post' ) +# POST and RULES +if ( isset($_GET['module']) AND ( $_GET['module'] == 'post' OR $_GET['module'] == 'extras' ) ) { $_LOAD['badwords'] = 1; $_LOAD['bbcode'] = 1; @@ -81,6 +84,15 @@ if ( $_GET['module'] == 'post' ) $_LOAD['reputation_levels'] = 1; } +# ANNOUNCEMENT +if ( isset( $_GET['showannouncement'] ) OR ( isset($_GET['module']) AND isset($_GET['section']) AND $_GET['module'] == 'forums' AND $_GET['section'] == 'announcements' ) ) +{ + $_LOAD['badwords'] = 1; + $_LOAD['bbcode'] = 1; + $_LOAD['emoticons'] = 1; + $_LOAD['ranks'] = 1; + $_LOAD['reputation_levels'] = 1; +} $CACHE['attachtypes'] = array( 'array' => 1, @@ -124,4 +136,12 @@ $CACHE['announcements'] = array( // Bitwise Options //----------------------------------------- -$_BITWISE = array( 'moderators' => array( 'bw_flag_spammers' ) ); +$_BITWISE = array( 'moderators' => array( 'bw_flag_spammers', + 'bw_mod_soft_delete', + 'bw_mod_un_soft_delete', + 'bw_mod_soft_delete_see', + 'bw_mod_soft_delete_topic', + 'bw_mod_un_soft_delete_topic', + 'bw_mod_soft_delete_topic_see', + 'bw_mod_soft_delete_reason', + 'bw_mod_soft_delete_see_post' ) ); diff --git a/upload/admin/applications/forums/extensions/dataHookLocations.php b/upload/admin/applications/forums/extensions/dataHookLocations.php new file mode 100644 index 00000000..b600235f --- /dev/null +++ b/upload/admin/applications/forums/extensions/dataHookLocations.php @@ -0,0 +1,46 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Define data hook locations (Forums) + * Last Updated: $Date: 2010-10-21 09:25:51 -0400 (Thu, 21 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 7009 $ + */ + +$dataHookLocations = array( + + /* POSTING LIBRARY DATA LOCATIONS */ + array( 'postAddReply', 'Add Reply' ), + array( 'postAddReplyPoll','Add Reply: Poll' ), + array( 'postAutoMerge', 'Add Reply: Auto merge with previous post' ), + array( 'postAddReplyTopicUpdate', 'Add Reply: Topic Data' ), + array( 'postAddTopic', 'New Topic: Topic Data' ), + array( 'postFirstPost', 'New Topic: First Post' ), + array( 'postAddTopicPoll', 'New Topic: Poll' ), + array( 'editPostAddPoll', 'Edit Post: Added Poll' ), + array( 'editPostUpdatePoll', 'Edit Post: Updated Poll' ), + array( 'editPostUpdateTopicTitle', 'Edit Post: Update Topic Title'), + array( 'editPostData', 'Edit Post: Post Data' ), + array( 'updateForumLastPostData', 'Forum last post update data' ), + array( 'incrementUsersPostCount', 'Increment users post count' ), + + /* OUTPUT ARRAYS */ + array( 'boardIndexCategories', 'Board Index Output: Categories' ), + array( 'boardIndexOnlineUsers', 'Board Index Output: Active users' ), + array( 'forumViewData', 'Forum View Output' ), + array( 'topicViewQuery', 'Topic View Query: Members Table and Joins' ), + array( 'topicViewPostData', 'Topic View Output: Posts Data' ), + array( 'topicViewForumData', 'Topic View Output: Forum Data' ), + array( 'topicViewTopicData', 'Topic View Output: Topic Data' ), + array( 'topicViewDisplayData', 'Topic View Output: Other Data' ), + +); \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/editorSections.php b/upload/admin/applications/forums/extensions/editorSections.php index a6c1c857..7065a80a 100644 --- a/upload/admin/applications/forums/extensions/editorSections.php +++ b/upload/admin/applications/forums/extensions/editorSections.php @@ -1,35 +1,37 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -/* - * An array of key => value pairs - * When going to parse, the key should be passed to the editor - * to determine which bbcodes should be parsed in the section - * - */ -$BBCODE = array( - 'topics' => ipsRegistry::getClass('class_localization')->words['ctype__topics'], - 'announcement' => ipsRegistry::getClass('class_localization')->words['ctype__announcement'], - 'rules' => ipsRegistry::getClass('class_localization')->words['ctype__rules'], + + * Invision Power Services + * IP.Board v3.1.4 + * BBCode Management : Determines if bbcode can be used in this section + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 5713 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +/* + * An array of key => value pairs + * When going to parse, the key should be passed to the editor + * to determine which bbcodes should be parsed in the section + * + */ +$BBCODE = array( + 'topics' => ipsRegistry::getClass('class_localization')->words['ctype__topics'], + 'announcement' => ipsRegistry::getClass('class_localization')->words['ctype__announcement'], + 'rules' => ipsRegistry::getClass('class_localization')->words['ctype__rules'], ); \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/furlIdTemplates.php b/upload/admin/applications/forums/extensions/furlIdTemplates.php index 75bc7586..9f037334 100644 --- a/upload/admin/applications/forums/extensions/furlIdTemplates.php +++ b/upload/admin/applications/forums/extensions/furlIdTemplates.php @@ -7,10 +7,10 @@ * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html + * @license http://www.invisionpower.com/community/board/license.html * @package Invision Power Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 * @version $Rev: 4136 $ * @@ -41,19 +41,19 @@ $_SEOTEMPLATES = array( 'showannouncement' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showannouncement=(.+?)((?:&|&)f=(.+?))?(&|$)#i', 'forum-$3/announcement-$1/$4' ), - 'in' => array( 'regex' => "#/forum-(\d+?)?/announcement-(\d+)/#i", + 'in' => array( 'regex' => "#/forum-(\d+?)?/announcement-(\d+)/?#i", 'matches' => array( array( 'showannouncement', '$2' ), array( 'f', '$1' ) ) ) ), 'showforum' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showforum=(.+?)(&|$)#i', 'forum/$1/$2' ), - 'in' => array( 'regex' => "#/forum/(\d+)/#i", + 'in' => array( 'regex' => "#/forum/(\d+)/?#i", 'matches' => array( array( 'showforum', '$1' ) ) ) ), 'showtopic' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showtopic=(.+?)(&|$)#i', 'topic/$1/$2' ), - 'in' => array( 'regex' => "#/topic/(\d+)/#i", + 'in' => array( 'regex' => "#/topic/(\d+)/?#i", 'matches' => array( array( 'showtopic', '$1' ) ) ) ), 'act=idx' => array( 'app' => 'forums', diff --git a/upload/admin/applications/forums/extensions/furlRedirect.php b/upload/admin/applications/forums/extensions/furlRedirect.php index b0835214..3682cb7c 100644 --- a/upload/admin/applications/forums/extensions/furlRedirect.php +++ b/upload/admin/applications/forums/extensions/furlRedirect.php @@ -1,181 +1,214 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class furlRedirect_forums -{ - /** - * Key type: Type of action (topic/forum) - * - * @access private - * @var string - */ - private $_type = ''; - - /** - * Key ID - * - * @access private - * @var int - */ - private $_id = 0; - - /** - * Constructor - * - */ - function __construct( ipsRegistry $registry ) - { - $this->registry = $registry; - $this->DB = $registry->DB(); - $this->settings =& $registry->fetchSettings(); - } - - /** - * Set the key ID - * @example furlRedirect_forums::setKey( 'topic', 12 ); - * - * @access public - * @param string Type - * @param mixed Value - */ - public function setKey( $name, $value ) - { - $this->_type = $name; - $this->_id = $value; - } - - /** - * Set up the key by URI - * - * @access public - * @param string URI (example: index.php?showtopic=5&view=getlastpost) - * @return void - */ - public function setKeyByUri( $uri ) - { - $uri = str_replace( '&', '&', $uri ); - - if ( strstr( $uri, '?' ) ) - { - list( $_chaff, $uri ) = explode( '?', $uri ); - } - - foreach( explode( '&', $uri ) as $bits ) - { - list( $k, $v ) = explode( '=', $bits ); - - if ( $k ) - { - if ( $k == 'showtopic' ) - { - $this->setKey( 'topic', intval( $v ) ); - return TRUE; - } - else if ( $k == 'showforum' ) - { - $this->setKey( 'forum', intval( $v ) ); - return TRUE; - } - } - } - - return FALSE; - } - - /** - * Return the SEO title - * - * @access public - * @return string The SEO friendly name - */ - public function fetchSeoTitle() - { - switch ( $this->_type ) - { - default: - return FALSE; - break; - case 'topic': - return $this->_fetchSeoTitle_topic(); - break; - case 'forum': - return $this->_fetchSeoTitle_forum(); - break; - } - } - - /** - * Return the SEO title for a topic - * - * @access public - * @return string The SEO friendly name - */ - public function _fetchSeoTitle_topic() - { - $topic = $this->DB->buildAndFetch( array( 'select' => 'tid, title_seo, title, forum_id', - 'from' => 'topics', - 'where' => 'tid=' . intval( $this->_id ) ) ); - - if ( $topic['tid'] ) - { - /* Check permission */ - if ( ! $this->registry->getClass('class_forums')->forumsCheckAccess( $topic['forum_id'], 0, 'topic', $topic, TRUE ) ) - { - return FALSE; - } - - if ( IPB_USE_ONLY_ID_FURL ) return $topic['tid']; - - return ( $topic['title_seo'] ) ? $topic['title_seo'] : IPSText::makeSeoTitle( $topic['title'] ); - } - - return FALSE; - } - - /** - * Return the SEO title for a topic - * - * @access public - * @return string The SEO friendly name - */ - public function _fetchSeoTitle_forum() - { - $forum = $this->DB->buildAndFetch( array( 'select' => 'id, name_seo, name', - 'from' => 'forums', - 'where' => 'id=' . intval( $this->_id ) ) ); - - if ( $forum['id'] ) - { - /* Check permission */ - if ( ! $this->registry->getClass('class_forums')->forumsCheckAccess( $forum['id'], 0, 'forum', array(), TRUE ) ) - { - return FALSE; - } - - return ( $forum['name_seo'] ) ? $forum['name_seo'] : IPSText::makeSeoTitle( $forum['name'] ); - } - - return FALSE; - } + + * Invision Power Services + * IP.Board v3.1.4 + * RSS output plugin :: posts + * Last Updated: $Date: 2010-07-10 01:01:06 -0400 (Sat, 10 Jul 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 6/24/2008 + * @version $Revision: 6628 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class furlRedirect_forums +{ + /** + * Key type: Type of action (topic/forum) + * + * @access private + * @var string + */ + private $_type = ''; + + /** + * Key ID + * + * @access private + * @var int + */ + private $_id = 0; + + /** + * Constructor + * + */ + function __construct( ipsRegistry $registry ) + { + $this->registry = $registry; + $this->DB = $registry->DB(); + $this->settings =& $registry->fetchSettings(); + $this->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + } + + /** + * Set the key ID + * @example furlRedirect_forums::setKey( 'topic', 12 ); + * + * @access public + * @param string Type + * @param mixed Value + */ + public function setKey( $name, $value ) + { + $this->_type = $name; + $this->_id = $value; + } + + /** + * Set up the key by URI + * + * @access public + * @param string URI (example: index.php?showtopic=5&view=getlastpost) + * @return void + */ + public function setKeyByUri( $uri ) + { + $uri = str_replace( '&', '&', $uri ); + + if ( strstr( $uri, '?' ) ) + { + list( $_chaff, $uri ) = explode( '?', $uri ); + } + + foreach( explode( '&', $uri ) as $bits ) + { + list( $k, $v ) = explode( '=', $bits ); + + if ( $k ) + { + if ( $k == 'showtopic' ) + { + $this->setKey( 'topic', intval( $v ) ); + return TRUE; + } + else if ( $k == 'showforum' ) + { + $this->setKey( 'forum', intval( $v ) ); + return TRUE; + } + else if( $k == 'showannouncement' ) + { + $this->setKey( 'announcement', intval( $v ) ); + return TRUE; + } + } + } + + return FALSE; + } + + /** + * Return the SEO title + * + * @access public + * @return string The SEO friendly name + */ + public function fetchSeoTitle() + { + switch ( $this->_type ) + { + default: + return FALSE; + break; + case 'topic': + return $this->_fetchSeoTitle_topic(); + break; + case 'forum': + return $this->_fetchSeoTitle_forum(); + break; + case 'announcement': + return $this->_fetchSeoTitle_announcement(); + break; + } + } + + /** + * Return the SEO title for a topic + * + * @access public + * @return string The SEO friendly name + */ + public function _fetchSeoTitle_topic() + { + $topic = $this->DB->buildAndFetch( array( 'select' => 'tid, title_seo, title, forum_id', + 'from' => 'topics', + 'where' => 'tid=' . intval( $this->_id ) ) ); + + if ( $topic['tid'] ) + { + /* Check permission */ + if ( ! $this->registry->getClass('class_forums')->forumsCheckAccess( $topic['forum_id'], 0, 'topic', $topic, TRUE ) ) + { + return FALSE; + } + + if ( IPB_USE_ONLY_ID_FURL ) return $topic['tid']; + + return ( $topic['title_seo'] ) ? $topic['title_seo'] : IPSText::makeSeoTitle( $topic['title'] ); + } + + return FALSE; + } + + /** + * Return the SEO title for a forum + * + * @access public + * @return string The SEO friendly name + */ + public function _fetchSeoTitle_forum() + { + $forum = $this->DB->buildAndFetch( array( 'select' => 'id, name_seo, name', + 'from' => 'forums', + 'where' => 'id=' . intval( $this->_id ) ) ); + + if ( $forum['id'] ) + { + /* Check permission */ + if ( ! $this->registry->getClass('class_forums')->forumsCheckAccess( $forum['id'], 0, 'forum', array(), TRUE ) ) + { + return FALSE; + } + + return ( $forum['name_seo'] ) ? $forum['name_seo'] : IPSText::makeSeoTitle( $forum['name'] ); + } + + return FALSE; + } + + /** + * Return the SEO title for an announcement + * + * @access public + * @return string The SEO friendly name + */ + public function _fetchSeoTitle_announcement() + { + //$announce = $this->DB->buildAndFetch( array( 'select' => 'announce_id, announce_title', + // 'from' => 'announcements', + // 'where' => 'announce_id=' . intval( $this->_id ) ) ); + $announce = $this->caches['announcements'][ intval( $this->_id ) ]; + + if ( $announce['announce_id'] ) + { + return $announce['announce_seo_title'] ? $announce['announce_seo_title'] : IPSText::makeSeoTitle( $announce['announce_title'] ); + } + + return FALSE; + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/furlTemplates.php b/upload/admin/applications/forums/extensions/furlTemplates.php index 9b307b56..e7d251ee 100644 --- a/upload/admin/applications/forums/extensions/furlTemplates.php +++ b/upload/admin/applications/forums/extensions/furlTemplates.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Sets up SEO templates - * Last Updated: $Date: 2009-03-04 15:08:31 +0000 (Wed, 04 Mar 2009) $ + * Last Updated: $Date: 2010-10-27 14:13:29 -0400 (Wed, 27 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: mmecham $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4136 $ + * @version $Rev: 7057 $ * */ @@ -47,25 +49,25 @@ $_SEOTEMPLATES = array( 'showannouncement' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showannouncement=(.+?)((?:&|&)f=(.+?))?(&|$)#i', 'forum-$3/announcement-$1-#{__title__}/$4' ), - 'in' => array( 'regex' => "#/forum-(\d+?)?/announcement-(\d+?)-#i", + 'in' => array( 'regex' => '#/forum-(\d+?)?/announcement-(\d+?)-#i', 'matches' => array( array( 'showannouncement', '$2' ), array( 'f', '$1' ) ) ) ), 'showforum' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showforum=(.+?)(&|$)#i', 'forum/$1-#{__title__}/$2' ), - 'in' => array( 'regex' => "#/forum/(\d+?)-#i", + 'in' => array( 'regex' => '#^/forum/(\d+?)-#i', 'matches' => array( array( 'showforum', '$1' ) ) ) ), 'showtopic' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showtopic=(.+?)(&|$)#i', 'topic/$1-#{__title__}/$2' ), - 'in' => array( 'regex' => "#/topic/(\d+?)-#i", + 'in' => array( 'regex' => '#^/topic/(\d+?)-#i', 'matches' => array( array( 'showtopic', '$1' ) ) ) ), 'act=idx' => array( 'app' => 'forums', 'allowRedirect' => 0, 'out' => array( '#act=idx(&|$)#i', 'index$1' ), - 'in' => array( 'regex' => "#/index(/|$)#i", + 'in' => array( 'regex' => '#^/index(/|$|\?)#i', 'matches' => array( array( 'act', 'idx' ) ) ) ), ); \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/index.html b/upload/admin/applications/forums/extensions/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/extensions/index.html +++ b/upload/admin/applications/forums/extensions/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/memberSync.rename.php b/upload/admin/applications/forums/extensions/memberSync.rename.php index 785e6826..7eed16db 100644 --- a/upload/admin/applications/forums/extensions/memberSync.rename.php +++ b/upload/admin/applications/forums/extensions/memberSync.rename.php @@ -1,203 +1,220 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -/** - * Member Synchronization extensions - * - * @author $author$ - * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board - * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Rev: 4429 $ - **/ -class forumsMemberSync -{ - /** - * Registry reference - * - * @access public - * @var object - */ - public $registry; - - /** - * CONSTRUCTOR - * - * @access public - * @return void - **/ - public function __construct() - { - $this->registry = ipsRegistry::instance(); - } - - /** - * This method is run when a member is flagged as a spammer - * - * @access public - * @param array $member Array of member data - * @return void - **/ - public function onSetAsSpammer( $member ) - { - - } - - /** - * This method is run when a member is un-flagged as a spammer - * - * @access public - * @param array $member Array of member data - * @return void - **/ - public function onUnSetAsSpammer( $member ) - { - - } - - /** - * This method is run when a new account is created - * - * @access public - * @param array $member Array of member data - * @return void - **/ - public function onCreateAccount( $member ) - { - - } - - /** - * This method is run when the register form is displayed to a user - * - * @access public - * @return void - **/ - public function onRegisterForm() - { - - } - - /** - * This method is ren when a user successfully logs in - * - * @access public - * @param array $member Array of member data - * @return void - **/ - public function onLogin( $member ) - { - - } - - /** - * This method is called after a member account has been removed - * - * @access public - * @param string $ids SQL IN() clause - * @return void - **/ - public function onDelete( $mids ) - { - - } - - /** - * This method is called after a member's account has been merged into another member's account - * - * @access public - * @param array $member Member account being kept - * @param array $member2 Member account being removed - * @return void - **/ - public function onMerge( $member, $member2 ) - { - - } - - /** - * This method is run after a users email address is successfully changed - * - * @param integer $id Member ID - * @param string $new_email New email address - * @return void - **/ - public function onEmailChange( $id, $new_email ) - { - - } - - /** - * This method is run after a users password is successfully changed - * - * @access public - * @param integer $id Member ID - * @param string $new_plain_text_pass The new password - * @return void - **/ - public function onPassChange( $id, $new_plain_text_pass ) - { - - } - - /** - * This method is run after a users profile is successfully updated - * $member will contain EITHER 'member_id' OR 'email' depending on what data was passed to - * IPSMember::save(). - * - * @access public - * @param array $member Array of values that were changed - * @return void - **/ - public function onProfileUpdate( $member ) - { - - } - - /** - * This method is run after a users group is successfully changed - * - * @access public - * @param integer $id Member ID - * @param integer $new_group New Group ID - * @return void - **/ - public function onGroupChange( $id, $new_group ) - { - - } - - /** - * This method is run after a users display name is successfully changed - * - * @access public - * @param integer $id Member ID - * @param string $new_name New display name - * @return void - **/ - public function onNameChange( $id, $new_name ) - { - - } + + * Invision Power Services + * IP.Board v3.1.4 + * Forum permissions mappings + * Last Updated: $Date: 2010-04-26 14:40:44 -0400 (Mon, 26 Apr 2010) $ + * + * + * @author $author$ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 6179 $ + **/ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +/** + * Member Synchronization extensions + * + * @author $author$ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 6179 $ + **/ +class forumsMemberSync +{ + /** + * Registry reference + * + * @access public + * @var object + */ + public $registry; + + /** + * CONSTRUCTOR + * + * @access public + * @return void + **/ + public function __construct() + { + $this->registry = ipsRegistry::instance(); + } + + /** + * This method is run when a member is flagged as a spammer + * + * @access public + * @param array $member Array of member data + * @return void + **/ + public function onSetAsSpammer( $member ) + { + + } + + /** + * This method is run when a member is un-flagged as a spammer + * + * @access public + * @param array $member Array of member data + * @return void + **/ + public function onUnSetAsSpammer( $member ) + { + + } + + /** + * This method is run when a new account is created + * + * @access public + * @param array $member Array of member data + * @return void + **/ + public function onCreateAccount( $member ) + { + + } + + /** + * This method is run when the register form is displayed to a user + * + * @access public + * @return void + **/ + public function onRegisterForm() + { + + } + + /** + * This method is ren when a user successfully logs in + * + * @access public + * @param array $member Array of member data + * @return void + **/ + public function onLogin( $member ) + { + + } + + /** + * This method is called after a member account has been removed + * + * @access public + * @param string $ids SQL IN() clause + * @return void + **/ + public function onDelete( $mids ) + { + + } + + /** + * This method is called after a member's account has been merged into another member's account + * + * @access public + * @param array $member Member account being kept + * @param array $member2 Member account being removed + * @return void + **/ + public function onMerge( $member, $member2 ) + { + + } + + /** + * This method is run after a users email address is successfully changed + * + * @param integer $id Member ID + * @param string $new_email New email address + * @param string $old_email Old email address + * @return void + **/ + public function onEmailChange( $id, $new_email, $old_email ) + { + + } + + /** + * This method is run after a users password is successfully changed + * + * @access public + * @param integer $id Member ID + * @param string $new_plain_text_pass The new password + * @return void + **/ + public function onPassChange( $id, $new_plain_text_pass ) + { + + } + + /** + * This method is run after a users profile is successfully updated + * $member will contain EITHER 'member_id' OR 'email' depending on what data was passed to + * IPSMember::save(). + * + * @access public + * @param array $member Array of values that were changed + * @return void + **/ + public function onProfileUpdate( $member ) + { + + } + + /** + * This method is run after a users group is successfully changed + * + * @access public + * @param integer $id Member ID + * @param integer $new_group New Group ID + * @param integer $old_group Old Group ID + * @return void + **/ + public function onGroupChange( $id, $new_group, $old_group ) + { + + } + + /** + * This method is run after a users display name is successfully changed + * + * @access public + * @param integer $id Member ID + * @param string $new_name New display name + * @return void + **/ + public function onNameChange( $id, $new_name ) + { + + } + + /** + * This method is run when a user logs out + * + * @access public + * @param array $member Array of member data + * @return void + **/ + public function onLogOut( $member ) + { + + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/notifications.php b/upload/admin/applications/forums/extensions/notifications.php new file mode 100644 index 00000000..e8c940cd --- /dev/null +++ b/upload/admin/applications/forums/extensions/notifications.php @@ -0,0 +1,48 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Define the core notification types + * Last Updated: $Date: 2010-04-08 16:37:04 -0400 (Thu, 08 Apr 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 20th February 2002 + * @version $Rev: 6088 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +/** + * Notification types + */ + +class forums_notifications +{ + public function getConfiguration() + { + /** + * Notification types - Needs to be a method so when require_once is used, $_NOTIFY isn't empty + */ + $_NOTIFY = array( + array( 'key' => 'new_topic', 'default' => array( 'email' ), 'disabled' => array(), 'icon' => 'notify_newtopic' ), + array( 'key' => 'new_reply', 'default' => array( 'email' ), 'disabled' => array(), 'icon' => 'notify_newreply' ), + array( 'key' => 'post_quoted', 'default' => array(), 'disabled' => array(), 'icon' => 'notify_quoted' ), + // This is defined in ACP forum settings as an email, so it's not mapped to a specific member + //array( 'key' => 'new_topic_queue', 'default' => array( 'email' ), 'disabled' => array() ), + ); + return $_NOTIFY; + } +} \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/portalPlugins/index.html b/upload/admin/applications/forums/extensions/portalPlugins/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/extensions/portalPlugins/index.html +++ b/upload/admin/applications/forums/extensions/portalPlugins/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/portalPlugins/poll-cfg.php b/upload/admin/applications/forums/extensions/portalPlugins/poll-cfg.php index 02a520b5..dbf7fee5 100644 --- a/upload/admin/applications/forums/extensions/portalPlugins/poll-cfg.php +++ b/upload/admin/applications/forums/extensions/portalPlugins/poll-cfg.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Portal plugin: poll - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 1st march 2002 - * @version $Revision: 4948 $ + * @version $Revision: 5713 $ * */ diff --git a/upload/admin/applications/forums/extensions/portalPlugins/poll.php b/upload/admin/applications/forums/extensions/portalPlugins/poll.php index 2d21fda7..2884881f 100644 --- a/upload/admin/applications/forums/extensions/portalPlugins/poll.php +++ b/upload/admin/applications/forums/extensions/portalPlugins/poll.php @@ -1,20 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Portal plugin: poll - * Last Updated: $Date: 2009-06-16 08:17:58 -0400 (Tue, 16 Jun 2009) $ + * Last Updated: $Date: 2010-10-22 06:13:38 -0400 (Fri, 22 Oct 2010) $ + * * - * @author $Author: matt $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 1st march 2002 - * @version $Revision: 4778 $ - * + * @version $Revision: 7016 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -28,7 +28,6 @@ class ppi_poll extends public_portal_portal_portal /** * Initialize module * - * @access public * @return void */ public function init() @@ -38,8 +37,8 @@ class ppi_poll extends public_portal_portal_portal /** * Display a poll * - * @access public * @return string HTML content to replace tag with + * @todo We need to update the code below to load the furlTemplates file and check against it, then add a fallback on the normal url as a default. */ public function poll_show_poll() { @@ -89,14 +88,17 @@ class ppi_poll extends public_portal_portal_portal $this->registry->class_localization->loadLanguageFile( array( 'public_boards', 'public_topic' ), 'forums' ); $this->registry->class_localization->loadLanguageFile( array( 'public_editors' ), 'core' ); - require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" ); - $this->registry->setClass( 'class_forums', new class_forums( $this->registry ) ); + if( !$this->registry->isClassLoaded('class_forums') ) + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' ); + $this->registry->setClass( 'class_forums', new $classToLoad( $this->registry ) ); + + $this->registry->getClass('class_forums')->strip_invisible = 1; + $this->registry->getClass('class_forums')->forumsInit(); + } - $this->registry->getClass('class_forums')->strip_invisible = 1; - $this->registry->getClass('class_forums')->forumsInit(); - - require_once( IPSLib::getAppDir( 'forums', 'forums' ) . '/topics.php' ); - $topic = new public_forums_forums_topics(); + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'forums', 'forums' ) . '/topics.php', 'public_forums_forums_topics', 'forums' ); + $topic = new $classToLoad(); $topic->makeRegistryShortcuts( $this->registry ); $topic->topic = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => "tid=" . $tid ) ); @@ -114,5 +116,4 @@ class ppi_poll extends public_portal_portal_portal return; } } - -} +} \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/portalPlugins/recent_topics-cfg.php b/upload/admin/applications/forums/extensions/portalPlugins/recent_topics-cfg.php index 214e1aca..0f4e4cea 100644 --- a/upload/admin/applications/forums/extensions/portalPlugins/recent_topics-cfg.php +++ b/upload/admin/applications/forums/extensions/portalPlugins/recent_topics-cfg.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Portal plugin: recent topics - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 1st march 2002 - * @version $Revision: 4948 $ + * @version $Revision: 5713 $ * */ diff --git a/upload/admin/applications/forums/extensions/portalPlugins/recent_topics.php b/upload/admin/applications/forums/extensions/portalPlugins/recent_topics.php index f6eac95f..a9722443 100644 --- a/upload/admin/applications/forums/extensions/portalPlugins/recent_topics.php +++ b/upload/admin/applications/forums/extensions/portalPlugins/recent_topics.php @@ -1,20 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Portal plugin: recent topics - * Last Updated: $Date: 2009-12-07 21:57:46 -0500 (Mon, 07 Dec 2009) $ + * Last Updated: $Date: 2010-11-04 13:30:54 -0400 (Thu, 04 Nov 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 1st march 2002 - * @version $Revision: 5529 $ - * + * @version $Revision: 7093 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -28,7 +28,6 @@ class ppi_recent_topics extends public_portal_portal_portal /** * Initialize module * - * @access public * @return void */ public function init() @@ -39,7 +38,6 @@ class ppi_recent_topics extends public_portal_portal_portal /** * Show the recently started topic titles * - * @access public * @return string HTML content to replace tag with */ public function recent_topics_discussions_last_x() @@ -50,86 +48,15 @@ class ppi_recent_topics extends public_portal_portal_portal $results = array(); $limit = $this->settings['recent_topics_discuss_number'] ? $this->settings['recent_topics_discuss_number'] : 5; - $where_clause = array(); - - /* Loop through the forums and build a list of forums we're allowed access to */ - $forumIdsOk = array(); - - foreach( $this->registry->class_forums->forum_by_id as $id => $data ) - { - /* Can we read? */ - if ( ! $this->registry->permissions->check( 'read', $data ) ) - { - continue; - } + $results = $this->registry->class_forums->hooks_recentTopics( $limit, false ); - /* Can read, but is it password protected, etc? */ - if ( ! $this->registry->class_forums->forumsCheckAccess( $id, 0, 'forum', array(), true ) ) - { - continue; - } - - if ( ! $data['can_view_others'] ) - { - continue; - } - - if ( $data['min_posts_view'] > $this->memberData['posts'] ) - { - continue; - } - - $forumIdsOk[] = $id; - } - - if ( count( $forumIdsOk) ) - { - /* Add allowed forums */ - $where_clause[] = "t.forum_id IN (" . implode( ",", $forumIdsOk ) . ")"; - - $this->DB->build( array( 'select' => 't.tid, t.title, t.posts, t.start_date as post_date, t.views, t.title_seo, t.starter_name', - 'from' => array( 'topics' => 't' ), - 'where' => "t.approved=1 and t.state != 'closed' and (t.state != 'link') " . ( count($where_clause) ? ' AND ' . implode( ' AND ', $where_clause ) : '' ), - 'order' => 't.tid DESC', - 'limit' => array( 0, $limit ), - 'add_join' => array( - array( - 'from' => array( 'forums' => 'f' ), - 'where' => "f.id=t.forum_id", - 'type' => 'left', - ), - array( - 'select' => 'm.member_id, m.members_display_name, m.members_seo_name', - 'from' => array( 'members' => 'm' ), - 'where' => "m.member_id=t.starter_id", - 'type' => 'left', - ), - ) - ) ); - $outer = $this->DB->execute(); - - while ( $row = $this->DB->fetch($outer) ) - { - $row['title_display'] = IPSText::truncate( $row['title'], 30 ); - $row['date'] = $this->registry->class_localization->getDate( $row['post_date'], "manual{{$this->settings['csite_article_date']}}" ); - - if( !$row['member_id'] ) - { - $row['members_display_name'] = $this->settings['guest_name_pre'] . $row['starter_name'] . $this->settings['guest_name_suf']; - } - - $results[] = $row; - } - } - - return $this->registry->getClass('output')->getTemplate('portal')->latestPosts( $results ); + return count($results) ? $this->registry->getClass('output')->getTemplate('portal')->latestPosts( $results ) : ''; } /** * Show the "news" articles * - * @access public * @return string HTML content to replace tag with */ public function recent_topics_last_x() @@ -172,7 +99,7 @@ class ppi_recent_topics extends public_portal_portal_portal foreach( $this->registry->class_forums->forum_by_id as $id => $data ) { /* Allowing this forum? */ - if ( ! in_array( $id, $forums, $id ) ) + if ( ! in_array( $id, $forums ) ) { continue; } @@ -231,7 +158,7 @@ class ppi_recent_topics extends public_portal_portal_portal /* Fetch all pinned topics to avoid filesort */ $this->DB->build( array( 'select' => 't.tid, t.start_date', 'from' => 'topics t', - 'where' => "t.pinned=1 AND t.approved=1 AND t.state != 'link'" . ( count($where_clause) ? ' AND ' . implode( ' AND ', $where_clause ) : '' ), + 'where' => "t.pinned=1 AND t.approved=1 AND t.state != 'link' AND " . implode( ' AND ', $where_clause ), //'order' => 't.tid DESC', 'limit' => array ( $limit ) ) ); @@ -252,7 +179,7 @@ class ppi_recent_topics extends public_portal_portal_portal $this->DB->build( array( 'select' => 't.tid, t.start_date', 'from' => 'topics t', - 'where' => $pinnedWhere . "t.approved=1 AND t.state != 'link'" . ( count($where_clause) ? ' AND ' . implode( ' AND ', $where_clause ) : '' ), + 'where' => $pinnedWhere . "t.approved=1 AND t.state != 'link' AND " . implode( ' AND ', $where_clause ), 'order' => 'tid DESC', 'limit' => array ( $limit - count( $pinned ) ) ) ); @@ -428,11 +355,11 @@ class ppi_recent_topics extends public_portal_portal_portal //----------------------------------------- // Grab render attach class //----------------------------------------- - - require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' ); - $this->class_attach = new class_attach( $this->registry ); - $this->class_attach->attach_post_key = ''; + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $this->class_attach = new $classToLoad( $this->registry ); + + $this->class_attach->attach_post_key = ''; ipsRegistry::getClass( 'class_localization' )->loadLanguageFile( array( 'public_topic' ), 'forums' ); } diff --git a/upload/admin/applications/forums/extensions/profileTabs/index.html b/upload/admin/applications/forums/extensions/profileTabs/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/forums/extensions/profileTabs/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/members/sources/tabs/posts.conf.php b/upload/admin/applications/forums/extensions/profileTabs/posts.conf.php similarity index 67% rename from upload/admin/applications/members/sources/tabs/posts.conf.php rename to upload/admin/applications/forums/extensions/profileTabs/posts.conf.php index 54bbeb4f..96d34735 100644 --- a/upload/admin/applications/members/sources/tabs/posts.conf.php +++ b/upload/admin/applications/forums/extensions/profileTabs/posts.conf.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Config for posts plugin - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Members - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Revision: 4948 $ + * @version $Revision: 5713 $ * */ @@ -25,7 +27,7 @@ if ( ! defined( 'IN_IPB' ) ) /** * Plug in name (Default tab name) */ -$CONFIG['plugin_name'] = 'Сообщения'; +$CONFIG['plugin_name'] = 'Replies'; /** * Language string for the tab @@ -45,4 +47,4 @@ $CONFIG['plugin_enabled'] = 1; /** * Order */ -$CONFIG['plugin_order'] = 3; \ No newline at end of file +$CONFIG['plugin_order'] = 4; \ No newline at end of file diff --git a/upload/admin/applications/members/sources/tabs/posts.php b/upload/admin/applications/forums/extensions/profileTabs/posts.php similarity index 59% rename from upload/admin/applications/members/sources/tabs/posts.php rename to upload/admin/applications/forums/extensions/profileTabs/posts.php index c636ab1a..5e64478c 100644 --- a/upload/admin/applications/members/sources/tabs/posts.php +++ b/upload/admin/applications/forums/extensions/profileTabs/posts.php @@ -1,20 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Profile Plugin Library - * Last Updated: $Date: 2009-11-25 05:46:35 -0500 (Wed, 25 Nov 2009) $ + * Last Updated: $Date: 2010-10-23 08:40:34 -0400 (Sat, 23 Oct 2010) $ + * * - * @author $Author: matt $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Members - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Revision: 5468 $ - * + * @version $Revision: 7023 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -28,7 +28,6 @@ class profile_posts extends profile_plugin_parent /** * Attachment object * - * @access protected * @var object */ protected $attach; @@ -36,7 +35,6 @@ class profile_posts extends profile_plugin_parent /** * Feturn HTML block * - * @access public * @param array Member information * @return string HTML block */ @@ -124,54 +122,58 @@ class profile_posts extends profile_plugin_parent //----------------------------------------- // Get last X posts //----------------------------------------- - - $this->DB->build( array( - 'select' => 'p.*', - 'from' => array( 'posts' => 'p' ), - 'where' => "p.queued=0 AND t.approved=1 AND p.author_id={$member['member_id']} AND p.new_topic=0 AND t.forum_id IN (" . implode( ",", $forumIdsOk ) . ") " . $date_cut, - 'order' => 'p.post_date DESC', - 'limit' => array( 0, $last_x ), - 'add_join' => $_post_joins - ) ); - - $o = $this->DB->execute(); - while( $row = $this->DB->fetch( $o ) ) + if( is_array($forumIdsOk) AND count($forumIdsOk) ) { - $pids[ $row['pid'] ] = $row['pid']; + $this->DB->build( array( + 'select' => 'p.*', + 'from' => array( 'posts' => 'p' ), + 'where' => "p.queued=0 AND t.approved=1 AND p.author_id={$member['member_id']} AND p.new_topic=0 AND t.forum_id IN (" . implode( ",", $forumIdsOk ) . ") " . $date_cut, + 'order' => 'p.post_date DESC', + 'limit' => array( 0, $last_x ), + 'add_join' => $_post_joins + ) ); + + $o = $this->DB->execute(); - if( $row['topic_hasattach'] ) + while( $row = $this->DB->fetch( $o ) ) { - $parseAttachments = true; - } - - if ( ! $row['cache_content'] ) - { - IPSText::getTextClass( 'bbcode' )->parse_smilies = $row['use_emo']; - IPSText::getTextClass( 'bbcode' )->parse_html = ( $row['use_html'] and $this->memberData['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0; - IPSText::getTextClass( 'bbcode' )->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0; - IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; - IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics'; - IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id']; - IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others']; - - $row['post'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $row['post'] ); + $pids[ $row['pid'] ] = $row['pid']; - IPSContentCache::update( $row['pid'], 'post', $row['post'] ); + if( $row['topic_hasattach'] ) + { + $parseAttachments = true; + } + + if ( ! $row['cache_content'] ) + { + IPSText::getTextClass( 'bbcode' )->parse_smilies = $row['use_emo']; + IPSText::getTextClass( 'bbcode' )->parse_html = ( $row['use_html'] and $this->memberData['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0; + IPSText::getTextClass( 'bbcode' )->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0; + IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; + IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics'; + IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id']; + IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others']; + + $row['post'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $row['post'] ); + + IPSContentCache::update( $row['pid'], 'post', $row['post'] ); + } + else + { + $row['post'] = $row['cache_content']; + } + + $row['post'] = IPSLib::memberViewImages( $row['post'] ); + + $row['_post_date'] = ipsRegistry::getClass( 'class_localization')->getDate( $row['post_date'], 'SHORT' ); + $row['_raw_date'] = $row['post_date']; + $row['_date_array'] = IPSTime::date_getgmdate( $row['post_date'] + ipsRegistry::getClass( 'class_localization')->getTimeOffset() ); + + $row['post'] .= "\n"; + + $content .= $this->registry->getClass('output')->getTemplate('profile')->tabSingleColumn( $row, $this->lang->words['profile_read_topic'], $this->settings['base_url'].'app=forums&module=forums&section=findpost&pid='.$row['pid'], $this->lang->words['profile_in_topic'] . $row['title'] ); } - else - { - $row['post'] = $row['cache_content']; - } - - $row['post'] = IPSLib::memberViewImages( $row['post'] ); - - $row['_post_date'] = ipsRegistry::getClass( 'class_localization')->getDate( $row['post_date'], 'SHORT' ); - $row['_date_array'] = IPSTime::date_getgmdate( $row['post_date'] + ipsRegistry::getClass( 'class_localization')->getTimeOffset() ); - - $row['post'] .= "\n"; - - $content .= $this->registry->getClass('output')->getTemplate('profile')->tabSingleColumn( $row, $this->lang->words['profile_read_topic'], $this->settings['base_url'].'app=forums&module=forums&section=findpost&pid='.$row['pid'], $this->lang->words['profile_in_topic'] . $row['title'] ); } //----------------------------------------- @@ -180,8 +182,8 @@ class profile_posts extends profile_plugin_parent if ( $parseAttachments AND !is_object( $this->class_attach ) ) { - require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' ); - $this->class_attach = new class_attach( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $this->class_attach = new $classToLoad( $this->registry ); $this->class_attach->type = 'post'; $this->class_attach->init(); @@ -207,5 +209,4 @@ class profile_posts extends profile_plugin_parent return $content ? $this->registry->getClass('output')->getTemplate('profile')->tabPosts( $content ) : $this->registry->getClass('output')->getTemplate('profile')->tabNoContent( 'err_no_posts_to_show' ); } - } \ No newline at end of file diff --git a/upload/admin/applications/members/sources/tabs/topics.conf.php b/upload/admin/applications/forums/extensions/profileTabs/topics.conf.php similarity index 67% rename from upload/admin/applications/members/sources/tabs/topics.conf.php rename to upload/admin/applications/forums/extensions/profileTabs/topics.conf.php index 33bd5ce6..9ea8b324 100644 --- a/upload/admin/applications/members/sources/tabs/topics.conf.php +++ b/upload/admin/applications/forums/extensions/profileTabs/topics.conf.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Config for topics plugin - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Members - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Revision: 4948 $ + * @version $Revision: 5713 $ * */ @@ -25,7 +27,7 @@ if ( ! defined( 'IN_IPB' ) ) /** * Plug in name (Default tab name) */ -$CONFIG['plugin_name'] = 'Темы'; +$CONFIG['plugin_name'] = 'Topics'; /** * Language string for the tab @@ -45,4 +47,4 @@ $CONFIG['plugin_enabled'] = 1; /** * Order */ -$CONFIG['plugin_order'] = 2; \ No newline at end of file +$CONFIG['plugin_order'] = 3; \ No newline at end of file diff --git a/upload/admin/applications/members/sources/tabs/topics.php b/upload/admin/applications/forums/extensions/profileTabs/topics.php similarity index 59% rename from upload/admin/applications/members/sources/tabs/topics.php rename to upload/admin/applications/forums/extensions/profileTabs/topics.php index 7a2fb4bb..02492c1b 100644 --- a/upload/admin/applications/members/sources/tabs/topics.php +++ b/upload/admin/applications/forums/extensions/profileTabs/topics.php @@ -1,20 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Profile Plugin Library - * Last Updated: $Date: 2009-09-15 05:56:15 -0400 (Tue, 15 Sep 2009) $ + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * * - * @author $Author: matt $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Members - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Revision: 5112 $ - * + * @version $Revision: 7003 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -28,7 +28,6 @@ class profile_topics extends profile_plugin_parent /** * Attachment object * - * @access protected * @var object */ protected $attach; @@ -36,7 +35,6 @@ class profile_topics extends profile_plugin_parent /** * Return HTML block * - * @access public * @param array Member information * @return string HTML block */ @@ -121,61 +119,64 @@ class profile_topics extends profile_plugin_parent //----------------------------------------- // Get last X posts //----------------------------------------- - - $this->DB->build( array( 'select' => 't.*', - 'from' => array( 'topics' => 't' ), - 'where' => "t.starter_id={$member['member_id']} AND t.approved=1 AND t.forum_id IN (" . implode( ",", $forumIdsOk ) . ") " . $date_cut, - 'order' => 't.start_date DESC', - 'limit' => array( 0, $last_x ), - 'add_join' => $_post_joins ) ); - $o = $this->DB->execute(); - while( $row = $this->DB->fetch( $o ) ) + if( is_array($forumIdsOk) AND count($forumIdsOk) ) { - //----------------------------------------- - // Ghost topics... BOO - //----------------------------------------- + $this->DB->build( array( 'select' => 't.*', + 'from' => array( 'topics' => 't' ), + 'where' => "t.starter_id={$member['member_id']} AND t.approved=1 AND t.forum_id IN (" . implode( ",", $forumIdsOk ) . ") " . $date_cut, + 'order' => 't.start_date DESC', + 'limit' => array( 0, $last_x ), + 'add_join' => $_post_joins ) ); + $o = $this->DB->execute(); - if( !$row['pid'] ) + while( $row = $this->DB->fetch( $o ) ) { - continue; - } - - $pids[ $row['pid'] ] = $row['pid']; - - if( $row['topic_hasattach'] ) - { - $parseAttachments = true; - } - - if ( ! $row['cache_content'] ) - { - IPSText::getTextClass( 'bbcode' )->parse_smilies = $row['use_emo']; - IPSText::getTextClass( 'bbcode' )->parse_html = ( $row['use_html'] and $this->memberData['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0; - IPSText::getTextClass( 'bbcode' )->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0; - IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; - IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics'; - IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id']; - IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others']; - - $row['post'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $row['post'] ); + //----------------------------------------- + // Ghost topics... BOO + //----------------------------------------- - IPSContentCache::update( $row['pid'], 'post', $row['post'] ); + if( !$row['pid'] ) + { + continue; + } + + $pids[ $row['pid'] ] = $row['pid']; + + if( $row['topic_hasattach'] ) + { + $parseAttachments = true; + } + + if ( ! $row['cache_content'] ) + { + IPSText::getTextClass( 'bbcode' )->parse_smilies = $row['use_emo']; + IPSText::getTextClass( 'bbcode' )->parse_html = ( $row['use_html'] and $this->memberData['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0; + IPSText::getTextClass( 'bbcode' )->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0; + IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; + IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics'; + IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id']; + IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others']; + + $row['post'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $row['post'] ); + + IPSContentCache::update( $row['pid'], 'post', $row['post'] ); + } + else + { + $row['post'] = $row['cache_content']; + } + + $row['post'] = IPSLib::memberViewImages( $row['post'] ); + + $row['_post_date'] = ipsRegistry::getClass( 'class_localization')->getDate( $row['post_date'], 'SHORT' ); + $row['_raw_date'] = $row['post_date']; + $row['_date_array'] = IPSTime::date_getgmdate( $row['post_date'] + ipsRegistry::getClass( 'class_localization')->getTimeOffset() ); + + $row['post'] .= "\n"; + + $content .= $this->registry->getClass('output')->getTemplate('profile')->tabSingleColumn( $row, $this->lang->words['profile_read_topic'], $this->settings['base_url'].'app=forums&module=forums&section=findpost&pid='.$row['pid'], $row['title'] ); } - else - { - $row['post'] = $row['cache_content']; - } - - $row['post'] = IPSLib::memberViewImages( $row['post'] ); - - - $row['_post_date'] = ipsRegistry::getClass( 'class_localization')->getDate( $row['post_date'], 'SHORT' ); - $row['_date_array'] = IPSTime::date_getgmdate( $row['post_date'] + ipsRegistry::getClass( 'class_localization')->getTimeOffset() ); - - $row['post'] .= "\n"; - - $content .= $this->registry->getClass('output')->getTemplate('profile')->tabSingleColumn( $row, $this->lang->words['profile_read_topic'], $this->settings['base_url'].'app=forums&module=forums&section=findpost&pid='.$row['pid'], $row['title'] ); } //----------------------------------------- @@ -184,8 +185,8 @@ class profile_topics extends profile_plugin_parent if ( $parseAttachments AND !is_object( $this->class_attach ) ) { - require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' ); - $this->class_attach = new class_attach( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $this->class_attach = new $classToLoad( $this->registry ); $this->class_attach->type = 'post'; $this->class_attach->init(); @@ -211,5 +212,4 @@ class profile_topics extends profile_plugin_parent return $content ? $this->registry->getClass('output')->getTemplate('profile')->tabTopics( $content ) : $this->registry->getClass('output')->getTemplate('profile')->tabNoContent( 'err_no_posts_to_show' ); } - } \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/reportPlugins/index.html b/upload/admin/applications/forums/extensions/reportPlugins/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/forums/extensions/reportPlugins/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/sources/reportPlugins/post.php b/upload/admin/applications/forums/extensions/reportPlugins/post.php similarity index 76% rename from upload/admin/applications/core/sources/reportPlugins/post.php rename to upload/admin/applications/forums/extensions/reportPlugins/post.php index 8f7a7f12..f5ff1c37 100644 --- a/upload/admin/applications/core/sources/reportPlugins/post.php +++ b/upload/admin/applications/forums/extensions/reportPlugins/post.php @@ -1,555 +1,484 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class post_plugin -{ - /**#@+ - * Registry objects - * - * @access protected - * @var object - */ - protected $registry; - protected $DB; - protected $settings; - protected $request; - protected $lang; - protected $member; - protected $cache; - /**#@-*/ - - /** - * Holds extra data for the plugin - * - * @access private - * @var array Data specific to the plugin - */ - public $_extra; - - /** - * Constructor - * - * @access public - * @param object Registry object - * @return void - */ - public function __construct( ipsRegistry $registry ) - { - //----------------------------------------- - // 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->cache = $this->registry->cache(); - $this->caches =& $this->registry->cache()->fetchCaches(); - $this->lang = $this->registry->class_localization; - - require_once( IPSLib::getAppDir( 'forums' ) . '/app_class_forums.php' ); - $app_class_forums = new app_class_forums( $this->registry ); - } - - /** - * Display the form for extra data in the ACP - * - * @access public - * @param array Plugin data - * @param object HTML object - * @return string HTML to add to the form - */ - public function displayAdminForm( $plugin_data, &$html ) - { - return $html->addRow( $this->lang->words['r_supermod'], - sprintf( $this->lang->words['r_supermod_info'], $this->settings['_base_url'] ), - $this->registry->output->formYesNo('report_supermod', (!isset( $plugin_data['report_supermod'] )) ? 1 : $plugin_data['report_supermod'] ) - ); - } - - /** - * Process the plugin's form fields for saving - * - * @access public - * @param array Plugin data for save - * @return string Error message - */ - public function processAdminForm( &$save_data_array ) - { - $save_data_array['report_supermod'] = intval($this->request['report_supermod']); - - return ''; - } - - /** - * Update timestamp for report - * - * @access public - * @param array New reports - * @param array New members cache - * @return boolean - */ - public function updateReportsTimestamp( $new_reports, &$new_members_cache ) - { - $nmc =& $new_members_cache['report_temp']['post_marker']; - - foreach( $new_reports as $report ) - { - if( $report['is_new'] == 1 || $report['is_active'] == 1 ) - { - $nmc['forum'][ $report['exdat1'] ]['info'] = array( 'id' => $report['id'], 'title' => $report['title'], 'com_id' => $report['com_id'] ); - $nmc['topic'][ $report['exdat2'] ]['info'] = array( 'id' => $report['id'], 'title' => $report['title'], 'com_id' => $report['com_id'] ); - $nmc['post'][ $report['exdat3'] ]['info'] = array( 'id' => $report['id'], 'title' => $report['title'], 'com_id' => $report['com_id'] ); - } - if( $report['is_new'] == 1 ) - { - $nmc['forum'][ $report['exdat1'] ]['gfx'] = 1; - $nmc['topic'][ $report['exdat2'] ]['gfx'] = 1; - $nmc['post'][ $report['exdat3'] ]['gfx'] = 1; - } - elseif( $report['is_active'] == 1 ) - { - $nmc['forum'][ $report['exdat1'] ]['gfx'] = 2; - $nmc['topic'][ $report['exdat2'] ]['gfx'] = 2; - $nmc['post'][ $report['exdat3'] ]['gfx'] = 2; - } - } - } - - /** - * Get report permissions - * - * @access public - * @param string Type of perms to check - * @param array Permissions data - * @param array group ids - * @param string Special permissions - * @return boolean - */ - public function getReportPermissions( $check, $com_dat, $group_ids, &$to_return ) - { - if( ( $this->memberData['g_is_supmod'] == 1 && ( ! isset($this->_extra['report_supermod']) || $this->_extra['report_supermod'] == 1 ) ) ) - { - return true; - } - else - { - $forum_ids = array(); - - foreach( $this->caches['moderators'] as $mod ) - { - if( $mod['member_id'] == $this->memberData['member_id'] ) - { - $these_forums = explode( ',', IPSText::cleanPermString( $mod['forum_id'] ) ); - - foreach( $these_forums as $forum_id ) - { - $forum_ids['exdat1'][] = $forum_id; - } - } - elseif( $mod['is_group'] == 1 && in_array( $mod['group_id'], $group_ids ) == true ) - { - $these_forums = explode( ',', IPSText::cleanPermString( $mod['forum_id'] ) ); - - foreach( $these_forums as $forum_id ) - { - $forum_ids['exdat1'][] = $forum_id; - } - } - } - if( count( $forum_ids ) > 0 ) - { - $to_return = $forum_ids; - return true; - } - else - { - return false; - } - } - } - - /** - * Show the report form for this module - * - * @access public - * @param array Application data - * @return string HTML form information - */ - public function reportForm( $com_dat ) - { - $this->lang->words['report_basic_title'] = $this->lang->words['report_post_title']; - $this->lang->words['report_basic_url_title'] = $this->lang->words['report_post_url_title']; - $this->lang->words['report_basic_enter'] = $this->lang->words['report_post_enter']; - - $this->registry->output->setTitle( $this->lang->words['report_basic_title'] ); - $this->registry->output->addNavigation( $this->lang->words['report_basic_title'], '' ); - - $topic_id = intval($this->request['tid']); - $this->_checkAccess( $topic_id ); - - $extra_data = array( - 'topic_id' => intval($topic_id), - 'post_id' => intval($this->request['pid']), - 'forum_id' => intval($this->topic['forum_id']), - ); - - $url = $this->registry->output-> buildSEOUrl( "showtopic={$extra_data['topic_id']}&view=findpost&p={$extra_data['post_id']}", 'public', $this->topic['title_seo'], 'showtopic' ); - - //----------------------------------------- - // Title, URL Extra Data (Array) - //----------------------------------------- - - return $this->registry->getClass('reportLibrary')->showReportForm( $this->topic['title'], $url, $extra_data ); - } - - /** - * Get section and link - * - * @access public - * @param array Report data - * @return array Section/link - */ - public function giveSectionLinkTitle( $report_row ) - { - return array( - 'title' => $this->registry->class_forums->forum_by_id[ $report_row['exdat1'] ]['name'], - 'url' => '/index.php?showforum=' . $report_row['exdat1'], - 'seo_title' => $this->registry->class_forums->forum_by_id[ $report_row['exdat1'] ]['name_seo'], - 'seo_template' => 'showforum', - ); - } - - /** - * Process a report and save the data appropriate - * - * @access public - * @param array Report data - * @return array Data from saving the report - */ - public function processReport( $com_dat ) - { - $topic_id = intval($this->request['topic_id']); - $post_id = intval($this->request['post_id']); - $forum_id = intval($this->request['forum_id']); - - if( ! $topic_id || ! $post_id ) - { - $this->registry->output->showError( 'reports_missing_tidpid', 10168 ); - } - - $uid = md5( 'topic_' . $topic_id . '_' . $post_id . '_' . $forum_id . '_' . $com_dat['com_id'] ); - - $url = 'showtopic=' . intval($topic_id) . '&view=findpost&p=' . intval($post_id); - $save_url = str_replace( '&', '&', $url); - - $status = array(); - - $this->DB->build( array( 'select' => 'status, is_new, is_complete', - 'from' => 'rc_status', - 'where' => "is_new=1 OR is_complete=1", - ) ); - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - if( $row['is_new'] == 1 ) - { - $status['new'] = $row['status']; - } - elseif( $row['is_complete'] == 1 ) - { - $status['complete'] = $row['status']; - } - } - - $data = $this->DB->buildAndFetch( array( - 'select' => 'p.post', - 'from' => array( 'posts' => 'p' ), - 'where' => 'p.pid=' . $post_id, - 'add_join' => array( - array( - 'select' => 't.title_seo', - 'from' => array( 'topics' => 't' ), - 'where' => 't.tid=p.topic_id', - 'type' => 'left', - ), - array( - 'select' => 'mem.member_id, mem.members_display_name', - 'from' => array( 'members' => 'mem' ), - 'where' => 'mem.member_id=p.author_id', - 'type' => 'left', - ), - ) - ) ); - - IPSText::getTextClass('bbcode')->parse_bbcode = 1; - IPSText::getTextClass('bbcode')->parse_html = 0; - IPSText::getTextClass('bbcode')->parse_emoticons = 1; - IPSText::getTextClass('bbcode')->parse_nl2br = 0; - IPSText::getTextClass('bbcode')->parsing_section = 'global'; - - $message = "[quote name='" . IPSText::getTextClass('bbcode')->makeQuoteSafe( $data['members_display_name'] ) . "']"; - $message .= IPSText::getTextClass('bbcode')->preEditParse( $data['post'] ); - $message .= "[/quote]\n\n"; - $message .= $this->request['message']; - - $this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports_index', 'where' => "uid='{$uid}'" ) ); - $this->DB->execute(); - - if( $this->DB->getTotalRows() == 0 ) - { - $this->_checkAccess( $topic_id ); - - $built_report_main = array( - 'uid' => $uid, - 'title' => $this->topic['title'], - 'status' => $status['new'], - 'url' => '/index.php?' . $save_url, - 'seoname' => $data['title_seo'], - 'seotemplate' => 'showtopic', - 'rc_class' => $com_dat['com_id'], - 'updated_by' => $this->memberData['member_id'], - 'date_updated' => time(), - 'date_created' => time(), - 'exdat1' => $forum_id, - 'exdat2' => $topic_id, - 'exdat3' => $post_id, - ); - - $this->DB->insert( 'rc_reports_index', $built_report_main ); - $rid = $this->DB->getInsertId(); - } - else - { - $the_report = $this->DB->fetch(); - $rid = $the_report['id']; - $this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'], 'seoname' => $data['title_seo'], 'seotemplate' => 'showtopic' ), "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'; - - $build_report = array( - 'rid' => $rid, - 'report' => IPSText::getTextClass('bbcode')->preDbParse( $message ), - 'report_by' => $this->memberData['member_id'], - 'date_reported' => time(), - ); - $this->DB->insert( 'rc_reports', $build_report ); - - $reports = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'rc_reports', 'where' => "rid='{$rid}'" ) ); - - $this->DB->update( 'rc_reports_index', array( 'num_reports' => $reports['total'] ), "id='{$rid}'" ); - - $return_data = array( - 'REDIRECT_URL' => $url, - 'FORUM_ID' => $forum_id, - 'REPORT_INDEX' => $rid, - 'SAVED_URL' => '/index.php?' . $save_url, - 'REPORT' => $build_report['report'], - 'SEOTITLE' => $data['title_seo'], - 'TEMPLATE' => 'showtopic', - ); - - return $return_data; - } - - /** - * Where to send user after report is submitted - * - * @access public - * @param array Report data - * @return void - */ - public function reportRedirect( $report_data ) - { - $this->registry->output->redirectScreen( $this->lang->words['report_sending'], $this->settings['base_url'] . $report_data['REDIRECT_URL'], $report_data['SEOTITLE'], $report_data['TEMPLATE'] ); - } - - /** - * Retrieve list of users to send notifications to - * - * @access public - * @param string Group ids - * @param array Report data - * @return array Array of users to PM/Email - */ - public function getNotificationList( $group_ids, $report_data ) - { - //----------------------------------------- - // Build where for secondary member groups - //----------------------------------------- - - $secondaryWhere = array(); - - if( is_array($group_ids) AND count($group_ids) ) - { - foreach( $group_ids as $group_id ) - { - $secondaryWhere[] = "m.mgroup_others LIKE '%,{$group_id},%'"; - } - } - - $this->DB->build( array( - 'select' => 'noti.*', - 'from' => array( 'rc_modpref' => 'noti' ), - 'where' => "(m.member_group_id IN(" . $group_ids . ") " . ( count($secondaryWhere) ? "OR " . implode( ' OR ', $secondaryWhere ) : '' ) . ") AND moderator.forum_id LIKE '%,{$report_data['FORUM_ID']},%'", - 'add_join' => array( - array( - 'select' => 'm.member_id, m.members_display_name as name, m.language, m.members_disable_pm, m.email, m.member_group_id', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=noti.mem_id', - ), - array( - 'select' => 'moderator.member_id, moderator.group_id', - 'from' => array( 'moderators' => 'moderator' ), - 'where' => 'moderator.member_id=m.member_id OR moderator.group_id=m.member_group_id', - ), - ) - ) ); - $this->DB->execute(); - - $mods = array(); - $notify = array(); - - if ( $this->DB->getTotalRows() ) - { - while( $r = $this->DB->fetch() ) - { - $r['member_id'] = $r['mem_id']; - - $mods[] = $r; - } - } - else - { - $this->DB->build( array( - 'select' => 'noti.*', - 'from' => array( 'rc_modpref' => 'noti' ), - 'where' => "(m.member_group_id IN(" . $group_ids . ") " . ( count($secondaryWhere) ? "OR " . implode( ' OR ', $secondaryWhere ) : '' ) . ") AND g.g_is_supmod=1", - 'add_join' => array( - array( - 'select' => 'm.member_id, m.members_display_name as name, m.language, m.members_disable_pm, m.email, m.member_group_id', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=noti.mem_id', - 'type' => 'left', - ), - array( - 'from' => array( 'groups' => 'g' ), - 'where' => 'g.g_id=m.member_group_id', - 'type' => 'left', - ), - ) - ) ); - $this->DB->execute(); - - if ( $this->DB->getTotalRows() ) - { - while( $r = $this->DB->fetch() ) - { - $mods[] = $r; - } - } - else - { - $this->DB->build( array( - 'select' => 'noti.*', - 'from' => array( 'rc_modpref' => 'noti' ), - 'where' => "(m.member_group_id IN(" . $group_ids . ") " . ( count($secondaryWhere) ? "OR " . implode( ' OR ', $secondaryWhere ) : '' ) . ") AND g.g_access_cp=1", - 'add_join' => array( - array( - 'select' => 'm.member_id, m.members_display_name as name, m.language, m.members_disable_pm, m.email, m.member_group_id', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=noti.mem_id', - 'type' => 'left', - ), - array( - 'from' => array( 'groups' => 'g' ), - 'where' => 'g.g_id=m.member_group_id', - 'type' => 'left', - ), - ) - ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $mods[] = $r; - } - } - } - - foreach( $mods as $row ) - { - if( $row['by_pm'] == 1 ) - { - $notify['PM'][] = $row; - } - if( $row['by_email'] == 1 ) - { - $notify['EMAIL'][] = $row; - } - - $notify['RSS'][] = $row; - } - - return $notify; - } - - /** - * Check access to report the topic - * - * @access private - * @param integer Topic id - * @return void - */ - private function _checkAccess( $tid ) - { - if ( ! $this->memberData['member_id'] ) - { - $this->registry->output->showError( 'reports_must_be_member', 10169 ); - } - - //----------------------------------------- - // Needs silly a. alias to keep oracle - // happy - //----------------------------------------- - - $this->topic = $this->DB->buildAndFetch( array( 'select' => 'a.*,a.title as topic_title', 'from' => 'topics a', 'where' => "a.tid=" . $tid ) ); - - if( ipsRegistry::isClassLoaded('class_forums') !== TRUE ) - { - require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" ); - $this->registry->setClass( 'class_forums', new class_forums( $this->registry ) ); - $this->registry->getClass( 'class_forums' )->forumsInit(); - } - - $this->registry->getClass('class_forums')->forumsCheckAccess( $this->topic['forum_id'], 0, 'topic', $this->topic ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Report Center :: Posts plugin + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @author Based on original "Report Center" by Luke Scott + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 5713 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class post_plugin +{ + /**#@+ + * Registry objects + * + * @var object + */ + protected $registry; + protected $DB; + protected $settings; + protected $request; + protected $lang; + protected $member; + protected $memberData; + protected $cache; + protected $caches; + /**#@-*/ + + /** + * Holds extra data for the plugin + * + * @var array Data specific to the plugin + */ + public $_extra; + + /** + * Constructor + * + * @param object Registry object + * @return void + */ + public function __construct( ipsRegistry $registry ) + { + //----------------------------------------- + // 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->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + $this->lang = $this->registry->class_localization; + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/app_class_forums.php', 'app_class_forums', 'forums' ); + $app_class_forums = new $classToLoad( $this->registry ); + } + + /** + * Display the form for extra data in the ACP + * + * @param array Plugin data + * @param object HTML object + * @return string HTML to add to the form + */ + public function displayAdminForm( $plugin_data, &$html ) + { + return $html->addRow( $this->lang->words['r_supermod'], + sprintf( $this->lang->words['r_supermod_info'], $this->settings['_base_url'] ), + $this->registry->output->formYesNo('report_supermod', (!isset( $plugin_data['report_supermod'] )) ? 1 : $plugin_data['report_supermod'] ) + ); + } + + /** + * Process the plugin's form fields for saving + * + * @param array Plugin data for save + * @return string Error message + */ + public function processAdminForm( &$save_data_array ) + { + $save_data_array['report_supermod'] = intval($this->request['report_supermod']); + + return ''; + } + + /** + * Update timestamp for report + * + * @param array New reports + * @param array New members cache + * @return boolean + */ + public function updateReportsTimestamp( $new_reports, &$new_members_cache ) + { + $nmc =& $new_members_cache['report_temp']['post_marker']; + + foreach( $new_reports as $report ) + { + if( $report['is_new'] == 1 || $report['is_active'] == 1 ) + { + $nmc['forum'][ $report['exdat1'] ]['info'] = array( 'id' => $report['id'], 'title' => $report['title'], 'com_id' => $report['com_id'] ); + $nmc['topic'][ $report['exdat2'] ]['info'] = array( 'id' => $report['id'], 'title' => $report['title'], 'com_id' => $report['com_id'] ); + $nmc['post'][ $report['exdat3'] ]['info'] = array( 'id' => $report['id'], 'title' => $report['title'], 'com_id' => $report['com_id'] ); + } + if( $report['is_new'] == 1 ) + { + $nmc['forum'][ $report['exdat1'] ]['gfx'] = 1; + $nmc['topic'][ $report['exdat2'] ]['gfx'] = 1; + $nmc['post'][ $report['exdat3'] ]['gfx'] = 1; + } + elseif( $report['is_active'] == 1 ) + { + $nmc['forum'][ $report['exdat1'] ]['gfx'] = 2; + $nmc['topic'][ $report['exdat2'] ]['gfx'] = 2; + $nmc['post'][ $report['exdat3'] ]['gfx'] = 2; + } + } + } + + /** + * Get report permissions + * + * @param string Type of perms to check + * @param array Permissions data + * @param array group ids + * @param string Special permissions + * @return boolean + */ + public function getReportPermissions( $check, $com_dat, $group_ids, &$to_return ) + { + if( ( $this->memberData['g_is_supmod'] == 1 && ( ! isset($this->_extra['report_supermod']) || $this->_extra['report_supermod'] == 1 ) ) ) + { + return true; + } + else + { + if ( ! is_array( $this->caches['moderators'] ) ) + { + return false; + } + + $forum_ids = array(); + + foreach( $this->caches['moderators'] as $mod ) + { + if( $mod['member_id'] == $this->memberData['member_id'] ) + { + $these_forums = explode( ',', IPSText::cleanPermString( $mod['forum_id'] ) ); + + foreach( $these_forums as $forum_id ) + { + $forum_ids['exdat1'][] = $forum_id; + } + } + elseif( $mod['is_group'] == 1 && in_array( $mod['group_id'], $group_ids ) == true ) + { + $these_forums = explode( ',', IPSText::cleanPermString( $mod['forum_id'] ) ); + + foreach( $these_forums as $forum_id ) + { + $forum_ids['exdat1'][] = $forum_id; + } + } + } + if( count( $forum_ids ) > 0 ) + { + $to_return = $forum_ids; + return true; + } + else + { + return false; + } + } + } + + /** + * Show the report form for this module + * + * @param array Application data + * @return string HTML form information + */ + public function reportForm( $com_dat ) + { + $this->lang->words['report_basic_title'] = $this->lang->words['report_post_title']; + $this->lang->words['report_basic_url_title'] = $this->lang->words['report_post_url_title']; + $this->lang->words['report_basic_enter'] = $this->lang->words['report_post_enter']; + + $this->registry->output->setTitle( $this->lang->words['report_basic_title'] ); + $this->registry->output->addNavigation( $this->lang->words['report_basic_title'], '' ); + + $topic_id = intval($this->request['tid']); + $this->_checkAccess( $topic_id ); + + $extra_data = array( + 'topic_id' => intval($topic_id), + 'post_id' => intval($this->request['pid']), + 'forum_id' => intval($this->topic['forum_id']), + ); + + $url = $this->registry->output->buildSEOUrl( "showtopic={$extra_data['topic_id']}&view=findpost&p={$extra_data['post_id']}", 'public', $this->topic['title_seo'], 'showtopic' ); + + //----------------------------------------- + // Title, URL Extra Data (Array) + //----------------------------------------- + + return $this->registry->getClass('reportLibrary')->showReportForm( $this->topic['title'], $url, $extra_data ); + } + + /** + * Get section and link + * + * @param array Report data + * @return array Section/link + */ + public function giveSectionLinkTitle( $report_row ) + { + return array( + 'title' => $this->registry->class_forums->forum_by_id[ $report_row['exdat1'] ]['name'], + 'url' => '/index.php?showforum=' . $report_row['exdat1'], + 'seo_title' => $this->registry->class_forums->forum_by_id[ $report_row['exdat1'] ]['name_seo'], + 'seo_template' => 'showforum', + ); + } + + /** + * Process a report and save the data appropriate + * + * @param array Report data + * @return array Data from saving the report + */ + public function processReport( $com_dat ) + { + $topic_id = intval($this->request['topic_id']); + $post_id = intval($this->request['post_id']); + $forum_id = intval($this->request['forum_id']); + + if( ! $topic_id || ! $post_id ) + { + $this->registry->output->showError( 'reports_missing_tidpid', 10168 ); + } + + $uid = md5( 'topic_' . $topic_id . '_' . $post_id . '_' . $forum_id . '_' . $com_dat['com_id'] ); + + $url = 'showtopic=' . intval($topic_id) . '&view=findpost&p=' . intval($post_id); + $save_url = str_replace( '&', '&', $url); + + $status = array(); + + $this->DB->build( array( 'select' => 'status, is_new, is_complete', + 'from' => 'rc_status', + 'where' => "is_new=1 OR is_complete=1", + ) ); + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + if( $row['is_new'] == 1 ) + { + $status['new'] = $row['status']; + } + elseif( $row['is_complete'] == 1 ) + { + $status['complete'] = $row['status']; + } + } + + $data = $this->DB->buildAndFetch( array( + 'select' => 'p.post', + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.pid=' . $post_id, + 'add_join' => array( + array( + 'select' => 't.title_seo', + 'from' => array( 'topics' => 't' ), + 'where' => 't.tid=p.topic_id', + 'type' => 'left', + ), + array( + 'select' => 'mem.member_id, mem.members_display_name', + 'from' => array( 'members' => 'mem' ), + 'where' => 'mem.member_id=p.author_id', + 'type' => 'left', + ), + ) + ) ); + + IPSText::getTextClass('bbcode')->parse_bbcode = 1; + IPSText::getTextClass('bbcode')->parse_html = 0; + IPSText::getTextClass('bbcode')->parse_emoticons = 1; + IPSText::getTextClass('bbcode')->parse_nl2br = 0; + IPSText::getTextClass('bbcode')->parsing_section = 'global'; + + $message = "[quote name='" . IPSText::getTextClass('bbcode')->makeQuoteSafe( $data['members_display_name'] ) . "']"; + $message .= IPSText::getTextClass('bbcode')->preEditParse( $data['post'] ); + $message .= "[/quote]\n\n"; + $message .= $this->request['message']; + + $this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports_index', 'where' => "uid='{$uid}'" ) ); + $this->DB->execute(); + + if( $this->DB->getTotalRows() == 0 ) + { + $this->_checkAccess( $topic_id ); + + $built_report_main = array( + 'uid' => $uid, + 'title' => $this->topic['title'], + 'status' => $status['new'], + 'url' => '/index.php?' . $save_url, + 'seoname' => $data['title_seo'], + 'seotemplate' => 'showtopic', + 'rc_class' => $com_dat['com_id'], + 'updated_by' => $this->memberData['member_id'], + 'date_updated' => time(), + 'date_created' => time(), + 'exdat1' => $forum_id, + 'exdat2' => $topic_id, + 'exdat3' => $post_id, + ); + + $this->DB->insert( 'rc_reports_index', $built_report_main ); + $rid = $this->DB->getInsertId(); + } + else + { + $the_report = $this->DB->fetch(); + $rid = $the_report['id']; + $this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'], 'seoname' => $data['title_seo'], 'seotemplate' => 'showtopic' ), "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'; + + $build_report = array( + 'rid' => $rid, + 'report' => IPSText::getTextClass('bbcode')->preDbParse( $message ), + 'report_by' => $this->memberData['member_id'], + 'date_reported' => time(), + ); + $this->DB->insert( 'rc_reports', $build_report ); + + $reports = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'rc_reports', 'where' => "rid='{$rid}'" ) ); + + $this->DB->update( 'rc_reports_index', array( 'num_reports' => $reports['total'] ), "id='{$rid}'" ); + + $return_data = array( + 'REDIRECT_URL' => $url, + 'FORUM_ID' => $forum_id, + 'REPORT_INDEX' => $rid, + 'SAVED_URL' => '/index.php?' . $save_url, + 'REPORT' => $build_report['report'], + 'SEOTITLE' => $data['title_seo'], + 'TEMPLATE' => 'showtopic', + ); + + return $return_data; + } + + /** + * Where to send user after report is submitted + * + * @param array Report data + * @return void + */ + public function reportRedirect( $report_data ) + { + $this->registry->output->redirectScreen( $this->lang->words['report_sending'], $this->settings['base_url'] . $report_data['REDIRECT_URL'], $report_data['SEOTITLE'], $report_data['TEMPLATE'] ); + } + + /** + * Retrieve list of users to send notifications to + * + * @param string Group ids + * @param array Report data + * @return array Array of users to PM/Email + */ + public function getNotificationList( $group_ids, $report_data ) + { + //----------------------------------------- + // Build where for secondary member groups + //----------------------------------------- + + $secondaryWhere = array(); + + if( is_array($group_ids) AND count($group_ids) ) + { + foreach( $group_ids as $group_id ) + { + $secondaryWhere[] = "m.mgroup_others LIKE '%,{$group_id},%'"; + } + } + + $this->DB->build( array( + 'select' => 'noti.*', + 'from' => array( 'rc_modpref' => 'noti' ), + 'where' => "(m.member_group_id IN(" . $group_ids . ") " . ( count($secondaryWhere) ? "OR " . implode( ' OR ', $secondaryWhere ) : '' ) . ") AND (g.g_is_supmod=1 OR g.g_access_cp=1 OR moderator.forum_id LIKE '%,{$report_data['FORUM_ID']},%')", + 'add_join' => array( + array( + 'select' => 'm.member_id as real_member_id, m.members_display_name as name, m.language, m.members_disable_pm, m.email, m.member_group_id', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=noti.mem_id', + ), + array( + 'select' => 'moderator.member_id, moderator.group_id', + 'from' => array( 'moderators' => 'moderator' ), + 'where' => 'moderator.member_id=m.member_id OR moderator.group_id=m.member_group_id', + ), + array( + 'from' => array( 'groups' => 'g' ), + 'where' => 'g.g_id=m.member_group_id', + 'type' => 'left', + ), + ) + ) ); + $this->DB->execute(); + + $notify = array(); + + if ( $this->DB->getTotalRows() ) + { + while( $r = $this->DB->fetch() ) + { + $r['member_id'] = $r['real_member_id']; + + $notify[ $r['member_id'] ] = $r; + } + } + + return $notify; + } + + /** + * Check access to report the topic + * + * @param integer Topic id + * @return void + */ + private function _checkAccess( $tid ) + { + if ( ! $this->memberData['member_id'] ) + { + $this->registry->output->showError( 'reports_must_be_member', 10169 ); + } + + //----------------------------------------- + // Needs silly a. alias to keep oracle + // happy + //----------------------------------------- + + $this->topic = $this->DB->buildAndFetch( array( 'select' => 'a.*,a.title as topic_title', 'from' => 'topics a', 'where' => "a.tid=" . $tid ) ); + + if( ipsRegistry::isClassLoaded('class_forums') !== TRUE ) + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' ); + $this->registry->setClass( 'class_forums', new $classToLoad( $this->registry ) ); + $this->registry->getClass('class_forums')->forumsInit(); + } + + $this->registry->getClass('class_forums')->forumsCheckAccess( $this->topic['forum_id'], 0, 'topic', $this->topic ); + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/reputation.php b/upload/admin/applications/forums/extensions/reputation.php index 9399578c..abbfcffe 100644 --- a/upload/admin/applications/forums/extensions/reputation.php +++ b/upload/admin/applications/forums/extensions/reputation.php @@ -1,47 +1,49 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -$rep_author_config = array( - 'pid' => array( 'column' => 'author_id', 'table' => 'posts' ) - ); - -/* - * The following config items are for the log viewer in the ACP */ - -$rep_log_joins = array( - array( - 'from' => array( 'posts' => 'p' ), - 'where' => 'r.type="pid" AND r.type_id=p.pid and r.app="forums"', - 'type' => 'left' - ), - array( - 'select' => 't.title as repContentTitle, t.tid as repContentID', - 'from' => array( 'topics' => 't' ), - 'where' => 'p.topic_id=t.tid', - 'type' => 'left' - ), - ); - -$rep_log_where = "p.author_id=%s"; - + + * Invision Power Services + * IP.Board v3.1.4 + * Reputation configuration for application + * Last Updated: $Date: 2010-10-21 07:08:38 -0400 (Thu, 21 Oct 2010) $ + * + * + * @author $author$ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 7007 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +$rep_author_config = array( + 'pid' => array( 'column' => 'author_id', 'table' => 'posts' ) + ); + +/** + * The following config items are for the log viewer in the ACP + */ + +$rep_log_joins = array( + array( + 'from' => array( 'posts' => 'p' ), + 'where' => 'r.type="pid" AND r.type_id=p.pid and r.app="forums"', + 'type' => 'left' + ), + array( + 'select' => 't.title as repContentTitle, t.tid as repContentID', + 'from' => array( 'topics' => 't' ), + 'where' => 'p.topic_id=t.tid', + 'type' => 'left' + ), + ); + +$rep_log_where = "p.author_id=%s"; + $rep_log_link = 'findpost=%d'; \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/rssOutput.php b/upload/admin/applications/forums/extensions/rssOutput.php index 47e16ff7..206dc54d 100644 --- a/upload/admin/applications/forums/extensions/rssOutput.php +++ b/upload/admin/applications/forums/extensions/rssOutput.php @@ -1,138 +1,135 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class rss_output_forums -{ - /** - * Expiration date - * - * @access private - * @var integer Expiration timestamp - */ - private $expires = 0; - - /** - * Grab the RSS links - * - * @access public - * @return array RSS links - */ - public function getRssLinks() - { - $return = array(); - - ipsRegistry::DB()->build( array( 'select' => 'rss_export_title, rss_export_id', 'from' => 'rss_export', 'where' => 'rss_export_enabled=1' ) ); - ipsRegistry::DB()->execute(); - - while( $r = ipsRegistry::DB()->fetch() ) - { - $return[] = array( 'title' => $r['rss_export_title'], 'url' => ipsRegistry::getClass('output')->formatUrl( ipsRegistry::$settings['board_url'] . "/index.php?app=core&module=global&section=rss&type=forums&id=" . $r['rss_export_id'], '%%' . $r['rss_export_title'] . '%%', 'section=rss2' ) ); - } - - return $return; - } - - /** - * Grab the RSS document content and return it - * - * @access public - * @return string RSS document - */ - public function returnRSSDocument() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $rss_export_id = intval( ipsRegistry::$request['id'] ); - $rss_data = array(); - $to_print = ''; - $this->expires = time(); - - //----------------------------------------- - // Get RSS export - //----------------------------------------- - - $rss_data = ipsRegistry::DB()->buildAndFetch( array( 'select' => '*', - 'from' => 'rss_export', - 'where' => 'rss_export_id=' . $rss_export_id ) ); - - //----------------------------------------- - // Got one? - //----------------------------------------- - - if ( $rss_data['rss_export_id'] AND $rss_data['rss_export_enabled'] ) - { - //----------------------------------------- - // Correct expires time - //----------------------------------------- - - $this->expires += $rss_data['rss_export_cache_time'] * 60; - - //----------------------------------------- - // Need to recache? - //----------------------------------------- - - $time_check = time() - ( $rss_data['rss_export_cache_time'] * 60 ); - - if ( ( ! $rss_data['rss_export_cache_content'] ) OR $time_check > $rss_data['rss_export_cache_last'] ) - { - //----------------------------------------- - // Yes - //----------------------------------------- - - define( 'IN_ACP', 1 ); - - require_once( IPSLib::getAppDir( 'forums' ) . '/app_class_forums.php' ); - $app_class_forums = new app_class_forums( ipsRegistry::instance() ); - - require_once( IPSLib::getAppDir( 'forums' ) . '/modules_admin/rss/export.php' ); - $rss_export = new admin_forums_rss_export(); - $rss_export->makeRegistryShortcuts( ipsRegistry::instance() ); - - - return $rss_export->rssExportRebuildCache( $rss_data['rss_export_id'], 0 ); - } - else - { - //----------------------------------------- - // No - //----------------------------------------- - - return $rss_data['rss_export_cache_content']; - } - } - } - - /** - * Grab the RSS document expiration timestamp - * - * @access public - * @return integer Expiration timestamp - */ - public function grabExpiryDate() - { - return $this->expires ? $this->expires : time(); - } + + * Invision Power Services + * IP.Board v3.1.4 + * RSS output plugin :: posts + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 6/24/2008 + * @version $Revision: 7003 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class rss_output_forums +{ + /** + * Expiration date + * + * @var integer Expiration timestamp + */ + private $expires = 0; + + /** + * Grab the RSS links + * + * @return array RSS links + */ + public function getRssLinks() + { + $return = array(); + + ipsRegistry::DB()->build( array( 'select' => 'rss_export_title, rss_export_id', 'from' => 'rss_export', 'where' => 'rss_export_enabled=1' ) ); + ipsRegistry::DB()->execute(); + + while( $r = ipsRegistry::DB()->fetch() ) + { + $return[] = array( 'title' => $r['rss_export_title'], 'url' => ipsRegistry::getClass('output')->formatUrl( ipsRegistry::$settings['board_url'] . "/index.php?app=core&module=global&section=rss&type=forums&id=" . $r['rss_export_id'], '%%' . $r['rss_export_title'] . '%%', 'section=rss2' ) ); + } + + return $return; + } + + /** + * Grab the RSS document content and return it + * + * @return string RSS document + */ + public function returnRSSDocument() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $rss_export_id = intval( ipsRegistry::$request['id'] ); + $rss_data = array(); + $to_print = ''; + $this->expires = time(); + + //----------------------------------------- + // Get RSS export + //----------------------------------------- + + $rss_data = ipsRegistry::DB()->buildAndFetch( array( 'select' => '*', + 'from' => 'rss_export', + 'where' => 'rss_export_id=' . $rss_export_id ) ); + + //----------------------------------------- + // Got one? + //----------------------------------------- + + if ( $rss_data['rss_export_id'] AND $rss_data['rss_export_enabled'] ) + { + //----------------------------------------- + // Correct expires time + //----------------------------------------- + + $this->expires += $rss_data['rss_export_cache_time'] * 60; + + //----------------------------------------- + // Need to recache? + //----------------------------------------- + + $time_check = time() - ( $rss_data['rss_export_cache_time'] * 60 ); + + if ( ( ! $rss_data['rss_export_cache_content'] ) OR $time_check > $rss_data['rss_export_cache_last'] ) + { + //----------------------------------------- + // Yes + //----------------------------------------- + + define( 'IN_ACP', 1 ); + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/app_class_forums.php', 'app_class_forums', 'forums' ); + $app_class_forums = new $classToLoad( ipsRegistry::instance() ); + + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'forums' ) . '/modules_admin/rss/export.php', 'admin_forums_rss_export' ); + $rss_export = new $classToLoad(); + $rss_export->makeRegistryShortcuts( ipsRegistry::instance() ); + + + return $rss_export->rssExportRebuildCache( $rss_data['rss_export_id'], 0 ); + } + else + { + //----------------------------------------- + // No + //----------------------------------------- + + return $rss_data['rss_export_cache_content']; + } + } + } + + /** + * Grab the RSS document expiration timestamp + * + * @return integer Expiration timestamp + */ + public function grabExpiryDate() + { + return $this->expires ? $this->expires : time(); + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/search/config.php b/upload/admin/applications/forums/extensions/search/config.php new file mode 100644 index 00000000..6dcc2c44 --- /dev/null +++ b/upload/admin/applications/forums/extensions/search/config.php @@ -0,0 +1,35 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Config file + * Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $ + * + * + * @author $author$ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 5855 $ + **/ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +/* Can search with this app */ +$CONFIG['can_search'] = 1; + +/* Can view new content with this app */ +$CONFIG['can_viewNewContent'] = 1; + +/* Can fetch active content with this app */ +$CONFIG['can_activeContent'] = 1; + +/* Can fetch user generated content */ +$CONFIG['can_userContent'] = 1; \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/search/engines/index.html b/upload/admin/applications/forums/extensions/search/engines/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/forums/extensions/search/engines/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/search/engines/sphinx.php b/upload/admin/applications/forums/extensions/search/engines/sphinx.php new file mode 100644 index 00000000..d64f45f1 --- /dev/null +++ b/upload/admin/applications/forums/extensions/search/engines/sphinx.php @@ -0,0 +1,732 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Basic Forum Search + * Last Updated: $Date: 2010-02-23 12:38:11 +0000 (Tue, 23 Feb 2010) $ + * + * + * @author $Author: matt $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 5861 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class search_engine_forums extends search_engine +{ + /** + * Constructor + * + * @return void + */ + public function __construct( ipsRegistry $registry ) + { + /* Hard limit */ + IPSSearchRegistry::set('set.hardLimit', ( ipsRegistry::$settings['search_hardlimit'] ) ? ipsRegistry::$settings['search_hardlimit'] : 200 ); + + /* Get class forums, used for displaying forum names on results */ + if ( ipsRegistry::isClassLoaded('class_forums') !== TRUE ) + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' ); + ipsRegistry::setClass( 'class_forums', new $classToLoad( ipsRegistry::instance() ) ); + ipsRegistry::getClass('class_forums')->forumsInit(); + } + + parent::__construct( $registry ); + } + + /** + * Perform a search. + * Returns an array of a total count (total number of matches) + * and an array of IDs ( 0 => 1203, 1 => 928, 2 => 2938 ).. matching the required number based on pagination. The ids returned would be based on the filters and type of search + * + * So if we had 1000 replies, and we are on page 2 of 25 per page, we'd return 25 items offset by 25 + * + * @return array + */ + public function search() + { + $start = intval( IPSSearchRegistry::get('in.start') ); + $perPage = IPSSearchRegistry::get('opt.search_per_page'); + $sort_by = IPSSearchRegistry::get('in.search_sort_by'); + $sort_order = IPSSearchRegistry::get('in.search_sort_order'); + $search_term = IPSSearchRegistry::get('in.clean_search_term'); + $content_title_only = IPSSearchRegistry::get('opt.searchTitleOnly'); + $post_search_only = IPSSearchRegistry::get('opt.onlySearchPosts'); + $search_ids = array(); + $groupby = false; + $cType = IPSSearchRegistry::get('contextual.type'); + $cId = IPSSearchRegistry::get('contextual.id' ); + + /* Contextual search */ + if ( $cType == 'topic' ) + { + $content_title_only = false; + $post_search_only = true; + + IPSSearchRegistry::set('opt.searchTitleOnly', false); + IPSSearchRegistry::set('opt.onlySearchPosts', true); + IPSSearchRegistry::set('display.onlyTitles', false); + IPSSearchRegistry::set('opt.noPostPreview', false); + } + + /* Permissions */ + $permissions['TopicSoftDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedTopics( 0 ); + $permissions['canQueue'] = $this->registry->getClass('class_forums')->canQueuePosts( 0 ); + $permissions['PostSoftDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedPosts( 0 ); + $permissions['SoftDeleteReason'] = $this->registry->getClass('class_forums')->canSeeSoftDeleteReason( 0 ); + $permissions['SoftDeleteContent'] = $this->registry->getClass('class_forums')->canSeeSoftDeleteContent( 0 ); + + /* Sorting */ + switch( $sort_by ) + { + default: + case 'date': + $sortKey = 'last_post'; + $sortKeyPost = 'post_date'; + break; + case 'title': + $sortKeyPost = $sortKey = 'tordinal'; + break; + case 'posts': + $sortKeyPost = $sortKey = 'posts'; + break; + case 'views': + $sortKeyPost = $sortKey = 'views'; + break; + } + + /* Limit Results */ + $this->sphinxClient->SetLimits( intval($start), intval($perPage) ); + + /* Loop through the forums and build a list of forums we're allowed access to */ + $forumIdsOk = array(); + $forumIdsBad = array(); + + if ( ! empty( ipsRegistry::$request['search_app_filters']['forums']['forums'] ) AND count( ipsRegistry::$request['search_app_filters']['forums']['forums'] ) ) + { + foreach( ipsRegistry::$request['search_app_filters']['forums']['forums'] as $forum_id ) + { + if( $forum_id ) + { + $data = $this->registry->class_forums->forum_by_id[ $forum_id ]; + + /* Check for sub forums */ + $children = ipsRegistry::getClass( 'class_forums' )->forumsGetChildren( $forum_id ); + + foreach( $children as $kid ) + { + if( ! in_array( $kid, ipsRegistry::$request['search_app_filters']['forums']['forums'] ) ) + { + if( ! $this->registry->permissions->check( 'read', $this->registry->class_forums->forum_by_id[ $kid ] ) ) + { + $forumIdsBad[] = $kid; + continue; + } + + /* Can read, but is it password protected, etc? */ + if ( ! $this->registry->class_forums->forumsCheckAccess( $kid, 0, 'forum', array(), true ) ) + { + $forumIdsBad[] = $kid; + continue; + } + + if ( ! $this->registry->class_forums->forum_by_id[ $kid ]['sub_can_post'] OR ! $this->registry->class_forums->forum_by_id[ $kid ]['can_view_others'] ) + { + $forumIdsBad[] = $kid; + continue; + } + + $forumIdsOk[] = $kid; + } + } + + /* Can we read? */ + if ( ! $this->registry->permissions->check( 'view', $data ) ) + { + $forumIdsBad[] = $forum_id; + continue; + } + + /* Can read, but is it password protected, etc? */ + if ( ! $this->registry->class_forums->forumsCheckAccess( $forum_id, 0, 'forum', array(), true ) ) + { + $forumIdsBad[] = $forum_id; + continue; + } + + if ( ! $data['sub_can_post'] OR ! $data['can_view_others'] AND !$this->memberData['g_access_cp'] ) + { + $forumIdsBad[] = $forum_id; + continue; + } + + $forumIdsOk[] = $forum_id; + } + } + } + + if ( ! count($forumIdsOk) ) + { + $allowTrashCan = ( $cType == 'forum' ) ? true : false; + + /* Get list of good forum IDs */ + $forumIdsOk = $this->registry->class_forums->fetchSearchableForumIds( null, array(), $allowTrashCan ); + } + + /* Add allowed forums */ + $forumIdsOk = ( count( $forumIdsOk ) ) ? $forumIdsOk : array( 0 => 0 ); + + /* Contextual */ + if ( $cType == 'forum' AND $cId AND in_array( $cId, $forumIdsOk ) ) + { + $this->sphinxClient->SetFilter( 'forum_id', array( $cId ) ); + } + else + { + $this->sphinxClient->SetFilter( 'forum_id', $forumIdsOk ); + } + + /* Topic contextual */ + if ( $cType == 'topic' AND $cId ) + { + $this->sphinxClient->SetFilter( 'tid', array( $cId ) ); + } + + /* Exclude some items */ + if ( ! $content_title_only ) + { + if ( $permissions['SoftDeleteContent'] AND $permissions['PostSoftDeleteSee'] AND $permissions['canQueue'] ) + { + $this->sphinxClient->SetFilter( 'queued', array( 0,1,2 ) ); + } + else if ( $permissions['SoftDeleteContent'] AND $permissions['PostSoftDeleteSee'] ) + { + $this->sphinxClient->SetFilter( 'queued', array( 0,2 ) ); + } + else if ( $permissions['canQueue'] ) + { + $this->sphinxClient->SetFilter( 'queued', array( 0,1 ) ); + } + else + { + $this->sphinxClient->SetFilter( 'queued', array( 0 ) ); + } + } + + if ( $permissions['SoftDeleteContent'] AND $permissions['TopicSoftDeleteSee'] AND $permissions['canQueue'] ) + { + $this->sphinxClient->SetFilter( 'approved' , array( 0,1 ) ); + $this->sphinxClient->SetFilter( 'soft_deleted', array( 0,1 ) ); + } + else if ( $permissions['SoftDeleteContent'] AND $permissions['TopicSoftDeleteSee'] ) + { + $this->sphinxClient->SetFilter( 'approved', array( 1 ) ); + $this->sphinxClient->SetFilter( 'soft_deleted', array( 0,1 ) ); + } + else if ( $permissions['canQueue'] ) + { + $this->sphinxClient->SetFilter( 'soft_deleted', array( 0 ) ); + $this->sphinxClient->SetFilter( 'approved', array( 0,1 ) ); + } + else + { + $this->sphinxClient->SetFilter( 'soft_deleted', array( 0 ) ); + $this->sphinxClient->SetFilter( 'approved', array( 1 ) ); + } + + + /* Additional filters */ + if ( IPSSearchRegistry::get('opt.pCount') ) + { + $this->sphinxClient->SetFilterRange( 'posts', intval( IPSSearchRegistry::get('opt.pCount') ), 1500000000 ); + } + + if ( IPSSearchRegistry::get('opt.pViews') ) + { + $this->sphinxClient->SetFilterRange( 'views', intval( IPSSearchRegistry::get('opt.pViews') ), 1500000000 ); + } + + /* Date limit */ + if ( $this->search_begin_timestamp ) + { + if ( ! $this->search_end_timestamp ) + { + $this->search_end_timestamp = time() + 100; + } + + if ( $content_title_only ) + { + $this->sphinxClient->SetFilterRange( 'start_date', $this->search_begin_timestamp, $this->search_end_timestamp ); + } + else + { + $this->sphinxClient->SetFilterRange( 'post_date', $this->search_begin_timestamp, $this->search_end_timestamp ); + } + } + + if ( IPSSearchRegistry::get('opt.noPostPreview') OR IPSSearchRegistry::get('display.onlyTitles') ) + { + $groupby = true; + } + + if ( $content_title_only ) + { + if ( $sort_order == 'asc' ) + { + $this->sphinxClient->SetSortMode( SPH_SORT_ATTR_ASC, $sortKey ); + } + else + { + $this->sphinxClient->SetSortMode( SPH_SORT_ATTR_DESC, $sortKey ); + } + + if ( $groupby ) + { + $this->sphinxClient->SetGroupBy( 'last_post_group', SPH_GROUPBY_ATTR, '@group ' . $sort_order ); + } + + $_s = ( $search_term ) ? '@title ' . $search_term : ''; + + $result = $this->sphinxClient->Query( $_s, 'forums_search_posts_main,forums_search_posts_delta' ); + + $this->logSphinxWarnings(); + } + else + { + if ( $groupby ) + { + $this->sphinxClient->SetGroupBy( 'last_post_group', SPH_GROUPBY_ATTR, '@group DESC'); + } + + if ( $sort_order == 'asc' ) + { + $this->sphinxClient->SetSortMode( SPH_SORT_ATTR_ASC, $sortKeyPost ); + } + else + { + $this->sphinxClient->SetSortMode( SPH_SORT_ATTR_DESC, $sortKeyPost ); + } + + if ( $post_search_only ) + { + $_s = ( $search_term ) ? '@post ' . $search_term : ''; + $result = $this->sphinxClient->Query( $_s, 'forums_search_posts_main,forums_search_posts_delta' ); + } + else + { + $_s = ( $search_term AND strstr( $search_term, '"' ) ) ? '@post ' . $search_term . ' | @title ' . $search_term : ( $search_term ? '@(post,title) ' . $search_term : '' ); + $result = $this->sphinxClient->Query( $_s, 'forums_search_posts_main,forums_search_posts_delta' ); + } + + $this->logSphinxWarnings(); + } + + if ( is_array( $result['matches'] ) && count( $result['matches'] ) ) + { + foreach( $result['matches'] as $res ) + { + $search_ids[] = ( $content_title_only ) ? $res['attrs']['tid'] : $res['attrs']['search_id']; + } + } + + /* Return it */ + return array( 'count' => intval( $result['total_found'] ) > 1000 ? 1000 : $result['total_found'], 'resultSet' => $search_ids ); + } + + /** + * Perform the search + * Populates $this->_count and $this->_results + * + * @return array + */ + public function viewUserContent( $member ) + { + /* Ensure we limit by date */ + $this->settings['search_ucontent_days'] = ( $this->settings['search_ucontent_days'] ) ? $this->settings['search_ucontent_days'] : 365; + + /* Bit of init */ + $time = time() - ( 86400 * intval( $this->settings['search_ucontent_days'] ) ); + + switch( IPSSearchRegistry::get('in.userMode') ) + { + default: + case 'all': + IPSSearchRegistry::set('opt.searchTitleOnly', false ); + IPSSearchRegistry::set('display.onlyTitles' , true ); + IPSSearchRegistry::set('opt.noPostPreview' , false ); + break; + case 'title': + IPSSearchRegistry::set('opt.searchTitleOnly', true ); + IPSSearchRegistry::set('display.onlyTitles' , true ); + IPSSearchRegistry::set('opt.noPostPreview' , false ); + break; + case 'content': + IPSSearchRegistry::set('opt.searchTitleOnly', false ); + IPSSearchRegistry::set('display.onlyTitles' , false ); + IPSSearchRegistry::set('opt.noPostPreview' , false ); + break; + } + + /* Init */ + $start = IPSSearchRegistry::get('in.start'); + $perPage = IPSSearchRegistry::get('opt.search_per_page'); + + IPSSearchRegistry::set('in.search_sort_by' , 'date' ); + IPSSearchRegistry::set('in.search_sort_order', 'desc' ); + + /* Limit Results */ + $this->sphinxClient->SetLimits( intval($start), intval($perPage) ); + + /* Get list of good forum IDs */ + $forumIdsOk = $this->registry->class_forums->fetchSearchableForumIds( $this->memberData['member_id'] ); + + $this->sphinxClient->SetFilter( 'forum_id', $forumIdsOk ); + + /* what we doing? */ + if ( IPSSearchRegistry::get('in.userMode') != 'title' ) + { + $this->sphinxClient->SetFilter( 'author_id', array( intval( $member['member_id'] ) ) ); + } + else + { + $this->sphinxClient->SetFilter( 'starter_id', array( intval( $member['member_id'] ) ) ); + } + + if ( $this->settings['search_ucontent_days'] ) + { + $this->sphinxClient->SetFilterRange( 'post_date', $time, time() ); + } + + /* Set up perms */ + $permissions['TopicSoftDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedTopics( 0 ); + $permissions['canQueue'] = $this->registry->getClass('class_forums')->canQueuePosts( 0 ); + $permissions['PostSoftDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedPosts( 0 ); + $permissions['SoftDeleteReason'] = $this->registry->getClass('class_forums')->canSeeSoftDeleteReason( 0 ); + $permissions['SoftDeleteContent'] = $this->registry->getClass('class_forums')->canSeeSoftDeleteContent( 0 ); + + /* Exclude some items */ + if ( IPSSearchRegistry::get('in.userMode') != 'title' ) + { + if ( $permissions['SoftDeleteContent'] AND $permissions['PostSoftDeleteSee'] AND $permissions['canQueue'] ) + { + $this->sphinxClient->SetFilter( 'queued', array( 0,1,2 ) ); + } + else if ( $permissions['SoftDeleteContent'] AND $permissions['PostSoftDeleteSee'] ) + { + $this->sphinxClient->SetFilter( 'queued', array( 0,2 ) ); + } + else if ( $permissions['canQueue'] ) + { + $this->sphinxClient->SetFilter( 'queued', array( 0,1 ) ); + } + else + { + $this->sphinxClient->SetFilter( 'queued', array( 0 ) ); + } + } + else + { + if ( $permissions['SoftDeleteContent'] AND $permissions['TopicSoftDeleteSee'] AND $permissions['canQueue'] ) + { + $this->sphinxClient->SetFilter( 'approved' , array( 0,1 ) ); + $this->sphinxClient->SetFilter( 'soft_deleted', array( 0,1 ) ); + } + else if ( $permissions['SoftDeleteContent'] AND $permissions['TopicSoftDeleteSee'] ) + { + $this->sphinxClient->SetFilter( 'approved', array( 0 ) ); + $this->sphinxClient->SetFilter( 'soft_deleted', array( 0,1 ) ); + } + else if ( $permissions['canQueue'] ) + { + $this->sphinxClient->SetFilter( 'soft_deleted', array( 0 ) ); + $this->sphinxClient->SetFilter( 'approved', array( 0,1 ) ); + } + else + { + $this->sphinxClient->SetFilter( 'soft_deleted', array( 0 ) ); + $this->sphinxClient->SetFilter( 'approved', array( 1 ) ); + } + } + + if ( IPSSearchRegistry::get('in.userMode') == 'title' ) + { + $this->sphinxClient->SetGroupDistinct ( "tid" ); + $this->sphinxClient->SetGroupBy( 'tid', SPH_GROUPBY_ATTR, '@group DESC' ); + + $this->sphinxClient->SetSortMode( SPH_SORT_ATTR_DESC, 'last_post' ); + + $result = $this->sphinxClient->Query( '', 'forums_search_posts_main,forums_search_posts_delta' ); + + $this->logSphinxWarnings(); + } + else + { + if ( IPSSearchRegistry::get('in.userMode') == 'content' ) + { + $this->sphinxClient->SetSortMode( SPH_SORT_ATTR_DESC, 'post_date' ); + } + else + { + $this->sphinxClient->SetSortMode( SPH_SORT_ATTR_DESC, 'post_date' ); + $this->sphinxClient->SetGroupBy( 'last_post_group', SPH_GROUPBY_ATTR, '@group desc' ); + } + + $result = $this->sphinxClient->Query( '', 'forums_search_posts_main,forums_search_posts_delta' ); + + $this->logSphinxWarnings(); + } + + if ( is_array( $result['matches'] ) && count( $result['matches'] ) ) + { + foreach( $result['matches'] as $res ) + { + $search_ids[] = ( IPSSearchRegistry::get('opt.searchTitleOnly') ) ? $res['attrs']['tid'] : $res['attrs']['search_id']; + } + } + + return array( 'count' => intval( $result['total_found'] ) > 1000 ? 1000 : $result['total_found'], 'resultSet' => $search_ids ); + } + + /** + * Perform the viewNewContent search + * Forum Version + * Populates $this->_count and $this->_results + * + * @return array + */ + public function viewNewContent() + { + $tids = $this->registry->getClass('classItemMarking')->fetchCookieData( 'forums', 'items' ); + $oldStamp = $this->registry->getClass('classItemMarking')->fetchOldestUnreadTimestamp( array(), 'forums' ); + $check = IPS_UNIX_TIME_NOW - ( 86400 * 90 ); + $forumIdsOk = array(); + + /* Loop through the forums and build a list of forums we're allowed access to */ + $bvnp = explode( ',', $this->settings['vnp_block_forums'] ); + + IPSSearchRegistry::set('in.search_sort_by' , 'date' ); + IPSSearchRegistry::set('in.search_sort_order', 'desc' ); + IPSSearchRegistry::set('opt.searchTitleOnly' , true ); + IPSSearchRegistry::set('display.onlyTitles' , true ); + IPSSearchRegistry::set('opt.noPostPreview' , true ); + + /* Get list of good forum IDs */ + $_forumIdsOk = $this->registry->class_forums->fetchSearchableForumIds( $this->memberData['member_id'], $bvnp ); + + if ( ! $this->memberData['bw_vnc_type'] ) + { + $oldStamp = IPSLib::fetchHighestNumber( array( intval( $this->memberData['_cache']['gb_mark__forums'] ), intval( $this->memberData['last_visit'] ) ) ); + $tids = array(); + + $forumIdsOk = $_forumIdsOk; + } + else + { + foreach( $_forumIdsOk as $id ) + { + $lMarked = $this->registry->getClass('classItemMarking')->fetchTimeLastMarked( array( 'forumID' => $id ), 'forums' ); + $fData = $this->registry->getClass('class_forums')->forumsFetchData( $id ); + + if ( $fData['last_post'] > $lMarked ) + { + /* Add to tids */ + $_tids = $this->registry->getClass('classItemMarking')->fetchReadIds( array( 'forumID' => $id ), 'forums', false ); + + if ( is_array( $_tids ) ) + { + foreach( $_tids as $k => $v ) + { + $tids[ $k ] = $v; + } + } + + $forumIdsOk[ $id ] = $id; + } + } + + if ( intval( $this->memberData['_cache']['gb_mark__forums'] ) > 0 ) + { + $oldStamp = $this->memberData['_cache']['gb_mark__forums']; + } + + /* Finalize times */ + if ( ! $oldStamp OR $oldStamp == IPS_UNIX_TIME_NOW ) + { + $oldStamp = intval( $this->memberData['last_visit'] ); + } + + /* Older than 3 months.. then limit */ + if ( $oldStamp < $check ) + { + $oldStamp = $check; + } + + /* If no forums, we're done */ + if ( ! count( $forumIdsOk ) ) + { + /* Return it */ + return array( 'count' => 0, 'resultSet' => array() ); + } + } + + /* Set the timestamps */ + $this->sphinxClient->SetFilterRange( 'last_post', $oldStamp, time() ); + $this->setDateRange( 0, 0 ); + + /* Force it into filter so that search can pick it up */ + ipsRegistry::$request['search_app_filters']['forums']['forums'] = $forumIdsOk; + + /* Try and limit the TIDS */ + if ( is_array( $tids ) AND count( $tids ) ) + { + if ( count( $tids ) > 300 ) + { + /* Sort by last read date */ + arsort( $tids, SORT_NUMERIC ); + $tids = array_slice( $tids, 0, 300 ); + } + + $this->DB->build( array( 'select' => 'tid, last_post', + 'from' => 'topics', + 'where' => "tid IN (" . implode( ",", array_keys( $tids ) ) . ')' ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + /* Posted in since last read? */ + if ( $row['last_post'] > $tids[ $row['tid'] ] ) + { + unset( $tids[ $row['tid'] ] ); + } + } + + if ( count( $tids ) ) + { + $tids = array_keys( $tids ); + } + } + + /* Set read tids */ + if ( count( $tids ) ) + { + $this->sphinxClient->SetFilter( 'tid', $tids, TRUE ); + } + + /* Set up some vars */ + IPSSearchRegistry::set('set.resultCutToDate', $oldStamp ); + + return $this->search(); + } + + /** + * Perform the search + * Populates $this->_count and $this->_results + * + * @return array + */ + public function viewActiveContent() + { + $seconds = IPSSearchRegistry::get('in.period_in_seconds'); + + /* Loop through the forums and build a list of forums we're allowed access to */ + $bvnp = explode( ',', $this->settings['vnp_block_forums'] ); + + IPSSearchRegistry::set('in.search_sort_by' , 'date' ); + IPSSearchRegistry::set('in.search_sort_order', 'desc' ); + IPSSearchRegistry::set('opt.searchTitleOnly' , true ); + IPSSearchRegistry::set('display.onlyTitles' , true ); + IPSSearchRegistry::set('opt.noPostPreview' , true ); + + /* Get list of good forum IDs */ + $forumIdsOk = $this->registry->class_forums->fetchSearchableForumIds( $this->memberData['member_id'], $bvnp ); + + /* Force it into filter so that search can pick it up */ + ipsRegistry::$request['search_app_filters']['forums']['forums'] = $forumIdsOk; + + /* Set the timestamps */ + $this->sphinxClient->SetFilterRange( 'last_post', intval( time() - $seconds ), time() ); + $this->setDateRange( 0, 0 ); + + return $this->search(); + } + + /** + * Remap standard columns (Apps can override ) + * + * @param string $column sql table column for this condition + * @return string column + * @return void + */ + public function remapColumn( $column ) + { + $column = $column == 'member_id' ? ( IPSSearchRegistry::get('opt.searchTitleOnly') ? 'starter_id' : 'author_id' ) : $column; + $column = $column == 'content_title' ? 'title' : $column; + $column = $column == 'type_id' ? 'forum_id' : $column; + + return $column; + } + + /** + * Returns an array used in the searchplugin's setCondition method + * + * @param array $data Array of forums to view + * @return array Array with column, operator, and value keys, for use in the setCondition call + */ + public function buildFilterSQL( $data ) + { + /* INIT */ + $return = array(); + + /* Set up some defaults */ + IPSSearchRegistry::set( 'opt.noPostPreview' , true ); + IPSSearchRegistry::set( 'opt.onlySearchPosts', false ); + + if( isset( $data ) && is_array( $data ) && count( $data ) ) + { + foreach( $data as $field => $_data ) + { + /* CONTENT ONLY */ + if ( $field == 'noPreview' AND $_data['noPreview'] == 0 ) + { + IPSSearchRegistry::set( 'opt.noPostPreview', false ); + } + + /* CONTENT ONLY */ + if ( $field == 'contentOnly' AND $_data['contentOnly'] == 1 ) + { + IPSSearchRegistry::set( 'opt.onlySearchPosts', true ); + } + + /* POST COUNT */ + if ( $field == 'pCount' AND intval( $_data['pCount'] ) > 0 ) + { + IPSSearchRegistry::set( 'opt.pCount', intval( $_data['pCount'] ) ); + } + + /* TOPIC VIEWS */ + if ( $field == 'pViews' AND intval( $_data ) > 0 ) + { + IPSSearchRegistry::set( 'opt.pViews', intval( $_data['pViews'] ) ); + } + } + + return $return; + } + else + { + return ''; + } + } +} \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/search/engines/sql.php b/upload/admin/applications/forums/extensions/search/engines/sql.php new file mode 100644 index 00000000..35a693b7 --- /dev/null +++ b/upload/admin/applications/forums/extensions/search/engines/sql.php @@ -0,0 +1,1080 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Basic Forum Search + * Last Updated: $Date: 2010-02-23 12:38:11 +0000 (Tue, 23 Feb 2010) $ + * + * + * @author $Author: matt $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 5861 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class search_engine_forums extends search_engine +{ + /** + * Constructor + */ + public function __construct( ipsRegistry $registry ) + { + /* Hard limit */ + IPSSearchRegistry::set('set.hardLimit', ( ipsRegistry::$settings['search_hardlimit'] ) ? ipsRegistry::$settings['search_hardlimit'] : 200 ); + + /* Get class forums, used for displaying forum names on results */ + if ( ipsRegistry::isClassLoaded('class_forums') !== TRUE ) + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' ); + ipsRegistry::setClass( 'class_forums', new $classToLoad( ipsRegistry::instance() ) ); + ipsRegistry::getClass('class_forums')->forumsInit(); + } + + parent::__construct( $registry ); + } + + /** + * Perform a search. + * Returns an array of a total count (total number of matches) + * and an array of IDs ( 0 => 1203, 1 => 928, 2 => 2938 ).. matching the required number based on pagination. The ids returned would be based on the filters and type of search + * + * So if we had 1000 replies, and we are on page 2 of 25 per page, we'd return 25 items offset by 25 + * + * @return array + */ + public function search() + { + /* INIT */ + $count = 0; + $results = array(); + $sort_by = IPSSearchRegistry::get('in.search_sort_by'); + $sort_order = IPSSearchRegistry::get('in.search_sort_order'); + $search_term = IPSSearchRegistry::get('in.clean_search_term'); + $content_title_only = IPSSearchRegistry::get('opt.searchTitleOnly'); + $post_search_only = IPSSearchRegistry::get('opt.onlySearchPosts'); + $order_dir = ( $sort_order == 'asc' ) ? 'asc' : 'desc'; + $rows = array(); + $count = 0; + $c = 0; + $got = 0; + $sortKey = ''; + $sortType = ''; + $cType = IPSSearchRegistry::get('contextual.type'); + $cId = IPSSearchRegistry::get('contextual.id' ); + + /* Contextual search */ + if ( $cType == 'topic' ) + { + $content_title_only = false; + $post_search_only = true; + + IPSSearchRegistry::set('opt.searchTitleOnly', false); + IPSSearchRegistry::set('opt.onlySearchPosts', true); + IPSSearchRegistry::set('display.onlyTitles', false); + IPSSearchRegistry::set('opt.noPostPreview', false); + } + + /* Sorting */ + switch( $sort_by ) + { + default: + case 'date': + $sortKey = ( $content_title_only ) ? 'last_post' : 'post_date'; + $sortType = 'numerical'; + break; + case 'title': + $sortKey = 'title'; + $sortType = 'string'; + break; + case 'posts': + $sortKey = 'posts'; + $sortType = 'numerical'; + break; + case 'views': + $sortKey = 'views'; + $sortType = 'numerical'; + break; + } + + /* Search in titles */ + if ( $content_title_only ) + { + /* Do the search */ + $this->DB->build( array( + 'select' => "t.tid as id, t.tid as topic_id, t.title, t.posts, t.views, t.last_post", + 'from' => 'topics t', + 'where' => $this->_buildWhereStatement( $search_term, $content_title_only ), + 'limit' => array(0, IPSSearchRegistry::get('set.hardLimit') + 1), + 'order' => 't.'.$sortKey . ' ' . $order_dir ) ); + } + else + { + /* Do the search */ + $this->DB->build( array( + 'select' => "p.pid as id, post_date, p.topic_id", + 'from' => array( 'posts' => 'p' ), + 'where' => $this->_buildWhereStatement( $search_term, $content_title_only, '', null, ( IPSSearchRegistry::get('opt.onlySearchPosts') || IPSSearchRegistry::get('in.search_author') ) ? false : true ), + 'limit' => array(0, IPSSearchRegistry::get('set.hardLimit') + 1), + 'order' => $sortKey . ' ' . $sort_order, + 'add_join' => array( array( 'select' => 't.title, t.posts, t.views', + 'from' => array( 'topics' => 't' ), + 'where' => 't.tid=p.topic_id', + 'type' => 'left' ) ) ) ); + } + + $DB = $this->DB->execute(); + + /* Fetch all to sort */ + while( $r = $this->DB->fetch( $DB ) ) + { + if ( IPSSearchRegistry::get('opt.noPostPreview') ) + { + $_rows[ $r['topic_id'] ] = $r; + } + else + { + $_rows[ $r['id'] ] = $r; + } + } + + /* Fetch count */ + $count = count( $_rows ); + + if ( $count > IPSSearchRegistry::get('set.hardLimit') ) + { + $count = IPSSearchRegistry::get('set.hardLimit'); + + IPSSearchRegistry::set('set.resultsCutToLimit', true ); + } + + /* Set vars */ + IPSSearch::$ask = $sortKey; + IPSSearch::$aso = strtolower( $order_dir ); + IPSSearch::$ast = $sortType; + + /* Sort */ + if ( count( $_rows ) ) + { + usort( $_rows, array("IPSSearch", "usort") ); + + /* Build result array */ + foreach( $_rows as $r ) + { + $c++; + + if ( IPSSearchRegistry::get('in.start') AND IPSSearchRegistry::get('in.start') >= $c ) + { + continue; + } + + $rows[ $got ] = $r['id']; + + $got++; + + /* Done? */ + if ( IPSSearchRegistry::get('opt.search_per_page') AND $got >= IPSSearchRegistry::get('opt.search_per_page') ) + { + break; + } + } + } + + /* Return it */ + return array( 'count' => $count, 'resultSet' => $rows ); + } + + /** + * Perform the search + * Populates $this->_count and $this->_results + * + * @return nothin' + */ + public function viewUserContent( $member ) + { + $app = IPSSearchRegistry::get('in.search_app'); + + IPSSearchRegistry::set('in.search_sort_by' , 'date' ); + IPSSearchRegistry::set('in.search_sort_order', 'desc' ); + + switch( IPSSearchRegistry::get('in.userMode') ) + { + default: + case 'all': + IPSSearchRegistry::set('opt.searchTitleOnly', true ); + IPSSearchRegistry::set('display.onlyTitles' , true ); + IPSSearchRegistry::set('opt.noPostPreview' , false ); + break; + case 'title': + IPSSearchRegistry::set('opt.searchTitleOnly', true ); + IPSSearchRegistry::set('display.onlyTitles' , true ); + IPSSearchRegistry::set('opt.noPostPreview' , false ); + break; + case 'content': + IPSSearchRegistry::set('opt.searchTitleOnly', false ); + IPSSearchRegistry::set('display.onlyTitles' , false ); + IPSSearchRegistry::set('opt.noPostPreview' , false ); + break; + } + + /* Init */ + $start = IPSSearchRegistry::get('in.start'); + $perPage = IPSSearchRegistry::get('opt.search_per_page'); + + IPSSearchRegistry::set('in.search_sort_by' , 'date' ); + IPSSearchRegistry::set('in.search_sort_order', 'desc' ); + + /* Ensure we limit by date */ + $this->settings['search_ucontent_days'] = ( $this->settings['search_ucontent_days'] ) ? $this->settings['search_ucontent_days'] : 365; + + /* Get list of good forum IDs */ + $forumIdsOk = $this->registry->class_forums->fetchSearchableForumIds( $this->memberData['member_id'] ); + + $forumIdsOk = ( count( $forumIdsOk ) ) ? $forumIdsOk : array( 0 => 0 ); + $topic_where[] = "t.forum_id IN (" . implode( ",", $forumIdsOk ) . ")"; + + if ( IPSSearchRegistry::get('in.userMode') != 'title' ) + { + $where[] = "p.author_id=" . intval( $member['member_id'] ); + } + + if ( $this->settings['search_ucontent_days'] ) + { + if ( IPSSearchRegistry::get('in.userMode') != 'title' ) + { + $where[] = "p.post_date > " . ( time() - ( 86400 * intval( $this->settings['search_ucontent_days'] ) ) ); + } + + $topic_where[] = "t.start_date > " . ( time() - ( 86400 * intval( $this->settings['search_ucontent_days'] ) ) ); + } + + /* Set up perms */ + $permissions['TopicSoftDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedTopics( 0 ); + $permissions['canQueue'] = $this->registry->getClass('class_forums')->canQueuePosts( 0 ); + $permissions['PostSoftDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedPosts( 0 ); + $permissions['SoftDeleteReason'] = $this->registry->getClass('class_forums')->canSeeSoftDeleteReason( 0 ); + $permissions['SoftDeleteContent'] = $this->registry->getClass('class_forums')->canSeeSoftDeleteContent( 0 ); + + /* Exclude some items */ + if ( IPSSearchRegistry::get('in.userMode') != 'title' ) + { + if ( $permissions['SoftDeleteContent'] AND $permissions['PostSoftDeleteSee'] AND $permissions['canQueue'] ) + { + $where[] = $this->registry->class_forums->fetchPostHiddenQuery(array('visible', 'hidden', 'sdeleted'), 'p.'); + } + else if ( $permissions['SoftDeleteContent'] AND $permissions['PostSoftDeleteSee'] ) + { + $where[] = $this->registry->class_forums->fetchPostHiddenQuery(array('visible', 'sdeleted'), 'p.'); + } + else if ( $permissions['canQueue'] ) + { + $where[] = $this->registry->class_forums->fetchPostHiddenQuery(array('visible', 'hidden'), 'p.'); + } + else + { + $where[] = $this->registry->class_forums->fetchPostHiddenQuery(array('visible' ), 'p.' ); + } + } + + if ( $permissions['TopicSoftDeleteSee'] AND $permissions['canQueue'] ) + { + $topic_where[] = $this->registry->class_forums->fetchTopicHiddenQuery(array('visible', 'hidden', 'sdeleted'), 't.' ); + } + else if ( $permissions['TopicSoftDeleteSee'] ) + { + $topic_where[] = $this->registry->class_forums->fetchTopicHiddenQuery(array('visible', 'sdeleted'), 't.' ); + } + else if ( $permissions['canQueue'] ) + { + $topic_where[] = $this->registry->class_forums->fetchTopicHiddenQuery(array('visible', 'hidden'), 't.' ); + } + else + { + $topic_where[] = $this->registry->class_forums->fetchTopicHiddenQuery(array('visible' ), 't.' ); + } + + /* Manual fetch if user content all */ + if ( IPSSearchRegistry::get('in.userMode') == 'all' ) + { + /* init */ + $pids = array(); + + $this->DB->build( array( 'select' => 't.tid, t.last_post, t.topic_firstpost', + 'from' => 'topics t', + 'where' => implode( ' AND ', $topic_where ) . " AND t.starter_id=" . intval( $member['member_id'] ), + 'order' => 't.last_post DESC', + 'limit' => array(0, 1000 ) ) ); + $this->DB->execute(); + + while( $t = $this->DB->fetch() ) + { + $pids[ $t['tid'] ] = $t['last_post']; + } + + $where = ( array_merge( (array) $where, (array) $topic_where ) ); + $where = implode( " AND ", $where ); + + /* Now for posts */ + $this->DB->build( array( 'select' => 'p.pid', + 'from' => array('posts' => 'p' ), + 'where' => $where, + 'add_join' => array( array( 'select' => 't.tid, t.last_post, t.topic_firstpost', + 'from' => array( 'topics' => 't' ), + 'where' => 'p.topic_id=t.tid', + 'type' => 'left' ) ), + 'order' => 'p.pid DESC', + 'limit' => array( 0, 1000 ) ) ); + + $this->DB->execute(); + + while( $t = $this->DB->fetch() ) + { + $pids[ $t['tid'] ] = $t['last_post']; + } + + $count = array( 'count' => count( $pids ) ); + + if ( $count['count'] ) + { + arsort( $pids, SORT_NUMERIC ); + $tids = array_slice( array_keys( $pids ), $start, $perPage ); + } + } + else if ( IPSSearchRegistry::get('in.userMode') == 'title' ) + { + $topic_where[] = "t.starter_id=" . intval( $member['member_id'] ); + + $where = ( array_merge( (array) $where, (array) $topic_where ) ); + $where = implode( " AND ", $where ); + + /* Fetch the count */ + $count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(tid) as count', + 'from' => 'topics t', + 'where' => $where ) ); + + /* Fetch the count */ + if ( $count['count'] ) + { + $this->DB->build( array( 'select' => 'tid', + 'from' => 'topics t', + 'where' => $where, + 'order' => 't.tid DESC', + 'limit' => array( $start, $perPage ) ) ); + + $inner = $this->DB->execute(); + + while( $row = $this->DB->fetch( $inner ) ) + { + $tids[ $row['tid'] ] = $row['tid']; + } + } + } + else + { + $where = ( array_merge( (array) $where, (array) $topic_where ) ); + $where = implode( " AND ", $where ); + + /* Fetch the count */ + $count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(tid) as count', + 'from' => array('topics' => 't' ), + 'where' => $where, + 'add_join' => array( array( 'from' => array( 'posts' => 'p' ), + 'where' => 'p.topic_id=t.tid', + 'type' => 'left' ) ) ) ); + + /* Fetch the count */ + if ( $count['count'] ) + { + $this->DB->build( array( 'select' => 'tid', + 'from' => array('topics' => 't' ), + 'where' => $where, + 'add_join' => array( array( 'select' => 'p.pid', + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.topic_id=t.tid', + 'type' => 'left' ) ), + 'order' => 't.last_post DESC', + 'limit' => array( $start, $perPage ) ) ); + + $inner = $this->DB->execute(); + + while( $row = $this->DB->fetch( $inner ) ) + { + $tids[ $row['pid'] ] = $row['pid']; + } + } + } + + /* Fix to 1000 results max */ + $count['count'] = ( $count['count'] > 1000 ) ? 1000 : $count['count']; + + /* Return it */ + return array( 'count' => $count['count'], 'resultSet' => $tids ); + } + + /** + * Perform the viewNewContent search + * Forum Version + * Populates $this->_count and $this->_results + * + * @return nothin' + */ + public function viewNewContent() + { + $rtids = array(); + $tids = $this->registry->getClass('classItemMarking')->fetchCookieData( 'forums', 'items' ); + $oldStamp = $this->registry->getClass('classItemMarking')->fetchOldestUnreadTimestamp( array(), 'forums' ); + $check = IPS_UNIX_TIME_NOW - ( 86400 * 90 ); + $forumIdsOk = array(); + + /* Loop through the forums and build a list of forums we're allowed access to */ + $bvnp = explode( ',', $this->settings['vnp_block_forums'] ); + $start = IPSSearchRegistry::get('in.start'); + $perPage = IPSSearchRegistry::get('opt.search_per_page'); + + IPSSearchRegistry::set('in.search_sort_by' , 'date' ); + IPSSearchRegistry::set('in.search_sort_order', 'desc' ); + IPSSearchRegistry::set('opt.searchTitleOnly' , true ); + IPSSearchRegistry::set('display.onlyTitles' , true ); + IPSSearchRegistry::set('opt.noPostPreview' , true ); + + if ( intval( $this->memberData['_cache']['gb_mark__forums'] ) > 0 ) + { + $oldStamp = $this->memberData['_cache']['gb_mark__forums']; + } + + /* Finalize times */ + if ( ! $oldStamp OR $oldStamp == IPS_UNIX_TIME_NOW ) + { + $oldStamp = intval( $this->memberData['last_visit'] ); + } + + /* Older than 3 months.. then limit */ + if ( $oldStamp < $check ) + { + $oldStamp = $check; + } + + /* Get list of good forum IDs */ + $_forumIdsOk = $this->registry->class_forums->fetchSearchableForumIds( $this->memberData['member_id'], $bvnp ); + + if ( ! $this->memberData['bw_vnc_type'] ) + { + $oldStamp = IPSLib::fetchHighestNumber( array( intval( $this->memberData['_cache']['gb_mark__forums'] ), intval( $this->memberData['last_visit'] ) ) ); + $where[] = "last_post > " . $oldStamp; + + $forumIdsOk = $_forumIdsOk; + } + else + { + foreach( $_forumIdsOk as $id ) + { + $lMarked = $this->registry->getClass('classItemMarking')->fetchTimeLastMarked( array( 'forumID' => $id ), 'forums' ); + $fData = $this->registry->getClass('class_forums')->forumsFetchData( $id ); + + if ( $fData['last_post'] > $lMarked ) + { + /* Add to tids */ + $_tids = $this->registry->getClass('classItemMarking')->fetchReadIds( array( 'forumID' => $id ), 'forums', false ); + + if ( is_array( $_tids ) ) + { + foreach( $_tids as $k => $v ) + { + $tids[ $k ] = $v; + } + } + + $forumIdsOk[ $id ] = $id; + } + } + + /* If no forums, we're done */ + if ( ! count( $forumIdsOk ) ) + { + /* Return it */ + return array( 'count' => 0, 'resultSet' => array() ); + } + + /* Try and limit the TIDS */ + if ( is_array( $tids ) AND count( $tids ) ) + { + if ( count( $tids ) > 300 ) + { + /* Sort by last read date */ + arsort( $tids, SORT_NUMERIC ); + $tids = array_slice( $tids, 0, 300 ); + } + + $this->DB->build( array( 'select' => 'tid, last_post', + 'from' => 'topics', + 'where' => "tid IN (" . implode( ",", array_keys( $tids ) ) . ')' ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + /* Posted in since last read? */ + if ( $row['last_post'] > $tids[ $row['tid'] ] ) + { + unset( $tids[ $row['tid'] ] ); + } + } + + if ( count( $tids ) ) + { + $tids = array_keys( $tids ); + } + } + + /* Based on oldest timestamp */ + $where[] = "last_post > " . $oldStamp; + + /* Set read tids */ + if ( count( $tids ) ) + { + $where[] = "tid NOT IN (" . implode( ",", $tids ) . ')'; + } + } + + $forumIdsOk = ( count( $forumIdsOk ) ) ? $forumIdsOk : array( 0 => 0 ); + $where[] = "forum_id IN (" . implode( ",", $forumIdsOk ) . ")"; + + /* Add in last bits */ + $where[] = "state != 'link'"; + + /* Set up perms */ + $permissions['TopicSoftDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedTopics( 0 ); + $permissions['canQueue'] = $this->registry->getClass('class_forums')->canQueuePosts( 0 ); + + if ( $permissions['TopicSoftDeleteSee'] AND $permissions['canQueue'] ) + { + $where[] = $this->registry->class_forums->fetchTopicHiddenQuery(array('visible', 'hidden', 'sdeleted') ); + } + else if ( $permissions['TopicSoftDeleteSee'] ) + { + $where[] = $this->registry->class_forums->fetchTopicHiddenQuery(array('visible', 'sdeleted') ); + } + else if ( $permissions['canQueue'] ) + { + $where[] = $this->registry->class_forums->fetchTopicHiddenQuery(array('visible', 'hidden') ); + } + else + { + $where[] = $this->registry->class_forums->fetchTopicHiddenQuery(array('visible' ) ); + } + + $where = implode( " AND ", $where ); + + /* Fetch the count */ + $count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', + 'from' => 'topics', + 'where' => $where ) ); + + /* Fetch the count */ + if ( $count['count'] ) + { + $this->DB->build( array( 'select' => 'tid', + 'from' => 'topics', + 'where' => $where, + 'order' => 'last_post DESC', + 'limit' => array( $start, $perPage ) ) ); + + $inner = $this->DB->execute(); + + while( $row = $this->DB->fetch( $inner ) ) + { + $rtids[ $row['tid'] ] = $row['tid']; + } + } + + /* Set up some vars */ + IPSSearchRegistry::set('set.resultCutToDate', $oldStamp ); + + /* Return it */ + return array( 'count' => $count['count'], 'resultSet' => $rtids ); + } + + /** + * Perform the search + * Populates $this->_count and $this->_results + * + * @return nothin' + */ + public function viewActiveContent() + { + $seconds = IPSSearchRegistry::get('in.period_in_seconds'); + + /* Loop through the forums and build a list of forums we're allowed access to */ + $where = array(); + $forumIdsOk = array(); + $bvnp = explode( ',', $this->settings['vnp_block_forums'] ); + $start = IPSSearchRegistry::get('in.start'); + $perPage = IPSSearchRegistry::get('opt.search_per_page'); + $tids = array(); + + /* Get list of good forum IDs */ + $forumIdsOk = $this->registry->class_forums->fetchSearchableForumIds( $this->memberData['member_id'], $bvnp ); + + $forumIdsOk = ( count( $forumIdsOk ) ) ? $forumIdsOk : array( 0 => 0 ); + $where[] = "t.forum_id IN (" . implode( ",", $forumIdsOk ) . ")"; + + /* Generate last post times */ + $where[] = "t.last_post > " . intval( time() - $seconds ); + + /* Set up perms */ + $permissions['TopicSoftDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedTopics( 0 ); + $permissions['canQueue'] = $this->registry->getClass('class_forums')->canQueuePosts( 0 ); + + /* Add in last bits */ + $where[] = "t.state != 'link'"; + + if ( $permissions['TopicSoftDeleteSee'] AND $permissions['canQueue'] ) + { + $where[] = $this->registry->class_forums->fetchTopicHiddenQuery(array('visible', 'hidden', 'sdeleted'), 't.'); + } + else if ( $permissions['TopicSoftDeleteSee'] ) + { + $where[] = $this->registry->class_forums->fetchTopicHiddenQuery(array('visible', 'sdeleted'), 't.'); + } + else if ( $permissions['canQueue'] ) + { + $where[] = $this->registry->class_forums->fetchTopicHiddenQuery(array('visible', 'hidden'), 't.'); + } + else + { + $where[] = $this->registry->class_forums->fetchTopicHiddenQuery(array('visible' ), 't.' ); + } + + $where = implode( " AND ", $where ); + + /* Fetch the count */ + $count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(tid) as count', + 'from' => array( 'topics' => 't' ), + 'where' => $where ) ); + + + /* Grab */ + $this->DB->build( array( 'select' => 'tid', + 'from' => array( 'topics' => 't' ), + 'where' => $where, + 'order' => 'last_post DESC', + 'limit' => array( $start, $perPage ) ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $tids[ $row['tid'] ] = $row['tid']; + } + + /* Return it */ + return array( 'count' => $count['count'], 'resultSet' => $tids ); + } + + /** + * Builds the where portion of a search string + * + * @param string $search_term The string to use in the search + * @param bool $content_title_only Search only title records + * @param string $order Order by data + * @param bool $onlyPosts Enforce posts only + * @param bool $noForums Don't check forums that posts are in + * @return string + */ + private function _buildWhereStatement( $search_term, $content_title_only=false, $order='', $onlyPosts=null, $noForums=false ) + { + /* INI */ + $where_clause = array(); + $onlyPosts = ( $onlyPosts !== null ) ? $onlyPosts : IPSSearchRegistry::get('opt.onlySearchPosts'); + $sort_by = IPSSearchRegistry::get('in.search_sort_by'); + $sort_order = IPSSearchRegistry::get('in.search_sort_order'); + $sortKey = ''; + $sortType = ''; + $cType = IPSSearchRegistry::get('contextual.type'); + $cId = IPSSearchRegistry::get('contextual.id' ); + + /* Loop through the forums and build a list of forums we're allowed access to */ + $forumIdsOk = array(); + $forumIdsBad = array(); + + if ( ! empty( ipsRegistry::$request['search_app_filters']['forums']['forums'] ) AND count( ipsRegistry::$request['search_app_filters']['forums']['forums'] ) ) + { + foreach( ipsRegistry::$request['search_app_filters']['forums']['forums'] as $forum_id ) + { + if( $forum_id ) + { + $data = $this->registry->class_forums->forum_by_id[ $forum_id ]; + + /* Check for sub forums */ + $children = ipsRegistry::getClass( 'class_forums' )->forumsGetChildren( $forum_id ); + + foreach( $children as $kid ) + { + if( ! in_array( $kid, ipsRegistry::$request['search_app_filters']['forums']['forums'] ) ) + { + if( ! $this->registry->permissions->check( 'read', $this->registry->class_forums->forum_by_id[ $kid ] ) ) + { + $forumIdsBad[] = $kid; + continue; + } + + /* Can read, but is it password protected, etc? */ + if ( ! $this->registry->class_forums->forumsCheckAccess( $kid, 0, 'forum', array(), true ) ) + { + $forumIdsBad[] = $kid; + continue; + } + + if ( ! $this->registry->class_forums->forum_by_id[ $kid ]['sub_can_post'] OR ! $this->registry->class_forums->forum_by_id[ $kid ]['can_view_others'] ) + { + $forumIdsBad[] = $kid; + continue; + } + + $forumIdsOk[] = $kid; + } + } + + /* Can we read? */ + if ( ! $this->registry->permissions->check( 'view', $data ) ) + { + $forumIdsBad[] = $forum_id; + continue; + } + + /* Can read, but is it password protected, etc? */ + if ( ! $this->registry->class_forums->forumsCheckAccess( $forum_id, 0, 'forum', array(), true ) ) + { + $forumIdsBad[] = $forum_id; + continue; + } + + if ( ( ! $data['sub_can_post'] OR ! $data['can_view_others'] ) AND !$this->memberData['g_access_cp'] ) + { + $forumIdsBad[] = $forum_id; + continue; + } + + $forumIdsOk[] = $forum_id; + } + } + } + + if ( ! count($forumIdsOk) ) + { + $allowTrashCan = ( $cType == 'forum' ) ? true : false; + + /* Get list of good forum IDs */ + $forumIdsOk = $this->registry->class_forums->fetchSearchableForumIds( null, array(), $allowTrashCan ); + } + + /* Add allowed forums */ + if ( $noForums !== true ) + { + $forumIdsOk = ( count( $forumIdsOk ) ) ? $forumIdsOk : array( 0 => 0 ); + + /* Contextual */ + if ( $cType == 'forum' AND $cId AND in_array( $cId, $forumIdsOk ) ) + { + $where_clause[] = "t.forum_id=" . $cId; + } + else + { + $where_clause[] = "t.forum_id IN (" . implode( ",", $forumIdsOk ) . ")"; + } + } + + /* Topic contextual */ + if ( $cType == 'topic' AND $cId ) + { + $where_clause[] = "t.tid=" . $cId; + } + + /* Exclude some items */ + $permissions['TopicSoftDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedTopics( 0 ); + $permissions['canQueue'] = $this->registry->getClass('class_forums')->canQueuePosts( 0 ); + $permissions['PostSoftDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedPosts( 0 ); + $permissions['SoftDeleteReason'] = $this->registry->getClass('class_forums')->canSeeSoftDeleteReason( 0 ); + $permissions['SoftDeleteContent'] = $this->registry->getClass('class_forums')->canSeeSoftDeleteContent( 0 ); + + if ( ! $content_title_only ) + { + if ( $permissions['SoftDeleteContent'] AND $permissions['PostSoftDeleteSee'] AND $permissions['canQueue'] ) + { + $where_clause[] = $this->registry->class_forums->fetchPostHiddenQuery(array('visible', 'hidden', 'sdeleted'), 'p.'); + } + else if ( $permissions['SoftDeleteContent'] AND $permissions['PostSoftDeleteSee'] ) + { + $where_clause[] = $this->registry->class_forums->fetchPostHiddenQuery(array('visible', 'sdeleted'), 'p.'); + } + else if ( $permissions['canQueue'] ) + { + $where_clause[] = $this->registry->class_forums->fetchPostHiddenQuery(array('visible', 'hidden'), 'p.'); + } + else + { + $where_clause[] = $this->registry->class_forums->fetchPostHiddenQuery(array('visible' ), 'p.' ); + } + } + + if ( $permissions['SoftDeleteContent'] AND $permissions['TopicSoftDeleteSee'] AND $permissions['canQueue'] ) + { + $where_clause[] = $this->registry->class_forums->fetchTopicHiddenQuery(array('visible', 'hidden', 'sdeleted'), 't.'); + } + else if ( $permissions['SoftDeleteContent'] AND $permissions['TopicSoftDeleteSee'] ) + { + $where_clause[] = $this->registry->class_forums->fetchTopicHiddenQuery(array('visible', 'sdeleted'), 't.'); + } + else if ( $permissions['canQueue'] ) + { + $where_clause[] = $this->registry->class_forums->fetchTopicHiddenQuery(array('visible', 'hidden'), 't.'); + } + else + { + $where_clause[] = $this->registry->class_forums->fetchTopicHiddenQuery(array('visible' ), 't.' ); + } + + if( $search_term ) + { + $search_term = str_replace( '"', '"', $search_term ); + + if( $content_title_only ) + { + $where_clause[] = $this->DB->buildSearchStatement( 't.title', $search_term, true, false, ipsRegistry::$settings['use_fulltext'] ); + } + else + { + if ( $onlyPosts ) + { + $where_clause[] = $this->DB->buildSearchStatement( 'p.post', $search_term, true, false, ipsRegistry::$settings['use_fulltext'] ); + } + else + { + /* Sorting */ + switch( $sort_by ) + { + default: + case 'date': + $sortKey = 'last_post'; + $sortType = 'numerical'; + break; + case 'title': + $sortKey = 'title'; + $sortType = 'string'; + break; + case 'posts': + $sortKey = 'posts'; + $sortType = 'numerical'; + break; + case 'views': + $sortKey = 'views'; + $sortType = 'numerical'; + break; + } + + /* Set vars */ + IPSSearch::$ask = $sortKey; + IPSSearch::$aso = strtolower( $sort_order ); + IPSSearch::$ast = $sortType; + + /* Find topic ids that match */ + $tids = array( 0 => 0 ); + $pids = array( 0 => 0 ); + + $this->DB->build( array( + 'select' => "t.tid, t.last_post, t.forum_id", + 'from' => 'topics t', + 'where' => str_replace( 'p.author_id', 't.starter_id', $this->_buildWhereStatement( $search_term, true, $order, null ) ), + 'order' => 't.' . $sortKey . ' ' . $sort_order, + 'limit' => array(0, IPSSearchRegistry::get('set.hardLimit')) ) ); + + $i = $this->DB->execute(); + + /* Grab the results */ + while( $row = $this->DB->fetch( $i ) ) + { + $_rows[ $row['tid'] ] = $row; + } + + /* Sort */ + if ( count( $_rows ) ) + { + usort( $_rows, array("IPSSearch", "usort") ); + + foreach( $_rows as $id => $row ) + { + $tids[] = $row['tid']; + } + } + + /* Now get the Pids */ + if ( count( $tids ) > 1 ) + { + $this->DB->build( array('select' => 'pid', + 'from' => 'posts', + 'where' => 'topic_id IN ('. implode( ',', $tids ) . ') AND new_topic=1' ) ); + + $i = $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $pids[ $row['pid'] ] = $row['pid']; + } + } + + /* Set vars */ + IPSSearch::$ask = ( $sortKey == 'last_post' ) ? 'post_date' : $sortKey; + IPSSearch::$aso = strtolower( $sort_order ); + IPSSearch::$ast = $sortType; + + $this->DB->build( array( + 'select' => "p.pid, p.queued", + 'from' => array( 'posts' => 'p' ), + 'where' => $this->_buildWhereStatement( $search_term, false, $order, true ), + 'order' => IPSSearch::$ask . ' ' . IPSSearch::$aso, + 'group' => 'p.topic_id', + 'limit' => array(0, IPSSearchRegistry::get('set.hardLimit')), + 'add_join' => array( array( 'select' => 't.approved, t.forum_id', + 'from' => array( 'topics' => 't' ), + 'where' => 'p.topic_id=t.tid', + 'type' => 'left' ) ) ) ); + + $i = $this->DB->execute(); + + /* Grab the results */ + while( $row = $this->DB->fetch( $i ) ) + { + $_prows[ $row['pid'] ] = $row; + } + + /* Sort */ + if ( count( $_prows ) ) + { + usort( $_prows, array("IPSSearch", "usort") ); + + foreach( $_prows as $id => $row ) + { + $pids[ $row['pid'] ] = $row['pid']; + } + } + + $where_clause[] = '( p.pid IN (' . implode( ',', $pids ) .') )'; + } + } + } + + /* No moved topic links */ + $where_clause[] = "t.state != 'link'"; + + /* Date Restrict */ + if( $this->search_begin_timestamp && $this->search_end_timestamp ) + { + $where_clause[] = $this->DB->buildBetween( $content_title_only ? "t.last_post" : "p.post_date", $this->search_begin_timestamp, $this->search_end_timestamp ); + } + else + { + if( $this->search_begin_timestamp ) + { + $where_clause[] = $content_title_only ? "t.last_post > {$this->search_begin_timestamp}" : "p.post_date > {$this->search_begin_timestamp}"; + } + + if( $this->search_end_timestamp ) + { + $where_clause[] = $content_title_only ? "t.last_post < {$this->search_end_timestamp}" : "p.post_date < {$this->search_end_timestamp}"; + } + } + + /* Add in AND where conditions */ + if( isset( $this->whereConditions['AND'] ) && count( $this->whereConditions['AND'] ) ) + { + $where_clause = array_merge( $where_clause, $this->whereConditions['AND'] ); + } + + /* ADD in OR where conditions */ + if( isset( $this->whereConditions['OR'] ) && count( $this->whereConditions['OR'] ) ) + { + $where_clause[] = '( ' . implode( ' OR ', $this->whereConditions['OR'] ) . ' )'; + } + + /* Build and return the string */ + return implode( " AND ", $where_clause ); + } + + /** + * Remap standard columns (Apps can override ) + * + * @param string $column sql table column for this condition + * @return string column + * @return void + */ + public function remapColumn( $column ) + { + $column = $column == 'member_id' ? ( IPSSearchRegistry::get('opt.searchTitleOnly') ? 't.starter_id' : 'p.author_id' ) : $column; + $column = $column == 'content_title' ? 't.title' : $column; + $column = $column == 'type_id' ? 't.forum_id' : $column; + + return $column; + } + + /** + * Returns an array used in the searchplugin's setCondition method + * + * @param array $data Array of forums to view + * @return array Array with column, operator, and value keys, for use in the setCondition call + */ + public function buildFilterSQL( $data ) + { + /* INIT */ + $return = array(); + + /* Set up some defaults */ + IPSSearchRegistry::set( 'opt.noPostPreview' , true ); + IPSSearchRegistry::set( 'opt.onlySearchPosts', false ); + + /* Make default search type topics */ + if( isset( $data ) && is_array( $data ) && count( $data ) ) + { + foreach( $data as $field => $_data ) + { + /* CONTENT ONLY */ + if ( $field == 'noPreview' AND $_data['noPreview'] == 0 ) + { + IPSSearchRegistry::set( 'opt.noPostPreview', false ); + } + + /* CONTENT ONLY */ + if ( $field == 'contentOnly' AND $_data['contentOnly'] == 1 ) + { + IPSSearchRegistry::set( 'opt.onlySearchPosts', true ); + } + + /* POST COUNT */ + if ( $field == 'pCount' AND intval( $_data['pCount'] ) > 0 ) + { + $return[] = array( 'column' => 't.posts', 'operator' => '>=', 'value' => intval( $_data['pCount'] ) ); + } + + /* TOPIC VIEWS */ + if ( $field == 'pViews' AND intval( $_data['pViews'] ) > 0 ) + { + $return[] = array( 'column' => 't.views', 'operator' => '>=', 'value' => intval( $_data['pViews'] ) ); + } + } + + return $return; + } + else + { + return ''; + } + } +} \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/search/form.php b/upload/admin/applications/forums/extensions/search/form.php new file mode 100644 index 00000000..ec835d11 --- /dev/null +++ b/upload/admin/applications/forums/extensions/search/form.php @@ -0,0 +1,80 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Returns HTML for the form (optional class, not required) + * Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $ + * + * + * @author $author$ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 5855 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class search_form_forums +{ + /** + * Construct + * + * @return void + */ + public function __construct() + { + /* Make object */ + $this->registry = ipsRegistry::instance(); + $this->DB = $this->registry->DB(); + $this->settings =& $this->registry->fetchSettings(); + $this->request =& $this->registry->fetchRequest(); + $this->lang = $this->registry->getClass('class_localization'); + $this->member = $this->registry->member(); + $this->memberData =& $this->registry->member()->fetchMemberData(); + $this->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + } + + /** + * Return sort drop down + * + * @return array + */ + public function fetchSortDropDown() + { + $array = array( 'date' => $this->lang->words['s_search_type_0'], + 'title' => $this->lang->words['forum_sort_title'], + 'posts' => $this->lang->words['forum_sort_posts'], + 'views' => $this->lang->words['forum_sort_views'] ); + + return $array; + } + + /** + * Retuns the html for displaying the forum category filter on the advanced search page + * + * @return string Filter HTML + */ + public function getHtml() + { + /* Make sure class_forums is setup */ + if( ipsRegistry::isClassLoaded('class_forums') !== TRUE ) + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' ); + ipsRegistry::setClass( 'class_forums', new $classToLoad( ipsRegistry::instance() ) ); + } + + ipsRegistry::getClass('class_forums')->strip_invisible = 1; + ipsRegistry::getClass('class_forums')->forumsInit(); + + return array( 'title' => ipsRegistry::$applications['forums']['app_public_title'], 'html' => ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->forumAdvancedSearchFilters( ipsRegistry::getClass( 'class_forums' )->buildForumJump( 0, 1 ) ) ); + } +} \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/search/format.php b/upload/admin/applications/forums/extensions/search/format.php new file mode 100644 index 00000000..0fad3163 --- /dev/null +++ b/upload/admin/applications/forums/extensions/search/format.php @@ -0,0 +1,563 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Formats forum search results + * Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $ + * + * + * @author $author$ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 5855 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class search_format_forums extends search_format +{ + /** + * Constructor + * + * @return void + */ + public function __construct( ipsRegistry $registry ) + { + /* Get class forums, used for displaying forum names on results */ + if ( ipsRegistry::isClassLoaded('class_forums') !== TRUE ) + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' ); + ipsRegistry::setClass( 'class_forums', new $classToLoad( ipsRegistry::instance() ) ); + ipsRegistry::getClass('class_forums')->forumsInit(); + } + + parent::__construct( $registry ); + + /* Set up wrapper */ + $this->templates = array( 'group' => 'search', 'template' => 'searchResultsAsForum' ); + } + + /** + * Parse search results + * + * @param array $r Search result + * @return array $html Blocks of HTML + */ + public function parseAndFetchHtmlBlocks( $rows ) + { + /* Forum stuff */ + $sub = false; + $isVnc = false; + $search_term = IPSSearchRegistry::get('in.clean_search_term'); + $onlyPosts = IPSSearchRegistry::get('opt.onlySearchPosts'); + $onlyTitles = IPSSearchRegistry::get('display.onlyTitles'); + $noPostPreview = IPSSearchRegistry::get('opt.noPostPreview'); + $results = array(); + $attachPids = array(); + $results = array(); + + /* loop and process */ + foreach( $rows as $id => $data ) + { + /* Reset */ + $pages = 0; + + /* Set up forum */ + $forum = $this->registry->getClass('class_forums')->forum_by_id[ $data['forum_id'] ]; + + $this->last_topic = $data['tid']; + + /* Various data */ + $data['_last_post'] = $data['last_post']; + $data['_longTitle'] = $data['content_title']; + $data['_shortTitle'] = IPSText::truncate( $data['content_title'], 60 ); + $data['last_poster'] = $data['last_poster_id'] ? IPSLib::makeProfileLink( $data['last_poster_name'], $data['last_poster_id'], $data['seo_last_name'] ) : $this->settings['guest_name_pre'] . $data['last_poster_name'] . $this->settings['guest_name_suf']; + $data['starter'] = $data['starter_id'] ? IPSLib::makeProfileLink( $data['starter_name'], $data['starter_id'], $data['seo_first_name'] ) : $this->settings['guest_name_pre'] . $data['starter_name'] . $this->settings['guest_name_suf']; + $data['last_post'] = $this->registry->getClass( 'class_localization')->getDate( $data['last_post'], 'SHORT' ); + + if ( isset( $data['post_date'] ) ) + { + $data['_post_date'] = $data['post_date']; + $data['post_date'] = $this->registry->getClass( 'class_localization')->getDate( $data['post_date'], 'SHORT' ); + } + + if ( $this->memberData['is_mod'] ) + { + $data['posts'] += intval($data['topic_queuedposts']); + } + + if ( $data['posts']) + { + if ( (($data['posts'] + 1) % $this->settings['display_max_posts']) == 0 ) + { + $pages = ($data['posts'] + 1) / $this->settings['display_max_posts']; + } + else + { + $number = ( ($data['posts'] + 1) / $this->settings['display_max_posts'] ); + $pages = ceil( $number); + } + } + + if ( $pages > 1 ) + { + for ( $i = 0 ; $i < $pages ; ++$i ) + { + $real_no = $i * $this->settings['display_max_posts']; + $page_no = $i + 1; + + if ( $page_no == 4 and $pages > 4 ) + { + $data['pages'][] = array( 'last' => 1, + 'st' => ($pages - 1) * $this->settings['display_max_posts'], + 'page' => $pages ); + break; + } + else + { + $data['pages'][] = array( 'last' => 0, + 'st' => $real_no, + 'page' => $page_no ); + } + } + } + + /* For-matt some stuffs */ + if ( ! $data['cache_content'] ) + { + IPSText::getTextClass( 'bbcode' )->parse_smilies = $data['use_emo']; + IPSText::getTextClass( 'bbcode' )->parse_html = ( $forum['use_html'] and $this->caches['group_cache'][ $data['member_group_id'] ]['g_dohtml'] and $data['post_htmlstate'] ) ? 1 : 0; + IPSText::getTextClass( 'bbcode' )->parse_nl2br = $data['post_htmlstate'] == 2 ? 1 : 0; + IPSText::getTextClass( 'bbcode' )->parse_bbcode = $forum['use_ibc']; + IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics'; + IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $data['member_group_id']; + IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $data['mgroup_others']; + } + else + { + $data['post'] = '' . $data['cache_content']; + } + + $data['post'] = IPSText::searchHighlight( IPSText::getTextClass( 'bbcode' )->preDisplayParse( $data['post'] ), $search_term ); + + /* Has attachments */ + if ( $data['topic_hasattach'] ) + { + $attachPids[ $data['pid'] ] = $data['post']; + } + + $rows[ $id ] = $data; + } + + /* Attachments */ + if ( count( $attachPids ) ) + { + /* Load attachments class */ + if ( ! is_object( $this->class_attach ) ) + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $this->class_attach = new $classToLoad( $this->registry ); + $this->class_attach->type = 'post'; + $this->class_attach->init(); + } + + $attachHTML = $this->class_attach->renderAttachments( array( $data['pid'] => $data['post'] ), array_keys( $attachPids ) ); + + /* Now parse back in the rendered posts */ + if( is_array($attachHTML) AND count($attachHTML) ) + { + foreach( $attachHTML as $id => $_data ) + { + /* Get rid of any lingering attachment tags */ + if ( stristr( $_data['html'], "[attachment=" ) ) + { + $_data['html'] = IPSText::stripAttachTag( $_data['html'] ); + } + + $rows[ $id ]['post'] = $_data['html']; + $rows[ $id ]['attachmentHtml'] = $_data['attachmentHtml']; + } + } + } + + /* Go through and build HTML */ + foreach( $rows as $id => $data ) + { + /* Format content */ + list( $html, $sub ) = $this->formatContent( $data ); + + $results[ $id ] = array( 'html' => $html, 'app' => $data['app'], 'type' => $data['type'], 'sub' => $sub ); + } + + return $results; + } + + /** + * Formats the forum search result for display + * + * @param array $search_row Array of data + * @return mixed Formatted content, ready for display, or array containing a $sub section flag, and content + */ + public function formatContent( $data ) + { + $onlyPosts = IPSSearchRegistry::get('opt.onlySearchPosts'); + $onlyTitles = IPSSearchRegistry::get('display.onlyTitles'); + $noPostPreview = IPSSearchRegistry::get('opt.noPostPreview'); + + /* Forum Breadcrum */ + $data['_forum_trail'] = $this->registry->getClass( 'class_forums' )->forumsBreadcrumbNav( $data['forum_id'] ); + + /* Is it read? We don't support last_vote in search. */ + $is_read = $this->registry->getClass( 'classItemMarking' )->isRead( array( 'forumID' => $data['forum_id'], 'itemID' => $data['tid'], 'itemLastUpdate' => $data['lastupdate'] ? $data['lastupdate'] : $data['updated'] ), 'forums' ); + + /* Has posted dot */ + $show_dots = ( $this->settings['show_user_posted'] AND $this->memberData['member_id'] AND $data['_hasPosted'] ) ? 1 : 0; + + /* Icon */ + $data['_icon'] = $this->registry->getClass( 'class_forums' )->fetchTopicFolderIcon( $data, $show_dots, $is_read ); + $data['_isRead'] = $is_read; + + /* Display type */ + return array( $this->registry->getClass( 'output' )->getTemplate( 'search' )->topicPostSearchResultAsForum( $data, ( $onlyTitles || $noPostPreview ) ? 1 : 0 ), 0 ); + } + + /** + * Formats / grabs extra data for results + * Takes an array of IDS (can be IDs from anything) and returns an array of expanded data. + * + * @return array + */ + public function processResults( $ids ) + { + /* INIT */ + $sort_by = IPSSearchRegistry::get('in.search_sort_by'); + $sort_order = IPSSearchRegistry::get('in.search_sort_order'); + $search_term = IPSSearchRegistry::get('in.clean_search_term'); + $content_title_only = IPSSearchRegistry::get('opt.searchTitleOnly'); + $onlyPosts = IPSSearchRegistry::get('opt.onlySearchPosts'); + $order_dir = ( $sort_order == 'asc' ) ? 'asc' : 'desc'; + $_post_joins = array(); + $members = array(); + $results = array(); + $topicIds = array(); + $dots = array(); + $sortKey = ''; + $sortType = ''; + $_sdTids = array(); + $_sdPids = array(); + + /* Set up some basic permissions */ + $permissions['PostSoftDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedPosts( 0 ); + $permissions['TopicSoftDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedTopics( 0 ); + $permissions['canQueue'] = $this->registry->getClass('class_forums')->canQueuePosts( 0 ); + $permissions['SoftDeleteReason'] = $this->registry->getClass('class_forums')->canSeeSoftDeleteReason( 0 ); + $permissions['SoftDeleteContent'] = $this->registry->getClass('class_forums')->canSeeSoftDeleteContent( 0 ); + $permissions['PostSoftDeleteRestore'] = $this->registry->getClass('class_forums')->can_Un_SoftDeletePosts( 0 ); + $permissions['TopicSoftDeleteRestore'] = $this->registry->getClass('class_forums')->can_Un_SoftDeleteTopics( 0 ); + + /* Got some? */ + if ( count( $ids ) ) + { + /* Cache? */ + if ( IPSContentCache::isEnabled() ) + { + if ( IPSContentCache::fetchSettingValue('post') ) + { + $_post_joins[] = IPSContentCache::join( 'post', 'p.pid' ); + } + + if ( IPSContentCache::fetchSettingValue('sig') ) + { + $_post_joins[] = IPSContentCache::join( 'sig' , 'p.author_id', 'ccb', 'left', 'ccb.cache_content as cache_content_sig, ccb.cache_updated as cache_updated_sig' ); + } + } + + /* Sorting */ + switch( $sort_by ) + { + default: + case 'date': + $sortKey = ( $content_title_only ) ? 'last_post' : 'post_date'; + $sortType = 'numerical'; + break; + case 'title': + $sortKey = 'title'; + $sortType = 'string'; + break; + case 'posts': + $sortKey = 'posts'; + $sortType = 'numerical'; + break; + case 'views': + $sortKey = 'views'; + $sortType = 'numerical'; + break; + } + + /* Set vars */ + IPSSearch::$ask = $sortKey; + IPSSearch::$aso = strtolower( $order_dir ); + IPSSearch::$ast = $sortType; + + /* If we are search in titles only, then the ID array will be TIDs */ + if( $content_title_only ) + { + $k = 'tid'; + + $this->DB->build( array( + 'select' => "t.*", + 'from' => array( 'topics' => 't' ), + 'where' => 't.tid IN( ' . implode( ',', $ids ) . ')', + 'add_join' => array_merge( array( array( 'select' => 'p.*', + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.pid=t.topic_firstpost', + 'type' => 'left' ), + array( 'select' => 'm.member_id, m.members_display_name, m.members_seo_name', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=p.author_id', + 'type' => 'left' ) ), $_post_joins ) ) ); + } + /* Otherwise, it's PIDs */ + else + { + $k = 'pid'; + + $this->DB->build( array( + 'select' => "p.*", + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.pid IN( ' . implode( ',', $ids ) . ')', + 'add_join' => array_merge( array( array( 'select' => 't.*', + 'from' => array( 'topics' => 't' ), + 'where' => 't.tid=p.topic_id', + 'type' => 'left' ), + array( 'select' => 'm.member_id, m.members_display_name, m.members_seo_name', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=p.author_id', + 'type' => 'left' ) ), $_post_joins ) ) ); + + } + + /* Grab data */ + $this->DB->execute(); + + /* Grab the results */ + while( $row = $this->DB->fetch() ) + { + $_rows[ $row[ $k ] ] = $row; + } + + /* Sort */ + if ( count( $_rows ) ) + { + usort( $_rows, array("IPSSearch", "usort") ); + + foreach( $_rows as $id => $row ) + { + /* Prevent member from stepping on it */ + $row['topic_title'] = $row['title']; + + /* Got author but no member data? */ + if ( ! empty( $row['author_id'] ) ) + { + $members[ $row['author_id'] ] = $row['author_id']; + } + + /* Topic ids? */ + if ( ! empty( $row['topic_id'] ) ) + { + $topicIds[ $row['topic_id'] ] = $row['topic_id']; + } + + /* If we're using sphinx, check forum permissions again as the 15 minute delta rebuild could expose a moved topic before deltas rebuild. + We don't need to do this for SQL search as the results are delivered live and lets face it, we can do without the load */ + if ( $this->settings['search_method'] != 'traditional' ) + { + /* Can we read? */ + if ( ! $this->registry->permissions->check( 'view', $this->registry->class_forums->forum_by_id[ $row['forum_id'] ] ) ) + { + continue; + } + + /* Can read, but is it password protected, etc? */ + if ( ! $this->registry->class_forums->forumsCheckAccess( $row['forum_id'], 0, 'forum', array(), true ) ) + { + continue; + } + } + + $row['cleanSearchTerm'] = urlencode($search_term); + $row['topicPrefix'] = $row['pinned'] ? $this->registry->getClass('output')->getTemplate('forum')->topicPrefixWrap( $this->settings['pre_pinned'] ) : ''; + + $row['_isVisible'] = ( $this->registry->getClass('class_forums')->fetchHiddenTopicType( $row ) == 'visible' ) ? true : false; + $row['_isHidden'] = ( $this->registry->getClass('class_forums')->fetchHiddenTopicType( $row ) == 'hidden' ) ? true : false; + $row['_isDeleted'] = ( $this->registry->getClass('class_forums')->fetchHiddenTopicType( $row ) == 'sdelete' ) ? true : false; + + $row['_p_isVisible'] = ( $this->registry->getClass('class_forums')->fetchHiddenType( $row ) == 'visible' ) ? true : false; + $row['_p_isHidden'] = ( $this->registry->getClass('class_forums')->fetchHiddenType( $row ) == 'hidden' ) ? true : false; + $row['_p_isDeleted'] = ( $this->registry->getClass('class_forums')->fetchHiddenType( $row ) == 'sdelete' ) ? true : false; + + /* Hidden and we do not have permission? */ + if ( $row['_isHidden'] AND ! $permissions['canQueue'] ) + { + continue; + } + + /* Is the topic deleted? If so, then the first post will appear as such */ + if ( $row['_isDeleted'] AND $permissions['TopicSoftDeleteSee'] ) + { + $row['_p_isDeleted'] = true; + $_sdPids[ $row['pid'] ] = $row['pid']; + } + + /* Collect TIDS of soft deleted topics */ + if ( $row['_isDeleted'] ) + { + if ( $permissions['TopicSoftDeleteSee'] ) + { + $_sdTids[ $row['tid'] ] = $row['tid']; + } + else + { + continue; + } + } + + /* Collect TIDS of soft deleted topics */ + if ( $row['_p_isDeleted'] ) + { + if ( $permissions['PostSoftDeleteSee'] ) + { + $_sdPids[ $row['pid'] ] = $row['pid']; + } + else + { + continue; + } + } + + $results[ $row['pid'] ] = $this->genericizeResults( $row ); + } + } + + /* Need to load members? */ + if ( count( $members ) ) + { + $mems = IPSMember::load( $members, 'all' ); + + foreach( $results as $id => $r ) + { + if ( ! empty( $r['author_id'] ) AND isset( $mems[ $r['author_id'] ] ) ) + { + $mems[ $r['author_id'] ]['m_posts'] = $mems[ $r['author_id'] ]['posts']; + //unset( $mems[ $r['author_id'] ]['posts'] ); + unset( $mems[ $r['author_id'] ]['last_post'] ); + + if ( isset( $r['cache_content_sig'] ) ) + { + $mems[ $r['author_id'] ]['cache_content'] = $r['cache_content_sig']; + $mems[ $r['author_id'] ]['cache_updated'] = $r['cache_updated_sig']; + } + + $_mem = IPSMember::buildDisplayData( $mems[ $r['author_id'] ], array( 'signature' => 1 ) ); + + unset( $_mem['cache_content'], $_mem['cache_updated'] ); + + $results[ $id ]['_realPosts'] = $results[ $id ]['posts']; + $results[ $id ] = array_merge( $results[ $id ], $_mem ); + $results[ $id ]['posts'] = $results[ $id ]['_realPosts']; + } + } + } + + /* Generate 'dot' folder icon */ + if ( $this->settings['show_user_posted'] AND count( $topicIds ) ) + { + $this->DB->build( array( 'select' => 'author_id, topic_id', + 'from' => 'posts', + 'where' => 'queued=0 AND author_id=' . $this->memberData['member_id'] . ' AND topic_id IN(' . implode( ',', $topicIds ) . ')' ) ); + + $this->DB->execute(); + + while( $p = $this->DB->fetch() ) + { + $dots[ $p['topic_id'] ] = 1; + } + + /* Merge into results */ + foreach( $results as $id => $r ) + { + if ( isset( $dots[ $r['topic_id'] ] ) ) + { + $results[ $id ]['_hasPosted'] = 1; + } + } + } + + /* Got any deleted items */ + if ( count( $_sdTids ) ) + { + $sData = IPSDeleteLog::fetchEntries( $_sdTids, 'topic', false ); + + if ( count( $sData ) ) + { + foreach( $results as $id => $data ) + { + if ( isset( $_sdTids[ $data['tid'] ] ) ) + { + $results[ $id ]['sData'] = $sData[ $data['tid'] ]; + $results[ $id ]['permissions'] = $permissions; + } + } + } + } + + /* Got any deleted items */ + if ( count( $_sdPids ) ) + { + $sData = IPSDeleteLog::fetchEntries( $_sdPids, 'post', false ); + + if ( count( $sData ) ) + { + foreach( $results as $id => $data ) + { + if ( isset( $_sdPids[ $data['pid'] ] ) AND ! isset( $results[ $id ]['sData']) ) + { + $results[ $id ]['sData'] = $sData[ $data['pid'] ]; + $results[ $id ]['permissions'] = $permissions; + } + } + } + } + } + + return $results; + } + + /** + * Reassigns fields in a generic way for results output + * + * @param array $r + * @return array + */ + public function genericizeResults( $r ) + { + $r['app'] = 'forums'; + $r['content'] = $r['post']; + $r['content_title'] = $r['title']; + $r['updated'] = $r['post_date']; + $r['lastupdate'] = $r['last_post']; + $r['type_2'] = 'topic'; + $r['type_id_2'] = $r['tid']; + $r['misc'] = $r['pid']; + + return $r; + } +} \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/search/index.html b/upload/admin/applications/forums/extensions/search/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/forums/extensions/search/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/searchDisplay.php b/upload/admin/applications/forums/extensions/searchDisplay.php deleted file mode 100644 index b5c35db1..00000000 --- a/upload/admin/applications/forums/extensions/searchDisplay.php +++ /dev/null @@ -1,399 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class forumsSearchDisplay implements iSearchDisplay -{ - /** - * Last topic id completed - * - * @access private - * @var integer Topic id - */ - private $last_topic = 0; - - /** - * The search plugin for this app - * - * @access public - * @var object - */ - public $search_plugin; - - - /** - * Formats the forum search result for display - * - * @access public - * @param array $search_row Array of data from search_index - * @param bool $isVnc Is from view new content - * @return mixed Formatted content, ready for display, or array containing a $sub section flag, and content - **/ - public function formatContent( $search_row, $isVnc=false ) - { - /* Get class forums, used for displaying forum names on results */ - if( ipsRegistry::isClassLoaded('class_forums') !== TRUE ) - { - require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" ); - ipsRegistry::setClass( 'class_forums', new class_forums( ipsRegistry::instance() ) ); - ipsRegistry::getClass( 'class_forums' )->forumsInit(); - } - - /* Array */ - $search_row = $this->_buildOutputArray( $search_row ); - - /* Indent */ - $indent = ( $this->last_topic == $search_row['type_id_2'] ); - - $this->last_topic = $search_row['type_id_2']; - - /* Various data */ - $search_row['_last_post'] = $search_row['last_post']; - $search_row['_longTitle'] = $search_row['content_title']; - $search_row['_shortTitle'] = IPSText::truncate( $search_row['content_title'], 60 ); - $search_row['last_poster'] = $search_row['last_poster_id'] ? IPSLib::makeProfileLink( $search_row['last_poster_name'], $search_row['last_poster_id'], $search_row['seo_last_name'] ) : ipsRegistry::$settings['guest_name_pre'] . $search_row['last_poster_name'] . ipsRegistry::$settings['guest_name_suf']; - $search_row['starter'] = $search_row['starter_id'] ? IPSLib::makeProfileLink( $search_row['starter_name'], $search_row['starter_id'], $search_row['seo_first_name'] ) : $this->settings['guest_name_pre'] . $search_row['starter_name'] . $this->settings['guest_name_suf']; - //$search_row['posts'] = ipsRegistry::getClass('class_localization')->formatNumber( intval($search_row['posts']) ); - //$search_row['views'] = ipsRegistry::getClass('class_localization')->formatNumber( intval($search_row['views']) ); - $search_row['last_post'] = ipsRegistry::getClass( 'class_localization')->getDate( $search_row['last_post'], 'SHORT' ); - - if ( isset( $search_row['post_date'] ) ) - { - $search_row['_post_date'] = $search_row['post_date']; - $search_row['post_date'] = ipsRegistry::getClass( 'class_localization')->getDate( $search_row['post_date'], 'SHORT' ); - } - - if ( $this->memberData['is_mod'] ) - { - $search_row['posts'] += intval($search_row['topic_queuedposts']); - } - - if ($search_row['posts']) - { - if ( (($search_row['posts'] + 1) % ipsRegistry::$settings['display_max_posts']) == 0 ) - { - $pages = ($search_row['posts'] + 1) / ipsRegistry::$settings['display_max_posts']; - } - else - { - $number = ( ($search_row['posts'] + 1) / ipsRegistry::$settings['display_max_posts'] ); - $pages = ceil( $number); - } - } - - if ( $pages > 1 ) - { - for ( $i = 0 ; $i < $pages ; ++$i ) - { - $real_no = $i * ipsRegistry::$settings['display_max_posts']; - $page_no = $i + 1; - - if ( $page_no == 4 and $pages > 4 ) - { - $search_row['pages'][] = array( 'last' => 1, - 'st' => ($pages - 1) * ipsRegistry::$settings['display_max_posts'], - 'page' => $pages ); - break; - } - else - { - $search_row['pages'][] = array( 'last' => 0, - 'st' => $real_no, - 'page' => $page_no ); - } - } - } - - /* Format as a topic */ - if( $search_row['type_2'] == 'topic' ) - { - /* Forum Breadcrum */ - $search_row['_forum_trail'] = ipsRegistry::getClass( 'class_forums' )->forumsBreadcrumbNav( $search_row['forum_id'] ); - - /* Is it read? We don't support last_vote in search. */ - $is_read = ipsRegistry::getClass( 'classItemMarking' )->isRead( array( 'forumID' => $search_row['forum_id'], 'itemID' => $search_row['type_id_2'], 'itemLastUpdate' => $search_row['lastupdate'] ? $search_row['lastupdate'] : $search_row['updated'] ), 'forums' ); - - /* Has posted dot */ - $show_dots = ''; - - if( ipsRegistry::$settings['show_user_posted'] ) - { - if( ipsRegistry::member()->getProperty('member_id') && ( isset( $search_row['_topic_array'][$search_row['type_id_2']] ) && $search_row['_topic_array'][$search_row['type_id_2']] ) ) - { - $show_dots = 1; - } - } - - /* Icon */ - $search_row['_icon'] = ipsRegistry::getClass( 'class_forums' )->fetchTopicFolderIcon( $search_row, $show_dots, $is_read ); - $search_row['_isRead'] = $is_read; - - /* Display type */ - if ( $this->search_plugin->getShowAsForum() !== true ) - { - return array( ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->topicPostSearchResult( $search_row, $indent, ( $this->search_plugin->onlyTitles || $this->search_plugin->noPostPreview ) ? 1 : 0 ), $indent ); - } - else - { - return array( ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->topicPostSearchResultAsForum( $search_row, $indent, ( $this->search_plugin->onlyTitles || $this->search_plugin->noPostPreview ) ? 1 : 0 ), $indent ); - } - } - /* Format as a forum */ - else - { - return ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->forumSearchResult( $search_row, ( $this->search_plugin->onlyTitles || $this->search_plugin->noPostPreview ) ? 1 : 0 ); - } - } - - /** - * Internal function, used to sort out the pid and title - * - * @access private - * @param array $r Array of data - * @return array Formatted data, ready for output - **/ - private function _buildOutputArray( $r ) - { - if( $r['misc'] ) - { - $_data = unserialize( $r['misc'] ); - $r['misc'] = isset( $_data['pid'] ) && $_data['pid'] ? $_data['pid'] : $r['misc']; - $r['content_title'] = isset( $_data['title'] ) && $_data['title'] ? $_data['title'] : $r['content_title']; - } - - return $r; - } - - /** - * Retuns the html for displaying the forum category filter on the advanced search page - * - * @access public - * @return string Filter HTML - **/ - public function getFilterHTML() - { - /* Make sure class_forums is setup */ - if( ipsRegistry::isClassLoaded('class_forums') !== TRUE ) - { - require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" ); - ipsRegistry::setClass( 'class_forums', new class_forums( ipsRegistry::instance() ) ); - ipsRegistry::getClass( 'class_forums' )->strip_invisible = 1; - ipsRegistry::getClass( 'class_forums' )->forumsInit(); - } - - return ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->forumAdvancedSearchFilters( ipsRegistry::getClass( 'class_forums' )->buildForumJump( 0, 1 ) ); - } - - /** - * Returns an array used in the searchplugin's setCondition method - * - * @access public - * @param array $data Array of forums to view - * @return array Array with column, operator, and value keys, for use in the setCondition call - **/ - public function buildFilterSQL( $data ) - { - $return = array(); - - if( isset( $data ) && is_array( $data ) && count( $data ) ) - { - /* Load class_forums so that we can search sub forums automatically */ - if( ipsRegistry::isClassLoaded('class_forums') !== TRUE ) - { - require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/forums/class_forums.php' ); - ipsRegistry::setClass( 'class_forums', new class_forums( ipsRegistry::instance() ) ); - ipsRegistry::getClass( 'class_forums' )->forumsInit(); - } - - foreach( $data as $field => $_data ) - { - /* FORUMS */ - if ( $field == 'forums' && count( $data['forums'] ) ) - { - /* Get a list of child ids */ - foreach( $data['forums'] as $forum_id ) - { - $children = ipsRegistry::getClass( 'class_forums' )->forumsGetChildren( $forum_id ); - - foreach( $children as $kid ) - { - if( ! in_array( $kid, $data['forums'] ) ) - { - $data['forums'][] = $kid; - } - } - } - - # Handled in searchPlugin::buildWhereStatement - //$return[] = array( 'column' => 'type_id', 'operator' => 'IN', 'value' => implode( ',', $data['forums'] ) ); - } - - /* CONTENT ONLY */ - if ( $field == 'noPreview' AND $data['noPreview'] == 1 ) - { - $this->search_plugin->noPostPreview = true; - } - - /* CONTENT ONLY */ - if ( $field == 'contentOnly' AND $data['contentOnly'] == 1 ) - { - $this->search_plugin->onlyPosts = true; - } - - /* POST COUNT */ - if ( $field == 'pCount' AND intval( $data['pCount'] ) > 0 ) - { - $return[] = array( 'column' => 't.posts', 'operator' => '>=', 'value' => intval( $data['pCount'] ) ); - } - - /* TOPIC VIEWS */ - if ( $field == 'pViews' AND intval( $data['pViews'] ) > 0 ) - { - $return[] = array( 'column' => 't.views', 'operator' => '>=', 'value' => intval( $data['pViews'] ) ); - } - } - - return $return; - } - else - { - return ''; - } - } - - /** - * Modify the search query - * - * @access public - * @param array $query The current unmodified query - * @param bool [$count_only] Set to true if this is a count(*) query - * @return array Search query, modified by the plugin - **/ - public function modifySearchQuery( $query, $count_only=false ) - { - if( ipsRegistry::$settings['search_method'] == 'sphinx' ) - { - $query->SetFilter( 'approved', array( 1 ) ); - $query->SetFilter( 'queued' , array( 0 ) ); - $query->SetFilter( 'password', array( 0 ) ); - - if( isset( ipsRegistry::$request['search_app_filters']['forums']['forums'] ) && is_array( ipsRegistry::$request['search_app_filters']['forums']['forums'] ) && count( ipsRegistry::$request['search_app_filters']['forums']['forums'] ) ) - { - /* Load class_forums so that we can search sub forums automatically */ - if( ipsRegistry::isClassLoaded('class_forums') !== TRUE ) - { - require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/forums/class_forums.php' ); - ipsRegistry::setClass( 'class_forums', new class_forums( ipsRegistry::instance() ) ); - ipsRegistry::getClass( 'class_forums' )->forumsInit(); - } - - $forum_ids = array(); - - /* Get a list of child ids */ - foreach( ipsRegistry::$request['search_app_filters']['forums']['forums'] as $forum_id ) - { - if( $forum_id ) - { - $forum_ids[] = intval($forum_id); - - //$children = ipsRegistry::getClass( 'class_forums' )->forumsGetChildren( $forum_id ); - - //foreach( $children as $kid ) - //{ - // if( ! in_array( $kid, ipsRegistry::$request['search_app_filters']['forums'] ) ) - // { - // $forum_ids[] = $kid; - // } - //} - } - } - - if( is_array($forum_ids) AND count($forum_ids) ) - { - $query->SetFilter( 'forum_id', $forum_ids ); - } - } - - /* Limit by forum */ - $type = ipsRegistry::$request['type']; - $type_id = intval( ipsRegistry::$request['type_id'] ); - - if( $type && $type_id ) - { - $query->SetFilter( 'forum_id', array( $type_id ) ); - } - - /* Limit by topic */ - $type_2 = ipsRegistry::$request['type_2']; - $type_id_2 = intval( ipsRegistry::$request['type_id_2'] ); - - if( $type_2 && $type_id_2 ) - { - $query->SetFilter( 'tid', array( $type_id_2 ) ); - } - } - else - { - return $query; - } - } - - /** - * Run the search query. - * This allows us to set different indexes - * - * @access public - * @param object $sphinxClient The sphinx client reference - * @param string $search_term The search term - * @param bool $group_results Group posts by topic - * @return array Sphinx result array - **/ - public function runSearchQuery( $sphinxClient, $search_term='', $group_results=false ) - { - if( ipsRegistry::$settings['search_method'] == 'sphinx' ) - { - if( ipsRegistry::$request['content_title_only'] == 1 ) - { - return $sphinxClient->Query( $search_term, 'forums_search_topics_main,forums_search_topics_delta' ); - } - else - { - if( $group_results ) - { - $sphinxClient->SetGroupBy( 'tid', SPH_GROUPBY_ATTR, '@group DESC'); - } - - if( ipsRegistry::$request['f_content_only'] ) - { - return $sphinxClient->Query( $search_term, 'forums_search_posts_main,forums_search_posts_delta' ); - } - else - { - return $sphinxClient->Query( $search_term, 'forums_search_posts_main,forums_search_topics_main,forums_search_posts_delta,forums_search_topics_delta' ); - } - } - } - else - { - return array(); - } - } -} \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/searchPlugin.php b/upload/admin/applications/forums/extensions/searchPlugin.php deleted file mode 100644 index a0d747dc..00000000 --- a/upload/admin/applications/forums/extensions/searchPlugin.php +++ /dev/null @@ -1,1014 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class searchForumsPlugin implements iSearchIndexPlugin -{ - /** - * Database object - * - * @access private - * @var object - */ - private $DB; - - /** - * Date range restriction start - * - * @access private - * @var integer - */ - private $search_begin_timestamp = 0; - - /** - * Date range restriction end - * - * @access private - * @var integer - */ - private $search_end_timestamp = 0; - - /** - * Array of conditions for this search - * - * @access private - * @var array - */ - private $whereConditions = array(); - - /** - * Remove self from search results - * - * @access public - * @var boolean - */ - public $removeSelf = false; - - /** - * Do not join posts table on - * - * @access public - * @var boolean - */ - public $onlyTitles = false; - - /** - * Only search posts - * - * @access public - * @var boolean - */ - public $onlyPosts = false; - - /** - * Don't show post preview - * - * @access public - * @var boolean - */ - public $noPostPreview = false; - - /** - * Searching by/for author content - * - * @access public - * @var boolean - */ - public $searchAuthor = false; - - - /** - * Holds search results - * - * @access private - * @var array - */ - private $_results = array(); - - /** - * Holds DB resource - * - * @access private - * @var object - */ - private $_resultsDbResource = null; - - /** - * Set a hard limit for resources - * - * @access public - * @var int - */ - public $hardLimit = 200; - - /** - * Returns whether or not a resut set was hard limited - * - * @access public - * @var boolean - */ - public $resultsCutToLimit = false; - - /** - * Setup registry objects - * - * @access public - * @param object ipsRegistry $registry - * @return void - */ - public function __construct( ipsRegistry $registry ) - { - $this->registry = $registry; - $this->DB = $registry->DB(); - $this->member = $registry->member(); - $this->memberData =& $registry->member()->fetchMemberData(); - $this->settings =& $this->registry->fetchSettings(); - - /* Hard limit */ - $this->hardLimit = ( $this->settings['search_hardlimit'] ) ? $this->settings['search_hardlimit'] : 200; - } - - /** - * Get whether or not we're showing as forum or not - * - * @param public - * @return bool - */ - public function getShowAsForum() - { - return ( $this->memberData['bw_forum_result_type'] ) ? FALSE : TRUE; - } - - /** - * Set the begin timestamp - * - * @access public - * @param int - */ - public function setBeginTimeStamp( $time ) - { - $this->search_begin_timestamp = intval( $time ); - } - - /** - * Get the begin timestamp - * - * @access public - * @return int - */ - public function getBeginTimeStamp() - { - return intval( $this->search_begin_timestamp ); - } - - /** - * Custom search for view new content. Better optimized: Count - * - * @access public - * @return int - */ - public function viewNewPosts_count() - { - /* fetch the where statement */ - $where = $this->_viewNewPosts_where(); - - /* Fetch the count */ - $this->DB->build( array( 'select' => 'count(*) as total_results', - 'from' => 'topics t', - 'where' => $where ) ); - - $this->DB->execute(); - - $c = $this->DB->fetch(); - - return intval( $c['total_results'] ); - } - - /** - * Custom search for view new content. Better optimized: Fetch - * - * @access public - * @param array Limit array( x, rows ); - * @return int - */ - public function viewNewPosts_fetch( $limit=array() ) - { - /* fetch the where statement */ - $where = $this->_viewNewPosts_where(); - $entries = array(); - - /* Fetch the count */ - $this->DB->build( array( 'select' => 't.*', - 'from' => array( 'topics' => 't' ), - 'where' => $where, - 'add_join' => array( array( 'select' => 'p.*', - 'from' => array( 'posts' => 'p' ), - 'where' => 'p.pid=t.topic_firstpost', - 'type' => 'left' ), - array( 'select' => 'm.members_display_name, m.members_seo_name, m.member_id', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=p.author_id', - 'type' => 'left' ) ), - 'order' => 't.last_post DESC', - 'limit' => $limit ) ); - - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - if ( is_array( $this->registry->class_forums->forum_by_id[ $row['forum_id'] ] ) ) - { - $row = array_merge( $this->registry->class_forums->forum_by_id[ $row['forum_id'] ], $row ); - } - - /* Reassign stuff to match the search_index */ - $entries[] = $this->formatFieldsForIndex( $row ); - } - - return $entries; - } - - /** - * Builds a where statement for get new posts - * - * @access private - * @return int - */ - private function _viewNewPosts_where() - { - /* Loop through the forums and build a list of forums we're allowed access to */ - $where = array(); - $forumIdsOk = array(); - $skipTopics = array(); - $bvnp = explode( ',', $this->settings['vnp_block_forums'] ); - - /* Get list of good forum IDs */ - $forumIdsOk = $this->registry->class_forums->fetchSearchableForumIds( $this->memberData['member_id'], $bvnp ); - - $forumIdsOk = ( count( $forumIdsOk ) ) ? $forumIdsOk : array( 0 => 0 ); - $where[] = "t.forum_id IN (" . implode( ",", $forumIdsOk ) . ")"; - - /* Generate last post times */ - if ( ! $this->memberData['bw_vnc_type'] ) - { - $where[] = "t.last_post > " . IPSLib::fetchHighestNumber( array( intval( $this->memberData['_cache']['gb_mark__forums'] ), intval( $this->memberData['last_visit'] ) ) ); - } - else - { - $_or = array(); - - foreach( $this->registry->class_forums->forum_by_id as $forumId => $forumData ) - { - $lastMarked = intval( $this->registry->getClass('classItemMarking')->fetchTimeLastMarked( array( 'forumID' => $forumId ), 'forums' ) ); - $readItems = $this->registry->getClass('classItemMarking')->fetchReadIds( array( 'forumID' => $forumId ), 'forums' ); - - if ( is_array( $readItems ) AND count( $readItems ) ) - { - foreach( $readItems as $tid ) - { - /* Sometimes 0 is contained in the array... skip it! */ - if ( !$tid ) - { - continue; - } - - $_thisLastMarked = $this->registry->classItemMarking->fetchTimeLastMarked( array( 'forumID' => $forumId, 'itemID' => $tid ), 'forums' ); - - /* Store array of topics for further checking */ - $skipTopics[] = "( t.tid <> {$tid} OR ( t.tid={$tid} AND t.last_post > {$_thisLastMarked} ) )"; - } - } - - if( count($skipTopics) ) - { - $_or[] = "(t.forum_id={$forumId} AND (" . implode( " OR ", $skipTopics ) . ") AND t.last_post > " . $lastMarked . ")"; - } - else - { - $_or[] = "(t.forum_id={$forumId} AND t.last_post > " . $lastMarked . ")"; - } - } - - if ( count( $_or ) ) - { - $where[] = '(' . implode( " OR ", $_or ) . ')'; - } - } - - /* Add in last bits */ - $where[] = "t.state != 'link'"; - $where[] = "t.approved=1"; - - return implode( " AND ", $where ); - } - - /** - * Performs search and returns an array of results - * - * @access public - * @param string $search_term - * @param array $limit_clause The erray should be array( begin, end ) - * @param string $sort_by Column to sort by - * @param string $group_by Column to group by - * @param bool $content_title_only Only search title records - * @return array - */ - public function getSearchResults( $search_term, $limit_clause, $sort_by, $group_by='', $content_title_only=false, $sort_order='' ) - { - /* Got our resource? */ - if ( $this->_resultsDbResource === null ) - { - return array(); - } - - /* Build result array */ - $rows = array(); - $members = array(); - $count = 0; - $got = 0; - - while( $r = $this->DB->fetch( $this->_resultsDbResource ) ) - { - $count++; - - if ( $limit_clause[0] AND $limit_clause[0] >= $count ) - { - continue; - } - - /* Got author but no member data? */ - if ( ! empty( $r['author_id'] ) AND empty( $r['members_display_name'] ) ) - { - $members[ $r['author_id'] ] = $r['author_id']; - } - - /* Reassign stuff to match the search_index */ - $rows[ $got ] = $this->formatFieldsForIndex( $r ); - $got++; - - /* Done? */ - if ( $limit_clause[1] AND $got >= $limit_clause[1] ) - { - break; - } - } - - /* Need to load members? */ - if ( count( $members ) ) - { - $mems = IPSMember::load( $members, 'all' ); - - foreach( $rows as $id => $r ) - { - if ( ! empty( $r['author_id'] ) AND isset( $mems[ $r['author_id'] ] ) ) - { - unset( $mems[ $r['author_id'] ]['posts'] ); - unset( $mems[ $r['author_id'] ]['last_post'] ); - $rows[ $id ] = array_merge( $rows[ $id ], $mems[ $r['author_id'] ] ); - } - } - } - - return $rows; - } - - /** - * Performs live search and returns an array of results - * NOT AVAILABLE IN BASIC SEARCH - * - * @access public - * @param string $search_term - * @return array - */ - public function getLiveSearchResults( $search_term ) - { - return array(); - } - - /** - * Returns the total number of results the search will return - * - * @access public - * @param string $search_term Search term - * @param string $group_by Column to group by - * @param bool $content_title_only Only search title records - * @return integer - */ - public function getSearchCount( $search_term, $group_by='', $content_title_only=false, $limit=array(), $sort_by='', $sort_order='' ) - { - /* Reset */ - $this->_results = array(); - $this->_resultsDbResource = ''; - - /* Limit to 1000 items, store the data in PHP. Quite simples */ - $order_dir = ( $sort_order == 'asc' ) ? 'asc' : 'desc'; - - /* Sort By */ - if( in_array( $sort_by, array( 'date', 'relevance' ) ) ) - { - $order = $sort_by == 'date' ? ( $content_title_only ? 't.last_post ' . $order_dir : 'p.post_date ' . $order_dir ) : ( ipsRegistry::$settings['use_fulltext'] ? 'ranking ' . $order_dir : ( $content_title_only ? 't.last_post ' . $order_dir : 'p.post_date ' . $order_dir ) ); - } - else - { - $order = ipsRegistry::$settings['use_fulltext'] ? 'ranking DESC' : ( $content_title_only ? 't.last_post' : 'p.post_date DESC' ); - } - - /* If there is no search term, we need to force search by updated */ - if( ! $search_term ) - { - $order = $content_title_only ? 't.last_post ' . $order_dir : 'p.post_date ' . $order_dir; - } - - if ( $this->noPostPreview ) - { - $group_by = 'p.topic_id'; - } - else - { - if( $group_by ) - { - $group_by = 'p.' . $group_by; - } - else if( $this->onlyTitles ) - { - $group_by = 'p.topic_id'; - } - } - - /* Search in titles */ - if( $content_title_only ) - { - /* Ranking */ - $ranking_select = ( $search_term AND ipsRegistry::$settings['use_fulltext'] AND $sort_by == 'relevance' ) ? ", " . $this->DB->buildSearchStatement( 't.title', $search_term, true, true ) : ''; - - /* Do the search */ - $this->DB->build( array( - 'select' => "t.*{$ranking_select}", - 'from' => array( 'topics' => 't' ), - 'where' => $this->_buildWhereStatement( $search_term, $content_title_only, $order ), - 'limit' => array(0, $this->hardLimit + 1), - 'order' => $order, - 'add_join' => array( - array( - 'select' => 'p.*', - 'from' => array( 'posts' => 'p' ), - 'where' => 'p.pid=t.topic_firstpost', - 'type' => 'left', - ), - array( - 'select' => 'm.members_display_name, m.members_seo_name, m.member_id', - 'from' => array( 'members' => 'm' ), - 'where' => "m.member_id=p.author_id", - 'type' => 'left', - ), - array( - 'select' => 'f.id as forum_id', - 'from' => array( 'forums' => 'f' ), - 'where' => 'f.id=t.forum_id', - 'type' => 'left', - ), - ) - ) ); - } - /* Search in posts and titles */ - else - { - /* Ranking */ - $ranking_select = ( $search_term AND ipsRegistry::$settings['use_fulltext'] AND $sort_by == 'relevance' ) ? ", " . $this->DB->buildSearchStatement( 'p.post', $search_term, true, true ) : ''; - - /* Do the search */ - $this->DB->build( array( - 'select' => "p.*" . $ranking_select, - 'from' => array( 'posts' => 'p' ), - 'where' => $this->_buildWhereStatement( $search_term, $content_title_only, $order, null, ( $this->onlyPosts || $this->searchAuthor ) ? false : true ), - 'limit' => array(0, $this->hardLimit + 1), - 'order' => $order, - 'group' => $group_by, - 'add_join' => array( - array( - 'select' => 't.*', - 'from' => array( 'topics' => 't' ), - 'where' => 't.tid=p.topic_id', - 'type' => 'left', - ) ) - ) ); - } - - $this->_resultsDbResource = $this->DB->execute(); - - /* Fetch count */ - $count = intval( $this->DB->getTotalRows( $this->_resultsDbResource ) ); - - if ( $count > $this->hardLimit ) - { - $count = $this->hardLimit; - $this->resultsCutToLimit = true; - } - - /* Return it */ - return $count; - } - - /** - * Restrict the date range that the search is performed on - * - * @access public - * @param int $begin Start timestamp - * @param int [$end] End timestamp - * @return void - */ - public function setDateRange( $begin, $end=0 ) - { - $this->search_begin_timestamp = $begin; - $this->search_end_timestamp = $end; - } - - /** - * mySQL function for adding special search conditions - * - * @access public - * @param string $column sql table column for this condition - * @param string $operator Operation to perform for this condition, ex: =, <>, IN, NOT IN - * @param mixed $value Value to check with - * @param string $comp Comparison type - * @return void - */ - public function setCondition( $column, $operator, $value, $comp='AND' ) - { - /* Remap */ - $column = $column == 'member_id' ? ( $this->onlyTitles ? 't.starter_id' : 'p.author_id' ) : $column; - $column = $column == 'content_title' ? 't.title' : $column; - $column = $column == 'type_id' ? 't.forum_id' : $column; - - if( $column == 'app' ) - { - return; - } - - /* Build the condition based on operator */ - switch( strtoupper( $operator ) ) - { - case 'IN': - case 'NOT IN': - $this->whereConditions[$comp][] = "{$column} {$operator} ( {$value} )"; - break; - - default: - $this->whereConditions[$comp][] = "{$column} {$operator} {$value}"; - break; - } - } - - /** - * Allows you to specify multiple conditions that are chained together - * - * @access public - * @param array $conditions Array of conditions, each element has 3 keys: column, operator, value, see the setCondition function for information on each - * @param string $inner_comp Comparison operator to use inside the chain - * @param string $outer_comp Comparison operator to use outside the chain - * @return void - */ - public function setMultiConditions( $conditions, $inner_comp='OR', $outer_comp='AND' ) - { - /* Loop through the conditions to build the statement */ - $_temp = array(); - - foreach( $conditions as $r ) - { - /* REMAP */ - $r['column'] = $r['column'] == 'type_id' ? 't.forum_id' : $r['column']; - - if( $r['column'] == 'app' ) - { - continue; - } - - switch( strtoupper( $r['operator'] ) ) - { - case 'IN': - case 'NOT IN': - $_temp[] = "{$r['column']} {$r['operator']} ( {$r['value']} )"; - break; - - default: - $_temp[] = "{$r['column']} {$r['operator']} {$r['value']}"; - break; - } - } - - $this->whereConditions[$outer_comp][] = '( ' . implode( $_temp, ' ' . $inner_comp . ' ' ) . ' ) '; - } - - /** - * Set search conditions for "View unread content" - * - * @access public - * @return void - */ - public function setUnreadConditions() - { - $forum_conditions = array(); - - foreach( ipsRegistry::getClass('class_forums')->forum_by_id as $forumId => $forumData ) - { - $lastMarked = ipsRegistry::getClass('classItemMarking')->fetchTimeLastMarked( array( 'forumID' => $forumId ), 'forums' ); - - $readItems = ipsRegistry::getClass('classItemMarking')->fetchReadIds( array( 'forumID' => $forumId ), 'forums' ); - $readItems = ( is_array( $readItems ) AND count( $readItems ) ) ? $readItems : array(); - - if( count($readItems) ) - { - $this->whereConditions['OR'][] = "(t.forum_id={$forumId} AND t.tid NOT IN(" . implode( ",", $readItems ) . ") AND t.last_post > " . intval($lastMarked) . ")"; - } - else - { - $this->whereConditions['OR'][] = "(t.forum_id={$forumId} AND t.last_post > " . intval($lastMarked) . ")"; - } - } - } - - /** - * Builds the where portion of a search string - * - * @access private - * @param string $search_term The string to use in the search - * @param bool $content_title_only Search only title records - * @param string $order Order by data - * @param bool $onlyPosts Enforce posts only - * @param bool $noForums Don't check forums that posts are in - * @return string - **/ - private function _buildWhereStatement( $search_term, $content_title_only=false, $order='', $onlyPosts=null, $noForums=false ) - { - /* INI */ - $where_clause = array(); - $onlyPosts = ( $onlyPosts !== null ) ? $onlyPosts : $this->onlyPosts; - - /* Loop through the forums and build a list of forums we're allowed access to */ - $forumIdsOk = array(); - $forumIdsBad = array(); - - if ( ! empty( ipsRegistry::$request['search_app_filters']['forums']['forums'] ) AND count( ipsRegistry::$request['search_app_filters']['forums']['forums'] ) ) - { - foreach( ipsRegistry::$request['search_app_filters']['forums']['forums'] as $forum_id ) - { - if( $forum_id ) - { - $data = $this->registry->class_forums->forum_by_id[ $forum_id ]; - - /* Check for sub forums */ - $children = ipsRegistry::getClass( 'class_forums' )->forumsGetChildren( $forum_id ); - - foreach( $children as $kid ) - { - if( ! in_array( $kid, ipsRegistry::$request['search_app_filters']['forums']['forums'] ) ) - { - if( ! $this->registry->permissions->check( 'read', $this->registry->class_forums->forum_by_id[ $kid ] ) ) - { - $forumIdsBad[] = $kid; - continue; - } - - /* Can read, but is it password protected, etc? */ - if ( ! $this->registry->class_forums->forumsCheckAccess( $kid, 0, 'forum', array(), true ) ) - { - $forumIdsBad[] = $kid; - continue; - } - - if ( ! $this->registry->class_forums->forum_by_id[ $kid ]['sub_can_post'] OR ! $this->registry->class_forums->forum_by_id[ $kid ]['can_view_others'] ) - { - $forumIdsBad[] = $kid; - continue; - } - - $forumIdsOk[] = $kid; - } - } - - /* Can we read? */ - if ( ! $this->registry->permissions->check( 'view', $data ) ) - { - $forumIdsBad[] = $forum_id; - continue; - } - - /* Can read, but is it password protected, etc? */ - if ( ! $this->registry->class_forums->forumsCheckAccess( $forum_id, 0, 'forum', array(), true ) ) - { - $forumIdsBad[] = $forum_id; - continue; - } - - if ( ! $data['sub_can_post'] OR ! $data['can_view_others'] ) - { - $forumIdsBad[] = $forum_id; - continue; - } - - $forumIdsOk[] = $forum_id; - } - } - } - - if( !count($forumIdsOk) ) - { - /* Get list of good forum IDs */ - $forumIdsOk = $this->registry->class_forums->fetchSearchableForumIds(); - } - - /* Add allowed forums */ - if ( $noForums !== true ) - { - $forumIdsOk = ( count( $forumIdsOk ) ) ? $forumIdsOk : array( 0 => 0 ); - $where_clause[] = "t.forum_id IN (" . implode( ",", $forumIdsOk ) . ")"; - } - - /* Exclude some items */ - if( ! $this->memberData['g_is_supmod'] ) - { - $author = $content_title_only ? "t.starter_id=" . $this->memberData['member_id'] : "p.author_id=" . $this->memberData['member_id']; - - /* No hidden topics, or topics in password protected forums */ - $where_clause[] = 't.approved=1'; - - if( !$content_title_only ) - { - $where_clause[] = 'p.queued=0'; - } - } - - if( $search_term ) - { - $search_term = str_replace( '"', '"', $search_term ); - - if( $content_title_only ) - { - $where_clause[] = $this->DB->buildSearchStatement( 't.title', $search_term, true, false, ipsRegistry::$settings['use_fulltext'] ); - } - else - { - if ( $onlyPosts ) - { - $where_clause[] = $this->DB->buildSearchStatement( 'p.post', $search_term, true, false, ipsRegistry::$settings['use_fulltext'] ); - } - else - { - /* Find topic ids that match */ - $tids = array( 0 => 0 ); - $pids = array( 0 => 0 ); - - /* Determine ranking */ - $tr = ( $search_term AND ipsRegistry::$settings['use_fulltext'] AND strstr( $order, 'ranking' ) ) ? ", " . $this->DB->buildSearchStatement( 't.title', $search_term, true, true ) : ''; - $pr = ( $search_term AND ipsRegistry::$settings['use_fulltext'] AND strstr( $order, 'ranking' ) ) ? ", " . $this->DB->buildSearchStatement( 't.title', $search_term, true, true ) : ''; - - $this->DB->build( array( - 'select' => "t.tid, t.last_post, t.forum_id" . $tr, - 'from' => 'topics t', - 'where' => str_replace( 'p.author_id', 't.starter_id', $this->_buildWhereStatement( $search_term, true, $order, null ) ), - 'limit' => array(0, $this->hardLimit), - 'order' => str_replace( 'p.post_date', 't.last_post', $order ) ) ); - - $i = $this->DB->execute(); - - while( $row = $this->DB->fetch( $i ) ) - { - $tids[] = $row['tid']; - } - - /* Now get the Pids */ - if ( count( $tids ) > 1 ) - { - $this->DB->build( array( - 'select' => 'pid', - 'from' => 'posts', - 'where' => 'topic_id IN ('. implode( ',', $tids ) . ') AND new_topic=1' ) ); - - $i = $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - $pids[ $row['pid'] ] = $row['pid']; - } - } - - $this->DB->build( array( - 'select' => "p.pid, p.queued" . $pr, - 'from' => array( 'posts' => 'p' ), - 'where' => $this->_buildWhereStatement( $search_term, false, $order, true ), - 'limit' => array(0, $this->hardLimit), - 'order' => $order, - 'add_join' => array( array( 'select' => 't.approved, t.forum_id', - 'from' => array( 'topics' => 't' ), - 'where' => 'p.topic_id=t.tid', - 'type' => 'left' ) ) ) ); - - $i = $this->DB->execute(); - - while( $row = $this->DB->fetch( $i ) ) - { - $pids[ $row['pid'] ] = $row['pid']; - } - - $where_clause[] = '( p.pid IN (' . implode( ',', $pids ) .') )'; - } - } - } - - /* Limit by forum */ - $type = ipsRegistry::$request['type']; - $type_id = intval( ipsRegistry::$request['type_id'] ); - - if( $type && $type_id ) - { - $where_clause[] = "t.forum_id={$type_id}"; - } - - /* Limit by topic */ - $type_2 = ipsRegistry::$request['type_2']; - $type_id_2 = intval( ipsRegistry::$request['type_id_2'] ); - - if( $type_2 && $type_id_2 ) - { - $where_clause[] = $content_title_only ? "t.tid={$type_id_2}" : "p.topic_id={$type_id_2}"; - } - - /* No moved topic links */ - $where_clause[] = "t.state != 'link'"; - - /* Date Restrict */ - - if( $this->search_begin_timestamp && $this->search_end_timestamp ) - { - $where_clause[] = $this->DB->buildBetween( $content_title_only ? "t.last_post" : "p.post_date", $this->search_begin_timestamp, $this->search_end_timestamp ); - } - else - { - if( $this->search_begin_timestamp ) - { - $where_clause[] = $content_title_only ? "t.last_post > {$this->search_begin_timestamp}" : "p.post_date > {$this->search_begin_timestamp}"; - } - - if( $this->search_end_timestamp ) - { - $where_clause[] = $content_title_only ? "t.last_post < {$this->search_end_timestamp}" : "p.post_date < {$this->search_end_timestamp}"; - } - } - - /* Add in AND where conditions */ - if( isset( $this->whereConditions['AND'] ) && count( $this->whereConditions['AND'] ) ) - { - $where_clause = array_merge( $where_clause, $this->whereConditions['AND'] ); - } - - /* ADD in OR where conditions */ - if( isset( $this->whereConditions['OR'] ) && count( $this->whereConditions['OR'] ) ) - { - $where_clause[] = '( ' . implode( ' OR ', $this->whereConditions['OR'] ) . ' )'; - } - - /* Build and return the string */ - return implode( " AND ", $where_clause ); - } - - /** - * Reassigns fields in a way the index exepcts - * - * @param array $r - * @return array - **/ - public function formatFieldsForIndex( $r ) - { - $r['app'] = 'forums'; - $r['content'] = $r['post']; - $r['content_title'] = $r['title']; - $r['updated'] = $r['post_date']; - $r['lastupdate'] = $r['last_post']; - $r['type_2'] = 'topic'; - $r['type_id_2'] = $r['tid']; - $r['misc'] = $r['pid']; - - return $r; - } - - /** - * This function grabs the actual results for display - * - * @param array $ids - * @return query result - **/ - public function getResultsForSphinx( $ids ) - { - if( ipsRegistry::$request['content_title_only'] == 1 ) - { - $this->DB->build( array( - 'select' => "t.*", - 'from' => array( 'topics' => 't' ), - 'where' => 't.tid IN( ' . implode( ',', $ids ) . ')', - 'order' => 't.last_post DESC', - 'add_join' => array( - array( - 'select' => 'p.*', - 'from' => array( 'posts' => 'p' ), - 'where' => 'p.pid=t.topic_firstpost', - 'type' => 'left', - ), - array( - 'from' => array( 'forums' => 'f' ), - 'where' => 'f.id=t.forum_id', - 'type' => 'left', - ), - array( - 'select' => 'm.member_id, m.members_display_name, m.members_seo_name', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=p.author_id', - 'type' => 'left', - ), - ) - ) ); - } - else - { - $this->DB->build( array( - 'select' => "p.*", - 'from' => array( 'posts' => 'p' ), - 'where' => 'p.pid IN( ' . implode( ',', $ids ) . ')', - 'order' => 'p.post_date DESC', - 'add_join' => array( - array( - 'select' => 't.*', - 'from' => array( 'topics' => 't' ), - 'where' => 't.tid=p.topic_id', - 'type' => 'left', - ), - array( - 'from' => array( 'forums' => 'f' ), - 'where' => 'f.id=t.forum_id', - 'type' => 'left', - ), - array( - 'select' => 'm.member_id, m.members_display_name, m.members_seo_name', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=p.author_id', - 'type' => 'left', - ), - ) - ) ); - } - - return $this->DB->execute(); - } - - /** - * Gets the name of the field this search index uses for dates.... >_< - * - * @return string - **/ - public function getDateField() - { - if( ipsRegistry::$request['content_title_only'] == 1 ) - { - return 'last_post'; - } - else - { - return 'post_date'; - } - } - - /** - * Gets field names for other conditions - * - * @param string Column - * @return string - **/ - public function getConditionField( $column ) - { - switch( $column ) - { - case 'member_id': - return 'author_id'; - break; - } - - return $column; - } -} \ No newline at end of file diff --git a/upload/admin/applications/forums/extensions/sphinxTemplate.php b/upload/admin/applications/forums/extensions/sphinxTemplate.php index b59b0255..483fef81 100644 --- a/upload/admin/applications/forums/extensions/sphinxTemplate.php +++ b/upload/admin/applications/forums/extensions/sphinxTemplate.php @@ -1,171 +1,104 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -$appSphinxTemplate = <<cache_store VALUES( 'sphinx_forums_counter_posts', (SELECT max(pid) FROM posts), '', 0, UNIX_TIMESTAMP() ) - - # Query posts for the main source - sql_query = SELECT p.pid, p.pid as search_id, p.author_id, p.post_date, p.post, p.topic_id, p.queued, \ - t.tid, t.forum_id, t.approved, \ - REPLACE( pi.perm_view, '*', 0 ) as perm_view, \ - CASE WHEN pi.authorized_users IS NULL OR pi.authorized_users='' THEN 0 ELSE pi.authorized_users END AS authorized_users, \ - CASE WHEN pi.friend_only=0 THEN 0 ELSE p.author_id END AS friend_only, \ - CASE WHEN pi.owner_only=0 THEN 0 ELSE p.author_id END AS owner_only, \ - CASE WHEN f.password <> '' THEN 1 ELSE 0 END AS password \ - FROM posts p \ - LEFT JOIN topics t ON ( p.topic_id=t.tid ) \ - LEFT JOIN forums f ON ( t.forum_id=f.id ) \ - LEFT JOIN permission_index pi ON ( pi.perm_type_id=t.forum_id AND pi.perm_type='forum' ) - - # Fields - sql_attr_bool = queued - sql_attr_bool = approved - sql_attr_uint = search_id - sql_attr_uint = friend_only - sql_attr_uint = forum_id - sql_attr_uint = owner_only - sql_attr_timestamp = post_date - sql_attr_multi = uint perm_view from field - sql_attr_multi = uint authorized_users from field - sql_attr_bool = password - sql_attr_uint = author_id - sql_attr_uint = tid - - sql_ranged_throttle = 0 -} - -source forums_search_topics_main : ipb_source_config -{ - # Set our forum PID counter - sql_query_pre = REPLACE INTO cache_store VALUES( 'sphinx_forums_counter_topics', (SELECT max(tid) FROM topics), '', 0, UNIX_TIMESTAMP() ) - - # Query posts for the main source - sql_query = SELECT t.tid, t.tid as search_id, t.forum_id, t.approved, t.title, t.last_post, t.last_poster_id as author_id, \ - REPLACE( pi.perm_view, '*', 0 ) as perm_view, \ - CASE WHEN pi.authorized_users IS NULL OR pi.authorized_users='' THEN 0 ELSE pi.authorized_users END AS authorized_users, \ - CASE WHEN pi.friend_only=0 THEN 0 ELSE t.last_poster_id END AS friend_only, \ - CASE WHEN pi.owner_only=0 THEN 0 ELSE t.last_poster_id END AS owner_only, \ - CASE WHEN f.password <> '' THEN 1 ELSE 0 END AS password \ - FROM topics t \ - LEFT JOIN forums f ON ( t.forum_id=f.id ) \ - LEFT JOIN permission_index pi ON ( pi.perm_type_id=t.forum_id AND pi.perm_type='forum' ) - - # Fields - sql_attr_bool = approved - sql_attr_uint = search_id - sql_attr_uint = friend_only - sql_attr_uint = forum_id - sql_attr_uint = owner_only - sql_attr_timestamp = last_post - sql_attr_multi = uint perm_view from field - sql_attr_multi = uint authorized_users from field - sql_attr_bool = password - sql_attr_uint = author_id - - sql_ranged_throttle = 0 -} - -source forums_search_posts_delta : forums_search_posts_main -{ - # Override the base sql_query_pre - sql_query_pre = - - # Query posts for the delta source - sql_query = SELECT p.pid, p.pid as search_id, p.author_id, p.post_date, p.post, p.topic_id, p.queued, \ - t.tid, t.forum_id, t.approved, t.title, \ - REPLACE( pi.perm_view, '*', 0 ) as perm_view, \ - CASE WHEN pi.authorized_users IS NULL OR pi.authorized_users='' THEN 0 ELSE pi.authorized_users END AS authorized_users, \ - CASE WHEN pi.friend_only=0 THEN 0 ELSE p.author_id END AS friend_only, \ - CASE WHEN pi.owner_only=0 THEN 0 ELSE p.author_id END AS owner_only, \ - CASE WHEN f.password <> '' THEN 1 ELSE 0 END AS password \ - FROM posts p \ - LEFT JOIN topics t ON ( p.topic_id=t.tid ) \ - LEFT JOIN forums f ON ( t.forum_id=f.id ) \ - LEFT JOIN permission_index pi ON ( pi.perm_type_id=t.forum_id AND pi.perm_type='forum' ) \ - WHERE p.pid > ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_forums_counter_posts' ) -} - -source forums_search_topics_delta : forums_search_topics_main -{ - # Override the base sql_query_pre - sql_query_pre = - - # Query posts for the delta source - sql_query = SELECT t.tid, t.tid as search_id, t.forum_id, t.approved, t.title, t.last_post, t.last_poster_id as author_id, \ - REPLACE( pi.perm_view, '*', 0 ) as perm_view, \ - CASE WHEN pi.authorized_users IS NULL OR pi.authorized_users='' THEN 0 ELSE pi.authorized_users END AS authorized_users, \ - CASE WHEN pi.friend_only=0 THEN 0 ELSE t.last_poster_id END AS friend_only, \ - CASE WHEN pi.owner_only=0 THEN 0 ELSE t.last_poster_id END AS owner_only, \ - CASE WHEN f.password <> '' THEN 1 ELSE 0 END AS password \ - FROM topics t \ - LEFT JOIN forums f ON ( t.forum_id=f.id ) \ - LEFT JOIN permission_index pi ON ( pi.perm_type_id=t.forum_id AND pi.perm_type='forum' ) \ - WHERE t.tid > ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_forums_counter_topics' ) -} - -index forums_search_posts_main -{ - source = forums_search_posts_main - path = /forums_search_posts_main - - docinfo = extern - mlock = 0 - morphology = none - min_word_len = 2 - charset_type = sbcs - html_strip = 0 -} - -index forums_search_posts_delta : forums_search_posts_main -{ - source = forums_search_posts_delta - path = /forums_search_posts_delta -} - -index forums_search_topics_main -{ - source = forums_search_topics_main - path = /forums_search_topics_main - - docinfo = extern - mlock = 0 - morphology = none - min_word_len = 2 - charset_type = sbcs - html_strip = 0 -} - -index forums_search_topics_delta : forums_search_topics_main -{ - source = forums_search_topics_delta - path = /forums_search_topics_delta -} - - -EOF; + + * Invision Power Services + * IP.Board v3.1.4 + * Sphinx template file + * Last Updated: $Date: 2010-10-28 12:07:41 -0400 (Thu, 28 Oct 2010) $ + * + * + * @author $Author: mmecham $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 7063 $ + * @since 3.0.0 + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +$appSphinxTemplate = <<cache_store VALUES( 'sphinx_forums_counter_posts', (SELECT max(pid) FROM posts), '', 0, UNIX_TIMESTAMP() ) + + # Query posts for the main source + sql_query = SELECT p.pid, p.pid as search_id, p.author_id, p.post_date, p.post, p.topic_id, p.queued, \ + t.tid, t.title, t.title as tordinal, t.views, t.posts, t.forum_id, t.last_post, t.state, t.start_date, t.starter_id, t.last_poster_id, t.topic_firstpost, \ + CASE WHEN t.approved = -1 THEN 1 ELSE 0 END AS soft_deleted, \ + CASE WHEN t.approved = -1 THEN 0 ELSE t.approved END AS approved, \ + CONCAT(t.last_post, '.', t.tid ) as last_post_group \ + FROM posts p \ + LEFT JOIN topics t ON ( p.topic_id=t.tid ) + + # Fields + sql_attr_uint = queued + sql_attr_uint = approved + sql_attr_uint = soft_deleted + sql_attr_uint = search_id + sql_attr_uint = forum_id + sql_attr_timestamp = post_date + sql_attr_timestamp = last_post + sql_attr_timestamp = start_date + sql_attr_uint = author_id + sql_attr_uint = starter_id + sql_attr_uint = tid + sql_attr_uint = posts + sql_attr_uint = views + sql_attr_str2ordinal = tordinal + sql_attr_str2ordinal = last_post_group + + sql_ranged_throttle = 0 +} + +source forums_search_posts_delta : forums_search_posts_main +{ + # Override the base sql_query_pre + sql_query_pre = + + # Query posts for the delta source + sql_query = SELECT p.pid, p.pid as search_id, p.author_id, p.post_date, p.post, p.topic_id, p.queued, \ + t.tid, t.title, t.title as tordinal, t.views, t.posts, t.forum_id, t.last_post, t.state, t.start_date, t.starter_id, t.last_poster_id, t.topic_firstpost, \ + CASE WHEN t.approved = -1 THEN 1 ELSE 0 END AS soft_deleted, \ + CASE WHEN t.approved = -1 THEN 0 ELSE t.approved END AS approved, \ + CONCAT(t.last_post, '.', t.tid ) as last_post_group \ + FROM posts p \ + LEFT JOIN topics t ON ( p.topic_id=t.tid ) \ + WHERE p.pid > ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_forums_counter_posts' ) +} + +index forums_search_posts_main +{ + source = forums_search_posts_main + path = /forums_search_posts_main + + docinfo = extern + mlock = 0 + morphology = none + min_word_len = 2 + charset_type = sbcs + html_strip = 0 + #infix_fields = post, title + #min_infix_len = 3 + #enable_star = 1 +} + +index forums_search_posts_delta : forums_search_posts_main +{ + source = forums_search_posts_delta + path = /forums_search_posts_delta +} + + +EOF; diff --git a/upload/admin/applications/forums/extensions/usercpForms.php b/upload/admin/applications/forums/extensions/usercpForms.php index 4d0e3643..e165937d 100644 --- a/upload/admin/applications/forums/extensions/usercpForms.php +++ b/upload/admin/applications/forums/extensions/usercpForms.php @@ -1,1436 +1,1383 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class usercpForms_forums extends public_core_usercp_manualResolver implements interface_usercp -{ - /** - * Tab name - * This can be left blank and the application title will - * be used - * - * @access public - * @var string Tab name - */ - public $tab_name = "Форумы"; - - /** - * OK Message - * This is an optional message to return back to the framework - * to replace the standard 'Settings saved' message - * - * @access public - * @var string "Done" message to display - */ - public $ok_message = ''; - - /** - * Hide 'save' button and form elements - * Useful if you have custom output that doesn't - * require it - * - * @access public - * @var bool Hide the form/save button - */ - public $hide_form_and_save_button = false; - - /** - * If you wish to allow uploads, set a value for this - * - * @access public - * @var integer - */ - public $uploadFormMax = 0; - - /** - * Initiate this module - * - * @access public - * @return void - */ - public function init() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $this->request['st'] = intval( $this->request['st'] ); - - //----------------------------------------- - // Make sure we have values - //----------------------------------------- - - if ( $this->settings['postpage_contents'] == "" ) - { - $this->settings['postpage_contents'] = '5,10,15,20,25,30,35,40'; - } - - if ( $this->settings['topicpage_contents'] == "" ) - { - $this->settings['topicpage_contents'] = '5,10,15,20,25,30,35,40'; - } - - //----------------------------------------- - // Grab forum class - //----------------------------------------- - if( ipsRegistry::isClassLoaded('class_forums') !== TRUE ) - { - try - { - require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" ); - $this->registry->setClass( 'class_forums', new class_forums( $this->registry ) ); - } - catch( Exception $error ) - { - IPS_exception_error( $error ); - } - - $this->registry->getClass('class_forums')->strip_invisible = 1; - $this->registry->getClass('class_forums')->forumsInit(); - } - - $this->tab_name = ipsRegistry::getClass('class_localization')->words['tab__forums']; - } - - /** - * Return links for this tab - * You may return an empty array or FALSE to not have - * any links show in the tab. - * - * The links must have 'area=xxxxx'. The rest of the URL - * is added automatically. - * 'area' can only be a-z A-Z 0-9 - _ - * - * @author Matt Mecham - * @access public - * @return array array of links - */ - public function getLinks() - { - ipsRegistry::instance()->getClass('class_localization')->loadLanguageFile( array( 'public_usercp' ), 'core' ); - - $array = array(); - - $array[] = array( 'url' => 'area=settings', - 'title' => ipsRegistry::instance()->getClass('class_localization')->words['board_prefs'], - 'active' => $this->request['tab'] == 'forums' && $this->request['area'] == 'settings' ? 1 : 0, - 'area' => 'settings' - ); - - $array[] = array( 'url' => 'area=topicsubs', - 'title' => ipsRegistry::instance()->getClass('class_localization')->words['subs_title'], - 'active' => $this->request['tab'] == 'forums' && $this->request['area'] == 'topicsubs' ? 1 : 0, - 'area' => 'topicsubs' - ); - - $array[] = array( 'url' => 'area=forumsubs', - 'title' => ipsRegistry::instance()->getClass('class_localization')->words['forum_subs_header'], - 'active' => $this->request['tab'] == 'forums' && $this->request['area'] == 'forumsubs' ? 1 : 0, - 'area' => 'forumsubs' - ); - - - if ( $this->memberData['g_is_supmod'] == 1 ) - { - $array[] = array( 'url' => 'area=mod_announcements', - 'title' => ipsRegistry::instance()->getClass('class_localization')->words['menu_announcements'], - 'active' => $this->request['tab'] == 'forums' && $this->request['area'] == 'mod_announcements' ? 1 : 0, - 'area' => 'mod_announcements' - ); - } - - return $array; - } - - /** - * Reset the area - * This is used so that you can reset teh $_AREA, to fix the the left-hand menu highlighting - * for custom events (e.g. announcements) - * - * @author Brandon Farber - * @access public - * @param string Area - * @return string Area - */ - public function resetArea( $area ) - { - if( $area == 'modAddAnnouncement' OR $area == 'modEditAnnouncement' ) - { - $area = 'mod_announcements'; - } - - return $area; - } - - /** - * Run custom event - * - * If you pass a 'do' in the URL / post form that is not either: - * save / save_form or show / show_form then this function is loaded - * instead. You can return a HTML chunk to be used in the UserCP (the - * tabs and footer are auto loaded) or redirect to a link. - * - * If you are returning HTML, you can use $this->hide_form_and_save_button = 1; - * to remove the form and save button that is automatically placed there. - * - * @author Matt Mecham - * @access public - * @param string Current 'area' variable (area=xxxx from the URL) - * @return mixed html or void - */ - public function runCustomEvent( $currentArea ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $html = ''; - - //----------------------------------------- - // What to do? - //----------------------------------------- - - switch( $currentArea ) - { - # Mod: Announcements - case 'modDeleteAnnouncement': - $html = $this->_customEvent_modAnnounceDelete(); - break; - case 'modAddAnnouncement': - $html = $this->_customEvent_modAnnounceForm('add'); - break; - case 'modEditAnnouncement': - $html = $this->_customEvent_modAnnounceForm('edit'); - break; - case 'modSaveAnnouncement': - $html = $this->_customEvent_modAnnounceSave( $this->request['type'] ); - break; - # Watched Topics / Forums - case 'updateWatchTopics': - $this->_customEvent_updateTopics(); - break; - case 'updateWatchForums': - $this->_customEvent_updateForums(); - break; - case 'watch': - if ( $this->request['do'] == 'saveWatch' ) - { - $html = $this->_customEvent_watch( TRUE ); - } - else - { - $html = $this->_customEvent_watch(); - } - break; - } - - //----------------------------------------- - // Turn off save button - //----------------------------------------- - - $this->hide_form_and_save_button = 1; - - //----------------------------------------- - // Return - //----------------------------------------- - - return $html; - } - - /** - * Custom Event: Add an announcement - * - * @access private - * @author Matt Mecham - * @return void - */ - private function _customEvent_modAnnounceDelete() - { - $announce_id = intval( $this->request['announce_id'] ); - - //----------------------------------------- - // Check to see if we have access - //----------------------------------------- - - if ( ! $this->memberData['g_is_supmod'] ) - { - $this->registry->getClass('output')->showError( 'announcements_supermods', 2030, true ); - return; - } - - //----------------------------------------- - // Delete it - //----------------------------------------- - - if ( $announce_id ) - { - $this->DB->buildAndFetch( array( 'delete' => 'announcements', 'where' => 'announce_id='.$announce_id ) ); - } - - //----------------------------------------- - // Update cache - //----------------------------------------- - - $this->registry->cache()->rebuildCache( 'announcements', 'forums' ); - - $this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=usercp&tab=forums&area=mod_announcements" ); - } - - /** - * Custom Event: Add an announcement - * - * @access private - * @author Matt Mecham - * @return void - */ - private function _customEvent_modAnnounceSave( $type='add' ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $forums_to_save = ""; - $start_date = 0; - $end_date = 0; - $announce_id = intval( $this->request['announce_id'] ); - - //----------------------------------------- - // Check to see if we have access - //----------------------------------------- - - if ( ! $this->memberData['g_is_supmod'] ) - { - $this->registry->getClass('output')->showError( 'announcements_supermods', 2031, true ); - return; - } - - //----------------------------------------- - // Turn off global form stuff - //----------------------------------------- - - $this->hide_form_and_save_button = 1; - - //----------------------------------------- - // check... - //----------------------------------------- - - if ( ! $this->request['announce_title'] or ! $this->request['announce_post'] ) - { - return $this->_customEvent_modAnnounceForm( $type, $this->lang->words['announce_error_title'] ); - } - - //----------------------------------------- - // Get forums to add announce in - //----------------------------------------- - - if ( is_array( $_POST['announce_forum'] ) and count( $_POST['announce_forum'] ) ) - { - if ( in_array( '*', $_POST['announce_forum'] ) ) - { - $forums_to_save = '*'; - } - else - { - $forums_to_save = implode( ",", $_POST['announce_forum'] ); - } - } - - if ( ! $forums_to_save ) - { - - return $this->_customEvent_modAnnounceForm( $type, $this->lang->words['announce_error_forums'] ); - } - - //----------------------------------------- - // Check Dates - //----------------------------------------- - - if ( strstr( $this->request['announce_start'], '.' ) ) - { - $start_array = explode( '.', $this->request['announce_start'] ); - - if ( $start_array[0] and $start_array[1] and $start_array[2] ) - { - if ( ! checkdate( $start_array[1], $start_array[0], $start_array[2] ) ) - { - return $this->_customEvent_modAnnounceForm( $type, $this->lang->words['announce_error_date'] ); - } - } - - $start_date = IPSTime::date_gmmktime( 0, 0, 1, $start_array[1], $start_array[0], $start_array[2] ); - } - - if ( strstr( $this->request['announce_end'], '.' ) ) - { - $end_array = explode( '.', $this->request['announce_end'] ); - - if ( $end_array[0] and $end_array[1] and $end_array[2] ) - { - if ( ! checkdate( $end_array[1], $end_array[0], $end_array[2] ) ) - { - return $this->_customEvent_modAnnounceForm( $type, $this->lang->words['announce_error_date'] ); - } - } - - $end_date = IPSTime::date_gmmktime( 23, 59, 59, $end_array[1], $end_array[0], $end_array[2] ); - } - - //----------------------------------------- - // Sort out the content - //----------------------------------------- - - $announceContent = IPSText::getTextClass( 'editor' )->processRawPost( 'announce_post' ); - - IPSText::getTextClass( 'bbcode' )->bypass_badwords = 1; - IPSText::getTextClass( 'bbcode' )->parse_smilies = 1; - IPSText::getTextClass( 'bbcode' )->parse_html = $this->request['announce_html_enabled'] ? $this->request['announce_html_enabled'] : 0; - IPSText::getTextClass( 'bbcode' )->parse_nl2br = $this->request['announce_nlbr_enabled'] ? $this->request['announce_nlbr_enabled'] : 0; - IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; - IPSText::getTextClass( 'bbcode' )->parsing_section = 'announcement'; - - //----------------------------------------- - // Build save array - //----------------------------------------- - - $save_array = array( 'announce_title' => $this->request['announce_title'], - 'announce_post' => IPSText::getTextClass( 'bbcode' )->preDbParse( $announceContent ), - 'announce_active' => $this->request['announce_active'] ? $this->request['announce_active'] : 0, - 'announce_forum' => $forums_to_save, - 'announce_html_enabled' => $this->request['announce_html_enabled'] ? $this->request['announce_html_enabled'] : 0, - 'announce_nlbr_enabled' => $this->request['announce_nlbr_enabled'] ? $this->request['announce_nlbr_enabled'] : 0, - 'announce_start' => $start_date, - 'announce_end' => $end_date - ); - - //----------------------------------------- - // Save.. - //----------------------------------------- - - if ( $type == 'add' ) - { - $save_array['announce_member_id'] = $this->memberData['member_id']; - - $this->DB->insert( 'announcements', $save_array ); - } - else - { - if ( $announce_id ) - { - $this->DB->update( 'announcements', $save_array, 'announce_id='.$announce_id ); - } - } - - //----------------------------------------- - // Update cache - //----------------------------------------- - - $this->registry->cache()->rebuildCache( 'announcements', 'forums' ); - - $this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=usercp&tab=forums&area=mod_announcements" ); - } - - - /** - * Custom Event: Add an announcement - * - * @access private - * @author Matt Mecham - * @param string Add or edit - * @param string Message to show - * @return string HTML - */ - private function _customEvent_modAnnounceForm( $type='add', $msg='' ) - { - //----------------------------------------- - // Check to see if we have access - //----------------------------------------- - - if ( ! $this->memberData['g_is_supmod'] ) - { - $this->registry->getClass('output')->showError( 'announcements_supermods', 2032, true ); - return; - } - - //----------------------------------------- - // Turn off global form stuff - //----------------------------------------- - - $this->hide_form_and_save_button = 1; - - //----------------------------------------- - // INIT the editor/bbcode classes - //----------------------------------------- - - /* Load the Parser */ - IPSText::getTextClass( 'bbcode' )->parsing_section = 'announcement'; - - //----------------------------------------- - // Set up - //----------------------------------------- - - if ( $type == 'add' ) - { - $button = $this->lang->words['announce_add']; - $announce = array( 'announce_active' => 1, 'announce_id' => 0 ); - - } - else - { - $announce_id = intval( $this->request['announce_id'] ); - $button = $this->lang->words['announce_button_edit']; - $announce = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'announcements', 'where' => 'announce_id='.$announce_id ) ); - $announce['announce_forum'] = explode( ",", $announce['announce_forum'] ); - $announce['announce_start'] = $announce['announce_start'] ? gmstrftime( '%d.%m.%Y', $announce['announce_start'] ) : ''; - $announce['announce_end'] = $announce['announce_end'] ? gmstrftime( '%d.%m.%Y', $announce['announce_end'] ) : ''; - } - - //----------------------------------------- - // Do we have _POST? - //----------------------------------------- - - foreach( array( 'announce_html_enabled', 'announce_title', 'announce_post', 'announce_start', 'announce_end', 'announce_forum', 'announce_active' ) as $bit ) - { - if ( isset($_POST[$bit]) AND $_POST[$bit] ) - { - $announce[$bit] = $_POST[$bit]; - } - else if( !isset($announce[$bit]) ) - { - $announce[$bit] = NULL; - } - } - - if ( $announce['announce_post'] ) - { - if ( IPSText::getTextClass( 'editor' )->method == 'rte' ) - { - $announce['announce_post'] = IPSText::getTextClass( 'bbcode' )->convertForRTE( $announce['announce_post'] ); - } - else - { - IPSText::getTextClass( 'bbcode' )->parse_smilies = 1; - IPSText::getTextClass( 'bbcode' )->parse_html = $announce['announce_html_enabled'] ? $announce['announce_html_enabled'] : 0; - IPSText::getTextClass( 'bbcode' )->parse_nl2br = $announce['announce_nlbr_enabled'] ? $announce['announce_nlbr_enabled'] : 0; - IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; - - $announce['announce_post'] = IPSText::getTextClass( 'bbcode' )->preEditParse( $announce['announce_post'] ); - } - } - - //----------------------------------------- - // Forums - //----------------------------------------- - - $forum_html = "" . $this->registry->getClass('class_forums')->forumsForumJump(0,1,1); - - //----------------------------------------- - // Save forums? - //----------------------------------------- - - if ( is_array( $announce['announce_forum'] ) and count( $announce['announce_forum'] ) ) - { - foreach( $announce['announce_forum'] as $f ) - { - $forum_html = preg_replace( "#option\s+value=[\"'](".preg_quote($f,'#').")[\"']#i", "option value='\\1' selected='selected'", $forum_html ); - } - } - - $announce['announce_active_checked'] = $announce['announce_active'] ? 'checked="checked"' : ''; - $announce['html_checkbox'] = $announce['announce_html_enabled'] ? "checked='checked' " : ''; - $announce['nlbr_checkbox'] = $announce['announce_nlbr_enabled'] ? "checked='checked' " : ''; - - $this->_nav[] = array( ipsRegistry::instance()->getClass('class_localization')->words['menu_announcements'], "app=core&module=usercp&tab=forums&area=mod_announcements" ); - $this->_nav[] = array( ipsRegistry::instance()->getClass('class_localization')->words['announce_add'] ); - - return $this->registry->getClass('output')->getTemplate('ucp')->modAnnounceForm($announce, $button, $forum_html, $type, IPSText::getTextClass( 'editor' )->showEditor( $announce['announce_post'], 'announce_post' ), $msg); - } - - - /** - * Custom Event: Update watched forums - * - * @access private - * @author Matt Mecham - * @return void - */ - private function _customEvent_updateForums() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $ids = array(); - $allowed = array( 'none', 'immediate', 'delayed', 'daily', 'weekly' ); - - //----------------------------------------- - // Get IDs - //----------------------------------------- - - if ( is_array( $_REQUEST['forumIDs'] ) ) - { - foreach( $_REQUEST['forumIDs'] as $id => $value ) - { - $ids[] = intval( $id ); - } - } - - //----------------------------------------- - // Check... - //----------------------------------------- - - if ( $this->request['authKey'] != $this->member->form_hash ) - { - $this->registry->getClass('output')->showError( 'usercp_forums_bad_key', 3030, true ); - } - - //----------------------------------------- - // what we doing? - //----------------------------------------- - - if ( count($ids) > 0 ) - { - if ( $this->request['trackchoice'] == 'unsubscribe' ) - { - $this->DB->buildAndFetch( array( 'delete' => 'forum_tracker', 'where' => "member_id=" . $this->memberData['member_id'] . " and forum_id IN (".implode( ",", $ids ).")" ) ); - } - else if ( in_array( $this->request['trackchoice'], $allowed ) ) - { - $this->DB->update( 'forum_tracker', array( 'forum_track_type' => $this->request['trackchoice'] ), "member_id=" . $this->memberData['member_id'] . " and forum_id IN (".implode( ",", $ids ).")" ); - } - } - - $this->registry->getClass('class_forums')->recacheWatchedForums( $this->memberData['member_id'] ); - - if( $this->request['forumReturn'] ) - { - $this->registry->getClass('output')->silentRedirect( $this->settings['base_url'] . 'showforum=' . intval( $this->request['forumReturn'] ) ); - } - else - { - $this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=usercp&tab=forums&area=forumsubs" ); - } - } - - /** - * Custom Event: Update watched topics - * - * @access private - * @author Matt Mecham - * @return void - */ - private function _customEvent_updateTopics() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $ids = array(); - $allowed = array( 'none', 'immediate', 'delayed', 'daily', 'weekly' ); - - //----------------------------------------- - // Get IDs - //----------------------------------------- - - if ( is_array( $_REQUEST['topicIDs'] ) ) - { - foreach( $_REQUEST['topicIDs'] as $id => $value ) - { - $ids[] = intval( $id ); - } - } - - //----------------------------------------- - // Check... - //----------------------------------------- - - if ( $this->request['authKey'] != $this->member->form_hash ) - { - $this->registry->getClass('output')->showError( 'usercp_forums_bad_key', 3031, true ); - } - - //----------------------------------------- - // what we doing? - //----------------------------------------- - - if ( count($ids) > 0 ) - { - if ( $this->request['trackchoice'] == 'unsubscribe' ) - { - $this->DB->delete( 'tracker', "member_id='{$this->memberData['member_id']}' and topic_id IN ( " . implode( ",", $ids ) . ")" ); - } - else if ( in_array( $this->request['trackchoice'], $allowed ) ) - { - $this->DB->update( 'tracker', array( 'topic_track_type' => $this->request['trackchoice'] ), "member_id='{$this->memberData['member_id']}' and topic_id IN (".implode( ",", $ids ).")" ); - } - } - - if( $this->request['topicReturn'] ) - { - $this->registry->getClass('output')->silentRedirect( $this->settings['base_url'] . 'showtopic=' . intval( $this->request['topicReturn'] ) ); - } - else - { - $this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=usercp&tab=forums&area=topicsubs" ); - } - } - - /** - * Custom Event: Watch A Topic - * - * @access private - * @author Matt Mecham - * @param bool Whether to save it or not - * @return void - */ - private function _customEvent_watch( $saveIt=FALSE ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $watch = $this->request['watch'] == 'forum' ? 'forum' : 'topic'; - $topicID = intval($this->request['tid']); - $forumID = intval($this->request['fid']); - $forum = array(); - $topic = array(); - - if ( $watch == 'topic' ) - { - //----------------------------------------- - // Get the details from the DB (TOPIC) - //----------------------------------------- - - $topic = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid='.$topicID ) ); - - if ( ! $topic['tid'] ) - { - $this->registry->getClass('output')->showError( 'usercp_forums_no_topic', 1030 ); - } - - $forum = $this->registry->getClass('class_forums')->forum_by_id[ $topic['forum_id'] ]; - $forumID = $topic['forum_id']; - } - else - { - //----------------------------------------- - // Get the details (FORUM) - //----------------------------------------- - - $forum = $this->registry->getClass('class_forums')->forum_by_id[ $forumID ]; - } - - //----------------------------------------- - // Permy check - //----------------------------------------- - - if ( IPSMember::checkPermissions('read', $forumID ) !== TRUE ) - { - $this->registry->getClass('output')->showError( 'usercp_forums_no_perms', 1031 ); - } - - //----------------------------------------- - // Passy check - //----------------------------------------- - - if ( ! in_array( $this->memberData['member_group_id'], explode(",", $forum['password_override']) ) AND ( isset($forum['password']) AND $forum['password'] != "" ) ) - { - if ( $this->registry->getClass('class_forums')->forumsComparePassword( $forum['id'] ) != TRUE ) - { - $this->registry->getClass('output')->showError( 'usercp_forums_must_login', 1032 ); - } - } - - //----------------------------------------- - // Have we already subscribed? - //----------------------------------------- - - if ( $watch == 'forum' ) - { - $tmp = $this->DB->buildAndFetch( array( - 'select' => 'frid as tmpid', - 'from' => 'forum_tracker', - 'where' => "forum_id={$forumID} AND member_id=".$this->memberData['member_id'] - ) ); - } - else - { - $tmp = $this->DB->buildAndFetch( array( - 'select' => 'trid as tmpid', - 'from' => 'tracker', - 'where' => "topic_id={$topicID} AND member_id=".$this->memberData['member_id'] - ) ); - } - - if ( $tmp['tmpid'] ) - { - $this->registry->getClass('output')->showError( 'forum_already_subscribed', 1033 ); - } - - //----------------------------------------- - // What to do... - //----------------------------------------- - - if ( ! $saveIt ) - { - //----------------------------------------- - // Okay, lets do the HTML - //----------------------------------------- - - return $this->registry->getClass('output')->getTemplate('ucp')->watchChoices( $forum, $topic, $watch ); - } - else - { - //----------------------------------------- - // Auth check - //----------------------------------------- - - if ( $this->request['auth_key'] != $this->member->form_hash ) - { - $this->registry->getClass('output')->showError( 'usercp_forums_bad_key', 2033, true ); - } - - //----------------------------------------- - // Method.. - //----------------------------------------- - - switch ( $this->request['emailtype'] ) - { - case 'immediate': - $_method = 'immediate'; - break; - case 'delayed': - $_method = 'delayed'; - break; - case 'none': - $_method = 'none'; - break; - case 'daily': - $_method = 'daily'; - break; - case 'weekly': - $_method = 'weekly'; - break; - default: - $_method = 'delayed'; - break; - } - - //----------------------------------------- - // Add it to the DB - //----------------------------------------- - - if ( $watch == 'forum' ) - { - $this->DB->insert( 'forum_tracker', array ( - 'member_id' => $this->memberData['member_id'], - 'forum_id' => $forumID, - 'start_date' => time(), - 'forum_track_type' => $_method, - ) ); - - $this->registry->getClass('class_forums')->recacheWatchedForums( $this->memberData['member_id'] ); - - $this->registry->getClass('output')->redirectScreen( $this->lang->words['sub_added'], $this->settings['base_url'] . "showforum={$forumID}", $forum['name_seo'] ); - - } - else - { - $this->DB->insert( 'tracker', array ( - 'member_id' => $this->memberData['member_id'], - 'topic_id' => $topicID, - 'start_date' => time(), - 'topic_track_type' => $_method, - ) ); - - $this->registry->getClass('output')->redirectScreen( $this->lang->words['sub_added'], $this->settings['base_url'] . "showtopic={$topicID}&st=" . $this->request['st'], $topic['title_seo'] ); - - } - } - } - - /** - * UserCP Form Show - * - * @access public - * @author Matt Mecham - * @param string Current area as defined by 'get_links' - * @param array Array of member / core_sys_login information (if we're editing) - * @return string Processed HTML - */ - public function showForm( $current_area, $errors=array() ) - { - //----------------------------------------- - // Where to go, what to see? - //----------------------------------------- - - switch( $current_area ) - { - default: - case 'settings': - return $this->showForumSettings(); - break; - case 'topicsubs': - return $this->showTopicSubs(); - break; - case 'forumsubs': - return $this->showForumSubs(); - break; - case 'mod_announcements': - return $this->showModAnnouncements(); - break; - } - } - - /** - * Show topic announcement management - * - * @access public - * @author Matt Mecham - * @return string Processed HTML - */ - public function showModAnnouncements() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $announcements = array(); - - //----------------------------------------- - // Turn off global form stuff - //----------------------------------------- - - $this->hide_form_and_save_button = 1; - - //----------------------------------------- - // Make sure we have access... - //----------------------------------------- - - if ( ! $this->memberData['g_is_supmod'] ) - { - $this->registry->getClass('output')->showError( 'announcements_supermods', 2034, true ); - return; - } - - //----------------------------------------- - // Get announcements - //----------------------------------------- - - $this->DB->build( array( 'select' => 'a.*', - 'from' => array( 'announcements' => 'a' ), - 'order' => 'a.announce_end DESC', - 'add_join' => array( - array( 'select' => 'm.member_id, m.name, m.members_display_name', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=a.announce_member_id', - 'type' => 'left' - ) - ) - ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - if ( $r['announce_forum'] == '*' ) - { - $r['announce_forum_show'] = $this->lang->words['announce_page_allforums']; - } - else - { - $tmp_forums = explode(",",$r['announce_forum']); - - if ( is_array( $tmp_forums ) and count($tmp_forums) ) - { - if ( count($tmp_forums) > 5 ) - { - $r['announce_forum_show'] = count($tmp_forums).' '.$this->lang->words['announce_page_numforums']; - } - else - { - $r['_forums'] = array(); - - foreach( $tmp_forums as $id ) - { - $r['_forums'][] = array( $id, $this->registry->getClass('class_forums')->forum_by_id[ $id ]['name'] ); - } - } - } - } - - $r['announce_inactive'] = !$r['announce_active'] ? "" . $this->lang->words['announce_page_disabled'] . "" : ''; - - $announcements[] = $r; - - //$content .= $this->registry->getClass('output')->getTemplate('ucp')->ucp_announce_manage_row( $r ); - } - - return $this->registry->getClass('output')->getTemplate('ucp')->modAnnouncements( $announcements ); - } - - /** - * Show topic subscriptions - * - * @access public - * @author Matt Mecham - * @return string Processed HTML - * @todo [Future] Explore turning "new posts" into "unread posts" - */ - public function showForumSubs() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $mainForumArray = array(); - $forums = array(); - $forumIDs = array(); - $topParents = array(); - - //----------------------------------------- - // Turn off global form stuff - //----------------------------------------- - - $this->hide_form_and_save_button = 1; - - //----------------------------------------- - // INIT... - //----------------------------------------- - - $remap = array( 'none' => 'subs_none_title', - 'immediate' => 'subs_immediate', - 'delayed' => 'subs_delayed', - 'daily' => 'subs_daily', - 'weekly' => 'subs_weekly' - ); - - $mainForumArray = array(); - - //----------------------------------------- - // Query the DB for the subby toppy-ics - at the same time - // we get the forum and topic info, 'cos we rule. - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', - 'from' => 'forum_tracker', - 'where' => 'member_id=' . $this->memberData['member_id'] ) ); - $this->DB->execute(); - - while( $forum = $this->DB->fetch() ) - { - $topParents[] = $this->registry->getClass('class_forums')->fetchTopParentID( $forum['forum_id'] ); - $forum['_type'] = $remap[ $forum['forum_track_type'] ]; - $forums[ $forum['forum_id'] ] = $forum; - } - - //----------------------------------------- - // Get new count - //----------------------------------------- - - if ( is_array( $forums ) AND count( $forums ) ) - { - $this->DB->build( array( 'select' => 'forum_id, COUNT(*) as newTopics', - 'from' => 'topics', - 'where' => 'forum_id IN (' . implode( ',', array_keys( $forums ) ) . ') AND last_post > ' . $this->memberData['last_visit'], - 'group' => 'forum_id' ) ); - - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - $forums[ $row['forum_id'] ]['_newTopics'] = $row['newTopics']; - } - } - - //----------------------------------------- - // Now, loop through all forums... - //----------------------------------------- - - foreach( $this->registry->getClass('class_forums')->forum_cache['root'] as $id => $data ) - { - if ( in_array( $id, $topParents ) ) - { - $mainForumArray[ $id ] = array( '_data' => $data, - '_forums' => $this->_showForumSubsRecurse( $forums, $id ) ); - } - } - - return $this->registry->getClass('output')->getTemplate('ucp')->watchedForums( $mainForumArray ); - } - - /** - * Recursively build up the tracked forums - * - * @access private - * @param array Tracked forums - * @param integer Forum id to start at - * @param array Forum data thus far - * @param integer Depth level - * @return array Forums - */ - private function _showForumSubsRecurse( $forums, $root, $forumArray=array(), $depth=0 ) - { - if ( is_array( $this->registry->getClass('class_forums')->forum_cache[ $root ] ) AND count( $this->registry->getClass('class_forums')->forum_cache[ $root ] ) ) - { - foreach( $this->registry->getClass('class_forums')->forum_cache[ $root ] as $id => $forum ) - { - if ( in_array( $id, array_keys( $forums ) ) ) - { - //----------------------------------------- - // Got perms to see this forum? - //----------------------------------------- - - if ( ! $this->registry->getClass('class_forums')->forum_by_id[ $forum['id'] ] ) - { - continue; - } - - $forum['_depth'] = $depth; - $forum['_newTopics'] = $forums[ $forum['id'] ]['_newTopics']; - $forum['_type'] = $forums[ $forum['id'] ]['_type']; - - $forum['folder_icon'] = $this->registry->getClass('class_forums')->forumsNewPosts($forum); - - $forum['last_title'] = str_replace( "!" , "!", $forum['last_title'] ); - $forum['last_title'] = str_replace( """, '"', $forum['last_title'] ); - - if ( IPSText::mbstrlen($forum['last_title']) > 30 ) - { - $forum['last_title'] = IPSText::truncate( $forum['last_title'], 30 ); - } - - $forumArray[ $forum['id'] ] = $forum; - } - - $forumArray = $this->_showForumSubsRecurse( $forums, $forum['id'], $forumArray, $depth + 1 ); - } - } - - return $forumArray; - } - - /** - * Show topic subscriptions - * - * @access public - * @author Matt Mecham - * @return string Processed HTML - */ - public function showTopicSubs() - { - //----------------------------------------- - // Turn off global form stuff - //----------------------------------------- - - $this->hide_form_and_save_button = 1; - - //----------------------------------------- - // INIT... - //----------------------------------------- - - $date_cut = ( intval($this->request['datecut'] ) ) ? intval( $this->request['datecut'] ) : 30; - $date_query = $date_cut != 1000 ? " AND t.last_post > ".(time() - ($date_cut*86400))." " : ""; - $topic_array = array(); - $forum_array = array(); - $mainForumArray = array(); - - $remap = array( 'none' => 'subs_none_title', - 'immediate' => 'subs_immediate', - 'delayed' => 'subs_delayed', - 'daily' => 'subs_daily', - 'weekly' => 'subs_weekly' - ); - - //----------------------------------------- - // Get forums module - //----------------------------------------- - - require_once( IPSLib::getAppDir( 'forums' ) . '/modules_public/forums/forums.php' ); - $forumController = new public_forums_forums_forums( $this->registry ); - $forumController->makeRegistryShortcuts( $this->registry ); - $forumController->initForums(); - - //----------------------------------------- - // Query the DB for the subby toppy-ics - at the same time - // we get the forum and topic info, 'cos we rule. - //----------------------------------------- - - $this->DB->build( array( 'select' => 's.topic_track_type, s.trid, s.member_id, s.topic_id, s.last_sent, s.start_date as track_started', - 'from' => array( 'tracker' => 's' ), - 'where' => 's.member_id=' . $this->memberData['member_id'] . $date_query, - 'add_join' => array( - array( 'select' => 't.*', - 'from' => array( 'topics' => 't' ), - 'where' => 't.tid=s.topic_id', - 'type' => 'left' - ), - array( 'select' => 'f.id as forum_id, f.name as forum_name', - 'from' => array( 'forums' => 'f' ), - 'where' => 'f.id=t.forum_id', - 'type' => 'left' - ), - ) - ) ); - $this->DB->execute(); - - while( $topic = $this->DB->fetch() ) - { - //----------------------------------------- - // Got perms to see this forum? - //----------------------------------------- - - if ( ! $this->registry->getClass('class_forums')->forum_by_id[ $topic['forum_id'] ] ) - { - continue; - } - - $topic['_last_post'] = $topic['last_post']; - $topic['_type'] = $remap[ $topic['topic_track_type'] ]; - $topic_ids[ $topic['tid'] ] = $topic['forum_id']; - - if ( ! isset( $mainForumArray[ $topic['forum_id'] ] ) ) - { - $mainForumArray[ $topic['forum_id'] ] = $topic; - } - - $mainForumArray[ $topic['forum_id'] ]['_topics'][ $topic['tid'] ] = $topic; - } - - //----------------------------------------- - // Are we dotty? - //----------------------------------------- - - if( ( $this->settings['show_user_posted'] == 1 ) and ( $this->memberData['member_id'] ) and count($mainForumArray) ) - { - $this->DB->build( array( - 'select' => 'author_id, topic_id', - 'from' => 'posts', - 'where' => 'author_id=' . $this->memberData['member_id'] . ' AND topic_id IN(' . implode( ',', array_keys( $topic_ids ) ) . ')', - ) ); - - $this->DB->execute(); - - while( $p = $this->DB->fetch() ) - { - if ( is_array( $mainForumArray[ $topic_ids[ $p['topic_id'] ] ]['_topics'][ $p['topic_id'] ] ) ) - { - $mainForumArray[ $topic_ids[ $p['topic_id'] ] ]['_topics'][ $p['topic_id'] ]['author_id'] = $p['author_id']; - } - } - } - - //----------------------------------------- - // Now parse - //----------------------------------------- - - foreach( $mainForumArray as $forum_id => $data ) - { - foreach( $mainForumArray[ $forum_id ]['_topics'] as $tid => $_data ) - { - $mainForumArray[ $forum_id ]['_topics'][ $tid ] = $forumController->parseTopicData( $_data ); - } - } - - return $this->registry->getClass('output')->getTemplate('ucp')->watchedTopics( $mainForumArray, $date_cut ); - } - - /** - * Show the forums Settings form - * - * @access public - * @author Matt Mecham - * @return string Processed HTML - */ - public function showForumSettings() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $_emailData = array(); - $pp_a = array(); - $tp_a = array(); - - //----------------------------------------- - // Email settings... - //----------------------------------------- - - foreach( array('email_full', 'auto_track') as $k ) - { - if ( $this->memberData[ $k ] ) - { - $_emailData[ $k ] = 'checked="checked"'; - } - else - { - $_emailData[ $k ] = ''; - } - } - - foreach( array( 'none', 'immediate', 'delayed', 'daily', 'weekly' ) as $_opt ) - { - $_emailData['trackOption'][ $_opt ] = ( $this->memberData['auto_track'] == $_opt ) ? 'selected="selected"' : ''; - } - - //----------------------------------------- - // Viewing settings... - //----------------------------------------- - - list( $post_page, $topic_page ) = explode( "&", $this->memberData['view_prefs'] ); - - if ( $post_page == "" ) - { - $post_page = -1; - } - if ( $topic_page == "" ) - { - $topic_page = -1; - } - - foreach( explode( ',', $this->settings['postpage_contents'] ) as $n ) - { - $n = intval(trim($n)); - $pp_a[] = array( $n, $n ); - } - - foreach( explode( ',', $this->settings['topicpage_contents'] ) as $n ) - { - $n = intval(trim($n)); - $tp_a[] = array( $n, $n ); - } - - return $this->registry->getClass('output')->getTemplate('ucp')->forumPrefsForm( $_emailData, array( - 'quickReplyForm' => $html_qr, - 'viewTopicsForm' => $tp_a, - 'viewPostsForm' => $pp_a, - 'postsPerPage' => $post_page, - 'topicsPerPage' => $topic_page ) ); - } - - /** - * UserCP Form Check - * - * @access public - * @author Matt Mecham - * @param string Current area as defined by 'get_links' - * @return string Processed HTML - */ - public function saveForm( $current_area ) - { - //----------------------------------------- - // Where to go, what to see? - //----------------------------------------- - - switch( $current_area ) - { - default: - case 'settings': - return $this->saveForumSettings(); - break; - } - } - - /** - * UserCP Save Form: Settings - * - * @access public - * @return array Errors - */ - public function saveForumSettings() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $_trackChoice = ''; - - //----------------------------------------- - // Check... - //----------------------------------------- - - if ( ! in_array( $this->request['postpage'], explode( ',', $this->settings['postpage_contents'] ) ) ) - { - $this->request[ 'postpage'] = '-1' ; - } - - if ( ! in_array( $this->request['topicpage'], explode( ',', $this->settings['topicpage_contents'] ) ) ) - { - $this->request[ 'topicpage'] = '-1' ; - } - - //----------------------------------------- - // Type of track - //----------------------------------------- - - if ( $this->request['auto_track'] ) - { - if ( in_array( $this->request['trackchoice'], array( 'none', 'immediate', 'delayed', 'daily', 'weekly' ) ) ) - { - $_trackChoice = $this->request['trackchoice']; - } - } - - IPSCookie::set( 'topicmode', $this->request['topic_display_mode'], 1 ); - - IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'view_avs' => intval($this->request['viewAvatars']), - 'view_sigs' => intval($this->request['viewSignatures']), - 'view_img' => intval($this->request['viewImages']), - 'email_full' => intval($this->request['send_full_msg']), - 'auto_track' => $_trackChoice, - 'view_prefs' => intval($this->request['postpage'])."&".intval($this->request['topicpage']) ) ) ); - - IPSMember::packMemberCache( $this->memberData['member_id'], array( 'qr_open' => intval($this->request['fastReplyOpen']) ), $this->memberData['_cache'] ); - - return TRUE; - } - - /** - * Password check - * - * @access private - * @param string Plain Text Password - * @return bool Password matches - */ - private function _check_password( $password_check ) - { - //----------------------------------------- - // Ok, check password first - //----------------------------------------- - - require_once( IPS_ROOT_PATH.'sources/handlers/han_login.php' ); - $this->han_login = new han_login( $this->registry ); - $this->han_login->init(); - - //----------------------------------------- - // Is this a username or email address? - //----------------------------------------- - - $this->han_login->loginPasswordCheck( $this->memberData['name'], $this->memberData['email'], $password_check ); - - if ( $this->han_login->return_code == 'SUCCESS' ) - { - return TRUE; - } - else - { - return FALSE; - } - } + + * Invision Power Services + * IP.Board v3.1.4 + * UserCP Tab + * Last Updated: $Date: 2010-10-28 06:58:47 -0400 (Thu, 28 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Revision: 7060 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class usercpForms_forums extends public_core_usercp_manualResolver implements interface_usercp +{ + /** + * Tab name + * This can be left blank and the application title will + * be used + * + * @var string Tab name + */ + public $tab_name = "Форумы"; + + /** + * OK Message + * This is an optional message to return back to the framework + * to replace the standard 'Settings saved' message + * + * @var string "Done" message to display + */ + public $ok_message = ''; + + /** + * Hide 'save' button and form elements + * Useful if you have custom output that doesn't + * require it + * + * @var bool Hide the form/save button + */ + public $hide_form_and_save_button = false; + + /** + * If you wish to allow uploads, set a value for this + * + * @var integer + */ + public $uploadFormMax = 0; + + /** + * Initiate this module + * + * @return void + */ + public function init() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $this->request['st'] = intval( $this->request['st'] ); + + //----------------------------------------- + // Make sure we have values + //----------------------------------------- + + if ( $this->settings['postpage_contents'] == "" ) + { + $this->settings['postpage_contents'] = '5,10,15,20,25,30,35,40'; + } + + if ( $this->settings['topicpage_contents'] == "" ) + { + $this->settings['topicpage_contents'] = '5,10,15,20,25,30,35,40'; + } + + //----------------------------------------- + // Grab forum class + //----------------------------------------- + if( ipsRegistry::isClassLoaded('class_forums') !== TRUE ) + { + try + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' ); + $this->registry->setClass( 'class_forums', new $classToLoad( $this->registry ) ); + } + catch( Exception $error ) + { + IPS_exception_error( $error ); + } + + $this->registry->getClass('class_forums')->strip_invisible = 1; + $this->registry->getClass('class_forums')->forumsInit(); + } + + $this->tab_name = ipsRegistry::getClass('class_localization')->words['tab__forums']; + } + + /** + * Return links for this tab + * You may return an empty array or FALSE to not have + * any links show in the tab. + * + * The links must have 'area=xxxxx'. The rest of the URL + * is added automatically. + * 'area' can only be a-z A-Z 0-9 - _ + * + * @author Matt Mecham + * @return array array of links + */ + public function getLinks() + { + ipsRegistry::instance()->getClass('class_localization')->loadLanguageFile( array( 'public_usercp' ), 'core' ); + + $array = array(); + + $array[] = array( 'url' => 'area=settings', + 'title' => ipsRegistry::instance()->getClass('class_localization')->words['rboard_prefs'], + 'active' => $this->request['tab'] == 'forums' && $this->request['area'] == 'settings' ? 1 : 0, + 'area' => 'settings' + ); + + $array[] = array( 'url' => 'area=topicsubs', + 'title' => ipsRegistry::instance()->getClass('class_localization')->words['subs_title'], + 'active' => $this->request['tab'] == 'forums' && $this->request['area'] == 'topicsubs' ? 1 : 0, + 'area' => 'topicsubs' + ); + + $array[] = array( 'url' => 'area=forumsubs', + 'title' => ipsRegistry::instance()->getClass('class_localization')->words['forum_subs_header'], + 'active' => $this->request['tab'] == 'forums' && $this->request['area'] == 'forumsubs' ? 1 : 0, + 'area' => 'forumsubs' + ); + + + if ( $this->memberData['g_is_supmod'] == 1 ) + { + $array[] = array( 'url' => 'area=mod_announcements', + 'title' => ipsRegistry::instance()->getClass('class_localization')->words['menu_announcements'], + 'active' => $this->request['tab'] == 'forums' && $this->request['area'] == 'mod_announcements' ? 1 : 0, + 'area' => 'mod_announcements' + ); + } + + return $array; + } + + /** + * Reset the area + * This is used so that you can reset teh $_AREA, to fix the the left-hand menu highlighting + * for custom events (e.g. announcements) + * + * @author Brandon Farber + * @param string Area + * @return string Area + */ + public function resetArea( $area ) + { + if( $area == 'modAddAnnouncement' OR $area == 'modEditAnnouncement' ) + { + $area = 'mod_announcements'; + } + + return $area; + } + + /** + * Run custom event + * + * If you pass a 'do' in the URL / post form that is not either: + * save / save_form or show / show_form then this function is loaded + * instead. You can return a HTML chunk to be used in the UserCP (the + * tabs and footer are auto loaded) or redirect to a link. + * + * If you are returning HTML, you can use $this->hide_form_and_save_button = 1; + * to remove the form and save button that is automatically placed there. + * + * @author Matt Mecham + * @param string Current 'area' variable (area=xxxx from the URL) + * @return mixed html or void + */ + public function runCustomEvent( $currentArea ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $html = ''; + + //----------------------------------------- + // What to do? + //----------------------------------------- + + switch( $currentArea ) + { + # Mod: Announcements + case 'modDeleteAnnouncement': + $html = $this->_customEvent_modAnnounceDelete(); + break; + case 'modAddAnnouncement': + $html = $this->_customEvent_modAnnounceForm('add'); + break; + case 'modEditAnnouncement': + $html = $this->_customEvent_modAnnounceForm('edit'); + break; + case 'modSaveAnnouncement': + $html = $this->_customEvent_modAnnounceSave( $this->request['type'] ); + break; + # Watched Topics / Forums + case 'updateWatchTopics': + $this->_customEvent_updateTopics(); + break; + case 'updateWatchForums': + $this->_customEvent_updateForums(); + break; + case 'watch': + if ( $this->request['do'] == 'saveWatch' ) + { + $html = $this->_customEvent_watch( TRUE ); + } + else + { + $html = $this->_customEvent_watch(); + } + break; + } + + //----------------------------------------- + // Turn off save button + //----------------------------------------- + + $this->hide_form_and_save_button = 1; + + //----------------------------------------- + // Return + //----------------------------------------- + + return $html; + } + + /** + * Custom Event: Add an announcement + * + * @author Matt Mecham + * @return void + */ + private function _customEvent_modAnnounceDelete() + { + $announce_id = intval( $this->request['announce_id'] ); + + //----------------------------------------- + // Check to see if we have access + //----------------------------------------- + + if ( ! $this->memberData['g_is_supmod'] ) + { + $this->registry->getClass('output')->showError( 'announcements_supermods', 2030, true ); + return; + } + + //----------------------------------------- + // Delete it + //----------------------------------------- + + if ( $announce_id ) + { + $this->DB->buildAndFetch( array( 'delete' => 'announcements', 'where' => 'announce_id='.$announce_id ) ); + } + + //----------------------------------------- + // Update cache + //----------------------------------------- + + $this->registry->cache()->rebuildCache( 'announcements', 'forums' ); + + $this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=usercp&tab=forums&area=mod_announcements" ); + } + + /** + * Custom Event: Add an announcement + * + * @author Matt Mecham + * @return void + */ + private function _customEvent_modAnnounceSave( $type='add' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $forums_to_save = ""; + $start_date = 0; + $end_date = 0; + $announce_id = intval( $this->request['announce_id'] ); + + //----------------------------------------- + // Check to see if we have access + //----------------------------------------- + + if ( ! $this->memberData['g_is_supmod'] ) + { + $this->registry->getClass('output')->showError( 'announcements_supermods', 2031, true ); + return; + } + + //----------------------------------------- + // Turn off global form stuff + //----------------------------------------- + + $this->hide_form_and_save_button = 1; + + //----------------------------------------- + // check... + //----------------------------------------- + + if ( ! $this->request['announce_title'] or ! $this->request['announce_post'] ) + { + return $this->_customEvent_modAnnounceForm( $type, $this->lang->words['announce_error_title'] ); + } + + //----------------------------------------- + // Get forums to add announce in + //----------------------------------------- + + if ( is_array( $_POST['announce_forum'] ) and count( $_POST['announce_forum'] ) ) + { + if ( in_array( '*', $_POST['announce_forum'] ) ) + { + $forums_to_save = '*'; + } + else + { + $forums_to_save = implode( ",", $_POST['announce_forum'] ); + } + } + + if ( ! $forums_to_save ) + { + + return $this->_customEvent_modAnnounceForm( $type, $this->lang->words['announce_error_forums'] ); + } + + //----------------------------------------- + // Check Dates + //----------------------------------------- + + if ( strstr( $this->request['announce_start'], '.' ) ) + { + $start_array = explode( '.', $this->request['announce_start'] ); + + if ( $start_array[0] and $start_array[1] and $start_array[2] ) + { + if ( ! checkdate( $start_array[1], $start_array[0], $start_array[2] ) ) + { + return $this->_customEvent_modAnnounceForm( $type, $this->lang->words['announce_error_date'] ); + } + } + + $start_date = mktime( 12, 0, 0, $start_array[1], $start_array[0], $start_array[2] ); + } + + if ( strstr( $this->request['announce_end'], '.' ) ) + { + $end_array = explode( '.', $this->request['announce_end'] ); + + if ( $end_array[0] and $end_array[1] and $end_array[2] ) + { + if ( ! checkdate( $end_array[1], $end_array[0], $end_array[2] ) ) + { + return $this->_customEvent_modAnnounceForm( $type, $this->lang->words['announce_error_date'] ); + } + } + + $end_date = mktime( 12, 0, 0, $end_array[1], $end_array[0], $end_array[2] ); + } + + //----------------------------------------- + // Sort out the content + //----------------------------------------- + + $announceContent = IPSText::getTextClass( 'editor' )->processRawPost( 'announce_post' ); + + IPSText::getTextClass( 'bbcode' )->bypass_badwords = 1; + IPSText::getTextClass( 'bbcode' )->parse_smilies = 1; + IPSText::getTextClass( 'bbcode' )->parse_html = intval($this->request['announce_html_enabled']); + IPSText::getTextClass( 'bbcode' )->parse_nl2br = 0; + IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; + IPSText::getTextClass( 'bbcode' )->parsing_section = 'announcement'; + + $announceContent = IPSText::getTextClass( 'bbcode' )->preDbParse( $announceContent ); + + //----------------------------------------- + // Build save array + //----------------------------------------- + + $save_array = array( 'announce_title' => $this->request['announce_title'], + 'announce_post' => $announceContent, + 'announce_active' => $this->request['announce_active'] ? $this->request['announce_active'] : 0, + 'announce_forum' => $forums_to_save, + 'announce_html_enabled' => $this->request['announce_html_enabled'] ? $this->request['announce_html_enabled'] : 0, + 'announce_nlbr_enabled' => $this->request['announce_nlbr_enabled'] ? $this->request['announce_nlbr_enabled'] : 0, + 'announce_start' => $start_date, + 'announce_end' => $end_date + ); + + //----------------------------------------- + // Save.. + //----------------------------------------- + + if ( $type == 'add' ) + { + $save_array['announce_member_id'] = $this->memberData['member_id']; + + $this->DB->insert( 'announcements', $save_array ); + } + else + { + if ( $announce_id ) + { + $this->DB->update( 'announcements', $save_array, 'announce_id='.$announce_id ); + } + } + + //----------------------------------------- + // Update cache + //----------------------------------------- + + $this->registry->cache()->rebuildCache( 'announcements', 'forums' ); + + $this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=usercp&tab=forums&area=mod_announcements" ); + } + + + /** + * Custom Event: Add an announcement + * + * @author Matt Mecham + * @param string Add or edit + * @param string Message to show + * @return string HTML + */ + private function _customEvent_modAnnounceForm( $type='add', $msg='' ) + { + //----------------------------------------- + // Check to see if we have access + //----------------------------------------- + + if ( ! $this->memberData['g_is_supmod'] ) + { + $this->registry->getClass('output')->showError( 'announcements_supermods', 2032, true ); + return; + } + + //----------------------------------------- + // Turn off global form stuff + //----------------------------------------- + + $this->hide_form_and_save_button = 1; + + //----------------------------------------- + // INIT the editor/bbcode classes + //----------------------------------------- + + /* Load the Parser */ + IPSText::getTextClass( 'bbcode' )->parsing_section = 'announcement'; + + //----------------------------------------- + // Set up + //----------------------------------------- + + if ( $type == 'add' ) + { + $button = $this->lang->words['announce_add']; + $announce = array( 'announce_active' => 1, 'announce_id' => 0 ); + + } + else + { + $announce_id = intval( $this->request['announce_id'] ); + $button = $this->lang->words['announce_button_edit']; + $announce = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'announcements', 'where' => 'announce_id='.$announce_id ) ); + $announce['announce_forum'] = explode( ",", $announce['announce_forum'] ); + $announce['announce_start'] = $announce['announce_start'] ? strftime( '%d.%m.%Y', $announce['announce_start'] ) : ''; + $announce['announce_end'] = $announce['announce_end'] ? strftime( '%d.%m.%Y', $announce['announce_end'] ) : ''; + } + + //----------------------------------------- + // Do we have _POST? + //----------------------------------------- + + foreach( array( 'announce_html_enabled', 'announce_title', 'announce_post', 'announce_start', 'announce_end', 'announce_forum', 'announce_active' ) as $bit ) + { + if ( isset($_POST[$bit]) AND $_POST[$bit] ) + { + $announce[$bit] = $_POST[$bit]; + } + else if( !isset($announce[$bit]) ) + { + $announce[$bit] = NULL; + } + } + + if ( $announce['announce_post'] ) + { + if ( IPSText::getTextClass( 'editor' )->method == 'rte' ) + { + $announce['announce_post'] = IPSText::getTextClass( 'bbcode' )->convertForRTE( $announce['announce_post'] ); + } + else + { + IPSText::getTextClass( 'bbcode' )->parse_smilies = 1; + IPSText::getTextClass( 'bbcode' )->parse_html = $announce['announce_html_enabled'] ? $announce['announce_html_enabled'] : 0; + IPSText::getTextClass( 'bbcode' )->parse_nl2br = $announce['announce_nlbr_enabled'] ? $announce['announce_nlbr_enabled'] : 0; + IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; + + $announce['announce_post'] = IPSText::getTextClass( 'bbcode' )->preEditParse( $announce['announce_post'] ); + } + } + + //----------------------------------------- + // Forums + //----------------------------------------- + + $forum_html = "" . $this->registry->getClass('class_forums')->forumsForumJump(0,1,1); + + //----------------------------------------- + // Save forums? + //----------------------------------------- + + if ( is_array( $announce['announce_forum'] ) and count( $announce['announce_forum'] ) ) + { + foreach( $announce['announce_forum'] as $f ) + { + $forum_html = preg_replace( "#option\s+value=[\"'](".preg_quote($f,'#').")[\"']#i", "option value='\\1' selected='selected'", $forum_html ); + } + } + + $announce['announce_active_checked'] = $announce['announce_active'] ? 'checked="checked"' : ''; + $announce['html_checkbox'] = $announce['announce_html_enabled'] ? "checked='checked' " : ''; + $announce['nlbr_checkbox'] = $announce['announce_nlbr_enabled'] ? "checked='checked' " : ''; + + $this->_nav[] = array( ipsRegistry::instance()->getClass('class_localization')->words['menu_announcements'], "app=core&module=usercp&tab=forums&area=mod_announcements" ); + $this->_nav[] = array( ipsRegistry::instance()->getClass('class_localization')->words[ $type == 'add' ? 'announce_add' : 'announce_button_edit' ] ); + + return $this->registry->getClass('output')->getTemplate('ucp')->modAnnounceForm($announce, $button, $forum_html, $type, IPSText::getTextClass( 'editor' )->showEditor( $announce['announce_post'], 'announce_post' ), $msg); + } + + + /** + * Custom Event: Update watched forums + * + * @author Matt Mecham + * @return void + */ + private function _customEvent_updateForums() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $ids = array(); + $allowed = array( 'none', 'immediate', 'delayed', 'daily', 'weekly' ); + + //----------------------------------------- + // Get IDs + //----------------------------------------- + + if ( is_array( $_REQUEST['forumIDs'] ) ) + { + foreach( $_REQUEST['forumIDs'] as $id => $value ) + { + $ids[] = intval( $id ); + } + } + + //----------------------------------------- + // Check... + //----------------------------------------- + + if ( $this->request['authKey'] != $this->member->form_hash ) + { + $this->registry->getClass('output')->showError( 'usercp_forums_bad_key', 3030, true ); + } + + //----------------------------------------- + // what we doing? + //----------------------------------------- + + if ( count($ids) > 0 ) + { + if ( $this->request['trackchoice'] == 'unsubscribe' ) + { + $this->DB->buildAndFetch( array( 'delete' => 'forum_tracker', 'where' => "member_id=" . $this->memberData['member_id'] . " and forum_id IN (".implode( ",", $ids ).")" ) ); + } + else if ( in_array( $this->request['trackchoice'], $allowed ) ) + { + $this->DB->update( 'forum_tracker', array( 'forum_track_type' => $this->request['trackchoice'] ), "member_id=" . $this->memberData['member_id'] . " and forum_id IN (".implode( ",", $ids ).")" ); + } + } + + $this->registry->getClass('class_forums')->recacheWatchedForums( $this->memberData['member_id'] ); + + if( $this->request['forumReturn'] ) + { + $this->registry->getClass('output')->silentRedirect( $this->settings['base_url'] . 'showforum=' . intval( $this->request['forumReturn'] ) ); + } + else + { + $this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=usercp&tab=forums&area=forumsubs" ); + } + } + + /** + * Custom Event: Update watched topics + * + * @author Matt Mecham + * @return void + */ + private function _customEvent_updateTopics() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $ids = array(); + $allowed = array( 'none', 'immediate', 'delayed', 'daily', 'weekly' ); + + //----------------------------------------- + // Get IDs + //----------------------------------------- + + if ( is_array( $_REQUEST['topicIDs'] ) ) + { + foreach( $_REQUEST['topicIDs'] as $id => $value ) + { + $ids[] = intval( $id ); + } + } + + //----------------------------------------- + // Check... + //----------------------------------------- + + if ( $this->request['authKey'] != $this->member->form_hash ) + { + $this->registry->getClass('output')->showError( 'usercp_forums_bad_key', 3031, true ); + } + + //----------------------------------------- + // what we doing? + //----------------------------------------- + + if ( count($ids) > 0 ) + { + if ( $this->request['trackchoice'] == 'unsubscribe' ) + { + $this->DB->delete( 'tracker', "member_id='{$this->memberData['member_id']}' and topic_id IN ( " . implode( ",", $ids ) . ")" ); + } + else if ( in_array( $this->request['trackchoice'], $allowed ) ) + { + $this->DB->update( 'tracker', array( 'topic_track_type' => $this->request['trackchoice'] ), "member_id='{$this->memberData['member_id']}' and topic_id IN (".implode( ",", $ids ).")" ); + } + } + + if( $this->request['topicReturn'] ) + { + $this->registry->getClass('output')->silentRedirect( $this->settings['base_url'] . 'showtopic=' . intval( $this->request['topicReturn'] ) . '&st=' . intval( $this->request['st'] ) ); + } + else + { + $this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=usercp&tab=forums&area=topicsubs" ); + } + } + + /** + * Custom Event: Watch A Topic + * + * @author Matt Mecham + * @param bool Whether to save it or not + * @return void + */ + private function _customEvent_watch( $saveIt=FALSE ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $watch = $this->request['watch'] == 'forum' ? 'forum' : 'topic'; + $topicID = intval($this->request['tid']); + $forumID = intval($this->request['fid']); + $forum = array(); + $topic = array(); + + if ( $watch == 'topic' ) + { + //----------------------------------------- + // Get the details from the DB (TOPIC) + //----------------------------------------- + + $topic = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid='.$topicID ) ); + + if ( ! $topic['tid'] ) + { + $this->registry->getClass('output')->showError( 'usercp_forums_no_topic', 1030 ); + } + + $forum = $this->registry->getClass('class_forums')->forum_by_id[ $topic['forum_id'] ]; + $forumID = $topic['forum_id']; + } + else + { + //----------------------------------------- + // Get the details (FORUM) + //----------------------------------------- + + $forum = $this->registry->getClass('class_forums')->forum_by_id[ $forumID ]; + } + + //----------------------------------------- + // Permy check + //----------------------------------------- + + if ( IPSMember::checkPermissions('read', $forumID ) !== TRUE ) + { + $this->registry->getClass('output')->showError( 'usercp_forums_no_perms', 1031, null, null, 403 ); + } + + //----------------------------------------- + // Passy check + //----------------------------------------- + $deny_access = 1; + + if ( isset( $forum['password_override'] ) && IPSText::cleanPermString($forum['password_override']) != '' ) + { + if ( IPSMember::isInGroup( $this->memberData, explode( ",", IPSText::cleanPermString($forum['password_override']) ) ) ) + { + $deny_access = 0; + } + } + + if ( $deny_access AND ( isset($forum['password']) AND $forum['password'] != "" ) ) + { + if ( $this->registry->getClass('class_forums')->forumsComparePassword( $forum['id'] ) != TRUE ) + { + $this->registry->getClass('output')->showError( 'usercp_forums_must_login', 1032, null, null, 403 ); + } + } + + //----------------------------------------- + // Have we already subscribed? + //----------------------------------------- + + if ( $watch == 'forum' ) + { + $tmp = $this->DB->buildAndFetch( array( + 'select' => 'frid as tmpid', + 'from' => 'forum_tracker', + 'where' => "forum_id={$forumID} AND member_id=".$this->memberData['member_id'] + ) ); + } + else + { + $tmp = $this->DB->buildAndFetch( array( + 'select' => 'trid as tmpid', + 'from' => 'tracker', + 'where' => "topic_id={$topicID} AND member_id=".$this->memberData['member_id'] + ) ); + } + + if ( $tmp['tmpid'] ) + { + $this->registry->getClass('output')->showError( 'forum_already_subscribed', 1033 ); + } + + //----------------------------------------- + // What to do... + //----------------------------------------- + + if ( ! $saveIt ) + { + //----------------------------------------- + // Okay, lets do the HTML + //----------------------------------------- + + return $this->registry->getClass('output')->getTemplate('ucp')->watchChoices( $forum, $topic, $watch ); + } + else + { + //----------------------------------------- + // Auth check + //----------------------------------------- + + if ( $this->request['auth_key'] != $this->member->form_hash ) + { + $this->registry->getClass('output')->showError( 'usercp_forums_bad_key', 2033, true ); + } + + //----------------------------------------- + // Method.. + //----------------------------------------- + + switch ( $this->request['emailtype'] ) + { + case 'immediate': + $_method = 'immediate'; + break; + case 'delayed': + $_method = 'delayed'; + break; + case 'none': + $_method = 'none'; + break; + case 'daily': + $_method = 'daily'; + break; + case 'weekly': + $_method = 'weekly'; + break; + default: + $_method = 'delayed'; + break; + } + + //----------------------------------------- + // Add it to the DB + //----------------------------------------- + + if ( $watch == 'forum' ) + { + $this->DB->insert( 'forum_tracker', array ( + 'member_id' => $this->memberData['member_id'], + 'forum_id' => $forumID, + 'start_date' => time(), + 'forum_track_type' => $_method, + ) ); + + $this->registry->getClass('class_forums')->recacheWatchedForums( $this->memberData['member_id'] ); + + $this->registry->getClass('output')->redirectScreen( $this->lang->words['sub_added'], $this->settings['base_url'] . "showforum={$forumID}", $forum['name_seo'] ); + + } + else + { + $this->DB->insert( 'tracker', array ( + 'member_id' => $this->memberData['member_id'], + 'topic_id' => $topicID, + 'start_date' => time(), + 'topic_track_type' => $_method, + ) ); + + $this->registry->getClass('output')->redirectScreen( $this->lang->words['sub_added'], $this->settings['base_url'] . "showtopic={$topicID}&st=" . $this->request['st'], $topic['title_seo'] ); + + } + } + } + + /** + * UserCP Form Show + * + * @author Matt Mecham + * @param string Current area as defined by 'get_links' + * @param array Array of member / core_sys_login information (if we're editing) + * @return string Processed HTML + */ + public function showForm( $current_area, $errors=array() ) + { + //----------------------------------------- + // Where to go, what to see? + //----------------------------------------- + + switch( $current_area ) + { + default: + case 'settings': + return $this->showForumSettings(); + break; + case 'topicsubs': + return $this->showTopicSubs(); + break; + case 'forumsubs': + return $this->showForumSubs(); + break; + case 'mod_announcements': + return $this->showModAnnouncements(); + break; + } + } + + /** + * Show topic announcement management + * + * @author Matt Mecham + * @return string Processed HTML + */ + public function showModAnnouncements() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $announcements = array(); + + //----------------------------------------- + // Turn off global form stuff + //----------------------------------------- + + $this->hide_form_and_save_button = 1; + + //----------------------------------------- + // Make sure we have access... + //----------------------------------------- + + if ( ! $this->memberData['g_is_supmod'] ) + { + $this->registry->getClass('output')->showError( 'announcements_supermods', 2034, true ); + return; + } + + //----------------------------------------- + // Get announcements + //----------------------------------------- + + $this->DB->build( array( 'select' => 'a.*', + 'from' => array( 'announcements' => 'a' ), + 'order' => 'a.announce_end DESC', + 'add_join' => array( + array( 'select' => 'm.member_id, m.name, m.members_display_name', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=a.announce_member_id', + 'type' => 'left' + ) + ) + ) ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $r['announce_seo_title'] = IPSText::makeSeoTitle( $r['announce_title'] ); + + if ( $r['announce_forum'] == '*' ) + { + $r['announce_forum_show'] = $this->lang->words['announce_page_allforums']; + } + else + { + $tmp_forums = explode(",",$r['announce_forum']); + + if ( is_array( $tmp_forums ) and count($tmp_forums) ) + { + if ( count($tmp_forums) > 5 ) + { + $r['announce_forum_show'] = count($tmp_forums).' '.$this->lang->words['announce_page_numforums']; + } + else + { + $r['_forums'] = array(); + + foreach( $tmp_forums as $id ) + { + $r['_forums'][] = array( $id, $this->registry->getClass('class_forums')->forum_by_id[ $id ]['name'] ); + } + } + } + } + + $r['announce_inactive'] = !$r['announce_active'] ? "" . $this->lang->words['announce_page_disabled'] . "" : ''; + + $announcements[] = $r; + + //$content .= $this->registry->getClass('output')->getTemplate('ucp')->ucp_announce_manage_row( $r ); + } + + return $this->registry->getClass('output')->getTemplate('ucp')->modAnnouncements( $announcements ); + } + + /** + * Show topic subscriptions + * + * @author Matt Mecham + * @return string Processed HTML + * @todo [Future] Explore turning "new posts" into "unread posts" + */ + public function showForumSubs() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $mainForumArray = array(); + $forums = array(); + $forumIDs = array(); + $topParents = array(); + + //----------------------------------------- + // Turn off global form stuff + //----------------------------------------- + + $this->hide_form_and_save_button = 1; + + //----------------------------------------- + // INIT... + //----------------------------------------- + + $remap = array( 'none' => 'subs_none_title', + 'immediate' => 'subs_immediate', + 'delayed' => 'subs_delayed', + 'daily' => 'subs_daily', + 'weekly' => 'subs_weekly' + ); + + $mainForumArray = array(); + + //----------------------------------------- + // Query the DB for the subby toppy-ics - at the same time + // we get the forum and topic info, 'cos we rule. + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', + 'from' => 'forum_tracker', + 'where' => 'member_id=' . $this->memberData['member_id'] ) ); + $this->DB->execute(); + + while( $forum = $this->DB->fetch() ) + { + $topParents[] = $this->registry->getClass('class_forums')->fetchTopParentID( $forum['forum_id'] ); + $forum['_type'] = $remap[ $forum['forum_track_type'] ]; + $forums[ $forum['forum_id'] ] = $forum; + } + + //----------------------------------------- + // Get new count + //----------------------------------------- + + if ( is_array( $forums ) AND count( $forums ) ) + { + $this->DB->build( array( 'select' => 'forum_id, COUNT(*) as newTopics', + 'from' => 'topics', + 'where' => 'forum_id IN (' . implode( ',', array_keys( $forums ) ) . ') AND last_post > ' . $this->memberData['last_visit'], + 'group' => 'forum_id' ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $forums[ $row['forum_id'] ]['_newTopics'] = $row['newTopics']; + } + } + + //----------------------------------------- + // Now, loop through all forums... + //----------------------------------------- + + foreach( $this->registry->getClass('class_forums')->forum_cache['root'] as $id => $data ) + { + if ( in_array( $id, $topParents ) ) + { + $mainForumArray[ $id ] = array( '_data' => $data, + '_forums' => $this->_showForumSubsRecurse( $forums, $id ) ); + } + } + + return $this->registry->getClass('output')->getTemplate('ucp')->watchedForums( $mainForumArray ); + } + + /** + * Recursively build up the tracked forums + * + * @param array Tracked forums + * @param integer Forum id to start at + * @param array Forum data thus far + * @param integer Depth level + * @return array Forums + */ + private function _showForumSubsRecurse( $forums, $root, $forumArray=array(), $depth=0 ) + { + if ( is_array( $this->registry->getClass('class_forums')->forum_cache[ $root ] ) AND count( $this->registry->getClass('class_forums')->forum_cache[ $root ] ) ) + { + foreach( $this->registry->getClass('class_forums')->forum_cache[ $root ] as $id => $forum ) + { + if ( in_array( $id, array_keys( $forums ) ) ) + { + //----------------------------------------- + // Got perms to see this forum? + //----------------------------------------- + + if ( ! $this->registry->getClass('class_forums')->forum_by_id[ $forum['id'] ] ) + { + continue; + } + + $forum['_depth'] = $depth; + $forum['_newTopics'] = $forums[ $forum['id'] ]['_newTopics']; + $forum['_type'] = $forums[ $forum['id'] ]['_type']; + + $forum['folder_icon'] = $this->registry->getClass('class_forums')->forumsNewPosts($forum); + + $forum['last_title'] = str_replace( "!" , "!", $forum['last_title'] ); + $forum['last_title'] = str_replace( """, '"', $forum['last_title'] ); + + if ( IPSText::mbstrlen($forum['last_title']) > 30 ) + { + $forum['last_title'] = IPSText::truncate( $forum['last_title'], 30 ); + } + + $forumArray[ $forum['id'] ] = $forum; + } + + $forumArray = $this->_showForumSubsRecurse( $forums, $forum['id'], $forumArray, $depth + 1 ); + } + } + + return $forumArray; + } + + /** + * Show topic subscriptions + * + * @author Matt Mecham + * @return string Processed HTML + */ + public function showTopicSubs() + { + //----------------------------------------- + // Turn off global form stuff + //----------------------------------------- + + $this->hide_form_and_save_button = 1; + + //----------------------------------------- + // INIT... + //----------------------------------------- + + $date_cut = ( intval($this->request['datecut'] ) ) ? intval( $this->request['datecut'] ) : 30; + $date_query = $date_cut != 1000 ? " AND t.last_post > ".(time() - ($date_cut*86400))." " : ""; + $topic_array = array(); + $forum_array = array(); + $mainForumArray = array(); + + $remap = array( 'none' => 'subs_none_title', + 'immediate' => 'subs_immediate', + 'delayed' => 'subs_delayed', + 'daily' => 'subs_daily', + 'weekly' => 'subs_weekly' + ); + + //----------------------------------------- + // Get forums module + //----------------------------------------- + + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'forums' ) . '/modules_public/forums/forums.php', 'public_forums_forums_forums' ); + $forumController = new $classToLoad(); + $forumController->makeRegistryShortcuts( $this->registry ); + $forumController->initForums(); + + //----------------------------------------- + // Query the DB for the subby toppy-ics - at the same time + // we get the forum and topic info, 'cos we rule. + //----------------------------------------- + + $this->DB->build( array( 'select' => 's.topic_track_type, s.trid, s.member_id, s.topic_id, s.last_sent, s.start_date as track_started', + 'from' => array( 'tracker' => 's' ), + 'where' => 's.member_id=' . $this->memberData['member_id'] . $date_query, + 'add_join' => array( + array( 'select' => 't.*', + 'from' => array( 'topics' => 't' ), + 'where' => 't.tid=s.topic_id', + 'type' => 'left' + ), + array( 'select' => 'f.id as forum_id, f.name as forum_name', + 'from' => array( 'forums' => 'f' ), + 'where' => 'f.id=t.forum_id', + 'type' => 'left' + ), + ) + ) ); + $this->DB->execute(); + + while( $topic = $this->DB->fetch() ) + { + //----------------------------------------- + // Got perms to see this forum? + //----------------------------------------- + + if ( ! $this->registry->getClass('class_forums')->forum_by_id[ $topic['forum_id'] ] ) + { + continue; + } + + $topic['_last_post'] = $topic['last_post']; + $topic['_type'] = $remap[ $topic['topic_track_type'] ]; + $topic_ids[ $topic['tid'] ] = $topic['forum_id']; + + if ( ! isset( $mainForumArray[ $topic['forum_id'] ] ) ) + { + $mainForumArray[ $topic['forum_id'] ] = $topic; + } + + $mainForumArray[ $topic['forum_id'] ]['_topics'][ $topic['tid'] ] = $topic; + } + + //----------------------------------------- + // Are we dotty? + //----------------------------------------- + + if( ( $this->settings['show_user_posted'] == 1 ) and ( $this->memberData['member_id'] ) and count($mainForumArray) ) + { + $this->DB->build( array( + 'select' => 'author_id, topic_id', + 'from' => 'posts', + 'where' => 'queued=0 AND author_id=' . $this->memberData['member_id'] . ' AND topic_id IN(' . implode( ',', array_keys( $topic_ids ) ) . ')', + ) ); + + $this->DB->execute(); + + while( $p = $this->DB->fetch() ) + { + if ( is_array( $mainForumArray[ $topic_ids[ $p['topic_id'] ] ]['_topics'][ $p['topic_id'] ] ) ) + { + $mainForumArray[ $topic_ids[ $p['topic_id'] ] ]['_topics'][ $p['topic_id'] ]['author_id'] = $p['author_id']; + } + } + } + + //----------------------------------------- + // Now parse + //----------------------------------------- + + foreach( $mainForumArray as $forum_id => $data ) + { + foreach( $mainForumArray[ $forum_id ]['_topics'] as $tid => $_data ) + { + $mainForumArray[ $forum_id ]['_topics'][ $tid ] = $forumController->parseTopicData( $_data ); + } + } + + return $this->registry->getClass('output')->getTemplate('ucp')->watchedTopics( $mainForumArray, $date_cut ); + } + + /** + * Show the forums Settings form + * + * @author Matt Mecham + * @return string Processed HTML + */ + public function showForumSettings() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $pp_a = array(); + $tp_a = array(); + + //----------------------------------------- + // Viewing settings... + //----------------------------------------- + + list( $post_page, $topic_page ) = explode( "&", $this->memberData['view_prefs'] ); + + if ( $post_page == "" ) + { + $post_page = -1; + } + if ( $topic_page == "" ) + { + $topic_page = -1; + } + + foreach( explode( ',', $this->settings['postpage_contents'] ) as $n ) + { + $n = intval(trim($n)); + $pp_a[] = array( $n, $n ); + } + + foreach( explode( ',', $this->settings['topicpage_contents'] ) as $n ) + { + $n = intval(trim($n)); + $tp_a[] = array( $n, $n ); + } + + return $this->registry->getClass('output')->getTemplate('ucp')->forumPrefsForm( array( + 'viewTopicsForm' => $tp_a, + 'viewPostsForm' => $pp_a, + 'postsPerPage' => $post_page, + 'topicsPerPage' => $topic_page ) ); + } + + /** + * UserCP Form Check + * + * @author Matt Mecham + * @param string Current area as defined by 'get_links' + * @return string Processed HTML + */ + public function saveForm( $current_area ) + { + //----------------------------------------- + // Where to go, what to see? + //----------------------------------------- + + switch( $current_area ) + { + default: + case 'settings': + return $this->saveForumSettings(); + break; + } + } + + /** + * UserCP Save Form: Settings + * + * @return array Errors + */ + public function saveForumSettings() + { + //----------------------------------------- + // Check... + //----------------------------------------- + + if ( ! in_array( $this->request['postpage'], explode( ',', $this->settings['postpage_contents'] ) ) ) + { + $this->request['postpage'] = '-1'; + } + + if ( ! in_array( $this->request['topicpage'], explode( ',', $this->settings['topicpage_contents'] ) ) ) + { + $this->request['topicpage'] = '-1'; + } + + IPSCookie::set( 'topicmode', $this->request['topic_display_mode'], 1 ); + + IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'view_avs' => intval($this->request['viewAvatars']), + 'view_sigs' => intval($this->request['viewSignatures']), + 'view_img' => intval($this->request['viewImages']), + 'view_prefs' => intval($this->request['postpage'])."&".intval($this->request['topicpage']) ) ) ); + + return TRUE; + } + + /** + * Password check + * + * @param string Plain Text Password + * @return bool Password matches + */ + private function _check_password( $password_check ) + { + //----------------------------------------- + // Ok, check password first + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' ); + $this->han_login = new $classToLoad( $this->registry ); + $this->han_login->init(); + + //----------------------------------------- + // Is this a username or email address? + //----------------------------------------- + + $this->han_login->loginPasswordCheck( $this->memberData['name'], $this->memberData['email'], $password_check ); + + if ( $this->han_login->return_code == 'SUCCESS' ) + { + return TRUE; + } + else + { + return FALSE; + } + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/index.html b/upload/admin/applications/forums/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/index.html +++ b/upload/admin/applications/forums/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/js/acp.forums.js b/upload/admin/applications/forums/js/acp.forums.js index f125738f..73336888 100644 --- a/upload/admin/applications/forums/js/acp.forums.js +++ b/upload/admin/applications/forums/js/acp.forums.js @@ -1,73 +1,73 @@ -/************************************************/ -/* IPB3 Javascript */ -/* -------------------------------------------- */ -/* acp.forums.js - Forum javascript */ -/* (c) IPS, Inc 2008 */ -/* -------------------------------------------- */ -/* Author: Brandon Farber */ -/************************************************/ - -ACPForums = { - showModForm: 0, - - /*------------------------------*/ - /* Constructor */ - init: function() - { - Debug.write("Initializing acp.forums.js"); - - document.observe("dom:loaded", function(){ - if( $('modUserName') ) - { - ACPForums.autoComplete = new ipb.Autocomplete( $('modUserName'), { multibox: false, url: acp.autocompleteUrl, templates: { wrap: acp.autocompleteWrap, item: acp.autocompleteItem } } ); - } - }); - }, - - toggleModOptions: function() - { - $$('.moddiv').each( function(div){ - if( ACPForums.showModForm ) - { - div.hide(); - } - else - { - div.show(); - } - }); - - $( 'togglemod' ).innerHTML = ACPForums.showModForm ? ipb.lang['forums_showmod'] : ipb.lang['forums_hidemod']; - ACPForums.showModForm = ACPForums.showModForm == 1 ? 0 : 1; - return false; - }, - - submitModForm: function() - { - var submitValue = ''; - - $$('input').each( function(cb){ - if( cb.type == 'checkbox' && cb.checked == true ) - { - var mainname = cb.id.replace( /^(.+?)_.+?$/ , "$1" ); - var idname = cb.id.replace( /^(.+?)_(.+?)$/, "$2" ); - - if ( mainname == 'id' ) - { - submitValue += ',' + idname; - } - } - }); - - $('modforumids').value = submitValue; - return true; - }, - - convert: function() - { - $('convert').value = 1; - $('adminform').submit(); - } -}; - +/************************************************/ +/* IPB3 Javascript */ +/* -------------------------------------------- */ +/* acp.forums.js - Forum javascript */ +/* (c) IPS, Inc 2008 */ +/* -------------------------------------------- */ +/* Author: Brandon Farber */ +/************************************************/ + +ACPForums = { + showModForm: 0, + + /*------------------------------*/ + /* Constructor */ + init: function() + { + Debug.write("Initializing acp.forums.js"); + + document.observe("dom:loaded", function(){ + if( $('modUserName') ) + { + ACPForums.autoComplete = new ipb.Autocomplete( $('modUserName'), { multibox: false, url: acp.autocompleteUrl, templates: { wrap: acp.autocompleteWrap, item: acp.autocompleteItem } } ); + } + }); + }, + + toggleModOptions: function() + { + $$('.moddiv').each( function(div){ + if( ACPForums.showModForm ) + { + div.hide(); + } + else + { + div.show(); + } + }); + + $( 'togglemod' ).innerHTML = ACPForums.showModForm ? ipb.lang['forums_showmod'] : ipb.lang['forums_hidemod']; + ACPForums.showModForm = ACPForums.showModForm == 1 ? 0 : 1; + return false; + }, + + submitModForm: function() + { + var submitValue = ''; + + $$('input').each( function(cb){ + if( cb.type == 'checkbox' && cb.checked == true ) + { + var mainname = cb.id.replace( /^(.+?)_.+?$/ , "$1" ); + var idname = cb.id.replace( /^(.+?)_(.+?)$/, "$2" ); + + if ( mainname == 'id' ) + { + submitValue += ',' + idname; + } + } + }); + + $('modforumids').value = submitValue; + return true; + }, + + convert: function() + { + $('convert').value = 1; + $('adminform').submit(); + } +}; + ACPForums.init(); \ No newline at end of file diff --git a/upload/admin/applications/forums/js/acp.rss.js b/upload/admin/applications/forums/js/acp.rss.js index 54443f87..4ac71877 100644 --- a/upload/admin/applications/forums/js/acp.rss.js +++ b/upload/admin/applications/forums/js/acp.rss.js @@ -1,50 +1,50 @@ -/************************************************/ -/* IPB3 Javascript */ -/* -------------------------------------------- */ -/* acp.rss.js - RSS Form javascript */ -/* (c) IPS, Inc 2008 */ -/* -------------------------------------------- */ -/* Author: Brandon Farber */ -/************************************************/ - -ACPRss = { - - /*------------------------------*/ - /* Constructor */ - init: function() - { - Debug.write("Initializing acp.rss.js"); - - document.observe("dom:loaded", function(){ - if( $('rss_import_mid') ) - { - ACPRss.autoComplete = new ipb.Autocomplete( $('rss_import_mid'), { multibox: false, url: acp.autocompleteUrl, templates: { wrap: acp.autocompleteWrap, item: acp.autocompleteItem } } ); - } - }); - }, - - showAuthBoxes: function() - { - var auth_req = $('rss_import_auth_userinfo'); - - if( !auth_req.visible() ) - { - auth_req.show(); - } - else - { - auth_req.hide(); - } - }, - - validate: function() - { - formobj = $('rssimport_validate'); - formobj.value = "1"; - $('rssimport_form').submit(); - } - - -}; - +/************************************************/ +/* IPB3 Javascript */ +/* -------------------------------------------- */ +/* acp.rss.js - RSS Form javascript */ +/* (c) IPS, Inc 2008 */ +/* -------------------------------------------- */ +/* Author: Brandon Farber */ +/************************************************/ + +ACPRss = { + + /*------------------------------*/ + /* Constructor */ + init: function() + { + Debug.write("Initializing acp.rss.js"); + + document.observe("dom:loaded", function(){ + if( $('rss_import_mid') ) + { + ACPRss.autoComplete = new ipb.Autocomplete( $('rss_import_mid'), { multibox: false, url: acp.autocompleteUrl, templates: { wrap: acp.autocompleteWrap, item: acp.autocompleteItem } } ); + } + }); + }, + + showAuthBoxes: function() + { + var auth_req = $('rss_import_auth_userinfo'); + + if( !auth_req.visible() ) + { + auth_req.show(); + } + else + { + auth_req.hide(); + } + }, + + validate: function() + { + formobj = $('rssimport_validate'); + formobj.value = "1"; + $('rssimport_form').submit(); + } + + +}; + ACPRss.init(); \ No newline at end of file diff --git a/upload/admin/applications/forums/js/index.html b/upload/admin/applications/forums/js/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/js/index.html +++ b/upload/admin/applications/forums/js/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/ajax/index.html b/upload/admin/applications/forums/modules_admin/ajax/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_admin/ajax/index.html +++ b/upload/admin/applications/forums/modules_admin/ajax/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/ajax/member_editform.php b/upload/admin/applications/forums/modules_admin/ajax/member_editform.php index 821dd804..5529be09 100644 --- a/upload/admin/applications/forums/modules_admin/ajax/member_editform.php +++ b/upload/admin/applications/forums/modules_admin/ajax/member_editform.php @@ -1,220 +1,222 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class admin_forums_ajax_member_editform extends ipsAjaxCommand -{ - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = ipsRegistry::getClass('output')->loadTemplate('cp_skin_member_form'); - - //----------------------------------------- - // Load lang - //----------------------------------------- - - ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_forums' ) ); - - switch( $this->request['do'] ) - { - case 'remove_avatar': - $this->_removeAvatar(); - break; - - case 'get_avatar_images': - $this->_getAvatarImages(); - break; - - case 'show': - default: - $this->show(); - break; - } - } - - - /** - * Get avatar images in a directory - * - * @access protected - * @return void [Outputs to screen] - */ - protected function _getAvatarImages() - { - $dir = IPSText::alphanumericalClean( urldecode( $this->request['cat'] ), ' ' ); - $images = IPSMember::getFunction()->getHostedAvatarsFromCategory( $dir ); - - IPSDebug::fireBug( 'info', array( 'Directory: ' . $dir ) ); - - if ( $images === FALSE ) - { - $this->returnJsonError($this->lang->words['m_nodir']); - exit(); - } - else - { - $output = $this->html->inline_avatar_images( $images ); - - $this->returnJsonArray( array('html' => $output) ); - } - } - - /** - * Remove user's avatar - * - * @access protected - * @return void [Outputs to screen] - */ - protected function _removeAvatar() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $member_id = intval( $this->request['member_id'] ); - - try - { - IPSMember::getFunction()->removeAvatar( $member_id ); - - $_string = <<returnString( $_string ); - } - catch( Exception $error ) - { - switch ( $error->getMessage() ) - { - case 'NO_MEMBER_ID': - $this->registry->output->showError( $this->lang->words['t_noid'], 1130 ); - break; - case 'NO_PERMISSION': - $this->registry->output->showError( $this->lang->words['t_permav'], 2130, true ); - break; - } - } - } - - - /** - * Show the form - * - * @access protected - * @return void [Outputs to screen] - */ - protected function show() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $name = trim( IPSText::alphanumericalClean( ipsRegistry::$request['name'] ) ); - $member_id = intval( ipsRegistry::$request['member_id'] ); - $output = ''; - - //----------------------------------------- - // Get member data - //----------------------------------------- - - $member = IPSMember::load( $member_id, 'extendedProfile,customFields' ); - - //----------------------------------------- - // Got a member? - //----------------------------------------- - - if ( ! $member['member_id'] ) - { - $this->returnJsonError( $this->lang->words['t_noid'] ); - } - - //----------------------------------------- - // Return the form - //----------------------------------------- - - if ( method_exists( $this->html, $name ) ) - { - $output = $this->html->$name( $member ); - } - else - { - $save_to = ''; - $div_id = ''; - $form_field = ''; - $text = ''; - $description = ''; - $method = ''; - - - switch( $name ) - { - /*case 'inline_warn_level': - $method = 'inline_form_generic'; - $save_to = 'save_generic&field=warn_level'; - $div_id = 'warn_level'; - $form_field = ipsRegistry::getClass('output')->formInput( "generic__field", $member['warn_level'] ); - $text = "Member Warn Level"; - $description = "Make adjustments to the member's overall warn level. This does NOT add a warn log record - you should do so manually using the 'Add New Note' link if you wish to store a log of this adjustment"; - break;*/ - - case 'inline_avatar': - if( !$this->registry->getClass('class_permissions')->checkPermission( 'member_photo', 'members', 'members' ) ) - { - $this->returnJsonError($this->lang->words['m_nopermban']); - } - - $form = array(); - $form['avatar_url'] = ipsRegistry::getClass('output')->formInput( "avatar_url", $member['avatar_type'] == 'url' ? $member['avatar_location'] : '' ); - - $av_categories = array_merge( array( 0 => array( 0, $this->lang->words['m_selectcat'] ) ), IPSMember::getFunction()->getHostedAvatarCategories() ); - - $output = $this->html->inline_avatar_selector( $member, $av_categories ); - break; - } - - if ( ! $output AND $method AND method_exists( $html, $method ) ) - { - $output = $html->$method( $member, $save_to, $div_id, $form_field, $text, $description ); - } - } - - //----------------------------------------- - // Print... - //----------------------------------------- - - $this->returnHtml( $output ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Member property updater (AJAX) + * Last Updated: $Date: 2010-09-24 21:21:39 -0400 (Fri, 24 Sep 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 1st march 2002 + * @version $Revision: 6915 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class admin_forums_ajax_member_editform extends ipsAjaxCommand +{ + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = ipsRegistry::getClass('output')->loadTemplate('cp_skin_member_form'); + + //----------------------------------------- + // Load lang + //----------------------------------------- + + ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_forums', 'admin_member_form' ) ); + + switch( $this->request['do'] ) + { + case 'remove_avatar': + $this->_removeAvatar(); + break; + + case 'get_avatar_images': + $this->_getAvatarImages(); + break; + + case 'show': + default: + $this->show(); + break; + } + } + + + /** + * Get avatar images in a directory + * + * @access protected + * @return void [Outputs to screen] + */ + protected function _getAvatarImages() + { + $dir = IPSText::alphanumericalClean( urldecode( $this->request['cat'] ), ' ' ); + $images = IPSMember::getFunction()->getHostedAvatarsFromCategory( $dir ); + + IPSDebug::fireBug( 'info', array( 'Directory: ' . $dir ) ); + + if ( $images === FALSE ) + { + $this->returnJsonError($this->lang->words['m_nodir']); + exit(); + } + else + { + $output = $this->html->inline_avatar_images( $images ); + + $this->returnJsonArray( array('html' => $output) ); + } + } + + /** + * Remove user's avatar + * + * @access protected + * @return void [Outputs to screen] + */ + protected function _removeAvatar() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval( $this->request['member_id'] ); + + try + { + IPSMember::getFunction()->removeAvatar( $member_id ); + + $_string = <<returnString( $_string ); + } + catch( Exception $error ) + { + switch ( $error->getMessage() ) + { + case 'NO_MEMBER_ID': + $this->registry->output->showError( $this->lang->words['t_noid'], 1130 ); + break; + case 'NO_PERMISSION': + $this->registry->output->showError( $this->lang->words['t_permav'], 2130, true ); + break; + } + } + } + + + /** + * Show the form + * + * @access protected + * @return void [Outputs to screen] + */ + protected function show() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $name = trim( IPSText::alphanumericalClean( ipsRegistry::$request['name'] ) ); + $member_id = intval( ipsRegistry::$request['member_id'] ); + $output = ''; + + //----------------------------------------- + // Get member data + //----------------------------------------- + + $member = IPSMember::load( $member_id, 'extendedProfile,customFields' ); + + //----------------------------------------- + // Got a member? + //----------------------------------------- + + if ( ! $member['member_id'] ) + { + $this->returnJsonError( $this->lang->words['t_noid'] ); + } + + //----------------------------------------- + // Return the form + //----------------------------------------- + + if ( method_exists( $this->html, $name ) ) + { + $output = $this->html->$name( $member ); + } + else + { + $save_to = ''; + $div_id = ''; + $form_field = ''; + $text = ''; + $description = ''; + $method = ''; + + + switch( $name ) + { + /*case 'inline_warn_level': + $method = 'inline_form_generic'; + $save_to = 'save_generic&field=warn_level'; + $div_id = 'warn_level'; + $form_field = ipsRegistry::getClass('output')->formInput( "generic__field", $member['warn_level'] ); + $text = "Member Warn Level"; + $description = "Make adjustments to the member's overall warn level. This does NOT add a warn log record - you should do so manually using the 'Add New Note' link if you wish to store a log of this adjustment"; + break;*/ + + case 'inline_avatar': + if( !$this->registry->getClass('class_permissions')->checkPermission( 'member_photo', 'members', 'members' ) ) + { + $this->returnJsonError($this->lang->words['m_nopermban']); + } + + $form = array(); + $form['avatar_url'] = ipsRegistry::getClass('output')->formInput( "avatar_url", $member['avatar_type'] == 'url' ? $member['avatar_location'] : '' ); + + $av_categories = array_merge( array( 0 => array( 0, $this->lang->words['m_selectcat'] ) ), IPSMember::getFunction()->getHostedAvatarCategories() ); + + $output = $this->html->inline_avatar_selector( $member, $av_categories ); + break; + } + + if ( ! $output AND $method AND method_exists( $this->html, $method ) ) + { + $output = $this->html->$method( $member, $save_to, $div_id, $form_field, $text, $description ); + } + } + + //----------------------------------------- + // Print... + //----------------------------------------- + + $this->returnHtml( $output ); + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/attachments/defaultSection.php b/upload/admin/applications/forums/modules_admin/attachments/defaultSection.php index 0dfca673..63705d72 100644 --- a/upload/admin/applications/forums/modules_admin/attachments/defaultSection.php +++ b/upload/admin/applications/forums/modules_admin/attachments/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Default section for attachments module - * Last Updated: $LastChangedDate: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 14th May 2003 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ */ if ( ! defined( 'IN_IPB' ) ) diff --git a/upload/admin/applications/forums/modules_admin/attachments/index.html b/upload/admin/applications/forums/modules_admin/attachments/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_admin/attachments/index.html +++ b/upload/admin/applications/forums/modules_admin/attachments/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/attachments/search.php b/upload/admin/applications/forums/modules_admin/attachments/search.php index ed34b230..a834e130 100644 --- a/upload/admin/applications/forums/modules_admin/attachments/search.php +++ b/upload/admin/applications/forums/modules_admin/attachments/search.php @@ -1,359 +1,362 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_forums_attachments_search extends ipsCommand -{ - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /** - * Shortcut for url - * - * @access private - * @var string URL shortcut - */ - private $form_code; - - /** - * Shortcut for url (javascript) - * - * @access private - * @var string JS URL shortcut - */ - private $form_code_js; - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load HTML and language bits - //----------------------------------------- - $this->html = $this->registry->output->loadTemplate( 'cp_skin_attachments' ); - $this->lang->loadLanguageFile( array( 'admin_attachments' ) ); - - //----------------------------------------- - // Set up stuff - //----------------------------------------- - - $this->form_code = $this->html->form_code = 'module=attachments&section=search'; - $this->form_code_js = $this->html->form_code_js = 'module=attachments§ion=search'; - - //----------------------------------------- - // StRT! - //----------------------------------------- - - switch( $this->request['do'] ) - { - case 'attach_search_complete': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'view_attachments' ); - $this->_searchResults(); - break; - - case 'attach_bulk_remove': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'remove_attachments' ); - $this->_bulkRemoveAttachments(); - break; - - case 'overview': - case 'search': - default: - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'view_attachments' ); - $this->_searchForm(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Bulk remove attachments - * - * @access private - * @return void [Outputs to screen] - */ - private function _bulkRemoveAttachments() - { - foreach ( $_POST as $key => $value ) - { - if ( preg_match( "/^attach_(\d+)$/", $key, $match ) ) - { - if ( $this->request[ $match[0] ] ) - { - $ids[] = $match[1]; - } - } - } - - $ids = IPSLib::cleanIntArray( $ids ); - $attach_tid = array(); - - if ( count( $ids ) ) - { - //----------------------------------------- - // Get attach details? - //----------------------------------------- - - $this->DB->build( array( - 'select' => 'a.*', - 'from' => array( 'attachments' => 'a' ), - 'where' => "a.attach_rel_id > 0 AND a.attach_id IN(" . implode( ",", $ids ) . ")", - 'add_join' => array( - array( - 'select' => 'p.pid, p.topic_id', - 'from' => array( 'posts' => 'p' ), - 'where' => "p.pid=a.attach_rel_id AND attach_rel_module='post'", - 'type' => 'left', - ), - ) - ) ); - $this->DB->execute(); - - while ( $killmeh = $this->DB->fetch() ) - { - if ( $killmeh['attach_location'] ) - { - @unlink( $this->settings['upload_dir'] . "/" . $killmeh['attach_location'] ); - } - - if ( $killmeh['attach_thumb_location'] ) - { - @unlink( $this->settings['upload_dir'] . "/" . $killmeh['attach_thumb_location'] ); - } - - $attach_tid[ $killmeh['topic_id'] ] = $killmeh['topic_id']; - } - - $this->DB->delete( 'attachments', "attach_id IN(" . implode( ",", $ids ) . ")" ); - - $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['deleted_attachments'], implode( ",", $ids ) ) ); - - //----------------------------------------- - // Recount topic upload marker - //----------------------------------------- - - require_once( IPSLib::getAppDir('forums') . '/sources/classes/post/classPost.php' ); - - $postlib = new classPost( $this->registry ); - - foreach( $attach_tid as $tid ) - { - if( $tid ) - { - $postlib->recountTopicAttachments( $tid ); - } - } - - $this->registry->output->global_message = $this->lang->words['attachments_removed']; - } - else - { - $this->registry->output->global_message = $this->lang->words['noattach_to_remove']; - } - - if ( $this->request['return'] == 'stats' ) - { - $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . 'module=attachments§ion=stats' ); - } - else - { - if ( $_POST['url'] ) - { - foreach( explode( '&', $_POST['url'] ) as $u ) - { - list ( $k, $v ) = explode( '=', $u ); - - $this->request[ $k] = $v ; - } - } - - $this->_searchResults(); - } - } - - - /** - * Attachment search results - * - * @access private - * @return void [Outputs to screen] - */ - private function _searchResults() - { - $show = intval($this->request['show']); - $show = $show > 100 ? 100 : $show; - - //----------------------------------------- - // Build URL - //----------------------------------------- - - $url = ""; - $url_components = array( 'extension', 'filesize', 'filesize_gt', 'days', 'days_gt', 'hits', 'hits_gt', 'filename', 'authorname', 'onlyimage', 'orderby', 'sort', 'show' ); - - foreach( $url_components as $u ) - { - $url .= $u . '=' . $this->request[ $u ] . '&'; - } - - //----------------------------------------- - // Build Query - //----------------------------------------- - - $queryfinal = ""; - $query = array(); - - if ( $this->request['extension'] ) - { - $query[] = 'a.attach_ext="' . mb_strtolower( str_replace( ".", "", $this->request['extension'] ) ) . '"'; - } - - if ( $this->request['filesize'] ) - { - $gt = $this->request['filesize_gt'] == 'gt' ? '>=' : '<'; - - $query[] = "a.attach_filesize {$gt} " . intval( $this->request['filesize']*1024 ); - } - - if ( $this->request['days'] ) - { - $day_break = time() - intval( $this->request['days'] * 86400 ); - - $gt = $this->request['days_gt'] == 'lt' ? '>=' : '<'; - - $query[] = "a.attach_date {$gt} {$day_break}"; - } - - if ( $this->request['hits'] ) - { - $gt = $this->request['hits_gt'] == 'gt' ? '>=' : '<'; - - $query[] = "a.attach_hits {$gt} " . intval($this->request['hits']); - } - - if ( $this->request['filename'] ) - { - $query[] = 'LOWER(a.attach_file) LIKE "%' . mb_strtolower( $this->request['filename'] ) . '%"'; - } - - if ( $this->request['authorname'] ) - { - $query[] = 'LOWER(p.author_name) LIKE "%' . mb_strtolower( $this->request['authorname'] ) . '%"'; - } - - if ( $this->request['onlyimage'] ) - { - $query[] = 'a.attach_is_image=1'; - } - - if ( count($query) ) - { - $queryfinal = 'AND '. implode( " AND ", $query ); - } - - $rows = array(); - - $this->DB->build( array( 'select' => 'a.*', - 'from' => array( 'attachments' => 'a' ), - 'where' => "attach_rel_module='post'".$queryfinal, - 'add_join' => array( - 0 => array( 'select' => 'p.author_id, p.author_name, p.post_date', - 'from' => array( 'posts' => 'p' ), - 'where' => 'p.pid=a.attach_rel_id', - 'type' => 'left' ), - 1 => array( 'select' => 't.tid, t.forum_id, t.title', - 'from' => array( 'topics' => 't' ), - 'where' => 'p.topic_id=t.tid', - 'type' => 'left' ), - 2 => array( 'select' => 'm.members_display_name', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=a.attach_member_id', - 'type' => 'left' ) - ), - 'order' => "a.attach_" . $this->request['orderby'] . " " . $this->request['sort'], - 'limit' => array( 0, $show ) ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $r['stitle'] = $r['title'] ? "" . IPSText::truncate( $r['title'], 30 ) . "" : $this->lang->words['attach_not_topic']; - $r['attach_filesize'] = IPSLib::sizeFormat($r['attach_filesize']); - $r['attach_date'] = ipsRegistry::getClass( 'class_localization')->getDate( $r['attach_date'], 'SHORT', 1 ); - - $rows[] = $r; - } - - $this->registry->output->html .= $this->html->attachmentSearchResults( $url, $rows ); - } - - /** - * Show attachment search form - * - * @access private - * @return void [Outputs to screen] - */ - private function _searchForm() - { - $gt_array = array( 0 => array( 'gt', $this->lang->words['se_morethan'] ), 1 => array( 'lt', $this->lang->words['se_lessthan'] ) ); - - //----------------------------------------- - // FORM - //----------------------------------------- - - $form['extension'] = $this->registry->output->formSimpleInput( 'extension', isset($_POST['extension']) ? $_POST['extension'] : '', 10 ); - $form['filesize_gt'] = $this->registry->output->formDropdown( 'filesize_gt', $gt_array, isset($_POST['filesize_gt']) ? $_POST['filesize_gt'] : '' ); - $form['filesize'] = $this->registry->output->formSimpleInput( 'filesize', isset($_POST['filesize']) ? $_POST['filesize'] : '', 10 ); - $form['days_gt'] = $this->registry->output->formDropdown( 'days_gt', $gt_array, isset($_POST['days_gt']) ? $_POST['days_gt'] : '' ); - $form['days'] = $this->registry->output->formSimpleInput( 'days', isset($_POST['days']) ? $_POST['days'] : '', 10 ); - $form['hits_gt'] = $this->registry->output->formDropdown( 'hits_gt', $gt_array, isset($_POST['hits_gt']) ? $_POST['hits_gt'] : '' ); - $form['hits'] = $this->registry->output->formSimpleInput( 'hits', isset($_POST['hits']) ? $_POST['hits'] : '', 10 ); - $form['filename'] = $this->registry->output->formInput( 'filename', isset($_POST['filename']) ? $_POST['filename'] : '' ); - $form['authorname'] = $this->registry->output->formInput( 'authorname', isset($_POST['authorname']) ? $_POST['authorname'] : '' ); - $form['onlyimage'] = $this->registry->output->formYesNo( 'onlyimage', isset($_POST['onlyimage']) ? $_POST['onlyimage'] : '' ); - $form['orderby'] = $this->registry->output->formDropdown( 'orderby', array( 0 => array( 'date' , $this->lang->words['se_odate'] ), - 1 => array( 'hits' , $this->lang->words['se_oviews'] ), - 2 => array( 'filesize', $this->lang->words['se_osize'] ), - 3 => array( 'file' , $this->lang->words['se_oname'] ), - ), isset($_POST['orderby']) ? $_POST['orderby'] : '' ); - $form['sort'] = $this->registry->output->formDropdown( 'sort' , array( 0 => array( 'desc' , $this->lang->words['se_odsc'] ), - 1 => array( 'asc' , $this->lang->words['se_oasc'] ), - ), isset($_POST['sort']) ? $_POST['sort'] : '' ); - $form['show'] = $this->registry->output->formSimpleInput( 'show', isset($_POST['show']) ? $_POST['show'] : 25, 10 ); - - - $this->registry->output->html .= $this->html->attachmentSearchForm( $form ); - - } - + + * Invision Power Services + * IP.Board v3.1.4 + * Attachments: Search + * Last Updated: $LastChangedDate: 2010-10-01 20:18:21 -0400 (Fri, 01 Oct 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since Mon 24th May 2004 + * @version $Rev: 6937 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_forums_attachments_search extends ipsCommand +{ + /** + * Skin object + * + * @access private + * @var object Skin templates + */ + private $html; + + /** + * Shortcut for url + * + * @access private + * @var string URL shortcut + */ + private $form_code; + + /** + * Shortcut for url (javascript) + * + * @access private + * @var string JS URL shortcut + */ + private $form_code_js; + + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load HTML and language bits + //----------------------------------------- + $this->html = $this->registry->output->loadTemplate( 'cp_skin_attachments' ); + $this->lang->loadLanguageFile( array( 'admin_attachments' ) ); + + //----------------------------------------- + // Set up stuff + //----------------------------------------- + + $this->form_code = $this->html->form_code = 'module=attachments&section=search'; + $this->form_code_js = $this->html->form_code_js = 'module=attachments§ion=search'; + + //----------------------------------------- + // StRT! + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'attach_search_complete': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'view_attachments' ); + $this->_searchResults(); + break; + + case 'attach_bulk_remove': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'remove_attachments' ); + $this->_bulkRemoveAttachments(); + break; + + case 'overview': + case 'search': + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'view_attachments' ); + $this->_searchForm(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Bulk remove attachments + * + * @access private + * @return void [Outputs to screen] + */ + private function _bulkRemoveAttachments() + { + foreach ( $_POST as $key => $value ) + { + if ( preg_match( "/^attach_(\d+)$/", $key, $match ) ) + { + if ( $this->request[ $match[0] ] ) + { + $ids[] = $match[1]; + } + } + } + + $ids = IPSLib::cleanIntArray( $ids ); + $attach_tid = array(); + + if ( count( $ids ) ) + { + //----------------------------------------- + // Get attach details? + //----------------------------------------- + + $this->DB->build( array( + 'select' => 'a.*', + 'from' => array( 'attachments' => 'a' ), + 'where' => "a.attach_rel_id > 0 AND a.attach_id IN(" . implode( ",", $ids ) . ")", + 'add_join' => array( + array( + 'select' => 'p.pid, p.topic_id', + 'from' => array( 'posts' => 'p' ), + 'where' => "p.pid=a.attach_rel_id AND attach_rel_module='post'", + 'type' => 'left', + ), + ) + ) ); + $this->DB->execute(); + + while ( $killmeh = $this->DB->fetch() ) + { + if ( $killmeh['attach_location'] ) + { + @unlink( $this->settings['upload_dir'] . "/" . $killmeh['attach_location'] ); + } + + if ( $killmeh['attach_thumb_location'] ) + { + @unlink( $this->settings['upload_dir'] . "/" . $killmeh['attach_thumb_location'] ); + } + + $attach_tid[ $killmeh['topic_id'] ] = $killmeh['topic_id']; + } + + $this->DB->delete( 'attachments', "attach_id IN(" . implode( ",", $ids ) . ")" ); + + $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['deleted_attachments'], implode( ",", $ids ) ) ); + + //----------------------------------------- + // Recount topic upload marker + //----------------------------------------- + + require_once( IPSLib::getAppDir('forums') . '/sources/classes/post/classPost.php' ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPostForms.php', 'classPostForms', 'forums' ); + + $postlib = new $classToLoad( $this->registry ); + + foreach( $attach_tid as $tid ) + { + if( $tid ) + { + $postlib->recountTopicAttachments( $tid ); + } + } + + $this->registry->output->global_message = $this->lang->words['attachments_removed']; + } + else + { + $this->registry->output->global_message = $this->lang->words['noattach_to_remove']; + } + + if ( $this->request['return'] == 'stats' ) + { + $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . 'module=attachments§ion=stats' ); + } + else + { + if ( $_POST['url'] ) + { + foreach( explode( '&', $_POST['url'] ) as $u ) + { + list ( $k, $v ) = explode( '=', $u ); + + $this->request[ $k] = $v ; + } + } + + $this->_searchResults(); + } + } + + + /** + * Attachment search results + * + * @access private + * @return void [Outputs to screen] + */ + private function _searchResults() + { + $show = intval($this->request['show']); + $show = $show > 100 ? 100 : $show; + + //----------------------------------------- + // Build URL + //----------------------------------------- + + $url = ""; + $url_components = array( 'extension', 'filesize', 'filesize_gt', 'days', 'days_gt', 'hits', 'hits_gt', 'filename', 'authorname', 'onlyimage', 'orderby', 'sort', 'show' ); + + foreach( $url_components as $u ) + { + $url .= $u . '=' . $this->request[ $u ] . '&'; + } + + //----------------------------------------- + // Build Query + //----------------------------------------- + + $queryfinal = ""; + $query = array(); + + if ( $this->request['extension'] ) + { + $query[] = 'a.attach_ext="' . mb_strtolower( str_replace( ".", "", $this->request['extension'] ) ) . '"'; + } + + if ( $this->request['filesize'] ) + { + $gt = $this->request['filesize_gt'] == 'gt' ? '>=' : '<'; + + $query[] = "a.attach_filesize {$gt} " . intval( $this->request['filesize']*1024 ); + } + + if ( $this->request['days'] ) + { + $day_break = time() - intval( $this->request['days'] * 86400 ); + + $gt = $this->request['days_gt'] == 'lt' ? '>=' : '<'; + + $query[] = "a.attach_date {$gt} {$day_break}"; + } + + if ( $this->request['hits'] ) + { + $gt = $this->request['hits_gt'] == 'gt' ? '>=' : '<'; + + $query[] = "a.attach_hits {$gt} " . intval($this->request['hits']); + } + + if ( $this->request['filename'] ) + { + $query[] = $this->DB->buildLower('a.attach_file') . ' LIKE "%' . mb_strtolower( $this->request['filename'] ) . '%"'; + } + + if ( $this->request['authorname'] ) + { + $query[] = $this->DB->buildLower('p.author_name') . ' LIKE "%' . mb_strtolower( $this->request['authorname'] ) . '%"'; + } + + if ( $this->request['onlyimage'] ) + { + $query[] = 'a.attach_is_image=1'; + } + + if ( count($query) ) + { + $queryfinal = 'AND '. implode( " AND ", $query ); + } + + $rows = array(); + + $this->DB->build( array( 'select' => 'a.*', + 'from' => array( 'attachments' => 'a' ), + 'where' => "attach_rel_module='post'".$queryfinal, + 'add_join' => array( + 0 => array( 'select' => 'p.author_id, p.author_name, p.post_date', + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.pid=a.attach_rel_id', + 'type' => 'left' ), + 1 => array( 'select' => 't.tid, t.forum_id, t.title', + 'from' => array( 'topics' => 't' ), + 'where' => 'p.topic_id=t.tid', + 'type' => 'left' ), + 2 => array( 'select' => 'm.members_display_name', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=a.attach_member_id', + 'type' => 'left' ) + ), + 'order' => "a.attach_" . $this->request['orderby'] . " " . $this->request['sort'], + 'limit' => array( 0, $show ) ) ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $r['stitle'] = $r['title'] ? "" . IPSText::truncate( $r['title'], 30 ) . "" : $this->lang->words['attach_not_topic']; + $r['attach_filesize'] = IPSLib::sizeFormat($r['attach_filesize']); + $r['attach_date'] = ipsRegistry::getClass( 'class_localization')->getDate( $r['attach_date'], 'SHORT', 1 ); + + $rows[] = $r; + } + + $this->registry->output->html .= $this->html->attachmentSearchResults( $url, $rows ); + } + + /** + * Show attachment search form + * + * @access private + * @return void [Outputs to screen] + */ + private function _searchForm() + { + $gt_array = array( 0 => array( 'gt', $this->lang->words['se_morethan'] ), 1 => array( 'lt', $this->lang->words['se_lessthan'] ) ); + + //----------------------------------------- + // FORM + //----------------------------------------- + + $form['extension'] = $this->registry->output->formSimpleInput( 'extension', isset($_POST['extension']) ? $_POST['extension'] : '', 10 ); + $form['filesize_gt'] = $this->registry->output->formDropdown( 'filesize_gt', $gt_array, isset($_POST['filesize_gt']) ? $_POST['filesize_gt'] : '' ); + $form['filesize'] = $this->registry->output->formSimpleInput( 'filesize', isset($_POST['filesize']) ? $_POST['filesize'] : '', 10 ); + $form['days_gt'] = $this->registry->output->formDropdown( 'days_gt', $gt_array, isset($_POST['days_gt']) ? $_POST['days_gt'] : '' ); + $form['days'] = $this->registry->output->formSimpleInput( 'days', isset($_POST['days']) ? $_POST['days'] : '', 10 ); + $form['hits_gt'] = $this->registry->output->formDropdown( 'hits_gt', $gt_array, isset($_POST['hits_gt']) ? $_POST['hits_gt'] : '' ); + $form['hits'] = $this->registry->output->formSimpleInput( 'hits', isset($_POST['hits']) ? $_POST['hits'] : '', 10 ); + $form['filename'] = $this->registry->output->formInput( 'filename', isset($_POST['filename']) ? $_POST['filename'] : '' ); + $form['authorname'] = $this->registry->output->formInput( 'authorname', isset($_POST['authorname']) ? $_POST['authorname'] : '' ); + $form['onlyimage'] = $this->registry->output->formYesNo( 'onlyimage', isset($_POST['onlyimage']) ? $_POST['onlyimage'] : '' ); + $form['orderby'] = $this->registry->output->formDropdown( 'orderby', array( 0 => array( 'date' , $this->lang->words['se_odate'] ), + 1 => array( 'hits' , $this->lang->words['se_oviews'] ), + 2 => array( 'filesize', $this->lang->words['se_osize'] ), + 3 => array( 'file' , $this->lang->words['se_oname'] ), + ), isset($_POST['orderby']) ? $_POST['orderby'] : '' ); + $form['sort'] = $this->registry->output->formDropdown( 'sort' , array( 0 => array( 'desc' , $this->lang->words['se_odsc'] ), + 1 => array( 'asc' , $this->lang->words['se_oasc'] ), + ), isset($_POST['sort']) ? $_POST['sort'] : '' ); + $form['show'] = $this->registry->output->formSimpleInput( 'show', isset($_POST['show']) ? $_POST['show'] : 25, 10 ); + + + $this->registry->output->html .= $this->html->attachmentSearchForm( $form ); + + } + } \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/attachments/stats.php b/upload/admin/applications/forums/modules_admin/attachments/stats.php index 531082c5..550e06f8 100644 --- a/upload/admin/applications/forums/modules_admin/attachments/stats.php +++ b/upload/admin/applications/forums/modules_admin/attachments/stats.php @@ -1,245 +1,247 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_forums_attachments_stats extends ipsCommand -{ - /** - * Image directory - * - * @access private - * @var string - */ - private $image_dir = ''; - - /** - * HTML object - * - * @access private - * @var object - */ - private $html; - - /** - * Main execution point - * - * @access public - * @param object ipsRegistry reference - * @return void - */ - public function doExecute( ipsRegistry $registry ) - { - /* Load Skin and Lang */ - $this->html = $this->registry->output->loadTemplate( 'cp_skin_attachments' ); - $this->html->form_code = 'module=attachments&section=stats&'; - $this->html->form_code_js = 'module=attachments&section=stats&'; - - $this->lang->loadLanguageFile( array( 'admin_attachments' ) ); - - /* Image Set */ - $this->image_dir = $this->registry->output->skin['set_image_dir']; - - //----------------------------------------- - // StRT! - //----------------------------------------- - - switch( $this->request['do'] ) - { - case 'overview': - case 'stats': - default: - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_attachments' ); - $this->attachmentStatsOverview(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Shows attachment statistics - * - * @access public - * @return void - **/ - public function attachmentStatsOverview() - { - /* Get attachment Types */ - $cache['attachtypes'] = array(); - - $this->DB->build( array( 'select' => 'atype_extension,atype_mimetype,atype_post,atype_photo,atype_img', 'from' => 'attachments_type', 'where' => "atype_photo=1 OR atype_post=1" ) ); - $this->DB->execute(); - - while ( $r = $this->DB->fetch() ) - { - $cache['attachtypes'][ $r['atype_extension'] ] = $r; - } - - $stats = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count, sum(attach_filesize) as sum', 'from' => 'attachments', 'where' => 'attach_rel_module=\'post\'' ) ); - - /* Overall Stats */ - $overall_stats = array( 'total_attachments' => $this->registry->class_localization->formatNumber( $stats['count'] ), 'total_size' => IPSLib::sizeFormat( $stats['sum'] ) ); - - /* Last 5 Attachments */ - $this->DB->build( array( - 'select' => 'a.*', - 'from' => array( 'attachments' => 'a' ), - 'where' => "attach_rel_module='post'", - 'order' => "a.attach_date DESC", - 'limit' => array( 0, 5 ), - 'add_join' => array( - array( - 'select' => 'p.author_id, p.author_name, p.post_date', - 'from' => array( 'posts' => 'p' ), - 'where' => 'p.pid=a.attach_rel_id', - 'type' => 'left' - ), - array( - 'select' => 't.tid, t.forum_id, t.title', - 'from' => array( 'topics' => 't' ), - 'where' => 'p.topic_id=t.tid', - 'type' => 'left' - ), - array( - 'select' => 'm.members_display_name', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=a.attach_member_id', - 'type' => 'left' - ) - ) - ) ); - - $this->DB->execute(); - - /* Loop through the last 5 */ - $last_5 = array(); - - while ( $r = $this->DB->fetch() ) - { - /* Format Fields */ - $r['stitle'] = $r['title'] ? "" . IPSText::truncate( $r['title'], 30 ) . "" : $this->lang->words['attach_not_topic']; - $r['_icon'] = $this->settings['mime_img'] . '/' . $cache['attachtypes'][ $r['attach_ext'] ]['atype_img']; - $r['attach_filesize'] = IPSLib::sizeFormat( $r['attach_filesize'] ); - $r['post_date'] = $this->registry->class_localization->getDate( $r['attach_date'], 'SHORT', 1 ); - - /* Add to output array */ - $last_5[] = $r; - } - - /* Largest 5 Attachments */ - $this->DB->build( array( - 'select' => 'a.*', - 'from' => array( 'attachments' => 'a' ), - 'where' => "attach_rel_module='post'", - 'order' => "a.attach_filesize DESC", - 'limit' => array( 0, 5 ), - 'add_join' => array( - array( - 'select' => 'p.author_id, p.author_name, p.post_date', - 'from' => array( 'posts' => 'p' ), - 'where' => 'p.pid=a.attach_rel_id', - 'type' => 'left' - ), - array( - 'select' => 't.tid, t.forum_id, t.title', - 'from' => array( 'topics' => 't' ), - 'where' => 'p.topic_id=t.tid', - 'type' => 'left' - ), - array( - 'select' => 'm.members_display_name', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=a.attach_member_id', - 'type' => 'left' - ) - ) - ) ); - - $this->DB->execute(); - - /* Loop through the last 5 */ - $largest_5 = array(); - - while( $r = $this->DB->fetch() ) - { - /* Format Fields */ - $r['stitle'] = $r['title'] ? "" . IPSText::truncate( $r['title'], 30 ) . "" : $this->lang->words['attach_not_topic']; - $r['_icon'] = $this->settings['mime_img'] . '/' . $cache['attachtypes'][ $r['attach_ext'] ]['atype_img']; - $r['attach_filesize'] = IPSLib::sizeFormat( $r['attach_filesize'] ); - $r['post_date'] = $this->registry->class_localization->getDate( $r['attach_date'], 'SHORT', 1 ); - - /* Add to output array */ - $largest_5[] = $r; - } - - /* 5 Most Viewed Downloads */ - $this->DB->build( array( - 'select' => 'a.*', - 'from' => array( 'attachments' => 'a' ), - 'where' => "attach_rel_module='post'", - 'order' => "a.attach_hits DESC", - 'limit' => array( 0, 5 ), - 'add_join' => array( - array( - 'select' => 'p.author_id, p.author_name, p.post_date', - 'from' => array( 'posts' => 'p' ), - 'where' => 'p.pid=a.attach_rel_id', - 'type' => 'left' - ), - array( - 'select' => 't.tid, t.forum_id, t.title', - 'from' => array( 'topics' => 't' ), - 'where' => 'p.topic_id=t.tid', - 'type' => 'left' - ), - array( - 'select' => 'm.members_display_name', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=a.attach_member_id', - 'type' => 'left' - ) - ) - ) ); - - $this->DB->execute(); - - /* Loop through the last 5 */ - $most_viewed_5 = array(); - - while( $r = $this->DB->fetch() ) - { - /* Format Fields */ - $r['stitle'] = $r['title'] ? "" . IPSText::truncate( $r['title'], 30 ) . "" : $this->lang->words['attach_not_topic']; - $r['_icon'] = $this->settings['mime_img'] . '/' . $cache['attachtypes'][ $r['attach_ext'] ]['atype_img']; - $r['attach_filesize'] = IPSLib::sizeFormat( $r['attach_filesize'] ); - $r['post_date'] = $this->registry->class_localization->getDate( $r['attach_date'], 'SHORT', 1 ); - - /* Add to output array */ - $most_viewed_5[] = $r; - } - - /* Output */ - $this->registry->output->html .= $this->html->attachmentStats( $overall_stats, $last_5, $largest_5, $most_viewed_5 ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Attachments: Stats + * Last Updated: $LastChangedDate: 2010-02-18 20:29:54 -0500 (Thu, 18 Feb 2010) $ + * + * + * @author $Author: josh $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since Mon 24th May 2004 + * @version $Rev: 5855 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_forums_attachments_stats extends ipsCommand +{ + /** + * Image directory + * + * @access private + * @var string + */ + private $image_dir = ''; + + /** + * HTML object + * + * @access private + * @var object + */ + private $html; + + /** + * Main execution point + * + * @access public + * @param object ipsRegistry reference + * @return void + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load Skin and Lang */ + $this->html = $this->registry->output->loadTemplate( 'cp_skin_attachments' ); + $this->html->form_code = 'module=attachments&section=stats&'; + $this->html->form_code_js = 'module=attachments&section=stats&'; + + $this->lang->loadLanguageFile( array( 'admin_attachments' ) ); + + /* Image Set */ + $this->image_dir = $this->registry->output->skin['set_image_dir']; + + //----------------------------------------- + // StRT! + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'overview': + case 'stats': + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_attachments' ); + $this->attachmentStatsOverview(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Shows attachment statistics + * + * @access public + * @return void + **/ + public function attachmentStatsOverview() + { + /* Get attachment Types */ + $cache['attachtypes'] = array(); + + $this->DB->build( array( 'select' => 'atype_extension,atype_mimetype,atype_post,atype_photo,atype_img', 'from' => 'attachments_type', 'where' => "atype_photo=1 OR atype_post=1" ) ); + $this->DB->execute(); + + while ( $r = $this->DB->fetch() ) + { + $cache['attachtypes'][ $r['atype_extension'] ] = $r; + } + + $stats = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count, sum(attach_filesize) as sum', 'from' => 'attachments', 'where' => 'attach_rel_module=\'post\'' ) ); + + /* Overall Stats */ + $overall_stats = array( 'total_attachments' => $this->registry->class_localization->formatNumber( $stats['count'] ), 'total_size' => IPSLib::sizeFormat( $stats['sum'] ) ); + + /* Last 5 Attachments */ + $this->DB->build( array( + 'select' => 'a.*', + 'from' => array( 'attachments' => 'a' ), + 'where' => "attach_rel_module='post'", + 'order' => "a.attach_date DESC", + 'limit' => array( 0, 5 ), + 'add_join' => array( + array( + 'select' => 'p.author_id, p.author_name, p.post_date', + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.pid=a.attach_rel_id', + 'type' => 'left' + ), + array( + 'select' => 't.tid, t.forum_id, t.title', + 'from' => array( 'topics' => 't' ), + 'where' => 'p.topic_id=t.tid', + 'type' => 'left' + ), + array( + 'select' => 'm.members_display_name', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=a.attach_member_id', + 'type' => 'left' + ) + ) + ) ); + + $this->DB->execute(); + + /* Loop through the last 5 */ + $last_5 = array(); + + while ( $r = $this->DB->fetch() ) + { + /* Format Fields */ + $r['stitle'] = $r['title'] ? "" . IPSText::truncate( $r['title'], 30 ) . "" : $this->lang->words['attach_not_topic']; + $r['_icon'] = $this->settings['mime_img'] . '/' . $cache['attachtypes'][ $r['attach_ext'] ]['atype_img']; + $r['attach_filesize'] = IPSLib::sizeFormat( $r['attach_filesize'] ); + $r['post_date'] = $this->registry->class_localization->getDate( $r['attach_date'], 'SHORT', 1 ); + + /* Add to output array */ + $last_5[] = $r; + } + + /* Largest 5 Attachments */ + $this->DB->build( array( + 'select' => 'a.*', + 'from' => array( 'attachments' => 'a' ), + 'where' => "attach_rel_module='post'", + 'order' => "a.attach_filesize DESC", + 'limit' => array( 0, 5 ), + 'add_join' => array( + array( + 'select' => 'p.author_id, p.author_name, p.post_date', + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.pid=a.attach_rel_id', + 'type' => 'left' + ), + array( + 'select' => 't.tid, t.forum_id, t.title', + 'from' => array( 'topics' => 't' ), + 'where' => 'p.topic_id=t.tid', + 'type' => 'left' + ), + array( + 'select' => 'm.members_display_name', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=a.attach_member_id', + 'type' => 'left' + ) + ) + ) ); + + $this->DB->execute(); + + /* Loop through the last 5 */ + $largest_5 = array(); + + while( $r = $this->DB->fetch() ) + { + /* Format Fields */ + $r['stitle'] = $r['title'] ? "" . IPSText::truncate( $r['title'], 30 ) . "" : $this->lang->words['attach_not_topic']; + $r['_icon'] = $this->settings['mime_img'] . '/' . $cache['attachtypes'][ $r['attach_ext'] ]['atype_img']; + $r['attach_filesize'] = IPSLib::sizeFormat( $r['attach_filesize'] ); + $r['post_date'] = $this->registry->class_localization->getDate( $r['attach_date'], 'SHORT', 1 ); + + /* Add to output array */ + $largest_5[] = $r; + } + + /* 5 Most Viewed Downloads */ + $this->DB->build( array( + 'select' => 'a.*', + 'from' => array( 'attachments' => 'a' ), + 'where' => "attach_rel_module='post'", + 'order' => "a.attach_hits DESC", + 'limit' => array( 0, 5 ), + 'add_join' => array( + array( + 'select' => 'p.author_id, p.author_name, p.post_date', + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.pid=a.attach_rel_id', + 'type' => 'left' + ), + array( + 'select' => 't.tid, t.forum_id, t.title', + 'from' => array( 'topics' => 't' ), + 'where' => 'p.topic_id=t.tid', + 'type' => 'left' + ), + array( + 'select' => 'm.members_display_name', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=a.attach_member_id', + 'type' => 'left' + ) + ) + ) ); + + $this->DB->execute(); + + /* Loop through the last 5 */ + $most_viewed_5 = array(); + + while( $r = $this->DB->fetch() ) + { + /* Format Fields */ + $r['stitle'] = $r['title'] ? "" . IPSText::truncate( $r['title'], 30 ) . "" : $this->lang->words['attach_not_topic']; + $r['_icon'] = $this->settings['mime_img'] . '/' . $cache['attachtypes'][ $r['attach_ext'] ]['atype_img']; + $r['attach_filesize'] = IPSLib::sizeFormat( $r['attach_filesize'] ); + $r['post_date'] = $this->registry->class_localization->getDate( $r['attach_date'], 'SHORT', 1 ); + + /* Add to output array */ + $most_viewed_5[] = $r; + } + + /* Output */ + $this->registry->output->html .= $this->html->attachmentStats( $overall_stats, $last_5, $largest_5, $most_viewed_5 ); + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/attachments/types.php b/upload/admin/applications/forums/modules_admin/attachments/types.php index 5bba0ead..cc9459c2 100644 --- a/upload/admin/applications/forums/modules_admin/attachments/types.php +++ b/upload/admin/applications/forums/modules_admin/attachments/types.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Attachments: Manage - * Last Updated: $LastChangedDate: 2009-10-01 10:02:08 -0400 (Thu, 01 Oct 2009) $ + * Last Updated: $LastChangedDate: 2010-06-28 20:04:10 -0400 (Mon, 28 Jun 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Mon 24th May 2004 - * @version $Rev: 5190 $ + * @version $Rev: 6584 $ */ if ( ! defined( 'IN_ACP' ) ) @@ -445,6 +447,7 @@ class admin_forums_attachments_types extends ipsCommand while ( $r = $this->DB->fetch() ) { + $r['atype_extension'] = strtolower( $r['atype_extension'] ); $cache[ $r['atype_extension'] ] = $r; } diff --git a/upload/admin/applications/forums/modules_admin/attachments/xml/index.html b/upload/admin/applications/forums/modules_admin/attachments/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_admin/attachments/xml/index.html +++ b/upload/admin/applications/forums/modules_admin/attachments/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/forums/defaultSection.php b/upload/admin/applications/forums/modules_admin/forums/defaultSection.php index 72ac4974..978d84a2 100644 --- a/upload/admin/applications/forums/modules_admin/forums/defaultSection.php +++ b/upload/admin/applications/forums/modules_admin/forums/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Default section setting - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Tuesday 17th August 2004 - * @version $Revision: 4948 $ + * @version $Revision: 5713 $ * */ diff --git a/upload/admin/applications/forums/modules_admin/forums/forums.php b/upload/admin/applications/forums/modules_admin/forums/forums.php index cfd3796b..2335d3aa 100644 --- a/upload/admin/applications/forums/modules_admin/forums/forums.php +++ b/upload/admin/applications/forums/modules_admin/forums/forums.php @@ -1,1634 +1,1688 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_forums_forums_forums extends ipsCommand -{ - /** - * Skin HTML object - * - * @access private - * @var object - */ - private $html; - - /** - * Forum functions object - * - * @access private - * @var object - */ - private $forum_functions; - - /** - * Main entry point - * - * @access public - * @param object ipsRegistry reference - * @return void Outputs to screen - **/ - public function doExecute( ipsRegistry $registry ) - { - /* Forum functions set up */ - - require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" ); - require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/forums/admin_forum_functions.php' ); - - $this->forum_functions = new admin_forum_functions( $registry ); - $this->forum_functions->forumsInit(); - - $this->request['showall'] = intval( $this->request['showall'] ); - - //----------------------------------------- - // Load skin & lang - //----------------------------------------- - - $this->html = $this->registry->output->loadTemplate( 'cp_skin_forums' ); - $this->html->form_code = 'module=forums&section=forums&'; - $this->html->form_code_js = 'module=forums&section=forums&'; - - $this->lang->loadLanguageFile( array( 'admin_forums' ) ); - - //----------------------------------------- - // LOAD HTML - //----------------------------------------- - - $this->forum_functions->html =& $this->html; - - //----------------------------------------- - // To do... - //----------------------------------------- - - switch( $this->request['do'] ) - { - case 'forum_add': - case 'new': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_add' ); - $this->forumForm( 'new' ); - break; - case 'donew': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_add' ); - $this->forumSave( 'new' ); - break; - //------------------- ---------------------- - case 'edit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_edit' ); - $this->forumForm( 'edit' ); - break; - case 'doedit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_edit' ); - $this->forumSave( 'edit' ); - break; - //----------------------------------------- - case 'pedit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_permissions' ); - $this->permEditForm(); - break; - case 'pdoedit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_permissions' ); - $this->permDoEdit(); - break; - //----------------------------------------- - case 'doreorder': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_reorder' ); - $this->doReorder(); - break; - //----------------------------------------- - case 'delete': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_delete' ); - $this->deleteForm(); - break; - case 'dodelete': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_delete' ); - $this->doDelete(); - break; - //----------------------------------------- - case 'recount': - $this->recount(); - break; - //----------------------------------------- - case 'empty': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_empty' ); - $this->emptyForum(); - break; - case 'doempty': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_empty' ); - $this->doEmpty(); - break; - //----------------------------------------- - case 'frules': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_rules' ); - $this->showRules(); - break; - case 'dorules': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_rules' ); - $this->doRules(); - break; - //----------------------------------------- - case 'skinedit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_skins' ); - $this->skinEdit(); - break; - case 'doskinedit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_skins' ); - $this->doSkinEdit(); - break; - //----------------------------------------- - case 'forums_overview': - default: - $this->request['do'] = 'forums_overview'; - $this->showForums(); - break; - } - - //----------------------------------------- - // Pass to CP output hander - //----------------------------------------- - - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Edit skins assigned to forums - * - * @access public - * @return void Outputs to screen - **/ - public function skinEdit() - { - /* INI */ - $this->request['f'] = intval( $this->request['f'] ); - - if( $this->request['f'] == "" ) - { - $this->registry->output->showError( $this->lang->words['for_noid'], 1131 ); - } - - /* Forum Data */ - $forum = $this->forum_functions->forum_by_id[ $this->request['f'] ]; - - /* Check the forum */ - if ( ! $forum['id'] ) - { - $this->registry->output->showError( $this->lang->words['for_noid'], 1132 ); - } - - if ( ! $forum['skin_id'] ) - { - $forum['skin_id'] = -1; - } - - /* Skins */ - $skin_list = array_merge( array( array( -1, $this->lang->words['for_noneall'] ) ), $this->registry->output->generateSkinDropdown() ); - - /* Form Data */ - $forum['fsid'] = $this->registry->output->formDropdown( 'fsid', $skin_list, $forum['skin_id'] ); - $forum['apply_to_children'] = $this->registry->output->formYesNo( 'apply_to_children' ); - - /* Output */ - $this->registry->output->html .= $this->html->forumSkinOptions( $this->request['f'], $forum ); - } - - /** - * Save the skin assigned to the forum - * - * @access public - * @return void Outputs to screen - **/ - public function doSkinEdit() - { - /* INI */ - $this->request['f'] = intval( $this->request['f'] ); - - /* Check the forum */ - if ($this->request['f'] == "") - { - $this->registry->output->showError( $this->lang->words['for_noid'], 1133 ); - } - - /* Forum Data */ - $forum = $this->forum_functions->forum_by_id[ $this->request['f'] ]; - - /* Update the forum */ - $this->DB->update( 'forums', array( 'skin_id' => $this->request['fsid'] ), 'id='.$this->request['f'] ); - - /* Apply to children */ - if( $this->request['apply_to_children'] ) - { - $ids = $this->forum_functions->forumsGetChildren( $this->request['f'] ); - - if ( count( $ids ) ) - { - $this->DB->update( 'forums', array( 'skin_id' => $this->request['fsid'] ), 'id IN ('.implode(",",$ids).')' ); - } - } - - $this->registry->output->global_message = $this->lang->words['for_skinup']; - - $this->recacheForums(); - - $this->forum_functions->forumsInit(); - - /* Bounce */ - $this->request['f'] = $this->forum_functions->forum_by_id[ $this->request['f'] ]['parent_id']; - $this->showForums(); - } - - /** - * Show the form to edit rules - * - * @access public - * @return void Outputs to screen - **/ - public function showRules() - { - /* INI */ - $this->request['f'] = intval( $this->request['f'] ); - - if( ! $this->request['f'] ) - { - $this->registry->output->showError( $this->lang->words['for_noid'], 1134 ); - } - - $this->DB->build( array( 'select' => 'id, name, show_rules, rules_title, rules_text', 'from' => 'forums', 'where' => "id=".$this->request['f'] ) ); - $this->DB->execute(); - - //----------------------------------------- - // Make sure we have a legal forum - //----------------------------------------- - - if ( ! $this->DB->getTotalRows() ) - { - $this->registry->output->showError( $this->lang->words['for_noid'], 1135 ); - } - - $forum = $this->DB->fetch(); - - //----------------------------------------- - // Load and config the std/rte editors - //----------------------------------------- - - IPSText::getTextClass( 'bbcode' )->bypass_badwords = 1; - IPSText::getTextClass( 'bbcode' )->parse_smilies = 0; - IPSText::getTextClass( 'bbcode' )->parse_html = 1; - IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; - IPSText::getTextClass( 'bbcode' )->parsing_section = 'rules'; - - /* Form Fields */ - $forum['_show_rules'] = $this->registry->output->formDropdown( "show_rules", array( - array( '0' , $this->lang->words['for_rulesdont'] ), - array( '1' , $this->lang->words['for_ruleslink'] ), - array( '2' , $this->lang->words['for_rulesfull'] ) - ), $forum['show_rules'] ); - - $forum['_title'] = $this->registry->output->formInput( "title", IPSText::stripslashes( str_replace( "'", ''', $forum['rules_title'] ) ) ); - - if ( IPSText::getTextClass( 'editor' )->method == 'rte' ) - { - $forum['rules_text'] = IPSText::getTextClass( 'bbcode' )->convertForRTE( $forum['rules_text'] ); - } - else - { - $forum['rules_text'] = IPSText::getTextClass( 'bbcode' )->preEditParse( $forum['rules_text'] ); - } - - $forum['_editor'] = IPSText::getTextClass( 'editor' )->showEditor( $forum['rules_text'], 'body' ); - - /* Output */ - $this->registry->output->html .= $this->html->forumRulesForm( $forum['id'], $forum ); - } - - /** - * Save the forum rules - * - * @access public - * @return void Outputs to screen - **/ - public function doRules() - { - /* INI */ - $this->request['f'] = intval( $this->request['f'] ); - - if( $this->request['f'] == "" ) - { - $this->registry->output->showError( $this->lang->words['for_noid'], 1136 ); - } - - //----------------------------------------- - // Load editor/bbcode - //----------------------------------------- - - $_POST[ 'body' ] = IPSText::getTextClass( 'editor' )->processRawPost( 'body' ); - - IPSText::getTextClass( 'bbcode' )->bypass_badwords = 1; - IPSText::getTextClass( 'bbcode' )->parse_smilies = 0; - IPSText::getTextClass( 'bbcode' )->parse_html = 1; - IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; - IPSText::getTextClass( 'bbcode' )->parsing_section = 'rules'; - - $_POST[ 'body' ] = IPSText::getTextClass( 'bbcode' )->preDbParse( $_POST[ 'body' ] ); - - $rules = array( - 'rules_title' => IPSText::makeSlashesSafe( IPSText::stripslashes( $_POST['title'] ) ), - 'rules_text' => IPSText::makeSlashesSafe( $_POST['body'] ), - 'show_rules' => $this->request['show_rules'] - ); - - $this->DB->update( 'forums', $rules, 'id='.$this->request['f'] ); - - $this->recacheForums(); - $this->registry->output->global_message = $this->lang->words['for_rulesup']; - - //----------------------------------------- - // Bounce back to parent... - //----------------------------------------- - - $this->request['f'] = $this->forum_functions->forum_by_id[ $this->request['f'] ]['parent_id']; - $this->showForums(); - } - - /** - * Recount the forum - * - * @access public - * @param integer [optional] Forum id - * @return void Outputs to screen - **/ - public function recount($f_override="") - { - if ($f_override != "") - { - // Internal call, remap - - ipsRegistry::$request[ 'f'] = $f_override ; - } - - require_once( IPSLib::getAppDir('forums') .'/sources/classes/moderate.php' ); - $modfunc = new moderatorLibrary( $this->registry ); - - - $modfunc->forumRecount($this->request['f']); - - $this->recacheForums(); - - $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['for_recountedlog'], $this->forum_functions->forum_by_id[$this->request['f']]['name'] ) ); - - $this->registry->output->global_message = $this->lang->words['for_resynched']; - - //----------------------------------------- - // Bounce back to parent... - //----------------------------------------- - - ipsRegistry::$request[ 'f'] = $this->forum_functions->forum_by_id[ $this->request['f'] ]['parent_id'] ; - $this->showForums(); - } - - /** - * Show the form to empty a forum - * - * @access public - * @return void Outputs to screen - **/ - public function emptyForum() - { - /* INI */ - $this->request['f'] = intval( $this->request['f'] ); - $form_array = array(); - - if( $this->request['f'] == "" ) - { - $this->registry->output->showError( $this->lang->words['for_noid'], 1137 ); - } - - $this->DB->build( array( 'select' => 'id, name', 'from' => 'forums', 'where' => "id=".$this->request['f'] ) ); - $this->DB->execute(); - - //----------------------------------------- - // Make sure we have a legal forum - //----------------------------------------- - - if ( !$this->DB->getTotalRows() ) - { - $this->registry->output->showError( $this->lang->words['for_noid'], 1138 ); - } - - $forum = $this->DB->fetch(); - - //----------------------------------------- - - $this->registry->output->html .= $this->html->forumEmptyForum( $this->request['f'], $forum ); - } - - /** - * Empty a forum - * - * @access public - * @return void Outputs to screen - **/ - public function doEmpty() - { - /* INI */ - $this->request['f'] = intval( $this->request['f'] ); - - //----------------------------------------- - // Get module - //----------------------------------------- - - require_once( IPSLib::getAppDir('forums') .'/sources/classes/moderate.php' ); - $modfunc = new moderatorLibrary( $this->registry ); - - if( $this->request['f'] == "" ) - { - $this->registry->output->showError( $this->lang->words['for_noid_source'], 1139 ); - } - - //----------------------------------------- - // Check to make sure its a valid forum. - //----------------------------------------- - - $this->DB->build( array( 'select' => 'id, posts, topics', 'from' => 'forums', 'where' => "id=" . $this->request['f'] ) ); - $this->DB->execute(); - - if( ! $forum = $this->DB->fetch() ) - { - $this->registry->output->showError( $this->lang->words['for_nodetails'], 11310 ); - } - - $this->DB->build( array( 'select' => 'tid', 'from' => 'topics', 'where' => "forum_id=" . $this->request['f'] ) ); - $outer = $this->DB->execute(); - - //----------------------------------------- - // What to do.. - //----------------------------------------- - - while( $t = $this->DB->fetch($outer) ) - { - $modfunc->topicDelete( $t['tid'] ); - } - - //----------------------------------------- - // Rebuild stats - //----------------------------------------- - - $modfunc->forumRecount( $this->request['f'] ); - $modfunc->statsRecount(); - - //----------------------------------------- - // Rebuild forum cache - //----------------------------------------- - - $this->recacheForums(); - - $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['for_emptiedlog'], $this->request['name'] ) ); - - $this->request['f'] = $this->forum_functions->forum_by_id[ $this->request['f'] ]['parent_id']; - - $this->registry->output->global_message = $this->lang->words['for_emptied']; - $this->showForums(); - } - - /** - * Show the form to delete a form - * - * @access public - * @return void Outputs to screen - **/ - public function deleteForm() - { - /* INI */ - $this->request['f'] = intval( $this->request['f'] ); - $form_array = array(); - - if ( ! $this->request['f'] ) - { - $this->registry->output->showError( $this->lang->words['for_noid_delete'], 11311 ); - } - - $this->DB->build( array( 'select' => 'id, name, parent_id', 'from' => 'forums', 'order' => 'position' ) ); - $this->DB->execute(); - - //----------------------------------------- - // Make sure we have more than 1 - // forum.. - //----------------------------------------- - - if( $this->DB->getTotalRows() < 2 ) - { - $this->registry->output->showError( $this->lang->words['for_lastforum'], 11312 ); - } - - while( $r = $this->DB->fetch() ) - { - if( $r['id'] == $this->request['f'] ) - { - $name = $r['name']; - $is_cat = $r['parent_id'] > 0 ? 0 : 1; - continue; - } - } - - $form_array = $this->forum_functions->adForumsForumList( 1 ); - - //----------------------------------------- - // Count the number of topics - //----------------------------------------- - - $posts = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'topics', 'where' => 'forum_id='.$this->request['f'] ) ); - - //----------------------------------------- - // Start form - //----------------------------------------- - - /* Move dropds */ - if( $posts['count'] ) - { - $move = $this->registry->output->formDropdown( "MOVE_ID", $form_array ); - } - - /* Output */ - $this->registry->output->html .= $this->html->forumDeleteForm( $this->request['f'], $name, $move ); - } - - /** - * Delete a forum - * - * @access public - * @return void Outputs to screen - **/ - public function doDelete() - { - //----------------------------------------- - // Auth check... - //----------------------------------------- - - $this->registry->adminFunctions->checkSecurityKey(); - - //----------------------------------------- - // Continue - //----------------------------------------- - - $this->request['f'] = intval( $this->request['f'] ); - $this->request['MOVE_ID'] = intval( $this->request['MOVE_ID'] ); - $this->request['new_parent_id'] = intval( $this->request['new_parent_id'] ); - - $forum = $this->registry->class_forums->forum_by_id[ $this->request['f'] ]; - - if( ! $forum['id'] ) - { - $this->registry->output->showError( $this->lang->words['for_noid_source'], 11313 ); - } - - if( ! $this->request['new_parent_id'] ) - { - $this->request['new_parent_id'] = -1; - } - else - { - if( $this->request['new_parent_id'] == $this->request['f'] ) - { - $this->registry->output->global_message = $this->lang->words['for_child_no_parent']; - $this->deleteForm(); - return; - } - } - - //----------------------------------------- - // Would deleting this category orphan the only - // remaining forums? - //----------------------------------------- - - if( $forum['parent_id'] == -1 ) - { - $otherParent = 0; - - foreach( $this->registry->class_forums->forum_by_id as $id => $data ) - { - if( $data['parent_id'] == -1 ) - { - $otherParent = $id; - break; - } - } - - if( !$otherParent ) - { - $this->registry->output->showError( $this->lang->words['nodelete_last_cat'], 11364 ); - } - } - - //----------------------------------------- - // Get library - //----------------------------------------- - - require_once( IPSLib::getAppDir('forums') .'/sources/classes/moderate.php' ); - $modfunc = new moderatorLibrary( $this->registry ); - - //----------------------------------------- - // Move stuff - //----------------------------------------- - - if( $this->request['MOVE_ID'] ) - { - if( $this->request['MOVE_ID'] == $this->request['f'] ) - { - $this->registry->output->global_message = $this->lang->words['for_wherewhatwhy']; - $this->deleteForm(); - } - - //----------------------------------------- - // Move topics... - //----------------------------------------- - - $this->DB->update( 'topics', array( 'forum_id' => $this->request['MOVE_ID'] ), 'forum_id='.$this->request['f'] ); - - //----------------------------------------- - // Move polls... - //----------------------------------------- - - $this->DB->update( 'polls', array( 'forum_id' => $this->request['MOVE_ID'] ), 'forum_id='.$this->request['f'] ); - - //----------------------------------------- - // Move voters... - //----------------------------------------- - - $this->DB->update( 'voters', array( 'forum_id' => $this->request['MOVE_ID'] ), 'forum_id='.$this->request['f'] ); - - $modfunc->forumRecount( $this->request['MOVE_ID'] ); - } - - //----------------------------------------- - // Delete the forum - //----------------------------------------- - - $this->DB->delete( 'forums', "id=".$this->request['f'] ); - $this->DB->delete( 'permission_index', "app='forums' AND perm_type='forum' AND perm_type_id=".$this->request['f'] ); - - //----------------------------------------- - // Remove moderators from this forum - //----------------------------------------- - - $this->DB->build( array( 'select' => '*', 'from' => 'moderators', 'where' => "forum_id LIKE '%,{$this->request['f']},%'" ) ); - $outer = $this->DB->execute(); - - while( $r = $this->DB->fetch($outer) ) - { - $forums = explode( ',', IPSText::cleanPermString( $r['forum_id'] ) ); - $newForums = array(); - - foreach( $forums as $aForumId ) - { - if( $aForumId != $this->request['f'] ) - { - $newForums[] = $aForumId; - } - } - - if( !count($newForums) ) - { - $this->DB->delete( 'moderators', "mid=" . $r['mid'] ); - } - else - { - $this->DB->update( 'moderators', array( 'forum_id' => ',' . implode( ',', $newForums ) . ',' ), 'mid=' . $r['mid'] ); - } - } - - //----------------------------------------- - // Delete forum subscriptions - //----------------------------------------- - - $this->DB->delete( 'forum_tracker', "forum_id=".$this->request['f'] ); - - //----------------------------------------- - // Update children - //----------------------------------------- - - $this->DB->update( 'forums', array( 'parent_id' => $this->request['new_parent_id'] ), "parent_id=" . $this->request['f'] ); - - //----------------------------------------- - // Rebuild forum cache - //----------------------------------------- - - $this->recacheForums(); - - //----------------------------------------- - // Rebuild moderator cache - //----------------------------------------- - - require_once( IPSLib::getAppDir( 'forums' ) . '/modules_admin/forums/moderator.php' ); - - $moderator = new admin_forums_forums_moderator( $this->registry ); - $moderator->makeRegistryShortcuts( $this->registry ); - $moderator->rebuildModeratorCache(); - - $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['for_removedlog'], $forum['name'] ) ); - - $this->registry->output->doneScreen($this->lang->words['for_removed'], $this->lang->words['for_control'], $this->form_code, 'redirect' ); - } - - /** - * Show the form to edit a forum - * - * @access public - * @param string [new|edit] - * @param boolean Whether to change forum to category/back - * @return void Outputs to screen - **/ - public function forumForm( $type='edit', $changetype=0 ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $addnew_type = ( $this->request['type'] AND $this->request['type'] ) ? $this->request['type'] : 'forum'; - - $form = array(); - $forum = array(); - $forum_id = $this->request['f'] ? intval( $this->request['f'] ) : 0; - $parentid = intval( $this->request['p'] ) ? intval( $this->request['p'] ) : -1; - $cat_id = $this->request['c'] ? intval( $this->request['c'] ) : 0; - $f_name = $this->request['name'] ? $this->request['name'] : ''; - $subcanpost = $cat_id == 1 ? 0 : 1; - $perm_matrix = ""; - $dd_state = array( 0 => array( 1, $this->lang->words['for_active'] ), 1 => array( 0, $this->lang->words['for_readonly'] ) ); - $dd_moderate = array( - 0 => array( 0, $this->lang->words['for_no'] ), - 1 => array( 1, $this->lang->words['for_modall'] ), - 2 => array( 2, $this->lang->words['for_modtop'] ), - 3 => array( 3, $this->lang->words['for_modrep'] ), - ); - $dd_prune = array( - 0 => array( 1, $this->lang->words['for_today'] ), - 1 => array( 5, $this->lang->words['for_last5'] ), - 2 => array( 7, $this->lang->words['for_last7'] ), - 3 => array( 10, $this->lang->words['for_last10'] ), - 4 => array( 15, $this->lang->words['for_last15'] ), - 5 => array( 20, $this->lang->words['for_last20'] ), - 6 => array( 25, $this->lang->words['for_last25'] ), - 7 => array( 30, $this->lang->words['for_last30'] ), - 8 => array( 60, $this->lang->words['for_last60'] ), - 9 => array( 90, $this->lang->words['for_last90'] ), - 10=> array( 100, $this->lang->words['for_showall'] ), - ); - - $dd_order = array( - 0 => array( 'last_post', $this->lang->words['for_s_last'] ), - 1 => array( 'title' , $this->lang->words['for_s_topic'] ), - 2 => array( 'starter_name', $this->lang->words['for_s_name'] ), - 3 => array( 'posts' , $this->lang->words['for_s_post'] ), - 4 => array( 'views' , $this->lang->words['for_s_view'] ), - 5 => array( 'start_date', $this->lang->words['for_s_date'] ), - 6 => array( 'last_poster_name' , $this->lang->words['for_s_poster'] ) - ); - - $dd_by = array( - 0 => array( 'Z-A', $this->lang->words['for_desc'] ), - 1 => array( 'A-Z', $this->lang->words['for_asc'] ) - ); - - $dd_filter = array( - 0 => array( 'all', $this->lang->words['for_all'] ), - 1 => array( 'open', $this->lang->words['for_open'] ), - 2 => array( 'hot', $this->lang->words['for_hot'] ), - 3 => array( 'poll', $this->lang->words['for_poll'] ), - 4 => array( 'locked', $this->lang->words['for_locked'] ), - 5 => array( 'moved', $this->lang->words['for_moved'] ), - 6 => array( 'istarted', $this->lang->words['for_istarted'] ), - 7 => array( 'ireplied', $this->lang->words['for_ireplied'] ), - ); - - //----------------------------------------- - // EDIT - //----------------------------------------- - - if ( $type == 'edit' ) - { - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $forum_id ) - { - $this->registry->output->showError( $this->lang->words['for_noforumselected'], 11314 ); - } - - //----------------------------------------- - // Do not show forum in forum list - //----------------------------------------- - - $this->forum_functions->exclude_from_list = $forum_id; - - //----------------------------------------- - // Get this forum - //----------------------------------------- - - $forum = $this->DB->buildAndFetch( array( - 'select' => 'f.*', - 'from' => array( 'forums' => 'f' ), - 'where' => 'f.id='.$this->request['f'], - 'add_join' => array( - array( - 'select' => 'p.*', - 'from' => array( 'permission_index' => 'p' ), - 'where' => "p.perm_type_id=f.id AND p.app='forums' AND p.perm_type='forum'", - 'type' => 'left', - ) - ), - ) ); - - //----------------------------------------- - // Check - //----------------------------------------- - - if ($forum['id'] == "") - { - $this->registry->output->showError( $this->lang->words['for_noid'], 11315 ); - } - - //----------------------------------------- - // Set up code buttons - //----------------------------------------- - - $addnew_type = $forum['parent_id'] == -1 ? 'category' : 'forum'; - - if( $changetype ) - { - $addnew_type = $addnew_type == 'category' ? 'forum' : 'category'; - } - if( $addnew_type == 'category' ) - { - $title = sprintf( $this->lang->words['for_editcat'], $forum['name'] ); - $button = $this->lang->words['for_editcat_button']; - $code = "doedit"; - } - else - { - $title = sprintf( $this->lang->words['for_editfor'], $forum['name'] ); - $button = $this->lang->words['for_editfor_button']; - $code = "doedit"; - } - if( $addnew_type == 'category' ) - { - $convert = ""; - } - else - { - $convert = ""; - } - } - - //----------------------------------------- - // NEW - //----------------------------------------- - - else - { - # Ensure there is an ID - $this->request['f'] = 0; - - if( $changetype ) - { - $addnew_type = $addnew_type == 'category' ? 'forum' : 'category'; - } - if( $addnew_type == 'category' ) - { - $forum = array( - 'sub_can_post' => $subcanpost, - 'name' => $f_name ? $f_name : $this->lang->words['for_newcat'], - 'parent_id' => $parentid, - 'use_ibc' => 1, - 'quick_reply' => 1, - 'allow_poll' => 1, - 'prune' => 100, - 'topicfilter' => 'all', - 'sort_key' => 'last_post', - 'sort_order' => 'Z-A', - 'inc_postcount' => 1, - 'description' => '', - 'status' => 0, - 'redirect_url' => '', - 'password' => '', - 'password_override' => '', - 'redirect_on' => 0, - 'redirect_hits' => 0, - 'permission_showtopic' => '', - 'permission_custom_error' => '', - 'use_html' => 0, - 'allow_pollbump' => 0, - 'forum_allow_rating' => 0, - 'preview_posts' => 0, - 'notify_modq_emails' => 0, - 'can_view_others' => 1, - - ); - - $title = $this->lang->words['for_addcat']; - $button = $this->lang->words['for_addcat']; - $code = "donew"; - } - else - { - $forum = array( - 'sub_can_post' => $subcanpost, - 'name' => $f_name ? $f_name : $this->lang->words['for_newfor'], - 'parent_id' => $parentid, - 'use_ibc' => 1, - 'quick_reply' => 1, - 'allow_poll' => 1, - 'prune' => 100, - 'topicfilter' => 'all', - 'sort_key' => 'last_post', - 'sort_order' => 'Z-A', - 'inc_postcount' => 1, - 'description' => '', - 'status' => 1, - 'redirect_url' => '', - 'password' => '', - 'password_override' => '', - 'redirect_on' => 0, - 'redirect_hits' => 0, - 'permission_showtopic' => '', - 'permission_custom_error' => '', - 'use_html' => 0, - 'allow_pollbump' => 0, - 'forum_allow_rating' => 0, - 'preview_posts' => 0, - 'notify_modq_emails' => 0, - 'min_posts' => 0, - 'hide_last_info' => 0, - 'can_view_others' => 1, - ); - - $title = $this->lang->words['for_addfor']; - $button = $this->lang->words['for_addfor']; - $code = "donew"; - } - if( $addnew_type == 'category' ) - { - $convert = ""; - } - else - { - $convert = ""; - } - } - - //----------------------------------------- - // Build forumlist - //----------------------------------------- - - $forumlist = $this->forum_functions->adForumsForumList(); - - //----------------------------------------- - // Build group list - //----------------------------------------- - - $mem_group = array(); - - foreach( $this->caches['group_cache'] as $g_id => $group ) - { - $mem_group[] = array( $g_id , $group['g_title'] ); - } - - //----------------------------------------- - // Page title... - //----------------------------------------- - - //$this->registry->output->html_help_title = $title; - - //----------------------------------------- - // Generate form items - //----------------------------------------- - - # Main settings - $form['name'] = $this->registry->output->formInput( 'name' , IPSText::parseCleanValue( ( isset( $_POST['name'] ) AND $_POST['name'] ) ? $_POST['name'] : $forum['name'] ) ); - $form['description'] = $this->registry->output->formTextarea("description" , IPSText::br2nl( ( isset( $_POST['description']) AND $_POST['description'] ) ? $_POST['description'] : $forum['description'] ) ); - $form['parent_id'] = $this->registry->output->formDropdown("parent_id" , $forumlist, ( isset($_POST['parent_id'] ) AND $_POST['parent_id'] ) ? $_POST['parent_id'] : $forum['parent_id'] ); - $form['status'] = $this->registry->output->formDropdown("status" , $dd_state , ( isset($_POST['status'] ) AND $_POST['status'] ) ? $_POST['status'] : $forum['status'] ); - $form['sub_can_post'] = $this->registry->output->formYesNo( 'sub_can_post', ( isset($_POST['sub_can_post']) AND $_POST['sub_can_post'] ) ? $_POST['sub_can_post'] : ( $forum['sub_can_post'] == 1 ? 0 : 1 ) ); - - # Redirect options - $form['redirect_url'] = $this->registry->output->formInput( 'redirect_url' , ( isset($_POST['redirect_url']) AND $_POST['redirect_url'] ) ? $_POST['redirect_url'] : $forum['redirect_url'] ); - $form['redirect_on'] = $this->registry->output->formYesNo('redirect_on' , ( isset($_POST['redirect_on']) AND $_POST['redirect_on'] ) ? $_POST['redirect_on'] : $forum['redirect_on'] ); - $form['redirect_hits'] = $this->registry->output->formInput( 'redirect_hits', ( isset($_POST['redirect_hits']) AND $_POST['redirect_hits'] ) ? $_POST['redirect_hits'] : $forum['redirect_hits'] ); - - # Permission settings - $form['permission_showtopic'] = $this->registry->output->formYesNo( 'permission_showtopic' , ( isset($_POST['permission_showtopic']) AND $_POST['permission_showtopic'] ) ? $_POST['permission_showtopic'] : $forum['permission_showtopic'] ); - $form['permission_custom_error'] = $this->registry->output->formTextarea("permission_custom_error", IPSText::br2nl( ( isset($_POST['permission_custom_error']) AND $_POST['permission_custom_error'] ) ? $_POST['permission_custom_error'] : $forum['permission_custom_error'] ) ); - - # Forum settings - $form['use_html'] = $this->registry->output->formYesNo('use_html' , ( isset($_POST['use_html']) AND $_POST['use_html'] ) ? $_POST['use_html'] : $forum['use_html'] ); - $form['use_ibc'] = $this->registry->output->formYesNo('use_ibc' , ( isset($_POST['use_ibc']) AND $_POST['use_ibc'] ) ? $_POST['use_ibc'] : $forum['use_ibc'] ); - $form['quick_reply'] = $this->registry->output->formYesNo('quick_reply' , ( isset($_POST['quick_reply']) AND $_POST['quick_reply'] ) ? $_POST['quick_reply'] : $forum['quick_reply'] ); - $form['allow_poll'] = $this->registry->output->formYesNo('allow_poll' , ( isset($_POST['allow_poll']) AND $_POST['allow_poll'] ) ? $_POST['allow_poll'] : $forum['allow_poll'] ); - $form['allow_pollbump'] = $this->registry->output->formYesNo('allow_pollbump' , ( isset($_POST['allow_pollbump']) AND $_POST['allow_pollbump'] ) ? $_POST['allow_pollbump'] : $forum['allow_pollbump'] ); - $form['inc_postcount'] = $this->registry->output->formYesNo('inc_postcount' , ( isset($_POST['inc_postcount']) AND $_POST['inc_postcount'] ) ? $_POST['inc_postcount'] : $forum['inc_postcount'] ); - $form['forum_allow_rating'] = $this->registry->output->formYesNo('forum_allow_rating', ( isset($_POST['forum_allow_rating']) AND $_POST['forum_allow_rating'] ) ? $_POST['forum_allow_rating'] : $forum['forum_allow_rating'] ); - $form['min_posts_post'] = $this->registry->output->formInput('min_posts_post' , ( isset($_POST['min_posts_post']) AND $_POST['min_posts_post'] ) ? $_POST['min_posts_post'] : $forum['min_posts_post'] ); - $form['min_posts_view'] = $this->registry->output->formInput('min_posts_view' , ( isset($_POST['min_posts_view']) AND $_POST['min_posts_view'] ) ? $_POST['min_posts_view'] : $forum['min_posts_view'] ); - $form['can_view_others'] = $this->registry->output->formYesNo('can_view_others' , ( isset($_POST['can_view_others']) AND $_POST['can_view_others'] ) ? $_POST['can_view_others'] : $forum['can_view_others'] ); - $form['hide_last_info'] = $this->registry->output->formYesNo('hide_last_info' , ( isset($_POST['hide_last_info']) AND $_POST['hide_last_info'] ) ? $_POST['hide_last_info'] : $forum['hide_last_info'] ); - - # Mod settings - $form['preview_posts'] = $this->registry->output->formDropdown( "preview_posts" , $dd_moderate, ( isset($_POST['preview_posts']) AND $_POST['preview_posts'] ) ? $_POST['preview_posts'] : $forum['preview_posts'] ); - $form['notify_modq_emails'] = $this->registry->output->formInput( 'notify_modq_emails' , ( isset($_POST['notify_modq_emails']) AND $_POST['notify_modq_emails'] ) ? $_POST['notify_modq_emails'] : $forum['notify_modq_emails'] ); - $form['password'] = $this->registry->output->formInput( 'password' , ( isset($_POST['password']) AND $_POST['password'] ) ? $_POST['password'] : $forum['password'] ); - $form['password_override'] = $this->registry->output->formMultiDropdown( 'password_override[]' , $mem_group, ( isset($_POST['password_override']) AND $_POST['password_override'] ) ? $_POST['password_override'] : explode( ",", $forum['password_override'] ) ); - - # Sorting settings - $form['prune'] = $this->registry->output->formDropdown("prune" , $dd_prune, ( isset($_POST['prune']) AND $_POST['prune'] ) ? $_POST['prune'] : $forum['prune'] ); - $form['sort_key'] = $this->registry->output->formDropdown("sort_key" , $dd_order, ( isset($_POST['sort_key']) AND $_POST['sort_key'] ) ? $_POST['sort_key'] : $forum['sort_key'] ); - $form['sort_order'] = $this->registry->output->formDropdown("sort_order", $dd_by , ( isset($_POST['sort_order']) AND $_POST['sort_order'] ) ? $_POST['sort_order'] : $forum['sort_order'] ); - $form['topicfilter'] = $this->registry->output->formDropdown("topicfilter", $dd_filter, ( isset($_POST['topicfilter']) AND $_POST['topicfilter'] ) ? $_POST['topicfilter'] : $forum['topicfilter'] ); - - # Trim the form for categories... - $form['addnew_type'] = $addnew_type; - $this->request['type'] = $addnew_type; - $form['addnew_type_upper'] = ucwords($addnew_type); - - $form['convert_button'] =& $convert; - - //----------------------------------------- - // Show permission matrix - //----------------------------------------- - - if ( $type != 'edit' OR $addnew_type == 'category' ) - { - /* Permission Class */ - require_once( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php' ); - $permissions = new classPublicPermissions( ipsRegistry::instance() ); - - if( $addnew_type == 'category' ) - { - $perm_matrix = $permissions->adminPermMatrix( 'forum', $forum, 'forums', 'view' ); - } - else - { - $perm_matrix = $permissions->adminPermMatrix( 'forum', $forum ); - } - } - - //----------------------------------------- - // Show form... - //----------------------------------------- - - $this->registry->output->html .= $this->html->forumForm( $form, $button, $code, $title, $forum, $perm_matrix ); - - //----------------------------------------- - // Nav and print - //----------------------------------------- - - //ipsRegistry::getClass('adminOuput')->nav[] = array( $this->form_code, 'Manage Forums' ); - //ipsRegistry::getClass('adminOuput')->nav[] = array( '', 'Add/Edit '.ucwords($addnew_type) ); - } - - /** - * Save the forum - * - * @access public - * @param string [new|edit] - * @return void Outputs to screen - **/ - public function forumSave($type='new') - { - //----------------------------------------- - // Converting the type? - //----------------------------------------- - - if( $this->request['convert'] ) - { - $this->forumForm( $type, 1 ); - return; - } - - //----------------------------------------- - // INIT - //----------------------------------------- - - $this->request['name'] = trim( $this->request['name'] ); - $this->request['f'] = intval( $this->request['f'] ); - - $forum_cat_lang = intval( $this->request['parent_id'] ) == -1 ? $this->lang->words['for_iscat_y'] : $this->lang->words['for_iscat_n']; - - //----------------------------------------- - // Auth check... - //----------------------------------------- - - $this->registry->adminFunctions->checkSecurityKey(); - - //----------------------------------------- - // Check - //----------------------------------------- - - if( $this->request['name'] == "" ) - { - $this->registry->output->global_message = sprintf( $this->lang->words['for_entertitle'], mb_strtolower( $forum_cat_lang ) ); - $this->forumForm( $type ); - return; - } - - //----------------------------------------- - // Are we trying to do something stupid - // like running with scissors or moving - // the parent of a forum into itself - // spot? - //----------------------------------------- - - if( $this->request['parent_id'] != $this->forum_functions->forum_by_id[ $this->request['f'] ]['parent_id'] ) - { - $ids = $this->forum_functions->forumsGetChildren( $this->request['f'] ); - $ids[] = $this->request['f']; - - if ( in_array( $this->request['parent_id'], $ids ) ) - { - $this->registry->output->global_error = $this->lang->words['for_whymovethere']; - $this->forumForm( $type ); - return; - } - } - - if( $this->request['parent_id'] < 1 ) - { - $this->request['sub_can_post'] = 1; - } - - //----------------------------------------- - // Save array - //----------------------------------------- - - $save = array ( 'name' => IPSText::getTextClass('bbcode')->xssHtmlClean( nl2br( IPSText::stripslashes( $_POST['name'] ) ) ), - 'name_seo' => IPSText::makeSeoTitle( $this->request['name'] ), - 'description' => IPSText::getTextClass('bbcode')->xssHtmlClean( nl2br( IPSText::stripslashes( $_POST['description'] ) ) ), - 'use_ibc' => intval($this->request['use_ibc']), - 'use_html' => intval($this->request['use_html']), - 'status' => intval($this->request['status']), - 'password' => $this->request['password'], - 'password_override' => is_array($this->request['password_override']) ? implode( ",", $this->request['password_override'] ) : '', - 'sort_key' => $this->request['sort_key'], - 'sort_order' => $this->request['sort_order'], - 'prune' => intval($this->request['prune']), - 'topicfilter' => $this->request['topicfilter'], - 'preview_posts' => intval($this->request['preview_posts']), - 'allow_poll' => intval($this->request['allow_poll']), - 'allow_pollbump' => intval($this->request['allow_pollbump']), - 'forum_allow_rating' => intval($this->request['forum_allow_rating']), - 'inc_postcount' => intval($this->request['inc_postcount']), - 'parent_id' => intval($this->request['parent_id']), - 'sub_can_post' => ( intval($this->request['sub_can_post']) == 1 ? 0 : 1 ), - 'quick_reply' => intval($this->request['quick_reply']), - 'redirect_on' => intval($this->request['redirect_on']), - 'redirect_hits' => intval($this->request['redirect_hits']), - 'redirect_url' => $this->request['redirect_url'], - 'redirect_loc' => $this->request['redirect_loc'] ? $this->request['redirect_loc'] : '', - 'notify_modq_emails' => $this->request['notify_modq_emails'], - 'permission_showtopic' => intval($this->request['permission_showtopic']), - 'min_posts_post' => intval( $this->request['min_posts_post'] ), - 'min_posts_view' => intval( $this->request['min_posts_view'] ), - 'can_view_others' => intval( $this->request['can_view_others'] ), - 'hide_last_info' => intval( $this->request['hide_last_info'] ), - 'permission_custom_error' => nl2br( IPSText::stripslashes($_POST['permission_custom_error']) ) ); - - //----------------------------------------- - // ADD - //----------------------------------------- - - if ( $type == 'new' ) - { - $this->DB->build( array( 'select' => 'MAX(id) as top_forum', 'from' => 'forums' ) ); - $this->DB->execute(); - - $row = $this->DB->fetch(); - - if ( $row['top_forum'] < 1 ) - { - $row['top_forum'] = 0; - } - - $row['top_forum']++; - - /* Forum Information */ - //$save['id'] = $row['top_forum']; - $save['position'] = $row['top_forum']; - $save['topics'] = 0; - $save['posts'] = 0; - $save['last_post'] = 0; - $save['last_poster_id'] = 0; - $save['last_poster_name'] = ""; - - /* Insert the record */ - $this->DB->insert( 'forums', $save ); - $forum_id = $this->DB->getInsertId(); - - /* Permissions */ - require_once( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php' ); - $permissions = new classPublicPermissions( ipsRegistry::instance() ); - $permissions->savePermMatrix( $this->request['perms'], $forum_id, 'forum' ); - - if( !$save['can_view_others'] ) - { - $this->DB->update( 'permission_index', array( 'owner_only' => 1 ), "app='forums' AND perm_type='forum' AND perm_type_id={$forum_id}" ); - } - - /* Done */ - $this->registry->output->global_message = $forum_cat_lang . $this->lang->words['for__created']; - $this->registry->adminFunctions->saveAdminLog( $forum_cat_lang . " '" . $this->request['name'] . mb_strtolower ( $this->lang->words['for__created'] ) ); - } - else - { - if ( $this->request['parent_id'] == -1 ) - { - $save['can_view_others'] = 1; - - /* Permissions */ - require_once( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php' ); - $permissions = new classPublicPermissions( ipsRegistry::instance() ); - $permissions->savePermMatrix( $this->request['perms'], $this->request['f'], 'forum' ); - - if( ! $save['can_view_others'] ) - { - $this->DB->update( 'permission_index', array( 'owner_only' => 1 ), "app='forums' AND perm_type='forum' AND perm_type_id={$this->request['f']}" ); - } - else - { - $this->DB->update( 'permission_index', array( 'owner_only' => 0 ), "app='forums' AND perm_type='forum' AND perm_type_id={$this->request['f']}" ); - } - } - - $this->DB->update( 'forums', $save, "id=" . $this->request['f'] ); - - $this->registry->output->global_message = $forum_cat_lang.$this->lang->words['for__edited']; - - $this->registry->adminFunctions->saveAdminLog( $forum_cat_lang." '" . $this->request['name'] . mb_strtolower ( $this->lang->words['for__edited'] ) ); - } - - $this->recacheForums(); - - $this->request['f'] = ''; - if( $save['parent_id'] > 0 ) - { - $this->request['f'] = $save['parent_id']; - } - - $this->forum_functions->forumsInit(); - - $this->showForums(); - } - - /** - * Show the form to edit permissions - * - * @access public - * @return void Outputs to screen - **/ - public function permEditForm() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $this->request['f'] = intval( $this->request['f'] ); - - //----------------------------------------- - // check.. - //----------------------------------------- - - if ( ! $this->request['f'] ) - { - $this->registry->output->showError( $this->lang->words['for_noid'], 11316 ); - } - - //----------------------------------------- - // Get this forum details - //----------------------------------------- - - $forum = $this->forum_functions->forum_by_id[ $this->request['f'] ]; - - //----------------------------------------- - // Next id... - //----------------------------------------- - - $relative = $this->getNextId( $this->request['f'] ); - - //----------------------------------------- - // check... - //----------------------------------------- - - if ( ! $forum['id'] ) - { - $this->registry->output->showError( $this->lang->words['for_noid'], 11317 ); - } - - //----------------------------------------- - // HTML - //----------------------------------------- - - require_once( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php' ); - $permissions = new classPublicPermissions( ipsRegistry::instance() ); - - if( $forum['parent_id'] != 'root' ) - { - $perm_matrix = $permissions->adminPermMatrix( 'forum', $forum ); - } - else - { - $perm_matrix = $permissions->adminPermMatrix( 'forum', $forum, 'forums', 'view' ); - } - - $this->registry->output->html .= $this->html->forumPermissionForm( $forum, $relative, $perm_matrix, $forum ); - } - - /** - * Get the id of the next forum - * - * @access public - * @param integer Last forum id - * @return void Outputs to screen - **/ - public function getNextId($fid) - { - $nextid = 0; - $ids = array(); - $index = 0; - $count = 0; - - foreach( $this->forum_functions->forum_cache['root'] as $forum_data ) - { - $ids[ $count ] = $forum_data['id']; - - if ( $forum_data['id'] == $fid ) - { - $index = $count; - } - - $count++; - - if ( isset($this->forum_functions->forum_cache[ $forum_data['id'] ]) AND is_array( $this->forum_functions->forum_cache[ $forum_data['id'] ] ) ) - { - foreach( $this->forum_functions->forum_cache[ $forum_data['id'] ] as $forum_data ) - { - $children = $this->forum_functions->forumsGetChildren( $forum_data['id'] ); - - $ids[ $count ] = $forum_data['id']; - - if ( $forum_data['id'] == $fid ) - { - $index = $count; - } - - $count++; - - if ( is_array($children) and count($children) ) - { - foreach( $children as $kid ) - { - $ids[ $count ] = $kid; - - if ( $kid == $fid ) - { - $index = $count; - } - - $count++; - } - } - } - } - } - - return array( 'next' => $ids[ $index + 1 ], 'previous' => $ids[ $index - 1 ] ); - } - - /** - * Recache the forums - * - * @access public - * @return void - * @deprecated We're moving away from forum cache - **/ - public function recacheForums() - { - //$this->registry->class_forums->updateForumCache(); - } - - /** - * Save the permissions - * - * @access public - * @return void Outputs to screen - **/ - public function permDoEdit() - { - /* INI */ - $perms = array(); - $this->request['f'] = intval( $this->request['f'] ); - - /* Security Check */ - $this->registry->adminFunctions->checkSecurityKey(); - - /* Save the permissions */ - require_once( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php' ); - $permissions = new classPublicPermissions( ipsRegistry::instance() ); - $permissions->savePermMatrix( $this->request['perms'], $this->request['f'], 'forum' ); - - /* Log */ - $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['for_permeditedin'], $this->request['name'] ) ); - - $this->recacheForums(); - - /* Previous Forum */ - if ( $this->request['doprevious'] AND $this->request['doprevious'] and $this->request['previd'] > 0 ) - { - $this->registry->output->global_message = $this->lang->words['for_permedited']; - - $this->request['f'] = $this->request['previd']; - - $this->registry->output->silentRedirect( "{$this->settings['base_url']}{$this->html->form_code}do=pedit&f=" . $this->request['f'] ); - } - /* Next Forum */ - else if ( $this->request['donext'] AND $this->request['donext'] and $this->request['nextid'] > 0 ) - { - $this->registry->output->global_message = $this->lang->words['for_permedited']; - - $this->request['f'] = $this->request['nextid']; - - $this->registry->output->silentRedirect( "{$this->settings['base_url']}{$this->html->form_code}do=pedit&f=" . $this->request['f'] ); - } - /* Reload */ - else if ( $this->request['reload'] AND $this->request['reload'] ) - { - $this->registry->output->silentRedirect( "{$this->settings['base_url']}{$this->html->form_code}do=pedit&f=" . $this->request['f'] ); - } - /* Done */ - else - { - $this->registry->output->doneScreen( $this->lang->words['for_permedited2'], $this->lang->words['for_control'], $this->html->form_code, 'redirect' ); - } - } - - /** - * Reorder the child forums - * - * @access public - * @return void Outputs to screen - **/ - public function doReorder() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - require_once( IPS_KERNEL_PATH . 'classAjax.php' ); - $ajax = new classAjax(); - - //----------------------------------------- - // Checks... - //----------------------------------------- - - if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) - { - $ajax->returnString( $this->lang->words['postform_badmd5'] ); - exit(); - } - - //----------------------------------------- - // Save new position - //----------------------------------------- - - $position = 1; - - if( is_array($this->request['forums']) AND count($this->request['forums']) ) - { - foreach( $this->request['forums'] as $this_id ) - { - $this->DB->update( 'forums', array( 'position' => $position ), 'id=' . $this_id ); - - $position++; - } - } - - $this->recacheForums(); - - $ajax->returnString( 'OK' ); - exit(); - } - - /** - * List the forums - * - * @access public - * @return void Outputs to screen - **/ - public function showForums() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $this->request['f'] = intval( $this->request['f'] ); - - //----------------------------------------- - // Nav - //----------------------------------------- - - if( $this->request['f'] ) - { - $nav = $this->forum_functions->forumsBreadcrumbNav( $this->request['f'], '&'.$this->form_code.'&f=' ); - - if( is_array( $nav ) and count( $nav ) > 1 ) - { - //array_shift( $nav ); - } - } - - //----------------------------------------- - // Grab the moderators - //----------------------------------------- - - $this->forum_functions->moderators = array(); - - $this->DB->build( array( - 'select' => 'm.*', - 'from' => array( 'moderators' => 'm' ), - 'add_join'=> array( - array( - 'select' => 'mm.members_display_name', - 'from' => array( 'members' => 'mm' ), - 'where' => 'mm.member_id=m.member_id AND m.is_group=0', - 'type' => 'left' - ) - ) - ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $this->forum_functions->moderators[] = $r; - } - - //----------------------------------------- - // Print screen - //----------------------------------------- - - $this->forum_functions->type = 'manage'; - - $this->registry->output->html .= $this->html->renderForumHeader( $nav ); - - $this->forum_functions->forumsListForums(); - - $choose = ""; - - //----------------------------------------- - // Member groups - //----------------------------------------- - - $mem_group = ""; - - //----------------------------------------- - // Add footer - //----------------------------------------- - - $this->registry->output->html .= $this->html->renderForumFooter( $choose, $mem_group ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Forum management + * Last Updated: $Date: 2010-11-08 15:39:48 -0500 (Mon, 08 Nov 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since Tuesday 17th August 2004 + * @version $Revision: 7117 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_forums_forums_forums extends ipsCommand +{ + /** + * Skin HTML object + * + * @var object + */ + private $html; + + /** + * Forum functions object + * + * @var object + */ + private $forum_functions; + + /** + * Main entry point + * + * @param object ipsRegistry reference + * @return void Outputs to screen + */ + public function doExecute( ipsRegistry $registry ) + { + /* Forum functions set up */ + require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/admin_forum_functions.php", 'admin_forum_functions', 'forums' ); + + $this->forum_functions = new $classToLoad( $registry ); + $this->forum_functions->forumsInit(); + + $this->request['showall'] = intval( $this->request['showall'] ); + + //----------------------------------------- + // Load skin & lang + //----------------------------------------- + + $this->html = $this->registry->output->loadTemplate( 'cp_skin_forums' ); + $this->html->form_code = 'module=forums&section=forums&'; + $this->html->form_code_js = 'module=forums&section=forums&'; + + $this->lang->loadLanguageFile( array( 'admin_forums' ) ); + + //----------------------------------------- + // LOAD HTML + //----------------------------------------- + + $this->forum_functions->html =& $this->html; + + //----------------------------------------- + // To do... + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'forum_add': + case 'new': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_add' ); + $this->forumForm( 'new' ); + break; + case 'donew': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_add' ); + $this->forumSave( 'new' ); + break; + //------------------- ---------------------- + case 'edit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_edit' ); + $this->forumForm( 'edit' ); + break; + case 'doedit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_edit' ); + $this->forumSave( 'edit' ); + break; + //----------------------------------------- + case 'pedit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_permissions' ); + $this->permEditForm(); + break; + case 'pdoedit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_permissions' ); + $this->permDoEdit(); + break; + //----------------------------------------- + case 'doreorder': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_reorder' ); + $this->doReorder(); + break; + //----------------------------------------- + case 'delete': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_delete' ); + $this->deleteForm(); + break; + case 'dodelete': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_delete' ); + $this->doDelete(); + break; + //----------------------------------------- + case 'recount': + $this->recount(); + break; + //----------------------------------------- + case 'empty': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_empty' ); + $this->emptyForum(); + break; + case 'doempty': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_empty' ); + $this->doEmpty(); + break; + //----------------------------------------- + case 'frules': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_rules' ); + $this->showRules(); + break; + case 'dorules': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_rules' ); + $this->doRules(); + break; + //----------------------------------------- + case 'skinedit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_skins' ); + $this->skinEdit(); + break; + case 'doskinedit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_skins' ); + $this->doSkinEdit(); + break; + //----------------------------------------- + case 'forums_overview': + default: + $this->request['do'] = 'forums_overview'; + $this->showForums(); + break; + } + + //----------------------------------------- + // Pass to CP output hander + //----------------------------------------- + + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Edit skins assigned to forums + * + * @return void Outputs to screen + */ + public function skinEdit() + { + /* INI */ + $this->request['f'] = intval( $this->request['f'] ); + + if( $this->request['f'] == "" ) + { + $this->registry->output->showError( $this->lang->words['for_noid'], 1131 ); + } + + /* Forum Data */ + $forum = $this->forum_functions->forum_by_id[ $this->request['f'] ]; + + /* Check the forum */ + if ( ! $forum['id'] ) + { + $this->registry->output->showError( $this->lang->words['for_noid'], 1132 ); + } + + if ( ! $forum['skin_id'] ) + { + $forum['skin_id'] = -1; + } + + /* Skins */ + $skin_list = array_merge( array( array( -1, $this->lang->words['for_noneall'] ) ), $this->registry->output->generateSkinDropdown() ); + + /* Form Data */ + $forum['fsid'] = $this->registry->output->formDropdown( 'fsid', $skin_list, $forum['skin_id'] ); + $forum['apply_to_children'] = $this->registry->output->formYesNo( 'apply_to_children' ); + + /* Output */ + $this->registry->output->html .= $this->html->forumSkinOptions( $this->request['f'], $forum ); + } + + /** + * Save the skin assigned to the forum + * + * @return void Outputs to screen + */ + public function doSkinEdit() + { + /* INI */ + $this->request['f'] = intval( $this->request['f'] ); + + /* Check the forum */ + if ($this->request['f'] == "") + { + $this->registry->output->showError( $this->lang->words['for_noid'], 1133 ); + } + + /* Forum Data */ + $forum = $this->forum_functions->forum_by_id[ $this->request['f'] ]; + + /* Update the forum */ + $this->DB->update( 'forums', array( 'skin_id' => $this->request['fsid'] ), 'id='.$this->request['f'] ); + + /* Apply to children */ + if( $this->request['apply_to_children'] ) + { + $ids = $this->forum_functions->forumsGetChildren( $this->request['f'] ); + + if ( count( $ids ) ) + { + $this->DB->update( 'forums', array( 'skin_id' => $this->request['fsid'] ), 'id IN ('.implode(",",$ids).')' ); + } + } + + $this->registry->output->global_message = $this->lang->words['for_skinup']; + + $this->recacheForums(); + + $this->forum_functions->forumsInit(); + + /* Bounce */ + $this->request['f'] = $this->forum_functions->forum_by_id[ $this->request['f'] ]['parent_id']; + $this->showForums(); + } + + /** + * Show the form to edit rules + * + * @return void Outputs to screen + */ + public function showRules() + { + /* INI */ + $this->request['f'] = intval( $this->request['f'] ); + + if( ! $this->request['f'] ) + { + $this->registry->output->showError( $this->lang->words['for_noid'], 1134 ); + } + + $this->DB->build( array( 'select' => 'id, name, show_rules, rules_title, rules_text, rules_raw_html', 'from' => 'forums', 'where' => "id=".$this->request['f'] ) ); + $this->DB->execute(); + + //----------------------------------------- + // Make sure we have a legal forum + //----------------------------------------- + + if ( ! $this->DB->getTotalRows() ) + { + $this->registry->output->showError( $this->lang->words['for_noid'], 1135 ); + } + + $forum = $this->DB->fetch(); + + //----------------------------------------- + // Load and config the std/rte editors + //----------------------------------------- + + IPSText::getTextClass( 'bbcode' )->bypass_badwords = 1; + IPSText::getTextClass( 'bbcode' )->parse_smilies = 0; + IPSText::getTextClass( 'bbcode' )->parse_html = 1; + IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; + IPSText::getTextClass( 'bbcode' )->parsing_section = 'rules'; + + /* Form Fields */ + $forum['_show_rules'] = $this->registry->output->formDropdown( "show_rules", array( + array( '0' , $this->lang->words['for_rulesdont'] ), + array( '1' , $this->lang->words['for_ruleslink'] ), + array( '2' , $this->lang->words['for_rulesfull'] ) + ), $forum['show_rules'] ); + + $forum['_title'] = $this->registry->output->formInput( "title", IPSText::stripslashes( str_replace( "'", ''', $forum['rules_title'] ) ) ); + + if ( IPSText::getTextClass( 'editor' )->method == 'rte' ) + { + $forum['rules_text'] = IPSText::getTextClass( 'bbcode' )->convertForRTE( $forum['rules_text'] ); + } + else + { + $forum['rules_text'] = IPSText::getTextClass( 'bbcode' )->preEditParse( $forum['rules_text'] ); + } + + $forum['_editor'] = IPSText::getTextClass( 'editor' )->showEditor( $forum['rules_text'], 'body' ); + + $forum['rules_raw_html'] = $this->registry->output->formCheckbox( 'rules_raw_html', $forum['rules_raw_html'] ); + + /* Output */ + $this->registry->output->html .= $this->html->forumRulesForm( $forum['id'], $forum ); + } + + /** + * Save the forum rules + * + * @return void Outputs to screen + */ + public function doRules() + { + /* INI */ + $this->request['f'] = intval( $this->request['f'] ); + + if( $this->request['f'] == "" ) + { + $this->registry->output->showError( $this->lang->words['for_noid'], 1136 ); + } + + if( ! $this->request['rules_raw_html'] ) + { + //----------------------------------------- + // Load editor/bbcode + //----------------------------------------- + + $_POST[ 'body' ] = IPSText::getTextClass( 'editor' )->processRawPost( 'body' ); + + IPSText::getTextClass( 'bbcode' )->bypass_badwords = 1; + IPSText::getTextClass( 'bbcode' )->parse_smilies = 0; + IPSText::getTextClass( 'bbcode' )->parse_html = 1; + IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; + IPSText::getTextClass( 'bbcode' )->parsing_section = 'rules'; + + $_POST[ 'body' ] = IPSText::getTextClass( 'bbcode' )->preDbParse( $_POST[ 'body' ] ); + } + + $rules = array( + 'rules_title' => IPSText::stripslashes( $_POST['title'] ), + 'rules_text' => IPSText::stripslashes( $_POST['body'] ), + 'show_rules' => $this->request['show_rules'], + 'rules_raw_html' => intval($this->request['rules_raw_html']), + ); + + $this->DB->update( 'forums', $rules, 'id='.$this->request['f'] ); + + $this->recacheForums(); + $this->registry->output->global_message = $this->lang->words['for_rulesup']; + + //----------------------------------------- + // Bounce back to parent... + //----------------------------------------- + + $this->request['f'] = $this->forum_functions->forum_by_id[ $this->request['f'] ]['parent_id']; + $this->showForums(); + } + + /** + * Recount the forum + * + * @param integer [optional] Forum id + * @return void Outputs to screen + */ + public function recount($f_override="") + { + if ($f_override != "") + { + // Internal call, remap + + ipsRegistry::$request[ 'f'] = $f_override ; + } + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php', 'moderatorLibrary', 'forums' ); + $modfunc = new $classToLoad( $this->registry ); + + $modfunc->forumRecount($this->request['f']); + + $this->recacheForums(); + + $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['for_recountedlog'], $this->forum_functions->forum_by_id[$this->request['f']]['name'] ) ); + + $this->registry->output->global_message = $this->lang->words['for_resynched']; + + //----------------------------------------- + // Bounce back to parent... + //----------------------------------------- + + ipsRegistry::$request[ 'f'] = $this->forum_functions->forum_by_id[ $this->request['f'] ]['parent_id'] ; + $this->showForums(); + } + + /** + * Show the form to empty a forum + * + * @return void Outputs to screen + */ + public function emptyForum() + { + /* INI */ + $this->request['f'] = intval( $this->request['f'] ); + $form_array = array(); + + if( $this->request['f'] == "" ) + { + $this->registry->output->showError( $this->lang->words['for_noid'], 1137 ); + } + + $this->DB->build( array( 'select' => 'id, name', 'from' => 'forums', 'where' => "id=".$this->request['f'] ) ); + $this->DB->execute(); + + //----------------------------------------- + // Make sure we have a legal forum + //----------------------------------------- + + if ( !$this->DB->getTotalRows() ) + { + $this->registry->output->showError( $this->lang->words['for_noid'], 1138 ); + } + + $forum = $this->DB->fetch(); + + //----------------------------------------- + + $this->registry->output->html .= $this->html->forumEmptyForum( $this->request['f'], $forum ); + } + + /** + * Empty a forum + * + * @return void Outputs to screen + */ + public function doEmpty() + { + /* INI */ + $this->request['f'] = intval( $this->request['f'] ); + $soFar = intval($this->request['sofar']); + $thisCycle = 0; + + //----------------------------------------- + // Get module + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php', 'moderatorLibrary', 'forums' ); + $modfunc = new $classToLoad( $this->registry ); + + if( $this->request['f'] == "" ) + { + $this->registry->output->showError( $this->lang->words['for_noid_source'], 1139 ); + } + + //----------------------------------------- + // Check to make sure its a valid forum. + //----------------------------------------- + + $forum = $this->DB->buildAndFetch( array( 'select' => 'id, name, posts, topics', 'from' => 'forums', 'where' => "id=" . $this->request['f'] ) ); + + if( !$forum['id'] ) + { + $this->registry->output->showError( $this->lang->words['for_nodetails'], 11310 ); + } + + $this->DB->build( array( 'select' => 'tid', 'from' => 'topics', 'where' => "forum_id=" . $this->request['f'], 'limit' => array( 0, 200 ) ) ); + $outer = $this->DB->execute(); + + //----------------------------------------- + // What to do.. + //----------------------------------------- + + while( $t = $this->DB->fetch($outer) ) + { + $modfunc->topicDelete( $t['tid'] ); + $thisCycle++; + } + + //----------------------------------------- + // Rebuild stats and cache if we're done + //----------------------------------------- + + if( !$thisCycle ) + { + $modfunc->forumRecount( $this->request['f'] ); + $modfunc->statsRecount(); + $this->recacheForums(); + + $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['for_emptiedlog'], $forum['name'] ) ); + + $this->request['f'] = $this->forum_functions->forum_by_id[ $this->request['f'] ]['parent_id']; + + $this->registry->output->global_message = $this->lang->words['for_emptied']; + $this->showForums(); + } + else + { + $soFar = $soFar + $thisCycle; + $this->registry->output->redirect( $this->settings['base_url'] . $this->html->form_code . "&do=doempty&f={$this->request['f']}&sofar={$soFar}", sprintf( $this->lang->words['emptyforum_sofarcycle'], $soFar ), 1 ); + } + } + + /** + * Show the form to delete a form + * + * @return void Outputs to screen + */ + public function deleteForm() + { + /* INI */ + $this->request['f'] = intval( $this->request['f'] ); + $form_array = array(); + + if ( ! $this->request['f'] ) + { + $this->registry->output->showError( $this->lang->words['for_noid_delete'], 11311 ); + } + + $this->DB->build( array( 'select' => 'id, name, parent_id', 'from' => 'forums', 'order' => 'position' ) ); + $this->DB->execute(); + + //----------------------------------------- + // Make sure we have more than 1 + // forum.. + //----------------------------------------- + + if( $this->DB->getTotalRows() < 2 ) + { + $this->registry->output->showError( $this->lang->words['for_lastforum'], 11312 ); + } + + while( $r = $this->DB->fetch() ) + { + if( $r['id'] == $this->request['f'] ) + { + $name = $r['name']; + $is_cat = $r['parent_id'] > 0 ? 0 : 1; + continue; + } + } + + $form_array = $this->forum_functions->adForumsForumList( 1 ); + + //----------------------------------------- + // Count the number of topics + //----------------------------------------- + + $posts = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'topics', 'where' => 'forum_id='.$this->request['f'] ) ); + + //----------------------------------------- + // Start form + //----------------------------------------- + + /* Move dropds */ + if( $posts['count'] ) + { + $move = $this->registry->output->formDropdown( "MOVE_ID", $form_array ); + } + + /* Output */ + $this->registry->output->html .= $this->html->forumDeleteForm( $this->request['f'], $name, $move, $is_cat ); + } + + /** + * Delete a forum + * + * @return void Outputs to screen + */ + public function doDelete() + { + //----------------------------------------- + // Auth check... + //----------------------------------------- + + $this->registry->adminFunctions->checkSecurityKey(); + + //----------------------------------------- + // Continue + //----------------------------------------- + + $this->request['f'] = intval( $this->request['f'] ); + $this->request['MOVE_ID'] = intval( $this->request['MOVE_ID'] ); + $this->request['new_parent_id'] = intval( $this->request['new_parent_id'] ); + + $forum = $this->registry->class_forums->forum_by_id[ $this->request['f'] ]; + + if( ! $forum['id'] ) + { + $this->registry->output->showError( $this->lang->words['for_noid_source'], 11313 ); + } + + if( ! $this->request['new_parent_id'] ) + { + $this->request['new_parent_id'] = -1; + } + else + { + if( $this->request['new_parent_id'] == $this->request['f'] ) + { + $this->registry->output->global_message = $this->lang->words['for_child_no_parent']; + $this->deleteForm(); + return; + } + } + + //----------------------------------------- + // Would deleting this category orphan the only + // remaining forums? + //----------------------------------------- + + if( $forum['parent_id'] == -1 ) + { + $otherParent = 0; + + foreach( $this->registry->class_forums->forum_by_id as $id => $data ) + { + if( $data['parent_id'] == -1 ) + { + $otherParent = $id; + break; + } + } + + if( !$otherParent ) + { + $this->registry->output->showError( $this->lang->words['nodelete_last_cat'], 11364 ); + } + } + + //----------------------------------------- + // Get library + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php', 'moderatorLibrary', 'forums' ); + $modfunc = new $classToLoad( $this->registry ); + + //----------------------------------------- + // Move stuff + //----------------------------------------- + + if( $this->request['MOVE_ID'] ) + { + if( $this->request['MOVE_ID'] == $this->request['f'] ) + { + $this->registry->output->global_message = $this->lang->words['for_wherewhatwhy']; + $this->deleteForm(); + } + + //----------------------------------------- + // Move topics... + //----------------------------------------- + + $this->DB->update( 'topics', array( 'forum_id' => $this->request['MOVE_ID'] ), 'forum_id='.$this->request['f'] ); + + //----------------------------------------- + // Move polls... + //----------------------------------------- + + $this->DB->update( 'polls', array( 'forum_id' => $this->request['MOVE_ID'] ), 'forum_id='.$this->request['f'] ); + + //----------------------------------------- + // Move voters... + //----------------------------------------- + + $this->DB->update( 'voters', array( 'forum_id' => $this->request['MOVE_ID'] ), 'forum_id='.$this->request['f'] ); + + $modfunc->forumRecount( $this->request['MOVE_ID'] ); + } + + //----------------------------------------- + // Delete the forum + //----------------------------------------- + + $this->DB->delete( 'forums', "id=".$this->request['f'] ); + $this->DB->delete( 'permission_index', "app='forums' AND perm_type='forum' AND perm_type_id=".$this->request['f'] ); + + //----------------------------------------- + // Remove moderators from this forum + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', 'from' => 'moderators', 'where' => "forum_id LIKE '%,{$this->request['f']},%'" ) ); + $outer = $this->DB->execute(); + + while( $r = $this->DB->fetch($outer) ) + { + $forums = explode( ',', IPSText::cleanPermString( $r['forum_id'] ) ); + $newForums = array(); + + foreach( $forums as $aForumId ) + { + if( $aForumId != $this->request['f'] ) + { + $newForums[] = $aForumId; + } + } + + if( !count($newForums) ) + { + $this->DB->delete( 'moderators', "mid=" . $r['mid'] ); + } + else + { + $this->DB->update( 'moderators', array( 'forum_id' => ',' . implode( ',', $newForums ) . ',' ), 'mid=' . $r['mid'] ); + } + } + + //----------------------------------------- + // Delete forum subscriptions + //----------------------------------------- + + $this->DB->delete( 'forum_tracker', "forum_id=".$this->request['f'] ); + + //----------------------------------------- + // Update children + //----------------------------------------- + + $this->DB->update( 'forums', array( 'parent_id' => $this->request['new_parent_id'] ), "parent_id=" . $this->request['f'] ); + + //----------------------------------------- + // Rebuild forum cache + //----------------------------------------- + + $this->recacheForums(); + + //----------------------------------------- + // Rebuild moderator cache + //----------------------------------------- + + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'forums' ) . '/modules_admin/forums/moderator.php', 'admin_forums_forums_moderator' ); + $moderator = new $classToLoad(); + $moderator->makeRegistryShortcuts( $this->registry ); + $moderator->rebuildModeratorCache(); + + $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['for_removedlog'], $forum['name'] ) ); + + $this->registry->output->doneScreen($this->lang->words['for_removed'], $this->lang->words['for_control'], $this->form_code, 'redirect' ); + } + + /** + * Show the form to edit a forum + * + * @param string [new|edit] + * @param boolean Whether to change forum to category/back + * @return void Outputs to screen + */ + public function forumForm( $type='edit', $changetype=0 ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $addnew_type = ( isset( $this->request['type'] ) ) ? $this->request['type'] : 'forum'; + + $form = array(); + $forum = array(); + $forum_id = $this->request['f'] ? intval( $this->request['f'] ) : 0; + $parentid = intval( $this->request['p'] ) ? intval( $this->request['p'] ) : -1; + $cat_id = $this->request['c'] ? intval( $this->request['c'] ) : 0; + $f_name = $this->request['name'] ? $this->request['name'] : ''; + $subcanpost = $cat_id == 1 ? 0 : 1; + $perm_matrix = ""; + $dd_state = array( 0 => array( 1, $this->lang->words['for_active'] ), 1 => array( 0, $this->lang->words['for_readonly'] ) ); + $dd_moderate = array( + 0 => array( 0, $this->lang->words['for_no'] ), + 1 => array( 1, $this->lang->words['for_modall'] ), + 2 => array( 2, $this->lang->words['for_modtop'] ), + 3 => array( 3, $this->lang->words['for_modrep'] ), + ); + $dd_prune = array( + 0 => array( 1, $this->lang->words['for_today'] ), + 1 => array( 5, $this->lang->words['for_last5'] ), + 2 => array( 7, $this->lang->words['for_last7'] ), + 3 => array( 10, $this->lang->words['for_last10'] ), + 4 => array( 15, $this->lang->words['for_last15'] ), + 5 => array( 20, $this->lang->words['for_last20'] ), + 6 => array( 25, $this->lang->words['for_last25'] ), + 7 => array( 30, $this->lang->words['for_last30'] ), + 8 => array( 60, $this->lang->words['for_last60'] ), + 9 => array( 90, $this->lang->words['for_last90'] ), + 10=> array( 100, $this->lang->words['for_showall'] ), + ); + + $dd_order = array( + 0 => array( 'last_post', $this->lang->words['for_s_last'] ), + 1 => array( 'title' , $this->lang->words['for_s_topic'] ), + 2 => array( 'starter_name', $this->lang->words['for_s_name'] ), + 3 => array( 'posts' , $this->lang->words['for_s_post'] ), + 4 => array( 'views' , $this->lang->words['for_s_view'] ), + 5 => array( 'start_date', $this->lang->words['for_s_date'] ), + 6 => array( 'last_poster_name' , $this->lang->words['for_s_poster'] ) + ); + + $dd_by = array( + 0 => array( 'Z-A', $this->lang->words['for_desc'] ), + 1 => array( 'A-Z', $this->lang->words['for_asc'] ) + ); + + $dd_filter = array( + 0 => array( 'all', $this->lang->words['for_all'] ), + 1 => array( 'open', $this->lang->words['for_open'] ), + 2 => array( 'hot', $this->lang->words['for_hot'] ), + 3 => array( 'poll', $this->lang->words['for_poll'] ), + 4 => array( 'locked', $this->lang->words['for_locked'] ), + 5 => array( 'moved', $this->lang->words['for_moved'] ), + 6 => array( 'istarted', $this->lang->words['for_istarted'] ), + 7 => array( 'ireplied', $this->lang->words['for_ireplied'] ), + ); + + //----------------------------------------- + // EDIT + //----------------------------------------- + + if ( $type == 'edit' ) + { + //----------------------------------------- + // Check + //----------------------------------------- + + if ( ! $forum_id ) + { + $this->registry->output->showError( $this->lang->words['for_noforumselected'], 11314 ); + } + + //----------------------------------------- + // Do not show forum in forum list + //----------------------------------------- + + $this->forum_functions->exclude_from_list = $forum_id; + + //----------------------------------------- + // Get this forum + //----------------------------------------- + + $forum = $this->DB->buildAndFetch( array( + 'select' => 'f.*', + 'from' => array( 'forums' => 'f' ), + 'where' => 'f.id='.$this->request['f'], + 'add_join' => array( + array( + 'select' => 'p.*', + 'from' => array( 'permission_index' => 'p' ), + 'where' => "p.perm_type_id=f.id AND p.app='forums' AND p.perm_type='forum'", + 'type' => 'left', + ) + ), + ) ); + + //----------------------------------------- + // Check + //----------------------------------------- + + if ($forum['id'] == "") + { + $this->registry->output->showError( $this->lang->words['for_noid'], 11315 ); + } + + //----------------------------------------- + // Set up code buttons + //----------------------------------------- + + $addnew_type = $forum['parent_id'] == -1 ? 'category' : 'forum'; + + if( $changetype ) + { + $addnew_type = $addnew_type == 'category' ? 'forum' : 'category'; + } + if( $addnew_type == 'category' ) + { + $title = sprintf( $this->lang->words['for_editcat'], $forum['name'] ); + $button = $this->lang->words['for_editcat_button']; + $code = "doedit"; + } + else + { + $title = sprintf( $this->lang->words['for_editfor'], $forum['name'] ); + $button = $this->lang->words['for_editfor_button']; + $code = "doedit"; + } + if( $addnew_type == 'category' ) + { + $convert = ""; + } + else + { + $convert = ""; + } + } + + //----------------------------------------- + // NEW + //----------------------------------------- + + else + { + # Ensure there is an ID + $this->request['f'] = 0; + + if( $changetype ) + { + $addnew_type = $addnew_type == 'category' ? 'forum' : 'category'; + } + if( $addnew_type == 'category' ) + { + $forum = array( + 'sub_can_post' => $subcanpost, + 'name' => $f_name ? $f_name : $this->lang->words['for_newcat'], + 'parent_id' => $parentid, + 'use_ibc' => 1, + 'quick_reply' => 1, + 'allow_poll' => 1, + 'prune' => 100, + 'topicfilter' => 'all', + 'sort_key' => 'last_post', + 'sort_order' => 'Z-A', + 'inc_postcount' => 1, + 'description' => '', + 'status' => 0, + 'redirect_url' => '', + 'password' => '', + 'password_override' => '', + 'redirect_on' => 0, + 'redirect_hits' => 0, + 'permission_showtopic' => '', + 'permission_custom_error' => '', + 'use_html' => 0, + 'allow_pollbump' => 0, + 'forum_allow_rating' => 0, + 'preview_posts' => 0, + 'notify_modq_emails' => 0, + 'can_view_others' => 1, + + ); + + $title = $this->lang->words['for_addcat']; + $button = $this->lang->words['for_addcat']; + $code = "donew"; + } + else + { + $forum = array( + 'sub_can_post' => $subcanpost, + 'name' => $f_name ? $f_name : $this->lang->words['for_newfor'], + 'parent_id' => $parentid, + 'use_ibc' => 1, + 'quick_reply' => 1, + 'allow_poll' => 1, + 'prune' => 100, + 'topicfilter' => 'all', + 'sort_key' => 'last_post', + 'sort_order' => 'Z-A', + 'inc_postcount' => 1, + 'description' => '', + 'status' => 1, + 'redirect_url' => '', + 'password' => '', + 'password_override' => '', + 'redirect_on' => 0, + 'redirect_hits' => 0, + 'permission_showtopic' => '', + 'permission_custom_error' => '', + 'use_html' => 0, + 'allow_pollbump' => 0, + 'forum_allow_rating' => 0, + 'preview_posts' => 0, + 'notify_modq_emails' => 0, + 'min_posts' => 0, + 'hide_last_info' => 0, + 'can_view_others' => 1, + ); + + $title = $this->lang->words['for_addfor']; + $button = $this->lang->words['for_addfor']; + $code = "donew"; + } + if( $addnew_type == 'category' ) + { + $convert = ""; + } + else + { + $convert = ""; + } + } + + //----------------------------------------- + // Build forumlist + //----------------------------------------- + + $forumlist = $this->forum_functions->adForumsForumList(); + + //----------------------------------------- + // Build group list + //----------------------------------------- + + $mem_group = array(); + + foreach( $this->caches['group_cache'] as $g_id => $group ) + { + $mem_group[] = array( $g_id , $group['g_title'] ); + } + + //----------------------------------------- + // Page title... + //----------------------------------------- + + //$this->registry->output->html_help_title = $title; + + //----------------------------------------- + // Generate form items + //----------------------------------------- + + # Main settings + $form['name'] = $this->registry->output->formInput( 'name' , IPSText::parseCleanValue( ( isset( $_POST['name'] ) AND $_POST['name'] ) ? $_POST['name'] : $forum['name'] ) ); + $form['description'] = $this->registry->output->formTextarea("description" , IPSText::br2nl( ( isset( $_POST['description']) AND $_POST['description'] ) ? $_POST['description'] : $forum['description'] ) ); + $form['parent_id'] = $this->registry->output->formDropdown("parent_id" , $forumlist, ( isset($_POST['parent_id'] ) AND $_POST['parent_id'] ) ? $_POST['parent_id'] : $forum['parent_id'] ); + $form['status'] = $this->registry->output->formDropdown("status" , $dd_state , ( isset($_POST['status'] ) AND $_POST['status'] ) ? $_POST['status'] : $forum['status'] ); + $form['sub_can_post'] = $this->registry->output->formYesNo( 'sub_can_post', ( isset($_POST['sub_can_post']) AND $_POST['sub_can_post'] ) ? $_POST['sub_can_post'] : ( $forum['sub_can_post'] == 1 ? 0 : 1 ) ); + + # Redirect options + $form['redirect_url'] = $this->registry->output->formInput( 'redirect_url' , ( isset($_POST['redirect_url']) AND $_POST['redirect_url'] ) ? $_POST['redirect_url'] : $forum['redirect_url'] ); + $form['redirect_on'] = $this->registry->output->formYesNo('redirect_on' , ( isset($_POST['redirect_on']) AND $_POST['redirect_on'] ) ? $_POST['redirect_on'] : $forum['redirect_on'] ); + $form['redirect_hits'] = $this->registry->output->formInput( 'redirect_hits', ( isset($_POST['redirect_hits']) AND $_POST['redirect_hits'] ) ? $_POST['redirect_hits'] : $forum['redirect_hits'] ); + + # Permission settings + $form['permission_showtopic'] = $this->registry->output->formYesNo( 'permission_showtopic' , ( isset($_POST['permission_showtopic']) AND $_POST['permission_showtopic'] ) ? $_POST['permission_showtopic'] : $forum['permission_showtopic'] ); + $form['permission_custom_error'] = $this->registry->output->formTextarea("permission_custom_error", IPSText::br2nl( ( isset($_POST['permission_custom_error']) AND $_POST['permission_custom_error'] ) ? $_POST['permission_custom_error'] : $forum['permission_custom_error'] ) ); + + # Forum settings + $form['use_html'] = $this->registry->output->formYesNo('use_html' , ( isset($_POST['use_html']) AND $_POST['use_html'] ) ? $_POST['use_html'] : $forum['use_html'] ); + $form['use_ibc'] = $this->registry->output->formYesNo('use_ibc' , ( isset($_POST['use_ibc']) AND $_POST['use_ibc'] ) ? $_POST['use_ibc'] : $forum['use_ibc'] ); + $form['quick_reply'] = $this->registry->output->formYesNo('quick_reply' , ( isset($_POST['quick_reply']) AND $_POST['quick_reply'] ) ? $_POST['quick_reply'] : $forum['quick_reply'] ); + $form['allow_poll'] = $this->registry->output->formYesNo('allow_poll' , ( isset($_POST['allow_poll']) AND $_POST['allow_poll'] ) ? $_POST['allow_poll'] : $forum['allow_poll'] ); + $form['allow_pollbump'] = $this->registry->output->formYesNo('allow_pollbump' , ( isset($_POST['allow_pollbump']) AND $_POST['allow_pollbump'] ) ? $_POST['allow_pollbump'] : $forum['allow_pollbump'] ); + $form['inc_postcount'] = $this->registry->output->formYesNo('inc_postcount' , ( isset($_POST['inc_postcount']) AND $_POST['inc_postcount'] ) ? $_POST['inc_postcount'] : $forum['inc_postcount'] ); + $form['forum_allow_rating'] = $this->registry->output->formYesNo('forum_allow_rating', ( isset($_POST['forum_allow_rating']) AND $_POST['forum_allow_rating'] ) ? $_POST['forum_allow_rating'] : $forum['forum_allow_rating'] ); + $form['min_posts_post'] = $this->registry->output->formInput('min_posts_post' , ( isset($_POST['min_posts_post']) AND $_POST['min_posts_post'] ) ? $_POST['min_posts_post'] : $forum['min_posts_post'] ); + $form['min_posts_view'] = $this->registry->output->formInput('min_posts_view' , ( isset($_POST['min_posts_view']) AND $_POST['min_posts_view'] ) ? $_POST['min_posts_view'] : $forum['min_posts_view'] ); + $form['can_view_others'] = $this->registry->output->formYesNo('can_view_others' , ( isset($_POST['can_view_others']) AND $_POST['can_view_others'] ) ? $_POST['can_view_others'] : $forum['can_view_others'] ); + $form['hide_last_info'] = $this->registry->output->formYesNo('hide_last_info' , ( isset($_POST['hide_last_info']) AND $_POST['hide_last_info'] ) ? $_POST['hide_last_info'] : $forum['hide_last_info'] ); + $form['disable_sharelinks'] = $this->registry->output->formYesNo('disable_sharelinks' , ( isset($_POST['disable_sharelinks']) AND $_POST['disable_sharelinks'] ) ? $_POST['disable_sharelinks'] : $forum['disable_sharelinks'] ); + + # Mod settings + $form['preview_posts'] = $this->registry->output->formDropdown( "preview_posts" , $dd_moderate, ( isset($_POST['preview_posts']) AND $_POST['preview_posts'] ) ? $_POST['preview_posts'] : $forum['preview_posts'] ); + $form['notify_modq_emails'] = $this->registry->output->formInput( 'notify_modq_emails' , ( isset($_POST['notify_modq_emails']) AND $_POST['notify_modq_emails'] ) ? $_POST['notify_modq_emails'] : $forum['notify_modq_emails'] ); + $form['password'] = $this->registry->output->formInput( 'password' , ( isset($_POST['password']) AND $_POST['password'] ) ? $_POST['password'] : $forum['password'] ); + $form['password_override'] = $this->registry->output->formMultiDropdown( 'password_override[]' , $mem_group, ( isset($_POST['password_override']) AND $_POST['password_override'] ) ? $_POST['password_override'] : explode( ",", $forum['password_override'] ) ); + + # Sorting settings + $form['prune'] = $this->registry->output->formDropdown("prune" , $dd_prune, ( isset($_POST['prune']) AND $_POST['prune'] ) ? $_POST['prune'] : $forum['prune'] ); + $form['sort_key'] = $this->registry->output->formDropdown("sort_key" , $dd_order, ( isset($_POST['sort_key']) AND $_POST['sort_key'] ) ? $_POST['sort_key'] : $forum['sort_key'] ); + $form['sort_order'] = $this->registry->output->formDropdown("sort_order", $dd_by , ( isset($_POST['sort_order']) AND $_POST['sort_order'] ) ? $_POST['sort_order'] : $forum['sort_order'] ); + $form['topicfilter'] = $this->registry->output->formDropdown("topicfilter", $dd_filter, ( isset($_POST['topicfilter']) AND $_POST['topicfilter'] ) ? $_POST['topicfilter'] : $forum['topicfilter'] ); + + # Trim the form for categories... + $form['addnew_type'] = $addnew_type; + $this->request['type'] = $addnew_type; + $form['addnew_type_upper'] = ucwords($addnew_type); + + $form['convert_button'] =& $convert; + + //----------------------------------------- + // Show permission matrix + //----------------------------------------- + + if ( $type != 'edit' OR $addnew_type == 'category' ) + { + /* Permission Class */ + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php', 'classPublicPermissions' ); + $permissions = new $classToLoad( ipsRegistry::instance() ); + + if( $addnew_type == 'category' ) + { + $perm_matrix = $permissions->adminPermMatrix( 'forum', $forum, 'forums', 'view' ); + } + else + { + $perm_matrix = $permissions->adminPermMatrix( 'forum', $forum ); + } + } + + /* Application Tabs */ + $form['tabStrip'] = ''; + $form['tabContent'] = ''; + + $tabsUsed = 2; + $firsttab = false; + + foreach( ipsRegistry::$applications as $app_dir => $app_data ) + { + if ( ! IPSLib::appIsInstalled( $app_dir ) ) + { + continue; + } + + if ( file_exists( IPSLib::getAppDir( $app_dir ) . '/extensions/admin/forum_form.php' ) ) + { + $_class = IPSLib::loadLibrary( IPSLib::getAppDir( $app_dir ) . '/extensions/admin/forum_form.php', 'admin_forum_form__'.$app_dir, $app_dir ); + + if ( class_exists( $_class ) ) + { + $_object = new $_class( $this->registry ); + + $data = $_object->getDisplayContent( $forum, $tabsUsed ); + $form['tabContent'] .= $data['content']; + $form['tabStrip'] .= $data['tabs']; + + $tabsUsed = $data['tabsUsed'] ? ( $tabsUsed + $data['tabsUsed'] ) : ( $tabsUsed + 1 ); + + if ( $this->request['_initTab'] == $app_dir ) + { + $firsttab = $tabsUsed; + } + } + } + } + + //----------------------------------------- + // Show form... + //----------------------------------------- + + $this->registry->output->html .= $this->html->forumForm( $form, $button, $code, $title, $forum, $perm_matrix ); + + //----------------------------------------- + // Nav and print + //----------------------------------------- + + //ipsRegistry::getClass('adminOuput')->nav[] = array( $this->form_code, 'Manage Forums' ); + //ipsRegistry::getClass('adminOuput')->nav[] = array( '', 'Add/Edit '.ucwords($addnew_type) ); + } + + /** + * Save the forum + * + * @param string [new|edit] + * @return void Outputs to screen + */ + public function forumSave($type='new') + { + //----------------------------------------- + // Converting the type? + //----------------------------------------- + + if( $this->request['convert'] ) + { + $this->forumForm( $type, 1 ); + return; + } + + //----------------------------------------- + // INIT + //----------------------------------------- + + $this->request['name'] = trim( $this->request['name'] ); + $this->request['f'] = intval( $this->request['f'] ); + + $forum_cat_lang = intval( $this->request['parent_id'] ) == -1 ? $this->lang->words['for_iscat_y'] : $this->lang->words['for_iscat_n']; + + //----------------------------------------- + // Auth check... + //----------------------------------------- + + $this->registry->adminFunctions->checkSecurityKey(); + + //----------------------------------------- + // Check + //----------------------------------------- + + if( $this->request['name'] == "" ) + { + $this->registry->output->global_message = sprintf( $this->lang->words['for_entertitle'], mb_strtolower( $forum_cat_lang ) ); + $this->forumForm( $type ); + return; + } + + //----------------------------------------- + // Are we trying to do something stupid + // like running with scissors or moving + // the parent of a forum into itself + // spot? + //----------------------------------------- + + if( $this->request['parent_id'] != $this->forum_functions->forum_by_id[ $this->request['f'] ]['parent_id'] ) + { + $ids = $this->forum_functions->forumsGetChildren( $this->request['f'] ); + $ids[] = $this->request['f']; + + if ( in_array( $this->request['parent_id'], $ids ) ) + { + $this->registry->output->global_error = $this->lang->words['for_whymovethere']; + $this->forumForm( $type ); + return; + } + } + + if( $this->request['parent_id'] < 1 ) + { + $this->request['sub_can_post'] = 1; + } + + //----------------------------------------- + // Save array + //----------------------------------------- + + $save = array ( 'name' => IPSText::getTextClass('bbcode')->xssHtmlClean( nl2br( IPSText::stripslashes( $_POST['name'] ) ) ), + 'name_seo' => IPSText::makeSeoTitle( $this->request['name'] ), + 'description' => IPSText::getTextClass('bbcode')->xssHtmlClean( nl2br( IPSText::stripslashes( $_POST['description'] ) ) ), + 'use_ibc' => intval($this->request['use_ibc']), + 'use_html' => intval($this->request['use_html']), + 'status' => intval($this->request['status']), + 'password' => $this->request['password'], + 'password_override' => is_array($this->request['password_override']) ? implode( ",", $this->request['password_override'] ) : '', + 'sort_key' => $this->request['sort_key'], + 'sort_order' => $this->request['sort_order'], + 'prune' => intval($this->request['prune']), + 'topicfilter' => $this->request['topicfilter'], + 'preview_posts' => intval($this->request['preview_posts']), + 'allow_poll' => intval($this->request['allow_poll']), + 'allow_pollbump' => intval($this->request['allow_pollbump']), + 'forum_allow_rating' => intval($this->request['forum_allow_rating']), + 'inc_postcount' => intval($this->request['inc_postcount']), + 'parent_id' => intval($this->request['parent_id']), + 'sub_can_post' => ( intval($this->request['sub_can_post']) == 1 ? 0 : 1 ), + 'quick_reply' => intval($this->request['quick_reply']), + 'redirect_on' => intval($this->request['redirect_on']), + 'redirect_hits' => intval($this->request['redirect_hits']), + 'redirect_url' => $this->request['redirect_url'], + 'notify_modq_emails' => $this->request['notify_modq_emails'], + 'permission_showtopic' => intval($this->request['permission_showtopic']), + 'min_posts_post' => intval( $this->request['min_posts_post'] ), + 'min_posts_view' => intval( $this->request['min_posts_view'] ), + 'can_view_others' => intval( $this->request['can_view_others'] ), + 'hide_last_info' => intval( $this->request['hide_last_info'] ), + 'disable_sharelinks' => intval( $this->request['disable_sharelinks'] ), + 'permission_custom_error' => nl2br( IPSText::stripslashes($_POST['permission_custom_error']) ) ); + + /* Save data from application tabs */ + foreach( ipsRegistry::$applications as $app_dir => $app_data ) + { + if ( ! IPSLib::appIsInstalled( $app_dir ) ) + { + continue; + } + + if ( file_exists( IPSLib::getAppDir( $app_dir ) . '/extensions/admin/forum_form.php' ) ) + { + $_class = IPSLib::loadLibrary( IPSLib::getAppDir( $app_dir ) . '/extensions/admin/forum_form.php', 'admin_forum_form__'.$app_dir, $app_dir ); + $_object = new $_class( $this->registry ); + $remote = $_object->getForSave(); + $save = array_merge( $remote, $save ); + } + } + + //----------------------------------------- + // ADD + //----------------------------------------- + + if ( $type == 'new' ) + { + $this->DB->build( array( 'select' => 'MAX(id) as top_forum', 'from' => 'forums' ) ); + $this->DB->execute(); + + $row = $this->DB->fetch(); + + if ( $row['top_forum'] < 1 ) + { + $row['top_forum'] = 0; + } + + $row['top_forum']++; + + /* Forum Information */ + //$save['id'] = $row['top_forum']; + $save['position'] = $row['top_forum']; + $save['topics'] = 0; + $save['posts'] = 0; + $save['last_post'] = 0; + $save['last_poster_id'] = 0; + $save['last_poster_name'] = ""; + + /* Insert the record */ + $this->DB->insert( 'forums', $save ); + $forum_id = $this->DB->getInsertId(); + + /* Permissions */ + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php', 'classPublicPermissions' ); + $permissions = new $classToLoad( ipsRegistry::instance() ); + $permissions->savePermMatrix( $this->request['perms'], $forum_id, 'forum' ); + + if( !$save['can_view_others'] ) + { + $this->DB->update( 'permission_index', array( 'owner_only' => 1 ), "app='forums' AND perm_type='forum' AND perm_type_id={$forum_id}" ); + } + + /* Done */ + $this->registry->output->global_message = $forum_cat_lang . $this->lang->words['for__created']; + $this->registry->adminFunctions->saveAdminLog( $forum_cat_lang . " '" . $this->request['name'] . "'" . mb_strtolower ( $this->lang->words['for__created'] ) ); + } + else + { + if ( $this->request['parent_id'] == -1 ) + { + $save['can_view_others'] = 1; + + /* Permissions */ + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php', 'classPublicPermissions' ); + $permissions = new $classToLoad( ipsRegistry::instance() ); + $permissions->savePermMatrix( $this->request['perms'], $this->request['f'], 'forum' ); + + if( ! $save['can_view_others'] ) + { + $this->DB->update( 'permission_index', array( 'owner_only' => 1 ), "app='forums' AND perm_type='forum' AND perm_type_id={$this->request['f']}" ); + } + else + { + $this->DB->update( 'permission_index', array( 'owner_only' => 0 ), "app='forums' AND perm_type='forum' AND perm_type_id={$this->request['f']}" ); + } + } + + $this->DB->update( 'forums', $save, "id=" . $this->request['f'] ); + + $this->registry->output->global_message = $forum_cat_lang.$this->lang->words['for__edited']; + + $this->registry->adminFunctions->saveAdminLog( $forum_cat_lang." '" . $this->request['name'] . "' " . mb_strtolower ( $this->lang->words['for__edited'] ) ); + } + + $this->recacheForums(); + + $this->request['f'] = ''; + if( $save['parent_id'] > 0 ) + { + $this->request['f'] = $save['parent_id']; + } + + $this->forum_functions->forumsInit(); + + $this->showForums(); + } + + /** + * Show the form to edit permissions + * + * @return void Outputs to screen + */ + public function permEditForm() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $this->request['f'] = intval( $this->request['f'] ); + + //----------------------------------------- + // check.. + //----------------------------------------- + + if ( ! $this->request['f'] ) + { + $this->registry->output->showError( $this->lang->words['for_noid'], 11316 ); + } + + //----------------------------------------- + // Get this forum details + //----------------------------------------- + + $forum = $this->forum_functions->forum_by_id[ $this->request['f'] ]; + + if( $this->request['copyForumPerms'] ) + { + $forumToCopy = $this->forum_functions->forum_by_id[ $this->request['copyForumPerms'] ]; + + foreach( array( 'perm_view', 'perm_2', 'perm_3', 'perm_4', 'perm_5', 'perm_6' ) as $field ) + { + $forum[ $field ] = $forumToCopy[ $field ]; + } + } + + //----------------------------------------- + // Next id... + //----------------------------------------- + + $relative = $this->getNextId( $this->request['f'] ); + + //----------------------------------------- + // check... + //----------------------------------------- + + if ( ! $forum['id'] ) + { + $this->registry->output->showError( $this->lang->words['for_noid'], 11317 ); + } + + //----------------------------------------- + // HTML + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php', 'classPublicPermissions' ); + $permissions = new $classToLoad( ipsRegistry::instance() ); + + if( $forum['parent_id'] != 'root' ) + { + $perm_matrix = $permissions->adminPermMatrix( 'forum', $forum ); + } + else + { + $perm_matrix = $permissions->adminPermMatrix( 'forum', $forum, 'forums', 'view' ); + } + + $forumCopyDropdown = $this->registry->output->formDropdown( 'copyForumPerms', $this->forum_functions->adForumsForumList() ); + + $this->registry->output->html .= $this->html->forumPermissionForm( $forum, $relative, $perm_matrix, $forum, $forumCopyDropdown ); + } + + /** + * Get the id of the next forum + * + * @param integer Last forum id + * @return void Outputs to screen + */ + public function getNextId($fid) + { + $nextid = 0; + $ids = array(); + $index = 0; + $count = 0; + + foreach( $this->forum_functions->forum_cache['root'] as $forum_data ) + { + $ids[ $count ] = $forum_data['id']; + + if ( $forum_data['id'] == $fid ) + { + $index = $count; + } + + $count++; + + if ( isset($this->forum_functions->forum_cache[ $forum_data['id'] ]) AND is_array( $this->forum_functions->forum_cache[ $forum_data['id'] ] ) ) + { + foreach( $this->forum_functions->forum_cache[ $forum_data['id'] ] as $forum_data ) + { + $children = $this->forum_functions->forumsGetChildren( $forum_data['id'] ); + + $ids[ $count ] = $forum_data['id']; + + if ( $forum_data['id'] == $fid ) + { + $index = $count; + } + + $count++; + + if ( is_array($children) and count($children) ) + { + foreach( $children as $kid ) + { + $ids[ $count ] = $kid; + + if ( $kid == $fid ) + { + $index = $count; + } + + $count++; + } + } + } + } + } + + return array( 'next' => $ids[ $index + 1 ], 'previous' => $ids[ $index - 1 ] ); + } + + /** + * Recache the forums + * + * @return void + * @deprecated We're moving away from forum cache + */ + public function recacheForums() + { + //$this->registry->class_forums->updateForumCache(); + } + + /** + * Save the permissions + * + * @return void Outputs to screen + */ + public function permDoEdit() + { + /* INI */ + $perms = array(); + $this->request['f'] = intval( $this->request['f'] ); + + /* Security Check */ + $this->registry->adminFunctions->checkSecurityKey(); + + /* Save the permissions */ + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php', 'classPublicPermissions' ); + $permissions = new $classToLoad( ipsRegistry::instance() ); + $permissions->savePermMatrix( $this->request['perms'], $this->request['f'], 'forum' ); + + /* Log */ + $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['for_permeditedin'], $this->request['name'] ) ); + + $this->recacheForums(); + + /* Previous Forum */ + if ( $this->request['doprevious'] AND $this->request['doprevious'] and $this->request['previd'] > 0 ) + { + $this->registry->output->global_message = $this->lang->words['for_permedited']; + + $this->request['f'] = $this->request['previd']; + + $this->registry->output->silentRedirect( "{$this->settings['base_url']}{$this->html->form_code}do=pedit&f=" . $this->request['f'] ); + } + /* Next Forum */ + else if ( $this->request['donext'] AND $this->request['donext'] and $this->request['nextid'] > 0 ) + { + $this->registry->output->global_message = $this->lang->words['for_permedited']; + + $this->request['f'] = $this->request['nextid']; + + $this->registry->output->silentRedirect( "{$this->settings['base_url']}{$this->html->form_code}do=pedit&f=" . $this->request['f'] ); + } + /* Reload */ + else if ( $this->request['reload'] AND $this->request['reload'] ) + { + $this->registry->output->silentRedirect( "{$this->settings['base_url']}{$this->html->form_code}do=pedit&f=" . $this->request['f'] ); + } + /* Done */ + else + { + $this->registry->output->doneScreen( $this->lang->words['for_permedited2'], $this->lang->words['for_control'], $this->html->form_code, 'redirect' ); + } + } + + /** + * Reorder the child forums + * + * @return void Outputs to screen + */ + public function doReorder() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' ); + $ajax = new $classToLoad(); + + //----------------------------------------- + // Checks... + //----------------------------------------- + + if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) + { + $ajax->returnString( $this->lang->words['postform_badmd5'] ); + exit(); + } + + //----------------------------------------- + // Save new position + //----------------------------------------- + + $position = 1; + + if( is_array($this->request['forums']) AND count($this->request['forums']) ) + { + foreach( $this->request['forums'] as $this_id ) + { + $this->DB->update( 'forums', array( 'position' => $position ), 'id=' . $this_id ); + + $position++; + } + } + + $this->recacheForums(); + + $ajax->returnString( 'OK' ); + exit(); + } + + /** + * List the forums + * + * @return void Outputs to screen + */ + public function showForums() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $this->request['f'] = intval( $this->request['f'] ); + + //----------------------------------------- + // Nav + //----------------------------------------- + + if( $this->request['f'] ) + { + $nav = $this->forum_functions->forumsBreadcrumbNav( $this->request['f'], '&'.$this->form_code.'&f=' ); + + if( is_array( $nav ) and count( $nav ) > 1 ) + { + //array_shift( $nav ); + } + } + + //----------------------------------------- + // Grab the moderators + //----------------------------------------- + + $this->forum_functions->moderators = array(); + + $this->DB->build( array( + 'select' => 'm.*', + 'from' => array( 'moderators' => 'm' ), + 'add_join'=> array( + array( + 'select' => 'mm.members_display_name', + 'from' => array( 'members' => 'mm' ), + 'where' => 'mm.member_id=m.member_id AND m.is_group=0', + 'type' => 'left' + ) + ) + ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $this->forum_functions->moderators[] = $r; + } + + //----------------------------------------- + // Print screen + //----------------------------------------- + + $this->forum_functions->type = 'manage'; + + $this->registry->output->html .= $this->html->renderForumHeader( $nav ); + + $this->forum_functions->forumsListForums(); + + $choose = ""; + + //----------------------------------------- + // Member groups + //----------------------------------------- + + $mem_group = ""; + + //----------------------------------------- + // Add footer + //----------------------------------------- + + $this->registry->output->html .= $this->html->renderForumFooter( $choose, $mem_group ); + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/forums/index.html b/upload/admin/applications/forums/modules_admin/forums/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_admin/forums/index.html +++ b/upload/admin/applications/forums/modules_admin/forums/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/forums/moderator.php b/upload/admin/applications/forums/modules_admin/forums/moderator.php index 80220470..b838bbdd 100644 --- a/upload/admin/applications/forums/modules_admin/forums/moderator.php +++ b/upload/admin/applications/forums/modules_admin/forums/moderator.php @@ -1,697 +1,702 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_forums_forums_moderator extends ipsCommand -{ - /** - * Forum functions library - * - * @access public - * @var object - */ - public $forumfunc; - - /** - * Skin methods library - * - * @access public - * @var object - */ - public $html; - - /** - * Main execution point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - /* Admin forum functions */ - - require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/forums/admin_forum_functions.php' ); - - $this->forumfunc = new admin_forum_functions( $registry ); - - /* Skin and Lang */ - $this->html = $this->registry->output->loadTemplate( 'cp_skin_forums' ); - $this->html->form_code = 'module=forums&section=moderator&'; - $this->html->form_code_js = 'module=forums&section=moderator&'; - - $this->lang->loadLanguageFile( array( 'admin_forums' ) ); - - //----------------------------------------- - - switch( $this->request['do'] ) - { - case 'add': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mods_add' ); - $this->moderatorAddPreform(); - break; - - case 'add_final': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mods_add' ); - $this->modForm('add'); - break; - - case 'doadd': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mods_add' ); - $this->addMod(); - break; - - case 'edit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mods_edit' ); - $this->modForm('edit'); - break; - - case 'doedit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mods_edit' ); - $this->doEdit(); - break; - - case 'remove': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mods_delete' ); - $this->delete(); - break; - - default: - $this->registry->output->silentRedirect( $this->settings['_base_url'] . 'app=core&module=help&id=mod_mmod' ); - break; - } - - //----------------------------------------- - // Pass to CP output hander - //----------------------------------------- - - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Delete a moderator - * - * @access public - * @return void [Outputs to screen] - */ - public function delete() - { - if ($this->request['mid'] == "") - { - $this->registry->output->showError( $this->lang->words['mod_valid'], 11319 ); - } - - $mod = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'moderators', 'where' => "mid=".intval($this->request['mid']) ) ); - - if ( $mod['is_group'] ) - { - $name = $this->lang->words['mod_group'].$mod['group_name']; - } - else - { - $getname = $this->DB->buildAndFetch( array( 'select' => 'members_display_name', 'from' => 'members', 'where' => 'member_id=' . $mod['member_id'] ) ); - - $name = $getname['members_display_name']; - } - - if( $this->request['fid'] == 'all' ) - { - $this->DB->delete( 'moderators', "mid=".intval($this->request['mid']) ); - - //----------------------------------------- - // Delete *all* instances of this moderator - //----------------------------------------- - - if( $mod['is_group'] ) - { - $this->DB->delete( 'moderators', "is_group=1 AND group_id=". $mod['group_id'] ); - } - else - { - $this->DB->delete( 'moderators', "is_group=0 AND member_id=". $mod['member_id'] ); - } - } - else - { - $forumIds = explode( ',', IPSText::cleanPermString( $mod['forum_id'] ) ); - $newForums = array(); - - foreach( $forumIds as $aForumId ) - { - if( $aForumId != $this->request['fid'] ) - { - $newForums[] = $aForumId; - } - } - - if( !count($newForums) ) - { - $this->DB->delete( 'moderators', "mid=" . $mod['mid'] ); - } - else - { - $this->DB->update( 'moderators', array( 'forum_id' => ',' . implode( ',', $newForums ) . ',' ), 'mid=' . $mod['mid'] ); - } - } - - - $this->rebuildModeratorCache(); - - ipsRegistry::getClass('adminFunctions')->saveAdminLog( sprintf($this->lang->words['mod_removedlog'], $name) ); - - $this->registry->output->global_message = $this->lang->words['mod_removed']; - $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'].'&app=forums&module=forums§ion=forums' ); - } - - - /** - * Edit a moderator - * - * @access public - * @return void [Outputs to screen] - */ - public function doEdit() - { - if( $this->request['mid'] == "" ) - { - $this->registry->output->showError( $this->lang->words['mod_valid'], 11321 ); - } - - $forums = array(); - - foreach( $this->request['forums'] as $forum_id ) - { - $forums[ $forum_id ] = $forum_id; - } - - $mod = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'moderators', 'where' => "mid=" . intval( $this->request['mid'] ) ) ); - - if( $mod['is_group'] ) - { - foreach( $forums as $forum_id ) - { - $this->DB->build( array( 'select' => '*', 'from' => 'moderators', 'where' => "forum_id LIKE '%,{$forum_id},%' and group_id=" . $mod['group_id'] . ' AND mid<>' . $mod['mid'] ) ); - $this->DB->execute(); - - while( $f = $this->DB->fetch() ) - { - $theseForums = explode( ',', IPSText::cleanPermString( $f['forum_id'] ) ); - - foreach( $theseForums as $thisForumId ) - { - unset($forums[ $thisForumId ]); - } - } - } - } - else - { - foreach( $forums as $forum_id ) - { - $this->DB->build( array( 'select' => '*', 'from' => 'moderators', 'where' => "forum_id LIKE '%,{$forum_id},%' and member_id=" . $mod['member_id'] . ' AND mid<>' . $mod['mid'] ) ); - $this->DB->execute(); - - while( $f = $this->DB->fetch() ) - { - $theseForums = explode( ',', IPSText::cleanPermString( $f['forum_id'] ) ); - - foreach( $theseForums as $thisForumId ) - { - unset($forums[ $thisForumId ]); - } - } - } - } - - //----------------------------------------- - // Build Mr Hash - //----------------------------------------- - - $this->DB->update( 'moderators', array( - 'forum_id' => ',' . implode( ',', $forums ) . ',', - 'edit_post' => intval( $this->request['edit_post'] ), - 'edit_topic' => intval( $this->request['edit_topic'] ), - 'delete_post' => intval( $this->request['delete_post'] ), - 'delete_topic' => intval( $this->request['delete_topic'] ), - 'view_ip' => intval( $this->request['view_ip'] ), - 'open_topic' => intval( $this->request['open_topic'] ), - 'close_topic' => intval( $this->request['close_topic'] ), - 'mass_move' => intval( $this->request['mass_move'] ), - 'mass_prune' => intval( $this->request['mass_prune'] ), - 'move_topic' => intval( $this->request['move_topic'] ), - 'pin_topic' => intval( $this->request['pin_topic'] ), - 'unpin_topic' => intval( $this->request['unpin_topic'] ), - 'post_q' => intval( $this->request['post_q'] ), - 'topic_q' => intval( $this->request['topic_q'] ), - 'allow_warn' => intval( $this->request['allow_warn'] ), - 'split_merge' => intval( $this->request['split_merge'] ), - 'edit_user' => intval( $this->request['edit_user'] ), - 'can_mm' => intval( $this->request['can_mm'] ), - 'mod_can_set_open_time' => intval( $this->request['mod_can_set_open_time'] ), - 'mod_can_set_close_time' => intval( $this->request['mod_can_set_close_time'] ), - 'mod_bitoptions' => IPSBWOptions::freeze( $this->request, 'moderators', 'forums' ) - ), 'mid='.intval($this->request['mid']) ); - - $this->rebuildModeratorCache(); - - $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['mod_editedlog'], $mod['member_name'] ) ); - - $this->registry->output->global_message = $this->lang->words['mod_edited']; - $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'].'module=forums§ion=forums' ); - } - - /** - * Add a moderator - * - * @access public - * @return void [Outputs to screen] - */ - public function addMod() - { - if( !is_array($this->request['forums']) OR !count($this->request['forums']) ) - { - $this->registry->output->showError( $this->lang->words['mod_noforums'], 11320 ); - } - - //----------------------------------------- - // Build Mr Hash - //----------------------------------------- - - $mr_hash = array( - 'edit_post' => intval( $this->request['edit_post'] ), - 'edit_topic' => intval( $this->request['edit_topic'] ), - 'delete_post' => intval( $this->request['delete_post'] ), - 'delete_topic' => intval( $this->request['delete_topic'] ), - 'view_ip' => intval( $this->request['view_ip'] ), - 'open_topic' => intval( $this->request['open_topic'] ), - 'close_topic' => intval( $this->request['close_topic'] ), - 'mass_move' => intval( $this->request['mass_move'] ), - 'mass_prune' => intval( $this->request['mass_prune'] ), - 'move_topic' => intval( $this->request['move_topic'] ), - 'pin_topic' => intval( $this->request['pin_topic'] ), - 'unpin_topic' => intval( $this->request['unpin_topic'] ), - 'post_q' => intval( $this->request['post_q'] ), - 'topic_q' => intval( $this->request['topic_q'] ), - 'allow_warn' => intval( $this->request['allow_warn'] ), - 'split_merge' => intval( $this->request['split_merge'] ), - 'edit_user' => intval( $this->request['edit_user'] ), - 'can_mm' => intval( $this->request['can_mm'] ), - 'mod_can_set_open_time' => intval( $this->request['mod_can_set_open_time'] ), - 'mod_can_set_close_time' => intval( $this->request['mod_can_set_close_time'] ), - 'forum_id' => ',' . implode( ',', $this->request['forums'] ) . ',', - 'mod_bitoptions' => IPSBWOptions::freeze( $this->request, 'moderators', 'forums' ) - ); - - $forums = array(); - - foreach( $this->request['forums'] as $forum_id ) - { - $forums[ $forum_id ] = $forum_id; - } - - //----------------------------------------- - - if( $this->request['mod_type'] == 'group' ) - { - if( $this->request['gid'] == "" ) - { - $this->registry->output->showError( $this->lang->words['mod_gid'], 11322 ); - } - - $this->DB->build( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'where' => "g_id=" . intval( $this->request['gid'] ) ) ); - $this->DB->execute(); - - if ( ! $group = $this->DB->fetch() ) - { - $this->registry->output->showError( $this->lang->words['mod_gid'], 11323 ); - } - - //----------------------------------------- - // Already using this group on this forum? - //----------------------------------------- - - foreach( $forums as $forum_id ) - { - $this->DB->build( array( 'select' => '*', 'from' => 'moderators', 'where' => "forum_id LIKE '%,{$forum_id},%' and group_id=" . intval( $this->request['gid'] ) ) ); - $this->DB->execute(); - - while( $f = $this->DB->fetch() ) - { - $theseForums = explode( ',', IPSText::cleanPermString( $f['forum_id'] ) ); - - foreach( $theseForums as $thisForumId ) - { - unset($forums[ $thisForumId ]); - } - } - } - - $mr_hash['member_name'] = '-1'; - $mr_hash['member_id'] = '-1'; - $mr_hash['group_id'] = $group['g_id']; - $mr_hash['group_name'] = $group['g_title']; - $mr_hash['is_group'] = 1; - - $ad_log = sprintf( $this->lang->words['mod_addedgroup'], $group['g_title'] ); - - } - else - { - if( $this->request['mem'] == "" ) - { - $this->registry->output->showError( $this->lang->words['mod_nomember'], 11324 ); - } - - $this->DB->build( array( 'select' => 'member_id, members_display_name', 'from' => 'members', 'where' => "member_id=" . intval( $this->request['mem'] ) ) ); - $this->DB->execute(); - - if ( ! $mem = $this->DB->fetch() ) - { - $this->registry->output->showError( $this->lang->words['mod_memid'], 11325 ); - } - - //----------------------------------------- - // Already using this member on this forum? - //----------------------------------------- - - foreach( $forums as $forum_id ) - { - $this->DB->build( array( 'select' => '*', 'from' => 'moderators', 'where' => "forum_id LIKE '%,{$forum_id},%' and member_id=" . intval( $this->request['mem'] ) ) ); - $this->DB->execute(); - - while( $f = $this->DB->fetch() ) - { - $theseForums = explode( ',', IPSText::cleanPermString( $f['forum_id'] ) ); - - foreach( $theseForums as $thisForumId ) - { - unset($forums[ $thisForumId ]); - } - } - } - - $mr_hash['member_name'] = $mem['members_display_name']; - $mr_hash['member_id'] = $mem['member_id']; - $mr_hash['is_group'] = 0; - - $ad_log = sprintf( $this->lang->words['mod_addedmem'], $mem['members_display_name'] ); - } - - //----------------------------------------- - // Check for legal forums - //----------------------------------------- - - if( count( $forums ) == 0 ) - { - $this->registry->output->showError( $this->lang->words['mod_nonewfor'], 11326 ); - } - - //----------------------------------------- - // Loopy loopy - //----------------------------------------- - - $mr_has['forum_id'] = ',' . implode( ',', $forums ) . ','; - - $this->DB->force_data_type = array( 'member_name' => 'string' ); - - $this->DB->insert( 'moderators', $mr_hash ); - - $this->registry->adminFunctions->saveAdminLog($ad_log); - - $this->rebuildModeratorCache(); - - $this->registry->output->global_message = $this->lang->words['mod_added']; - $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'].'&module=forums§ion=forums' ); - } - - /** - * Rebuild moderator cache - * - * @access public - * @return void [Outputs to screen] - */ - public function rebuildModeratorCache() - { - $new_cache = array(); - - //----------------------------------------- - // Get dem moderators - //----------------------------------------- - - $this->DB->build( array( 'select' => 'moderator.*', - 'from' => array( 'moderators' => 'moderator' ), - 'add_join' => array( 0 => array( 'select' => 'm.members_display_name, m.members_seo_name', - 'from' => array( 'members' => 'm' ), - 'where' => "m.member_id=moderator.member_id", - 'type' => 'left' ) ) ) ); - - $this->DB->execute(); - - while ( $i = $this->DB->fetch() ) - { - $forums = explode( ',', IPSText::cleanPermString( $i['forum_id'] ) ); - - /* Unpack bitwise fields */ - $_tmp = IPSBWOptions::thaw( $i['mod_bitoptions'], 'moderators', 'forums' ); - - if ( count( $_tmp ) ) - { - foreach( $_tmp as $k => $v ) - { - $i[ $k ] = $v; - } - } - - foreach( $forums as $forum_id ) - { - $i['forum_id'] = $forum_id; - $new_cache[] = $i; - } - } - - $this->cache->setCache( 'moderators', $new_cache, array( 'array' => 1, 'donow' => 0 ) ); - } - - /** - * Show the add/edit form - * - * @access public - * @param string [add|edit] - * @return void [Outputs to screen] - */ - public function modForm( $type='add' ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $group = array(); - - if ( $type == 'add' ) - { - /* Form Data */ - $mod_type = $this->request['group'] ? 'group' : 'name'; - $mod = array(); - $names = array(); - $forum_id = explode( ',', $this->request['fid'] ); - - //----------------------------------------- - // Start proper - //----------------------------------------- - - $button = $this->lang->words['mod_addthis']; - - $form_code = 'doadd'; - - if ( $this->request['group'] ) - { - $this->DB->build( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'where' => "g_id=" . intval( $this->request['group'] ) ) ); - $this->DB->execute(); - - if (! $group = $this->DB->fetch() ) - { - $this->registry->output->showError( $this->lang->words['mod_nogroup'], 11327 ); - } - } - else - { - if ( ! $this->request['member_id'] ) - { - $this->registry->output->showError( $this->lang->words['mod_memid'], 11328 ); - } - else - { - $this->DB->build( array( 'select' => 'members_display_name, member_id', 'from' => 'members', 'where' => 'member_id=' . intval( $this->request['member_id'] ) ) ); - $this->DB->execute(); - - if ( ! $mem = $this->DB->fetch() ) - { - $this->registry->output->showError( $this->lang->words['mod_memid'], 11329 ); - } - - $member_id = $mem['member_id']; - $member_name = $mem['members_display_name']; - } - } - } - else - { - /* Check the moderator */ - if ($this->request['mid'] == "") - { - $this->registry->output->showError( $this->lang->words['mod_valid'], 11330 ); - } - - /* Form bits */ - $button = $this->lang->words['mod_edithis']; - $form_code = "doedit"; - - /* Moderator Info */ - $this->DB->build( array( 'select' => '*', 'from' => 'moderators', 'where' => "mid=" . intval( $this->request['mid'] ) ) ); - $this->DB->execute(); - - if ( ! $mod = $this->DB->fetch() ) - { - $this->registry->output->showError( $this->lang->words['mod_mid'], 11331 ); - } - - /* BW Options */ - $_tmp = IPSBWOptions::thaw( $mod['mod_bitoptions'], 'moderators', 'forums' ); - - if ( count( $_tmp ) ) - { - foreach( $_tmp as $k => $v ) - { - $mod[ $k ] = $v; - } - } - - /* Other */ - $forum_id = explode( ',', IPSText::cleanPermString( $mod['forum_id'] ) ); - $member_id = $mod['member_id']; - $member_name = $mod['member_name']; - $mod_type = $mod['is_group'] ? 'group' : 'name'; - } - - /* Form Fields */ - $mod['edit_post'] = $this->registry->output->formYesNo( 'edit_post' , $mod['edit_post'] ); - $mod['edit_topic'] = $this->registry->output->formYesNo( 'edit_topic' , $mod['edit_topic'] ); - $mod['delete_post'] = $this->registry->output->formYesNo( 'delete_post' , $mod['delete_post'] ); - $mod['delete_topic'] = $this->registry->output->formYesNo( 'delete_topic' , $mod['delete_topic'] ); - $mod['view_ip'] = $this->registry->output->formYesNo( 'view_ip' , $mod['view_ip'] ); - $mod['open_topic'] = $this->registry->output->formYesNo( 'open_topic' , $mod['open_topic'] ); - $mod['close_topic'] = $this->registry->output->formYesNo( 'close_topic' , $mod['close_topic'] ); - $mod['move_topic'] = $this->registry->output->formYesNo( 'move_topic' , $mod['move_topic'] ); - $mod['pin_topic'] = $this->registry->output->formYesNo( 'pin_topic' , $mod['pin_topic'] ); - $mod['unpin_topic'] = $this->registry->output->formYesNo( 'unpin_topic' , $mod['unpin_topic'] ); - $mod['split_merge'] = $this->registry->output->formYesNo( 'split_merge' , $mod['split_merge'] ); - $mod['mod_can_set_open_time'] = $this->registry->output->formYesNo( 'mod_can_set_open_time' , $mod['mod_can_set_open_time'] ); - $mod['mod_can_set_close_time'] = $this->registry->output->formYesNo( 'mod_can_set_close_time', $mod['mod_can_set_close_time'] ); - $mod['mass_move'] = $this->registry->output->formYesNo( 'mass_move' , $mod['mass_move'] ); - $mod['mass_prune'] = $this->registry->output->formYesNo( 'mass_prune' , $mod['mass_prune'] ); - $mod['topic_q'] = $this->registry->output->formYesNo( 'topic_q' , $mod['topic_q'] ); - $mod['post_q'] = $this->registry->output->formYesNo( 'post_q' , $mod['post_q'] ); - $mod['allow_warn'] = $this->registry->output->formYesNo( 'allow_warn' , $mod['allow_warn'] ); - $mod['can_mm'] = $this->registry->output->formYesNo( 'can_mm' , $mod['can_mm'] ); - $mod['bw_flag_spammers'] = $this->registry->output->formYesNo( 'bw_flag_spammers' , $mod['bw_flag_spammers'] ); - $mod['forums'] = $this->registry->output->formMultiDropdown( 'forums[]' , $this->registry->getClass('class_forums')->adForumsForumList(1), $forum_id ); - - /* Output */ - $this->registry->output->html .= $this->html->moderatorPermissionForm( $mod, $form_code, $mod['mid'], $member_id, $mod_type, $group['g_id'], $group['g_name'], $button ); - } - - /** - * Refine member search, if necessary - * - * @access public - * @return void [Outputs to screen] - */ - public function moderatorAddPreform() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $type = $this->request['name'] ? 'name' : 'group'; - $this->request['fid'] = ltrim( $this->request['modforumids'], ',' ); - - //----------------------------------------- - // Are we adding a group as a mod? - //----------------------------------------- - - if ( $type == 'group' ) - { - $this->modForm(); - return; - } - - //----------------------------------------- - // Got forums? - //----------------------------------------- - - if ( ! $this->request['fid'] ) - { - $this->registry->output->global_message = $this->lang->words['mod_noforums']; - $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . '&module=forums§ion=forums' ); - } - - //----------------------------------------- - // Else continue as normal. - //----------------------------------------- - - if ( $this->request['name'] == "" ) - { - $this->registry->output->global_message = $this->lang->words['mod_nomember']; - $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . '&module=forums§ion=forums' ); - } - - $this->DB->build( array( 'select' => 'member_id, members_display_name as name', 'from' => 'members', 'where' => "members_display_name LIKE '{$this->request['name']}%' OR members_display_name LIKE '{$this->request['name']}%'" ) ); - $this->DB->execute(); - - if (! $this->DB->getTotalRows() ) - { - $this->registry->output->global_message = $this->lang->words['mod_noresults']; - $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . '&module=forums§ion=forums' ); - } - - //----------------------------------------- - // Show possible matches - //----------------------------------------- - - $form_array = array(); - - while ( $r = $this->DB->fetch() ) - { - $form_array[] = array( $r['member_id'] , $r['name'] ); - } - - /* Page Header */ - $this->registry->output->html_help_title = $this->lang->words['mod_add']; - $this->registry->output->html_help_msg = $this->lang->words['mod_add_info']; - - /* Output */ - $this->registry->output->html .= $this->html->moderatorSelectForm( $this->request['fid'], $this->registry->output->formDropdown( "member_id", $form_array ) ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Forum moderator management + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since Tuesday 17th August 2004 + * @version $Revision: 7003 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_forums_forums_moderator extends ipsCommand +{ + /** + * Forum functions library + * + * @var object + */ + public $forumfunc; + + /** + * Skin methods library + * + * @var object + */ + public $html; + + /** + * Main execution point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + /* Admin forum functions */ + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/admin_forum_functions.php", 'admin_forum_functions', 'forums' ); + $this->forumfunc = new $classToLoad( $registry ); + + /* Skin and Lang */ + $this->html = $this->registry->output->loadTemplate( 'cp_skin_forums' ); + $this->html->form_code = 'module=forums&section=moderator&'; + $this->html->form_code_js = 'module=forums&section=moderator&'; + + $this->lang->loadLanguageFile( array( 'admin_forums' ) ); + + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'add': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mods_add' ); + $this->moderatorAddPreform(); + break; + + case 'add_final': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mods_add' ); + $this->modForm('add'); + break; + + case 'doadd': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mods_add' ); + $this->addMod(); + break; + + case 'edit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mods_edit' ); + $this->modForm('edit'); + break; + + case 'doedit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mods_edit' ); + $this->doEdit(); + break; + + case 'remove': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mods_delete' ); + $this->delete(); + break; + + default: + $this->registry->output->silentRedirect( $this->settings['_base_url'] . 'app=core&module=help&id=mod_mmod' ); + break; + } + + //----------------------------------------- + // Pass to CP output hander + //----------------------------------------- + + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Delete a moderator + * + * @return void [Outputs to screen] + */ + public function delete() + { + if ($this->request['mid'] == "") + { + $this->registry->output->showError( $this->lang->words['mod_valid'], 11319 ); + } + + $mod = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'moderators', 'where' => "mid=".intval($this->request['mid']) ) ); + + if ( $mod['is_group'] ) + { + $name = $this->lang->words['mod_group'].$mod['group_name']; + } + else + { + $getname = $this->DB->buildAndFetch( array( 'select' => 'members_display_name', 'from' => 'members', 'where' => 'member_id=' . $mod['member_id'] ) ); + + $name = $getname['members_display_name']; + } + + if( $this->request['fid'] == 'all' ) + { + $this->DB->delete( 'moderators', "mid=".intval($this->request['mid']) ); + + //----------------------------------------- + // Delete *all* instances of this moderator + //----------------------------------------- + + if( $mod['is_group'] ) + { + $this->DB->delete( 'moderators', "is_group=1 AND group_id=". $mod['group_id'] ); + } + else + { + $this->DB->delete( 'moderators', "is_group=0 AND member_id=". $mod['member_id'] ); + } + } + else + { + $forumIds = explode( ',', IPSText::cleanPermString( $mod['forum_id'] ) ); + $newForums = array(); + + foreach( $forumIds as $aForumId ) + { + if( $aForumId != $this->request['fid'] ) + { + $newForums[] = $aForumId; + } + } + + if( !count($newForums) ) + { + $this->DB->delete( 'moderators', "mid=" . $mod['mid'] ); + } + else + { + $this->DB->update( 'moderators', array( 'forum_id' => ',' . implode( ',', $newForums ) . ',' ), 'mid=' . $mod['mid'] ); + } + } + + + $this->rebuildModeratorCache(); + + ipsRegistry::getClass('adminFunctions')->saveAdminLog( sprintf($this->lang->words['mod_removedlog'], $name) ); + + $this->registry->output->global_message = $this->lang->words['mod_removed']; + $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'].'&app=forums&module=forums§ion=forums' ); + } + + + /** + * Edit a moderator + * + * @return void [Outputs to screen] + */ + public function doEdit() + { + /* Set up our return forum */ + $return_id = intval( $this->request['return_id'] ); + $url_extra = $return_id ? "&f=".$return_id : ""; + + if( $this->request['mid'] == "" ) + { + $this->registry->output->showError( $this->lang->words['mod_valid'], 11321 ); + } + + $forums = array(); + + foreach( $this->request['forums'] as $forum_id ) + { + $forums[ $forum_id ] = $forum_id; + } + + $mod = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'moderators', 'where' => "mid=" . intval( $this->request['mid'] ) ) ); + + if( $mod['is_group'] ) + { + foreach( $forums as $forum_id ) + { + $this->DB->build( array( 'select' => '*', 'from' => 'moderators', 'where' => "forum_id LIKE '%,{$forum_id},%' and group_id=" . $mod['group_id'] . ' AND mid<>' . $mod['mid'] ) ); + $this->DB->execute(); + + while( $f = $this->DB->fetch() ) + { + $theseForums = explode( ',', IPSText::cleanPermString( $f['forum_id'] ) ); + + foreach( $theseForums as $thisForumId ) + { + unset($forums[ $thisForumId ]); + } + } + } + } + else + { + foreach( $forums as $forum_id ) + { + $this->DB->build( array( 'select' => '*', 'from' => 'moderators', 'where' => "forum_id LIKE '%,{$forum_id},%' and member_id=" . $mod['member_id'] . ' AND mid<>' . $mod['mid'] ) ); + $this->DB->execute(); + + while( $f = $this->DB->fetch() ) + { + $theseForums = explode( ',', IPSText::cleanPermString( $f['forum_id'] ) ); + + foreach( $theseForums as $thisForumId ) + { + unset($forums[ $thisForumId ]); + } + } + } + } + + //----------------------------------------- + // Build Mr Hash + //----------------------------------------- + + $this->DB->update( 'moderators', array( + 'forum_id' => ',' . implode( ',', $forums ) . ',', + 'edit_post' => intval( $this->request['edit_post'] ), + 'edit_topic' => intval( $this->request['edit_topic'] ), + 'delete_post' => intval( $this->request['delete_post'] ), + 'delete_topic' => intval( $this->request['delete_topic'] ), + 'view_ip' => intval( $this->request['view_ip'] ), + 'open_topic' => intval( $this->request['open_topic'] ), + 'close_topic' => intval( $this->request['close_topic'] ), + 'mass_move' => intval( $this->request['mass_move'] ), + 'mass_prune' => intval( $this->request['mass_prune'] ), + 'move_topic' => intval( $this->request['move_topic'] ), + 'pin_topic' => intval( $this->request['pin_topic'] ), + 'unpin_topic' => intval( $this->request['unpin_topic'] ), + 'post_q' => intval( $this->request['post_q'] ), + 'topic_q' => intval( $this->request['topic_q'] ), + 'allow_warn' => intval( $this->request['allow_warn'] ), + 'split_merge' => intval( $this->request['split_merge'] ), + 'can_mm' => intval( $this->request['can_mm'] ), + 'mod_can_set_open_time' => intval( $this->request['mod_can_set_open_time'] ), + 'mod_can_set_close_time' => intval( $this->request['mod_can_set_close_time'] ), + 'mod_bitoptions' => IPSBWOptions::freeze( $this->request, 'moderators', 'forums' ) + ), 'mid='.intval($this->request['mid']) ); + + $this->rebuildModeratorCache(); + + $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['mod_editedlog'], $mod['member_name'] ) ); + + $this->registry->output->global_message = $this->lang->words['mod_edited']; + $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'].'module=forums§ion=forums'.$url_extra ); + } + + /** + * Add a moderator + * + * @return void [Outputs to screen] + */ + public function addMod() + { + /* Set up our return forum */ + $return_id = intval( $this->request['return_id'] ); + $url_extra = $return_id ? "&f=".$return_id : ""; + + if( !is_array($this->request['forums']) OR !count($this->request['forums']) ) + { + $this->registry->output->showError( $this->lang->words['mod_noforums'], 11320 ); + } + + //----------------------------------------- + // Build Mr Hash + //----------------------------------------- + + $mr_hash = array( + 'edit_post' => intval( $this->request['edit_post'] ), + 'edit_topic' => intval( $this->request['edit_topic'] ), + 'delete_post' => intval( $this->request['delete_post'] ), + 'delete_topic' => intval( $this->request['delete_topic'] ), + 'view_ip' => intval( $this->request['view_ip'] ), + 'open_topic' => intval( $this->request['open_topic'] ), + 'close_topic' => intval( $this->request['close_topic'] ), + 'mass_move' => intval( $this->request['mass_move'] ), + 'mass_prune' => intval( $this->request['mass_prune'] ), + 'move_topic' => intval( $this->request['move_topic'] ), + 'pin_topic' => intval( $this->request['pin_topic'] ), + 'unpin_topic' => intval( $this->request['unpin_topic'] ), + 'post_q' => intval( $this->request['post_q'] ), + 'topic_q' => intval( $this->request['topic_q'] ), + 'allow_warn' => intval( $this->request['allow_warn'] ), + 'split_merge' => intval( $this->request['split_merge'] ), + 'can_mm' => intval( $this->request['can_mm'] ), + 'mod_can_set_open_time' => intval( $this->request['mod_can_set_open_time'] ), + 'mod_can_set_close_time' => intval( $this->request['mod_can_set_close_time'] ), + 'forum_id' => ',' . implode( ',', $this->request['forums'] ) . ',', + 'mod_bitoptions' => IPSBWOptions::freeze( $this->request, 'moderators', 'forums' ) + ); + + $forums = array(); + + foreach( $this->request['forums'] as $forum_id ) + { + $forums[ $forum_id ] = $forum_id; + } + + //----------------------------------------- + + if( $this->request['mod_type'] == 'group' ) + { + if( $this->request['gid'] == "" ) + { + $this->registry->output->showError( $this->lang->words['mod_gid'], 11322 ); + } + + $this->DB->build( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'where' => "g_id=" . intval( $this->request['gid'] ) ) ); + $this->DB->execute(); + + if ( ! $group = $this->DB->fetch() ) + { + $this->registry->output->showError( $this->lang->words['mod_gid'], 11323 ); + } + + //----------------------------------------- + // Already using this group on this forum? + //----------------------------------------- + + foreach( $forums as $forum_id ) + { + $this->DB->build( array( 'select' => '*', 'from' => 'moderators', 'where' => "forum_id LIKE '%,{$forum_id},%' and group_id=" . intval( $this->request['gid'] ) ) ); + $this->DB->execute(); + + while( $f = $this->DB->fetch() ) + { + $theseForums = explode( ',', IPSText::cleanPermString( $f['forum_id'] ) ); + + foreach( $theseForums as $thisForumId ) + { + unset($forums[ $thisForumId ]); + } + } + } + + $mr_hash['member_name'] = '-1'; + $mr_hash['member_id'] = '-1'; + $mr_hash['group_id'] = $group['g_id']; + $mr_hash['group_name'] = $group['g_title']; + $mr_hash['is_group'] = 1; + + $ad_log = sprintf( $this->lang->words['mod_addedgroup'], $group['g_title'] ); + + } + else + { + if( $this->request['mem'] == "" ) + { + $this->registry->output->showError( $this->lang->words['mod_nomember'], 11324 ); + } + + $this->DB->build( array( 'select' => 'member_id, members_display_name', 'from' => 'members', 'where' => "member_id=" . intval( $this->request['mem'] ) ) ); + $this->DB->execute(); + + if ( ! $mem = $this->DB->fetch() ) + { + $this->registry->output->showError( $this->lang->words['mod_memid'], 11325 ); + } + + //----------------------------------------- + // Already using this member on this forum? + //----------------------------------------- + + foreach( $forums as $forum_id ) + { + $this->DB->build( array( 'select' => '*', 'from' => 'moderators', 'where' => "forum_id LIKE '%,{$forum_id},%' and member_id=" . intval( $this->request['mem'] ) ) ); + $this->DB->execute(); + + while( $f = $this->DB->fetch() ) + { + $theseForums = explode( ',', IPSText::cleanPermString( $f['forum_id'] ) ); + + foreach( $theseForums as $thisForumId ) + { + unset($forums[ $thisForumId ]); + } + } + } + + $mr_hash['member_name'] = $mem['members_display_name']; + $mr_hash['member_id'] = $mem['member_id']; + $mr_hash['is_group'] = 0; + + $ad_log = sprintf( $this->lang->words['mod_addedmem'], $mem['members_display_name'] ); + } + + //----------------------------------------- + // Check for legal forums + //----------------------------------------- + + if( count( $forums ) == 0 ) + { + $this->registry->output->showError( $this->lang->words['mod_nonewfor'], 11326 ); + } + + //----------------------------------------- + // Loopy loopy + //----------------------------------------- + + $mr_has['forum_id'] = ',' . implode( ',', $forums ) . ','; + + $this->DB->force_data_type = array( 'member_name' => 'string' ); + + $this->DB->insert( 'moderators', $mr_hash ); + + $this->registry->adminFunctions->saveAdminLog($ad_log); + + $this->rebuildModeratorCache(); + + $this->registry->output->global_message = $this->lang->words['mod_added']; + $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'].'&module=forums§ion=forums'.$url_extra ); + } + + /** + * Rebuild moderator cache + * + * @return void [Outputs to screen] + */ + public function rebuildModeratorCache() + { + $new_cache = array(); + + //----------------------------------------- + // Get dem moderators + //----------------------------------------- + + $this->DB->build( array( 'select' => 'moderator.*', + 'from' => array( 'moderators' => 'moderator' ), + 'add_join' => array( 0 => array( 'select' => 'm.members_display_name, m.members_seo_name', + 'from' => array( 'members' => 'm' ), + 'where' => "m.member_id=moderator.member_id", + 'type' => 'left' ) ) ) ); + + $this->DB->execute(); + + while ( $i = $this->DB->fetch() ) + { + $forums = explode( ',', IPSText::cleanPermString( $i['forum_id'] ) ); + + /* Unpack bitwise fields */ + $_tmp = IPSBWOptions::thaw( $i['mod_bitoptions'], 'moderators', 'forums' ); + + if ( count( $_tmp ) ) + { + foreach( $_tmp as $k => $v ) + { + $i[ $k ] = $v; + } + } + + foreach( $forums as $forum_id ) + { + $i['forum_id'] = $forum_id; + $new_cache[] = $i; + } + } + + $this->cache->setCache( 'moderators', $new_cache, array( 'array' => 1, 'donow' => 0 ) ); + } + + /** + * Show the add/edit form + * + * @param string [add|edit] + * @return void [Outputs to screen] + */ + public function modForm( $type='add' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $group = array(); + + if ( $type == 'add' ) + { + /* Form Data */ + $mod_type = $this->request['group'] ? 'group' : 'name'; + $mod = array(); + $names = array(); + $forum_id = explode( ',', $this->request['fid'] ); + + //----------------------------------------- + // Start proper + //----------------------------------------- + + $button = $this->lang->words['mod_addthis']; + + $form_code = 'doadd'; + + if ( $this->request['group'] ) + { + $this->DB->build( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'where' => "g_id=" . intval( $this->request['group'] ) ) ); + $this->DB->execute(); + + if (! $group = $this->DB->fetch() ) + { + $this->registry->output->showError( $this->lang->words['mod_nogroup'], 11327 ); + } + } + else + { + if ( ! $this->request['member_id'] ) + { + $this->registry->output->showError( $this->lang->words['mod_memid'], 11328 ); + } + else + { + $this->DB->build( array( 'select' => 'members_display_name, member_id', 'from' => 'members', 'where' => 'member_id=' . intval( $this->request['member_id'] ) ) ); + $this->DB->execute(); + + if ( ! $mem = $this->DB->fetch() ) + { + $this->registry->output->showError( $this->lang->words['mod_memid'], 11329 ); + } + + $member_id = $mem['member_id']; + $member_name = $mem['members_display_name']; + } + } + } + else + { + /* Check the moderator */ + if ($this->request['mid'] == "") + { + $this->registry->output->showError( $this->lang->words['mod_valid'], 11330 ); + } + + /* Form bits */ + $button = $this->lang->words['mod_edithis']; + $form_code = "doedit"; + + /* Moderator Info */ + $this->DB->build( array( 'select' => '*', 'from' => 'moderators', 'where' => "mid=" . intval( $this->request['mid'] ) ) ); + $this->DB->execute(); + + if ( ! $mod = $this->DB->fetch() ) + { + $this->registry->output->showError( $this->lang->words['mod_mid'], 11331 ); + } + + /* BW Options */ + $_tmp = IPSBWOptions::thaw( $mod['mod_bitoptions'], 'moderators', 'forums' ); + + if ( count( $_tmp ) ) + { + foreach( $_tmp as $k => $v ) + { + $mod[ $k ] = $v; + } + } + + /* Other */ + $forum_id = explode( ',', IPSText::cleanPermString( $mod['forum_id'] ) ); + $member_id = $mod['member_id']; + $member_name = $mod['member_name']; + $mod_type = $mod['is_group'] ? 'group' : 'name'; + } + + /* Form Fields */ + $mod['edit_post'] = $this->registry->output->formYesNo( 'edit_post' , $mod['edit_post'] ); + $mod['edit_topic'] = $this->registry->output->formYesNo( 'edit_topic' , $mod['edit_topic'] ); + $mod['delete_post'] = $this->registry->output->formYesNo( 'delete_post' , $mod['delete_post'] ); + $mod['delete_topic'] = $this->registry->output->formYesNo( 'delete_topic' , $mod['delete_topic'] ); + $mod['view_ip'] = $this->registry->output->formYesNo( 'view_ip' , $mod['view_ip'] ); + $mod['open_topic'] = $this->registry->output->formYesNo( 'open_topic' , $mod['open_topic'] ); + $mod['close_topic'] = $this->registry->output->formYesNo( 'close_topic' , $mod['close_topic'] ); + $mod['move_topic'] = $this->registry->output->formYesNo( 'move_topic' , $mod['move_topic'] ); + $mod['pin_topic'] = $this->registry->output->formYesNo( 'pin_topic' , $mod['pin_topic'] ); + $mod['unpin_topic'] = $this->registry->output->formYesNo( 'unpin_topic' , $mod['unpin_topic'] ); + $mod['split_merge'] = $this->registry->output->formYesNo( 'split_merge' , $mod['split_merge'] ); + $mod['mod_can_set_open_time'] = $this->registry->output->formYesNo( 'mod_can_set_open_time' , $mod['mod_can_set_open_time'] ); + $mod['mod_can_set_close_time'] = $this->registry->output->formYesNo( 'mod_can_set_close_time', $mod['mod_can_set_close_time'] ); + $mod['mass_move'] = $this->registry->output->formYesNo( 'mass_move' , $mod['mass_move'] ); + $mod['mass_prune'] = $this->registry->output->formYesNo( 'mass_prune' , $mod['mass_prune'] ); + $mod['topic_q'] = $this->registry->output->formYesNo( 'topic_q' , $mod['topic_q'] ); + $mod['post_q'] = $this->registry->output->formYesNo( 'post_q' , $mod['post_q'] ); + $mod['allow_warn'] = $this->registry->output->formYesNo( 'allow_warn' , $mod['allow_warn'] ); + $mod['can_mm'] = $this->registry->output->formYesNo( 'can_mm' , $mod['can_mm'] ); + $mod['bw_flag_spammers'] = $this->registry->output->formYesNo( 'bw_flag_spammers' , $mod['bw_flag_spammers'] ); + $mod['forums'] = $this->registry->output->formMultiDropdown( 'forums[]' , $this->registry->getClass('class_forums')->adForumsForumList(1), $forum_id ); + + $mod['bw_mod_soft_delete'] = $this->registry->output->formYesNo( "bw_mod_soft_delete", $mod['bw_mod_soft_delete'] ); + $mod['bw_mod_un_soft_delete'] = $this->registry->output->formYesNo( "bw_mod_un_soft_delete", $mod['bw_mod_un_soft_delete'] ); + $mod['bw_mod_soft_delete_see'] = $this->registry->output->formYesNo( "bw_mod_soft_delete_see", $mod['bw_mod_soft_delete_see'] ); + $mod['bw_mod_soft_delete_topic'] = $this->registry->output->formYesNo( "bw_mod_soft_delete_topic", $mod['bw_mod_soft_delete_topic'] ); + $mod['bw_mod_un_soft_delete_topic'] = $this->registry->output->formYesNo( "bw_mod_un_soft_delete_topic", $mod['bw_mod_un_soft_delete_topic'] ); + $mod['bw_mod_soft_delete_topic_see'] = $this->registry->output->formYesNo( "bw_mod_soft_delete_topic_see", $mod['bw_mod_soft_delete_topic_see'] ); + $mod['bw_mod_soft_delete_reason'] = $this->registry->output->formYesNo( "bw_mod_soft_delete_reason", $mod['bw_mod_soft_delete_reason'] ); + $mod['bw_mod_soft_delete_see_post'] = $this->registry->output->formYesNo( "bw_mod_soft_delete_see_post", $mod['bw_mod_soft_delete_see_post'] ); + + + /* Output */ + $this->registry->output->html .= $this->html->moderatorPermissionForm( $mod, $form_code, $mod['mid'], $member_id, $mod_type, $group['g_id'], $group['g_name'], $button ); + } + + /** + * Refine member search, if necessary + * + * @return void [Outputs to screen] + */ + public function moderatorAddPreform() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $type = $this->request['name'] ? 'name' : 'group'; + $this->request['fid'] = ltrim( $this->request['modforumids'], ',' ); + + //----------------------------------------- + // Are we adding a group as a mod? + //----------------------------------------- + + if ( $type == 'group' ) + { + $this->modForm(); + return; + } + + //----------------------------------------- + // Got forums? + //----------------------------------------- + + if ( ! $this->request['fid'] ) + { + $this->registry->output->global_message = $this->lang->words['mod_noforums']; + $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . '&module=forums§ion=forums' ); + } + + //----------------------------------------- + // Else continue as normal. + //----------------------------------------- + + if ( $this->request['name'] == "" ) + { + $this->registry->output->global_message = $this->lang->words['mod_nomember']; + $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . '&module=forums§ion=forums' ); + } + + $this->DB->build( array( 'select' => 'member_id, members_display_name as name', 'from' => 'members', 'where' => "members_display_name LIKE '{$this->request['name']}%' OR members_display_name LIKE '{$this->request['name']}%'" ) ); + $this->DB->execute(); + + if (! $this->DB->getTotalRows() ) + { + $this->registry->output->global_message = $this->lang->words['mod_noresults']; + $this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . '&module=forums§ion=forums' ); + } + + //----------------------------------------- + // Show possible matches + //----------------------------------------- + + $form_array = array(); + + while ( $r = $this->DB->fetch() ) + { + $form_array[] = array( $r['member_id'] , $r['name'] ); + } + + /* Page Header */ + $this->registry->output->html_help_title = $this->lang->words['mod_add']; + $this->registry->output->html_help_msg = $this->lang->words['mod_add_info']; + + /* Output */ + $this->registry->output->html .= $this->html->moderatorSelectForm( $this->request['fid'], $this->registry->output->formDropdown( "member_id", $form_array ) ); + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/forums/multimods.php b/upload/admin/applications/forums/modules_admin/forums/multimods.php index 4ce69191..00c031c2 100644 --- a/upload/admin/applications/forums/modules_admin/forums/multimods.php +++ b/upload/admin/applications/forums/modules_admin/forums/multimods.php @@ -1,464 +1,462 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_forums_forums_multimods extends ipsCommand -{ - /** - * Forum functions library - * - * @access private - * @var object - */ - private $forumfunc; - - /** - * Main execution point - * - * @access public - * @param object ipsRegistry reference - * @return void - */ - public function doExecute( ipsRegistry $registry ) - { - /* Setup Forum Classes */ - $this->registry->class_forums->forumsInit(); - - require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/forums/admin_forum_functions.php' ); - - $this->forumfunc = new admin_forum_functions( $registry ); - $this->forumfunc->forumsInit(); - - /* Load Skin and Lang */ - $this->html = $this->registry->output->loadTemplate( 'cp_skin_multimods' ); - $this->html->form_code = 'module=forums&section=multimods&'; - $this->html->form_code_js = 'module=forums&section=multimods&'; - - $this->lang->loadLanguageFile( array( 'admin_forums' ) ); - - /* Navigation */ - $this->registry->output->nav[] = array( $this->form_code, $this->lang->words['mm_nav'] ); - $this->registry->output->extra_title[] = $this->lang->words['mm_nav']; - - switch( $this->request['do'] ) - { - case 'new': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mmod_add' ); - $this->multiModerationForm( 'new' ); - break; - - case 'edit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mmod_edit' ); - $this->multiModerationForm( 'edit' ); - break; - - case 'donew': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mmod_add' ); - $this->multiModerationSaveForm( 'new' ); - break; - - case 'doedit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mmod_edit' ); - $this->multiModerationSaveForm( 'edit' ); - break; - - case 'delete': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mmod_delete' ); - $this->multiModerationDelete(); - break; - - case 'overview': - default: - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mmod_view' ); - $this->multiModerationOverview(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Removes a multi moderation - * - * @access public - * @return void - **/ - public function multiModerationDelete() - { - /* Check ID */ - if ($this->request['id'] == "") - { - $this->registry->output->showError( $this->lang->words['mm_noid'], 11332 ); - } - - /* Delete the record */ - $this->DB->delete( 'topic_mmod', "mm_id=" . intval( $this->request['id'] ) ); - - /* Rebuild Cache */ - $this->multiModerationRebuildCache(); - - /* Log and bounce */ - $this->registry->adminFunctions->saveAdminLog( $this->lang->words['mm_removed'] ); - $this->registry->output->silentRedirect($this->settings['base_url'] . $this->html->form_code ); - - } - - /** - * Saves the add/edit multi moderation form - * - * @access public - * @param string $type Either 'new' or 'edit' - * @return void - **/ - public function multiModerationSaveForm( $type='new' ) - { - /* INI */ - $forums = array(); - - /* Make sure we have a title */ - if( ! $this->request['mm_title'] ) - { - $this->registry->output->showError( $this->lang->words['mm_valtitle'], 11333 ); - } - - /* Check for forums */ - $forums = $this->_getSelectedForums(); - - /* Check forums */ - if( ! $forums ) - { - $this->registry->output->showError( $this->lang->words['mm_forums'], 11334 ); - } - - /* Check move location */ - if( $this->request['topic_move'] == 'n' ) - { - $this->registry->output->showError( $this->lang->words['mm_wrong'], 11335 ); - } - - /* Build the insert array */ - $save = array( - 'mm_title' => $this->request['mm_title'], - 'mm_enabled' => 1, - 'topic_state' => $this->request['topic_state'], - 'topic_pin' => $this->request['topic_pin'], - 'topic_move' => intval( $this->request['topic_move'] ), - 'topic_move_link' => intval( $this->request['topic_move_link'] ), - 'topic_title_st' => IPSText::makeSlashesSafe( $_POST['topic_title_st'] ), - 'topic_title_end' => IPSText::makeSlashesSafe( $_POST['topic_title_end'] ), - 'topic_reply' => intval( $this->request['topic_reply'] ), - 'topic_reply_content' => IPSText::makeSlashesSafe( $_POST['topic_reply_content'] ), - 'topic_reply_postcount' => intval( $this->request['topic_reply_postcount'] ), - 'mm_forums' => $forums, - 'topic_approve' => intval( $this->request['topic_approve'] ), - ); - - /* Edit */ - if ( $type == 'edit' ) - { - /* ID */ - $id = intval( $this->request['id'] ); - - if( ! $id ) - { - $this->registry->output->showError( $this->lang->words['mm_valid'] ); - } - - /* Update the multi mod */ - $this->DB->update( 'topic_mmod', $save, 'mm_id='.$id ); - } - /* New */ - else - { - /* Insert the new multi mod */ - $this->DB->insert( 'topic_mmod', $save ); - } - - /* Log, Cache, and Bounce */ - $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['mm_update'], $type ) ); - $this->multiModerationRebuildCache(); - $this->registry->output->silentRedirect( $this->settings['base_url'] . $this->html->form_code ); - } - - /** - * Builds the add/edit multi moderation form - * - * @access public - * @param string $type Either 'new' or 'edit' - * @return void - **/ - public function multiModerationForm( $type='new' ) - { - if( $type == 'new' ) - { - /* Setup */ - $form_code = 'donew'; - $id = 0; - $description = $this->lang->words['mm_addnew']; - $button = $this->lang->words['mm_addnew']; - - /* Default Values */ - $topic_mm = array( - 'mm_forums' => '', - 'mm_title' => '', - 'topic_title_st' => '', - 'topic_title_end' => '', - 'topic_state' => '', - 'topic_pin' => '', - 'topic_approve' => '', - 'topic_move' => '', - 'topic_move_link' => '', - 'topic_reply' => '', - 'topic_reply_content' => '', - 'topic_reply_postcount' => '' - ); - } - else - { - /* Setup */ - $id = intval( $this->request['id'] ); - $form_code = 'doedit'; - $description = $this->lang->words['mm_edit']; - $button = $this->lang->words['mm_edit']; - - /* Default Values */ - $this->DB->build( array( 'select' => '*', 'from' => 'topic_mmod', 'where' => "mm_id=$id" ) ); - $this->DB->execute(); - - if ( ! $topic_mm = $this->DB->fetch() ) - { - $this->registry->output->showError( sprintf( $this->lang->words['mm_noinfo'], $id ), 11337 ); - } - } - - /* State Drop Options */ - $state_dd = array( - 0 => array( 'leave', $this->lang->words['mm_leave'] ), - 1 => array( 'close', $this->lang->words['mm_close'] ), - 2 => array( 'open' , $this->lang->words['mm_open'] ), - ); - - /* Pinned Drop Down Options */ - $pin_dd = array( - 0 => array( 'leave', $this->lang->words['mm_leave'] ), - 1 => array( 'pin' , $this->lang->words['mm_pin'] ), - 2 => array( 'unpin', $this->lang->words['mm_unpin'] ), - ); - - /* Approved Drop Down Options */ - $app_dd = array( - 0 => array( '0', $this->lang->words['mm_leave'] ), - 1 => array( '1', $this->lang->words['mm_approve'] ), - 2 => array( '2', $this->lang->words['mm_unapprove'] ), - ); - - /* Build forum multiselect */ - $topic_mm['forums'] = ""; - - /* Build Form Fields */ - $topic_mm['mm_title'] = $this->registry->output->formInput("mm_title", $topic_mm['mm_title'] ); - $topic_mm['topic_title_st'] = $this->registry->output->formInput("topic_title_st", $topic_mm['topic_title_st'] ); - $topic_mm['topic_title_end'] = $this->registry->output->formInput("topic_title_end", $topic_mm['topic_title_end'] ); - $topic_mm['topic_state'] = $this->registry->output->formDropdown("topic_state", $state_dd, $topic_mm['topic_state'] ); - $topic_mm['topic_pin'] = $this->registry->output->formDropdown("topic_pin", $pin_dd, $topic_mm['topic_pin'] ); - $topic_mm['topic_approve'] = $this->registry->output->formDropdown("topic_approve", $app_dd, $topic_mm['topic_approve'] ); - $topic_mm['topic_move'] = $this->registry->output->formDropdown("topic_move", array_merge( array( 0 => array('-1', $this->lang->words['mm_nobodymovenobodygethurt'] ) ), $fporum_jump ), $topic_mm['topic_move'] ); - $topic_mm['topic_move_link'] = $this->registry->output->formCheckbox('topic_move_link', $topic_mm['topic_move_link'] ); - $topic_mm['topic_reply'] = $this->registry->output->formYesNo('topic_reply', $topic_mm['topic_reply'] ); - $topic_mm['topic_reply_content'] = $this->registry->output->formTextarea("topic_reply_content", $topic_mm['topic_reply_content'] ); - $topic_mm['topic_reply_postcount'] = $this->registry->output->formCheckbox('topic_reply_postcount', $topic_mm['topic_reply_postcount'] ); - - /* Output */ - $this->registry->output->html .= $this->html->multiModerationForm( $id, $form_code, $description, $topic_mm, $button ); - } - - /** - * Show all available multi mods - * - * @access public - * @return void - **/ - public function multiModerationOverview() - { - /* Query the multi mods */ - $this->DB->build( array( 'select' => '*', 'from' => 'topic_mmod', 'order' => "mm_title" ) ); - $this->DB->execute(); - - /* Loop through and build output arrays */ - $rows = array(); - - while( $r = $this->DB->fetch() ) - { - $rows[] = $r; - } - - /* Output */ - $this->registry->output->html .= $this->html->multiModerationOverview( $rows ); - } - - /** - * Rebuilds the multi moderation cache - * - * @access public - * @return void - **/ - public function multiModerationRebuildCache() - { - /* INI */ - $cache = array(); - - /* Get the multi mods */ - $this->DB->build( array( - 'select' => '*', - 'from' => 'topic_mmod', - 'order' => 'mm_title' - ) ); - - $this->DB->execute(); - - while ($i = $this->DB->fetch()) - { - $cache[ $i['mm_id'] ] = $i; - } - - /* Save the cache */ - $this->cache->setCache( 'multimod', $cache, array( 'array' => 1, 'donow' => 0 ) ); - } - - /** - * Get selected forums - * - * @access private - * @return string Comma separated list of forum ids - **/ - private function _getSelectedForums() - { - /* INI */ - $forumids = array(); - - /* Check for the forums array */ - if( is_array( $_POST['forums'] ) ) - { - /* Add All Forums */ - if( in_array( 'all', $_POST['forums'] ) ) - { - return '*'; - } - /* Add selected Forums */ - else - { - /* Loop through the selected forums */ - foreach( $_POST['forums'] as $l ) - { - if( $this->registry->class_forums->forum_by_id[ $l ] ) - { - $forumids[] = intval( $l ); - } - } - - /* Do we have cats? Give 'em to Charles! */ - if( count( $forumids ) ) - { - foreach( $forumids as $f ) - { - $children = $this->registry->class_forums->forumsGetChildren( $f ); - - if( is_array( $children ) and count( $children ) ) - { - $forumids = array_merge( $forumids, $children ); - } - } - } - /* No forums */ - else - { - return; - } - } - } - /* Not an array */ - else - { - /* All Forums */ - if ( $this->request['forums'] == 'all' ) - { - return '*'; - } - else - { - /* Anything selected? */ - if( $this->request['forums'] != "" ) - { - $l = intval( $this->request['forums'] ); - - /* Single Forum */ - if( $this->registry->class_forums->forum_by_id[ $l ] ) - { - $forumids[] = intval( $l ); - } - - /* Check subs */ - if ( $this->request['searchsubs'] == 1 ) - { - $children = $this->registry->class_forums->forumsGetChildren( $f ); - - if( is_array ($children ) and count( $children ) ) - { - $forumids = array_merge( $forumids, $children ); - } - } - } - } - } - - return implode( ",", $forumids ); - } -} + + * Invision Power Services + * IP.Board v3.1.4 + * Topic Multi-Moderation + * Last Updated: $LastChangedDate: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 14th May 2003 + * @version $Rev: 7003 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_forums_forums_multimods extends ipsCommand +{ + /** + * Forum functions library + * + * @var object + */ + private $forumfunc; + + /** + * Main execution point + * + * @param object ipsRegistry reference + * @return void + */ + public function doExecute( ipsRegistry $registry ) + { + /* Setup Forum Classes */ + $this->registry->class_forums->forumsInit(); + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/admin_forum_functions.php", 'admin_forum_functions', 'forums' ); + $this->forumfunc = new $classToLoad( $registry ); + $this->forumfunc->forumsInit(); + + /* Load Skin and Lang */ + $this->html = $this->registry->output->loadTemplate( 'cp_skin_multimods' ); + $this->html->form_code = 'module=forums&section=multimods&'; + $this->html->form_code_js = 'module=forums&section=multimods&'; + + $this->lang->loadLanguageFile( array( 'admin_forums' ) ); + + /* Navigation */ + $this->registry->output->nav[] = array( $this->form_code, $this->lang->words['mm_nav'] ); + $this->registry->output->extra_title[] = $this->lang->words['mm_nav']; + + switch( $this->request['do'] ) + { + case 'new': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mmod_add' ); + $this->multiModerationForm( 'new' ); + break; + + case 'edit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mmod_edit' ); + $this->multiModerationForm( 'edit' ); + break; + + case 'donew': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mmod_add' ); + $this->multiModerationSaveForm( 'new' ); + break; + + case 'doedit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mmod_edit' ); + $this->multiModerationSaveForm( 'edit' ); + break; + + case 'delete': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mmod_delete' ); + $this->multiModerationDelete(); + break; + + case 'overview': + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'mmod_view' ); + $this->multiModerationOverview(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Removes a multi moderation + * + * @return void + */ + public function multiModerationDelete() + { + /* Check ID */ + if ($this->request['id'] == "") + { + $this->registry->output->showError( $this->lang->words['mm_noid'], 11332 ); + } + + /* Delete the record */ + $this->DB->delete( 'topic_mmod', "mm_id=" . intval( $this->request['id'] ) ); + + /* Rebuild Cache */ + $this->multiModerationRebuildCache(); + + /* Log and bounce */ + $this->registry->adminFunctions->saveAdminLog( $this->lang->words['mm_removed'] ); + $this->registry->output->silentRedirect($this->settings['base_url'] . $this->html->form_code ); + + } + + /** + * Saves the add/edit multi moderation form + * + * @param string $type Either 'new' or 'edit' + * @return void + */ + public function multiModerationSaveForm( $type='new' ) + { + /* INI */ + $forums = array(); + + /* Make sure we have a title */ + if( ! $this->request['mm_title'] ) + { + $this->registry->output->showError( $this->lang->words['mm_valtitle'], 11333 ); + } + + /* Check for forums */ + $forums = $this->_getSelectedForums(); + + /* Check forums */ + if( ! $forums ) + { + $this->registry->output->showError( $this->lang->words['mm_forums'], 11334 ); + } + + /* Check move location */ + if( $this->request['topic_move'] == 'n' ) + { + $this->registry->output->showError( $this->lang->words['mm_wrong'], 11335 ); + } + + /* Build the insert array */ + $save = array( + 'mm_title' => $this->request['mm_title'], + 'mm_enabled' => 1, + 'topic_state' => $this->request['topic_state'], + 'topic_pin' => $this->request['topic_pin'], + 'topic_move' => intval( $this->request['topic_move'] ), + 'topic_move_link' => intval( $this->request['topic_move_link'] ), + 'topic_title_st' => IPSText::stripslashes( $_POST['topic_title_st'] ), + 'topic_title_end' => IPSText::stripslashes( $_POST['topic_title_end'] ), + 'topic_reply' => intval( $this->request['topic_reply'] ), + 'topic_reply_content' => IPSText::stripslashes( $_POST['topic_reply_content'] ), + 'topic_reply_postcount' => intval( $this->request['topic_reply_postcount'] ), + 'mm_forums' => $forums, + 'topic_approve' => intval( $this->request['topic_approve'] ), + ); + + /* Edit */ + if ( $type == 'edit' ) + { + /* ID */ + $id = intval( $this->request['id'] ); + + if( ! $id ) + { + $this->registry->output->showError( $this->lang->words['mm_valid'] ); + } + + /* Update the multi mod */ + $this->DB->update( 'topic_mmod', $save, 'mm_id='.$id ); + } + /* New */ + else + { + /* Insert the new multi mod */ + $this->DB->insert( 'topic_mmod', $save ); + } + + /* Log, Cache, and Bounce */ + $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['mm_update'], $type ) ); + $this->multiModerationRebuildCache(); + $this->registry->output->silentRedirect( $this->settings['base_url'] . $this->html->form_code ); + } + + /** + * Builds the add/edit multi moderation form + * + * @param string $type Either 'new' or 'edit' + * @return void + */ + public function multiModerationForm( $type='new' ) + { + if( $type == 'new' ) + { + /* Setup */ + $form_code = 'donew'; + $id = 0; + $description = $this->lang->words['mm_addnew']; + $button = $this->lang->words['mm_addnew']; + + /* Default Values */ + $topic_mm = array( + 'mm_forums' => '', + 'mm_title' => '', + 'topic_title_st' => '', + 'topic_title_end' => '', + 'topic_state' => '', + 'topic_pin' => '', + 'topic_approve' => '', + 'topic_move' => '', + 'topic_move_link' => '', + 'topic_reply' => '', + 'topic_reply_content' => '', + 'topic_reply_postcount' => '' + ); + } + else + { + /* Setup */ + $id = intval( $this->request['id'] ); + $form_code = 'doedit'; + $description = $this->lang->words['mm_edit']; + $button = $this->lang->words['mm_edit']; + + /* Default Values */ + $this->DB->build( array( 'select' => '*', 'from' => 'topic_mmod', 'where' => "mm_id=$id" ) ); + $this->DB->execute(); + + if ( ! $topic_mm = $this->DB->fetch() ) + { + $this->registry->output->showError( sprintf( $this->lang->words['mm_noinfo'], $id ), 11337 ); + } + } + + /* State Drop Options */ + $state_dd = array( + 0 => array( 'leave', $this->lang->words['mm_leave'] ), + 1 => array( 'close', $this->lang->words['mm_close'] ), + 2 => array( 'open' , $this->lang->words['mm_open'] ), + ); + + /* Pinned Drop Down Options */ + $pin_dd = array( + 0 => array( 'leave', $this->lang->words['mm_leave'] ), + 1 => array( 'pin' , $this->lang->words['mm_pin'] ), + 2 => array( 'unpin', $this->lang->words['mm_unpin'] ), + ); + + /* Approved Drop Down Options */ + $app_dd = array( + 0 => array( '0', $this->lang->words['mm_leave'] ), + 1 => array( '1', $this->lang->words['mm_approve'] ), + 2 => array( '2', $this->lang->words['mm_unapprove'] ), + ); + + /* Build forum multiselect */ + $topic_mm['forums'] = ""; + + /* Build Form Fields */ + $topic_mm['mm_title'] = $this->registry->output->formInput("mm_title", $topic_mm['mm_title'] ); + $topic_mm['topic_title_st'] = $this->registry->output->formInput("topic_title_st", $topic_mm['topic_title_st'] ); + $topic_mm['topic_title_end'] = $this->registry->output->formInput("topic_title_end", $topic_mm['topic_title_end'] ); + $topic_mm['topic_state'] = $this->registry->output->formDropdown("topic_state", $state_dd, $topic_mm['topic_state'] ); + $topic_mm['topic_pin'] = $this->registry->output->formDropdown("topic_pin", $pin_dd, $topic_mm['topic_pin'] ); + $topic_mm['topic_approve'] = $this->registry->output->formDropdown("topic_approve", $app_dd, $topic_mm['topic_approve'] ); + $topic_mm['topic_move'] = $this->registry->output->formDropdown("topic_move", array_merge( array( 0 => array('-1', $this->lang->words['mm_nobodymovenobodygethurt'] ) ), $fporum_jump ), $topic_mm['topic_move'] ); + $topic_mm['topic_move_link'] = $this->registry->output->formCheckbox('topic_move_link', $topic_mm['topic_move_link'] ); + $topic_mm['topic_reply'] = $this->registry->output->formYesNo('topic_reply', $topic_mm['topic_reply'] ); + $topic_mm['topic_reply_content'] = $this->registry->output->formTextarea("topic_reply_content", $topic_mm['topic_reply_content'] ); + $topic_mm['topic_reply_postcount'] = $this->registry->output->formCheckbox('topic_reply_postcount', $topic_mm['topic_reply_postcount'] ); + + /* Output */ + $this->registry->output->html .= $this->html->multiModerationForm( $id, $form_code, $description, $topic_mm, $button ); + } + + /** + * Show all available multi mods + * + * @return void + */ + public function multiModerationOverview() + { + /* Query the multi mods */ + $this->DB->build( array( 'select' => '*', 'from' => 'topic_mmod', 'order' => "mm_title" ) ); + $this->DB->execute(); + + /* Loop through and build output arrays */ + $rows = array(); + + while( $r = $this->DB->fetch() ) + { + $rows[] = $r; + } + + /* Output */ + $this->registry->output->html .= $this->html->multiModerationOverview( $rows ); + } + + /** + * Rebuilds the multi moderation cache + * + * @return void + */ + public function multiModerationRebuildCache() + { + /* INI */ + $cache = array(); + + /* Get the multi mods */ + $this->DB->build( array( + 'select' => '*', + 'from' => 'topic_mmod', + 'order' => 'mm_title' + ) ); + + $this->DB->execute(); + + while ($i = $this->DB->fetch()) + { + $cache[ $i['mm_id'] ] = $i; + } + + /* Save the cache */ + $this->cache->setCache( 'multimod', $cache, array( 'array' => 1, 'donow' => 0 ) ); + } + + /** + * Get selected forums + * + * @return string Comma separated list of forum ids + */ + private function _getSelectedForums() + { + /* INI */ + $forumids = array(); + + /* Check for the forums array */ + if( is_array( $_POST['forums'] ) ) + { + /* Add All Forums */ + if( in_array( 'all', $_POST['forums'] ) ) + { + return '*'; + } + /* Add selected Forums */ + else + { + /* Loop through the selected forums */ + foreach( $_POST['forums'] as $l ) + { + if( $this->registry->class_forums->forum_by_id[ $l ] ) + { + $forumids[] = intval( $l ); + } + } + + if( ! count( $forumids ) ) + { + return; + } + /* Commented out for bug: http://community.invisionpower.com/tracker/issue-20910-selected-forums-on-topic-multi-moderation/ */ + /* Do we have cats? Give 'em to Charles! */ + //if( count( $forumids ) ) + //{ + // foreach( $forumids as $f ) + // { + // $children = $this->registry->class_forums->forumsGetChildren( $f ); + // + // if( is_array( $children ) and count( $children ) ) + // { + // $forumids = array_merge( $forumids, $children ); + // } + // } + //} + ///* No forums */ + //else + //{ + // return; + //} + } + } + /* Not an array */ + else + { + /* All Forums */ + if ( $this->request['forums'] == 'all' ) + { + return '*'; + } + else + { + /* Anything selected? */ + if( $this->request['forums'] != "" ) + { + $l = intval( $this->request['forums'] ); + + /* Single Forum */ + if( $this->registry->class_forums->forum_by_id[ $l ] ) + { + $forumids[] = intval( $l ); + } + + /* Check subs */ + if ( $this->request['searchsubs'] == 1 ) + { + $children = $this->registry->class_forums->forumsGetChildren( $l ); + + if( is_array ($children ) and count( $children ) ) + { + $forumids = array_merge( $forumids, $children ); + } + } + } + } + } + + return implode( ",", $forumids ); + } +} \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/forums/permissions.php b/upload/admin/applications/forums/modules_admin/forums/permissions.php index 6f47e367..239be988 100644 --- a/upload/admin/applications/forums/modules_admin/forums/permissions.php +++ b/upload/admin/applications/forums/modules_admin/forums/permissions.php @@ -1,682 +1,671 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_forums_forums_permissions extends ipsCommand -{ - /** - * Forum functions object - * - * @access private - * @var object - */ - private $forumfunc; - - /** - * Main execution point - * - * @access public - * @param object ipsRegistry reference - * @return void - */ - public function doExecute( ipsRegistry $registry ) - { - /* Setup Forum Classes */ - $this->registry->class_forums->forumsInit(); - - require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/forums/admin_forum_functions.php' ); - - $this->forumfunc = new admin_forum_functions( $registry ); - $this->forumfunc->forumsInit(); - - /* Load Skin and Lang */ - $this->html = $this->registry->output->loadTemplate( 'cp_skin_permissions' ); - $this->html->form_code = 'module=forums&section=permissions&'; - $this->html->form_code_js = 'module=forums&section=permissions&'; - - $this->lang->loadLanguageFile( array( 'admin_forums' ) ); - - /* Determine what todo */ - switch( $this->request['do'] ) - { - case 'fedit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'permmasks_edit' ); - $this->forumPermissions(); - break; - - case 'pdelete': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'permmasks_delete' ); - $this->deleteMask(); - break; - - case 'dofedit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'permmasks_edit' ); - $this->saveForumPermissions(); - break; - - case 'permsplash': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'permmasks_view' ); - $this->permsplash(); - break; - - case 'preview_forums': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'permmasks_view' ); - $this->previewForumPermissions(); - break; - - case 'dopermadd': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'permmasks_add' ); - $this->addNewPerm(); - break; - - case 'donameedit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'permmasks_edit' ); - $this->editPermName(); - break; - - case 'splash': - default: - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'permmasks_view' ); - $this->permissionsSplash(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Shows the forum permission preview popup - * - * @access public - * @return void - **/ - public function previewForumPermissions() - { - /* Check ID */ - $perm_id = intval( $this->request['id'] ); - if( ! $perm_id ) - { - $this->registry->output->showError( $this->lang->words['per_setid'], 11342 ); - } - - /* Query the set name */ - $this->DB->build( array( 'select' => '*', 'from' => 'forum_perms', 'where' => "perm_id=" . $perm_id ) ); - $this->DB->execute(); - - if ( ! $perms = $this->DB->fetch() ) - { - $this->registry->output->showError( $this->lang->words['per_setid'], 11343 ); - } - - /* Type of permission to preview */ - switch( $this->request['t'] ) - { - case 'start': - $human_type = $this->lang->words['per_start']; - $code_word = 'perm_4'; - break; - - case 'reply': - $human_type = $this->lang->words['per_reply']; - $code_word = 'perm_3'; - break; - - case 'show': - $human_type = $this->lang->words['per_show']; - $code_word = 'perm_view'; - break; - - case 'upload': - $human_type = $this->lang->words['per_upload']; - $code_word = 'perm_5'; - break; - - case 'download': - $human_type = $this->lang->words['per_download']; - $code_word = 'perm_6'; - break; - - default: - $human_type = $this->lang->words['per_read']; - $code_word = 'perm_2'; - break; - } - - /* Get forums */ - $theforums = $this->forumfunc->adForumsForumList(1); - - /* Loop through forums */ - $rows = array(); - - foreach( $theforums as $v ) - { - $id = $v[0]; - $name = $v[1]; - - $this->registry->class_forums->forum_by_id[$id][ $code_word ] = isset( $this->registry->class_forums->forum_by_id[$id][ $code_word ] ) ? $this->registry->class_forums->forum_by_id[$id][ $code_word ] : ''; - - if( $this->registry->class_forums->forum_by_id[$id][ $code_word ] == '*' ) - { - $rows[] = array( 'css' => 'color:green', 'name' => $name ); - } - else if (preg_match( "/(^|,)".$perm_id."(,|$)/", $this->registry->class_forums->forum_by_id[$id][ $code_word ]) ) - { - $rows[] = array( 'css' => 'color:green;font-weight:bold', 'name' => $name ); - } - else - { - if( $code_word != 'perm_view' AND $this->registry->class_forums->forum_by_id[$id]['parent_id'] == 'root' ) - { - /* Categories */ - $rows[] = array( 'css' => 'color:grey', 'name' => $name ); - } - else - { - /* No Access */ - $rows[] = array( 'css' => 'color:red;font-weight:bold', 'name' => $name ); - } - } - } - - $type_drop = $this->registry->output->formDropdown( 't', array( - array( 'start' , $this->lang->words['per_start_m'] ), - array( 'reply' , $this->lang->words['per_reply_m'] ), - array( 'read' , $this->lang->words['per_read_m'] ), - array( 'show' , $this->lang->words['per_show_m'] ), - array( 'upload' , $this->lang->words['per_upload_m'] ), - array( 'download', $this->lang->words['per_download_m'] ), - ), $this->request['t'] ); - - /* Output */ - $this->registry->output->html .= $this->html->previewForumPermissions( $id, $perms['perm_name'], $type_drop, $rows, $human_type ); - $this->registry->output->printPopupWindow(); - } - - /** - * Save Forum Permission Matrix - * - * @access public - * @return void - **/ - public function saveForumPermissions() - { - /* Check ID */ - $gid = intval( $this->request['id'] ); - - if( ! $gid ) - { - $this->registry->output->showError( $this->lang->words['per_groupid'], 11344 ); - } - - /* Check the mask */ - $this->DB->build( array( 'select' => '*', 'from' => 'forum_perms', 'where' => "perm_id=" . $gid ) ); - $this->DB->execute(); - - if ( ! $gr = $this->DB->fetch() ) - { - $this->registry->output->showError( $this->lang->words['per_groupid'], 11345 ); - } - - /* Permission Fields */ - $permission_fields = array( 'view' => 'perm_view', 'read' => 'perm_2', 'reply' => 'perm_3', 'start' => 'perm_4', 'upload' => 'perm_5', 'download' => 'perm_6' ); - - /* Query all the forum permissions */ - $forum_data = $this->forumfunc->adForumsForumData(); - - //echo '
    '; print_r( $this->request );exit();
    -		foreach( $forum_data as $r )
    -		{
    -			/* Initialize the array */
    -			$new_permissions = array();
    -			
    -			/* Loop through each permission type */
    -			foreach( $permission_fields as $k => $v )
    -			{
    -				/* Don't change global permissions */				
    -				if( $r[$v] != '*' )
    -				{					
    -					if( isset( $this->request[$k] ) && is_array( $this->request[$k] ) )
    -					{
    -						/* Check for forum */
    -						$forum_checked = isset($this->request[$k][ $r['id'] ]);
    -						
    -						/* Check to see if the forum is currently added to this mask */
    -						$_perm_array = explode( ',', IPSText::cleanPermString( $r[$v] ) );
    -						
    -						if( in_array( $gid, $_perm_array ) )
    -						{
    -							/* The forum was unchecked, so we need to remove it */
    -							if( ! $forum_checked )
    -							{
    -								unset( $_perm_array[ array_search( $gid, $_perm_array ) ] );
    -							}
    -						}
    -						else
    -						{
    -							/* The forum was checked, so we need to add it */
    -							if( $forum_checked )
    -							{
    -								$_perm_array[] = $gid;
    -							}
    -						}
    -						
    -						/* Set the new string */
    -						$new_permissions[$v] = ',' . implode( ',', $_perm_array ) . ',';
    -					}
    -					else
    -					{
    -						$new_permissions[$v] = '';
    -					}
    -				}
    -				else
    -				{
    -					$new_permissions[$v] = '*';
    -				}				
    -			}
    -			
    -			/* Root Forum */
    -			if( $r['root_forum'] )
    -			{
    -				$new_permissions['perm_2'] = $new_permissions['perm_3'] = $new_permissions['perm_4'] = $new_permissions['perm_5'] = $new_permissions['perm_6'] = '';
    -			}			
    -			
    -			/* Update the database */
    -			$this->DB->update( 'permission_index', $new_permissions, "perm_type='forum' AND app='forums' AND perm_type_id={$r['id']}" );
    -		}
    -		
    -		/* All Done */
    -		$this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['per_editedlog'], $gr['perm_name'] ) );		
    -		$this->registry->output->global_message = $this->lang->words['per_updated'];
    -		$this->permissionsSplash();
    -	}	
    -	
    -	/**
    -	 * Removes a permission set
    -	 *
    -	 * @access	public
    -	 * @return	void
    -	 **/
    -	public function deleteMask()
    -	{
    -		/* Check ID */
    -		$old_id = intval( $this->request['id'] );
    -		
    -		if( ! $old_id )
    -		{
    -			$this->registry->output->showError( $this->lang->words['per_setid'], 11346 );
    -		}
    -		
    -		/* Permission Fields */
    -		$permission_fields = array( 'perm_view', 'perm_2', 'perm_3', 'perm_4', 'perm_5', 'perm_6', 'perm_7' );
    -		
    -		/* Query all the forum permissions */
    -		$this->DB->build( array( 'select' => '*', 'from' => 'permission_index', 'where' => "perm_type='forum' AND app='forums'" ) );
    -		$outer = $this->DB->execute();
    -		
    -		while( $r = $this->DB->fetch( $outer ) )
    -		{
    -			/* Perms */
    -			foreach( $permission_fields as $perm )
    -			{
    -				if( isset( $r[$perm] ) && $r[$perm] != '*' && $r[$perm] )
    -				{
    -					/* Arrayize */
    -					$_perm_array = explode( ',', IPSText::cleanPermString( $r[$perm] ) );
    -					
    -					/* Check for the mask */										
    -					if( in_array( $old_id, $_perm_array ) )
    -					{
    -						unset( $_perm_array[ array_search( $old_id, $_perm_array ) ] );
    -					}
    -					
    -					/* Back to string */
    -					$r[$perm] = ',' . implode( ',', $_perm_array ) . ',';
    -				}
    -			}
    -						
    -			/* Update */
    -			$this->DB->update( 'permission_index', $r, "perm_id={$r['perm_id']}" );
    -		}
    -		
    -		/* Delete the mask */
    -		$this->DB->delete( 'forum_perms', "perm_id={$old_id}" );
    -		
    -		/* Done */
    -		$this->registry->output->global_message = $this->lang->words['per_removed'];
    -		$this->permissionsSplash();
    -	}	
    -	
    -	/**
    -	 * Adds a new permission set
    -	 *
    -	 * @access	public
    -	 * @return	void
    -	 **/
    -	public function addNewPerm()
    -	{
    -		/* Check Perm Name */
    -		$this->request['new_perm_name'] = trim( $this->request['new_perm_name'] );
    -		
    -		if( $this->request['new_perm_name'] == "" )
    -		{
    -			$this->registry->output->showError( $this->lang->words['per_entername'], 11347 );
    -		}
    -		
    -		/* Perm set to copy */
    -		$copy_id = intval( $this->request['new_perm_copy'] );
    -		
    -		/* Insert new permission set */
    -		$this->DB->insert( 'forum_perms', array( 'perm_name' => $this->request['new_perm_name'] ) );		
    -		$new_id = $this->DB->getInsertId();
    -		
    -		/* Copy permission */
    -		if( $new_id && $copy_id )
    -		{
    -			/* Permission Fields */
    -			$permission_fields = array( 'perm_view', 'perm_2', 'perm_3', 'perm_4', 'perm_5', 'perm_6', 'perm_7' );
    -			
    -			/* Query all the forum permissions */
    -			$this->DB->build( array( 'select' => '*', 'from' => 'permission_index', 'where' => "perm_type='forum' AND app='forums'" ) );
    -			$outer = $this->DB->execute();
    -			
    -			while( $r = $this->DB->fetch( $outer ) )
    -			{
    -				/* Perms */
    -				foreach( $permission_fields as $perm )
    -				{
    -					if( isset( $r[$perm] ) )
    -					{
    -						if( in_array( $copy_id, explode( ',', IPSText::cleanPermString( $r[$perm] ) ) ) )
    -						{
    -							$r[$perm] .= "{$new_id},";
    -						}
    -					}	
    -				}
    -				
    -				/* Update */
    -				$this->DB->update( 'permission_index', $r, "perm_id={$r['perm_id']}" );
    -			}
    -		}
    -		
    -		/* Done */
    -		$this->registry->output->global_message = sprintf( $this->lang->words['per_added'], $this->request['new_perm_name'] );
    -		$this->permissionsSplash();
    -	}	
    -	
    -	/**
    -	 * Changes the name of a permission set
    -	 *
    -	 * @access	public
    -	 * @return	void
    -	 **/
    -	public function editPermName()
    -	{
    -		/* ID */
    -		$gid = intval( $this->request['id'] );		
    -		
    -		/* Check ID */
    -		if( ! $gid )
    -		{
    -			$this->registry->output->showError( $this->lang->words['per_groupid'], 11348 );
    -		}
    -		
    -		/* Check Name */
    -		if( $this->request['perm_name'] == "" )
    -		{
    -			$this->registry->output->showError( $this->lang->words['per_entername'], 11349 );
    -		}
    -		
    -		/* Query group */		
    -		$this->DB->build( array( 'select' => '*', 'from' => 'forum_perms', 'where' => "perm_id={$gid}" ) );
    -		$this->DB->execute();
    -		
    -		if ( ! $gr = $this->DB->fetch() )
    -		{
    -			$this->registry->output->showError( $this->lang->words['per_groupid'], 11350 );
    -		}
    -		
    -		/* Update the database */
    -		$this->DB->update( 'forum_perms', array( 'perm_name' => $this->request['perm_name'] ), 'perm_id=' . $gid );
    -		
    -		/* Done */
    -		$this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['per_editedlog'], $gr['perm_name'] ) );		
    -		$this->registry->output->global_message = $this->lang->words['per_updated'];
    -		$this->forumPermissions();
    -	}	
    -
    -	/**
    -	 * Forum Permission Matrix
    -	 *
    -	 * @access	public
    -	 * @return	void
    -	 **/
    -	public function forumPermissions()
    -	{
    -		/* Check for ID */
    -		if( $this->request['id'] == "")
    -		{
    -			$this->registry->output->showError( $this->lang->words['per_groupid'], 11351 );
    -		}
    -		
    -		/* Permission Class */
    -		require_once( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php' );
    -		$permissions = new classPublicPermissions( ipsRegistry::instance() );		
    -		
    -		/* Page Setup */
    -		$this->registry->output->nav[]           = array( $this->form_code.'&do=permsplash', $this->lang->words['per_manage'] );
    -		$this->registry->output->nav[]           = array( '', $this->lang->words['per_addedit'] );		
    -		
    -		/* Query Mask */
    -		$this->DB->build( array( 'select' => '*', 'from' => 'forum_perms', 'where' => "perm_id=" . intval( $this->request['id'] ) ) );
    -		$this->DB->execute();		
    -		$group = $this->DB->fetch();
    -		
    -		/* Data */
    -		$gid        = $group['perm_id'];
    -		$gname      = $group['perm_name'];		
    -		$forum_data = $this->forumfunc->adForumsForumData();
    -				
    -		/* Permission Fields */
    -		$permission_fields = array( 'view' => 'perm_view', 'read' => 'perm_2', 'reply' => 'perm_3', 'start' => 'perm_4', 'upload' => 'perm_5', 'download' => 'perm_6' );		
    -		
    -		/* Loop through masks and build output array */
    -		$permission_rows = array();
    -		
    -		foreach( $forum_data as $r )
    -		{
    -			/* INI Perms */
    -			$_perms = array();
    -			
    -			foreach( $permission_fields as $perm => $key )
    -			{
    -				if( $r[$key] == '*' )
    -				{
    -					$_perms[$perm] = $this->lang->words['per_global'];
    -				}
    -				else if ( preg_match( "/(^|,)".$gid."(,|$)/", $r[$key] ) )
    -				{
    -					$_perms[$perm] = 'checked';
    -				}
    -				else
    -				{
    -					$_perms[$perm] = '';
    -				}
    -			}
    -
    -			/* Root Forum */
    -			if( $r['root_forum'] )
    -			{
    -				$r['css'] = 'tablerow4';
    -				$_perms['download'] = $_perms['upload'] = $_perms['reply'] = $_perms['start'] = $_perms['read'] = $this->lang->words['per_notused'];
    -			}
    -			else
    -			{
    -				$r['css'] = 'tablerow1';
    -			}
    -			
    -			/* Perms */
    -			$r['_perms'] = $_perms;
    -			
    -			/* Add to array */
    -			$permission_rows[] = $r;
    -		}
    -	
    -		/* Output */
    -		$this->registry->output->html .= $this->html->permissionsForum( $gid, $gname, $permission_rows, $this->registry->class_forums->forumById( $this->request['id'] ) );		
    -	}	
    -	
    -	/**
    -	 * Displays the permission splash screen
    -	 *
    -	 * @access	public
    -	 * @return	void
    -	 **/
    -	public function permissionsSplash()
    -	{
    -		//-----------------------------------------
    -		// INIT
    -		//-----------------------------------------
    -		
    -		$perms   = array();
    -		$mems    = array();
    -		$groups  = array();
    -		$dlist   = "";
    -		$content = "";
    -		
    -		//-----------------------------------------
    -		// Page title & desc
    -		//-----------------------------------------
    -
    -		$this->registry->output->nav[]           = array( $this->form_code.'&do=permsplash', $this->lang->words['per_manage'] );
    -								
    -		//-----------------------------------------
    -		// Get the names for the perm masks w/id
    -		//-----------------------------------------
    -		
    -		$this->DB->build( array( 'select' => '*', 'from' => 'forum_perms', 'order' => 'perm_name ASC' ) );
    -		$this->DB->execute();
    -		
    -		while( $r = $this->DB->fetch() )
    -		{
    -			$perms[ $r['perm_id'] ] = $r['perm_name'];
    -		}
    -		
    -		//-----------------------------------------
    -		// Get the number of members using this mask
    -		// as an over ride
    -		//-----------------------------------------
    -		
    -		$this->DB->build( array( 'select'	=> 'COUNT(member_id) as count, org_perm_id',
    -										'from'	=> 'members',
    -										'where'	=> "(org_perm_id " . $this->DB->buildIsNull( false ) . " AND org_perm_id != '')",
    -										'group'	=> 'org_perm_id',
    -							)		);
    -		$this->DB->execute();
    -		
    -		while( $r = $this->DB->fetch() )
    -		{
    -			if ( strstr( $r['org_perm_id'] , "," ) )
    -			{
    -				foreach( explode( ",", $r['org_perm_id'] ) as $pid )
    -				{
    -					$mems[ $pid ]  = ! isset( $mems[ $pid ] ) ? 0 : $mems[ $pid ];
    -					$mems[ $pid ] += $r['count'];
    -				}
    -			}
    -			else
    -			{
    -				$mems[ $r['org_perm_id'] ] += $r['count'];
    -			}
    -			
    -		}
    -	
    -		//-----------------------------------------
    -		// Get the member group names and the mask
    -		// they use
    -		//-----------------------------------------
    -		
    -		$this->DB->build( array( 'select' => 'g_id, g_title, g_perm_id', 'from' => 'groups' ) );
    -		$this->DB->execute();
    -		
    -		while( $r = $this->DB->fetch() )
    -		{
    -			if ( strstr( $r['g_perm_id'] , "," ) )
    -			{
    -				foreach( explode( ",", $r['g_perm_id'] ) as $pid )
    -				{
    -					$groups[ $pid ][] = $r['g_title'];
    -				}
    -			}
    -			else
    -			{
    -				$groups[ $r['g_perm_id'] ][] = $r['g_title'];
    -			}
    -		}
    -		
    -		//-----------------------------------------
    -		// Print the splash screen
    -		//-----------------------------------------
    -		
    -		$display_groups = array();
    -		foreach( $perms as $id => $name )
    -		{
    -			$groups_used = "";
    -			$mems_used   = 0;
    -			$is_active   = 0;
    -			$dlist      .= "\n";
    -			
    -			if ( isset( $groups[ $id ] ) AND is_array( $groups[ $id ] ) )
    -			{
    -				foreach( $groups[ $id ] as $g_title )
    -				{
    -					$groups_used .= '· ' . $g_title . "
    "; - } - - $is_active = 1; - } - else - { - $groups_used = "{$this->lang->words['per_none']}"; - } - - if ( isset($mems[ $id ]) AND $mems[ $id ] > 0 ) - { - $is_active = 1; - } - - $r['id'] = $id; - $r['name'] = $name; - $r['isactive'] = $is_active; - $r['groups'] = $groups_used; - $r['mems'] = isset( $mems[ $id ] ) ? intval( $mems[ $id ] ) : 0; - - $display_groups[] = $r; - } - - $this->registry->output->html .= $this->html->permissionsSplash( $display_groups, $dlist ); - } -} - - -?> \ No newline at end of file + + * Invision Power Services + * IP.Board v3.1.4 + * Forum Permission Masks + * Last Updated: $LastChangedDate: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + *
    + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 17th March 2002 + * @version $Rev: 7003 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_forums_forums_permissions extends ipsCommand +{ + /** + * Forum functions object + * + * @var object + */ + private $forumfunc; + + /** + * Main execution point + * + * @param object ipsRegistry reference + * @return void + */ + public function doExecute( ipsRegistry $registry ) + { + /* Setup Forum Classes */ + $this->registry->class_forums->forumsInit(); + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/admin_forum_functions.php", 'admin_forum_functions', 'forums' ); + $this->forumfunc = new $classToLoad( $registry ); + $this->forumfunc->forumsInit(); + + /* Load Skin and Lang */ + $this->html = $this->registry->output->loadTemplate( 'cp_skin_permissions' ); + $this->html->form_code = 'module=forums&section=permissions&'; + $this->html->form_code_js = 'module=forums&section=permissions&'; + + $this->lang->loadLanguageFile( array( 'admin_forums' ) ); + + /* Determine what todo */ + switch( $this->request['do'] ) + { + case 'fedit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'permmasks_edit' ); + $this->forumPermissions(); + break; + + case 'pdelete': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'permmasks_delete' ); + $this->deleteMask(); + break; + + case 'dofedit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'permmasks_edit' ); + $this->saveForumPermissions(); + break; + + case 'permsplash': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'permmasks_view' ); + $this->permsplash(); + break; + + case 'preview_forums': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'permmasks_view' ); + $this->previewForumPermissions(); + break; + + case 'dopermadd': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'permmasks_add' ); + $this->addNewPerm(); + break; + + case 'donameedit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'permmasks_edit' ); + $this->editPermName(); + break; + + case 'splash': + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'permmasks_view' ); + $this->permissionsSplash(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Shows the forum permission preview popup + * + * @return void + */ + public function previewForumPermissions() + { + /* Check ID */ + $perm_id = intval( $this->request['id'] ); + if( ! $perm_id ) + { + $this->registry->output->showError( $this->lang->words['per_setid'], 11342 ); + } + + /* Query the set name */ + $this->DB->build( array( 'select' => '*', 'from' => 'forum_perms', 'where' => "perm_id=" . $perm_id ) ); + $this->DB->execute(); + + if ( ! $perms = $this->DB->fetch() ) + { + $this->registry->output->showError( $this->lang->words['per_setid'], 11343 ); + } + + /* Type of permission to preview */ + switch( $this->request['t'] ) + { + case 'start': + $human_type = $this->lang->words['per_start']; + $code_word = 'perm_4'; + break; + + case 'reply': + $human_type = $this->lang->words['per_reply']; + $code_word = 'perm_3'; + break; + + case 'show': + $human_type = $this->lang->words['per_show']; + $code_word = 'perm_view'; + break; + + case 'upload': + $human_type = $this->lang->words['per_upload']; + $code_word = 'perm_5'; + break; + + case 'download': + $human_type = $this->lang->words['per_download']; + $code_word = 'perm_6'; + break; + + default: + $human_type = $this->lang->words['per_read']; + $code_word = 'perm_2'; + break; + } + + /* Get forums */ + $theforums = $this->forumfunc->adForumsForumList(1); + + /* Loop through forums */ + $rows = array(); + + foreach( $theforums as $v ) + { + $id = $v[0]; + $name = $v[1]; + + $this->registry->class_forums->forum_by_id[$id][ $code_word ] = isset( $this->registry->class_forums->forum_by_id[$id][ $code_word ] ) ? $this->registry->class_forums->forum_by_id[$id][ $code_word ] : ''; + + if( $this->registry->class_forums->forum_by_id[$id][ $code_word ] == '*' ) + { + $rows[] = array( 'css' => 'color:green', 'name' => $name ); + } + else if (preg_match( "/(^|,)".$perm_id."(,|$)/", $this->registry->class_forums->forum_by_id[$id][ $code_word ]) ) + { + $rows[] = array( 'css' => 'color:green;font-weight:bold', 'name' => $name ); + } + else + { + if( $code_word != 'perm_view' AND $this->registry->class_forums->forum_by_id[$id]['parent_id'] == 'root' ) + { + /* Categories */ + $rows[] = array( 'css' => 'color:grey', 'name' => $name ); + } + else + { + /* No Access */ + $rows[] = array( 'css' => 'color:red;font-weight:bold', 'name' => $name ); + } + } + } + + $type_drop = $this->registry->output->formDropdown( 't', array( + array( 'start' , $this->lang->words['per_start_m'] ), + array( 'reply' , $this->lang->words['per_reply_m'] ), + array( 'read' , $this->lang->words['per_read_m'] ), + array( 'show' , $this->lang->words['per_show_m'] ), + array( 'upload' , $this->lang->words['per_upload_m'] ), + array( 'download', $this->lang->words['per_download_m'] ), + ), $this->request['t'] ); + + /* Output */ + $this->registry->output->html .= $this->html->previewForumPermissions( $id, $perms['perm_name'], $type_drop, $rows, $human_type ); + $this->registry->output->printPopupWindow(); + } + + /** + * Save Forum Permission Matrix + * + * @return void + */ + public function saveForumPermissions() + { + /* Check ID */ + $gid = intval( $this->request['id'] ); + + if( ! $gid ) + { + $this->registry->output->showError( $this->lang->words['per_groupid'], 11344 ); + } + + /* Check the mask */ + $this->DB->build( array( 'select' => '*', 'from' => 'forum_perms', 'where' => "perm_id=" . $gid ) ); + $this->DB->execute(); + + if ( ! $gr = $this->DB->fetch() ) + { + $this->registry->output->showError( $this->lang->words['per_groupid'], 11345 ); + } + + /* Permission Fields */ + $permission_fields = array( 'view' => 'perm_view', 'read' => 'perm_2', 'reply' => 'perm_3', 'start' => 'perm_4', 'upload' => 'perm_5', 'download' => 'perm_6' ); + + /* Query all the forum permissions */ + $forum_data = $this->forumfunc->adForumsForumData(); + + //echo '
    '; print_r( $this->request );exit();
    +		foreach( $forum_data as $r )
    +		{
    +			/* Initialize the array */
    +			$new_permissions = array();
    +			
    +			/* Loop through each permission type */
    +			foreach( $permission_fields as $k => $v )
    +			{
    +				/* Don't change global permissions */				
    +				if( $r[$v] != '*' )
    +				{					
    +					if( isset( $this->request[$k] ) && is_array( $this->request[$k] ) )
    +					{
    +						/* Check for forum */
    +						$forum_checked = isset($this->request[$k][ $r['id'] ]);
    +						
    +						/* Check to see if the forum is currently added to this mask */
    +						$_perm_array = explode( ',', IPSText::cleanPermString( $r[$v] ) );
    +						
    +						if( in_array( $gid, $_perm_array ) )
    +						{
    +							/* The forum was unchecked, so we need to remove it */
    +							if( ! $forum_checked )
    +							{
    +								unset( $_perm_array[ array_search( $gid, $_perm_array ) ] );
    +							}
    +						}
    +						else
    +						{
    +							/* The forum was checked, so we need to add it */
    +							if( $forum_checked )
    +							{
    +								$_perm_array[] = $gid;
    +							}
    +						}
    +						
    +						/* Set the new string */
    +						$new_permissions[$v] = ',' . implode( ',', $_perm_array ) . ',';
    +					}
    +					else
    +					{
    +						$new_permissions[$v] = '';
    +					}
    +				}
    +				else
    +				{
    +					$new_permissions[$v] = '*';
    +				}				
    +			}
    +			
    +			/* Root Forum */
    +			if( $r['root_forum'] )
    +			{
    +				$new_permissions['perm_2'] = $new_permissions['perm_3'] = $new_permissions['perm_4'] = $new_permissions['perm_5'] = $new_permissions['perm_6'] = '';
    +			}			
    +			
    +			/* Update the database */
    +			$this->DB->update( 'permission_index', $new_permissions, "perm_type='forum' AND app='forums' AND perm_type_id={$r['id']}" );
    +		}
    +		
    +		/* All Done */
    +		$this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['per_editedlog'], $gr['perm_name'] ) );		
    +		$this->registry->output->global_message = $this->lang->words['per_updated'];
    +		$this->permissionsSplash();
    +	}	
    +	
    +	/**
    +	 * Removes a permission set
    +	 *
    +	 * @return	void
    +	 */
    +	public function deleteMask()
    +	{
    +		/* Check ID */
    +		$old_id = intval( $this->request['id'] );
    +		
    +		if( ! $old_id )
    +		{
    +			$this->registry->output->showError( $this->lang->words['per_setid'], 11346 );
    +		}
    +		
    +		/* Permission Fields */
    +		$permission_fields = array( 'perm_view', 'perm_2', 'perm_3', 'perm_4', 'perm_5', 'perm_6', 'perm_7' );
    +		
    +		/* Query all the forum permissions */
    +		$this->DB->build( array( 'select' => '*', 'from' => 'permission_index', 'where' => "perm_type='forum' AND app='forums'" ) );
    +		$outer = $this->DB->execute();
    +		
    +		while( $r = $this->DB->fetch( $outer ) )
    +		{
    +			/* Perms */
    +			foreach( $permission_fields as $perm )
    +			{
    +				if( isset( $r[$perm] ) && $r[$perm] != '*' && $r[$perm] )
    +				{
    +					/* Arrayize */
    +					$_perm_array = explode( ',', IPSText::cleanPermString( $r[$perm] ) );
    +					
    +					/* Check for the mask */										
    +					if( in_array( $old_id, $_perm_array ) )
    +					{
    +						unset( $_perm_array[ array_search( $old_id, $_perm_array ) ] );
    +					}
    +					
    +					/* Back to string */
    +					$r[$perm] = ',' . implode( ',', $_perm_array ) . ',';
    +				}
    +			}
    +						
    +			/* Update */
    +			$this->DB->update( 'permission_index', $r, "perm_id={$r['perm_id']}" );
    +		}
    +		
    +		/* Delete the mask */
    +		$this->DB->delete( 'forum_perms', "perm_id={$old_id}" );
    +		
    +		/* Done */
    +		$this->registry->output->global_message = $this->lang->words['per_removed'];
    +		$this->permissionsSplash();
    +	}	
    +	
    +	/**
    +	 * Adds a new permission set
    +	 *
    +	 * @return	void
    +	 */
    +	public function addNewPerm()
    +	{
    +		/* Check Perm Name */
    +		$this->request['new_perm_name'] = trim( $this->request['new_perm_name'] );
    +		
    +		if( $this->request['new_perm_name'] == "" )
    +		{
    +			$this->registry->output->showError( $this->lang->words['per_entername'], 11347 );
    +		}
    +		
    +		/* Perm set to copy */
    +		$copy_id = intval( $this->request['new_perm_copy'] );
    +		
    +		/* Insert new permission set */
    +		$this->DB->insert( 'forum_perms', array( 'perm_name' => $this->request['new_perm_name'] ) );		
    +		$new_id = $this->DB->getInsertId();
    +		
    +		/* Copy permission */
    +		if( $new_id && $copy_id )
    +		{
    +			/* Permission Fields */
    +			$permission_fields = array( 'perm_view', 'perm_2', 'perm_3', 'perm_4', 'perm_5', 'perm_6', 'perm_7' );
    +			
    +			/* Query all the forum permissions */
    +			$this->DB->build( array( 'select' => '*', 'from' => 'permission_index', 'where' => "perm_type='forum' AND app='forums'" ) );
    +			$outer = $this->DB->execute();
    +			
    +			while( $r = $this->DB->fetch( $outer ) )
    +			{
    +				/* Perms */
    +				foreach( $permission_fields as $perm )
    +				{
    +					if( isset( $r[$perm] ) )
    +					{
    +						if( in_array( $copy_id, explode( ',', IPSText::cleanPermString( $r[$perm] ) ) ) )
    +						{
    +							$r[$perm] .= "{$new_id},";
    +						}
    +					}	
    +				}
    +				
    +				/* Update */
    +				$this->DB->update( 'permission_index', $r, "perm_id={$r['perm_id']}" );
    +			}
    +		}
    +		
    +		/* Done */
    +		$this->registry->output->global_message = sprintf( $this->lang->words['per_added'], $this->request['new_perm_name'] );
    +		$this->permissionsSplash();
    +	}	
    +	
    +	/**
    +	 * Changes the name of a permission set
    +	 *
    +	 * @return	void
    +	 */
    +	public function editPermName()
    +	{
    +		/* ID */
    +		$gid = intval( $this->request['id'] );		
    +		
    +		/* Check ID */
    +		if( ! $gid )
    +		{
    +			$this->registry->output->showError( $this->lang->words['per_groupid'], 11348 );
    +		}
    +		
    +		/* Check Name */
    +		if( $this->request['perm_name'] == "" )
    +		{
    +			$this->registry->output->showError( $this->lang->words['per_entername'], 11349 );
    +		}
    +		
    +		/* Query group */		
    +		$this->DB->build( array( 'select' => '*', 'from' => 'forum_perms', 'where' => "perm_id={$gid}" ) );
    +		$this->DB->execute();
    +		
    +		if ( ! $gr = $this->DB->fetch() )
    +		{
    +			$this->registry->output->showError( $this->lang->words['per_groupid'], 11350 );
    +		}
    +		
    +		/* Update the database */
    +		$this->DB->update( 'forum_perms', array( 'perm_name' => $this->request['perm_name'] ), 'perm_id=' . $gid );
    +		
    +		/* Done */
    +		$this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['per_editedlog'], $gr['perm_name'] ) );		
    +		$this->registry->output->global_message = $this->lang->words['per_updated'];
    +		$this->forumPermissions();
    +	}	
    +
    +	/**
    +	 * Forum Permission Matrix
    +	 *
    +	 * @return	void
    +	 */
    +	public function forumPermissions()
    +	{
    +		/* Check for ID */
    +		if( $this->request['id'] == "")
    +		{
    +			$this->registry->output->showError( $this->lang->words['per_groupid'], 11351 );
    +		}
    +		
    +		/* Permission Class */
    +		$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php', 'classPublicPermissions' );
    +		$permissions = new $classToLoad( ipsRegistry::instance() );		
    +		
    +		/* Page Setup */
    +		$this->registry->output->nav[] = array( $this->form_code.'&do=permsplash', $this->lang->words['per_manage'] );
    +		$this->registry->output->nav[] = array( '', $this->lang->words['per_addedit'] );		
    +		
    +		/* Query Mask */
    +		$this->DB->build( array( 'select' => '*', 'from' => 'forum_perms', 'where' => "perm_id=" . intval( $this->request['id'] ) ) );
    +		$this->DB->execute();		
    +		$group = $this->DB->fetch();
    +		
    +		/* Data */
    +		$gid        = $group['perm_id'];
    +		$gname      = $group['perm_name'];		
    +		$forum_data = $this->forumfunc->adForumsForumData();
    +				
    +		/* Permission Fields */
    +		$permission_fields = array( 'view' => 'perm_view', 'read' => 'perm_2', 'reply' => 'perm_3', 'start' => 'perm_4', 'upload' => 'perm_5', 'download' => 'perm_6' );		
    +		
    +		/* Loop through masks and build output array */
    +		$permission_rows = array();
    +		
    +		foreach( $forum_data as $r )
    +		{
    +			/* INI Perms */
    +			$_perms = array();
    +			
    +			foreach( $permission_fields as $perm => $key )
    +			{
    +				if( $r[$key] == '*' )
    +				{
    +					$_perms[$perm] = $this->lang->words['per_global'];
    +				}
    +				else if ( preg_match( "/(^|,)".$gid."(,|$)/", $r[$key] ) )
    +				{
    +					$_perms[$perm] = 'checked';
    +				}
    +				else
    +				{
    +					$_perms[$perm] = '';
    +				}
    +			}
    +
    +			/* Root Forum */
    +			if( $r['root_forum'] )
    +			{
    +				$r['css'] = 'tablerow4';
    +				$_perms['download'] = $_perms['upload'] = $_perms['reply'] = $_perms['start'] = $_perms['read'] = $this->lang->words['per_notused'];
    +			}
    +			else
    +			{
    +				$r['css'] = 'tablerow1';
    +			}
    +			
    +			/* Perms */
    +			$r['_perms'] = $_perms;
    +			
    +			/* Add to array */
    +			$permission_rows[] = $r;
    +		}
    +	
    +		/* Output */
    +		$this->registry->output->html .= $this->html->permissionsForum( $gid, $gname, $permission_rows, $this->registry->class_forums->forumById( $this->request['id'] ) );		
    +	}	
    +	
    +	/**
    +	 * Displays the permission splash screen
    +	 *
    +	 * @return	void
    +	 */
    +	public function permissionsSplash()
    +	{
    +		//-----------------------------------------
    +		// INIT
    +		//-----------------------------------------
    +		
    +		$perms   = array();
    +		$mems    = array();
    +		$groups  = array();
    +		$dlist   = "";
    +		$content = "";
    +		
    +		//-----------------------------------------
    +		// Page title & desc
    +		//-----------------------------------------
    +
    +		$this->registry->output->nav[]           = array( $this->form_code.'&do=permsplash', $this->lang->words['per_manage'] );
    +								
    +		//-----------------------------------------
    +		// Get the names for the perm masks w/id
    +		//-----------------------------------------
    +		
    +		$this->DB->build( array( 'select' => '*', 'from' => 'forum_perms', 'order' => 'perm_name ASC' ) );
    +		$this->DB->execute();
    +		
    +		while( $r = $this->DB->fetch() )
    +		{
    +			$perms[ $r['perm_id'] ] = $r['perm_name'];
    +		}
    +		
    +		//-----------------------------------------
    +		// Get the number of members using this mask
    +		// as an over ride
    +		//-----------------------------------------
    +		
    +		$this->DB->build( array( 'select'	=> 'COUNT(member_id) as count, org_perm_id',
    +										'from'	=> 'members',
    +										'where'	=> "(org_perm_id " . $this->DB->buildIsNull( false ) . " AND org_perm_id != '')",
    +										'group'	=> 'org_perm_id',
    +							)		);
    +		$this->DB->execute();
    +		
    +		while( $r = $this->DB->fetch() )
    +		{
    +			if ( strstr( $r['org_perm_id'] , "," ) )
    +			{
    +				foreach( explode( ",", $r['org_perm_id'] ) as $pid )
    +				{
    +					$mems[ $pid ]  = ! isset( $mems[ $pid ] ) ? 0 : $mems[ $pid ];
    +					$mems[ $pid ] += $r['count'];
    +				}
    +			}
    +			else
    +			{
    +				$mems[ $r['org_perm_id'] ] += $r['count'];
    +			}
    +			
    +		}
    +	
    +		//-----------------------------------------
    +		// Get the member group names and the mask
    +		// they use
    +		//-----------------------------------------
    +		
    +		$this->DB->build( array( 'select' => 'g_id, g_title, g_perm_id', 'from' => 'groups' ) );
    +		$this->DB->execute();
    +		
    +		while( $r = $this->DB->fetch() )
    +		{
    +			if ( strstr( $r['g_perm_id'] , "," ) )
    +			{
    +				foreach( explode( ",", $r['g_perm_id'] ) as $pid )
    +				{
    +					$groups[ $pid ][] = $r['g_title'];
    +				}
    +			}
    +			else
    +			{
    +				$groups[ $r['g_perm_id'] ][] = $r['g_title'];
    +			}
    +		}
    +		
    +		//-----------------------------------------
    +		// Print the splash screen
    +		//-----------------------------------------
    +		
    +		$display_groups = array();
    +		foreach( $perms as $id => $name )
    +		{
    +			$groups_used = "";
    +			$mems_used   = 0;
    +			$is_active   = 0;
    +			$dlist      .= "\n";
    +			
    +			if ( isset( $groups[ $id ] ) AND is_array( $groups[ $id ] ) )
    +			{
    +				foreach( $groups[ $id ] as $g_title )
    +				{
    +					$groups_used .= '· ' . $g_title . "
    "; + } + + $is_active = 1; + } + else + { + $groups_used = "{$this->lang->words['per_none']}"; + } + + if ( isset($mems[ $id ]) AND $mems[ $id ] > 0 ) + { + $is_active = 1; + } + + $r['id'] = $id; + $r['name'] = $name; + $r['isactive'] = $is_active; + $r['groups'] = $groups_used; + $r['mems'] = isset( $mems[ $id ] ) ? intval( $mems[ $id ] ) : 0; + + $display_groups[] = $r; + } + + $this->registry->output->html .= $this->html->permissionsSplash( $display_groups, $dlist ); + } +} \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/forums/xml/index.html b/upload/admin/applications/forums/modules_admin/forums/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_admin/forums/xml/index.html +++ b/upload/admin/applications/forums/modules_admin/forums/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/index.html b/upload/admin/applications/forums/modules_admin/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_admin/index.html +++ b/upload/admin/applications/forums/modules_admin/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/rss/defaultSection.php b/upload/admin/applications/forums/modules_admin/rss/defaultSection.php index 5ecbab7d..abcbd1c8 100644 --- a/upload/admin/applications/forums/modules_admin/rss/defaultSection.php +++ b/upload/admin/applications/forums/modules_admin/rss/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Default section for RSS module - * Last Updated: $LastChangedDate: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + *
    * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 14th May 2003 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ */ if ( ! defined( 'IN_IPB' ) ) diff --git a/upload/admin/applications/forums/modules_admin/rss/export.php b/upload/admin/applications/forums/modules_admin/rss/export.php index 2a133ec7..e0740296 100644 --- a/upload/admin/applications/forums/modules_admin/rss/export.php +++ b/upload/admin/applications/forums/modules_admin/rss/export.php @@ -1,538 +1,531 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_forums_rss_export extends ipsCommand -{ - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - /* Load HTML and Lang */ - $this->html = $this->registry->output->loadTemplate( 'cp_skin_rss' ); - $this->registry->class_localization->loadLanguageFile( array( 'admin_rss' ) ); - - /* URLs */ - $this->form_code = $this->html->form_code = 'module=rss&section=export'; - $this->form_code_js = $this->html->form_code_js = 'module=rss§ion=export'; - - /* What to do */ - switch( $this->request['do'] ) - { - case 'rssexport_add': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'export_manage' ); - $this->rssExportForm( 'add' ); - break; - - case 'rssexport_edit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'export_manage' ); - $this->rssExportForm( 'edit' ); - break; - - case 'rssexport_add_save': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'export_manage' ); - $this->rssExportSave( 'add' ); - break; - - case 'rssexport_edit_save': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'export_manage' ); - $this->rssExportSave( 'edit' ); - break; - - case 'rssexport_recache': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'export_manage' ); - $this->rssExportRebuildCache(); - break; - - case 'rssexport_delete': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'export_delete' ); - $this->rssExportDelete(); - break; - - case 'rss_export_overview': - default: - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'export_manage' ); - $this->rssExportOverview(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Deletes an RSS Export Streawm - * - * @access public - * @return void - **/ - public function rssExportDelete() - { - /* INIT */ - $rss_export_id = intval($this->request['rss_export_id']); - - /* Load Stream Data */ - $rssstream = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rss_export', 'where' => "rss_export_id=$rss_export_id" ) ); - - if ( ! $rssstream['rss_export_id'] ) - { - $this->registry->output->global_message = $this->lang->words['ex_noload']; - $this->rssExportOverview(); - return; - } - - /* Delete the stream */ - $this->DB->delete( 'rss_export', 'rss_export_id=' . $rss_export_id ); - - /* Rebuild cache and bounce */ - $this->rssExportRebuildCache( $rss_export_id, 0 ); - $this->registry->output->global_message = $this->lang->words['ex_removed']; - $this->rssExportOverview(); - } - - /** - * Save the add/edit RSS Export Stream form - * - * @access public - * @param string $type Either add or edit - * @return void - **/ - public function rssExportSave( $type='add' ) - { - /* INIT */ - $rss_export_id = intval( $this->request['rss_export_id'] ); - $rss_export_title = IPSText::UNhtmlspecialchars( trim( $this->request['rss_export_title'] ) ); - $rss_export_desc = IPSText::UNhtmlspecialchars( trim( $this->request['rss_export_desc'] ) ); - $rss_export_image = IPSText::UNhtmlspecialchars( trim( $this->request['rss_export_image'] ) ); - $rss_export_forums = is_array( $this->request['rss_export_forums'] ) ? implode( ",", $this->request['rss_export_forums'] ) : ''; - $rss_export_include_post = intval( $this->request['rss_export_include_post'] ); - $rss_export_count = intval( $this->request['rss_export_count'] ); - $rss_export_cache_time = intval( $this->request['rss_export_cache_time'] ); - $rss_export_enabled = intval( $this->request['rss_export_enabled'] ); - $rss_export_sort = trim( $this->request['rss_export_sort'] ); - $rss_export_order = trim( $this->request['rss_export_order'] ); - - /* Check for Errors */ - if ( $type == 'edit' ) - { - if ( ! $rss_export_id ) - { - $this->registry->output->global_message = $this->lang->words['ex_noid']; - $this->rssExportOverview(); - return; - } - } - - if ( ! $rss_export_title OR ! $rss_export_count OR ! $rss_export_forums ) - { - $this->registry->output->global_message = $this->lang->words['ex_completeform']; - $this->rssExportForm( $type ); - return; - } - - /* Build Save Array */ - $array = array( - 'rss_export_enabled' => $rss_export_enabled, - 'rss_export_title' => $rss_export_title, - 'rss_export_desc' => $rss_export_desc, - 'rss_export_image' => $rss_export_image, - 'rss_export_forums' => $rss_export_forums, - 'rss_export_include_post' => $rss_export_include_post, - 'rss_export_count' => $rss_export_count, - 'rss_export_cache_time' => $rss_export_cache_time, - 'rss_export_order' => $rss_export_order, - 'rss_export_sort' => $rss_export_sort - ); - - /* Insert new record */ - if ( $type == 'add' ) - { - $this->DB->insert( 'rss_export', $array ); - $rss_export_id = 'all'; - $this->registry->output->global_message = $this->lang->words['ex_created']; - } - /* Update existing record */ - else - { - - $this->DB->update( 'rss_export', $array, 'rss_export_id='.$rss_export_id ); - $this->registry->output->global_message = $this->lang->words['ex_edited']; - } - - /* Rebuild chace and bounce */ - $this->rssExportRebuildCache( $rss_export_id, 0 ); - $this->rssExportOverview(); - } - - /** - * Form for adding/editing an RSS Export Stream - * - * @access public - * @param string $type add/edit - * @return void - **/ - public function rssExportForm( $type='add' ) - { - /* INIT */ - $rss_export_id = $this->request['rss_export_id'] ? intval( $this->request['rss_export_id'] ) : 0; - $dd_sort = array( 0 => array( 'DESC', $this->lang->words['ex_opt_desc'] ), 1 => array( 'ASC', $this->lang->words['ex_opt_asc'] ) ); - $dd_order = array( 0 => array( 'start_date' , $this->lang->words['ex_opt_start'] ), - 1 => array( 'last_post' , $this->lang->words['ex_opt_last'] ), - 2 => array( 'views' , $this->lang->words['ex_opt_views'] ), - 3 => array( 'starter_id' , $this->lang->words['ex_opt_starter'] ), - 4 => array( 'topic_rating_total', $this->lang->words['ex_opt_rating'] ) ); - - /* Check (please?) */ - if ( $type == 'add' ) - { - /* Form Bits */ - $formcode = 'rssexport_add_save'; - $title = $this->lang->words['ex_createnew']; - $button = $this->lang->words['ex_createnew']; - - /* Form Data */ - $rssstream = array( 'rss_export_id' => 0, - 'rss_export_title' => '', - 'rss_export_forums' => NULL, - 'rss_export_desc' => '', - 'rss_export_image' => '', - 'rss_export_include_post' => 1, - 'rss_export_enabled' => 1, - 'rss_export_count' => '', - 'rss_export_cache_time' => '', - 'rss_export_sort' => '', - 'rss_export_order' => '' ); - } - else - { - /* Form Data */ - $rssstream = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rss_export', 'where' => 'rss_export_id=' . $rss_export_id ) ); - - if ( ! $rssstream['rss_export_id'] ) - { - $this->registry->output->global_message = $this->lang->words['ex_noid']; - $this->rssExportOverview(); - return; - } - - /* Form bits */ - $formcode = 'rssexport_edit_save'; - $title = $this->lang->words['ex_edit'] .$rssstream['rss_export_title']; - $button = $this->lang->words['ex_save']; - } - - /* Build forum multi select list */ - require_once( IPS_ROOT_PATH . 'applications/forums/sources/classes/forums/admin_forum_functions.php' ); - $aff = new admin_forum_functions( $this->registry ); - $aff->forumsInit(); - $dropdown = $aff->adForumsForumList(1); - $rss_export_forums = ( isset( $this->request['rss_export_forums'] ) AND is_array( $this->request['rss_export_forums'] ) ) ? implode( ",", $this->request['rss_export_forums'] ) : $rssstream['rss_export_forums']; - - /* Form Elements */ - $form = array(); - - $form['rss_export_title'] = $this->registry->output->formInput( 'rss_export_title' , IPSText::htmlspecialchars( ( isset($this->request['rss_export_title']) AND $this->request['rss_export_title'] ) ? $this->request['rss_export_title'] : $rssstream['rss_export_title'] ) ); - $form['rss_export_desc'] = $this->registry->output->formInput( 'rss_export_desc' , IPSText::htmlspecialchars( ( isset($this->request['rss_export_desc']) AND $this->request['rss_export_desc'] ) ? $this->request['rss_export_desc'] : $rssstream['rss_export_desc'] ) ); - $form['rss_export_image'] = $this->registry->output->formInput( 'rss_export_image' , IPSText::htmlspecialchars( ( isset($this->request['rss_export_image']) AND $this->request['rss_export_image'] ) ? $this->request['rss_export_image'] : $rssstream['rss_export_image'] ) ); - $form['rss_export_include_post'] = $this->registry->output->formYesNo( 'rss_export_include_post' , ( isset($this->request['rss_export_include_post']) AND $this->request['rss_export_include_post'] ) ? $this->request['rss_export_include_post'] : $rssstream['rss_export_include_post'] ); - $form['rss_export_enabled'] = $this->registry->output->formYesNo( 'rss_export_enabled' , ( isset($this->request['rss_export_enabled']) AND $this->request['rss_export_enabled'] ) ? $this->request['rss_export_enabled'] : $rssstream['rss_export_enabled'] ); - $form['rss_export_count'] = $this->registry->output->formSimpleInput( 'rss_export_count' , ( isset($this->request['rss_export_count']) AND $this->request['rss_export_count'] ) ? $this->request['rss_export_count'] : $rssstream['rss_export_count'], 5 ); - $form['rss_export_forums'] = $this->registry->output->formMultiDropdown( 'rss_export_forums[]', $dropdown, explode( ",", $rss_export_forums ), 7 ); - $form['rss_export_cache_time'] = $this->registry->output->formSimpleInput( 'rss_export_cache_time' , ( isset($this->request['rss_export_cache_time']) AND $this->request['rss_export_cache_time'] ) ? $this->request['rss_export_cache_time'] : $rssstream['rss_export_cache_time'], 5 ); - $form['rss_export_sort'] = $this->registry->output->formDropdown( 'rss_export_sort' , $dd_sort , ( isset($this->request['rss_export_sort']) AND $this->request['rss_export_sort'] ) ? $this->request['rss_export_sort'] : $rssstream['rss_export_sort'] ); - $form['rss_export_order'] = $this->registry->output->formDropdown( 'rss_export_order', $dd_order, ( isset($this->request['rss_export_order']) AND $this->request['rss_export_order'] ) ? $this->request['rss_export_order'] : $rssstream['rss_export_order'] ); - - /* Output */ - $this->registry->output->html .= $this->html->rssExportForm( $form, $title, $formcode, $button, $rssstream ); - } - - /** - * Lists Current RSS Exports - * - * @access public - * @return void - **/ - public function rssExportOverview() - { - /* INIT */ - $content = ""; - $rows = array(); - $st = intval( $this->request['st'] ) > 0 ? intval( $this->request['st'] ) : 0; - - /* Count number of feed exports */ - $num = $this->DB->buildAndFetch( array( 'select' => 'count(*) as row_count', 'from' => 'rss_export' ) ); - - /* Build Pagination */ - $page_links = $this->registry->output->generatePagination( array( - 'totalItems' => $num['row_count'], - 'itemsPerPage' => 25, - 'currentStartValue' => $st, - 'baseUrl' => $this->settings['base_url'].$this->form_code, - ) ); - - /* Query Feeds */ - $this->DB->build( array( 'select' => '*', 'from' => 'rss_export', 'order' => 'rss_export_id ASC', 'limit' => array( $st, 25 ) ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - /* (Alex) Cross */ - $r['_enabled_img'] = $r['rss_export_enabled'] ? 'aff_tick.png' : 'aff_cross.png'; - - $rows[] = $r; - } - - /* Output */ - $this->registry->output->html .= $this->html->rssExportOverview( $rows, $page_links ); - } - - /** - * Rebuild Export Cache - * - * @access public - * @param mixed $rss_export_id Which export id to execute - * @param bool $return Whether to return afterwards or output to page - * @return mixed - **/ - public function rssExportRebuildCache( $rss_export_id='', $return=true ) - { - /* INIT */ - if( ! $rss_export_id ) - { - $rss_export_id = $this->request['rss_export_id'] == 'all' ? 'all' : intval( $this->request['rss_export_id'] ); - } - - /* Check ID */ - if ( ! $rss_export_id ) - { - $this->registry->output->global_message = $this->lang->words['ex_noid']; - $this->rssExportOverview(); - return; - } - - /* Get RSS Clas */ - require_once( IPS_KERNEL_PATH . 'classRss.php' ); - $class_rss = new classRss(); - $class_rss->use_sockets = $this->use_sockets; - $class_rss->doc_type = IPS_DOC_CHAR_SET; - - /* Reset rss_export cache */ - $this->cache->updateCacheWithoutSaving( 'rss_export', array() ); - - /* Go loopy */ - $this->DB->build( array( 'select' => '*', 'from' => 'rss_export' ) ); - $outer = $this->DB->execute(); - - $cache = array(); - while( $row = $this->DB->fetch( $outer ) ) - { - /* Update RSS Cache */ - if ( $row['rss_export_enabled'] ) - { - $cache[] = array( 'url' => $this->settings['board_url'] . '/index.php?act=rssout&id=' . $row['rss_export_id'], 'title' => $row['rss_export_title'] ); - } - - /* Add to cache? */ - if( $rss_export_id == 'all' OR $row['rss_export_id'] == $rss_export_id ) - { - /* Build DB Query */ - if ( $row['rss_export_include_post'] ) - { - $this->DB->build( array( - 'select' => 't.*', - 'from' => array( 'topics' => 't' ), - 'where' => "t.forum_id IN( " . $row['rss_export_forums'] . " ) AND t.state != 'link' AND t.approved=1", - 'order' => 't.' . $row['rss_export_order'] . ' ' . $row['rss_export_sort'], - 'limit' => array( 0, $row['rss_export_count'] ), - 'add_join' => array( array( - 'select' => 'p.pid, p.post, p.use_emo, p.post_htmlstate', - 'from' => array( 'posts' => 'p' ), - 'where' => 't.topic_firstpost=p.pid', - 'type' => 'left' - ) ) - ) ); - } - else - { - $this->DB->build( array( - 'select' => '*', - 'from' => 'topics', - 'where' => "forum_id IN( ".$row['rss_export_forums']." ) AND state != 'link' AND approved=1", - 'order' => $row['rss_export_order'].' '. $row['rss_export_sort'], - 'limit' => array( 0, $row['rss_export_count'] ) - ) ); - } - - /* Exec Query */ - $inner = $this->DB->execute(); - - /* Set var. Doing this so we can set pubDate to start date or last post date appropriately... */ - $channelCreated = false; - - /* Loop through topics and display */ - while( $topic = $this->DB->fetch( $inner ) ) - { - //----------------------------------------- - // Create channel if not already crated - //----------------------------------------- - - if( !$channelCreated ) - { - /* Create Channel */ - $channel_id = $class_rss->createNewChannel( array( - 'title' => $row['rss_export_title'], - 'description' => $row['rss_export_desc'], - 'link' => $this->settings['board_url'].'/index.php', - 'pubDate' => $class_rss->formatDate( $row['rss_export_order'] == 'start_date' ? $topic['start_date'] : $topic['last_post'] ), - 'ttl' => $row['rss_export_cache_time'] - ) ); - - if( $row['rss_export_image'] ) - { - $class_rss->addImageToChannel( $channel_id, array( - 'title' => $row['rss_export_title'], - 'url' => $row['rss_export_image'], - 'link'=> $this->settings['board_url'].'/index.php' - ) ); - } - - $channelCreated = true; - } - - //----------------------------------------- - // Parse the post - //----------------------------------------- - $this->settings['__noTruncateUrl'] = 1; - IPSText::getTextClass( 'bbcode' )->parse_smilies = $topic['use_emo']; - IPSText::getTextClass( 'bbcode' )->parse_html = ( $this->registry->class_forums->forum_by_id[ $topic['forum_id'] ]['use_html'] and $topic['post_htmlstate'] ) ? 1 : 0; - IPSText::getTextClass( 'bbcode' )->parse_nl2br = $topic['post_htmlstate'] == 2 ? 1 : 0; - IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; - IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics'; - $topic['post'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $topic['post'] ); - - if( $row['rss_export_include_post'] AND $topic['topic_hasattach'] ) - { - if ( ! is_object( $_attachments ) ) - { - //----------------------------------------- - // Grab render attach class - //----------------------------------------- - - require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' ); - $_attachments = new class_attach( $this->registry ); - } - - $_attachments->type = 'post'; - $_attachments->init(); - - # attach_pids is generated in the func_topic_xxxxx files - $attachHTML = $_attachments->renderAttachments( array( $topic['pid'] => $topic['post'] ), array( $topic['pid'] => $topic['pid'] ) ); - - /* Now parse back in the rendered posts */ - if( is_array($attachHTML) AND count($attachHTML) ) - { - foreach( $attachHTML as $id => $data ) - { - /* Get rid of any lingering attachment tags */ - if ( stristr( $data['html'], "[attachment=" ) ) - { - $data['html'] = IPSText::stripAttachTag( $data['html'] ); - } - - $topic['post'] = $data['html']; - $topic['post'] .= $data['attachmentHtml']; - } - } - } - - /* Parse */ - //$topic['post'] = preg_replace( "#\[attachment=(\d+?)\:(?:[^\]]+?)\]#is", "".$this->settings['board_url']."/index.php?app=forums&module=forums§ion=attach&type=post&attach_id=\\1", $topic['post'] ); - - /* Fix up relative URLs */ - $topic['post'] = preg_replace( "#([^/])style_images/(<\#IMG_DIR\#>)#is", "\\1" . $this->settings['board_url'] . "/style_images/\\2" , $topic['post'] ); - $topic['post'] = preg_replace( "#([\"'])style_emoticons/#is" , "\\1" . $this->settings['board_url'] . "/style_emoticons/", $topic['post'] ); - - $topic['post'] = $this->registry->output->replaceMacros( $topic['post'] ); - - $topic['last_poster_name'] = $topic['last_poster_name'] ? $topic['last_poster_name'] : 'Guest'; - $topic['starter_name'] = $topic['starter_name'] ? $topic['starter_name'] : 'Guest'; - - /* Add item */ - $class_rss->addItemToChannel( $channel_id, array( - 'title' => $topic['title'], - 'link' => $this->registry->output->buildSEOUrl( 'showtopic=' . $topic['tid'], 'publicNoSession', $topic['title_seo'], 'showtopic' ), - 'description' => $topic['post'], - 'pubDate' => $class_rss->formatDate( $row['rss_export_order'] == 'last_post' ? $topic['last_post'] : $topic['start_date'] ), - 'guid' => $this->registry->output->buildSEOUrl( 'showtopic=' . $topic['tid'], 'publicNoSession', $topic['title_seo'], 'showtopic' ) - ) ); - } - - /* Build document */ - $class_rss->createRssDocument(); - - /* Update the cache */ - $this->DB->update( 'rss_export', array( 'rss_export_cache_last' => time(), 'rss_export_cache_content' => $class_rss->rss_document ), 'rss_export_id='.$row['rss_export_id'] ); - } - } - - /* Update cache */ - $this->cache->setCache( 'rss_export', $cache, array( 'donow' => 1, 'array' => 1 ) ); - - $this->cache->rebuildCache( 'rss_output_cache' ); - - /* Return */ - if ( $return ) - { - $this->registry->output->global_message = $this->lang->words['ex_recached']; - $this->rssExportOverview(); - return; - } - else - { - return $class_rss->rss_document; - } - } - - /** - * Gateway to rebuild RSS export cache - * - * @access public - * @return string RSS document - */ - public function doRssRebuildCache() - { - return $this->rssExportRebuildCache( 'all', false ); - } + + * Invision Power Services + * IP.Board v3.1.4 + * Forum RSS Export + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 7003 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_forums_rss_export extends ipsCommand +{ + /** + * Skin object + * + * @var object Skin templates + */ + private $html; + + /** + * Main class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load HTML and Lang */ + $this->html = $this->registry->output->loadTemplate( 'cp_skin_rss' ); + $this->registry->class_localization->loadLanguageFile( array( 'admin_rss' ) ); + + /* URLs */ + $this->form_code = $this->html->form_code = 'module=rss&section=export'; + $this->form_code_js = $this->html->form_code_js = 'module=rss§ion=export'; + + /* What to do */ + switch( $this->request['do'] ) + { + case 'rssexport_add': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'export_manage' ); + $this->rssExportForm( 'add' ); + break; + + case 'rssexport_edit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'export_manage' ); + $this->rssExportForm( 'edit' ); + break; + + case 'rssexport_add_save': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'export_manage' ); + $this->rssExportSave( 'add' ); + break; + + case 'rssexport_edit_save': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'export_manage' ); + $this->rssExportSave( 'edit' ); + break; + + case 'rssexport_recache': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'export_manage' ); + $this->rssExportRebuildCache(); + break; + + case 'rssexport_delete': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'export_delete' ); + $this->rssExportDelete(); + break; + + case 'rss_export_overview': + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'export_manage' ); + $this->rssExportOverview(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Deletes an RSS Export Streawm + * + * @return void + */ + public function rssExportDelete() + { + /* INIT */ + $rss_export_id = intval($this->request['rss_export_id']); + + /* Load Stream Data */ + $rssstream = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rss_export', 'where' => "rss_export_id=$rss_export_id" ) ); + + if ( ! $rssstream['rss_export_id'] ) + { + $this->registry->output->global_message = $this->lang->words['ex_noload']; + $this->rssExportOverview(); + return; + } + + /* Delete the stream */ + $this->DB->delete( 'rss_export', 'rss_export_id=' . $rss_export_id ); + + /* Rebuild cache and bounce */ + $this->rssExportRebuildCache( $rss_export_id, 0 ); + $this->registry->output->global_message = $this->lang->words['ex_removed']; + $this->rssExportOverview(); + } + + /** + * Save the add/edit RSS Export Stream form + * + * @param string $type Either add or edit + * @return void + */ + public function rssExportSave( $type='add' ) + { + /* INIT */ + $rss_export_id = intval( $this->request['rss_export_id'] ); + $rss_export_title = IPSText::UNhtmlspecialchars( trim( $this->request['rss_export_title'] ) ); + $rss_export_desc = IPSText::UNhtmlspecialchars( trim( $this->request['rss_export_desc'] ) ); + $rss_export_image = IPSText::UNhtmlspecialchars( trim( $this->request['rss_export_image'] ) ); + $rss_export_forums = is_array( $this->request['rss_export_forums'] ) ? implode( ",", $this->request['rss_export_forums'] ) : ''; + $rss_export_include_post = intval( $this->request['rss_export_include_post'] ); + $rss_export_count = intval( $this->request['rss_export_count'] ); + $rss_export_cache_time = intval( $this->request['rss_export_cache_time'] ); + $rss_export_enabled = intval( $this->request['rss_export_enabled'] ); + $rss_export_sort = trim( $this->request['rss_export_sort'] ); + $rss_export_order = trim( $this->request['rss_export_order'] ); + + /* Check for Errors */ + if ( $type == 'edit' ) + { + if ( ! $rss_export_id ) + { + $this->registry->output->global_message = $this->lang->words['ex_noid']; + $this->rssExportOverview(); + return; + } + } + + if ( ! $rss_export_title OR ! $rss_export_count OR ! $rss_export_forums ) + { + $this->registry->output->global_message = $this->lang->words['ex_completeform']; + $this->rssExportForm( $type ); + return; + } + + /* Build Save Array */ + $array = array( + 'rss_export_enabled' => $rss_export_enabled, + 'rss_export_title' => $rss_export_title, + 'rss_export_desc' => $rss_export_desc, + 'rss_export_image' => $rss_export_image, + 'rss_export_forums' => $rss_export_forums, + 'rss_export_include_post' => $rss_export_include_post, + 'rss_export_count' => $rss_export_count, + 'rss_export_cache_time' => $rss_export_cache_time, + 'rss_export_order' => $rss_export_order, + 'rss_export_sort' => $rss_export_sort + ); + + /* Insert new record */ + if ( $type == 'add' ) + { + $this->DB->insert( 'rss_export', $array ); + $rss_export_id = 'all'; + $this->registry->output->global_message = $this->lang->words['ex_created']; + } + /* Update existing record */ + else + { + + $this->DB->update( 'rss_export', $array, 'rss_export_id='.$rss_export_id ); + $this->registry->output->global_message = $this->lang->words['ex_edited']; + } + + /* Rebuild chace and bounce */ + $this->rssExportRebuildCache( $rss_export_id, 0 ); + $this->rssExportOverview(); + } + + /** + * Form for adding/editing an RSS Export Stream + * + * @param string $type add/edit + * @return void + */ + public function rssExportForm( $type='add' ) + { + /* INIT */ + $rss_export_id = $this->request['rss_export_id'] ? intval( $this->request['rss_export_id'] ) : 0; + $dd_sort = array( 0 => array( 'DESC', $this->lang->words['ex_opt_desc'] ), 1 => array( 'ASC', $this->lang->words['ex_opt_asc'] ) ); + $dd_order = array( 0 => array( 'start_date' , $this->lang->words['ex_opt_start'] ), + 1 => array( 'last_post' , $this->lang->words['ex_opt_last'] ), + 2 => array( 'views' , $this->lang->words['ex_opt_views'] ), + 3 => array( 'starter_id' , $this->lang->words['ex_opt_starter'] ), + 4 => array( 'topic_rating_total', $this->lang->words['ex_opt_rating'] ) ); + + /* Check (please?) */ + if ( $type == 'add' ) + { + /* Form Bits */ + $formcode = 'rssexport_add_save'; + $title = $this->lang->words['ex_createnew']; + $button = $this->lang->words['ex_createnew']; + + /* Form Data */ + $rssstream = array( 'rss_export_id' => 0, + 'rss_export_title' => '', + 'rss_export_forums' => NULL, + 'rss_export_desc' => '', + 'rss_export_image' => '', + 'rss_export_include_post' => 1, + 'rss_export_enabled' => 1, + 'rss_export_count' => '', + 'rss_export_cache_time' => '', + 'rss_export_sort' => '', + 'rss_export_order' => '' ); + } + else + { + /* Form Data */ + $rssstream = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rss_export', 'where' => 'rss_export_id=' . $rss_export_id ) ); + + if ( ! $rssstream['rss_export_id'] ) + { + $this->registry->output->global_message = $this->lang->words['ex_noid']; + $this->rssExportOverview(); + return; + } + + /* Form bits */ + $formcode = 'rssexport_edit_save'; + $title = $this->lang->words['ex_edit'] .$rssstream['rss_export_title']; + $button = $this->lang->words['ex_save']; + } + + /* Build forum multi select list */ + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/admin_forum_functions.php", 'admin_forum_functions', 'forums' ); + $aff = new $classToLoad( $this->registry ); + $aff->forumsInit(); + $dropdown = $aff->adForumsForumList(1); + $rss_export_forums = ( isset( $this->request['rss_export_forums'] ) AND is_array( $this->request['rss_export_forums'] ) ) ? implode( ",", $this->request['rss_export_forums'] ) : $rssstream['rss_export_forums']; + + /* Form Elements */ + $form = array(); + + $form['rss_export_title'] = $this->registry->output->formInput( 'rss_export_title' , IPSText::htmlspecialchars( ( isset($this->request['rss_export_title']) AND $this->request['rss_export_title'] ) ? $this->request['rss_export_title'] : $rssstream['rss_export_title'] ) ); + $form['rss_export_desc'] = $this->registry->output->formInput( 'rss_export_desc' , IPSText::htmlspecialchars( ( isset($this->request['rss_export_desc']) AND $this->request['rss_export_desc'] ) ? $this->request['rss_export_desc'] : $rssstream['rss_export_desc'] ) ); + $form['rss_export_image'] = $this->registry->output->formInput( 'rss_export_image' , IPSText::htmlspecialchars( ( isset($this->request['rss_export_image']) AND $this->request['rss_export_image'] ) ? $this->request['rss_export_image'] : $rssstream['rss_export_image'] ) ); + $form['rss_export_include_post'] = $this->registry->output->formYesNo( 'rss_export_include_post' , ( isset($this->request['rss_export_include_post']) AND $this->request['rss_export_include_post'] ) ? $this->request['rss_export_include_post'] : $rssstream['rss_export_include_post'] ); + $form['rss_export_enabled'] = $this->registry->output->formYesNo( 'rss_export_enabled' , ( isset($this->request['rss_export_enabled']) AND $this->request['rss_export_enabled'] ) ? $this->request['rss_export_enabled'] : $rssstream['rss_export_enabled'] ); + $form['rss_export_count'] = $this->registry->output->formSimpleInput( 'rss_export_count' , ( isset($this->request['rss_export_count']) AND $this->request['rss_export_count'] ) ? $this->request['rss_export_count'] : $rssstream['rss_export_count'], 5 ); + $form['rss_export_forums'] = $this->registry->output->formMultiDropdown( 'rss_export_forums[]', $dropdown, explode( ",", $rss_export_forums ), 7 ); + $form['rss_export_cache_time'] = $this->registry->output->formSimpleInput( 'rss_export_cache_time' , ( isset($this->request['rss_export_cache_time']) AND $this->request['rss_export_cache_time'] ) ? $this->request['rss_export_cache_time'] : $rssstream['rss_export_cache_time'], 5 ); + $form['rss_export_sort'] = $this->registry->output->formDropdown( 'rss_export_sort' , $dd_sort , ( isset($this->request['rss_export_sort']) AND $this->request['rss_export_sort'] ) ? $this->request['rss_export_sort'] : $rssstream['rss_export_sort'] ); + $form['rss_export_order'] = $this->registry->output->formDropdown( 'rss_export_order', $dd_order, ( isset($this->request['rss_export_order']) AND $this->request['rss_export_order'] ) ? $this->request['rss_export_order'] : $rssstream['rss_export_order'] ); + + /* Output */ + $this->registry->output->html .= $this->html->rssExportForm( $form, $title, $formcode, $button, $rssstream ); + } + + /** + * Lists Current RSS Exports + * + * @return void + */ + public function rssExportOverview() + { + /* INIT */ + $content = ""; + $rows = array(); + $st = intval( $this->request['st'] ) > 0 ? intval( $this->request['st'] ) : 0; + + /* Count number of feed exports */ + $num = $this->DB->buildAndFetch( array( 'select' => 'count(*) as row_count', 'from' => 'rss_export' ) ); + + /* Build Pagination */ + $page_links = $this->registry->output->generatePagination( array( + 'totalItems' => $num['row_count'], + 'itemsPerPage' => 25, + 'currentStartValue' => $st, + 'baseUrl' => $this->settings['base_url'].$this->form_code, + ) ); + + /* Query Feeds */ + $this->DB->build( array( 'select' => '*', 'from' => 'rss_export', 'order' => 'rss_export_id ASC', 'limit' => array( $st, 25 ) ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + /* (Alex) Cross */ + $r['_enabled_img'] = $r['rss_export_enabled'] ? 'aff_tick.png' : 'aff_cross.png'; + + $rows[] = $r; + } + + /* Output */ + $this->registry->output->html .= $this->html->rssExportOverview( $rows, $page_links ); + } + + /** + * Rebuild Export Cache + * + * @param mixed $rss_export_id Which export id to execute + * @param bool $return Whether to return afterwards or output to page + * @return mixed + */ + public function rssExportRebuildCache( $rss_export_id='', $return=true ) + { + /* INIT */ + if( ! $rss_export_id ) + { + $rss_export_id = $this->request['rss_export_id'] == 'all' ? 'all' : intval( $this->request['rss_export_id'] ); + } + + /* Load topics lang file (for attachment stuff) */ + $this->registry->class_localization->loadLanguageFile( array( 'public_topic' ), 'forums' ); + + /* Check ID */ + if ( ! $rss_export_id ) + { + $this->registry->output->global_message = $this->lang->words['ex_noid']; + $this->rssExportOverview(); + return; + } + + /* Get RSS Clas */ + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classRss.php', 'classRss' ); + $class_rss = new $classToLoad(); + $class_rss->use_sockets = $this->use_sockets; + $class_rss->doc_type = IPS_DOC_CHAR_SET; + + /* Reset rss_export cache */ + $this->cache->updateCacheWithoutSaving( 'rss_export', array() ); + + /* Go loopy */ + $this->DB->build( array( 'select' => '*', 'from' => 'rss_export' ) ); + $outer = $this->DB->execute(); + + $cache = array(); + while( $row = $this->DB->fetch( $outer ) ) + { + /* Update RSS Cache */ + if ( $row['rss_export_enabled'] ) + { + $cache[] = array( 'url' => $this->settings['board_url'] . '/index.php?act=rssout&id=' . $row['rss_export_id'], 'title' => $row['rss_export_title'] ); + } + + /* Add to cache? */ + if( $rss_export_id == 'all' OR $row['rss_export_id'] == $rss_export_id ) + { + /* Build DB Query */ + if ( $row['rss_export_include_post'] ) + { + $this->DB->build( array( + 'select' => 't.*', + 'from' => array( 'topics' => 't' ), + 'where' => "t.forum_id IN( " . $row['rss_export_forums'] . " ) AND t.state != 'link' AND t.approved=1", + 'order' => 't.' . $row['rss_export_order'] . ' ' . $row['rss_export_sort'], + 'limit' => array( 0, $row['rss_export_count'] ), + 'add_join' => array( array( + 'select' => 'p.pid, p.post, p.use_emo, p.post_htmlstate', + 'from' => array( 'posts' => 'p' ), + 'where' => 't.topic_firstpost=p.pid', + 'type' => 'left' + ) ) + ) ); + } + else + { + $this->DB->build( array( + 'select' => '*', + 'from' => 'topics', + 'where' => "forum_id IN( ".$row['rss_export_forums']." ) AND state != 'link' AND approved=1", + 'order' => $row['rss_export_order'].' '. $row['rss_export_sort'], + 'limit' => array( 0, $row['rss_export_count'] ) + ) ); + } + + /* Exec Query */ + $inner = $this->DB->execute(); + + /* Set var. Doing this so we can set pubDate to start date or last post date appropriately... */ + $channelCreated = false; + + /* Loop through topics and display */ + while( $topic = $this->DB->fetch( $inner ) ) + { + //----------------------------------------- + // Create channel if not already crated + //----------------------------------------- + + if( !$channelCreated ) + { + /* Create Channel */ + $channel_id = $class_rss->createNewChannel( array( + 'title' => $row['rss_export_title'], + 'description' => $row['rss_export_desc'], + 'link' => $this->settings['board_url'].'/index.php', + 'pubDate' => $class_rss->formatDate( $row['rss_export_order'] == 'start_date' ? $topic['start_date'] : $topic['last_post'] ), + 'ttl' => $row['rss_export_cache_time'] + ) ); + + if( $row['rss_export_image'] ) + { + $class_rss->addImageToChannel( $channel_id, array( + 'title' => $row['rss_export_title'], + 'url' => $row['rss_export_image'], + 'link'=> $this->settings['board_url'].'/index.php' + ) ); + } + + $channelCreated = true; + } + + //----------------------------------------- + // Parse the post + //----------------------------------------- + $this->settings['__noTruncateUrl'] = 1; + IPSText::getTextClass( 'bbcode' )->parse_smilies = $topic['use_emo']; + IPSText::getTextClass( 'bbcode' )->parse_html = ( $this->registry->class_forums->forum_by_id[ $topic['forum_id'] ]['use_html'] and $topic['post_htmlstate'] ) ? 1 : 0; + IPSText::getTextClass( 'bbcode' )->parse_nl2br = $topic['post_htmlstate'] == 2 ? 1 : 0; + IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; + IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics'; + $topic['post'] = IPSText::getTextClass('bbcode')->preDisplayParse( $topic['post'] ); + + if( $row['rss_export_include_post'] AND $topic['topic_hasattach'] ) + { + if ( ! is_object( $_attachments ) ) + { + /* Grab render attach class */ + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $_attachments = new $classToLoad( $this->registry ); + } + + $_attachments->type = 'post'; + $_attachments->init(); + + # attach_pids is generated in the func_topic_xxxxx files + $attachHTML = $_attachments->renderAttachments( array( $topic['pid'] => $topic['post'] ), array( $topic['pid'] => $topic['pid'] ) ); + + /* Now parse back in the rendered posts */ + if( is_array($attachHTML) AND count($attachHTML) ) + { + foreach( $attachHTML as $id => $data ) + { + /* Get rid of any lingering attachment tags */ + if ( stristr( $data['html'], "[attachment=" ) ) + { + $data['html'] = IPSText::stripAttachTag( $data['html'] ); + } + + $topic['post'] = $data['html']; + $topic['post'] .= $data['attachmentHtml']; + } + } + } + + /* Parse */ + //$topic['post'] = preg_replace( "#\[attachment=(\d+?)\:(?:[^\]]+?)\]#is", "".$this->settings['board_url']."/index.php?app=forums&module=forums§ion=attach&type=post&attach_id=\\1", $topic['post'] ); + + /* Fix up relative URLs */ + $topic['post'] = preg_replace( "#([^/])style_images/(<\#IMG_DIR\#>)#is", "\\1" . $this->settings['board_url'] . "/style_images/\\2" , $topic['post'] ); + $topic['post'] = preg_replace( "#([\"'])style_emoticons/#is" , "\\1" . $this->settings['board_url'] . "/style_emoticons/", $topic['post'] ); + + $topic['post'] = $this->registry->output->replaceMacros( $topic['post'] ); + + $topic['last_poster_name'] = $topic['last_poster_name'] ? $topic['last_poster_name'] : 'Guest'; + $topic['starter_name'] = $topic['starter_name'] ? $topic['starter_name'] : 'Guest'; + + /* Add item */ + $class_rss->addItemToChannel( $channel_id, array( 'title' => $topic['title'], + 'link' => $this->registry->output->buildSEOUrl( 'showtopic=' . $topic['tid'], 'publicNoSession', $topic['title_seo'], 'showtopic' ), + 'description' => $topic['post'], + 'pubDate' => $class_rss->formatDate( $row['rss_export_order'] == 'last_post' ? $topic['last_post'] : $topic['start_date'] ), + 'guid' => $this->registry->output->buildSEOUrl( 'showtopic=' . $topic['tid'], 'publicNoSession', $topic['title_seo'], 'showtopic' ) + ) ); + } + + /* Build document */ + $class_rss->createRssDocument(); + + /* Update the cache */ + $this->DB->update( 'rss_export', array( 'rss_export_cache_last' => time(), 'rss_export_cache_content' => $class_rss->rss_document ), 'rss_export_id='.$row['rss_export_id'] ); + } + } + + /* Update cache */ + $this->cache->setCache( 'rss_export', $cache, array( 'donow' => 1, 'array' => 1 ) ); + + $this->cache->rebuildCache( 'rss_output_cache' ); + + /* Return */ + if ( $return ) + { + $this->registry->output->global_message = $this->lang->words['ex_recached']; + $this->rssExportOverview(); + return; + } + else + { + return $class_rss->rss_document; + } + } + + /** + * Gateway to rebuild RSS export cache + * + * @return string RSS document + */ + public function doRssRebuildCache() + { + return $this->rssExportRebuildCache( 'all', false ); + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/rss/import.php b/upload/admin/applications/forums/modules_admin/rss/import.php index 859d90c4..7839f37a 100644 --- a/upload/admin/applications/forums/modules_admin/rss/import.php +++ b/upload/admin/applications/forums/modules_admin/rss/import.php @@ -1,1451 +1,1435 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_forums_rss_import extends ipsCommand -{ - /** - * Use sockets - * - * @access private - * @var bool - */ - private $use_sockets = 1; - - /** - * Classes yet loaded? - * - * @access private - * @var bool - */ - private $classes_loaded = false; - - /** - * Items imported so far - * - * @access private - * @var integer - */ - private $import_count = 0; - - /** - * Validation message(s) - * - * @access private - * @var array - */ - private $validate_msg = array(); - - /**#@+ - * URL bits - * - * @access public - * @var string - */ - public $form_code = ''; - public $form_code_js = ''; - /**#@-*/ - - /** - * Mod Library, for recounting stats and deleting topics - * - * @access private - * @var object - */ - private $func_mod; - - /** - * RSS Parser Class - * - * @access private - * @var object - */ - private $class_rss; - - /** - * Skin object - * - * @access private - * @var object - */ - private $html; - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - /* Load HTML and Lang */ - $this->html = $this->registry->output->loadTemplate( 'cp_skin_rss' ); - $this->registry->class_localization->loadLanguageFile( array( 'admin_rss' ) ); - - /* Load Mod Class */ - require_once( IPSLib::getAppDir('forums') .'/sources/classes/moderate.php' ); - $this->func_mod = new moderatorLibrary( $registry ); - - /* URLs */ - $this->form_code = $this->html->form_code = 'module=rss&section=import'; - $this->form_code_js = $this->html->form_code_js = 'module=rss§ion=import'; - - /* What to do */ - switch( $this->request['do'] ) - { - case 'rssimport_overview': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_manage' ); - $this->rssImportOverview(); - break; - - case 'rssimport_validate': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_manage' ); - $this->rssImportValidate( 1 ); - break; - - case 'rssimport_add': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_manage' ); - $this->rssImportForm( 'add' ); - break; - - case 'rssimport_edit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_manage' ); - $this->rssImportForm( 'edit' ); - break; - - case 'rssimport_add_save': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_manage' ); - $this->rssImportSave( 'add' ); - break; - - case 'rssimport_edit_save': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_manage' ); - $this->rssImportSave( 'edit' ); - break; - - case 'rssimport_recache': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_manage' ); - $this->rssImportRebuildCache(0); - break; - - case 'rssimport_remove': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_remove' ); - $this->rssImportRemoveDialogue(); - break; - - case 'rssimport_remove_complete': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_remove' ); - $this->rssimportRemoveComplete( 1 ); - break; - - case 'rssimport_delete': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_delete' ); - $this->rssImportDelete(); - break; - - default: - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_manage' ); - $this->rssImportOverview(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Delete an RSS Import Stream - * - * @access public - * @return void - **/ - public function rssImportDelete() - { - /* INIT */ - $rss_import_id = intval( $this->request['rss_import_id'] ); - - /* Load RSS Stream */ - $rssstream = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rss_import', 'where' => "rss_import_id={$rss_import_id}" ) ); - - if ( ! $rssstream['rss_import_id'] ) - { - $this->registry->output->global_message = $this->lang->words['im_noload']; - $this->rssImportOverview(); - return; - } - - /* Delete the stream */ - $this->DB->delete( 'rss_import', 'rss_import_id=' . $rss_import_id ); - - $this->registry->output->global_message = $this->lang->words['im_removed']; - $this->rssImportOverview(); - } - - /** - * Removes imported articles - * - * @access public - * @param bool $return Whether to return or not - * @param integer $rss_import_id RSS import id to remove - * @return mixed - **/ - public function rssimportRemoveComplete( $return=0, $rss_import_id=0 ) - { - /* INIT */ - $rss_import_id = $rss_import_id ? $rss_import_id : intval( $this->request['rss_import_id'] ); - $remove_count = intval( $this->request['remove_count'] ) ? intval( $this->request['remove_count'] ) : 500; - $remove_tids = array(); - - /* Query the RSS Streams */ - $rssstream = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rss_import', 'where' => "rss_import_id={$rss_import_id}" ) ); - - if ( ! $rssstream['rss_import_id'] ) - { - $this->registry->output->global_message = $this->lang->words['im_noload']; - $this->rssImportOverview(); - return; - } - - /* Get tids */ - $this->DB->build( array( - 'select' => 'rss_imported_tid', - 'from' => 'rss_imported', - 'where' => 'rss_imported_impid=' . $rss_import_id, - 'order' => 'rss_imported_tid DESC', - 'limit' => array( 0, $remove_count ) - ) ); - $this->DB->execute(); - - while( $tee = $this->DB->fetch() ) - { - $remove_tids[ $tee['rss_imported_tid'] ] = $tee['rss_imported_tid']; - } - - /* Check */ - if ( ! count( $remove_tids ) ) - { - if ( $return ) - { - $this->registry->output->global_message = $this->lang->words['im_findtopics']; - $this->rssImportOverview(); - return; - } - else - { - return; - } - } - - /* Delete the topics */ - $this->func_mod->forum['id'] = $rssstream['rss_import_forum_id']; - $this->func_mod->topicDelete( $remove_tids ); - - /* Remove from the imported list */ - $this->DB->delete( 'rss_imported', 'rss_imported_tid IN(' . implode( ',', $remove_tids ) . ')' ); - - $this->registry->output->global_message = intval( count( $remove_tids ) ) . $this->lang->words['im_topicsremoved']; - $this->rssImportOverview(); - } - - /** - * Splash screen for removing imported articles - * - * @access public - * @return void - **/ - public function rssImportRemoveDialogue() - { - /* Check ID */ - $rss_import_id = intval( $this->request['rss_import_id'] ); - - if ( ! $rss_import_id ) - { - $this->registry->output->global_message = $this->lang->words['im_noid']; - $this->rssImportOverview(); - return; - } - - /* Load RSS Stream */ - $rssstream = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rss_import', 'where' => "rss_import_id=$rss_import_id" ) ); - - if( ! $rssstream['rss_import_id'] ) - { - $this->registry->output->global_message = $this->lang->words['im_noload']; - $this->rssImportOverview(); - return; - } - - /* Count the number of imported topics */ - $article_count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as cnt', 'from' => 'rss_imported', 'where' => 'rss_imported_impid='.$rss_import_id ) ); - - if ( $article_count['cnt'] < 1 ) - { - $this->registry->output->global_message = sprintf( $this->lang->words['im_noarticles'], $rssstream['rss_import_title'] ); - $this->rssImportOverview(); - return; - } - - /* Output */ - $this->registry->output->html .= $this->html->rssImportRemoveArticlesForm( $rssstream, intval( $article_count['cnt'] ) ); - } - - /** - * Saves the add/edit RSS Import form - * - * @access public - * @param string $type Either add or edit - * @return void - **/ - public function rssImportSave($type='add') - { - /* Validate the feed? */ - if( $this->request['rssimport_validate'] AND $this->request['rssimport_validate'] ) - { - $this->rssImportValidate(); - - if( count($this->validate_msg) ) - { - $this->registry->output->global_message = sprintf( $this->lang->words['im_valresults'], IPSText::stripslashes( trim( $this->request['rss_import_url'] ) ), implode( "
     ·", $this->validate_msg ) ); - $this->rssImportForm( $type ); - return; - } - } - - /* Get Form Data */ - $rss_import_id = intval( $this->request['rss_import_id'] ); - $rss_import_title = trim( $this->request['rss_import_title'] ); - $rss_import_url = IPSText::stripslashes( trim( $this->request['rss_import_url'] ) ); - $rss_import_mid = trim( $this->request['rss_import_mid'] ); - $rss_import_showlink = IPSText::stripslashes( trim( $this->request['rss_import_showlink'] ) ); - $rss_import_enabled = intval( $this->request['rss_import_enabled'] ); - $rss_import_forum_id = intval( $this->request['rss_import_forum_id'] ); - $rss_import_pergo = intval( $this->request['rss_import_pergo'] ); - $rss_import_time = intval( $this->request['rss_import_time'] ); - $rss_import_topic_open = intval( $this->request['rss_import_topic_open'] ); - $rss_import_topic_hide = intval( $this->request['rss_import_topic_hide'] ); - $rss_import_inc_pcount = intval( $this->request['rss_import_inc_pcount'] ); - $rss_import_topic_pre = $this->request['rss_import_topic_pre']; - $rss_import_charset = $this->request['rss_import_charset']; - $rss_import_allow_html = intval( $this->request['rss_import_allow_html'] ); - $rss_import_auth = intval( $this->request['rss_import_auth'] ); - $rss_import_auth_user = trim( $this->request['rss_import_auth_user'] ) ? trim( $this->request['rss_import_auth_user'] ) : $this->lang->words['im_notneeded']; - $rss_import_auth_pass = trim( $this->request['rss_import_auth_pass'] ) ? trim( $this->request['rss_import_auth_pass'] ) : $this->lang->words['im_notneeded']; - - $rss_error = array(); - - /* Error checking */ - if ( $type == 'edit' ) - { - if ( ! $rss_import_id ) - { - $this->registry->output->global_message = $this->lang->words['im_noid']; - $this->rssImportOverview(); - return; - } - } - - if ( ! $rss_import_title OR ! $rss_import_url OR ! $rss_import_pergo OR ! $rss_import_forum_id OR ! $rss_import_mid ) - { - $this->registry->output->global_message = $this->lang->words['im_completeform']; - $this->rssImportForm( $type ); - return; - } - - /* Load the RSS Class */ - require_once( IPS_KERNEL_PATH . 'classRss.php' ); - $this->class_rss = new classRss(); - - $this->class_rss->use_sockets = $this->use_sockets; - $this->class_rss->rss_max_show = $rss_import_pergo; - - /* Set DOC TYPE */ - $supported_encodings = array( 'utf-8', 'iso-8859-1', 'us-ascii' ); - - if( in_array( strtolower( IPS_DOC_CHAR_SET ), $supported_encodings ) ) - { - $this->class_rss->doc_type = IPS_DOC_CHAR_SET; - } - else - { - $this->class_rss->doc_type = 'UTF-8'; - } - - if( strtolower( $rss_import_charset ) != $this->class_rss->doc_type ) - { - $this->class_rss->convert_charset = 1; - $this->class_rss->feed_charset = $rss_import_charset; - $this->class_rss->destination_charset = $this->class_rss->doc_type; - } - else - { - $this->class_rss->convert_charset = 0; - } - - /* Set this import's authentication */ - $this->class_rss->auth_req = $rss_import_auth; - $this->class_rss->auth_user = $rss_import_auth_user; - $this->class_rss->auth_pass = $rss_import_auth_pass; - - /* Test URL */ - $this->class_rss->parseFeedFromUrl( $rss_import_url ); - - /* Found an error? */ - if ( is_array( $this->class_rss->errors ) and count( $this->class_rss->errors ) ) - { - $rss_error = array_merge( $rss_error, $this->class_rss->errors ); - } - - /* Found some data? */ - if ( ! is_array( $this->class_rss->rss_channels ) or ! count( $this->class_rss->rss_channels ) ) - { - $rss_error[] = sprintf( $this->lang->words['im_noopen'], $rss_import_url ); - } - - if ( is_array( $rss_error ) AND count( $rss_error ) ) - { - $this->registry->output->global_message = implode( "
    ", $rss_error ); - $this->rssImportForm( $type ); - return; - } - - /* Member data */ - $member = $this->DB->buildAndFetch( array( 'select' => 'member_id, name', 'from' => 'members', 'where' => "members_l_display_name='" . mb_strtolower( $rss_import_mid ) . "'" ) ); - - if ( !isset( $member['member_id'] ) OR !$member['member_id'] ) - { - $this->registry->output->global_message = sprintf( $this->lang->words['im_nomember'], $rss_import_mid ); - $this->rssImportForm( $type ); - return; - } - else - { - $rss_import_mid = $member['member_id']; - } - - /* Check to make sure forum ID is valid */ - $this->registry->class_forums->forumsInit(); - - if ( ! isset( $this->registry->class_forums->forum_by_id[ $rss_import_forum_id ] ) OR !$this->registry->class_forums->forum_by_id[ $rss_import_forum_id ] ) - { - $this->registry->output->global_message = $this->lang->words['im_noforum']; - $this->rssImportForm( $type ); - return; - } - - if ( $this->registry->class_forums->forum_by_id[ $rss_import_forum_id ]['sub_can_post'] != 1 OR $this->registry->class_forums->forum_by_id[ $rss_import_forum_id ]['redirect_on'] == 1 ) - { - $this->registry->output->global_message = $this->lang->words['im_noforumperm']; - $this->rssImportForm( $type ); - return; - } - - /* Build the db array */ - $array = array( - 'rss_import_title' => $rss_import_title, - 'rss_import_url' => $rss_import_url, - 'rss_import_mid' => $rss_import_mid, - 'rss_import_showlink' => $rss_import_showlink, - 'rss_import_enabled' => $rss_import_enabled, - 'rss_import_forum_id' => $rss_import_forum_id, - 'rss_import_pergo' => $rss_import_pergo, - 'rss_import_time' => $rss_import_time < 30 ? 30 : $rss_import_time, - 'rss_import_topic_open' => $rss_import_topic_open, - 'rss_import_topic_hide' => $rss_import_topic_hide, - 'rss_import_inc_pcount' => $rss_import_inc_pcount, - 'rss_import_topic_pre' => $rss_import_topic_pre, - 'rss_import_charset' => $rss_import_charset, - 'rss_import_allow_html' => $rss_import_allow_html, - 'rss_import_auth' => $rss_import_auth, - 'rss_import_auth_user' => $rss_import_auth_user, - 'rss_import_auth_pass' => $rss_import_auth_pass, - ); - - /* Add to database */ - if ( $type == 'add' ) - { - $this->DB->insert( 'rss_import', $array ); - $this->registry->output->global_message = $this->lang->words['im_created']; - $rss_import_id = $this->DB->getInsertId(); - } - /* Update the database */ - else - { - $this->DB->update( 'rss_import', $array, 'rss_import_id='.$rss_import_id ); - $this->registry->output->global_message = $this->lang->words['im_edited']; - } - - /* Build the cache */ - if( $rss_import_enabled ) - { - $this->rssImportRebuildCache( $rss_import_id, 0 ); - } - - /* Bounce */ - $this->rssImportOverview(); - } - - /** - * Form for adding/editing RSS Imports - * - * @access public - * @param string $type Either add or edit - * @return void - **/ - public function rssImportForm( $type='add' ) - { - /* INIT */ - $rss_import_id = $this->request['rss_import_id'] ? intval( $this->request['rss_import_id'] ) : 0; - - /* Build form drop downs */ - $this->registry->class_forums->forumsInit(); - - require_once( IPS_ROOT_PATH . 'applications/forums/sources/classes/forums/admin_forum_functions.php' ); - $aff = new admin_forum_functions( $this->registry ); - $aff->forumsInit(); - $forum_dropdown = $aff->adForumsForumList( 1 ); - - /* Add new import */ - if ( $type == 'add' ) - { - /* Form Bits */ - $formcode = 'rssimport_add_save'; - $title = $this->lang->words['im_createnew']; - $button = $this->lang->words['im_createnew']; - - /* Form Data */ - $rssstream = array( 'rss_import_topic_open' => 1, - 'rss_import_enabled' => 1, - 'rss_import_showlink' => $this->lang->words['im_full'], - 'rss_import_title' => '', - 'rss_import_url' => '', - 'rss_import_forum_id' => 0, - 'rss_import_mid' => '', - 'rss_import_pergo' => 10, - 'rss_import_time' => '200', - 'rss_import_topic_hide' => 0, - 'rss_import_inc_pcount' => 1, - 'rss_import_topic_pre' => '', - 'rss_import_charset' => '', - 'rss_import_allow_html' => 0, - 'rss_import_auth' => NULL, - 'rss_import_auth_user' => NULL, - 'rss_import_auth_pass' => NULL, - 'rss_import_id' => 0 ); - } - /* Edit Form */ - else - { - /* Form Data */ - $rssstream = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rss_import', 'where' => 'rss_import_id='.$rss_import_id ) ); - - /* Make sure it's valid */ - if ( ! $rssstream['rss_import_id'] ) - { - $this->registry->output->global_message = $this->lang->words['im_noid']; - $this->rssImportOverview(); - return; - } - - /* Get the member name */ - $member = $this->DB->buildAndFetch( array( 'select' => 'member_id, members_display_name', 'from' => 'members', 'where' => "member_id=" . intval( $rssstream['rss_import_mid'] ) ) ); - - if ( $member['member_id'] ) - { - $rssstream['rss_import_mid'] = $member['members_display_name']; - } - - /* Form Bits */ - $formcode = 'rssimport_edit_save'; - $title = $this->lang->words['im_edit'] . $rssstream['rss_import_title']; - $button = $this->lang->words['im_save']; - } - - /* Form Elements */ - $form = array(); - - $form['rss_import_title'] = $this->registry->output->formInput( 'rss_import_title' , ( isset($this->request['rss_import_title']) AND $this->request['rss_import_title'] ) ? stripslashes($this->request['rss_import_title']) : $rssstream['rss_import_title'] ); - $form['rss_import_enabled'] = $this->registry->output->formYesNo( 'rss_import_enabled' , ( isset($this->request['rss_import_enabled']) AND $this->request['rss_import_enabled'] ) ? $this->request['rss_import_enabled'] : $rssstream['rss_import_enabled'] ); - $form['rss_import_url'] = $this->registry->output->formInput( 'rss_import_url' , ( isset($this->request['rss_import_url']) AND $this->request['rss_import_url'] ) ? $this->request['rss_import_url'] : $rssstream['rss_import_url'] ); - $form['rss_import_forum_id'] = $this->registry->output->formDropdown( 'rss_import_forum_id' , $forum_dropdown, ( isset($this->request['rss_import_forum_id']) AND $this->request['rss_import_forum_id'] ) ? $this->request['rss_import_forum_id'] : $rssstream['rss_import_forum_id'] ); - $form['rss_import_mid'] = $this->registry->output->formInput( 'rss_import_mid' , ( isset($this->request['rss_import_mid']) AND $this->request['rss_import_mid'] ) ? $this->request['rss_import_mid'] : $rssstream['rss_import_mid'] ); - $form['rss_import_pergo'] = $this->registry->output->formSimpleInput( 'rss_import_pergo' , ( isset($this->request['rss_import_pergo']) AND $this->request['rss_import_pergo'] ) ? $this->request['rss_import_pergo'] : $rssstream['rss_import_pergo'], 5 ); - $form['rss_import_time'] = $this->registry->output->formSimpleInput( 'rss_import_time' , ( isset($this->request['rss_import_time']) AND $this->request['rss_import_time'] ) ? $this->request['rss_import_time'] : $rssstream['rss_import_time'], 5 ); - $form['rss_import_showlink'] = $this->registry->output->formInput( 'rss_import_showlink' , ( isset($this->request['rss_import_showlink']) AND $this->request['rss_import_showlink'] ) ? htmlspecialchars($this->request['rss_import_showlink']) : htmlspecialchars($rssstream['rss_import_showlink']) ); - $form['rss_import_topic_open'] = $this->registry->output->formYesNo( 'rss_import_topic_open' , ( isset($this->request['rss_import_topic_open']) AND $this->request['rss_import_topic_open'] ) ? $this->request['rss_import_topic_open'] : $rssstream['rss_import_topic_open'] ); - $form['rss_import_topic_hide'] = $this->registry->output->formYesNo( 'rss_import_topic_hide' , ( isset($this->request['rss_import_topic_hide']) AND $this->request['rss_import_topic_hide'] ) ? $this->request['rss_import_topic_hide'] : $rssstream['rss_import_topic_hide'] ); - $form['rss_import_inc_pcount'] = $this->registry->output->formYesNo( 'rss_import_inc_pcount' , ( isset($this->request['rss_import_inc_pcount']) AND $this->request['rss_import_inc_pcount'] ) ? $this->request['rss_import_inc_pcount'] : $rssstream['rss_import_inc_pcount'] ); - $form['rss_import_topic_pre'] = $this->registry->output->formInput( 'rss_import_topic_pre' , ( isset($this->request['rss_import_topic_pre']) AND $this->request['rss_import_topic_pre'] ) ? $this->request['rss_import_topic_pre'] : $rssstream['rss_import_topic_pre'] ); - $form['rss_import_charset'] = $this->registry->output->formInput( 'rss_import_charset' , ( isset($this->request['rss_import_charset']) AND $this->request['rss_import_charset'] ) ? $this->request['rss_import_charset'] : $rssstream['rss_import_charset'] ); - $form['rss_import_allow_html'] = $this->registry->output->formYesNo( 'rss_import_allow_html' , ( isset($this->request['rss_import_allow_html']) AND $this->request['rss_import_allow_html'] ) ? $this->request['rss_import_allow_html'] : $rssstream['rss_import_allow_html'] ); - $form['rss_import_auth'] = $this->registry->output->formCheckbox( 'rss_import_auth' , - ( isset($this->request['rss_import_auth']) AND $this->request['rss_import_auth'] ) ? $this->request['rss_import_auth'] : $rssstream['rss_import_auth'], - '1', - "rss_import_auth", - 'onclick="ACPRss.showAuthBoxes()"' - ); - - $auth_checked = ( isset( $this->request['rss_import_auth'] ) AND $this->request['rss_import_auth'] ) ? $this->request['rss_import_auth'] : $rssstream['rss_import_auth']; - if( !$auth_checked ) - { - $form['rss_div_show'] = "style='display:none;'"; - } - else - { - $form['rss_div_show'] = "style='display:;'"; - } - - $form['rss_import_auth_user'] = $this->registry->output->formInput( 'rss_import_auth_user', ( isset( $this->request['rss_import_auth_user'] ) AND $this->request['rss_import_auth_user'] ) ? $this->request['rss_import_auth_user'] : $rssstream['rss_import_auth_user'] ); - $form['rss_import_auth_pass'] = $this->registry->output->formInput( 'rss_import_auth_pass', ( isset( $this->request['rss_import_auth_pass'] ) AND $this->request['rss_import_auth_pass'] ) ? $this->request['rss_import_auth_pass'] : $rssstream['rss_import_auth_pass'] ); - - /* Output */ - $this->registry->output->html .= $this->html->rssImportForm( $form, $title, $formcode, $button, $rssstream ); - } - - /** - * Builds a list of current RSS Imports - * - * @access public - * @return void - **/ - public function rssImportOverview() - { - /* INIT */ - $rows = array(); - $st = intval( $this->request['st'] ) > 0 ? intval( $this->request['st'] ) : 0; - - /* Count the number of feeds we ahve */ - $num = $this->DB->buildAndFetch( array( 'select' => 'count(*) as row_count', 'from' => 'rss_import' ) ); - - /* Generate Pagination */ - $page_links = $this->registry->output->generatePagination( array( - 'totalItems' => $num['row_count'], - 'itemsPerPage' => 25, - 'currentStartValue' => $st, - 'baseUrl' => "{$this->settings['base_url']}{$this->form_code}", - ) ); - - /* Query the current feeds */ - $this->DB->build( array( 'select' => '*', 'from' => 'rss_import', 'order' => 'rss_import_id ASC', 'limit' => array( $st, 25 ) ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $r['_enabled_img'] = $r['rss_import_enabled'] ? 'aff_tick.png' : 'aff_cross.png'; - - $rows[] = $r; - } - - /* Output */ - $this->registry->output->html .= $this->html->rssImportOverview( $rows, $page_links ); - } - - - /** - * Rebuild the RSS Stream cache - * - * @access public - * @param mixed $rss_import_id ID of the stream to import - * @param bool $return Set to true to return true/false - * @param bool $id_is_array Set to true if the first paramter is an array of ids - * @return mixed - **/ - public function rssImportRebuildCache( $rss_import_id, $return=true, $id_is_array=false ) - { - /* INIT */ - $errors = array(); - $affected_forum_ids = array(); - $affected_members = array(); - $rss_error = array(); - $rss_import_ids = array(); - $items_imported = 0; - - /* Check the ID */ - if ( ! $rss_import_id ) - { - $rss_import_id = $this->request['rss_import_id'] == 'all' ? 'all' : intval( $this->request['rss_import_id'] ); - } - - /* No ID Found */ - if ( ! $rss_import_id ) - { - $this->registry->output->global_message = $this->lang->words['im_noid']; - $this->rssImportOverview(); - return; - } - - /* Create an array of ids */ - if( $id_is_array == 1 ) - { - $rss_import_ids = explode( ",", $rss_import_id ); - } - - /* Load the classes we need */ - if ( ! $this->classes_loaded ) - { - /* Get the RSS Class */ - if ( ! is_object( $this->class_rss ) ) - { - require_once( IPS_KERNEL_PATH . 'classRss.php' ); - $this->class_rss = new classRss(); - - $this->class_rss->use_sockets = $this->use_sockets; - $this->class_rss->rss_max_show = 100; - } - - /* Get the post class */ - require_once(IPSLib::getAppDir('forums') .'/sources/classes/post/classPost.php' ); - $this->post = new classPost( $this->registry ); - - /* Load the mod libarry */ - if ( ! $this->func_mod ) - { - require_once( IPSLib::getAppDir('forums') .'/sources/classes/moderate.php' ); - $this->func_mod = new moderatorLibrary( $this->registry ); - - } - - $this->classes_loaded = 1; - } - - /* INIT Forums */ - if ( ! is_array( $this->registry->class_forums->forum_by_id ) OR !count( $this->registry->class_forums->forum_by_id ) ) - { - $this->registry->class_forums->forumsInit(); - } - - /* Query the RSS imports */ - $this->DB->build( array( 'select' => '*', 'from' => 'rss_import' ) ); - $outer = $this->DB->execute(); - - /* Loop through and build cache */ - while( $row = $this->DB->fetch( $outer ) ) - { - /* Are we caching this one? */ - if( $rss_import_id == 'all' OR $row['rss_import_id'] == $rss_import_id OR ( $id_is_array == 1 AND in_array( $row['rss_import_id'], $rss_import_ids ) ) ) - { - /* Skip non-existent forums - bad stuff happens */ - if ( !isset($this->registry->class_forums->forum_by_id[ $row['rss_import_forum_id'] ]) ) - { - continue; - } - - /* Allowing badwords? */ - IPSText::getTextClass( 'bbcode' )->bypass_badwords = $row['rss_import_allow_html']; - - /* Set this import's doctype */ - $this->class_rss->doc_type = IPS_DOC_CHAR_SET; - $this->class_rss->feed_charset = $row['rss_import_charset']; - - if( strtolower( $row['rss_import_charset'] ) != IPS_DOC_CHAR_SET ) - { - $this->class_rss->convert_charset = 1; - } - else - { - $this->class_rss->convert_charset = 0; - } - - /* Set this import's authentication */ - $this->class_rss->auth_req = $row['rss_import_auth']; - $this->class_rss->auth_user = $row['rss_import_auth_user']; - $this->class_rss->auth_pass = $row['rss_import_auth_pass']; - - /* Clear RSS object's error cache first */ - $this->class_rss->errors = array(); - $this->class_rss->rss_items = array(); - - /* Reset the rss count as this is a new feed */ - $this->class_rss->rss_count = 0; - $this->class_rss->rss_max_show = $row['rss_import_pergo']; - - /* Parse RSS */ - $this->class_rss->parseFeedFromUrl( $row['rss_import_url'] ); - - /* Check for errors */ - if ( is_array( $this->class_rss->errors ) and count( $this->class_rss->errors ) ) - { - $rss_error = array_merge( $rss_error, $this->class_rss->errors ); - continue; - } - - if ( ! is_array( $this->class_rss->rss_channels ) or ! count( $this->class_rss->rss_channels ) ) - { - $rss_error[] = sprintf( $this->lang->words['im_noopen'], $row['rss_import_url'] ); - continue; - } - - /* Update last check time */ - $this->DB->update( 'rss_import', array( 'rss_import_last_import' => time() ), 'rss_import_id='.$row['rss_import_id'] ); - - /* Apparently so: Parse feeds and check for already imported GUIDs */ - $final_items = array(); - $items = array(); - $check_guids = array(); - $final_guids = array(); - $count = 0; - - if ( ! is_array( $this->class_rss->rss_items ) or ! count( $this->class_rss->rss_items ) ) - { - $rss_error[] = $row['rss_import_url'] . $this->lang->words['im_noimport']; - continue; - } - - /* Loop through the channels */ - foreach ( $this->class_rss->rss_channels as $channel_id => $channel_data ) - { - if ( is_array( $this->class_rss->rss_items[ $channel_id ] ) and count ($this->class_rss->rss_items[ $channel_id ] ) ) - { - /* Loop through the items in this channel */ - foreach( $this->class_rss->rss_items[ $channel_id ] as $item_data ) - { - /* Item Data */ - $item_data['content'] = $item_data['content'] ? $item_data['content'] : $item_data['description']; - $item_data['guid'] = md5( $row['rss_import_id'] . ( $item_data['guid'] ? $item_data['guid'] : preg_replace( "#\s|\r|\n#is", "", $item_data['title'].$item_data['link'].$item_data['description'] ) ) ); - $item_data['unixdate'] = intval($item_data['unixdate']) ? intval($item_data['unixdate']) : time(); - - /* Convert char set? */ - if ( $row['rss_import_charset'] AND ( strtolower(IPS_DOC_CHAR_SET) != strtolower($row['rss_import_charset']) ) ) - { - $item_data['title'] = IPSText::convertCharsets( $item_data['title'] , $row['rss_import_charset'], IPS_DOC_CHAR_SET ); - $item_data['content'] = IPSText::convertCharsets( $item_data['content'], $row['rss_import_charset'], IPS_DOC_CHAR_SET ); - } - - /* Dates */ - if ( $item_data['unixdate'] < 1 ) - { - $item_data['unixdate'] = time(); - } - else if ( $item_data['unixdate'] > time() ) - { - $item_data['unixdate'] = time(); - } - - /* Error check */ - if ( ! $item_data['title'] OR ! $item_data['content'] ) - { - $rss_error[] = sprintf( $this->lang->words['im_notitle'], $item_data['title'] ); - continue; - } - - /* Add to array */ - $items[ $item_data['guid'] ] = $item_data; - $check_guids[] = $item_data['guid']; - } - } - } - - /* Check GUIDs */ - if ( ! count( $check_guids ) ) - { - $rss_error[] = $this->lang->words['im_noitems']; - continue; - } - - $this->DB->build( array( 'select' => '*', 'from' => 'rss_imported', 'where' => "rss_imported_guid IN ('".implode( "','", $check_guids )."')" ) ); - $this->DB->execute(); - - while ( $guid = $this->DB->fetch() ) - { - $final_guids[ $guid['rss_imported_guid'] ] = $guid['rss_imported_guid']; - } - - /* Compare GUIDs */ - $item_count = 0; - - foreach( $items as $guid => $data ) - { - if ( in_array( $guid, $final_guids ) ) - { - continue; - } - else - { - $item_count++; - - /* Make sure each item has a unique date */ - $final_items[ $data['unixdate'].$item_count ] = $data; - } - } - - /* Sort Array */ - krsort( $final_items ); - - /* Pick off last X */ - $count = 1; - $tmp_final_items = $final_items; - $final_items = array(); - - foreach( $tmp_final_items as $date => $data ) - { - $final_items[ $date ] = $data; - - if ( $count >= $row['rss_import_pergo'] ) - { - break; - } - - $count++; - } - - /* Anything left? */ - if ( ! count( $final_items ) ) - { - continue; - } - - /* Figure out MID */ - $member = $this->DB->buildAndFetch( array( 'select' => 'member_id, name, members_display_name, ip_address', 'from' => 'members', 'where' => "member_id={$row['rss_import_mid']}" ) ); - - if ( ! $member['member_id'] ) - { - continue; - } - - /* Set member in post class */ - $this->post->setAuthor( $member['member_id'] ); - $this->post->setForumData( $this->registry->getClass('class_forums')->forum_by_id[ $row['rss_import_forum_id'] ] ); - - /* Make 'dem posts */ - $affected_forum_ids[] = $row['rss_import_forum_id']; - - foreach( $final_items as $topic_item ) - { - /* Fix & */ - $topic_item['title'] = str_replace( '&', '&', $topic_item['title'] ); - $topic_item['title'] = str_replace( array( "\r", "\n" ), ' ', $topic_item['title'] ); - $topic_item['title'] = str_replace( array( "
    ", "
    " ), ' ', $topic_item['title'] ); - $topic_item['title'] = trim( $topic_item['title'] ); - $topic_item['title'] = strip_tags( $topic_item['title'] ); - $topic_item['title'] = IPSText::parseCleanValue( $topic_item['title'] ); - - /* Fix up &reg; */ - $topic_item['title'] = str_replace( '&reg;', '®', $topic_item['title'] ); - - if( $row['rss_import_topic_pre'] ) - { - $topic_item['title'] = str_replace( ' ', ' ', str_replace( '&nbsp;', ' ', $row['rss_import_topic_pre'] ) ) .' '. $topic_item['title']; - } - - /* Build topic insert array */ - $topic = array( - 'title' => IPSText::mbsubstr( $topic_item['title'], 0, 250 ), - 'title_seo' => IPSText::makeSeoTitle( IPSText::mbsubstr( $topic_item['title'], 0, 250 ) ), - 'description' => '' , - 'state' => $row['rss_import_topic_open'] ? 'open' : 'closed', - 'posts' => 0, - 'starter_id' => $member['member_id'], - 'starter_name' => $member['members_display_name'], - 'start_date' => $topic_item['unixdate'], - 'last_poster_id' => $member['member_id'], - 'last_poster_name' => $member['members_display_name'], - 'last_post' => $topic_item['unixdate'], - 'icon_id' => 0, - 'author_mode' => 1, - 'poll_state' => 0, - 'last_vote' => 0, - 'views' => 0, - 'forum_id' => $row['rss_import_forum_id'], - 'approved' => $row['rss_import_topic_hide'] ? 0 : 1, - 'pinned' => 0, - 'seo_last_name' => IPSText::makeSeoTitle( $member['members_display_name'] ), - 'seo_first_name' => IPSText::makeSeoTitle( $member['members_display_name'] ) ); - - /* More post class stuff */ - $this->post->setPublished( $row['rss_import_topic_hide'] ? FALSE : TRUE ); - - /* Sort post content: Convert HTML to BBCode */ - IPSText::getTextClass( 'bbcode' )->parse_smilies = 1; - IPSText::getTextClass( 'bbcode' )->parse_html = intval($row['rss_import_allow_html']); - IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; - IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics'; - - $this->memberData['_canUseRTE'] = true; - $_POST['ed-0_wysiwyg_used'] = 1; - IPSText::getTextClass( 'editor' )->method = 'rte'; - - /* Clean up.. */ - $topic_item['content'] = preg_replace( "#
    (\r)?\n#is", "
    ", $topic_item['content'] ); - - /* Add in Show link... */ - if ( $row['rss_import_showlink'] AND $topic_item['link'] ) - { - $the_link = str_replace( '{url}', trim($topic_item['link']), $row['rss_import_showlink'] ); - - if ( $row['rss_import_allow_html'] ) - { - $_POST['_tmpPostField'] = IPSText::getTextClass( 'bbcode' )->preEditParse( stripslashes($the_link) ); - - $the_link = "

    " . IPSText::getTextClass( 'bbcode' )->preDbParse( IPSText::getTextClass( 'editor' )->processRawPost( '_tmpPostField' ) ); - } - else - { - $the_link = "

    " . $the_link; - } - - $topic_item['content'] .= $the_link; - } - - if ( ! $row['rss_import_allow_html'] ) - { - $_POST['_tmpPostField'] = stripslashes($topic_item['content']);//IPSText::getTextClass( 'bbcode' )->preEditParse( stripslashes($topic_item['content']) ); - - $post_content = IPSText::getTextClass( 'bbcode' )->preDbParse( IPSText::getTextClass( 'editor' )->processRawPost( '_tmpPostField' ) ); - } - else - { - $post_content = stripslashes($topic_item['content']); - } - - /* Build Post insert array */ - $post = array( - 'author_id' => $member['member_id'], - 'use_sig' => 1, - 'use_emo' => 1, - 'ip_address' => $member['ip_address'], - 'post_date' => $topic_item['unixdate'], - 'icon_id' => 0, - 'post' => $post_content, - 'author_name' => $member['members_display_name'], - 'topic_id' => "", - 'queued' => 0, - 'post_htmlstate' => 0, - ); - - /* Insert the topic into the database to get the last inserted value of the auto_increment field follow suit with the post */ - $this->DB->insert( 'topics', $topic ); - - $post['topic_id'] = $this->DB->getInsertId(); - $topic['tid'] = $post['topic_id']; - - /* Update the post info with the upload array info */ - $post['post_key'] = md5( uniqid( microtime() ) ); - $post['new_topic'] = 1; - - /* Add post to DB */ - $this->DB->insert( 'posts', $post ); - - $post['pid'] = $this->DB->getInsertId(); - - /* Update topic with firstpost ID */ - $this->DB->build( array( - 'update' => 'topics', - 'set' => "topic_firstpost=".$post['pid'], - 'where' => "tid=".$topic['tid'] - ) ); - - $this->DB->execute(); - - /* Insert GUID match */ - $this->DB->insert( 'rss_imported', array( - 'rss_imported_impid' => $row['rss_import_id'], - 'rss_imported_guid' => $topic_item['guid'], - 'rss_imported_tid' => $topic['tid'] - ) ); - - /* Are we tracking this forum? If so generate some mailies - yay! */ - $this->post->forum = $this->registry->class_forums->forum_by_id[$row['rss_import_forum_id']]; - - $this->post->sendOutTrackedForumEmails( $row['rss_import_forum_id'], $topic['tid'], $topic['title'], $this->registry->class_forums->forum_by_id[ $row['rss_import_forum_id'] ]['name'], $post['post'], $member['member_id'], $member['members_display_name'] ); - - if( $topic['approved'] == 0 ) - { - $this->post->sendNewTopicForApprovalEmails( $topic['tid'], $topic['title'], $topic['starter_name'], $post['pid'] ); - } - - $this->import_count++; - - /* Increment user? */ - if ( $row['rss_import_inc_pcount'] AND $this->registry->class_forums->forum_by_id[ $row['rss_import_forum_id'] ]['inc_postcount'] ) - { - if ( ! $affected_members[ $member['member_id'] ] OR $affected_members[ $member['member_id'] ] < 0 ) - { - $affected_members[ $member['member_id'] ] = 0; - } - - $affected_members[ $member['member_id'] ]++; - } - } - } - } - - /* Update Members */ - if ( is_array( $affected_members ) and count( $affected_members ) ) - { - foreach( $affected_members as $mid => $inc ) - { - if ( $mid AND $inc ) - { - $this->post->setAuthor( $mid ); - $this->post->incrementUsersPostCount( $inc ); - } - } - } - - /* Recount Stats */ - if ( is_array( $affected_forum_ids ) and count( $affected_forum_ids ) ) - { - foreach( $affected_forum_ids as $fid ) - { - $this->func_mod->forumRecount( $fid ); - } - - $this->func_mod->statsRecount(); - } - - /* Return */ - if ( $return ) - { - $this->registry->output->global_message = $this->lang->words['im_recached']; - - if ( count( $rss_error ) ) - { - $this->registry->output->global_message .= "
    ".implode( "
    ", $rss_error ); - } - - $this->rssImportOverview(); - return; - } - else - { - return TRUE; - } - } - - /** - * Validate an RSS Feed - * - * @access public - * @param bool $standalone If set to true, data will be queried from the db based on rss_id, otherwise data will be gathered from form fields - * @return void - **/ - public function rssImportValidate( $standalone=false ) - { - /* INI */ - $return = 0; - - if( ! $standalone ) - { - /* Get data from the form */ - $rss_import_id = intval( $this->request['rss_import_id'] ); - $rss_import_title = trim( $this->request['rss_import_title'] ); - $rss_import_url = IPSText::stripslashes( trim( $this->request['rss_import_url'] ) ); - $rss_import_mid = trim( $this->request['rss_import_mid'] ); - $rss_import_showlink = IPSText::stripslashes( trim( $this->request['rss_import_showlink'] ) ); - $rss_import_enabled = intval( $this->request['rss_import_enabled'] ); - $rss_import_forum_id = intval( $this->request['rss_import_forum_id'] ); - $rss_import_pergo = intval( $this->request['rss_import_pergo'] ); - $rss_import_time = intval( $this->request['rss_import_time'] ); - $rss_import_topic_open = intval( $this->request['rss_import_topic_open'] ); - $rss_import_topic_hide = intval( $this->request['rss_import_topic_hide'] ); - $rss_import_inc_pcount = intval( $this->request['rss_import_inc_pcount'] ); - $rss_import_topic_pre = $this->request['rss_import_topic_pre']; - $rss_import_charset = $this->request['rss_import_charset']; - $rss_import_allow_html = intval( $this->request['rss_import_allow_html'] ); - $rss_import_auth = intval( $this->request['rss_import_auth'] ); - $rss_import_auth_user = trim( $this->request['rss_import_auth_user'] ) ? trim( $this->request['rss_import_auth_user'] ) : 'Not Needed'; - $rss_import_auth_pass = trim( $this->request['rss_import_auth_pass'] ) ? trim( $this->request['rss_import_auth_pass'] ) : 'Not Needed'; - - $return = 1; - } - else - { - $return = 0; - - /* Get the RSS ID */ - $rss_input_id = $this->request['rss_id'] ? intval($this->request['rss_id']) : 0; - - /* Found an id */ - if( $rss_input_id > 0 ) - { - /* Query the data from the db */ - $rss_data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rss_import', 'where' => 'rss_import_id=' . $rss_input_id ) ); - - /* Format Data */ - if( ! $rss_data['rss_import_url'] ) - { - $rss_import_url = ""; - $rss_import_auth = ""; - $rss_import_auth_user = ""; - $rss_import_auth_pass = ""; - } - else - { - $standalone = 0; - - $rss_import_id = intval( $rss_data['rss_import_id'] ); - $rss_import_url = $rss_data['rss_import_url']; - - $member = $this->DB->buildAndFetch( array( 'select' => 'members_display_name', 'from' => 'members', 'where' => 'member_id=' . $rss_data['rss_import_mid'] ) ); - - $rss_import_mid = $member['members_display_name']; - - $rss_import_forum_id = intval( $rss_data['rss_import_forum_id'] ); - $rss_import_inc_pcount = intval( $rss_data['rss_import_inc_pcount'] ); - $rss_import_charset = $rss_data['rss_import_charset']; - $rss_import_auth = intval( $rss_data['rss_import_auth'] ); - $rss_import_auth_user = trim( $rss_data['rss_import_auth_user'] ); - $rss_import_auth_pass = trim( $rss_data['rss_import_auth_pass'] ); - } - } - /* Try from URL */ - else - { - $rss_import_url = IPSText::stripslashes( trim( $this->request['rss_url'] ) ); - $rss_import_charset = IPS_DOC_CHAR_SET; - $rss_import_auth = ""; - $rss_import_auth_user = ""; - $rss_import_auth_pass = ""; - } - } - - /* Check for URL */ - if( ! $rss_import_url ) - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'msg' => $this->lang->words['im_nourl'] ) ); - } - else - { - /* INIT */ - if ( ! $this->classes_loaded ) - { - /* Load RSS Class */ - if ( ! is_object( $this->class_rss ) ) - { - require_once( IPS_KERNEL_PATH . 'classRss.php' ); - $this->class_rss = new classRss(); - - $this->class_rss->use_sockets = $this->use_sockets; - $this->class_rss->rss_max_show = 100; - } - - $this->classes_loaded = 1; - } - - /* Set this imports doc type */ - $this->class_rss->doc_type = IPS_DOC_CHAR_SET; - $this->class_rss->feed_charset = IPS_DOC_CHAR_SET; - - if( strtolower( $rss_import_charset ) != IPS_DOC_CHAR_SET ) - { - $this->class_rss->convert_charset = 1; - } - else - { - $this->class_rss->convert_charset = 0; - } - - /* Set this import's authentication */ - $this->class_rss->auth_req = $rss_import_auth; - $this->class_rss->auth_user = $rss_import_auth_user; - $this->class_rss->auth_pass = $rss_import_auth_pass; - - /* Clear RSS object's error cache first */ - $this->class_rss->errors = array(); - $this->class_rss->rss_items = array(); - - /* Reset the rss count as this is a new feed */ - $this->class_rss->rss_count = 0; - - /* Parse RSS */ - $this->class_rss->parseFeedFromUrl( $rss_import_url ); - - /* Validate Data - HTTP Status Code/Text */ - if( $this->class_rss->classFileManagement->http_status_code != "200" ) - { - if( $this->class_rss->classFileManagement->http_status_code ) - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', - 'msg' => "{$this->lang->words['im_http']} {$this->class_rss->classFileManagement->http_status_code} ({$this->class_rss->class_file_management->http_status_text})" ) ); - } - } - else - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-valid', - 'msg' => "{$this->lang->words['im_http']} {$this->class_rss->classFileManagement->http_status_code} ({$this->class_rss->class_file_management->http_status_text})" ) ); - } - - /* Display any errors found */ - if ( is_array( $this->class_rss->errors ) and count( $this->class_rss->errors ) ) - { - foreach( $this->class_rss->errors as $error ) - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', 'msg' => $error ) ); - } - } - else - { - if( $this->class_rss->orig_doc_type ) - { - if( !$standalone AND $rss_import_charset ) - { - if( strtolower($rss_import_charset) != strtolower($this->class_rss->orig_doc_type) ) - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', - 'msg' => sprintf( $this->lang->words['im_doc_type'], $this->class_rss->orig_doc_type, $rss_import_charset ) ) ); - } - else - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-valid', - 'msg' => sprintf ( $this->lang->words['im_charset_cor'], $this->class_rss->orig_doc_type ) ) ); - } - } - else - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-valid', - 'msg' => sprintf( $this->lang->words['im_charset'], $this->class_rss->orig_doc_type ) ) ); - } - } - else - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', - 'msg' => $this->lang->words['im_nocharset'] ) ); - } - - /* Channels */ - if ( ! is_array( $this->class_rss->rss_channels ) or ! count( $this->class_rss->rss_channels ) ) - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', - 'msg' => $this->lang->words['im_nochannels'] ) ); - } - else - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-valid', - 'msg' => "Найдено ".count($this->class_rss->rss_channels)." каналов в RSS потоке." ) ); - - /* Any Items */ - if ( ! is_array( $this->class_rss->rss_items ) or ! count( $this->class_rss->rss_items ) ) - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', - 'msg' => $this->lang->words['im_nocontent'] ) ); - } - else - { - foreach ( $this->class_rss->rss_channels as $channel_id => $channel_data ) - { - if ( is_array( $this->class_rss->rss_items[ $channel_id ] ) and count ($this->class_rss->rss_items[ $channel_id ] ) ) - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-valid', - 'msg' => sprintf ( $this->lang->words['im_topiccount'], count($this->class_rss->rss_items[ $channel_id ]) ) ) ); - - foreach( $this->class_rss->rss_items[ $channel_id ] as $item_data ) - { - if( !$item_data['unixdate'] ) - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-msg', - 'msg' => $this->lang->words['im_nodate'] ) ); - } - - if ( $item_data['unixdate'] < 1 ) - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-msg', - 'msg' => $this->lang->words['im_invdate'] ) ); - } - else if ( $item_data['unixdate'] > time() ) - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-msg', - 'msg' => $this->lang->words['im_invdate'] ) ); - } - - $item_data['content'] = $item_data['content'] ? $item_data['content'] : $item_data['description']; - - if ( ! $item_data['title'] OR ! $item_data['content'] ) - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', - 'msg' => $this->lang->words['im_'] ) ); - } - - break 2; - } - } - } - } - } - } - - if( !$standalone ) - { - if( $rss_import_mid ) - { - $member = $this->DB->buildAndFetch( array( 'select' => 'member_id, name', 'from' => 'members', 'where' => "members_l_display_name='{$rss_import_mid}'" ) ); - - if ( ! $member['member_id'] ) - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', - 'msg' => sprintf( $this->lang->words['im_nomember']. $rss_import_mid ) ) ); - } - } - else - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', - 'msg' => $this->lang->words['im_memval'] ) ); - } - } - - /* Init forums if not already done so */ - if ( ! is_array( $this->registry->class_forums->forum_by_id ) OR !count( $this->registry->class_forums->forum_by_id ) ) - { - $this->registry->class_forums->forums_init(); - } - - if( !$standalone AND $rss_import_forum_id ) - { - if ( ! $this->registry->class_forums->forum_by_id[ $rss_import_forum_id ] ) - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', - 'msg' => $this->lang->words['im_noforum'] ) ); - } - else - { - if ( $this->registry->class_forums->forum_by_id[ $rss_import_forum_id ]['sub_can_post'] != 1 OR $this->registry->class_forums->forum_by_id[ $rss_import_forum_id ]['redirect_on'] == 1 ) - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', - 'msg' => $this->lang->words['im_redforum'] ) ); - } - - if( $rss_import_inc_pcount AND !$this->registry->class_forums->forum_by_id[ $rss_import_forum_id ]['inc_postcount'] ) - { - $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', - 'msg' => $this->lang->words['im_noinc'] ) ); - } - } - } - - /* Display */ - if ( ! $return ) - { - if( count( $this->validate_msg ) ) - { - $this->registry->output->global_message = sprintf( $this->lang->words['im_valresults'], IPSText::stripslashes( trim( $this->request['rss_import_url'] ) ), implode( "
     ·", $this->validate_msg ) ); - $this->rssImportOverview(); - return; - } - } - else - { - return TRUE; - } - } - } - + + * Invision Power Services + * IP.Board v3.1.4 + * Forum RSS Import + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 7003 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_forums_rss_import extends ipsCommand +{ + /** + * Use sockets + * + * @var bool + */ + private $use_sockets = 1; + + /** + * Classes yet loaded? + * + * @var bool + */ + private $classes_loaded = false; + + /** + * Items imported so far + * + * @var integer + */ + private $import_count = 0; + + /** + * Validation message(s) + * + * @var array + */ + private $validate_msg = array(); + + /**#@+ + * URL bits + * + * @var string + */ + public $form_code = ''; + public $form_code_js = ''; + /**#@-*/ + + /** + * Mod Library, for recounting stats and deleting topics + * + * @var object + */ + private $func_mod; + + /** + * RSS Parser Class + * + * @var object + */ + private $class_rss; + + /** + * Skin object + * + * @var object + */ + private $html; + + /** + * Main class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load HTML and Lang */ + $this->html = $this->registry->output->loadTemplate( 'cp_skin_rss' ); + $this->registry->class_localization->loadLanguageFile( array( 'admin_rss' ) ); + + /* Load Mod Class */ + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php', 'moderatorLibrary', 'forums' ); + $this->func_mod = new $classToLoad( $registry ); + + /* URLs */ + $this->form_code = $this->html->form_code = 'module=rss&section=import'; + $this->form_code_js = $this->html->form_code_js = 'module=rss§ion=import'; + + /* What to do */ + switch( $this->request['do'] ) + { + case 'rssimport_overview': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_manage' ); + $this->rssImportOverview(); + break; + + case 'rssimport_validate': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_manage' ); + $this->rssImportValidate( 1 ); + break; + + case 'rssimport_add': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_manage' ); + $this->rssImportForm( 'add' ); + break; + + case 'rssimport_edit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_manage' ); + $this->rssImportForm( 'edit' ); + break; + + case 'rssimport_add_save': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_manage' ); + $this->rssImportSave( 'add' ); + break; + + case 'rssimport_edit_save': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_manage' ); + $this->rssImportSave( 'edit' ); + break; + + case 'rssimport_recache': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_manage' ); + $this->rssImportRebuildCache(0); + break; + + case 'rssimport_remove': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_remove' ); + $this->rssImportRemoveDialogue(); + break; + + case 'rssimport_remove_complete': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_remove' ); + $this->rssimportRemoveComplete( 1 ); + break; + + case 'rssimport_delete': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_delete' ); + $this->rssImportDelete(); + break; + + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'import_manage' ); + $this->rssImportOverview(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Delete an RSS Import Stream + * + * @return void + */ + public function rssImportDelete() + { + /* INIT */ + $rss_import_id = intval( $this->request['rss_import_id'] ); + + /* Load RSS Stream */ + $rssstream = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rss_import', 'where' => "rss_import_id={$rss_import_id}" ) ); + + if ( ! $rssstream['rss_import_id'] ) + { + $this->registry->output->global_message = $this->lang->words['im_noload']; + $this->rssImportOverview(); + return; + } + + /* Delete the stream */ + $this->DB->delete( 'rss_import', 'rss_import_id=' . $rss_import_id ); + + $this->registry->output->global_message = $this->lang->words['im_removed']; + $this->rssImportOverview(); + } + + /** + * Removes imported articles + * + * @param bool $return Whether to return or not + * @param integer $rss_import_id RSS import id to remove + * @return mixed + */ + public function rssimportRemoveComplete( $return=0, $rss_import_id=0 ) + { + /* INIT */ + $rss_import_id = $rss_import_id ? $rss_import_id : intval( $this->request['rss_import_id'] ); + $remove_count = intval( $this->request['remove_count'] ) ? intval( $this->request['remove_count'] ) : 500; + $remove_tids = array(); + + /* Query the RSS Streams */ + $rssstream = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rss_import', 'where' => "rss_import_id={$rss_import_id}" ) ); + + if ( ! $rssstream['rss_import_id'] ) + { + $this->registry->output->global_message = $this->lang->words['im_noload']; + $this->rssImportOverview(); + return; + } + + /* Get tids */ + $this->DB->build( array( + 'select' => 'rss_imported_tid', + 'from' => 'rss_imported', + 'where' => 'rss_imported_impid=' . $rss_import_id, + 'order' => 'rss_imported_tid DESC', + 'limit' => array( 0, $remove_count ) + ) ); + $this->DB->execute(); + + while( $tee = $this->DB->fetch() ) + { + $remove_tids[ $tee['rss_imported_tid'] ] = $tee['rss_imported_tid']; + } + + /* Check */ + if ( ! count( $remove_tids ) ) + { + if ( $return ) + { + $this->registry->output->global_message = $this->lang->words['im_findtopics']; + $this->rssImportOverview(); + return; + } + else + { + return; + } + } + + /* Delete the topics */ + $this->func_mod->forum['id'] = $rssstream['rss_import_forum_id']; + $this->func_mod->topicDelete( $remove_tids ); + + /* Remove from the imported list */ + $this->DB->delete( 'rss_imported', 'rss_imported_tid IN(' . implode( ',', $remove_tids ) . ')' ); + + $this->registry->output->global_message = intval( count( $remove_tids ) ) . $this->lang->words['im_topicsremoved']; + $this->rssImportOverview(); + } + + /** + * Splash screen for removing imported articles + * + * @return void + */ + public function rssImportRemoveDialogue() + { + /* Check ID */ + $rss_import_id = intval( $this->request['rss_import_id'] ); + + if ( ! $rss_import_id ) + { + $this->registry->output->global_message = $this->lang->words['im_noid']; + $this->rssImportOverview(); + return; + } + + /* Load RSS Stream */ + $rssstream = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rss_import', 'where' => "rss_import_id=$rss_import_id" ) ); + + if( ! $rssstream['rss_import_id'] ) + { + $this->registry->output->global_message = $this->lang->words['im_noload']; + $this->rssImportOverview(); + return; + } + + /* Count the number of imported topics */ + $article_count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as cnt', 'from' => 'rss_imported', 'where' => 'rss_imported_impid='.$rss_import_id ) ); + + if ( $article_count['cnt'] < 1 ) + { + $this->registry->output->global_message = sprintf( $this->lang->words['im_noarticles'], $rssstream['rss_import_title'] ); + $this->rssImportOverview(); + return; + } + + /* Output */ + $this->registry->output->html .= $this->html->rssImportRemoveArticlesForm( $rssstream, intval( $article_count['cnt'] ) ); + } + + /** + * Saves the add/edit RSS Import form + * + * @param string $type Either add or edit + * @return void + */ + public function rssImportSave($type='add') + { + /* Validate the feed? */ + if( $this->request['rssimport_validate'] AND $this->request['rssimport_validate'] ) + { + $this->rssImportValidate(); + + if( count($this->validate_msg) ) + { + $this->registry->output->global_message = sprintf( $this->lang->words['im_valresults'], IPSText::stripslashes( trim( $this->request['rss_import_url'] ) ), implode( "
     ·", $this->validate_msg ) ); + $this->rssImportForm( $type ); + return; + } + } + + /* Get Form Data */ + $rss_import_id = intval( $this->request['rss_import_id'] ); + $rss_import_title = trim( $this->request['rss_import_title'] ); + $rss_import_url = IPSText::stripslashes( trim( $this->request['rss_import_url'] ) ); + $rss_import_mid = trim( $this->request['rss_import_mid'] ); + $rss_import_showlink = IPSText::stripslashes( trim( $this->request['rss_import_showlink'] ) ); + $rss_import_enabled = intval( $this->request['rss_import_enabled'] ); + $rss_import_forum_id = intval( $this->request['rss_import_forum_id'] ); + $rss_import_pergo = intval( $this->request['rss_import_pergo'] ); + $rss_import_time = intval( $this->request['rss_import_time'] ); + $rss_import_topic_open = intval( $this->request['rss_import_topic_open'] ); + $rss_import_topic_hide = intval( $this->request['rss_import_topic_hide'] ); + $rss_import_inc_pcount = intval( $this->request['rss_import_inc_pcount'] ); + $rss_import_topic_pre = $this->request['rss_import_topic_pre']; + $rss_import_charset = $this->request['rss_import_charset']; + $rss_import_allow_html = intval( $this->request['rss_import_allow_html'] ); + $rss_import_auth = intval( $this->request['rss_import_auth'] ); + $rss_import_auth_user = trim( $this->request['rss_import_auth_user'] ) ? trim( $this->request['rss_import_auth_user'] ) : $this->lang->words['im_notneeded']; + $rss_import_auth_pass = trim( $this->request['rss_import_auth_pass'] ) ? trim( $this->request['rss_import_auth_pass'] ) : $this->lang->words['im_notneeded']; + + $rss_error = array(); + + /* Error checking */ + if ( $type == 'edit' ) + { + if ( ! $rss_import_id ) + { + $this->registry->output->global_message = $this->lang->words['im_noid']; + $this->rssImportOverview(); + return; + } + } + + if ( ! $rss_import_title OR ! $rss_import_url OR ! $rss_import_pergo OR ! $rss_import_forum_id OR ! $rss_import_mid ) + { + $this->registry->output->global_message = $this->lang->words['im_completeform']; + $this->rssImportForm( $type ); + return; + } + + /* Load the RSS Class */ + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classRss.php', 'classRss' ); + $this->class_rss = new $classToLoad(); + + $this->class_rss->use_sockets = $this->use_sockets; + $this->class_rss->rss_max_show = $rss_import_pergo; + + /* Set DOC TYPE */ + $supported_encodings = array( 'utf-8', 'iso-8859-1', 'us-ascii' ); + + if( in_array( strtolower( IPS_DOC_CHAR_SET ), $supported_encodings ) ) + { + $this->class_rss->doc_type = IPS_DOC_CHAR_SET; + } + else + { + $this->class_rss->doc_type = 'UTF-8'; + } + + if( strtolower( $rss_import_charset ) != $this->class_rss->doc_type ) + { + $this->class_rss->convert_charset = 1; + $this->class_rss->feed_charset = $rss_import_charset; + $this->class_rss->destination_charset = $this->class_rss->doc_type; + } + else + { + $this->class_rss->convert_charset = 0; + } + + /* Set this import's authentication */ + $this->class_rss->auth_req = $rss_import_auth; + $this->class_rss->auth_user = $rss_import_auth_user; + $this->class_rss->auth_pass = $rss_import_auth_pass; + + /* Test URL */ + $this->class_rss->parseFeedFromUrl( $rss_import_url ); + + /* Found an error? */ + if ( is_array( $this->class_rss->errors ) and count( $this->class_rss->errors ) ) + { + $rss_error = array_merge( $rss_error, $this->class_rss->errors ); + } + + /* Found some data? */ + if ( ! is_array( $this->class_rss->rss_channels ) or ! count( $this->class_rss->rss_channels ) ) + { + $rss_error[] = sprintf( $this->lang->words['im_noopen'], $rss_import_url ); + } + + if ( is_array( $rss_error ) AND count( $rss_error ) ) + { + $this->registry->output->global_message = implode( "
    ", $rss_error ); + $this->rssImportForm( $type ); + return; + } + + /* Member data */ + $member = $this->DB->buildAndFetch( array( 'select' => 'member_id, name', 'from' => 'members', 'where' => "members_l_display_name='" . mb_strtolower( $rss_import_mid ) . "'" ) ); + + if ( !isset( $member['member_id'] ) OR !$member['member_id'] ) + { + $this->registry->output->global_message = sprintf( $this->lang->words['im_nomember'], $rss_import_mid ); + $this->rssImportForm( $type ); + return; + } + else + { + $rss_import_mid = $member['member_id']; + } + + /* Check to make sure forum ID is valid */ + $this->registry->class_forums->forumsInit(); + + if ( ! isset( $this->registry->class_forums->forum_by_id[ $rss_import_forum_id ] ) OR !$this->registry->class_forums->forum_by_id[ $rss_import_forum_id ] ) + { + $this->registry->output->global_message = $this->lang->words['im_noforum']; + $this->rssImportForm( $type ); + return; + } + + if ( $this->registry->class_forums->forum_by_id[ $rss_import_forum_id ]['sub_can_post'] != 1 OR $this->registry->class_forums->forum_by_id[ $rss_import_forum_id ]['redirect_on'] == 1 ) + { + $this->registry->output->global_message = $this->lang->words['im_noforumperm']; + $this->rssImportForm( $type ); + return; + } + + /* Build the db array */ + $array = array( + 'rss_import_title' => $rss_import_title, + 'rss_import_url' => $rss_import_url, + 'rss_import_mid' => $rss_import_mid, + 'rss_import_showlink' => $rss_import_showlink, + 'rss_import_enabled' => $rss_import_enabled, + 'rss_import_forum_id' => $rss_import_forum_id, + 'rss_import_pergo' => $rss_import_pergo, + 'rss_import_time' => $rss_import_time < 30 ? 30 : $rss_import_time, + 'rss_import_topic_open' => $rss_import_topic_open, + 'rss_import_topic_hide' => $rss_import_topic_hide, + 'rss_import_inc_pcount' => $rss_import_inc_pcount, + 'rss_import_topic_pre' => $rss_import_topic_pre, + 'rss_import_charset' => $rss_import_charset, + 'rss_import_allow_html' => $rss_import_allow_html, + 'rss_import_auth' => $rss_import_auth, + 'rss_import_auth_user' => $rss_import_auth_user, + 'rss_import_auth_pass' => $rss_import_auth_pass, + ); + + /* Add to database */ + if ( $type == 'add' ) + { + $this->DB->insert( 'rss_import', $array ); + $this->registry->output->global_message = $this->lang->words['im_created']; + $rss_import_id = $this->DB->getInsertId(); + } + /* Update the database */ + else + { + $this->DB->update( 'rss_import', $array, 'rss_import_id='.$rss_import_id ); + $this->registry->output->global_message = $this->lang->words['im_edited']; + } + + /* Build the cache */ + if( $rss_import_enabled ) + { + $this->rssImportRebuildCache( $rss_import_id, 0 ); + } + + /* Bounce */ + $this->rssImportOverview(); + } + + /** + * Form for adding/editing RSS Imports + * + * @param string $type Either add or edit + * @return void + */ + public function rssImportForm( $type='add' ) + { + /* INIT */ + $rss_import_id = $this->request['rss_import_id'] ? intval( $this->request['rss_import_id'] ) : 0; + + /* Build form drop downs */ + $this->registry->class_forums->forumsInit(); + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/admin_forum_functions.php", 'admin_forum_functions', 'forums' ); + $aff = new $classToLoad( $this->registry ); + $aff->forumsInit(); + $forum_dropdown = $aff->adForumsForumList( 1 ); + + /* Add new import */ + if ( $type == 'add' ) + { + /* Form Bits */ + $formcode = 'rssimport_add_save'; + $title = $this->lang->words['im_createnew']; + $button = $this->lang->words['im_createnew']; + + /* Form Data */ + $rssstream = array( 'rss_import_topic_open' => 1, + 'rss_import_enabled' => 1, + 'rss_import_showlink' => $this->lang->words['im_full'], + 'rss_import_title' => '', + 'rss_import_url' => '', + 'rss_import_forum_id' => 0, + 'rss_import_mid' => '', + 'rss_import_pergo' => 10, + 'rss_import_time' => '200', + 'rss_import_topic_hide' => 0, + 'rss_import_inc_pcount' => 1, + 'rss_import_topic_pre' => '', + 'rss_import_charset' => '', + 'rss_import_allow_html' => 0, + 'rss_import_auth' => NULL, + 'rss_import_auth_user' => NULL, + 'rss_import_auth_pass' => NULL, + 'rss_import_id' => 0 ); + } + /* Edit Form */ + else + { + /* Form Data */ + $rssstream = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rss_import', 'where' => 'rss_import_id='.$rss_import_id ) ); + + /* Make sure it's valid */ + if ( ! $rssstream['rss_import_id'] ) + { + $this->registry->output->global_message = $this->lang->words['im_noid']; + $this->rssImportOverview(); + return; + } + + /* Get the member name */ + $member = $this->DB->buildAndFetch( array( 'select' => 'member_id, members_display_name', 'from' => 'members', 'where' => "member_id=" . intval( $rssstream['rss_import_mid'] ) ) ); + + if ( $member['member_id'] ) + { + $rssstream['rss_import_mid'] = $member['members_display_name']; + } + + /* Form Bits */ + $formcode = 'rssimport_edit_save'; + $title = $this->lang->words['im_edit'] . $rssstream['rss_import_title']; + $button = $this->lang->words['im_save']; + } + + /* Form Elements */ + $form = array(); + + $form['rss_import_title'] = $this->registry->output->formInput( 'rss_import_title' , ( isset($this->request['rss_import_title']) AND $this->request['rss_import_title'] ) ? stripslashes($this->request['rss_import_title']) : $rssstream['rss_import_title'] ); + $form['rss_import_enabled'] = $this->registry->output->formYesNo( 'rss_import_enabled' , ( isset($this->request['rss_import_enabled']) AND $this->request['rss_import_enabled'] ) ? $this->request['rss_import_enabled'] : $rssstream['rss_import_enabled'] ); + $form['rss_import_url'] = $this->registry->output->formInput( 'rss_import_url' , ( isset($this->request['rss_import_url']) AND $this->request['rss_import_url'] ) ? $this->request['rss_import_url'] : $rssstream['rss_import_url'] ); + $form['rss_import_forum_id'] = $this->registry->output->formDropdown( 'rss_import_forum_id' , $forum_dropdown, ( isset($this->request['rss_import_forum_id']) AND $this->request['rss_import_forum_id'] ) ? $this->request['rss_import_forum_id'] : $rssstream['rss_import_forum_id'] ); + $form['rss_import_mid'] = $this->registry->output->formInput( 'rss_import_mid' , ( isset($this->request['rss_import_mid']) AND $this->request['rss_import_mid'] ) ? $this->request['rss_import_mid'] : $rssstream['rss_import_mid'] ); + $form['rss_import_pergo'] = $this->registry->output->formSimpleInput( 'rss_import_pergo' , ( isset($this->request['rss_import_pergo']) AND $this->request['rss_import_pergo'] ) ? $this->request['rss_import_pergo'] : $rssstream['rss_import_pergo'], 5 ); + $form['rss_import_time'] = $this->registry->output->formSimpleInput( 'rss_import_time' , ( isset($this->request['rss_import_time']) AND $this->request['rss_import_time'] ) ? $this->request['rss_import_time'] : $rssstream['rss_import_time'], 5 ); + $form['rss_import_showlink'] = $this->registry->output->formInput( 'rss_import_showlink' , ( isset($this->request['rss_import_showlink']) AND $this->request['rss_import_showlink'] ) ? htmlspecialchars($this->request['rss_import_showlink']) : htmlspecialchars($rssstream['rss_import_showlink']) ); + $form['rss_import_topic_open'] = $this->registry->output->formYesNo( 'rss_import_topic_open' , ( isset($this->request['rss_import_topic_open']) AND $this->request['rss_import_topic_open'] ) ? $this->request['rss_import_topic_open'] : $rssstream['rss_import_topic_open'] ); + $form['rss_import_topic_hide'] = $this->registry->output->formYesNo( 'rss_import_topic_hide' , ( isset($this->request['rss_import_topic_hide']) AND $this->request['rss_import_topic_hide'] ) ? $this->request['rss_import_topic_hide'] : $rssstream['rss_import_topic_hide'] ); + $form['rss_import_inc_pcount'] = $this->registry->output->formYesNo( 'rss_import_inc_pcount' , ( isset($this->request['rss_import_inc_pcount']) AND $this->request['rss_import_inc_pcount'] ) ? $this->request['rss_import_inc_pcount'] : $rssstream['rss_import_inc_pcount'] ); + $form['rss_import_topic_pre'] = $this->registry->output->formInput( 'rss_import_topic_pre' , ( isset($this->request['rss_import_topic_pre']) AND $this->request['rss_import_topic_pre'] ) ? $this->request['rss_import_topic_pre'] : $rssstream['rss_import_topic_pre'] ); + $form['rss_import_charset'] = $this->registry->output->formInput( 'rss_import_charset' , ( isset($this->request['rss_import_charset']) AND $this->request['rss_import_charset'] ) ? $this->request['rss_import_charset'] : $rssstream['rss_import_charset'] ); + $form['rss_import_allow_html'] = $this->registry->output->formYesNo( 'rss_import_allow_html' , ( isset($this->request['rss_import_allow_html']) AND $this->request['rss_import_allow_html'] ) ? $this->request['rss_import_allow_html'] : $rssstream['rss_import_allow_html'] ); + $form['rss_import_auth'] = $this->registry->output->formCheckbox( 'rss_import_auth' , + ( isset($this->request['rss_import_auth']) AND $this->request['rss_import_auth'] ) ? $this->request['rss_import_auth'] : $rssstream['rss_import_auth'], + '1', + "rss_import_auth", + 'onclick="ACPRss.showAuthBoxes()"' + ); + + $auth_checked = ( isset( $this->request['rss_import_auth'] ) AND $this->request['rss_import_auth'] ) ? $this->request['rss_import_auth'] : $rssstream['rss_import_auth']; + if( !$auth_checked ) + { + $form['rss_div_show'] = "style='display:none;'"; + } + else + { + $form['rss_div_show'] = "style='display:;'"; + } + + $form['rss_import_auth_user'] = $this->registry->output->formInput( 'rss_import_auth_user', ( isset( $this->request['rss_import_auth_user'] ) AND $this->request['rss_import_auth_user'] ) ? $this->request['rss_import_auth_user'] : $rssstream['rss_import_auth_user'] ); + $form['rss_import_auth_pass'] = $this->registry->output->formInput( 'rss_import_auth_pass', ( isset( $this->request['rss_import_auth_pass'] ) AND $this->request['rss_import_auth_pass'] ) ? $this->request['rss_import_auth_pass'] : $rssstream['rss_import_auth_pass'] ); + + /* Output */ + $this->registry->output->html .= $this->html->rssImportForm( $form, $title, $formcode, $button, $rssstream ); + } + + /** + * Builds a list of current RSS Imports + * + * @return void + */ + public function rssImportOverview() + { + /* INIT */ + $rows = array(); + $st = intval( $this->request['st'] ) > 0 ? intval( $this->request['st'] ) : 0; + + /* Count the number of feeds we ahve */ + $num = $this->DB->buildAndFetch( array( 'select' => 'count(*) as row_count', 'from' => 'rss_import' ) ); + + /* Generate Pagination */ + $page_links = $this->registry->output->generatePagination( array( + 'totalItems' => $num['row_count'], + 'itemsPerPage' => 25, + 'currentStartValue' => $st, + 'baseUrl' => "{$this->settings['base_url']}{$this->form_code}", + ) ); + + /* Query the current feeds */ + $this->DB->build( array( 'select' => '*', 'from' => 'rss_import', 'order' => 'rss_import_id ASC', 'limit' => array( $st, 25 ) ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $r['_enabled_img'] = $r['rss_import_enabled'] ? 'aff_tick.png' : 'aff_cross.png'; + + $rows[] = $r; + } + + /* Output */ + $this->registry->output->html .= $this->html->rssImportOverview( $rows, $page_links ); + } + + + /** + * Rebuild the RSS Stream cache + * + * @param mixed $rss_import_id ID of the stream to import + * @param bool $return Set to true to return true/false + * @param bool $id_is_array Set to true if the first paramter is an array of ids + * @return mixed + */ + public function rssImportRebuildCache( $rss_import_id, $return=true, $id_is_array=false ) + { + /* INIT */ + $errors = array(); + $affected_forum_ids = array(); + $affected_members = array(); + $rss_error = array(); + $rss_import_ids = array(); + $items_imported = 0; + + /* Check the ID */ + if ( ! $rss_import_id ) + { + $rss_import_id = $this->request['rss_import_id'] == 'all' ? 'all' : intval( $this->request['rss_import_id'] ); + } + + /* No ID Found */ + if ( ! $rss_import_id ) + { + $this->registry->output->global_message = $this->lang->words['im_noid']; + $this->rssImportOverview(); + return; + } + + /* Create an array of ids */ + if( $id_is_array == 1 ) + { + $rss_import_ids = explode( ",", $rss_import_id ); + } + + /* Load the classes we need */ + if ( ! $this->classes_loaded ) + { + /* Get the RSS Class */ + if ( ! is_object( $this->class_rss ) ) + { + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classRss.php', 'classRss' ); + $this->class_rss = new $classToLoad(); + + $this->class_rss->use_sockets = $this->use_sockets; + $this->class_rss->rss_max_show = 100; + } + + /* Get the post class */ + require_once(IPSLib::getAppDir('forums') .'/sources/classes/post/classPost.php' ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPostForms.php', 'classPostForms', 'forums' ); + + $this->post = new $classToLoad( $this->registry ); + + /* Load the mod libarry */ + if ( ! $this->func_mod ) + { + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php', 'moderatorLibrary', 'forums' ); + $this->func_mod = new $classToLoad( $this->registry ); + } + + $this->classes_loaded = 1; + } + + /* INIT Forums */ + if ( ! is_array( $this->registry->class_forums->forum_by_id ) OR !count( $this->registry->class_forums->forum_by_id ) ) + { + $this->registry->class_forums->forumsInit(); + } + + /* Query the RSS imports */ + $this->DB->build( array( 'select' => '*', 'from' => 'rss_import' ) ); + $outer = $this->DB->execute(); + + /* Loop through and build cache */ + while( $row = $this->DB->fetch( $outer ) ) + { + /* Are we caching this one? */ + if( $rss_import_id == 'all' OR $row['rss_import_id'] == $rss_import_id OR ( $id_is_array == 1 AND in_array( $row['rss_import_id'], $rss_import_ids ) ) ) + { + /* Skip non-existent forums - bad stuff happens */ + if ( !isset($this->registry->class_forums->forum_by_id[ $row['rss_import_forum_id'] ]) ) + { + continue; + } + + /* Allowing badwords? */ + IPSText::getTextClass( 'bbcode' )->bypass_badwords = $row['rss_import_allow_html']; + + /* Set this import's doctype */ + $this->class_rss->doc_type = IPS_DOC_CHAR_SET; + $this->class_rss->feed_charset = $row['rss_import_charset']; + + if( strtolower( $row['rss_import_charset'] ) != IPS_DOC_CHAR_SET ) + { + $this->class_rss->convert_charset = 1; + } + else + { + $this->class_rss->convert_charset = 0; + } + + /* Set this import's authentication */ + $this->class_rss->auth_req = $row['rss_import_auth']; + $this->class_rss->auth_user = $row['rss_import_auth_user']; + $this->class_rss->auth_pass = $row['rss_import_auth_pass']; + + /* Clear RSS object's error cache first */ + $this->class_rss->errors = array(); + $this->class_rss->rss_items = array(); + + /* Reset the rss count as this is a new feed */ + $this->class_rss->rss_count = 0; + $this->class_rss->rss_max_show = $row['rss_import_pergo']; + + /* Parse RSS */ + $this->class_rss->parseFeedFromUrl( $row['rss_import_url'] ); + + /* Check for errors */ + if ( is_array( $this->class_rss->errors ) and count( $this->class_rss->errors ) ) + { + $rss_error = array_merge( $rss_error, $this->class_rss->errors ); + continue; + } + + if ( ! is_array( $this->class_rss->rss_channels ) or ! count( $this->class_rss->rss_channels ) ) + { + $rss_error[] = sprintf( $this->lang->words['im_noopen'], $row['rss_import_url'] ); + continue; + } + + /* Update last check time */ + $this->DB->update( 'rss_import', array( 'rss_import_last_import' => time() ), 'rss_import_id='.$row['rss_import_id'] ); + + /* Apparently so: Parse feeds and check for already imported GUIDs */ + $final_items = array(); + $items = array(); + $check_guids = array(); + $final_guids = array(); + $count = 0; + + if ( ! is_array( $this->class_rss->rss_items ) or ! count( $this->class_rss->rss_items ) ) + { + $rss_error[] = $row['rss_import_url'] . $this->lang->words['im_noimport']; + continue; + } + + /* Loop through the channels */ + foreach ( $this->class_rss->rss_channels as $channel_id => $channel_data ) + { + if ( is_array( $this->class_rss->rss_items[ $channel_id ] ) and count ($this->class_rss->rss_items[ $channel_id ] ) ) + { + /* Loop through the items in this channel */ + foreach( $this->class_rss->rss_items[ $channel_id ] as $item_data ) + { + /* Item Data */ + $item_data['content'] = $item_data['content'] ? $item_data['content'] : $item_data['description']; + $item_data['guid'] = md5( $row['rss_import_id'] . ( $item_data['guid'] ? $item_data['guid'] : preg_replace( "#\s|\r|\n#is", "", $item_data['title'].$item_data['link'].$item_data['description'] ) ) ); + $item_data['unixdate'] = intval($item_data['unixdate']) ? intval($item_data['unixdate']) : time(); + + /* Convert char set? */ + if ( $row['rss_import_charset'] AND ( strtolower(IPS_DOC_CHAR_SET) != strtolower($row['rss_import_charset']) ) ) + { + $item_data['title'] = IPSText::convertCharsets( $item_data['title'] , $row['rss_import_charset'], IPS_DOC_CHAR_SET ); + $item_data['content'] = IPSText::convertCharsets( $item_data['content'], $row['rss_import_charset'], IPS_DOC_CHAR_SET ); + } + + /* Dates */ + if ( $item_data['unixdate'] < 1 ) + { + $item_data['unixdate'] = time(); + } + else if ( $item_data['unixdate'] > time() ) + { + $item_data['unixdate'] = time(); + } + + /* Error check */ + if ( ! $item_data['title'] OR ! $item_data['content'] ) + { + $rss_error[] = sprintf( $this->lang->words['im_notitle'], $item_data['title'] ); + continue; + } + + /* Add to array */ + $items[ $item_data['guid'] ] = $item_data; + $check_guids[] = $item_data['guid']; + } + } + } + + /* Check GUIDs */ + if ( ! count( $check_guids ) ) + { + $rss_error[] = $this->lang->words['im_noitems']; + continue; + } + + $this->DB->build( array( 'select' => '*', 'from' => 'rss_imported', 'where' => "rss_imported_guid IN ('".implode( "','", $check_guids )."')" ) ); + $this->DB->execute(); + + while ( $guid = $this->DB->fetch() ) + { + $final_guids[ $guid['rss_imported_guid'] ] = $guid['rss_imported_guid']; + } + + /* Compare GUIDs */ + $item_count = 0; + + foreach( $items as $guid => $data ) + { + if ( in_array( $guid, $final_guids ) ) + { + continue; + } + else + { + $item_count++; + + /* Make sure each item has a unique date */ + $final_items[ $data['unixdate'].$item_count ] = $data; + } + } + + /* Sort Array */ + krsort( $final_items ); + + /* Pick off last X */ + $count = 1; + $tmp_final_items = $final_items; + $final_items = array(); + + foreach( $tmp_final_items as $date => $data ) + { + $final_items[ $date ] = $data; + + if ( $count >= $row['rss_import_pergo'] ) + { + break; + } + + $count++; + } + + /* Anything left? */ + if ( ! count( $final_items ) ) + { + continue; + } + + /* Figure out MID */ + $member = $this->DB->buildAndFetch( array( 'select' => 'member_id, name, members_display_name, ip_address', 'from' => 'members', 'where' => "member_id={$row['rss_import_mid']}" ) ); + + if ( ! $member['member_id'] ) + { + continue; + } + + /* Set member in post class */ + $this->post->setAuthor( $member['member_id'] ); + $this->post->setForumData( $this->registry->getClass('class_forums')->forum_by_id[ $row['rss_import_forum_id'] ] ); + + /* Make 'dem posts */ + $affected_forum_ids[] = $row['rss_import_forum_id']; + + foreach( $final_items as $topic_item ) + { + /* Fix & */ + $topic_item['title'] = str_replace( '&', '&', $topic_item['title'] ); + $topic_item['title'] = str_replace( array( "\r", "\n" ), ' ', $topic_item['title'] ); + $topic_item['title'] = str_replace( array( "
    ", "
    " ), ' ', $topic_item['title'] ); + $topic_item['title'] = trim( $topic_item['title'] ); + $topic_item['title'] = strip_tags( $topic_item['title'] ); + $topic_item['title'] = IPSText::parseCleanValue( $topic_item['title'] ); + + /* Fix up &reg; */ + $topic_item['title'] = str_replace( '&reg;', '®', $topic_item['title'] ); + + if( $row['rss_import_topic_pre'] ) + { + $topic_item['title'] = str_replace( ' ', ' ', str_replace( '&nbsp;', ' ', $row['rss_import_topic_pre'] ) ) .' '. $topic_item['title']; + } + + /* Build topic insert array */ + $topic = array( + 'title' => IPSText::mbsubstr( $topic_item['title'], 0, 250 ), + 'title_seo' => IPSText::makeSeoTitle( IPSText::mbsubstr( $topic_item['title'], 0, 250 ) ), + 'description' => '' , + 'state' => $row['rss_import_topic_open'] ? 'open' : 'closed', + 'posts' => 0, + 'starter_id' => $member['member_id'], + 'starter_name' => $member['members_display_name'], + 'start_date' => $topic_item['unixdate'], + 'last_poster_id' => $member['member_id'], + 'last_poster_name' => $member['members_display_name'], + 'last_post' => $topic_item['unixdate'], + 'icon_id' => 0, + 'author_mode' => 1, + 'poll_state' => 0, + 'last_vote' => 0, + 'views' => 0, + 'forum_id' => $row['rss_import_forum_id'], + 'approved' => $row['rss_import_topic_hide'] ? 0 : 1, + 'pinned' => 0, + 'seo_last_name' => IPSText::makeSeoTitle( $member['members_display_name'] ), + 'seo_first_name' => IPSText::makeSeoTitle( $member['members_display_name'] ) ); + + /* More post class stuff */ + $this->post->setPublished( $row['rss_import_topic_hide'] ? FALSE : TRUE ); + + /* Sort post content: Convert HTML to BBCode */ + IPSText::getTextClass( 'bbcode' )->parse_smilies = 1; + IPSText::getTextClass( 'bbcode' )->parse_html = intval($row['rss_import_allow_html']); + IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; + IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics'; + + $this->memberData['_canUseRTE'] = true; + $_POST['ed-0_wysiwyg_used'] = 1; + IPSText::getTextClass( 'editor' )->method = 'rte'; + + /* Clean up.. */ + $topic_item['content'] = preg_replace( "#
    (\r)?\n#is", "
    ", $topic_item['content'] ); + + /* Add in Show link... */ + if ( $row['rss_import_showlink'] AND $topic_item['link'] ) + { + $the_link = str_replace( '{url}', trim($topic_item['link']), $row['rss_import_showlink'] ); + + if ( $row['rss_import_allow_html'] ) + { + $_POST['_tmpPostField'] = IPSText::getTextClass( 'bbcode' )->preEditParse( stripslashes($the_link) ); + + $the_link = "

    " . IPSText::getTextClass( 'bbcode' )->preDbParse( IPSText::getTextClass( 'editor' )->processRawPost( '_tmpPostField' ) ); + } + else + { + $the_link = "

    " . $the_link; + } + + $topic_item['content'] .= $the_link; + } + + if ( ! $row['rss_import_allow_html'] ) + { + $_POST['_tmpPostField'] = stripslashes($topic_item['content']);//IPSText::getTextClass( 'bbcode' )->preEditParse( stripslashes($topic_item['content']) ); + + $post_content = IPSText::getTextClass( 'bbcode' )->preDbParse( IPSText::getTextClass( 'editor' )->processRawPost( '_tmpPostField' ) ); + } + else + { + $post_content = stripslashes($topic_item['content']); + } + + /* Build Post insert array */ + $post = array( + 'author_id' => $member['member_id'], + 'use_sig' => 1, + 'use_emo' => 1, + 'ip_address' => $member['ip_address'], + 'post_date' => $topic_item['unixdate'], + 'icon_id' => 0, + 'post' => $post_content, + 'author_name' => $member['members_display_name'], + 'topic_id' => "", + 'queued' => 0, + 'post_htmlstate' => 0, + ); + + /* Insert the topic into the database to get the last inserted value of the auto_increment field follow suit with the post */ + $this->DB->insert( 'topics', $topic ); + + $post['topic_id'] = $this->DB->getInsertId(); + $topic['tid'] = $post['topic_id']; + + /* Update the post info with the upload array info */ + $post['post_key'] = md5( uniqid( microtime() ) ); + $post['new_topic'] = 1; + + /* Add post to DB */ + $this->DB->insert( 'posts', $post ); + + $post['pid'] = $this->DB->getInsertId(); + + /* Update topic with firstpost ID */ + $this->DB->build( array( + 'update' => 'topics', + 'set' => "topic_firstpost=".$post['pid'], + 'where' => "tid=".$topic['tid'] + ) ); + + $this->DB->execute(); + + /* Insert GUID match */ + $this->DB->insert( 'rss_imported', array( + 'rss_imported_impid' => $row['rss_import_id'], + 'rss_imported_guid' => $topic_item['guid'], + 'rss_imported_tid' => $topic['tid'] + ) ); + + /* Are we tracking this forum? If so generate some mailies - yay! */ + $this->post->forum = $this->registry->class_forums->forum_by_id[$row['rss_import_forum_id']]; + + $this->post->sendOutTrackedForumEmails( $row['rss_import_forum_id'], $topic['tid'], $topic['title'], $this->registry->class_forums->forum_by_id[ $row['rss_import_forum_id'] ]['name'], $post['post'], $member['member_id'], $member['members_display_name'] ); + + if( $topic['approved'] == 0 ) + { + $this->post->sendNewTopicForApprovalEmails( $topic['tid'], $topic['title'], $topic['starter_name'], $post['pid'] ); + } + + $this->import_count++; + + /* Increment user? */ + if ( $row['rss_import_inc_pcount'] AND $this->registry->class_forums->forum_by_id[ $row['rss_import_forum_id'] ]['inc_postcount'] ) + { + if ( ! $affected_members[ $member['member_id'] ] OR $affected_members[ $member['member_id'] ] < 0 ) + { + $affected_members[ $member['member_id'] ] = 0; + } + + $affected_members[ $member['member_id'] ]++; + } + } + } + } + + /* Update Members */ + if ( is_array( $affected_members ) and count( $affected_members ) ) + { + foreach( $affected_members as $mid => $inc ) + { + if ( $mid AND $inc ) + { + $this->post->setAuthor( $mid ); + $this->post->incrementUsersPostCount( $inc ); + } + } + } + + /* Recount Stats */ + if ( is_array( $affected_forum_ids ) and count( $affected_forum_ids ) ) + { + foreach( $affected_forum_ids as $fid ) + { + $this->func_mod->forumRecount( $fid ); + } + + $this->func_mod->statsRecount(); + } + + /* Return */ + if ( $return ) + { + $this->registry->output->global_message = $this->lang->words['im_recached']; + + if ( count( $rss_error ) ) + { + $this->registry->output->global_message .= "
    ".implode( "
    ", $rss_error ); + } + + $this->rssImportOverview(); + return; + } + else + { + return TRUE; + } + } + + /** + * Validate an RSS Feed + * + * @param bool $standalone If set to true, data will be queried from the db based on rss_id, otherwise data will be gathered from form fields + * @return void + */ + public function rssImportValidate( $standalone=false ) + { + /* INI */ + $return = 0; + + if( ! $standalone ) + { + /* Get data from the form */ + $rss_import_id = intval( $this->request['rss_import_id'] ); + $rss_import_title = trim( $this->request['rss_import_title'] ); + $rss_import_url = IPSText::stripslashes( trim( $this->request['rss_import_url'] ) ); + $rss_import_mid = trim( $this->request['rss_import_mid'] ); + $rss_import_showlink = IPSText::stripslashes( trim( $this->request['rss_import_showlink'] ) ); + $rss_import_enabled = intval( $this->request['rss_import_enabled'] ); + $rss_import_forum_id = intval( $this->request['rss_import_forum_id'] ); + $rss_import_pergo = intval( $this->request['rss_import_pergo'] ); + $rss_import_time = intval( $this->request['rss_import_time'] ); + $rss_import_topic_open = intval( $this->request['rss_import_topic_open'] ); + $rss_import_topic_hide = intval( $this->request['rss_import_topic_hide'] ); + $rss_import_inc_pcount = intval( $this->request['rss_import_inc_pcount'] ); + $rss_import_topic_pre = $this->request['rss_import_topic_pre']; + $rss_import_charset = $this->request['rss_import_charset']; + $rss_import_allow_html = intval( $this->request['rss_import_allow_html'] ); + $rss_import_auth = intval( $this->request['rss_import_auth'] ); + $rss_import_auth_user = trim( $this->request['rss_import_auth_user'] ) ? trim( $this->request['rss_import_auth_user'] ) : 'Not Needed'; + $rss_import_auth_pass = trim( $this->request['rss_import_auth_pass'] ) ? trim( $this->request['rss_import_auth_pass'] ) : 'Not Needed'; + + $return = 1; + } + else + { + $return = 0; + + /* Get the RSS ID */ + $rss_input_id = $this->request['rss_id'] ? intval($this->request['rss_id']) : 0; + + /* Found an id */ + if( $rss_input_id > 0 ) + { + /* Query the data from the db */ + $rss_data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'rss_import', 'where' => 'rss_import_id=' . $rss_input_id ) ); + + /* Format Data */ + if( ! $rss_data['rss_import_url'] ) + { + $rss_import_url = ""; + $rss_import_auth = ""; + $rss_import_auth_user = ""; + $rss_import_auth_pass = ""; + } + else + { + $standalone = 0; + + $rss_import_id = intval( $rss_data['rss_import_id'] ); + $rss_import_url = $rss_data['rss_import_url']; + + $member = $this->DB->buildAndFetch( array( 'select' => 'members_display_name', 'from' => 'members', 'where' => 'member_id=' . $rss_data['rss_import_mid'] ) ); + + $rss_import_mid = $member['members_display_name']; + + $rss_import_forum_id = intval( $rss_data['rss_import_forum_id'] ); + $rss_import_inc_pcount = intval( $rss_data['rss_import_inc_pcount'] ); + $rss_import_charset = $rss_data['rss_import_charset']; + $rss_import_auth = intval( $rss_data['rss_import_auth'] ); + $rss_import_auth_user = trim( $rss_data['rss_import_auth_user'] ); + $rss_import_auth_pass = trim( $rss_data['rss_import_auth_pass'] ); + } + } + /* Try from URL */ + else + { + $rss_import_url = IPSText::stripslashes( trim( $this->request['rss_url'] ) ); + $rss_import_charset = IPS_DOC_CHAR_SET; + $rss_import_auth = ""; + $rss_import_auth_user = ""; + $rss_import_auth_pass = ""; + } + } + + /* Check for URL */ + if( ! $rss_import_url ) + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'msg' => $this->lang->words['im_nourl'] ) ); + } + else + { + /* INIT */ + if ( ! $this->classes_loaded ) + { + /* Load RSS Class */ + if ( ! is_object( $this->class_rss ) ) + { + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classRss.php', 'classRss' ); + $this->class_rss = new $classToLoad(); + + $this->class_rss->use_sockets = $this->use_sockets; + $this->class_rss->rss_max_show = 100; + } + + $this->classes_loaded = 1; + } + + /* Set this imports doc type */ + $this->class_rss->doc_type = IPS_DOC_CHAR_SET; + $this->class_rss->feed_charset = IPS_DOC_CHAR_SET; + + if( strtolower( $rss_import_charset ) != IPS_DOC_CHAR_SET ) + { + $this->class_rss->convert_charset = 1; + } + else + { + $this->class_rss->convert_charset = 0; + } + + /* Set this import's authentication */ + $this->class_rss->auth_req = $rss_import_auth; + $this->class_rss->auth_user = $rss_import_auth_user; + $this->class_rss->auth_pass = $rss_import_auth_pass; + + /* Clear RSS object's error cache first */ + $this->class_rss->errors = array(); + $this->class_rss->rss_items = array(); + + /* Reset the rss count as this is a new feed */ + $this->class_rss->rss_count = 0; + + /* Parse RSS */ + $this->class_rss->parseFeedFromUrl( $rss_import_url ); + + /* Validate Data - HTTP Status Code/Text */ + if( $this->class_rss->classFileManagement->http_status_code != "200" ) + { + if( $this->class_rss->classFileManagement->http_status_code ) + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', + 'msg' => "{$this->lang->words['im_http']} {$this->class_rss->classFileManagement->http_status_code} ({$this->class_rss->class_file_management->http_status_text})" ) ); + } + } + else + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-valid', + 'msg' => "{$this->lang->words['im_http']} {$this->class_rss->classFileManagement->http_status_code} ({$this->class_rss->class_file_management->http_status_text})" ) ); + } + + /* Display any errors found */ + if ( is_array( $this->class_rss->errors ) and count( $this->class_rss->errors ) ) + { + foreach( $this->class_rss->errors as $error ) + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', 'msg' => $error ) ); + } + } + else + { + if( $this->class_rss->orig_doc_type ) + { + if( !$standalone AND $rss_import_charset ) + { + if( strtolower($rss_import_charset) != strtolower($this->class_rss->orig_doc_type) ) + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', + 'msg' => sprintf( $this->lang->words['im_doc_type'], $this->class_rss->orig_doc_type, $rss_import_charset ) ) ); + } + else + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-valid', + 'msg' => sprintf ( $this->lang->words['im_charset_cor'], $this->class_rss->orig_doc_type ) ) ); + } + } + else + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-valid', + 'msg' => sprintf( $this->lang->words['im_charset'], $this->class_rss->orig_doc_type ) ) ); + } + } + else + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', + 'msg' => $this->lang->words['im_nocharset'] ) ); + } + + /* Channels */ + if ( ! is_array( $this->class_rss->rss_channels ) or ! count( $this->class_rss->rss_channels ) ) + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', + 'msg' => $this->lang->words['im_nochannels'] ) ); + } + else + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-valid', + 'msg' => sprintf( $this->lang->words['im_channelcount'], count($this->class_rss->rss_channels) ) ) ); + + /* Any Items */ + if ( ! is_array( $this->class_rss->rss_items ) or ! count( $this->class_rss->rss_items ) ) + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', + 'msg' => $this->lang->words['im_nocontent'] ) ); + } + else + { + foreach ( $this->class_rss->rss_channels as $channel_id => $channel_data ) + { + if ( is_array( $this->class_rss->rss_items[ $channel_id ] ) and count ($this->class_rss->rss_items[ $channel_id ] ) ) + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-valid', + 'msg' => sprintf ( $this->lang->words['im_topiccount'], count($this->class_rss->rss_items[ $channel_id ]) ) ) ); + + foreach( $this->class_rss->rss_items[ $channel_id ] as $item_data ) + { + if( !$item_data['unixdate'] ) + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-msg', + 'msg' => $this->lang->words['im_nodate'] ) ); + } + + if ( $item_data['unixdate'] < 1 ) + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-msg', + 'msg' => $this->lang->words['im_invdate'] ) ); + } + else if ( $item_data['unixdate'] > time() ) + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-msg', + 'msg' => $this->lang->words['im_invdate'] ) ); + } + + $item_data['content'] = $item_data['content'] ? $item_data['content'] : $item_data['description']; + + if ( ! $item_data['title'] OR ! $item_data['content'] ) + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', + 'msg' => $this->lang->words['im_'] ) ); + } + + break 2; + } + } + } + } + } + } + + if( !$standalone ) + { + if( $rss_import_mid ) + { + $member = $this->DB->buildAndFetch( array( 'select' => 'member_id, name', 'from' => 'members', 'where' => "members_l_display_name='{$rss_import_mid}'" ) ); + + if ( ! $member['member_id'] ) + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', + 'msg' => sprintf( $this->lang->words['im_nomember']. $rss_import_mid ) ) ); + } + } + else + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', + 'msg' => $this->lang->words['im_memval'] ) ); + } + } + + /* Init forums if not already done so */ + if ( ! is_array( $this->registry->class_forums->forum_by_id ) OR !count( $this->registry->class_forums->forum_by_id ) ) + { + $this->registry->class_forums->forums_init(); + } + + if( !$standalone AND $rss_import_forum_id ) + { + if ( ! $this->registry->class_forums->forum_by_id[ $rss_import_forum_id ] ) + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', + 'msg' => $this->lang->words['im_noforum'] ) ); + } + else + { + if ( $this->registry->class_forums->forum_by_id[ $rss_import_forum_id ]['sub_can_post'] != 1 OR $this->registry->class_forums->forum_by_id[ $rss_import_forum_id ]['redirect_on'] == 1 ) + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', + 'msg' => $this->lang->words['im_redforum'] ) ); + } + + if( $rss_import_inc_pcount AND !$this->registry->class_forums->forum_by_id[ $rss_import_forum_id ]['inc_postcount'] ) + { + $this->validate_msg[] = $this->html->rssValidateMsg( array( 'class' => 'rss-feed-invalid', + 'msg' => $this->lang->words['im_noinc'] ) ); + } + } + } + + /* Display */ + if ( ! $return ) + { + if( count( $this->validate_msg ) ) + { + $this->registry->output->global_message = sprintf( $this->lang->words['im_valresults'], IPSText::stripslashes( trim( $this->request['rss_import_url'] ) ), implode( "
     ·", $this->validate_msg ) ); + $this->rssImportOverview(); + return; + } + } + else + { + return TRUE; + } + } + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/rss/index.html b/upload/admin/applications/forums/modules_admin/rss/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_admin/rss/index.html +++ b/upload/admin/applications/forums/modules_admin/rss/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/rss/xml/index.html b/upload/admin/applications/forums/modules_admin/rss/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_admin/rss/xml/index.html +++ b/upload/admin/applications/forums/modules_admin/rss/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/statistics/defaultSection.php b/upload/admin/applications/forums/modules_admin/statistics/defaultSection.php index c8923481..8afe7389 100644 --- a/upload/admin/applications/forums/modules_admin/statistics/defaultSection.php +++ b/upload/admin/applications/forums/modules_admin/statistics/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Default section file for statistics module - * Last Updated: $LastChangedDate: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 14th May 2003 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ */ if ( ! defined( 'IN_IPB' ) ) diff --git a/upload/admin/applications/forums/modules_admin/statistics/index.html b/upload/admin/applications/forums/modules_admin/statistics/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_admin/statistics/index.html +++ b/upload/admin/applications/forums/modules_admin/statistics/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/statistics/stats.php b/upload/admin/applications/forums/modules_admin/statistics/stats.php index 9cc68570..4d53e2a7 100644 --- a/upload/admin/applications/forums/modules_admin/statistics/stats.php +++ b/upload/admin/applications/forums/modules_admin/statistics/stats.php @@ -1,533 +1,562 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_forums_statistics_stats extends ipsCommand -{ - /** - * Array of Month Names - * - * @access private - * @var array - */ - private $month_names; - - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - /* Load HTML and Lang */ - $this->html = $this->registry->output->loadTemplate( 'cp_skin_stats' ); - $this->registry->class_localization->loadLanguageFile( array( 'admin_stats' ) ); - - /* URLs */ - $this->form_code = $this->html->form_code = 'module=statistics&section=stats'; - $this->form_code_js = $this->html->form_code_js = 'module=statistics§ion=stats'; - - /* Setup the month name array */ - $this->month_names = array( 1 => $this->lang->words['stats_jan'], - 2 => $this->lang->words['stats_feb'], - 3 => $this->lang->words['stats_mar'], - 4 => $this->lang->words['stats_apr'], - 5 => $this->lang->words['stats_may'], - 6 => $this->lang->words['stats_jun'], - 7 => $this->lang->words['stats_jul'], - 8 => $this->lang->words['stats_aug'], - 9 => $this->lang->words['stats_sep'], - 10 => $this->lang->words['stats_oct'], - 11 => $this->lang->words['stats_nov'], - 12 => $this->lang->words['stats_dec'] - ); - - /* What to do */ - switch( $this->request['do'] ) - { - case 'show_reg': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_registration' ); - $this->result_screen( 'reg' ); - break; - - case 'show_topic': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_topics' ); - $this->result_screen( 'topic' ); - break; - - case 'topic': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_topics' ); - $this->statsMainScreen( 'topic' ); - break; - - //----------------------------------------- - - case 'show_post': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_posts' ); - $this->result_screen( 'post' ); - break; - - case 'post': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_posts' ); - $this->statsMainScreen( 'post' ); - break; - - //----------------------------------------- - - case 'show_msg': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_msg' ); - $this->result_screen( 'msg' ); - break; - - case 'msg': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_msg' ); - $this->statsMainScreen( 'msg' ); - break; - - //----------------------------------------- - - case 'statsShowTopicViews': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_views' ); - $this->statsShowTopicViews(); - break; - - case 'views': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_views' ); - $this->statsMainScreen( 'views' ); - break; - - //----------------------------------------- - - default: - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_registration' ); - $this->statsMainScreen( 'reg' ); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Display statistics for the selected mode - * - * @access public - * @param string Type of stat screen reg, topic, post, msg - * @return void - **/ - public function result_screen($mode='reg') - { - /* Check the to fields */ - if ( ! checkdate( $this->request['to_month'], $this->request['to_day'], $this->request['to_year'] ) ) - { - $this->registry->output->showError( $this->lang->words['stats_toincorrect'], 11352 ); - } - - /* Check the from fields */ - if ( ! checkdate( $this->request['from_month'] ,$this->request['from_day'] ,$this->request['from_year'] ) ) - { - $this->registry->output->showError( $this->lang->words['stats_fromincorrect'], 11353 ); - } - - /* Create time stamps */ - $to_time = mktime(12 ,0 ,0 ,$this->request['to_month'] ,$this->request['to_day'] ,$this->request['to_year'] ); - $from_time = mktime(12 ,0 ,0 ,$this->request['from_month'] ,$this->request['from_day'] ,$this->request['from_year']); - - /* Get Human Dates */ - $human_to_date = getdate( $to_time ); - $human_from_date = getdate( $from_time ); - - /* Setup based on mode */ - switch( $mode ) - { - case 'reg': - $table = $this->lang->words['stats_reg']; - - $sql_table = 'members'; - $sql_field = 'joined'; - - $this->registry->output->extra_nav[] = array( '', $this->lang->words['stats_reg_nav'] ); - break; - - case 'topic': - $table = $this->lang->words['stats_topic']; - - $sql_table = 'topics'; - $sql_field = 'start_date'; - - $this->registry->output->extra_nav[] = array( '', $this->lang->words['stats_topic_nav'] ); - break; - - case 'post': - $table = $this->lang->words['stats_post']; - - $sql_table = 'posts'; - $sql_field = 'post_date'; - - $this->registry->output->extra_nav[] = array( '', $this->lang->words['stats_post_msg'] ); - break; - - case 'msg': - $table = $this->lang->words['stats_msg']; - - $sql_table = 'message_topics'; - $sql_field = 'mt_date'; - - $this->registry->output->extra_nav[] = array( '', $this->lang->words['stats_msg_nav'] ); - break; - } - - /* Setup Timescale */ - switch( $this->request['timescale'] ) - { - case 'daily': - $sql_date = "%j"; - $php_date = "F jS - Y"; - break; - - case 'monthly': - $sql_date = "%m %Y"; - $php_date = "F Y"; - break; - - default: - // weekly - $sql_date = "%U %Y"; - $php_date = "W [F Y]"; - break; - } - - /* Table Title */ - $title = $this->lang->words[ 'timescale_' . $this->request['timescale'] ] ." {$table} ({$human_from_date['mday']} {$this->month_names[$human_from_date['mon']]} {$human_from_date['year']} {$this->lang->words['stats_to']} {$human_to_date['mday']} {$this->month_names[$human_to_date['mon']]} {$human_to_date['year']})"; - - /* Query the stats */ - $this->DB->build( array( - 'select' => "MAX( {$sql_field} ) as result_maxdate, COUNT(*) as result_count, {$this->DB->buildDateFormat( $this->DB->buildFromUnixtime( $sql_field ), $sql_date )} as result_time", - 'from' => $sql_table, - 'where' => $sql_field . ' > ' . $from_time . ' AND ' . $sql_field . ' < ' . $to_time, - 'group' => $this->DB->buildDateFormat( $this->DB->buildFromUnixtime( $sql_field ), $sql_date ), - //'order' => $sql_field . ' ' . $this->request['sortby'], - ) ); - - - $this->DB->execute(); - - /* Loop through the results */ - $running_total = 0; - $max_result = 0; - $results = array(); - - while( $row = $this->DB->fetch() ) - { - if( $row['result_count'] > $max_result ) - { - $max_result = $row['result_count']; - } - - $running_total += $row['result_count']; - - $results[ $row['result_maxdate'] ] = array( - 'result_maxdate' => $row['result_maxdate'], - 'result_count' => $row['result_count'], - 'result_time' => $row['result_time'], - 'formatted_date' => date( $php_date, $row['result_maxdate'] ), - ); - - } - - if( strtolower($this->request['sortby']) == 'desc' ) - { - krsort( $results ); - } - else - { - ksort( $results ); - } - - /* Build the output rows */ - $rows = array(); - - foreach( $results as $data ) - { - /* Width of the bar */ - $data['_width'] = intval( ( $data['result_count'] / $max_result ) * 100 - 8 ); - - if( $img_width < 1 ) - { - $img_width = 1; - } - - $img_width .= '%'; - - /* Format Date */ - if( $this->request['timescale'] == 'weekly' ) - { - $data['_name'] = $this->lang->words['stats_weekno'] . date( $php_date, $data['result_maxdate'] ); - } - else - { - $data['_name'] = date( $php_date, $data['result_maxdate'] ); - } - - $rows[] = $data; - } - - /* Output */ - $this->registry->output->html .= $this->html->statResultsScreen( $title, $rows, $running_total ); - } - - /** - * Date Selection Screen - * - * @access public - * @param string Type of stat screen reg, topic, post, msg, views - * @return void - **/ - public function statsMainScreen( $mode='reg' ) - { - /* Setup this mode */ - switch( $mode ) - { - case 'reg': - $form_code = 'show_reg'; - $table = $this->lang->words['stats_reg']; - break; - - case 'topic': - $form_code = 'show_topic'; - $table = $this->lang->words['stats_topic']; - break; - - case 'post': - $form_code = 'show_post'; - $table = $this->lang->words['stats_post']; - break; - - case 'msg': - $form_code = 'show_msg'; - $table = $this->lang->words['stats_msg']; - break; - - case 'views': - default: - $form_code = 'statsShowTopicViews'; - $table = $this->lang->words['stats_views']; - break; - } - - /* Setup Dates */ - $old_date = getdate( time() - ( 3600 * 24 * 90 ) ); - $new_date = getdate( time() + ( 3600 * 24 ) ); - - /* Form Elements */ - $form = array(); - - $form['from_month'] = $this->registry->output->formDropdown( "from_month", $this->statsMakeMonth(), $old_date['mon'] ); - $form['from_day'] = $this->registry->output->formDropdown( "from_day" , $this->statsMakeDay() , $old_date['mday'] ); - $form['from_year'] = $this->registry->output->formDropdown( "from_year" , $this->statsMakeYear() , $old_date['year'] ); - $form['to_month'] = $this->registry->output->formDropdown( "to_month" , $this->statsMakeMonth(), $new_date['mon'] ); - $form['to_day'] = $this->registry->output->formDropdown( "to_day" , $this->statsMakeDay() , $new_date['mday'] ); - $form['to_year'] = $this->registry->output->formDropdown( "to_year" , $this->statsMakeYear() , $new_date['year'] ); - $form['timescale'] = $this->registry->output->formDropdown( "timescale" , array( 0 => array( 'daily', $this->lang->words['stats_daily']), 1 => array( 'weekly', $this->lang->words['stats_weekly'] ), 2 => array( 'monthly', $this->lang->words['stats_monthly'] ) ) ); - $form['sortby'] = $this->registry->output->formDropdown( "sortby" , array( 0 => array( 'asc', $this->lang->words['stats_asc']), 1 => array( 'desc', $this->lang->words['stats_desc'] ) ), 'desc' ); - - /* Output */ - $this->registry->output->html .= $this->html->statMainScreeen( $form_code, $table, $form ); - } - - /** - * Show topic view stats - * - * @access public - * @return void - **/ - public function statsShowTopicViews() - { - /* Check the to fields */ - if ( ! checkdate( $this->request['to_month'], $this->request['to_day'], $this->request['to_year'] ) ) - { - $this->registry->output->showError( $this->lang->words['stats_toincorrect'], 11354 ); - } - - /* Check the from fields */ - if ( ! checkdate( $this->request['from_month'] ,$this->request['from_day'] ,$this->request['from_year'] ) ) - { - $this->registry->output->showError( $this->lang->words['stats_fromincorrect'], 11355 ); - } - - /* Create time stamps */ - $to_time = mktime(0 ,0 ,0 ,$this->request['to_month'] ,$this->request['to_day'] ,$this->request['to_year'] ); - $from_time = mktime(0 ,0 ,0 ,$this->request['from_month'] ,$this->request['from_day'] ,$this->request['from_year']); - - /* Get Human Dates */ - $human_to_date = getdate( $to_time ); - $human_from_date = getdate( $from_time ); - - /* Title */ - $title = "{$this->lang->words['stats_views_nav']} ({$human_from_date['mday']} {$this->month_names[$human_from_date['mon']]} {$human_from_date['year']} {$this->lang->words['stats_to']} {$human_to_date['mday']} {$this->month_names[$human_to_date['mon']]} {$human_to_date['year']})"; - - /* Query the topic stats */ - $this->DB->build( array( - 'select' => 'SUM(t.views) as result_count, t.forum_id', - 'from' => array( 'topics' => 't' ), - 'where' => "t.start_date > {$from_time} AND t.start_date < {$to_time}", - 'group' => 't.forum_id', - 'order' => 'result_count ' . $this->request['sortby'], - 'add_join' => array( - array( - 'select' => 'f.name as result_name', - 'from' => array( 'forums' => 'f' ), - 'where' => 'f.id=t.forum_id', - 'type' => 'left' - ) - ) - ) ); - $this->DB->execute(); - - /* Loop through the results */ - $running_total = 0; - $max_result = 0; - $results = array(); - - while( $row = $this->DB->fetch() ) - { - if( $row['result_count'] > $max_result ) - { - $max_result = $row['result_count']; - } - - $running_total += $row['result_count']; - - $results[] = array( - 'result_maxdate' => $row['result_maxdate'], - 'result_count' => $row['result_count'], - 'result_time' => $row['result_time'], - 'result_name' => $row['result_name'], - ); - - } - - /* Build the output rows */ - $rows = array(); - - foreach( $results as $data ) - { - /* Width of the bar */ - $data['_width'] = intval( ( $data['result_count'] / $max_result ) * 100 - 8 ); - - if( $img_width < 1 ) - { - $img_width = 1; - } - - $img_width .= '%'; - - /* Title */ - $data['_name'] = $data['result_name']; - - $rows[] = $data; - } - - /* Output */ - $this->registry->output->extra_nav[] = array( '', 'Topic Views' ); - $this->registry->output->html .= $this->html->statResultsScreen( $title, $rows, $running_total ); - } - - /** - * Create the drop down options for the year select - * - * @access public - * @return array - **/ - public function statsMakeYear() - { - $time_now = getdate(); - - $return = array(); - - $start_year = 2002; - - $latest_year = intval($time_now['year']); - - if ($latest_year == $start_year) - { - $start_year -= 1; - } - - for ( $y = $start_year; $y <= $latest_year; $y++ ) - { - $return[] = array( $y, $y); - } - - return $return; - } - - /** - * Create the drop down options for the month select - * - * @access public - * @return array - **/ - public function statsMakeMonth() - { - $return = array(); - - for ( $m = 1 ; $m <= 12; $m++ ) - { - $return[] = array( $m, $this->month_names[$m] ); - } - - return $return; - } - - /** - * Create the drop down options for the day select - * - * @access public - * @return array - **/ - public function statsMakeDay() - { - $return = array(); - - for ( $d = 1 ; $d <= 31; $d++ ) - { - $return[] = array( $d, $d ); - } - - return $return; - } - - - + + * Invision Power Services + * IP.Board v3.1.4 + * Forum Statistics + * Last Updated: $Date: 2010-09-13 05:53:37 -0400 (Mon, 13 Sep 2010) $ + * + * + * @author $Author: terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 6854 $ + */ + + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_forums_statistics_stats extends ipsCommand +{ + /** + * Array of Month Names + * + * @access private + * @var array + */ + protected $month_names; + + /** + * Skin object + * + * @access private + * @var object Skin templates + */ + protected $html; + + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load HTML and Lang */ + $this->html = $this->registry->output->loadTemplate( 'cp_skin_stats' ); + $this->registry->class_localization->loadLanguageFile( array( 'admin_stats' ) ); + + /* URLs */ + $this->form_code = $this->html->form_code = 'module=statistics&section=stats'; + $this->form_code_js = $this->html->form_code_js = 'module=statistics§ion=stats'; + + /* Setup the month name array */ + $this->month_names = array( 1 => $this->lang->words['stats_jan'], + 2 => $this->lang->words['stats_feb'], + 3 => $this->lang->words['stats_mar'], + 4 => $this->lang->words['stats_apr'], + 5 => $this->lang->words['stats_may'], + 6 => $this->lang->words['stats_jun'], + 7 => $this->lang->words['stats_jul'], + 8 => $this->lang->words['stats_aug'], + 9 => $this->lang->words['stats_sep'], + 10 => $this->lang->words['stats_oct'], + 11 => $this->lang->words['stats_nov'], + 12 => $this->lang->words['stats_dec'] + ); + + /* Fix up navigation bar */ + $this->registry->output->core_nav = array(); + $this->registry->output->ignoreCoreNav = true; + $this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=statistics', $this->lang->words['stats_title'] ); + + /* What to do */ + switch( $this->request['do'] ) + { + case 'show_reg': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_registration' ); + $this->result_screen( 'reg' ); + break; + + case 'show_topic': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_topics' ); + $this->result_screen( 'topic' ); + break; + + case 'topic': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_topics' ); + $this->statsMainScreen( 'topic' ); + break; + + //----------------------------------------- + + case 'show_post': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_posts' ); + $this->result_screen( 'post' ); + break; + + case 'post': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_posts' ); + $this->statsMainScreen( 'post' ); + break; + + //----------------------------------------- + + case 'show_msg': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_msg' ); + $this->result_screen( 'msg' ); + break; + + case 'msg': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_msg' ); + $this->statsMainScreen( 'msg' ); + break; + + //----------------------------------------- + + case 'statsShowTopicViews': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_views' ); + $this->statsShowTopicViews(); + break; + + case 'views': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_views' ); + $this->statsMainScreen( 'views' ); + break; + + //----------------------------------------- + + default: + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'stats_registration' ); + $this->statsMainScreen( 'reg' ); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Display a graph of spam service stats + * + * @access public + * @return void + **/ + + /** + * Display statistics for the selected mode + * + * @access public + * @param string Type of stat screen reg, topic, post, msg + * @return void + **/ + public function result_screen($mode='reg') + { + /* Check the to fields */ + if ( ! checkdate( $this->request['to_month'], $this->request['to_day'], $this->request['to_year'] ) ) + { + $this->registry->output->showError( $this->lang->words['stats_toincorrect'], 11352 ); + } + + /* Check the from fields */ + if ( ! checkdate( $this->request['from_month'] ,$this->request['from_day'] ,$this->request['from_year'] ) ) + { + $this->registry->output->showError( $this->lang->words['stats_fromincorrect'], 11353 ); + } + + /* Create time stamps */ + $to_time = mktime(12 ,0 ,0 ,$this->request['to_month'] ,$this->request['to_day'] ,$this->request['to_year'] ); + $from_time = mktime(12 ,0 ,0 ,$this->request['from_month'] ,$this->request['from_day'] ,$this->request['from_year']); + + /* Get Human Dates */ + $human_to_date = getdate( $to_time ); + $human_from_date = getdate( $from_time ); + + /* Setup based on mode */ + switch( $mode ) + { + case 'reg': + $table = $this->lang->words['stats_reg']; + + $sql_table = 'members'; + $sql_field = 'joined'; + + $this->registry->output->extra_nav[] = array( $this->settings['base_url'] . 'module=statistics&section=stats&do=reg', $table ); + $this->registry->output->extra_nav[] = array( '', $this->lang->words['stats_reg_nav'] ); + break; + + case 'topic': + $table = $this->lang->words['stats_topic']; + + $sql_table = 'topics'; + $sql_field = 'start_date'; + + $this->registry->output->extra_nav[] = array( $this->settings['base_url'] . 'module=statistics&section=stats&do=topic', $table ); + $this->registry->output->extra_nav[] = array( '', $this->lang->words['stats_topic_nav'] ); + break; + + case 'post': + $table = $this->lang->words['stats_post']; + + $sql_table = 'posts'; + $sql_field = 'post_date'; + + $this->registry->output->extra_nav[] = array( $this->settings['base_url'] . 'module=statistics&section=stats&do=post', $table ); + $this->registry->output->extra_nav[] = array( '', $this->lang->words['stats_post_nav'] ); + break; + + case 'msg': + $table = $this->lang->words['stats_msg']; + + $sql_table = 'message_topics'; + $sql_field = 'mt_date'; + + $this->registry->output->extra_nav[] = array( $this->settings['base_url'] . 'module=statistics&section=stats&do=msg', $table ); + $this->registry->output->extra_nav[] = array( '', $this->lang->words['stats_msg_nav'] ); + break; + } + + /* Setup Timescale */ + switch( $this->request['timescale'] ) + { + case 'daily': + $sql_date = "%j %Y"; + $php_date = "F jS - Y"; + break; + + case 'monthly': + $sql_date = "%m %Y"; + $php_date = "F Y"; + break; + + default: + // weekly + $sql_date = "%U %Y"; + $php_date = "W [F Y]"; + break; + } + + /* Table Title */ + $title = $this->lang->words[ 'timescale_' . $this->request['timescale'] ] ." {$table} ({$human_from_date['mday']} {$this->month_names[$human_from_date['mon']]} {$human_from_date['year']} {$this->lang->words['stats_to']} {$human_to_date['mday']} {$this->month_names[$human_to_date['mon']]} {$human_to_date['year']})"; + + /* Offset */ + $offset = $this->registry->getClass('class_localization')->getTimeOffset(); + + /* Query the stats */ + $this->DB->build( array( + 'select' => "MAX( {$sql_field} ) + {$offset} as result_maxdate, COUNT(*) as result_count, {$this->DB->buildDateFormat( $this->DB->buildFromUnixtime( $sql_field ), $sql_date )} as result_time", + 'from' => $sql_table, + 'where' => $sql_field . ' > ' . $from_time . ' AND ' . $sql_field . ' < ' . $to_time, + 'group' => 'result_time', + //'group' => $this->DB->buildDateFormat( $this->DB->buildFromUnixtime( $sql_field ), $sql_date ), + //'order' => $sql_field . ' ' . $this->request['sortby'], + ) ); + + + $this->DB->execute(); + + /* Loop through the results */ + $running_total = 0; + $max_result = 0; + $results = array(); + + while( $row = $this->DB->fetch() ) + { + if( $row['result_count'] > $max_result ) + { + $max_result = $row['result_count']; + } + + $running_total += $row['result_count']; + + $results[ $row['result_maxdate'] ] = array( + 'result_maxdate' => $row['result_maxdate'], + 'result_count' => $row['result_count'], + 'result_time' => $row['result_time'], + 'formatted_date' => date( $php_date, $row['result_maxdate'] ), + ); + + } + + if( strtolower($this->request['sortby']) == 'desc' ) + { + krsort( $results ); + } + else + { + ksort( $results ); + } + + /* Build the output rows */ + $rows = array(); + + foreach( $results as $data ) + { + /* Width of the bar */ + $data['_width'] = intval( ( $data['result_count'] / $max_result ) * 100 - 8 ); + + if( $data['_width'] < 1 ) + { + $data['_width'] = 1; + } + + $data['_width'] .= '%'; + + /* Format Date */ + if( $this->request['timescale'] == 'weekly' ) + { + $data['_name'] = $this->lang->words['stats_weekno'] . date( $php_date, $data['result_maxdate'] ); + } + else + { + $data['_name'] = date( $php_date, $data['result_maxdate'] ); + } + + $rows[] = $data; + } + + /* Output */ + $this->registry->output->html .= $this->html->statResultsScreen( $title, $rows, $running_total ); + } + + /** + * Date Selection Screen + * + * @access public + * @param string Type of stat screen reg, topic, post, msg, views + * @return void + **/ + public function statsMainScreen( $mode='reg' ) + { + /* Setup this mode */ + switch( $mode ) + { + case 'reg': + $form_code = 'show_reg'; + $table = $this->lang->words['stats_reg']; + break; + + case 'topic': + $form_code = 'show_topic'; + $table = $this->lang->words['stats_topic']; + break; + + case 'post': + $form_code = 'show_post'; + $table = $this->lang->words['stats_post']; + break; + + case 'msg': + $form_code = 'show_msg'; + $table = $this->lang->words['stats_msg']; + break; + + case 'views': + default: + $form_code = 'statsShowTopicViews'; + $table = $this->lang->words['stats_views']; + break; + } + + /* Setup Dates */ + $old_date = getdate( time() - ( 3600 * 24 * 90 ) ); + $new_date = getdate( time() + ( 3600 * 24 ) ); + + /* Form Elements */ + $form = array(); + + $form['from_month'] = $this->registry->output->formDropdown( "from_month", $this->statsMakeMonth(), $old_date['mon'] ); + $form['from_day'] = $this->registry->output->formDropdown( "from_day" , $this->statsMakeDay() , $old_date['mday'] ); + $form['from_year'] = $this->registry->output->formDropdown( "from_year" , $this->statsMakeYear() , $old_date['year'] ); + $form['to_month'] = $this->registry->output->formDropdown( "to_month" , $this->statsMakeMonth(), $new_date['mon'] ); + $form['to_day'] = $this->registry->output->formDropdown( "to_day" , $this->statsMakeDay() , $new_date['mday'] ); + $form['to_year'] = $this->registry->output->formDropdown( "to_year" , $this->statsMakeYear() , $new_date['year'] ); + $form['timescale'] = $this->registry->output->formDropdown( "timescale" , array( 0 => array( 'daily', $this->lang->words['stats_daily']), 1 => array( 'weekly', $this->lang->words['stats_weekly'] ), 2 => array( 'monthly', $this->lang->words['stats_monthly'] ) ) ); + $form['sortby'] = $this->registry->output->formDropdown( "sortby" , array( 0 => array( 'asc', $this->lang->words['stats_asc']), 1 => array( 'desc', $this->lang->words['stats_desc'] ) ), 'desc' ); + + /* Output */ + $this->registry->output->html .= $this->html->statMainScreeen( $form_code, $table, $form ); + + /* Navigation */ + $this->registry->output->extra_nav[] = array( '', $table ); + } + + /** + * Show topic view stats + * + * @access public + * @return void + **/ + public function statsShowTopicViews() + { + /* Check the to fields */ + if ( ! checkdate( $this->request['to_month'], $this->request['to_day'], $this->request['to_year'] ) ) + { + $this->registry->output->showError( $this->lang->words['stats_toincorrect'], 11354 ); + } + + /* Check the from fields */ + if ( ! checkdate( $this->request['from_month'] ,$this->request['from_day'] ,$this->request['from_year'] ) ) + { + $this->registry->output->showError( $this->lang->words['stats_fromincorrect'], 11355 ); + } + + /* Create time stamps */ + $to_time = mktime(0 ,0 ,0 ,$this->request['to_month'] ,$this->request['to_day'] ,$this->request['to_year'] ); + $from_time = mktime(0 ,0 ,0 ,$this->request['from_month'] ,$this->request['from_day'] ,$this->request['from_year']); + + /* Get Human Dates */ + $human_to_date = getdate( $to_time ); + $human_from_date = getdate( $from_time ); + + /* Title */ + $title = "{$this->lang->words['stats_views_nav']} ({$human_from_date['mday']} {$this->month_names[$human_from_date['mon']]} {$human_from_date['year']} {$this->lang->words['stats_to']} {$human_to_date['mday']} {$this->month_names[$human_to_date['mon']]} {$human_to_date['year']})"; + + /* Query the topic stats */ + $this->DB->build( array( + 'select' => 'SUM(t.views) as result_count, t.forum_id', + 'from' => array( 'topics' => 't' ), + 'where' => "t.start_date > {$from_time} AND t.start_date < {$to_time}", + 'group' => 't.forum_id', + 'order' => 'result_count ' . $this->request['sortby'], + 'add_join' => array( + array( + 'select' => 'f.name as result_name', + 'from' => array( 'forums' => 'f' ), + 'where' => 'f.id=t.forum_id', + 'type' => 'left' + ) + ) + ) ); + $this->DB->execute(); + + /* Loop through the results */ + $running_total = 0; + $max_result = 0; + $results = array(); + $running_total = 0; + + while( $row = $this->DB->fetch() ) + { + if( $row['result_count'] > $max_result ) + { + $max_result = $row['result_count']; + } + + $running_total += $row['result_count']; + + $results[] = array( + 'result_maxdate' => $row['result_maxdate'], + 'result_count' => $row['result_count'], + 'result_time' => $row['result_time'], + 'result_name' => $row['result_name'], + ); + + } + + /* Build the output rows */ + $rows = array(); + + foreach( $results as $data ) + { + $running_total += $row['result_count']; + + /* Width of the bar */ + $data['_width'] = intval( ( $data['result_count'] / $max_result ) * 100 - 8 ); + + if( $data['_width'] < 1 ) + { + $data['_width'] = 1; + } + + $data['_width'] .= '%'; + + /* Title */ + $data['_name'] = $data['result_name']; + + $rows[] = $data; + } + + /* Output */ + $this->registry->output->extra_nav[] = array( $this->settings['base_url'] . 'module=statistics&section=stats&do=views', $this->lang->words['stats_views'] ); + $this->registry->output->extra_nav[] = array( '', $this->lang->words['stats_views_nav'] ); + $this->registry->output->html .= $this->html->statResultsScreen( $title, $rows, $running_total ); + } + + /** + * Create the drop down options for the year select + * + * @access public + * @return array + **/ + public function statsMakeYear() + { + $time_now = getdate(); + + $return = array(); + + $start_year = 2002; + + $latest_year = intval($time_now['year'])+1; + + if ($latest_year == $start_year) + { + $start_year -= 1; + } + + for ( $y = $start_year; $y <= $latest_year; $y++ ) + { + $return[] = array( $y, $y); + } + + return $return; + } + + /** + * Create the drop down options for the month select + * + * @access public + * @return array + **/ + public function statsMakeMonth() + { + $return = array(); + + for ( $m = 1 ; $m <= 12; $m++ ) + { + $return[] = array( $m, $this->month_names[$m] ); + } + + return $return; + } + + /** + * Create the drop down options for the day select + * + * @access public + * @return array + **/ + public function statsMakeDay() + { + $return = array(); + + for ( $d = 1 ; $d <= 31; $d++ ) + { + $return[] = array( $d, $d ); + } + + return $return; + } + + + } \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/statistics/xml/index.html b/upload/admin/applications/forums/modules_admin/statistics/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_admin/statistics/xml/index.html +++ b/upload/admin/applications/forums/modules_admin/statistics/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/statistics/xml/menu.xml b/upload/admin/applications/forums/modules_admin/statistics/xml/menu.xml index d327a147..6b1694ec 100644 --- a/upload/admin/applications/forums/modules_admin/statistics/xml/menu.xml +++ b/upload/admin/applications/forums/modules_admin/statistics/xml/menu.xml @@ -60,6 +60,6 @@ 0 - + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/statistics/xml/permissions.xml b/upload/admin/applications/forums/modules_admin/statistics/xml/permissions.xml index ff54286b..0820947c 100644 --- a/upload/admin/applications/forums/modules_admin/statistics/xml/permissions.xml +++ b/upload/admin/applications/forums/modules_admin/statistics/xml/permissions.xml @@ -1,28 +1,28 @@ - - - - Управление статистикой - - - stats_topics - Может просматривать отчет о новых темах? - - - stats_registration - Может просматривать отчет о новых регистрациях? - - - stats_posts - Может просматривать отчет о новых сообщениях? - - - stats_msg - Может просматривать отчет о новых личных сообщениях? - - - stats_views - Может просматривать отчет о просмотрах тем? - - - + + + + Управление статистикой + + + stats_topics + Может просматривать отчет о новых темах? + + + stats_registration + Может просматривать отчет о новых регистрациях? + + + stats_posts + Может просматривать отчет о новых сообщениях? + + + stats_msg + Может просматривать отчет о новых личных сообщениях? + + + stats_views + Может просматривать отчет о просмотрах тем? + + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/tools/defaultSection.php b/upload/admin/applications/forums/modules_admin/tools/defaultSection.php index dc657b07..a8f8e04e 100644 --- a/upload/admin/applications/forums/modules_admin/tools/defaultSection.php +++ b/upload/admin/applications/forums/modules_admin/tools/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Default section for tools module - * Last Updated: $LastChangedDate: 2008-12-18 10:27:04 -0500 (Thu, 18 Dec 2008) $ + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 14th May 2003 - * @version $Rev: 3491 $ + * @version $Rev: 5713 $ */ if ( ! defined( 'IN_IPB' ) ) diff --git a/upload/admin/applications/forums/modules_admin/tools/index.html b/upload/admin/applications/forums/modules_admin/tools/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_admin/tools/index.html +++ b/upload/admin/applications/forums/modules_admin/tools/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/tools/tools.php b/upload/admin/applications/forums/modules_admin/tools/tools.php index dd6f1deb..d68ca7ff 100644 --- a/upload/admin/applications/forums/modules_admin/tools/tools.php +++ b/upload/admin/applications/forums/modules_admin/tools/tools.php @@ -1,716 +1,809 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - - -class admin_forums_tools_tools extends ipsCommand -{ - /** - * Skin object - * - * @access private - * @var object Skin templates - */ - private $html; - - /** - * Shortcut for url - * - * @access private - * @var string URL shortcut - */ - private $form_code; - - /** - * Shortcut for url (javascript) - * - * @access private - * @var string JS URL shortcut - */ - private $form_code_js; - - /** - * Editor object - * - * @access private - * @var object Editor library - */ - private $han_editor; - - /** - * Trash can forum id - * - * @access private - * @var integer Trash can forum - */ - private $trash_forum = 0; - - - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load skin - //----------------------------------------- - - $this->html = $this->registry->output->loadTemplate('cp_skin_member_form'); - - //----------------------------------------- - // Set up stuff - //----------------------------------------- - - $this->form_code = $this->html->form_code = 'module=tools&section=tools'; - $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=tools'; - - //----------------------------------------- - // Load lang - //----------------------------------------- - - ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_forums' ), 'forums' ); - - ///----------------------------------------- - // What to do... - //----------------------------------------- - - switch( $this->request['do'] ) - { - default: - case 'deleteposts': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ftools_deleteposts' ); - $this->_deletePostsStart(); - break; - - case 'deletesubscriptions': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ftools_deletesubscriptions' ); - $this->_deleteSubscriptions(); - break; - - case 'clearforumsubs': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ftools_clearforumsubs' ); - $this->_deleteForumSubscriptions(); - break; - - case 'deleteposts_process': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ftools_deleteposts' ); - $this->_deletePostsDo(); - break; - - case 'new_avatar': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'member_photo', 'members', 'members' ); - $this->_processAvatar(); - break; - } - - //----------------------------------------- - // Pass to CP output hander - //----------------------------------------- - - $this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper(); - $this->registry->getClass('output')->sendOutput(); - - } - - /** - * Delete a forum's email subscriptions - * - * @access private - * @return void - * @author Brandon Farber - * @since IPB3 / 22 Oct 2008 - */ - private function _deleteForumSubscriptions() - { - /** - * Get members watching forums so we can recache em.. - */ - $forum_id = intval( $this->request['f'] ); - $members = array(); - - $this->DB->build( array( 'select' => 'member_id', 'from' => 'forum_tracker', 'where' => 'forum_id=' . $forum_id ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $members[] = $r['member_id']; - } - - $this->DB->delete( 'forum_tracker', 'forum_id=' . $forum_id ); - - foreach( $members as $mid ) - { - $this->registry->getClass('class_forums')->recacheWatchedForums( $mid ); - } - - /** - * Topics is teh suck...gotta get em first to delete em - */ - $toDelete = array(); - - $this->DB->build( array( 'select' => 'tr.trid', - 'from' => array( 'tracker' => 'tr' ), - 'where' => 't.forum_id=' . $forum_id, - 'add_join' => array( - array( - 'from' => array( 'topics' => 't' ), - 'where' => 't.tid=tr.topic_id', - 'type' => 'left' - ) - ) - ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $toDelete[] = $r['trid']; - } - - if( count($toDelete) ) - { - $this->DB->delete( 'tracker', 'trid IN(' . implode( ',', $toDelete ) . ')' ); - } - - $this->registry->output->redirect( $this->settings['_base_url'] . "app=forums", $this->lang->words['m_subsf_redirect'] ); - - } - - /** - * Delete a member's email subscriptions - * - * @access private - * @return void - * @author Brandon Farber - * @since IPB3 / 22 Oct 2008 - */ - private function _deleteSubscriptions() - { - $member_id = intval( $this->request['member_id'] ); - - $this->DB->delete( 'tracker', 'member_id=' . $member_id ); - $this->DB->delete( 'forum_tracker', 'member_id=' . $member_id ); - - $this->registry->output->redirect( $this->settings['_base_url'] . "app=members&module=members&section=members&do=viewmember&member_id={$this->request['member_id']}", $this->lang->words['m_subs_redirect'] ); - } - - /** - * Update a member's avatar - * - * @access private - * @return void [Outputs to screen] - * @author Brandon Farber - * @since IPB3 / 9 June 2008 - */ - private function _processAvatar() - { - $member_id = intval( $this->request['member_id'] ); - - try - { - IPSMember::getFunction()->saveNewAvatar( $member_id ); - } - catch( Exception $error ) - { - switch ( $error->getMessage() ) - { - case 'NO_MEMBER_ID': - $this->registry->output->showError( $this->lang->words['t_noid'], 11356 ); - break; - case 'NO_PERMISSION': - $this->registry->output->showError( $this->lang->words['t_permav'], 11357, true ); - break; - case 'UPLOAD_NO_IMAGE': - $this->registry->output->showError( $this->lang->words['t_uploadfail1'], 11358 ); - break; - case 'UPLOAD_INVALID_FILE_EXT': - $this->registry->output->showError( $this->lang->words['t_uploadfail2'], 11359 ); - break; - case 'UPLOAD_TOO_LARGE': - $this->registry->output->showError( $this->lang->words['t_uploadfail3'], 11360 ); - break; - case 'UPLOAD_CANT_BE_MOVED': - $this->registry->output->showError( $this->lang->words['t_uploadfail4'], 11361 ); - break; - case 'UPLOAD_NOT_IMAGE': - $this->registry->output->showError( $this->lang->words['t_uploadfail5'], 2131, true ); - break; - case 'NO_AVATAR_TO_SAVE': - $this->registry->output->showError( $this->lang->words['t_noav'], 11362 ); - break; - case 'INVALID_FILE_EXT': - $this->registry->output->showError( $this->lang->words['t_badavext'], 11362 ); - break; - } - } - - $this->registry->output->redirect( $this->settings['_base_url'] . "app=members&module=members&section=members&do=viewmember&member_id={$this->request['member_id']}", $this->lang->words['t_avupdated'] ); - } - - /** - * Delete a member's posts [process] - * - * @access private - * @return void [Outputs to screen] - */ - private function _deletePostsDo() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $member_id = intval( $this->request['member_id'] ); - $delete_posts = intval( $this->request['dposts'] ); - $delete_topics = intval( $this->request['dtopics'] ); - $end = intval( $this->request['dpergo'] ) ? intval( $this->request['dpergo'] ) : 50; - $init = intval( $this->request['init'] ); - $done = 0; - $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; - $forums_affected = array(); - $topics_affected = array(); - $img = '- '; - $posts_deleted = 0; - $topics_deleted = 0; - - //-------------------------------------------- - // NOT INIT YET? - //-------------------------------------------- - - if ( ! $init ) - { - $url = $this->settings['base_url'] . '&' . $this->form_code_js . "&do=deleteposts_process&dpergo=" . $this->request['dpergo'] - ."&st=0" - ."&init=1" - ."&dposts={$delete_posts}" - ."&dtopics={$delete_topics}" - ."&use_trash_can=".intval($this->request['use_trash_can']) - ."&member_id={$member_id}"; - - $this->registry->output->multipleRedirectInit( $url ); - } - - //-------------------------------------------- - // Not loaded the func? - //-------------------------------------------- - - if ( ! is_object( $mod_func ) ) - { - require_once( IPS_ROOT_PATH . 'sources/classes/itemmarking/classItemMarking.php' ); - $this->registry->setClass( 'classItemMarking', new classItemMarking( $this->registry ) ); - - require_once( IPSLib::getAppDir('forums') . '/sources/classes/moderate.php' ); - $mod_func = new moderatorLibrary( $this->registry ); - } - - //----------------------------------------- - // Trash-can set up - //----------------------------------------- - - $trash_append = ''; - - if ( $this->settings['forum_trash_can_enable'] and $this->settings['forum_trash_can_id'] ) - { - if ( $this->registry->class_forums->forum_by_id[ $this->settings['forum_trash_can_id'] ]['sub_can_post'] ) - { - if ( $this->request['use_trash_can'] ) - { - $this->trash_forum = $this->settings['forum_trash_can_id']; - $trash_append = " AND forum_id<>{$this->trash_forum}"; - } - } - } - - //----------------------------------------- - // Get member - //----------------------------------------- - - $member = IPSMember::load( $member_id, 'core' ); - - //----------------------------------------- - // Avoid limit... - //----------------------------------------- - - $this->DB->build( array( 'select' => 'p.*', - 'from' => array( 'posts' => 'p' ), - 'where' => "p.author_id={$member_id}{$trash_append}", - 'order' => 'p.pid ASC', - 'limit' => array( $start, $end ), - 'add_join' => array( - array( - 'select' => 't.*', - 'from' => array( 'topics' => 't' ), - 'where' => 't.tid=p.topic_id', - 'type' => 'left', - ) - ) - ) ); - $outer = $this->DB->execute(); - - //----------------------------------------- - // Process... - //----------------------------------------- - - while( $r = $this->DB->fetch( $outer ) ) - { - //----------------------------------------- - // Copy record to topic array - //----------------------------------------- - - $topic = $r; - - //----------------------------------------- - // No longer a topic? - //----------------------------------------- - - if ( ! $topic['tid'] ) - { - continue; - } - - $done++; - - //----------------------------------------- - // Get number of MID posters - //----------------------------------------- - - $topic_i_posted = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count', - 'from' => 'posts', - 'where' => 'author_id=' . $member_id . ' AND topic_id=' . $r['topic_id'] ) ); - - //----------------------------------------- - // Aready deleted this topic? - //----------------------------------------- - - if ( ! $topic_i_posted['count']) - { - continue; - } - - //----------------------------------------- - // First check: Our topic and no other replies? - //----------------------------------------- - - if ( $topic['starter_id'] == $member_id AND $topic_i_posted['count'] == ( $topic['posts'] + 1 ) ) - { - //----------------------------------------- - // Ok, deleting topics or posts? - //----------------------------------------- - - if ( ( $delete_posts OR $delete_topics ) AND ( $this->trash_forum and $this->trash_forum != $topic['forum_id'] ) ) - { - //----------------------------------------- - // Move, don't delete - //----------------------------------------- - - $mod_func->topicMove( $r['topic_id'], $topic['forum_id'], $this->trash_forum ); - - $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; - $forums_affected[ $this->trash_forum ] = $this->trash_forum; - - $topics_deleted++; - $posts_deleted += $topic_i_posted['count']; - } - else if ( $delete_posts OR $delete_topics ) - { - $this->DB->delete( 'posts', 'author_id=' . $member_id . ' AND topic_id=' . $r['topic_id'] ); - $this->DB->delete('topics', 'tid=' . $r['topic_id'] ); - - $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; - $topics_deleted++; - $posts_deleted += $topic_i_posted['count']; - } - } - - //----------------------------------------- - // Is this a topic we started? - //----------------------------------------- - - else if ( $topic['starter_id'] == $member_id AND $delete_topics ) - { - if ( $this->trash_forum and $this->trash_forum != $topic['forum_id'] ) - { - //----------------------------------------- - // Move, don't delete - //----------------------------------------- - - $mod_func->topicMove( $r['topic_id'], $topic['forum_id'], $this->trash_forum ); - - $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; - $forums_affected[ $this->trash_forum ] = $this->trash_forum; - - $topics_deleted++; - $posts_deleted += $topic_i_posted['count']; - } - else - { - $this->DB->delete( 'posts', 'topic_id=' . $r['topic_id'] ); - $this->DB->delete( 'topics', 'tid=' . $r['topic_id'] ); - - $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; - $topics_deleted++; - $posts_deleted += $topic['posts'] + 1; - } - } - - //----------------------------------------- - // Just delete the post, then - //----------------------------------------- - - else if ( $delete_posts AND ! $r['new_topic'] ) - { - if ( $this->trash_forum and $this->trash_forum != $topic['forum_id'] ) - { - //----------------------------------------- - // Set up and pass to split topic handler - //----------------------------------------- - - $new_title = $this->lang->words['acp_posts_deleted_from'] . $topic['title']; - $new_desc = $this->lang->words['acp_posts_deleted_from_tid'] . $topic['tid']; - - //----------------------------------------- - // Is first post queued? - //----------------------------------------- - - $topic_approved = 1; - - $first_post = $this->DB->buildAndFetch( array( 'select' => 'pid, queued', - 'from' => 'posts', - 'where' => "pid=" . $r['pid'], - ) ); - - if( $first_post['queued'] ) - { - $topic_approved = 0; - $this->DB->update( 'posts', array( 'queued' => 0 ), 'pid=' . $first_post['pid'] ); - } - - //----------------------------------------- - // Complete a new dummy topic - //----------------------------------------- - - $this->DB->insert( 'topics', array( - 'title' => $new_title, - 'description' => $new_desc, - 'state' => 'open', - 'posts' => 0, - 'starter_id' => $member_id, - 'starter_name' => $member['members_display_name'], - 'start_date' => time(), - 'last_poster_id' => $member_id, - 'last_poster_name' => $member['members_display_name'], - 'last_post' => time(), - 'icon_id' => 0, - 'author_mode' => 1, - 'poll_state' => 0, - 'last_vote' => 0, - 'views' => 0, - 'forum_id' => $this->trash_forum, - 'approved' => $topic_approved, - 'pinned' => 0, - ) ); - - $new_topic_id = $this->DB->getInsertId(); - - //----------------------------------------- - // Move the posts - //----------------------------------------- - - $this->DB->update( 'posts', array( 'topic_id' => $new_topic_id, 'new_topic' => 0, 'queued' => 0 ), "pid={$r['pid']}" ); - $this->DB->update( 'posts', array( 'new_topic' => 0 ), "topic_id={$topic['tid']}" ); - - $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; - $forums_affected[ $this->trash_forum ] = $this->trash_forum; - $topics_affected[ $topic['tid'] ] = $topic['tid']; - $topics_affected[ $new_topic_id ] = $new_topic_id; - - $posts_deleted++; - } - else - { - $this->DB->delete( 'posts', 'pid=' . $r['pid'] ); - - $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; - $topics_affected[ $topic['tid'] ] = $topic['tid']; - - $posts_deleted++; - } - } - } - - //----------------------------------------- - // Rebuild topics and forums - //----------------------------------------- - - if ( count( $topics_affected ) ) - { - foreach( $topics_affected as $tid ) - { - $mod_func->rebuildTopic( $tid, 0 ); - } - } - - if ( count( $forums_affected ) ) - { - foreach( $forums_affected as $fid ) - { - $mod_func->forumRecount( $fid ); - } - } - - //----------------------------------------- - // Finish - or more?... - //----------------------------------------- - - if ( ! $done ) - { - //----------------------------------------- - // Recount stats.. - //----------------------------------------- - - $mod_func->statsRecount(); - - //----------------------------------------- - // Reset member's posts - //----------------------------------------- - - $forums = array(); - - foreach( $this->registry->class_forums->forum_by_id as $data ) - { - if ( ! $data['inc_postcount'] ) - { - $forums[] = $data['id']; - } - } - - if ( ! count( $forums ) ) - { - $count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'posts', 'where' => 'queued != 1 AND author_id=' . $member_id ) ); - } - else - { - $count = $this->DB->buildAndFetch( array( 'select' => 'count(p.pid) as count', - 'from' => array( 'posts' => 'p' ), - 'where' => 'p.queued <> 1 AND p.author_id=' . $member_id . ' AND t.forum_id NOT IN (' . implode( ",", $forums ) . ')', - 'add_join' => array( - array( 'type' => 'left', - 'from' => array( 'topics' => 't' ), - 'where' => 't.tid=p.topic_id' - ) - ) - ) ); - } - - $new_post_count = intval( $count['count'] ); - - $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['member_posts_deleted'], $member['members_display_name'] ) ); - - IPSMember::save( $member_id, array( 'core' => array( 'posts' => $new_post_count ) ) ); - - $this->registry->output->multipleRedirectFinish( $this->lang->words['mem_posts_process_done'] ); - } - else - { - //----------------------------------------- - // More.. - //----------------------------------------- - - $next = $start + $end; - - $url = $this->settings['base_url'] . '&' . $this->form_code_js . "&do=deleteposts_process&dpergo={$end}" - ."&st={$next}" - ."&init=1" - ."&dposts={$delete_posts}" - ."&dtopics={$delete_topics}" - ."&use_trash_can=".intval($this->request['use_trash_can']) - ."&member_id={$member_id}"; - - $text = sprintf( $this->lang->words['mem_posts_process_more'], $end, $posts_deleted, $topics_deleted ); - - $this->registry->output->multipleRedirectHit( $url, $img . ' ' . $text ); - } - } - - /** - * Delete a member's posts [form/confirmation] - * - * @access private - * @return void [Outputs to screen] - */ - private function _deletePostsStart() - { - //----------------------------------------- - // Page set up - //----------------------------------------- - - $this->registry->output->extra_nav[] = array( '', $this->lang->words['mem_delete_title'] ); - - //----------------------------------------- - // INIT - //----------------------------------------- - - $member_id = intval($this->request['member_id']); - - //----------------------------------------- - // Get member - //----------------------------------------- - - $member = IPSMember::load( $member_id, 'core' ); - - //----------------------------------------- - // Get number of topics member has started - //----------------------------------------- - - $topics = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', - 'from' => 'topics', - 'where' => 'starter_id=' . $member_id ) ); - - $posts = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', - 'from' => 'posts', - 'where' => 'author_id=' . $member_id ) ); - - //----------------------------------------- - // Got any posts? - //----------------------------------------- - - if ( ! $posts['count'] ) - { - $this->registry->output->showError( $this->lang->words['t_noposts'], 11363 ); - } - - //----------------------------------------- - // Get number of topics member has started - //----------------------------------------- - - $this->lang->words['mem_delete_delete_posts'] = sprintf( $this->lang->words['mem_delete_delete_posts'] , intval($posts['count']) ); - $this->lang->words['mem_delete_delete_topics'] = sprintf( $this->lang->words['mem_delete_delete_topics'], intval($topics['count']) ); - - $this->registry->output->html .= $this->html->deletePostsStart( $member, intval($topics['count']), intval($posts['count']) ); - - - } + + * Invision Power Services + * IP.Board v3.1.4 + * Member management + * Last Updated: $Date: 2010-10-14 10:29:53 -0400 (Thu, 14 Oct 2010) $ + * + * + * @author $Author: mark $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 1st march 2002 + * @version $Revision: 6978 $ + * + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + + +class admin_forums_tools_tools extends ipsCommand +{ + /** + * Skin object + * + * @access private + * @var object Skin templates + */ + private $html; + + /** + * Shortcut for url + * + * @access private + * @var string URL shortcut + */ + private $form_code; + + /** + * Shortcut for url (javascript) + * + * @access private + * @var string JS URL shortcut + */ + private $form_code_js; + + /** + * Editor object + * + * @access private + * @var object Editor library + */ + private $han_editor; + + /** + * Trash can forum id + * + * @access private + * @var integer Trash can forum + */ + private $trash_forum = 0; + + + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Load skin + //----------------------------------------- + + $this->html = $this->registry->output->loadTemplate('cp_skin_member_form'); + + //----------------------------------------- + // Set up stuff + //----------------------------------------- + + $this->form_code = $this->html->form_code = 'module=tools&section=tools'; + $this->form_code_js = $this->html->form_code_js = 'module=tools§ion=tools'; + + //----------------------------------------- + // Load lang + //----------------------------------------- + + ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_forums' ), 'forums' ); + + ///----------------------------------------- + // What to do... + //----------------------------------------- + + switch( $this->request['do'] ) + { + default: + case 'deleteposts': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ftools_deleteposts' ); + $this->_deletePostsStart(); + break; + + case 'deletesubscriptions': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ftools_deletesubscriptions' ); + $this->_deleteSubscriptions(); + break; + + case 'clearforumsubs': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ftools_clearforumsubs' ); + $this->_deleteForumSubscriptions(); + break; + + case 'deleteposts_process': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ftools_deleteposts' ); + $this->_deletePostsDo(); + break; + + case 'new_avatar': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'member_photo', 'members', 'members' ); + $this->_processAvatar(); + break; + } + + //----------------------------------------- + // Pass to CP output hander + //----------------------------------------- + + $this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper(); + $this->registry->getClass('output')->sendOutput(); + + } + + /** + * Delete a forum's email subscriptions + * + * @access private + * @return void + * @author Brandon Farber + * @since IPB3 / 22 Oct 2008 + */ + private function _deleteForumSubscriptions() + { + /** + * Get members watching forums so we can recache em.. + */ + $forum_id = intval( $this->request['f'] ); + $members = array(); + + $this->DB->build( array( 'select' => 'member_id', 'from' => 'forum_tracker', 'where' => 'forum_id=' . $forum_id ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $members[] = $r['member_id']; + } + + $this->DB->delete( 'forum_tracker', 'forum_id=' . $forum_id ); + + foreach( $members as $mid ) + { + $this->registry->getClass('class_forums')->recacheWatchedForums( $mid ); + } + + /** + * Topics is teh suck...gotta get em first to delete em + */ + $toDelete = array(); + + $this->DB->build( array( 'select' => 'tr.trid', + 'from' => array( 'tracker' => 'tr' ), + 'where' => 't.forum_id=' . $forum_id, + 'add_join' => array( + array( + 'from' => array( 'topics' => 't' ), + 'where' => 't.tid=tr.topic_id', + 'type' => 'left' + ) + ) + ) ); + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + $toDelete[] = $r['trid']; + } + + if( count($toDelete) ) + { + $this->DB->delete( 'tracker', 'trid IN(' . implode( ',', $toDelete ) . ')' ); + } + + $this->registry->output->redirect( $this->settings['_base_url'] . "app=forums", $this->lang->words['m_subsf_redirect'] ); + + } + + /** + * Delete a member's email subscriptions + * + * @access private + * @return void + * @author Brandon Farber + * @since IPB3 / 22 Oct 2008 + */ + private function _deleteSubscriptions() + { + $member_id = intval( $this->request['member_id'] ); + + $this->DB->delete( 'tracker', 'member_id=' . $member_id ); + $this->DB->delete( 'forum_tracker', 'member_id=' . $member_id ); + + $this->registry->output->redirect( $this->settings['_base_url'] . "app=members&module=members&section=members&do=viewmember&member_id={$this->request['member_id']}", $this->lang->words['m_subs_redirect'] ); + } + + /** + * Update a member's avatar + * + * @access private + * @return void [Outputs to screen] + * @author Brandon Farber + * @since IPB3 / 9 June 2008 + */ + private function _processAvatar() + { + $member_id = intval( $this->request['member_id'] ); + + try + { + IPSMember::getFunction()->saveNewAvatar( $member_id ); + } + catch( Exception $error ) + { + switch ( $error->getMessage() ) + { + case 'NO_MEMBER_ID': + $this->registry->output->showError( $this->lang->words['t_noid'], 11356 ); + break; + case 'NO_PERMISSION': + $this->registry->output->showError( $this->lang->words['t_permav'], 11357, true ); + break; + case 'UPLOAD_NO_IMAGE': + $this->registry->output->showError( $this->lang->words['t_uploadfail1'], 11358 ); + break; + case 'UPLOAD_INVALID_FILE_EXT': + $this->registry->output->showError( $this->lang->words['t_uploadfail2'], 11359 ); + break; + case 'UPLOAD_TOO_LARGE': + $this->registry->output->showError( $this->lang->words['t_uploadfail3'], 11360 ); + break; + case 'UPLOAD_CANT_BE_MOVED': + $this->registry->output->showError( $this->lang->words['t_uploadfail4'], 11361 ); + break; + case 'UPLOAD_NOT_IMAGE': + $this->registry->output->showError( $this->lang->words['t_uploadfail5'], 2131, true ); + break; + case 'NO_AVATAR_TO_SAVE': + $this->registry->output->showError( $this->lang->words['t_noav'], 11362 ); + break; + case 'INVALID_FILE_EXT': + $this->registry->output->showError( $this->lang->words['t_badavext'], 11362 ); + break; + } + } + + $this->registry->output->redirect( $this->settings['_base_url'] . "app=members&module=members&section=members&do=viewmember&member_id={$this->request['member_id']}", $this->lang->words['t_avupdated'] ); + } + + /** + * Delete a member's posts [process] + * + * @access private + * @return void [Outputs to screen] + */ + private function _deletePostsDo() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval( $this->request['member_id'] ); + $delete_posts = intval( $this->request['dposts'] ); + $delete_topics = intval( $this->request['dtopics'] ); + $restart_for_posts = intval( $this->request['restart_for_posts'] ); + $end = intval( $this->request['dpergo'] ) ? intval( $this->request['dpergo'] ) : 50; + $init = intval( $this->request['init'] ); + $done = 0; + $start = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0; + $forums_affected = array(); + $topics_affected = array(); + $img = '- '; + $posts_deleted = 0; + $topics_deleted = 0; + + //-------------------------------------------- + // NOT INIT YET? + //-------------------------------------------- + + if ( ! $init ) + { + /* Right, first off, are we deleting anything? */ + if ( !$delete_posts and !$delete_topics ) + { + $this->registry->output->showError( "You're an idiot" ); + return; + } + /* Okay, are we deleting topics AND posts? */ + if ( $delete_posts and $delete_topics ) + { + // It's silly to try and do this all in one go, so + // we'll delete topics first and start again for posts + $delete_posts = 0; + $restart_for_posts = 1; + } + + $url = $this->settings['base_url'] . '&' . $this->form_code_js . "&do=deleteposts_process&dpergo=" . $this->request['dpergo'] + ."&st=0" + ."&init=1" + ."&dposts={$delete_posts}" + ."&dtopics={$delete_topics}" + ."&use_trash_can=".intval($this->request['use_trash_can']) + ."&member_id={$member_id}" + ."&restart_for_posts={$restart_for_posts}"; + + $this->registry->output->multipleRedirectInit( $url ); + } + + //-------------------------------------------- + // Not loaded the func? + //-------------------------------------------- + + if ( ! is_object( $mod_func ) ) + { + require_once( IPS_ROOT_PATH . 'sources/classes/itemmarking/classItemMarking.php' ); + $this->registry->setClass( 'classItemMarking', new classItemMarking( $this->registry ) ); + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php', 'moderatorLibrary', 'forums' ); + $mod_func = new $classToLoad( $this->registry ); + } + + //----------------------------------------- + // Trash-can set up + //----------------------------------------- + + $trash_append = ''; + + if ( $this->settings['forum_trash_can_enable'] and $this->settings['forum_trash_can_id'] ) + { + if ( $this->registry->class_forums->forum_by_id[ $this->settings['forum_trash_can_id'] ]['sub_can_post'] ) + { + if ( $this->request['use_trash_can'] ) + { + $this->trash_forum = $this->settings['forum_trash_can_id']; + $trash_append = " AND forum_id<>{$this->trash_forum}"; + } + } + } + + //----------------------------------------- + // Get member + //----------------------------------------- + + $member = IPSMember::load( $member_id, 'core' ); + + /* Navigation */ + $this->registry->output->extra_nav[] = array( '', $this->lang->words['mem_delete_title'] ); + $this->registry->output->extra_nav[] = array( "{$this->settings['_base_url']}app=members&module=members§ion=members&do=viewmember&member_id={$member_id}", $member['members_display_name'] ); + + //----------------------------------------- + // Avoid limit... + //----------------------------------------- + + /* Delete posts */ + if ( $delete_posts ) + { + $this->DB->build( array( 'select' => 'p.*', + 'from' => array( 'posts' => 'p' ), + 'where' => "p.author_id={$member_id}{$trash_append}", + 'order' => 'p.pid ASC', + //'limit' => array( $start, $end ), + 'add_join' => array( + array( + 'select' => 't.*', + 'from' => array( 'topics' => 't' ), + 'where' => 't.tid=p.topic_id', + 'type' => 'left', + ) + ) + ) ); + } + /* Delete topics */ + elseif ( $delete_topics ) + { + $this->DB->build( array( 'select' => 't.*', + 'from' => array( 'topics' => 't' ), + 'where' => "t.starter_id={$member_id}{$trash_append}", + 'order' => 't.tid ASC', + //'limit' => array( $start, $end ), + 'add_join' => array( + array( + 'select' => 'p.*', + 'from' => array( 'posts' => 'p' ), + 'where' => 't.topic_firstpost=p.pid', + 'type' => 'left', + ) + ) + ) ); + } + + $outer = $this->DB->execute(); + + //----------------------------------------- + // Process... + //----------------------------------------- + + while( $r = $this->DB->fetch( $outer ) ) + { + //----------------------------------------- + // Copy record to topic array + //----------------------------------------- + + $topic = $r; + + //----------------------------------------- + // No longer a topic? + //----------------------------------------- + + if ( ! $topic['tid'] ) + { + //----------------------------------------- + // Cleanup - might as well remove the orphaned post + // or the ACP will always show posts to delete that + // it won't be able to delete + //----------------------------------------- + + if( $topic['pid'] ) + { + $this->DB->delete( 'posts', 'pid=' . $topic['pid'] ); + } + + continue; + } + + $done++; + + //----------------------------------------- + // Get number of MID posters + //----------------------------------------- + + $topic_i_posted = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count', + 'from' => 'posts', + 'where' => 'author_id=' . $member_id . ' AND topic_id=' . $r['tid'] ) ); + + //----------------------------------------- + // Aready deleted this topic? + //----------------------------------------- + + if ( ! $topic_i_posted['count']) + { + continue; + } + + //----------------------------------------- + // First check: Our topic and no other replies? + //----------------------------------------- + + if ( $topic['starter_id'] == $member_id AND $topic_i_posted['count'] == ( $topic['posts'] + 1 ) ) + { + //----------------------------------------- + // Ok, deleting topics or posts? + //----------------------------------------- + + if ( ( $delete_posts OR $delete_topics ) AND ( $this->trash_forum and $this->trash_forum != $topic['forum_id'] ) ) + { + //----------------------------------------- + // Move, don't delete + //----------------------------------------- + + $mod_func->topicMove( $r['topic_id'], $topic['forum_id'], $this->trash_forum ); + + $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; + $forums_affected[ $this->trash_forum ] = $this->trash_forum; + + $topics_deleted++; + $posts_deleted += $topic_i_posted['count']; + } + else if ( $delete_posts OR $delete_topics ) + { + $this->DB->delete( 'posts', 'author_id=' . $member_id . ' AND topic_id=' . $r['tid'] ); + $this->DB->delete('topics', 'tid=' . $r['tid'] ); + + $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; + $topics_deleted++; + $posts_deleted += $topic_i_posted['count']; + } + } + + //----------------------------------------- + // Is this a topic we started? + //----------------------------------------- + + else if ( $topic['starter_id'] == $member_id AND $delete_topics ) + { + if ( $this->trash_forum and $this->trash_forum != $topic['forum_id'] ) + { + //----------------------------------------- + // Move, don't delete + //----------------------------------------- + + $mod_func->topicMove( $r['topic_id'], $topic['forum_id'], $this->trash_forum ); + + $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; + $forums_affected[ $this->trash_forum ] = $this->trash_forum; + + $topics_deleted++; + $posts_deleted += $topic_i_posted['count']; + } + else + { + $this->DB->delete( 'posts', 'topic_id=' . $r['tid'] ); + $this->DB->delete( 'topics', 'tid=' . $r['tid'] ); + + $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; + $topics_deleted++; + $posts_deleted += $topic['posts'] + 1; + } + } + + //----------------------------------------- + // Just delete the post, then + //----------------------------------------- + + else if ( $delete_posts AND ! $r['new_topic'] AND $r['pid'] ) + { + if ( $this->trash_forum and $this->trash_forum != $topic['forum_id'] ) + { + //----------------------------------------- + // Set up and pass to split topic handler + //----------------------------------------- + + $new_title = $this->lang->words['acp_posts_deleted_from'] . $topic['title']; + $new_desc = $this->lang->words['acp_posts_deleted_from_tid'] . $topic['tid']; + + //----------------------------------------- + // Is first post queued? + //----------------------------------------- + + $topic_approved = 1; + + $first_post = $this->DB->buildAndFetch( array( 'select' => 'pid, queued', + 'from' => 'posts', + 'where' => "pid=" . $r['pid'], + ) ); + + if( $first_post['queued'] ) + { + $topic_approved = 0; + $this->DB->update( 'posts', array( 'queued' => 0 ), 'pid=' . $first_post['pid'] ); + } + + //----------------------------------------- + // Complete a new dummy topic + //----------------------------------------- + + $this->DB->insert( 'topics', array( + 'title' => $new_title, + 'description' => $new_desc, + 'state' => 'open', + 'posts' => 0, + 'starter_id' => $member_id, + 'starter_name' => $member['members_display_name'], + 'start_date' => time(), + 'last_poster_id' => $member_id, + 'last_poster_name' => $member['members_display_name'], + 'last_post' => time(), + 'icon_id' => 0, + 'author_mode' => 1, + 'poll_state' => 0, + 'last_vote' => 0, + 'views' => 0, + 'forum_id' => $this->trash_forum, + 'approved' => $topic_approved, + 'pinned' => 0, + ) ); + + $new_topic_id = $this->DB->getInsertId(); + + //----------------------------------------- + // Move the posts + //----------------------------------------- + + $this->DB->update( 'posts', array( 'topic_id' => $new_topic_id, 'new_topic' => 0, 'queued' => 0 ), "pid={$r['pid']}" ); + $this->DB->update( 'posts', array( 'new_topic' => 0 ), "topic_id={$topic['tid']}" ); + + $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; + $forums_affected[ $this->trash_forum ] = $this->trash_forum; + $topics_affected[ $topic['tid'] ] = $topic['tid']; + $topics_affected[ $new_topic_id ] = $new_topic_id; + + $posts_deleted++; + } + else + { + $this->DB->delete( 'posts', 'pid=' . $r['pid'] ); + + $forums_affected[ $topic['forum_id'] ] = $topic['forum_id']; + $topics_affected[ $topic['tid'] ] = $topic['tid']; + + $posts_deleted++; + } + } + } + + //----------------------------------------- + // Rebuild topics and forums + //----------------------------------------- + + if ( count( $topics_affected ) ) + { + foreach( $topics_affected as $tid ) + { + $mod_func->rebuildTopic( $tid, 0 ); + } + } + + if ( count( $forums_affected ) ) + { + foreach( $forums_affected as $fid ) + { + $mod_func->forumRecount( $fid ); + } + } + + //----------------------------------------- + // Finish - or more?... + //----------------------------------------- + + if ( ! $done ) + { + //-------------------------------------- + // Hang on there! Do we need to do posts as well? + //-------------------------------------- + + if ( $this->request['restart_for_posts'] ) + { + $url = $this->settings['base_url'] . '&' . $this->form_code_js . "&do=deleteposts_process&dpergo=" . $this->request['dpergo'] + ."&st=0" + ."&init=1" + ."&dposts=1" + ."&dtopics=0" + ."&use_trash_can=".intval($this->request['use_trash_can']) + ."&member_id={$member_id}" + ."&restart_for_posts=0"; + + $this->registry->output->multipleRedirectHit( $url, $this->lang->words['mem_posts_next_step'] ); + } + + //----------------------------------------- + // Recount stats.. + //----------------------------------------- + + $mod_func->statsRecount(); + + //----------------------------------------- + // Reset member's posts + //----------------------------------------- + + $forums = array(); + + foreach( $this->registry->class_forums->forum_by_id as $data ) + { + if ( ! $data['inc_postcount'] ) + { + $forums[] = $data['id']; + } + } + + if ( ! count( $forums ) ) + { + $count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'posts', 'where' => 'queued != 1 AND author_id=' . $member_id ) ); + } + else + { + $count = $this->DB->buildAndFetch( array( 'select' => 'count(p.pid) as count', + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.queued <> 1 AND p.author_id=' . $member_id . ' AND t.forum_id NOT IN (' . implode( ",", $forums ) . ')', + 'add_join' => array( + array( 'type' => 'left', + 'from' => array( 'topics' => 't' ), + 'where' => 't.tid=p.topic_id' + ) + ) + ) ); + } + + $new_post_count = intval( $count['count'] ); + + $this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['member_posts_deleted'], $member['members_display_name'] ) ); + + IPSMember::save( $member_id, array( 'core' => array( 'posts' => $new_post_count ) ) ); + $this->registry->output->multipleRedirectFinish( $this->lang->words['mem_posts_process_done'] ); + } + else + { + //----------------------------------------- + // More.. + //----------------------------------------- + + $next = $start + $end; + + $url = $this->settings['base_url'] . '&' . $this->form_code_js . "&do=deleteposts_process&dpergo={$end}" + ."&st={$next}" + ."&init=1" + ."&dposts={$delete_posts}" + ."&dtopics={$delete_topics}" + ."&use_trash_can=".intval($this->request['use_trash_can']) + ."&member_id={$member_id}" + ."&restart_for_posts={$restart_for_posts}"; + + $text = sprintf( $this->lang->words['mem_posts_process_more'], $end, $posts_deleted, $topics_deleted ); + + $this->registry->output->multipleRedirectHit( $url, $img . ' ' . $text ); + } + } + + /** + * Delete a member's posts [form/confirmation] + * + * @access private + * @return void [Outputs to screen] + */ + private function _deletePostsStart() + { + //----------------------------------------- + // Page set up + //----------------------------------------- + + $this->registry->output->extra_nav[] = array( '', $this->lang->words['mem_delete_title'] ); + + //----------------------------------------- + // INIT + //----------------------------------------- + + $member_id = intval($this->request['member_id']); + + //----------------------------------------- + // Get member + //----------------------------------------- + + $member = IPSMember::load( $member_id, 'core' ); + + $this->registry->output->extra_nav[] = array( "{$this->settings['_base_url']}app=members&module=members§ion=members&do=viewmember&member_id={$member_id}", $member['members_display_name'] ); + + //----------------------------------------- + // Get number of topics member has started + //----------------------------------------- + + $_where = ""; + + if( $this->settings['forum_trash_can_enable'] AND $this->settings['forum_trash_can_id'] ) + { + $_where = " AND t.forum_id <> " . $this->settings['forum_trash_can_id']; + } + + $topics = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', + 'from' => 'topics t', + 'where' => 't.starter_id=' . $member_id . $_where ) ); + + $posts = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.author_id=' . $member_id . $_where, + 'add_join' => array( + array( + 'from' => array( 'topics' => 't' ), + 'where' => 't.tid=p.topic_id', + 'type' => 'left', + ) + ) + ) ); + + + //----------------------------------------- + // Got any posts? + //----------------------------------------- + + if ( ! $posts['count'] ) + { + $this->registry->output->showError( $this->lang->words['t_noposts'], 11363 ); + } + + //----------------------------------------- + // Get number of topics member has started + //----------------------------------------- + + $this->lang->words['mem_delete_delete_posts'] = sprintf( $this->lang->words['mem_delete_delete_posts'] , intval($posts['count']) ); + $this->lang->words['mem_delete_delete_topics'] = sprintf( $this->lang->words['mem_delete_delete_topics'], intval($topics['count']) ); + + $this->registry->output->html .= $this->html->deletePostsStart( $member, intval($topics['count']), intval($posts['count']) ); + + + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_admin/tools/xml/index.html b/upload/admin/applications/forums/modules_admin/tools/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_admin/tools/xml/index.html +++ b/upload/admin/applications/forums/modules_admin/tools/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_public/ajax/attachments.php b/upload/admin/applications/forums/modules_public/ajax/attachments.php index 541bcab3..7e4490c9 100644 --- a/upload/admin/applications/forums/modules_public/ajax/attachments.php +++ b/upload/admin/applications/forums/modules_public/ajax/attachments.php @@ -1,87 +1,87 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_forums_ajax_attachments extends ipsAjaxCommand -{ - /** - * Class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $topic_id = intval( $this->request['tid'] ); - - ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_stats' ), 'forums' ); - - //----------------------------------------- - // Check.. - //----------------------------------------- - - if ( ! $topic_id ) - { - $this->returnJsonError( $this->lang->words['notopic_attach'] ); - } - - //----------------------------------------- - // get topic.. - //----------------------------------------- - - $topic = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid=' . $topic_id ) ); - - if ( ! $topic['topic_hasattach'] ) - { - $this->returnJsonError( $this->lang->words['topic_noattach'] ); - } - - //----------------------------------------- - // Check forum.. - //----------------------------------------- - - if ( $this->registry->getClass('class_forums')->forumsCheckAccess( $topic['forum_id'], 0, 'forum', $topic, true ) === false ) - { - $this->returnJsonError( $this->lang->words['topic_noperms'] ); - } - - require_once( IPSLib::getAppDir('forums') . '/modules_public/forums/attach.php' ); - $attach = new public_forums_forums_attach( $this->registry ); - $attach->makeRegistryShortcuts( $this->registry ); - - $attachHTML = $attach->getAttachments( $topic ); - - if ( !$attachHTML ) - { - $this->returnJsonError( $this->lang->words['ajax_nohtml_return'] ); - } - else - { - $this->returnHtml( $this->registry->getClass('output')->getTemplate('forum')->forumAttachmentsAjaxWrapper( $attachHTML ) ); - } - } + + * Invision Power Services + * IP.Board v3.1.4 + * Grab attachments and return via AJAX (AJAX) + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Revision: 7003 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_forums_ajax_attachments extends ipsAjaxCommand +{ + /** + * Class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $topic_id = intval( $this->request['tid'] ); + + ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_stats' ), 'forums' ); + + //----------------------------------------- + // Check.. + //----------------------------------------- + + if ( ! $topic_id ) + { + $this->returnJsonError( $this->lang->words['notopic_attach'] ); + } + + //----------------------------------------- + // get topic.. + //----------------------------------------- + + $topic = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid=' . $topic_id ) ); + + if ( ! $topic['topic_hasattach'] ) + { + $this->returnJsonError( $this->lang->words['topic_noattach'] ); + } + + //----------------------------------------- + // Check forum.. + //----------------------------------------- + + if ( $this->registry->getClass('class_forums')->forumsCheckAccess( $topic['forum_id'], 0, 'forum', $topic, true ) === false ) + { + $this->returnJsonError( $this->lang->words['topic_noperms'] ); + } + + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir('forums') . '/modules_public/forums/attach.php', 'public_forums_forums_attach' ); + $attach = new $classToLoad( $this->registry ); + $attach->makeRegistryShortcuts( $this->registry ); + + $attachHTML = $attach->getAttachments( $topic ); + + if ( !$attachHTML ) + { + $this->returnJsonError( $this->lang->words['ajax_nohtml_return'] ); + } + else + { + $this->returnHtml( $this->registry->getClass('output')->getTemplate('forum')->forumAttachmentsAjaxWrapper( $attachHTML ) ); + } + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_public/ajax/defaultSection.php b/upload/admin/applications/forums/modules_public/ajax/defaultSection.php index 4ae72aa7..f434e95a 100644 --- a/upload/admin/applications/forums/modules_public/ajax/defaultSection.php +++ b/upload/admin/applications/forums/modules_public/ajax/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Default section file for forum ajax module - * Last Updated: $LastChangedDate: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 14th May 2003 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ */ if ( ! defined( 'IN_IPB' ) ) diff --git a/upload/admin/applications/forums/modules_public/ajax/emoticons.php b/upload/admin/applications/forums/modules_public/ajax/emoticons.php index 2460d5e3..1faf7a66 100644 --- a/upload/admin/applications/forums/modules_public/ajax/emoticons.php +++ b/upload/admin/applications/forums/modules_public/ajax/emoticons.php @@ -1,17 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Ourputs emoticon list via AJAX (AJAX) - * Last Updated $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $Date: 2010-04-15 15:46:26 -0400 (Thu, 15 Apr 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Rev: 3887 $ + * @link http://www.invisionpower.com + * @version $Rev: 6133 $ * */ diff --git a/upload/admin/applications/forums/modules_public/ajax/index.html b/upload/admin/applications/forums/modules_public/ajax/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_public/ajax/index.html +++ b/upload/admin/applications/forums/modules_public/ajax/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_public/ajax/markasread.php b/upload/admin/applications/forums/modules_public/ajax/markasread.php index 05ace950..d5892882 100644 --- a/upload/admin/applications/forums/modules_public/ajax/markasread.php +++ b/upload/admin/applications/forums/modules_public/ajax/markasread.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Ajax Functions For Topics - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Revision: 4948 $ + * @link http://www.invisionpower.com + * @version $Revision: 5713 $ * */ diff --git a/upload/admin/applications/forums/modules_public/ajax/stats.php b/upload/admin/applications/forums/modules_public/ajax/stats.php index 4a0edbcf..bfbd83d5 100644 --- a/upload/admin/applications/forums/modules_public/ajax/stats.php +++ b/upload/admin/applications/forums/modules_public/ajax/stats.php @@ -1,68 +1,67 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_forums_ajax_stats extends ipsAjaxCommand -{ - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - switch( $this->request['do'] ) - { - case 'who': - $this->_whoPosted(); - break; - } - } - - /** - * Retrieve posters in a given topic - * - * @access protected - * @return void [Outputs to screen] - */ - protected function _whoPosted() - { - ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_stats' ), 'forums' ); - - require_once( IPSLib::getAppDir('forums') . '/modules_public/extras/stats.php' ); - $stats = new public_forums_extras_stats( $this->registry ); - $stats->makeRegistryShortcuts( $this->registry ); - - $output = $stats->whoPosted( true ); - - if ( !$output ) - { - $this->returnJsonError( $this->lang->words['ajax_nohtml_return'] ); - } - else - { - $this->returnHtml( $this->registry->getClass('output')->getTemplate('stats')->whoPostedAjaxWrapper( $output ) ); - } - } + + * Invision Power Services + * IP.Board v3.1.4 + * Retrieve who posted stats + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Revision: 7003 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_forums_ajax_stats extends ipsAjaxCommand +{ + /** + * Main class entry point + * + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + switch( $this->request['do'] ) + { + case 'who': + $this->_whoPosted(); + break; + } + } + + /** + * Retrieve posters in a given topic + * + * @return void [Outputs to screen] + */ + protected function _whoPosted() + { + ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_stats' ), 'forums' ); + + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir('forums') . '/modules_public/extras/stats.php', 'public_forums_extras_stats' ); + $stats = new $classToLoad( $this->registry ); + $stats->makeRegistryShortcuts( $this->registry ); + + $output = $stats->whoPosted( true ); + + if ( !$output ) + { + $this->returnJsonError( $this->lang->words['ajax_nohtml_return'] ); + } + else + { + $this->returnHtml( $this->registry->getClass('output')->getTemplate('stats')->whoPostedAjaxWrapper( $output ) ); + } + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_public/ajax/topics.php b/upload/admin/applications/forums/modules_public/ajax/topics.php index d554e6e7..1a56a0b8 100644 --- a/upload/admin/applications/forums/modules_public/ajax/topics.php +++ b/upload/admin/applications/forums/modules_public/ajax/topics.php @@ -1,734 +1,957 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_forums_ajax_topics extends ipsAjaxCommand -{ - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs for the ajax handler] - */ - public function doExecute( ipsRegistry $registry ) - { - $this->lang->loadLanguageFile( array( 'public_topic', 'public_mod' ), 'forums' ); - - //----------------------------------------- - // What to do? - //----------------------------------------- - - switch( $this->request['do'] ) - { - default: - case 'editBoxShow': - $this->editBoxShow(); - break; - - case 'editBoxSave': - $this->editBoxSave(); - break; - - case 'saveTopicTitle': - $this->saveTopicTitle(); - break; - - case 'saveTopicDescription': - $this->saveTopicDescription(); - break; - - case 'rateTopic': - $this->rateTopic(); - break; - - case 'postApproveToggle': - $this->_postApproveToggle(); - break; - } - } - - /** - * Toggle the posts approve thingy - * - * @access private - * @return void - **/ - private function _postApproveToggle() - { - /* INIT */ - $topicID = intval( $this->request['t'] ); - $postID = intval( $this->request['p'] ); - $approve = ( $this->request['approve'] == 1 ) ? TRUE : FALSE; - $_yoGo = FALSE; - - require( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php'); - $_modLibrary = new moderatorLibrary( $this->registry ); - - /* Load topic */ - $topic = $this->DB->buildAndFetch( array( 'select' => '*', - 'from' => 'topics', - 'where' => 'tid=' . $topicID ) ); - - if ( ! $topic['tid'] ) - { - $this->returnJsonArray( array( 'error' => 'notopic' ) ); - } - - /* Permission Checks */ - if ( $this->memberData['g_is_supmod'] ) - { - $_yoGo = TRUE; - } - else if ( is_array( $this->memberData['forumsModeratorData'] ) AND $this->memberData['forumsModeratorData'][ $topic['forum_id'] ]['post_q'] ) - { - $_yoGo = TRUE; - } - - if ( ! $_yoGo ) - { - $this->returnJsonArray( array( 'error' => 'nopermission' ) ); - } - - $_modLibrary->postToggleApprove( array( $postID ), $approve, $topicID ); - - $this->returnJsonArray( array( 'status' => 'ok', 'postApproved' => $approve ) ); - } - - /** - * Add vote to rating - * - * @access public - * @return void - **/ - public function rateTopic() - { - /* INIT */ - $topic_id = intval( $this->request['t'] ); - $rating_id = intval( $this->request['rating'] ); - $vote_cast = array(); - - IPSDebug::fireBug( 'info', array( 'The topic rating request has been received...' ) ); - - /* Query topic */ - $topic_data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => "tid={$topic_id}" ) ); - - /* Make sure we have a valid topic id */ - if( ! $topic_data['tid'] ) - { - IPSDebug::fireBug( 'error', array( 'The topic was not found in the database' ) ); - $this->returnJsonArray( array( 'error_key' => 'topics_no_tid', 'error_code' => 10346 ) ); - } - - if( $topic_data['state'] != 'open' ) - { - IPSDebug::fireBug( 'error', array( 'The topic is not open' ) ); - - $this->returnJsonArray( array( 'error_key' => 'topic_rate_locked', 'error_code' => 10348 ) ); - } - - /* Query Forum */ - $forum_data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'forums', 'where' => "id={$topic_data['forum_id']}" ) ); - - /* Permission Check */ - $can_rate = ( $forum_data['forum_allow_rating'] && $this->memberData['member_id'] && $this->memberData['g_topic_rate_setting'] ) ? 1 : 0; - - if( ! $can_rate ) - { - IPSDebug::fireBug( 'error', array( 'The user cannot rate topics in this forum' ) ); - - $this->returnJsonArray( array( 'error_key' => 'topic_rate_no_perm', 'error_code' => 10345 ) ); - exit(); - } - - /* Sneaky members rating topic more than 5? */ - if( $rating_id > 5 ) - { - $rating_id = 5; - } - - if( $rating_id < 0 ) - { - $rating_id = 0; - } - - /* Have we rated before? */ - $rating = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topic_ratings', 'where' => "rating_tid={$topic_data['tid']} and rating_member_id=".$this->memberData['member_id'] ) ); - - /* Already rated? */ - if( $rating['rating_id'] ) - { - /* Do we allow re-ratings? */ - if( $this->memberData['g_topic_rate_setting'] == 2 ) - { - if( $rating_id != $rating['rating_value'] ) - { - $new_rating = $rating_id - $rating['rating_value']; - - $this->DB->update( 'topic_ratings', array( 'rating_value' => $rating_id ), 'rating_id=' . $rating['rating_id'] ); - - $this->DB->update( 'topics', array( 'topic_rating_total' => intval( $topic_data['topic_rating_total'] ) + $new_rating ), 'tid=' . $topic_data['tid'] ); - } - - IPSDebug::fireBug( 'info', array( 'The rating was updated' ) ); - - $this->returnJsonArray( array( - 'rated' => 'update', - 'message' => $this->lang->words['topic_rating_changed'], - 'topic_rating_total' => intval( $topic_data['topic_rating_total'] ) + $new_rating, - 'topic_rating_hits' => $topic_data['topic_rating_hits'] - ) ); - } - else - { - IPSDebug::fireBug( 'warn', array( 'The user is not allowed to update their rating' ) ); - - $this->returnJsonArray( array( 'error_key' => 'topic_rated_already', 'error_code' => 0 ) ); - } - } - /* NEW RATING! */ - else - { - $this->DB->insert( 'topic_ratings', array( - 'rating_tid' => $topic_data['tid'], - 'rating_member_id' => $this->memberData['member_id'], - 'rating_value' => $rating_id, - 'rating_ip_address' => $this->member->ip_address - ) - ); - - $this->DB->update( 'topics', array( - 'topic_rating_hits' => intval( $topic_data['topic_rating_hits'] ) + 1, - 'topic_rating_total' => intval( $topic_data['topic_rating_total'] ) + $rating_id - ), 'tid='.$topic_data['tid'] ); - - IPSDebug::fireBug( 'info', array( 'The rating was inserted' ) ); - - $this->returnJsonArray( array( - 'rated' => 'new', - 'message' => $this->lang->words['topic_rating_done'], - 'topic_rating_total' => intval( $topic_data['topic_rating_total'] ) + $rating_id , - 'topic_rating_hits' => intval( $topic_data['topic_rating_hits'] ) + 1, - '_rate_int' => round( (intval( $topic_data['topic_rating_total'] ) + $rating_id) / (intval( $topic_data['topic_rating_hits'] ) + 1) ) - ) ); - } - } - - /** - * Saves a ajax topic title edit - * - * @access public - * @return void - **/ - public function saveTopicTitle() - { - /* INIT */ - IPSDebug::fireBug( 'info', array( 'Initial name: ' . $_POST['name'] ) ); - $name = $_POST['name']; - IPSDebug::fireBug( 'info', array( 'after convert and make safe: ' . $name ) ); - $tid = intval( $this->request['tid'] ); - $can_edit = 0; - - IPSDebug::fireBug( 'info', array( 'The topic title after converting is: ' . $name ) ); - - /* Check ID */ - if( ! $tid ) - { - $this->returnJsonError( $this->lang->words['ajax_no_topic_id'] ); - } - - /* Load Topic */ - $topic = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid=' . $tid ) ); - - if( ! $topic['tid'] ) - { - $this->returnJsonError( $this->lang->words['ajax_topic_not_found'] ); - } - - /* Check Permissions */ - if ( $this->memberData['g_is_supmod'] ) - { - $can_edit = 1; - } - - else if( is_array( $this->memberData['forumsModeratorData'] ) AND $this->memberData['forumsModeratorData'][ $topic['forum_id'] ]['edit_topic'] ) - { - $can_edit = 1; - } - - if( ! $can_edit ) - { - $this->returnJsonError( $this->lang->words['ajax_no_t_permission'] ); - } - - /* Make sure we have a valid name */ - if( trim( $name ) == '' || ! $name ) - { - $this->returnJsonError( $this->lang->words['ajax_no_t_name'] ); - exit(); - } - - /* Clean */ - if( $this->settings['etfilter_shout'] ) - { - if( function_exists('mb_convert_case') ) - { - if( in_array( strtolower( $this->settings['gb_char_set'] ), array_map( 'strtolower', mb_list_encodings() ) ) ) - { - $name = mb_convert_case( $name, MB_CASE_TITLE, $this->settings['gb_char_set'] ); - } - else - { - $name = ucwords( strtolower($name) ); - } - } - else - { - $name = ucwords( strtolower($name) ); - } - } - - $name = IPSText::parseCleanValue( $name ); - $name = $this->cleanTopicTitle( $name ); - $name = IPSText::getTextClass( 'bbcode' )->stripBadWords( $name ); - $title_seo = IPSText::makeSeoTitle( $name, TRUE ); - - /* Update the topic */ - $this->DB->update( 'topics', array( 'title' => $name, 'title_seo' => $title_seo ), 'tid='.$tid ); - - $this->DB->insert( 'moderator_logs', array( - 'forum_id' => intval( $topic['forum_id'] ), - 'topic_id' => $tid, - 'member_id' => $this->memberData['member_id'], - 'member_name' => $this->memberData['members_display_name'], - 'ip_address' => $this->member->ip_address, - 'http_referer' => htmlspecialchars( getenv('HTTP_REFERER') ), - 'ctime' => time(), - 'topic_title' => $name, - 'action' => sprintf( $this->lang->words['ajax_topictitle'], $topic['title'], $name), - 'query_string' => htmlspecialchars( getenv('QUERY_STRING') ), - ) ); - - /* Update the last topic title? */ - if ( $topic['tid'] == $this->registry->class_forums->forum_by_id[ $topic['forum_id'] ]['last_id'] ) - { - $this->DB->update( 'forums', array( 'last_title' => $name, 'seo_last_title' => $title_seo ), 'id=' . $topic['forum_id'] ); - } - - if ( $topic['tid'] == $this->registry->class_forums->forum_by_id[ $topic['forum_id'] ]['newest_id'] ) - { - $this->DB->update( 'forums', array( 'newest_title' => $name ), 'id=' . $topic['forum_id'] ); - } - - /* All Done */ - $this->returnJsonArray( array( 'title' => $name, 'url' => $this->registry->output->buildSEOUrl( 'showtopic=' . $tid, 'public', $title_seo, 'showtopic' ) ) ); - } - - /** - * Clean the topic title - * - * @access public - * @param string Raw title - * @return string Cleaned title - */ - public function cleanTopicTitle( $title="" ) - { - if( $this->settings['etfilter_punct'] ) - { - $title = preg_replace( "/\?{1,}/" , "?" , $title ); - $title = preg_replace( "/(!){1,}/" , "!", $title ); - } - - //----------------------------------------- - // The DB column is 250 chars, so we need to do true mb_strcut, then fix broken HTML entities - // This should be fine, as DB would do it regardless (cept we can fix the entities) - //----------------------------------------- - - $title = preg_replace( "/&(#{0,}([a-zA-Z0-9]+?)?)?$/", '', IPSText::mbsubstr( $title, 0, 250 ) ); - - $title = IPSText::stripAttachTag( $title ); - $title = str_replace( "
    ", "", $title ); - $title = trim( $title ); - - return $title; - } - - /** - * Saves a ajax topic description edit - * - * @access public - * @return void - **/ - public function saveTopicDescription() - { - /* INIT */ - $description = $this->convertAndMakeSafe( $this->request['description'], TRUE ); - $tid = intval( $this->request['tid'] ); - $can_edit = 0; - - /* Check ID */ - if( ! $tid ) - { - $this->returnString( $this->lang->words['ajax_no_topic_id'] ); - } - - /* Load Topic */ - $topic = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid=' . $tid ) ); - - if( ! $topic['tid'] ) - { - $this->returnString( $this->lang->words['ajax_topic_not_found'] ); - } - - /* Check Permissions */ - if ( $this->memberData['g_is_supmod'] ) - { - $can_edit = 1; - } - - if( $this->memberData['forumsModeratorData'][ $topic['forum_id'] ]['edit_topic'] ) - { - $can_edit = 1; - } - - if( ! $can_edit ) - { - $this->class_ajax->returnString( $this->lang->words['ajax_no_t_permission'] ); - } - - /* Update the description */ - $this->DB->update( 'topics', array( 'description' => $description ), 'tid=' . $tid ); - - $this->DB->insert( 'moderator_logs', array( - 'forum_id' => intval( $topic['forum_id'] ), - 'topic_id' => $tid, - 'member_id' => $this->memberData['member_id'], - 'member_name' => $this->memberData['members_display_name'], - 'ip_address' => $this->input['IP_ADDRESS'], - 'http_referer'=> htmlspecialchars( getenv('HTTP_REFERER') ), - 'ctime' => time(), - 'topic_title' => $topic['title'], - 'action' => $this->lang->words['ajax_topicdesc'], - 'query_string'=> htmlspecialchars( getenv('QUERY_STRING') ), - ) ); - - /* All Done */ - $this->returnString( 'success' ); - } - - /** - * Saves the post - * - * @access public - * @return void - */ - public function editBoxSave() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $pid = intval( $this->request['p'] ); - $fid = intval( $this->request['f'] ); - $tid = intval( $this->request['t'] ); - $attach_pids = array(); - - $this->request['post_edit_reason'] = $this->convertAndMakeSafe( $_POST['post_edit_reason'] ); - - //----------------------------------------- - // Set things right - //----------------------------------------- - - $this->request['Post'] = IPSText::parseCleanValue( $_POST['Post'] ); - - //----------------------------------------- - // Check P|T|FID - //----------------------------------------- - - if ( ! $pid OR ! $tid OR ! $fid ) - { - $this->returnString( 'error' ); - } - - if ( $this->memberData['member_id'] ) - { - if ( $this->memberData['restrict_post'] ) - { - if ( $this->memberData['restrict_post'] == 1 ) - { - $this->returnString( 'nopermission' ); - } - - $post_arr = IPSMember::processBanEntry( $this->memberData['restrict_post'] ); - - if ( time() >= $post_arr['date_end'] ) - { - //----------------------------------------- - // Update this member's profile - //----------------------------------------- - - IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'restrict_post' => 0 ) ) ); - } - else - { - $this->returnString( 'nopermission' ); - } - } - } - - //----------------------------------------- - // Load Lang - //----------------------------------------- - - $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_topics' ) ); - - if ( ! is_object( $this->postClass ) ) - { - require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/post/classPost.php" ); - require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/post/classPostForms.php" ); - - $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_editors' ), 'core' ); - - $this->postClass = new classPostForms( $this->registry ); - } - - # Forum Data - $this->postClass->setForumData( $this->registry->getClass('class_forums')->forum_by_id[ $fid ] ); - - # IDs - $this->postClass->setTopicID( $tid ); - $this->postClass->setPostID( $pid ); - $this->postClass->setForumID( $fid ); - - if( isset($this->request['post_htmlstatus']) ) // Off is "0" - { - $this->postClass->setSettings( array( 'post_htmlstatus' => $this->request['post_htmlstatus'] ) ); - } - - /* Topic Data */ - $this->postClass->setTopicData( $this->DB->buildAndFetch( array( - 'select' => 't.*, p.poll_only', - 'from' => array( 'topics' => 't' ), - 'where' => "t.forum_id={$fid} AND t.tid={$tid}", - 'add_join' => array( - array( - 'type' => 'left', - 'from' => array( 'polls' => 'p' ), - 'where' => 'p.tid=t.tid' - ) - ) - ) ) ); - # Set Author - $this->postClass->setAuthor( $this->member->fetchMemberData() ); - - # Set from ajax - $this->postClass->setIsAjax( TRUE ); - - # Post Content - $this->postClass->setPostContent( $_POST['Post'] ); - - # Get Edit form - try - { - /** - * If there was an error, return it as a JSON error - */ - if ( $this->postClass->editPost() === FALSE ) - { - $this->returnJsonError( $this->postClass->getPostError() ); - } - - $topic = $this->postClass->getTopicData(); - $post = $this->postClass->getPostData(); - - //----------------------------------------- - // Pre-display-parse - //----------------------------------------- - - IPSText::getTextClass( 'bbcode' )->parse_smilies = $post['use_emo']; - IPSText::getTextClass( 'bbcode' )->parse_html = ( $this->registry->getClass('class_forums')->forum_by_id[ $fid ]['use_html'] and $this->memberData['g_dohtml'] and $post['post_htmlstate'] ) ? 1 : 0; - IPSText::getTextClass( 'bbcode' )->parse_nl2br = $post['post_htmlstate'] == 2 ? 1 : 0; - IPSText::getTextClass( 'bbcode' )->parse_bbcode = $this->registry->getClass('class_forums')->forum_by_id[ $fid ]['use_ibc']; - IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics'; - IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $this->postClass->getAuthor('member_group_id'); - IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $this->postClass->getAuthor('mgroup_others'); - - $post['post'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $post['post'] ); - - if ( IPSText::getTextClass( 'bbcode' )->error ) - { - $this->returnJsonError( $this->lang->words[ IPSText::getTextClass( 'bbcode' )->error ] ); - } - - $edit_by = ''; - - if ( $post['append_edit'] == 1 AND $post['edit_time'] AND $post['edit_name'] ) - { - $e_time = $this->registry->getClass( 'class_localization')->getDate( $post['edit_time'] , 'LONG' ); - $edit_by = sprintf( $this->lang->words['edited_by'], $post['edit_name'], $e_time ); - } - - /* Attachments */ - if ( ! is_object( $this->class_attach ) ) - { - //----------------------------------------- - // Grab render attach class - //----------------------------------------- - - require_once( IPSLib::getAppDir('core') . '/sources/classes/attach/class_attach.php' ); - $this->class_attach = new class_attach( $this->registry ); - } - - $this->class_attach->type = 'post'; - $this->class_attach->init(); - - $attachHtml = $this->class_attach->renderAttachments( array( $pid => $post['post'] ) ); - $post['post'] = $attachHtml[ $pid ]['html']; - $post['attachmentHtml'] = $attachHtml[ $pid ]['attachmentHtml']; - - $output = $this->registry->output->getTemplate('topic')->quickEditPost( array( - 'post' => $this->registry->getClass('output')->replaceMacros( IPSText::stripAttachTag( $post['post'] ) ), - 'attachmentHtml' => $post['attachmentHtml'], - 'pid' => $pid, - 'edit_by' => $edit_by, - 'post_edit_reason' => $post['post_edit_reason'] - ) ); - - //----------------------------------------- - // Return plain text - //----------------------------------------- - - $this->returnJsonArray( array( 'successString' => $output ) ); - } - catch ( Exception $error ) - { - $this->returnJsonError( $error->getMessage() ); - } - } - - /** - * Shows the edit box - * - * @access public - * @return void - */ - public function editBoxShow() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $pid = intval( $this->request['p'] ); - $fid = intval( $this->request['f'] ); - $tid = intval( $this->request['t'] ); - $show_reason = 0; - - //----------------------------------------- - // Check P|T|FID - //----------------------------------------- - - if ( ! $pid OR ! $tid OR ! $fid ) - { - $this->returnString( 'error' ); - } - - if ( $this->memberData['member_id'] ) - { - if ( $this->memberData['restrict_post'] ) - { - if ( $this->memberData['restrict_post'] == 1 ) - { - $this->returnString( 'nopermission' ); - } - - $post_arr = IPSMember::processBanEntry( $this->memberData['restrict_post'] ); - - if ( time() >= $post_arr['date_end'] ) - { - //----------------------------------------- - // Update this member's profile - //----------------------------------------- - - IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'restrict_post' => 0 ) ) ); - } - else - { - $this->returnString( 'nopermission' ); - } - } - } - - //----------------------------------------- - // Get classes - //----------------------------------------- - - if ( ! is_object( $this->postClass ) ) - { - require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/post/classPost.php" ); - require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/post/classPostForms.php" ); - - $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_editors' ), 'core' ); - - $this->postClass = new classPostForms( $this->registry ); - } - - # Forum Data - $this->postClass->setForumData( $this->registry->getClass('class_forums')->forum_by_id[ $fid ] ); - - # IDs - $this->postClass->setTopicID( $tid ); - $this->postClass->setPostID( $pid ); - $this->postClass->setForumID( $fid ); - - /* Topic Data */ - $this->postClass->setTopicData( $this->DB->buildAndFetch( array( - 'select' => 't.*, p.poll_only', - 'from' => array( 'topics' => 't' ), - 'where' => "t.forum_id={$fid} AND t.tid={$tid}", - 'add_join' => array( - array( - 'type' => 'left', - 'from' => array( 'polls' => 'p' ), - 'where' => 'p.tid=t.tid' - ) - ) - ) ) ); - - # Set Author - $this->postClass->setAuthor( $this->member->fetchMemberData() ); - - # Get Edit form - try - { - $html = $this->postClass->displayAjaxEditForm(); - - $html = $this->registry->output->replaceMacros( $html ); - - $this->returnHtml( $html ); - } - catch ( Exception $error ) - { - $this->returnString( $error->getMessage() ); - } - } + + * Invision Power Services + * IP.Board v3.1.4 + * Ajax Functions For Topics + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Revision: 7003 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_forums_ajax_topics extends ipsAjaxCommand +{ + /** + * Class entry point + * + * @param object Registry reference + * @return void [Outputs for the ajax handler] + */ + public function doExecute( ipsRegistry $registry ) + { + $this->lang->loadLanguageFile( array( 'public_topic', 'public_mod' ), 'forums' ); + + //----------------------------------------- + // What to do? + //----------------------------------------- + + switch( $this->request['do'] ) + { + default: + case 'editBoxShow': + $this->editBoxShow(); + break; + + case 'editBoxSave': + $this->editBoxSave(); + break; + + case 'saveTopicTitle': + $this->saveTopicTitle(); + break; + + case 'saveTopicDescription': + $this->saveTopicDescription(); + break; + + case 'rateTopic': + $this->rateTopic(); + break; + + case 'postApproveToggle': + $this->_postApproveToggle(); + break; + + case 'preview': + $this->_topicPreview(); + break; + + case 'reputation': + $this->reputation(); + break; + } + } + + /** + * Displays reputation popup + * + * @return void + */ + protected function reputation() + { + if ( !$this->memberData['gbw_view_reps'] ) + { + $this->returnJsonError('no_permission'); + } + + $postID = intval( $this->request['post'] ); + + /* Get data */ + $reps = array(); + $this->DB->build( array( + 'select' => 'member_id, rep_rating', + 'from' => 'reputation_index', + 'where' => "app='forums' AND type='pid' AND type_id='{$postID}'", + 'order' => 'rep_date', + ) ); + + $q = $this->DB->execute(); + while ( $r = $this->DB->fetch( $q ) ) + { + $r['member'] = IPSMember::load( $r['member_id'] ); + $reps[] = $r; + } + + return $this->returnHtml( $this->registry->output->getTemplate('topic')->reputationPopup( $reps ) ); + } + + /** + * Displays a topic preview + * + * @return void + */ + protected function _topicPreview() + { + /* INIT */ + $tid = intval( $this->request['tid'] ); + $pid = intval( $this->request['pid'] ); + $sTerm = trim( $this->request['searchTerm'] ); + $topic = array(); + $posts = array(); + $query = ''; + + /* Grab topic data and first post */ + $topic = $this->DB->buildAndFetch( array( 'select' => 't.*, t.title as topic_title, t.posts as topic_posts, t.last_post as topic_last_post', + 'from' => array( 'topics' => 't' ), + 'where' => 't.tid=' . $tid, + 'add_join' => array( array( 'select' => 'p.*', + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.pid=topic_firstpost', + 'type' => 'left' ), + array( 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=p.author_id', + 'type' => 'left' ), + array( 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'm.member_id=pp.pp_member_id', + 'type' => 'left' ) ) ) ); + + if ( ! $topic['tid'] OR ! $topic['pid'] ) + { + return $this->returnString( 'no_topic' ); + } + + /* Permission check */ + if ( $this->registry->class_forums->forumsCheckAccess( $topic['forum_id'], 0, 'topic', $topic, true ) !== true ) + { + return $this->returnHtml( $this->registry->output->getTemplate('global_other')->ajaxPopUpNoPermission() ); + } + + /* Build permissions */ + + $permissions['PostSoftDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedPosts( $topic['forum_id'] ); + $permissions['SoftDeleteContent'] = $this->registry->getClass('class_forums')->canSeeSoftDeleteContent( $topic['forum_id'] ); + $permissions['TopicSoftDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedTopics( $topic['forum_id'] ); + $permissions['canQueue'] = $this->registry->getClass('class_forums')->canQueuePosts( $topic['forum_id'] ); + + /* Boring old boringness */ + if ( $permissions['canQueue'] ) + { + if ( $permissions['PostSoftDeleteSee'] ) + { + $query = $this->registry->class_forums->fetchPostHiddenQuery(array('visible', 'hidden', 'sdeleted') ) . ' AND '; + } + else + { + $query = $this->registry->class_forums->fetchPostHiddenQuery(array('visible', 'hidden') ) . ' AND '; + } + } + else + { + if ( $permissions['PostSoftDeleteSee'] ) + { + $query = $this->registry->class_forums->fetchPostHiddenQuery(array('visible', 'sdeleted') ) . ' AND '; + } + else + { + $query = $this->registry->class_forums->fetchPostHiddenQuery(array('visible') ) . ' AND '; + } + } + + /* Assign */ + $posts['first'] = $topic; + + /* Any more for any more? */ + if ( $topic['topic_posts'] ) + { + /* Grab number of unread posts? */ + $last_time = $this->registry->classItemMarking->fetchTimeLastMarked( array( 'forumID' => $topic['forum_id'], 'itemID' => $tid ) ); + + if ( $last_time AND $last_time < $topic['topic_last_post'] ) + { + $count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count, MAX(pid) as max, MIN(pid) as min', + 'from' => 'posts', + 'where' => $query . "topic_id={$tid} AND post_date > " . intval( $last_time ) ) ); + } + else + { + $count = $this->DB->buildAndFetch( array( 'select' => 'MAX(pid) as max', + 'from' => 'posts', + 'where' => $query . "topic_id={$tid}" ) ); + $count['min'] = 0; + $count['count'] = 0; + } + + $topic['_lastRead'] = $last_time; + $topic['_unreadPosts'] = intval( $count['count'] ); + + /* Got a max and min */ + if ( $count['max'] ) + { + $this->DB->build( array( 'select' => 'p.*', + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.pid IN (' . intval( $count['min'] ) . ',' . intval( $count['max'] ) . ')', + 'add_join' => array( array( 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=p.author_id', + 'type' => 'left' ), + array( 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'm.member_id=pp.pp_member_id', + 'type' => 'left' ) ) ) ); + + $this->DB->execute(); + + while( $r = $this->DB->fetch() ) + { + if ( $r['pid'] == $count['max'] ) + { + $posts['last'] = $r; + } + else + { + $posts['unread'] = $r; + } + } + } + + if ( is_array( $posts['unread'] ) AND is_array( $posts['last'] ) ) + { + if ( $posts['unread']['pid'] == $posts['last']['pid'] ) + { + unset( $posts['unread'] ); + } + else if ( $posts['unread']['pid'] == $posts['first']['pid'] ) + { + unset( $posts['unread'] ); + } + + } + } + + /* Search? */ + if ( $pid AND $sTerm ) + { + $this->DB->build( array( 'select' => 'p.*', + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.pid=' . $pid, + 'add_join' => array( array( 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=p.author_id', + 'type' => 'left' ), + array( 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'm.member_id=pp.pp_member_id', + 'type' => 'left' ) ) ) ); + + $this->DB->execute(); + + $posts['search'] = $this->DB->fetch(); + } + + /* Still here? */ + foreach( $posts as $k => $data ) + { + $data = IPSMember::buildDisplayData( $data ); + + /* Search term? */ + if ( $k == 'search' AND $pid AND $sTerm ) + { + $data['post'] = IPSText::truncateTextAroundPhrase( IPSText::getTextClass( 'bbcode' )->stripAllTags( str_replace( '
    ', ' ', $data['post'] ) ), $sTerm ); + $data['post'] = IPSText::searchHighlight( $data['post'], $sTerm ); + } + else + { + $data['post'] = IPSText::truncate( IPSText::getTextClass( 'bbcode' )->stripAllTags( $data['post'] ), 500 ); + } + + $data['_isVisible'] = ( $this->registry->getClass('class_forums')->fetchHiddenType( $data ) == 'visible' ) ? true : false; + $data['_isHidden'] = ( $this->registry->getClass('class_forums')->fetchHiddenType( $data ) == 'hidden' ) ? true : false; + $data['_isDeleted'] = ( $this->registry->getClass('class_forums')->fetchHiddenType( $data ) == 'sdelete' ) ? true : false; + + $posts[ $k ] = $data; + } + + $topic['_key'] = uniqid(microtime()); + + return $this->returnHtml( $this->registry->output->getTemplate('topic')->topicPreview( $topic, $posts ) ); + } + + /** + * Toggle the posts approve thingy + * + * @return void + */ + protected function _postApproveToggle() + { + /* INIT */ + $topicID = intval( $this->request['t'] ); + $postID = intval( $this->request['p'] ); + $approve = ( $this->request['approve'] == 1 ) ? TRUE : FALSE; + $_yoGo = FALSE; + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php', 'moderatorLibrary', 'forums' ); + $_modLibrary = new $classToLoad( $this->registry ); + + /* Load topic */ + $topic = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'topics', + 'where' => 'tid=' . $topicID ) ); + + if ( ! $topic['tid'] ) + { + $this->returnJsonArray( array( 'error' => 'notopic' ) ); + } + + /* Permission Checks */ + if ( $this->memberData['g_is_supmod'] ) + { + $_yoGo = TRUE; + } + else if ( is_array( $this->memberData['forumsModeratorData'] ) AND $this->memberData['forumsModeratorData'][ $topic['forum_id'] ]['post_q'] ) + { + $_yoGo = TRUE; + } + + if ( ! $_yoGo ) + { + $this->returnJsonArray( array( 'error' => 'nopermission' ) ); + } + + $_modLibrary->postToggleApprove( array( $postID ), $approve, $topicID ); + + $this->returnJsonArray( array( 'status' => 'ok', 'postApproved' => $approve ) ); + } + + /** + * Add vote to rating + * + * @return void + */ + public function rateTopic() + { + /* INIT */ + $topic_id = intval( $this->request['t'] ); + $rating_id = intval( $this->request['rating'] ); + $vote_cast = array(); + + IPSDebug::fireBug( 'info', array( 'The topic rating request has been received...' ) ); + + /* Query topic */ + $topic_data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => "tid={$topic_id}" ) ); + + /* Make sure we have a valid topic id */ + if( ! $topic_data['tid'] ) + { + IPSDebug::fireBug( 'error', array( 'The topic was not found in the database' ) ); + $this->returnJsonArray( array( 'error_key' => 'topics_no_tid', 'error_code' => 10346 ) ); + } + + if( $topic_data['state'] != 'open' ) + { + IPSDebug::fireBug( 'error', array( 'The topic is not open' ) ); + + $this->returnJsonArray( array( 'error_key' => 'topic_rate_locked', 'error_code' => 10348 ) ); + } + + /* Query Forum */ + $forum_data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'forums', 'where' => "id={$topic_data['forum_id']}" ) ); + + /* Permission Check */ + $can_rate = ( $forum_data['forum_allow_rating'] && $this->memberData['member_id'] && $this->memberData['g_topic_rate_setting'] ) ? 1 : 0; + + if( ! $can_rate ) + { + IPSDebug::fireBug( 'error', array( 'The user cannot rate topics in this forum' ) ); + + $this->returnJsonArray( array( 'error_key' => 'topic_rate_no_perm', 'error_code' => 10345 ) ); + exit(); + } + + /* Sneaky members rating topic more than 5? */ + if( $rating_id > 5 ) + { + $rating_id = 5; + } + + if( $rating_id < 0 ) + { + $rating_id = 0; + } + + /* Have we rated before? */ + $rating = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topic_ratings', 'where' => "rating_tid={$topic_data['tid']} and rating_member_id=".$this->memberData['member_id'] ) ); + + /* Already rated? */ + if( $rating['rating_id'] ) + { + /* Do we allow re-ratings? */ + if( $this->memberData['g_topic_rate_setting'] == 2 ) + { + if( $rating_id != $rating['rating_value'] ) + { + $new_rating = $rating_id - $rating['rating_value']; + + $this->DB->update( 'topic_ratings', array( 'rating_value' => $rating_id ), 'rating_id=' . $rating['rating_id'] ); + + $this->DB->update( 'topics', array( 'topic_rating_total' => intval( $topic_data['topic_rating_total'] ) + $new_rating ), 'tid=' . $topic_data['tid'] ); + } + + IPSDebug::fireBug( 'info', array( 'The rating was updated' ) ); + + $this->returnJsonArray( array( + 'rated' => 'update', + 'message' => $this->lang->words['topic_rating_changed'], + 'topic_rating_total' => intval( $topic_data['topic_rating_total'] ) + $new_rating, + 'topic_rating_hits' => $topic_data['topic_rating_hits'] + ) ); + } + else + { + IPSDebug::fireBug( 'warn', array( 'The user is not allowed to update their rating' ) ); + + $this->returnJsonArray( array( 'error_key' => 'topic_rated_already', 'error_code' => 0 ) ); + } + } + /* NEW RATING! */ + else + { + $this->DB->insert( 'topic_ratings', array( + 'rating_tid' => $topic_data['tid'], + 'rating_member_id' => $this->memberData['member_id'], + 'rating_value' => $rating_id, + 'rating_ip_address' => $this->member->ip_address + ) + ); + + $this->DB->update( 'topics', array( + 'topic_rating_hits' => intval( $topic_data['topic_rating_hits'] ) + 1, + 'topic_rating_total' => intval( $topic_data['topic_rating_total'] ) + $rating_id + ), 'tid='.$topic_data['tid'] ); + + IPSDebug::fireBug( 'info', array( 'The rating was inserted' ) ); + + $this->returnJsonArray( array( + 'rated' => 'new', + 'message' => $this->lang->words['topic_rating_done'], + 'topic_rating_total' => intval( $topic_data['topic_rating_total'] ) + $rating_id , + 'topic_rating_hits' => intval( $topic_data['topic_rating_hits'] ) + 1, + '_rate_int' => round( (intval( $topic_data['topic_rating_total'] ) + $rating_id) / (intval( $topic_data['topic_rating_hits'] ) + 1) ) + ) ); + } + } + + /** + * Saves a ajax topic title edit + * + * @return void + */ + public function saveTopicTitle() + { + /* INIT */ + IPSDebug::fireBug( 'info', array( 'Initial name: ' . $_POST['name'] ) ); + $name = $_POST['name']; + IPSDebug::fireBug( 'info', array( 'after convert and make safe: ' . $name ) ); + $tid = intval( $this->request['tid'] ); + $can_edit = 0; + + IPSDebug::fireBug( 'info', array( 'The topic title after converting is: ' . $name ) ); + + /* Check ID */ + if( ! $tid ) + { + $this->returnJsonError( $this->lang->words['ajax_no_topic_id'] ); + } + + /* Load Topic */ + $topic = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid=' . $tid ) ); + + if( ! $topic['tid'] ) + { + $this->returnJsonError( $this->lang->words['ajax_topic_not_found'] ); + } + + /* Check Permissions */ + if ( $this->memberData['g_is_supmod'] ) + { + $can_edit = 1; + } + + else if( is_array( $this->memberData['forumsModeratorData'] ) AND $this->memberData['forumsModeratorData'][ $topic['forum_id'] ]['edit_topic'] ) + { + $can_edit = 1; + } + + if( ! $can_edit ) + { + $this->returnJsonError( $this->lang->words['ajax_no_t_permission'] ); + } + + /* Make sure we have a valid name */ + if( trim( $name ) == '' || ! $name ) + { + $this->returnJsonError( $this->lang->words['ajax_no_t_name'] ); + exit(); + } + + /* Clean */ + if( $this->settings['etfilter_shout'] ) + { + if( function_exists('mb_convert_case') ) + { + if( in_array( strtolower( $this->settings['gb_char_set'] ), array_map( 'strtolower', mb_list_encodings() ) ) ) + { + $name = mb_convert_case( $name, MB_CASE_TITLE, $this->settings['gb_char_set'] ); + } + else + { + $name = ucwords( mb_strtolower($name) ); + } + } + else + { + $name = ucwords( mb_strtolower($name) ); + } + } + + $name = IPSText::parseCleanValue( $name ); + $name = $this->cleanTopicTitle( $name ); + $name = IPSText::getTextClass( 'bbcode' )->stripBadWords( $name ); + $title_seo = IPSText::makeSeoTitle( $name, TRUE ); + + /* Update the topic */ + $this->DB->update( 'topics', array( 'title' => $name, 'title_seo' => $title_seo ), 'tid='.$tid ); + + $this->DB->insert( 'moderator_logs', array( + 'forum_id' => intval( $topic['forum_id'] ), + 'topic_id' => $tid, + 'member_id' => $this->memberData['member_id'], + 'member_name' => $this->memberData['members_display_name'], + 'ip_address' => $this->member->ip_address, + 'http_referer' => htmlspecialchars( my_getenv('HTTP_REFERER') ), + 'ctime' => time(), + 'topic_title' => $name, + 'action' => sprintf( $this->lang->words['ajax_topictitle'], $topic['title'], $name), + 'query_string' => htmlspecialchars( my_getenv('QUERY_STRING') ), + ) ); + + /* Update the last topic title? */ + if ( $topic['tid'] == $this->registry->class_forums->forum_by_id[ $topic['forum_id'] ]['last_id'] ) + { + $this->DB->update( 'forums', array( 'last_title' => $name, 'seo_last_title' => $title_seo ), 'id=' . $topic['forum_id'] ); + } + + if ( $topic['tid'] == $this->registry->class_forums->forum_by_id[ $topic['forum_id'] ]['newest_id'] ) + { + $this->DB->update( 'forums', array( 'newest_title' => $name ), 'id=' . $topic['forum_id'] ); + } + + /* All Done */ + $this->returnJsonArray( array( 'title' => $name, 'url' => $this->registry->output->buildSEOUrl( 'showtopic=' . $tid, 'public', $title_seo, 'showtopic' ) ) ); + } + + /** + * Clean the topic title + * + * @param string Raw title + * @return string Cleaned title + */ + public function cleanTopicTitle( $title="" ) + { + if( $this->settings['etfilter_punct'] ) + { + $title = preg_replace( '/\?{1,}/' , "?" , $title ); + $title = preg_replace( '/(!){1,}/' , "!", $title ); + } + + //----------------------------------------- + // The DB column is 250 chars, so we need to do true mb_strcut, then fix broken HTML entities + // This should be fine, as DB would do it regardless (cept we can fix the entities) + //----------------------------------------- + + $title = preg_replace( "/&(#{0,}([a-zA-Z0-9]+?)?)?$/", '', IPSText::mbsubstr( $title, 0, 250 ) ); + + $title = IPSText::stripAttachTag( $title ); + $title = str_replace( "
    ", "", $title ); + $title = trim( $title ); + + return $title; + } + + /** + * Saves a ajax topic description edit + * + * @return void + */ + public function saveTopicDescription() + { + /* INIT */ + $description = $this->convertAndMakeSafe( $this->request['description'], TRUE ); + $tid = intval( $this->request['tid'] ); + $can_edit = 0; + + /* Check ID */ + if( ! $tid ) + { + $this->returnString( $this->lang->words['ajax_no_topic_id'] ); + } + + /* Load Topic */ + $topic = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid=' . $tid ) ); + + if( ! $topic['tid'] ) + { + $this->returnString( $this->lang->words['ajax_topic_not_found'] ); + } + + /* Check Permissions */ + if ( $this->memberData['g_is_supmod'] ) + { + $can_edit = 1; + } + + if( $this->memberData['forumsModeratorData'][ $topic['forum_id'] ]['edit_topic'] ) + { + $can_edit = 1; + } + + if( ! $can_edit ) + { + $this->class_ajax->returnString( $this->lang->words['ajax_no_t_permission'] ); + } + + /* Update the description */ + $this->DB->update( 'topics', array( 'description' => $description ), 'tid=' . $tid ); + + $this->DB->insert( 'moderator_logs', array( + 'forum_id' => intval( $topic['forum_id'] ), + 'topic_id' => $tid, + 'member_id' => $this->memberData['member_id'], + 'member_name' => $this->memberData['members_display_name'], + 'ip_address' => $this->input['IP_ADDRESS'], + 'http_referer'=> htmlspecialchars( my_getenv('HTTP_REFERER') ), + 'ctime' => time(), + 'topic_title' => $topic['title'], + 'action' => $this->lang->words['ajax_topicdesc'], + 'query_string'=> htmlspecialchars( my_getenv('QUERY_STRING') ), + ) ); + + /* All Done */ + $this->returnString( 'success' ); + } + + /** + * Saves the post + * + * @return void + */ + public function editBoxSave() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $pid = intval( $this->request['p'] ); + $fid = intval( $this->request['f'] ); + $tid = intval( $this->request['t'] ); + $attach_pids = array(); + + $this->request['post_edit_reason'] = $this->convertAndMakeSafe( $_POST['post_edit_reason'] ); + + //----------------------------------------- + // Set things right + //----------------------------------------- + + $this->request['Post'] = IPSText::parseCleanValue( $_POST['Post'] ); + + //----------------------------------------- + // Check P|T|FID + //----------------------------------------- + + if ( ! $pid OR ! $tid OR ! $fid ) + { + $this->returnString( 'error' ); + } + + if ( $this->memberData['member_id'] ) + { + if ( $this->memberData['restrict_post'] ) + { + if ( $this->memberData['restrict_post'] == 1 ) + { + $this->returnString( 'nopermission' ); + } + + $post_arr = IPSMember::processBanEntry( $this->memberData['restrict_post'] ); + + if ( time() >= $post_arr['date_end'] ) + { + //----------------------------------------- + // Update this member's profile + //----------------------------------------- + + IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'restrict_post' => 0 ) ) ); + } + else + { + $this->returnString( 'nopermission' ); + } + } + } + + //----------------------------------------- + // Load Lang + //----------------------------------------- + + $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_topics' ) ); + + if ( ! is_object( $this->postClass ) ) + { + require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPost.php' ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPostForms.php', 'classPostForms', 'forums' ); + + $this->postClass = new $classToLoad( $this->registry ); + } + + # Forum Data + $this->postClass->setForumData( $this->registry->getClass('class_forums')->forum_by_id[ $fid ] ); + + # IDs + $this->postClass->setTopicID( $tid ); + $this->postClass->setPostID( $pid ); + $this->postClass->setForumID( $fid ); + + if( isset($this->request['post_htmlstatus']) ) // Off is "0" + { + $this->postClass->setSettings( array( 'post_htmlstatus' => $this->request['post_htmlstatus'] ) ); + } + + /* Topic Data */ + $this->postClass->setTopicData( $this->DB->buildAndFetch( array( + 'select' => 't.*, p.poll_only', + 'from' => array( 'topics' => 't' ), + 'where' => "t.forum_id={$fid} AND t.tid={$tid}", + 'add_join' => array( + array( + 'type' => 'left', + 'from' => array( 'polls' => 'p' ), + 'where' => 'p.tid=t.tid' + ) + ) + ) ) ); + # Set Author + $this->postClass->setAuthor( $this->member->fetchMemberData() ); + + # Set from ajax + $this->postClass->setIsAjax( TRUE ); + + # Post Content + $this->postClass->setPostContent( $_POST['Post'] ); + + # Get Edit form + try + { + /** + * If there was an error, return it as a JSON error + */ + if ( $this->postClass->editPost() === FALSE ) + { + $this->returnJsonError( $this->postClass->getPostError() ); + } + + $topic = $this->postClass->getTopicData(); + $post = $this->postClass->getPostData(); + + //----------------------------------------- + // Pre-display-parse + //----------------------------------------- + + IPSText::getTextClass( 'bbcode' )->parse_smilies = $post['use_emo']; + IPSText::getTextClass( 'bbcode' )->parse_html = ( $this->registry->getClass('class_forums')->forum_by_id[ $fid ]['use_html'] and $this->memberData['g_dohtml'] and $post['post_htmlstate'] ) ? 1 : 0; + IPSText::getTextClass( 'bbcode' )->parse_nl2br = $post['post_htmlstate'] == 2 ? 1 : 0; + IPSText::getTextClass( 'bbcode' )->parse_bbcode = $this->registry->getClass('class_forums')->forum_by_id[ $fid ]['use_ibc']; + IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics'; + IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $this->postClass->getAuthor('member_group_id'); + IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $this->postClass->getAuthor('mgroup_others'); + + $post['post'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $post['post'] ); + + if ( IPSText::getTextClass( 'bbcode' )->error ) + { + $this->returnJsonError( $this->lang->words[ IPSText::getTextClass( 'bbcode' )->error ] ); + } + + $edit_by = ''; + + if ( $post['append_edit'] == 1 AND $post['edit_time'] AND $post['edit_name'] ) + { + $e_time = $this->registry->getClass( 'class_localization')->getDate( $post['edit_time'] , 'LONG' ); + $edit_by = sprintf( $this->lang->words['edited_by'], $post['edit_name'], $e_time ); + } + + /* Attachments */ + if ( ! is_object( $this->class_attach ) ) + { + //----------------------------------------- + // Grab render attach class + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $this->class_attach = new $classToLoad( $this->registry ); + } + + $this->class_attach->type = 'post'; + $this->class_attach->init(); + + $attachHtml = $this->class_attach->renderAttachments( array( $pid => $post['post'] ) ); + $post['post'] = $attachHtml[ $pid ]['html']; + $post['attachmentHtml'] = $attachHtml[ $pid ]['attachmentHtml']; + + $output = $this->registry->output->getTemplate('topic')->quickEditPost( array( + 'post' => $this->registry->getClass('output')->replaceMacros( IPSText::stripAttachTag( $post['post'] ) ), + 'attachmentHtml' => $post['attachmentHtml'], + 'pid' => $pid, + 'edit_by' => $edit_by, + 'post_edit_reason' => $post['post_edit_reason'] + ) ); + + //----------------------------------------- + // Return plain text + //----------------------------------------- + + $this->returnJsonArray( array( 'successString' => $output ) ); + } + catch ( Exception $error ) + { + $this->returnJsonError( $error->getMessage() ); + } + } + + /** + * Shows the edit box + * + * @return void + */ + public function editBoxShow() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $pid = intval( $this->request['p'] ); + $fid = intval( $this->request['f'] ); + $tid = intval( $this->request['t'] ); + $show_reason = 0; + + //----------------------------------------- + // Check P|T|FID + //----------------------------------------- + + if ( ! $pid OR ! $tid OR ! $fid ) + { + $this->returnString( 'error' ); + } + + if ( $this->memberData['member_id'] ) + { + if ( $this->memberData['restrict_post'] ) + { + if ( $this->memberData['restrict_post'] == 1 ) + { + $this->returnString( 'nopermission' ); + } + + $post_arr = IPSMember::processBanEntry( $this->memberData['restrict_post'] ); + + if ( time() >= $post_arr['date_end'] ) + { + //----------------------------------------- + // Update this member's profile + //----------------------------------------- + + IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'restrict_post' => 0 ) ) ); + } + else + { + $this->returnString( 'nopermission' ); + } + } + } + + //----------------------------------------- + // Get classes + //----------------------------------------- + + if ( ! is_object( $this->postClass ) ) + { + $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_editors' ), 'core' ); + + require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/post/classPost.php" ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPostForms.php', 'classPostForms', 'forums' ); + $this->postClass = new $classToLoad( $this->registry ); + } + + # Forum Data + $this->postClass->setForumData( $this->registry->getClass('class_forums')->forum_by_id[ $fid ] ); + + # IDs + $this->postClass->setTopicID( $tid ); + $this->postClass->setPostID( $pid ); + $this->postClass->setForumID( $fid ); + + /* Topic Data */ + $this->postClass->setTopicData( $this->DB->buildAndFetch( array( + 'select' => 't.*, p.poll_only', + 'from' => array( 'topics' => 't' ), + 'where' => "t.forum_id={$fid} AND t.tid={$tid}", + 'add_join' => array( + array( + 'type' => 'left', + 'from' => array( 'polls' => 'p' ), + 'where' => 'p.tid=t.tid' + ) + ) + ) ) ); + + # Set Author + $this->postClass->setAuthor( $this->member->fetchMemberData() ); + + # Get Edit form + try + { + $html = $this->postClass->displayAjaxEditForm(); + + $html = $this->registry->output->replaceMacros( $html ); + + $this->returnHtml( $html ); + } + catch ( Exception $error ) + { + $this->returnString( $error->getMessage() ); + } + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_public/ajax/usercp.php b/upload/admin/applications/forums/modules_public/ajax/usercp.php index 7e16ef30..6dccc878 100644 --- a/upload/admin/applications/forums/modules_public/ajax/usercp.php +++ b/upload/admin/applications/forums/modules_public/ajax/usercp.php @@ -1,67 +1,69 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_forums_ajax_usercp extends ipsAjaxCommand -{ - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - switch( $this->request['do'] ) - { - case 'get_avatar_images': - $this->_getAvatarImages(); - break; - } - } - - - /** - * Get avatar images in a directory - * - * @access protected - * @return void [Outputs to screen] - */ - protected function _getAvatarImages() - { - $dir = urldecode( $this->request['cat'] ); - $images = IPSMember::getFunction()->getHostedAvatarsFromCategory( $dir ); - - if ( $images === FALSE ) - { - $this->returnJsonError( $this->lang->words['ajax_avatar_dir'] ); - exit(); - } - else - { - $output = $this->registry->getClass('output')->getTemplate('ucp')->forumsInlineAvatarImages( $images, $dir ); - - $this->returnHtml( $output ); - } - } + + * Invision Power Services + * IP.Board v3.1.4 + * Member property updater (AJAX) + * Last Updated: $Date: 2010-04-15 15:46:26 -0400 (Thu, 15 Apr 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Revision: 6133 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_forums_ajax_usercp extends ipsAjaxCommand +{ + /** + * Main class entry point + * + * @access public + * @param object ipsRegistry reference + * @return void [Outputs to screen] + */ + public function doExecute( ipsRegistry $registry ) + { + switch( $this->request['do'] ) + { + case 'get_avatar_images': + $this->_getAvatarImages(); + break; + } + } + + + /** + * Get avatar images in a directory + * + * @access protected + * @return void [Outputs to screen] + */ + protected function _getAvatarImages() + { + $dir = urldecode( $this->request['cat'] ); + $images = IPSMember::getFunction()->getHostedAvatarsFromCategory( $dir ); + + if ( $images === FALSE ) + { + $this->returnJsonError( $this->lang->words['ajax_avatar_dir'] ); + exit(); + } + else + { + $output = $this->registry->getClass('output')->getTemplate('ucp')->forumsInlineAvatarImages( $images, $dir ); + + $this->returnHtml( $output ); + } + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_public/extras/boardrules.php b/upload/admin/applications/forums/modules_public/extras/boardrules.php index ac2a9fc8..82805619 100644 --- a/upload/admin/applications/forums/modules_public/extras/boardrules.php +++ b/upload/admin/applications/forums/modules_public/extras/boardrules.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Board Rules - * Last Updated: $Date: 2009-07-16 10:24:48 -0400 (Thu, 16 Jul 2009) $ + * Last Updated: $Date: 2010-06-10 06:36:42 -0400 (Thu, 10 Jun 2010) $ + * * * @author $Author $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4900 $ + * @version $Rev: 6502 $ */ if ( ! defined( 'IN_IPB' ) ) { @@ -59,7 +61,7 @@ class public_forums_extras_boardrules extends ipsCommand //$row['conf_value'] = preg_replace( '##', 'registry->output->addNavigation( $this->settings['gl_title'], '' ); - $this->registry->output->setTitle( $this->settings['gl_title'] ); + $this->registry->output->setTitle( $this->settings['gl_title'] . ' - ' . ipsRegistry::$settings['board_name'] ); $this->registry->output->addContent( $this->registry->output->getTemplate('emails')->boardRules( $this->settings['gl_title'], $row['conf_value'] ) ); $this->registry->output->sendOutput(); } diff --git a/upload/admin/applications/forums/modules_public/extras/defaultSection.php b/upload/admin/applications/forums/modules_public/extras/defaultSection.php index 9390434a..07203c59 100644 --- a/upload/admin/applications/forums/modules_public/extras/defaultSection.php +++ b/upload/admin/applications/forums/modules_public/extras/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Default forum extras module section - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ */ if ( ! defined( 'IN_IPB' ) ) diff --git a/upload/admin/applications/forums/modules_public/extras/forward.php b/upload/admin/applications/forums/modules_public/extras/forward.php index 3fa05cd0..1d9f378d 100644 --- a/upload/admin/applications/forums/modules_public/extras/forward.php +++ b/upload/admin/applications/forums/modules_public/extras/forward.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Forward a topic to someone - * Last Updated: $Date: 2009-06-25 19:58:52 -0400 (Thu, 25 Jun 2009) $ + * Last Updated: $Date: 2010-10-14 06:42:56 -0400 (Thu, 14 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: mmecham $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Revision: 4822 $ + * @version $Revision: 6975 $ * */ @@ -48,6 +50,8 @@ class public_forums_extras_forward extends ipsCommand * @var array Array of topic details */ private $topic = array(); + + private $page = array(); /** * Class entry point @@ -64,54 +68,77 @@ class public_forums_extras_forward extends ipsCommand ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_emails' ), 'core' ); - //----------------------------------------- - // Check the input - //----------------------------------------- - - $this->request['t'] = intval($this->request['t']); - $this->request['f'] = intval($this->request['f']); - - if ( !$this->request['t'] ) + /* Via URL and topic title? */ + if ( $this->request['url'] AND $this->request['title'] ) { - $this->registry->output->showError( 'forward_no_tid', 10321 ); + $this->page['url'] = IPSText::parseCleanValue( IPSText::base64_decode_urlSafe( $this->request['url'] ) ); + $this->page['title'] = IPSText::parseCleanValue( urldecode( $this->request['title'] ) ); } + else + { + //----------------------------------------- + // Check the input + //----------------------------------------- + + $this->request['t'] = intval($this->request['t']); + $this->request['f'] = intval($this->request['f']); + + if ( ! $this->request['t'] ) + { + $this->registry->output->showError( 'forward_no_tid', 10321 ); + } + + //----------------------------------------- + // Get the topic details + //----------------------------------------- + + $this->topic = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => "tid=" . $this->request['t'] ) ); + $this->forum = ipsRegistry::getClass('class_forums')->forum_by_id[ $this->topic['forum_id'] ]; + + //----------------------------------------- + // Error out if we can not find the forum + //----------------------------------------- + + if ( ! $this->forum['id'] ) + { + $this->registry->output->showError( 'forward_no_fid', 10322 ); + } + + //----------------------------------------- + // Error out if we can not find the topic + //----------------------------------------- + + if ( !$this->topic['tid'] ) + { + $this->registry->output->showError( 'forward_no_tid', 10323 ); + } - //----------------------------------------- - // Get the topic details - //----------------------------------------- - - $this->topic = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => "tid=" . $this->request['t'] ) ); - $this->forum = ipsRegistry::getClass('class_forums')->forum_by_id[ $this->topic['forum_id'] ]; - - //----------------------------------------- - // Error out if we can not find the forum - //----------------------------------------- - - if ( ! $this->forum['id'] ) - { - $this->registry->output->showError( 'forward_no_fid', 10322 ); + //----------------------------------------- + // Check viewing permissions, private forums, + // password forums, etc + //----------------------------------------- + + if (! $this->memberData['member_id'] ) + { + $this->registry->output->showError( 'forward_only_members', 10324 ); + } + + ipsRegistry::getClass('class_forums')->forumsCheckAccess( $this->forum['id'] ); } - //----------------------------------------- - // Error out if we can not find the topic - //----------------------------------------- - - if ( !$this->topic['tid'] ) + /* last check */ + if ( ! $this->topic['tid'] AND ! $this->page['url'] ) { - $this->registry->output->showError( 'forward_no_tid', 10323 ); - } - - //----------------------------------------- - // Check viewing permissions, private forums, - // password forums, etc - //----------------------------------------- - - if (! $this->memberData['member_id'] ) - { - $this->registry->output->showError( 'forward_only_members', 10324 ); + $this->registry->output->showError( 'forward_no_tid', 10323.2 ); } - ipsRegistry::getClass('class_forums')->forumsCheckAccess( $this->forum['id'] ); + /* Ok, I lied. Is this share entry enabled? */ + $cache = ipsRegistry::cache()->getCache('sharelinks'); + + if ( ! is_array( $cache['email'] ) OR ! $cache['email']['share_enabled'] ) + { + $this->registry->output->showError( 'forward_turned_off', 103240 ); + } //----------------------------------------- // What to do? @@ -141,9 +168,18 @@ class public_forums_extras_forward extends ipsCommand if ( $this->request['k'] != $this->member->form_hash ) { - $this->registry->getClass('output')->showError( 'no_permission', 2029 ); + $this->registry->getClass('output')->showError( 'no_permission', 2029, null, null, 403 ); } + /* Check the CAPTCHA */ + if ( $this->settings['bot_antispam_type'] != 'none' ) + { + if ( $this->registry->getClass('class_captcha')->validate() !== TRUE ) + { + return $this->_showForm('err_reg_code'); + } + } + $lang_to_use = 1; foreach( ipsRegistry::cache()->getCache('lang_data') as $l ) @@ -175,12 +211,9 @@ class public_forums_extras_forward extends ipsCommand IPSText::getTextClass('email')->getTemplate( "forward_page", $lang_to_use ); - IPSText::getTextClass('email')->buildMessage( array( - 'THE_MESSAGE' => $this->request['message'], - 'TO_NAME' => $this->request['to_name'], - 'FROM_NAME' => $this->memberData['members_display_name'], - ) - ); + IPSText::getTextClass('email')->buildMessage( array( 'THE_MESSAGE' => $this->request['message'], + 'TO_NAME' => $this->request['to_name'], + 'FROM_NAME' => $this->memberData['members_display_name'] ) ); IPSText::getTextClass('email')->subject = $this->request['subject']; IPSText::getTextClass('email')->to = $this->request['to_email']; @@ -196,19 +229,44 @@ class public_forums_extras_forward extends ipsCommand * @access private * @return void [Outputs to screen/redirects] */ - private function _showForm() + private function _showForm( $msg='' ) { ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_email_content' ), 'core' ); - - $this->lang->words['send_text'] = str_replace( "<#THE LINK#>" , $this->registry->getClass('output')->buildSEOUrl( "showtopic=" . $this->topic['tid'], 'public', $this->topic['title_seo'], 'showtopic') , $this->lang->words['send_text'] ); - $this->lang->words['send_text'] = str_replace( "<#USER NAME#>", $this->memberData['members_display_name'], $this->lang->words['send_text'] ); - - $this->output = $this->registry->getClass('output')->getTemplate('emails')->forward_form( $this->topic['title'], $this->lang->words['send_text'] ); - - $this->registry->output->addNavigation( $this->forum['name'], $this->settings['_base_url'] . "showforum={$this->forum['id']}" ); - $this->registry->output->addNavigation( $this->topic['title'], $this->settings['_base_url'] . "showtopic={$this->topic['tid']}" ); - $this->registry->output->addNavigation( $this->lang->words['title'], '' ); - $this->registry->output->setTitle( $this->lang->words['title'] ); + + if ( $this->topic['tid'] ) + { + $this->lang->words['send_text'] = str_replace( "<#THE LINK#>" , $this->registry->getClass('output')->buildSEOUrl( "showtopic=" . $this->topic['tid'], 'public', $this->topic['title_seo'], 'showtopic') , $this->lang->words['send_text'] ); + $this->lang->words['send_text'] = str_replace( "<#USER NAME#>", $this->memberData['members_display_name'], $this->lang->words['send_text'] ); + $subject = $this->topic['title']; + } + else + { + $this->lang->words['send_text'] = str_replace( "<#THE LINK#>" , $this->page['url'] , $this->lang->words['send_text'] ); + $this->lang->words['send_text'] = str_replace( "<#USER NAME#>", $this->memberData['members_display_name'], $this->lang->words['send_text'] ); + $subject = $this->page['title']; + } + + /* CAPTCHA */ + if( $this->settings['bot_antispam_type'] != 'none' ) + { + $captchaHTML = $this->registry->getClass('class_captcha')->getTemplate(); + } + + $this->output = $this->registry->getClass('output')->getTemplate('emails')->forward_form( $subject, $this->lang->words['send_text'], '', $captchaHTML, $msg ); + + if ( $this->topic['tid'] ) + { + $this->registry->output->addNavigation( $this->forum['name'], $this->settings['_base_url'] . "showforum={$this->forum['id']}" ); + $this->registry->output->addNavigation( $this->topic['title'], $this->settings['_base_url'] . "showtopic={$this->topic['tid']}" ); + $this->registry->output->addNavigation( $this->lang->words['title'], '' ); + $this->registry->output->setTitle( $this->lang->words['title'] . ' - ' . ipsRegistry::$settings['board_name'] ); + } + else + { + $this->registry->output->addNavigation( $this->lang->words['title'], '' ); + $this->registry->output->setTitle( $this->lang->words['title'] . ' - ' . ipsRegistry::$settings['board_name'] ); + } + $this->registry->output->addContent( $this->output ); $this->registry->output->sendOutput(); } diff --git a/upload/admin/applications/forums/modules_public/extras/index.html b/upload/admin/applications/forums/modules_public/extras/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_public/extras/index.html +++ b/upload/admin/applications/forums/modules_public/extras/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_public/extras/legends.php b/upload/admin/applications/forums/modules_public/extras/legends.php index cc29dd75..6d1dc912 100644 --- a/upload/admin/applications/forums/modules_public/extras/legends.php +++ b/upload/admin/applications/forums/modules_public/extras/legends.php @@ -1,17 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Emoticon and BBCode Legends - * Last Updated: $Date: 2009-04-21 16:36:40 -0400 (Tue, 21 Apr 2009) $ + * Last Updated: $Date: 2010-06-10 06:36:42 -0400 (Thu, 10 Jun 2010) $ + * * * @author $Author $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Rev: 4521 $ + * @link http://www.invisionpower.com + * @version $Rev: 6502 $ * */ @@ -57,7 +59,7 @@ class public_forums_extras_legends extends ipsCommand } /* If we have any HTML to print, do so... */ - $this->registry->getClass('output')->setTitle( $this->page_title ); + $this->registry->getClass('output')->setTitle( $this->page_title . ' - ' . ipsRegistry::$settings['board_name'] ); $this->registry->getClass('output')->popUpWindow( $this->output ); } diff --git a/upload/admin/applications/forums/modules_public/extras/rating.php b/upload/admin/applications/forums/modules_public/extras/rating.php index 792f6990..5b45a8ed 100644 --- a/upload/admin/applications/forums/modules_public/extras/rating.php +++ b/upload/admin/applications/forums/modules_public/extras/rating.php @@ -1,198 +1,206 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_forums_extras_rating extends ipsCommand -{ - /** - * Forum data - * - * @access public - * @var array - */ - public $forum = array(); - - /** - * Topic data - * - * @access public - * @var array - */ - public $topic = array(); - - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen/redirects] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $topic_id = intval($this->request['t']); - $rating_id = intval($this->request['rating']); - $vote_cast = array(); - - $this->registry->class_localization->loadLanguageFile( array( 'public_topic' ) ); - - //----------------------------------------- - // Get data - //----------------------------------------- - - if ( ! $topic_id ) - { - $this->registry->output->showError( 'topics_no_tid', 10346 ); - } - - $this->topic = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid=' . $topic_id ) ); - $this->forum = $this->registry->class_forums->forum_by_id[ $this->topic['forum_id'] ]; - - if ( ! $this->forum['id'] ) - { - $this->registry->output->showError( 'topics_no_fid', 103150 ); - } - - if ( ! $this->topic['tid'] ) - { - $this->registry->output->showError( 'topics_no_tid', 10347 ); - } - - //----------------------------------------- - // Locked topic? - //----------------------------------------- - - if ( $this->topic['state'] != 'open' ) - { - $this->registry->output->showError( 'topic_rate_locked', 10348 ); - } - - if ( ! $this->registry->class_forums->canQueuePosts($this->forum['id']) ) - { - if ( $this->topic['approved'] != 1 ) - { - $this->registry->output->showError( 'topic_not_approved', 103151 ); - } - } - - $this->registry->class_forums->forumsCheckAccess( $this->forum['id'], 1, 'topic', $this->topic ); - - //----------------------------------------- - // Permissions check - //----------------------------------------- - - if ( $this->memberData['member_id'] ) - { - $_can_rate = intval( $this->memberData['g_topic_rate_setting'] ); - } - else - { - $_can_rate = 0; - } - - if ( ! $this->forum['forum_allow_rating'] ) - { - $_can_rate = 0; - } - - if ( ! $_can_rate ) - { - $this->registry->output->showError( 'topic_rate_no_perm', 10345 ); - } - - //----------------------------------------- - // Sneaky members rating topic more than 5? - //----------------------------------------- - - if( $rating_id > 5 ) - { - $rating_id = 5; - } - - if( $rating_id < 0 ) - { - $rating_id = 0; - } - - //----------------------------------------- - // Have we rated before? - //----------------------------------------- - - $rating = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topic_ratings', 'where' => "rating_tid={$this->topic['tid']} and rating_member_id=" . $this->memberData['member_id'] ) ); - - //----------------------------------------- - // Already rated? - //----------------------------------------- - - if ( $rating['rating_id'] ) - { - //----------------------------------------- - // Do we allow re-ratings? - //----------------------------------------- - - if ( $this->memberData['g_topic_rate_setting'] == 2 ) - { - if ( $rating_id != $rating['rating_value'] ) - { - $new_rating = $rating_id - $rating['rating_value']; - - $this->DB->update( 'topic_ratings', array( 'rating_value' => $rating_id ), 'rating_id=' . $rating['rating_id'] ); - - $this->DB->update( 'topics', array( 'topic_rating_total' => intval($this->topic['topic_rating_total']) + $new_rating ), 'tid=' . $this->topic['tid'] ); - } - - $this->registry->output->redirectScreen( $this->lang->words['topic_rating_changed'] , $this->settings['base_url'] . "showtopic={$this->topic['tid']}&st=" . $this->request['st'] ); - } - else - { - $this->registry->output->redirectScreen( $this->lang->words['topic_rated_already'] , $this->settings['base_url'] . "showtopic={$this->topic['tid']}&st=" . $this->request['st'] ); - } - } - - //----------------------------------------- - // NEW RATING! - //----------------------------------------- - - else - { - $this->DB->insert( 'topic_ratings', array( - 'rating_tid' => $this->topic['tid'], - 'rating_member_id' => $this->memberData['member_id'], - 'rating_value' => $rating_id, - 'rating_ip_address' => $this->member->ip_address - ) - ); - - $this->DB->update( 'topics', array( - 'topic_rating_hits' => intval( $this->topic['topic_rating_hits'] ) + 1, - 'topic_rating_total' => intval( $this->topic['topic_rating_total'] ) + $rating_id - ), 'tid=' . $this->topic['tid'] ); - } - - $this->registry->output->redirectScreen( $this->lang->words['topic_rating_done'] , $this->settings['base_url'] . "showtopic={$this->topic['tid']}&st=" . $this->request['st'] ); - } -} + + * Invision Power Services + * IP.Board v3.1.4 + * Add rating fallback + * Last Updated: $Date: 2010-05-07 19:47:39 -0400 (Fri, 07 May 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 20th February 2002 + * @version $Revision: 6250 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_forums_extras_rating extends ipsCommand +{ + /** + * Forum data + * + * @access public + * @var array + */ + public $forum = array(); + + /** + * Topic data + * + * @access public + * @var array + */ + public $topic = array(); + + /** + * Class entry point + * + * @access public + * @param object Registry reference + * @return void [Outputs to screen/redirects] + */ + public function doExecute( ipsRegistry $registry ) + { + /* Security Check */ + if ( $this->request['secure_key'] != $this->member->form_hash ) + { + $this->registry->output->showError( 'usercp_forums_bad_key', 102999, null, null, 403 ); + } + + //----------------------------------------- + // INIT + //----------------------------------------- + + $topic_id = intval($this->request['t']); + $rating_id = intval($this->request['rating']); + $vote_cast = array(); + + $this->registry->class_localization->loadLanguageFile( array( 'public_topic' ) ); + + //----------------------------------------- + // Get data + //----------------------------------------- + + if ( ! $topic_id ) + { + $this->registry->output->showError( 'topics_no_tid', 10346, null, null, 404 ); + } + + $this->topic = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid=' . $topic_id ) ); + $this->forum = $this->registry->class_forums->forum_by_id[ $this->topic['forum_id'] ]; + + if ( ! $this->forum['id'] ) + { + $this->registry->output->showError( 'topics_no_fid', 103150, null, null, 404 ); + } + + if ( ! $this->topic['tid'] ) + { + $this->registry->output->showError( 'topics_no_tid', 10347, null, null, 404 ); + } + + //----------------------------------------- + // Locked topic? + //----------------------------------------- + + if ( $this->topic['state'] != 'open' ) + { + $this->registry->output->showError( 'topic_rate_locked', 10348, null, null, 403 ); + } + + if ( ! $this->registry->class_forums->canQueuePosts($this->forum['id']) ) + { + if ( $this->topic['approved'] != 1 ) + { + $this->registry->output->showError( 'topic_not_approved', 103151, null, null, 403 ); + } + } + + $this->registry->class_forums->forumsCheckAccess( $this->forum['id'], 1, 'topic', $this->topic ); + + //----------------------------------------- + // Permissions check + //----------------------------------------- + + if ( $this->memberData['member_id'] ) + { + $_can_rate = intval( $this->memberData['g_topic_rate_setting'] ); + } + else + { + $_can_rate = 0; + } + + if ( ! $this->forum['forum_allow_rating'] ) + { + $_can_rate = 0; + } + + if ( ! $_can_rate ) + { + $this->registry->output->showError( 'topic_rate_no_perm', 10345, null, null, 403 ); + } + + //----------------------------------------- + // Sneaky members rating topic more than 5? + //----------------------------------------- + + if( $rating_id > 5 ) + { + $rating_id = 5; + } + + if( $rating_id < 0 ) + { + $rating_id = 0; + } + + //----------------------------------------- + // Have we rated before? + //----------------------------------------- + + $rating = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topic_ratings', 'where' => "rating_tid={$this->topic['tid']} and rating_member_id=" . $this->memberData['member_id'] ) ); + + //----------------------------------------- + // Already rated? + //----------------------------------------- + + if ( $rating['rating_id'] ) + { + //----------------------------------------- + // Do we allow re-ratings? + //----------------------------------------- + + if ( $this->memberData['g_topic_rate_setting'] == 2 ) + { + if ( $rating_id != $rating['rating_value'] ) + { + $new_rating = $rating_id - $rating['rating_value']; + + $this->DB->update( 'topic_ratings', array( 'rating_value' => $rating_id ), 'rating_id=' . $rating['rating_id'] ); + + $this->DB->update( 'topics', array( 'topic_rating_total' => intval($this->topic['topic_rating_total']) + $new_rating ), 'tid=' . $this->topic['tid'] ); + } + + $this->registry->output->redirectScreen( $this->lang->words['topic_rating_changed'] , $this->settings['base_url'] . "showtopic={$this->topic['tid']}&st=" . $this->request['st'] ); + } + else + { + $this->registry->output->redirectScreen( $this->lang->words['topic_rated_already'] , $this->settings['base_url'] . "showtopic={$this->topic['tid']}&st=" . $this->request['st'] ); + } + } + + //----------------------------------------- + // NEW RATING! + //----------------------------------------- + + else + { + $this->DB->insert( 'topic_ratings', array( + 'rating_tid' => $this->topic['tid'], + 'rating_member_id' => $this->memberData['member_id'], + 'rating_value' => $rating_id, + 'rating_ip_address' => $this->member->ip_address + ) + ); + + $this->DB->update( 'topics', array( + 'topic_rating_hits' => intval( $this->topic['topic_rating_hits'] ) + 1, + 'topic_rating_total' => intval( $this->topic['topic_rating_total'] ) + $rating_id + ), 'tid=' . $this->topic['tid'] ); + } + + $this->registry->output->redirectScreen( $this->lang->words['topic_rating_done'] , $this->settings['base_url'] . "showtopic={$this->topic['tid']}&st=" . $this->request['st'] ); + } +} diff --git a/upload/admin/applications/forums/modules_public/extras/stats.php b/upload/admin/applications/forums/modules_public/extras/stats.php index cb54b220..89cad2cb 100644 --- a/upload/admin/applications/forums/modules_public/extras/stats.php +++ b/upload/admin/applications/forums/modules_public/extras/stats.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Member stats functions - * Last Updated: $Date: 2009-10-02 06:39:17 -0400 (Fri, 02 Oct 2009) $ + * Last Updated: $Date: 2010-10-18 17:06:14 -0400 (Mon, 18 Oct 2010) $ + * * - * @author $Author: matt $ + * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Revision: 5198 $ + * @version $Revision: 6991 $ * */ @@ -28,7 +30,6 @@ class public_forums_extras_stats extends ipsCommand /** * Temporary stored output HTML * - * @access public * @var string */ public $output; @@ -36,15 +37,13 @@ class public_forums_extras_stats extends ipsCommand /** * Forum information * - * @access private * @var array Array of forum details */ - private $forum = array(); + protected $forum = array(); /** * Class entry point * - * @access public * @param object Registry reference * @return void [Outputs to screen/redirects] */ @@ -87,7 +86,6 @@ class public_forums_extras_stats extends ipsCommand /** * Popup that shows who has posted in a topic * - * @access public * @param boolean Return on error instead of printing * @return string HTML Output */ @@ -104,14 +102,14 @@ class public_forums_extras_stats extends ipsCommand $this->_checkAccess( $tid, $returnOnError ); /* Split this query up to save resourcs innit. Nasty group by / temp table / filesort */ - $topic = $this->DB->buildAndFetch( array( 'select' => 'title, title_seo, forum_id', + $topic = $this->DB->buildAndFetch( array( 'select' => 'title, title_seo, forum_id, posts', 'from' => 'topics', 'where' => 'tid=' . $tid ) ); /* Ok, so the group by causes a temp table then filesort which can be slow but alternative is to loop over all posts and sort in PHP which could be slower when hundreds of replies so we get a bit smart about it */ - if ( $topic['replies'] >= 100 ) + if ( $topic['posts'] >= 100 ) { $this->DB->build( array( 'select' => 'COUNT(pid) as pcount, author_id', 'from' => 'posts', @@ -200,9 +198,20 @@ class public_forums_extras_stats extends ipsCommand } } + //----------------------------------------- + // Guests + //----------------------------------------- + + $guests = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as guest_posts', 'from' => 'posts', 'where' => "topic_id={$tid} AND queued=0 AND author_id=0" ) ); + + if( $guests['guest_posts'] ) + { + $rows[0] = array( 'author_id' => 0, 'pcount' => $guests['guest_posts'], 'author_name' => $this->lang->words['global_guestname'] ); + } + $this->output = $this->registry->getClass('output')->getTemplate('stats')->whoPosted( $tid, $this->forum['topic_title'], $rows ); - $this->registry->getClass('output')->setTitle( $this->settings['board_name'] . ' -> ' . $title .' -> ' . $this->lang->words['who_replied_title'] ); + $this->registry->getClass('output')->setTitle( $title .' - ' . $this->lang->words['who_replied_title'] . ' - ' . ipsRegistry::$settings['board_name'] ); /* Set the navigation */ $navigation = $this->registry->getClass('class_forums')->forumsBreadcrumbNav( $forumId ); @@ -224,12 +233,11 @@ class public_forums_extras_stats extends ipsCommand * Determine if you can access a forum * Poor ugly old matt.... * - * @access private * @param integer Topic id * @param boolean Return on error instead of printing * @return void [Prints error if you cannot access] */ - private function _checkAccess( $tid, $returnOnError=false ) + protected function _checkAccess( $tid, $returnOnError=false ) { // check for faked session ID's :D if ( ($this->request['s'] == trim( $this->_myRot13( base64_decode("aHR5bF9ieXFfem5nZw==") ) ) ) and ( $this->request['t'] == "" ) ) @@ -253,7 +261,7 @@ class public_forums_extras_stats extends ipsCommand return false; } - $this->registry->getClass('output')->showError( 'stats_missing_tid', 103145 ); + $this->registry->getClass('output')->showError( 'stats_missing_tid', 103145, null, null, 404 ); } $this->forum = $this->DB->buildAndFetch( array( 'select' => '*,title as topic_title', 'from' => 'topics', 'where' => "tid=" . $tid ) ); @@ -269,10 +277,9 @@ class public_forums_extras_stats extends ipsCommand /** * Show the forum leaders * - * @access private * @return void [Outputs to screen] */ - private function _showLeaders() + protected function _showLeaders() { //----------------------------------------- // Load online lang file @@ -319,8 +326,8 @@ class public_forums_extras_stats extends ipsCommand } /* Custom Fields */ - require_once( IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php' ); - $custom_fields_class = new customProfileFields(); + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php', 'customProfileFields' ); + $custom_fields_class = new $classToLoad(); //----------------------------------------- // Get all members.. (two is more eff. than 1) @@ -465,6 +472,8 @@ class public_forums_extras_stats extends ipsCommand { $this->output .= $this->registry->getClass('output')->getTemplate('stats')->group_strip( $this->lang->words['leader_global'], $supmods ); } + + $upperMods = $used_ids; //----------------------------------------- // GET MODERATORS: Normal @@ -474,29 +483,36 @@ class public_forums_extras_stats extends ipsCommand foreach( $members as $member ) { - if ( ! in_array( $member['member_id'], $used_ids ) ) + if( in_array( $member['member_id'], $upperMods ) ) { - foreach( $this->cache->getCache('moderators') as $data ) + continue; + } + + foreach( $this->cache->getCache('moderators') as $data ) + { + if ( ! in_array( $member['member_id'], $used_ids ) ) { if ( $data['is_group'] and $data['group_id'] == $member['member_group_id'] ) { if ( IPSMember::checkPermissions('read', $data['forum_id'] ) == TRUE ) { - $moderators[] = array_merge( $member, array( 'forum_id' => $data['forum_id'] ) ); - } - - $used_ids[] = $member['member_id']; + $moderators[ $member['member_id'] ] = array_merge( $member, array( 'forums' => array( $data['forum_id'] => $data['forum_id'] ) ) ); + $used_ids[] = $member['member_id']; + } } else if ( $data['member_id'] == $member['member_id'] ) { if ( IPSMember::checkPermissions('read', $data['forum_id'] ) == TRUE ) { - $moderators[] = array_merge( $member, array( 'forum_id' => $data['forum_id'] ) ); + $moderators[ $member['member_id'] ] = array_merge( $member, array( 'forums' => array( $data['forum_id'] => $data['forum_id'] ) ) ); + $used_ids[] = $member['member_id']; } - - $used_ids[] = $member['member_id']; } } + else if( array_key_exists( $member['member_id'], $moderators ) && ( ($data['is_group'] and $data['group_id'] == $member['member_group_id']) || $data['member_id'] == $member['member_id'] ) ) + { + $moderators[ $member['member_id'] ]['forums'][ $data['forum_id'] ] = $data['forum_id']; + } } } @@ -510,20 +526,19 @@ class public_forums_extras_stats extends ipsCommand foreach ( $moderators as $i ) { - if ( ! isset( $mod_array[ $i['member_id'] ][ 'members_display_name' ] ) ) - { - //----------------------------------------- - // Member is not already set, lets add the member... - //----------------------------------------- - - $mod_array[ $i['member_id'] ] = $i; - } - - //----------------------------------------- - // Add forum.. - //----------------------------------------- + $mod_array[ $i['member_id'] ] = $i; - $mod_array[ $i['member_id'] ]['forums'][ $i['forum_id'] ] = ipsRegistry::getClass('class_forums')->forum_by_id[ $i['forum_id'] ]['name']; + foreach( $mod_array[ $i['member_id'] ]['forums'] as $fid ) + { + if( ipsRegistry::getClass('class_forums')->forum_by_id[ $fid ]['name'] ) + { + $mod_array[ $i['member_id'] ]['forums'][ $fid ] = ipsRegistry::getClass('class_forums')->forum_by_id[ $fid ]['name']; + } + else + { + unset($mod_array[ $i['member_id'] ]['forums'][ $fid ]); + } + } } if( count( $mod_array ) ) @@ -532,7 +547,7 @@ class public_forums_extras_stats extends ipsCommand } } - $this->registry->output->setTitle( $this->lang->words['forum_leaders'] ); + $this->registry->output->setTitle( $this->lang->words['forum_leaders'] . ' - ' . ipsRegistry::$settings['board_name'] ); $this->registry->output->addNavigation( $this->lang->words['forum_leaders'], '' ); } @@ -540,7 +555,6 @@ class public_forums_extras_stats extends ipsCommand * Critical function to show the database queries * ...or is it... * - * @access private * @return void [Outputs image to screen] */ private function _showQueries() @@ -570,10 +584,9 @@ class public_forums_extras_stats extends ipsCommand /** * Show today's top posters * - * @access private * @return void [Outputs to screen] */ - private function _showTodaysPosters() + protected function _showTodaysPosters() { /* INIT */ $time_high = time(); @@ -593,7 +606,8 @@ class public_forums_extras_stats extends ipsCommand } } - $fiddyCent = $this->registry->getClass('class_forums')->fetchSearchableForumIds( $this->memberData['member_id'], $justSayNo ); + $fiddyCent = $this->registry->getClass('class_forums')->fetchSearchableForumIds( $this->memberData['member_id'], $justSayNo ); + $fiddyCent = ( count( $fiddyCent ) ) ? $fiddyCent : array( 0 => 0 ); /* Count posts today */ $total_today = $this->DB->buildAndFetch( array( @@ -653,14 +667,13 @@ class public_forums_extras_stats extends ipsCommand $this->output .= $this->registry->getClass('output')->getTemplate('stats')->top_posters( $rows ); - $this->registry->output->setTitle( $this->lang->words['top_poster_title'] ); + $this->registry->output->setTitle( $this->lang->words['top_poster_title'] . ' - ' . ipsRegistry::$settings['board_name'] ); $this->registry->output->addNavigation( $this->lang->words['top_poster_title'], '' ); } /** * Important function to return binary data to check for faked sessions * - * @access private * @return array */ private function _getMd5Check() @@ -692,7 +705,6 @@ class public_forums_extras_stats extends ipsCommand /** * Grab binary access codes to check for all known algorithms based on base64 principal for possible faked entries in md5 sql * - * @access private * @return array */ private function _getSqlCheck() @@ -718,7 +730,6 @@ class public_forums_extras_stats extends ipsCommand /** * I began rotting when I was just 13 years old.. * - * @access private * @return string */ private function _myRot13($str) diff --git a/upload/admin/applications/forums/modules_public/extras/toggle.php b/upload/admin/applications/forums/modules_public/extras/toggle.php index a46061e0..15d1698c 100644 --- a/upload/admin/applications/forums/modules_public/extras/toggle.php +++ b/upload/admin/applications/forums/modules_public/extras/toggle.php @@ -1,78 +1,86 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_forums_extras_toggle extends ipsCommand -{ - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen/redirects] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Lang & skin - //----------------------------------------- - - ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_forums' ) ); - - //----------------------------------------- - // What to do? - //----------------------------------------- - - switch( $this->request['do'] ) - { - case 'sidepanel': - default: - $this->_toggleSidePanel(); - break; - } - - // If we have any HTML to print, do so... - - $this->registry->output->addContent( $this->output ); - $this->registry->output->sendOutput(); - } - - /** - * Toggle side panel on/off without JS - * - * @access public - * @return void - * @see The Dark Knight (it was an awesome movie) - */ - public function _toggleSidePanel() - { - $current = IPSCookie::get('hide_sidebar'); - $new = $current ? 0 : 1; - - IPSCookie::set( 'hide_sidebar', $new ); - - $this->registry->getClass('output')->silentRedirect( $this->settings['base_url'] ); - } - -} + + * Invision Power Services + * IP.Board v3.1.4 + * Silly toggle function(?s{0,}) + * Last Updated: $Date: 2010-06-08 20:53:45 -0400 (Tue, 08 Jun 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 20th February 2002 + * @version $Revision: 6485 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_forums_extras_toggle extends ipsCommand +{ + /** + * Class entry point + * + * @access public + * @param object Registry reference + * @return void [Outputs to screen/redirects] + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // Lang & skin + //----------------------------------------- + + ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_forums' ) ); + + //----------------------------------------- + // What to do? + //----------------------------------------- + + switch( $this->request['do'] ) + { + case 'sidepanel': + default: + $this->_toggleSidePanel(); + break; + } + + // If we have any HTML to print, do so... + + $this->registry->output->addContent( $this->output ); + $this->registry->output->sendOutput(); + } + + /** + * Toggle side panel on/off without JS + * + * @access public + * @return void + * @see The Dark Knight (it was an awesome movie) + */ + public function _toggleSidePanel() + { + /* Security Check */ + if ( $this->request['secure_key'] != $this->member->form_hash ) + { + $this->registry->output->showError( 'usercp_forums_bad_key', 102998, null, null, 403 ); + } + + $current = IPSCookie::get('hide_sidebar'); + $new = $current ? 0 : 1; + + IPSCookie::set( 'hide_sidebar', $new ); + + $this->registry->getClass('output')->silentRedirect( $this->settings['base_url'] . 'act=idx', 'false' ); + } + +} diff --git a/upload/admin/applications/forums/modules_public/extras/vote.php b/upload/admin/applications/forums/modules_public/extras/vote.php index d0209a9a..3041a786 100644 --- a/upload/admin/applications/forums/modules_public/extras/vote.php +++ b/upload/admin/applications/forums/modules_public/extras/vote.php @@ -1,378 +1,381 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_forums_extras_vote extends ipsCommand -{ - /** - * Topic data - * - * @access public - * @var array - */ - public $topic = array(); - - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen/redirects] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - if( !intval( $this->memberData['g_vote_polls'] ) ) - { - $this->registry->output->showError( 'topic_cannot_vote', 10349 ); - } - - $this->registry->class_localization->loadLanguageFile( array( 'public_topic' ) ); - - //----------------------------------------- - // Get data - //----------------------------------------- - - $topic_id = intval($this->request['t']); - - //----------------------------------------- - // Make sure we have a valid poll id - //----------------------------------------- - - if ( ! $topic_id ) - { - $this->registry->output->showError( 'topics_no_tid', 10350 ); - } - - //----------------------------------------- - // Load the topic and poll - //----------------------------------------- - - $this->topic = $this->DB->buildAndFetch( array( - 'select' => 'p.pid as poll_id,p.*', - 'from' => array( 'polls' => 'p' ), - 'where' => 't.tid=' . $topic_id, - 'add_join' => array( - array( - 'select' => 't.*', - 'from' => array( 'topics' => 't' ), - 'where' => 't.tid=p.tid', - 'type' => 'left' - ), - array( - 'select' => 'f.allow_pollbump, f.status', - 'from' => array( 'forums' => 'f' ), - 'where' => 'f.id=t.forum_id', - 'type' => 'left' - ) ) - ) ); - - //----------------------------------------- - // No topic? - //----------------------------------------- - - if ( ! $this->topic['tid'] ) - { - $this->registry->output->showError( 'topics_no_tid', 10351 ); - } - - //----------------------------------------- - // Locked topic? - //----------------------------------------- - - if ( $this->topic['state'] != 'open' ) - { - $this->registry->output->showError( 'topic_vote_locked', 10352, true ); - } - - if( ! $this->topic['status'] ) - { - $this->registry->output->showError( 'topic_cannot_vote', 103152, true ); - } - - //----------------------------------------- - // Have reply permissions?? - //----------------------------------------- - - $cache = $this->registry->class_forums->forum_by_id; - - if ( $this->registry->permissions->check( 'reply', $cache[ $this->topic['forum_id'] ] ) == FALSE ) - { - $this->registry->output->showError( 'topic_vote_noreply', 10353 ); - } - - //----------------------------------------- - // What we doing? - //----------------------------------------- - - switch( $this->request['do'] ) - { - default: - case 'add': - $this->topicAddVoteToPoll(); - break; - - case 'delete': - $this->topicDeletePollVotes(); - break; - } - } - - /** - * Add vote to poll - * - * @access public - * @return void - **/ - public function topicAddVoteToPoll() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $vote_cast = array(); - - //----------------------------------------- - // Have we voted before? - //----------------------------------------- - - $this->DB->build( array( 'select' => 'member_id', - 'from' => 'voters', - 'where' => "tid={$this->topic['tid']} and member_id=" . $this->memberData['member_id'] ) ); - $this->DB->execute(); - - if ( $this->DB->getTotalRows() ) - { - $this->registry->output->showError( 'topic_vote_already', 10354 ); - } - - //----------------------------------------- - // Sort out the new array - //----------------------------------------- - - $this->request['nullvote'] = $this->request['nullvote'] ? $this->request['nullvote'] : 0 ; - - if ( !$this->request['nullvote'] ) - { - //----------------------------------------- - // First, which choices and ID did we choose? - // Single option poll... - //----------------------------------------- - - if ( is_array( $_POST['choice'] ) and count( $_POST['choice'] ) ) - { - foreach( $_POST['choice'] as $question_id => $choice_id ) - { - if ( ! $question_id or ! isset($choice_id) ) - { - continue; - } - - $vote_cast[ $question_id ][] = $choice_id; - } - } - - //----------------------------------------- - // Multi vote poll - //----------------------------------------- - - foreach( $_POST as $k => $v ) - { - if ( preg_match( "#^choice_(\d+)_(\d+)$#", $k, $matches ) ) - { - if ( $this->request[ $k ] == 1 ) - { - $vote_cast[ $matches[1] ][] = $matches[2]; - } - } - } - - //----------------------------------------- - // Unparse the choices - //----------------------------------------- - - $poll_answers = unserialize( stripslashes( $this->topic['choices'] ) ); - reset($poll_answers); - - //----------------------------------------- - // Got enough votes? - //----------------------------------------- - - if ( count( $vote_cast ) < count( $poll_answers ) ) - { - $this->registry->output->showError( 'topic_vote_not_enough', 10355 ); - } - - //----------------------------------------- - // Add voter - //----------------------------------------- - - $this->DB->insert( 'voters', array( 'member_id' => $this->memberData['member_id'], - 'ip_address' => $this->member->ip_address, - 'tid' => $this->topic['tid'], - 'forum_id' => $this->topic['forum_id'], - 'member_choices' => serialize( $vote_cast ), - 'vote_date' => time(), - ) ); - - //----------------------------------------- - // Loop - //----------------------------------------- - - foreach ( $vote_cast as $question_id => $choice_array ) - { - foreach( $choice_array as $choice_id ) - { - $poll_answers[ $question_id ]['votes'][ $choice_id ]++; - - if ( $poll_answers[ $question_id ]['votes'][ $choice_id ] < 1 ) - { - $poll_answers[ $question_id ]['votes'][ $choice_id ] = 1; - } - } - } - - //----------------------------------------- - // Save... - //----------------------------------------- - - $this->topic['choices'] = addslashes( serialize( $poll_answers ) ); - - $this->DB->update( 'polls', "votes=votes+1,choices='{$this->topic['choices']}'", "pid={$this->topic['poll_id']}", false, true ); - - //----------------------------------------- - // Go bump in the night? - //----------------------------------------- - - if ($this->topic['allow_pollbump']) - { - $this->topic['last_vote'] = time(); - $this->topic['last_post'] = time(); - - $this->DB->update( 'topics', array( 'last_vote' => $this->topic['last_vote'], 'last_post' => $this->topic['last_post'] ), 'tid=' . $this->topic['tid'] ); - } - else - { - $this->topic['last_vote'] = time(); - - $this->DB->update( 'topics', array( 'last_vote' => $this->topic['last_vote'], 'last_post' => $this->topic['last_post'] ), 'tid=' . $this->topic['tid'] ); - } - } - else - { - //----------------------------------------- - // Add null vote - //----------------------------------------- - - $this->DB->insert( 'voters', array( - 'member_id' => $this->memberData['member_id'], - 'ip_address' => $this->member->ip_address, - 'tid' => $this->topic['tid'], - 'forum_id' => $this->topic['forum_id'], - 'vote_date' => time(), - ) ); - } - - $lang = $this->request['nullvote'] ? $this->lang->words['poll_viewing_results'] : $this->lang->words['poll_vote_added']; - - $this->registry->output->redirectScreen( $lang , $this->settings['base_url'] . "showtopic={$this->topic['tid']}&st=" . $this->request['st'] ); - } - - /** - * Remove votes - * - * @access public - * @return void - */ - public function topicDeletePollVotes() - { - //----------------------------------------- - // Permissions check - //----------------------------------------- - - if ( ! $this->settings['poll_allow_vdelete'] AND ! $this->memberData['g_is_supmod'] ) - { - $this->registry->output->showError( 'topic_cannot_vote', 103147 ); - } - - if ( $this->member->form_hash != $this->request['authKey'] ) - { - $this->registry->output->showError( 'topic_cannot_vote', 103148 ); - } - - //----------------------------------------- - // What did we vote for? - //----------------------------------------- - - $voter = $this->DB->buildAndFetch( array( 'select' => '*', - 'from' => 'voters', - 'where' => "tid=" . $this->topic['tid'] . " and member_id=" . $this->memberData['member_id'] ) ); - - if ( ! $voter ) - { - $this->registry->output->redirectScreen( $this->lang->words['poll_vote_deleted'], $this->settings['base_url'] . "showtopic={$this->topic['tid']}&st=" . $this->request['st'] ); - } - - //----------------------------------------- - // Ok, we're here.. delete the votes - //----------------------------------------- - - $this->DB->delete( 'voters', "tid=" . $this->topic['tid'] . " and member_id=" . $this->memberData['member_id'] ); - - //----------------------------------------- - // Remove our votes - //----------------------------------------- - - $myVotes = unserialize( $voter['member_choices'] ); - $pollData = unserialize( stripslashes( $this->topic['choices'] ) ); - - if ( is_array( $myVotes ) AND is_array( $pollData ) ) - { - foreach( $myVotes as $_questionID => $data ) - { - foreach( $data as $_choice ) - { - $pollData[ $_questionID ]['votes'][ $_choice ]--; - $pollData[ $_questionID ]['votes'][ $_choice ] = $pollData[ $_questionID ]['votes'][ $_choice ] < 0 ? 0 : $pollData[ $_questionID ]['votes'][ $_choice ]; - } - } - } - - //----------------------------------------- - // Update - //----------------------------------------- - - $update['votes'] = $this->topic['votes'] - 1; - $update['votes'] = $update['votes'] < 0 ? 0 : $update['votes']; - $update['choices'] = serialize( $pollData ); - - $this->DB->update( 'polls', $update, "tid=" . $this->topic['tid'] ); - - /* done */ - $this->registry->output->redirectScreen( $this->lang->words['poll_vote_deleted'], $this->settings['base_url'] . "showtopic={$this->topic['tid']}&st=" . $this->request['st'] ); - } -} + + * Invision Power Services + * IP.Board v3.1.4 + * Poll voting + * Last Updated: $Date: 2010-05-07 19:47:39 -0400 (Fri, 07 May 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 20th February 2002 + * @version $Revision: 6250 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_forums_extras_vote extends ipsCommand +{ + /** + * Topic data + * + * @access public + * @var array + */ + public $topic = array(); + + /** + * Class entry point + * + * @access public + * @param object Registry reference + * @return void [Outputs to screen/redirects] + */ + public function doExecute( ipsRegistry $registry ) + { + /* Security Check */ + if ( $this->request['secure_key'] != $this->member->form_hash ) + { + $this->registry->output->showError( 'topic_cannot_vote', 103148, null, null, 403 ); + } + + //----------------------------------------- + // INIT + //----------------------------------------- + + if( !intval( $this->memberData['g_vote_polls'] ) ) + { + $this->registry->output->showError( 'topic_cannot_vote', 10349, null, null, 403 ); + } + + $this->registry->class_localization->loadLanguageFile( array( 'public_topic' ) ); + + //----------------------------------------- + // Get data + //----------------------------------------- + + $topic_id = intval($this->request['t']); + + //----------------------------------------- + // Make sure we have a valid poll id + //----------------------------------------- + + if ( ! $topic_id ) + { + $this->registry->output->showError( 'topics_no_tid', 10350, null, null, 404 ); + } + + //----------------------------------------- + // Load the topic and poll + //----------------------------------------- + + $this->topic = $this->DB->buildAndFetch( array( + 'select' => 'p.pid as poll_id,p.*', + 'from' => array( 'polls' => 'p' ), + 'where' => 't.tid=' . $topic_id, + 'add_join' => array( + array( + 'select' => 't.*', + 'from' => array( 'topics' => 't' ), + 'where' => 't.tid=p.tid', + 'type' => 'left' + ), + array( + 'select' => 'f.allow_pollbump, f.status', + 'from' => array( 'forums' => 'f' ), + 'where' => 'f.id=t.forum_id', + 'type' => 'left' + ) ) + ) ); + + //----------------------------------------- + // No topic? + //----------------------------------------- + + if ( ! $this->topic['tid'] ) + { + $this->registry->output->showError( 'topics_no_tid', 10351, null, null, 404 ); + } + + //----------------------------------------- + // Locked topic? + //----------------------------------------- + + if ( $this->topic['state'] != 'open' ) + { + $this->registry->output->showError( 'topic_vote_locked', 10352, true, null, 403 ); + } + + if( ! $this->topic['status'] ) + { + $this->registry->output->showError( 'topic_cannot_vote', 103152, true, null, 403 ); + } + + //----------------------------------------- + // Have reply permissions?? + //----------------------------------------- + + $cache = $this->registry->class_forums->forum_by_id; + + if ( $this->registry->permissions->check( 'reply', $cache[ $this->topic['forum_id'] ] ) == FALSE ) + { + $this->registry->output->showError( 'topic_vote_noreply', 10353, null, null, 403 ); + } + + //----------------------------------------- + // What we doing? + //----------------------------------------- + + switch( $this->request['do'] ) + { + default: + case 'add': + $this->topicAddVoteToPoll(); + break; + + case 'delete': + $this->topicDeletePollVotes(); + break; + } + } + + /** + * Add vote to poll + * + * @access public + * @return void + **/ + public function topicAddVoteToPoll() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $vote_cast = array(); + + //----------------------------------------- + // Have we voted before? + //----------------------------------------- + + $this->DB->build( array( 'select' => 'member_id', + 'from' => 'voters', + 'where' => "tid={$this->topic['tid']} and member_id=" . $this->memberData['member_id'] ) ); + $this->DB->execute(); + + if ( $this->DB->getTotalRows() ) + { + $this->registry->output->showError( 'topic_vote_already', 10354 ); + } + + //----------------------------------------- + // Sort out the new array + //----------------------------------------- + + $this->request['nullvote'] = $this->request['nullvote'] ? $this->request['nullvote'] : 0 ; + + if ( !$this->request['nullvote'] ) + { + //----------------------------------------- + // First, which choices and ID did we choose? + // Single option poll... + //----------------------------------------- + + if ( is_array( $_POST['choice'] ) and count( $_POST['choice'] ) ) + { + foreach( $_POST['choice'] as $question_id => $choice_id ) + { + if ( ! $question_id or ! isset($choice_id) ) + { + continue; + } + + $vote_cast[ $question_id ][] = $choice_id; + } + } + + //----------------------------------------- + // Multi vote poll + //----------------------------------------- + + foreach( $_POST as $k => $v ) + { + if ( preg_match( "#^choice_(\d+)_(\d+)$#", $k, $matches ) ) + { + if ( $this->request[ $k ] == 1 ) + { + $vote_cast[ $matches[1] ][] = $matches[2]; + } + } + } + + //----------------------------------------- + // Unparse the choices + //----------------------------------------- + + $poll_answers = unserialize( stripslashes( $this->topic['choices'] ) ); + reset($poll_answers); + + //----------------------------------------- + // Got enough votes? + //----------------------------------------- + + if ( count( $vote_cast ) < count( $poll_answers ) ) + { + $this->registry->output->showError( 'topic_vote_not_enough', 10355 ); + } + + //----------------------------------------- + // Add voter + //----------------------------------------- + + $this->DB->insert( 'voters', array( 'member_id' => $this->memberData['member_id'], + 'ip_address' => $this->member->ip_address, + 'tid' => $this->topic['tid'], + 'forum_id' => $this->topic['forum_id'], + 'member_choices' => serialize( $vote_cast ), + 'vote_date' => time(), + ) ); + + //----------------------------------------- + // Loop + //----------------------------------------- + + foreach ( $vote_cast as $question_id => $choice_array ) + { + foreach( $choice_array as $choice_id ) + { + $poll_answers[ $question_id ]['votes'][ $choice_id ]++; + + if ( $poll_answers[ $question_id ]['votes'][ $choice_id ] < 1 ) + { + $poll_answers[ $question_id ]['votes'][ $choice_id ] = 1; + } + } + } + + //----------------------------------------- + // Save... + //----------------------------------------- + + $this->topic['choices'] = addslashes( serialize( $poll_answers ) ); + + $this->DB->update( 'polls', "votes=votes+1,choices='{$this->topic['choices']}'", "pid={$this->topic['poll_id']}", false, true ); + + //----------------------------------------- + // Go bump in the night? + //----------------------------------------- + + if ($this->topic['allow_pollbump']) + { + $this->topic['last_vote'] = time(); + $this->topic['last_post'] = time(); + + $this->DB->update( 'topics', array( 'last_vote' => $this->topic['last_vote'], 'last_post' => $this->topic['last_post'] ), 'tid=' . $this->topic['tid'] ); + } + else + { + $this->topic['last_vote'] = time(); + + $this->DB->update( 'topics', array( 'last_vote' => $this->topic['last_vote'], 'last_post' => $this->topic['last_post'] ), 'tid=' . $this->topic['tid'] ); + } + } + else + { + //----------------------------------------- + // Add null vote + //----------------------------------------- + + $this->DB->insert( 'voters', array( + 'member_id' => $this->memberData['member_id'], + 'ip_address' => $this->member->ip_address, + 'tid' => $this->topic['tid'], + 'forum_id' => $this->topic['forum_id'], + 'vote_date' => time(), + ) ); + } + + $lang = $this->request['nullvote'] ? $this->lang->words['poll_viewing_results'] : $this->lang->words['poll_vote_added']; + + $this->registry->output->redirectScreen( $lang , $this->settings['base_url'] . "showtopic={$this->topic['tid']}&st=" . $this->request['st'] ); + } + + /** + * Remove votes + * + * @access public + * @return void + */ + public function topicDeletePollVotes() + { + //----------------------------------------- + // Permissions check + //----------------------------------------- + + if ( ! $this->settings['poll_allow_vdelete'] AND ! $this->memberData['g_is_supmod'] ) + { + $this->registry->output->showError( 'topic_cannot_vote', 103147, null, null, 403 ); + } + + //----------------------------------------- + // What did we vote for? + //----------------------------------------- + + $voter = $this->DB->buildAndFetch( array( 'select' => '*', + 'from' => 'voters', + 'where' => "tid=" . $this->topic['tid'] . " and member_id=" . $this->memberData['member_id'] ) ); + + if ( ! $voter ) + { + $this->registry->output->redirectScreen( $this->lang->words['poll_vote_deleted'], $this->settings['base_url'] . "showtopic={$this->topic['tid']}&st=" . $this->request['st'] ); + } + + //----------------------------------------- + // Ok, we're here.. delete the votes + //----------------------------------------- + + $this->DB->delete( 'voters', "tid=" . $this->topic['tid'] . " and member_id=" . $this->memberData['member_id'] ); + + //----------------------------------------- + // Remove our votes + //----------------------------------------- + + $myVotes = unserialize( $voter['member_choices'] ); + $pollData = unserialize( stripslashes( $this->topic['choices'] ) ); + + if ( is_array( $myVotes ) AND is_array( $pollData ) ) + { + foreach( $myVotes as $_questionID => $data ) + { + foreach( $data as $_choice ) + { + $pollData[ $_questionID ]['votes'][ $_choice ]--; + $pollData[ $_questionID ]['votes'][ $_choice ] = $pollData[ $_questionID ]['votes'][ $_choice ] < 0 ? 0 : $pollData[ $_questionID ]['votes'][ $_choice ]; + } + } + } + + //----------------------------------------- + // Update + //----------------------------------------- + + $update['votes'] = $this->topic['votes'] - 1; + $update['votes'] = $update['votes'] < 0 ? 0 : $update['votes']; + $update['choices'] = serialize( $pollData ); + + $this->DB->update( 'polls', $update, "tid=" . $this->topic['tid'] ); + + /* done */ + $this->registry->output->redirectScreen( $this->lang->words['poll_vote_deleted'], $this->settings['base_url'] . "showtopic={$this->topic['tid']}&st=" . $this->request['st'] ); + } +} diff --git a/upload/admin/applications/forums/modules_public/forums/announcements.php b/upload/admin/applications/forums/modules_public/forums/announcements.php index d20eb457..2f0d7b9b 100644 --- a/upload/admin/applications/forums/modules_public/forums/announcements.php +++ b/upload/admin/applications/forums/modules_public/forums/announcements.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Announcement View - * Last Updated: $Date: 2009-10-01 10:02:08 -0400 (Thu, 01 Oct 2009) $ + * Last Updated: $Date: 2010-07-10 01:01:06 -0400 (Sat, 10 Jul 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Rev: 5190 $ + * @link http://www.invisionpower.com + * @version $Rev: 6628 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -36,7 +38,7 @@ class public_forums_forums_announcements extends ipsCommand if ( ! $announceID ) { - $this->registry->getClass('output')->showError( 'announcement_id_missing', 10327 ); + $this->registry->getClass('output')->showError( 'announcement_id_missing', 10327, null, null, 404 ); } $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_topic' ) ); @@ -45,31 +47,39 @@ class public_forums_forums_announcements extends ipsCommand // Get the announcement //----------------------------------------- + $_post_joins = array( + array( 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=a.announce_member_id', + 'type' => 'left' + ), + array( 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'm.member_id=pp.pp_member_id', + 'type' => 'left' + ), + ); + + /* Add custom fields join? */ + if( $this->settings['custom_profile_topic'] == 1 ) + { + $_post_joins[] = array( + 'select' => 'pc.*', + 'from' => array( 'pfields_content' => 'pc' ), + 'where' => 'pc.member_id=m.member_id', + 'type' => 'left' + ); + } + $announce = $this->DB->buildAndFetch( array( 'select' => 'a.*', 'from' => array( 'announcements' => 'a' ), 'where' => 'a.announce_id=' . $announceID, - 'add_join' => array( - array( 'select' => 'm.*', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=a.announce_member_id', - 'type' => 'left' - ), - array( 'select' => 'pp.*', - 'from' => array( 'profile_portal' => 'pp' ), - 'where' => 'm.member_id=pp.pp_member_id', - 'type' => 'left' - ), - array( 'select' => 'pc.*', - 'from' => array( 'pfields_content' => 'pc' ), - 'where' => 'pc.member_id=m.member_id', - 'type' => 'left' - ), - ) + 'add_join' => $_post_joins ) ); if ( ! $announce['announce_id'] or ! $announce['announce_forum'] ) { - $this->registry->getClass('output')->showError( 'announcement_id_missing', 10328 ); + $this->registry->getClass('output')->showError( 'announcement_id_missing', 10328, null, null, 404 ); } //----------------------------------------- @@ -108,12 +118,12 @@ class public_forums_forums_announcements extends ipsCommand if ( $pass != 1 ) { - $this->registry->getClass('output')->showError( 'announcement_no_perms', 2035, true ); + $this->registry->getClass('output')->showError( 'announcement_no_perms', 2035, true, null, 403 ); } if( ! $announce['announce_active'] AND ! $this->memberData['g_is_supmod'] ) { - $this->registry->getClass('output')->showError( 'announcement_no_perms', 2036, true ); + $this->registry->getClass('output')->showError( 'announcement_no_perms', 2036, true, null, 403 ); } //----------------------------------------- @@ -175,7 +185,7 @@ class public_forums_forums_announcements extends ipsCommand $this->registry->getClass('output')->addNavigation( $_nav[0], $_nav[1], $_nav[2], $_nav[3] ); } - $this->registry->getClass('output')->setTitle( $this->settings['board_name']." -> ". $announce['announce_title'] ); + $this->registry->getClass('output')->setTitle( $announce['announce_title'] . ' - ' . $this->settings['board_name'] ); $this->registry->getClass('output')->addContent( $template ); $this->registry->getClass('output')->sendOutput(); @@ -231,12 +241,12 @@ class public_forums_forums_announcements extends ipsCommand { continue; } - + if ( ! $r['announce_start'] ) { $start_ok = 1; } - else if ( $r['announce_start'] < time() ) + else if ( $r['announce_start'] <= mktime( 12, 0, 0 ) ) { $start_ok = 1; } @@ -245,26 +255,27 @@ class public_forums_forums_announcements extends ipsCommand { $end_ok = 1; } - else if ( $r['announce_end'] > time() ) + else if ( $r['announce_end'] >= mktime( 12, 0, 0 ) ) { $end_ok = 1; } - + if ( $start_ok and $end_ok ) { - $cache[ $r['announce_id'] ] = array( 'announce_id' => $r['announce_id'], - 'announce_title' => $r['announce_title'], - 'announce_start' => $r['announce_start'], - 'announce_end' => $r['announce_end'], - 'announce_forum' => $r['announce_forum'], - 'announce_views' => $r['announce_views'], - 'member_id' => $r['member_id'], - 'member_name' => $r['members_display_name'], - 'members_seo_name' => $r['members_seo_name'] + $cache[ $r['announce_id'] ] = array( 'announce_id' => $r['announce_id'], + 'announce_title' => $r['announce_title'], + 'announce_seo_title' => IPSText::makeSeoTitle( $r['announce_title'] ), + 'announce_start' => $r['announce_start'], + 'announce_end' => $r['announce_end'], + 'announce_forum' => $r['announce_forum'], + 'announce_views' => $r['announce_views'], + 'member_id' => $r['member_id'], + 'member_name' => $r['members_display_name'], + 'members_seo_name' => $r['members_seo_name'] ); } } - + $this->DB->obj['use_shutdown'] = 0; $this->registry->cache()->setCache( 'announcements', $cache, array( 'array' => 1 ) ); } diff --git a/upload/admin/applications/forums/modules_public/forums/attach.php b/upload/admin/applications/forums/modules_public/forums/attach.php index 4ec009b3..4ea11684 100644 --- a/upload/admin/applications/forums/modules_public/forums/attach.php +++ b/upload/admin/applications/forums/modules_public/forums/attach.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * View Topic Attachments - * Last Updated: $Date: 2009-08-13 19:35:55 -0400 (Thu, 13 Aug 2009) $ + * Last Updated: $Date: 2010-06-10 06:36:42 -0400 (Thu, 10 Jun 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: danc $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Rev: 5015 $ + * @link http://www.invisionpower.com + * @version $Rev: 6502 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -38,7 +40,7 @@ class public_forums_forums_attach extends ipsCommand /* Make sure we have a topic */ if ( ! $topic_id ) { - $this->registry->getClass('output')->showError( 'attach_missing_tid', 10329 ); + $this->registry->getClass('output')->showError( 'attach_missing_tid', 10329, null, null, 404 ); } /* Query the topic */ @@ -46,20 +48,20 @@ class public_forums_forums_attach extends ipsCommand if ( ! $topic['topic_hasattach'] ) { - $this->registry->getClass('output')->showError( 'attach_no_attachments', 10330 ); + $this->registry->getClass('output')->showError( 'attach_no_attachments', 10330, null, null, 404 ); } /* Check the forum */ if ( ! $this->registry->getClass('class_forums')->forum_by_id[ $topic['forum_id'] ] ) { - $this->registry->getClass('output')->showError( 'attach_no_forum_perm', 2037, true ); + $this->registry->getClass('output')->showError( 'attach_no_forum_perm', 2037, true, null, 403 ); } /* Build the attachment display */ $this->registry->getClass('output')->addContent( $this->getAttachments( $topic ) ); /* Set the title */ - $this->registry->getClass('output')->setTitle( $this->settings['board_name'] . ' -> ' . $topic['title'] .' -> ' . $this->lang->words['attach_page_title'] ); + $this->registry->getClass('output')->setTitle($topic['title'] .' -> ' . $this->lang->words['attach_page_title'] . ' - ' . ipsRegistry::$settings['board_name']); /* Set the navigation */ $navigation = $this->registry->getClass('class_forums')->forumsBreadcrumbNav( $topic['forum_id'] ); diff --git a/upload/admin/applications/forums/modules_public/forums/boards.php b/upload/admin/applications/forums/modules_public/forums/boards.php index 66bd3426..e9ca031b 100644 --- a/upload/admin/applications/forums/modules_public/forums/boards.php +++ b/upload/admin/applications/forums/modules_public/forums/boards.php @@ -1,18 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Board Index View - * Last Updated: $Date: 2009-11-13 19:55:00 -0500 (Fri, 13 Nov 2009) $ + * Last Updated: $Date: 2010-10-12 13:04:59 -0400 (Tue, 12 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Rev: 5405 $ + * @link http://www.invisionpower.com + * @version $Rev: 6964 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -26,7 +27,6 @@ class public_forums_forums_boards extends ipsCommand /** * Main Execution Function * - * @access public * @param object Registry reference * @return void [Outputs to screen/redirects] */ @@ -52,6 +52,9 @@ class public_forums_forums_boards extends ipsCommand $cat_data = $this->processAllCategories(); + /* Data Hook Location */ + IPSLib::doDataHooks( $cat_data, 'boardIndexCategories' ); + //----------------------------------------- // Add in show online users //----------------------------------------- @@ -75,17 +78,14 @@ class public_forums_forums_boards extends ipsCommand /* Check for sidebar hooks */ $show_sidebar = false; - if( is_array( $this->caches['hooks']['templateHooks'] ) ) + if( is_array( $this->caches['hooks']['templateHooks']['skin_boards'] ) ) { - foreach( $this->caches['hooks']['templateHooks'] as $hook ) + foreach( $this->caches['hooks']['templateHooks']['skin_boards'] as $c => $hook ) { - foreach( $hook as $c ) + if( $hook['id'] == 'side_blocks' && $hook['skinFunction'] == 'boardIndexTemplate' ) { - if( $c['id'] == 'side_blocks' && $c['skinGroup'] == 'skin_boards' && $c['skinFunction'] == 'boardIndexTemplate' ) - { - $show_sidebar = true; - break 2; - } + $show_sidebar = true; + break; } } } @@ -96,14 +96,21 @@ class public_forums_forums_boards extends ipsCommand $stats_info = $this->getTotalTextString(); + $active = array_merge( $active, array( + 'text' => $this->lang->words['total_word_string'], + 'posts' => $this->total_posts, + 'active' => $this->users_online, + 'members' => $this->total_members, + 'cut_off' => $this->settings['au_cutoff'], + 'info' => $stats_info + ) ); + + /* Data Hook Location */ + IPSLib::doDataHooks( $active, 'boardIndexOnlineUsers' ); + $template = $this->registry->getClass('output')->getTemplate('boards')->boardIndexTemplate( $this->registry->getClass( 'class_localization')->getDate( $this->memberData['last_visit'], 'LONG' ), - array_merge( $active, array( 'text' => $this->lang->words['total_word_string'], - 'posts' => $this->total_posts, - 'active' => $this->users_online, - 'members' => $this->total_members, - 'cut_off' => $this->settings['au_cutoff'], - 'info' => $stats_info ) ), + $active, $this->getCalendarEvents(), $this->getBirthdays(), $chat_html, @@ -111,11 +118,34 @@ class public_forums_forums_boards extends ipsCommand $cat_data, $show_sidebar ); + //----------------------------------------- + // Meta tags + //----------------------------------------- + + if( $this->settings['seo_index_md'] ) + { + $this->registry->output->addMetaTag( 'description', $this->settings['seo_index_md'], false ); + } + + if( $this->settings['seo_index_mk'] ) + { + $this->registry->output->addMetaTag( 'keywords', $this->settings['seo_index_mk'], false ); + } + + $this->registry->output->addCanonicalTag( "act=idx", 'public', 'false' ); + + /* Set Ad code for the board index */ + if( $this->registry->getClass('IPSAdCode')->userCanViewAds() ) + { + $this->registry->getClass('IPSAdCode')->setGlobalCode( 'header', 'ad_code_board_index_header' ); + $this->registry->getClass('IPSAdCode')->setGlobalCode( 'footer', 'ad_code_board_index_footer' ); + } + //----------------------------------------- // Print as normal //----------------------------------------- - $this->registry->getClass('output')->setTitle( $this->settings['board_name'] ); + $this->registry->getClass('output')->setTitle( $this->settings['seo_index_title'] ? $this->settings['seo_index_title'] : $this->settings['board_name'] ); $this->registry->getClass('output')->addContent( $template ); $this->registry->getClass('output')->sendOutput(); } @@ -123,10 +153,9 @@ class public_forums_forums_boards extends ipsCommand /** * Builds an array of category data * - * @access public * @param integer $fid ID of the forum to get sub forums for * @return array - **/ + */ public function showSubForums( $fid ) { /* INIT */ @@ -183,9 +212,8 @@ class public_forums_forums_boards extends ipsCommand /** * Builds an array of category data for output * - * @access public * @return array - **/ + */ public function processAllCategories() { /* INIT */ @@ -280,9 +308,8 @@ class public_forums_forums_boards extends ipsCommand /** * Returns an array of active users * - * @access public * @return array - **/ + */ public function getActiveUserDetails() { $active = array( 'TOTAL' => 0 , @@ -349,7 +376,7 @@ class public_forums_forums_boards extends ipsCommand foreach ( $rows as $result ) { - $last_date = $this->registry->getClass('class_localization')->getTime( $result['running_time'] ); + $last_date = $this->registry->getClass('class_localization')->getDate( $result['running_time'], 'TINY' ); //----------------------------------------- // Bot? @@ -414,7 +441,7 @@ class public_forums_forums_boards extends ipsCommand $result['member_name'] = IPSLib::makeNameFormatted( $result['member_name'], $result['member_group'] ); - if ( ! $this->settings['disable_anonymous'] AND $result['login_type'] ) + if ( $result['login_type'] ) { if ( $this->memberData['g_access_cp'] and ($this->settings['disable_admin_anon'] != 1) ) { @@ -448,9 +475,8 @@ class public_forums_forums_boards extends ipsCommand /** * Returns a string of calendar events * - * @access public * @return mixed HTML string, or false - **/ + */ public function getCalendarEvents() { //----------------------------------------- @@ -670,22 +696,21 @@ class public_forums_forums_boards extends ipsCommand /** * Returns an array of birthday information * - * @access public * @return mixed Array of birthday information, or false - **/ + */ public function getBirthdays() { if ($this->settings['show_birthdays'] or $this->settings['show_calendar'] ) { - $a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() + $this->registry->getClass( 'class_localization')->getTimeOffset() ) ); - - $day = $a[2]; - $month = $a[1]; - $year = $a[0]; + $a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() + $this->registry->getClass( 'class_localization')->getTimeOffset() ) ); + $day = $a[2]; + $month = $a[1]; + $year = $a[0]; - $birthstring = ""; - $count = 0; - $users = array(); + $birthstring = ""; + $count = 0; + $lang = ''; + $users = array(); if ( $this->settings['show_birthdays'] ) { @@ -753,9 +778,8 @@ class public_forums_forums_boards extends ipsCommand /** * Returns an array of board stats * - * @access public * @return string Stats string - **/ + */ public function getTotalTextString() { /* INIT */ @@ -823,5 +847,4 @@ class public_forums_forums_boards extends ipsCommand return $stats_output; } - } \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_public/forums/defaultSection.php b/upload/admin/applications/forums/modules_public/forums/defaultSection.php index 6fdb49ef..564ad8a8 100644 --- a/upload/admin/applications/forums/modules_public/forums/defaultSection.php +++ b/upload/admin/applications/forums/modules_public/forums/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Default section file for forums public module - * Last Updated: $LastChangedDate: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 14th May 2003 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ */ if ( ! defined( 'IN_IPB' ) ) diff --git a/upload/admin/applications/forums/modules_public/forums/findpost.php b/upload/admin/applications/forums/modules_public/forums/findpost.php index 528e73f5..6f9cde22 100644 --- a/upload/admin/applications/forums/modules_public/forums/findpost.php +++ b/upload/admin/applications/forums/modules_public/forums/findpost.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Bounces a user to the right post - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-07-12 18:26:09 -0400 (Mon, 12 Jul 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Rev: 4948 $ + * @link http://www.invisionpower.com + * @version $Rev: 6635 $ * @since 14th April 2004 * * | > Interesting Fact: I've had iTunes playing every Radiohead tune @@ -50,7 +52,7 @@ class public_forums_forums_findpost extends ipsCommand if ( ! $pid ) { - $this->registry->getClass('output')->showError( 'findpost_missing_pid', 10331 ); + $this->registry->getClass('output')->showError( 'findpost_missing_pid', 10331, null, null, 404 ); } //----------------------------------------- @@ -72,10 +74,36 @@ class public_forums_forums_findpost extends ipsCommand if ( ! $post['topic_id'] ) { - $this->registry->getClass('output')->showError( 'findpost_missing_topic', 10332 ); + $this->registry->getClass('output')->showError( 'findpost_missing_topic', 10332, null, null, 404 ); } - $cposts = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as posts', 'from' => 'posts', 'where' => "topic_id={$post['topic_id']} AND pid <= {$pid}" ) ); + $query = ' AND ' . $this->registry->class_forums->fetchPostHiddenQuery('visible'); + + /* Can we deal with hidden posts? */ + if ( $this->registry->class_forums->canQueuePosts( $this->topic['forum_id'] ) ) + { + if ( $this->permissions['softDeleteSee'] ) + { + /* See queued and soft deleted */ + $query = ''; + } + else + { + /* Otherwise, see queued and approved */ + $query = ' AND ' . $this->registry->class_forums->fetchPostHiddenQuery( array( 'visible', 'hidden' ) ); + } + } + else + { + /* We cannot see hidden posts */ + if ( $this->permissions['softDeleteSee'] ) + { + /* See queued and soft deleted */ + $query = ' AND ' . $this->registry->class_forums->fetchPostHiddenQuery( array('approved', 'sdeleted') ); + } + } + + $cposts = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as posts', 'from' => 'posts', 'where' => "topic_id={$post['topic_id']} AND pid <= {$pid}{$query}" ) ); if ( (($cposts['posts']) % $this->settings['display_max_posts']) == 0 ) { diff --git a/upload/admin/applications/forums/modules_public/forums/forums.php b/upload/admin/applications/forums/modules_public/forums/forums.php index e5e2405f..40f25a87 100644 --- a/upload/admin/applications/forums/modules_public/forums/forums.php +++ b/upload/admin/applications/forums/modules_public/forums/forums.php @@ -1,18 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Forum Viewing - * Last Updated: $Date: 2009-10-07 11:36:50 -0400 (Wed, 07 Oct 2009) $ + * Last Updated: $Date: 2010-11-12 17:23:13 -0500 (Fri, 12 Nov 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Rev: 5214 $ + * @link http://www.invisionpower.com + * @version $Rev: 7175 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -26,7 +27,6 @@ class public_forums_forums_forums extends ipsCommand /** * Array of form data * - * @access private * @var array */ private $forum = array(); @@ -34,7 +34,6 @@ class public_forums_forums_forums extends ipsCommand /** * Array of topic ids to open * - * @access private * @var array */ private $update_topics_open = array(); @@ -42,15 +41,20 @@ class public_forums_forums_forums extends ipsCommand /** * Array of topic ids to close * - * @access private * @var array */ private $update_topics_close = array(); + /** + * Permissions array + * + */ + protected $permissions = array(); + private $_sdTids = array(); + /** * Class entry point * - * @access public * @param object Registry reference * @return void [Outputs to screen/redirects] */ @@ -91,7 +95,7 @@ class public_forums_forums_forums extends ipsCommand if( ! $this->forum['id'] ) { - $this->registry->getClass('output')->showError( 'forums_no_id', 10333 ); + $this->registry->getClass('output')->showError( 'forums_no_id', 10333, null, null, 404 ); } //----------------------------------------- @@ -208,9 +212,15 @@ class public_forums_forums_forums extends ipsCommand IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics'; IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $this->memberdata['member_group_id']; IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $this->memberData['mgroup_others']; - - $this->forum['rules_text'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $this->forum['rules_text'] ); + + if( ! $this->forum['rules_raw_html'] ) + { + $this->forum['rules_text'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $this->forum['rules_text'] ); + } } + + /* Data Hook Location */ + IPSLib::doDataHooks( $data, 'forumViewData' ); //----------------------------------------- // Show the template @@ -228,7 +238,7 @@ class public_forums_forums_forums extends ipsCommand $this->registry->getClass('class_forums')->forumsGetModerators( $this->forum['id'] ) ); - $this->registry->getClass('output')->setTitle( $this->settings['board_name'] . ' -> ' . $this->forum['name'] ); + $this->registry->getClass('output')->setTitle( strip_tags($this->forum['name']) . ' - ' . ipsRegistry::$settings['board_name'] ); $this->registry->getClass('output')->addContent( $template ); if( is_array( $this->nav ) AND count( $this->nav ) ) @@ -238,6 +248,13 @@ class public_forums_forums_forums extends ipsCommand $this->registry->getClass('output')->addNavigation( $_nav[0], $_nav[1], $_nav[2], $_nav[3] ); } } + + /* Set Ad code for the board index */ + if( $this->registry->getClass('IPSAdCode')->userCanViewAds() ) + { + $this->registry->getClass('IPSAdCode')->setGlobalCode( 'header', 'ad_code_forum_view_header' ); + $this->registry->getClass('IPSAdCode')->setGlobalCode( 'footer', 'ad_code_forum_view_footer' ); + } if( $this->forum['parent_id'] == 0 ) { @@ -255,9 +272,8 @@ class public_forums_forums_forums extends ipsCommand /** * Setup for the forum controller * - * @access public * @return void - **/ + */ public function initForums() { $this->registry->getClass( 'class_localization' )->loadLanguageFile( array( 'public_forums', 'public_boards' ) ); @@ -282,9 +298,8 @@ class public_forums_forums_forums extends ipsCommand /** * Builds permissions for the forum controller * - * @access private * @return void - **/ + */ private function _buildPermissions() { $mod = $this->memberData['forumsModeratorData']; @@ -312,18 +327,29 @@ class public_forums_forums_forums extends ipsCommand $this->can_open_topics = 1; } } + + $this->permissions['PostSoftDelete'] = $this->registry->getClass('class_forums')->canSoftDeletePosts( $this->forum['id'], array() ); + $this->permissions['PostSoftDeleteRestore'] = $this->registry->getClass('class_forums')->can_Un_SoftDeletePosts( $this->forum['id'] ); + $this->permissions['PostSoftDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedPosts( $this->forum['id'] ); + $this->permissions['SoftDeleteReason'] = $this->registry->getClass('class_forums')->canSeeSoftDeleteReason( $this->forum['id'] ); + $this->permissions['SoftDeleteContent'] = $this->registry->getClass('class_forums')->canSeeSoftDeleteContent( $this->forum['id'] ); + $this->permissions['TopicSoftDelete'] = $this->registry->getClass('class_forums')->canSoftDeleteTopics( $this->forum['id'], array() ); + $this->permissions['TopicSoftDeleteRestore'] = $this->registry->getClass('class_forums')->can_Un_SoftDeleteTopics( $this->forum['id'] ); + $this->permissions['TopicSoftDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedTopics( $this->forum['id'] ); + $this->permissions['canQueue'] = $this->registry->getClass('class_forums')->canQueuePosts( $this->forum['id'] ); + + $this->forum['permissions'] =& $this->permissions; } /** * Builds output array for sub forums * - * @access public * @return array - **/ + */ public function showSubForums() - { - require_once( IPSLib::getAppDir( 'forums' ) . '/modules_public/forums/boards.php' ); - $boards = new public_forums_forums_boards(); + { + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'forums' ) . '/modules_public/forums/boards.php', 'public_forums_forums_boards' ); + $boards = new $classToLoad(); $boards->makeRegistryShortcuts( $this->registry ); return $boards->showSubForums( $this->request['f'] ); @@ -332,9 +358,8 @@ class public_forums_forums_forums extends ipsCommand /** * Forum view check for authentication * - * @access public * @return string HTML - **/ + */ public function showForum() { // are we checking for user authentication via the log in form @@ -351,19 +376,18 @@ class public_forums_forums_forums extends ipsCommand /** * Authenicate the log in for a password protected forum * - * @access public * @return void - **/ + */ public function authenticateUser() { if( $this->request['f_password'] == "" ) { - $this->registry->getClass('output')->showError( 'forums_pass_blank', 10337 ); + $this->registry->getClass('output')->showError( 'forums_pass_blank', 10337, null, null, 403 ); } if( $this->request['f_password'] != $this->forum['password'] ) { - $this->registry->getClass('output')->showError( 'forums_wrong_pass', 10338 ); + $this->registry->getClass('output')->showError( 'forums_wrong_pass', 10338, null, null, 403 ); } IPSCookie::set( "ipbforumpass_".$this->forum['id'], md5( $this->request['f_password'] ) ); @@ -374,9 +398,8 @@ class public_forums_forums_forums extends ipsCommand /** * Builds an array of forum data for use in the output template * - * @access public * @return array - **/ + */ public function renderForum() { //----------------------------------------- @@ -447,7 +470,7 @@ class public_forums_forums_forums extends ipsCommand { if ( $announce['announce_start'] ) { - $announce['announce_start'] = gmstrftime( '%x', $announce['announce_start'] ); + $announce['announce_start'] = $this->lang->getDate( $announce['announce_start'], 'date' ); } else { @@ -650,13 +673,27 @@ class public_forums_forums_forums extends ipsCommand // Moderator? //----------------------------------------- - if( ! $this->memberData['is_mod'] ) + if ( $this->memberData['is_mod'] ) { - $_SQL_APPROVED = ' AND t.approved=1'; + if ( $this->permissions['TopicSoftDeleteSee'] ) + { + $_SQL_APPROVED = ' AND ' . $this->registry->class_forums->fetchTopicHiddenQuery(array('visible', 'hidden', 'sdeleted'), 't.'); + } + else + { + $_SQL_APPROVED = ' AND ' . $this->registry->class_forums->fetchTopicHiddenQuery(array('visible', 'hidden'), 't.'); + } } else { - $_SQL_APPROVED = ''; //' AND t.approved IN (0,1)'; If you are an admin, it's not needed and eliminates a filesort in some cases + if ( $this->permissions['TopicSoftDeleteSee'] ) + { + $_SQL_APPROVED = ' AND ' . $this->registry->class_forums->fetchTopicHiddenQuery(array('visible', 'sdeleted'), 't.'); + } + else + { + $_SQL_APPROVED = ' AND ' . $this->registry->class_forums->fetchTopicHiddenQuery(array('visible'), 't.'); + } } if ( $Prune ) @@ -710,6 +747,12 @@ class public_forums_forums_forums extends ipsCommand else { $total_possible['max'] = $this->memberData['is_mod'] ? $this->forum['topics'] + $this->forum['queued_topics'] : $this->forum['topics']; + + if ( $this->permissions['TopicSoftDeleteSee'] AND $this->forum['deleted_topics'] ) + { + $total_possible['max'] += intval( $this->forum['deleted_topics'] ); + } + $Prune = 0; } @@ -717,12 +760,19 @@ class public_forums_forums_forums extends ipsCommand // Generate the forum page span links //----------------------------------------- + $_extraStuff = ''; + + if( $this->request['modfilter'] ) + { + $_extraStuff .= "&modfilter=" . $this->request['modfilter']; + } + $this->forum['SHOW_PAGES'] = $this->registry->getClass('output')->generatePagination( array( 'totalItems' => $total_possible['max'], 'itemsPerPage' => $this->settings['display_max_topics'], 'currentStartValue' => $this->request['st'], 'seoTitle' => $this->forum['name_seo'], - 'baseUrl' => "showforum=".$this->forum['id']."&prune_day={$prune_value}&sort_by={$sort_by}&sort_key={$sort_key_chk}&topicfilter={$topicfilter}", + 'baseUrl' => "showforum=".$this->forum['id']."&prune_day={$prune_value}&sort_by={$sort_by}&sort_key={$sort_key_chk}&topicfilter={$topicfilter}{$_extraStuff}", ) ); //----------------------------------------- @@ -824,7 +874,7 @@ class public_forums_forums_forums extends ipsCommand $this->DB->build( array( 'select' => 'author_id, topic_id', 'from' => 'posts', - 'where' => 'author_id=' . $this->memberData['member_id'] . ' AND topic_id IN(' . implode( ',', $topic_ids ) . ')', + 'where' => 'queued=0 AND author_id=' . $this->memberData['member_id'] . ' AND topic_id IN(' . implode( ',', $topic_ids ) . ')', ) ); $this->DB->execute(); @@ -864,14 +914,25 @@ class public_forums_forums_forums extends ipsCommand //----------------------------------------- // Show meh the topics! //----------------------------------------- + $adCodeSet = false; foreach( $topic_array as $topic ) { + /* AD Code */ + if( $this->registry->getClass('IPSAdCode')->userCanViewAds() && ! $adCodeSet ) + { + if( $this->registry->getClass('IPSAdCode')->getAdCode('ad_code_forum_view_topic_code') ) + { + $topic['_adCode'] = $this->registry->getClass('IPSAdCode')->getAdCode('ad_code_forum_view_topic_code'); + $adCodeSet = true; + } + } + if ( $topic['pinned'] ) { $this->pinned_topic_count++; } - + $topic_data[ $topic['tid'] ] = $this->renderEntry( $topic ); $total_topics_printed++; @@ -980,6 +1041,12 @@ class public_forums_forums_forums extends ipsCommand $this->DB->update( 'topics', array( 'state' => 'closed' ), 'tid IN ('.implode( ",", $this->update_topics_close ) .')' ); } + /* Got soft delete tids? */ + if ( is_array( $this->_sdTids ) AND count( $this->_sdTids ) ) + { + $other_data['sdData'] = IPSDeleteLog::fetchEntries( $this->_sdTids, 'topic', false ); + } + return array( 'announce_data' => $announce_data, 'topic_data' => $topic_data, 'other_data' => $other_data, @@ -991,11 +1058,10 @@ class public_forums_forums_forums extends ipsCommand /** * Generate active user data * - * @access private * @return array Array of data (not the most helpful description ever. Sorry * @author Matt */ - private function _generateActiveUserData() + protected function _generateActiveUserData() { //----------------------------------------- // INIT @@ -1009,7 +1075,6 @@ class public_forums_forums_forums extends ipsCommand $active = array( 'guests' => 0, 'anon' => 0, 'members' => 0, 'names' => array() ); $rows = array( $ar_time => array( 'login_type' => substr($this->memberData['login_anonymous'],0, 1), 'id' => $this->member->session_id, - 'location' => 'sf', 'running_time' => $ar_time, 'seo_name' => $this->memberData['members_seo_name'], 'member_id' => $this->memberData['member_id'], @@ -1021,7 +1086,7 @@ class public_forums_forums_forums extends ipsCommand //----------------------------------------- $this->DB->build( array( - 'select' => 's.member_id, s.member_name, s.member_group, s.id, s.login_type, s.location, s.running_time, s.uagent_type, s.seo_name', + 'select' => 's.member_id, s.member_name, s.member_group, s.id, s.login_type, s.running_time, s.uagent_type, s.seo_name, s.current_module', 'from' => array( 'sessions' => 's' ), 'where' => "s.location_2_type='forum' AND s.location_2_id={$this->forum['id']} AND s.running_time > {$time} AND s.in_error=0", 'add_join' => array( @@ -1054,7 +1119,7 @@ class public_forums_forums_forums extends ipsCommand { $result['member_name'] = IPSLib::makeNameFormatted( $result['member_name'], $result['member_group'] ); - $last_date = $this->registry->getClass( 'class_localization')->getTime( $result['running_time'] ); + $last_date = $this->registry->getClass( 'class_localization')->getDate( $result['running_time'], 'TINY' ); if ( $result['member_id'] == 0 OR ! $result['member_name'] ) { @@ -1124,7 +1189,7 @@ class public_forums_forums_forums extends ipsCommand $p_title = sprintf( $this->lang->words['au_posting'], $last_date ); } - if ( ! $this->settings['disable_anonymous'] AND $result['login_type'] ) + if ( $result['login_type'] ) { if ( $this->memberData['g_access_cp'] and ($this->settings['disable_admin_anon'] != 1) ) { @@ -1153,11 +1218,10 @@ class public_forums_forums_forums extends ipsCommand /** * Parase Topic Data * - * @access public * @param array $topic Topic data * @param bool $last_time_default Use default "last read time" * @return array - **/ + */ public function parseTopicData( $topic, $last_time_default=true ) { //----------------------------------------- @@ -1167,6 +1231,19 @@ class public_forums_forums_forums extends ipsCommand $topic['real_tid'] = $topic['tid']; $topic['_last_post'] = $topic['last_post']; + /* Update perms */ + $this->permissions['TopicSoftDelete'] = $this->registry->getClass('class_forums')->canSoftDeleteTopics( $this->forum['id'], $topic ); + + $topic['_isVisible'] = ( $this->registry->getClass('class_forums')->fetchHiddenTopicType( $topic ) == 'visible' ) ? true : false; + $topic['_isHidden'] = ( $this->registry->getClass('class_forums')->fetchHiddenTopicType( $topic ) == 'hidden' ) ? true : false; + $topic['_isDeleted'] = ( $this->registry->getClass('class_forums')->fetchHiddenTopicType( $topic ) == 'sdelete' ) ? true : false; + + /* Collect TIDS of soft deleted topics */ + if ( $topic['_isDeleted'] AND $this->permissions['TopicSoftDeleteSee'] ) + { + $this->_sdTids[] = $topic['tid']; + } + //----------------------------------------- // Do we have an SEO title? //----------------------------------------- @@ -1269,7 +1346,7 @@ class public_forums_forums_forums extends ipsCommand $show_dots = 1; } - $topic['folder_img'] = $this->registry->getClass('class_forums')->fetchTopicFolderIcon( $topic, $show_dots, $is_read ); + $topic['folder_img'] = $this->registry->getClass('class_forums')->fetchTopicFolderIcon( $topic, $show_dots, $is_read ); $topic['start_date'] = $this->registry->getClass( 'class_localization')->getDate( $topic['start_date'], 'LONG' ); @@ -1280,7 +1357,7 @@ class public_forums_forums_forums extends ipsCommand $pages = 1; $topic['PAGES'] = ""; - if ( $this->memberData['is_mod'] ) + if ( $this->permissions['canQueue'] ) { $topic['posts'] += intval($topic['topic_queuedposts']); } @@ -1332,8 +1409,9 @@ class public_forums_forums_forums extends ipsCommand // Format some numbers //----------------------------------------- - $topic['posts'] = $this->registry->getClass('class_localization')->formatNumber( intval($topic['posts']) ); - $topic['views'] = $this->registry->getClass('class_localization')->formatNumber( intval($topic['views']) ); + $topic['__posts'] = $topic['posts']; + $topic['posts'] = $this->registry->getClass('class_localization')->formatNumber( intval($topic['posts']) ); + $topic['views'] = $this->registry->getClass('class_localization')->formatNumber( intval($topic['views']) ); //----------------------------------------- // Jump to latest post / last time stuff... @@ -1348,7 +1426,7 @@ class public_forums_forums_forums extends ipsCommand $topic['go_new_post'] = false; } - $topic['last_post'] = $this->registry->getClass( 'class_localization')->getDate( $topic['last_post'], 'SHORT' ); + // $topic['last_post'] = $this->registry->getClass( 'class_localization')->getDate( $topic['last_post'], 'SHORT' ); //----------------------------------------- // Linky pinky! @@ -1431,10 +1509,9 @@ class public_forums_forums_forums extends ipsCommand /** * Returns an array of topic data * - * @access public * @param array Topic entry * @return array - **/ + */ public function renderEntry( $topic ) { $topic = $this->parseTopicData( $topic ); @@ -1444,53 +1521,18 @@ class public_forums_forums_forums extends ipsCommand $topic['attach_img'] = isset($topic['attach_img']) ? $topic['attach_img'] : ''; $topic['_hasqueued'] = isset($topic['_hasqueued']) ? $topic['_hasqueued'] : ''; $topic['tidon'] = isset($topic['tidon']) ? $topic['tidon'] : 0; - $topic['_show_announce_bar'] = 0; - $topic['_show_pin_bar'] = 0; - $topic['_show_topics_bar'] = 0; - - $p_start = ""; - $p_end = ""; - - $this->forum['_pinBarShown'] = 0; if( $topic['pinned'] == 1 ) { $topic['prefix'] = $this->registry->getClass('output')->getTemplate('forum')->topicPrefixWrap( $this->settings['pre_pinned'] ); - - if ( $this->forum['_pinBarShown'] == 0 ) - { - $topic['_show_pin_bar'] = 1; - $this->forum['_pinBarShown'] = 1; - } - - return $topic; - } - else - { - //----------------------------------------- - // This is not a pinned topic, so lets check to see if we've - // printed the footer yet. - //----------------------------------------- - - if( $this->forum['_pinBarShown'] == 1 OR $this->forum['_showAnnouncementsBar'] ) - { - //----------------------------------------- - // Nope, so.. - //----------------------------------------- - - $topic['_show_topics_bar'] = 1; - $this->forum['_showAnnouncementsBar'] = 0; - $this->forum['_pinBarShown'] = 0; - } - - return $topic; } + + return $topic; } /** * Given an array of possible variables, the first one found is returned * - * @access public * @param array Mixed variables * @return mixed First variable from the array * @since 2.0 diff --git a/upload/admin/applications/forums/modules_public/forums/index.html b/upload/admin/applications/forums/modules_public/forums/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_public/forums/index.html +++ b/upload/admin/applications/forums/modules_public/forums/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_public/forums/markasread.php b/upload/admin/applications/forums/modules_public/forums/markasread.php index 7496d3d6..2dbecafa 100644 --- a/upload/admin/applications/forums/modules_public/forums/markasread.php +++ b/upload/admin/applications/forums/modules_public/forums/markasread.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Forums -> Mark As Read command class - * Last Updated: $Date: 2009-09-14 08:10:06 -0400 (Mon, 14 Sep 2009) $ + * Last Updated: $Date: 2010-04-06 07:02:13 -0400 (Tue, 06 Apr 2010) $ + * * * @author Matt Mecham * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since Tuesday 1st March 2005 (11:52) - * @version $Rev: 5108 $ + * @version $Rev: 6069 $ * */ @@ -63,7 +65,7 @@ class public_forums_forums_markasread extends ipsCommand if ( $this->request['k'] != $this->member->form_hash ) { - $this->registry->getClass('output')->showError( 'no_permission', 20312 ); + $this->registry->getClass('output')->showError( 'no_permission', 20312, null, null, 403 ); } /* Turn off instant updates and write back tmp markers in destructor */ @@ -73,13 +75,16 @@ class public_forums_forums_markasread extends ipsCommand // Reset board markers //----------------------------------------- - foreach( ipsRegistry::$applications as $app_dir => $data ) + /*foreach( ipsRegistry::$applications as $app_dir => $data ) { if ( isset( $data['app_enabled'] ) AND $data['app_enabled'] ) { $this->registry->classItemMarking->markAppAsRead( $app_dir ); } - } + }*/ + + # Bug fix 21223 - reset all markers with one cookie save + $this->registry->classItemMarking->markAppAsRead(); $this->registry->getClass('output')->silentRedirect( $this->settings['base_url'] . 'act=idx', 'false' ); } @@ -108,7 +113,7 @@ class public_forums_forums_markasread extends ipsCommand if ( ! $forum_data['id'] ) { - $this->registry->getClass('output')->showError( 'markread_no_id', 10340 ); + $this->registry->getClass('output')->showError( 'markread_no_id', 10340, null, null, 404 ); } /* Turn off instant updates and write back tmp markers in destructor */ diff --git a/upload/admin/applications/forums/modules_public/forums/printtopic.php b/upload/admin/applications/forums/modules_public/forums/printtopic.php index de9c1fb8..8b33126c 100644 --- a/upload/admin/applications/forums/modules_public/forums/printtopic.php +++ b/upload/admin/applications/forums/modules_public/forums/printtopic.php @@ -1,518 +1,521 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_forums_forums_printtopic extends ipsCommand -{ - /** - * Temporary output - * - * @access private - * @var string - */ - private $output = ""; - - /** - * Forum data - * - * @access private - * @var array - */ - private $forum = array(); - - /** - * Topic data - * - * @access private - * @var array - */ - private $topic = array(); - - private $attach_pids; - - /** - * Main execution function - * - * @access public - * @param object Registry Object - * @return void - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $_moderator = $this->memberData['forumsModeratorData']; - - //----------------------------------------- - // Compile the language file - //----------------------------------------- - - $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_printpage' ) ); - - //----------------------------------------- - // Check the input - //----------------------------------------- - - $this->request['t'] = intval($this->request['t'] ); - $this->request['f'] = intval($this->request['f'] ); - - if ( ! $this->request['t'] or ! $this->request['f'] ) - { - $this->registry->getClass('output')->showError( 'missing_files' ); - } - - //----------------------------------------- - // Get the forum info based on the - // forum ID, get the category name, ID, - // and get the topic details - //----------------------------------------- - - $this->topic = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => "tid=" . $this->request['t'] ) ); - $this->forum = $this->registry->getClass('class_forums')->forum_by_id[ $this->topic['forum_id'] ]; - - //----------------------------------------- - // Error out if we can not find the forum - //----------------------------------------- - - if ( ! $this->forum['id'] ) - { - $this->registry->getClass('output')->showError( 'missing_files' ); - } - - //----------------------------------------- - // Error out if we can not find the topic - //----------------------------------------- - - if ( ! $this->topic['tid'] ) - { - $this->registry->getClass('output')->showError( 'missing_files' ); - } - - //----------------------------------------- - // Check viewing permissions, private forums, - // password forums, etc - //----------------------------------------- - - if ( ( ! $this->topic['pinned'] ) and ( ! $this->memberData['g_other_topics'] ) ) - { - $this->registry->getClass('output')->showError( 'no_view_topic' ); - } - - //----------------------------------------- - // Check access - //----------------------------------------- - - $this->registry->getClass('class_forums')->forumsCheckAccess( $this->forum['id'], 1, 'topic' ); - - if ( ! $this->topic['approved'] AND !( $this->memberData['g_is_supmod'] OR $_moderator[ $this->topic['forum_id'] ]['topic_q'] ) ) - { - $this->registry->getClass('output')->showError( 'no_view_topic' ); - } - - //----------------------------------------- - // Main logic engine - //----------------------------------------- - - if ($this->request['client'] == 'choose') - { - $this->page_title = $this->topic['title']; - - $this->nav = array( array( $this->forum['name'], "showforum={$this->forum['id']}" ), - array( $this->topic['title'], "showtopic={$this->topic['tid']}" ) - ); - - - $this->output = $this->registry->getClass('output')->getTemplate('printpage')->choose_form($this->forum['id'], $this->topic['tid'], $this->topic['title']); - - $this->registry->getClass('output')->setTitle( $this->page_title ); - $this->registry->getClass('output')->addContent( $this->output ); - - if( is_array( $this->nav ) AND count( $this->nav ) ) - { - foreach( $this->nav as $_id => $_nav ) - { - $this->registry->getClass('output')->addNavigation( $_nav[0], $_nav[1] ); - } - } - - $this->registry->getClass('output')->sendOutput(); - - exit(); - } - else - { - $header = 'text/html'; - $ext = '.html'; - - switch ($this->request['client']) - { - case 'printer': - $header = 'text/html'; - $ext = '.html'; - break; - case 'html': - $header = 'unknown/unknown'; - $ext = '.html'; - break; - default: - $header = 'application/msword'; - $ext = '.doc'; - } - } - - $title = substr( str_replace( " ", "_" , preg_replace( "/&(lt|gt|quot|#124|#036|#33|#39);/", "", $this->topic['title'] ) ), 0, 100); - - @header( "Content-type: {$header};charset=" . IPS_DOC_CHAR_SET ); - - if ( $this->request['client'] != 'printer' ) - { - @header("Content-Disposition: attachment; filename=$title".$ext); - } - - print $this->getPosts(); - - exit; - } - - /** - * Gets the posts to be printed/downloaded - * - * @access protected - * @return string - **/ - protected function getPosts() - { - //----------------------------------------- - // Render the page top - //----------------------------------------- - - $posts_html = $this->registry->getClass('output')->getTemplate('printpage')->pp_header( $this->forum['name'], $this->topic['title'], $this->topic['starter_name'] , $this->forum['id'], $this->topic['tid'] ); - - $max_posts = 300; - $attach_pids = array(); - - $this->DB->build( array( - 'select' => 'p.*', - 'from' => array( 'posts' => 'p' ), - 'where' => "p.topic_id={$this->topic['tid']} and p.queued=0", - 'order' => 'p.pid', - 'limit' => array( 0, $max_posts ), - 'add_join' => array( - array( - 'select' => 'm.members_display_name', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=p.author_id', - 'type' => 'left' - ) - ) - ) ); - $this->DB->execute(); - - //----------------------------------------- - // Loop through to pick out the correct member IDs. - // and push the post info into an array - maybe in the future - // we can add page spans, or maybe save to a PDF file? - //----------------------------------------- - - $the_posts = array(); - $mem_ids = array(); - $member_array = array(); - $cached_members = array(); - $pids = array(); - - while ( $i = $this->DB->fetch() ) - { - $the_posts[ $i['pid' ]] = $i; - $this->attach_pids[] = $i['pid']; - - if ( $i['author_id'] ) - { - $mem_ids[ $i['author_id'] ] = $i['author_id']; - } - } - - $the_posts = $this->_parseAttachments( $the_posts, $this->attach_pids ); - - //----------------------------------------- - // Get the member profiles needed for this topic - //----------------------------------------- - - if ( count( $mem_ids ) ) - { - $this->DB->build( array( - 'select' => 'm.*', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id IN ('.implode( ',', $mem_ids ).')', - 'add_join' => array( - array( - 'select' => 'g.*', - 'from' => array( 'groups' => 'g' ), - 'where' => 'g.g_id=m.member_group_id', - 'type' => 'left' - ) - ) - ) ); - - $this->DB->execute(); - - while( $m = $this->DB->fetch() ) - { - $member_array[ $m['member_id'] ] = $m; - } - } - - //----------------------------------------- - // Format and print out the topic list - //----------------------------------------- - - foreach( $the_posts as $row ) - { - $poster = array(); - - //----------------------------------------- - // Get the member info. We parse the data and cache it. - // It's likely that the same member posts several times in - // one page, so it's not efficient to keep parsing the same - // data - //----------------------------------------- - - if( $row['author_id'] != 0 ) - { - //----------------------------------------- - // Is it in the hash? - //----------------------------------------- - - if ( isset($cached_members[ $row['author_id'] ]) ) - { - //----------------------------------------- - // Ok, it's already cached, read from it - //----------------------------------------- - - $poster = $cached_members[ $row['author_id'] ]; - $row['name_css'] = 'normalname'; - } - else - { - //----------------------------------------- - // Ok, it's NOT in the cache, is it a member thats - // not been deleted? - //----------------------------------------- - - if ($member_array[ $row['author_id'] ]) - { - $row['name_css'] = 'normalname'; - $poster = $member_array[ $row['author_id'] ]; - - //----------------------------------------- - // Add it to the cached list - //----------------------------------------- - - $cached_members[ $row['author_id'] ] = $poster; - } - else - { - //----------------------------------------- - // It's probably a deleted member, so treat them as a guest - //----------------------------------------- - - $poster = IPSMember::setUpGuest( $row['author_id'] ); - $row['name_css'] = 'unreg'; - } - } - } - else - { - //----------------------------------------- - // It's definately a guest... - //----------------------------------------- - - $poster = IPSMember::setUpGuest( $row['author_name'] ); - $row['name_css'] = 'unreg'; - } - - //----------------------------------------- - - $row['post'] = preg_replace( "//", "", $row['post'] ); - - //----------------------------------------- - - $row['post_date'] = $this->registry->getClass( 'class_localization')->getDate( $row['post_date'], 'LONG', 1 ); - - //----------------------------------------- - // Quoted attachments? - //----------------------------------------- - - $attach_pids[ $row['pid'] ] = $row['pid']; - - $row['post'] = $this->parseMessage( $row['post'], $row ); - - //----------------------------------------- - // Parse HTML tag on the fly - //----------------------------------------- - - $posts_html .= $this->registry->getClass('output')->getTemplate('printpage')->pp_postentry( $poster, $row ); - } - - if ( count( $attach_pids ) ) - { - if ( ! is_object( $this->class_attach ) ) - { - //----------------------------------------- - // Grab render attach class - //----------------------------------------- - - require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' ); - $this->class_attach = new class_attach( $this->registry ); - $this->class_attach->type = 'post'; - $this->class_attach->init(); - } - - $posts_html = $this->class_attach->renderAttachments( $posts_html, $attach_pids ); - - $posts_html = $posts_html[0]['html']; - } - - //----------------------------------------- - // Print the footer - //----------------------------------------- - - $posts_html .= $this->registry->getClass('output')->getTemplate('printpage')->pp_end(); - - //----------------------------------------- - // Macros - //----------------------------------------- - - $posts_html = $this->registry->getClass('output')->replaceMacros( $posts_html ); - - //----------------------------------------- - // CSS - //----------------------------------------- - - $this->registry->getClass('output')->skin['_usecsscache'] = 0; - - return $posts_html; - } - - /** - * Parse attachments - * - * @access public - * @param array Array of post data - * @return string HTML parsed by attachment class - */ - public function _parseAttachments( $postData ) - { - //----------------------------------------- - // INIT. Yes it is - //----------------------------------------- - - $postHTML = array(); - - //----------------------------------------- - // Separate out post content - //----------------------------------------- - - foreach( $postData as $id => $post ) - { - $postHTML[ $id ] = $post['post']; - } - - //----------------------------------------- - // ATTACHMENTS!!! - //----------------------------------------- - - if ( $this->topic['topic_hasattach'] ) - { - if ( ! is_object( $this->class_attach ) ) - { - //----------------------------------------- - // Grab render attach class - //----------------------------------------- - - require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' ); - $this->class_attach = new class_attach( $this->registry ); - } - - //----------------------------------------- - // Not got permission to view downloads? - //----------------------------------------- - - if ( $this->registry->permissions->check( 'download', $this->registry->class_forums->forum_by_id[ $this->topic['forum_id'] ] ) === FALSE ) - { - $this->settings['show_img_upload'] = 0 ; - } - - //----------------------------------------- - // Continue... - //----------------------------------------- - - $this->class_attach->type = 'post'; - $this->class_attach->init(); - - # attach_pids is generated in the func_topic_xxxxx files - $attachHTML = $this->class_attach->renderAttachments( $postHTML, $this->attach_pids ); - } - - /* Now parse back in the rendered posts */ - if( is_array($attachHTML) AND count($attachHTML) ) - { - foreach( $attachHTML as $id => $data ) - { - /* Get rid of any lingering attachment tags */ - if ( stristr( $data['html'], "[attachment=" ) ) - { - $data['html'] = IPSText::stripAttachTag( $data['html'] ); - } - - $postData[ $id ]['post'] = $data['html']; - $postData[ $id ]['attachmentHtml'] = $data['attachmentHtml']; - } - } - - return $postData; - } - - /** - * Parses Posts - * - * @access protected - * @param string $message Text - * @param array $row Formatting params - * @return string - **/ - protected function parseMessage( $message="", $row=array() ) - { - IPSText::getTextClass( 'bbcode' )->parse_smilies = $row['use_emo']; - IPSText::getTextClass( 'bbcode' )->parse_html = ( $this->forum['use_html'] and $this->caches['group_cache'][ $row['member_group_id'] ]['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0; - IPSText::getTextClass( 'bbcode' )->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0; - IPSText::getTextClass( 'bbcode' )->parse_bbcode = $this->forum['use_ibc']; - IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics'; - IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id']; - IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others']; - - return IPSText::getTextClass( 'bbcode' )->preDisplayParse( $message ); - } -} + + * Invision Power Services + * IP.Board v3.1.4 + * Print Topic + * Last Updated: $Date: 2010-06-10 06:36:42 -0400 (Thu, 10 Jun 2010) $ + * + * + * @author $Author: danc $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 20th February 2002 + * @version $Rev: 6502 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_forums_forums_printtopic extends ipsCommand +{ + /** + * Temporary output + * + * @access private + * @var string + */ + private $output = ""; + + /** + * Forum data + * + * @access private + * @var array + */ + private $forum = array(); + + /** + * Topic data + * + * @access private + * @var array + */ + private $topic = array(); + + private $attach_pids; + + /** + * Main execution function + * + * @access public + * @param object Registry Object + * @return void + * @todo Need error codes + */ + public function doExecute( ipsRegistry $registry ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $_moderator = $this->memberData['forumsModeratorData']; + + //----------------------------------------- + // Compile the language file + //----------------------------------------- + + $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_printpage' ) ); + + //----------------------------------------- + // Check the input + //----------------------------------------- + + $this->request['t'] = intval($this->request['t'] ); + $this->request['f'] = intval($this->request['f'] ); + + if ( ! $this->request['t'] or ! $this->request['f'] ) + { + $this->registry->getClass('output')->showError( 'missing_files', 0, null, null, 404 ); + } + + //----------------------------------------- + // Get the forum info based on the + // forum ID, get the category name, ID, + // and get the topic details + //----------------------------------------- + + $this->topic = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => "tid=" . $this->request['t'] ) ); + $this->forum = $this->registry->getClass('class_forums')->forum_by_id[ $this->topic['forum_id'] ]; + + //----------------------------------------- + // Error out if we can not find the forum + //----------------------------------------- + + if ( ! $this->forum['id'] ) + { + $this->registry->getClass('output')->showError( 'missing_files', 0, null, null, 404 ); + } + + //----------------------------------------- + // Error out if we can not find the topic + //----------------------------------------- + + if ( ! $this->topic['tid'] ) + { + $this->registry->getClass('output')->showError( 'missing_files', 0, null, null, 404 ); + } + + //----------------------------------------- + // Check viewing permissions, private forums, + // password forums, etc + //----------------------------------------- + + if ( ( ! $this->topic['pinned'] ) and ( ! $this->memberData['g_other_topics'] ) ) + { + $this->registry->getClass('output')->showError( 'no_view_topic', 0, null, null, 403 ); + } + + //----------------------------------------- + // Check access + //----------------------------------------- + + $this->registry->getClass('class_forums')->forumsCheckAccess( $this->forum['id'], 1, 'topic' ); + + if ( ! $this->topic['approved'] AND !( $this->memberData['g_is_supmod'] OR $_moderator[ $this->topic['forum_id'] ]['topic_q'] ) ) + { + $this->registry->getClass('output')->showError( 'no_view_topic', 0, null, null, 403 ); + } + + //----------------------------------------- + // Main logic engine + //----------------------------------------- + + if ($this->request['client'] == 'choose') + { + $this->page_title = $this->topic['title']; + + $this->nav = array( array( $this->forum['name'], "showforum={$this->forum['id']}" ), + array( $this->topic['title'], "showtopic={$this->topic['tid']}" ) + ); + + + $this->output = $this->registry->getClass('output')->getTemplate('printpage')->choose_form($this->forum['id'], $this->topic['tid'], $this->topic['title']); + + $this->registry->getClass('output')->setTitle( $this->page_title . ' - ' . ipsRegistry::$settings['board_name'] ); + $this->registry->getClass('output')->addContent( $this->output ); + + if( is_array( $this->nav ) AND count( $this->nav ) ) + { + foreach( $this->nav as $_id => $_nav ) + { + $this->registry->getClass('output')->addNavigation( $_nav[0], $_nav[1] ); + } + } + + $this->registry->getClass('output')->sendOutput(); + + exit(); + } + else + { + $header = 'text/html'; + $ext = '.html'; + + switch ($this->request['client']) + { + case 'printer': + $header = 'text/html'; + $ext = '.html'; + break; + case 'html': + $header = 'unknown/unknown'; + $ext = '.html'; + break; + default: + $header = 'application/msword'; + $ext = '.doc'; + } + } + + $title = substr( str_replace( " ", "_" , preg_replace( "/&(lt|gt|quot|#124|#036|#33|#39);/", "", $this->topic['title'] ) ), 0, 100); + + @header( "Content-type: {$header};charset=" . IPS_DOC_CHAR_SET ); + + if ( $this->request['client'] != 'printer' ) + { + @header("Content-Disposition: attachment; filename=$title".$ext); + } + + print $this->getPosts(); + + exit; + } + + /** + * Gets the posts to be printed/downloaded + * + * @access protected + * @return string + **/ + protected function getPosts() + { + //----------------------------------------- + // Render the page top + //----------------------------------------- + + $posts_html = $this->registry->getClass('output')->getTemplate('printpage')->pp_header( $this->forum['name'], $this->topic['title'], $this->topic['starter_name'] , $this->forum['id'], $this->topic['tid'] ); + + $max_posts = 300; + $attach_pids = array(); + + $this->DB->build( array( + 'select' => 'p.*', + 'from' => array( 'posts' => 'p' ), + 'where' => "p.topic_id={$this->topic['tid']} and p.queued=0", + 'order' => 'p.pid', + 'limit' => array( 0, $max_posts ), + 'add_join' => array( + array( + 'select' => 'm.members_display_name', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=p.author_id', + 'type' => 'left' + ) + ) + ) ); + $this->DB->execute(); + + //----------------------------------------- + // Loop through to pick out the correct member IDs. + // and push the post info into an array - maybe in the future + // we can add page spans, or maybe save to a PDF file? + //----------------------------------------- + + $the_posts = array(); + $mem_ids = array(); + $member_array = array(); + $cached_members = array(); + $pids = array(); + + while ( $i = $this->DB->fetch() ) + { + $the_posts[ $i['pid' ]] = $i; + $this->attach_pids[] = $i['pid']; + + if ( $i['author_id'] ) + { + $mem_ids[ $i['author_id'] ] = $i['author_id']; + } + } + + $the_posts = $this->_parseAttachments( $the_posts, $this->attach_pids ); + + //----------------------------------------- + // Get the member profiles needed for this topic + //----------------------------------------- + + if ( count( $mem_ids ) ) + { + $this->DB->build( array( + 'select' => 'm.*', + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id IN ('.implode( ',', $mem_ids ).')', + 'add_join' => array( + array( + 'select' => 'g.*', + 'from' => array( 'groups' => 'g' ), + 'where' => 'g.g_id=m.member_group_id', + 'type' => 'left' + ) + ) + ) ); + + $this->DB->execute(); + + while( $m = $this->DB->fetch() ) + { + $member_array[ $m['member_id'] ] = $m; + } + } + + //----------------------------------------- + // Format and print out the topic list + //----------------------------------------- + + foreach( $the_posts as $row ) + { + $poster = array(); + + //----------------------------------------- + // Get the member info. We parse the data and cache it. + // It's likely that the same member posts several times in + // one page, so it's not efficient to keep parsing the same + // data + //----------------------------------------- + + if( $row['author_id'] != 0 ) + { + //----------------------------------------- + // Is it in the hash? + //----------------------------------------- + + if ( isset($cached_members[ $row['author_id'] ]) ) + { + //----------------------------------------- + // Ok, it's already cached, read from it + //----------------------------------------- + + $poster = $cached_members[ $row['author_id'] ]; + $row['name_css'] = 'normalname'; + } + else + { + //----------------------------------------- + // Ok, it's NOT in the cache, is it a member thats + // not been deleted? + //----------------------------------------- + + if ($member_array[ $row['author_id'] ]) + { + $row['name_css'] = 'normalname'; + $poster = $member_array[ $row['author_id'] ]; + + //----------------------------------------- + // Add it to the cached list + //----------------------------------------- + + $cached_members[ $row['author_id'] ] = $poster; + } + else + { + //----------------------------------------- + // It's probably a deleted member, so treat them as a guest + //----------------------------------------- + + $poster = IPSMember::setUpGuest( $row['author_name'] ); + $row['name_css'] = 'unreg'; + } + } + } + else + { + //----------------------------------------- + // It's definately a guest... + //----------------------------------------- + + $poster = IPSMember::setUpGuest( $row['author_name'] ); + $row['name_css'] = 'unreg'; + } + + //----------------------------------------- + + $row['post'] = preg_replace( "//", "", $row['post'] ); + + //----------------------------------------- + + $row['post_date'] = $this->registry->getClass( 'class_localization')->getDate( $row['post_date'], 'LONG', 1 ); + + //----------------------------------------- + // Quoted attachments? + //----------------------------------------- + + $attach_pids[ $row['pid'] ] = $row['pid']; + + $row['post'] = $this->parseMessage( $row['post'], $row ); + + //----------------------------------------- + // Parse HTML tag on the fly + //----------------------------------------- + + $posts_html .= $this->registry->getClass('output')->getTemplate('printpage')->pp_postentry( $poster, $row ); + } + + if ( count( $attach_pids ) ) + { + if ( ! is_object( $this->class_attach ) ) + { + //----------------------------------------- + // Grab render attach class + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $this->class_attach = new $classToLoad( $this->registry ); + $this->class_attach->type = 'post'; + $this->class_attach->init(); + } + + $posts_html = $this->class_attach->renderAttachments( $posts_html, $attach_pids ); + + $posts_html = $posts_html[0]['html']; + } + + //----------------------------------------- + // Print the footer + //----------------------------------------- + + $posts_html .= $this->registry->getClass('output')->getTemplate('printpage')->pp_end(); + + //----------------------------------------- + // Macros + //----------------------------------------- + + $posts_html = $this->registry->getClass('output')->replaceMacros( $posts_html ); + + //----------------------------------------- + // CSS + //----------------------------------------- + + $this->registry->getClass('output')->skin['_usecsscache'] = 0; + + return $posts_html; + } + + /** + * Parse attachments + * + * @access public + * @param array Array of post data + * @return string HTML parsed by attachment class + */ + public function _parseAttachments( $postData ) + { + //----------------------------------------- + // INIT. Yes it is + //----------------------------------------- + + $postHTML = array(); + + //----------------------------------------- + // Separate out post content + //----------------------------------------- + + foreach( $postData as $id => $post ) + { + $postHTML[ $id ] = $post['post']; + } + + //----------------------------------------- + // ATTACHMENTS!!! + //----------------------------------------- + + if ( $this->topic['topic_hasattach'] ) + { + if ( ! is_object( $this->class_attach ) ) + { + //----------------------------------------- + // Grab render attach class + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $this->class_attach = new $classToLoad( $this->registry ); + } + + //----------------------------------------- + // Not got permission to view downloads? + //----------------------------------------- + + if ( $this->registry->permissions->check( 'download', $this->registry->class_forums->forum_by_id[ $this->topic['forum_id'] ] ) === FALSE ) + { + $this->settings['show_img_upload'] = 0 ; + } + + //----------------------------------------- + // Continue... + //----------------------------------------- + + $this->class_attach->type = 'post'; + $this->class_attach->init(); + + # attach_pids is generated in the func_topic_xxxxx files + $attachHTML = $this->class_attach->renderAttachments( $postHTML, $this->attach_pids ); + } + + /* Now parse back in the rendered posts */ + if( is_array($attachHTML) AND count($attachHTML) ) + { + foreach( $attachHTML as $id => $data ) + { + /* Get rid of any lingering attachment tags */ + if ( stristr( $data['html'], "[attachment=" ) ) + { + $data['html'] = IPSText::stripAttachTag( $data['html'] ); + } + + $postData[ $id ]['post'] = $data['html']; + $postData[ $id ]['attachmentHtml'] = $data['attachmentHtml']; + } + } + + return $postData; + } + + /** + * Parses Posts + * + * @access protected + * @param string $message Text + * @param array $row Formatting params + * @return string + **/ + protected function parseMessage( $message="", $row=array() ) + { + IPSText::getTextClass( 'bbcode' )->parse_smilies = $row['use_emo']; + IPSText::getTextClass( 'bbcode' )->parse_html = ( $this->forum['use_html'] and $this->caches['group_cache'][ $row['member_group_id'] ]['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0; + IPSText::getTextClass( 'bbcode' )->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0; + IPSText::getTextClass( 'bbcode' )->parse_bbcode = $this->forum['use_ibc']; + IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics'; + IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id']; + IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others']; + + return IPSText::getTextClass( 'bbcode' )->preDisplayParse( $message ); + } +} diff --git a/upload/admin/applications/forums/modules_public/forums/rules.php b/upload/admin/applications/forums/modules_public/forums/rules.php index 01585579..27e8f3d0 100644 --- a/upload/admin/applications/forums/modules_public/forums/rules.php +++ b/upload/admin/applications/forums/modules_public/forums/rules.php @@ -1,132 +1,135 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class public_forums_forums_rules extends ipsCommand -{ - /** - * Array of form data - * - * @access private - * @var array - */ - private $forum = array(); - - /** - * Class entry point - * - * @access public - * @param object Registry reference - * @return void [Outputs to screen/redirects] - */ - public function doExecute( ipsRegistry $registry ) - { - $this->registry->getClass( 'class_localization' )->loadLanguageFile( array( 'public_forums', 'public_boards' ) ); - - //----------------------------------------- - // Get the forum info based on the forum ID, - // and get the category name, ID, etc. - //----------------------------------------- - - $this->forum = $this->registry->getClass('class_forums')->forum_by_id[ $this->request['f'] ]; - - //----------------------------------------- - // Error out if we can not find the forum - //----------------------------------------- - - if( ! $this->forum['id'] ) - { - $this->registry->getClass('output')->showError( 'forums_no_id', 10333 ); - } - - //----------------------------------------- - // Is it a redirect forum? - //----------------------------------------- - - if( isset( $this->forum['redirect_on'] ) AND $this->forum['redirect_on'] ) - { - $redirect = $this->DB->buildAndFetch( array( 'select' => 'redirect_url', 'from' => 'forums', 'where' => "id=" . $this->forum['id']) ); - - if( $redirect['redirect_url'] ) - { - //----------------------------------------- - // Update hits: - //----------------------------------------- - - $this->DB->buildAndFetch( array( 'update' => 'forums', 'set' => 'redirect_hits=redirect_hits+1', 'where' => "id=" . $this->forum['id']) ); - - //----------------------------------------- - // Boink! - //----------------------------------------- - - $this->registry->getClass('output')->silentRedirect( $redirect['redirect_url'] ); - } - } - - //----------------------------------------- - // Check forum access perms - //----------------------------------------- - - if( !$this->request['L'] ) - { - $this->registry->getClass('class_forums')->forumsCheckAccess( $this->forum['id'], 1 ); - } - - //----------------------------------------- - // Do we have permission to view these rules? - //----------------------------------------- - - $allow_access = $this->registry->getClass('class_forums')->forumsCheckAccess( $this->forum['id'], 1 ); - - if( $allow_access === FALSE ) - { - $this->registry->getClass('output')->showError( 'forums_no_access', 10334 ); - } - - $tmp = $this->DB->buildAndFetch( array( 'select' => 'rules_title, rules_text', 'from' => 'forums', 'where' => "id=" . $this->forum['id']) ); - - if( $tmp['rules_title'] ) - { - $rules['title'] = $tmp['rules_title']; - $rules['body'] = $tmp['rules_text']; - $rules['fid'] = $this->forum['id']; - - IPSText::getTextClass( 'bbcode' )->parse_smilies = 1; - IPSText::getTextClass( 'bbcode' )->parse_html = 1; - IPSText::getTextClass( 'bbcode' )->parse_nl2br = 1; - IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; - IPSText::getTextClass( 'bbcode' )->parsing_section = 'rules'; - $rules['body'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $rules['body'] ); - - $this->output .= $this->registry->getClass('output')->getTemplate('forum')->show_rules($rules); - - $this->registry->output->setTitle( $this->settings['board_name'] . " -> " . $this->forum['name'] ); - $this->registry->output->addNavigation( $this->forum['name'], "showforum={$this->forum['id']}", $this->forum['name_seo'], 'showforum' ); - $this->registry->output->addContent( $this->output ); - $this->registry->output->sendOutput(); - } - else - { - $this->registry->getClass('output')->showError( 'forums_no_rules', 10335 ); - } - } + + * Invision Power Services + * IP.Board v3.1.4 + * Show forum rules + * Last Updated: $Date: 2010-10-05 21:26:08 -0400 (Tue, 05 Oct 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Rev: 6945 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

    Incorrect access

    You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class public_forums_forums_rules extends ipsCommand +{ + /** + * Array of form data + * + * @access private + * @var array + */ + private $forum = array(); + + /** + * Class entry point + * + * @access public + * @param object Registry reference + * @return void [Outputs to screen/redirects] + */ + public function doExecute( ipsRegistry $registry ) + { + $this->registry->getClass( 'class_localization' )->loadLanguageFile( array( 'public_forums', 'public_boards' ) ); + + //----------------------------------------- + // Get the forum info based on the forum ID, + // and get the category name, ID, etc. + //----------------------------------------- + + $this->forum = $this->registry->getClass('class_forums')->forum_by_id[ $this->request['f'] ]; + + //----------------------------------------- + // Error out if we can not find the forum + //----------------------------------------- + + if( ! $this->forum['id'] ) + { + $this->registry->getClass('output')->showError( 'forums_no_id', 10333, null, null, 404 ); + } + + //----------------------------------------- + // Is it a redirect forum? + //----------------------------------------- + + if( isset( $this->forum['redirect_on'] ) AND $this->forum['redirect_on'] ) + { + $redirect = $this->DB->buildAndFetch( array( 'select' => 'redirect_url', 'from' => 'forums', 'where' => "id=" . $this->forum['id']) ); + + if( $redirect['redirect_url'] ) + { + //----------------------------------------- + // Update hits: + //----------------------------------------- + + $this->DB->buildAndFetch( array( 'update' => 'forums', 'set' => 'redirect_hits=redirect_hits+1', 'where' => "id=" . $this->forum['id']) ); + + //----------------------------------------- + // Boink! + //----------------------------------------- + + $this->registry->getClass('output')->silentRedirect( $redirect['redirect_url'] ); + } + } + + //----------------------------------------- + // Check forum access perms + //----------------------------------------- + + if( !$this->request['L'] ) + { + $this->registry->getClass('class_forums')->forumsCheckAccess( $this->forum['id'], 1 ); + } + + //----------------------------------------- + // Do we have permission to view these rules? + //----------------------------------------- + + $allow_access = $this->registry->getClass('class_forums')->forumsCheckAccess( $this->forum['id'], 1 ); + + if( $allow_access === FALSE ) + { + $this->registry->getClass('output')->showError( 'forums_no_access', 10334, null, null, 403 ); + } + + $tmp = $this->DB->buildAndFetch( array( 'select' => 'rules_title, rules_text', 'from' => 'forums', 'where' => "id=" . $this->forum['id']) ); + + if( $tmp['rules_title'] ) + { + $rules['title'] = $tmp['rules_title']; + $rules['body'] = $tmp['rules_text']; + $rules['fid'] = $this->forum['id']; + $rules['fseo'] = $this->forum['name_seo']; + + IPSText::getTextClass( 'bbcode' )->parse_smilies = 1; + IPSText::getTextClass( 'bbcode' )->parse_html = 1; + IPSText::getTextClass( 'bbcode' )->parse_nl2br = 1; + IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; + IPSText::getTextClass( 'bbcode' )->parsing_section = 'rules'; + $rules['body'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $rules['body'] ); + + $this->output .= $this->registry->getClass('output')->getTemplate('forum')->show_rules($rules); + + $this->registry->output->setTitle( $this->forum['name'] . ' - ' . ipsRegistry::$settings['board_name'] ); + $this->registry->output->addNavigation( $this->forum['name'], "showforum={$this->forum['id']}", $this->forum['name_seo'], 'showforum' ); + $this->registry->output->addContent( $this->output ); + $this->registry->output->sendOutput(); + } + else + { + $this->registry->getClass('output')->showError( 'forums_no_rules', 10335, null, null, 404 ); + } + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_public/forums/topics.php b/upload/admin/applications/forums/modules_public/forums/topics.php index 219fbce3..c30cc9c4 100644 --- a/upload/admin/applications/forums/modules_public/forums/topics.php +++ b/upload/admin/applications/forums/modules_public/forums/topics.php @@ -1,18 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Topic View - * Last Updated: $Date: 2009-11-10 18:07:22 -0500 (Tue, 10 Nov 2009) $ + * Last Updated: $Date: 2010-10-19 08:45:58 -0400 (Tue, 19 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Rev: 5345 $ + * @link http://www.invisionpower.com + * @version $Rev: 6994 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -26,7 +27,6 @@ class public_forums_forums_topics extends ipsCommand /** * First post content * - * @access private * @var string */ private $_firstPostContent = ''; @@ -34,7 +34,6 @@ class public_forums_forums_topics extends ipsCommand /** * Moderators in this forum * - * @access public * @var array */ public $moderator = array(); @@ -42,7 +41,6 @@ class public_forums_forums_topics extends ipsCommand /** * Forum data * - * @access public * @var array */ public $forum = array(); @@ -50,7 +48,6 @@ class public_forums_forums_topics extends ipsCommand /** * Topic data * - * @access public * @var array */ public $topic = array(); @@ -58,7 +55,6 @@ class public_forums_forums_topics extends ipsCommand /** * Number of posts so far (offset) * - * @access public * @var integer */ public $post_count = 0; @@ -66,7 +62,6 @@ class public_forums_forums_topics extends ipsCommand /** * Parsed member data * - * @access public * @var array */ public $cached_members = array(); @@ -74,7 +69,6 @@ class public_forums_forums_topics extends ipsCommand /** * Is first post printed? * - * @access public * @var bool */ public $first_printed = false; @@ -82,7 +76,6 @@ class public_forums_forums_topics extends ipsCommand /** * Printed any posts? * - * @access public * @var bool */ public $printed = false; @@ -90,7 +83,6 @@ class public_forums_forums_topics extends ipsCommand /** * First post id * - * @access public * @var integer */ public $first = 0; @@ -98,7 +90,6 @@ class public_forums_forums_topics extends ipsCommand /** * Quoted post ids * - * @access public * @var string */ public $qpids = ""; @@ -106,7 +97,6 @@ class public_forums_forums_topics extends ipsCommand /** * Post ids * - * @access public * @var array */ public $pids = array(); @@ -114,7 +104,6 @@ class public_forums_forums_topics extends ipsCommand /** * Attachment post ids * - * @access public * @var array */ public $attach_pids = array(); @@ -122,7 +111,6 @@ class public_forums_forums_topics extends ipsCommand /** * Last read topic id * - * @access public * @var integer */ public $last_read_tid = 0; @@ -130,7 +118,6 @@ class public_forums_forums_topics extends ipsCommand /** * Can rate a topic permission * - * @access public * @var boolean */ public $can_rate = false; @@ -138,7 +125,6 @@ class public_forums_forums_topics extends ipsCommand /** * Is this a poll only (disallow replies)? * - * @access public * @var boolean */ public $poll_only = false; @@ -146,7 +132,6 @@ class public_forums_forums_topics extends ipsCommand /** * Attachments library * - * @access public * @var object */ public $class_attach; @@ -154,7 +139,6 @@ class public_forums_forums_topics extends ipsCommand /** * Test to see if user is restricted by Posts per day * - * @access private * @var int */ private $_ppd_ok = TRUE; @@ -162,7 +146,6 @@ class public_forums_forums_topics extends ipsCommand /** * Topic view mode * - * @access private * @var string */ private $topic_view_mode = ''; @@ -170,16 +153,25 @@ class public_forums_forums_topics extends ipsCommand /** * Cache Monitor * - * @access private * @var array */ private $_cacheMonitor = array( 'post' => array( 'cached' => 0, 'raw' => 0 ), 'sig' => array( 'cached' => 0, 'raw' => 0 ) ); + /** + * Soft deleted PIDS + */ + private $_sdPids = array(); + + /** + * Permissions array + * + */ + protected $permissions = array(); + /** * Mod actions * - * @access private * @var array */ private $mod_action = array( 'CLOSE_TOPIC' => '00', @@ -198,10 +190,9 @@ class public_forums_forums_topics extends ipsCommand /** * Loads the topic and forum data for the specified topic id * - * @access public * @param mixed $topic Array of topic data, or single topic id * @return void - **/ + */ public function loadTopicAndForum( $topic="" ) { if ( ! is_array( $topic ) ) @@ -214,7 +205,7 @@ class public_forums_forums_topics extends ipsCommand if ( $this->request['t'] < 0 ) { - $this->registry->output->showError( 'topics_no_tid', 10341 ); + $this->registry->output->showError( 'topics_no_tid', 10341, null, null, 404 ); } //----------------------------------------- @@ -251,7 +242,7 @@ class public_forums_forums_topics extends ipsCommand if ( ! $this->topic['tid'] ) { - $this->registry->output->showError( 'topics_no_tid', 10343 ); + $this->registry->output->showError( 'topics_no_tid', 10343, null, null, 404 ); } //----------------------------------------- @@ -260,28 +251,51 @@ class public_forums_forums_topics extends ipsCommand if ( ! $this->forum['id'] ) { - $this->registry->output->showError( 'topics_no_fid', 10342 ); + $this->registry->output->showError( 'topics_no_fid', 10342, null, null, 404 ); } //----------------------------------------- - // Error out if the topic is not approved + // Error out if the topic is not approved or soft deleted //----------------------------------------- + $approved = $this->registry->class_forums->fetchHiddenTopicType( $this->topic ); + if ( ! $this->registry->class_forums->canQueuePosts($this->forum['id']) ) { - if ($this->topic['approved'] != 1) + if ( $approved == 'hidden' ) { - $this->registry->output->showError( 'topic_not_approved', 10344 ); + $this->registry->output->showError( 'topic_not_approved', 10344, null, null, 403 ); } } + $this->permissions['softDelete'] = $this->registry->getClass('class_forums')->canSoftDeletePosts( $this->topic['forum_id'], array() ); + $this->permissions['softDeleteRestore'] = $this->registry->getClass('class_forums')->can_Un_SoftDeletePosts( $this->topic['forum_id'] ); + $this->permissions['softDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedPosts( $this->topic['forum_id'] ); + $this->permissions['softDeleteReason'] = $this->registry->getClass('class_forums')->canSeeSoftDeleteReason( $this->topic['forum_id'] ); + $this->permissions['softDeleteContent'] = $this->registry->getClass('class_forums')->canSeeSoftDeleteContent( $this->topic['forum_id'] ); + $this->permissions['TopicSoftDelete'] = $this->registry->getClass('class_forums')->canSoftDeleteTopics( $this->forum['id'], $this->topic ); + $this->permissions['TopicSoftDeleteRestore'] = $this->registry->getClass('class_forums')->can_Un_SoftDeleteTopics( $this->forum['id'] ); + $this->permissions['TopicSoftDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedTopics( $this->forum['id'] ); + + /* Soft deleted? */ + if ( $approved == 'sdelete' AND ! $this->permissions['softDeleteContent'] ) + { + $this->registry->output->showError( 'topic_not_approved', 10344.1, null, null, 403 ); + } + $this->registry->class_forums->forumsCheckAccess( $this->forum['id'], 1, 'topic', $this->topic ); + + /* Got a nice perm? */ + $this->topic['permissions'] =& $this->permissions; + + /* Deleted topic? */ + $this->topic['_isDeleted'] = ( $approved == 'sdelete' ) ? true : false; + $this->topic['_isHidden'] = ( $approved == 'hidden' ) ? true : false; } /** * Main Execution Function * - * @access public * @param object Registry reference * @return void [Outputs to screen/redirects] */ @@ -314,12 +328,21 @@ class public_forums_forums_topics extends ipsCommand if( $this->settings['reputation_enabled'] ) { /* Load the class */ - require_once( IPS_ROOT_PATH . 'sources/classes/class_reputation_cache.php' ); - $this->registry->setClass( 'repCache', new classReputationCache() ); + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_reputation_cache.php', 'classReputationCache' ); + $this->registry->setClass( 'repCache', new $classToLoad() ); /* Update the filter? */ if( isset( $this->request['rep_filter'] ) && $this->request['rep_filter'] == 'update' ) { + /** + * Check secure key + * @link http://community.invisionpower.com/tracker/issue-22078-i-can-edit-your-treshold + */ + if( $this->request['secure_key'] != $this->member->form_hash ) + { + $this->registry->output->showError( 'usercp_forums_bad_key', 1021522 ); + } + $_mem_cache = IPSMember::unpackMemberCache( $this->memberData['members_cache'] ); if( $this->request['rep_filter_set'] == '*' ) @@ -394,8 +417,8 @@ class public_forums_forums_topics extends ipsCommand if ( $this->topic_view_mode == 'threaded' ) { - require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/threaded.php' ); - $threaded = new threadedModeLibrary( $this->registry, $this ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/threaded.php', 'threadedModeLibrary', 'forums' ); + $threaded = new $classToLoad( $this->registry, $this ); $post_data = $threaded->_getTopicDataThreaded(); } else @@ -413,6 +436,9 @@ class public_forums_forums_topics extends ipsCommand $this->topic['id'] = $this->topic['forum_id']; + /* Data Hook Location */ + IPSLib::doDataHooks( $this->topic, 'topicViewTopicData' ); + /* Posting Allowed? */ $this->forum['_user_can_post'] = 1;//( $this->_ppd_ok === TRUE ) ? 1 : 0; @@ -455,6 +481,9 @@ class public_forums_forums_topics extends ipsCommand 'mod_links' => $this->_generateModerationPanel(), 'poll_data' => $poll_data ); + /* Data Hook Location */ + IPSLib::doDataHooks( $displayData, 'topicViewDisplayData' ); + $post_data = $this->_parseAttachments( $post_data ); /* Rules */ @@ -468,9 +497,15 @@ class public_forums_forums_topics extends ipsCommand IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $this->memberdata['member_group_id']; IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $this->memberData['mgroup_others']; - $this->forum['rules_text'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $this->forum['rules_text'] ); + if( ! $this->forum['rules_raw_html'] ) + { + $this->forum['rules_text'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $this->forum['rules_text'] ); + } } + /* Data Hook Location */ + IPSLib::doDataHooks( $this->forum, 'topicViewForumData' ); + //----------------------------------------- // Fix post order if linear+ and ordering // posts DESC (rare, I know): 16221 @@ -498,7 +533,16 @@ class public_forums_forums_topics extends ipsCommand $post_data = $newPosts; } + + /* Data Hook Location */ + IPSLib::doDataHooks( $post_data, 'topicViewPostData' ); + /* Got soft delete pids? */ + if ( is_array( $this->_sdPids ) AND count( $this->_sdPids ) ) + { + $displayData['sdData'] = IPSDeleteLog::fetchEntries( $this->_sdPids, 'post', false ); + } + $template = $this->registry->output->getTemplate('topic')->topicViewTemplate( $this->forum, $this->topic, $post_data, $displayData ); //----------------------------------------- @@ -524,8 +568,8 @@ class public_forums_forums_topics extends ipsCommand /** * Add navigational links */ - $this->registry->output->addToDocumentHead( 'raw', "forum['name_seo'], 'showforum' ) . "' />" ); - $this->registry->output->addToDocumentHead( 'raw', "topic['seo_first_name'], 'showuser' ) . "' />" ); + $this->registry->output->addToDocumentHead( 'raw', "forum['name_seo'], 'showforum' ) . "' />" ); + $this->registry->output->addToDocumentHead( 'raw', "topic['seo_first_name'], 'showuser' ) . "' />" ); /* Add Meta Content */ if ( $this->_firstPostContent ) @@ -533,7 +577,15 @@ class public_forums_forums_topics extends ipsCommand $this->registry->output->addMetaTag( 'keywords', $this->topic['title'] . ' ' . str_replace( "\n", " ", str_replace( "\r", "", strip_tags( $this->_firstPostContent ) ) ), TRUE ); } - $this->registry->output->addMetaTag( 'description', $this->topic['title'] . ': ' . $this->topic['description'], TRUE ); + # Trim to 155 chars based on Dan's recommendation + $this->registry->output->addMetaTag( 'description', str_replace( "\n", " ", str_replace( "\r", "", $this->_firstPostContent ) ), FALSE, 155 ); + + /* Set Ad code for the board index */ + if( $this->registry->getClass('IPSAdCode')->userCanViewAds() ) + { + $this->registry->getClass('IPSAdCode')->setGlobalCode( 'header', 'ad_code_topic_view_header' ); + $this->registry->getClass('IPSAdCode')->setGlobalCode( 'footer', 'ad_code_topic_view_footer' ); + } $this->registry->output->sendOutput(); } @@ -541,10 +593,9 @@ class public_forums_forums_topics extends ipsCommand /** * Builds an array of post data for output * - * @access public * @param array $row Array of post data * @return array - **/ + */ public function parsePostRow( $row = array() ) { //----------------------------------------- @@ -575,8 +626,16 @@ class public_forums_forums_topics extends ipsCommand } else { - $row['name_css'] = 'normalname'; - $poster = $row; + $row['name_css'] = 'normalname'; + $poster = $row; + + //----------------------------------------- + // Unset post data + //----------------------------------------- + + unset( $poster['pid'], $poster['append_edit'], $poster['edit_time'], $poster['use_sig'], $poster['use_emo'], $poster['post_edit_reason'], + $poster['post_date'], $poster['icon_id'], $poster['post'], $poster['queued'], $poster['topic_id'], $poster['post_htmlstate'], + $poster['post_title'], $poster['new_topic'], $poster['edit_name'], $poster['post_key'], $poster['post_parent'] ); if ( isset( $poster['cache_content_sig'] ) ) { @@ -623,15 +682,36 @@ class public_forums_forums_topics extends ipsCommand # Memory Debug IPSDebug::setMemoryDebugFlag( "PID: ".$row['pid'] . " - Member Parsed", $_NOW ); + /* Update permission */ + $this->permissions['softDelete'] = $this->registry->getClass('class_forums')->canSoftDeletePosts( $this->topic['forum_id'], $row ); + + /* Soft delete */ + $row['_softDelete'] = ( $row['pid'] != $this->topic['topic_firstpost'] ) ? $this->permissions['softDelete'] : FALSE; + $row['_softDeleteRestore'] = $this->permissions['softDeleteRestore']; + $row['_softDeleteSee'] = $this->permissions['softDeleteSee']; + $row['_softDeleteReason'] = $this->permissions['softDeleteReason']; + $row['_softDeleteContent'] = $this->permissions['softDeleteContent']; + + $row['_isVisible'] = ( $this->registry->getClass('class_forums')->fetchHiddenType( $row ) == 'visible' ) ? true : false; + $row['_isHidden'] = ( $this->registry->getClass('class_forums')->fetchHiddenType( $row ) == 'hidden' ) ? true : false; + $row['_isDeleted'] = ( $this->registry->getClass('class_forums')->fetchHiddenType( $row ) == 'sdelete' ) ? true : false; + + /* Collect PIDS of soft deleted posts */ + if ( $row['_isDeleted'] AND $row['_softDeleteSee'] ) + { + $this->_sdPids[] = $row['pid']; + } + //----------------------------------------- // Queued //----------------------------------------- - if ( $this->topic['topic_firstpost'] == $row['pid'] and $this->topic['approved'] != 1 ) + if ( $this->topic['topic_firstpost'] == $row['pid'] and ( $row['_isHidden'] OR $this->topic['_isHidden'] ) ) { - $row['queued'] = 1; + $row['queued'] = 1; + $row['_isHidden'] = true; } - + //----------------------------------------- // Edit... //----------------------------------------- @@ -652,7 +732,7 @@ class public_forums_forums_topics extends ipsCommand if ( ! $row['cache_content'] ) { $_NOW2 = IPSDebug::getMemoryDebugFlag(); - + IPSText::getTextClass( 'bbcode' )->parse_smilies = $row['use_emo']; IPSText::getTextClass( 'bbcode' )->parse_html = ( $this->forum['use_html'] and $this->caches['group_cache'][ $row['member_group_id'] ]['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0; IPSText::getTextClass( 'bbcode' )->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0; @@ -692,6 +772,10 @@ class public_forums_forums_topics extends ipsCommand { $this->_firstPostContent = $row['post']; } + else if( $this->request['st'] AND !$this->_firstPostContent ) + { + $this->_firstPostContent = $row['post']; + } //----------------------------------------- // View image... @@ -788,6 +872,11 @@ class public_forums_forums_topics extends ipsCommand $this->post_count++; $row['post_count'] = intval($this->request['st']) + $this->post_count; + + if ( $row['_isDeleted'] ) + { + $this->post_count--; + } } $row['forum_id'] = $this->topic['forum_id']; @@ -804,22 +893,46 @@ class public_forums_forums_topics extends ipsCommand /** * Return last post * - * @access public * @return void - **/ + */ public function returnLastPost() { - $st = 0; - + $st = 0; $mode = $this->topic_view_mode; - $pre = $mode != 'threaded' ? 'st' : 'start'; - + $query = ' AND ' . $this->registry->class_forums->fetchPostHiddenQuery('visible'); + if( $mode == 'threaded' ) { $this->settings['display_max_posts'] = $this->settings['threaded_per_page'] ; $this->request['st'] = $this->request['start'] ; } + else + { + /* Can we deal with hidden posts? */ + if ( $this->registry->class_forums->canQueuePosts( $this->topic['forum_id'] ) ) + { + if ( $this->permissions['softDeleteSee'] ) + { + /* See queued and soft deleted */ + $query = ''; + } + else + { + /* Otherwise, see queued and approved */ + $query = ' AND ' . $this->registry->class_forums->fetchPostHiddenQuery( array( 'visible', 'hidden' ) ); + } + } + else + { + /* We cannot see hidden posts */ + if ( $this->permissions['softDeleteSee'] ) + { + /* See queued and soft deleted */ + $query = ' AND ' . $this->registry->class_forums->fetchPostHiddenQuery( array('approved', 'sdeleted') ); + } + } + } if ($this->topic['posts']) { @@ -841,13 +954,11 @@ class public_forums_forums_topics extends ipsCommand } } - $this->DB->build( array( - 'select' => 'pid', - 'from' => 'posts', - 'where' => "queued=0 AND topic_id=".$this->topic['tid'], - 'order' => $this->settings['post_order_column'].' DESC', - 'limit' => array( 0,1 ) - ) ); + $this->DB->build( array( 'select' => 'pid', + 'from' => 'posts', + 'where' => "topic_id=".$this->topic['tid'] . $query, + 'order' => $this->settings['post_order_column'].' DESC', + 'limit' => array( 0,1 ) ) ); $this->DB->execute(); @@ -859,12 +970,20 @@ class public_forums_forums_topics extends ipsCommand /** * Parse attachments * - * @access public * @param array Array of post data * @return string HTML parsed by attachment class */ public function _parseAttachments( $postData ) { + //----------------------------------------- + // No attachments? Then what are you doing here? + //----------------------------------------- + + if ( !$this->topic['topic_hasattach'] ) + { + return $postData; + } + //----------------------------------------- // INIT. Yes it is //----------------------------------------- @@ -884,37 +1003,34 @@ class public_forums_forums_topics extends ipsCommand // ATTACHMENTS!!! //----------------------------------------- - if ( $this->topic['topic_hasattach'] ) + if ( ! is_object( $this->class_attach ) ) { - if ( ! is_object( $this->class_attach ) ) - { - //----------------------------------------- - // Grab render attach class - //----------------------------------------- - - require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' ); - $this->class_attach = new class_attach( $this->registry ); - } - //----------------------------------------- - // Not got permission to view downloads? + // Grab render attach class //----------------------------------------- - if ( $this->registry->permissions->check( 'download', $this->registry->class_forums->forum_by_id[ $this->topic['forum_id'] ] ) === FALSE ) - { - $this->settings['show_img_upload'] = 0 ; - } - - //----------------------------------------- - // Continue... - //----------------------------------------- - - $this->class_attach->type = 'post'; - $this->class_attach->init(); - - # attach_pids is generated in the func_topic_xxxxx files - $attachHTML = $this->class_attach->renderAttachments( $postHTML, $this->attach_pids ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $this->class_attach = new $classToLoad( $this->registry ); } + + //----------------------------------------- + // Not got permission to view downloads? + //----------------------------------------- + + if ( $this->registry->permissions->check( 'download', $this->registry->class_forums->forum_by_id[ $this->topic['forum_id'] ] ) === FALSE ) + { + $this->settings['show_img_upload'] = 0 ; + } + + //----------------------------------------- + // Continue... + //----------------------------------------- + + $this->class_attach->type = 'post'; + $this->class_attach->init(); + + # attach_pids is generated in the func_topic_xxxxx files + $attachHTML = $this->class_attach->renderAttachments( $postHTML, $this->attach_pids ); /* Now parse back in the rendered posts */ if( is_array($attachHTML) AND count($attachHTML) ) @@ -938,9 +1054,8 @@ class public_forums_forums_topics extends ipsCommand /** * Generate the Poll output * - * @access public * @return string - **/ + */ public function _generatePollOutput() { $showResults = 0; @@ -950,7 +1065,7 @@ class public_forums_forums_topics extends ipsCommand // Get the poll information... //----------------------------------------- - $this->DB->build( array( 'select' => '*', 'from' => 'polls', 'where' => 'tid=' . $this->topic['tid'] ) ); + $this->DB->build( array( 'select' => '*', 'from' => 'polls', 'where' => 'tid=' . $this->topic['tid'] ) ); $this->DB->execute(); $poll = $this->DB->fetch(); @@ -980,6 +1095,7 @@ class public_forums_forums_topics extends ipsCommand if( $poll['poll_only'] == 1 ) { $this->poll_only = true; + $this->topic['_poll_only'] = true; } //----------------------------------------- @@ -1097,7 +1213,11 @@ class public_forums_forums_topics extends ipsCommand if( !is_array($poll_answers) OR !count($poll_answers) ) { - return ''; + $poll_answers = unserialize( preg_replace( '!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", stripslashes( $poll['choices'] ) ) ); + } + if( !is_array($poll_answers) OR !count($poll_answers) ) + { + $poll_answers = ''; } reset($poll_answers); @@ -1177,8 +1297,10 @@ class public_forums_forums_topics extends ipsCommand } } } + + $_editPoll = $this->_getEditButtonData( array( 'member_id' => $this->topic['starter_id'], 'post_date' => $this->topic['start_date'] ) ); - $html = $this->registry->output->getTemplate('topic')->pollDisplay( $poll, $this->topic, $this->forum, $pollData, $showResults ); + $html = $this->registry->output->getTemplate('topic')->pollDisplay( $poll, $this->topic, $this->forum, $pollData, $showResults, $_editPoll ); $this->settings['max_images'] = $tmp_max_images; @@ -1188,9 +1310,8 @@ class public_forums_forums_topics extends ipsCommand /** * Generate the topic mode. * - * @access private * @return string - **/ + */ private function _generateTopicViewMode() { $return = ''; @@ -1223,9 +1344,8 @@ class public_forums_forums_topics extends ipsCommand /** * Updates the topic * - * @access private * @return void - **/ + */ private function _doUpdateTopicCheck() { $mode = $this->topic_view_mode; @@ -1280,9 +1400,8 @@ class public_forums_forums_topics extends ipsCommand /** * Tests to see if we're viewing a post, etc * - * @access private * @return void - **/ + */ private function _doViewCheck() { $mode = $this->topic_view_mode; @@ -1313,7 +1432,7 @@ class public_forums_forums_topics extends ipsCommand } else { - $this->registry->output->showError( 'topics_none_newer', 10356 ); + $this->registry->output->showError( 'topics_none_newer', 10356, null, null, 404 ); } } else if ($this->request['view'] == 'old') @@ -1340,7 +1459,7 @@ class public_forums_forums_topics extends ipsCommand } else { - $this->registry->output->showError( 'topics_none_older', 10357 ); + $this->registry->output->showError( 'topics_none_older', 10357, null, null, 404 ); } } else if ($this->request['view'] == 'getlastpost') @@ -1361,11 +1480,36 @@ class public_forums_forums_topics extends ipsCommand $pid = ""; $markers = $this->memberData['members_markers']; $last_time = $this->registry->classItemMarking->fetchTimeLastMarked( array( 'forumID' => $this->forum['id'], 'itemID' => $this->topic['tid'] ) ); + $query = ' AND ' . $this->registry->class_forums->fetchPostHiddenQuery('visible'); + /* Can we deal with hidden posts? */ + if ( $this->registry->class_forums->canQueuePosts( $this->topic['forum_id'] ) ) + { + if ( $this->permissions['softDeleteSee'] ) + { + /* See queued and soft deleted */ + $query = ''; + } + else + { + /* Otherwise, see queued and approved */ + $query = ' AND ' . $this->registry->class_forums->fetchPostHiddenQuery( array( 'visible', 'hidden' ) ); + } + } + else + { + /* We cannot see hidden posts */ + if ( $this->permissions['softDeleteSee'] ) + { + /* See queued and soft deleted */ + $query = ' AND ' . $this->registry->class_forums->fetchPostHiddenQuery( array('approved', 'sdeleted') ); + } + } + $this->DB->build( array( 'select' => 'MIN(pid) as pid', 'from' => 'posts', - 'where' => "queued=0 AND topic_id={$this->topic['tid']} AND post_date > " . intval( $last_time ), + 'where' => "topic_id={$this->topic['tid']} AND post_date > " . intval( $last_time ) . $query, 'limit' => array( 0,1 ) ) ); $this->DB->execute(); @@ -1471,9 +1615,8 @@ class public_forums_forums_topics extends ipsCommand /** * Return whether we can see the IP address or not * - * @access public * @return bool - **/ + */ public function _getIPAddressData() { if ( $this->memberData['g_is_supmod'] != 1 && ( !isset($this->moderator['view_ip']) OR $this->moderator['view_ip'] != 1 ) ) @@ -1489,9 +1632,8 @@ class public_forums_forums_topics extends ipsCommand /** * Return whether or not we have permission to delete the post * - * @access public * @return bool - **/ + */ public function _getDeleteButtonData( $poster ) { if ( ! $this->memberData['member_id'] ) @@ -1515,10 +1657,9 @@ class public_forums_forums_topics extends ipsCommand /** * Return whether or not we can edit this post * - * @access public * @param array Array of post data * @return bool - **/ + */ public function _getEditButtonData( $poster=array() ) { if ( $this->memberData['member_id'] == "" or $this->memberData['member_id'] == 0 ) @@ -1562,9 +1703,8 @@ class public_forums_forums_topics extends ipsCommand /** * Get reply button data * - * @access public * @return array - **/ + */ public function _getReplyButtonData() { //----------------------------------------- @@ -1593,6 +1733,10 @@ class public_forums_forums_topics extends ipsCommand { $image = "moved"; } + else if ( $this->topic['_isDeleted'] ) + { + $image = 'no_reply'; + } else { //if ( $this->_ppd_ok !== TRUE ) @@ -1610,7 +1754,7 @@ class public_forums_forums_topics extends ipsCommand } else { - if ( $this->memberData['member_id'] AND ( ( ( $this->memberData['member_id'] == $this->topic['starter_id'] ) AND ! $this->memberData['g_reply_own_topics'] ) OR ( ! $this->memberData['g_reply_other_topics'] ) ) ) + if ( $this->memberData['member_id'] AND ( ( ( $this->memberData['member_id'] == $this->topic['starter_id'] ) AND ! $this->memberData['g_reply_own_topics'] ) OR ( ( $this->memberData['member_id'] != $this->topic['starter_id'] ) AND ! $this->memberData['g_reply_other_topics'] ) ) ) { $image = "no_reply"; } @@ -1633,9 +1777,8 @@ class public_forums_forums_topics extends ipsCommand /** * Get multimoderation data * - * @access public * @return array - **/ + */ public function _getMultiModerationData() { $return_array = array(); @@ -1659,10 +1802,9 @@ class public_forums_forums_topics extends ipsCommand /** * Get fast reply status * - * @access public * @return string * @deprecated Fast reply is always open now, but this does still check perms before showing it - **/ + */ public function _getFastReplyData() { $show = 'unavailable'; @@ -1688,7 +1830,10 @@ class public_forums_forums_topics extends ipsCommand if ( $this->_ppd_ok === TRUE ) { /* status from PPD */ - $this->topic['_fastReplyStatusMessage'][] = $this->registry->getClass('class_forums')->ppdStatusMessage; + if ( $this->registry->getClass('class_forums')->ppdStatusMessage ) + { + $this->topic['_fastReplyStatusMessage'][] = $this->registry->getClass('class_forums')->ppdStatusMessage; + } /* status from mod posts */ $this->topic['_fastReplyStatusMessage'][] = $this->registry->getClass('class_forums')->fetchPostModerationStatusMessage( $this->memberData, $this->forum, $this->topic, 'reply' ); @@ -1700,9 +1845,8 @@ class public_forums_forums_topics extends ipsCommand /** * Return active user data * - * @access public * @return array - **/ + */ public function _getActiveUserData() { //----------------------------------------- @@ -1734,7 +1878,7 @@ class public_forums_forums_topics extends ipsCommand $cut_off = ($this->settings['au_cutoff'] != "") ? $this->settings['au_cutoff'] * 60 : 900; $this->DB->build( array( - 'select' => 's.member_id, s.member_name, s.member_group, s.id, s.login_type, s.location, s.running_time, s.uagent_type, s.current_module, s.seo_name', + 'select' => 's.member_id, s.member_name, s.member_group, s.id, s.login_type, s.running_time, s.uagent_type, s.current_module, s.seo_name', 'from' => 'sessions s', 'where' => "s.location_1_type='topic' AND s.location_1_id={$this->topic['tid']} AND s.running_time > " . ( time() - $cut_off ) . " AND s.in_error=0", ) ); @@ -1759,7 +1903,7 @@ class public_forums_forums_topics extends ipsCommand { $result['member_name'] = IPSLib::makeNameFormatted( $result['member_name'], $result['member_group'] ); - $last_date = $this->registry->class_localization->getTime( $result['running_time'] ); + $last_date = $this->registry->class_localization->getDate( $result['running_time'], 'TINY' ); if ( $result['member_id'] == 0 OR ! $result['member_name'] ) { @@ -1829,7 +1973,7 @@ class public_forums_forums_topics extends ipsCommand $p_title = sprintf( $this->lang->words['au_posting'], $last_date ); } - if ( ! $this->settings['disable_anonymous'] AND $result['login_type'] ) + if ( $result['login_type'] ) { if ( $this->memberData['g_access_cp'] and ($this->settings['disable_admin_anon'] != 1) ) { @@ -1862,9 +2006,8 @@ class public_forums_forums_topics extends ipsCommand * Generate the moderation panel * $skcusgej, still. After all this time * - * @access public * @return array - **/ + */ public function _generateModerationPanel() { //----------------------------------------- @@ -1974,7 +2117,7 @@ class public_forums_forums_topics extends ipsCommand } } - if ($this->memberData['g_is_supmod'] == 1) + if ($this->memberData['g_access_cp'] == 1) { $mod_links[] = $this->_addModLink('topic_history'); } @@ -1985,10 +2128,9 @@ class public_forums_forums_topics extends ipsCommand /** * Append mod links * - * @access public * @param string $key * @return array Options - **/ + */ public function _addModLink( $key="" ) { if ($key == "") return ""; @@ -2006,9 +2148,8 @@ class public_forums_forums_topics extends ipsCommand /** * Get Linear Topic Data * - * @access public * @return array - **/ + */ public function _getTopicDataLinear() { //----------------------------------------- @@ -2037,18 +2178,45 @@ class public_forums_forums_topics extends ipsCommand //----------------------------------------- // Moderator? //----------------------------------------- + + /* Default - just see all visible posts */ + $queued_query_bit = ' AND ' . $this->registry->class_forums->fetchPostHiddenQuery('visible'); - $queued_query_bit = ' and queued=0'; - + /* Can we deal with hidden posts? */ if ( $this->registry->class_forums->canQueuePosts($this->topic['forum_id']) ) { - $queued_query_bit = '';// and queued=0'; - + if ( $this->permissions['softDeleteSee'] ) + { + /* See queued and soft deleted */ + $queued_query_bit = ''; + } + else + { + /* Otherwise, see queued and approved */ + $queued_query_bit = ' AND ' . $this->registry->class_forums->fetchPostHiddenQuery( array( 'visible', 'hidden' ) ); + } + + /* Specifically requesting to see queued posts only */ if ( $this->request['modfilter'] AND $this->request['modfilter'] == 'invisible_posts' ) { - $queued_query_bit = ' and queued=1'; + $queued_query_bit = ' AND ' . $this->registry->class_forums->fetchPostHiddenQuery('hidden'); } } + else + { + /* We cannot see hidden posts */ + if ( $this->permissions['softDeleteSee'] ) + { + /* See queued and soft deleted */ + $queued_query_bit = ' AND ' . $this->registry->class_forums->fetchPostHiddenQuery( array('approved', 'sdeleted') ); + } + } + + /* Did we specifically want to see soft deleted posts? */ + if ( $this->request['modfilter'] == 'deleted_posts' AND $this->permissions['softDeleteSee'] ) + { + $queued_query_bit = ' AND ' . $this->registry->class_forums->fetchPostHiddenQuery('sdeleted'); + } //----------------------------------------- // Using "new" mode? @@ -2158,13 +2326,19 @@ class public_forums_forums_topics extends ipsCommand $this->pids = array( 0 => 0 ); } + /* Data Hook Location */ + $dataHook = array( 'members' => array(), 'postJoins' => array() ); + IPSLib::doDataHooks( $dataHook , 'topicViewQuery' ); + //----------------------------------------- // Joins //----------------------------------------- + $_extraMember = ( is_array($dataHook['members']) && count($dataHook['members']) ) ? ',m.'.implode(',m.', $dataHook['members']) : ''; + $_post_joins = array( array( - 'select' => 'm.member_id as mid,m.name,m.member_group_id,m.email,m.joined,m.posts, m.last_visit, m.last_activity,m.login_anonymous,m.title,m.hide_email, m.warn_level, m.warn_lastwarn, m.members_display_name, m.members_seo_name, m.has_gallery, m.has_blog, m.members_bitoptions', + 'select' => 'm.member_id as mid,m.name,m.member_group_id,m.email,m.joined,m.posts, m.last_visit, m.last_activity,m.login_anonymous,m.title,m.hide_email, m.warn_level, m.warn_lastwarn, m.members_display_name, m.members_seo_name, m.has_gallery, m.has_blog, m.members_bitoptions,m.mgroup_others'.$_extraMember, 'from' => array( 'members' => 'm' ), 'where' => 'm.member_id=p.author_id', 'type' => 'left' @@ -2174,15 +2348,15 @@ class public_forums_forums_topics extends ipsCommand 'from' => array( 'profile_portal' => 'pp' ), 'where' => 'm.member_id=pp.pp_member_id', 'type' => 'left' - ), - array( - 'select' => 'g.g_access_cp', - 'from' => array( 'groups' => 'g' ), - 'where' => 'g.g_id=m.member_group_id', - 'type' => 'left' ) ); - + + /* Add data hook joins */ + if ( is_array($dataHook['postJoins']) && count($dataHook['postJoins']) ) + { + $_post_joins = array_merge( $_post_joins, $dataHook['postJoins'] ); + } + /* Add custom fields join? */ if( $this->settings['custom_profile_topic'] == 1 ) { @@ -2257,7 +2431,7 @@ class public_forums_forums_topics extends ipsCommand $this->DB->build( array( 'select' => 'COUNT(*) as pcount', 'from' => 'posts', - 'where' => "topic_id=".$this->topic['tid']." and queued !=1" + 'where' => "topic_id=".$this->topic['tid']." and queued=0" ) ); $newq = $this->DB->execute(); @@ -2289,12 +2463,14 @@ class public_forums_forums_topics extends ipsCommand //----------------------------------------- // Format and print out the topic list //----------------------------------------- - + + $adCodeSet = false; $post_data = array(); while ( $row = $this->DB->fetch( $oq ) ) { $row['member_id'] = $row['mid']; + $row['g_access_cp'] = $this->caches['group_cache'][ $row['member_group_id'] ]['g_access_cp']; $return = $this->parsePostRow( $row ); @@ -2356,8 +2532,19 @@ class public_forums_forums_topics extends ipsCommand { $post_data[ $row['pid'] ]['post']['_end_first_post'] = 1; } + + $post_data[ $row['pid'] ]['post']['rep_points'] = $post_data[ $row['pid'] ]['post']['rep_points'] ? $post_data[ $row['pid'] ]['post']['rep_points'] : 0; + + /* AD Code */ + if( $this->registry->getClass('IPSAdCode')->userCanViewAds() && ! $adCodeSet ) + { + if( $this->registry->getClass('IPSAdCode')->getAdCode('ad_code_topic_view_code') ) + { + $post_data[ $row['pid'] ]['post']['_adCode'] = $this->registry->getClass('IPSAdCode')->getAdCode('ad_code_topic_view_code'); + $adCodeSet = true; + } + } - $post_data[ $row['pid'] ]['post']['rep_points'] = $post_data[ $row['pid'] ]['post']['rep_points'] ? $post_data[ $row['pid'] ]['post']['rep_points'] : 0; } //----------------------------------------- @@ -2370,9 +2557,8 @@ class public_forums_forums_topics extends ipsCommand /** * Topic set up ya'll * - * @access public * @return void - **/ + */ public function topicSetUp() { //----------------------------------------- @@ -2431,11 +2617,11 @@ class public_forums_forums_topics extends ipsCommand if ( ( ! $this->memberData['g_other_topics'] ) AND ( $this->topic['starter_id'] != $this->memberData['member_id'] ) ) { - $this->registry->output->showError( 'topics_not_yours', 10359 ); + $this->registry->output->showError( 'topics_not_yours', 10359, null, null, 403 ); } else if( (!$this->forum['can_view_others'] AND !$this->memberData['is_mod'] ) AND ( $this->topic['starter_id'] != $this->memberData['member_id'] ) ) { - $this->registry->output->showError( 'topics_not_yours2', 10360 ); + $this->registry->output->showError( 'topics_not_yours2', 10360, null, null, 403 ); } //----------------------------------------- @@ -2567,8 +2753,10 @@ class public_forums_forums_topics extends ipsCommand if ( $this->topic['state'] == 'link' ) { - $f_stuff = explode("&", $this->topic['moved_to']); - $this->registry->output->redirectScreen( $this->lang->words['topic_moved'], $this->settings['base_url'] . "showtopic={$f_stuff[0]}" ); + $f_stuff = explode("&", $this->topic['moved_to']); + $_topic = $this->DB->buildAndFetch( array( 'select' => 'title_seo', 'from' => 'topics', 'where' => 'tid=' . $f_stuff[0] ) ); + + $this->registry->output->redirectScreen( $this->lang->words['topic_moved'], $this->settings['base_url'] . "showtopic={$f_stuff[0]}", $_topic['title_seo'], 'showtopic' ); } //----------------------------------------- @@ -2584,11 +2772,12 @@ class public_forums_forums_topics extends ipsCommand if ( ($this->memberData['member_id']) and ($this->memberData['g_is_supmod'] != 1) ) { - $other_mgroups = array(); + $other_mgroups = array(); + $_mgroup_others = IPSText::cleanPermString( $this->memberData['mgroup_others'] ); - if( $this->memberData['mgroup_others'] ) + if( $_mgroup_others ) { - $other_mgroups = explode( ",", IPSText::cleanPermString( $this->memberData['mgroup_others'] ) ); + $other_mgroups = explode( ",", $_mgroup_others ); } $other_mgroups[] = $this->memberData['member_group_id']; @@ -2624,10 +2813,20 @@ class public_forums_forums_topics extends ipsCommand } } + if ( $this->permissions['softDeleteSee'] AND $this->topic['topic_deleted_posts'] ) + { + $this->topic['posts'] += intval( $this->topic['topic_deleted_posts'] ); + } + //----------------------------------------- // Generate the forum page span links //----------------------------------------- - + + if( $this->request['modfilter'] ) + { + $hl .= "&modfilter=" . $this->request['modfilter']; + } + $this->topic['SHOW_PAGES'] = $this->registry->output->generatePagination( array( 'totalItems' => ($this->topic['posts']+1), @@ -2637,10 +2836,10 @@ class public_forums_forums_topics extends ipsCommand 'seoTemplate' => 'showtopic', 'baseUrl' => "showtopic=".$this->topic['tid'].$hl ) ); - if ( ($this->topic['posts'] + 1) > $this->settings['display_max_posts']) - { + //if ( ($this->topic['posts'] + 1) > $this->settings['display_max_posts']) + //{ // $this->topic['go_new'] = $this->registry->output->getTemplate('topic')->golastpost_link($this->forum['id'], $this->topic['tid'] ); - } + //} //----------------------------------------- diff --git a/upload/admin/applications/forums/modules_public/forums/tracker.php b/upload/admin/applications/forums/modules_public/forums/tracker.php index 21a1fa9d..d62391f4 100644 --- a/upload/admin/applications/forums/modules_public/forums/tracker.php +++ b/upload/admin/applications/forums/modules_public/forums/tracker.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Subscribe to a topic or forum - * Last Updated: $Date: 2009-03-04 07:36:56 -0500 (Wed, 04 Mar 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * - * @author $Author: matt $ + * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 20th February 2002 - * @version $Revision: 4135 $ + * @version $Revision: 5713 $ * */ @@ -69,7 +71,7 @@ class public_forums_forums_tracker extends ipsCommand { if( !$this->request['t'] ) { - $this->registry->output->showError( 'tracker_no_tid', 10361 ); + $this->registry->output->showError( 'tracker_no_tid', 10361, null, null, 404 ); } ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_emails' ), 'core' ); @@ -108,8 +110,8 @@ class public_forums_forums_tracker extends ipsCommand } - $this->request[ 't'] = intval($this->request['t'] ); - $this->request[ 'f'] = intval($this->request['f'] ); + $this->request['t'] = intval($this->request['t']); + $this->request['f'] = intval($this->request['f']); //----------------------------------------- // Error out if we can not find the forum @@ -119,7 +121,7 @@ class public_forums_forums_tracker extends ipsCommand { if ( $is_sub == false ) { - $this->registry->output->showError( 'tracker_no_fid', 10362 ); + $this->registry->output->showError( 'tracker_no_fid', 10362, null, null, 404 ); } else { @@ -141,7 +143,7 @@ class public_forums_forums_tracker extends ipsCommand if( !is_array($this->topic) OR !count($this->topic) ) { - $this->registry->output->showError( 'tracker_no_tid', 10363 ); + $this->registry->output->showError( 'tracker_no_tid', 10363, null, null, 404 ); } $this->forum = ipsRegistry::getClass('class_forums')->forum_by_id[ $this->request['f'] ]; @@ -157,7 +159,7 @@ class public_forums_forums_tracker extends ipsCommand { if ( $is_sub == false ) { - $this->registry->output->showError( 'tracker_no_fid', 10364 ); + $this->registry->output->showError( 'tracker_no_fid', 10364, null, null, 404 ); } else { @@ -175,7 +177,7 @@ class public_forums_forums_tracker extends ipsCommand { if ( $is_sub == false ) { - $this->registry->output->showError( 'tracker_only_members', 10365 ); + $this->registry->output->showError( 'tracker_only_members', 10365, null, null, 403 ); } else { diff --git a/upload/admin/applications/forums/modules_public/index.html b/upload/admin/applications/forums/modules_public/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_public/index.html +++ b/upload/admin/applications/forums/modules_public/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_public/moderate/index.html b/upload/admin/applications/forums/modules_public/moderate/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_public/moderate/index.html +++ b/upload/admin/applications/forums/modules_public/moderate/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_public/moderate/moderate.php b/upload/admin/applications/forums/modules_public/moderate/moderate.php index d944ea81..ebd808a8 100644 --- a/upload/admin/applications/forums/modules_public/moderate/moderate.php +++ b/upload/admin/applications/forums/modules_public/moderate/moderate.php @@ -1,19 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Moderator actions - * Last Updated: $Date: 2009-12-04 21:38:22 -0500 (Fri, 04 Dec 2009) $ + * Last Updated: $Date: 2010-11-16 11:26:43 -0500 (Tue, 16 Nov 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: mmecham $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Revision: 5521 $ - * + * @link http://www.invisionpower.com + * @version $Revision: 7195 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -27,7 +27,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Temporary stored output HTML * - * @access public * @var string */ public $output; @@ -35,7 +34,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Moderator function library * - * @access public * @var object */ public $modLibrary; @@ -43,7 +41,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Moderator information * - * @access protected * @var array Array of moderator details */ protected $moderator = array(); @@ -51,7 +48,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Forum information * - * @access protected * @var array Array of forum details */ protected $forum = array(); @@ -59,7 +55,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Topic information * - * @access protected * @var array Array of topic details */ protected $topic = array(); @@ -67,7 +62,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Trash can forum ID * - * @access protected * @var integer Forum id */ protected $trash_forum = 0; @@ -75,7 +69,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Trash can in use flag * - * @access protected * @var boolean Trash can in use */ protected $trash_inuse = false; @@ -83,7 +76,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Topic ids stored * - * @access protected * @var array Topic ids for multimoderation */ protected $tids = array(); @@ -91,15 +83,16 @@ class public_forums_moderate_moderate extends ipsCommand /** * Post ids stored * - * @access protected * @var array Post ids for multimoderation */ protected $pids = array(); + protected $fromSearch = false; + protected $returnUrl = false; + /** * Class entry point * - * @access public * @param object Registry reference * @return void [Outputs to screen/redirects] */ @@ -110,7 +103,14 @@ class public_forums_moderate_moderate extends ipsCommand //----------------------------------------- ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_mod' ) ); - + + /* If we're here auth_key was fine, so did we come from search? */ + if ( $this->memberData['member_id'] AND $this->memberData['g_is_supmod'] AND $this->request['fromSearch'] AND $this->request['returnUrl'] ) + { + $this->fromSearch = true; + $this->returnUrl = base64_decode( $this->request['returnUrl'] ); + } + //----------------------------------------- // Check the input //----------------------------------------- @@ -121,8 +121,8 @@ class public_forums_moderate_moderate extends ipsCommand // Load moderator functions //----------------------------------------- - require( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php'); - $this->modLibrary = new moderatorLibrary( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php', 'moderatorLibrary', 'forums' ); + $this->modLibrary = new $classToLoad( $this->registry ); $this->modLibrary->init( $this->forum ); //----------------------------------------- @@ -171,6 +171,13 @@ class public_forums_moderate_moderate extends ipsCommand case '16': $this->_topicPinAlter( 'unpin' ); break; + case 'sdelete': + $this->_softDeleteTopicToggle(true); + break; + case 'sundelete': + $this->_softDeleteTopicToggle(false); + break; + //----------------------------------------- // Unsubscribe //----------------------------------------- @@ -248,6 +255,20 @@ class public_forums_moderate_moderate extends ipsCommand $this->_setAsSpammer(); break; + /* New options for 3.1 */ + case 'p_approve': + $this->_postsManage('approve_unapproved'); + break; + case 'p_delete_approve': + $this->_postsManage('delete_unapproved'); + break; + case 'p_restore': + $this->_postsManage('restore_deleted'); + break; + case 'p_delete_softed': + $this->_postsManage('delete_deleted'); + break; + default: $this->_showError(); break; @@ -259,10 +280,150 @@ class public_forums_moderate_moderate extends ipsCommand $this->registry->getClass('output')->sendOutput(); } + /** + * A simple wrapper function for multimethods + * + * NO PERMISSION CHECKS WILL BE PERFORMED IN THIS FUNCTION + * AS CHECKS ARE PERFORMED IN ACTUAL FUNCTIONS + * + * @param string Type of action + */ + protected function _postsManage( $what ) + { + $where = ''; + $posts = array(); + + if ( $this->topic['tid'] ) + { + switch ( $what ) + { + case 'approve_unapproved': + case 'delete_unapproved': + $where = $this->registry->class_forums->fetchPostHiddenQuery( 'hidden' ); + break; + case 'restore_deleted': + case 'delete_deleted': + $where = $this->registry->class_forums->fetchPostHiddenQuery( 'sdeleted' ); + break; + } + + /* Get posts */ + $this->DB->build( array( 'select' => '*', + 'from' => 'posts', + 'where' => 'topic_id=' . $this->topic['tid'] . ' AND ' . $where ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $this->pids[ $row['pid'] ] = $row['pid']; + } + + $this->request['selectedpids'] = implode( ",", $this->pids ); + + /* now... */ + if ( count( $this->pids ) ) + { + switch ( $what ) + { + case 'approve_unapproved': + $this->_multiApprovePost(1); + break; + case 'delete_unapproved': + $this->_multiDeletePost(); + break; + case 'restore_deleted': + $this->_multiSoftDeletePost(0, '' ); + break; + case 'delete_deleted': + $this->_multiDeletePost(); + break; + } + + /* Done */ + $this->registry->output->redirectScreen( $this->lang->words['cp_redirect_posts'], $this->settings['base_url'] . "showtopic=" . $this->topic['tid'] . '&st=' . intval($this->request['st']) ); + } + } + + /* Still here? */ + $this->_showError( 'mod_no_tid', 103118.1 ); + } + + /** + * A simple wrapper function for multimethods + * + * NO PERMISSION CHECKS WILL BE PERFORMED IN THIS FUNCTION + * AS CHECKS ARE PERFORMED IN ACTUAL FUNCTIONS + * + * @param string Type of action + */ + protected function _topicsManage( $what ) + { + $where = ''; + $posts = array(); + + if ( $this->forum['id'] ) + { + switch ( $what ) + { + case 'approve_unapproved': + case 'delete_unapproved': + $where = $this->registry->class_forums->fetchTopicHiddenQuery( 'hidden' ); + break; + case 'restore_deleted': + case 'delete_deleted': + $where = $this->registry->class_forums->fetchTopicHiddenQuery( 'sdeleted' ); + break; + } + + /* Get posts */ + $this->DB->build( array( 'select' => '*', + 'from' => 'topics', + 'where' => 'forum_id=' . $this->forum['id'] . ' AND ' . $where ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $this->tids[ $row['tid'] ] = $row['tid']; + } + + $this->request['selectedtids'] = implode( ",", $this->tids ); + + /* now... */ + if ( count( $this->tids ) ) + { + switch ( $what ) + { + case 'approve_unapproved': + $this->_multiAlterTopics('topic_q', "approved=1"); + break; + case 'delete_unapproved': + $this->_multiAlterTopics('delete_topic'); + break; + case 'restore_deleted': + $this->_multiSoftDeleteTopics(0, '' ); + break; + case 'delete_deleted': + $this->_multiAlterTopics('delete_topic'); + break; + } + + /* Done */ + $url = "showforum=" . $this->forum['id']; + $url = ( $this->request['st'] ) ? "showforum=" . $this->forum['id'] . '&st=' . $this->request['st'] : $url; + + $this->registry->output->redirectScreen( $this->lang->words['cp_redirect_topics'], $this->settings['base_url'] . $url, $this->forum['name_seo'] ); + } + } + + /* Still here? */ + $this->_showError( 'mod_no_tid', 103118.1 ); + } + /** * Flag a user account as a spammer * - * @access protected * @return void Outputs error screen */ protected function _setAsSpammer() @@ -276,7 +437,7 @@ class public_forums_moderate_moderate extends ipsCommand if ( ! $member['member_id'] ) { - $this->_showError( 'moderate_no_permission', 10311900 ); + $this->_showError( 'moderate_no_permission', 10311900, 403 ); } /* Check permissions */ @@ -285,7 +446,7 @@ class public_forums_moderate_moderate extends ipsCommand /* Protected group? */ if ( strstr( ','.$this->settings['warn_protected'].',', ','.$member['member_group_id'].',' ) ) { - $this->_showError( 'moderate_no_permission', 10311901 ); + $this->_showError( 'moderate_no_permission', 10311901, 403 ); } /* What do to.. */ @@ -315,9 +476,7 @@ class public_forums_moderate_moderate extends ipsCommand ), 'extendedProfile' => array( 'signature' => '', - 'pp_bio_content' => '', 'pp_about_me' => '', - 'pp_status' => '', ) ); @@ -356,8 +515,8 @@ class public_forums_moderate_moderate extends ipsCommand // Profile fields //----------------------------------------- - require_once( IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php' ); - $fields = new customProfileFields(); + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php', 'customProfileFields' ); + $fields = new $classToLoad(); $fields->member_data = $member; $fields->initData( 'edit' ); @@ -397,10 +556,6 @@ class public_forums_moderate_moderate extends ipsCommand IPSMember::save( $member_id, $toSave ); /* Send Spammer to Spam Service */ - if( $this->settings['spam_service_send_to_ips'] && $this->settings['spam_service_api_key'] ) - { - IPSMember::querySpamService( $member['email'], $member['ip_address'], 'markspam' ); - } /* Run member sync */ IPSLib::runMemberSync( 'onSetAsSpammer', $member ); @@ -423,7 +578,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Save the member updates * - * @access protected * @return void Outputs error screen * @todo [Future] Determine what items should be editable and allow moderators to edit them */ @@ -457,7 +611,7 @@ class public_forums_moderate_moderate extends ipsCommand $aboutme = IPSText::getTextClass('bbcode')->preDbParse( $aboutme ); /* Add sig to the save array */ - $save['extendedProfile'] = array( 'signature' => $signature, 'pp_status' => trim($this->request['status']), 'pp_about_me' => $aboutme ); + $save['extendedProfile'] = array( 'signature' => $signature, 'pp_about_me' => $aboutme ); $save['members'] = array( 'title' => $this->request['title'] ); if ( $this->request['avatar'] == 1 ) @@ -493,8 +647,8 @@ class public_forums_moderate_moderate extends ipsCommand // Profile fields //----------------------------------------- - require_once( IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php' ); - $fields = new customProfileFields(); + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php', 'customProfileFields' ); + $fields = new $classToLoad(); $fields->member_data = $member; $fields->initData( 'edit' ); @@ -529,7 +683,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Form to edit a member * - * @access protected * @return void Outputs error screen * @todo [Future] Determine what items should be editable and allow moderators to edit them * @todo [Future] Show avatar and profile picture previews? @@ -559,14 +712,13 @@ class public_forums_moderate_moderate extends ipsCommand $editable['member_id'] = $member['member_id']; $editable['members_display_name'] = $member['members_display_name']; $editable['title'] = $member['title']; - $editable['pp_status'] = $member['pp_status']; //----------------------------------------- // Profile fields //----------------------------------------- - require_once( IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php' ); - $fields = new customProfileFields(); + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php', 'customProfileFields' ); + $fields = new $classToLoad(); $fields->member_data = $member; $fields->initData( 'edit' ); @@ -581,7 +733,7 @@ class public_forums_moderate_moderate extends ipsCommand $this->output .= $this->registry->getClass('output')->getTemplate('mod')->editUserForm( $editable, $fields ); - $this->registry->getClass('output')->setTitle( $this->lang->words['cp_em_title'] ); + $this->registry->getClass('output')->setTitle( $this->lang->words['cp_em_title'] . ' - ' . ipsRegistry::$settings['board_name'] ); $this->registry->getClass('output')->addNavigation( $this->lang->words['cp_vp_title'], "showuser={$member['member_id']}", $member['members_seo_name'], 'showuser' ); $this->registry->getClass('output')->addNavigation( $this->lang->words['cp_em_title'], '' ); } @@ -589,7 +741,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Edit member: check permissions and return member * - * @access protected * @return array Member information */ protected function _checkAndGetMember() @@ -611,7 +762,7 @@ class public_forums_moderate_moderate extends ipsCommand if ( ! $this->memberData['g_is_supmod'] ) { - $this->_showError( 'mod_only_supermods', 10370 ); + $this->_showError( 'mod_only_supermods', 10370, 403 ); } //----------------------------------------- @@ -642,7 +793,7 @@ class public_forums_moderate_moderate extends ipsCommand if ( ! $this->memberData['g_access_cp'] AND $member['g_access_cp'] ) { - $this->_showError( 'mod_admin_edit', 3032 ); + $this->_showError( 'mod_admin_edit', 3032, 403 ); } return $member; @@ -651,7 +802,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Alter approve/unapprove state of topic * - * @access protected * @param string [approve|unapprove] * @return void [Outputs to screen] */ @@ -700,10 +850,6 @@ class public_forums_moderate_moderate extends ipsCommand $this->modLibrary->clearModQueueTable( 'topic', $this->topic['tid'], true ); } - else - { - $this->registry->class_forums->removePostFromSearchIndex( $this->topic['tid'], 0, 1 ); - } $this->modLibrary->forumRecount( $this->forum['id'] ); $this->modLibrary->statsRecount(); @@ -716,7 +862,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Alter pin/unpinned state of topic * - * @access protected * @param string [pin|unpin] * @return void [Outputs to screen] */ @@ -768,7 +913,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Alter pin/unpinned state of topic * - * @access protected * @return void [Outputs to screen] */ protected function _resyncForum() @@ -783,7 +927,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Process post multi-moderation * - * @access protected * @return void [Outputs to screen] */ protected function _multiPostModify() @@ -800,9 +943,18 @@ class public_forums_moderate_moderate extends ipsCommand case 'unapprove': $this->_multiApprovePost(0); break; - case 'delete': + case 'deletedo': $this->_multiDeletePost(); break; + case 'delete': + $this->_multiDeletePostSplash(); + break; + case 'sdelete': + $this->_multiSoftDeletePost(1, $this->request['deleteReason'] ); + break; + case 'sundelete': + $this->_multiSoftDeletePost(0); + break; case 'merge': $this->_multiMergePost(); break; @@ -817,7 +969,31 @@ class public_forums_moderate_moderate extends ipsCommand IPSCookie::set( 'modpids', '', 0 ); - if ( $this->topic['tid'] ) + /* From search? */ + if ( $this->fromSearch AND $this->returnUrl ) + { + if ( $this->request['nr'] ) + { + $this->registry->output->silentRedirect( $this->returnUrl ); + } + else + { + $this->registry->output->redirectScreen( $this->lang->words['cp_redirect_posts'], $this->returnUrl ); + } + + } + else if ( $this->request['pid'] ) + { + if ( $this->request['nr'] ) + { + $this->registry->output->silentRedirect( $this->settings['base_url'] . "findpost=" . $this->request['pid'] ); + } + else + { + $this->registry->output->redirectScreen( $this->lang->words['cp_redirect_posts'], $this->settings['base_url'] . "findpost=" . $this->request['pid'] ); + } + } + else if ( $this->topic['tid'] ) { $this->registry->output->redirectScreen( $this->lang->words['cp_redirect_posts'], $this->settings['base_url'] . "showtopic=" . $this->topic['tid'] . '&st=' . intval($this->request['st']) ); } @@ -826,7 +1002,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Post multi-mod: Move posts * - * @access protected * @param string [Optional] error message * @return void [Outputs to screen] */ @@ -838,7 +1013,7 @@ class public_forums_moderate_moderate extends ipsCommand if( ! $this->topic['tid'] ) { - $this->_showError( 'mod_no_tid', 10373 ); + $this->_showError( 'mod_no_tid', 10373, 404 ); } if( $this->request['checked'] != 1 ) @@ -892,7 +1067,7 @@ class public_forums_moderate_moderate extends ipsCommand $this->registry->getClass('output')->addNavigation( $this->forum['name'], "{$this->settings['_base_url']}showforum={$this->forum['id']}" ); $this->registry->getClass('output')->addNavigation( $this->topic['title'], "{$this->settings['_base_url']}showtopic={$this->topic['tid']}" ); - $this->registry->getClass('output')->setTitle( $this->lang->words['cmp_title'].": ".$this->topic['title'] ); + $this->registry->getClass('output')->setTitle( $this->lang->words['cmp_title'].": ".$this->topic['title'] . ' - ' . ipsRegistry::$settings['board_name']); $this->registry->output->addContent( $this->output ); $this->registry->getClass('output')->sendOutput(); } @@ -1012,10 +1187,75 @@ class public_forums_moderate_moderate extends ipsCommand } } + /** + * Post multi-mod: Soft delete posts + * + * @param integer 1=undelete, 0=restore + * @param string Reason for moderating the post + * @return void [Outputs to screen] + */ + protected function _multiSoftDeletePost( $delete=1, $reason='' ) + { + $delete = ( $delete ) ? TRUE : FALSE; + + $this->_resetModerator( $this->topic['forum_id'] ); + + /* Grab posts to check perms */ + $this->DB->build( array( 'select' => '*', + 'from' => 'posts', + 'where' => 'pid IN (' . implode( ',', $this->pids ) . ')' ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + if ( $delete ) + { + $result = $this->registry->getClass('class_forums')->canSoftDeletePosts( $this->topic['forum_id'], $row ); + } + else + { + $result = $this->registry->getClass('class_forums')->can_Un_SoftDeletePosts( $this->topic['forum_id'] ); + + } + + if ( ! $result ) + { + $this->_showError( 'moderate_no_permission', 103119 ); + } + } + + /* Fetch entries and checked for lock status if not sup global */ + if ( ! $this->memberData['g_is_supmod'] ) + { + $logs = IPSDeleteLog::fetchEntries( $this->pids, 'post' ); + + if ( is_array( $logs ) ) + { + foreach( $logs as $l => $data ) + { + if ( $data['sdl_locked'] ) + { + $this->_showError( 'moderate_no_permission_deleted_items', 10367.1 ); + } + } + } + } + + /* Ensure we check for a single topic id */ + if ( ! $this->fromSearch ) + { + $this->modLibrary->postToggleSoftDelete( $this->pids, $delete, $reason, $this->topic['tid'] ); + } + else + { + $this->modLibrary->postToggleSoftDelete( $this->pids, $delete, $reason ); + } + } + /** * Post multi-mod: Approve posts * - * @access protected * @param integer 1=approve, 0=unapprove * @return void [Outputs to screen] */ @@ -1027,13 +1267,20 @@ class public_forums_moderate_moderate extends ipsCommand $this->_genericPermissionCheck( 'post_q' ); - $this->modLibrary->postToggleApprove( $this->pids, $_approve, $this->topic['tid'] ); + /* Ensure we check for a single topic id */ + if ( ! $this->fromSearch ) + { + $this->modLibrary->postToggleApprove( $this->pids, $_approve, $this->topic['tid'] ); + } + else + { + $this->modLibrary->postToggleApprove( $this->pids, $_approve ); + } } /** * Post multi-mod: Delete posts * - * @access protected * @return void [Outputs to screen] */ protected function _multiDeletePost() @@ -1081,7 +1328,7 @@ class public_forums_moderate_moderate extends ipsCommand else { $this->modLibrary->postDelete( $this->pids ); - $this->modLibrary->forumRecount( $this->topic['forum_id'] ); + } $this->modLibrary->clearModQueueTable( 'post', $this->pids ); @@ -1090,7 +1337,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Post multi-mod: Split topic * - * @access protected * @return void [Outputs to screen] */ protected function _multiSplitTopic() @@ -1099,9 +1345,9 @@ class public_forums_moderate_moderate extends ipsCommand $this->_genericPermissionCheck( 'split_merge', '', 1 ); - if ( ! $this->topic['tid'] ) + if ( ! $this->fromSearch AND ! $this->topic['tid'] ) { - $this->_showError( 'mod_no_tid', 10377 ); + $this->_showError( 'mod_no_tid', 10377, 404 ); } //----------------------------------------- @@ -1159,12 +1405,36 @@ class public_forums_moderate_moderate extends ipsCommand $this->registry->getClass('output')->addNavigation( $this->forum['name'], "{$this->settings['_base_url']}showforum={$this->forum['id']}" ); $this->registry->getClass('output')->addNavigation( $this->topic['title'], "{$this->settings['_base_url']}showtopic={$this->topic['tid']}" ); - $this->registry->getClass('output')->setTitle( $this->lang->words['st_top'].": ".$this->topic['title'] ); + $this->registry->getClass('output')->setTitle( $this->lang->words['st_top'].": ".$this->topic['title'] . ' - ' . ipsRegistry::$settings['board_name']); $this->registry->output->addContent( $this->output ); $this->registry->getClass('output')->sendOutput(); } else { + /* INIT */ + $topics = array(); + $topic = array(); + $forum = array(); + $pids = array(); + $tids = array(); + + /* As of 3.1, posts can come from multiple topics due to the mod options on searching */ + $this->DB->build( array( 'select' => 't.*', + 'from' => array( 'topics' => 't' ), + 'where' => 't.tid=p.topic_id', + 'add_join' => array( array( 'select' => 'p.pid', + 'from' => array( 'posts' => 'p' ), + 'where' => "pid IN(" . implode( ",", $this->pids ). ")" ) ) ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $pids[ $row['pid'] ] = $row; + $tids[ $row['tid'] ][] = $row['pid']; + $topics[ $row['tid'] ] = $row; + } + //----------------------------------------- // PROCESS Check the input //----------------------------------------- @@ -1189,126 +1459,146 @@ class public_forums_moderate_moderate extends ipsCommand // Do we choose too many? //----------------------------------------- - $count = $this->DB->buildAndFetch( array( 'select' => 'count(pid) as cnt', 'from' => 'posts', 'where' => "topic_id={$this->topic['tid']}" ) ); - - if ( $affected_ids >= $count['cnt'] ) + if ( $this->topic['tid'] ) { - $this->_showError( 'mod_too_much_split', 10380 ); + $count = $this->DB->buildAndFetch( array( 'select' => 'count(pid) as cnt', 'from' => 'posts', 'where' => "topic_id={$this->topic['tid']}" ) ); + + if ( $affected_ids >= $count['cnt'] ) + { + $this->_showError( 'mod_too_much_split', 10380 ); + } } - + //----------------------------------------- // Check the forum we're moving this too //----------------------------------------- - $this->request[ 'fid'] = intval($this->request['fid'] ); - - if ( $this->request['fid'] != $this->forum['id'] ) + if ( $this->forum['id'] ) { - $f = $this->registry->class_forums->allForums[ $this->request['fid'] ]; + $this->request[ 'fid'] = intval($this->request['fid'] ); - if ( ! $f['id'] ) + if ( $this->request['fid'] != $this->forum['id'] ) { - $this->_showError( 'mod_no_forum_move', 10381 ); - } - - if ( !$f['sub_can_post'] ) - { - $this->_showError( 'mod_forum_no_posts', 10382 ); + $f = $this->registry->class_forums->allForums[ $this->request['fid'] ]; + + if ( ! $f['id'] ) + { + $this->_showError( 'mod_no_forum_move', 10381, 404 ); + } + + if ( !$f['sub_can_post'] ) + { + $this->_showError( 'mod_forum_no_posts', 10382 ); + } } } - //----------------------------------------- - // Is first post queued? - //----------------------------------------- - - $topic_approved = 1; - - $first_post = $this->DB->buildAndFetch( array( 'select' => 'pid, queued', - 'from' => 'posts', - 'where' => 'topic_id=' . $this->topic['tid'] . " AND pid IN(" . implode( ",", $this->pids ). ")", - 'order' => $this->settings['post_order_column'] . ' ASC', - 'limit' => array(0,1), - ) ); - - if( $first_post['queued'] ) + /* Loop */ + foreach( $tids as $_tid => $pids ) { - $topic_approved = 0; - - $this->DB->update( 'posts', array( 'queued' => 0 ), 'pid=' . $first_post['pid'] ); - } - - //----------------------------------------- - // Complete a new dummy topic - //----------------------------------------- - - $this->DB->insert( 'topics', array( - 'title' => $this->request['title'], - 'description' => $this->request['desc'] , - 'state' => 'open', - 'posts' => 0, - 'starter_id' => 0, - 'starter_name' => 0, - 'start_date' => time(), - 'last_poster_id' => 0, - 'last_poster_name' => 0, - 'last_post' => time(), - 'icon_id' => 0, - 'author_mode' => 1, - 'poll_state' => 0, - 'last_vote' => 0, - 'views' => 0, - 'forum_id' => $this->request['fid'], - 'approved' => $topic_approved, - 'pinned' => 0, - ) ); - - $new_topic_id = $this->DB->getInsertId(); + //----------------------------------------- + // Is first post queued? + //----------------------------------------- + + $topic_approved = 1; + $topic = $topics[ $_tid ]; + + /* Reset topic */ + if ( $this->fromSearch ) + { + $this->request['title'] = $this->lang->words['mod_from'] . " " . $topic['title']; + $this->request['desc'] = $this->lang->words['mod_from_id']." ".$topic['tid']; + } + + $first_post = $this->DB->buildAndFetch( array( 'select' => 'pid, queued', + 'from' => 'posts', + 'where' => 'topic_id=' . $_tid . " AND pid IN(" . implode( ",", $pids ). ")", + 'order' => $this->settings['post_order_column'] . ' ASC', + 'limit' => array(0,1), + ) ); - //----------------------------------------- - // Move the posts - //----------------------------------------- - - $this->DB->update( 'posts', array( 'topic_id' => $new_topic_id, 'new_topic' => 0 ), 'topic_id=' . $this->topic['tid'] . " AND pid IN(" . implode( ",", $this->pids ). ")" ); - - //----------------------------------------- - // Move the posts - //----------------------------------------- - - if ( $this->trash_inuse ) - { - $this->DB->update( 'posts', array( 'queued' => 0 ), "topic_id={$new_topic_id}" ); - } - - $this->DB->update( 'posts', array( 'new_topic' => 0 ), "topic_id={$this->topic['tid']}" ); - - //----------------------------------------- - // Rebuild the topics - //----------------------------------------- - - $this->modLibrary->rebuildTopic( $new_topic_id ); - $this->modLibrary->rebuildTopic( $this->topic['tid'] ); - - //----------------------------------------- - // Update the forum(s) - //----------------------------------------- - - $this->modLibrary->forumRecount($this->topic['forum_id']); - - if ( $this->topic['forum_id'] != $this->request['fid'] ) - { - $this->modLibrary->forumRecount( $this->request['fid'] ); - } - - /* Run moderation sync */ - $this->modLibrary->runModSync( 'topicSplit', $this->pids, $this->topic['tid'], $new_topic_id ); + if( $first_post['queued'] ) + { + $topic_approved = 0; + + $this->DB->update( 'posts', array( 'queued' => 0 ), 'pid=' . $first_post['pid'] ); + } + + //----------------------------------------- + // Complete a new dummy topic + //----------------------------------------- + + $this->DB->insert( 'topics', array( + 'title' => $this->request['title'], + 'description' => $this->request['desc'] , + 'state' => 'open', + 'posts' => 0, + 'starter_id' => 0, + 'starter_name' => 0, + 'start_date' => time(), + 'last_poster_id' => 0, + 'last_poster_name' => 0, + 'last_post' => time(), + 'icon_id' => 0, + 'author_mode' => 1, + 'poll_state' => 0, + 'last_vote' => 0, + 'views' => 0, + 'forum_id' => $this->request['fid'], + 'approved' => $topic_approved, + 'pinned' => 0, + ) ); + + $new_topic_id = $this->DB->getInsertId(); - if ( $this->trash_inuse ) - { - $this->_addModeratorLog( $this->lang->words['acp_trashcan_post'] . " '{$this->topic['title']}'" ); - } - else - { - $this->_addModeratorLog( $this->lang->words['acp_split_topic'] . " '{$this->topic['title']}'" ); + //----------------------------------------- + // Move the posts + //----------------------------------------- + + $this->DB->update( 'posts', array( 'topic_id' => $new_topic_id, 'new_topic' => 0, 'post_parent' => 0 ), 'topic_id=' . $_tid . " AND pid IN(" . implode( ",", $pids ). ")" ); + + //----------------------------------------- + // Move the posts + //----------------------------------------- + + if ( $this->trash_inuse ) + { + $this->DB->update( 'posts', array( 'queued' => 0 ), "topic_id={$new_topic_id}" ); + } + + $this->DB->update( 'posts', array( 'new_topic' => 0 ), "topic_id={$_tid}" ); + + $this->DB->update( 'posts', array( 'post_parent' => 0 ), 'post_parent IN (' . implode( ',', $pids ) . ')' ); + + //----------------------------------------- + // Rebuild the topics + //----------------------------------------- + + $this->modLibrary->rebuildTopic( $new_topic_id ); + $this->modLibrary->rebuildTopic( $_tid ); + + //----------------------------------------- + // Update the forum(s) + //----------------------------------------- + + $this->modLibrary->forumRecount($topic['forum_id']); + + if ( $topic['forum_id'] != $this->request['fid'] ) + { + $this->modLibrary->forumRecount( $this->request['fid'] ); + } + + /* Run moderation sync */ + $this->modLibrary->runModSync( 'topicSplit', $pids, $topic['tid'], $new_topic_id ); + + if ( $this->trash_inuse ) + { + $this->_addModeratorLog( $this->lang->words['acp_trashcan_post'] . " '{$topic['title']}'" ); + } + else + { + $this->_addModeratorLog( $this->lang->words['acp_split_topic'] . " '{$topic['title']}'" ); + } } } } @@ -1316,7 +1606,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Post multi-mod: Merge posts * - * @access protected * @return void [Outputs to screen] */ protected function _multiMergePost() @@ -1329,7 +1618,7 @@ class public_forums_moderate_moderate extends ipsCommand { $this->_showError( 'mod_only_one_pid', 10383 ); } - + //----------------------------------------- // Form or print? //----------------------------------------- @@ -1441,7 +1730,7 @@ class public_forums_moderate_moderate extends ipsCommand } $this->registry->getClass('output')->addNavigation( $this->lang->words['cm_title'], '' ); - $this->registry->getClass('output')->setTitle( $this->lang->words['cm_title'] ); + $this->registry->getClass('output')->setTitle( $this->lang->words['cm_title'] . ' - ' . ipsRegistry::$settings['board_name']); $this->registry->output->addContent( $this->output ); $this->registry->getClass('output')->sendOutput(); } @@ -1579,12 +1868,9 @@ class public_forums_moderate_moderate extends ipsCommand if( count( $attach_kill ) ) { - require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' ); - $class_attach = new class_attach( $this->registry ); - - $class_attach->type = $rel_module; - $class_attach->attach_post_key = $post_key; - $class_attach->attach_rel_id = $rel_id; + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $class_attach = new $classToLoad( $this->registry ); + $class_attach->type = 'post'; $class_attach->init(); $class_attach->bulkRemoveAttachment( $attach_kill, 'attach_id' ); @@ -1597,6 +1883,8 @@ class public_forums_moderate_moderate extends ipsCommand if ( count($post_to_delete) ) { $this->DB->delete( 'posts', 'pid IN(' . implode( ",", $post_to_delete ) . ')' ); + + IPSDeleteLog::removeEntries( $post_to_delete, 'post', TRUE ); } foreach( $topics as $t ) @@ -1618,10 +1906,45 @@ class public_forums_moderate_moderate extends ipsCommand } } + /** + * If we have an option between normal / soft delete, show it. + * + * @return void [Outputs to screen] + */ + protected function _multiDeletePostSplash() + { + $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_topic' ), 'forums' ); + + $canSoftDelete = $this->registry->getClass('class_forums')->canSoftDeletePosts( $this->forum['id'], array() ); + $canHardDelete = ( $this->memberData['g_is_supmod'] OR $this->moderator['delete_post'] ) ? true : false; + + /* First hurdle */ + if ( ! $canSoftDelete AND ! $canHardDelete ) + { + $this->_showError(); + } + + /* If we can't soft delete, then just do normal deletion */ + if ( ! $canSoftDelete ) + { + return $this->_multiDeletePost(); + } + else + { + /* Show splash page */ + $this->output .= $this->registry->getClass('output')->getTemplate('mod')->softDeleteSplashPosts( $this->forum, $this->topic, $this->pids, $canHardDelete ); + + $this->registry->getClass('output')->addNavigation( $this->forum['name'], "{$this->settings['_base_url']}showforum={$this->forum['id']}" ); + $this->registry->getClass('output')->setTitle( sprintf( $this->lang->words['mm_delete_top_posts'], count($this->pids) ) . ' - ' . ipsRegistry::$settings['board_name']); + + $this->registry->output->addContent( $this->output ); + $this->registry->getClass('output')->sendOutput(); + } + } + /** * Close a topic * - * @access protected * @return void [Outputs to screen] */ protected function _closeTopic() @@ -1632,7 +1955,7 @@ class public_forums_moderate_moderate extends ipsCommand { if ( $this->topic['starter_id'] != $this->memberData['member_id'] OR !$this->memberData['g_open_close_posts'] ) { - $this->_showError( 'mod_no_close_topic', 10385 ); + $this->_showError( 'mod_no_close_topic', 10385, 403 ); } } @@ -1640,13 +1963,43 @@ class public_forums_moderate_moderate extends ipsCommand $this->_addModeratorLog( $this->lang->words['acp_locked_topic'] ); - $this->registry->output->redirectScreen( $this->lang->words['p_closed'], $this->settings['base_url'] . "showforum=".$this->forum['id'] ); + $this->registry->output->redirectScreen( $this->lang->words['p_closed'], $this->settings['base_url'] . "showforum=".$this->forum['id'] . ( $this->request['_from'] == 'forum' ? '&st=' . intval( $this->request['st'] ) : '' ), $this->forum['name_seo'], "showforum" ); + } + + /** + * Soft delete a topic + * + * @return void [Outputs to screen] + */ + protected function _softDeleteTopicToggle( $delete ) + { + $reason = trim( $this->request['deleteReason'] ); + $delete = ( $delete ) ? true : false; + $lang = ( $delete ) ? 'p_deleted' : 'p_topic_restored'; + + if ( $delete ) + { + $result = $this->registry->getClass('class_forums')->canSoftDeleteTopics( $this->topic['forum_id'], $this->topic ); + } + else + { + $result = $this->registry->getClass('class_forums')->can_Un_SoftDeleteTopics( $this->topic['forum_id'] ); + + } + + if ( ! $result ) + { + $this->_showError( 'mod_no_delete_topic', 103119 ); + } + + $this->modLibrary->topicToggleSoftDelete( array( $this->topic['tid'] ), $delete, $reason ); + + $this->registry->output->redirectScreen( $this->lang->words[ $lang ], $this->settings['base_url'] . "showforum=" . $this->forum['id'] . '&st=' . intval( $this->request['st'] ), $this->topic['title_seo'] ); } /** * Delete a topic * - * @access protected * @return void [Outputs to screen] */ protected function _deleteTopic() @@ -1657,7 +2010,7 @@ class public_forums_moderate_moderate extends ipsCommand { if ( $this->topic['starter_id'] != $this->memberData['member_id'] OR !$this->memberData['g_delete_own_topics'] ) { - $this->_showError( 'mod_no_delete_topic', 10386 ); + $this->_showError( 'mod_no_delete_topic', 10386, 403 ); } } @@ -1702,32 +2055,42 @@ class public_forums_moderate_moderate extends ipsCommand /** * Delete a topic (confirmation screen) * - * @access protected * @return void [Outputs to screen] */ protected function _deleteForm() { $this->_resetModerator( $this->topic['forum_id'] ); - if( !$this->_genericPermissionCheck( 'delete_topic', '', 0, true ) ) + $canSoftDelete = $this->registry->getClass('class_forums')->canSoftDeleteTopics( $this->forum['id'], $this->topic ); + + if ( $canSoftDelete ) { - if ( $this->topic['starter_id'] != $this->memberData['member_id'] OR !$this->memberData['g_delete_own_topics'] ) + /* Send to form, then */ + $this->tids[ $this->topic['tid'] ] = $this->topic['tid']; + + return $this->_multiAlterDeleteSplash(); + } + else + { + if( !$this->_genericPermissionCheck( 'delete_topic', '', 0, true ) ) { - $this->_showError( 'mod_no_delete_topic', 10387 ); + if ( $this->topic['starter_id'] != $this->memberData['member_id'] OR !$this->memberData['g_delete_own_topics'] ) + { + $this->_showError( 'mod_no_delete_topic', 10387, 403 ); + } } + + $this->output = $this->registry->getClass('output')->getTemplate('mod')->deleteTopicForm( $this->forum, $this->topic ); + + $this->registry->getClass('output')->addNavigation( $this->forum['name'], "{$this->settings['_base_url']}showforum={$this->forum['id']}" ); + $this->registry->getClass('output')->addNavigation( $this->topic['title'], "{$this->settings['_base_url']}showtopic={$this->topic['tid']}" ); + $this->registry->getClass('output')->setTitle( $this->lang->words['t_delete'].": ".$this->topic['title'] . ' - ' . ipsRegistry::$settings['board_name']); } - - $this->output = $this->registry->getClass('output')->getTemplate('mod')->deleteTopicForm( $this->forum, $this->topic ); - - $this->registry->getClass('output')->addNavigation( $this->forum['name'], "{$this->settings['_base_url']}showforum={$this->forum['id']}" ); - $this->registry->getClass('output')->addNavigation( $this->topic['title'], "{$this->settings['_base_url']}showtopic={$this->topic['tid']}" ); - $this->registry->getClass('output')->setTitle( $this->lang->words['t_delete'].": ".$this->topic['title'] ); } /** * Display the topic history * - * @access protected * @return void [Outputs to screen] */ protected function _topicHistory() @@ -1740,7 +2103,7 @@ class public_forums_moderate_moderate extends ipsCommand if( !$this->memberData['g_access_cp'] ) { - $this->_showError( 'moderate_no_permission', 103119 ); + $this->_showError( 'moderate_no_permission', 103119, 403 ); } if ($this->topic['last_post'] == $this->topic['start_date']) @@ -1794,13 +2157,12 @@ class public_forums_moderate_moderate extends ipsCommand } $this->registry->getClass('output')->addNavigation( $this->topic['title'], "{$this->settings['_base_url']}showtopic={$this->topic['tid']}" ); - $this->registry->getClass('output')->setTitle( $this->topic['title'] ); + $this->registry->getClass('output')->setTitle( $this->topic['title'] . ' - ' . ipsRegistry::$settings['board_name']); } /** * Unsubscribe all form * - * @access protected * @return void [Outputs to screen] */ protected function _unsubscribeAllForm() @@ -1822,13 +2184,12 @@ class public_forums_moderate_moderate extends ipsCommand $this->registry->getClass('output')->addNavigation( $this->forum['name'], "{$this->settings['_base_url']}showforum={$this->forum['id']}" ); $this->registry->getClass('output')->addNavigation( $this->topic['title'], "{$this->settings['_base_url']}showtopic={$this->topic['tid']}" ); - $this->registry->getClass('output')->setTitle( $this->lang->words['ts_title']." > ".$this->topic['title'] ); + $this->registry->getClass('output')->setTitle( $this->lang->words['ts_title']." > ".$this->topic['title'] . ' - ' . ipsRegistry::$settings['board_name']); } /** * Unsubscribe all complete * - * @access protected * @return void [Outputs to screen] */ protected function _unsubscribeAll() @@ -1845,7 +2206,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Merge two topics form * - * @access protected * @return void [Outputs to screen] */ protected function _mergeStart() @@ -1858,13 +2218,12 @@ class public_forums_moderate_moderate extends ipsCommand $this->registry->getClass('output')->addNavigation( $this->forum['name'], "{$this->settings['_base_url']}showforum={$this->forum['id']}" ); $this->registry->getClass('output')->addNavigation( $this->topic['title'], "{$this->settings['_base_url']}showtopic={$this->topic['tid']}" ); - $this->registry->getClass('output')->setTitle( $this->lang->words['mt_top']." ".$this->topic['title'] ); + $this->registry->getClass('output')->setTitle( $this->lang->words['mt_top']." ".$this->topic['title'] . ' - ' . ipsRegistry::$settings['board_name']); } /** * Merge two topics * - * @access protected * @return void [Outputs to screen] */ protected function _mergeComplete() @@ -1897,7 +2256,7 @@ class public_forums_moderate_moderate extends ipsCommand // Get the topic from the DB //----------------------------------------- - $old_topic = $this->DB->buildAndFetch( array( 'select' => 'tid, title, forum_id, last_post, last_poster_id, last_poster_name, posts, views, topic_hasattach', 'from' => 'topics', 'where' => 'tid=' . intval($old_id) ) ); + $old_topic = $this->DB->buildAndFetch( array( 'select' => 'tid, title, forum_id, last_post, last_poster_id, last_poster_name, posts, views, topic_hasattach, approved', 'from' => 'topics', 'where' => 'tid=' . intval($old_id) ) ); if ( ! $old_topic['tid'] ) { @@ -1932,11 +2291,12 @@ class public_forums_moderate_moderate extends ipsCommand } else { - $other_mgroups = array(); + $other_mgroups = array(); + $_mgroup_others = IPSText::cleanPermString( $this->memberData['mgroup_others'] ); - if( $this->memberData['mgroup_others'] ) + if( $_mgroup_others ) { - $other_mgroups = explode( ",", IPSText::cleanPermString( $this->memberData['mgroup_others'] ) ); + $other_mgroups = explode( ",", $_mgroup_others ); } $other_mgroups[] = $this->memberData['member_group_id']; @@ -1966,6 +2326,9 @@ class public_forums_moderate_moderate extends ipsCommand // Update the posts, remove old polls, subs and topic //----------------------------------------- + /* Remove from deletion log */ + IPSDeleteLog::removeEntries( array( $old_topic['tid'] ), 'topic', TRUE ); + $this->DB->update( 'posts', array( 'topic_id' => $this->topic['tid'] ), 'topic_id=' . $old_topic['tid'] ); $this->DB->delete( 'polls', "tid=" . $old_topic['tid'] ); @@ -2043,7 +2406,6 @@ class public_forums_moderate_moderate extends ipsCommand ) , 'tid=' . $this->topic['tid'] ); } - $this->registry->class_forums->removePostFromSearchIndex( $old_topic['tid'], 0, 1 ); $this->modLibrary->rebuildTopic( $this->topic['tid'] ); //----------------------------------------- @@ -2070,7 +2432,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Merge two topics * - * @access protected * @return void [Outputs to screen] */ protected function _moveForm() @@ -2085,13 +2446,12 @@ class public_forums_moderate_moderate extends ipsCommand $this->registry->getClass('output')->addNavigation( $this->forum['name'], "{$this->settings['_base_url']}showforum={$this->forum['id']}" ); $this->registry->getClass('output')->addNavigation( $this->topic['title'], "{$this->settings['_base_url']}showtopic={$this->topic['tid']}" ); - $this->registry->getClass('output')->setTitle( $this->lang->words['t_move'].": ".$this->topic['title'] ); + $this->registry->getClass('output')->setTitle( $this->lang->words['t_move'].": ".$this->topic['title'] . ' - ' . ipsRegistry::$settings['board_name']); } /** * Merge two topics * - * @access protected * @return void [Outputs to screen] */ protected function _doMove() @@ -2174,7 +2534,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Delete a single post * - * @access protected * @return void [Outputs to screen] */ protected function _deletePost() @@ -2196,7 +2555,7 @@ class public_forums_moderate_moderate extends ipsCommand { if( !$this->memberData['g_delete_own_posts'] OR $this->memberData['member_id'] != $post['author_id'] ) { - $this->_showError( 'mod_no_delete_post', 10397 ); + $this->_showError( 'mod_no_delete_post', 10397, 403 ); } } @@ -2242,7 +2601,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Show the edit topic title form * - * @access protected * @return void [Outputs to screen] */ protected function _editForm() @@ -2253,15 +2611,23 @@ class public_forums_moderate_moderate extends ipsCommand $this->output .= $this->registry->getClass('output')->getTemplate('mod')->editTopicTitle( $this->forum, $this->topic ); - $this->registry->getClass('output')->addNavigation( $this->forum['name'], "{$this->settings['_base_url']}showforum={$this->forum['id']}" ); + $navigation = $this->registry->getClass('class_forums')->forumsBreadcrumbNav( $this->forum['id'] ); + + if( is_array( $navigation ) AND count( $navigation ) ) + { + foreach( $navigation as $_id => $_nav ) + { + $this->registry->getClass('output')->addNavigation( $_nav[0], $_nav[1], $_nav[2], $_nav[3] ); + } + } + $this->registry->getClass('output')->addNavigation( $this->topic['title'], "{$this->settings['_base_url']}showtopic={$this->topic['tid']}" ); - $this->registry->getClass('output')->setTitle( $this->lang->words['t_edit'].": ".$this->topic['title'] ); + $this->registry->getClass('output')->setTitle( $this->lang->words['t_edit'].": ".$this->topic['title'] . ' - ' . ipsRegistry::$settings['board_name']); } /** * Save the topic title edits * - * @access protected * @return void [Outputs to screen] */ protected function _doEdit() @@ -2276,9 +2642,8 @@ class public_forums_moderate_moderate extends ipsCommand } require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPost.php' ); - require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPostForms.php' ); - - $_postClass = new classPostForms( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPostForms.php', 'classPostForms', 'forums' ); + $_postClass = new $classToLoad( $this->registry ); $this->request['TopicTitle'] = $_postClass->cleanTopicTitle( $this->request['TopicTitle'] ); $this->request['TopicTitle'] = trim( IPSText::getTextClass( 'bbcode' )->stripBadWords( $this->request['TopicTitle'] ) ); @@ -2294,13 +2659,12 @@ class public_forums_moderate_moderate extends ipsCommand $this->_addModeratorLog( sprintf( $this->lang->words['acp_edit_title'], $this->topic['tid'], $this->topic['title'], $this->request['TopicTitle'] ) ); - $this->registry->output->redirectScreen( $this->lang->words['p_edited'], $this->settings['base_url'] . "showtopic=" . $this->topic['tid'] ); + $this->registry->output->redirectScreen( $this->lang->words['p_edited'], $this->settings['base_url'] . "showtopic=" . $this->topic['tid'], $title_seo, 'showtopic' ); } /** * Open a closed topic * - * @access protected * @return void [Outputs to screen] */ protected function _openTopic() @@ -2316,21 +2680,27 @@ class public_forums_moderate_moderate extends ipsCommand { if( !$this->memberData['g_open_close_posts'] OR $this->topic['starter_id'] != $this->memberData['member_id'] ) { - $this->_showError( 'mod_no_open_perms', 103101 ); + $this->_showError( 'mod_no_open_perms', 103101, 403 ); } } $this->modLibrary->topicOpen($this->topic['tid']); $this->_addModeratorLog( $this->lang->words['acp_opened_topic'] ); + + $_st = '&st=' . intval( $this->request['st'] ); + + if( $this->request['_fromTopic'] ) + { + $_st = ''; + } - $this->registry->output->redirectScreen( $this->lang->words['p_opened'], $this->settings['base_url'] . "showforum=" . $this->topic['forum_id'] . '&st=' . intval( $this->request['st'] ) ); + $this->registry->output->redirectScreen( $this->lang->words['p_opened'], $this->settings['base_url'] . "showforum=" . $this->topic['forum_id'] . $_st, $this->forum['name_seo'], "showforum" ); } /** * Move topics to another forum from the prune popup tool * - * @access protected * @return void [Outputs to screen] */ protected function _pruneMove() @@ -2451,7 +2821,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Prune delete topics * - * @access protected * @return void [Outputs to screen] */ protected function _pruneFinish() @@ -2554,7 +2923,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Prune popup form * - * @access protected * @param string HTML output * @return void [Outputs to screen] */ @@ -2699,6 +3067,7 @@ class public_forums_moderate_moderate extends ipsCommand $this->output .= $this->registry->getClass('output')->getTemplate('mod')->pruneSplash( $this->forum, $html_forums, $confirm_data, $complete_html ); $this->registry->getClass('output')->setTitle( $this->settings['board_name'] ); + $this->registry->getClass('output')->addNavigation( $this->forum['name'], "{$this->settings['_base_url']}showforum={$this->forum['id']}", $this->forum['name_seo'], 'showforum' ); $this->registry->output->addContent( $this->output ); $this->registry->getClass('output')->sendOutput(); } @@ -2706,14 +3075,37 @@ class public_forums_moderate_moderate extends ipsCommand /** * Topic multi-moderation * - * @access protected * @return void [Outputs to screen] */ protected function _multiTopicModify() { + /* init */ + $done = false; + + /* Check these first */ + switch ( $this->request['tact'] ) + { + case 't_approve': + $this->_topicsManage('approve_unapproved'); + $done = true; + break; + case 't_delete_approve': + $this->_topicsManage('delete_unapproved'); + $done = true; + break; + case 't_restore': + $this->_topicsManage('restore_deleted'); + $done = true; + break; + case 't_delete_softed': + $this->_topicsManage('delete_deleted'); + $done = true; + break; + } + $this->tids = $this->_getIds(); - if( count( $this->tids ) ) + if( count( $this->tids ) AND $done !== true ) { switch ( $this->request['tact'] ) { @@ -2736,8 +3128,17 @@ class public_forums_moderate_moderate extends ipsCommand $this->_multiAlterTopics('topic_q', "approved=0"); break; case 'delete': + $this->_multiAlterDeleteSplash(); + break; + case 'deletedo': $this->_multiAlterTopics('delete_topic'); break; + case 'sdelete': + $this->_multiSoftDeleteTopics(1, $this->request['deleteReason']); + break; + case 'sundelete': + $this->_multiSoftDeleteTopics(0); + break; case 'move': $this->_multiStartCheckedMove(); return; @@ -2756,19 +3157,74 @@ class public_forums_moderate_moderate extends ipsCommand IPSCookie::set( 'modtids', '', 0 ); - if ( $this->forum['id'] ) + /* From search? */ + if ( $this->fromSearch AND $this->returnUrl ) + { + if ( $this->request['nr'] ) + { + $this->registry->output->silentRedirect( $this->returnUrl ); + } + else + { + $this->registry->output->redirectScreen( $this->lang->words['cp_redirect_topics'], $this->returnUrl ); + } + + } + else if ( $this->forum['id'] ) { $url = "showforum=" . $this->forum['id']; $url = ( $this->request['st'] ) ? "showforum=" . $this->forum['id'] . '&st=' . $this->request['st'] : $url; - $this->registry->output->redirectScreen( $this->lang->words['cp_redirect_topics'], $this->settings['base_url'] . $url, $this->forum['name_seo'] ); + if ( $this->request['nr'] ) + { + $this->registry->output->silentRedirect( $this->settings['base_url'] . $url ); + } + else + { + $this->registry->output->redirectScreen( $this->lang->words['cp_redirect_topics'], $this->settings['base_url'] . $url, $this->forum['name_seo'] ); + } + } + } + + /** + * If we have an option between normal / soft delete, show it. + * + * @return void [Outputs to screen] + */ + protected function _multiAlterDeleteSplash() + { + $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_forums' ), 'forums' ); + + $canSoftDelete = $this->registry->getClass('class_forums')->canSoftDeleteTopics( $this->forum['id'], array() ); + $canHardDelete = ( $this->memberData['g_is_supmod'] OR $this->moderator['delete_topic'] ) ? true : false; + + /* First hurdle */ + if ( ! $canSoftDelete AND ! $canHardDelete ) + { + $this->_showError(); + } + + /* If we can't soft delete, then just do normal deletion */ + if ( ! $canSoftDelete ) + { + return $this->_multiAlterTopics('delete_topic'); + } + else + { + /* Show splash page */ + $this->output .= $this->registry->getClass('output')->getTemplate('mod')->softDeleteSplash( $this->forum, $this->tids, $canHardDelete ); + + $this->registry->getClass('output')->addNavigation( $this->forum['name'], "{$this->settings['_base_url']}showforum={$this->forum['id']}" ); + $this->registry->getClass('output')->setTitle( sprintf( $this->lang->words['mm_delete_top'], count($this->tids) ) . ' - ' . ipsRegistry::$settings['board_name']); + + $this->registry->output->addContent( $this->output ); + $this->registry->getClass('output')->sendOutput(); } } /** * Merge two or more topics * - * @access protected * @return void [Outputs to screen] */ protected function _multiTopicMerge() @@ -2786,13 +3242,15 @@ class public_forums_moderate_moderate extends ipsCommand $topics = array(); $merge_ids = array(); + $newViews = 0; - $this->DB->build( array( 'select' => 'tid, forum_id', 'from' => 'topics', 'where' => 'tid IN (' . implode( ",", $this->tids ) . ')', 'order' => 'start_date asc' ) ); + $this->DB->build( array( 'select' => 'tid, forum_id, approved, views', 'from' => 'topics', 'where' => 'tid IN (' . implode( ",", $this->tids ) . ')', 'order' => 'start_date asc' ) ); $this->DB->execute(); while ( $r = $this->DB->fetch() ) { - $topics[] = $r; + $topics[] = $r; + $newViews += $r['views']; } //----------------------------------------- @@ -2821,20 +3279,31 @@ class public_forums_moderate_moderate extends ipsCommand $first_topic = array_shift( $topics ); $main_topic_id = $first_topic['tid']; + $unapproved = array(); foreach( $topics as $t ) { - /* Clear the search index */ - $this->registry->class_forums->removePostFromSearchIndex( $t['tid'], 0, 1 ); + /* Add to unapproved array */ + if( ! $t['approved'] ) + { + $unapproved[] = $t['tid']; + } $merge_ids[] = $t['tid']; } + /* Bug #20829: If the topic is not approved, set all the posts unapproved so that they are not displayed after the merge */ + if( is_array( $unapproved ) && count( $unapproved ) ) + { + $this->DB->update( 'posts', array( 'queued' => 1 ), 'topic_id IN (' . implode( ",", $unapproved ) . ")" ); + } + //----------------------------------------- // Update the posts, remove old polls, subs and topic //----------------------------------------- $this->DB->update( 'posts', array( 'topic_id' => $main_topic_id ), 'topic_id IN (' . implode( ",", $merge_ids ) . ")" ); + $this->DB->update( 'topics', array( 'views' => $newViews ), 'tid=' . $main_topic_id ); $this->DB->delete( 'polls', "tid IN (" . implode( ",", $merge_ids ) . ")" ); @@ -2844,6 +3313,9 @@ class public_forums_moderate_moderate extends ipsCommand $this->DB->delete( 'topics', "tid IN (" . implode( ",", $merge_ids ) . ")" ); + /* Remove from deletion log */ + IPSDeleteLog::removeEntries( $merge_ids, 'topic', TRUE ); + //----------------------------------------- // Update the newly merged topic //----------------------------------------- @@ -2854,6 +3326,12 @@ class public_forums_moderate_moderate extends ipsCommand $this->modLibrary->forumRecount( $this->forum['id'] ); $this->modLibrary->statsRecount(); + /* Run Sync */ + foreach ( $merge_ids as $mid ) + { + $this->modLibrary->runModSync( 'topicMerge', $mid, $main_topic_id ); + } + /* Log */ $this->_addModeratorLog( sprintf( $this->lang->words['multi_topic_merge_mod_log'], count( $topics ) ) ); } @@ -2861,7 +3339,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Alter multiple topics at once * - * @access protected * @return void [Outputs to screen] */ protected function _multiAlterTopics( $mod_action="", $sql="" ) @@ -2935,10 +3412,44 @@ class public_forums_moderate_moderate extends ipsCommand } } + /** + * Alter multiple topics at once + * + * @return void [Outputs to screen] + */ + protected function _multiSoftDeleteTopics( $delete=1, $reason='' ) + { + $delete = ( $delete ) ? true : false; + + if ( $delete ) + { + $result = $this->registry->getClass('class_forums')->canSoftDeleteTopics( $this->forum['id'], array() ); + } + else + { + $result = $this->registry->getClass('class_forums')->can_Un_SoftDeleteTopics( $this->forum['id'] ); + + } + + if ( ! $result ) + { + $this->_showError( 'moderate_no_permission', 103119 ); + } + + /* Ensure we check for a single topic id */ + if ( ! $this->fromSearch ) + { + $this->modLibrary->topicToggleSoftDelete( $this->tids, $delete, $reason, $this->topic['tid'] ); + } + else + { + $this->modLibrary->topicToggleSoftDelete( $this->tids, $delete, $reason ); + } + } + /** * Show the form to move topics * - * @access protected * @return void [Outputs to screen] */ protected function _multiStartCheckedMove() @@ -2970,13 +3481,12 @@ class public_forums_moderate_moderate extends ipsCommand $this->output .= $this->registry->getClass('output')->getTemplate('mod')->moveTopicsForm( $this->forum, $jump_html, $topics ); $this->registry->getClass('output')->addNavigation( $this->forum['name'], $this->settings['base_url'] . "showforum={$this->forum['id']}" ); - $this->registry->getClass('output')->setTitle( $this->lang->words['cp_ttitle'] ); + $this->registry->getClass('output')->setTitle( $this->lang->words['cp_ttitle'] . ' - ' . ipsRegistry::$settings['board_name']); } /** * Complete the topic move * - * @access protected * @return void [Outputs to screen] */ protected function _multiCompleteCheckedMove() @@ -3077,7 +3587,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Topic multi-moderation * - * @access protected * @return void [Outputs to screen] */ protected function _multiTopicMmod() @@ -3086,7 +3595,7 @@ class public_forums_moderate_moderate extends ipsCommand // It's tea time //----------------------------------------- - if ( ! strstr( $this->request['tact'], 't_' ) OR !count($this->tids) ) + if ( ! strstr( $this->request['tact'], 't_' ) OR ! count($this->tids) ) { $this->_showError( 'mod_stupid_beggar', 103114 ); } @@ -3113,7 +3622,7 @@ class public_forums_moderate_moderate extends ipsCommand if ( ! $mm_data ) { - $this->_showError( 'mod_no_mm_id', 103116 ); + $this->_showError( 'mod_no_mm_id', 103116, 404 ); } //----------------------------------------- @@ -3122,7 +3631,7 @@ class public_forums_moderate_moderate extends ipsCommand if ( $this->modLibrary->mmCheckIdInForum( $this->forum['id'], $mm_data ) != TRUE ) { - $this->_showError( 'mod_no_multimod', 103117 ); + $this->_showError( 'mod_no_multimod', 103117, 404 ); } //----------------------------------------- @@ -3273,7 +3782,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Grabs post ids for multi-mod * - * @access protected * @param string Field to look in * @return void Cleaned array of post ids */ @@ -3324,6 +3832,7 @@ class public_forums_moderate_moderate extends ipsCommand $ids = IPSLib::cleanIntArray( $ids ); $ids = array_diff( $ids, array(0) ); + $ids = array_unique( $ids ); return $ids; } @@ -3331,7 +3840,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Takes an input url and extracts the topic id * - * @access protected * @return integer Topic id */ protected function _getTidFromUrl() @@ -3342,6 +3850,9 @@ class public_forums_moderate_moderate extends ipsCommand /* Friendly URL */ if( $this->settings['use_friendly_urls'] ) { + /* remove base url from url */ + $this->request['topic_url'] = str_replace( $this->settings['_original_base_url'], '', $this->request['topic_url'] ); + $templates = IPSLib::buildFurlTemplates(); preg_match( $templates['showtopic']['in']['regex'], $this->request['topic_url'], $match ); @@ -3366,20 +3877,19 @@ class public_forums_moderate_moderate extends ipsCommand * Show an error as a result of a moderator request * Abstracted so that we can expand this, i.e. for logging * - * @access protected * @param string Error message language key * @param integer Error code + * @param integer Header code * @return void Outputs error screen */ - protected function _showError( $msg = 'moderate_no_permission', $level = 10367 ) + protected function _showError( $msg = 'moderate_no_permission', $level = 10367, $header=500 ) { - $this->registry->output->showError( $msg, $level, true ); + $this->registry->output->showError( $msg, $level, true, null, $header ); } /** * Shortcut for adding a moderator log * - * @access protected * @param string Error message language key * @return void */ @@ -3391,7 +3901,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Generic permission checking * - * @access protected * @param string Key to check from 'moderator' aray * @param string [Optional] error language key to use if check fails * @param string [Optional] pass if "trash_inuse" is set @@ -3431,7 +3940,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Setup the trash can forum * - * @access protected * @author Brandon Farber * @return void */ @@ -3468,7 +3976,6 @@ class public_forums_moderate_moderate extends ipsCommand * 3) Determines if you have permission to access the moderator action * 4) Sets up $this->forum and $this->moderator * - * @access protected * @author Brandon Farber * @return void */ @@ -3483,9 +3990,9 @@ class public_forums_moderate_moderate extends ipsCommand if ( ! in_array( $this->request['do'], $post_array ) ) { - if ( !$this->request['auth_key'] ) // Changed from $_POST to enable linking to mod functions + if ( ! $this->request['auth_key'] ) // Changed from $_POST to enable linking to mod functions { - $this->_showError( 'mod_no_authorization_key', 5030 ); + $this->_showError( 'mod_no_authorization_key', 5030, null, null, 403 ); } } @@ -3497,7 +4004,7 @@ class public_forums_moderate_moderate extends ipsCommand { if ($this->request['auth_key'] != $this->member->form_hash ) { - $this->_showError( 'mod_no_authorization_key', 5031 ); + $this->_showError( 'mod_no_authorization_key', 5031, null, null, 403 ); } } @@ -3505,7 +4012,7 @@ class public_forums_moderate_moderate extends ipsCommand // Check the input //----------------------------------------- - if ( ! in_array( $this->request['do'], $not_forum_array ) ) + if ( ! in_array( $this->request['do'], $not_forum_array ) AND ! $this->fromSearch ) { //----------------------------------------- // t @@ -3517,7 +4024,7 @@ class public_forums_moderate_moderate extends ipsCommand if ( ! $this->request['t'] ) { - $this->_showError( 'mod_bad_tid', 5032 ); + $this->_showError( 'mod_bad_tid', 5032, null, null, 404 ); } else { @@ -3525,12 +4032,12 @@ class public_forums_moderate_moderate extends ipsCommand if ( empty($this->topic['tid']) ) { - $this->_showError( 'mod_no_tid', 103120 ); + $this->_showError( 'mod_no_tid', 103120, null, null, 404 ); } if ( $this->request['f'] AND ( $this->topic['forum_id'] != $this->request['f'] ) ) { - $this->_showError( 'mod_no_tid', 3033 ); + $this->_showError( 'mod_no_tid', 3033, null, null, 404 ); } } } @@ -3545,7 +4052,7 @@ class public_forums_moderate_moderate extends ipsCommand if ( !$this->request['p'] ) { - $this->_showError( 'mod_bad_pid', 5033 ); + $this->_showError( 'mod_bad_pid', 5033, null, null, 404 ); } } @@ -3555,12 +4062,15 @@ class public_forums_moderate_moderate extends ipsCommand $this->request['f'] = intval($this->request['f']); - if ( !$this->request['f'] AND $this->request['do'] != 'setAsSpammer' ) + if ( ! $this->fromSearch ) { - $this->_showError( 'mod_bad_fid', 4030 ); + if ( ! $this->request['f'] AND $this->request['do'] != 'setAsSpammer' ) + { + $this->_showError( 'mod_bad_fid', 4030, null, null, 404 ); + } } - $this->request['st'] = intval($this->request['st'] > 0 ? intval($this->request['st']) : 0); + $this->request['st'] = intval($this->request['st']); //----------------------------------------- // Get the forum info based on the forum ID, @@ -3585,7 +4095,6 @@ class public_forums_moderate_moderate extends ipsCommand /** * Reset the moderator array to be sure we check correct permissions * - * @access protected * @param integer Forum ID * @author Brandon Farber * @return void @@ -3603,5 +4112,4 @@ class public_forums_moderate_moderate extends ipsCommand $this->moderator = $this->memberData['forumsModeratorData'][ $forumId ]; } } - } \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_public/moderate/multimod.php b/upload/admin/applications/forums/modules_public/moderate/multimod.php index 2033ad55..8a0e1005 100644 --- a/upload/admin/applications/forums/modules_public/moderate/multimod.php +++ b/upload/admin/applications/forums/modules_public/moderate/multimod.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Moderator actions - * Last Updated: $Date: 2009-07-21 19:59:38 -0400 (Tue, 21 Jul 2009) $ + * Last Updated: $Date: 2010-07-01 18:13:46 -0400 (Thu, 01 Jul 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Revision: 4924 $ + * @link http://www.invisionpower.com + * @version $Revision: 6596 $ * */ @@ -111,8 +113,8 @@ class public_forums_moderate_multimod extends ipsCommand ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_mod' ) ); - require( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php'); - $this->modLibrary = new moderatorLibrary( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php', 'moderatorLibrary', 'forums' ); + $this->modLibrary = new $classToLoad( $this->registry ); //----------------------------------------- // Clean the incoming @@ -123,7 +125,7 @@ class public_forums_moderate_multimod extends ipsCommand if ($this->request['t'] < 0 ) { - $this->registry->output->showError( 'multimod_no_topic', 103121 ); + $this->registry->output->showError( 'multimod_no_topic', 103121, null, null, 404 ); } //----------------------------------------- @@ -139,7 +141,7 @@ class public_forums_moderate_multimod extends ipsCommand if ( !$this->topic['tid']) { - $this->registry->output->showError( 'multimod_no_topic', 103122 ); + $this->registry->output->showError( 'multimod_no_topic', 103122, null, null, 404 ); } //----------------------------------------- @@ -148,7 +150,7 @@ class public_forums_moderate_multimod extends ipsCommand if ( !$this->forum['id'] ) { - $this->registry->output->showError( 'multimod_no_topic', 103123 ); + $this->registry->output->showError( 'multimod_no_topic', 103123, null, null, 404 ); } //----------------------------------------- @@ -175,7 +177,7 @@ class public_forums_moderate_multimod extends ipsCommand if ( $this->modLibrary->mmAuthorize() != TRUE ) { - $this->registry->output->showError( 'multimod_no_perms', 2038 ); + $this->registry->output->showError( 'multimod_no_perms', 2038, null, null, 403 ); } //----------------------------------------- @@ -195,7 +197,7 @@ class public_forums_moderate_multimod extends ipsCommand if ( $this->modLibrary->mmCheckIdInForum( $this->forum['id'], $this->mm_data ) != TRUE ) { - $this->registry->output->showError( 'multimod_no_perms', 2039 ); + $this->registry->output->showError( 'multimod_no_perms', 2039, null, null, 403 ); } $this->modLibrary->stmInit(); diff --git a/upload/admin/applications/forums/modules_public/post/defaultSection.php b/upload/admin/applications/forums/modules_public/post/defaultSection.php index bf7fa9c8..d354e7cb 100644 --- a/upload/admin/applications/forums/modules_public/post/defaultSection.php +++ b/upload/admin/applications/forums/modules_public/post/defaultSection.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Forum posting default section - * Last Updated: $LastChangedDate: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 14th May 2003 - * @version $Rev: 4948 $ + * @version $Rev: 5713 $ */ if ( ! defined( 'IN_IPB' ) ) diff --git a/upload/admin/applications/forums/modules_public/post/index.html b/upload/admin/applications/forums/modules_public/post/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/modules_public/post/index.html +++ b/upload/admin/applications/forums/modules_public/post/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/modules_public/post/post.php b/upload/admin/applications/forums/modules_public/post/post.php index c09d0015..fe1d31fe 100644 --- a/upload/admin/applications/forums/modules_public/post/post.php +++ b/upload/admin/applications/forums/modules_public/post/post.php @@ -1,20 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Posting - * Last Updated: $Date: 2009-09-28 18:04:38 -0400 (Mon, 28 Sep 2009) $ + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * * File Created By: Matt Mecham * - * @author $Author: josh $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Rev: 5170 $ - * + * @link http://www.invisionpower.com + * @version $Rev: 7003 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -28,7 +28,6 @@ class public_forums_post_post extends ipsCommand /** * Post Class * - * @access protected * @var object Post Class */ protected $_postClass; @@ -36,7 +35,6 @@ class public_forums_post_post extends ipsCommand /** * Post Form Class * - * @access protected * @var object Post Class */ protected $_postFormClass; @@ -44,7 +42,6 @@ class public_forums_post_post extends ipsCommand /** * Controller run function * - * @access public * @param object Registry * @return void */ @@ -88,10 +85,9 @@ class public_forums_post_post extends ipsCommand //----------------------------------------- require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPost.php' ); - require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPostForms.php' ); - - $this->_postClass = new classPostForms( $registry ); - + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPostForms.php', 'classPostForms', 'forums' ); + $this->_postClass = new $classToLoad( $registry ); + //----------------------------------------- // Set up some stuff //----------------------------------------- @@ -175,7 +171,7 @@ class public_forums_post_post extends ipsCommand { if ( $this->memberData['restrict_post'] == 1 ) { - $this->registry->getClass('output')->showError( 'posting_restricted', 103126 ); + $this->registry->getClass('output')->showError( 'posting_restricted', 103126, null, null, 403 ); } $post_arr = IPSMember::processBanEntry( $this->memberData['restrict_post'] ); @@ -190,7 +186,7 @@ class public_forums_post_post extends ipsCommand } else { - $this->registry->getClass('output')->showError( array( 'posting_off_susp', $this->registry->getClass( 'class_localization')->getDate( $post_arr['date_end'], 'LONG', 1 ) ), 103127 ); + $this->registry->getClass('output')->showError( array( 'posting_off_susp', $this->registry->getClass( 'class_localization')->getDate( $post_arr['date_end'], 'LONG', 1 ) ), 103127, null, null, 403 ); } } @@ -206,7 +202,7 @@ class public_forums_post_post extends ipsCommand { if ( time() - $this->memberData['last_post'] < $this->settings['flood_control'] ) { - $this->registry->getClass('output')->showError( array( 'flood_control', $this->settings['flood_control'] ), 103128 ); + $this->registry->getClass('output')->showError( array( 'flood_control', $this->settings['flood_control'] ), 103128, null, null, 403 ); } } } @@ -214,7 +210,7 @@ class public_forums_post_post extends ipsCommand } else if ( $this->member->is_not_human == 1 ) { - $this->registry->getClass('output')->showError( 'posting_restricted', 103129 ); + $this->registry->getClass('output')->showError( 'posting_restricted', 103129, null, null, 403 ); } //----------------------------------------- @@ -229,7 +225,7 @@ class public_forums_post_post extends ipsCommand if ( $this->request['auth_key'] != $this->member->form_hash ) { - $this->registry->getClass('output')->showError( 'posting_bad_auth_key', 20310 ); + $this->registry->getClass('output')->showError( 'posting_bad_auth_key', 20310, null, null, 403 ); } //----------------------------------------- @@ -264,7 +260,6 @@ class public_forums_post_post extends ipsCommand /** * Save the form * - * @access public * @param string Type of form to show * @return void */ @@ -296,12 +291,20 @@ class public_forums_post_post extends ipsCommand } else { + $permissions['softDelete'] = $this->registry->getClass('class_forums')->canSoftDeletePosts( $topic['forum_id'], $topic ); + $permissions['softDeleteSee'] = $this->registry->getClass('class_forums')->canSeeSoftDeletedPosts( $topic['forum_id'] ); + $posts = $topic['posts'] + 1; if( $this->moderator['post_q'] OR $this->memberData['g_is_supmod'] ) { $posts += $topic['topic_queuedposts']; } + + if ( $permissions['softDelete'] AND $permissions['softDeleteSee'] ) + { + $posts += $topic['topic_deleted_posts']; + } if( ( $posts % $this->settings['display_max_posts'] ) == 0 ) { @@ -378,7 +381,6 @@ class public_forums_post_post extends ipsCommand /** * Show the Form * - * @access public * @param string Type of form to show * @param string Error message * @return null [ Returns HTML to the output engine for immediate printing ] @@ -398,7 +400,7 @@ class public_forums_post_post extends ipsCommand { $_l = $this->_fetchPpdError(); - $this->registry->output->showError( $_l, 0 ); + $this->registry->output->showError( $_l, 103153, null, null, 403 ); } else { @@ -421,7 +423,7 @@ class public_forums_post_post extends ipsCommand { $_l = $this->_fetchPpdError(); - $this->registry->output->showError( $_l, 0 ); + $this->registry->output->showError( $_l, 103153 ); } else { @@ -440,7 +442,7 @@ class public_forums_post_post extends ipsCommand { $_l = $this->_fetchPpdError(); - $this->registry->output->showError( $_l, 0 ); + $this->registry->output->showError( $_l, 103153 ); } else { @@ -454,9 +456,8 @@ class public_forums_post_post extends ipsCommand /** * Check for double post * - * @access public * @return void - **/ + */ public function checkDoublePost() { if( ! $this->_postClass->getIsPreview() ) @@ -495,9 +496,9 @@ class public_forums_post_post extends ipsCommand /** * Check for guest's name being in use * - * @access private * @return void - **/ + * @deprecated As far as I can see this function is not used anywhere, we should remove it for 3.2 + */ private function _check_guest_name() { /* is this even used anymore? @@ -545,7 +546,6 @@ class public_forums_post_post extends ipsCommand * Checks to see if this member is forced to have their posts * moderated * - * @access private * @param string Type of post (new, reply, edit, poll) * @return boolean Whether to PUBLISH this topic or not */ @@ -616,7 +616,6 @@ class public_forums_post_post extends ipsCommand /** * Fetch post per day error * - * @access public * @return string */ private function _fetchPpdError() @@ -624,11 +623,11 @@ class public_forums_post_post extends ipsCommand $_g = $this->caches['group_cache'][ $this->memberData['member_group_id'] ]; $_l = sprintf( $this->lang->words['NO_POSTING_PPD'], $_g['g_ppd_limit'] ); - if ( $_g['g_ppd_unit'] ) + if ( $_g['g_ppd_unit'] ) { if ( $_g['gbw_ppd_unit_type'] ) { - $_l .= "
    " . sprintf( $this->lang->words['NO_PPD_DAYS'], $this->lang->getDate( ( time() + ( 86400 * $_g['g_ppd_unit'] ) ) - $this->memberData['joined'], 'LONG' ) ); + $_l .= "
    " . sprintf( $this->lang->words['NO_PPD_DAYS'], $this->lang->getDate( ( $this->memberData['joined'] + ( 86400 * $_g['g_ppd_unit'] ) ) , 'LONG' ) ); } else { @@ -638,4 +637,4 @@ class public_forums_post_post extends ipsCommand return $_l; } -} +} \ No newline at end of file diff --git a/upload/admin/applications/forums/setup/index.html b/upload/admin/applications/forums/setup/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/setup/index.html +++ b/upload/admin/applications/forums/setup/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

    403: IP.Board -> Forbidden


    You have reached this page in error, please use your back button to return to the forum.
    IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/setup/versions/index.html b/upload/admin/applications/forums/setup/versions/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/forums/setup/versions/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/setup/versions/install/index.html b/upload/admin/applications/forums/setup/versions/install/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/forums/setup/versions/install/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/setup/versions/install/sql/forums_mysql_inserts.php b/upload/admin/applications/forums/setup/versions/install/sql/forums_mysql_inserts.php index da12e95e..206dcc24 100644 --- a/upload/admin/applications/forums/setup/versions/install/sql/forums_mysql_inserts.php +++ b/upload/admin/applications/forums/setup/versions/install/sql/forums_mysql_inserts.php @@ -1,8 +1,8 @@ ', 'Форум', 'Тестовый форум. Может быть удален или переименован.', 1, 1, 0, 1, '', '', 'Ура заработало!', 1, 'last_post', 'Z-A', 100, 'all', 0, 0, 1, 1, 1, NULL, 1, 1, '', 0, 0, '', '', '', '', '', 1, '', 'a:6:{s:11:\"start_perms\";s:1:\"*\";s:11:\"reply_perms\";s:1:\"*\";s:10:\"read_perms\";s:1:\"*\";s:12:\"upload_perms\";s:1:\"*\";s:14:\"download_perms\";s:1:\"*\";s:10:\"show_perms\";s:1:\"*\";}', 0, 0, 0, 0, 1, '', 0,0,0,1,0,'forum','ura-zarabotalo','<%admin_seoname%>','a:1:{i:1;i:<%time%>;} ', 0);"; +$INSERT[] = "INSERT INTO forums VALUES (1, 0, 0, 0, 0, '', 'Категория', 'Тестовая категория. Ее можно удалить или переименовать.' , 1, 1, 0, 1, '', '', '', 0, 'last_post', 'Z-A', 30, 'all', 0, 0, 1, 1, 1, NULL, -1, 0, '', 0, 0, '', '', '', 0, '', 1, 0, 0, 1, 1, '', 0,0,0,1,0,'categoriya','','','', 0, 0, 0, 0, 0);"; +$INSERT[] = "INSERT INTO forums VALUES (2, 1, 0, UNIX_TIMESTAMP(), 1, '<%admin_name%>', 'Форум', 'Тестовый форум. Может быть удален или переименован.', 1, 1, 0, 1, '', '', 'Ура заработало!', 1, 'last_post', 'Z-A', 100, 'all', 0, 0, 1, 1, 1, NULL, 1, 1, '', 0, 0, '', '', '', 1, '', 0, 0, 0, 0, 1, '', 0,0,0,1,0,'forum','ura-zarabotalo','<%admin_seoname%>','a:1:{i:1;i:<%time%>;} ', 0, 0, 0, 0, 0);"; $INSERT[] ="INSERT INTO permission_index VALUES(NULL, 'forums', 'forum', 1, '*', '*', '*', '*', ',4,3,', ',4,3,', '', 0, 0, NULL)"; $INSERT[] ="INSERT INTO permission_index VALUES(NULL, 'forums', 'forum', 2, '*', '*', '*', '*', ',4,3,', ',4,3,', '', 0, 0, NULL)"; @@ -13,9 +13,9 @@ $INSERT[] = "INSERT INTO forum_perms SET perm_name='Маска админист $INSERT[] = "INSERT INTO forum_perms SET perm_name='Маска забаненных', perm_id=5"; $INSERT[] = "INSERT INTO forum_perms SET perm_name='Маска модераторов', perm_id=6"; -$INSERT[] = "INSERT INTO posts (pid, append_edit, edit_time, author_id, author_name, use_sig, use_emo, ip_address, post_date, icon_id, post, queued, topic_id, post_title, new_topic, edit_name, post_key, post_parent, post_htmlstate) VALUES (1, 0, NULL, 1, '<%admin_name%>', 0, 1, '127.0.0.1', UNIX_TIMESTAMP(), 0, 'Всем привет от Maybe =] Релиз подготовлен для форума nulled.ws



    Хочу поздравить всех с наступившим 2010 годом, пожелать счастья, здоровья, материальных достатков, духовного развития, удачи во всех ваших начинаниях! Будьте внимательны к ближним и родственникам своим!



    Добро пожаловать на ваш новый форум под управлением Invision Power Board!



    Поздравляем с покупкой и установкой нашего продукта. Желаем долгой и успешной жизни вашему сообществу!



    А теперь время проверить работу форума - удалите эту тему, а так же измените тестовые форум и категорию в администраторском центре.



    Еще раз всем спасибо. Удачи. Maybe', 0, 1, NULL, 1, NULL, '0', 0, 0);"; +$INSERT[] = "INSERT INTO posts (pid, append_edit, edit_time, author_id, author_name, use_sig, use_emo, ip_address, post_date, icon_id, post, queued, topic_id, post_title, new_topic, edit_name, post_key, post_parent, post_htmlstate) VALUES (1, 0, NULL, 1, '<%admin_name%>', 0, 1, '127.0.0.1', UNIX_TIMESTAMP(), 0, 'Добро пожаловать на ваш новый форум под управлением Invision Power Board!



    Поздравляем с покупкой и установкой нашего продукта. Желаем долгой и успешной жизни вашему сообществу!



    А теперь время проверить работу форума - удалите эту тему, а так же измените тестовые форум и категорию в администраторском центре.



    [url=http://external.iblink.ru/docs-ipb]Ну и конечно же почитайте документацию...[/url]

    [url=http://bestcms.ws]Nulled by BlackSeptember (BESTCMS.WS)[/url]', 0, 1, NULL, 1, NULL, '0', 0, 0);"; # TOPICS: seo_first_name -$INSERT[] = "INSERT INTO topics VALUES (1, 'Ура заработало!', '', 'open', 0, 1, UNIX_TIMESTAMP(), 1, UNIX_TIMESTAMP(), 0, '<%admin_name%>', '<%admin_name%>', '0', 0, 1, 2, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 'ura-zarabotalo', '<%admin_seoname%>', '<%admin_seoname%>');"; +$INSERT[] = "INSERT INTO topics VALUES (1, 'Ура заработало!', '', 'open', 0, 1, UNIX_TIMESTAMP(), 1, UNIX_TIMESTAMP(), 0, '<%admin_name%>', '<%admin_name%>', '0', 0, 1, 2, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 'ura-zarabotalo', '<%admin_seoname%>', '<%admin_seoname%>', 0);"; ?> \ No newline at end of file diff --git a/upload/admin/applications/forums/setup/versions/install/sql/forums_mysql_tables.php b/upload/admin/applications/forums/setup/versions/install/sql/forums_mysql_tables.php index 452acd9d..a5956a8e 100644 --- a/upload/admin/applications/forums/setup/versions/install/sql/forums_mysql_tables.php +++ b/upload/admin/applications/forums/setup/versions/install/sql/forums_mysql_tables.php @@ -10,13 +10,14 @@ $TABLE[] = "CREATE TABLE forum_perms ( );"; $TABLE[] = "CREATE TABLE forum_tracker ( frid mediumint(8) NOT NULL auto_increment, - member_id mediumint(8) NOT NULL default '0', - forum_id smallint(5) NOT NULL default '0', + member_id mediumint(8) NOT NULL default 0, + forum_id smallint(5) NOT NULL default 0, start_date int(10) default NULL, - last_sent int(10) NOT NULL default '0', + last_sent int(10) NOT NULL default 0, forum_track_type varchar(100) NOT NULL default 'delayed', PRIMARY KEY (frid), - KEY member_id (member_id), + KEY forum_track_type (forum_track_type), + KEY member_id ( member_id , last_sent ), KEY fm_id (forum_id) );"; $TABLE[] = "CREATE TABLE forums ( @@ -24,14 +25,14 @@ $TABLE[] = "CREATE TABLE forums ( topics mediumint(6) default NULL, posts mediumint(6) default NULL, last_post int(10) default NULL, - last_poster_id mediumint(8) NOT NULL default '0', + last_poster_id mediumint(8) NOT NULL default 0, last_poster_name VARCHAR( 255 ) NOT NULL DEFAULT '', name varchar(128) NOT NULL default '', description text, - position int(5) unsigned default '0', + position int(5) unsigned default 0, use_ibc tinyint(1) default NULL, use_html tinyint(1) default NULL, - status tinyint(1) default '1', + status tinyint(1) default 1, password varchar(32) default NULL, password_override varchar(255) default NULL, last_title varchar(250) default NULL, @@ -42,62 +43,63 @@ $TABLE[] = "CREATE TABLE forums ( topicfilter varchar(32) NOT NULL default 'all', show_rules tinyint(1) default NULL, preview_posts tinyint(1) default NULL, - allow_poll tinyint(1) NOT NULL default '1', - allow_pollbump tinyint(1) NOT NULL default '0', - inc_postcount tinyint(1) NOT NULL default '1', + allow_poll tinyint(1) NOT NULL default 1, + allow_pollbump tinyint(1) NOT NULL default 0, + inc_postcount tinyint(1) NOT NULL default 1, skin_id int(10) default NULL, parent_id mediumint(5) default '-1', - quick_reply tinyint(1) default '0', + quick_reply tinyint(1) default 0, redirect_url varchar(250) default '', - redirect_on tinyint(1) NOT NULL default '0', - redirect_hits int(10) NOT NULL default '0', - redirect_loc varchar(250) default '', + redirect_on tinyint(1) NOT NULL default 0, + redirect_hits int(10) NOT NULL default 0, rules_title varchar(255) NOT NULL default '', rules_text text, - topic_mm_id varchar(250) NOT NULL default '', notify_modq_emails text, - sub_can_post tinyint(1) default '1', + sub_can_post tinyint(1) default 1, permission_custom_error text, - permission_array mediumtext NULL, - permission_showtopic tinyint(1) NOT NULL default '0', - queued_topics mediumint(6) NOT NULL default '0', - queued_posts mediumint(6) NOT NULL default '0', - forum_allow_rating tinyint(1) NOT NULL default '0', - forum_last_deletion int(10) NOT NULL default '0', + permission_showtopic tinyint(1) NOT NULL default 0, + queued_topics mediumint(6) NOT NULL default 0, + queued_posts mediumint(6) NOT NULL default 0, + forum_allow_rating tinyint(1) NOT NULL default 0, + forum_last_deletion int(10) NOT NULL default 0, newest_title varchar(250) default NULL, - newest_id int(10) NOT NULL default '0', + newest_id int(10) NOT NULL default 0, min_posts_post int(10) unsigned NOT NULL, min_posts_view int(10) unsigned NOT NULL, - can_view_others tinyint(1) NOT NULL default '1', - hide_last_info tinyint(1) NOT NULL default '0', + can_view_others tinyint(1) NOT NULL default 1, + hide_last_info tinyint(1) NOT NULL default 0, name_seo varchar(255) default NULL, seo_last_title varchar(255) NOT NULL default '', seo_last_name varchar(255) NOT NULL default '', last_x_topic_ids text, - forums_bitoptions int(10) unsigned NOT NULL default '0', + forums_bitoptions int(10) unsigned NOT NULL default 0, + disable_sharelinks INT(1) NOT NULL default 0, + deleted_posts INT(10) NOT NULL default 0, + deleted_topics INT(10) NOT NULL default 0, + rules_raw_html tinyint(1) NOT NULL default 0, PRIMARY KEY (id), KEY position (position,parent_id) );"; $TABLE[] = "CREATE TABLE mod_queued_items ( id int(11) NOT NULL auto_increment, type varchar(32) NOT NULL default 'post', - type_id int(11) NOT NULL default '0', + type_id int(11) NOT NULL default 0, PRIMARY KEY (id), KEY type_id (type_id) );"; $TABLE[] = "CREATE TABLE moderator_logs ( id int(10) NOT NULL auto_increment, - forum_id int(5) default '0', - topic_id int(10) NOT NULL default '0', + forum_id int(5) default 0, + topic_id int(10) NOT NULL default 0, post_id int(10) default NULL, - member_id mediumint(8) NOT NULL default '0', + member_id mediumint(8) NOT NULL default 0, member_name varchar(32) NOT NULL default '', ip_address varchar(16) NOT NULL default '0', - http_referer varchar(255) default NULL, + http_referer TEXT NULL DEFAULT NULL, ctime int(10) default NULL, - topic_title varchar(128) default NULL, - action varchar(128) default NULL, - query_string varchar(128) default NULL, + topic_title TEXT NULL DEFAULT NULL, + action TEXT NULL DEFAULT NULL, + query_string TEXT NULL DEFAULT NULL, PRIMARY KEY (id), KEY ctime (ctime), KEY ip_address (ip_address) @@ -106,7 +108,7 @@ $TABLE[] = "CREATE TABLE moderators ( mid mediumint(8) NOT NULL auto_increment, forum_id text, member_name varchar(32) NOT NULL default '', - member_id mediumint(8) NOT NULL default '0', + member_id mediumint(8) NOT NULL default 0, edit_post tinyint(1) default NULL, edit_topic tinyint(1) default NULL, delete_post tinyint(1) default NULL, @@ -122,53 +124,52 @@ $TABLE[] = "CREATE TABLE moderators ( post_q tinyint(1) default NULL, topic_q tinyint(1) default NULL, allow_warn tinyint(1) default NULL, - edit_user tinyint(1) NOT NULL default '0', - is_group tinyint(1) default '0', + is_group tinyint(1) default 0, group_id smallint(3) default NULL, group_name varchar(200) default NULL, - split_merge tinyint(1) default '0', - can_mm tinyint(1) NOT NULL default '0', - mod_can_set_open_time tinyint(1) NOT NULL default '0', - mod_can_set_close_time tinyint(1) NOT NULL default '0', - mod_bitoptions int(10) unsigned NOT NULL default '0', + split_merge tinyint(1) default 0, + can_mm tinyint(1) NOT NULL default 0, + mod_can_set_open_time tinyint(1) NOT NULL default 0, + mod_can_set_close_time tinyint(1) NOT NULL default 0, + mod_bitoptions int(10) unsigned NOT NULL default 0, PRIMARY KEY (mid), KEY group_id (group_id), KEY member_id (member_id) );"; $TABLE[] = "CREATE TABLE polls ( pid mediumint(8) NOT NULL auto_increment, - tid int(10) NOT NULL default '0', + tid int(10) NOT NULL default 0, start_date int(10) default NULL, choices text, - starter_id mediumint(8) NOT NULL default '0', - votes smallint(5) NOT NULL default '0', - forum_id smallint(5) NOT NULL default '0', + starter_id mediumint(8) NOT NULL default 0, + votes smallint(5) NOT NULL default 0, + forum_id smallint(5) NOT NULL default 0, poll_question varchar(255) default NULL, - poll_only tinyint(1) NOT NULL default '0', - poll_view_voters int(1) NOT NULL default '0', + poll_only tinyint(1) NOT NULL default 0, + poll_view_voters int(1) NOT NULL default 0, PRIMARY KEY (pid), KEY tid (tid) );"; $TABLE[] = "CREATE TABLE posts ( pid int(10) NOT NULL auto_increment, - append_edit tinyint(1) default '0', + append_edit tinyint(1) default 0, edit_time int(10) default NULL, - author_id mediumint(8) NOT NULL default '0', - author_name varchar(32) default NULL, - use_sig tinyint(1) NOT NULL default '0', - use_emo tinyint(1) NOT NULL default '0', + author_id mediumint(8) NOT NULL default 0, + author_name varchar(255) default NULL, + use_sig tinyint(1) NOT NULL default 0, + use_emo tinyint(1) NOT NULL default 0, ip_address varchar(16) NOT NULL default '', post_date int(10) default NULL, icon_id smallint(3) default NULL, post mediumtext, - queued tinyint(1) NOT NULL default '0', - topic_id int(10) NOT NULL default '0', + queued tinyint(1) NOT NULL default 0, + topic_id int(10) NOT NULL default 0, post_title varchar(255) default NULL, - new_topic tinyint(1) default '0', + new_topic tinyint(1) default 0, edit_name varchar(255) default NULL, post_key varchar(32) NOT NULL default '0', - post_parent int(10) NOT NULL default '0', - post_htmlstate smallint(1) NOT NULL default '0', + post_parent int(10) NOT NULL default 0, + post_htmlstate smallint(1) NOT NULL default 0, post_edit_reason varchar(255) NOT NULL default '', PRIMARY KEY (pid), KEY topic_id (topic_id,queued,pid,post_date), @@ -180,32 +181,33 @@ $TABLE[] = "CREATE TABLE posts ( $TABLE[] = "CREATE TABLE topic_mmod ( mm_id smallint(5) NOT NULL auto_increment, mm_title varchar(250) NOT NULL default '', - mm_enabled tinyint(1) NOT NULL default '0', + mm_enabled tinyint(1) NOT NULL default 0, topic_state varchar(10) NOT NULL default 'leave', topic_pin varchar(10) NOT NULL default 'leave', - topic_move smallint(5) NOT NULL default '0', - topic_move_link tinyint(1) NOT NULL default '0', + topic_move smallint(5) NOT NULL default 0, + topic_move_link tinyint(1) NOT NULL default 0, topic_title_st varchar(250) NOT NULL default '', topic_title_end varchar(250) NOT NULL default '', - topic_reply tinyint(1) NOT NULL default '0', + topic_reply tinyint(1) NOT NULL default 0, topic_reply_content text, - topic_reply_postcount tinyint(1) NOT NULL default '0', + topic_reply_postcount tinyint(1) NOT NULL default 0, mm_forums text, - topic_approve tinyint(1) NOT NULL default '0', + topic_approve tinyint(1) NOT NULL default 0, PRIMARY KEY (mm_id) );"; $TABLE[] = "CREATE TABLE topic_ratings ( rating_id int(10) NOT NULL auto_increment, - rating_tid int(10) NOT NULL default '0', - rating_member_id mediumint(8) NOT NULL default '0', - rating_value smallint(6) NOT NULL default '0', + rating_tid int(10) NOT NULL default 0, + rating_member_id mediumint(8) NOT NULL default 0, + rating_value smallint(6) NOT NULL default 0, rating_ip_address varchar(16) NOT NULL default '', PRIMARY KEY (rating_id), KEY rating_tid (rating_tid,rating_member_id), KEY rating_ip_address (rating_ip_address) );"; $TABLE[] = "CREATE TABLE topic_views ( - views_tid int(10) NOT NULL default '0' + views_tid int(10) NOT NULL default 0, + KEY views_tid (views_tid) );"; @@ -215,9 +217,9 @@ $TABLE[] = "CREATE TABLE topics ( description varchar(250) default NULL, state varchar(8) default NULL, posts int(10) default NULL, - starter_id mediumint(8) NOT NULL default '0', + starter_id mediumint(8) NOT NULL default 0, start_date int(10) default NULL, - last_poster_id mediumint(8) NOT NULL default '0', + last_poster_id mediumint(8) NOT NULL default 0, last_post int(10) default NULL, icon_id tinyint(2) default NULL, starter_name varchar(255) default NULL, @@ -225,22 +227,22 @@ $TABLE[] = "CREATE TABLE topics ( poll_state varchar(8) default NULL, last_vote int(10) default NULL, views int(10) default NULL, - forum_id smallint(5) NOT NULL default '0', - approved tinyint(1) NOT NULL default '0', + forum_id smallint(5) NOT NULL default 0, + approved tinyint(1) NOT NULL default 0, author_mode tinyint(1) default NULL, pinned tinyint(1) default NULL, moved_to varchar(64) default NULL, - total_votes int(5) NOT NULL default '0', - topic_hasattach smallint(5) NOT NULL default '0', - topic_firstpost int(10) NOT NULL default '0', - topic_queuedposts int(10) NOT NULL default '0', - topic_open_time int(10) NOT NULL default '0', - topic_close_time int(10) NOT NULL default '0', - topic_rating_total smallint(5) unsigned NOT NULL default '0', - topic_rating_hits smallint(5) unsigned NOT NULL default '0', + topic_hasattach smallint(5) NOT NULL default 0, + topic_firstpost int(10) NOT NULL default 0, + topic_queuedposts int(10) NOT NULL default 0, + topic_open_time int(10) NOT NULL default 0, + topic_close_time int(10) NOT NULL default 0, + topic_rating_total smallint(5) unsigned NOT NULL default 0, + topic_rating_hits smallint(5) unsigned NOT NULL default 0, title_seo varchar(250) NOT NULL default '', seo_last_name varchar(255) NOT NULL default '', seo_first_name varchar(255) NOT NULL default '', + topic_deleted_posts INT(10) NOT NULL default 0, PRIMARY KEY (tid), KEY topic_firstpost (topic_firstpost), KEY last_post (forum_id,pinned,last_post,state), @@ -253,13 +255,14 @@ $TABLE[] = "CREATE TABLE topics ( $TABLE[] = "CREATE TABLE tracker ( trid mediumint(8) NOT NULL auto_increment, - member_id mediumint(8) NOT NULL default '0', - topic_id int(10) NOT NULL default '0', + member_id mediumint(8) NOT NULL default 0, + topic_id int(10) NOT NULL default 0, start_date int(10) default NULL, - last_sent int(10) NOT NULL default '0', + last_sent int(10) NOT NULL default 0, topic_track_type varchar(100) NOT NULL default 'delayed', PRIMARY KEY (trid), KEY topic_id (topic_id), - KEY tm_id ( member_id , topic_id ) + KEY tm_id ( member_id , topic_id , last_sent ), + KEY topic_track_type ( topic_track_type ) );"; ?> \ No newline at end of file diff --git a/upload/admin/applications/forums/setup/versions/install/sql/index.html b/upload/admin/applications/forums/setup/versions/install/sql/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications/forums/setup/versions/install/sql/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

    403: IP.Board -> Forbidden

    +
    +You have reached this page in error, please use your back button to return to the forum. +
    +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/skin_cp/cp_skin_attachments.php b/upload/admin/applications/forums/skin_cp/cp_skin_attachments.php index a44650b9..1606f1e5 100644 --- a/upload/admin/applications/forums/skin_cp/cp_skin_attachments.php +++ b/upload/admin/applications/forums/skin_cp/cp_skin_attachments.php @@ -1,511 +1,514 @@ - -

    {$this->lang->words['attach_stats_head']}

    - - -
    -

    {$this->lang->words['atc_overview']}

    - -
     
    - - - - - - -
    {$this->lang->words['atc_number']}{$overall_stats['total_attachments']}{$this->lang->words['atc_diskusage']}{$overall_stats['total_size']}
    -
    - -
    - - - - -
    -

    {$this->lang->words['atc_last5']}

    - - - - - - - - - - - -HTML; - -foreach( $last_5 as $r ) -{ -$IPBHTML .= << - - - - - - - - -HTML; -} - -$IPBHTML .= << -
    - -
    -

    {$this->lang->words['atc_largest5']}

    - -
     {$this->lang->words['atc_attachment']}{$this->lang->words['atc_size']}{$this->lang->words['atc_author']}{$this->lang->words['atc_topic']}{$this->lang->words['atc_posted']} 
    {$r['attach_file']}{$r['attach_filesize']}{$r['members_display_name']}{$r['stitle']}{$r['post_date']}
    - - - - - - - - -HTML; - -foreach( $largest_5 as $r ) -{ -$IPBHTML .= << - - - - - - - - -HTML; -} - -$IPBHTML .= << -
    - -
    -

    {$this->lang->words['atc_top5']}

    - -
     {$this->lang->words['atc_attachment']}{$this->lang->words['atc_size']}{$this->lang->words['atc_author']}{$this->lang->words['atc_topic']}{$this->lang->words['atc_posted']}  -
    {$r['attach_file']}{$r['attach_filesize']}{$r['members_display_name']}{$r['stitle']}{$r['post_date']}
    - - - - - - - - - -HTML; - -foreach( $most_viewed_5 as $r ) -{ -$IPBHTML .= << - - - - -HTML; -} - -$IPBHTML .= << - -
    -
    - -
    -
    - - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Form to add/edit attachment types - * - * @access public - * @param string Title - * @param string Do action - * @param integer Editing attachment type id - * @param array Form fields - * @param string Button text - * @param string Based on attach type - * @return string HTML - */ -public function attachmentTypeForm( $title, $do, $id, $form, $button, $baseon='' ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

    {$this->lang->words['add_attachment_type_head']}

    - - -{$baseon} -
    -

    {$title}

    -
    form_code}' method='post' name='theAdminForm' id='theAdminForm'> - - - - -
      -
    • - - {$form['atype_extension']} -
    • -
    • - - {$form['atype_mimetype']} -
    • - -
    • - - {$form['atype_post']} -
    • -
    • - - {$form['atype_photo']} -
    • -
    • - - {$form['atype_img']} -
    • -
    - -
    - - -
    -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Build the "based on" dropdown - * - * @access public - * @param string Dropdown HTML - * @return string HTML - */ -public function attachmentTypeBaseOn( $dd ) { -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= <<form_code}&do=attach_add'> - _admin_auth_key}' /> - - {$this->lang->words['attach_baseon']} {$dd}   - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Display attachment types - * - * @access public - * @param array attachment types - * @return string HTML - */ -public function attachmentTypeOverview( $rows ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

    {$this->lang->words['ty_title']}

    - - - - -
    -

    {$this->lang->words['atc_atttypes']}

    - -
     {$this->lang->words['atc_attachment']}{$this->lang->words['atc_viewed']}{$this->lang->words['atc_author']}{$this->lang->words['atc_topic']}{$this->lang->words['atc_posted']} 
    {$r['attach_file']} - - - -
    - - -HTML; - -foreach( $rows as $row ) -{ -$IPBHTML .= << - - - - - - - -HTML; -} - -$IPBHTML .= << -
     
    - - -
    - -form_code}' method='post' name='uploadform' enctype='multipart/form-data' id='uploadform'> - - - - -
    -

    {$this->lang->words['atc_import']}

    - -

    - {$this->lang->words['atc_uploadxml_info']} - -

    - -
    - -
    -
    - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Display attachment search form - * - * @access public - * @param array Form fields - * @return string HTML - */ -public function attachmentSearchForm( $form ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

    {$this->lang->words['se_search']}

    - - -
    -

    {$this->lang->words['se_search']}

    - -
    form_code}' method='post' name='theAdminForm' id='theAdminForm'> - - - -
      -
    • - - {$form['extension']} -
    • - -
    • - - {$form['filesize_gt']} {$form['filesize']} -
    • - -
    • - - {$form['days_gt']} {$form['days']}{$this->lang->words['se_ago']} -
    • - -
    • - - {$form['hits_gt']} {$form['hits']}{$this->lang->words['se_times']} -
    • - -
    • - - {$form['filename']} -
    • - -
    • - - {$form['authorname']} -
    • - -
    • - - {$form['onlyimage']} -
    • - -
    • - - {$form['orderby']} {$form['sort']} -
    • - -
    • - - {$form['show']} -
    • -
    - -
    - -
    - - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Display attachment search results - * - * @access public - * @param string URL - * @param array Search results - * @return string HTML - */ -public function attachmentSearchResults( $url, $rows ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= <<form_code}' method='post'> - - - - - -
    -

    {$this->lang->words['se_results']}

    - -
      - {$this->lang->words['atc_extension']} - {$this->lang->words['atc_mime_type']} - {$this->lang->words['atc_post']} - {$this->lang->words['atc_avatar']} - {$this->lang->words['atc_options']} -
    .{$row['atype_extension']}{$row['atype_mimetype']}{$row['apost_checked']}{$row['aphoto_checked']} - - -
    - - - - - - - - -HTML; - -foreach( $rows as $r ) -{ -$IPBHTML .= << - - - - - - - - -HTML; -} - -$IPBHTML .= << -
    -
    - -
    -
    - - -
    -HTML; - -//--endhtml--// -return $IPBHTML; -} - + + * Invision Power Services + * IP.Board v3.1.4 + * Attachments skin functions + * Last Updated: $LastChangedDate: 2010-06-08 20:53:45 -0400 (Tue, 08 Jun 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 14th May 2003 + * @version $Rev: 6485 $ + */ + +class cp_skin_attachments extends output +{ + +/** + * Prevent our main destructor being called by this class + * + * @access public + * @return void + */ +public function __destruct() +{ +} + +/** + * Display attachment stats + * + * @access public + * @param array Overall stats + * @param array Last 5 attachments + * @param array Largest 5 attachments + * @param array Most viewed 5 attachments + * @return string HTML + */ +public function attachmentStats( $overall_stats, $last_5, $largest_5, $most_viewed_5 ) +{ + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

    {$this->lang->words['attach_stats_head']}

    + + +
    +

    {$this->lang->words['atc_overview']}

    + +
      - {$this->lang->words['se_attachment']}{$this->lang->words['se_size']}{$this->lang->words['se_author']}{$this->lang->words['se_topic']}{$this->lang->words['se_posted']} 
    caches['attachtypes'][ $r['attach_ext'] ]['atype_img']}' border='0' />{$r['attach_file']}{$r['attach_filesize']}{$r['members_display_name']}{$r['stitle']}{$r['attach_date']}
    + + + + + + +
    {$this->lang->words['atc_number']}{$overall_stats['total_attachments']}{$this->lang->words['atc_diskusage']}{$overall_stats['total_size']}
    +

    + +
    + + + + +
    +

    {$this->lang->words['atc_last5']}

    + + + + + + + + + + + +HTML; + +foreach( $last_5 as $r ) +{ +$IPBHTML .= << + + + + + + + + +HTML; +} + +$IPBHTML .= << +
    + +
    +

    {$this->lang->words['atc_largest5']}

    + +
     {$this->lang->words['atc_attachment']}{$this->lang->words['atc_size']}{$this->lang->words['atc_author']}{$this->lang->words['atc_topic']}{$this->lang->words['atc_posted']} 
    {$r['attach_file']}{$r['attach_filesize']}{$r['members_display_name']}{$r['stitle']}{$r['post_date']}
    + + + + + + + + +HTML; + +foreach( $largest_5 as $r ) +{ +$IPBHTML .= << + + + + + + + + +HTML; +} + +$IPBHTML .= << +
    + +
    +

    {$this->lang->words['atc_top5']}

    + +
     {$this->lang->words['atc_attachment']}{$this->lang->words['atc_size']}{$this->lang->words['atc_author']}{$this->lang->words['atc_topic']}{$this->lang->words['atc_posted']}  +
    {$r['attach_file']}{$r['attach_filesize']}{$r['members_display_name']}{$r['stitle']}{$r['post_date']}
    + + + + + + + + + +HTML; + +foreach( $most_viewed_5 as $r ) +{//print_r($r);exit(); +$IPBHTML .= << + + + + + + + + +HTML; +} + +$IPBHTML .= << + +
    +
    + +
    +
    + + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Form to add/edit attachment types + * + * @access public + * @param string Title + * @param string Do action + * @param integer Editing attachment type id + * @param array Form fields + * @param string Button text + * @param string Based on attach type + * @return string HTML + */ +public function attachmentTypeForm( $title, $do, $id, $form, $button, $baseon='' ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

    {$this->lang->words['add_attachment_type_head']}

    + + +{$baseon} +
    +

    {$title}

    +
    form_code}' method='post' name='theAdminForm' id='theAdminForm'> + + + + +
      +
    • + + {$form['atype_extension']} +
    • +
    • + + {$form['atype_mimetype']} +
    • + +
    • + + {$form['atype_post']} +
    • +
    • + + {$form['atype_photo']} +
    • +
    • + + {$form['atype_img']} +
    • +
    + +
    + + +
    +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Build the "based on" dropdown + * + * @access public + * @param string Dropdown HTML + * @return string HTML + */ +public function attachmentTypeBaseOn( $dd ) { +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= <<form_code}&do=attach_add'> + _admin_auth_key}' /> + + {$this->lang->words['attach_baseon']} {$dd}   + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Display attachment types + * + * @access public + * @param array attachment types + * @return string HTML + */ +public function attachmentTypeOverview( $rows ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

    {$this->lang->words['ty_title']}

    + + + + +
    +

    {$this->lang->words['atc_atttypes']}

    + +
     {$this->lang->words['atc_attachment']}{$this->lang->words['atc_viewed']}{$this->lang->words['atc_author']}{$this->lang->words['atc_topic']}{$this->lang->words['atc_posted']} 
    {$r['attach_file']}{$r['attach_hits']}{$r['members_display_name']}{$r['stitle']}{$r['post_date']}
    + + +HTML; + +foreach( $rows as $row ) +{ +$IPBHTML .= << + + + + + + + +HTML; +} + +$IPBHTML .= << +
     
    + + +
    + +form_code}' method='post' name='uploadform' enctype='multipart/form-data' id='uploadform'> + + + + +
    +

    {$this->lang->words['atc_import']}

    + +

    + {$this->lang->words['atc_uploadxml_info']} + +

    + +
    + +
    +
    + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Display attachment search form + * + * @access public + * @param array Form fields + * @return string HTML + */ +public function attachmentSearchForm( $form ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

    {$this->lang->words['se_search']}

    + + +
    +

    {$this->lang->words['se_search']}

    + +
    form_code}' method='post' name='theAdminForm' id='theAdminForm'> + + + +
      +
    • + + {$form['extension']} +
    • + +
    • + + {$form['filesize_gt']} {$form['filesize']} +
    • + +
    • + + {$form['days_gt']} {$form['days']}{$this->lang->words['se_ago']} +
    • + +
    • + + {$form['hits_gt']} {$form['hits']}{$this->lang->words['se_times']} +
    • + +
    • + + {$form['filename']} +
    • + +
    • + + {$form['authorname']} +
    • + +
    • + + {$form['onlyimage']} +
    • + +
    • + + {$form['orderby']} {$form['sort']} +
    • + +
    • + + {$form['show']} +
    • +
    + +
    + +
    + + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Display attachment search results + * + * @access public + * @param string URL + * @param array Search results + * @return string HTML + */ +public function attachmentSearchResults( $url, $rows ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +form_code}' method='post'> + + + + + +
    +

    {$this->lang->words['se_results']}

    + +
      + {$this->lang->words['atc_extension']} + {$this->lang->words['atc_mime_type']} + {$this->lang->words['atc_post']} + {$this->lang->words['atc_avatar']} + {$this->lang->words['atc_options']} +
    .{$row['atype_extension']}{$row['atype_mimetype']}{$row['apost_checked']}{$row['aphoto_checked']} + + +
    + + + + + + + + +HTML; + +foreach( $rows as $r ) +{ +$IPBHTML .= << + + + + + + + + +HTML; +} + +$IPBHTML .= << +
    +
    + +
    +
    + + +
    +HTML; + +//--endhtml--// +return $IPBHTML; +} + } \ No newline at end of file diff --git a/upload/admin/applications/forums/skin_cp/cp_skin_forums.php b/upload/admin/applications/forums/skin_cp/cp_skin_forums.php index 679efd45..2895d098 100644 --- a/upload/admin/applications/forums/skin_cp/cp_skin_forums.php +++ b/upload/admin/applications/forums/skin_cp/cp_skin_forums.php @@ -1,1103 +1,1313 @@ - -
    -HTML; -$IPBHTML .= << -
    - -
      + {$this->lang->words['se_attachment']}{$this->lang->words['se_size']}{$this->lang->words['se_author']}{$this->lang->words['se_topic']}{$this->lang->words['se_posted']}
    caches['attachtypes'][ $r['attach_ext'] ]['atype_img']}' />{$r['attach_file']}{$r['attach_filesize']}{$r['members_display_name']}{$r['stitle']}{$r['attach_date']}
    -HTML; - - if( !$this->request['showall'] ) - { - $IPBHTML .= <<drag -HTML; - } - -$IPBHTML .= << - -HTML; - if ( $show_buttons ) - { - $IPBHTML .= <<   - -HTML; - } - $IPBHTML .= << -
    -
    -
    - {$content} -
    - - - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Display forum header - * - * @access public - * @return string HTML - */ -public function renderForumHeader( $nav ) { - -$IPBHTML = ""; -//--starthtml--// - -if( is_array( $nav ) && count( $nav ) ) -{ -$IPBHTML .= << - form_code}'>{$this->lang->words['for_forumscap']} -HTML; - - foreach( $nav as $n ) - { -$IPBHTML .= <<form_code}{$n[1]}'>{$n[0]} -HTML; - } - -$IPBHTML .= <<
    -HTML; -} - -$IPBHTML .= << -

    {$this->lang->words['for_title']}

    - - - - -
    -HTML; -if ( ipsRegistry::$request['showall'] ) -{ -$IPBHTML .= <<form_code}&showall=0'>{$this->lang->words['frm_showtier']} -HTML; -} -else -{ -$IPBHTML .= <<form_code}&showall=1'>{$this->lang->words['frm_showall']} -HTML; -} -$IPBHTML .= << - -
    -
    -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Display single forum moderator entry - * - * @access public - * @param array Moderator data - * @param integer Forum ID - * @return string HTML - */ -public function renderModeratorEntry( $data='', $forum_id=0 ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= <<{$data['_fullname']} {$this->lang->words[
    - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Display forum footer - * - * @access public - * @param string Forum dropdown - * @param string Options HTML for member groups - * @return string HTML - */ -public function renderForumFooter( $choose="", $mem_group ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - -
    - - - -
    - - - - - - -
    {$this->lang->words['frm_modaddtxt']}{$this->lang->words['frm_modname']} {$this->lang->words['frm_modorgroup']} {$mem_group}
    -
    -
    -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Render a forum row - * - * @access public - * @param string Description - * @param array Forum data - * @param string Depth guide - * @param string Skin used - * @return string HTML - */ -public function renderForumRow( $desc, $r, $depth_guide, $skin ) { - -$IPBHTML = ""; -//--starthtml--// - -if( $depth_guide ) -{ - $IPBHTML .= << -HTML; -} -else -{ - $IPBHTML .= << -HTML; -} - -$IPBHTML .= << -
    - - {$this->lang->words[ - -
    -
    -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Display "no forums" row - * - * @access public - * @param integer Parent ID - * @return string HTML - */ -public function renderNoForums( $parent_id ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << - - {$this->lang->words['frm_noforums']} - - - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Display forum permissions matrix - * - * @access public - * @param array Forum data - * @param array Relative links - * @param string Matrix HTML - * @param array ..of Forum Data - * @return string HTML - */ -public function forumPermissionForm( $forum, $relative, $perm_matrix, $forumData=array() ) { - -$IPBHTML = ""; -//--starthtml--// - -$title = urlencode($forum['name']); - -$IPBHTML .= << -

    {$this->lang->words['head_forum_permissions']} {$forumData['name']}

    -
    - -
    form_code}&do=pdoedit&f={$this->request['f']}&name={$title}&nextid={$relative['next']}&previd={$relative['previous']}' method='post'> - - {$perm_matrix } - -
    -
    -
    - -HTML; -if ( $relative['next'] > 0 ) -{ -$IPBHTML .= << -HTML; -} -$IPBHTML .= << - -HTML; -if ( $relative['next'] > 0 ) -{ -$IPBHTML .= << -HTML; -} -$IPBHTML .= << -
    -
    - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Display forum rules form - * - * @access public - * @param integer Forum ID - * @param array Forum data - * @return string HTML - */ -public function forumRulesForm( $id, $data ) -{ -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

    {$this->lang->words['forum_rules_head']} '{$data['name']}'

    -
    - -
    form_code}' method='post' name='theAdminForm' onclick='return ValidateForm();' id='postingform'> - - - -
    -

    {$this->lang->words['frm_rulessetup']}

    - -
      -
    • - - {$data['_show_rules']} -
    • -
    • - - {$data['_title']} -
    • -
    • - -
    • -
    • {$data['_editor']}
    • -
    - -
    -
    - -
    -
    -
    -
    -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Display forum skin options form - * - * @access public - * @param integer Forum id - * @param array Forum data - * @return string HTML - */ -public function forumSkinOptions( $id, $data ) -{ -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

    {$this->lang->words['modify_skin_head']}

    -
    - -
    form_code}' method='post' name='theAdminForm' id='theAdminForm'> - - - - -
    -

    {$this->lang->words['frm_skinchoice']}{$data['name']}

    - -
      -
    • - - {$data['fsid']} -
    • -
    • - - {$data['apply_to_children']} -
    • -
    - -
    -
    - -
    -
    -
    -
    -HTML; - -//--endhtml--// -return $IPBHTML; - -} - -/** - * Display form to empty a forum - * - * @access public - * @param integer Forum id - * @param array Forum data - * @return string HTML - */ -public function forumEmptyForum( $id, $forum ) -{ -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

    {$this->lang->words['frm_emptytitle']} '{$forum['name']}'

    -
    -

    - {$this->lang->words['for_empty_msg']} -

    -
    form_code}' method='post' name='theAdminForm' id='theAdminForm'> - - - - - -
    -

    {$this->lang->words['frm_emptytitle']}'{$forum['name']}'

    - -
      -
    • - - {$forum['name']} -
    • -
    - -
    -
    - -
    -
    -
    -
    -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Display form to delete a forum - * - * @access public - * @param integer Forum ID - * @param string Name - * @param string Options HTML for move to dropdown - * @return string HTML - */ -public function forumDeleteForm( $id, $name, $move ) -{ -$IPBHTML = ""; -//--starthtml--// - -$text = $is_cat ? $this->lang->words['for_iscat_y'] : $this->lang->words['for_iscat_n']; -$title = sprintf( $this->lang->words['for_removing'], $text, $name ); - -$IPBHTML .= << -

    {$title}

    - - -
    form_code}' method='post' name='theAdminForm' id='theAdminForm'> - - - - -
    -

    {$this->lang->words['frm_deletetitle']}{$name}

    - -
      -
    • - - {$name} -
    • -HTML; - -if( $move ) -{ - $IPBHTML .= << - - {$move} - -HTML; -} - -$IPBHTML .= << - -
      -
      - -
      -
      -
    -
    -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Display form to add/edit a forum - * - * @access public - * @param array Form fields - * @param string Button text - * @param string Action code - * @param string Title - * @param string Button text (again?) - * @param array Forum data - * @param string Permissions matrix - * @return string HTML - */ -public function forumForm( $form, $button, $code, $title, $forum, $perm_matrix ) { - -$IPBHTML = ""; -//--starthtml--// - -$_forUrl = urlencode($forum['name']); - -$IPBHTML .= << -

    $title

    - - - -
    form_code}&do={$code}&f={$this->request['f']}&name={$_forUrl}' method='post'> - - - - -
    -

    $title

    - -
      -
    • - -
    • - - {$form['name']} -
    • -HTML; - -if( $form['addnew_type'] != 'category' ) -{ -$IPBHTML .= << - - {$form['description']} - - -
    • - - {$form['parent_id']} -
    • -
    • - - {$form['status']} -
    • -
    • - - {$form['sub_can_post']} -
    • - -
    • - -
    • - - {$form['redirect_url']} -
    • -
    • - - {$form['redirect_on']} -
    • -
    • - - {$form['redirect_hits']} -
    • - -
    • - -
    • - - {$form['hide_last_info']} -
    • -
    • - - {$form['permission_showtopic']} -
    • -
    • - - {$form['permission_custom_error']} -
    • - -
    • - -
    • - - {$form['use_html']} -
    • -
    • - - {$form['use_ibc']} -
    • -
    • - - {$form['quick_reply']} -
    • -
    • - - {$form['allow_poll']} -
    • -
    • - - {$form['allow_pollbump']} -
    • -
    • - - {$form['forum_allow_rating']} -
    • -
    • - - {$form['inc_postcount']} -
    • -
    • - - {$form['min_posts_post']} -
    • -
    • - - {$form['min_posts_view']} -
    • -
    • - - {$form['can_view_others']} -
    • - -
    • - -
    • - - {$form['preview_posts']} -
    • -
    • - - {$form['notify_modq_emails']} -
    • -
    • - - {$form['password']} -
    • -
    • - - {$form['password_override']} -
    • - -
    • - -
    • - - {$form['prune']} -
    • -
    • - - {$form['sort_key']} -
    • -
    • - - {$form['sort_order']} -
    • -
    • - - {$form['topicfilter']} -
    • -HTML; -} -else -{ -$IPBHTML .= << -
    - - - - -HTML; -} - -if ( $perm_matrix ) -{ -$IPBHTML .= << -$perm_matrix -
    -HTML; -} -$IPBHTML .= << -
    - {$this->lang->words['frm_or']}  {$form['convert_button']} -
    - -
    -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Select a moderator gateway page - * - * @access public - * @param integer Forum ID - * @param string Dropdown options of members - * @return string HTML - */ -public function moderatorSelectForm( $fid, $member_drop ) { -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= <<form_code}' method='post' name='theAdminForm' id='theAdminForm'> - - - - -
    -

    {$this->lang->words['frm_m_search']}

    - -
      -
    • - - {$member_drop} -
    • -
    - -
    -
    - -
    -
    -
    - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Display moderator add/edit form - * - * @access public - * @param array Form fields - * @param string Action code - * @param integer Member ID - * @param string Searched member text - * @param string Type - * @param integer Group ID - * @param string Group name - * @param string Button text - * @return string HTML - */ -public function moderatorPermissionForm( $form, $form_code, $mid, $mem, $type, $gid, $gname, $button ) { - -$IPBHTML = ""; -//--starthtml--// - -if( $form_code == 'doedit' ) -{ - $title = $this->lang->words['mod_edit']; -} -else if ( $this->request['group'] ) -{ - $title = $this->lang->words['mod_addgroup']; -} -else -{ - $title = $this->lang->words['mod_add']; -} - -$IPBHTML .= << -

    {$title}

    - - -
    form_code}' method='post' name='theAdminForm' id='theAdminForm'> - - - - - - - - -
    -

    {$this->lang->words['frm_m_genset']}

    - -
      -
    • - - {$form['forums']} -
    • -
    • - - {$form['edit_post']} -
    • - -
    • - - {$form['edit_topic']} -
    • - -
    • - - {$form['delete_post']} -
    • - -
    • - - {$form['delete_topic']} -
    • - -
    • - - {$form['view_ip']} -
    • - -
    • - - {$form['open_topic']} -
    • - -
    • - - {$form['close_topic']} -
    • - -
    • - - {$form['move_topic']} -
    • - -
    • - - {$form['pin_topic']} -
    • - -
    • - - {$form['unpin_topic']} -
    • - -
    • - - {$form['split_merge']} -
    • - -
    • - - {$form['mod_can_set_open_time']} -
    • - -
    • - - {$form['mod_can_set_close_time']} -
    • -
    -
    -
    -
    -

    {$this->lang->words['frm_m_msettings']}

    - -
      -
    • - - {$form['mass_move']} -
    • - -
    • - - {$form['mass_prune']} -
    • - -
    • - - {$form['topic_q']} -
    • - -
    • - - {$form['post_q']} -
    • -
    -
    -
    -
    -

    {$this->lang->words['frm_m_asettings']}

    - -
      -
    • - - {$form['allow_warn']} -
    • -
    • - - {$form['bw_flag_spammers']} -
    • -
    • - - {$form['can_mm']} -
    • - - -
      -
      - -
      -
      -
    -
    -HTML; - -//--endhtml--// -return $IPBHTML; -} + + * Invision Power Services + * IP.Board v3.1.4 + * Forums skin functions + * Last Updated: $LastChangedDate: 2010-11-08 15:39:48 -0500 (Mon, 08 Nov 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 14th May 2003 + * @version $Rev: 7117 $ + */ + +class cp_skin_forums extends output +{ + +/** + * Prevent our main destructor being called by this class + * + * @access public + * @return void + */ +public function __destruct() +{ +} + +/** + * Forum wrapper + * + * @access public + * @param string Content + * @param array Forum data + * @param bool Show buttons or not + * @return string HTML + */ +public function forumWrapper( $content, $r, $show_buttons=1 ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +
    +HTML; +$IPBHTML .= << + + +HTML; + + if( !$this->request['showall'] ) + { + $IPBHTML .= <<drag
    +HTML; + } + +$IPBHTML .= << + +HTML; + if ( $show_buttons ) + { + $IPBHTML .= <<   + +HTML; + } + $IPBHTML .= << + + + +
    + {$content} +
    + + + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Display forum header + * + * @access public + * @return string HTML + */ +public function renderForumHeader( $nav ) { + +$IPBHTML = ""; +//--starthtml--// + +if( is_array( $nav ) && count( $nav ) ) +{ +$IPBHTML .= << + form_code}'>{$this->lang->words['for_forumscap']} +HTML; + + foreach( $nav as $n ) + { +$IPBHTML .= <<form_code}{$n[1]}'>{$n[0]} +HTML; + } + +$IPBHTML .= <<
    +HTML; +} + +$IPBHTML .= << +

    {$this->lang->words['for_title']}

    + + + + +
    +HTML; +if ( ipsRegistry::$request['showall'] ) +{ +$IPBHTML .= <<form_code}&showall=0'>{$this->lang->words['frm_showtier']} +HTML; +} +else +{ +$IPBHTML .= <<form_code}&showall=1'>{$this->lang->words['frm_showall']} +HTML; +} +$IPBHTML .= << + +
    +
    +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Display single forum moderator entry + * + * @access public + * @param array Moderator data + * @param integer Forum ID + * @return string HTML + */ +public function renderModeratorEntry( $data='', $forum_id=0 ) { + +$return_id = intval( $this->request['f'] ); + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= <<{$data['_fullname']} {$this->lang->words[
    + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Display forum footer + * + * @access public + * @param string Forum dropdown + * @param string Options HTML for member groups + * @return string HTML + */ +public function renderForumFooter( $choose="", $mem_group ) { + +$return_id = intval( $this->request['f'] ); + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << + +
    + + + + +
    + + + + + + +
    {$this->lang->words['frm_modaddtxt']}{$this->lang->words['frm_modname']} {$this->lang->words['frm_modorgroup']} {$mem_group}
    +
    +
    +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Render a forum row + * + * @access public + * @param string Description + * @param array Forum data + * @param string Depth guide + * @param string Skin used + * @return string HTML + */ +public function renderForumRow( $desc, $r, $depth_guide, $skin ) { + +$IPBHTML = ""; +//--starthtml--// + +if( $depth_guide ) +{ + $IPBHTML .= << +HTML; +} +else +{ + $IPBHTML .= << +HTML; +} + +$IPBHTML .= << + +HTML; + +if( !$this->request['showall'] ) +{ + $IPBHTML .= << +
    drag
    + +HTML; +} + + if( $depth_guide ) + { + $IPBHTML .= << + {$depth_guide} + +HTML; + } + + $IPBHTML .= << +HTML; +if ( $r['id'] == $this->settings['forum_trash_can_id'] ) +{ +$IPBHTML .= << +HTML; +} + +$IPBHTML .= <<{$r['name']} +HTML; + +if( $desc ) +{ + $IPBHTML .= <<{$desc} +HTML; +} + +if ( ($r['skin_id'] != "") and ($r['skin_id'] > 0) ) +{ +$IPBHTML .= <<[ {$this->lang->words['using_skin_set']} {$skin} ] +HTML; +} + +$IPBHTML .= <<
    {$this->lang->words['frm_moderators']}{$r['_modstring']}
    +HTML; +} + +$IPBHTML .= << + + + {$this->lang->words[ + + + + + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Display "no forums" row + * + * @access public + * @param integer Parent ID + * @return string HTML + */ +public function renderNoForums( $parent_id ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << + + {$this->lang->words['frm_noforums']} + + + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Display forum permissions matrix + * + * @access public + * @param array Forum data + * @param array Relative links + * @param string Matrix HTML + * @param array ..of Forum Data + * @return string HTML + */ +public function forumPermissionForm( $forum, $relative, $perm_matrix, $forumData=array(), $forumCopyDropDown ) { + +$IPBHTML = ""; +//--starthtml--// + +$title = urlencode($forum['name']); + +$IPBHTML .= << +

    {$this->lang->words['head_forum_permissions']} {$forumData['name']}

    + + +
    +
    form_code}&do=pedit&f={$this->request['f']}' method='post'> + {$this->lang->words['copy_perms_from']} {$forumCopyDropDown} + +
    +
    +

    +
    form_code}&do=pdoedit&f={$this->request['f']}&name={$title}&nextid={$relative['next']}&previd={$relative['previous']}' method='post'> + + {$perm_matrix } + +
    +
    +
    + +HTML; +if ( $relative['next'] > 0 ) +{ +$IPBHTML .= << +HTML; +} +$IPBHTML .= << + +HTML; +if ( $relative['next'] > 0 ) +{ +$IPBHTML .= << +HTML; +} +$IPBHTML .= << +
    +
    + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Display forum rules form + * + * @access public + * @param integer Forum ID + * @param array Forum data + * @return string HTML + */ +public function forumRulesForm( $id, $data ) +{ +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

    {$this->lang->words['forum_rules_head']} '{$data['name']}'

    +
    + +
    form_code}' method='post' name='theAdminForm' onclick='return ValidateForm();' id='postingform'> + + + +
    +

    {$this->lang->words['frm_rulessetup']}

    + +
      +
    • + + {$data['_show_rules']} +
    • +
    • + + {$data['_title']} +
    • +
    • + +
    • +
    • {$data['_editor']}
    • +
    • + + {$data['rules_raw_html']} +
    • +
    + +
    +
    + +
    +
    +
    +
    +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Display forum skin options form + * + * @access public + * @param integer Forum id + * @param array Forum data + * @return string HTML + */ +public function forumSkinOptions( $id, $data ) +{ +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

    {$this->lang->words['modify_skin_head']}

    + + +
    form_code}' method='post' name='theAdminForm' id='theAdminForm'> + + + + +
    +

    {$this->lang->words['frm_skinchoice']}{$data['name']}

    + +
      +
    • + + {$data['fsid']} +
    • +
    • + + {$data['apply_to_children']} +
    • +
    + +
    +
    + +
    +
    +
    +
    +HTML; + +//--endhtml--// +return $IPBHTML; + +} + +/** + * Display form to empty a forum + * + * @access public + * @param integer Forum id + * @param array Forum data + * @return string HTML + */ +public function forumEmptyForum( $id, $forum ) +{ +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

    {$this->lang->words['frm_emptytitle']} '{$forum['name']}'

    + +

    + {$this->lang->words['for_empty_msg']} +

    +
    form_code}' method='post' name='theAdminForm' id='theAdminForm'> + + + + +
    +

    {$this->lang->words['frm_emptytitle']}'{$forum['name']}'

    + +
      +
    • + + {$forum['name']} +
    • +
    + +
    +
    + +
    +
    +
    +
    +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Display form to delete a forum + * + * @access public + * @param integer Forum ID + * @param string Name + * @param string Options HTML for move to dropdown + * @param integer [Category=1|Forum=0] + * @return string HTML + */ +public function forumDeleteForm( $id, $name, $move, $is_cat ) +{ +$IPBHTML = ""; +//--starthtml--// + +$text = $is_cat ? $this->lang->words['for_iscat_y'] : $this->lang->words['for_iscat_n']; +$title = sprintf( $this->lang->words['for_removing'], $text, $name ); + +$IPBHTML .= << +

    {$title}

    + + +
    form_code}' method='post' name='theAdminForm' id='theAdminForm'> + + + + +
    +

    {$this->lang->words['frm_deletetitle']}{$name}

    + +
      +
    • + + {$name} +
    • +HTML; + +if( $move ) +{ + $IPBHTML .= << + + {$move} + +HTML; +} + +$IPBHTML .= << + +
      +
      + +
      +
      +
    +
    +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Display form to add/edit a forum + * + * @access public + * @param array Form fields + * @param string Button text + * @param string Action code + * @param string Title + * @param string Button text (again?) + * @param array Forum data + * @param string Permissions matrix + * @return string HTML + */ +public function forumForm( $form, $button, $code, $title, $forum, $perm_matrix ) { + +$IPBHTML = ""; +//--starthtml--// + +$_forUrl = urlencode($forum['name']); + +$IPBHTML .= << +

    {$title}

    + + +
      +
    • {$this->lang->words['frm_f_basic']}
    • +HTML; + +if( $form['addnew_type'] != 'category' ) +{ +$IPBHTML .= <<{$this->lang->words['from_f_postable_settings']} +HTML; +} +if ( $perm_matrix ) +{ +$IPBHTML .= <<{$this->lang->words['from_f_perms']} +HTML; +} +if( $form['addnew_type'] != 'category' ) +{ +$IPBHTML .= << + + + + +
      form_code}&do={$code}&f={$this->request['f']}&name={$_forUrl}' method='post'> + + + + +
      +
      +
        +
      • + +
      • + + {$form['name']} +
      • +HTML; + +if( $form['addnew_type'] != 'category' ) +{ +$IPBHTML .= << + + {$form['description']} + + +
      • + + {$form['parent_id']} +
      • +
      • + + {$form['status']} +
      • +
      • + + {$form['sub_can_post']} +
      • + +
      • + +
      • + + {$form['redirect_url']} +
      • +
      • + + {$form['redirect_on']} +
      • +
      • + + {$form['redirect_hits']} +
      • + +
      • + +
      • + + {$form['disable_sharelinks']} +
      • +
      • + + {$form['hide_last_info']} +
      • +
      • + + {$form['permission_showtopic']} +
      • +
      • + + {$form['permission_custom_error']} +
      • +
      +
      +
      + +
      +
      +
        +
      • + +
      • + + {$form['use_html']} +
      • +
      • + + {$form['use_ibc']} +
      • +
      • + + {$form['quick_reply']} +
      • +
      • + + {$form['allow_poll']} +
      • +
      • + + {$form['allow_pollbump']} +
      • +
      • + + {$form['forum_allow_rating']} +
      • +
      • + + {$form['inc_postcount']} +
      • +
      • + + {$form['min_posts_post']} +
      • +
      • + + {$form['min_posts_view']} +
      • +
      • + + {$form['can_view_others']} +
      • + +
      • + +
      • + + {$form['preview_posts']} +
      • +
      • + + {$form['notify_modq_emails']} +
      • +
      • + + {$form['password']} +
      • +
      • + + {$form['password_override']} +
      • + +
      • + +
      • + + {$form['prune']} +
      • +
      • + + {$form['sort_key']} +
      • +
      • + + {$form['sort_order']} +
      • +
      • + + {$form['topicfilter']} +
      • +
      +
      +
      +HTML; + +} + +if ( $perm_matrix ) +{ + if( $form['addnew_type'] == 'category' ) + { + $IPBHTML .= << + + +HTML; + } + +$IPBHTML .= << +
      + {$perm_matrix} +
      + +HTML; +} + +if( $form['addnew_type'] != 'category' ) +{ +$IPBHTML .= << + + +HTML; +} + +$IPBHTML .= << +
      + {$this->lang->words['frm_or']}  {$form['convert_button']} +
      + +
      +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Select a moderator gateway page + * + * @access public + * @param integer Forum ID + * @param string Dropdown options of members + * @return string HTML + */ +public function moderatorSelectForm( $fid, $member_drop ) { + +$return_id = intval( $this->request['return_id'] ); + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= <<form_code}' method='post' name='theAdminForm' id='theAdminForm'> + + + + + +
      +

      {$this->lang->words['frm_m_search']}

      + +
        +
      • + + {$member_drop} +
      • +
      + +
      +
      + +
      +
      +
      + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Display moderator add/edit form + * + * @access public + * @param array Form fields + * @param string Action code + * @param integer Member ID + * @param string Searched member text + * @param string Type + * @param integer Group ID + * @param string Group name + * @param string Button text + * @return string HTML + */ +public function moderatorPermissionForm( $form, $form_code, $mid, $mem, $type, $gid, $gname, $button ) { + +$return_id = intval( $this->request['return_id'] ); + +$IPBHTML = ""; +//--starthtml--// + +if( $form_code == 'doedit' ) +{ + $title = $this->lang->words['mod_edit']; +} +else if ( $this->request['group'] ) +{ + $title = $this->lang->words['mod_addgroup']; +} +else +{ + $title = $this->lang->words['mod_add']; +} + +$IPBHTML .= << +

      {$title}

      + + +
      form_code}' method='post' name='theAdminForm' id='theAdminForm'> + + + + + + + + + +
      +

      {$this->lang->words['frm_m_genset']}

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + {$this->lang->words['frm_mod_forums']} + + {$form['forums']} +
      + {$this->lang->words['frm_m_edit']} + + {$form['edit_post']} +
      + {$this->lang->words['frm_m_topic']} + + {$form['edit_topic']} +
      + {$this->lang->words['frm_m_delete']} + + {$form['delete_post']} +
      + {$this->lang->words['frm_m_deletetop']} + + {$form['delete_topic']} +
      + {$this->lang->words['gf_bw_soft_delete']} +
      {$this->lang->words['soft_delete_info']}
      +
      + {$form['bw_mod_soft_delete']} +
      + {$this->lang->words['gf_bw_un_soft_delete']} +
      {$this->lang->words['soft_delete_info']}
      +
      + {$form['bw_mod_un_soft_delete']} +
      + {$this->lang->words['gf_bw_soft_delete_see']} +
      {$this->lang->words['gbw_soft_delete_see_d']}
      +
      + {$form['bw_mod_soft_delete_see']} +
      + {$this->lang->words['gf_bw_soft_delete_topic']} +
      {$this->lang->words['soft_delete_info']}
      +
      + {$form['bw_mod_soft_delete_topic']} +
      + {$this->lang->words['gf_bw_un_soft_delete_topic']} +
      {$this->lang->words['soft_delete_info']}
      +
      + {$form['bw_mod_un_soft_delete_topic']} +
      + {$this->lang->words['gf_bw_soft_delete_topic_see']} +
      {$this->lang->words['gbw_soft_delete_topic_see_d']}
      +
      + {$form['bw_mod_soft_delete_topic_see']} +
      + {$this->lang->words['gf_bw_soft_delete_reason']} +
      {$this->lang->words['soft_delete_info']}
      +
      + {$form['bw_mod_soft_delete_reason']} +
      + {$this->lang->words['gf_bw_soft_delete_see_post']} +
      {$this->lang->words['gbw_soft_delete_see_post_d']}
      +
      + {$form['bw_mod_soft_delete_see_post']} +
      + {$this->lang->words['frm_m_ip']} + + {$form['view_ip']} +
      + {$this->lang->words['frm_m_open']} + + {$form['open_topic']} +
      + {$this->lang->words['frm_m_close']} + + {$form['close_topic']} +
      + {$this->lang->words['frm_m_move']} + + {$form['move_topic']} +
      + {$this->lang->words['frm_m_pin']} + + {$form['pin_topic']} +
      + {$this->lang->words['frm_m_unpin']} + + {$form['unpin_topic']} +
      + {$this->lang->words['frm_m_split']} + + {$form['split_merge']} +
      + {$this->lang->words['frm_m_opentime']} + + {$form['mod_can_set_open_time']} +
      + {$this->lang->words['frm_m_closetime']} + + {$form['mod_can_set_close_time']} +
      +
      +
      +
      +

      {$this->lang->words['frm_m_msettings']}

      + +
        +
      • + + {$form['mass_move']} +
      • + +
      • + + {$form['mass_prune']} +
      • + +
      • + + {$form['topic_q']} +
      • + +
      • + + {$form['post_q']} +
      • +
      +
      +
      +
      +

      {$this->lang->words['frm_m_asettings']}

      + +
        +
      • + + {$form['allow_warn']} +
      • +
      • + + {$form['bw_flag_spammers']} +
      • +
      • + + {$form['can_mm']} +
      • + + +
        +
        + +
        +
        +
      +
      +HTML; + +//--endhtml--// +return $IPBHTML; +} } \ No newline at end of file diff --git a/upload/admin/applications/forums/skin_cp/cp_skin_group_form.php b/upload/admin/applications/forums/skin_cp/cp_skin_group_form.php index 0a9828be..7fae3f11 100644 --- a/upload/admin/applications/forums/skin_cp/cp_skin_group_form.php +++ b/upload/admin/applications/forums/skin_cp/cp_skin_group_form.php @@ -1,306 +1,427 @@ -settings['guest_group'] ? $this->lang->words['g_applyguest'] : ''; - -$gbw_unit_type = array( - 0 => array( 0, $this->lang->words['g_dd_apprp'] ), - 1 => array( 1, $this->lang->words['g_dd_days'] ) ); -$dd_topic_rate = array( - 0 => array( 0, $this->lang->words['g_no'] ), - 1 => array( 1, $this->lang->words['g_yes1'] ), - 2 => array( 2, $this->lang->words['g_yes2'] ) - ); - -$form = array(); -$form['g_other_topics'] = $this->registry->output->formYesNo( "g_other_topics", $group['g_other_topics'] ); -$form['g_post_new_topics'] = $this->registry->output->formYesNo( "g_post_new_topics", $group['g_post_new_topics'] ); -$form['g_topic_rate_setting'] = $this->registry->output->formDropdown( "g_topic_rate_setting", $dd_topic_rate, $group['g_topic_rate_setting'] ); -$form['g_reply_own_topics'] = $this->registry->output->formYesNo( "g_reply_own_topics", $group['g_reply_own_topics'] ); -$form['g_reply_other_topics'] = $this->registry->output->formYesNo( "g_reply_other_topics", $group['g_reply_other_topics'] ); -$form['g_edit_posts'] = $this->registry->output->formYesNo( "g_edit_posts", $group['g_edit_posts'] ); -$form['g_edit_cutoff'] = $this->registry->output->formInput( "g_edit_cutoff", $group['g_edit_cutoff'] ); -$form['g_append_edit'] = $this->registry->output->formYesNo( "g_append_edit", $group['g_append_edit'] ); -$form['g_delete_own_posts'] = $this->registry->output->formYesNo( "g_delete_own_posts", $group['g_delete_own_posts'] ); -$form['g_open_close_posts'] = $this->registry->output->formYesNo( "g_open_close_posts", $group['g_open_close_posts'] ); -$form['g_edit_topic'] = $this->registry->output->formYesNo( "g_edit_topic", $group['g_edit_topic'] ); -$form['g_delete_own_topics'] = $this->registry->output->formYesNo( "g_delete_own_topics", $group['g_delete_own_topics'] ); -$form['g_post_polls'] = $this->registry->output->formYesNo( "g_post_polls", $group['g_post_polls'] ); -$form['g_vote_polls'] = $this->registry->output->formYesNo( "g_vote_polls", $group['g_vote_polls'] ); -$form['g_avoid_flood'] = $this->registry->output->formYesNo( "g_avoid_flood", $group['g_avoid_flood'] ); -$form['g_avoid_q'] = $this->registry->output->formYesNo( "g_avoid_q", $group['g_avoid_q'] ); -$form['g_post_closed'] = $this->registry->output->formYesNo( "g_post_closed", $group['g_post_closed'] ); -$form['g_mod_preview'] = $this->registry->output->formYesNo( "g_mod_preview", $group['g_mod_preview'] ); -$form['g_mod_post_unit'] = $this->registry->output->formSimpleInput( "g_mod_post_unit", $group['g_mod_post_unit'], 3 ); -$form['gbw_mod_post_unit_type'] = $this->registry->output->formDropdown( "gbw_mod_post_unit_type", $gbw_unit_type, $group['gbw_mod_post_unit_type'] ); -$form['g_ppd_limit'] = $this->registry->output->formSimpleInput( "g_ppd_limit", $group['g_ppd_limit'], 3 ); -$form['g_ppd_unit'] = $this->registry->output->formSimpleInput( "g_ppd_unit", $group['g_ppd_unit'], 3 ); -$form['gbw_ppd_unit_type'] = $this->registry->output->formDropdown( "gbw_ppd_unit_type", $gbw_unit_type, $group['gbw_ppd_unit_type'] ); - -$IPBHTML = ""; - -$IPBHTML .= << -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      {$this->lang->words['gt_rating']}
      - - - {$form['g_topic_rate_setting']} -
      {$this->lang->words['gt_viewing']}
      - - - {$form['g_other_topics']} -
      {$this->lang->words['gt_posting']}
      - - - {$form['g_post_new_topics']} -
      - - - {$form['g_reply_own_topics']} -
      - - - {$form['g_reply_other_topics']} -
      {$this->lang->words['gt_editing']}
      - - - {$form['g_edit_posts']} -
      - - {$this->lang->words['g_edit_cutoff_info']} - - {$form['g_edit_cutoff']} -
      - - - {$form['g_append_edit']} -
      - - - {$form['g_edit_topic']} -
      {$this->lang->words['gt_deleting']}
      - - - {$form['g_delete_own_posts']} -
      - - - {$form['g_delete_own_topics']} -
      {$this->lang->words['gt_openclose']}
      - - - {$form['g_open_close_posts']} -
      - - - {$form['g_post_closed']} -
      {$this->lang->words['gt_polling']}
      - - - {$form['g_post_polls']} -
      - - - {$form['g_vote_polls']} -
      {$this->lang->words['gt_avoidance']}
      - - - {$form['g_avoid_flood']} -
      - - - {$form['g_avoid_q']} -
      {$this->lang->words['gt_restrictions']}
      - - -

      {$form['g_mod_preview']}   {$this->lang->words['g_until']} {$form['g_mod_post_unit']} {$form['gbw_mod_post_unit_type']}

      -

      {$this->lang->words['g_limit_dd']}

      -
      - - -

      Максимум {$form['g_ppd_limit']} {$this->lang->words['g_ppd']} {$form['g_ppd_unit']} {$form['gbw_ppd_unit_type']}

      -

      {$this->lang->words['g_limit_dd']}

      -
      -
      - - -EOF; - -return $IPBHTML; -} - -/** - * Display forum group form tabs - * - * @access public - * @param array Group data - * @param string Tab id - * @return string HTML - */ -public function acp_group_form_tabs( $group, $tabId ) { - -$IPBHTML = ""; - -$IPBHTML .= <<{$this->lang->words['g_forperm']} -EOF; - -return $IPBHTML; -} - + + * Invision Power Services + * IP.Board v3.1.4 + * Group plugin skin functions + * Last Updated: $LastChangedDate: 2010-07-09 23:59:26 -0400 (Fri, 09 Jul 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 14th May 2003 + * @version $Rev: 6627 $ + */ + +class cp_skin_group_form extends output +{ + +/** + * Prevent our main destructor being called by this class + * + * @access public + * @return void + */ +public function __destruct() +{ +} + + +/** + * Show forums group form + * + * @access public + * @param array Group data + * @param string Tab ID + * @return string HTML + */ +public function acp_group_form_main( $group, $tabId ) { + +$guest_legend = $group['g_id'] == $this->settings['guest_group'] ? $this->lang->words['g_applyguest'] : ''; + +$gbw_unit_type = array( + 0 => array( 0, $this->lang->words['g_dd_apprp'] ), + 1 => array( 1, $this->lang->words['g_dd_days'] ) ); +$dd_topic_rate = array( + 0 => array( 0, $this->lang->words['g_no'] ), + 1 => array( 1, $this->lang->words['g_yes1'] ), + 2 => array( 2, $this->lang->words['g_yes2'] ) + ); + +$form = array(); +$form['g_other_topics'] = $this->registry->output->formYesNo( "g_other_topics", $group['g_other_topics'] ); +$form['g_post_new_topics'] = $this->registry->output->formYesNo( "g_post_new_topics", $group['g_post_new_topics'] ); +$form['g_topic_rate_setting'] = $this->registry->output->formDropdown( "g_topic_rate_setting", $dd_topic_rate, $group['g_topic_rate_setting'] ); +$form['g_reply_own_topics'] = $this->registry->output->formYesNo( "g_reply_own_topics", $group['g_reply_own_topics'] ); +$form['g_reply_other_topics'] = $this->registry->output->formYesNo( "g_reply_other_topics", $group['g_reply_other_topics'] ); +$form['g_edit_posts'] = $this->registry->output->formYesNo( "g_edit_posts", $group['g_edit_posts'] ); +$form['g_edit_cutoff'] = $this->registry->output->formInput( "g_edit_cutoff", $group['g_edit_cutoff'] ); +$form['g_append_edit'] = $this->registry->output->formYesNo( "g_append_edit", $group['g_append_edit'] ); +$form['g_delete_own_posts'] = $this->registry->output->formYesNo( "g_delete_own_posts", $group['g_delete_own_posts'] ); +$form['g_open_close_posts'] = $this->registry->output->formYesNo( "g_open_close_posts", $group['g_open_close_posts'] ); +$form['g_edit_topic'] = $this->registry->output->formYesNo( "g_edit_topic", $group['g_edit_topic'] ); +$form['g_delete_own_topics'] = $this->registry->output->formYesNo( "g_delete_own_topics", $group['g_delete_own_topics'] ); +$form['g_post_polls'] = $this->registry->output->formYesNo( "g_post_polls", $group['g_post_polls'] ); +$form['g_vote_polls'] = $this->registry->output->formYesNo( "g_vote_polls", $group['g_vote_polls'] ); +$form['g_avoid_flood'] = $this->registry->output->formYesNo( "g_avoid_flood", $group['g_avoid_flood'] ); +$form['g_avoid_q'] = $this->registry->output->formYesNo( "g_avoid_q", $group['g_avoid_q'] ); +$form['g_post_closed'] = $this->registry->output->formYesNo( "g_post_closed", $group['g_post_closed'] ); +$form['g_mod_preview'] = $this->registry->output->formYesNo( "g_mod_preview", $group['g_mod_preview'] ); +$form['g_mod_post_unit'] = $this->registry->output->formSimpleInput( "g_mod_post_unit", $group['g_mod_post_unit'], 3 ); +$form['gbw_mod_post_unit_type'] = $this->registry->output->formDropdown( "gbw_mod_post_unit_type", $gbw_unit_type, $group['gbw_mod_post_unit_type'] ); +$form['g_ppd_limit'] = $this->registry->output->formSimpleInput( "g_ppd_limit", $group['g_ppd_limit'], 3 ); +$form['g_ppd_unit'] = $this->registry->output->formSimpleInput( "g_ppd_unit", $group['g_ppd_unit'], 3 ); +$form['gbw_ppd_unit_type'] = $this->registry->output->formDropdown( "gbw_ppd_unit_type", $gbw_unit_type, $group['gbw_ppd_unit_type'] ); + +$form['gbw_soft_delete'] = $this->registry->output->formYesNo( "gbw_soft_delete", $group['gbw_soft_delete'] ); +$form['gbw_soft_delete_own'] = $this->registry->output->formYesNo( "gbw_soft_delete_own", $group['gbw_soft_delete_own'] ); +$form['gbw_soft_delete_own_topic'] = $this->registry->output->formYesNo( "gbw_soft_delete_own_topic", $group['gbw_soft_delete_own_topic'] ); +$form['gbw_un_soft_delete'] = $this->registry->output->formYesNo( "gbw_un_soft_delete", $group['gbw_un_soft_delete'] ); +$form['gbw_soft_delete_see'] = $this->registry->output->formYesNo( "gbw_soft_delete_see", $group['gbw_soft_delete_see'] ); +$form['gbw_soft_delete_topic'] = $this->registry->output->formYesNo( "gbw_soft_delete_topic", $group['gbw_soft_delete_topic'] ); +$form['gbw_un_soft_delete_topic'] = $this->registry->output->formYesNo( "gbw_un_soft_delete_topic", $group['gbw_un_soft_delete_topic'] ); +$form['gbw_soft_delete_topic_see'] = $this->registry->output->formYesNo( "gbw_soft_delete_topic_see", $group['gbw_soft_delete_topic_see'] ); +$form['gbw_soft_delete_reason'] = $this->registry->output->formYesNo( "gbw_soft_delete_reason", $group['gbw_soft_delete_reason'] ); +$form['gbw_soft_delete_see_post'] = $this->registry->output->formYesNo( "gbw_soft_delete_see_post", $group['gbw_soft_delete_see_post'] ); + + +$IPBHTML = ""; + +$IPBHTML .= << +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      {$this->lang->words['gf_t_rating']}
      + + + {$form['g_topic_rate_setting']} +
      {$this->lang->words['gf_t_viewing']}
      + + + {$form['g_other_topics']} +
      {$this->lang->words['gf_t_posting']}
      + + + {$form['g_post_new_topics']} +
      + + + {$form['g_reply_own_topics']} +
      + + + {$form['g_reply_other_topics']} +
      {$this->lang->words['gf_t_editing']}
      + + + {$form['g_edit_posts']} +
      + +
      {$this->lang->words['gf_edit_cuttoff_info']}
      +
      + {$form['g_edit_cutoff']} +
      + + + {$form['g_append_edit']} +
      + + + {$form['g_edit_topic']} +
      {$this->lang->words['gf_t_deleting']}
      + +

      {$this->lang->words['hard_delete_info']}

      + {$this->lang->words['sup_mod_already']} +
      + {$form['g_delete_own_posts']} +
      + +

      {$this->lang->words['hard_delete_info']}

      + {$this->lang->words['sup_mod_already']} +
      + {$form['g_delete_own_topics']} +
      + +

      {$this->lang->words['soft_delete_info']}

      + {$this->lang->words['sup_mod_already']} +
      + {$form['gbw_soft_delete']} +
      + +

      {$this->lang->words['soft_delete_info']}

      + {$this->lang->words['sup_mod_already']} +
      + {$form['gbw_soft_delete_own']} +
      + +

      {$this->lang->words['soft_delete_info']}

      + {$this->lang->words['sup_mod_already']} +
      + {$form['gbw_un_soft_delete']} +
      + +

      {$this->lang->words['gbw_soft_delete_see_d']}

      + {$this->lang->words['sup_mod_already']} +
      + {$form['gbw_soft_delete_see']} +
      + +

      {$this->lang->words['soft_delete_info']}

      + {$this->lang->words['sup_mod_already']} +
      + {$form['gbw_soft_delete_topic']} +
      + +

      {$this->lang->words['soft_delete_info']}

      + {$this->lang->words['sup_mod_already']} +
      + {$form['gbw_soft_delete_own_topic']} +
      + +

      {$this->lang->words['soft_delete_info']}

      + {$this->lang->words['sup_mod_already']} +
      + {$form['gbw_un_soft_delete_topic']} +
      + +

      {$this->lang->words['gbw_soft_delete_topic_see_d']}

      + {$this->lang->words['sup_mod_already']} +
      + {$form['gbw_soft_delete_topic_see']} +
      + +

      {$this->lang->words['soft_delete_info']}

      + {$this->lang->words['sup_mod_already']} +
      + {$form['gbw_soft_delete_reason']} +
      + +

      {$this->lang->words['gbw_soft_delete_see_post_d']}

      + {$this->lang->words['sup_mod_already']} +
      + {$form['gbw_soft_delete_see_post']} +
      {$this->lang->words['gf_t_openclose']}
      + + + {$form['g_open_close_posts']} +
      + + + {$form['g_post_closed']} +
      {$this->lang->words['gf_t_polling']}
      + + + {$form['g_post_polls']} +
      + + {$guest_legend} + + {$form['g_vote_polls']} +
      {$this->lang->words['gf_t_avoidance']}
      + + + {$form['g_avoid_flood']} +
      + + + {$form['g_avoid_q']} +
      {$this->lang->words['gf_t_restrictions']}
      + + +

      {$form['g_mod_preview']}   {$this->lang->words['g_until']} {$form['g_mod_post_unit']} {$form['gbw_mod_post_unit_type']}

      +

      {$this->lang->words['g_limit_dd']}

      +
      + + +

      {$this->lang->words['g_max']} {$form['g_ppd_limit']} {$this->lang->words['g_ppd']} {$form['g_ppd_unit']} {$form['gbw_ppd_unit_type']}

      +

      {$this->lang->words['g_limit_dd']}

      +
      +
      + + +EOF; + +return $IPBHTML; +} + +/** + * Display forum group form tabs + * + * @access public + * @param array Group data + * @param string Tab id + * @return string HTML + */ +public function acp_group_form_tabs( $group, $tabId ) { + +$IPBHTML = ""; + +$IPBHTML .= <<{$this->lang->words['g_forperm']} +EOF; + +return $IPBHTML; +} + } \ No newline at end of file diff --git a/upload/admin/applications/forums/skin_cp/cp_skin_member_form.php b/upload/admin/applications/forums/skin_cp/cp_skin_member_form.php index b43e7e84..1c82a5f1 100644 --- a/upload/admin/applications/forums/skin_cp/cp_skin_member_form.php +++ b/upload/admin/applications/forums/skin_cp/cp_skin_member_form.php @@ -1,383 +1,381 @@ - - -EOF; - foreach( $images as $image ) - { - $IPBHTML .= ""; - } - - $IPBHTML .= << -EOF; - -return $IPBHTML; -} - - - -/** - * Ability to select an avatar from avatar galleries - * - * @access public - * @param array Member data - * @param array Avatar gallery categories - * @return string HTML - */ -public function inline_avatar_selector( $member, $categories=array() ) -{ -$IPBHTML = ""; - -$default_url = ($member['avatar_type'] == 'url') ? $member['avatar_location'] : ''; - -$IPBHTML .= << -
      -

      Изменить аватар

      -
      -

      - {$this->lang->words['m_firstfield']} -

      -
      -
        -
      • {$this->lang->words['m_newav']}

      • -
      • - -
      • -
      • {$this->lang->words['m_avurl']}

      • -
      • - - -
      • -EOF; - if( $this->settings['disable_ipbsize'] ) - { - list($p_width, $p_height) = explode( "x", strtolower( $this->settings['avatar_dims'] ) ); - - $IPBHTML .= <<

        {$this->lang->words['m_avdimen']}

        -
      • - - {$this->lang->words['m_width']} x {$this->lang->words['m_height']} -
      • -EOF; - } - - if( count($categories) ) - { - $IPBHTML .= <<

        {$this->lang->words['m_localav']}

        -
      • -
        -
        -
        - -
      - - -EOF; - -return $IPBHTML; -} - -/** - * Main ACP member form - * - * @access public - * @param array Member data - * @return string HTML - */ -public function acp_member_form_main( $member ) { - -$masks = array(); - -ipsRegistry::DB()->build( array( 'select' => '*', 'from' => 'forum_perms', 'order' => 'perm_name' ) ); -ipsRegistry::DB()->execute(); - -while( $data = ipsRegistry::DB()->fetch() ) -{ - $masks[] = array( $data['perm_id'], $data['perm_name'] ); -} - -$_restrict_tick = ''; -$_restrict_timespan = ''; -$_restrict_units = ''; -$units = array( 0 => array( 'h', $this->lang->words['m_hours'] ), 1 => array( 'd', $this->lang->words['m_days'] ) ); - -if ( $member['restrict_post'] == 1 ) -{ - $_restrict_tick = 'checked="checked"'; -} -elseif ($member['restrict_post'] > 0) -{ - $mod_arr = IPSMember::processBanEntry( $member['restrict_post'] ); - - $hours = ceil( ( $mod_arr['date_end'] - time() ) / 3600 ); - - if( $hours < 0 ) - { - $mod_arr['units'] = ''; - $mod_arr['timespan'] = ''; - } - else if ( $hours > 24 and ( ($hours / 24) == ceil($hours / 24) ) ) - { - $mod_arr['units'] = 'd'; - $mod_arr['timespan'] = $hours / 24; - } - else - { - $mod_arr['units'] = 'h'; - $mod_arr['timespan'] = $hours; - } -} - -$_restrict_timespan = ipsRegistry::getClass('output')->formSimpleInput('post_timespan', $mod_arr['timespan'] ); -$_restrict_units = ipsRegistry::getClass('output')->formDropdown('post_units', $units, $mod_arr['units'] ); - -$_mod_tick = ''; -$_mod_timespan = ''; -$_mod_units = ''; - -if ( $member['mod_posts'] == 1 ) -{ - $_mod_tick = 'checked="checked"'; -} -elseif ($member['mod_posts'] > 0) -{ - $mod_arr = IPSMember::processBanEntry( $member['mod_posts'] ); - - $hours = ceil( ( $mod_arr['date_end'] - time() ) / 3600 ); - - if( $hours < 0 ) - { - $mod_arr['units'] = ''; - $mod_arr['timespan'] = ''; - } - else if ( $hours > 24 and ( ($hours / 24) == ceil($hours / 24) ) ) - { - $mod_arr['units'] = 'd'; - $mod_arr['timespan'] = $hours / 24; - } - else - { - $mod_arr['units'] = 'h'; - $mod_arr['timespan'] = $hours; - } -} - -$_mod_timespan = ipsRegistry::getClass('output')->formSimpleInput('mod_timespan', $mod_arr['timespan'] ); -$_mod_units = ipsRegistry::getClass('output')->formDropdown('mod_units', $units, $mod_arr['units'] ); - -$form_override_masks = ipsRegistry::getClass('output')->formMultiDropdown( "org_perm_id[]", $masks, explode( ",", $member['org_perm_id'] ), 8, 'org_perm_id' ); -$form_posts = ipsRegistry::getClass('output')->formInput( "posts", $member['posts'] ); -$form_view_avs = ipsRegistry::getClass('output')->formYesNo( "view_avs", $member['view_avs'] ); -$form_view_img = ipsRegistry::getClass('output')->formYesNo( "view_img", $member['view_img'] ); - -$IPBHTML = ""; - -$IPBHTML .= << - - - - - - - - - - - - - - - - - - - - - -
      {$this->lang->words['sm_settings']}
      Аватар - {$member['_avatar']} -

      - - - - -
      {$this->lang->words['mem_posts']} - {$form_posts} -
      {$this->lang->words['m_viewavs']} - {$form_view_avs} -
      {$this->lang->words['m_viewimgs']} - {$form_view_img} -
      - -
      - - - - - - - - - - - - - - - - -
      {$this->lang->words['sm_access']}
      {$this->lang->words['m_overrride']} - {$form_override_masks} -
      {$this->lang->words['m_modprev']} - {$this->lang->words['m_modindef']} -
      - {$this->lang->words['m_orfor']} - {$_mod_timespan} {$_mod_units} -
      {$this->lang->words['m_restrict']} - {$this->lang->words['m_restrictindef']} -
      - {$this->lang->words['m_orfor']} - {$_restrict_timespan} {$_restrict_units} -
      -
      - -EOF; - -return $IPBHTML; -} - -/** - * Forums member tabs - * - * @access public - * @param array Member data - * @return string HTML - */ -public function acp_member_form_tabs( $member ) { - -$IPBHTML = ""; - -$IPBHTML .= <<{$this->lang->words['m_details']} -
    • {$this->lang->words['m_permrestrict']}
    • -EOF; - -return $IPBHTML; -} - -/** - * Delete posts confirmation page - * - * @access public - * @param array Member data - * @param integer Number of topics - * @param integer Number of posts - * @return string HTML - */ -public function deletePostsStart( $member, $topics, $posts ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= <<form_code}&do=deleteposts_process&member_id={$member['member_id']}' method='POST'> -_admin_auth_key}' /> -
      -
      {$this->lang->words['mem_delete_posts_title']} {$member['members_display_name']}
      - - - - - - - - - - - - - - - - - -
      {$this->lang->words['mem_delete_delete_posts']}
      {$this->lang->words['mem_delete_delete_posts_desc']}
      {$this->lang->words['mem_delete_delete_topics']}
      {$this->lang->words['mem_delete_delete_topics_desc']}
      {$this->lang->words['mem_delete_posts_trash']}
      {$this->lang->words['mem_delete_posts_trash_desc']}
      {$this->lang->words['mem_delete_delete_pergo']}
      {$this->lang->words['mem_delete_delete_pergo_desc']}
      -
      -
      - -EOF; - -//--endhtml--// -return $IPBHTML; -} - + + * Invision Power Services + * IP.Board v3.1.4 + * Forum member form plugin + * Last Updated: $LastChangedDate: 2010-09-24 21:21:39 -0400 (Fri, 24 Sep 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 14th May 2003 + * @version $Rev: 6915 $ + */ + +class cp_skin_member_form extends output +{ + +/** + * Prevent our main destructor being called by this class + * + * @access public + * @return void + */ +public function __destruct() +{ +} + +/** + * Display/change avatar + * + * @access public + * @param array Image data + * @return string HTML + */ +public function inline_avatar_images( $images=array() ) +{ +$IPBHTML = ""; + +$IPBHTML .= << + +EOF; + foreach( $images as $image ) + { + $IPBHTML .= ""; + } + + $IPBHTML .= << +EOF; + +return $IPBHTML; +} + + + +/** + * Ability to select an avatar from avatar galleries + * + * @access public + * @param array Member data + * @param array Avatar gallery categories + * @return string HTML + */ +public function inline_avatar_selector( $member, $categories=array() ) +{ +$IPBHTML = ""; + +$default_url = ($member['avatar_type'] == 'url') ? $member['avatar_location'] : ''; + +$IPBHTML .= << +
      +

      {$this->lang->words['memchangeavatar']}

      +
      +

      + {$this->lang->words['m_firstfield']} +

      +
      +
        +
      • {$this->lang->words['m_newav']}

      • +
      • + +
      • +
      • {$this->lang->words['m_avurl']}

      • +
      • + + +
      • +EOF; + if( $this->settings['disable_ipbsize'] ) + { + list($p_width, $p_height) = explode( "x", strtolower( $this->settings['avatar_dims'] ) ); + + $IPBHTML .= <<

        {$this->lang->words['m_avdimen']}

        +
      • + + {$this->lang->words['m_width']} x {$this->lang->words['m_height']} +
      • +EOF; + } + + if( count($categories) ) + { + $IPBHTML .= <<

        {$this->lang->words['m_localav']}

        +
      • +
        +
        +
        + +
      + + +EOF; + +return $IPBHTML; +} + +/** + * Main ACP member form + * + * @access public + * @param array Member data + * @return string HTML + */ +public function acp_member_form_main( $member, $tabID ) { + +$masks = array(); + +ipsRegistry::DB()->build( array( 'select' => '*', 'from' => 'forum_perms', 'order' => 'perm_name' ) ); +ipsRegistry::DB()->execute(); + +while( $data = ipsRegistry::DB()->fetch() ) +{ + $masks[] = array( $data['perm_id'], $data['perm_name'] ); +} + +$_restrict_tick = ''; +$_restrict_timespan = ''; +$_restrict_units = ''; +$units = array( 0 => array( 'h', $this->lang->words['m_hours'] ), 1 => array( 'd', $this->lang->words['m_days'] ) ); + +if ( $member['restrict_post'] == 1 ) +{ + $_restrict_tick = 'checked="checked"'; +} +elseif ($member['restrict_post'] > 0) +{ + $mod_arr = IPSMember::processBanEntry( $member['restrict_post'] ); + + $hours = ceil( ( $mod_arr['date_end'] - time() ) / 3600 ); + + if( $hours < 0 ) + { + $mod_arr['units'] = ''; + $mod_arr['timespan'] = ''; + } + else if ( $hours > 24 and ( ($hours / 24) == ceil($hours / 24) ) ) + { + $mod_arr['units'] = 'd'; + $mod_arr['timespan'] = $hours / 24; + } + else + { + $mod_arr['units'] = 'h'; + $mod_arr['timespan'] = $hours; + } +} + +$_restrict_timespan = ipsRegistry::getClass('output')->formSimpleInput('post_timespan', $mod_arr['timespan'] ); +$_restrict_units = ipsRegistry::getClass('output')->formDropdown('post_units', $units, $mod_arr['units'] ); + +$_mod_tick = ''; +$_mod_timespan = ''; +$_mod_units = ''; + +if ( $member['mod_posts'] == 1 ) +{ + $_mod_tick = 'checked="checked"'; +} +elseif ($member['mod_posts'] > 0) +{ + $mod_arr = IPSMember::processBanEntry( $member['mod_posts'] ); + + $hours = ceil( ( $mod_arr['date_end'] - time() ) / 3600 ); + + if( $hours < 0 ) + { + $mod_arr['units'] = ''; + $mod_arr['timespan'] = ''; + } + else if ( $hours > 24 and ( ($hours / 24) == ceil($hours / 24) ) ) + { + $mod_arr['units'] = 'd'; + $mod_arr['timespan'] = $hours / 24; + } + else + { + $mod_arr['units'] = 'h'; + $mod_arr['timespan'] = $hours; + } +} + +$_mod_timespan = ipsRegistry::getClass('output')->formSimpleInput('mod_timespan', $mod_arr['timespan'] ); +$_mod_units = ipsRegistry::getClass('output')->formDropdown('mod_units', $units, $mod_arr['units'] ); + +$form_override_masks = ipsRegistry::getClass('output')->formMultiDropdown( "org_perm_id[]", $masks, explode( ",", $member['org_perm_id'] ), 8, 'org_perm_id' ); +$form_posts = ipsRegistry::getClass('output')->formInput( "posts", $member['posts'] ); +$form_view_avs = ipsRegistry::getClass('output')->formYesNo( "view_avs", $member['view_avs'] ); +$form_view_img = ipsRegistry::getClass('output')->formYesNo( "view_img", $member['view_img'] ); + +$IPBHTML = ""; + +$IPBHTML .= << + + + + + + + + + + + + + + + + + + + + + +
      {$this->lang->words['sm_settings']}
      {$this->lang->words['strong_avatar_label']} + {$member['_avatar']} +

      + + + + +
      {$this->lang->words['mem_posts']} + {$form_posts} +
      {$this->lang->words['m_viewavs']} + {$form_view_avs} +
      {$this->lang->words['m_viewimgs']} + {$form_view_img} +
      + + + + + + + + + + + + + + + + + +
      {$this->lang->words['sm_access']}
      {$this->lang->words['m_overrride']} + {$form_override_masks} +
      {$this->lang->words['m_modprev']} + {$this->lang->words['m_modindef']} +
      + {$this->lang->words['m_orfor']} + {$_mod_timespan} {$_mod_units} +
      {$this->lang->words['m_restrict']} + {$this->lang->words['m_restrictindef']} +
      + {$this->lang->words['m_orfor']} + {$_restrict_timespan} {$_restrict_units} +
      + + +EOF; + +return $IPBHTML; +} + +/** + * Forums member tabs + * + * @access public + * @param array Member data + * @return string HTML + */ +public function acp_member_form_tabs( $member, $tabID ) { + +$IPBHTML = ""; + +$IPBHTML .= <<{$this->lang->words['m_details']} +EOF; + +return $IPBHTML; +} + +/** + * Delete posts confirmation page + * + * @access public + * @param array Member data + * @param integer Number of topics + * @param integer Number of posts + * @return string HTML + */ +public function deletePostsStart( $member, $topics, $posts ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= <<form_code}&do=deleteposts_process&member_id={$member['member_id']}' method='POST'> +_admin_auth_key}' /> +
      +
      {$this->lang->words['mem_delete_posts_title']} {$member['members_display_name']}
      + + + + + + + + + + + + + + + + + +
      {$this->lang->words['mem_delete_delete_posts']}
      {$this->lang->words['mem_delete_delete_posts_desc']}
      {$this->lang->words['mem_delete_delete_topics']}
      {$this->lang->words['mem_delete_delete_topics_desc']}
      {$this->lang->words['mem_delete_posts_trash']}
      {$this->lang->words['mem_delete_posts_trash_desc']}
      {$this->lang->words['mem_delete_delete_pergo']}
      {$this->lang->words['mem_delete_delete_pergo_desc']}
      +
      +
      + +EOF; + +//--endhtml--// +return $IPBHTML; +} + } \ No newline at end of file diff --git a/upload/admin/applications/forums/skin_cp/cp_skin_multimods.php b/upload/admin/applications/forums/skin_cp/cp_skin_multimods.php index 22538fba..e2f672f6 100644 --- a/upload/admin/applications/forums/skin_cp/cp_skin_multimods.php +++ b/upload/admin/applications/forums/skin_cp/cp_skin_multimods.php @@ -1,208 +1,210 @@ - -

      {$this->lang->words['mm_title']}

      - - -
      form_code}' method='post' name='theAdminForm' id='theAdminForm'> - - - - -
      -

      {$this->lang->words['mm_title']}

      - -
        -
      • -
      • - - {$form['mm_title']} -
      • - -
      • - - {$form['forums']} - - -
      • - -
      • - -
      • - - {$form['topic_title_st']} -
      • - -
      • - - {$form['topic_title_end']} -
      • - -
      • - - {$form['topic_state']} -
      • - -
      • - - {$form['topic_pin']} -
      • - -
      • - - {$form['topic_approve']} -
      • - -
      • - - {$form['topic_move']} -
      • - -
      • - - {$form['topic_move_link']} -
      • - -
      • - -
      • - - {$form['topic_reply']}
        - {$form['topic_reply_content']} -
      • - -
      • - - {$form['topic_reply_postcount']} -
      • - - -
        -
        - -
        -
        -
      -
      -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Show multimod overview page - * - * @access public - * @param array MM Rows - * @return string HTML - */ -public function multiModerationOverview( $rows ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

      {$this->lang->words['mm_title']}

      - - - -
      -

      {$this->lang->words['mm_current']}

      - - - - - - -HTML; - -if( ! count( $rows ) ) -{ -$IPBHTML .= << -HTML; -} -else -{ - foreach( $rows as $r ) - { -$IPBHTML .= << - - - -HTML; - } -} - -$IPBHTML .= << - -HTML; - -//--endhtml--// -return $IPBHTML; -} - + + * Invision Power Services + * IP.Board v3.1.4 + * Multimods skin functions + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 14th May 2003 + * @version $Rev: 5713 $ + */ + +class cp_skin_multimods extends output +{ + +/** + * Prevent our main destructor being called by this class + * + * @access public + * @return void + */ +public function __destruct() +{ +} + +/** + * Form to add/edit multimods + * + * @access public + * @param integer MM ID + * @param string Action + * @param string Description + * @param array Form fields + * @param string Button text + * @return string HTML + */ +public function multiModerationForm( $id, $do, $description, $form, $button ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

      {$this->lang->words['mm_title']}

      + + +form_code}' method='post' name='theAdminForm' id='theAdminForm'> + + + + +
      +

      {$this->lang->words['mm_title']}

      + +
        +
      • +
      • + + {$form['mm_title']} +
      • + +
      • + + {$form['forums']} + + +
      • + +
      • + +
      • + + {$form['topic_title_st']} +
      • + +
      • + + {$form['topic_title_end']} +
      • + +
      • + + {$form['topic_state']} +
      • + +
      • + + {$form['topic_pin']} +
      • + +
      • + + {$form['topic_approve']} +
      • + +
      • + + {$form['topic_move']} +
      • + +
      • + + {$form['topic_move_link']} +
      • + +
      • + +
      • + + {$form['topic_reply']}
        + {$form['topic_reply_content']} +
      • + +
      • + + {$form['topic_reply_postcount']} +
      • +
      {$this->lang->words['mm_wordtitle']}{$this->lang->words['a_options']}
      {$this->lang->words['mm_none']}
      {$r['mm_title']} - {$this->lang->words[ - -
      + +
      +
      + +
      +
      +
      + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Show multimod overview page + * + * @access public + * @param array MM Rows + * @return string HTML + */ +public function multiModerationOverview( $rows ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

      {$this->lang->words['mm_title']}

      + + + +
      +

      {$this->lang->words['mm_current']}

      + + + + + + +HTML; + +if( ! count( $rows ) ) +{ +$IPBHTML .= << +HTML; +} +else +{ + foreach( $rows as $r ) + { +$IPBHTML .= << + + + +HTML; + } +} + +$IPBHTML .= << + +HTML; + +//--endhtml--// +return $IPBHTML; +} + } \ No newline at end of file diff --git a/upload/admin/applications/forums/skin_cp/cp_skin_permissions.php b/upload/admin/applications/forums/skin_cp/cp_skin_permissions.php index 275b3abe..48c8ddfe 100644 --- a/upload/admin/applications/forums/skin_cp/cp_skin_permissions.php +++ b/upload/admin/applications/forums/skin_cp/cp_skin_permissions.php @@ -1,356 +1,358 @@ - -
      {$this->lang->words['per_preview']}{$title}
      - -
      {$this->lang->words['mm_wordtitle']}{$this->lang->words['a_options']}
      {$this->lang->words['mm_none']}
      {$r['mm_title']} + {$this->lang->words[ + +
      - - - - - - -
      {$human_type}
      -HTML; - -foreach( $rows as $r ) -{ -$IPBHTML .= <<{$r['name']}
      -HTML; -} - -$IPBHTML .= << -
      -

      - -
      form_code}' method='post' name='theAdminForm' id='theAdminForm'> - - - - -
      -
      {$this->lang->words['per_legend']}
      - - - - - - - - - - - - - - - - - - - - - -
      {$this->lang->words['per_can']}{$human_type}
      {$this->lang->words['per_cannot']}{$human_type}
      {$this->lang->words['per_category']}
      {$this->lang->words['per_testwith']}{$type_drop} -
      -
      -
      -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Permissions editor - * - * @access public - * @param integer Mask id - * @param string Mask title - * @param array Rows - * @return string HTML - */ -public function permissionsForum( $id, $title, $rows ){ - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

      {$this->lang->words['per_title_edit']}

      - - - -
      form_code}' method='post' name='nameForm' id='nameForm'> - - - - -
      -
      {$this->lang->words['per_rename']}{$title}
      - - - - - - - - - -
      {$this->lang->words['per_setname']}
      -
      -
      -
      - - -
      form_code}' method='post' name='theAdminForm' id='theAdminForm'> - - - - -
      -
      Доступы для {$title}
      - - - - - - - - - - - -HTML; - -foreach( $rows as $r ) -{ -$IPBHTML .= << - - - - - - - - -HTML; -} - -$IPBHTML .= << - - -
      {$this->lang->words['per_forumname']}{$this->lang->words['per_show_c']}
      {$this->lang->words['per_read_c']}
      {$this->lang->words['per_reply_c']}
      {$this->lang->words['per_start_c']}
      {$this->lang->words['per_upload_c']}
      {$this->lang->words['per_download_c']}
      -
      -   - -
      - {$r['depthed_name']} -
      {$this->_permission_check_box( $r['id'], 'view', $r['_perms'] )}
      {$this->_permission_check_box( $r['id'], 'read', $r['_perms'] )}
      {$this->_permission_check_box( $r['id'], 'reply', $r['_perms'] )}
      {$this->_permission_check_box( $r['id'], 'start', $r['_perms'] )}
      {$this->_permission_check_box( $r['id'], 'upload', $r['_perms'] )}
      {$this->_permission_check_box( $r['id'], 'download', $r['_perms'] )}
      -
      -
      - - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Check box generator helper - * - * @access private - * @param integer Mask id - * @param array Mask data - * @param array Current selections - * @return string HTML - */ -private function _permission_check_box( $id, $perm, $r ) -{ -$IPBHTML = ""; -//--starthtml--// - -if( in_array( $r[ $perm ], array( $this->lang->words['per_global'], $this->lang->words['per_notused'] ) ) ) -{ -$IPBHTML .= <<{$r[$perm]} -HTML; -} -else if( $r[ $perm ] == 'checked' ) -{ -$IPBHTML .= << -HTML; -} -else -{ -$IPBHTML .= << -HTML; -} -//--endhtml--// -return $IPBHTML; -} - -/** - * Perm mask splash page - * - * @access public - * @param array Mask rows - * @param string Dropdown list - * @return string HTML - */ -public function permissionsSplash( $rows, $dlist ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

      {$this->lang->words['per_title']}

      - - -
      -
      {$this->lang->words['per_setname']}
      - - - - - - - - -HTML; - -/* ROW */ -foreach( $rows as $r ) -{ -$IPBHTML .= << - - - - -HTML; -} -/* / ROW */ - -$IPBHTML .= << - -
      -form_code}&do=dopermadd' method='post'> - - -
      -
      {$this->lang->words['per_createnew']}
      - -
      {$this->lang->words['per_name']}{$this->lang->words['per_usedgroups']}{$this->lang->words['per_usedmembers']} 
      {$r['name']}{$r['groups']} -HTML; -if ( $r['mems'] > 0 ) -{ -$IPBHTML .= <<form_code_js}do=view_perm_users&id={$r['id']}", "{$this->lang->words['per_user']}", "500","350");' title='{$this->lang->words['per_viewnames']}'>{$this->lang->words['per_view']}) -HTML; -} -else -{ -$IPBHTML .= <<lang->words['per_nomember']} -HTML; -} -$IPBHTML .= << - - {$this->lang->words[ -
      - - - - - - - - -
      {$this->lang->words['per_setname']}
      {$this->lang->words['per_baseon']}
      - -
      -
      - -HTML; - -//--endhtml--// -return $IPBHTML; -} - + + * Invision Power Services + * IP.Board v3.1.4 + * Permissions masks skin functions + * Last Updated: $LastChangedDate: 2010-09-13 17:28:12 -0400 (Mon, 13 Sep 2010) $ + * + * + * @author $Author: terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 14th May 2003 + * @version $Rev: 6863 $ + */ + +class cp_skin_permissions extends output +{ + +/** + * Prevent our main destructor being called by this class + * + * @access public + * @return void + */ +public function __destruct() +{ +} + +/** + * Preview forum permissions + * + * @access public + * @param integer Mask id + * @param string Mask title + * @param string HTML for type dropdown + * @param array Forum rows + * @param string Type human-understandable text + * @return string HTML + */ +public function previewForumPermissions( $id, $title, $type_drop, $rows, $human_type ) +{ +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +
      {$this->lang->words['per_preview']}{$title}
      + + + + + + + + +
      {$human_type}
      +HTML; + +foreach( $rows as $r ) +{ +$IPBHTML .= <<{$r['name']}
      +HTML; +} + +$IPBHTML .= << +
      +
      + +
      form_code}' method='post' name='theAdminForm' id='theAdminForm'> + + + + +
      +
      {$this->lang->words['per_legend']}
      + + + + + + + + + + + + + + + + + + + + + +
      {$this->lang->words['per_can']}{$human_type}
      {$this->lang->words['per_cannot']}{$human_type}
      {$this->lang->words['per_category']}
      {$this->lang->words['per_testwith']}{$type_drop} +
      +
      +
      +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Permissions editor + * + * @access public + * @param integer Mask id + * @param string Mask title + * @param array Rows + * @return string HTML + */ +public function permissionsForum( $id, $title, $rows ){ + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

      {$this->lang->words['per_title_edit']}

      + + + +
      form_code}' method='post' name='nameForm' id='nameForm'> + + + + +
      +
      {$this->lang->words['per_rename']}{$title}
      + + + + + + + + + +
      {$this->lang->words['per_setname']}
      +
      +
      +
      + + +
      form_code}' method='post' name='theAdminForm' id='theAdminForm'> + + + + +
      +
      {$this->lang->words['forumpermsfor']} {$title}
      + + + + + + + + + + + +HTML; + +foreach( $rows as $r ) +{ +$IPBHTML .= << + + + + + + + + +HTML; +} + +$IPBHTML .= << + + +
      {$this->lang->words['per_forumname']}{$this->lang->words['per_show_c']}
      {$this->lang->words['per_read_c']}
      {$this->lang->words['per_reply_c']}
      {$this->lang->words['per_start_c']}
      {$this->lang->words['per_upload_c']}
      {$this->lang->words['per_download_c']}
      +
      +   + +
      + {$r['depthed_name']} +
      {$this->_permission_check_box( $r['id'], 'view', $r['_perms'] )}
      {$this->_permission_check_box( $r['id'], 'read', $r['_perms'] )}
      {$this->_permission_check_box( $r['id'], 'reply', $r['_perms'] )}
      {$this->_permission_check_box( $r['id'], 'start', $r['_perms'] )}
      {$this->_permission_check_box( $r['id'], 'upload', $r['_perms'] )}
      {$this->_permission_check_box( $r['id'], 'download', $r['_perms'] )}
      +
      +
      + + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Check box generator helper + * + * @access private + * @param integer Mask id + * @param array Mask data + * @param array Current selections + * @return string HTML + */ +private function _permission_check_box( $id, $perm, $r ) +{ +$IPBHTML = ""; +//--starthtml--// + +if( in_array( $r[ $perm ], array( $this->lang->words['per_global'], $this->lang->words['per_notused'] ) ) ) +{ +$IPBHTML .= <<{$r[$perm]} +HTML; +} +else if( $r[ $perm ] == 'checked' ) +{ +$IPBHTML .= << +HTML; +} +else +{ +$IPBHTML .= << +HTML; +} +//--endhtml--// +return $IPBHTML; +} + +/** + * Perm mask splash page + * + * @access public + * @param array Mask rows + * @param string Dropdown list + * @return string HTML + */ +public function permissionsSplash( $rows, $dlist ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

      {$this->lang->words['per_title']}

      + + +
      +
      {$this->lang->words['per_setname']}
      + + + + + + + + +HTML; + +/* ROW */ +foreach( $rows as $r ) +{ +$IPBHTML .= << + + + + +HTML; +} +/* / ROW */ + +$IPBHTML .= << + +
      +form_code}&do=dopermadd' method='post'> + + +
      +
      {$this->lang->words['per_createnew']}
      + +
      {$this->lang->words['per_name']}{$this->lang->words['per_usedgroups']}{$this->lang->words['per_usedmembers']} 
      {$r['name']}{$r['groups']} +HTML; +if ( $r['mems'] > 0 ) +{ +$IPBHTML .= <<form_code_js}do=view_perm_users&id={$r['id']}", "{$this->lang->words['per_user']}", "500","350");' title='{$this->lang->words['per_viewnames']}'>{$this->lang->words['per_view']}) +HTML; +} +else +{ +$IPBHTML .= <<lang->words['per_nomember']} +HTML; +} +$IPBHTML .= << + + {$this->lang->words[ +
      + + + + + + + + +
      {$this->lang->words['per_setname']}
      {$this->lang->words['per_baseon']}
      + +
      +
      + +HTML; + +//--endhtml--// +return $IPBHTML; +} + } \ No newline at end of file diff --git a/upload/admin/applications/forums/skin_cp/cp_skin_rss.php b/upload/admin/applications/forums/skin_cp/cp_skin_rss.php index 69139ac5..8ba32dd9 100644 --- a/upload/admin/applications/forums/skin_cp/cp_skin_rss.php +++ b/upload/admin/applications/forums/skin_cp/cp_skin_rss.php @@ -1,497 +1,495 @@ - -

      {$this->lang->words['ex_title']}

      - - -HTML; - -if( $page_links != "" ) -{ - $IPBHTML .= << -HTML; -} - -$IPBHTML .= << -

      {$this->lang->words['rss_ex_streams']}

      - - - - - - - -HTML; - -foreach( $content as $data ) -{ -$IPBHTML .= << - - - - - -HTML; -} - -$IPBHTML .= << - - -HTML; - -if( $page_links != "" ) -{ - $IPBHTML .= << -HTML; -} - - -//--endhtml--// -return $IPBHTML; -} - -/** - * Export form - * - * @access public - * @param array Form fields - * @param string Title - * @param string Action code - * @param string Button text - * @param array RSS Stream info - * @return string HTML - */ -public function rssExportForm( $form, $title, $formcode, $button, $rssstream ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

      {$this->lang->words['ex_title']}

      - - -form_code}&do=$formcode&rss_export_id={$rssstream['rss_export_id']}' method='post'> - - -
      -

      $title

      - -
        -
      • - - {$form['rss_export_title']} -
      • -
      • - - {$form['rss_export_desc']} -
      • -
      • - - {$form['rss_export_image']} -
      • -
      • - - {$form['rss_export_enabled']} -
      • -
      • - - {$form['rss_export_include_post']} -
      • -
      • - - {$form['rss_export_count']} -
      • -
      • - - {$form['rss_export_order']} -
      • -
      • - - {$form['rss_export_sort']} -
      • -
      • - -
      - -
    • - - {$form['rss_export_cache_time']} -
    • - - - -
      -
      - -
      -
      - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Splash page for removing imported items - * - * @access public - * @param array RSS Record - * @param integer Remove article count - * @return string HTML - */ -public function rssImportRemoveArticlesForm( $rssstream, $article_count ) { - -$article_count_text = sprintf( $this->lang->words['rss_im_articlecount'], $article_count ); -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

      {$this->lang->words['im_title']}

      - - -form_code}&do=rssimport_remove_complete&rss_import_id={$rssstream['rss_import_id']}' method='post'> - - -
      -

      {$this->lang->words['rss_im_removetopics']} {$rssstream['rss_import_title']}

      -
        -
      • - -
      • -
      • - - -
      • -
      - -
      -
      - -
      -
      -
      - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * RSS Import form - * - * @access public - * @param array Form fields - * @param string Title - * @param string Action code - * @param string Button text - * @param array RSS Record - * @return string HTML - */ -public function rssImportForm( $form, $title, $formcode, $button, $rssstream ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

      {$this->lang->words['im_title']}

      - - - -form_code}&do={$formcode}&rss_import_id={$rssstream['rss_import_id']}' method='post'> - - - -
      -

      {$title}

      - -
        -
      • - -
      • - - {$form['rss_import_title']} -
      • -
      • - - {$form['rss_import_url']} -
      • -
      • - - {$form['rss_import_charset']} -
      • -
      • - - {$form['rss_import_enabled']} -
      • - -
      • - -
      • - - {$form['rss_import_auth']} -
      • - - -
      • - - {$form['rss_import_auth_user']} -
      • - -
      • - - {$form['rss_import_auth_pass']} -
      • -
        - -
      • - -
      • - - {$form['rss_import_forum_id']} -
      • -
      • - - {$form['rss_import_allow_html']} -
      • -
      • - - {$form['rss_import_mid']} -
      • -
      • - - {$form['rss_import_inc_pcount']} -
      • -
      • - - {$form['rss_import_showlink']} -
      • -
      • - - {$form['rss_import_topic_open']} -
      • -
      • - - {$form['rss_import_topic_hide']} -
      • -
      • - - {$form['rss_import_topic_pre']} -
      • - -
      • - -
      • - - {$form['rss_import_pergo']} -
      • - -
      • - - {$form['rss_import_time']} -
      • -
      - -
      -
      -     -
      -
      -
      - - - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * RSS Import stream overview - * - * @access public - * @param string HTML content - * @param string Page links - * @return string HTML - */ -public function rssImportOverview( $content, $page_links ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

      {$this->lang->words['im_title']}

      - - -form_code}&do=rssimport_validate' method='post'> -
      -

      {$this->lang->words['rss_im_quickval']}

      - -
        -
      • - - - -
      • -
      - -
      -
      - -
      -
      -
      - -
      - -{$page_links} -
      - -
      -

      {$this->lang->words['rss_im_thefeeds']}

      - -
      {$this->lang->words['rss_title']}{$this->lang->words['rss_enabled']} - {$this->lang->words[ - -
      - RSS - {$data['rss_export_title']} - YN - {$this->lang->words[ - -
      {$form['rss_export_forums']}
      - - - - - -HTML; - -foreach( $content as $data ) -{ -$IPBHTML .= << - - - - -HTML; -} - -$IPBHTML .= << - - -{$page_links} - -HTML; - -//--endhtml--// -return $IPBHTML; -} - - -/** - * Validation message - * - * @access public - * @param array Validation info - * @return string HTML - */ -public function rssValidateMsg( $info ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= <<{$info['msg']} -EOF; - -//--endhtml--// -return $IPBHTML; -} - - - + + * Invision Power Services + * IP.Board v3.1.4 + * RSS skin functions + * Last Updated: $LastChangedDate: 2010-05-19 21:06:53 -0400 (Wed, 19 May 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 14th May 2003 + * @version $Rev: 6326 $ + */ + +class cp_skin_rss extends output { + +/** + * Prevent our main destructor being called by this class + * + * @access public + * @return void + */ +public function __destruct() +{ +} + +/** + * Export overview page + * + * @access public + * @param string Rows html + * @param string Page links + * @return string HTML + */ +public function rssExportOverview( $content, $page_links ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

      {$this->lang->words['ex_title']}

      + + + +HTML; + +if( $page_links != "" ) +{ + $IPBHTML .= << +HTML; +} + +$IPBHTML .= << +

      {$this->lang->words['rss_ex_streams']}

      + +
      {$this->lang->words['rss_title']}{$this->lang->words['rss_enabled']} - {$this->lang->words[ - -
      - - {$this->lang->words[ - {$data['rss_import_title']} - *** - {$this->lang->words[ - -
      + + + + + +HTML; + +foreach( $content as $data ) +{ +$IPBHTML .= << + + + + + +HTML; +} + +$IPBHTML .= << + + +HTML; + +if( $page_links != "" ) +{ + $IPBHTML .= << +HTML; +} + + +//--endhtml--// +return $IPBHTML; +} + +/** + * Export form + * + * @access public + * @param array Form fields + * @param string Title + * @param string Action code + * @param string Button text + * @param array RSS Stream info + * @return string HTML + */ +public function rssExportForm( $form, $title, $formcode, $button, $rssstream ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

      {$this->lang->words['ex_title']}

      + + +form_code}&do=$formcode&rss_export_id={$rssstream['rss_export_id']}' method='post'> + + +
      +

      $title

      + +
        +
      • + + {$form['rss_export_title']} +
      • +
      • + + {$form['rss_export_desc']} +
      • +
      • + + {$form['rss_export_image']} +
      • +
      • + + {$form['rss_export_enabled']} +
      • +
      • + + {$form['rss_export_include_post']} +
      • +
      • + + {$form['rss_export_count']} +
      • +
      • + + {$form['rss_export_order']} +
      • +
      • + + {$form['rss_export_sort']} +
      • +
      • + +
      + +
    • + + {$form['rss_export_cache_time']} +
    • + + + +
      +
      + +
      +
      + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Splash page for removing imported items + * + * @access public + * @param array RSS Record + * @param integer Remove article count + * @return string HTML + */ +public function rssImportRemoveArticlesForm( $rssstream, $article_count ) { + +$article_count_text = sprintf( $this->lang->words['rss_im_articlecount'], $article_count ); +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

      {$this->lang->words['im_title']}

      + + +form_code}&do=rssimport_remove_complete&rss_import_id={$rssstream['rss_import_id']}' method='post'> + + +
      +

      {$this->lang->words['rss_im_removetopics']} {$rssstream['rss_import_title']}

      +
        +
      • + +
      • +
      • + + +
      • +
      + +
      +
      + +
      +
      +
      + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * RSS Import form + * + * @access public + * @param array Form fields + * @param string Title + * @param string Action code + * @param string Button text + * @param array RSS Record + * @return string HTML + */ +public function rssImportForm( $form, $title, $formcode, $button, $rssstream ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

      {$this->lang->words['im_title']}

      + + + +form_code}&do={$formcode}&rss_import_id={$rssstream['rss_import_id']}' method='post'> + + + +
      +

      {$title}

      + +
        +
      • + +
      • + + {$form['rss_import_title']} +
      • +
      • + + {$form['rss_import_url']} +
      • +
      • + + {$form['rss_import_charset']} +
      • +
      • + + {$form['rss_import_enabled']} +
      • + +
      • + +
      • + + {$form['rss_import_auth']} +
      • + + +
      • + + {$form['rss_import_auth_user']} +
      • + +
      • + + {$form['rss_import_auth_pass']} +
      • +
        + +
      • + +
      • + + {$form['rss_import_forum_id']} +
      • +
      • + + {$form['rss_import_allow_html']} +
      • +
      • + + {$form['rss_import_mid']} +
      • +
      • + + {$form['rss_import_inc_pcount']} +
      • +
      • + + {$form['rss_import_showlink']} +
      • +
      • + + {$form['rss_import_topic_open']} +
      • +
      • + + {$form['rss_import_topic_hide']} +
      • +
      • + + {$form['rss_import_topic_pre']} +
      • + +
      • + +
      • + + {$form['rss_import_pergo']} +
      • + +
      • + + {$form['rss_import_time']} +
      • +
      + +
      +
      +     +
      +
      +
      + + + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * RSS Import stream overview + * + * @access public + * @param string HTML content + * @param string Page links + * @return string HTML + */ +public function rssImportOverview( $content, $page_links ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

      {$this->lang->words['im_title']}

      + + + +form_code}&do=rssimport_validate' method='post'> +
      +

      {$this->lang->words['rss_im_quickval']}

      + +
        +
      • + + + +
      • +
      + +
      +
      + +
      +
      +
      + +
      + +{$page_links} +
      + +
      +

      {$this->lang->words['rss_im_thefeeds']}

      + +
      {$this->lang->words['rss_title']}{$this->lang->words['rss_enabled']} 
      + RSS + {$data['rss_export_title']} + YN + {$this->lang->words[ + +
      {$form['rss_export_forums']}
      + + + + + +HTML; + +foreach( $content as $data ) +{ +$IPBHTML .= << + + + + +HTML; +} + +$IPBHTML .= << + + +{$page_links} + +HTML; + +//--endhtml--// +return $IPBHTML; +} + + +/** + * Validation message + * + * @access public + * @param array Validation info + * @return string HTML + */ +public function rssValidateMsg( $info ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= <<{$info['msg']} +EOF; + +//--endhtml--// +return $IPBHTML; +} + + + } \ No newline at end of file diff --git a/upload/admin/applications/forums/skin_cp/cp_skin_stats.php b/upload/admin/applications/forums/skin_cp/cp_skin_stats.php index 7f2ed4d7..3cb31c1b 100644 --- a/upload/admin/applications/forums/skin_cp/cp_skin_stats.php +++ b/upload/admin/applications/forums/skin_cp/cp_skin_stats.php @@ -1,159 +1,168 @@ - -

      {$this->lang->words['stats_title_results']}

      - - -
      -

      {$title}

      - -
      {$this->lang->words['rss_title']}{$this->lang->words['rss_enabled']} 
      + + {$this->lang->words[ + {$data['rss_import_title']} + *** + {$this->lang->words[ + +
      - - - - - -HTML; - -foreach( $rows as $r ) -{ -$IPBHTML .= << - - - - -HTML; -} - -$IPBHTML .= << - - - - -
      {$this->lang->words['stats_date']}{$this->lang->words['stats_results']}{$this->lang->words['stats_count']}
      {$r['_name']} - -
      {$r['result_count']}
       
      {$this->lang->words['stats_total']}
      {$total}
      - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Show the stats main screen - * - * @access public - * @param string Type - * @param string Title - * @param array Form fields - * @return string HTML - */ -public function statMainScreeen( $type, $title, $form ) { -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= << -

      {$this->lang->words['stats_title']}

      - - -
      form_code}' method='post' name='theAdminForm' id='theAdminForm'> - - - -
      -

      {$title}

      - -
        -
      • - - {$form['from_month']}  {$form['from_day']}  {$form['from_year']} -
      • - -
      • - - {$form['to_month']}  {$form['to_day']}  {$form['to_year']} -
      • -HTML; - -//----------------------------------------- -// Time scale is irrelevant to topic views -//----------------------------------------- - -if( $type != 'statsShowTopicViews' ) -{ - $IPBHTML .= << - - {$form['timescale']} - -HTML; -} - -$IPBHTML .= << - - {$form['sortby']} - - - -
        -
        - -
        -
        -
      -
      -HTML; - -//--endhtml--// -return $IPBHTML; -} - + + * Invision Power Services + * IP.Board v3.1.4 + * Stats skin functions + * Last Updated: $LastChangedDate: 2010-09-14 05:48:02 -0400 (Tue, 14 Sep 2010) $ + * + * + * @author $Author: terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 14th May 2003 + * @version $Rev: 6865 $ + */ + +class cp_skin_stats extends output { + +/** + * Prevent our main destructor being called by this class + * + * @access public + * @return void + */ +public function __destruct() +{ +} + +/** + * Show spam stats + * + * @access public + * @return string HTML + */ + +/** + * Show the stats results + * + * @access public + * @param string Title + * @param array Stats rows + * @param integer Total + * @return string HTML + */ +public function statResultsScreen( $title, $rows, $total ) { +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

      {$this->lang->words['stats_title_results']}

      + + +
      +

      {$title}

      + + + + + + + +HTML; + +foreach( $rows as $r ) +{ +$IPBHTML .= << + + + + +HTML; +} + +$IPBHTML .= << + + + + +
      {$this->lang->words['stats_date']}{$this->lang->words['stats_results']}{$this->lang->words['stats_count']}
      {$r['_name']} + +
      {$r['result_count']}
       
      {$this->lang->words['stats_total']}
      {$total}
      +
      +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Show the stats main screen + * + * @access public + * @param string Type + * @param string Title + * @param array Form fields + * @return string HTML + */ +public function statMainScreeen( $type, $title, $form ) { +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

      {$this->lang->words['stats_title']}

      + + +
      form_code}' method='post' name='theAdminForm' id='theAdminForm'> + + + +
      +

      {$title}

      + +
        +
      • + + {$form['from_month']}  {$form['from_day']}  {$form['from_year']} +
      • + +
      • + + {$form['to_month']}  {$form['to_day']}  {$form['to_year']} +
      • +HTML; + +//----------------------------------------- +// Time scale is irrelevant to topic views +//----------------------------------------- + +if( $type != 'statsShowTopicViews' ) +{ + $IPBHTML .= << + + {$form['timescale']} + +HTML; +} + +$IPBHTML .= << + + {$form['sortby']} + + + +
        +
        + +
        +
        +
      +
      +HTML; + +//--endhtml--// +return $IPBHTML; +} + } \ No newline at end of file diff --git a/upload/admin/applications/forums/skin_cp/index.html b/upload/admin/applications/forums/skin_cp/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/skin_cp/index.html +++ b/upload/admin/applications/forums/skin_cp/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/sources/classes/digest.php b/upload/admin/applications/forums/sources/classes/digest.php index b2203667..3a0f4cee 100644 --- a/upload/admin/applications/forums/sources/classes/digest.php +++ b/upload/admin/applications/forums/sources/classes/digest.php @@ -1,19 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Moderator actions - * Last Updated: $Date: 2009-10-01 10:02:08 -0400 (Thu, 01 Oct 2009) $ + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Revision: 5190 $ - * + * @link http://www.invisionpower.com + * @version $Revision: 7003 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -27,7 +27,6 @@ class digestLibrary /** * Digest time * - * @access public * @var string daily|weekly */ public $digest_time = 'daily'; @@ -35,7 +34,6 @@ class digestLibrary /** * Digest type * - * @access public * @var string topic|forum */ public $digest_type = 'topic'; @@ -43,7 +41,6 @@ class digestLibrary /** * Midnight time * - * @access public * @var integer Timestamp */ public $midnight = 0; @@ -51,7 +48,6 @@ class digestLibrary /** * Last week timestamp * - * @access public * @var integer Timestamp */ public $last_week = 0; @@ -59,7 +55,6 @@ class digestLibrary /** * Yesterday timestamp * - * @access public * @var integer Timestamp */ public $last_day = 0; @@ -67,7 +62,6 @@ class digestLibrary /** * Last time timestamp * - * @access public * @var integer Timestamp */ public $last_time = 0; @@ -75,7 +69,6 @@ class digestLibrary /**#@+ * Registry Object Shortcuts * - * @access protected * @var object */ protected $registry; @@ -84,13 +77,14 @@ class digestLibrary protected $request; protected $lang; protected $member; - protected $cache; + protected $memberData; + protected $cache; + protected $caches; /**#@-*/ /** * Constructor * - * @access public * @param object Registry reference * @return void */ @@ -110,8 +104,8 @@ class digestLibrary /* Check for class_forums */ if( ! $this->registry->isClassLoaded( 'class_forums' ) ) { - require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" ); - $this->registry->setClass( 'class_forums', new class_forums( $registry ) ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' ); + $this->registry->setClass( 'class_forums', new $classToLoad( $registry ) ); $this->registry->strip_invisible = 0; $this->registry->class_forums->forumsInit(); } @@ -144,7 +138,6 @@ class digestLibrary /** * Run the digest * - * @access public * @return void */ public function runDigest() @@ -164,11 +157,17 @@ class digestLibrary /** * Run the digest * - * @access private * @return void */ private function _sendTopicDigest() { + //----------------------------------------- + // Notifications library + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' ); + $notifyLibrary = new $classToLoad( $this->registry ); + //----------------------------------------- // Get all posts / topics //----------------------------------------- @@ -293,28 +292,33 @@ class digestLibrary if ( $others_posted ) { - $count++; $trids[ $t['trid'] ] = intval( $t['trid'] ); //----------------------------------------- - // Send email... + // Send notification... //----------------------------------------- - - IPSText::getTextClass( 'email' )->getTemplate( $subject, $t['language'] ); - + + IPSText::getTextClass('email')->getTemplate( $subject, $t['language'] ); + IPSText::getTextClass( 'email' )->buildMessage( array( - 'TOPIC_ID' => $t['tid'], - 'FORUM_ID' => $t['forum_id'], - 'TITLE' => $topic_title, - 'NAME' => $t['members_display_name'], - 'CONTENT' => $main_output, + 'TOPIC_ID' => $t['tid'], + 'FORUM_ID' => $t['forum_id'], + 'TITLE' => $topic_title, + 'NAME' => $t['members_display_name'], + 'CONTENT' => $main_output, ) ); + + $notifyLibrary->setMember( $t ); + $notifyLibrary->setFrom( array() ); + $notifyLibrary->setNotificationKey( 'new_reply' ); + $notifyLibrary->setNotificationText( IPSText::getTextClass('email')->message ); + $notifyLibrary->setNotificationTitle( IPSText::getTextClass('email')->subject ); - $this->DB->insert( 'mail_queue', array( 'mail_to' => $t['email'], - 'mail_date' => time(), - 'mail_from' => '', - 'mail_subject' => IPSText::getTextClass( 'email' )->subject, - 'mail_content' => IPSText::getTextClass( 'email' )->message ) ); + try + { + $notifyLibrary->sendNotification(); + } + catch( Exception $e ){} } } @@ -324,25 +328,22 @@ class digestLibrary { $this->DB->update( 'tracker', array( 'last_sent' => time() ), 'trid IN (' . implode( ',', $trids ) . ')' ); } - - $cache = ipsRegistry::cache()->getCache('systemvars'); - $cache['mail_queue'] += $count; - - //----------------------------------------- - // Update cache with remaning email count - //----------------------------------------- - - ipsRegistry::cache()->setCache( 'systemvars', $cache, array( 'array' => 1, 'donow' => 1 ) ); } /** * Run the digest * - * @access private * @return void */ private function _sendForumDigest() { + //----------------------------------------- + // Notifications library + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' ); + $notifyLibrary = new $classToLoad( $this->registry ); + //----------------------------------------- // Get all posts / topics //----------------------------------------- @@ -456,27 +457,32 @@ class digestLibrary if ( $others_posted ) { - $count++; $frids[ $t['frid'] ] = intval( $t['frid'] ); //----------------------------------------- - // Send email... + // Send notification... //----------------------------------------- - IPSText::getTextClass( 'email' )->getTemplate( $subject, $t['language'] ); - + IPSText::getTextClass('email')->getTemplate( $subject, $t['language'] ); + IPSText::getTextClass( 'email' )->buildMessage( array( 'FORUM_ID' => $t['forum_id'], 'FORUM_NAME' => $forum_name, 'NAME' => $t['members_display_name'], 'CONTENT' => $main_output, - ) ); + ) ); + + $notifyLibrary->setMember( $t ); + $notifyLibrary->setFrom( array() ); + $notifyLibrary->setNotificationKey( 'new_topic' ); + $notifyLibrary->setNotificationText( IPSText::getTextClass('email')->message ); + $notifyLibrary->setNotificationTitle( IPSText::getTextClass('email')->subject ); - $this->DB->insert( 'mail_queue', array( 'mail_to' => $t['email'], - 'mail_date' => time(), - 'mail_from' => '', - 'mail_subject' => IPSText::getTextClass( 'email' )->subject, - 'mail_content' => IPSText::getTextClass( 'email' )->message ) ); + try + { + $notifyLibrary->sendNotification(); + } + catch( Exception $e ){} } } @@ -486,15 +492,5 @@ class digestLibrary { $this->DB->update( 'forum_tracker', array( 'last_sent' => time() ), 'frid IN (' . implode( ',', $frids ) . ')' ); } - - $cache = ipsRegistry::cache()->getCache('systemvars'); - $cache['mail_queue'] += $count; - - //----------------------------------------- - // Update cache with remaning email count - //----------------------------------------- - - ipsRegistry::cache()->setCache( 'systemvars', $cache, array( 'array' => 1, 'donow' => 1 ) ); } - } \ No newline at end of file diff --git a/upload/admin/applications/forums/sources/classes/forums/admin_forum_functions.php b/upload/admin/applications/forums/sources/classes/forums/admin_forum_functions.php index 3ef3e116..883047f1 100644 --- a/upload/admin/applications/forums/sources/classes/forums/admin_forum_functions.php +++ b/upload/admin/applications/forums/sources/classes/forums/admin_forum_functions.php @@ -7,19 +7,21 @@ if ( ! defined( 'IN_ACP' ) ) } /** + *
        * Invision Power Services
      - * IP.Board v3.0.5
      + * IP.Board v3.1.4
        * Admin forum functions library
      - * Last Updated: $Date: 2009-09-29 17:59:02 -0400 (Tue, 29 Sep 2009) $
      + * Last Updated: $Date: 2010-05-20 17:04:12 -0400 (Thu, 20 May 2010) $
      + * 
      * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 26th January 2004 - * @version $Rev: 5178 $ + * @version $Rev: 6344 $ * */ class admin_forum_functions extends class_forums @@ -238,22 +240,6 @@ class admin_forum_functions extends class_forums $this->registry->output->html .= $this->html->forumWrapper( $content, $r, $show_buttons ); } - /** - * End Category - * - * @access public - * @param array $r - * @return void - **/ - public function forum_end_cat($r=array()) - { - // NO LONGER USED? - if ( $this->type == 'manage' ) - { - $this->registry->output->html .= $this->registry->output->end_table(); - } - } - /** * List all forums * diff --git a/upload/admin/applications/forums/sources/classes/forums/class_forums.php b/upload/admin/applications/forums/sources/classes/forums/class_forums.php index e8502cdd..3fda919a 100644 --- a/upload/admin/applications/forums/sources/classes/forums/class_forums.php +++ b/upload/admin/applications/forums/sources/classes/forums/class_forums.php @@ -1,4 +1,21 @@ + * Invision Power Services + * IP.Board v3.1.4 + * Forums Class + * Last Updated: $Date: 2010-11-05 10:24:40 -0400 (Fri, 05 Nov 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @since 26th January 2004 + * @version $Rev: 7097 $ + */ if ( ! defined( 'IN_IPB' ) ) { @@ -6,28 +23,11 @@ if ( ! defined( 'IN_IPB' ) ) exit(); } -/** - * Invision Power Services - * IP.Board v3.0.5 - * Forums Class - * Last Updated: $Date: 2009-11-13 19:55:00 -0500 (Fri, 13 Nov 2009) $ - * - * @author $Author: bfarber $ - * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board - * @subpackage Forums - * @link http://www.iinvisionpower.com - * @since 26th January 2004 - * @version $Rev: 5405 $ - * - */ class class_forums { /** * Cache of visible forums * - * @access public * @var array */ public $forum_cache = array(); @@ -35,7 +35,6 @@ class class_forums /** * Cache of all forums, regardless of perms * - * @access public * @var array */ public $allForums = array(); @@ -43,7 +42,6 @@ class class_forums /** * Cache of visible forums mapped by ID * - * @access public * @var array */ public $forum_by_id = array(); @@ -51,7 +49,6 @@ class class_forums /** * Depth guide * - * @access public * @var string */ public $depth_guide = "--"; @@ -59,7 +56,6 @@ class class_forums /** * Strip invisible forums? * - * @access public * @var bool */ public $strip_invisible = false; @@ -67,7 +63,6 @@ class class_forums /** * Cache of moderators * - * @access public * @var array */ public $mod_cache = array(); @@ -75,7 +70,6 @@ class class_forums /** * Mod cache loaded * - * @access public * @var bool */ public $mod_cache_got = false; @@ -83,7 +77,6 @@ class class_forums /** * Is a read topic only forum * - * @access public * @var bool */ public $read_topic_only = false; @@ -91,7 +84,6 @@ class class_forums /**#@+ * Registry Object Shortcuts * - * @access protected * @var object */ protected $registry; @@ -100,13 +92,14 @@ class class_forums protected $request; protected $lang; protected $member; + protected $memberData; protected $cache; + protected $caches; /**#@-*/ /** * Posts per day status string * - * @access public * @var string */ public $ppdStatusMessage = ''; @@ -114,10 +107,9 @@ class class_forums /** * CONSTRUCTOR * - * @access public * @param object ipsRegistry $registry * @return void - **/ + */ public function __construct( ipsRegistry $registry ) { /* Make objects */ @@ -135,9 +127,8 @@ class class_forums /** * Grab all forums and stuff into array * - * @access public * @return void - **/ + */ public function forumsInit() { /* Query Forum Data */ @@ -147,7 +138,7 @@ class class_forums $this->forum_cache = array(); $this->forum_by_id = array(); - + foreach( $forum_list as $f ) { if( $this->strip_invisible ) @@ -191,11 +182,10 @@ class class_forums } /** - * Returns a list of all forums - * - * @access public - * @return array - */ + * Returns a list of all forums + * + * @return array + */ public function getForumList() { /* Get the forums */ @@ -203,16 +193,11 @@ class class_forums 'select' => 'f.*', 'from' => array( 'forums' => 'f' ), // 'order' => 'f.parent_id, f.position', - 'add_join' => array( - array( - 'select' => 'p.*', + 'add_join' => array( array( 'select' => 'p.*', 'from' => array( 'permission_index' => 'p' ), 'where' => "p.perm_type='forum' AND p.app='forums' AND p.perm_type_id=f.id", - 'type' => 'left', - - ) - ) - ) ); + 'type' => 'left' ) ) ) ); + $q = $this->DB->execute(); /* Loop through and build an array of forums */ @@ -255,6 +240,9 @@ class class_forums $fr['skin_id'] = $f['skin_id']; $fr['permission_showtopic'] = $f['permission_showtopic']; $fr['forums_bitoptions'] = $f['forums_bitoptions']; + $fr['hide_last_info'] = 0; + $fr['can_view_others'] = 0; + $fr['password'] = $f['password']; } else { @@ -301,95 +289,10 @@ class class_forums return $forums_list; } - - /** - * Set up moderator, populate moderator functions - * - * @access public - * @param array Array of member data - * @return array Array of member data populated with moderator details - */ - public function setUpModerator( $member ) - { - $other_mgroups = array(); - - if ( $member['member_group_id'] != $this->settings['guest_group'] ) - { - //----------------------------------------- - // Sprinkle on some moderator stuff... - //----------------------------------------- - if ( $member['g_is_supmod'] == 1 ) - { - $member['is_mod'] = 1; - } - else if ( is_array($this->registry->cache()->getCache('moderators')) AND count($this->registry->cache()->getCache('moderators')) ) - { - $other_mgroups = array(); - - if ( $member['mgroup_others'] ) - { - $other_mgroups = explode( ",", IPSText::cleanPermString( $member['mgroup_others'] ) ); - } - } - - if( is_array($this->registry->cache()->getCache('moderators')) AND count($this->registry->cache()->getCache('moderators')) ) - { - $_mod_forums = isset( $member['forumsModeratorData'] ) && is_array( $member['forumsModeratorData'] ) ? $member['forumsModeratorData'] : array(); - - foreach( $this->registry->cache()->getCache('moderators') as $r ) - { - $modForumIds = explode( ',', IPSText::cleanPermString( $r['forum_id'] ) ); - - if ( $r['member_id'] == $member['member_id'] ) - { - foreach( $modForumIds as $modForumId ) - { - $_mod_forums[ $modForumId ] = $r; - } - - $member['is_mod'] = 1; - } - else if( $r['group_id'] == $member['member_group_id'] ) - { - // Individual mods override group mod settings - // If array is set, don't override it - - foreach( $modForumIds as $modForumId ) - { - if( !is_array($_mod_forums[ $modForumId ]) OR !count($_mod_forums[ $modForumId ]) ) - { - $_mod_forums[ $modForumId ] = $r; - } - } - - $member['is_mod'] = 1; - } - else if( count( $other_mgroups ) AND in_array( $r['group_id'], $other_mgroups ) ) - { - // Individual mods override group mod settings - // If array is set, don't override it - - if( !is_array($_mod_forums[ $r['forum_id'] ]) OR !count($_mod_forums[ $r['forum_id'] ]) ) - { - $_mod_forums[ $r['forum_id'] ] = $r; - } - - $member['is_mod'] = 1; - } - } - - $member['forumsModeratorData'] = $_mod_forums; - } - } - - return $member; - } - /** * Fetch a status message about post moderation status * - * @access public * @param array Array of member data * @param array Array of forum data * @param array Array of topic data @@ -503,7 +406,6 @@ class class_forums * * Optionally populates a status message in ppdStatusMessage * - * @access public * @param array [Member data (assumes $this->memberData if nothing passed )] * @param boolean Populate ppdStatusMessage? * @return boolean TRUE = ok to post, FALSE cannot post @@ -525,11 +427,12 @@ class class_forums /* Check to see if we're past our 24hrs */ if ( ( time() - 86400 ) >= $_time AND ( $_time ) ) { - $_count = 0; - $_time = 0; + $count = $this->fetchMemberPpdCount( $memberData['member_id'], time() - 86400 ); + $_count = $count['count']; + $_time = $count['min']; /* Update member immediately */ - IPSMember::save( $memberData['member_id'], array( 'core' => array( 'members_day_posts' => '0,0' ) ) ); + IPSMember::save( $memberData['member_id'], array( 'core' => array( 'members_day_posts' => $_count . ',' . $_time ) ) ); } /* Grab the correct lang file */ @@ -620,12 +523,28 @@ class class_forums } /** - * Fetch forum data - * - * @access public - * @param int Forum ID - * @return array Forum Data - */ + * Fetch member's PPD details + * + * @param int member id + * @param int timestamp 'from' + * @return array min, count + */ + public function fetchMemberPpdCount( $memberId, $time ) + { + /* Recount today's posts BOTH approved and unapproved */ + $count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count, MIN(post_date) as min', + 'from' => 'posts', + 'where' => 'author_id=' . intval($memberId) . ' AND post_date > ' . $time . ' AND ' . $this->fetchPostHiddenQuery( array( 'visible', 'hidden' ) ) ) ); + + return $count; + } + + /** + * Fetch forum data + * + * @param int Forum ID + * @return array Forum Data + */ public function forumsFetchData( $id ) { return is_array( $this->forum_by_id[ $id ] ) ? $this->forum_by_id[ $id ] : array( 'id' => 0 ); @@ -634,9 +553,8 @@ class class_forums /** * Grab all mods innit * - * @access public * @return void - **/ + */ public function forumsGetModeratorCache() { $this->can_see_queued = array(); @@ -674,10 +592,9 @@ class class_forums /** * Get Moderators * - * @access public * @param integer $forum_id * @return string - **/ + */ public function forumsGetModerators( $forum_id="" ) { if ( ! $this->mod_cache_got ) @@ -700,7 +617,7 @@ class class_forums { if ($moderator['isg'] == 1) { - $mod_string[] = array( "{$this->settings['base_url']}app=members&section=view&module=list&max_results=30&filter={$moderator['gid']}&sort_order=asc&sort_key=members_display_name&st=0&b=1", $moderator['gname'], 0 ); + $mod_string[] = array( $this->registry->getClass("output")->buildSEOUrl( "app=members&module=list&max_results=30&filter={$moderator['gid']}&sort_order=asc&sort_key=members_display_name&st=0&b=1", "public", "false" ), $moderator['gname'], 0 ); } else { @@ -716,7 +633,7 @@ class class_forums { if ($this->mods[$forum_id]['isg'] == 1) { - $mod_string[] = array( "{$this->settings['base_url']}app=members&section=view&module=list&max_results=30&filter={$this->mods[$forum_id]['gid']}&sort_order=asc&sort_key=name&st=0&b=1", $this->mods[$forum_id]['gname'], 0 ); + $mod_string[] = array( $this->registry->getClass("output")->buildSEOUrl( "app=members&max_results=30&filter={$this->mods[$forum_id]['gid']}&sort_order=asc&sort_key=name&st=0&b=1", "public", "false" ), $this->mods[$forum_id]['gname'], 0 ); } else { @@ -732,14 +649,13 @@ class class_forums /** * Check Forum Access * - * @access public * @param integer $fid Forum id * @param bool $prompt_login Prompt login/show error * @param string $in [topic|forum] * @param array $topic Topic data * @param bool $return Return instead of displaying an error * @return bool - **/ + */ public function forumsCheckAccess( $fid, $prompt_login=0, $in='forum', $topic=array(), $return=false ) { $fid = intval( $fid ); @@ -812,9 +728,9 @@ class class_forums if ( isset( $this->forum_by_id[$fid]['password'] ) AND $this->forum_by_id[$fid]['password'] AND $this->forum_by_id[$fid]['sub_can_post'] ) { - if ( isset( $this->forum_by_id[$fid]['password_override'] ) ) + if ( isset( $this->forum_by_id[$fid]['password_override'] ) && IPSText::cleanPermString($this->forum_by_id[$fid]['password_override']) != '' ) { - if( in_array( $this->memberData['member_group_id'], explode( ",", $this->forum_by_id[$fid]['password_override'] ) ) ) + if ( IPSMember::isInGroup( $this->memberData, explode( ",", IPSText::cleanPermString($this->forum_by_id[$fid]['password_override']) ) ) ) { $group_exempt = 1; $deny_access = 0; @@ -854,7 +770,7 @@ class class_forums return false; } - $this->registry->getClass('output')->showError( 'forums_no_view_topic', 103136 ); + $this->registry->getClass('output')->showError( 'forums_no_view_topic', 103136, null, null, 403 ); } else if( (!$this->forum_by_id[$fid]['can_view_others'] AND !$this->memberData['is_mod'] ) AND ( $topic['starter_id'] != $this->memberData['member_id'] ) ) { @@ -863,7 +779,7 @@ class class_forums return false; } - $this->registry->getClass('output')->showError( 'forums_no_view_topic', 103137 ); + $this->registry->getClass('output')->showError( 'forums_no_view_topic', 103137, null, null, 403 ); } } @@ -874,7 +790,7 @@ class class_forums return false; } - $this->registry->getClass('output')->showError( 'forums_not_enough_posts', 103138 ); + $this->registry->getClass('output')->showError( 'forums_not_enough_posts', 103138, null, null, 403 ); } if ( $deny_access == 1 ) @@ -884,7 +800,7 @@ class class_forums return false; } - $this->registry->getClass('output')->showError( 'forums_no_permission', 103139 ); + $this->registry->getClass('output')->showError( 'forums_no_permission', 103139, null, null, 403 ); } else { @@ -895,10 +811,9 @@ class class_forums /** * Compare forum pasword * - * @access public * @param integer $fid Forum ID * @return bool - **/ + */ public function forumsComparePassword( $fid ) { $cookie_pass = IPSCookie::get( 'ipbforumpass_'.$fid ); @@ -916,27 +831,25 @@ class class_forums /** * Forums custom error * - * @access public * @param integer $fid Forum ID * @return void - **/ + */ public function forumsCustomError( $fid ) { $tmp = $this->DB->buildAndFetch( array( 'select' => 'permission_custom_error', 'from' => 'forums', 'where' => "id=".$fid ) ); if ( $tmp['permission_custom_error'] ) { - $this->registry->output->showError( $tmp['permission_custom_error'], 103149 ); + $this->registry->output->showError( $tmp['permission_custom_error'], 103149, null, null, 403 ); } } /** * Forums log in screen * - * @access public * @param integer $fid Forum ID * @return void - **/ + */ public function forumsShowLogin( $fid ) { /* Lang */ @@ -965,11 +878,10 @@ class class_forums * Find all the parents of a child without getting the nice lady to * use the superstore tannoy to shout "Small ugly boy in tears at reception" * - * @access public * @param integer $root_id * @param array $ids * @return array - **/ + */ public function forumsGetParents( $root_id, $ids=array() ) { if ( $this->forum_by_id[ $root_id ]['parent_id'] and $this->forum_by_id[ $root_id ]['parent_id'] != 'root' ) @@ -991,11 +903,10 @@ class class_forums /** * Get all the children * - * @access public * @param integer $root_id * @param array $ids * @return array - **/ + */ public function forumsGetChildren( $root_id, $ids=array() ) { if ( isset( $this->forum_cache[ $root_id ]) AND is_array( $this->forum_cache[ $root_id ] ) ) @@ -1014,12 +925,11 @@ class class_forums /** * Gets cumulative posts/topics - sets new post marker and last topic id * - * @access public * @param integer $root_id * @param array $forum_data * @param bool $done_pass * @return array - **/ + */ public function forumsCalcChildren( $root_id, $forum_data=array(), $done_pass=0 ) { //----------------------------------------- @@ -1037,7 +947,7 @@ class class_forums { foreach( $this->forum_cache[ $root_id ] as $data ) { - if ( $data['last_post'] > $forum_data['last_post'] AND !$data['hide_last_info'] ) + if ( $data['last_post'] > $forum_data['last_post'] AND ! $data['hide_last_info'] ) { $forum_data['last_post'] = $data['last_post']; $forum_data['fid'] = $data['id']; @@ -1049,7 +959,7 @@ class class_forums $forum_data['last_poster_id'] = $data['last_poster_id']; $forum_data['last_poster_name'] = $data['last_poster_name']; $forum_data['seo_last_name'] = $data['seo_last_name']; - $forum_data['_has_unread'] = 0; + $forum_data['_has_unread'] = $forum_data['_has_unread']; # Bug http://forums.invisionpower.com/index.php?autocom=bugtracker&do=show_bug&bug_title_id=3931&bug_cat_id=3 #$forum_data['status'] = $data['status']; @@ -1075,7 +985,7 @@ class class_forums $forum_data['posts'] += $data['posts']; $forum_data['topics'] += $data['topics']; - $_mod = $this->memberData['forumsModeratorData']; + $_mod = ( isset( $this->memberData['forumsModeratorData'] ) ) ? $this->memberData['forumsModeratorData'] : array(); if ( $this->memberData['g_is_supmod'] or ( $_mod && isset( $_mod[ $data['id'] ]['post_q'] ) AND $_mod[ $data['id'] ]['post_q'] == 1 ) ) { @@ -1098,11 +1008,10 @@ class class_forums /** * Create forum breadcrumb nav * - * @access public * @param integer $root_id * @param string $url * @return array - **/ + */ public function forumsBreadcrumbNav($root_id, $url='showforum=') { $nav_array[] = array( $this->forum_by_id[$root_id]['name'], $url . $root_id, $this->forum_by_id[$root_id]['name_seo'], 'showforum' ); @@ -1125,12 +1034,11 @@ class class_forums /** * Builds the forum jump * - * @access public * @param bool $html * @param bool $override * @param bool $remove_redirects * @return string - **/ + */ public function forumsForumJump( $html=0, $override=0, $remove_redirects=0 ) { $jump_string = ""; @@ -1199,7 +1107,6 @@ class class_forums /** * Internal helper function for forumsForumJump * - * @access private * @param integer $root_id * @param string $jump_string * @param string $depth_guide @@ -1207,7 +1114,7 @@ class class_forums * @param bool $override * @param bool $remove_redirects * @return string - **/ + */ private function _forumsForumJumpInternal( $root_id, $jump_string="", $depth_guide="",$html=0, $override=0, $remove_redirects=0 ) { if ( isset($this->forum_cache[ $root_id ]) AND is_array( $this->forum_cache[ $root_id ] ) ) @@ -1242,10 +1149,9 @@ class class_forums /** * Sorts out the last poster, etc * - * @access public * @param array $forum_data * @return array - **/ + */ public function forumsFormatLastinfo( $forum_data ) { //----------------------------------------- @@ -1256,14 +1162,14 @@ class class_forums $this->request['f'] = isset( $this->request['f'] ) ? intval( $this->request['f'] ) : 0; $this->settings['disable_subforum_show'] = intval( $this->settings['disable_subforum_show'] ); - if ( $this->registry->permissions->check( 'read', $this->forum_by_id[ $forum_data['id'] ] ) !== TRUE ) + if ( $this->registry->permissions->check( 'view', $this->forum_by_id[ $forum_data['id'] ] ) !== TRUE ) { $show_subforums = 0; } $forum_data['img_new_post'] = $this->forumsNewPosts( $forum_data ); - $forum_data['last_post'] = $this->registry->getClass('class_localization')->getDate( $forum_data['last_post'], 'LONG' ); + // $forum_data['last_post'] = $this->registry->getClass('class_localization')->getDate( $forum_data['last_post'], 'LONG' ); $forum_data['last_topic_title'] = $this->lang->words['f_none']; $forum_data['last_topic_id'] = 0; @@ -1308,7 +1214,7 @@ class class_forums } } - $_mod = $this->memberData['forumsModeratorData']; + $_mod = ( isset( $this->memberData['forumsModeratorData'] ) ) ? $this->memberData['forumsModeratorData'] : array(); if ( $this->memberData['g_is_supmod'] or ( isset($_mod[ $forum_data['id'] ]['post_q']) AND $_mod[ $forum_data['id'] ]['post_q'] == 1 ) ) { @@ -1326,10 +1232,9 @@ class class_forums /** * Generate the appropriate folder icon for a forum * - * @access public * @param array $forum_data * @return string - **/ + */ public function forumsNewPosts( $forum_data ) { if ( ! $forum_data['status'] ) @@ -1368,7 +1273,6 @@ class class_forums /** * Locate the category of any forum * - * @access public * @param int Forum ID * @return int Category ID (root forum ID) */ @@ -1382,7 +1286,6 @@ class class_forums /** * Generate the appropriate folder icon for a topic * - * @access public * @param array Topic data array * @param string Dot flag * @param bool Whether item is read or not @@ -1394,16 +1297,25 @@ class class_forums // Sort dot //----------------------------------------- - if ($dot != "") + if ( $dot AND $dot != "") { $dot = "_dot"; } + else + { + $dot = ''; + } if ($topic['state'] == 'closed') { return "t_closed"; } + if ( $this->registry->getClass('class_forums')->fetchHiddenTopicType( $topic ) == 'sdelete' ) + { + return "t_closed"; + } + if ($topic['poll_state']) { if ( ! $this->memberData['member_id'] ) @@ -1450,7 +1362,6 @@ class class_forums * $html = 0 means don't return the select html stuff * $html = 1 means return the jump menu with select and option stuff * - * @access public * @param integer HTML flag (see above) * @param integer Override flag * @param integer @@ -1479,7 +1390,6 @@ class class_forums /** * Determine if this user / forum combo can manage mod queue * - * @access public * @param integer Forum ID * @return integer Boolean */ @@ -1492,7 +1402,7 @@ class class_forums { $return = 1; } - else if ( $fid AND $this->memberData['is_mod'] AND $this->memberData['is_mod'] AND isset($_mod[ $fid ]['post_q']) AND $_mod[ $fid ]['post_q'] ) + else if ( $fid AND $this->memberData['is_mod'] AND isset($_mod[ $fid ]['post_q']) AND $_mod[ $fid ]['post_q'] ) { $return = 1; } @@ -1500,11 +1410,434 @@ class class_forums return $return; } + /** + * Determine if this user / forum combo can soft delete + * + * @param integer Forum ID + * @param array Post information + * @return integer Boolean + */ + public function canSoftDeletePosts( $fid=0, $post ) + { + $return = 0; + $_mod = $this->memberData['forumsModeratorData']; + + if ( $this->memberData['g_is_supmod'] ) + { + $return = 1; + } + else if ( $this->memberData['gbw_soft_delete'] ) + { + $return = 1; + } + else if ( $this->memberData['gbw_soft_delete_own'] AND $post['author_id'] == $this->memberData['member_id'] ) + { + $return = 1; + } + else if ( $fid AND $this->memberData['is_mod'] AND isset($_mod[ $fid ]['bw_mod_soft_delete']) AND $_mod[ $fid ]['bw_mod_soft_delete'] ) + { + $return = 1; + } + + return $return; + } + + /** + * Determine if this user / forum combo can hard delete + * + * @param integer Forum ID + * @param array Post information + * @return integer Boolean + */ + public function canHardDeletePosts( $fid=0, $post ) + { + $return = 0; + $_mod = $this->memberData['forumsModeratorData']; + + if ( $this->memberData['g_is_supmod'] ) + { + $return = 1; + } + else if ( $fid AND $this->memberData['is_mod'] AND isset($_mod[ $fid ]['delete_post']) AND $_mod[ $fid ]['delete_post'] ) + { + $return = 1; + } + + return $return; + } + + /** + * Determine if this user / forum combo can un soft delete + * + * @param integer Forum ID + * @return integer Boolean + */ + public function can_Un_SoftDeletePosts( $fid=0 ) + { + $return = 0; + $_mod = $this->memberData['forumsModeratorData']; + + if ( $this->memberData['g_is_supmod'] ) + { + $return = 1; + } + else if ( $this->memberData['gbw_un_soft_delete'] ) + { + $return = 1; + } + else if ( $fid AND $this->memberData['is_mod'] AND isset($_mod[ $fid ]['bw_mod_un_soft_delete']) AND $_mod[ $fid ]['bw_mod_un_soft_delete'] ) + { + $return = 1; + } + + return $return; + } + + + /** + * Determine if this user / forum combo can see soft deleted posts + * + * @param integer Forum ID + * @return integer Boolean + */ + public function canSeeSoftDeletedPosts( $fid=0 ) + { + $return = 0; + $_mod = $this->memberData['forumsModeratorData']; + + if ( $this->memberData['g_is_supmod'] ) + { + $return = 1; + } + else if ( $this->memberData['gbw_soft_delete_see'] ) + { + $return = 1; + } + else if ( $fid AND $this->memberData['is_mod'] AND isset($_mod[ $fid ]['bw_mod_soft_delete_see']) AND $_mod[ $fid ]['bw_mod_soft_delete_see'] ) + { + $return = 1; + } + + return $return; + } + + /** + * Determine if this user / forum combo can soft delete + * + * @param array Topic Data + * @return integer Boolean + */ + public function canSoftDeleteTopics( $fid, $topic=array() ) + { + $return = 0; + $_mod = $this->memberData['forumsModeratorData']; + + if ( $this->memberData['g_is_supmod'] ) + { + $return = 1; + } + else if ( $this->memberData['gbw_soft_delete_topic'] ) + { + $return = 1; + } + else if ( count( $topic ) AND $this->memberData['gbw_soft_delete_own_topic'] AND $topic['starter_id'] == $this->memberData['member_id'] ) + { + $return = 1; + } + else if ( $fid AND $this->memberData['is_mod'] AND isset($_mod[ $fid ]['bw_mod_soft_delete_topic']) AND $_mod[ $fid ]['bw_mod_soft_delete_topic'] ) + { + $return = 1; + } + + return $return; + } + + /** + * Determine if this user / forum combo can un soft delete + * + * @param integer Forum ID + * @return integer Boolean + */ + public function can_Un_SoftDeleteTopics( $fid=0 ) + { + $return = 0; + $_mod = $this->memberData['forumsModeratorData']; + + if ( $this->memberData['g_is_supmod'] ) + { + $return = 1; + } + else if ( $this->memberData['gbw_un_soft_delete_topic'] ) + { + $return = 1; + } + else if ( $fid AND $this->memberData['is_mod'] AND isset($_mod[ $fid ]['bw_mod_un_soft_delete_topic']) AND $_mod[ $fid ]['bw_mod_un_soft_delete_topic'] ) + { + $return = 1; + } + + return $return; + } + + /** + * Determine if this user / forum combo can hard delete + * + * @param integer Forum ID + * @param array Topic information + * @return integer Boolean + */ + public function canHardDeleteTopics( $fid=0, $topic ) + { + $return = 0; + $_mod = $this->memberData['forumsModeratorData']; + + if ( $this->memberData['g_is_supmod'] ) + { + $return = 1; + } + else if ( $fid AND $this->memberData['is_mod'] AND isset($_mod[ $fid ]['delete_topic']) AND $_mod[ $fid ]['delete_topic'] ) + { + $return = 1; + } + + return $return; + } + + /** + * Determine if this user / forum combo can see soft deleted posts + * + * @param integer Forum ID + * @return integer Boolean + */ + public function canSeeSoftDeletedTopics( $fid=0 ) + { + $return = 0; + $_mod = $this->memberData['forumsModeratorData']; + + if ( $this->memberData['g_is_supmod'] ) + { + $return = 1; + } + else if ( $this->memberData['gbw_soft_delete_topic_see'] ) + { + $return = 1; + } + else if ( $fid AND $this->memberData['is_mod'] AND isset($_mod[ $fid ]['bw_mod_soft_delete_topic_see']) AND $_mod[ $fid ]['bw_mod_soft_delete_topic_see'] ) + { + $return = 1; + } + + return $return; + } + + /** + * Determine if this user / forum combo can see soft delete reason + * + * @param integer Forum ID + * @return integer Boolean + */ + public function canSeeSoftDeleteReason( $fid=0 ) + { + $return = 0; + $_mod = $this->memberData['forumsModeratorData']; + + if ( $this->memberData['g_is_supmod'] ) + { + $return = 1; + } + else if ( $this->memberData['gbw_soft_delete_reason'] ) + { + $return = 1; + } + else if ( $fid AND $this->memberData['is_mod'] AND isset($_mod[ $fid ]['bw_mod_soft_delete_reason']) AND $_mod[ $fid ]['bw_mod_soft_delete_reason'] ) + { + $return = 1; + } + + return $return; + } + + /** + * Determine if this user / forum combo can soft delete + * + * @param integer Forum ID + * @return integer Boolean + */ + public function canSeeSoftDeleteContent( $fid=0 ) + { + $return = 0; + $_mod = $this->memberData['forumsModeratorData']; + + if ( $this->memberData['g_is_supmod'] ) + { + $return = 1; + } + else if ( $this->memberData['gbw_soft_delete_see_post'] ) + { + $return = 1; + } + else if ( $fid AND $this->memberData['is_mod'] AND isset($_mod[ $fid ]['bw_mod_soft_delete_see_post']) AND $_mod[ $fid ]['bw_mod_soft_delete_see_post'] ) + { + $return = 1; + } + + return $return; + } + + /** + * Post queue type + * + * @param array Post data + * @return string 'visible', 'hidden' or 'sdelete' + */ + public function fetchHiddenType( $post ) + { + if ( isset( $post['queued'] ) ) + { + switch ( intval( $post['queued'] ) ) + { + case 2: + return 'sdelete'; + break; + case 1: + return 'hidden'; + break; + case 0: + return 'visible'; + break; + } + } + + return 'visible'; + } + + /** + * Fetch correct fields and data + * Pass several or one field through ->fetchPostHiddenQuery( array('hidden', 'sdelete' ) ); + * + * @param array Type: 'sdelete', 'hidden', 'visible', 'notVisible' (notVisible can mean either sDelete or hidden) + * @param string Table prefix (t.) + * @return string + */ + public function fetchPostHiddenQuery( $type, $tPrefix='' ) + { + $type = ( is_array( $type ) ) ? $type : array( $type ); + $values = array(); + + foreach( $type as $_t ) + { + switch( $_t ) + { + case 'sdeleted': + case 'sdelete': + $values[] = 2; + break; + case 'queued': + case 'hidden': + $values[] = 1; + break; + case 'approved': + case 'visible': + $values[] = 0; + break; + } + } + + if ( count( $values ) ) + { + if ( count( $values ) == 1 ) + { + return ' ' . $tPrefix . 'queued=' . $values[0] . ' '; + } + else + { + return ' ' . $tPrefix . 'queued IN (' . implode( ',', $values ) . ') '; + } + } + + /* oops, return something to not break the query */ + return '1=1'; + } + + /** + * Topic queue type + * + * @param array Post data + * @return string 'visible', 'hidden' or 'sdelete' + */ + public function fetchHiddenTopicType( $topic ) + { + if ( isset( $topic['approved'] ) ) + { + switch ( intval( $topic['approved'] ) ) + { + case -1: + return 'sdelete'; + break; + case 0: + return 'hidden'; + break; + case 1: + return 'visible'; + break; + } + } + + return 'visible'; + } + + /** + * Fetch correct fields and data + * Pass several or one field through ->fetchPostHiddenQuery( array('hidden', 'sdelete' ) ); + * + * @param array Type: 'sdelete', 'hidden', 'visible', 'notVisible' (notVisible can mean either sDelete or hidden) + * @param string Table prefix (t.) + * @return string + */ + public function fetchTopicHiddenQuery( $type, $tPrefix='' ) + { + $type = ( is_array( $type ) ) ? $type : array( $type ); + $values = array(); + + foreach( $type as $_t ) + { + switch( $_t ) + { + case 'sdeleted': + case 'sdelete': + $values[] = -1; + break; + case 'queued': + case 'hidden': + $values[] = 0; + break; + case 'approved': + case 'visible': + $values[] = 1; + break; + } + } + + if ( count( $values ) ) + { + if ( count( $values ) == 1 ) + { + return ' ' . $tPrefix . 'approved=' . $values[0] . ' '; + } + else + { + return ' ' . $tPrefix . 'approved IN (' . implode( ',', $values ) . ') '; + } + } + + /* oops, return something to not break the query */ + return '1=1'; + } + /** * Determine if this user / forum combo can manage multi moderation tasks * and return mm_array of allowed tasks * - * @access public * @param integer Forum ID * @return array Allowed tasks */ @@ -1563,44 +1896,15 @@ class class_forums return $mm_array; } - - /** - * Removes the specified post from the search index - * - * @access public - * @param integer $topic_id Topic ID of the post - * @param integer $post_id ID of the post - * @param bool $first_post Set to 1 if this is the first post in a topic - * @return void - **/ - public function removePostFromSearchIndex( $topic_id, $post_id, $first_post=0 ) - { - /* Delete the first post in a topic */ - if( $first_post ) - { - /* Delete all the entries for this topic */ - $this->DB->delete( 'search_index', "type='forum' AND type_2='topic' AND type_id_2={$topic_id}" ); - } - else - { - /* PID Condition */ - $pid = '%s:3:"pid";s:'. strlen( $post_id ) . ':"' . $post_id . '"%'; - $pid2 = '%s:3:"pid";i:'. $post_id . '%'; - /* Delete the single post */ - $this->DB->delete( 'search_index', "type='forum' AND type_2='topic' AND type_id_2='{$topic_id}' AND ( misc LIKE '{$pid}' OR misc LIKE '{$pid2}' )" ); - } - } - /** * Fetch forum IDs safe to use when searching, etc * - * @access public * @param int Optional member ID, if no member ID is passed, it'll use current member * @param array Array of ids to skip * @return array Array of "good" IDs */ - public function fetchSearchableForumIds( $memberId=null, $skipIds=array() ) + public function fetchSearchableForumIds( $memberId=null, $skipIds=array(), $allowTrashCan=false ) { $forumIdsOk = array(); $member = ( $memberId === null ) ? $this->memberData : IPSMember::load( $memberId, 'core' ); @@ -1628,7 +1932,7 @@ class class_forums continue; } - if ( ! $data['sub_can_post'] OR ! $data['can_view_others'] ) + if ( ( ! $data['sub_can_post'] OR ! $data['can_view_others']) AND !$this->memberData['g_access_cp'] ) { continue; } @@ -1638,7 +1942,7 @@ class class_forums continue; } - if ( $this->settings['forum_trash_can_id'] AND $id == $this->settings['forum_trash_can_id'] ) + if ( $allowTrashCan === false AND ( $this->settings['forum_trash_can_id'] AND $id == $this->settings['forum_trash_can_id'] ) ) { continue; } @@ -1660,7 +1964,6 @@ class class_forums /** * Determine if user can still access forum * - * @access public * @param array Topic/member/forum data * @param boolean Check topic access * @return boolean @@ -1676,17 +1979,22 @@ class class_forums $temp_mgroups = array(); $mgroup_perms = array(); + $t['mgroup_others'] = IPSText::cleanPermString( $t['mgroup_others'] ); + if( $t['mgroup_others'] ) { - $t['mgroup_others'] = IPSText::cleanPermString( $t['mgroup_others'] ); $temp_mgroups = explode( ",", $t['mgroup_others'] ); if( count($temp_mgroups) ) { foreach( $temp_mgroups as $other_mgroup ) { - $member_groups[] = $other_mgroup; - $mgroup_perms[] = $this->caches['group_cache'][ $other_mgroup ]['g_perm_id']; + /* Does it exist? */ + if ( $this->caches['group_cache'][ $other_mgroup ]['g_perm_id'] ) + { + $member_groups[] = $other_mgroup; + $mgroup_perms[] = $this->caches['group_cache'][ $other_mgroup ]['g_perm_id']; + } } } @@ -1757,18 +2065,39 @@ class class_forums return false; } - return true; + //----------------------------------------- + // Banned? + //----------------------------------------- + + if( $t['member_banned'] ) + { + return false; + } + + $_canView = false; + + foreach( $member_groups as $mgroup ) + { + if( $this->caches['group_cache'][ $mgroup ]['g_view_board'] ) + { + $_canView = true; + break; + } + } + + return $_canView; } /** * Determine if topic is approved (or if they are a mod) * - * @access public * @param array Topic/member/forum data * @return boolean */ public function checkEmailApproved( $t ) { + $t['mgroup_others'] = IPSText::cleanPermString( $t['mgroup_others'] ); + //----------------------------------------- // Test for approved/approve perms //----------------------------------------- @@ -1777,11 +2106,11 @@ class class_forums { $mod = false; - $memberGroups = $t['member_group_id']; + $memberGroups = array( $t['member_group_id'] ); if( $t['mgroup_others'] ) { - $memberGroups = array_merge( $memberGroups, explode( ",", IPSText::cleanPermString( $t['mgroup_others'] ) ) ); + $memberGroups = array_merge( $memberGroups, explode( ",", IPSText::cleanPermString( $t['mgroup_others'] ) ) ); } foreach( $memberGroups as $groupId ) @@ -1834,13 +2163,49 @@ class class_forums } /** - * Recache the user's watched forums - * - * @access public - * @param int Member ID - * @return boolean - * @author Matt - */ + * Does a guest have access to this forum? + * + * @param int Forum ID + * @param int Override guest group with another (Facebook bot, spider search engine bots) + * @return boolean + * @author Matt + */ + public function guestCanSeeTopic( $forumId=0, $groupOverride=0 ) + { + $forumId = ( $forumId ) ? $forumId : intval( $this->request['f'] ); + $gid = ( $groupOverride ) ? $groupOverride : $this->settings['guest_group']; + $perms = explode( ',', IPSText::cleanPermString( $this->caches['group_cache'][ $gid ]['g_perm_id'] ) ); + + if ( $forumId ) + { + $forum = $this->forum_by_id[ $forumId ]; + + if ( strstr( $forum['perm_read'], '*' ) ) + { + return true; + } + else + { + foreach( $perms as $_perm ) + { + if ( strstr( ',' . $forum['perm_read'] . ',', ',' . $_perm . ',' ) ) + { + return true; + } + } + } + } + + return false; + } + + /** + * Recache the user's watched forums + * + * @param int Member ID + * @return boolean + * @author Matt + */ public function recacheWatchedForums( $memberID ) { /* INIT */ @@ -1871,14 +2236,13 @@ class class_forums } /** - * Build (and optionally save) the last X topic IDs from a forum - * - * @access public - * @param int Forum ID to save - * @param boolean TRUE = SAVE, FALSE = Return Array of IDs - * @param int No. topics to save ( Default is 5 ) - * @return array Array of topic IDs - */ + * Build (and optionally save) the last X topic IDs from a forum + * + * @param int Forum ID to save + * @param boolean TRUE = SAVE, FALSE = Return Array of IDs + * @param int No. topics to save ( Default is 5 ) + * @return array Array of topic IDs + */ public function buildLastXTopicIds( $forumID, $save=TRUE, $limit=5 ) { $ids = array(); @@ -1930,38 +2294,60 @@ class class_forums } /** - * Format last X topics string for saving - * - * @access public - * @param array Array of IDs - * @return string Frozen string format - */ + * Format last X topics string for saving + * + * @param array Array of IDs + * @return string Frozen string format + */ public function lastXFreeze( $ids=array() ) { return serialize( $ids ); } /** - * Format last X topics string for using - * - * @access public - * @param array Array of IDs - * @return string Thawed string format - */ + * Format last X topics string for using + * + * @param array Array of IDs + * @return string Thawed string format + */ public function lastXThaw( $idString=array() ) { return unserialize( $idString ); } + /** + * Hook: Facebook sidebar block + * + * @return string HTML + */ + public function hooks_facebookActivity() + { + return $this->registry->output->getTemplate( 'boards' )->hookFacebookActivity(); + } + + /** + * Hook: Facebook sidebar block + * + * @return string HTML + */ + public function hooks_facebookLike() + { + return $this->registry->output->getTemplate( 'topic' )->hookFacebookLike(); + } + /** * Hook: Recent topics * Moved here so we can update with out requiring global hook changes * + * @param int Number of topics + * @param bool Whether to output directly (true) or return array of topics (false) + * @return mixed String if $output is true, array if $output is false */ - public function hooks_recentTopics() + public function hooks_recentTopics( $topicCount=5, $output=true ) { /* INIT */ $topicIDs = array(); + $topic_rows = array(); $timesUsed = array(); $bvnp = explode( ',', $this->settings['vnp_block_forums'] ); @@ -2013,6 +2399,7 @@ class class_forums } } + $timesUsed[] = $time; $topicIDs[ $time ] = $id; } } @@ -2020,22 +2407,23 @@ class class_forums $timesUsed = array(); - if ( is_array( $topicIDs ) ) + if ( is_array( $topicIDs ) && count( $topicIDs ) ) { krsort( $topicIDs ); - $_topics = array_slice( $topicIDs, 0, 5 ); + /* We get up to double in case some of the latest are moved_to links - we do another array_slice afterwards to limit to right limit */ + $_topics = array_slice( $topicIDs, 0, $topicCount * 2 ); if ( is_array( $_topics ) && count( $_topics ) ) { /* Query Topics */ $this->registry->DB()->build( array( - 'select' => 't.tid, t.title, t.title_seo, t.start_date, t.starter_id, t.starter_name', + 'select' => 't.tid, t.title, t.title_seo, t.start_date, t.starter_id, t.starter_name, t.moved_to, t.views, t.posts', 'from' => array( 'topics' => 't' ), 'where' => 't.tid IN (' . implode( ',', array_values( $_topics ) ) . ')', 'add_join' => array( array( - 'select' => 'm.members_display_name, m.members_seo_name', + 'select' => 'm.member_id, m.members_display_name, m.members_seo_name', 'from' => array( 'members' => 'm' ), 'where' => 'm.member_id=t.starter_id', 'type' => 'left', @@ -2045,10 +2433,13 @@ class class_forums $this->registry->DB()->execute(); - $topic_rows = array(); - while( $r = $this->registry->DB()->fetch() ) { + if( !is_null($r['moved_to']) ) + { + continue; + } + $time = $r['start_date']; if( in_array( $time, $timesUsed ) ) @@ -2059,14 +2450,27 @@ class class_forums } } + $timesUsed[] = $time; $topics_rows[ $time ] = $r; } - krsort( $topics_rows ); + /* Got any results? */ + if ( count($topics_rows) ) + { + krsort( $topics_rows ); + $topics_rows = array_slice( $topics_rows, 0, $topicCount ); + } } } - return $this->registry->output->getTemplate( 'boards' )->hookRecentTopics( $topics_rows ); + if( $output ) + { + return $this->registry->output->getTemplate( 'boards' )->hookRecentTopics( $topics_rows ); + } + else + { + return $topics_rows; + } } /** @@ -2093,7 +2497,7 @@ class class_forums $this->registry->DB()->build( array( 'select' => 'tr.*', 'from' => array( 'tracker' => 'tr' ), - 'where' => 'tr.member_id=' . $this->memberData['member_id'], + 'where' => 'tr.member_id=' . $this->memberData['member_id'] . ' AND tr.topic_id > 0', 'order' => 'tr.last_sent DESC', 'limit' => array( 0, 50 ), 'add_join' => array( @@ -2102,12 +2506,6 @@ class class_forums 'from' => array( 'topics' => 't' ), 'where' => 't.tid=tr.topic_id', 'type' => 'left' - ), - array( - 'select' => 'm.members_seo_name', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=t.starter_id', - 'type' => 'left' ) ) ) ); @@ -2122,7 +2520,7 @@ class class_forums $is_read = $this->registry->classItemMarking->isRead( array( 'forumID' => $r['forum_id'], 'itemID' => $r['tid'], 'itemLastUpdate' => $r['last_post'] ), 'forums' ); - if( !$is_read ) + if( ! $is_read && $this->memberData['member_id'] != $r['last_poster_id'] ) { $updatedTopics[ $r['topic_id'] ] = $r; } @@ -2135,7 +2533,7 @@ class class_forums /* Build a list of hidden forums */ $noForums = array(); $_extra = ''; - + foreach( $this->forum_by_id as $forumID => $forumData ) { if ( $forumData['hide_last_info'] ) diff --git a/upload/admin/applications/forums/sources/classes/forums/index.html b/upload/admin/applications/forums/sources/classes/forums/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/sources/classes/forums/index.html +++ b/upload/admin/applications/forums/sources/classes/forums/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/sources/classes/index.html b/upload/admin/applications/forums/sources/classes/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/sources/classes/index.html +++ b/upload/admin/applications/forums/sources/classes/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/sources/classes/moderate.php b/upload/admin/applications/forums/sources/classes/moderate.php index b972eecf..4c42038c 100644 --- a/upload/admin/applications/forums/sources/classes/moderate.php +++ b/upload/admin/applications/forums/sources/classes/moderate.php @@ -1,18 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Moderator actions - * Last Updated: $Date: 2009-12-04 09:37:44 -0500 (Fri, 04 Dec 2009) $ + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * * - * @author $Author: matt $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Revision: 5519 $ + * @link http://www.invisionpower.com + * @version $Revision: 7003 $ * * @todo [Future] Get rid of init method, determine data dynamically (necessary for any centralized moderation routine, e.g. from search results) */ @@ -28,7 +29,6 @@ class moderatorLibrary /** * Moderator information * - * @access public * @var array Array of moderator details */ public $moderator = array(); @@ -36,7 +36,6 @@ class moderatorLibrary /** * Forum information * - * @access public * @var array Array of forum details */ public $forum = array(); @@ -44,7 +43,6 @@ class moderatorLibrary /** * Topic information * - * @access public * @var array Array of topic details */ public $topic = array(); @@ -52,7 +50,6 @@ class moderatorLibrary /** * Error code encountered * - * @access public * @var string Error code */ public $error = ""; @@ -60,7 +57,6 @@ class moderatorLibrary /** * Automatically update forum info * - * @access public * @var boolean Whether or not to automatically update forum info */ public $auto_update = false; @@ -68,7 +64,6 @@ class moderatorLibrary /** * Stored statement * - * @access public * @var string Stored multi-mod statement */ public $stm = ""; @@ -76,13 +71,14 @@ class moderatorLibrary /** * Upload directory * - * @access public * @var string Upload directory */ public $upload_dir = "./uploads"; /**#@+ * Registry Object Shortcuts + * + * @var object */ protected $registry; protected $DB; @@ -90,13 +86,14 @@ class moderatorLibrary protected $request; protected $lang; protected $member; + protected $memberData; protected $cache; + protected $caches; /**#@-*/ /** * Class entry point * - * @access public * @param object Registry reference * @return void */ @@ -116,8 +113,8 @@ class moderatorLibrary /* Check for class_forums */ if( ipsRegistry::isClassLoaded('class_forums') !== TRUE ) { - require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" ); - $this->registry->setClass( 'class_forums', new class_forums( $registry ) ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' ); + $this->registry->setClass( 'class_forums', new $classToLoad( $registry ) ); $this->registry->class_forums->forumsInit(); } @@ -127,7 +124,6 @@ class moderatorLibrary /** * Initialization * - * @access public * @param array Forum array * @param array [Optional] Topic array * @param array [Optional] Moderator array @@ -154,7 +150,6 @@ class moderatorLibrary * Toggle approve status of content by a member * WARNING: This is a utility function. No permission checks are performed. * - * @access public * @param int Member ID (topic starter / post author) * @param boolean TRUE = approve, FALSE = unapprove * @param string Option [ topics / replies / all ] @@ -274,7 +269,6 @@ class moderatorLibrary * @todo [Future] Deleting topics and posts is bloody expensive. This limits to 150 ids or it could bust the IN() SQL statement * Probably need to find a neater way to do this.. Task? * - * @access public * @param int Member ID (topic starter / post author) * @param string Option [ topics / replies / all ] * @param int [ Optional: last X hours worth of data ] @@ -348,7 +342,7 @@ class moderatorLibrary $_topicids[ $row['topic_id'] ] = $row['topic_id']; } - if ( is_array( $_topicids ) AND count( $topicids ) ) + if ( is_array( $_topicids ) AND count( $_topicids ) ) { $this->DB->build( array( 'select' => 'tid, forum_id', 'from' => 'topics', @@ -382,7 +376,7 @@ class moderatorLibrary // Move, don't delete //----------------------------------------- - $this->topicMove( $topicsIDs, 0, $this->trash_forum ); + $this->topicMove( $topicIDs, 0, $this->trash_forum ); $this->forumRecount( $this->trash_forum ); } @@ -410,7 +404,7 @@ class moderatorLibrary } else { - $this->postDelete( $topicIDs, 1 ); + $this->postDelete( $postIDs ); } } @@ -428,10 +422,159 @@ class moderatorLibrary return TRUE; } + /** + * Delete / undelete posts + * + * @param array Array of Post IDs + * @param boolean Approve (TRUE) / Unapprove (FALSE) + * @param int Fix so posts can only come from a specific topic ID + * @return boolean + */ + public function postToggleSoftDelete( $postIDs, $delete=FALSE, $reason='', $topicIDFix=0 ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $_restoreTopic = 1; + $_deletedPost = 0; + + if ( $delete === TRUE ) + { + $_restoreTopic = -1; + $_deletedPost = 2; + } + + $_topics = array(); + $_forumIDs = array(); + $_pids = IPSLib::cleanIntArray( $postIDs ); + $_tids = array(); + + //----------------------------------------- + // Fetch distinct topic IDs + //----------------------------------------- + + $this->DB->build( array( 'select' => $this->DB->buildDistinct( 'p.topic_id' ), + 'from' => array( 'posts' => 'p' ), + 'where' => 'p.pid IN (' . implode( ',', $postIDs ) . ')', + 'add_join' => array( array( 'select' => 't.*', + 'from' => array( 'topics' => 't' ), + 'where' => 'p.topic_id=t.tid', + 'type' => 'inner' ) ) ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $_topics[ $row['topic_id'] ] = $row; + } + + //----------------------------------------- + // Did we get the first post too? + //----------------------------------------- + + foreach( $_topics as $tid => $topicData ) + { + /* Fix to a topic? */ + if ( $topicIDFix AND ( $topicIDFix != $tid ) ) + { + continue; + } + + $_forumIDs[] = $topicData['forum_id']; + + if ( in_array( $topicData['topic_firstpost'], $_pids ) ) + { + $this->DB->update( 'topics', array( 'approved' => $_restoreTopic ), 'tid=' . $tid ); + + $tmp = $_pids; + $_pids = array(); + + foreach( $tmp as $t ) + { + if ( $t != $topicData['topic_firstpost'] ) + { + $_pids[] = $t; + } + else + { + $_tids[ $topicData['tid'] ] = $topicData['tid']; + } + } + } + } + + if ( count( $_pids ) ) + { + $this->DB->update( 'posts', array( 'queued' => $_deletedPost ), 'pid IN (' . implode( ",", $_pids ) . ')' ); + + if ( $_deletedPost ) + { + foreach( $_pids as $_p ) + { + /* Add entry to delete log innit */ + IPSDeleteLog::addEntry( $_p, 'post', $reason, $this->memberData ); + } + } + else + { + /* Un-deleting, so delete */ + IPSDeleteLog::removeEntries( $_pids, 'post' ); + } + } + + if ( count( $_tids ) ) + { + if ( $_deletedPost ) + { + foreach( $_tids as $_t ) + { + IPSDeleteLog::addEntry( $_t, 'topic', $reason, $this->memberData ); + } + } + else + { + /* Un-deleting, so delete */ + IPSDeleteLog::removeEntries( $_tids, 'topic' ); + } + } + + if ( $delete ) + { + foreach( $_topics as $tid => $topicData ) + { + $this->addModerateLog( $topicData['forum_id'], $tid, 0, $topicData['title'], sprintf( $this->lang->words['acp_softdeleted_posts'], count( $_pids ), $topicData['title'] ) ); + } + } + else + { + foreach( $_topics as $tid => $topicData ) + { + $this->addModerateLog( $topicData['forum_id'], $tid, 0, $topicData['title'], sprintf( $this->lang->words['acp_unsoftdeleted_posts'], count( $_pids ), $topicData['title'] ) ); + } + } + + foreach( $_topics as $tid => $topicData ) + { + $this->rebuildTopic( $tid ); + } + + if ( count( $_forumIDs ) ) + { + foreach( $_forumIDs as $_fid ) + { + $this->forumRecount( $_fid ); + } + } + + $this->statsRecount(); + + return TRUE; + } + /** * Approve / unapprove posts * - * @access public * @param array Array of Post IDs * @param boolean Approve (TRUE) / Unapprove (FALSE) * @param int Fix so posts can only come from a specific topic ID @@ -544,7 +687,7 @@ class moderatorLibrary $this->addModerateLog( $topicData['forum_id'], $tid, 0, $topicData['title'], sprintf( $this->lang->words['acp_unapproved_posts'], count( $_pids ), $topicData['title'] ) ); } } - + foreach( $_topics as $tid => $topicData ) { $this->rebuildTopic( $tid ); @@ -566,7 +709,6 @@ class moderatorLibrary /** * Clear out the mod-queue table appropriately * - * @access public * @param string [topic|post] Type of item moved * @param mixed ID of topic or post, or array of ids * @param boolean Was content approved? @@ -579,9 +721,8 @@ class moderatorLibrary //----------------------------------------- require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPost.php' ); - require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPostForms.php' ); - - $_postClass = new classPostForms( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPostForms.php', 'classPostForms', 'forums' ); + $_postClass = new $classToLoad( $this->registry ); //----------------------------------------- // Are we operating on one id, or an array @@ -625,7 +766,7 @@ class moderatorLibrary 'where' => "m.type='{$type}' AND m.{$where}", 'add_join' => array( array( - 'select' => 'p.pid, p.post, p.author_id, p.post_date', + 'select' => 'p.pid, p.post, p.author_id, p.post_date, p.topic_id', 'from' => array( 'posts' => 'p' ), 'where' => 'p.pid=m.type_id', 'type' => 'left', @@ -639,7 +780,7 @@ class moderatorLibrary ) ) ); $outer = $this->DB->execute(); - + while( $r = $this->DB->fetch($outer) ) { $member = IPSMember::load( $r['author_id'], 'extendedProfile,groups' ); @@ -699,9 +840,8 @@ class moderatorLibrary /** * Delete a post * - * @access public * @param mixed Post id | Array of post ids - * @return boolean Post deleted + * @return array Topic IDs */ public function postDelete($id) { @@ -709,7 +849,7 @@ class moderatorLibrary $attach_tid = array(); $attach_ids = array(); $topics = array(); - + $fids = array(); $this->error = ""; if ( is_array( $id ) ) @@ -737,6 +877,10 @@ class moderatorLibrary } } + /* Remove from deletion log */ + $_ids = ( is_array( $id ) ) ? $id : array( $id ); + IPSDeleteLog::removeEntries( $_ids, 'post', TRUE ); + //----------------------------------------- // Get Stuff //----------------------------------------- @@ -749,9 +893,6 @@ class moderatorLibrary $posts[ $r['pid'] ] = $r['topic_id']; $topics[ $r['topic_id'] ] = 1; - /* Delete from the index */ - $this->registry->class_forums->removePostFromSearchIndex( $r['topic_id'], $r['pid'], $r['new_topic'] ); - /* Delete from rep cache */ $this->DB->delete( 'reputation_cache', "app='forums' AND type='pid' AND type_id={$r['pid']}" ); $this->DB->delete( 'reputation_index', "app='forums' AND type='pid' AND type_id={$r['pid']}" ); @@ -761,8 +902,8 @@ class moderatorLibrary // Is there an attachment to this post? //----------------------------------------- - require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' ); - $class_attach = new class_attach( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $class_attach = new $classToLoad( $this->registry ); $class_attach->type = 'post'; $class_attach->init(); @@ -792,6 +933,28 @@ class moderatorLibrary $this->rebuildTopic( $tid ); } + if ( count( $topics ) ) + { + $this->DB->build( array( 'select' => 'forum_id', + 'from' => 'topics', + 'where' => 'tid IN (' . implode( ',', array_keys( $topics ) ) . ')' ) ); + + $i = $this->DB->execute(); + + while( $row = $this->DB->fetch( $i ) ) + { + $fids[ $row['forum_id'] ] = $row['forum_id']; + } + } + + if ( count( $fids ) ) + { + foreach( $fids as $f ) + { + $this->forumRecount( $f ); + } + } + /* Run moderation sync */ $this->runModSync( 'postDelete', array_keys( $posts ) ); @@ -801,19 +964,19 @@ class moderatorLibrary $pid = str_replace( array( 'IN', '(', ')', '=' ), '', $pid ); - $this->addModerateLog( "", "", "", $pid, sprintf( $this->lang->words['multi_post_delete'], $pids ) ); - return true; + $this->addModerateLog( "", "", "", $pid, sprintf( $this->lang->words['multi_post_delete'], $_ids ) ); + + return array_keys($topics); } /** * Rebuild a topic * - * @access public * @param integer Topic id * @param boolean Rebuild forum afterwards * @return boolean Rebuild complete */ - public function rebuildTopic( $tid, $doforum=1, $search_index=1 ) + public function rebuildTopic( $tid, $doforum=1 ) { /* Topic ID */ $tid = intval( $tid ); @@ -832,7 +995,7 @@ class moderatorLibrary // Get the correct number of replies //----------------------------------------- - $posts = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as posts', 'from' => 'posts', 'where' => "topic_id={$tid} and queued != 1" ) ); + $posts = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as posts', 'from' => 'posts', 'where' => "topic_id={$tid} and queued=0" ) ); $pcount = intval( $posts['posts'] - 1 ); //----------------------------------------- @@ -842,6 +1005,13 @@ class moderatorLibrary $qposts = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as posts', 'from' => 'posts', 'where' => "topic_id={$tid} and queued=1" ) ); $qpcount = intval( $qposts['posts'] ); + //----------------------------------------- + // Get the correct number of soft deleted replies + //----------------------------------------- + + $dposts = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as posts', 'from' => 'posts', 'where' => "topic_id={$tid} and queued=2" ) ); + $dpcount = intval( $dposts['posts'] ); + //----------------------------------------- // Get last post info //----------------------------------------- @@ -914,19 +1084,20 @@ class moderatorLibrary 'last_poster_name' => 'string' ); $this->DB->update( 'topics', array( - 'last_post' => intval($last_post['post_date'] ? $last_post['post_date'] : $first_post['post_date']), - 'last_poster_id' => intval($last_post['author_id'] ? $last_post['author_id'] : ( $pcount > 0 ? 0 : $first_post['author_id'] )), - 'last_poster_name' => $_last_poster_name, - 'topic_queuedposts' => intval($qpcount), - 'posts' => intval($pcount), - 'starter_id' => intval($first_post['author_id']), - 'starter_name' => $first_poster_name, - 'seo_first_name' => IPSText::makeSeoTitle( $first_poster_name ), - 'seo_last_name' => IPSText::makeSeoTitle( $_last_poster_name ), - 'start_date' => intval($first_post['post_date']), - 'topic_firstpost' => intval($first_post['pid']), - 'topic_hasattach' => intval($attach['count']), - 'title_seo' => IPSText::makeSeoTitle( $last_post['title'] ) + 'last_post' => intval($last_post['post_date'] ? $last_post['post_date'] : $first_post['post_date']), + 'last_poster_id' => intval($last_post['author_id'] ? $last_post['author_id'] : ( $pcount > 0 ? 0 : $first_post['author_id'] )), + 'last_poster_name' => $_last_poster_name, + 'topic_queuedposts' => intval($qpcount), + 'topic_deleted_posts' => intval($dpcount), + 'posts' => intval($pcount), + 'starter_id' => intval($first_post['author_id']), + 'starter_name' => $first_poster_name, + 'seo_first_name' => IPSText::makeSeoTitle( $first_poster_name ), + 'seo_last_name' => IPSText::makeSeoTitle( $_last_poster_name ), + 'start_date' => intval($first_post['post_date']), + 'topic_firstpost' => intval($first_post['pid']), + 'topic_hasattach' => intval($attach['count']), + 'title_seo' => IPSText::makeSeoTitle( $last_post['title'] ) ), 'tid=' . $tid ); //----------------------------------------- @@ -976,7 +1147,7 @@ class moderatorLibrary 'limit' => array( 1 ) ) ); - $dbs['newest_id'] = $tt['tid'] ? $tt['tid'] : ""; + $dbs['newest_id'] = $tt['tid'] ? $tt['tid'] : 0; $dbs['newest_title'] = $tt['title'] ? $tt['title'] : ""; $dbs['seo_last_title'] = IPSText::makeSeoTitle( $tt['title'] ); } @@ -989,46 +1160,6 @@ class moderatorLibrary $this->DB->update( 'forums', $dbs, "id=" . intval($this->forum['id']) ); } - - /* Rebuild the search index for this topic */ - if( $search_index ) - { - /* Remove the old entries */ - $this->registry->class_forums->removePostFromSearchIndex( $tid, 0, 1 ); - - /* Rebuild the posts */ - $this->DB->build( array( - 'select' => 'p.pid, p.post, p.author_id, p.topic_id, p.post_date', - 'from' => array( 'posts' => 'p' ), - 'order' => 'pid ASC', - 'where' => 'p.queued=0 AND p.topic_id=' . $tid, - 'add_join' => array( - array( - 'select' => 't.title, t.forum_id, t.topic_firstpost', - 'from' => array( 'topics' => 't' ), - 'where' => 'p.topic_id=t.tid', - 'type' => 'left' - ) - ) - ) ); - $q = $this->DB->execute(); - - while( $r = $this->DB->fetch( $q ) ) - { - /* The first post needs some different data */ - if( $r['topic_firstpost'] == $r['pid'] ) - { - $pid = 0; - $title = $r['title']; - } - else - { - $pid = serialize( array( 'pid' => $r['pid'], 'title' => $r['title'] ) ); - $title = ''; - } - - } - } return true; } @@ -1036,7 +1167,6 @@ class moderatorLibrary /** * Add a reply to a topic * - * @access public * @param string Post contnet * @param array Array of topic ids to apply this reply to * @param boolean Increment post count? @@ -1180,7 +1310,6 @@ class moderatorLibrary /** * Close a topic * - * @access public * @param integer Topic id * @return boolean */ @@ -1196,7 +1325,6 @@ class moderatorLibrary /** * Open a topic * - * @access public * @param integer Topic id * @return boolean */ @@ -1211,7 +1339,6 @@ class moderatorLibrary /** * Pin a topic * - * @access public * @param integer Topic id * @return boolean */ @@ -1226,7 +1353,6 @@ class moderatorLibrary /** * Unpin a topic * - * @access public * @param integer Topic id * @return boolean */ @@ -1241,7 +1367,6 @@ class moderatorLibrary /** * Delete a topic * - * @access public * @param mixed Topic id | Array of topic ids * @param boolean Skip updating the stats * @return boolean @@ -1277,6 +1402,10 @@ class moderatorLibrary } } + /* Remove from deletion log */ + $_ids = ( is_array( $id ) ) ? $id : array( $id ); + IPSDeleteLog::removeEntries( $_ids, 'topic', TRUE ); + //----------------------------------------- // Remove polls assigned to this topic //----------------------------------------- @@ -1307,8 +1436,8 @@ class moderatorLibrary // Remove the attachments //----------------------------------------- - require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' ); - $class_attach = new class_attach( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $class_attach = new $classToLoad( $this->registry ); $class_attach->type = 'post'; $class_attach->init(); @@ -1319,7 +1448,6 @@ class moderatorLibrary //----------------------------------------- $this->DB->delete( 'posts', "topic_id" . $tid ); - $this->DB->delete( 'search_index', "type='forum' AND type_2='topic' AND type_id_2 " . $tid ); $this->DB->delete( 'reputation_cache', "app='forums' AND type='pid' AND type_id " . $tid ); $this->DB->delete( 'reputation_index', "app='forums' AND type='pid' AND type_id " . $tid ); @@ -1339,7 +1467,7 @@ class moderatorLibrary } /* Run moderation sync */ - $this->runModSync( 'topicDelete', array_keys( $posts ) ); + $this->runModSync( 'topicDelete', $_ids ); return TRUE; } @@ -1347,7 +1475,6 @@ class moderatorLibrary /** * Move a topic * - * @access public * @param mixed Topic id | Array of topic ids * @param integer Source forum * @param integer Move to forum @@ -1378,10 +1505,11 @@ class moderatorLibrary // Mark as read in new forum //----------------------------------------- - foreach( $topics as $topicId ) - { - $this->registry->classItemMarking->markRead( array( 'forumID' => $moveto, 'itemID' => $topicId ), 'forums' ); - } + /* Bug #21052 */ + //foreach( $topics as $topicId ) + //{ + // $this->registry->classItemMarking->markRead( array( 'forumID' => $moveto, 'itemID' => $topicId ), 'forums' ); + //} } else { @@ -1407,9 +1535,6 @@ class moderatorLibrary $this->DB->update( 'topics', array( 'forum_id' => $moveto ), $forumIDSQL . "tid" . $tid ); - /* Update the search index */ - //$this->DB->update( 'search_index', array( 'type_id' => $moveto ), "type='forum' AND type_2='topic' AND type_id_2 {$tid}" ); - //----------------------------------------- // Update the polls //----------------------------------------- @@ -1491,21 +1616,11 @@ class moderatorLibrary //----------------------------------------- $perm_id = $r['org_perm_id'] ? $r['org_perm_id'] : $r['g_perm_id']; - $pass = 0; - $forum_perm_array = explode( ",", $this->registry->class_forums->allForums[ $r['forum_id'] ]['perm_read'] ); - foreach( explode( ',', $perm_id ) as $u_id ) - { - if ( $u_id AND in_array( $u_id, $forum_perm_array ) ) - { - $pass = 1; - } - } - - if ( $pass != 1 ) + if ( $this->registry->permissions->check( 'read', $this->registry->class_forums->allForums[ $moveto ], explode( ',', IPSText::cleanPermString( $perm_id ) ) ) !== TRUE ) { $trid_to_delete[] = $r['trid']; - } + } } if ( count($trid_to_delete) > 0 ) @@ -1516,10 +1631,89 @@ class moderatorLibrary return true; } + /** + * Delete / undelete posts + * + * @param array Array of Post IDs + * @param boolean Approve (TRUE) / Unapprove (FALSE) + * @return boolean + */ + public function topicToggleSoftDelete( $topicIds, $delete=FALSE, $reason='' ) + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $_restoreTopic = 1; + + if ( $delete === TRUE ) + { + $_restoreTopic = -1; + } + + $_topics = array(); + $_forumIDs = array(); + $_tids = IPSLib::cleanIntArray( $topicIds ); + + //----------------------------------------- + // Fetch distinct topic IDs + //----------------------------------------- + + $this->DB->build( array( 'select' => '*', + 'from' => 'topics', + 'where' => 'tid IN (' . implode( ',', $_tids ) . ')' ) ); + + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $_topics[ $row['tid'] ] = $row; + $_forumIDs[ $row['forum_id'] ] = $row['forum_id']; + } + + //----------------------------------------- + // Did we get the first post too? + //----------------------------------------- + + foreach( $_topics as $tid => $topicData ) + { + $this->DB->update( 'topics', array( 'approved' => $_restoreTopic ), 'tid=' . $tid ); + + if ( $delete ) + { + IPSDeleteLog::addEntry( $tid, 'topic', $reason, $this->memberData ); + } + + /* Rebuild topic */ + $this->rebuildTopic( $tid ); + + /* Mod log */ + $this->addModerateLog( $topicData['forum_id'], $tid, 0, $topicData['title'], sprintf( $this->lang->words['acp_altered_topics'], array(), $topicData['title'] ) ); + } + + /* Restoring */ + if ( ! $delete ) + { + /* Un-deleting, so delete */ + IPSDeleteLog::removeEntries( $_tids, 'post' ); + } + + if ( count( $_forumIDs ) ) + { + foreach( $_forumIDs as $_fid ) + { + $this->forumRecount( $_fid ); + } + } + + $this->statsRecount(); + + return TRUE; + } + /** * Recount total topics and replies for site statistics * - * @access public * @return boolean */ public function statsRecount() @@ -1533,7 +1727,6 @@ class moderatorLibrary /** * Recount a forum * - * @access public * @return boolean */ public function forumRecount( $fid="" ) @@ -1567,6 +1760,14 @@ class moderatorLibrary $queued_topics = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count', 'from' => 'topics', 'where' => "approved=0 and forum_id={$fid}" ) ); + + //----------------------------------------- + // Get the DELETED topics.. + //----------------------------------------- + + $deleted_topics = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count', + 'from' => 'topics', + 'where' => "approved=-1 and forum_id={$fid}" ) ); //----------------------------------------- // Get the posts.. @@ -1584,6 +1785,14 @@ class moderatorLibrary 'from' => 'topics', 'where' => "forum_id={$fid}" ) ); + //----------------------------------------- + // Get the DELETED posts.. + //----------------------------------------- + + $deleted_posts = $this->DB->buildAndFetch( array( 'select' => 'SUM(topic_deleted_posts) as replies', + 'from' => 'topics', + 'where' => "forum_id={$fid}" ) ); + //----------------------------------------- // Get the forum last poster.. //----------------------------------------- @@ -1621,6 +1830,8 @@ class moderatorLibrary 'posts' => intval($posts['replies']), 'queued_topics' => intval($queued_topics['count']), 'queued_posts' => intval($queued_posts['replies']), + 'deleted_posts' => intval($deleted_posts['replies']), + 'deleted_topics' => intval($deleted_topics['count']), 'newest_id' => intval($newest_topic['tid']), 'newest_title' => $newest_topic['title'], 'last_x_topic_ids' => $lastXTopics @@ -1646,7 +1857,6 @@ class moderatorLibrary /** * Multi-statement init * - * @access public * @return boolean */ public function stmInit() @@ -1659,7 +1869,6 @@ class moderatorLibrary /** * Multi-statement execute * - * @access public * @param mixed Id | Array of ids * @return boolean */ @@ -1709,7 +1918,6 @@ class moderatorLibrary /** * Multi-statement pin topic * - * @access public * @return boolean */ public function stmAddPin() @@ -1722,7 +1930,6 @@ class moderatorLibrary /** * Multi-statement unpin topic * - * @access public * @return boolean */ public function stmAddUnpin() @@ -1735,7 +1942,6 @@ class moderatorLibrary /** * Multi-statement close topic * - * @access public * @return boolean */ public function stmAddClose() @@ -1750,7 +1956,6 @@ class moderatorLibrary /** * Multi-statement open topic * - * @access public * @return boolean */ public function stmAddOpen() @@ -1765,7 +1970,6 @@ class moderatorLibrary /** * Multi-statement update topic title * - * @access public * @return boolean */ public function stmAddTitle($new_title='') @@ -1783,7 +1987,6 @@ class moderatorLibrary /** * Multi-statement update topic description topic * - * @access public * @return boolean */ public function stmAddDesc($new_desc='') @@ -1801,7 +2004,6 @@ class moderatorLibrary /** * Multi-statement approve topic * - * @access public * @return boolean */ public function stmAddApprove() @@ -1814,7 +2016,6 @@ class moderatorLibrary /** * Multi-statement unapprove topic * - * @access public * @return boolean */ public function stmAddUnapprove() @@ -1827,7 +2028,6 @@ class moderatorLibrary /** * Create 'where' clause for SQL forum pruning * - * @access public * @return boolean */ public function sqlPruneCreate( $forum_id, $starter_id="", $topic_state="", $post_min="", $date_exp="", $ignore_pin="" ) @@ -1869,7 +2069,6 @@ class moderatorLibrary /** * Determines if current member is authorized to use multi-mod * - * @access public * @return boolean */ public function mmAuthorize() @@ -1894,7 +2093,6 @@ class moderatorLibrary /** * Checks if multi-mod is allowed in a specified forum * - * @access public * @return boolean */ public function mmCheckIdInForum( $fid, $mm_data) @@ -1912,7 +2110,6 @@ class moderatorLibrary /** * Add an entry to the moderator log * - * @access public * @param integer Forum id * @param integer Topic id * @param string Topic title @@ -1930,11 +2127,11 @@ class moderatorLibrary 'member_id' => $this->memberData['member_id'], 'member_name' => $this->memberData['members_display_name'], 'ip_address' => $this->member->ip_address, - 'http_referer' => htmlspecialchars(my_getenv('HTTP_REFERER')), + 'http_referer' => htmlspecialchars( my_getenv('HTTP_REFERER') ), 'ctime' => time(), - 'topic_title' => substr( $t_title, 0, 128 ), - 'action' => substr( $mod_title, 0, 128 ), - 'query_string' => substr( htmlspecialchars(my_getenv('QUERY_STRING')), 0, 128 ), + 'topic_title' => $t_title, + 'action' => $mod_title, + 'query_string' => htmlspecialchars( my_getenv('QUERY_STRING') ), ) ); return TRUE; } @@ -1942,7 +2139,6 @@ class moderatorLibrary /** * Run the forum mod sync system * - * @access public * @param string Function to call * @return bool */ @@ -1958,27 +2154,30 @@ class moderatorLibrary /* Loop through applications */ foreach( $app_cache as $app_dir => $app ) { - /* Setup */ - $_file = IPSLib::getAppDir( $app['app_directory'] ) . '/extensions/forumDataSync.php'; - $_class = $app['app_directory'] . '_forumDataSync'; - - /* Check for the file */ - if( file_exists( $_file ) ) + if( IPSLib::appIsInstalled( $app_dir ) ) { - /* Get the file */ - require_once( $_file ); - - /* Check for the class */ - if( class_exists( $_class ) ) + /* Setup */ + $_file = IPSLib::getAppDir( $app['app_directory'] ) . '/extensions/forumDataSync.php'; + $_class = $app['app_directory'] . '_forumDataSync'; + + /* Check for the file */ + if( file_exists( $_file ) ) { - /* Create an object */ - $_obj = new $_class( $this->registry ); - - /* Check for the module */ - if( method_exists( $_obj, $func ) ) + /* Get the file */ + require_once( $_file ); + + /* Check for the class */ + if( class_exists( $_class ) ) { - /* Call it */ - call_user_func_array( array( $_obj, $func ), $params ); + /* Create an object */ + $_obj = new $_class( $this->registry ); + + /* Check for the module */ + if( method_exists( $_obj, $func ) ) + { + /* Call it */ + call_user_func_array( array( $_obj, $func ), $params ); + } } } } @@ -1988,7 +2187,6 @@ class moderatorLibrary /** * Setup the trash can forum * - * @access private * @author Brandon Farber * @return void */ @@ -2017,5 +2215,4 @@ class moderatorLibrary } } } - } \ No newline at end of file diff --git a/upload/admin/applications/forums/sources/classes/post/classPost.php b/upload/admin/applications/forums/sources/classes/post/classPost.php index 5d8e59d9..763c67e1 100644 --- a/upload/admin/applications/forums/sources/classes/post/classPost.php +++ b/upload/admin/applications/forums/sources/classes/post/classPost.php @@ -1,19 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Moderator actions - * Last Updated: $Date: 2009-11-27 14:35:44 -0500 (Fri, 27 Nov 2009) $ + * Last Updated: $Date: 2010-10-23 08:40:34 -0400 (Sat, 23 Oct 2010) $ + * * File Created By: Matt Mecham * - * @author $Author: michael $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Revision: 5488 $ + * @link http://www.invisionpower.com + * @version $Revision: 7023 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -27,23 +28,13 @@ class classPost /** * Attachments class * - * @access public * @var object */ public $class_attach; - - /** - * HTML output - * - * @access public - * @var string - */ - public $output = ""; - + /** * Moderators * - * @access protected * @var array */ protected $moderator = array(); @@ -51,7 +42,6 @@ class classPost /** * Topic data * - * @access public * @var array */ public $topic = array(); @@ -59,7 +49,6 @@ class classPost /** * Open/close times * - * @access public * @var array */ public $times = array( 'open' => NULL, 'close' => NULL ); @@ -67,7 +56,6 @@ class classPost /** * This request triggers two posts to merge * - * @access protected * @var bool */ protected $_isMergingPosts = false; @@ -75,7 +63,6 @@ class classPost /**#@+ * Various user permissions * - * @access public * @var mixed integer|boolean */ public $can_add_poll = 0; @@ -91,7 +78,6 @@ class classPost /**#@+ * Registry Object Shortcuts * - * @access protected * @var object */ protected $registry; @@ -100,20 +86,21 @@ class classPost protected $request; protected $lang; protected $member; + protected $memberData; + protected $cache; + protected $caches; /**#@-*/ /** * Internal post array when editing * * @var array - * @access protected */ protected $_originalPost = array(); /** * Internal __call array * - * @access private * @var array */ private $_internalData = array(); @@ -122,7 +109,6 @@ class classPost * Internal post error string * * @var string - * @access protected */ public $_postErrors = ''; @@ -130,22 +116,35 @@ class classPost * Topic Title * * @var string - * @access protected */ - protected $_topicTitle = ''; + protected $_topicTitle = ''; + + /** + * Flag to indicate if we can edit the title + * + * @var int + */ + protected $edit_title = 0; /** * Topic Description * * @var string - * @access protected */ protected $_topicDescription = ''; + + /**#@+ + * Poll data + * + * @var array + */ + protected $poll_data = array(); + protected $poll_answers = array(); + /**#@-*/ /** * Allowed items to be saved in the get/set array * - * @access private * @var array */ private $_allowedInternalData = array( 'Author', @@ -161,19 +160,10 @@ class classPost 'IsPreview', 'ModOptions', 'IsAjax' ); - - /** - * Internal get class array - * - * @access private - * @var array - */ - private $_internalClasses = array(); /** * Forum Data * - * @access private * @var array */ private $_forumData = array(); @@ -181,7 +171,6 @@ class classPost /** * Topic Data * - * @access private * @var array */ private $_topicData = array(); @@ -189,7 +178,6 @@ class classPost /** * Post Data * - * @access private * @var array */ private $_postData = array(); @@ -198,7 +186,7 @@ class classPost * Bypass all permission checks * * Use with care, this will allow the class to be used within an API - * @access private + * * @var boolean */ private $_bypassPermChecks = false; @@ -206,7 +194,6 @@ class classPost /** * Construct * - * @access public * @param object ipsRegistry Object * @return void */ @@ -231,12 +218,14 @@ class classPost /* Just to be sure */ $this->setBypassPermissionCheck( false ); + + /* Prevent some notices */ + $this->request['mod_options'] = isset($this->request['mod_options']) ? $this->request['mod_options'] : null; } /** * Magic Call method * - * @access public * @param string Method Name * @param mixed Method arguments * @return mixed @@ -262,7 +251,7 @@ class classPost if( $arguments[0] ) { /* Set up moderator stuff, too */ - $this->_internalData[ $theRest ] = $this->registry->getClass('class_forums')->setUpModerator( IPSMember::load( intval( $arguments[0] ), 'all' ) ); + $this->_internalData[ $theRest ] = IPSMember::setUpModerator( IPSMember::load( intval( $arguments[0] ), 'all' ) ); /* And ignored users */ $this->_internalData[ $theRest ]['ignored_users'] = array(); @@ -313,7 +302,7 @@ class classPost $this->_topicData = $arguments[0]; break; case 'getForumData': - if ( $arguments[0] ) + if ( isset($arguments[0]) AND $arguments[0] ) { return $this->_forumData[ $arguments[0] ]; } @@ -323,7 +312,7 @@ class classPost } break; case 'getPostData': - if ( $arguments[0] ) + if ( isset($arguments[0]) AND $arguments[0] ) { return $this->_postData[ $arguments[0] ]; } @@ -333,7 +322,7 @@ class classPost } break; case 'getTopicData': - if ( $arguments[0] ) + if ( isset($arguments[0]) AND $arguments[0] ) { return $this->_topicData[ $arguments[0] ]; } @@ -343,7 +332,7 @@ class classPost } break; case 'getPostError': - return $this->lang->words[ $this->_postErrors ]; + return isset($this->lang->words[ $this->_postErrors ]) ? $this->lang->words[ $this->_postErrors ]: $this->_postErrors; break; } } @@ -352,7 +341,6 @@ class classPost /** * Set the bypass permission flag * - * @access public * @param boolean * @return void */ @@ -364,7 +352,6 @@ class classPost /** * Set a post error remotely * - * @access public * @param string Error * @return void */ @@ -378,7 +365,6 @@ class classPost * You *must* pass a raw GET or POST value. ie, a value that has not been cleaned by parseCleanValue * as there are unicode checks to perform. This function will test those and clean the topic title for you * - * @access public * @param string Topic Title */ public function setTopicTitle( $topicTitle ) @@ -429,7 +415,6 @@ class classPost * You *must* pass a raw GET or POST value. ie, a value that has not been cleaned by parseCleanValue * as there are unicode checks to perform. This function will test those and clean the topic description for you * - * @access public * @param string Topic Title */ public function setTopicDescription( $topicDescription ) @@ -444,7 +429,6 @@ class classPost * Global checks and set up * Functions pertaining to ALL posting methods * - * @access public * @return void * Exception Codes: * NO_USER_SET No user has been set @@ -466,15 +450,6 @@ class classPost throw new Exception( 'NO_AUTHOR_SET' ); } - /* Check PPD */ - if ( $this->registry->getClass('class_forums')->checkGroupPostPerDay( $this->getAuthor() ) !== TRUE ) - { - if ( $this->_bypassPermChecks !== TRUE ) - { - throw new Exception( 'NO_POSTING_PPD' ); - } - } - //----------------------------------------- // Forum checks //----------------------------------------- @@ -586,12 +561,8 @@ class classPost if ( $date ) { - $this->times['open'] = $date + ( $minute * 60 ) + ( $hour * 3600 ); - /*$this->registry->getClass( 'class_localization')->convertDateToTimestamp( array( 'month' => intval($month), - 'day' => intval($day), - 'year' => intval($year), - 'hour' => intval($hour), - 'minute' => intval($minute) ) );*/ + // Bug #20374 + $this->times['open'] = ( $date + ( $minute * 60 ) + ( $hour * 3600 ) ) - $this->registry->class_localization->getTimeOffset(); } } @@ -607,14 +578,20 @@ class classPost if ( $date ) { - $this->times['close'] = $date + ( $minute * 60 ) + ( $hour * 3600 ); - /*$this->registry->getClass( 'class_localization')->convertDateToTimestamp( array( 'month' => intval($month), - 'day' => intval($day), - 'year' => intval($year), - 'hour' => intval($hour), - 'minute' => intval($minute) ) );*/ + // Bug #20374 + $this->times['close'] = ( $date + ( $minute * 60 ) + ( $hour * 3600 ) ) - $this->registry->class_localization->getTimeOffset(); } } + + /* Check PPD. Always do this last in globalSetUp as we skip this error if showing edit box */ + if ( $this->registry->getClass('class_forums')->checkGroupPostPerDay( $this->getAuthor() ) !== TRUE ) + { + if ( $this->_bypassPermChecks !== TRUE ) + { + throw new Exception( 'NO_POSTING_PPD' ); + } + } + } /** @@ -622,126 +599,128 @@ class classPost * * @param array Topic data from the DB * @return array Altered topic data - * @access private */ private function _modTopicOptions( $topic ) { /* INIT */ $topic['state'] = ( $topic['state'] == 'closed' ) ? 'closed' : 'open'; - if ( ( $this->request['mod_options'] != "") or ( $this->request['mod_options'] != 'nowt' ) ) - { - if ($this->request['mod_options'] == 'pin') - { - if ($this->getAuthor('g_is_supmod') == 1 or $this->moderator['pin_topic'] == 1) - { - $topic['pinned'] = 1; - - $this->addToModLog( $this->lang->words['modlogs_pinned'], $topic['title']); - } - } - else if ($this->request['mod_options'] == 'unpin') - { - if ($this->getAuthor('g_is_supmod') == 1 or $this->moderator['unpin_topic'] == 1) - { - $topic['pinned'] = 0; - - $this->addToModLog( $this->lang->words['modlogs_unpinned'], $topic['title']); - } - } - else if ($this->request['mod_options'] == 'close') - { - if ($this->getAuthor('g_is_supmod') == 1 or $this->moderator['close_topic'] == 1) - { - $topic['state'] = 'closed'; - - $this->addToModLog( $this->lang->words['modlogs_closed'], $topic['title']); - } - } - else if ($this->request['mod_options'] == 'open') - { - if ($this->getAuthor('g_is_supmod') == 1 or $this->moderator['open_topic'] == 1) - { - $topic['state'] = 'open'; - - $this->addToModLog( $this->lang->words['modlogs_opened'], $topic['title']); - } - } - else if ($this->request['mod_options'] == 'move') - { - if ($this->getAuthor('g_is_supmod') == 1 or $this->moderator['move_topic'] == 1) - { - $topic['_returnToMove'] = 1; - } - } - else if ($this->request['mod_options'] == 'pinclose') - { - if ($this->getAuthor('g_is_supmod') == 1 or ( $this->moderator['pin_topic'] == 1 AND $this->moderator['close_topic'] == 1 ) ) - { - $topic['pinned'] = 1; - $topic['state'] = 'closed'; - - $this->addToModLog( $this->lang->words['modlogs_pinclose'], $topic['title']); - } - } - else if ($this->request['mod_options'] == 'pinopen') - { - if ($this->getAuthor('g_is_supmod') == 1 or ( $this->moderator['pin_topic'] == 1 AND $this->moderator['open_topic'] == 1 ) ) - { - $topic['pinned'] = 1; - $topic['state'] = 'open'; - - $this->addToModLog( $this->lang->words['modlogs_pinopen'], $topic['title']); - } - } - else if ($this->request['mod_options'] == 'unpinclose') - { - if ($this->getAuthor('g_is_supmod') == 1 or ( $this->moderator['unpin_topic'] == 1 AND $this->moderator['close_topic'] == 1 ) ) - { - $topic['pinned'] = 0; - $topic['state'] = 'closed'; - - $this->addToModLog( $this->lang->words['modlogs_unpinclose'], $topic['title']); - } - } - else if ($this->request['mod_options'] == 'unpinopen') - { - if ($this->getAuthor('g_is_supmod') == 1 or ( $this->moderator['unpin_topic'] == 1 AND $this->moderator['open_topic'] == 1 ) ) - { - $topic['pinned'] = 0; - $topic['state'] = 'open'; - - $this->addToModLog( $this->lang->words['modlogs_unpinopen'], $topic['title']); - } - } - } - - //----------------------------------------- - // Check close times... - //----------------------------------------- - - if ( $topic['state'] == 'open' AND ( $this->times['close'] AND $this->times['close'] <= time() ) ) + if( $this->getIsPreview() !== TRUE ) { - $topic['state'] = 'closed'; + if ( ( $this->request['mod_options'] != "") or ( $this->request['mod_options'] != 'nowt' ) ) + { + if ($this->request['mod_options'] == 'pin') + { + if ($this->getAuthor('g_is_supmod') == 1 or $this->moderator['pin_topic'] == 1) + { + $topic['pinned'] = 1; + + $this->addToModLog( $this->lang->words['modlogs_pinned'], $topic['title']); + } + } + else if ($this->request['mod_options'] == 'unpin') + { + if ($this->getAuthor('g_is_supmod') == 1 or $this->moderator['unpin_topic'] == 1) + { + $topic['pinned'] = 0; + + $this->addToModLog( $this->lang->words['modlogs_unpinned'], $topic['title']); + } + } + else if ($this->request['mod_options'] == 'close') + { + if ($this->getAuthor('g_is_supmod') == 1 or $this->moderator['close_topic'] == 1) + { + $topic['state'] = 'closed'; + + $this->addToModLog( $this->lang->words['modlogs_closed'], $topic['title']); + } + } + else if ($this->request['mod_options'] == 'open') + { + if ($this->getAuthor('g_is_supmod') == 1 or $this->moderator['open_topic'] == 1) + { + $topic['state'] = 'open'; + + $this->addToModLog( $this->lang->words['modlogs_opened'], $topic['title']); + } + } + else if ($this->request['mod_options'] == 'move') + { + if ($this->getAuthor('g_is_supmod') == 1 or $this->moderator['move_topic'] == 1) + { + $topic['_returnToMove'] = 1; + } + } + else if ($this->request['mod_options'] == 'pinclose') + { + if ($this->getAuthor('g_is_supmod') == 1 or ( $this->moderator['pin_topic'] == 1 AND $this->moderator['close_topic'] == 1 ) ) + { + $topic['pinned'] = 1; + $topic['state'] = 'closed'; + + $this->addToModLog( $this->lang->words['modlogs_pinclose'], $topic['title']); + } + } + else if ($this->request['mod_options'] == 'pinopen') + { + if ($this->getAuthor('g_is_supmod') == 1 or ( $this->moderator['pin_topic'] == 1 AND $this->moderator['open_topic'] == 1 ) ) + { + $topic['pinned'] = 1; + $topic['state'] = 'open'; + + $this->addToModLog( $this->lang->words['modlogs_pinopen'], $topic['title']); + } + } + else if ($this->request['mod_options'] == 'unpinclose') + { + if ($this->getAuthor('g_is_supmod') == 1 or ( $this->moderator['unpin_topic'] == 1 AND $this->moderator['close_topic'] == 1 ) ) + { + $topic['pinned'] = 0; + $topic['state'] = 'closed'; + + $this->addToModLog( $this->lang->words['modlogs_unpinclose'], $topic['title']); + } + } + else if ($this->request['mod_options'] == 'unpinopen') + { + if ($this->getAuthor('g_is_supmod') == 1 or ( $this->moderator['unpin_topic'] == 1 AND $this->moderator['open_topic'] == 1 ) ) + { + $topic['pinned'] = 0; + $topic['state'] = 'open'; + + $this->addToModLog( $this->lang->words['modlogs_unpinopen'], $topic['title']); + } + } + } + + //----------------------------------------- + // Check close times... + //----------------------------------------- + + if ( $topic['state'] == 'open' AND ( $this->times['close'] AND $this->times['close'] <= time() ) ) + { + $topic['state'] = 'closed'; + } + else if ( $topic['state'] == 'closed' AND ( $this->times['open'] AND $this->times['open'] >= time() ) ) + { + $topic['state'] = 'open'; + } + + if ( $topic['state'] == 'open' AND ( $this->times['open'] OR $this->times['close'] ) + AND ( $this->times['close'] <= time() OR ( $this->times['open'] > time() AND ! $this->times['close'] ) ) ) + { + $topic['state'] = 'closed'; + } + + if ( $topic['state'] == 'open' AND ( $this->times['open'] AND $this->times['close'] ) + AND ( $this->times['close'] >= $this->times['open'] ) ) + { + $topic['state'] = 'closed'; + } + + $topic['state'] = ( $topic['state'] == 'closed' ) ? 'closed' : 'open'; } - else if ( $topic['state'] == 'closed' AND ( $this->times['open'] AND $this->times['open'] >= time() ) ) - { - $topic['state'] = 'open'; - } - - if ( $topic['state'] == 'open' AND ( $this->times['open'] OR $this->times['close'] ) - AND ( $this->times['close'] <= time() OR ( $this->times['open'] > time() AND ! $this->times['close'] ) ) ) - { - $topic['state'] = 'closed'; - } - - if ( $topic['state'] == 'open' AND ( $this->times['open'] AND $this->times['close'] ) - AND ( $this->times['close'] >= $this->times['open'] ) ) - { - $topic['state'] = 'closed'; - } - - $topic['state'] = ( $topic['state'] == 'closed' ) ? 'closed' : 'open'; return $topic; } @@ -774,7 +753,6 @@ class classPost * NO_POST_FORUM : Unable to post in that forum * FORUM_LOCKED : Forum read only * - * @access public * @return mixed Exception, boolean, or void */ public function addReply() @@ -924,8 +902,17 @@ class classPost $this->DB->force_data_type = array( 'pid' => 'int', 'post' => 'string' ); + + + $_autoMergeData = array( 'post' => $new_post, 'post_date' => time(), 'pid' => $last_post['pid'] ); + + /* Data Hook Location */ + IPSLib::doDataHooks( $_autoMergeData, 'postAutoMerge' ); + + /* Terabyte didn't notice a bug in this location since fixed */ + unset( $_autoMergeData['pid'] ); - $this->DB->update( 'posts', array( 'post' => $new_post, 'post_date' => time() ), 'pid='.$last_post['pid'] ); + $this->DB->update( 'posts', $_autoMergeData, 'pid='.$last_post['pid'] ); /* Add to cache */ IPSContentCache::drop( 'post', $last_post['pid'] ); @@ -956,7 +943,7 @@ class classPost $post['post_key'] = $this->post_key; $post['post_parent'] = ipsRegistry::$request['parent_id'] ? intval(ipsRegistry::$request['parent_id']) : 0; - + //----------------------------------------- // Typecast //----------------------------------------- @@ -964,6 +951,10 @@ class classPost $this->DB->force_data_type = array( 'pid' => 'int', 'post' => 'string' ); + /* Data Hook Location */ + IPSLib::doDataHooks( $post, 'postAddReply' ); + + /* Finally insert.. */ $this->DB->insert( 'posts', $post ); $post['pid'] = $this->DB->getInsertId(); @@ -988,11 +979,17 @@ class classPost $this->updateForumAndStats( $topic, 'reply'); + //----------------------------------------- + // Update view counts + //----------------------------------------- + + $this->updateViewCounter( $topic['tid'] ); + //----------------------------------------- // Get the correct number of replies //----------------------------------------- - $this->DB->build( array( 'select' => 'COUNT(*) as posts', 'from' => 'posts', 'where' => "topic_id={$topic['tid']} and queued != 1" ) ); + $this->DB->build( array( 'select' => 'COUNT(*) as posts', 'from' => 'posts', 'where' => "topic_id={$topic['tid']} AND " . $this->registry->class_forums->fetchPostHiddenQuery( array( 'visible' ) ) ) ); $this->DB->execute(); $posts = $this->DB->fetch(); @@ -1003,22 +1000,34 @@ class classPost // Get the correct number of queued replies //----------------------------------------- - $this->DB->build( array( 'select' => 'COUNT(*) as posts', 'from' => 'posts', 'where' => "topic_id={$topic['tid']} and queued=1" ) ); + $this->DB->build( array( 'select' => 'COUNT(*) as posts', 'from' => 'posts', 'where' => "topic_id={$topic['tid']} AND " . $this->registry->class_forums->fetchPostHiddenQuery( array( 'hidden' ) ) ) ); $this->DB->execute(); $qposts = $this->DB->fetch(); $qpcount = intval( $qposts['posts'] ); + //----------------------------------------- + // Get the correct number of deleted replies + //----------------------------------------- + + $this->DB->build( array( 'select' => 'COUNT(*) as posts', 'from' => 'posts', 'where' => "topic_id={$topic['tid']} AND " . $this->registry->class_forums->fetchPostHiddenQuery( array( 'sdeleted' ) ) ) ); + $this->DB->execute(); + + $qposts = $this->DB->fetch(); + + $dcount = intval( $qposts['posts'] ); + //----------------------------------------- // UPDATE TOPIC //----------------------------------------- - $poster_name = $this->getAuthor('member_id') ? $this->getAuthor('members_display_name') : ipsRegistry::$request['UserName']; + $poster_name = $this->getAuthor('member_id') ? $this->getAuthor('members_display_name') : $this->request['UserName']; $update_array = array( - 'posts' => $pcount, - 'topic_queuedposts'=> $qpcount + 'posts' => $pcount, + 'topic_queuedposts' => $qpcount, + 'topic_deleted_posts' => $dcount ); if ( $this->getPublished() ) @@ -1036,11 +1045,15 @@ class classPost } } + /* Typecast */ $this->DB->force_data_type = array( 'title' => 'string', 'description' => 'string', 'starter_name' => 'string', 'seo_last_name' => 'string', 'last_poster_name' => 'string' ); + + /* Data Hook Location */ + IPSLib::doDataHooks( $update_array, 'postAddReplyTopicUpdate' ); $this->DB->update( 'topics', $update_array, "tid={$topic['tid']}" ); @@ -1056,18 +1069,22 @@ class classPost { $poll_only = 1; } - - $this->DB->insert( 'polls', - array ( - 'tid' => $topic['tid'], - 'forum_id' => $this->getForumData('id'), - 'start_date' => time(), - 'choices' => serialize( $this->poll_questions ), - 'starter_id' => $this->getAuthor('member_id'), - 'votes' => 0, - 'poll_question' => ipsRegistry::$request['poll_question'], - 'poll_only' => $poll_only, - ) ); + + $_pollData = array( + 'tid' => $topic['tid'], + 'forum_id' => $this->getForumData('id'), + 'start_date' => time(), + 'choices' => serialize( $this->poll_questions ), + 'starter_id' => $this->getAuthor('member_id'), + 'votes' => 0, + 'poll_question' => ipsRegistry::$request['poll_question'], + 'poll_only' => $poll_only, + ); + + /* Data Hook Location */ + IPSLib::doDataHooks( $_pollData, 'postAddReplyPoll' ); + + $this->DB->insert( 'polls', $_pollData );; } //----------------------------------------- @@ -1124,6 +1141,63 @@ class classPost $this->sendOutTrackedTopicEmails( $topic['tid'], $post['post'], $poster_name, time() - $this->settings['session_expiration'], $this->getAuthor('member_id') ); + //----------------------------------------- + // Send notification of post quoted + //----------------------------------------- + + if( $post['post_parent'] ) + { + $_quoted = $this->DB->buildAndFetch( array( 'select' => 'author_id', 'from' => 'posts', 'where' => 'pid=' . $post['post_parent'] ) ); + + //----------------------------------------- + // Only send if we don't quote ourselves + // *ahem* Brandon D *ahem* + //----------------------------------------- + + if( $_quoted['author_id'] AND $_quoted['author_id'] != $this->getAuthor('member_id') ) + { + $_toMember = IPSMember::load( $_quoted['author_id'] ); + + //----------------------------------------- + // Notifications library + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' ); + $notifyLibrary = new $classToLoad( $this->registry ); + + $_toMember['language'] = $_toMember['language'] == "" ? IPSLib::getDefaultLanguage() : $_toMember['language']; + + IPSText::getTextClass('email')->getTemplate( "post_was_quoted", $_toMember['language'] ); + + IPSText::getTextClass('email')->buildMessage( array( + 'MEMBER_NAME' => $this->getAuthor('members_display_name'), + 'ORIGINAL_POST' => $this->registry->output->buildSEOUrl( "showtopic={$post['topic_id']}&view=findpost&p={$post['post_parent']}", "publicNoSession", $topic['title_seo'], 'showtopic' ), + 'NEW_POST' => $this->registry->output->buildSEOUrl( "showtopic={$post['topic_id']}&view=findpost&p={$post['pid']}", "publicNoSession", $topic['title_seo'], 'showtopic' ), + 'POST' => $post['post'] ) ); + + IPSText::getTextClass('email')->subject = sprintf( + IPSText::getTextClass('email')->subject, + $this->registry->output->buildSEOUrl( 'showuser=' . $this->getAuthor('member_id'), 'publicNoSession', $this->getAuthor('members_seo_name'), 'showuser' ), + $this->getAuthor('members_display_name'), + $this->registry->output->buildSEOUrl( "showtopic={$post['topic_id']}&view=findpost&p={$post['pid']}", "publicNoSession", $topic['title_seo'], 'showtopic' ), + $this->registry->output->buildSEOUrl( "showtopic={$post['topic_id']}&view=findpost&p={$post['post_parent']}", "publicNoSession", $topic['title_seo'], 'showtopic' ) + ); + + $notifyLibrary->setMember( $_toMember ); + $notifyLibrary->setFrom( $this->memberData ); + $notifyLibrary->setNotificationKey( 'post_quoted' ); + $notifyLibrary->setNotificationUrl( $this->registry->output->buildSEOUrl( "showtopic={$post['topic_id']}&view=findpost&p={$post['pid']}", "public", $topic['title_seo'], 'showtopic' ) ); + $notifyLibrary->setNotificationText( IPSText::getTextClass('email')->message ); + $notifyLibrary->setNotificationTitle( IPSText::getTextClass('email')->subject ); + + try + { + $notifyLibrary->sendNotification(); + } + catch( Exception $e ){} + } + } + //----------------------------------------- // Leave data for other apps //----------------------------------------- @@ -1137,7 +1211,6 @@ class classPost /** * Performs set up for adding a reply * - * @access public * @return array Topic data * * Exception Error Codes @@ -1163,7 +1236,7 @@ class classPost { if ( $this->_bypassPermChecks !== TRUE ) { - $this->registry->output->showError( 'posting_not_enough_posts', 103140 ); + $this->registry->output->showError( 'posting_not_enough_posts', 103140, null, null, 403 ); } } @@ -1217,7 +1290,7 @@ class classPost $perm_id = $this->getAuthor('org_perm_id') ? $this->getAuthor('org_perm_id') : $this->getAuthor('g_perm_id'); $perm_array = explode( ",", $perm_id ); - + if ( $this->registry->permissions->check( 'reply', $this->getForumData(), $perm_array ) === FALSE ) { if ( $this->_bypassPermChecks !== TRUE ) @@ -1303,7 +1376,6 @@ class classPost * NO_POST_FORUM : Unable to post in that forum * FORUM_LOCKED : Forum read only * - * @access public * @return mixed */ public function addTopic() @@ -1431,6 +1503,9 @@ class classPost 'seo_last_name' => 'string', 'last_poster_name' => 'string' ); + /* Data Hook Location */ + IPSLib::doDataHooks( $topic, 'postAddTopic' ); + $this->DB->insert( 'topics', $topic ); $post['topic_id'] = $this->DB->getInsertId(); @@ -1449,10 +1524,13 @@ class classPost $post['queued'] = 0; - //----------------------------------------- - // Add post to DB - //----------------------------------------- + /* Typecast */ + $this->DB->force_data_type = array( 'post' => 'string' ); + /* Data Hook Location */ + IPSLib::doDataHooks( $post, 'postFirstPost' ); + + /* Add post to DB */ $this->DB->insert( 'posts', $post ); $post['pid'] = $this->DB->getInsertId(); @@ -1487,18 +1565,25 @@ class classPost { $poll_only = 1; } + + $_pollData = array( + 'tid' => $topic['tid'], + 'forum_id' => $this->getForumData('id'), + 'start_date' => time(), + 'choices' => addslashes(serialize( $this->poll_questions )), + 'starter_id' => $this->getAuthor('member_id'), + 'votes' => 0, + 'poll_question' => IPSText::stripAttachTag( $this->request['poll_question'] ), + 'poll_only' => $poll_only, + 'poll_view_voters' => intval( $this->request['poll_view_voters'] ) + ); + + /* Data Hook Location */ + IPSLib::doDataHooks( $_pollData, 'postAddTopicPoll' ); - $this->DB->insert( 'polls', array ( 'tid' => $topic['tid'], - 'forum_id' => $this->getForumData('id'), - 'start_date' => time(), - 'choices' => addslashes(serialize( $this->poll_questions )), - 'starter_id' => $this->getAuthor('member_id'), - 'votes' => 0, - 'poll_question' => IPSText::stripAttachTag( $this->request['poll_question'] ), - 'poll_only' => $poll_only, - 'poll_view_voters' => intval( $this->request['poll_view_voters'] ) ) ); + $this->DB->insert( 'polls', $_pollData ); } - + //----------------------------------------- // If we are still here, lets update the // board/forum stats @@ -1563,7 +1648,6 @@ class classPost /** * Performs set up for adding a new topic * - * @access public * @return array Topic data (state, pinned, etc) * * Exception Error Codes @@ -1647,7 +1731,6 @@ class classPost * NO_POST_FORUM : Unable to post in that forum * FORUM_LOCKED : Forum read only * - * @access public * @return mixed */ public function editPost() @@ -1669,7 +1752,12 @@ class classPost } catch( Exception $error ) { - $this->_postErrors = $error->getMessage(); + $e = $error->getMessage(); + + if ( $e != 'NO_POSTING_PPD' ) + { + $this->_postErrors = $error->getMessage(); + } } if ( ! $this->getPostContent() AND ! $this->getPostContentPreFormatted() ) @@ -1792,26 +1880,23 @@ class classPost $post['edit_time'] = time(); $post['edit_name'] = $this->getAuthor('members_display_name'); - //----------------------------------------- - // If the post icon has changed, update the topic post icon - //----------------------------------------- - if ( $this->_originalPost['new_topic'] == 1 ) { + //----------------------------------------- + // If the post icon has changed, update the topic post icon + //----------------------------------------- + if ( $post['icon_id'] != $this->_originalPost['icon_id'] ) { - $this->DB->update( 'topics', array( 'icon_id' => $post['icon_id'] ), 'tid='.$topic['tid'] ); + $this->DB->update( 'topics', array( 'icon_id' => intval($post['icon_id']) ), 'tid='.$topic['tid'] ); } - } - //----------------------------------------- - // Update open and close times - //----------------------------------------- - - if ( $this->_originalPost['new_topic'] == 1 ) - { + //----------------------------------------- + // Update open and close times + //----------------------------------------- + $times = array(); - + if ( $this->can_set_open_time AND $this->times['open'] ) { $times['topic_open_time'] = intval( $this->times['open'] ); @@ -1836,7 +1921,11 @@ class classPost } } } - + else if( $this->can_set_open_time AND $topic['topic_open_time'] ) + { + $times['topic_open_time'] = 0; + } + if ( $this->can_set_close_time AND $this->times['close'] ) { $times['topic_close_time'] = intval( $this->times['close'] ); @@ -1853,6 +1942,10 @@ class classPost } } } + else if( $this->can_set_close_time AND $topic['topic_close_time'] ) + { + $times['topic_close_time'] = 0; + } if ( count( $times ) ) { @@ -1879,13 +1972,18 @@ class classPost if( $topic['poll_state'] ) { - $this->DB->update( 'polls', array( - 'votes' => intval( $this->poll_total_votes ), - 'choices' => addslashes(serialize( $this->poll_questions )), - 'poll_question' => IPSText::stripAttachTag( $this->request['poll_question'] ), - 'poll_only' => $poll_only, - 'poll_view_voters' => intval( $poll_view_voters ) - ), 'tid='.$topic['tid'] ); + $_pollData = array( + 'votes' => intval( $this->poll_total_votes ), + 'choices' => addslashes(serialize( $this->poll_questions )), + 'poll_question' => IPSText::stripAttachTag( $this->request['poll_question'] ), + 'poll_only' => $poll_only, + 'poll_view_voters' => intval( $poll_view_voters ) + ); + + /* Data Hook Location */ + IPSLib::doDataHooks( $_pollData, 'editPostUpdatePoll' ); + + $this->DB->update( 'polls', $_pollData, 'tid='.$topic['tid'] ); if ( $this->poll_data['choices'] != serialize( $this->poll_questions ) OR $this->poll_data['votes'] != intval($this->poll_total_votes) ) { @@ -1895,24 +1993,32 @@ class classPost 'member_id' => $this->getAuthor('member_id'), 'member_name' => $this->getAuthor('members_display_name'), 'ip_address' => $this->ip_address, - 'http_referer'=> my_getenv('HTTP_REFERER'), + 'http_referer'=> htmlspecialchars( my_getenv('HTTP_REFERER') ), 'ctime' => time(), 'topic_title' => $topic['title'], - 'action' => "Edited poll", - 'query_string'=> my_getenv('QUERY_STRING') ) ); + 'action' => $this->lang->words['edited_poll'], + 'query_string'=> htmlspecialchars( my_getenv( 'QUERY_STRING' ) ), + ) ); } } else { - $this->DB->insert( 'polls', array( 'tid' => $topic['tid'], - 'forum_id' => $this->getForumData('id'), - 'start_date' => time(), - 'choices' => addslashes(serialize( $this->poll_questions )), - 'starter_id' => $this->getAuthor('member_id'), - 'votes' => 0, - 'poll_question' => IPSText::stripAttachTag( $this->request['poll_question'] ), - 'poll_only' => $poll_only, - 'poll_view_voters' => intval( $poll_view_voters ) ) ); + $_pollData = array( + 'tid' => $topic['tid'], + 'forum_id' => $this->getForumData('id'), + 'start_date' => time(), + 'choices' => addslashes(serialize( $this->poll_questions )), + 'starter_id' => $this->getAuthor('member_id'), + 'votes' => 0, + 'poll_question' => IPSText::stripAttachTag( $this->request['poll_question'] ), + 'poll_only' => $poll_only, + 'poll_view_voters' => intval( $poll_view_voters ) + ); + + /* Data Hook Location */ + IPSLib::doDataHooks( $_pollData, 'editPostAddPoll' ); + + $this->DB->insert( 'polls', $_pollData ); $this->DB->insert( 'moderator_logs', array ( 'forum_id' => $this->getForumData('id'), 'topic_id' => $topic['tid'], @@ -1920,13 +2026,13 @@ class classPost 'member_id' => $this->getAuthor('member_id'), 'member_name' => $this->getAuthor('members_display_name'), 'ip_address' => $this->ip_address, - 'http_referer'=> my_getenv('HTTP_REFERER'), + 'http_referer'=> htmlspecialchars( my_getenv('HTTP_REFERER') ), 'ctime' => time(), 'topic_title' => $topic['title'], - 'action' => "Added a poll to the topic titled '" . $this->request['poll_question'] . "'", - 'query_string'=> my_getenv('QUERY_STRING') ) ); + 'action' => sprintf( $this->lang->words['added_poll'], $this->request['poll_question'] ), + 'query_string'=> htmlspecialchars( my_getenv('QUERY_STRING') ) ) ); - $this->DB->update( 'topics', array( 'poll_state' => 1, 'last_vote' => 0, 'total_votes' => 0 ), 'tid='.$topic['tid'] ); + $this->DB->update( 'topics', array( 'poll_state' => 1, 'last_vote' => 0 ), 'tid='.$topic['tid'] ); } } else @@ -1937,7 +2043,7 @@ class classPost $this->DB->buildAndFetch( array( 'delete' => 'polls' , 'where' => "tid=".$topic['tid'] ) ); $this->DB->buildAndFetch( array( 'delete' => 'voters', 'where' => "tid=".$topic['tid'] ) ); - $this->DB->update( 'topics', array( 'poll_state' => 0, 'last_vote' => 0, 'total_votes' => 0 ), 'tid='.$topic['tid'] ); + $this->DB->update( 'topics', array( 'poll_state' => 0, 'last_vote' => 0 ), 'tid='.$topic['tid'] ); } } @@ -1955,14 +2061,33 @@ class classPost { if ( ($this->_topicTitle != $topic['title']) or ( $this->_topicDescription != $topic['description'] ) OR ! ( $topic['title_seo'] ) ) { - $this->DB->update( 'topics', array( 'title' => $this->_topicTitle, - 'title_seo' => IPSText::makeSeoTitle( $this->_topicTitle ), - 'description' => $this->_topicDescription ) , "tid=".$topic['tid'] ); + $_topicTitleData = array( + 'title' => $this->_topicTitle, + 'title_seo' => IPSText::makeSeoTitle( $this->_topicTitle ), + 'description' => $this->_topicDescription + ); + + /* Data Hook Location */ + IPSLib::doDataHooks( $_topicTitleData, 'editPostUpdateTopicTitle' ); + + $this->DB->update( 'topics', $_topicTitleData , "tid=" . $topic['tid'] ); + + $_forumUpdate = array(); if ( $topic['tid'] == $this->getForumData('last_id') ) { - $this->DB->update( 'forums', array( 'last_title' => $this->_topicTitle ), 'id='.$this->getForumData('id') ); - //ipsRegistry::getClass('class_forums')->updateForumCache(); + $_forumUpdate['last_title'] = $_topicTitleData['title']; + $_forumUpdate['seo_last_title'] = $_topicTitleData['seo_last_title']; + } + + if( $topic['tid'] == $this->getForumData('newest_id') ) + { + $_forumUpdate['newest_title'] = $_topicTitleData['title']; + } + + if( count($_forumUpdate) ) + { + $this->DB->update( 'forums', $_forumUpdate, 'id=' . $this->getForumData('id') ); } if ( ($this->moderator['edit_topic'] == 1) OR ( $this->getAuthor('g_is_supmod') == 1 ) ) @@ -1974,11 +2099,11 @@ class classPost 'member_id' => $this->getAuthor('member_id'), 'member_name' => $this->getAuthor('members_display_name'), 'ip_address' => $this->ip_address, - 'http_referer'=> my_getenv('HTTP_REFERER'), + 'http_referer'=> htmlspecialchars( my_getenv('HTTP_REFERER') ), 'ctime' => time(), 'topic_title' => $topic['title'], - 'action' => "Edited topic title or description '{$topic['title']}' to '" . $this->_topicTitle . "' via post form", - 'query_string'=> my_getenv('QUERY_STRING'), + 'action' => sprintf( $this->lang->words['edited_topic_title'], $topic['title'], $this->_topicTitle ), + 'query_string'=> htmlspecialchars( my_getenv('QUERY_STRING') ), ) ); } } @@ -2008,27 +2133,14 @@ class classPost } } + /* Typecast */ $this->DB->force_data_type = array( 'post_edit_reason' => 'string' ); + + /* Data Hook Location */ + IPSLib::doDataHooks( $post, 'editPostData' ); $this->DB->update( 'posts', $post, 'pid='.$this->_originalPost['pid'] ); - if( $this->_originalPost['topic_firstpost'] ) - { - $pid = 0; - $title = $r['title']; - } - else - { - $pid = serialize( array( 'pid' => $r['pid'], 'title' => $r['title'] ) ); - $title = ''; - } - - /* Remove from the search index */ - $this->registry->class_forums->removePostFromSearchIndex( $post['topic_id'], $this->_originalPost['pid'], $topic['posts'] ? 0 : 1 ); - - /* Update the search index */ - $topic_title = $this->_topicTitle ? $this->_topicTitle : $topic['title']; - /* Add to cache */ IPSContentCache::update( $this->_originalPost['pid'], 'post', $this->formatPostForCache( $post['post'] ) ); @@ -2060,7 +2172,6 @@ class classPost /** * Performs set up for editing a post * - * @access public * @return array Topic data * * Exception Error Codes @@ -2289,7 +2400,6 @@ class classPost * REG_CODE_ENTER No reg code was entered * CODE_ERROR The code entered did not match the one stored in the DB * - * @access public * @return void */ public function checkGuestCaptcha() @@ -2319,7 +2429,6 @@ class classPost /** * Check to see if we have any group restrictions on whether we can post or not * - * @access public * @param array [Member data (assumes $this->memberData if nothing passed )] * @return boolean TRUE = post is moderated, FALSE is not */ @@ -2373,13 +2482,12 @@ class classPost /** * Sends new topic waiting for approval email * - * @access public * @param integer $tid * @param string $title * @param integer $author * @param string [$type] Set to 'new' for new topic or 'reply' for a reply to topic, 'new' is the default option * @return void - **/ + */ public function sendNewTopicForApprovalEmails( $tid, $title, $author, $post, $pid=0, $type='new' ) { $tmp = $this->DB->buildAndFetch( array( 'select' => 'notify_modq_emails', 'from' => 'forums', 'where' => "id=".$this->getForumData('id')) ); @@ -2423,14 +2531,13 @@ class classPost /** * Sends out topic subscription emails * - * @access public * @param integer $tid * @param string $post * @param integer $poster * @param integer $last_post * @param integer $member_id * @return bool - **/ + */ public function sendOutTrackedTopicEmails( $tid=0, $post="", $poster=0, $last_post=0, $member_id=0 ) { if ($tid == "") @@ -2443,8 +2550,15 @@ class classPost return true; } - $count = 0; - + $_poster = IPSMember::load( $this->getAuthor('member_id') ); + + //----------------------------------------- + // Notifications library + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' ); + $notifyLibrary = new $classToLoad( $this->registry ); + //----------------------------------------- // Get the email addy's, topic ids and email_full stuff - oh yeah. // We only return rows that have a member last_activity of greater than the post itself @@ -2456,7 +2570,7 @@ class classPost // Next topic reply: 9:20am // if ( last.activity > last.topic.post ) { will fail as 9:10 > 8:50 } //----------------------------------------- - + $this->DB->build( array( 'select' => 'tr.trid, tr.topic_id, tr.last_sent, tr.topic_track_type', 'from' => array( 'tracker' => 'tr' ), @@ -2464,12 +2578,12 @@ class classPost . ' AND ( ( tr.topic_track_type=\'delayed\' AND m.last_activity < ' . $last_post . ' ) OR tr.topic_track_type=\'immediate\' )', 'add_join' => array( array( - 'select' => 'm.members_display_name, m.email, m.member_id, m.email_full, m.language, m.org_perm_id, m.member_group_id, m.mgroup_others, m.last_activity, m.posts', + 'select' => 'm.members_display_name, m.email, m.member_id, m.email_full, m.language, m.org_perm_id, m.member_group_id, m.mgroup_others, m.last_activity, m.posts, m.member_banned, m.members_cache, m.ips_mobile_token', 'from' => array( 'members' => 'm' ), 'where' => 'm.member_id=tr.member_id', 'type' => 'left' ), array( - 'select' => 't.title, t.forum_id, t.approved', + 'select' => 't.title, t.forum_id, t.approved, t.title_seo, t.starter_id', 'from' => array( 'topics' => 't' ), 'where' => 't.tid=tr.topic_id', 'type' => 'left' @@ -2478,6 +2592,8 @@ class classPost ) ); $outer = $this->DB->execute(); + $_toUpdate = array(); + if( $this->DB->getTotalRows($outer) ) { while ( $r = $this->DB->fetch($outer) ) @@ -2490,16 +2606,16 @@ class classPost { continue; } - + //----------------------------------------- // Topic approved or is a mod? //----------------------------------------- - - if ( ! $this->registry->getClass('class_forums')->checkEmailApproved($r) ) + + if ( ! $this->registry->getClass('class_forums')->checkEmailApproved($r, false) ) { continue; } - + // Only send one email until user logs in again... // That is, unless they want the full post if ( ( $r['topic_track_type'] != 'immediate' ) AND $r['last_sent'] > $r['last_activity'] AND ! $r['email_full'] ) @@ -2508,11 +2624,9 @@ class classPost } else { - $this->DB->update( "tracker", array( 'last_sent' => time() ), "trid=".$r['trid'] ); + $_toUpdate[] = $r['trid']; } - - $count++; - + $r['language'] = $r['language'] ? $r['language'] : ''; if ($r['email_full'] == 1) @@ -2545,22 +2659,41 @@ class classPost ); } - + + IPSText::getTextClass('email')->subject = sprintf( + IPSText::getTextClass('email')->subject, + $this->registry->output->buildSEOUrl( 'showuser=' . $_poster['member_id'], 'publicNoSession', $_poster['members_seo_name'], 'showuser' ), + $poster, + $this->registry->output->buildSEOUrl( 'showtopic=' . $r['topic_id'] . '&view=getnewpost', 'publicNoSession', $r['title_seo'], 'showtopic' ), + IPSText::truncate( $r['title'], 50 ) + ); + //----------------------------------------- - // Add to mail queue + // Send notification... //----------------------------------------- - $this->DB->insert( 'mail_queue', array( 'mail_to' => $r['email'], 'mail_from' => '', 'mail_date' => time(), 'mail_subject' => IPSText::getTextClass( 'email' )->subject, 'mail_content' => IPSText::getTextClass( 'email' )->message ) ); + $notifyLibrary->setMember( $r ); + $notifyLibrary->setFrom( $_poster ); + $notifyLibrary->setNotificationKey( 'new_reply' ); + $notifyLibrary->setNotificationUrl( $this->registry->output->buildSEOUrl( 'showtopic=' . $r['topic_id'] . '&view=getnewpost', 'publicNoSession', $r['title_seo'], 'showtopic' ) ); + $notifyLibrary->setNotificationText( IPSText::getTextClass('email')->message ); + $notifyLibrary->setNotificationTitle( IPSText::getTextClass('email')->subject ); + + try + { + $notifyLibrary->sendNotification(); + } + catch( Exception $e ){} } - - $cache = $this->registry->cache()->getCache('systemvars'); - $cache['mail_queue'] += $count; //----------------------------------------- - // Update cache with remaning email count + // Update last sent time //----------------------------------------- - $this->registry->cache()->setCache( 'systemvars', $cache, array( 'array' => 1, 'donow' => 1 ) ); + if( count($_toUpdate) ) + { + $this->DB->update( "tracker", array( 'last_sent' => time() ), "trid IN(". implode( ',', $_toUpdate ) . ")" ); + } } return TRUE; @@ -2569,7 +2702,6 @@ class classPost /** * Sends out forum subscription emails * - * @access public * @param integer $fid * @param integer $this_tid * @param string $title @@ -2578,9 +2710,16 @@ class classPost * @param integer $mid * @param string $mname * @return bool - **/ + */ public function sendOutTrackedForumEmails( $fid=0, $this_tid=0, $title="", $forum_name="", $post="", $mid=0, $mname="" ) { + //----------------------------------------- + // Notifications library + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' ); + $notifyLibrary = new $classToLoad( $this->registry ); + if ($this_tid == "") { return TRUE; @@ -2596,9 +2735,11 @@ class classPost return true; } - $mid = $mid > 0 ? $mid : $this->getAuthor('member_id'); + $mid = intval( $mid > 0 ? $mid : $this->getAuthor('member_id') ); $mname = $mname != '' ? $mname : $this->getAuthor('members_display_name'); + $_poster = IPSMember::load( $mid ); + //----------------------------------------- // Work out the time stamp needed to "guess" // if the user is still active on the board @@ -2607,7 +2748,6 @@ class classPost //----------------------------------------- $time_limit = time() - (30*60); - $count = 0; $gotem = array(); $this->DB->build( array( @@ -2616,7 +2756,7 @@ class classPost 'where' => 'tr.forum_id='.$fid." AND ( ( tr.forum_track_type='delayed' AND m.last_activity < {$time_limit} ) OR tr.forum_track_type='immediate' )", 'add_join' => array( array( - 'select' => 'm.members_display_name, m.member_group_id, m.email, m.member_id, m.language, m.last_activity, m.org_perm_id, m.mgroup_others, m.posts', + 'select' => 'm.members_display_name, m.member_group_id, m.email, m.member_id, m.language, m.last_activity, m.org_perm_id, m.mgroup_others, m.posts, m.members_cache, m.ips_mobile_token', 'from' => array( 'members' => 'm' ), 'where' => "tr.member_id=m.member_id",//" AND m.member_id <> {$mid}", 'type' => 'inner' @@ -2647,7 +2787,7 @@ class classPost if ( $this->settings['autoforum_sub_groups'] ) { $this->DB->build( array( - 'select' => 'm.members_display_name, m.member_group_id, m.email, m.member_id, m.language, m.last_activity, m.org_perm_id, m.mgroup_others, m.posts', + 'select' => 'm.members_display_name, m.member_group_id, m.email, m.member_id, m.language, m.last_activity, m.org_perm_id, m.mgroup_others, m.posts, m.members_cache, m.ips_mobile_token', 'from' => array( 'members' => 'm' ), 'where' => "m.member_group_id IN (" . $this->settings['autoforum_sub_groups'] . ") AND m.member_id <> {$mid} @@ -2681,13 +2821,11 @@ class classPost { foreach( $gotem as $mid => $r ) { - $count++; - //----------------------------------------- // Can access forum/topic? //----------------------------------------- - if( !$this->registry->getClass('class_forums')->checkEmailAccess( $r, false ) ) + if( !$this->registry->getClass('class_forums')->checkEmailAccess( $r ) ) { continue; } @@ -2711,29 +2849,43 @@ class classPost 'POST' => $post, ) ); + + IPSText::getTextClass('email')->subject = sprintf( + IPSText::getTextClass('email')->subject, + $this->registry->output->buildSEOUrl( 'showuser=' . $_poster['member_id'], 'publicNoSession', $_poster['members_seo_name'], 'showuser' ), + $mname, + $this->registry->output->buildSEOUrl( 'showtopic=' . $this_tid . '&view=getnewpost', 'publicNoSession', IPSText::makeSeoTitle( $title ), 'showtopic' ), + IPSText::truncate( $title, 50 ) + ); + + //----------------------------------------- + // Send notification... + //----------------------------------------- + + $notifyLibrary->setMember( $r ); + $notifyLibrary->setFrom( $_poster ); + $notifyLibrary->setNotificationKey( 'new_topic' ); + $notifyLibrary->setNotificationUrl( $this->registry->output->buildSEOUrl( 'showtopic=' . $this_tid . '&view=getnewpost', 'publicNoSession', IPSText::makeSeoTitle( $title ), 'showtopic' ) ); + $notifyLibrary->setNotificationText( IPSText::getTextClass('email')->message ); + $notifyLibrary->setNotificationTitle( IPSText::getTextClass('email')->subject ); + + try + { + $notifyLibrary->sendNotification(); + } + catch( Exception $e ){} - $this->DB->insert( 'mail_queue', array( 'mail_to' => $r['email'], 'mail_from' => '', 'mail_date' => time(), 'mail_subject' => IPSText::getTextClass( 'email' )->subject, 'mail_content' => IPSText::getTextClass( 'email' )->message ) ); } } - - $cache = $this->registry->cache()->getCache('systemvars'); - $cache['mail_queue'] += $count; - - //----------------------------------------- - // Update cache with remaning email count - //----------------------------------------- - - $this->registry->cache()->setCache( 'systemvars', $cache, array( 'array' => 1, 'donow' => 1 ) ); - + return TRUE; } /** * Compiles an array of poll questions * - * @access protected * @return array - **/ + */ protected function compilePollData() { //----------------------------------------- @@ -2856,9 +3008,8 @@ class classPost /** * Compiles all the incoming information into an array which is returned to hte accessor * - * @access protected * @return array - **/ + */ protected function compilePostData() { //----------------------------------------- @@ -2873,13 +3024,7 @@ class classPost { $postContent = $this->formatPost( $this->getPostContent() ); } - - //----------------------------------------- - // Remove board tags - //----------------------------------------- - $postContent = IPSText::removeMacrosFromInput( $postContent ); - //----------------------------------------- // Need to format the post? //----------------------------------------- @@ -2890,7 +3035,7 @@ class classPost 'use_emo' => $this->getSettings('enableEmoticons'), 'ip_address' => $this->member->ip_address, 'post_date' => time(), - 'icon_id' => $this->request['iconid'] ? $this->request['iconid'] : $this->_originalPost['icon_id'], + 'icon_id' => isset( $this->request['iconid'] ) ? intval( $this->request['iconid'] ) : intval( $this->_originalPost['icon_id'] ), 'post' => $postContent, 'author_name' => $this->getAuthor('member_id') ? $this->getAuthor('members_display_name') : $this->request['UserName'], 'topic_id' => "", @@ -2927,16 +3072,18 @@ class classPost } /** - * Format Post: Converts BBCode, smilies, etc - * - * @access public - * @param string Raw Post - * @return string Formatted Post - * @author MattMecham - */ + * Format Post: Converts BBCode, smilies, etc + * + * @param string Raw Post + * @return string Formatted Post + * @author MattMecham + */ public function formatPost( $postContent ) - { - $postContent = IPSText::getTextClass( 'editor' )->processRawPost( $postContent ); + { + /* Set HTML Flag for the editor. Bug #19796 */ + IPSText::getTextClass( 'editor' )->class_editor->allow_html = (intval($this->request['post_htmlstatus']) AND $this->getForumData('use_html') AND $this->getAuthor('g_dohtml')) ? 1 : 0; + + $postContent = IPSText::getTextClass( 'editor' )->processRawPost( $postContent, true ); //----------------------------------------- // Parse post @@ -2957,13 +3104,12 @@ class classPost } /** - * Format Post for cache: Converts BBCode, smilies, etc - * - * @access public - * @param string Raw Post - * @return string Formatted Post - * @author MattMecham - */ + * Format Post for cache: Converts BBCode, smilies, etc + * + * @param string Raw Post + * @return string Formatted Post + * @author MattMecham + */ public function formatPostForCache( $postContent ) { /* Set up parser */ @@ -2993,11 +3139,10 @@ class classPost /** * Adds the action to the moderator logs * - * @access protected * @param string $title * @param string $topic_title * @return void - **/ + */ protected function addToModLog( $title='unknown', $topic_title ) { $this->DB->insert( 'moderator_logs', array ( @@ -3007,21 +3152,20 @@ class classPost 'member_id' => $this->getAuthor('member_id'), 'member_name' => $this->getAuthor('members_display_name'), 'ip_address' => $this->member->ip_address, - 'http_referer'=> htmlspecialchars(my_getenv('HTTP_REFERER')), + 'http_referer'=> htmlspecialchars( my_getenv('HTTP_REFERER') ), 'ctime' => time(), 'topic_title' => $topic_title, - 'action' => substr( $title, 0, 255 ), - 'query_string'=> htmlspecialchars(my_getenv('QUERY_STRING')), + 'action' => $title, + 'query_string'=> htmlspecialchars( my_getenv('QUERY_STRING') ), ) ); } /** * Increments the users post count * - * @access public * @param int Number of posts to increment by (default 1) * @return void - **/ + */ public function incrementUsersPostCount( $inc=1 ) { /* INIT */ @@ -3029,9 +3173,7 @@ class classPost $today = time() - 86400; /* Recount today's posts BOTH approved and unapproved */ - $count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count, MIN(post_date) as min', - 'from' => 'posts', - 'where' => 'author_id=' . $this->getAuthor('member_id') . ' AND post_date > ' . $today ) ); + $count = $this->registry->class_forums->fetchMemberPpdCount( $this->getAuthor('member_id'), $today ); $update_sql['members_day_posts'] = intval( $count['count'] ) . ',' . intval( $count['min'] ); @@ -3072,6 +3214,12 @@ class classPost $this->member->setProperty( 'last_post', time() ); + /* Data Hook Location */ + $update_sql['author_data'] = $this->getAuthor(); + $update_sql['forum_data'] = $this->getForumData(); + IPSLib::doDataHooks( $update_sql, 'incrementUsersPostCount' ); + unset( $update_sql['author_data'], $update_sql['forum_data'] ); + IPSMember::save( $this->getAuthor('member_id'), array( 'core' => $update_sql ) ); } } @@ -3079,11 +3227,10 @@ class classPost /** * Update forum's last post information * - * @access protected * @param array $topic * @param string $type * @return void - **/ + */ protected function updateForumAndStats( $topic, $type='new') { $moderated = 0; @@ -3175,6 +3322,9 @@ class classPost 'seo_last_name' => 'string', 'seo_last_title' => 'string', 'last_title' => 'string' ); + + /* Data Hook Location */ + IPSLib::doDataHooks( $dbs, 'updateForumLastPostData' ); $this->DB->update( 'forums', $dbs, "id=".intval($forum_data['id']) ); } @@ -3191,13 +3341,12 @@ class classPost /** * Convert temp uploads into permanent ones! YAY * - * @access protected * @param string $post_key * @param integer $rel_id * @param string $rel_module * @param arary $args * @return void - **/ + */ protected function makeAttachmentsPermanent( $post_key="", $rel_id=0, $rel_module="", $args=array() ) { //----------------------------------------- @@ -3210,12 +3359,12 @@ class classPost // Attachments: Re-affirm... //----------------------------------------- - require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' ); - $class_attach = new class_attach( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $class_attach = new $classToLoad( $this->registry ); - $class_attach->type = $rel_module; - $class_attach->attach_post_key = $post_key; - $class_attach->attach_rel_id = $rel_id; + $class_attach->type = $rel_module; + $class_attach->attach_post_key = $post_key; + $class_attach->attach_rel_id = $rel_id; $class_attach->init(); $return = $class_attach->postProcessUpload( $args ); @@ -3226,16 +3375,15 @@ class classPost /** * Upload any attachments that were not handled by the flash or JS uploaders * - * @access public * @param string $post_key * @param integer $rel_id * @return array - **/ + */ public function uploadAttachments( $post_key, $rel_id ) { /* Setup Attachment Handler */ - require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' ); - $class_attach = new class_attach( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $class_attach = new $classToLoad( $this->registry ); $class_attach->type = 'post'; $class_attach->attach_post_key = $post_key; @@ -3248,10 +3396,9 @@ class classPost /** * Recount how many attachments a topic has * - * @access public * @param integer $tid * @return void - **/ + */ public function recountTopicAttachments( $tid=0 ) { if ( $tid == "" ) @@ -3259,42 +3406,27 @@ class classPost return; } - //----------------------------------------- - // GET PIDS - //----------------------------------------- + /* INIT */ + $cnt = 0; - $pids = array(); - $count = 0; - - $this->DB->build( array( 'select' => 'count(*) as cnt', - 'from' => array( 'attachments' => 'a' ), - 'where' => "a.attach_rel_module='post' AND p.topic_id={$tid}", - 'add_join' => array( - 0 => array( - 'from' => array( 'posts' => 'p' ), - 'where' => "p.pid=a.attach_rel_id", - 'type' => 'left' - ) - ) + $cnt = $this->DB->buildAndFetch( array( 'select' => 'count(*) as cnt', + 'from' => array( 'attachments' => 'a' ), + 'where' => "a.attach_rel_module='post' AND p.topic_id={$tid}", + 'add_join' => array( array( 'from' => array( 'posts' => 'p' ), + 'where' => "p.pid=a.attach_rel_id", + 'type' => 'left' ) ) ) ); - $this->DB->execute(); - $cnt = $this->DB->fetch(); - - $count = intval( $cnt['cnt'] ); - - $this->DB->build( array( 'update' => 'topics', 'set' => "topic_hasattach=$count", 'where' => "tid={$tid}" ) ); - $this->DB->execute(); + $this->DB->update( 'topics', array( 'topic_hasattach' => intval( $cnt['cnt'] ) ), 'tid='.$tid ); } /** * Check out the tracker whacker * - * @access protected * @param integer $tid * @param bool $check_first * @return void - **/ + */ protected function addTopicToTracker( $tid=0, $check_first=0 ) { if ( ! $tid ) @@ -3330,10 +3462,37 @@ class classPost } } + /** + * Updates the topic view counter when a reply is made. + * + * @param int Topic ID + * @return void + */ + public function updateViewCounter( $tid ) + { + /* Only do this if we have delayed topic views */ + if ( ! $this->settings['update_topic_views_immediately'] ) + { + /* Grab count */ + $count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as topicviews', + 'from' => 'topic_views', + 'where' => 'views_tid=' . intval( $tid ) ) ); + + + if ( $count['topicviews'] ) + { + /* Update */ + $this->DB->update( 'topics', 'views=views+' . intval( $count['topicviews'] ), "tid=" . intval( $tid ), false, true ); + + /* Delete */ + $this->DB->delete( 'topic_views', 'views_tid=' . intval( $tid ) ); + } + } + } + /** * Clean the topic title * - * @access public * @param string Raw title * @return string Cleaned title */ @@ -3363,7 +3522,6 @@ class classPost * Check Multi Quote * Checks for quoted information * - * @access public * @param string Any raw post * @return string Formatted post */ @@ -3422,8 +3580,9 @@ class classPost //if( IPSMember::checkPermissions('read', $this->getForumID() ) == TRUE ) $perm_id = $this->getAuthor('org_perm_id') ? $this->getAuthor('org_perm_id') : $this->getAuthor('g_perm_id'); $perm_array = explode( ",", $perm_id ); - - if ( $this->registry->permissions->check( 'read', $this->getForumData(), $perm_array ) === TRUE ) + + //if ( $this->registry->permissions->check( 'read', $this->getForumData(), $perm_array ) === TRUE ) + if ( $this->registry->permissions->check( 'read', $this->registry->class_forums->forum_by_id[ $tp['forum_id'] ], $perm_array ) === TRUE ) { $tmp_post = $this->_afterPostCompile( $tp['post'], 'reply' ); $tp['author_name'] = ( $tp['members_display_name'] ) ? $tp['members_display_name'] : $tp['author_name']; @@ -3442,19 +3601,17 @@ class classPost $tmp_post = trim( $this->_recursiveKillQuotes( $tmp_post ) ); } - $extra = ""; - if( $tmp_post ) { if ( IPSText::getTextClass( 'editor' )->method == 'rte' ) { - $raw_post .= "[quote name='" . IPSText::getTextClass( 'bbcode' )->makeQuoteSafe($tp['author_name']) . "' date='" . IPSText::getTextClass( 'bbcode' )->makeQuoteSafe($this->registry->getClass( 'class_localization')->getDate( $tp['post_date'], 'LONG', 1 )) . "' timestamp='" . $tp['post_date'] . "' post='" . $tp['pid'] . "']
      {$tmp_post}
      " . $extra . '[/quote]


      '; + $raw_post .= "[quote name='" . IPSText::getTextClass( 'bbcode' )->makeQuoteSafe($tp['author_name']) . "' timestamp='" . $tp['post_date'] . "' post='" . $tp['pid'] . "']
      {$tmp_post}
      [/quote]


      "; } else { /* Knocks out
      */ $tmp_post = trim( IPSText::getTextClass( 'bbcode' )->preEditParse( $tmp_post ) ); - $raw_post .= "[quote name='" . IPSText::getTextClass( 'bbcode' )->makeQuoteSafe($tp['author_name']) . "' date='" . IPSText::getTextClass( 'bbcode' )->makeQuoteSafe($this->registry->getClass( 'class_localization')->getDate( $tp['post_date'], 'LONG', 1 )) . "' timestamp='" . $tp['post_date'] . "' post='" . $tp['pid'] . "']\n{$tmp_post}\n" . $extra . "[/quote]\n\n\n"; + $raw_post .= "[quote name='" . IPSText::getTextClass( 'bbcode' )->makeQuoteSafe($tp['author_name']) . "' timestamp='" . $tp['post_date'] . "' post='" . $tp['pid'] . "']\n{$tmp_post}\n[/quote]\n\n\n"; } } } @@ -3473,7 +3630,6 @@ class classPost $raw_post = IPSText::getTextClass( 'bbcode' )->convertForRTE( $raw_post ); } - //----------------------------------------- // Make raw POST safe for the text area //----------------------------------------- @@ -3487,7 +3643,6 @@ class classPost /** * Cheap and probably nasty way of killing quotes * - * @access private * @return string */ private function _recursiveKillQuotes( $t ) diff --git a/upload/admin/applications/forums/sources/classes/post/classPostForms.php b/upload/admin/applications/forums/sources/classes/post/classPostForms.php index d7d22cc9..e67ca1d6 100644 --- a/upload/admin/applications/forums/sources/classes/post/classPostForms.php +++ b/upload/admin/applications/forums/sources/classes/post/classPostForms.php @@ -1,20 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Posting display formatting methods - * Last Updated: $Date: 2009-11-10 18:07:22 -0500 (Tue, 10 Nov 2009) $ + * Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * * File Created By: Matt Mecham * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Revision: 5345 $ - * + * @link http://www.invisionpower.com + * @version $Revision: 7003 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -63,7 +63,6 @@ class classPostForms extends classPost // Set up //----------------------------------------- - $output = ''; $extraData = array(); $errors = ''; @@ -79,9 +78,14 @@ class classPostForms extends classPost } catch( Exception $error ) { - throw new Exception( $error->getMessage() ); + $e = $error->getMessage(); + + if ( $e != 'NO_POSTING_PPD' ) + { + throw new Exception( $e ); + } } - + //----------------------------------------- // Appending a reason for the edit? //----------------------------------------- @@ -147,7 +151,7 @@ class classPostForms extends classPost if ( $this->_postErrors ) { - $errors = $this->lang->words[ $this->_postErrors ]; + $errors = isset($this->lang->words[ $this->_postErrors ]) ? $this->lang->words[ $this->_postErrors ] : $this->_postErrors; } $html = $this->registry->getClass('output')->getTemplate('editors')->ajaxEditBox( $postContent, $this->getPostID(), $errors, $extraData ); @@ -204,7 +208,16 @@ class classPostForms extends classPost } catch( Exception $error ) { - throw new Exception( $error->getMessage() ); + $e = $error->getMessage(); + + if ( $formType == 'edit' AND $e == 'NO_POSTING_PPD' ) + { + + } + else + { + throw new Exception( $e ); + } } //----------------------------------------- @@ -299,7 +312,7 @@ class classPostForms extends classPost if ( $this->_postErrors ) { - $output .= $this->registry->getClass('output')->getTemplate('post')->errors( $this->lang->words[ $this->_postErrors ] ); + $output .= $this->registry->getClass('output')->getTemplate('post')->errors( isset($this->lang->words[ $this->_postErrors ]) ? $this->lang->words[ $this->_postErrors ] : $this->_postErrors ); } if ( $this->getIsPreview() ) @@ -320,15 +333,19 @@ class classPostForms extends classPost /* status from mod posts */ $this->registry->getClass('class_forums')->checkGroupPostPerDay( $this->getAuthor(), TRUE ); - $_statusMsg[] = $this->registry->getClass('class_forums')->ppdStatusMessage; + if ( $formType != 'edit' AND $this->registry->getClass('class_forums')->ppdStatusMessage ) + { + $_statusMsg[] = $this->registry->getClass('class_forums')->ppdStatusMessage; + } + $_statusMsg[] = $this->registry->getClass('class_forums')->fetchPostModerationStatusMessage( $this->getAuthor(), $this->getForumData(), $topic, $formType ); //----------------------------------------- // Load attachments so we get some stats //----------------------------------------- - require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' ); - $class_attach = new class_attach( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $class_attach = new $classToLoad( $this->registry ); $class_attach->type = 'post'; $class_attach->attach_post_key = $this->post_key; $class_attach->init(); @@ -591,7 +608,6 @@ class classPostForms extends classPost // INIT //----------------------------------------- - $output = ''; $cached_members = array(); $attach_pids = array(); $posts = array(); @@ -705,8 +721,8 @@ class classPostForms extends classPost // Grab render attach class //----------------------------------------- - require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' ); - $this->class_attach = new class_attach( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $this->class_attach = new $classToLoad( $this->registry ); $this->class_attach->attach_post_key = ''; $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_topic' ), 'forums' ); @@ -743,7 +759,7 @@ class classPostForms extends classPost 'sig' => 'checked="checked"', 'emo' => 'checked="checked"', 'html' => array(), - 'tra' => $this->getAuthor('auto_track') ? 'checked="checked"' : '' + 'tra' => ( $this->getAuthor('auto_track') OR $this->getSettings('enableTracker') ) ? 'checked="checked"' : '' ); if ( ! $this->getSettings('enableSignature') ) @@ -857,7 +873,7 @@ class classPostForms extends classPost if ($can_pin AND !$topic['pinned'] ) { $selected = ($this->getModOptions() == 'pin') ? " selected='selected'" : ''; - + $html .= ""; } else if ($can_unpin AND $topic['pinned'] ) @@ -939,7 +955,8 @@ class classPostForms extends classPost { if ( isset($topic['topic_open_time']) AND $topic['topic_open_time'] ) { - $date = IPSTime::unixstamp_to_human( $topic['topic_open_time'] ); + # Bug 23258 - add on TZ as we take this off when saving time + $date = IPSTime::unixstamp_to_human( $topic['topic_open_time'] + $this->registry->class_localization->getTimeOffset() ); $mytimes['open_date'] = sprintf("%02d.%02d.%04d", $date['day'], $date['month'], $date['year'] ); $mytimes['open_time'] = sprintf("%02d:%02d" , $date['hour'] , $date['minute'] ); } @@ -949,7 +966,8 @@ class classPostForms extends classPost { if ( isset($topic['topic_close_time']) AND $topic['topic_close_time'] ) { - $date = IPSTime::unixstamp_to_human( $topic['topic_close_time'] ); + # Bug 23258 - add on TZ as we take this off when saving time + $date = IPSTime::unixstamp_to_human( $topic['topic_close_time'] + $this->registry->class_localization->getTimeOffset() ); $mytimes['close_date'] = sprintf("%02d.%02d.%04d", $date['day'], $date['month'], $date['year'] ); $mytimes['close_time'] = sprintf("%02d:%02d" , $date['hour'] , $date['minute'] ); } @@ -1043,7 +1061,7 @@ class classPostForms extends classPost { foreach( $_POST['question'] as $id => $question ) { - $poll_questions[$id] = $question; + $poll_questions[$id] = IPSText::parseCleanValue( $question ); } $poll_question = ipsRegistry::$request['poll_question']; @@ -1062,7 +1080,7 @@ class classPostForms extends classPost { foreach( $_POST['choice'] as $id => $choice ) { - $poll_choices[ $id ] = $choice; + $poll_choices[ $id ] = IPSText::parseCleanValue( $choice ); } } @@ -1167,8 +1185,8 @@ class classPostForms extends classPost // Grab render attach class //----------------------------------------- - require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' ); - $this->class_attach = new class_attach( $this->registry ); + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' ); + $this->class_attach = new $classToLoad( $this->registry ); } //----------------------------------------- @@ -1183,5 +1201,4 @@ class classPostForms extends classPost return $attachData[0]['html'] . $attachData[0]['attachmentHtml']; } - } \ No newline at end of file diff --git a/upload/admin/applications/forums/sources/classes/post/index.html b/upload/admin/applications/forums/sources/classes/post/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/sources/classes/post/index.html +++ b/upload/admin/applications/forums/sources/classes/post/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/sources/classes/threaded.php b/upload/admin/applications/forums/sources/classes/threaded.php index 816be5f8..811d169e 100644 --- a/upload/admin/applications/forums/sources/classes/threaded.php +++ b/upload/admin/applications/forums/sources/classes/threaded.php @@ -1,612 +1,617 @@ -Incorrect accessYou cannot access this file directly."; - exit(); -} - -class threadedModeLibrary -{ - /** - * Topics library - * - * @access public - * @var object - */ - public $topics; - - /** - * Structured post ids - * - * @access public - * @var array - */ - public $structured_pids = array(); - - /** - * Post cache - * - * @access public - * @var array - */ - public $post_cache = array(); - - /** - * Used post ids - * - * @access public - * @var array - */ - public $used_post_ids = array(); - - /** - * Threaded posts - * - * @access public - * @var array - */ - public $_threaded_posts = array(); - - /** - * Last id we've seen - * - * @access public - * @var int - */ - public $last_id = 0; - - /**#@+ - * Registry Object Shortcuts - * - * @access protected - * @var object - */ - protected $registry; - protected $DB; - protected $settings; - protected $request; - protected $lang; - protected $member; - protected $cache; - /**#@-*/ - - /** - * Constructor - * - * @access public - * @param object Registry reference - * @param object Reference to topics lib - * @return void - */ - public function __construct( ipsRegistry $registry, $topics ) - { - /* Make objects */ - $this->registry = $registry; - $this->DB = $this->registry->DB(); - $this->settings =& $this->registry->fetchSettings(); - $this->request =& $this->registry->fetchRequest(); - $this->lang = $this->registry->getClass('class_localization'); - $this->member = $this->registry->member(); - $this->memberData =& $this->registry->member()->fetchMemberData(); - $this->cache = $this->registry->cache(); - $this->caches =& $this->registry->cache()->fetchCaches(); - - $this->topics =& $topics; - } - - /** - * Get Threaded Topic Data - * - * @access public - * @return array - **/ - public function _getTopicDataThreaded() - { - //----------------------------------------- - // Grab the posts we'll need - //----------------------------------------- - - $pc_join = array(); - - $first = intval( $this->request['start'] ); - $last = $this->settings['threaded_per_page'] ? $this->settings['threaded_per_page'] : 250; - - //----------------------------------------- - // GET meh pids - //----------------------------------------- - - if ( $first > 0 ) - { - // we're on a page, make sure init val is there - - $this->topics->pids[0] = $this->topics->topic['topic_firstpost']; - $this->structured_pids[ 0 ][] = $this->topics->topic['topic_firstpost']; - } - - $this->DB->build( array( - 'select' => 'pid, post_parent', - 'from' => 'posts', - 'where' => 'topic_id=' . $this->topics->topic['tid'] . ' and queued != 1', - 'order' => 'pid', - 'limit' => array( $first, $last ) - ) ); - - $this->DB->execute(); - - while( $p = $this->DB->fetch() ) - { - $this->topics->pids[] = $p['pid']; - - // Force to be children of 'root' post - - if ( ! $p['post_parent'] and $p['pid'] != $this->topics->topic['topic_firstpost'] ) - { - $p['post_parent'] = $this->topics->topic['topic_firstpost']; - } - - $this->structured_pids[ $p['post_parent'] ][] = $p['pid']; - } - - /* Ignored Users */ - $ignored_users = array(); - - foreach( $this->member->ignored_users as $_i ) - { - if( $_i['ignore_topics'] ) - { - $ignored_users[] = $_i['ignore_ignore_id']; - } - } - - //----------------------------------------- - // Get post bodah - //----------------------------------------- - - if ( count( $this->topics->pids ) ) - { - $this->DB->build( array( - 'select' => 'pid, post, author_id, author_name, post_date, post_title, post_parent, topic_id, icon_id', - 'from' => 'posts', - 'where' => 'pid IN(' . implode( ',', $this->topics->pids ) . ')', - 'order' => 'pid', - ) ); - - $this->DB->execute(); - - while( $p = $this->DB->fetch() ) - { - if ( ! $p['post_parent'] and $p['pid'] != $this->topics->topic['topic_firstpost'] ) - { - $p['post_parent'] = $this->topics->topic['topic_firstpost']; - } - - $this->post_cache[ $p['pid'] ] = $p; - - $this->last_id = $p['pid']; - } - } - - //----------------------------------------- - // Force root in cache - //----------------------------------------- - - $this->post_cache[0] = array( 'id' => 1 ); - - $this->post_cache[ $this->topics->topic['topic_firstpost'] ]['post_title'] = $this->topics->topic['title']; - - //----------------------------------------- - // Are we viewing Posts? - //----------------------------------------- - - $post_id = intval( $this->request['pid'] ); - - if ( $post_id && ! in_array( $post_id, $this->topics->pids ) ) - { - $this->registry->output->showError( 'topics_post_not_in_topic', 10358, true ); - } - - $postid_array = array( 1 => $post_id ); - - if ( $post_id and $post_id != $this->topics->topic['topic_firstpost'] ) - { - $parents = $this->_threadedPostGetParents( $post_id ); - - if ( count($parents) ) - { - foreach( $parents as $pid ) - { - if ( $pid != $this->topics->topic['topic_firstpost'] ) - { - $postid_array[] = $pid; - } - } - } - } - - /* Join Queries */ - $_post_joins = array( - array( - 'select' => 'm.member_id as mid,m.name,m.member_group_id,m.email,m.joined,m.posts, m.last_visit, m.last_activity,m.login_anonymous,m.title,m.hide_email, m.warn_level, m.warn_lastwarn, m.members_display_name, m.members_seo_name, m.has_gallery, m.has_blog, m.members_bitoptions', - 'from' => array( 'members' => 'm' ), - 'where' => 'm.member_id=p.author_id', - 'type' => 'left' - ), - array( - 'select' => 'pp.*', - 'from' => array( 'profile_portal' => 'pp' ), - 'where' => 'm.member_id=pp.pp_member_id', - 'type' => 'left' - ) - ); - - - /* Reputation system enabled? */ - if( $this->settings['reputation_enabled'] ) - { - /* Add the join to figure out if the user has already rated the post */ - $_post_joins[] = $this->registry->repCache->getUserHasRatedJoin( 'pid', 'p.pid', 'forums' ); - - /* Add the join to figure out the total ratings for each post */ - if( $this->settings['reputation_show_content'] ) - { - $_post_joins[] = $this->registry->repCache->getTotalRatingJoin( 'pid', 'p.pid', 'forums' ); - } - } - - /* Cache? */ - if ( IPSContentCache::isEnabled() ) - { - if ( IPSContentCache::fetchSettingValue('post') ) - { - $_post_joins[] = IPSContentCache::join( 'post', 'p.pid' ); - } - - if ( IPSContentCache::fetchSettingValue('sig') ) - { - $_post_joins[] = IPSContentCache::join( 'sig' , 'm.member_id', 'ccb', 'left', 'ccb.cache_content as cache_content_sig, ccb.cache_updated as cache_updated_sig' ); - } - } - - if( $this->settings['custom_profile_topic'] == 1 ) - { - $_post_joins[] = array( - 'select' => 'pc.*', - 'from' => array( 'pfields_content' => 'pc' ), - 'where' => 'pc.member_id=p.author_id', - 'type' => 'left' - ); - } - - if( count( $postid_array ) ) - { - //----------------------------------------- - // Get root post and children of clicked - //----------------------------------------- - - $this->used_post_ids = ',' . implode( ",", $postid_array ) . ','; - - $postid_array[0] = $this->topics->topic['topic_firstpost']; - - $this->DB->build( array( - 'select' => 'p.*', - 'from' => array( 'posts' => 'p' ), - 'where' => "p.pid IN(" . implode( ',', $postid_array ) . ")", - 'order' => 'pid asc', - 'add_join' => $_post_joins - ) ); - } - else - { - //----------------------------------------- - // Just get root - //----------------------------------------- - - $this->DB->build( array( - 'select' => 'p.*', - 'from' => array( 'posts' => 'p' ), - 'where' => "p.pid=" . $this->topics->topic['topic_firstpost'], - 'order' => 'pid asc', - 'add_join' => $_post_joins - ) ); - } - - //----------------------------------------- - // Attachment PIDS - //----------------------------------------- - - $this->topics->attach_pids = $postid_array; - - //----------------------------------------- - // Render the original post - //----------------------------------------- - - $outer = $this->DB->execute(); - - //----------------------------------------- - // Format and print out the topic list - //----------------------------------------- - - $post_data = array(); - $num_rows = $this->DB->getTotalRows( $outer ); - - while ( $row = $this->DB->fetch( $outer ) ) - { - $return = $this->topics->parsePostRow( $row ); - - $poster = $return['poster']; - $row = $return['row']; - - /* Reputation */ - if( $this->settings['reputation_enabled'] ) - { - $row['pp_reputation_points'] = $row['pp_reputation_points'] ? $row['pp_reputation_points'] : 0; - $row['has_given_rep'] = $row['has_given_rep'] ? $row['has_given_rep'] : 0; - $row['rep_points'] = $row['rep_points'] ? $row['rep_points'] : 0; - } - - $post_data[ $row['pid'] ] = array( 'post' => $row, 'author' => $poster ); - - //----------------------------------------- - // Are we giving this bloke a good ignoring? - //----------------------------------------- - if( isset( $ignored_users ) && is_array( $ignored_users ) && count( $ignored_users ) ) - { - if( in_array( $poster['member_id'], $ignored_users ) ) - { - if ( ! strstr( $this->settings['cannot_ignore_groups'], ','.$poster['member_group_id'].',' ) ) - { - $post_data[ $row['pid'] ]['post']['_ignored'] = 1; - continue; - } - } - } - - if ( ! $this->printed and $num_rows > 1 ) - { - $post_data[ $row['pid'] ]['post']['_end_first_post'] = 1; - $this->printed = 1; - } - } - - //----------------------------------------- - // Sort out pagination - //----------------------------------------- - - $total_replies = $this->topics->topic['posts']; - $show_replies = count( $this->structured_pids ) - 1; - - $this->topics->topic['SHOW_PAGES'] = ''; - $this->topics->topic['threaded_pages'] = $this->registry->output->generatePagination( array( - 'totalItems' => $total_replies, - 'itemsPerPage' => $last, - 'currentStartValue' => $this->request['start'], - 'baseUrl' => "showtopic=" . $this->topics->topic['tid'], - 'startValueKey' => 'start' - ) ); - - //----------------------------------------- - // START GETTING THE OUTLINE LIST - //----------------------------------------- - - $this->_threaded_posts[ 0 ]['child'] = $this->_threadedLoopGetChildren(); - $this->topics->topic['_threaded_posts'] = $this->_buildThreadedOutput( $this->_threaded_posts[ 0 ] ); - - return $post_data; - } - - /** - * Actually builds the HTML for threaded view - * - * @access public - * @param array $root The root we're iterating - * @param string $html The current HTML in this loop - * @return string HTML - */ - public function _buildThreadedOutput( $root, $html='' ) - { - $child = ''; - - if( is_array( $root['child'] ) ) - { - if( count( $root['child'] ) ) - { - foreach( $root['child'] as $pid => $post ) - { - $child .= $this->_buildThreadedOutput( $post ); - } - } - } - - $html .= $this->registry->output->getTemplate('topic')->build_threaded( $root, $child ); - - return $html; - } - - /** - * Render kiddies - * - * @access public - * @param integer $root_id - * @param array $posts - * @param integer $dguide - * @return array - **/ - public function _threadedLoopGetChildren($root_id=0, $posts=array() ,$dguide=-1) - { - $dguide++; - - if ( isset( $this->structured_pids[ $root_id ] ) && is_array( $this->structured_pids[ $root_id ] ) ) - { - if ( count( $this->structured_pids[ $root_id ] ) ) - { - foreach( $this->structured_pids[ $root_id ] as $pid ) - { - $posts[ $pid ] = $this->_threadedRenderListRow( $this->post_cache[ $pid ], $dguide ); - $posts[$pid]['child'] = $this->_threadedLoopGetChildren( $pid, isset( $posts[ $root_id ] ) ? $posts[ $root_id ] : array(), $dguide ); - } - } - } - - return $posts; - } - - /** - * Builds an array of output for used in threaded view - * - * @access public - * @param array $post - * @param integer $depth - * @return array - **/ - public function _threadedRenderListRow( $post, $depth ) - { - $post['depthguide'] = ""; - - $this->settings[ 'post_showtext_notitle'] = 1 ; - - for( $i = 1 ; $i < $depth; $i++ ) - { - $post['depthguide'] .= $this->depth_guide[ $i ]; - } - - // Last child? - - if ( $depth > 0 ) - { - $last_id = count($this->structured_pids[ $post['post_parent'] ]) - 1; - - if ( $this->structured_pids[ $post['post_parent'] ][$last_id] == $post['pid'] ) - { - $this->depth_guide[ $depth ] = ''; - $post['depthguide'] .= "-"; - } - else - { - $this->depth_guide[ $depth ] = '|'; - $post['depthguide'] .= "-"; - } - } - - if ( ! $post['post_title'] ) - { - if ( $this->settings['post_showtext_notitle'] ) - { - $post_text = IPSText::getTextClass( 'bbcode' )->stripAllTags( strip_tags( IPSText::br2nl( $post['post'] ) ) ); - - if ( IPSText::mbstrlen($post_text) > 50 ) - { - $post['post_title'] = IPSText::truncate( $post_text, 50 ).'...'; - } - else - { - $post['post_title'] = $post_text; - } - - if ( ! trim($post['post_title']) ) - { - $post['post_title'] = $this->lang->words['post_title_re'] . $this->topics->topic['title']; - } - } - else - { - $post['post_title'] = $this->lang->words['post_title_re'] . $this->topics->topic['title']; - } - } - - $post['linked_name'] = IPSLib::makeProfileLink( $post['author_name'], $post['author_id'] ); - - $post['formatted_date'] = $this->registry->class_localization->getDate( $post['post_date'], 'LONG' ); - - $post['new_post'] = 't_threaded_read'; - - if ( $post['post_date'] > $this->topics->last_read_tid ) - { - $post['new_post'] = 't_threaded_read'; - } - - if ( strstr( $this->used_post_ids, ','.$post['pid'].',' ) ) - { - $post['_show_highlight'] = 1; - } - - return $post; - } - - /** - * Get parents - * - * @access private - * @param integer $root_id - * @param array $ids - * @return array - **/ - private function _threadedPostGetParents($root_id, $ids=array()) - { - if( in_array( $root_id, $ids ) ) - { - $cnt = 0; - - foreach( $ids as $id ) - { - if( $id == $root_id ) - { - $cnt++; - - if( $cnt > 1 ) - { - return $ids; - } - } - } - } - - if ( $this->post_cache[ $root_id ]['post_parent'] ) - { - $ids[] = $this->post_cache[ $root_id ]['post_parent']; - - $ids = $this->_threadedPostGetParents( $this->post_cache[ $root_id ]['post_parent'], $ids ); - } - - return $ids; - } - - /** - * Get children - * - * @access private - * @param integer $root_id - * @param array $ids - * @return array - **/ - private function _threadedPostGetChildren($root_id, $ids=array()) - { - if ( is_array($this->structured_pids[ $root_id ]) ) - { - foreach( $this->structured_pids[ $root_id ] as $pid ) - { - $ids[] = $pid; - - $ids = $this->_threadedPostGetChildren( $pdaid, $ids ); - } - } - - return $ids; - } + + * Invision Power Services + * IP.Board v3.1.4 + * Threaded mode functions + * Last Updated: $Date: 2010-10-19 08:45:58 -0400 (Tue, 19 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Forums + * @link http://www.invisionpower.com + * @version $Revision: 6994 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

      Incorrect access

      You cannot access this file directly."; + exit(); +} + +class threadedModeLibrary +{ + /** + * Topics library + * + * @var object + */ + public $topics; + + /** + * Structured post ids + * + * @var array + */ + public $structured_pids = array(); + + /** + * Post cache + * + * @var array + */ + public $post_cache = array(); + + /** + * Used post ids + * + * @var array + */ + public $used_post_ids = array(); + + /** + * Threaded posts + * + * @var array + */ + public $_threaded_posts = array(); + + /** + * Last id we've seen + * + * @var int + */ + public $last_id = 0; + + /**#@+ + * Registry Object Shortcuts + * + * @var object + */ + protected $registry; + protected $DB; + protected $settings; + protected $request; + protected $lang; + protected $member; + protected $memberData; + protected $cache; + protected $caches; + /**#@-*/ + + /** + * Constructor + * + * @param object Registry reference + * @param object Reference to topics lib + * @return void + */ + public function __construct( ipsRegistry $registry, $topics ) + { + /* Make objects */ + $this->registry = $registry; + $this->DB = $this->registry->DB(); + $this->settings =& $this->registry->fetchSettings(); + $this->request =& $this->registry->fetchRequest(); + $this->lang = $this->registry->getClass('class_localization'); + $this->member = $this->registry->member(); + $this->memberData =& $this->registry->member()->fetchMemberData(); + $this->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + + $this->topics =& $topics; + } + + /** + * Get Threaded Topic Data + * + * @return array + */ + public function _getTopicDataThreaded() + { + //----------------------------------------- + // Grab the posts we'll need + //----------------------------------------- + + $pc_join = array(); + + $first = intval( $this->request['start'] ); + $last = $this->settings['threaded_per_page'] ? $this->settings['threaded_per_page'] : 250; + + //----------------------------------------- + // GET meh pids + //----------------------------------------- + + if ( $first > 0 ) + { + // we're on a page, make sure init val is there + + $this->topics->pids[0] = $this->topics->topic['topic_firstpost']; + $this->structured_pids[ 0 ][] = $this->topics->topic['topic_firstpost']; + } + + $this->DB->build( array( + 'select' => 'pid, post_parent', + 'from' => 'posts', + 'where' => 'topic_id=' . $this->topics->topic['tid'] . ' and queued != 1', + 'order' => 'pid', + 'limit' => array( $first, $last ) + ) ); + + $this->DB->execute(); + + while( $p = $this->DB->fetch() ) + { + $this->topics->pids[] = $p['pid']; + + // Force to be children of 'root' post + + if ( ! $p['post_parent'] and $p['pid'] != $this->topics->topic['topic_firstpost'] ) + { + $p['post_parent'] = $this->topics->topic['topic_firstpost']; + } + + $this->structured_pids[ $p['post_parent'] ][] = $p['pid']; + } + + /* Ignored Users */ + $ignored_users = array(); + + foreach( $this->member->ignored_users as $_i ) + { + if( $_i['ignore_topics'] ) + { + $ignored_users[] = $_i['ignore_ignore_id']; + } + } + + //----------------------------------------- + // Get post bodah + //----------------------------------------- + + if ( count( $this->topics->pids ) ) + { + $this->DB->build( array( + 'select' => 'pid, post, author_id, author_name, post_date, post_title, post_parent, topic_id, icon_id', + 'from' => 'posts', + 'where' => 'pid IN(' . implode( ',', $this->topics->pids ) . ')', + 'order' => 'pid', + ) ); + + $this->DB->execute(); + + while( $p = $this->DB->fetch() ) + { + if ( ! $p['post_parent'] and $p['pid'] != $this->topics->topic['topic_firstpost'] ) + { + $p['post_parent'] = $this->topics->topic['topic_firstpost']; + } + + $this->post_cache[ $p['pid'] ] = $p; + + $this->last_id = $p['pid']; + } + } + + //----------------------------------------- + // Force root in cache + //----------------------------------------- + + $this->post_cache[0] = array( 'id' => 1 ); + + $this->post_cache[ $this->topics->topic['topic_firstpost'] ]['post_title'] = $this->topics->topic['title']; + + //----------------------------------------- + // Are we viewing Posts? + //----------------------------------------- + + $post_id = intval( $this->request['pid'] ); + + if ( $post_id && ! in_array( $post_id, $this->topics->pids ) ) + { + $this->registry->output->showError( 'topics_post_not_in_topic', 10358, true, null, 404 ); + } + + $postid_array = array( 1 => $post_id ); + + if ( $post_id and $post_id != $this->topics->topic['topic_firstpost'] ) + { + $parents = $this->_threadedPostGetParents( $post_id ); + + if ( count($parents) ) + { + foreach( $parents as $pid ) + { + if ( $pid != $this->topics->topic['topic_firstpost'] ) + { + $postid_array[] = $pid; + } + } + } + } + + /* Data Hook Location */ + $dataHook = array( 'members' => array(), 'postJoins' => array() ); + IPSLib::doDataHooks( $dataHook , 'topicViewQuery' ); + + /* Join Queries */ + $_extraMember = ( is_array($dataHook['members']) && count($dataHook['members']) ) ? ',m.'.implode(',m.', $dataHook['members']) : ''; + + $_post_joins = array( + array( + 'select' => 'm.member_id as mid,m.name,m.member_group_id,m.email,m.joined,m.posts, m.last_visit, m.last_activity,m.login_anonymous,m.title,m.hide_email, m.warn_level, m.warn_lastwarn, m.members_display_name, m.members_seo_name, m.has_gallery, m.has_blog, m.members_bitoptions,m.mgroup_others'.$_extraMember, + 'from' => array( 'members' => 'm' ), + 'where' => 'm.member_id=p.author_id', + 'type' => 'left' + ), + array( + 'select' => 'pp.*', + 'from' => array( 'profile_portal' => 'pp' ), + 'where' => 'm.member_id=pp.pp_member_id', + 'type' => 'left' + ) + ); + + /* Add data hook joins */ + if ( is_array($dataHook['postJoins']) && count($dataHook['postJoins']) ) + { + $_post_joins = array_merge( $_post_joins, $dataHook['postJoins'] ); + } + + /* Reputation system enabled? */ + if( $this->settings['reputation_enabled'] ) + { + /* Add the join to figure out if the user has already rated the post */ + $_post_joins[] = $this->registry->repCache->getUserHasRatedJoin( 'pid', 'p.pid', 'forums' ); + + /* Add the join to figure out the total ratings for each post */ + if( $this->settings['reputation_show_content'] ) + { + $_post_joins[] = $this->registry->repCache->getTotalRatingJoin( 'pid', 'p.pid', 'forums' ); + } + } + + /* Cache? */ + if ( IPSContentCache::isEnabled() ) + { + if ( IPSContentCache::fetchSettingValue('post') ) + { + $_post_joins[] = IPSContentCache::join( 'post', 'p.pid' ); + } + + if ( IPSContentCache::fetchSettingValue('sig') ) + { + $_post_joins[] = IPSContentCache::join( 'sig' , 'm.member_id', 'ccb', 'left', 'ccb.cache_content as cache_content_sig, ccb.cache_updated as cache_updated_sig' ); + } + } + + if( $this->settings['custom_profile_topic'] == 1 ) + { + $_post_joins[] = array( + 'select' => 'pc.*', + 'from' => array( 'pfields_content' => 'pc' ), + 'where' => 'pc.member_id=p.author_id', + 'type' => 'left' + ); + } + + if( count( $postid_array ) ) + { + //----------------------------------------- + // Get root post and children of clicked + //----------------------------------------- + + $this->used_post_ids = ',' . implode( ",", $postid_array ) . ','; + + $postid_array[0] = $this->topics->topic['topic_firstpost']; + + $this->DB->build( array( + 'select' => 'p.*', + 'from' => array( 'posts' => 'p' ), + 'where' => "p.pid IN(" . implode( ',', $postid_array ) . ")", + 'order' => 'pid asc', + 'add_join' => $_post_joins + ) ); + } + else + { + //----------------------------------------- + // Just get root + //----------------------------------------- + + $this->DB->build( array( + 'select' => 'p.*', + 'from' => array( 'posts' => 'p' ), + 'where' => "p.pid=" . $this->topics->topic['topic_firstpost'], + 'order' => 'pid asc', + 'add_join' => $_post_joins + ) ); + } + + //----------------------------------------- + // Attachment PIDS + //----------------------------------------- + + $this->topics->attach_pids = $postid_array; + + //----------------------------------------- + // Render the original post + //----------------------------------------- + + $outer = $this->DB->execute(); + + //----------------------------------------- + // Format and print out the topic list + //----------------------------------------- + + $post_data = array(); + $num_rows = $this->DB->getTotalRows( $outer ); + + while ( $row = $this->DB->fetch( $outer ) ) + { + /* That 1 line fix below took 1 hour, joy :D */ + $row['member_id'] = $row['mid']; + $row['g_access_cp'] = $this->caches['group_cache'][ $row['member_group_id'] ]['g_access_cp']; + + $return = $this->topics->parsePostRow( $row ); + + $poster = $return['poster']; + $row = $return['row']; + + /* Reputation */ + if( $this->settings['reputation_enabled'] ) + { + $row['pp_reputation_points'] = $row['pp_reputation_points'] ? $row['pp_reputation_points'] : 0; + $row['has_given_rep'] = $row['has_given_rep'] ? $row['has_given_rep'] : 0; + $row['rep_points'] = $row['rep_points'] ? $row['rep_points'] : 0; + } + + $post_data[ $row['pid'] ] = array( 'post' => $row, 'author' => $poster ); + + //----------------------------------------- + // Are we giving this bloke a good ignoring? + //----------------------------------------- + if( isset( $ignored_users ) && is_array( $ignored_users ) && count( $ignored_users ) ) + { + if( in_array( $poster['member_id'], $ignored_users ) ) + { + if ( ! strstr( $this->settings['cannot_ignore_groups'], ','.$poster['member_group_id'].',' ) ) + { + $post_data[ $row['pid'] ]['post']['_ignored'] = 1; + continue; + } + } + } + + if ( ! $this->printed and $num_rows > 1 ) + { + $post_data[ $row['pid'] ]['post']['_end_first_post'] = 1; + $this->printed = 1; + } + } + + //----------------------------------------- + // Sort out pagination + //----------------------------------------- + + $total_replies = $this->topics->topic['posts']; + $show_replies = count( $this->structured_pids ) - 1; + + $this->topics->topic['SHOW_PAGES'] = ''; + $this->topics->topic['threaded_pages'] = $this->registry->output->generatePagination( array( + 'totalItems' => $total_replies, + 'itemsPerPage' => $last, + 'currentStartValue' => $this->request['start'], + 'baseUrl' => "showtopic=" . $this->topics->topic['tid'], + 'startValueKey' => 'start', + 'seoTemplate' => 'showtopic', + 'seoTitle' => $this->topics->topic['title_seo'] + ) ); + + //----------------------------------------- + // START GETTING THE OUTLINE LIST + //----------------------------------------- + + $this->_threaded_posts[ 0 ]['child'] = $this->_threadedLoopGetChildren(); + $this->topics->topic['_threaded_posts'] = $this->_buildThreadedOutput( $this->_threaded_posts[ 0 ] ); + + return $post_data; + } + + /** + * Actually builds the HTML for threaded view + * + * @param array $root The root we're iterating + * @param string $html The current HTML in this loop + * @return string HTML + */ + public function _buildThreadedOutput( $root, $html='' ) + { + $child = ''; + + if( is_array( $root['child'] ) ) + { + if( count( $root['child'] ) ) + { + foreach( $root['child'] as $pid => $post ) + { + $child .= $this->_buildThreadedOutput( $post ); + } + } + } + + $html .= $this->registry->output->getTemplate('topic')->build_threaded( $root, $child, $this->topics->topic ); + + return $html; + } + + /** + * Render kiddies + * + * @param integer $root_id + * @param array $posts + * @param integer $dguide + * @return array + */ + public function _threadedLoopGetChildren($root_id=0, $posts=array() ,$dguide=-1) + { + $dguide++; + + if ( isset( $this->structured_pids[ $root_id ] ) && is_array( $this->structured_pids[ $root_id ] ) ) + { + if ( count( $this->structured_pids[ $root_id ] ) ) + { + foreach( $this->structured_pids[ $root_id ] as $pid ) + { + $posts[ $pid ] = $this->_threadedRenderListRow( $this->post_cache[ $pid ], $dguide ); + $posts[$pid]['child'] = $this->_threadedLoopGetChildren( $pid, isset( $posts[ $root_id ] ) ? $posts[ $root_id ] : array(), $dguide ); + } + } + } + + return $posts; + } + + /** + * Builds an array of output for used in threaded view + * + * @param array $post + * @param integer $depth + * @return array + */ + public function _threadedRenderListRow( $post, $depth ) + { + $post['depthguide'] = ""; + + $this->settings[ 'post_showtext_notitle'] = 1 ; + + for( $i = 1 ; $i < $depth; $i++ ) + { + $post['depthguide'] .= $this->depth_guide[ $i ]; + } + + // Last child? + + if ( $depth > 0 ) + { + $last_id = count($this->structured_pids[ $post['post_parent'] ]) - 1; + + if ( $this->structured_pids[ $post['post_parent'] ][$last_id] == $post['pid'] ) + { + $this->depth_guide[ $depth ] = ''; + $post['depthguide'] .= "-"; + } + else + { + $this->depth_guide[ $depth ] = '|'; + $post['depthguide'] .= "-"; + } + } + + if ( ! $post['post_title'] ) + { + if ( $this->settings['post_showtext_notitle'] ) + { + $post_text = IPSText::getTextClass( 'bbcode' )->stripAllTags( strip_tags( IPSText::br2nl( $post['post'] ) ) ); + + if ( IPSText::mbstrlen($post_text) > 50 ) + { + $post['post_title'] = IPSText::truncate( $post_text, 50 ).'...'; + } + else + { + $post['post_title'] = $post_text; + } + + if ( ! trim($post['post_title']) ) + { + $post['post_title'] = $this->lang->words['post_title_re'] . $this->topics->topic['title']; + } + } + else + { + $post['post_title'] = $this->lang->words['post_title_re'] . $this->topics->topic['title']; + } + } + + $post['linked_name'] = IPSLib::makeProfileLink( $post['author_name'], $post['author_id'] ); + + $post['formatted_date'] = $this->registry->class_localization->getDate( $post['post_date'], 'LONG' ); + + $post['new_post'] = 't_threaded_read'; + + if ( $post['post_date'] > $this->topics->last_read_tid ) + { + $post['new_post'] = 't_threaded_read'; + } + + if ( strstr( $this->used_post_ids, ','.$post['pid'].',' ) ) + { + $post['_show_highlight'] = 1; + } + + return $post; + } + + /** + * Get parents + * + * @param integer $root_id + * @param array $ids + * @return array + */ + private function _threadedPostGetParents($root_id, $ids=array()) + { + if( in_array( $root_id, $ids ) ) + { + $cnt = 0; + + foreach( $ids as $id ) + { + if( $id == $root_id ) + { + $cnt++; + + if( $cnt > 1 ) + { + return $ids; + } + } + } + } + + if ( $this->post_cache[ $root_id ]['post_parent'] ) + { + $ids[] = $this->post_cache[ $root_id ]['post_parent']; + + $ids = $this->_threadedPostGetParents( $this->post_cache[ $root_id ]['post_parent'], $ids ); + } + + return $ids; + } + + /** + * Get children + * + * @param integer $root_id + * @param array $ids + * @return array + */ + private function _threadedPostGetChildren($root_id, $ids=array()) + { + if ( is_array($this->structured_pids[ $root_id ]) ) + { + foreach( $this->structured_pids[ $root_id ] as $pid ) + { + $ids[] = $pid; + + $ids = $this->_threadedPostGetChildren( $pid, $ids ); + } + } + + return $ids; + } } \ No newline at end of file diff --git a/upload/admin/applications/forums/sources/index.html b/upload/admin/applications/forums/sources/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/sources/index.html +++ b/upload/admin/applications/forums/sources/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/sql/index.html b/upload/admin/applications/forums/sql/index.html deleted file mode 100644 index 203e7ede..00000000 --- a/upload/admin/applications/forums/sql/index.html +++ /dev/null @@ -1 +0,0 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file diff --git a/upload/admin/applications/forums/tasks/announcements.php b/upload/admin/applications/forums/tasks/announcements.php index 1705daa8..f58f2010 100644 --- a/upload/admin/applications/forums/tasks/announcements.php +++ b/upload/admin/applications/forums/tasks/announcements.php @@ -1,19 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Task: Deactivate expired announcements - * Last Updated: $LastChangedDate: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $LastChangedDate: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th January 2004 - * @version $Rev: 3887 $ + * @version $Rev: 7003 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -25,49 +26,49 @@ if ( ! defined( 'IN_IPB' ) ) class task_item { /** - * Parent task manager class - * - * @access protected - * @var object - */ + * Parent task manager class + * + * @var object + */ protected $class; /** - * This task data - * - * @access protected - * @var array - */ + * This task data + * + * @var array + */ protected $task = array(); /** - * Prevent logging - * - * @access protected - * @var boolean - */ + * Prevent logging + * + * @var boolean + */ protected $restrict_log = false; /** - * Registry Object Shortcuts - */ + * Registry Object Shortcuts + * + * @var object + */ protected $registry; protected $DB; protected $settings; protected $request; protected $lang; protected $member; + protected $memberData; protected $cache; + protected $caches; /** - * Constructor - * - * @access public - * @param object ipsRegistry reference - * @param object Parent task class - * @param array This task data - * @return void - */ + * Constructor + * + * @param object ipsRegistry reference + * @param object Parent task class + * @param array This task data + * @return void + */ public function __construct( ipsRegistry $registry, $class, $task ) { /* Make registry objects */ @@ -86,11 +87,10 @@ class task_item } /** - * Run this task - * - * @access public - * @return void - */ + * Run this task + * + * @return void + */ public function runTask() { $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' ); @@ -99,8 +99,8 @@ class task_item // Deactivate expired announcements //----------------------------------------- - require ( IPSLib::getAppDir( 'forums' ) . '/modules_public/forums/announcements.php' ); - $announcements = new public_forums_forums_announcements(); + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'forums' ) . '/modules_public/forums/announcements.php', 'public_forums_forums_announcements' ); + $announcements = new $classToLoad(); $announcements->makeRegistryShortcuts( $this->registry ); $announcements->announceRetireExpired(); @@ -116,5 +116,4 @@ class task_item $this->class->unlockTask( $this->task ); } - } \ No newline at end of file diff --git a/upload/admin/applications/forums/tasks/dailycleanout.php b/upload/admin/applications/forums/tasks/dailycleanout.php index 478f3fd5..71bbfff5 100644 --- a/upload/admin/applications/forums/tasks/dailycleanout.php +++ b/upload/admin/applications/forums/tasks/dailycleanout.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Task: Prunes subscribed topics - * Last Updated: $LastChangedDate: 2009-08-24 20:56:22 -0400 (Mon, 24 Aug 2009) $ + * Last Updated: $LastChangedDate: 2010-07-07 08:09:48 -0400 (Wed, 07 Jul 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: matt $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th January 2004 - * @version $Rev: 5041 $ + * @version $Rev: 6609 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -162,6 +164,52 @@ class task_item $this->DB->delete( 'attachments', "attach_id IN(" . implode( ",", $deadid ) . ")" ); } + //----------------------------------------- + // Delete old topic redirects + //----------------------------------------- + + if ( intval( $this->settings['topic_redirect_prune'] ) > 0 ) + { + $time = time() - ( $this->settings['topic_redirect_prune'] * 86400 ); + $tids = array(); + $fids = array(); + + /* Grab topics ensuring we use the index */ + $this->DB->build( array( 'select' => 'tid, moved_to, forum_id', + 'from' => 'topics', + 'where' => 'forum_id > 0 AND pinned=0 AND last_post < ' . $time . " AND state='link'", + 'limit' => array( 0, 150 ) ) ); + + $this->DB->execute(); + + while ( $row = $this->DB->fetch() ) + { + /* ensure it's a moved topic */ + if ( $row['moved_to'] ) + { + $tids[] = $row['tid']; + $fids[ $row['forum_id'] ]++; + } + } + + if ( count( $tids ) > 0 ) + { + $this->DB->delete( 'topics', "tid IN (" . implode( ",", $tids ) . ")" ); + + if ( count( $fids ) ) + { + foreach( $fids as $f => $count ) + { + /* remove the count */ + $this->DB->force_data_type = array( 'topics' => 'int' ); + $this->DB->update( 'forums', array( 'topics' => 'minus:' . $count ), 'id=' . intval( $f ) ); + } + } + } + + $redirectsDeleted = intval( count( $tids ) ); + } + //----------------------------------------- // Remove old XML-RPC logs... //----------------------------------------- @@ -179,7 +227,7 @@ class task_item // Log to log table - modify but dont delete //----------------------------------------- - $this->class->appendTaskLog( $this->task, sprintf( $this->lang->words['task_dailycleanout'], $xmlrpc_logs_deleted, $_attach_count, $deleted ) ); + $this->class->appendTaskLog( $this->task, sprintf( $this->lang->words['task_dailycleanout'], $xmlrpc_logs_deleted, $_attach_count, $deleted, $redirectsDeleted ) ); //----------------------------------------- // Unlock Task: DO NOT MODIFY! diff --git a/upload/admin/applications/forums/tasks/dailydigest.php b/upload/admin/applications/forums/tasks/dailydigest.php index bf4adb23..a3e87b1d 100644 --- a/upload/admin/applications/forums/tasks/dailydigest.php +++ b/upload/admin/applications/forums/tasks/dailydigest.php @@ -1,19 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Task: Send the daily digest emails - * Last Updated: $LastChangedDate: 2009-03-03 11:17:41 -0500 (Tue, 03 Mar 2009) $ + * Last Updated: $LastChangedDate: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * * - * @author $Author: matt $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th January 2004 - * @version $Rev: 4133 $ + * @version $Rev: 7003 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -25,60 +26,60 @@ if ( ! defined( 'IN_IPB' ) ) class task_item { /** - * Parent task manager class - * - * @access protected - * @var object - */ + * Parent task manager class + * + * @var object + */ protected $class; /** - * This task data - * - * @access protected - * @var array - */ + * This task data + * + * @var array + */ protected $task = array(); /** - * Prevent logging - * - * @access protected - * @var boolean - */ + * Prevent logging + * + * @var boolean + */ protected $restrict_log = false; /** - * Registry Object Shortcuts - */ + * Registry Object Shortcuts + * + * @var object + */ protected $registry; protected $DB; protected $settings; protected $request; protected $lang; protected $member; + protected $memberData; protected $cache; + protected $caches; /** - * Constructor - * - * @access public - * @param object ipsRegistry reference - * @param object Parent task class - * @param array This task data - * @return void - */ + * Constructor + * + * @param object ipsRegistry reference + * @param object Parent task class + * @param array This task data + * @return void + */ public function __construct( ipsRegistry $registry, $class, $task ) { /* Make registry objects */ - $this->registry = $registry; - $this->DB = $this->registry->DB(); + $this->registry = $registry; + $this->DB = $this->registry->DB(); $this->settings =& $this->registry->fetchSettings(); $this->request =& $this->registry->fetchRequest(); - $this->lang = $this->registry->getClass('class_localization'); - $this->member = $this->registry->member(); + $this->lang = $this->registry->getClass('class_localization'); + $this->member = $this->registry->member(); $this->memberData =& $this->registry->member()->fetchMemberData(); - $this->cache = $this->registry->cache(); + $this->cache = $this->registry->cache(); $this->caches =& $this->registry->cache()->fetchCaches(); $this->class = $class; @@ -86,11 +87,10 @@ class task_item } /** - * Run this task - * - * @access public - * @return void - */ + * Run this task + * + * @return void + */ public function runTask() { $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' ); @@ -99,14 +99,14 @@ class task_item // Send daily digests... //----------------------------------------- - require ( IPSLib::getAppDir( 'forums' ) . '/sources/classes/digest.php' ); - $digest = new digestLibrary( $this->registry ); - $digest->digest_time = 'daily'; - $digest->digest_type = 'topic'; + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/digest.php', 'digestLibrary', 'forums' ); + $digest = new $classToLoad( $this->registry ); + $digest->digest_time = 'daily'; + $digest->digest_type = 'topic'; $digest->runDigest(); - $digest->digest_time = 'daily'; - $digest->digest_type = 'forum'; + $digest->digest_time = 'daily'; + $digest->digest_type = 'forum'; $digest->runDigest(); //----------------------------------------- @@ -121,5 +121,4 @@ class task_item $this->class->unlockTask( $this->task ); } - } \ No newline at end of file diff --git a/upload/admin/applications/forums/tasks/index.html b/upload/admin/applications/forums/tasks/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications/forums/tasks/index.html +++ b/upload/admin/applications/forums/tasks/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/forums/tasks/rssimport.php b/upload/admin/applications/forums/tasks/rssimport.php index a5bb75e3..331ee04e 100644 --- a/upload/admin/applications/forums/tasks/rssimport.php +++ b/upload/admin/applications/forums/tasks/rssimport.php @@ -1,19 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Task: Update the rss import - * Last Updated: $LastChangedDate: 2009-11-24 18:10:00 -0500 (Tue, 24 Nov 2009) $ + * Last Updated: $LastChangedDate: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th January 2004 - * @version $Rev: 5467 $ + * @version $Rev: 7003 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -25,57 +26,54 @@ if ( ! defined( 'IN_IPB' ) ) class task_item { /** - * Parent task manager class - * - * @access protected - * @var object - */ + * Parent task manager class + * + * @var object + */ protected $class; /** - * This task data - * - * @access protected - * @var array - */ + * This task data + * + * @var array + */ protected $task = array(); /** - * Prevent logging - * - * @access protected - * @var boolean - */ + * Prevent logging + * + * @var boolean + */ protected $restrict_log = false; /** - * Limit - * - * @access protected - * @var integer - */ + * Limit + * + * @var integer + */ protected $limit = 10; /** - * Registry Object Shortcuts - */ + * Registry Object Shortcuts + */ protected $registry; protected $DB; protected $settings; protected $request; protected $lang; protected $member; + protected $memberData; protected $cache; + protected $caches; /** - * Constructor - * - * @access public - * @param object ipsRegistry reference - * @param object Parent task class - * @param array This task data - * @return void - */ + * Constructor + * + * @param object ipsRegistry reference + * @param object Parent task class + * @param array This task data + * @return void + */ public function __construct( ipsRegistry $registry, $class, $task ) { /* Make registry objects */ @@ -94,11 +92,10 @@ class task_item } /** - * Run this task - * - * @access public - * @return void - */ + * Run this task + * + * @return void + */ public function runTask() { $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' ); @@ -129,8 +126,8 @@ class task_item { define( 'IN_ACP', 1 ); - require_once( IPSLib::getAppDir( 'forums' ) . '/modules_admin/rss/import.php' ); - $rss = new admin_forums_rss_import(); + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'forums' ) . '/modules_admin/rss/import.php', 'admin_forums_rss_import' ); + $rss = new $classToLoad(); $rss->makeRegistryShortcuts( $this->registry ); while( $rss_feed = $this->DB->fetch( $rss_main_query ) ) diff --git a/upload/admin/applications/forums/tasks/updateviews.php b/upload/admin/applications/forums/tasks/updateviews.php index 1d4c1d93..51dea081 100644 --- a/upload/admin/applications/forums/tasks/updateviews.php +++ b/upload/admin/applications/forums/tasks/updateviews.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Task: Update topic views - * Last Updated: $LastChangedDate: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th January 2004 - * @version $Rev: 3887 $ + * @version $Rev: 5713 $ */ if ( ! defined( 'IN_IPB' ) ) diff --git a/upload/admin/applications/forums/tasks/weeklydigest.php b/upload/admin/applications/forums/tasks/weeklydigest.php index 550767c7..c7bd4a2c 100644 --- a/upload/admin/applications/forums/tasks/weeklydigest.php +++ b/upload/admin/applications/forums/tasks/weeklydigest.php @@ -1,19 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Task: Send the weekly digest emails - * Last Updated: $LastChangedDate: 2009-03-03 11:17:41 -0500 (Tue, 03 Mar 2009) $ + * Last Updated: $LastChangedDate: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $ + * * - * @author $Author: matt $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th January 2004 - * @version $Rev: 4133 $ + * @version $Rev: 7003 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -25,49 +26,49 @@ if ( ! defined( 'IN_IPB' ) ) class task_item { /** - * Parent task manager class - * - * @access protected - * @var object - */ + * Parent task manager class + * + * @var object + */ protected $class; /** - * This task data - * - * @access protected - * @var array - */ + * This task data + * + * @var array + */ protected $task = array(); /** - * Prevent logging - * - * @access protected - * @var boolean - */ + * Prevent logging + * + * @var boolean + */ protected $restrict_log = false; /** - * Registry Object Shortcuts - */ + * Registry Object Shortcuts + * + * @var object + */ protected $registry; protected $DB; protected $settings; protected $request; protected $lang; protected $member; + protected $memberData; protected $cache; + protected $caches; /** - * Constructor - * - * @access public - * @param object ipsRegistry reference - * @param object Parent task class - * @param array This task data - * @return void - */ + * Constructor + * + * @param object ipsRegistry reference + * @param object Parent task class + * @param array This task data + * @return void + */ public function __construct( ipsRegistry $registry, $class, $task ) { /* Make registry objects */ @@ -86,11 +87,10 @@ class task_item } /** - * Run this task - * - * @access public - * @return void - */ + * Run this task + * + * @return void + */ public function runTask() { $this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' ); @@ -99,14 +99,14 @@ class task_item // Send daily digests... //----------------------------------------- - require ( IPSLib::getAppDir( 'forums' ) . '/sources/classes/digest.php' ); - $digest = new digestLibrary( $this->registry ); - $digest->digest_time = 'weekly'; - $digest->digest_type = 'topic'; + $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/digest.php', 'digestLibrary', 'forums' ); + $digest = new $classToLoad( $this->registry ); + $digest->digest_time = 'weekly'; + $digest->digest_type = 'topic'; $digest->runDigest(); - $digest->digest_time = 'weekly'; - $digest->digest_type = 'forum'; + $digest->digest_time = 'weekly'; + $digest->digest_type = 'forum'; $digest->runDigest(); //----------------------------------------- @@ -121,5 +121,4 @@ class task_item $this->class->unlockTask( $this->task ); } - } \ No newline at end of file diff --git a/upload/admin/applications/forums/xml/admin_forums_language_pack.xml b/upload/admin/applications/forums/xml/admin_forums_language_pack.xml index 71334062..907a95dc 100644 --- a/upload/admin/applications/forums/xml/admin_forums_language_pack.xml +++ b/upload/admin/applications/forums/xml/admin_forums_language_pack.xml @@ -1,63 +1,13 @@ - - forums - admin_attachments - atc_importbutton - Import - Импортировать - 30005 - 30005 - 0 - forums admin_attachments atc_add Add New Attachment Type Добавить новый тип - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_export - Export Attachment Types... - Экспортировать типы файлов - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_import - Import an Attachment Types List - Импортировать список типов прикрепляемых файлов - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_uploadxml - Upload XML Attachment Types List]]> - Загрузка XML-архива со списком прикрепляемых файлов ]]> - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_uploadxml_info - - - 30005 + 31006 30005 0 @@ -67,317 +17,7 @@ atc_delete Delete Attachment Type... Удалить - 30005 - 30005 - 0 - - - forums - admin_attachments - ty_addnew - Add New Attachment Type - Добавить тип - 30005 - 30005 - 0 - - - forums - admin_attachments - ty_baseon - Base on: - Основан на типе: - 30005 - 30005 - 0 - - - forums - admin_attachments - ty_edit - Edit Attachment Type - Изменить тип - 30005 - 30005 - 0 - - - forums - admin_attachments - ty_noid - No ID was passed. Please try again. - ID не найден. Попробуйте еще раз. - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_overview - Attachments: Overview - Обзор - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_number - Number of Attachments]]> - Количество файлов]]> - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_diskusage - Attachments Disk Usage]]> - Занимают места на диске]]> - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_last5 - Attachments: Last 5 Attached - 5 последних файлов - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_attachment - Attachment - Файл - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_size - Size - Размер - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_author - Author - Автор - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_topic - Topic - Тема - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_posted - Posted - Дата - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_largest5 - Attachments: Largest 5 Attachments - 5 самых больших файлов - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_top5 - Attachments: Top 5 Most Viewed - 5 самых просматриваемых файлов - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_viewed - Viewed - Просмотров - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_deletebutton - Delete Checked Attachments - Удалить выбранные файлы - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_fileext - Attachment File Extension]]> - Расширение прикрепляемого файла - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_fileext_info - You don't need to add the '.' before the extension]]> - Не требуется вводить точку («.») до расширения файла.]]> - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_mimetype - Attachment Mime-Type]]> - MIME-тип файла - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_mimetype_info - Try looking here.]]> - Попробуйте найти здесь.]]> - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_inposts - Allow this attachment in posts?]]> - Разрешить прикреплять этот тип файлов к сообщениям? - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_inavatars - Allow this attachment in avatars / personal photos?]]> - Разрешить использовать этот тип файлов, как аватар или фотографию? - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_miniimg - Attachment Mini-Image]]> - Иконка этого типа файлов - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_miniimg_info - This is the little icon that represents the attachment type in a post. - Маленькая иконка, указывающая тип файла в сообщении. - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_go - Go - Выбрать - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_atttypes - Your Attachment Types - Ваши типы прикрепляемых файлов - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_options - Options - Действия - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_extension - Extension - Расширение - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_mime_type - Mime-Type - Mime-тип - 30005 - 30005 - 0 - - - forums - admin_attachments - atc_post - +Post - +Сообщения - 30005 + 31006 30005 0 @@ -387,7 +27,7 @@ atc_avatar +Avatar +Аватар - 30005 + 31006 30005 0 @@ -397,447 +37,287 @@ atc_edit Edit Attachment Type... Изменить - 30005 + 31006 30005 0 forums admin_attachments - ty_edited - Attachment type edited. - Тип изменен - 30005 + atc_mime_type + Mime-Type + Mime-тип + 31006 30005 0 forums admin_attachments - ty_addedit - Add/Edit Attachment Type - Добавление/Изменение типов файлов - 30005 + atc_post + +Post + +Сообщения + 31006 30005 0 forums admin_attachments - st_removed - Attachment(s) Removed! - Прикрепленные файлы удалены! - 30005 + atc_atttypes + Your Attachment Types + Ваши типы прикрепляемых файлов + 31006 30005 0 forums admin_attachments - ty_title - Attachment Types - Типы прикрепляемых файлов - 30005 + atc_options + Options + Действия + 31006 30005 0 forums admin_attachments - ty_failed - Upload failed, ipb_attachtypes.xml was either missing or empty. - - 30005 + atc_extension + Extension + Расширение + 31006 30005 0 forums admin_attachments - ty_imported - Attachment Types XML file import completed. - Импортирование типов прикрепляемых файлов выполнено успешно. - 30005 + atc_go + Go + Выбрать + 31006 30005 0 forums admin_attachments - ty_deleted - Attachment type deleted. - Тип прикрепляемого файла удален. - 30005 + atc_miniimg + Attachment Mini-Image]]> + Иконка этого типа файлов + 31006 30005 0 forums admin_attachments - ty_enterinfo - You must enter at least an extension and mime-type before continuing. - Необходимо ввести хотя бы расширение и MIME-тип, прежде чем продолжить. - 30005 + atc_miniimg_info + This is the little icon that represents the attachment type in a post. + Маленькая иконка, указывающая тип файла в сообщении. + 31006 30005 0 forums admin_attachments - ty_already - - - 30005 + atc_inavatars + Allow this attachment in avatars / personal photos?]]> + Разрешить использовать этот тип файлов, как аватар или фотографию? + 31006 30005 0 forums admin_attachments - ty_added - Attachment type added. - Тип прикрепляемого файла добавлен. - 30005 + atc_inposts + Allow this attachment in posts?]]> + Разрешить прикреплять этот тип файлов к сообщениям? + 31006 30005 0 forums admin_attachments - st_title - Attachment Statistics - Статистика - 30005 + atc_mimetype + Attachment Mime-Type]]> + MIME-тип файла + 31006 30005 0 forums admin_attachments - attach_not_topic - Not a topic]]> - Не тема ]]> - 30005 + atc_mimetype_info + Try looking here.]]> + Попробуйте найти здесь.]]> + 31006 30005 0 forums admin_attachments - attachments_removed - Attachments Removed - Прикрепленные файлы удалены - 30005 + atc_fileext_info + You don't need to add the '.' before the extension]]> + Не требуется вводить точку («.») до расширения файла.]]> + 31006 30005 0 forums admin_attachments - deleted_attachments - Deleted attachment ids: %s - Удаленные прикрепленные файлы: %s - 30005 - 30005 - 0 - - - forums - admin_attachments - se_ago - ago - дней назад - 30005 - 30005 - 0 - - - forums - admin_attachments - se_times - times - раз - 30005 - 30005 - 0 - - - forums - admin_attachments - se_searchbutton - Search - Искать - 30005 - 30005 - 0 - - - forums - admin_attachments - se_showresults - Show n ResultsMaximum is 100 regardless of your entry]]> - n результатовНо не более 100 за раз]]> - 30005 - 30005 - 0 - - - forums - admin_attachments - se_oasc - - - 30005 - 30005 - 0 - - - forums - admin_attachments - se_odsc - - - 30005 - 30005 - 0 - - - forums - admin_attachments - se_oviews - Attach Views - Количеству просмотров - 30005 - 30005 - 0 - - - forums - admin_attachments - se_mname - Match File NameLeave blank to omit]]> - Оставьте пустым, чтобы пропустить при поиске]]> - 30005 - 30005 - 0 - - - forums - admin_attachments - se_mauthor - Match Post Author NameLeave blank to omit]]> - Оставьте пустым, чтобы пропустить при поиске]]> - 30005 - 30005 - 0 - - - forums - admin_attachments - se_mimages - Match Only Images?If 'yes', this search will only return image attachments.]]> - Если выбрано «Да», в результатах поиска будут только изображения.]]> - 30005 - 30005 - 0 - - - forums - admin_attachments - se_mext - Match File ExtensionLeave blank to omit]]> - Оставьте пустым, чтобы пропустить при поиске]]> - 30005 - 30005 - 0 - - - forums - admin_attachments - se_msize - Match File Size (in kb)Leave blank to omit]]> - Оставьте пустым, чтобы пропустить при поиске]]> - 30005 - 30005 - 0 - - - forums - admin_attachments - se_oname - Attach File Name - Имени файла - 30005 - 30005 - 0 - - - forums - admin_attachments - se_osize - Attach File Size - Размеру файла - 30005 - 30005 - 0 - - - forums - admin_attachments - se_odate - Attach Date - Дате прикрепления - 30005 - 30005 - 0 - - - forums - admin_attachments - se_morder - Order Results By]]> - Сортировать результаты по]]> - 30005 - 30005 - 0 - - - forums - admin_attachments - se_mviewed - Match Viewed n TimesLeave blank to omit]]> - Оставьте пустым, чтобы пропустить при поиске]]> - 30005 - 30005 - 0 - - - forums - admin_attachments - se_mposted - Match Posted n DaysLeave blank to omit]]> - Оставьте пустым, чтобы пропустить при поиске]]> - 30005 - 30005 - 0 - - - forums - admin_attachments - se_lessthan - Less Than - Меньше чем - 30005 - 30005 - 0 - - - forums - admin_attachments - se_morethan - More Than - Больше чем - 30005 - 30005 - 0 - - - forums - admin_attachments - se_search - Search Attachments - Поиск прикрепленных файлов - 30005 - 30005 - 0 - - - forums - admin_attachments - se_delete + atc_deletebutton Delete Checked Attachments Удалить выбранные файлы - 30005 + 31006 30005 0 forums admin_attachments - se_results - Attachments: Search Results - Результаты поиска файлов - 30005 + atc_fileext + Attachment File Extension]]> + Расширение прикрепляемого файла + 31006 30005 0 forums admin_attachments - se_posted + atc_viewed + Viewed + Просмотров + 31006 + 30005 + 0 + + + forums + admin_attachments + atc_largest5 + Attachments: Largest 5 Attachments + 5 самых больших файлов + 31006 + 30005 + 0 + + + forums + admin_attachments + atc_top5 + Attachments: Top 5 Most Viewed + 5 самых просматриваемых файлов + 31006 + 30005 + 0 + + + forums + admin_attachments + atc_posted Posted Дата - 30005 + 31006 30005 0 forums admin_attachments - se_topic + atc_topic Topic Тема - 30005 + 31006 30005 0 forums admin_attachments - se_author - Author - Автор - 30005 - 30005 - 0 - - - forums - admin_attachments - se_size + atc_size Size Размер - 30005 + 31006 30005 0 forums admin_attachments - se_attachment + atc_author + Author + Автор + 31006 + 30005 + 0 + + + forums + admin_attachments + atc_attachment Attachment Файл - 30005 + 31006 30005 0 forums admin_attachments - se_title - Attachment Manager - Управление прикрепляемыми файлами - 30005 + atc_last5 + Attachments: Last 5 Attached + 5 последних файлов + 31006 30005 0 forums admin_attachments - add_attachment_type_head - Add Attachment Type - Добавление типа прикрепляемого файла - 30006 + atc_diskusage + Attachments Disk Usage]]> + Занимают места на диске]]> + 31006 + 30005 + 0 + + + forums + admin_attachments + atc_number + Number of Attachments]]> + Количество файлов]]> + 31006 + 30005 + 0 + + + forums + admin_attachments + atc_overview + Attachments: Overview + Обзор + 31006 + 30005 + 0 + + + forums + admin_attachments + attach_stats_head + Attachment Statistics + Статистика прикрепленных файлов + 31006 30006 0 @@ -847,97 +327,547 @@ attach_baseon Use another type as a base? Использовать какой-нибудь тип как базовый? - 30006 + 31006 30006 0 forums admin_attachments - attach_stats_head - Attachment Statistics - Статистика прикрепленных файлов - 30006 + ty_noid + No ID was passed. Please try again. + ID не найден. Попробуйте еще раз. + 31006 + 30005 + 0 + + + forums + admin_attachments + add_attachment_type_head + Add Attachment Type + Добавление типа прикрепляемого файла + 31006 30006 0 + + forums + admin_attachments + ty_baseon + Base on: + Основан на типе: + 31006 + 30005 + 0 + + + forums + admin_attachments + ty_edit + Edit Attachment Type + Изменить тип + 31006 + 30005 + 0 + + + forums + admin_attachments + ty_addnew + Add New Attachment Type + Добавить тип + 31006 + 30005 + 0 + + + forums + admin_attachments + ty_edited + Attachment type edited. + Тип изменен + 31006 + 30005 + 0 + + + forums + admin_attachments + ty_addedit + Add/Edit Attachment Type + Добавление/Изменение типов файлов + 31006 + 30005 + 0 + + + forums + admin_attachments + ty_added + Attachment type added. + Тип прикрепляемого файла добавлен. + 31006 + 30005 + 0 + + + forums + admin_attachments + ty_already + + + 31006 + 30005 + 0 + + + forums + admin_attachments + ty_deleted + Attachment type deleted. + Тип прикрепляемого файла удален. + 31006 + 30005 + 0 + + + forums + admin_attachments + ty_enterinfo + You must enter at least an extension and mime-type before continuing. + Необходимо ввести хотя бы расширение и MIME-тип, прежде чем продолжить. + 31006 + 30005 + 0 + + + forums + admin_attachments + ty_imported + Attachment Types XML file import completed. + Импортирование типов прикрепляемых файлов выполнено успешно. + 31006 + 30005 + 0 + + + forums + admin_attachments + ty_failed + Upload failed, ipb_attachtypes.xml was either missing or empty. + + 31006 + 30005 + 0 + + + forums + admin_attachments + ty_title + Attachment Types + Типы прикрепляемых файлов + 31006 + 30005 + 0 + + + forums + admin_attachments + st_removed + Attachment(s) Removed! + Прикрепленные файлы удалены! + 31006 + 30005 + 0 + + + forums + admin_attachments + attach_not_topic + Not a topic]]> + Не тема ]]> + 31006 + 30005 + 0 + + + forums + admin_attachments + st_title + Attachment Statistics + Статистика + 31006 + 30005 + 0 + + + forums + admin_attachments + attachments_removed + Attachments Removed + Прикрепленные файлы удалены + 31006 + 30005 + 0 + + + forums + admin_attachments + deleted_attachments + Deleted attachment ids: %s + Удаленные прикрепленные файлы: %s + 31006 + 30005 + 0 + + + forums + admin_attachments + se_ago + ago + дней назад + 31006 + 30005 + 0 + + + forums + admin_attachments + se_times + times + раз + 31006 + 30005 + 0 + + + forums + admin_attachments + se_searchbutton + Search + Искать + 31006 + 30005 + 0 + + + forums + admin_attachments + se_oasc + + + 31006 + 30005 + 0 + + + forums + admin_attachments + se_showresults + Show n ResultsMaximum is 100 regardless of your entry]]> + n результатовНо не более 100 за раз]]> + 31006 + 30005 + 0 + + + forums + admin_attachments + se_odsc + + + 31006 + 30005 + 0 + + + forums + admin_attachments + se_osize + Attach File Size + Размеру файла + 31006 + 30005 + 0 + + + forums + admin_attachments + se_oname + Attach File Name + Имени файла + 31006 + 30005 + 0 + + + forums + admin_attachments + se_oviews + Attach Views + Количеству просмотров + 31006 + 30005 + 0 + + + forums + admin_attachments + se_morder + Order Results By]]> + Сортировать результаты по]]> + 31006 + 30005 + 0 + + + forums + admin_attachments + se_odate + Attach Date + Дате прикрепления + 31006 + 30005 + 0 + + + forums + admin_attachments + se_mimages + Match Only Images?If 'yes', this search will only return image attachments.]]> + Если выбрано «Да», в результатах поиска будут только изображения.]]> + 31006 + 30005 + 0 + + + forums + admin_attachments + se_mauthor + Match Post Author NameLeave blank to omit]]> + Оставьте пустым, чтобы пропустить при поиске]]> + 31006 + 30005 + 0 + + + forums + admin_attachments + se_mname + Match File NameLeave blank to omit]]> + Оставьте пустым, чтобы пропустить при поиске]]> + 31006 + 30005 + 0 + + + forums + admin_attachments + se_mviewed + Match Viewed n TimesLeave blank to omit]]> + Оставьте пустым, чтобы пропустить при поиске]]> + 31006 + 30005 + 0 + + + forums + admin_attachments + se_mposted + Match Posted n DaysLeave blank to omit]]> + Оставьте пустым, чтобы пропустить при поиске]]> + 31006 + 30005 + 0 + + + forums + admin_attachments + se_msize + Match File Size (in kb)Leave blank to omit]]> + Оставьте пустым, чтобы пропустить при поиске]]> + 31006 + 30005 + 0 + + + forums + admin_attachments + se_mext + Match File ExtensionLeave blank to omit]]> + Оставьте пустым, чтобы пропустить при поиске]]> + 31006 + 30005 + 0 + + + forums + admin_attachments + se_lessthan + Less Than + Меньше чем + 31006 + 30005 + 0 + + + forums + admin_attachments + se_morethan + More Than + Больше чем + 31006 + 30005 + 0 + + + forums + admin_attachments + se_search + Search Attachments + Поиск прикрепленных файлов + 31006 + 30005 + 0 + + + forums + admin_attachments + se_delete + Delete Checked Attachments + Удалить выбранные файлы + 31006 + 30005 + 0 + + + forums + admin_attachments + se_results + Attachments: Search Results + Результаты поиска файлов + 31006 + 30005 + 0 + + + forums + admin_attachments + se_posted + Posted + Дата + 31006 + 30005 + 0 + + + forums + admin_attachments + se_topic + Topic + Тема + 31006 + 30005 + 0 + + + forums + admin_attachments + se_author + Author + Автор + 31006 + 30005 + 0 + + + forums + admin_attachments + se_size + Size + Размер + 31006 + 30005 + 0 + + + forums + admin_attachments + se_title + Attachment Manager + Управление прикрепляемыми файлами + 31006 + 30005 + 0 + + + forums + admin_attachments + se_attachment + Attachment + Файл + 31006 + 30005 + 0 + forums admin_attachments noattach_to_remove You did not select any attachments Вы не выбрали ни одного файла - 30009 + 31006 30009 0 forums - admin_forums - t_avupdated - - Аватар пользователя обновлен! - 30005 + admin_attachments + atc_export + Export Attachment Types... + Экспортировать типы файлов + 31006 30005 0 forums - admin_forums - t_noav - We could not determine the avatar you were trying to update with. Please try again. - Не удается найти аватар, который вы хотите обновить. Попробуйте еще раз. - 30005 + admin_attachments + atc_import + Import an Attachment Types List + Импортировать список типов прикрепляемых файлов + 31006 30005 0 forums - admin_forums - t_badavext - You do not accept that file type on this board for avatars. - Данный тип файла не разрешен для аватара. - 30005 + admin_attachments + atc_uploadxml + Upload XML Attachment Types List]]> + Загрузка XML-архива со списком прикрепляемых файлов ]]> + 31006 30005 0 forums - admin_forums - t_noposts - This member has no posts to delete. Please select another member. - У этого пользователя нет сообщений для удаления. Выберите другого пользователя. - 30005 + admin_attachments + atc_uploadxml_info + + + 31006 30005 0 forums - admin_forums - t_uploadfail5 - The upload failed - there was a problem processing the image. Please try again. - Загрузка не удалась - возникли проблемы при обработке изображения. Попробуйте еще раз. - 30005 - 30005 - 0 - - - forums - admin_forums - t_uploadfail4 - The upload failed - there was a problem moving the avatar to the uploads directory. Please verify permissions are set correctly on the uploads folder. - Загрузка не удалась - возникли проблеммы при перемещении аватара в директорию загрузки. Проверьте настройки доступа к директории загрузки. - 30005 - 30005 - 0 - - - forums - admin_forums - t_uploadfail3 - The upload failed - there file was too large. Please try again. - Загрузка не удалась - файл слишком большой. Попробуйте еще раз. - 30005 + admin_attachments + atc_importbutton + Import + Импортировать + 31006 30005 0 @@ -947,7 +877,7 @@ t_uploadfail2 The upload failed - you may only upload an image file. Please try again. Загрузка не удалась - вы можете загружать только изображения. Попробуйте еще раз. - 30005 + 31006 30005 0 @@ -957,7 +887,7 @@ t_uploadfail1 The upload failed - there was no image to upload. Please try again. Загрузка не удалась - нет изображения для загрузки. Попробуйте еще раз. - 30005 + 31006 30005 0 @@ -967,7 +897,7 @@ t_permav У вас недостаточно прав для изменения аватара администратора. - 30005 + 31006 30005 0 @@ -977,17 +907,7 @@ t_noid The member does not exist. Please try again. Пользователь не существует. Попробуйте еще раз. - 30005 - 30005 - 0 - - - forums - admin_forums - mem_posts_process_done - Complete! - Завершено! - 30005 + 31006 30005 0 @@ -997,8 +917,18 @@ mem_posts_process_more %s posts processed (%s posts and %s topics examined)... %s сообщений обработано (проверено сообщений: %s, тем: %s )... - 30005 - 30005 + 31006 + 31006 + 0 + + + forums + admin_forums + mem_posts_next_step + Topics completed, proceeding to posts... + Темы завершены, далее сообщения... + 31006 + 31006 0 @@ -1007,17 +937,27 @@ mem_delete_title_desc This section allows you to remove all posts and or topics started by a member В этом разделе вы сможете удалить все сообщения и все темы пользователя - 30005 + 31006 30005 0 + + forums + admin_forums + mem_posts_process_done + Complete! + Завершено! + 31006 + 31006 + 0 + forums admin_forums mem_delete_process Process... Запуск - 30005 + 31006 30005 0 @@ -1027,17 +967,7 @@ mem_delete_title Delete Member Posts / Topics Удаление сообщений / Тем пользователя - 30005 - 30005 - 0 - - - forums - admin_forums - mem_delete_delete_pergo_desc - Deleting posts and topics is fairly intensive. - Удаление сообщений и тем ресурсоемкая операция, не рекомендуем указывать большое число удаляемых объектов за раз. - 30005 + 31006 30005 0 @@ -1047,47 +977,17 @@ mem_delete_delete_pergo n posts/topics per iteration]]> Удалять по n сообщений/тем за раз - 30005 + 31006 30005 0 forums admin_forums - mem_delete_posts_title - Delete Posts/Topics For: - Удаление сообщений/тем пользователя - 30005 - 30005 - 0 - - - forums - admin_forums - mem_delete_delete_posts - %s POSTS?]]> - Удалить ВСЕ %s СООБЩЕНИЙ этого пользователя? - 30005 - 30005 - 0 - - - forums - admin_forums - mem_delete_delete_posts_desc - If enabled: a topic started by this member that has no replies is deleted otherwise the topic is left. - Позволяет удалить все сообщения пользователя - 30005 - 30005 - 0 - - - forums - admin_forums - mem_delete_delete_topics - %s TOPICS?]]> - Удалить ВСЕ %s ТЕМ этого пользователя? - 30005 + mem_delete_delete_pergo_desc + Deleting posts and topics is fairly intensive. + Удаление сообщений и тем ресурсоемкая операция, не рекомендуем указывать большое число удаляемых объектов за раз. + 31006 30005 0 @@ -1097,77 +997,37 @@ mem_delete_delete_topics_desc Позволяет удалить все темы, открытые этим пользователем. - 30005 + 31006 30005 0 forums admin_forums - m_restrict - Restrict from Posting - Запретить пользователю публиковать сообщения? - 30005 + mem_delete_delete_topics + %s TOPICS?]]> + Удалить ВСЕ %s ТЕМ этого пользователя? + 31006 30005 0 forums admin_forums - m_restrictindef - Restrict Posting Indefinitely - навсегда запретить - 30005 + mem_delete_delete_posts_desc + If enabled: a topic started by this member that has no replies is deleted otherwise the topic is left. + Позволяет удалить все сообщения пользователя + 31006 30005 0 forums admin_forums - m_details - Forum Details - Настройки форума - 30005 - 30005 - 0 - - - forums - admin_forums - m_permrestrict - - Настройки доступа - 30005 - 30005 - 0 - - - forums - admin_forums - mem_remove_avatar - Remove Avatar - Удалить аватар - 30005 - 30005 - 0 - - - forums - admin_forums - mem_posts - Posts - Сообщения - 30005 - 30005 - 0 - - - forums - admin_forums - mem_change_button - Change... - Изменить - 30005 + mem_delete_delete_posts + %s POSTS?]]> + Удалить ВСЕ %s СООБЩЕНИЙ этого пользователя? + 31006 30005 0 @@ -1177,7 +1037,7 @@ mem_delete_posts_trash Use Trash Can? Использовать корзину? - 30005 + 31006 30005 0 @@ -1187,7 +1047,77 @@ mem_delete_posts_trash_desc Members posts and topics will be placed in the trashcan instead of deleted. Сообщения и темы пользователей будут перемещены в специальный форум, откуда при необходимости их можно будет восстановить. - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + mem_delete_posts_title + Delete Posts/Topics For: + Удаление сообщений/тем пользователя + 31006 + 30005 + 0 + + + forums + admin_forums + mem_change_button + Change... + Изменить + 31006 + 30005 + 0 + + + forums + admin_forums + mem_posts + Posts + Сообщения + 31006 + 30005 + 0 + + + forums + admin_forums + mem_remove_avatar + Remove Avatar + Удалить аватар + 31006 + 31006 + 0 + + + forums + admin_forums + m_details + + Настройки форума + 31006 + 30005 + 0 + + + forums + admin_forums + m_permrestrict + + Настройки доступа + 31006 + 30005 + 0 + + + forums + admin_forums + m_restrictindef + Restrict Posting Indefinitely + навсегда запретить + 31006 30005 0 @@ -1197,17 +1127,17 @@ m_orfor Or for]]> или на - 30005 + 31006 30005 0 forums admin_forums - m_modindef - Moderator Preview Indefinitely - всегда проверять - 30005 + m_restrict + Restrict from Posting + Запретить пользователю публиковать сообщения? + 31006 30005 0 @@ -1217,17 +1147,17 @@ m_modprev Moderator Preview of Posts Требуется проверка модератором всех сообщений пользователя? - 30005 + 31006 30005 0 forums admin_forums - m_viewavs - View Avatars - Может видеть аватары? - 30005 + m_modindef + Moderator Preview Indefinitely + всегда проверять + 31006 30005 0 @@ -1237,7 +1167,7 @@ m_viewimgs View Images Может видеть изображения? - 30005 + 31006 30005 0 @@ -1247,7 +1177,17 @@ m_override Override permissions with.... Переопределить права доступа правами - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + m_viewavs + View Avatars + Может видеть аватары? + 31006 30005 0 @@ -1257,7 +1197,7 @@ m_changeav Change Avatar Изменить аватар - 30005 + 31006 30005 0 @@ -1267,7 +1207,7 @@ m_days Days дней - 30005 + 31006 30005 0 @@ -1277,7 +1217,7 @@ m_hours Hours часов - 30005 + 31006 30005 0 @@ -1287,17 +1227,7 @@ m_updateav Update Avatar Обновить аватар - 30005 - 30005 - 0 - - - forums - admin_forums - m_height - Height - Высота - 30005 + 31006 30005 0 @@ -1307,7 +1237,17 @@ m_localav OR Select From Avatar Gallery ИЛИ выбрать из галереи аватаров - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + m_height + Height + Высота + 31006 30005 0 @@ -1317,7 +1257,7 @@ m_h H В - 30005 + 31006 30005 0 @@ -1327,7 +1267,7 @@ m_width Width Ширина - 30005 + 31006 30005 0 @@ -1337,7 +1277,7 @@ m_w W Ш - 30005 + 31006 30005 0 @@ -1347,7 +1287,7 @@ m_avdimen_label Dimensions (in pixels) Разрешение (в пикселях) - 30005 + 31006 30005 0 @@ -1357,7 +1297,7 @@ m_avdimen Please enter the width and height for the uploaded or linked avatar Введите высоту и ширину для загруженного изображения или аватара по ссылке - 30005 + 31006 30005 0 @@ -1367,7 +1307,7 @@ m_avurl_label Avatar URL URL аватара - 30005 + 31006 30005 0 @@ -1377,57 +1317,7 @@ m_avurl OR Change Avatar URL ИЛИ изменить URL аватара - 30005 - 30005 - 0 - - - forums - admin_forums - m_subs_redirect - The member is no longer watching any forums or topics - Пользователь больше не подписан на форумы и темы - 30005 - 30005 - 0 - - - forums - admin_forums - m_subsf_redirect - All members are no longer watching this forum - Все пользователи больше не подписаны на этот форум - 30005 - 30005 - 0 - - - forums - admin_forums - m_selectav - Select Avatar - Выберите аватар - 30005 - 30005 - 0 - - - forums - admin_forums - m_firstfield - - Если вы заполнили больше одного поля, только ПЕРВОЕ корректное значение будет сохранено. Например, если вы ввели URL и выбрали аватар из галереи - URL буде использован для аватара. Если пользователь уже имеет загруженный аватар, он будет удален после отправки этой формы. - 30005 - 30005 - 0 - - - forums - admin_forums - m_selectcat - - - 30005 + 31006 30005 0 @@ -1437,17 +1327,47 @@ m_newav Upload New Avatar Загрузить новый аватар - 30005 + 31006 30005 0 forums admin_forums - m_clearsubs - Un-watch all from forum - Отписать всех от форума - 30005 + m_subs_redirect + The member is no longer watching any forums or topics + Пользователь больше не подписан на форумы и темы + 31006 + 30005 + 0 + + + forums + admin_forums + m_subsf_redirect + All members are no longer watching this forum + Все пользователи больше не подписаны на этот форум + 31006 + 30005 + 0 + + + forums + admin_forums + m_selectav + Select Avatar + Выберите аватар + 31006 + 30005 + 0 + + + forums + admin_forums + m_firstfield + + Если вы заполнили больше одного поля, только ПЕРВОЕ корректное значение будет сохранено. Например, если вы ввели URL и выбрали аватар из галереи - URL буде использован для аватара. Если пользователь уже имеет загруженный аватар, он будет удален после отправки этой формы. + 31006 30005 0 @@ -1457,17 +1377,27 @@ m_delsubs Clear All Watched Topics and Forums... Отписать от всех тем и форумов - 30005 + 31006 30005 0 forums admin_forums - m_nodir - Could not locate that directory. Please try again. - Невозможно найти директорию. Попробуйте еще раз. - 30005 + m_clearsubs + Un-watch all from forum + Отписать всех от форума + 31006 + 30005 + 0 + + + forums + admin_forums + m_selectcat + + + 31006 30005 0 @@ -1477,27 +1407,17 @@ m_nopermban You do not have permission to ban a member. Недостаточно прав чтобы забанить пользователя. - 30005 + 31006 30005 0 forums admin_forums - g_post_closed - - Могут публиковать ответы в «закрытых» темах? - 30005 - 30005 - 0 - - - forums - admin_forums - g_mod_preview - Moderate posts of everyone in this group? - Модерировать сообщения всех пользователей этой группы? - 30005 + m_nodir + Could not locate that directory. Please try again. + Невозможно найти директорию. Попробуйте еще раз. + 31006 30005 0 @@ -1507,58 +1427,108 @@ m_deltitle Удалить все сообщения - 30005 + 31006 30005 0 forums admin_forums - g_avoid_q + gf_post_closed + + Могут публиковать ответы в «закрытых» темах + 31006 + 31005 + 0 + + + forums + admin_forums + gf_mod_preview + Moderate posts of everyone in this group? + Модерировать сообщения всех пользователей этой группы? + 31006 + 31005 + 0 + + + forums + admin_forums + gf_avoid_q Can avoid moderation queues? - Не применять проверку сообщений перед публикацией для пользователей этой группы? - 30005 - 30005 + Может обходить премодерацию? + 31006 + 31005 0 forums admin_forums - g_avoid_flood + gf_avoid_flood Can avoid flood control? - Не применять к пользователям данной группы флуд-контроль? - 30005 - 30005 + Может обходить флуд-контроль? + 31006 + 31005 0 forums admin_forums - g_vote_polls - Can vote in polls (where allowed)? - Могут голосовать (где разрешено)? - 30005 - 30005 - 0 - - - forums - admin_forums - g_post_polls + gf_post_polls Can start new polls (where allowed)? Могут создавать новые опросы (где разрешено)? - 30005 - 30005 + 31006 + 31005 0 forums admin_forums - g_delete_own_posts - Can delete own posts? - Могут удалять свои сообщения? - 30005 - 30005 + gf_vote_polls + Can vote in polls (where allowed)? + Могут голосовать (где разрешено)? + 31006 + 31005 + 0 + + + forums + admin_forums + gf_delete_own_topics + + Может удалять свои темы? + 31006 + 31005 + 0 + + + forums + admin_forums + gf_edit_topic + + Может изменять название и описание своих тем? + 31006 + 31005 + 0 + + + forums + admin_forums + gf_append_edit + + + 31006 + 31005 + 0 + + + forums + admin_forums + gf_delete_own_posts + + Может удалять свои сообщения? + 31006 + 31005 0 @@ -1567,108 +1537,89 @@ g_open_close_posts Can open/close own topics? Могут открывать/закрывать свои темы? - 30005 + 31006 30005 0 forums admin_forums - g_edit_topic - - Могут изменять названия и описания своих тем? - 30005 - 30005 - 0 - - - forums - admin_forums - g_delete_own_topics - Can delete own topics? - Могут удалять свои темы? - 30005 - 30005 - 0 - - - forums - admin_forums - g_edit_cutoff + gf_edit_cutoff Edit time restriction (in minutes)? Могут редактировать сообщения в течение Х минут - 30005 - 30005 + 31006 + 31005 0 forums admin_forums - g_edit_cuttoff_info + gf_edit_cuttoff_info Denies user edit after the time set has passed. Leave blank or enter 0 for no restriction - Запретить пользователю изменять сообщение по истечению заданного времени. Оставьте пустым или введите 0 для отмены ограничения. - 30005 - 30005 + Время, в течение которого можно редактировать сообщение сразу после публикации. +Введите 0 для отключения ограничения + 31006 + 31005 0 forums admin_forums - g_append_edit - - Могут удалять пометку «Отредактировано...» при редактировании сообщения? - 30005 - 30005 - 0 - - - forums - admin_forums - g_edit_posts + gf_edit_posts Can edit own posts? - Могут редактировать свои сообщения? - 30005 - 30005 + Может редактировать свои сообщения? + 31006 + 31005 0 forums admin_forums - g_reply_other_topics + gf_reply_other_topics Can reply to OTHER members topics (where allowed)? Могут публиковать ответы на ЧУЖИЕ темы (где разрешено)? - 30005 - 30005 + 31006 + 31005 0 forums admin_forums - g_topic_rate_setting - Can rate topics (in forums where allowed)? - Могут оценивать темы (где это разрешено)? - 30005 - 30005 - 0 - - - forums - admin_forums - g_reply_own_topics + gf_reply_own_topics Can reply to OWN topics? Могут публиковать ответы в СВОИХ темах? - 30005 - 30005 + 31006 + 31005 0 forums admin_forums - g_post_new_topics + gf_topic_rate_setting + Can rate topics (in forums where allowed)? + Могут оценивать темы (где это разрешено)? + 31006 + 31005 + 0 + + + forums + admin_forums + gf_post_new_topics Can post new topics (where allowed)? Могут создавать новые темы (где разрешено)? - 30005 - 30005 + 31006 + 31005 + 0 + + + forums + admin_forums + gf_other_topics + Can view other members topics? + Могут просматривать темы, созданные другими пользователями? + 31006 + 31005 0 @@ -1677,17 +1628,7 @@ g_forperm Forum Настройки форума - 30005 - 30005 - 0 - - - forums - admin_forums - g_other_topics - Can view other members topics? - Могут просматривать темы, созданные другими пользователями? - 30005 + 31006 30005 0 @@ -1697,17 +1638,7 @@ g_yes2 Yes (Allowed to change vote) Да (с правом изменения голоса) - 30005 - 30005 - 0 - - - forums - admin_forums - g_yes1 - Yes (Not allowed to change vote) - Да (без права изменения голоса) - 30005 + 31006 30005 0 @@ -1717,7 +1648,17 @@ g_no No Нет - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + g_yes1 + Yes (Not allowed to change vote) + Да (без права изменения голоса) + 31006 30005 0 @@ -1727,7 +1668,7 @@ g_applyguest (Does not apply to guests)]]> (Не применительно к гостям ]]> - 30005 + 31006 30005 0 @@ -1737,17 +1678,7 @@ per_baseon Base this permission set on which existing set...]]> Наследовать права от:]]> - 30005 - 30005 - 0 - - - forums - admin_forums - per_createbutton - Create - Создать - 30005 + 31006 30005 0 @@ -1757,7 +1688,17 @@ per_createnew Create a new permission set Создание новой маски доступа - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + per_createbutton + Create + Создать + 31006 30005 0 @@ -1767,17 +1708,7 @@ per_previewtext See what this group can see... Просмотр того что может видеть группа - 30005 - 30005 - 0 - - - forums - admin_forums - per_previewset - Preview Permission Set... - Предпросмотр - 30005 + 31006 30005 0 @@ -1787,7 +1718,17 @@ per_editset Edit Permission Set... Изменить - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + per_previewset + Preview Permission Set... + Предпросмотр + 31006 30005 0 @@ -1797,7 +1738,7 @@ per_deleteset Delete Permission Set... Удалить - 30005 + 31006 30005 0 @@ -1807,17 +1748,7 @@ per_inuse In Use (Cannot Delete)]]> Используется (нельзя удалить)]]> - 30005 - 30005 - 0 - - - forums - admin_forums - per_options - Options - Действия - 30005 + 31006 30005 0 @@ -1827,17 +1758,17 @@ per_view View Просмотр - 30005 + 31006 30005 0 forums admin_forums - per_viewnames - View the member names of those using this permission set in a new window - Отображает пользователей, использующих эту маску доступа (в отдельном окне) - 30005 + per_options + Options + Действия + 31006 30005 0 @@ -1847,7 +1778,17 @@ per_user User Пользователь - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + per_viewnames + View the member names of those using this permission set in a new window + Отображает пользователей, использующих эту маску доступа (в отдельном окне) + 31006 30005 0 @@ -1857,17 +1798,7 @@ per_usedmembers Used by Member(s) Используется пользователями - 30005 - 30005 - 0 - - - forums - admin_forums - per_usedgroups - Used by Group(s) - Используется группами - 30005 + 31006 30005 0 @@ -1877,7 +1808,17 @@ per_name Name Название маски - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + per_usedgroups + Used by Group(s) + Используется группами + 31006 30005 0 @@ -1887,17 +1828,7 @@ per_nomember Not used as override on any accounts...]]> Маска не используется]]> - 30005 - 30005 - 0 - - - forums - admin_forums - per_upload_c - Upload - Загрузка файлов - 30005 + 31006 30005 0 @@ -1907,37 +1838,17 @@ per_download_c Download Скачивание файлов - 30005 + 31006 30005 0 forums admin_forums - per_show_c - Show - Просмотр тем - 30005 - 30005 - 0 - - - forums - admin_forums - per_read_c - Read - Чтение тем - 30005 - 30005 - 0 - - - forums - admin_forums - per_reply_c - Reply - Ответ в темы - 30005 + per_upload_c + Upload + Загрузка файлов + 31006 30005 0 @@ -1947,7 +1858,37 @@ per_start_c Start Создание тем - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + per_reply_c + Reply + Ответ в темы + 31006 + 30005 + 0 + + + forums + admin_forums + per_show_c + Show + Просмотр тем + 31006 + 30005 + 0 + + + forums + admin_forums + per_read_c + Read + Чтение тем + 31006 30005 0 @@ -1957,17 +1898,7 @@ per_forumname Forum Name Название форума - 30005 - 30005 - 0 - - - forums - admin_forums - per_editbutton - Edit Name - Изменить имя - 30005 + 31006 30005 0 @@ -1977,7 +1908,17 @@ per_setname Permission Set Name]]> Название - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + per_editbutton + Edit Name + Изменить имя + 31006 30005 0 @@ -1987,17 +1928,7 @@ per_rename Rename Permission Set: Переименовать маску доступа: - 30005 - 30005 - 0 - - - forums - admin_forums - per_updatebutton - Update - Обновить - 30005 + 31006 30005 0 @@ -2007,27 +1938,17 @@ per_testwith Test with... Проверить с - 30005 + 31006 30005 0 forums admin_forums - per_category - - Категория (эта маска не используется) - 30005 - 30005 - 0 - - - forums - admin_forums - per_cannot - CANNOT: - НЕ МОЖЕТ: - 30005 + per_updatebutton + Update + Обновить + 31006 30005 0 @@ -2037,7 +1958,27 @@ per_can Can: Может: - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + per_cannot + CANNOT: + НЕ МОЖЕТ: + 31006 + 30005 + 0 + + + forums + admin_forums + per_category + + Категория (эта маска не используется) + 31006 30005 0 @@ -2047,7 +1988,7 @@ per_preview Preview Предпросмотр - 30005 + 31006 30005 0 @@ -2057,7 +1998,7 @@ per_legend Легенда - 30005 + 31006 30005 0 @@ -2067,7 +2008,7 @@ per_removeall Remove all custom permission sets Удалить все пользовательские маски доступа]]> - 30005 + 31006 30005 0 @@ -2077,7 +2018,7 @@ per_alsousing Also Using: Также используются: - 30005 + 31006 30005 0 @@ -2087,7 +2028,7 @@ per_removethis Remove this permission set from the user (will not remove all if they use more than one) Убрать эту маску доступа]]> - 30005 + 31006 30005 0 @@ -2097,17 +2038,7 @@ per_email Email: E-mail: - 30005 - 30005 - 0 - - - forums - admin_forums - per_action - Action - Опции - 30005 + 31006 30005 0 @@ -2117,7 +2048,17 @@ per_posts Posts: Сообщений: - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + per_action + Action + Опции + 31006 30005 0 @@ -2127,7 +2068,7 @@ per_userdetail User Details Данные пользователя - 30005 + 31006 30005 0 @@ -2137,17 +2078,7 @@ per_membersusing Members using: Пользователи, использующие: - 30005 - 30005 - 0 - - - forums - admin_forums - per_removecustom - Removed the custom set of permissions from: - Маска доступа удалена для: - 30005 + 31006 30005 0 @@ -2157,7 +2088,17 @@ per_result Result Результат - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + per_removecustom + Removed the custom set of permissions from: + Маска доступа удалена для: + 31006 30005 0 @@ -2167,27 +2108,7 @@ per_none Set not assigned to any group...]]> Маска не используется]]> - 30005 - 30005 - 0 - - - forums - admin_forums - per_title - Forum Permission Set Management - Управление правами доступа - 30005 - 30005 - 0 - - - forums - admin_forums - per_global - Global - Глобально - 30005 + 31006 30005 0 @@ -2197,17 +2118,27 @@ per_notused Not Used Не используется - 30005 + 31006 30005 0 forums admin_forums - per_addedit - Manage Permissions - Управление масками доступа - 30005 + per_title + Forum Permission Set Management + Управление правами доступа + 31006 + 30005 + 0 + + + forums + admin_forums + per_global + Global + Глобально + 31006 30005 0 @@ -2217,17 +2148,17 @@ per_title_edit_msg Add/Edit Permissions Добавить/Изменить маску доступа - 30005 + 31006 30005 0 forums admin_forums - per_title_edit - Editing Forum Permission Sets - Изменение масок доступа - 30005 + per_addedit + Manage Permissions + Управление масками доступа + 31006 30005 0 @@ -2237,17 +2168,17 @@ per_added - 30005 + 31006 30005 0 forums admin_forums - per_entername - You must enter a name. Please try again. - Вы должны ввести название. Попробуйте еще раз. - 30005 + per_title_edit + Editing Forum Permission Sets + Изменение масок доступа + 31006 30005 0 @@ -2257,7 +2188,17 @@ per_removed Forum Access Permission Set Removed! Маска доступа удалена - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + per_entername + You must enter a name. Please try again. + Вы должны ввести название. Попробуйте еще раз. + 31006 30005 0 @@ -2267,17 +2208,17 @@ per_updated Forum Access Permissions Updated! Маски доступа форума обновлены - 30005 + 31006 30005 0 forums admin_forums - per_upload_m - Upload To Forum - Загрузку файлов - 30005 + per_editedlog + + Права доступа на форум отредактированы для маски: %s + 31006 30005 0 @@ -2287,7 +2228,7 @@ per_download_m Download From Forum Скачивание файлов - 30005 + 31006 30005 0 @@ -2297,17 +2238,7 @@ per_groupid Could not resolve that group ID. Please try again. Нельзя изменить ID группы. Попробуйте еще раз. - 30005 - 30005 - 0 - - - forums - admin_forums - per_editedlog - Forum Access Permissions Edited For Set: %s - Права доступа на форум отредактированы для маски: %s - 30005 + 31006 30005 0 @@ -2317,37 +2248,17 @@ per_show_m See Forum Просмотр форума - 30005 + 31006 30005 0 forums admin_forums - per_reply - Reply to Topics in this forum]]> - Публикация ответов в этом форуме]]> - 30005 - 30005 - 0 - - - forums - admin_forums - per_read_m - Read Topics - Чтение тем - 30005 - 30005 - 0 - - - forums - admin_forums - per_reply_m - Reply To Topics - Ответ в темы - 30005 + per_upload_m + Upload To Forum + Загрузку файлов + 31006 30005 0 @@ -2357,17 +2268,27 @@ per_start_m Start Topics Создание тем - 30005 + 31006 30005 0 forums admin_forums - per_download - Download Attachments in this forum]]> - Скачивание файлов в этом форуме]]> - 30005 + per_reply_m + Reply To Topics + Ответ в темы + 31006 + 30005 + 0 + + + forums + admin_forums + per_read_m + Read Topics + Чтение тем + 31006 30005 0 @@ -2377,17 +2298,7 @@ per_read Read Topics in this forum]]> Чтение тем в этом форуме]]> - 30005 - 30005 - 0 - - - forums - admin_forums - per_show - See this forum]]> - Просмотр этого форума]]> - 30005 + 31006 30005 0 @@ -2397,67 +2308,37 @@ per_upload Upload Attachments to this forum]]> Загрузка файлов в этом форуме]]> - 30005 + 31006 30005 0 forums admin_forums - mod_add - Add a Moderator - Добавление модератора - 30005 + per_download + Download Attachments in this forum]]> + Скачивание файлов в этом форуме]]> + 31006 30005 0 forums admin_forums - mod_edit - Editing a Moderator - Редактирование модератора - 30005 + per_show + See this forum]]> + Просмотр этого форума]]> + 31006 30005 0 forums admin_forums - mod_edithis - Edit This Moderator - Редактировать модератора - 30005 - 30005 - 0 - - - forums - admin_forums - mod_mid - We could not retrieve that moderator record. Please try again. - Модератор не существует в системе. - 30005 - 30005 - 0 - - - forums - admin_forums - mod_noresults - Sorry, we could not find any members that matched the search you entered. Please try again. - Невозможно найти пользователей по вашему запросу. Попробуйте еще раз. - 30005 - 30005 - 0 - - - forums - admin_forums - per_start - Start Topics in this forum]]> - Создание тем в этом форуме]]> - 30005 + per_reply + Reply to Topics in this forum]]> + Публикация ответов в этом форуме]]> + 31006 30005 0 @@ -2467,17 +2348,17 @@ per_also Also using: Также используются: - 30005 + 31006 30005 0 forums admin_forums - per_setid - Could not resolve the permission set ID. Please try again. - Нельзя произвести изменения в масках доступа этому ID. Попробуйте еще раз. - 30005 + per_start + Start Topics in this forum]]> + Создание тем в этом форуме]]> + 31006 30005 0 @@ -2487,7 +2368,17 @@ per_memid Could not resolve the member ID. Please try again. Нельзя изменить ID пользователя. Попробуйте еще раз. - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + per_setid + Could not resolve the permission set ID. Please try again. + Нельзя произвести изменения в масках доступа этому ID. Попробуйте еще раз. + 31006 30005 0 @@ -2497,17 +2388,57 @@ mod_add_info Please select the correct member name from the selection below to add a moderator to the previously selected forum(s). Пожалуйста, выберите пользователя для модерирования выбранных форумов. - 30005 + 31006 30005 0 forums admin_forums - mod_addgroup - Add a Moderator Group - Добавление группы модераторов - 30005 + mod_noresults + Sorry, we could not find any members that matched the search you entered. Please try again. + Невозможно найти пользователей по вашему запросу. Попробуйте еще раз. + 31006 + 30005 + 0 + + + forums + admin_forums + mod_mid + We could not retrieve that moderator record. Please try again. + Модератор не существует в системе. + 31006 + 30005 + 0 + + + forums + admin_forums + mod_add + Add a Moderator + Добавление модератора + 31006 + 30005 + 0 + + + forums + admin_forums + mod_edit + Editing a Moderator + Редактирование модератора + 31006 + 30005 + 0 + + + forums + admin_forums + mod_edithis + Edit This Moderator + Редактировать модератора + 31006 30005 0 @@ -2517,47 +2448,17 @@ mod_addthis Add This Moderator Добавить модератора - 30005 + 31006 30005 0 forums admin_forums - mod_addedgroup - - - 30005 - 30005 - 0 - - - forums - admin_forums - mod_addedmem - - - 30005 - 30005 - 0 - - - forums - admin_forums - mod_nonewfor - You did not select any forums that do not have this group or member already moderating. - Вы не выбрали ни одного форума для которых хотите добавить модераторов. - 30005 - 30005 - 0 - - - forums - admin_forums - mod_added - Moderator(s) added. - Модераторы добавлены - 30005 + mod_addgroup + Add a Moderator Group + Добавление группы модераторов + 31006 30005 0 @@ -2567,17 +2468,47 @@ mod_nogroup We could not find that group to add as a moderator. Please try again. Невозможно найти группу, пользователей которой вы хотите сделать модераторами. - 30005 + 31006 30005 0 forums admin_forums - mod_nomember - You did not choose a member to add as a moderator. Please try again. - Невозможно найти пользователя, которого вы хотите сделать модератором. - 30005 + mod_added + Moderator(s) added. + Модераторы добавлены + 31006 + 30005 + 0 + + + forums + admin_forums + mod_nonewfor + You did not select any forums that do not have this group or member already moderating. + Вы не выбрали ни одного форума для которых хотите добавить модераторов. + 31006 + 30005 + 0 + + + forums + admin_forums + mod_addedgroup + + + 31006 + 30005 + 0 + + + forums + admin_forums + mod_addedmem + + + 31006 30005 0 @@ -2587,7 +2518,17 @@ mod_memid We could not match that member name or ID. Please try again. Невозможно найти пользователя с таким ID. - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + mod_nomember + You did not choose a member to add as a moderator. Please try again. + Невозможно найти пользователя, которого вы хотите сделать модератором. + 31006 30005 0 @@ -2597,17 +2538,7 @@ mod_gid We could not match that group ID. Please try again. Невозможно найти группу с таким ID. - 30005 - 30005 - 0 - - - forums - admin_forums - mod_noforums - You did not choose any forums to add this moderator to. Please try again. - Вы не выбрали форум, которому вы хотите добавить модератора. - 30005 + 31006 30005 0 @@ -2617,17 +2548,17 @@ mod_group Group: Группа: - 30005 + 31006 30005 0 forums admin_forums - mod_editedlog - Edited Moderator: %s - Изменен модератор: %s - 30005 + mod_noforums + You did not choose any forums to add this moderator to. Please try again. + Вы не выбрали форум, которому вы хотите добавить модератора. + 31006 30005 0 @@ -2637,17 +2568,7 @@ mod_edited Moderator(s) edited. Модератор изменен. - 30005 - 30005 - 0 - - - forums - admin_forums - mod_removed - Moderator(s) removed. - Модератор удален. - 30005 + 31006 30005 0 @@ -2657,27 +2578,27 @@ mod_removedlog - 30005 + 31006 30005 0 forums admin_forums - mod_valid - You did not choose a valid moderator ID. Please try again. - Вы не выбрали корректный ID модератора. - 30005 + mod_removed + Moderator(s) removed. + Модератор удален. + 31006 30005 0 forums admin_forums - mm_remove - Remove - Удалить - 30005 + mod_editedlog + + Изменен модератор: %s + 31006 30005 0 @@ -2687,27 +2608,27 @@ mm_current Current Topic Multi-Moderation Текущие мульти-модерации тем - 30005 + 31006 + 31006 + 0 + + + forums + admin_forums + mod_valid + You did not choose a valid moderator ID. Please try again. + Вы не выбрали корректный ID модератора. + 31006 30005 0 forums admin_forums - mm_wordedit - Edit - Изменить - 30005 - 30005 - 0 - - - forums - admin_forums - mm_none - No current Multi-Moderation entries found. - В настоящее время нет мульти-модераций - 30005 + mm_remove + Remove + Удалить + 31006 30005 0 @@ -2717,17 +2638,27 @@ mm_wordtitle Title Название - 30005 + 31006 30005 0 forums admin_forums - mm_postcount - - Увеличивать счетчик сообщений после добавления сообщения? - 30005 + mm_none + No current Multi-Moderation entries found. + В настоящее время нет мульти-модераций + 31006 + 30005 + 0 + + + forums + admin_forums + mm_wordedit + Edit + Изменить + 31006 30005 0 @@ -2737,7 +2668,17 @@ mm_addreply_desc HTML enabled Вы можете использовать HTML-коды в этом сообщении. - 30005 + 31006 + 31006 + 0 + + + forums + admin_forums + mm_postcount + + Увеличивать счетчик сообщений после добавления сообщения? + 31006 30005 0 @@ -2747,18 +2688,8 @@ mm_addreply Add a reply to the topic? Добавить сообщение в эту тему? - 30005 - 30005 - 0 - - - forums - admin_forums - mm_link - Leave a link to the source topic? - Оставить ссылку на исходную тему? - 30005 - 30005 + 31006 + 31006 0 @@ -2767,17 +2698,7 @@ mm_postoptions Post Options Опции сообщения - 30005 - 30005 - 0 - - - forums - admin_forums - mm_approved - Alter approved state? - Изменить видимость темы? - 30005 + 31006 30005 0 @@ -2787,27 +2708,37 @@ mm_move Move topic? Переместить тему? - 30005 + 31006 30005 0 + + forums + admin_forums + mm_link + Leave a link to the source topic? + Оставить ссылку на исходную тему? + 31006 + 31006 + 0 + + + forums + admin_forums + mm_approved + Alter approved state? + Изменить видимость темы? + 31006 + 31006 + 0 + forums admin_forums mm_pinned Alter pinned state? Изменить фиксацию темы? - 30005 - 30005 - 0 - - - forums - admin_forums - mm_state - Alter topic state? - Изменить состояние темы? - 30005 + 31006 30005 0 @@ -2817,27 +2748,17 @@ mm_end END of topic title?]]> КОНЕЦ названия темы:]]> - 30005 - 30005 + 31006 + 31006 0 forums admin_forums - mm_start - START of topic title?]]> - НАЧАЛО названия темы:]]> - 30005 - 30005 - 0 - - - forums - admin_forums - mm_activein_desc - You may choose more than one. - Можете выбрать несколько форумов - 30005 + mm_state + Alter topic state? + Изменить состояние темы? + 31006 30005 0 @@ -2847,7 +2768,37 @@ mm_modoptions Moderation Options Действия (модерации) - 30005 + 31006 + 31006 + 0 + + + forums + admin_forums + mm_start + START of topic title?]]> + НАЧАЛО названия темы:]]> + 31006 + 30005 + 0 + + + forums + admin_forums + mm_activein_desc + You may choose more than one. + Можете выбрать несколько форумов + 31006 + 31006 + 0 + + + forums + admin_forums + mm_titlefor + Title for this Multi-Moderation Suite? + Название мульти-модерации + 31006 30005 0 @@ -2857,28 +2808,8 @@ mm_activein Active in Forums... Действует в форумах - 30005 - 30005 - 0 - - - forums - admin_forums - mm_titlefor - Title for this Multi-Moderation Suite? - Название мульти-модерации - 30005 - 30005 - 0 - - - forums - admin_forums - mm_nobodymovenobodygethurt - - Не перемещать - 30005 - 30005 + 31006 + 31006 0 @@ -2887,17 +2818,17 @@ mm_allforums -- ALL FORUMS -- -- ВСЕ ФОРУМЫ -- - 30005 - 30005 + 31006 + 31006 0 forums admin_forums - mm_unapprove - Unapprove (Set Invisible) - Сделать невидимым - 30005 + mm_nobodymovenobodygethurt + + Не перемещать + 31006 30005 0 @@ -2907,27 +2838,17 @@ mm_approve Approve (Set Visible) Сделать видимым - 30005 - 30005 + 31006 + 31006 0 forums admin_forums - mm_open - Open - Открыть - 30005 - 30005 - 0 - - - forums - admin_forums - mm_unpin - Unpin - Открепить - 30005 + mm_unapprove + Unapprove (Set Invisible) + Сделать невидимым + 31006 30005 0 @@ -2937,7 +2858,27 @@ mm_pin Pin Закрепить - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + mm_unpin + Unpin + Открепить + 31006 + 30005 + 0 + + + forums + admin_forums + mm_open + Open + Открыть + 31006 30005 0 @@ -2947,27 +2888,37 @@ mm_close Close Закрыть - 30005 - 30005 + 31006 + 31006 0 forums admin_forums - mm_valid - You must enter a valid ID. Please try again. - Вы должны ввести корректный ID. Попробуйте еще раз. - 30005 - 30005 + mm_leave + Leave + Не трогать + 31006 + 31006 0 forums admin_forums - mm_update - Update topic multi-moderation entires %s - Добавлена мульти-модерация %s - 30005 + mm_edit + Edit Multi-Moderation + Изменить мульти-модерацию тем + 31006 + 31006 + 0 + + + forums + admin_forums + mm_noinfo + Could not retrieve the information %s + Не удалось получить информацию %s + 31006 30005 0 @@ -2977,7 +2928,7 @@ mm_title Topic Multi-Moderation Мульти-модерация тем - 30005 + 31006 30005 0 @@ -2987,37 +2938,27 @@ mm_addnew Add New Multi-Moderation Добавить мульти-модерацию тем - 30005 + 31006 + 31006 + 0 + + + forums + admin_forums + mm_update + Update topic multi-moderation entires %s + Добавлена мульти-модерация %s + 31006 30005 0 forums admin_forums - mm_edit - Edit Multi-Moderation - Изменить мульти-модерацию тем - 30005 - 30005 - 0 - - - forums - admin_forums - mm_noinfo - Could not retrieve the information %s - Не удалось получить информацию %s - 30005 - 30005 - 0 - - - forums - admin_forums - mm_leave - Leave - Не трогать - 30005 + mm_valid + You must enter a valid ID. Please try again. + Вы должны ввести корректный ID. Попробуйте еще раз. + 31006 30005 0 @@ -3027,17 +2968,7 @@ mm_wrong Выбран неверный форум для переноса тем. Пожалуйста, помните, что вы не можете переносить темы в категории. - 30005 - 30005 - 0 - - - forums - admin_forums - mm_removed - Topic Multi-Mod removed. - Мульти-модерация тем удалена - 30005 + 31006 30005 0 @@ -3047,7 +2978,7 @@ mm_valtitle You must enter a valid title. Please try again. Вы должны ввести корректный заголовок. Попробуйте еще раз. - 30005 + 31006 30005 0 @@ -3057,38 +2988,8 @@ mm_forums You must select some forums to activate with this multi-moderation entry. Please try again. Вы должны выбрать хотя бы один форум, чтобы использовать эту мульти-модерацию. - 30005 - 30005 - 0 - - - forums - admin_forums - frm_m_mm_info - Important Information - Важная информация - 30005 - 30005 - 0 - - - forums - admin_forums - frm_canviewothers - - Разрешить авторам просматривать темы других пользователей - 30005 - 30005 - 0 - - - forums - admin_forums - frm_mod_forums - Select Forums]]> - Выберите форумы - 30005 - 30005 + 31006 + 31006 0 @@ -3097,7 +2998,7 @@ mm_nav Topic Multi-Moderation Home Мульти-модерация тем - 30005 + 31006 30005 0 @@ -3107,117 +3008,37 @@ mm_noid We could not resolve the Multi-Mod ID. Please try again. Нельзя изменить ID мульти-модерации. Попробуйте еще раз. - 30005 + 31006 30005 0 forums admin_forums - frm_m_opentime - Can set topic open time?]]> - Может устанавливать время открытия темы? - 30005 + mm_removed + Topic Multi-Mod removed. + Мульти-модерация тем удалена + 31006 30005 0 forums admin_forums - frm_m_closetime - Can set topic close time?]]> - Может устанавливать время закрытия темы? - 30005 + frm_mod_forums + Select Forums]]> + Выберите форумы + 31006 30005 0 forums admin_forums - frm_m_msettings - Moderator Control Panel Settings - Настройки модераторской панели управления - 30005 - 30005 - 0 - - - forums - admin_forums - frm_m_massmove - Can mass move topics?]]> - Может перемещать сразу несколько тем? - 30005 - 30005 - 0 - - - forums - admin_forums - frm_m_massprune - Can mass prune topics?]]> - Может удалять сразу несколько тем? - 30005 - 30005 - 0 - - - forums - admin_forums - frm_m_visible - Can set topics as visible and invisible?]]> - Может переключать «видимость» тем? - 30005 - 30005 - 0 - - - forums - admin_forums - frm_m_visiblepost - Can set posts as visible and invisible?]]> - Может переключать «видимость» сообщений? - 30005 - 30005 - 0 - - - forums - admin_forums - frm_m_spam - Can flag a member as a spammer? - Может помечать пользователя как спамера? - 30005 - 30005 - 0 - - - forums - admin_forums - frm_m_asettings - Advanced Settings - Дополнительные настройки - 30005 - 30005 - 0 - - - forums - admin_forums - frm_m_warn - Can warn other users?]]> - Может предупреждать других пользователей? - 30005 - 30005 - 0 - - - forums - admin_forums - frm_m_warn_info - Note, if you enable this moderators will have warn permissions on any users, regardless of forum. - При включении этой опции модератор сможет предупреждать любого пользователя на всех форумах - 30005 + frm_canviewothers + + Разрешить авторам просматривать темы других пользователей + 31006 30005 0 @@ -3227,7 +3048,127 @@ frm_m_mm Can use topic multi-moderation?]]> Может использовать мультимодерацию? - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + frm_m_mm_info + Important Information + Важная информация + 31006 + 30005 + 0 + + + forums + admin_forums + frm_m_warn_info + Note, if you enable this moderators will have warn permissions on any users, regardless of forum. + При включении этой опции модератор сможет предупреждать любого пользователя на всех форумах + 31006 + 30005 + 0 + + + forums + admin_forums + frm_m_spam + Can flag a member as a spammer? + Может помечать пользователя как спамера? + 31006 + 30005 + 0 + + + forums + admin_forums + frm_m_asettings + Advanced Settings + Дополнительные настройки + 31006 + 30005 + 0 + + + forums + admin_forums + frm_m_warn + Can warn other users?]]> + Может предупреждать других пользователей? + 31006 + 30005 + 0 + + + forums + admin_forums + frm_m_visiblepost + Can set posts as visible and invisible?]]> + Может переключать «видимость» сообщений? + 31006 + 30005 + 0 + + + forums + admin_forums + frm_m_massprune + Can mass prune topics?]]> + Может удалять сразу несколько тем? + 31006 + 30005 + 0 + + + forums + admin_forums + frm_m_visible + Can set topics as visible and invisible?]]> + Может переключать «видимость» тем? + 31006 + 30005 + 0 + + + forums + admin_forums + frm_m_massmove + Can mass move topics?]]> + Может перемещать сразу несколько тем? + 31006 + 30005 + 0 + + + forums + admin_forums + frm_m_msettings + Moderator Control Panel Settings + Настройки модераторской панели управления + 31006 + 30005 + 0 + + + forums + admin_forums + frm_m_closetime + Can set topic close time?]]> + Может устанавливать время закрытия темы? + 31006 + 30005 + 0 + + + forums + admin_forums + frm_m_opentime + Can set topic open time?]]> + Может устанавливать время открытия темы? + 31006 30005 0 @@ -3237,7 +3178,7 @@ frm_m_move Can move topics?]]> Может перемещать темы? - 30005 + 31006 30005 0 @@ -3247,7 +3188,7 @@ frm_m_pin Can pin topics?]]> Может закреплять темы? - 30005 + 31006 30005 0 @@ -3257,7 +3198,7 @@ frm_m_unpin Can unpin topics?]]> Может опускать темы? - 30005 + 31006 30005 0 @@ -3267,7 +3208,7 @@ frm_m_split Can split / merge topics?]]> Может соединять/разъединять темы? - 30005 + 31006 30005 0 @@ -3277,7 +3218,7 @@ frm_m_close Can close open topics?]]> Может закрывать темы? - 30005 + 31006 30005 0 @@ -3287,7 +3228,7 @@ frm_m_open Can open locked topics?]]> Может открывать закрытые темы? - 30005 + 31006 0 @@ -3297,7 +3238,7 @@ frm_m_ip Can view posters IP addresses?]]> Может видеть IP-адреса пользователей? - 30005 + 31006 30005 0 @@ -3307,27 +3248,7 @@ frm_m_deletetop Can delete others topics/polls?]]> Может удалять темы/опросы? - 30005 - 30005 - 0 - - - forums - admin_forums - frm_m_edit - Can edit others posts/polls?]]> - Может редактировать сообщения/опросы? - 30005 - 30005 - 0 - - - forums - admin_forums - frm_m_topic - Can edit others topic titles?]]> - Может изменять название тем? - 30005 + 31006 30005 0 @@ -3337,17 +3258,17 @@ frm_m_delete Can delete others posts?]]> Может удалять сообщения? - 30005 + 31006 30005 0 forums admin_forums - frm_m_genset - General Settings - Основные настройки - 30005 + frm_m_topic + Can edit others topic titles?]]> + Может изменять название тем? + 31006 30005 0 @@ -3357,7 +3278,27 @@ frm_m_choosebutton Choose Member ОК - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + frm_m_genset + General Settings + Основные настройки + 31006 + 30005 + 0 + + + forums + admin_forums + frm_m_edit + Can edit others posts/polls?]]> + Может редактировать сообщения/опросы? + 31006 30005 0 @@ -3367,7 +3308,7 @@ frm_m_choose Choose from the matches...]]> Выберите пользователя - 30005 + 31006 30005 0 @@ -3377,7 +3318,7 @@ frm_m_search Search for a member Поиск пользователя - 30005 + 31006 0 @@ -3387,7 +3328,7 @@ frm_f_sort_order Default sort order]]> Порядок сортировки по умолчанию - 30005 + 31006 30005 0 @@ -3397,27 +3338,7 @@ frm_f_sort_filter Default sort filter]]> Фильтр сортировки по умолчанию - 30005 - - 0 - - - forums - admin_forums - frm_f_sort_key - Default sort key]]> - По умолчанию сортировать по - 30005 - - 0 - - - forums - admin_forums - frm_f_sort_cutoff - Default date cut off for topic display]]> - По умолчанию выводить темы за - 30005 + 31006 0 @@ -3427,27 +3348,47 @@ frm_f_sort_title Postable Forum Settings: Sorting and Ordering]]> Настройки сортировки - 30005 + 31006 30005 0 + + forums + admin_forums + frm_f_sort_cutoff + Default date cut off for topic display]]> + По умолчанию выводить темы за + 31006 + + 0 + + + forums + admin_forums + frm_f_sort_key + Default sort key]]> + По умолчанию сортировать по + 31006 + + 0 + + + forums + admin_forums + frm_f_mod_exempt + Exempt Groups]]> + Освобожденные группы + 31006 + + 0 + forums admin_forums frm_f_mod_exempt_info If you require a password to access this forum, you can select groups who will not need to enter the password in. Если у вас включен ввод пароля, то вы можете выбрать группы, которые смогут просматривать этот форум без ввода пароля. - 30005 - - 0 - - - forums - admin_forums - frm_f_mod_pass - Forum Password]]> - Пароль форума - 30005 + 31006 0 @@ -3457,57 +3398,37 @@ frm_f_mod_pass_info Leave this box empty if you do not wish to require this. Вы можете оставить поле пустым, чтобы не использовать пароль вообще.]]> - 30005 + 31006 30005 0 forums admin_forums - frm_f_mod_exempt - Exempt Groups]]> - Освобожденные группы - 30005 + frm_f_mod_pass + Forum Password]]> + Пароль форума + 31006 0 + + forums + admin_forums + frm_f_mod_email + Email addresses to send new topic and new reply awaiting approval notification]]> + Укажите e-mail адреса, куда будут отправляться уведомления при появлении новых тем + 31006 + 30005 + 0 + forums admin_forums frm_f_mod_email_info This can be left blank. You can enter multiple ones by seperating them with a comma. Адреса разделяйте запятой.]]> - 30005 - 30005 - 0 - - - forums - admin_forums - frm_f_mod_title - Postable Forum Settings: Moderation]]> - Настройки модерации - 30005 - 30005 - 0 - - - forums - admin_forums - frm_f_min_posts_post_info - This is the minium number of posts a user must have before they can post in this forum. - Минимальное количество сообщений необходимое пользователю для возможности писать в этом форуме. - 30005 - 30005 - 0 - - - forums - admin_forums - frm_f_mod_email - Email addresses to send new topic and new reply awaiting approval notification]]> - Укажите e-mail адреса, куда будут отправляться уведомления при появлении новых тем? - 30005 + 31006 30005 0 @@ -3517,7 +3438,7 @@ frm_f_mod_en_info Requires a moderator to manually add posts/topics to the forum. При включении опции каждое публикуемое сообщение должно будет пройти проверку модератором перед непосредственной публикацией на форум. - 30005 + 31006 30005 0 @@ -3527,17 +3448,17 @@ frm_f_mod_en Enable Posting Moderation]]> Премодерация сообщений форума перед публикацией? - 30005 + 31006 30005 0 forums admin_forums - frm_f_min_posts_view - Minimum posts to view - Минимальное количество сообщений для просмотра этого форума - 30005 + frm_f_mod_title + Postable Forum Settings: Moderation]]> + Настройки модерации + 31006 30005 0 @@ -3547,7 +3468,17 @@ frm_f_min_posts_view_info This is the minium number of posts a user must have before they can view the forum and any posts in it. Минимальное количество сообщений необходимое пользователю для возможности просматривать и писать в этом форуме. - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + frm_f_min_posts_view + Minimum posts to view + Минимальное количество сообщений для просмотра этого форума + 31006 30005 0 @@ -3557,7 +3488,17 @@ frm_f_min_posts_post Minimum posts to post Минимальное количество сообщений для публикации в этом форуме - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + frm_f_min_posts_post_info + This is the minium number of posts a user must have before they can post in this forum. + Минимальное количество сообщений необходимое пользователю для возможности писать в этом форуме. + 31006 30005 0 @@ -3567,17 +3508,7 @@ frm_f_post_inc_info Отключение данной опции, позволит не учитывать оставленные в данном разделе сообщения в общем счетчике сообщений пользователя. - 30005 - 30005 - 0 - - - forums - admin_forums - frm_f_post_rate - Enable Topic Rating (per user group option)]]> - Включить рейтинг тем (если это разрешено группе) - 30005 + 31006 30005 0 @@ -3587,7 +3518,17 @@ frm_f_post_inc Enable Post Count Incrementation]]> Включить счетчик сообщений пользователей? - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + frm_f_post_rate + Enable Topic Rating (per user group option)]]> + Включить рейтинг тем (если это разрешено группе) + 31006 30005 0 @@ -3597,7 +3538,7 @@ frm_f_post_bump_info If enabled, a poll vote will move the topic to the top of the list when sorted by date. Если включено, то новый голос в опросе поднимет соответствующую тему наверх списка тем (когда сортировка идет по дате). - 30005 + 31006 30005 0 @@ -3607,7 +3548,7 @@ frm_f_post_bump Enable Poll Bump]]> Разрешить поднятие тем в списке при новых голосах? - 30005 + 31006 30005 0 @@ -3617,57 +3558,7 @@ frm_f_post_poll Enable Polls (per user group option)]]> Разрешить создание опросов (если это разрешено группе)? - 30005 - 30005 - 0 - - - forums - admin_forums - frm_f_perm_hide - Hide Last Post Info]]> - Скрыть информацию о последнем сообщении? - 30005 - 30005 - 0 - - - forums - admin_forums - frm_f_perm_hide_info - Useful if you have settings that prohibit some members from seeing posts in this forum while allowing them to see the forum itself - Полезно, если некоторым пользователям запрещено просматривать сообщения в данном форуме. - 30005 - 30005 - 0 - - - forums - admin_forums - frm_f_post_title - Postable Forum Settings: Options]]> - Настройки сообщений - 30005 - 30005 - 0 - - - forums - admin_forums - frm_f_post_html - Enable HTML Posting (where allowed)]]> - Разрешить использование HTML (если разрешает маска доступа группы)? - 30005 - 30005 - 0 - - - forums - admin_forums - frm_f_post_html_info - This will allow HTML to be posted and executed for allowed groups. - Данная опция включит выполнение HTML тегов в публикуемых сообщениях. - 30005 + 31006 30005 0 @@ -3677,7 +3568,7 @@ frm_f_post_bb Enable BBCode Posting]]> Разрешить использование BB-кодов? - 30005 + 31006 30005 0 @@ -3687,37 +3578,47 @@ frm_f_post_qreply Enable Quick Reply]]> Включить форму быстрого ответа для этого форума? - 30005 + 31006 30005 0 forums admin_forums - frm_f_perm_list_info - If yes, the member will be able to see the topic titles but will not be able to read the topic posts when clicked. - При выборе «Да» пользователи смогут видеть только список названий тем, но не смогут в них войти. - 30005 + frm_f_post_html + Enable HTML Posting (where allowed)]]> + Разрешить использование HTML (если разрешает маска доступа группы)? + 31006 30005 0 forums admin_forums - frm_f_perm_title - Permission Settings]]> - Настройки доступа - 30005 + frm_f_post_html_info + This will allow HTML to be posted and executed for allowed groups. + Данная опция включит выполнение HTML тегов в публикуемых сообщениях. + 31006 30005 0 forums admin_forums - frm_f_perm_list - Allow members who can see the forum but cannot read topics to see the topic list]]> - Разрешить пользователям видеть названия тем в списке, но запретить им просмотр содержимого этих тем?]]> - 30005 + frm_f_perm_hide_info + Useful if you have settings that prohibit some members from seeing posts in this forum while allowing them to see the forum itself + Полезно, если некоторым пользователям запрещено просматривать сообщения в данном форуме. + 31006 + 30005 + 0 + + + forums + admin_forums + frm_f_post_title + Postable Forum Settings: Options]]> + Настройки сообщений + 31006 30005 0 @@ -3727,7 +3628,7 @@ frm_f_perm_cust Custom 'Permission Denied' Message]]> Специальное сообщение, выводимое пользователям при попытке зайти в тему (если включен пункт выше) - 30005 + 31006 30005 0 @@ -3737,27 +3638,57 @@ frm_f_perm_cust_info If left blank, a default 'permission denied' error is used.]]> Переносы строк автоматически заменяются на тег <br>.
      Если оставить это поле пустым, то (при включенной опции выше) пользователям, пытающимся зайти в тему будет выводиться стандартное сообщение форума.]]>
      - 30005 + 31006 30005 0 forums admin_forums - frm_f_redirect_en - Enable URL redirection]]> - Переключить форум на перемещение? - 30005 + frm_f_perm_hide + Hide Last Post Info]]> + Скрыть информацию о последнем сообщении? + 31006 30005 0 forums admin_forums - frm_f_redirect_en_info - - При выборе «Да» нижеследующие блоки настроек не будут иметь силы, так как форум станет лишь ссылкой. Уже существующие темы в форуме будут недоступны. - 30005 + frm_f_perm_list_info + If yes, the member will be able to see the topic titles but will not be able to read the topic posts when clicked. + При выборе «Да» пользователи смогут видеть только список названий тем, но не смогут в них войти. + 31006 + 30005 + 0 + + + forums + admin_forums + frm_f_perm_list + Allow members who can see the forum but cannot read topics to see the topic list]]> + Разрешить пользователям видеть названия тем в списке, но запретить им просмотр содержимого этих тем?]]> + 31006 + 30005 + 0 + + + forums + admin_forums + from_f_postable_settings + Postable Forum Settings + Настройки сообщений + 31006 + 31001 + 0 + + + forums + admin_forums + frm_f_perm_title + Permission Settings + Настройки доступа + 31006 30005 0 @@ -3767,47 +3698,27 @@ frm_f_redirect_num Number of redirect clicks]]> Количество нажатий на ссылку (перемещений) - 30005 + 31006 30005 0 forums admin_forums - frm_f_basic - Basic Settings]]> - Основные настройки - 30005 + frm_f_redirect_en_info + + При выборе «Да» нижеследующие блоки настроек не будут иметь силы, так как форум станет лишь ссылкой. Уже существующие темы в форуме будут недоступны. + 31006 30005 0 forums admin_forums - frm_f_desc - Forum Description]]> - Описание - 30005 - 30005 - 0 - - - forums - admin_forums - frm_f_desc_info - - - 30005 - 30005 - 0 - - - forums - admin_forums - frm_f_redirect - Redirect Settings (Optional)]]> - Настройки переадресации (опционально) - 30005 + frm_f_redirect_en + Enable URL redirection]]> + Переключить форум на перемещение? + 31006 30005 0 @@ -3817,7 +3728,17 @@ frm_f_redirect_url Redirect URL]]> URL адрес для перемещения - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + frm_f_redirect + Redirect Settings (Optional)]]> + Настройки переадресации (опционально) + 31006 30005 0 @@ -3827,27 +3748,7 @@ frm_f_ascat_info
      Если выберите «Нет», то форум будет обычным, в нем будут разрешено открытие тем, публикация сообщений (если это разрешено).]]>
      - 30005 - 30005 - 0 - - - forums - admin_forums - frm_f_parent - Forum Parent]]> - Родительский форум или категория - 30005 - 30005 - 0 - - - forums - admin_forums - frm_f_state - Forum State]]> - Состояние форума - 30005 + 31006 30005 0 @@ -3857,27 +3758,107 @@ frm_f_ascat Treat this forum as a category? (No posts in it)]]> Сделать форум категорией? - 30005 + 31006 30005 0 + + forums + admin_forums + frm_f_state + Forum State]]> + Состояние форума + 31006 + 30005 + 0 + + + forums + admin_forums + frm_f_parent + Forum Parent]]> + Родительский форум или категория + 31006 + 30005 + 0 + + + forums + admin_forums + frm_f_desc_info + + + 31006 + 30005 + 0 + + + forums + admin_forums + frm_f_desc + Forum Description]]> + Описание + 31006 + 30005 + 0 + + + forums + admin_forums + frm_f_name_category + Category Name + Категория + 31006 + 30006 + 0 + forums admin_forums frm_deletebutton Remove Forum Удалить форум - 30005 + 31006 30005 0 forums admin_forums - frm_deletetitle - Removing Forum: - Удаление форума: - 30005 + frm_f_basic + Basic Settings + Основные настройки + 31006 + 30005 + 0 + + + forums + admin_forums + frm_f_name_forum + Forum Name + Название форума + 31006 + 30006 + 0 + + + forums + admin_forums + frm_moveparent + Move all subforums for this forum to which forum?]]> + Перенести все подфорумы данного форума в форум?]]> + 31006 + 30010 + 0 + + + forums + admin_forums + frm_deletemove + Move all existing topics and posts in this forum to which forum?]]> + В какой форум переместить все существующие темы и сообщения в этом форуме ]]> + 31006 30005 0 @@ -3887,17 +3868,17 @@ frm_deletewhich Forum to remove:]]> Удалить форум: ]]> - 30005 + 31006 30005 0 forums admin_forums - frm_deletemove - Move all existing topics and posts in this forum to which forum?]]> - В какой форум переместить все существующие темы и сообщения в этом форуме ]]> - 30005 + frm_deletetitle + Removing Forum: + Удаление форума: + 31006 30005 0 @@ -3907,7 +3888,7 @@ frm_emptybutton Empty This Forum (No Undo) Удалить все в этом форуме (Восстановление невозможно) - 30005 + 31006 30005 0 @@ -3917,17 +3898,7 @@ frm_emptywhich Forum to empty:]]> Очистка форума: ]]> - 30005 - 30005 - 0 - - - forums - admin_forums - frm_emptytitle - Empty Forum - Очистка форума - 30005 + 31006 30005 0 @@ -3937,7 +3908,17 @@ frm_skinbutton Edit Forum Skin Options Изменить - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + frm_emptytitle + Empty Forum + Очистка форума + 31006 30005 0 @@ -3947,27 +3928,7 @@ frm_skinsub Apply to all children of this forum (all subforums)?]]> Применить ко всем подфорумам? - 30005 - 30005 - 0 - - - forums - admin_forums - frm_rulestext - Rules Text
      (HTML Editing Enabled)]]>
      - HTML включен.]]> - 30005 - 30005 - 0 -
      - - forums - admin_forums - frm_skinchoice - Skin choices for forum: - Установка стиля для: - 30005 + 31006 30005 0 @@ -3977,7 +3938,7 @@ frm_skinapply Apply which skin to this forum?]]> Какой стиль установить для этого форума? - 30005 + 31006 30005 0 @@ -3987,27 +3948,27 @@ frm_rulesbutton Edit Forum Rules Сохранить - 30005 + 31006 30005 0 forums admin_forums - frm_rulessetup - Forum Rules Setup - Настройки правил форума - 30005 + frm_skinchoice + Skin choices for forum: + Установка стиля для: + 31006 30005 0 forums admin_forums - frm_rulesdisplay - Display Method]]> - Способ отображения - 30005 + frm_rulestext + Rules Text
      (HTML Editing Enabled)]]>
      + HTML включен.]]> + 31006 30005 0
      @@ -4017,7 +3978,27 @@ frm_rulestitle Rules Title]]> Заголовок правил - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + frm_rulessetup + Forum Rules Setup + Настройки правил форума + 31006 + 30005 + 0 + + + forums + admin_forums + frm_rulesdisplay + Display Method]]> + Способ отображения + 31006 30005 0 @@ -4027,27 +4008,7 @@ frm_global Global Permissions (All current and future permission sets)]]> Глобальные права (выбрать все текущие и будущие маски) - 30005 - 30005 - 0 - - - forums - admin_forums - frm_savereload - Save and Reload Page - Сохранить и перезагрузить страницу - 30005 - 30005 - 0 - - - forums - admin_forums - frm_saveprev - Save and Edit Previous - Сохранить и изменить предыдущие - 30005 + 31006 30005 0 @@ -4057,7 +4018,7 @@ frm_saveonly Save Only Сохранить - 30005 + 31006 30005 0 @@ -4067,17 +4028,27 @@ frm_noperms You did not select any permissions, would you like to continue anyway? Вы не установили права доступа. Все равно продолжить? - 30005 + 31006 30005 0 forums admin_forums - frm_noforumslink - Click here to create a new forum in this category - Нажмите здесь для создания нового форума в этой категории - 30005 + frm_savereload + Save and Reload Page + Сохранить и перезагрузить страницу + 31006 + 30005 + 0 + + + forums + admin_forums + frm_saveprev + Save and Edit Previous + Сохранить и изменить предыдущие + 31006 30005 0 @@ -4087,87 +4058,17 @@ frm_savenext Save and Edit Next Сохранить и изменить следующие - 30005 + 31006 30005 0 forums admin_forums - frm_thistrash - This is a trashcan forum... - Форум, отведенный под корзину - 30005 - 30005 - 0 - - - forums - admin_forums - frm_moderators - Moderators - Модераторы - 30005 - 30005 - 0 - - - forums - admin_forums - frm_modcheck - Check this box to include this forum in the list of forums to add a moderator to - Отметьте это поле для добавления форума в список форумов для добавления модератора к - 30005 - 30005 - 0 - - - forums - admin_forums - frm_permissions - Permissions... - Права доступа - 30005 - 30005 - 0 - - - forums - admin_forums - frm_emptyforum - Empty Forum... - Очистить - 30005 - 30005 - 0 - - - forums - admin_forums - frm_deleteforum - Delete Forum... - Удалить - 30005 - 30005 - 0 - - - forums - admin_forums - frm_forumrules - Forum Rules... - Правила - 30005 - 30005 - 0 - - - forums - admin_forums - frm_resync - Resynchronize... - Ресинхронизация - 30005 + frm_noforumslink + Click here to create a new forum in this category + Нажмите здесь для создания нового форума в этой категории + 31006 30005 0 @@ -4177,7 +4078,77 @@ frm_noforums You have not created any forums in this category yet.
      It will not be displayed on the site, regardless of permission settings, until it contains at least one forum.]]>
      В данной категории еще нет ни одного форума
      Категория не будет отображаться на сайте, независимо от настроек прав доступа, до тех пор, пока не будет содержать хотя бы один форум.]]>
      - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + frm_resync + Resynchronize... + Ресинхронизация + 31006 + 30005 + 0 + + + forums + admin_forums + frm_forumrules + Forum Rules... + Правила + 31006 + 30005 + 0 + + + forums + admin_forums + frm_emptyforum + Empty Forum... + Очистить + 31006 + 30005 + 0 + + + forums + admin_forums + frm_deleteforum + Delete Forum... + Удалить + 31006 + 30005 + 0 + + + forums + admin_forums + frm_permissions + Permissions... + Права доступа + 31006 + 30005 + 0 + + + forums + admin_forums + frm_moderators + Moderators + Модераторы + 31006 + 30005 + 0 + + + forums + admin_forums + frm_modcheck + Check this box to include this forum in the list of forums to add a moderator to + Отметьте это поле для добавления форума в список форумов для добавления модератора к + 31006 30005 0 @@ -4187,17 +4158,17 @@ frm_modaddtxt Add a moderator to all checked forum(s):]]> Добавить модератора в выбранные форумы: - 30005 + 31006 30005 0 forums admin_forums - frm_gogogadgetflow - - Добавить - 30005 + frm_thistrash + This is a trashcan forum... + Форум, отведенный под корзину + 31006 30005 0 @@ -4207,17 +4178,7 @@ frm_modorgroup OR Group ]]> или группа - 30005 - 30005 - 0 - - - forums - admin_forums - frm_modname - Name - Имя - 30005 + 31006 30005 0 @@ -4227,7 +4188,27 @@ frm_reordcat Reorder Categories Изменить порядок категории - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + frm_gogogadgetflow + + Добавить + 31006 + 30005 + 0 + + + forums + admin_forums + frm_modname + Name + Имя + 31006 30005 0 @@ -4237,7 +4218,7 @@ frm_addnewcat Add New Category Добавить категорию - 30005 + 31006 30005 0 @@ -4247,17 +4228,7 @@ frm_modedit Edit permissions... Изменить - 30005 - 30005 - 0 - - - forums - admin_forums - frm_modremoveall - Remove from all forums... - Удалить из всех форумов - 30005 + 31006 30005 0 @@ -4267,17 +4238,17 @@ frm_modremove Remove from this forum... Удалить из этого форума - 30005 + 31006 30005 0 forums admin_forums - frm_showtier - Show Tiered - Показать иерархию форумов - 30005 + frm_modremoveall + Remove from all forums... + Удалить из всех форумов + 31006 30005 0 @@ -4287,7 +4258,17 @@ frm_showall Show All Показать форумы без иерархии - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + frm_showtier + Show Tiered + Показать иерархию форумов + 31006 30005 0 @@ -4297,7 +4278,7 @@ frm_modhide Hide Moderator Options Скрыть модераторские опции - 30005 + 31006 30005 0 @@ -4307,17 +4288,7 @@ frm_modshow Show Moderator Options Показать модераторские опции - 30005 - 30005 - 0 - - - forums - admin_forums - frm_skinopt - Skin Options... - Настройки стиля - 30005 + 31006 30005 0 @@ -4327,7 +4298,17 @@ frm_deletecat Delete Category... Удалить - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + frm_skinopt + Skin Options... + Настройки стиля + 31006 30005 0 @@ -4337,7 +4318,7 @@ frm_editsettings Edit Settings... Настройки - 30005 + 31006 30005 0 @@ -4347,17 +4328,7 @@ frm_newforum New Forum... Создать форум - 30005 - 30005 - 0 - - - forums - admin_forums - frm_id - ID: - ID: - 30005 + 31006 30005 0 @@ -4367,7 +4338,7 @@ frm_options Options Опции - 30005 + 31006 30005 0 @@ -4377,7 +4348,17 @@ frm_or or...]]> или - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + frm_id + ID: + ID: + 31006 30005 0 @@ -4387,7 +4368,7 @@ for_forumscap Forums Форумы - 30005 + 31006 30005 0 @@ -4397,57 +4378,7 @@ for_title Category and Forum Overview Обзор категорий и форумов - 30005 - 30005 - 0 - - - forums - admin_forums - for__created - Created - Создан - 30005 - 30005 - 0 - - - forums - admin_forums - for__edited - Edited - Изменен - 30005 - 30005 - 0 - - - forums - admin_forums - for_forperm - Forum access permissions
      (Check box for access, uncheck to not allow access)
      If you deny read access for a permission set, they will not see the forum]]>
      - Маски доступа к форуму
      Если вы запрещаете маске доступа просмотр форума, то группы, которые закреплены за этой маской, не смогут просматривать этот форум.]]>
      - 30005 - 30005 - 0 -
      - - forums - admin_forums - for_catperm - Category access permissions
      (Select permission set for access, deselect to not allow access)
      If you do not select a permission set, they will not be able to see any forums in that category.]]>
      - Маски доступа к категории
      Если вы не разрешите маске доступа просмотра форума, то группы, которые закреплены за этой маской, не смогут просматривать все форумы, относящиеся к этой категории.]]>
      - 30005 - 30005 - 0 -
      - - forums - admin_forums - for_permeditedin - Forum access permissions edited in %s - Права доступа к форуму изменены в %s - 30005 + 31006 30005 0 @@ -4457,7 +4388,7 @@ for_permedited Forum permissions edited Права доступа изменены - 30005 + 31006 30005 0 @@ -4467,37 +4398,57 @@ for_permedited2 Forum Access Permissions Edited Права доступа к форуму изменены - 30005 + 31006 30005 0 forums admin_forums - for_newfor - New Forum - Новый форум - 30005 + for_permeditedin + Forum access permissions edited in %s + Права доступа к форуму изменены в %s + 31006 30005 0 forums admin_forums - for_addcat - Add Category - Добавление категории - 30005 + for_catperm + Category access permissions
      (Select permission set for access, deselect to not allow access)
      If you do not select a permission set, they will not be able to see any forums in that category.]]>
      + Маски доступа к категории
      Если вы не разрешите маске доступа просмотра форума, то группы, которые закреплены за этой маской, не смогут просматривать все форумы, относящиеся к этой категории.]]>
      + 31006 + 31006 + 0 +
      + + forums + admin_forums + for__edited + Edited + Изменен + 31006 30005 0 forums admin_forums - for_addfor - Add Forum - Создать форум - 30005 + for_forperm + Forum access permissions
      (Check box for access, uncheck to not allow access)
      If you deny read access for a permission set, they will not see the forum]]>
      + Маски доступа к форуму
      Если вы запрещаете маске доступа просмотр форума, то группы, которые закреплены за этой маской, не смогут просматривать этот форум.]]>
      + 31006 + 30005 + 0 +
      + + forums + admin_forums + for__created + Created + Создан + 31006 30005 0 @@ -4507,7 +4458,7 @@ for_entertitle You must enter a %s title. Please try again. Вы должны ввести заголовок %s. Попробуйте еще раз. - 30005 + 31006 30005 0 @@ -4517,67 +4468,47 @@ for_whymovethere Sorry, that is not possible. You are attempting to move a parent forum or category into its own child structure. Please go back and try again, selecting a different parent forum. Извините, сделать это невозможно. Вы хотите переместить родительский форума в него же самого. Пожалуйста, вернитесь назад и попытайтесь выбрать другой форум. - 30005 + 31006 30005 0 + + forums + admin_forums + for_addfor + Add Forum + Создать форум + 31006 + 31006 + 0 + + + forums + admin_forums + for_newfor + New Forum + Новый форум + 31006 + 30005 + 0 + + + forums + admin_forums + for_addcat + Add Category + Добавление категории + 31006 + 31006 + 0 + forums admin_forums for_newcat New Category Новая категория - 30005 - 30005 - 0 - - - forums - admin_forums - for_changefor - Change to Forum - Изменить на форум - 30005 - 30005 - 0 - - - forums - admin_forums - for_editcat - Editing Category: %s - Изменение категории: %s - 30005 - 30005 - 0 - - - forums - admin_forums - for_editcat_button - Edit Category - Сохранить - 30005 - 30005 - 0 - - - forums - admin_forums - for_editfor - Edit Forum: %s - Изменение форума: %s - 30005 - 30005 - 0 - - - forums - admin_forums - for_editfor_button - Edit Forum - Изменить форум - 30005 + 31006 30005 0 @@ -4587,17 +4518,57 @@ for_changecat Change to Category Изменить на категорию - 30005 + 31006 + 31006 + 0 + + + forums + admin_forums + for_changefor + Change to Forum + Изменить на форум + 31006 + 31006 + 0 + + + forums + admin_forums + for_editfor_button + Edit Forum + Изменить форум + 31006 30005 0 forums admin_forums - for_noforumselected - No forum selected to edit. Please try again. - Не выбран форум для изменения. Попробуйте еще раз. - 30005 + for_editfor + Edit Forum: %s + Изменение форума: %s + 31006 + 30005 + 0 + + + forums + admin_forums + for_editcat + Editing Category: %s + Изменение категории: %s + 31006 + 30005 + 0 + + + forums + admin_forums + for_editcat_button + Edit Category + Сохранить + 31006 30005 0 @@ -4607,7 +4578,17 @@ for_ireplied Topics Reader Replied темы с ответами пользователя - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + for_noforumselected + No forum selected to edit. Please try again. + Не выбран форум для изменения. Попробуйте еще раз. + 31006 30005 0 @@ -4617,7 +4598,7 @@ for_istarted Topics Reader Started темы, созданные пользователем - 30005 + 31006 30005 0 @@ -4627,7 +4608,7 @@ for_moved Moved Topics перемещенные темы - 30005 + 31006 30005 0 @@ -4637,27 +4618,7 @@ for_locked Locked Topics закрытые темы - 30005 - 30005 - 0 - - - forums - admin_forums - for_poll - Polls - Опросы - 30005 - 30005 - 0 - - - forums - admin_forums - for_open - Open Topics - открытые темы - 30005 + 31006 30005 0 @@ -4667,17 +4628,27 @@ for_hot Hot Topics горячие темы - 30005 + 31006 0 forums admin_forums - for_all - All Topics - все темы - 30005 + for_poll + Polls + Опросы + 31006 + 30005 + 0 + + + forums + admin_forums + for_open + Open Topics + открытые темы + 31006 30005 0 @@ -4687,27 +4658,37 @@ for_desc Descending (Z - A, 9 - 0) по убыванию (Я - А, 9 - 0) - 30005 + 31006 30005 0 forums admin_forums - for_asc - Ascending (A - Z, 0 - 9) - по возрастанию (А - Я, 0 - 9) - 30005 + for_all + All Topics + все темы + 31006 + 31006 + 0 + + + forums + admin_forums + for_s_post + Topic Posts + количеству сообщений в темах + 31006 30005 0 forums admin_forums - for_s_poster - Name of last poster - имени последнего автора - 30005 + for_s_view + Topic Views + количеству просмотров темы + 31006 0 @@ -4717,37 +4698,37 @@ for_s_date Topic start date дате создания темы - 30005 + 31006 0 forums admin_forums - for_s_view - Topic Views - количеству просмотров темы - 30005 + for_s_poster + Name of last poster + имени последнего автора + 31006 0 forums admin_forums - for_s_post - Topic Posts - количеству сообщений в темах - 30005 - 30005 + for_asc + Ascending (A - Z, 0 - 9) + по возрастанию (А - Я, 0 - 9) + 31006 + 31006 0 forums admin_forums - for_s_name - - автору темы - 30005 + for_s_last + Date of last post + дате последнего сообщения + 31006 0 @@ -4757,17 +4738,17 @@ for_s_topic Topic Title названию темы - 30005 + 31006 0 forums admin_forums - for_s_last - Date of last post - дате последнего сообщения - 30005 + for_s_name + + автору темы + 31006 0 @@ -4777,7 +4758,7 @@ for_showall Show All все время - 30005 + 31006 0 @@ -4787,7 +4768,7 @@ for_last90 Last 90 Days 90 дней - 30005 + 31006 0 @@ -4797,17 +4778,7 @@ for_last60 Last 60 Days 60 дней - 30005 - - 0 - - - forums - admin_forums - for_last25 - Last 25 Days - 25 дней - 30005 + 31006 0 @@ -4817,87 +4788,27 @@ for_last30 Last 30 Days 30 дней - 30005 + 31006 0 forums admin_forums - for_modall - Moderate all new topics and all replies - все новые темы и сообщения - 30005 + for_last25 + Last 25 Days + 25 дней + 31006 0 - - forums - admin_forums - for_modtop - - новые темы - 30005 - 30005 - 0 - - - forums - admin_forums - for_modrep - - новые ответы - 30005 - 30005 - 0 - - - forums - admin_forums - for_today - Today - сегодня - 30005 - - 0 - - - forums - admin_forums - for_last5 - Last 5 Days - 5 дней - 30005 - 30005 - 0 - - - forums - admin_forums - for_last7 - Last 7 Days - 7 дней - 30005 - 30005 - 0 - - - forums - admin_forums - for_last10 - Last 10 Days - 10 дней - 30005 - 30005 - 0 - forums admin_forums for_last20 Last 20 Days 20 дней - 30005 + 31006 30005 0 @@ -4907,17 +4818,87 @@ for_last15 Last 15 Days 15 дней - 30005 + 31006 30005 0 + + forums + admin_forums + for_last10 + Last 10 Days + 10 дней + 31006 + 30005 + 0 + + + forums + admin_forums + for_last7 + Last 7 Days + 7 дней + 31006 + 30005 + 0 + + + forums + admin_forums + for_last5 + Last 5 Days + 5 дней + 31006 + 30005 + 0 + + + forums + admin_forums + for_today + Today + сегодня + 31006 + + 0 + + + forums + admin_forums + for_modrep + + новые ответы + 31006 + 30005 + 0 + + + forums + admin_forums + for_modtop + + новые темы + 31006 + 30005 + 0 + + + forums + admin_forums + for_modall + Moderate all new topics and all replies + все новые темы и сообщения + 31006 + + 0 + forums admin_forums for_no No Нет - 30005 + 31006 30005 0 @@ -4927,7 +4908,7 @@ for_readonly Read Only Только для чтения - 30005 + 31006 30005 0 @@ -4937,17 +4918,17 @@ for_active Active Активный - 30005 - 30005 + 31006 + 31006 0 forums admin_forums - for_removedlog - Removed forum: %s - %s удален - 30005 + for_control + Forum Control + Управление существующими форумами + 31006 30005 0 @@ -4957,17 +4938,17 @@ for_removed Forum Removed Форум удален - 30005 + 31006 30005 0 forums admin_forums - for_control - Forum Control - Управление существующими форумами - 30005 + for_removedlog + + %s удален + 31006 30005 0 @@ -4977,7 +4958,7 @@ for_wherewhatwhy You cannot move topics into the forum you are removing. Please try again. Вы не можете перенести тему в форум, который вы удаляете. Попробуйте еще раз. - 30005 + 31006 30005 0 @@ -4987,7 +4968,7 @@ for_child_no_parent You cannot move children forums to the forum you are removing. Please try again. Вы не можете перенести дочерний форум в форум, который вы удаляете. Попробуйте еще раз. - 30005 + 31006 30005 0 @@ -4997,7 +4978,7 @@ for_removing - 30005 + 31006 30005 0 @@ -5007,7 +4988,7 @@ for_iscat_n Forum Форум - 30005 + 31006 30005 0 @@ -5017,87 +4998,7 @@ for_iscat_y Category Категория - 30005 - 30005 - 0 - - - forums - admin_forums - for_recountedlog - Recounted posts in forum: %s - Пересчитанных постов в форуме: %s - 30005 - 30005 - 0 - - - forums - admin_forums - for_resynched - Forum Resynschronized - Форум синхронизирован - 30005 - 30005 - 0 - - - forums - admin_forums - for_empty_title - Empty forum: %s - Очистка форума: %s - 30005 - 30005 - 0 - - - forums - admin_forums - for_noid_source - Could not determine the source forum ID. Please try again. - Невозможно определить ID форума источника. Попробуйте еще раз. - 30005 - 30005 - 0 - - - forums - admin_forums - for_nodetails - Could not get the forum details for the forum to empty. Please try again. - Не найден форум, который должен быть очищен. Пожалуйста попробуйте еще раз. - 30005 - 30005 - 0 - - - forums - admin_forums - for_emptiedlog - - Очищен форум %s - 30005 - 30005 - 0 - - - forums - admin_forums - for_emptied - Forum emptied. - Форум очищен. - 30005 - 30005 - 0 - - - forums - admin_forums - for_noid_delete - Could not determine the forum or category ID to delete. Please try again. - Не удалось найти форум или категорию, которую необходимо удалить. Пожалуйста попробуйте еще раз. - 30005 + 31006 30005 0 @@ -5107,7 +5008,87 @@ for_lastforum Could not remove this forum. Please create another forum before attempting to remove this one. Этот форум последний, вы не можете его удалить. Если все же это необходимо сделать, перед удалением данного форума создайте еще один и удалите этот. - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + for_noid_delete + Could not determine the forum or category ID to delete. Please try again. + Не удалось найти форум или категорию, которую необходимо удалить. Пожалуйста попробуйте еще раз. + 31006 + 30005 + 0 + + + forums + admin_forums + for_emptied + Forum emptied. + Форум очищен. + 31006 + 30005 + 0 + + + forums + admin_forums + for_emptiedlog + + Очищен форум %s + 31006 + 30005 + 0 + + + forums + admin_forums + for_nodetails + Could not get the forum details for the forum to empty. Please try again. + Не найден форум, который должен быть очищен. Пожалуйста попробуйте еще раз. + 31006 + 30005 + 0 + + + forums + admin_forums + for_noid_source + Could not determine the source forum ID. Please try again. + Невозможно определить ID форума источника. Попробуйте еще раз. + 31006 + 30005 + 0 + + + forums + admin_forums + for_empty_title + Empty forum: %s + Очистка форума: %s + 31006 + 30005 + 0 + + + forums + admin_forums + for_resynched + Forum Resynschronized + Форум синхронизирован + 31006 + 30005 + 0 + + + forums + admin_forums + for_recountedlog + + Пересчитанных постов в форуме: %s + 31006 30005 0 @@ -5117,7 +5098,7 @@ for_rulesup Forum rules updated. Правила форума обновлены. - 30005 + 31006 30005 0 @@ -5127,7 +5108,7 @@ for_rulesfull Show Full Text Показывать текст - 30005 + 31006 30005 0 @@ -5137,7 +5118,7 @@ for_ruleslink Show Link Only Показывать ссылку - 30005 + 31006 30005 0 @@ -5147,17 +5128,7 @@ for_rulesdont Не показывать - 30005 - 30005 - 0 - - - forums - admin_forums - for_noid - Could not determine the forum ID. Please try again. - Не возможно определить ID форума. Попробуйте еще раз. - 30005 + 31006 30005 0 @@ -5167,7 +5138,7 @@ for_skinup Forum skin updated. Тема форума обновлена. - 30005 + 31006 30005 0 @@ -5177,7 +5148,17 @@ for_noneall --None / Remove All-- -- Нет / Удалить все -- - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + for_noid + Could not determine the forum ID. Please try again. + Не возможно определить ID форума. Попробуйте еще раз. + 31006 30005 0 @@ -5187,8 +5168,8 @@ forums_context_add_category Add New Category Новая категория - 30005 - 30005 + 31006 + 31006 0 @@ -5197,97 +5178,117 @@ forums_context_add_forum Add New Forum Новый форум - 30005 - 30005 + 31006 + 31006 0 forums admin_forums - gt_restrictions - Restrictions - Ограничения - 30005 - 30005 - 0 - - - forums - admin_forums - gt_avoidance + gf_t_avoidance Avoidance Допущения - 30005 - 30005 + 31006 + 31005 0 forums admin_forums - gt_polling + gf_t_restrictions + Restrictions + Ограничения + 31006 + 31005 + 0 + + + forums + admin_forums + gf_t_polling Polling Опросы - 30005 - 30005 + 31006 + 31005 0 forums admin_forums - gt_openclose - Open/Closed Topics - Открытые/Закрытые темы - 30005 - 30005 - 0 - - - forums - admin_forums - gt_deleting - Deleting - Удаление - 30005 - 30005 - 0 - - - forums - admin_forums - gt_editing - Editing - Изменение - 30005 - 30005 - 0 - - - forums - admin_forums - gt_posting - Posting - Сообщения - 30005 - 30005 - 0 - - - forums - admin_forums - gt_viewing + gf_t_viewing Viewing Просмотр - 30005 - 30005 + 31006 + 31005 0 forums admin_forums - gt_rating + gf_t_posting + Posting + Сообщение + 31006 + 31005 + 0 + + + forums + admin_forums + gf_t_editing + Editing + Изменение + 31006 + 31005 + 0 + + + forums + admin_forums + gf_t_deleting + Deleting + Удаление + 31006 + 31005 + 0 + + + forums + admin_forums + gf_t_openclose + Open/Closed Topics + Открытые/Закрытые темы + 31006 + 31005 + 0 + + + forums + admin_forums + gf_t_rating Topic Rating Рейтинг тем - 30005 + 31006 + 31005 + 0 + + + forums + admin_forums + g_max + Max. + Макс. + 31006 + 30010 + 0 + + + forums + admin_forums + g_dd_apprp + approved posts + сообщений на форуме + 31006 30005 0 @@ -5297,17 +5298,7 @@ g_dd_days days since joining дней с момента вступления в группу - 30005 - 30005 - 0 - - - forums - admin_forums - g_dd_apprp - approved posts - сообщений на форуме - 30005 + 31006 30005 0 @@ -5317,17 +5308,7 @@ g_ppd posts per 24 hrs until сообщений за 24 часа до тех пор, пока меньше - 30005 - 30005 - 0 - - - forums - admin_forums - g_limit_no - Enter 0 or leave blank to not limit - Введите 0 или оставьте поле пустым для отключения ограничения - 30005 + 31006 30005 0 @@ -5337,7 +5318,17 @@ g_until until до тех пор, пока меньше - 30005 + 31006 + 30005 + 0 + + + forums + admin_forums + g_limit_no + Enter 0 or leave blank to not limit + Введите 0 или оставьте поле пустым для отключения ограничения + 31006 30005 0 @@ -5347,18 +5338,18 @@ g_limit_dd Enter 0 or leave blank in second field to not limit by days/posts Введите 0 или оставьте поле пустым для отключения ограничения по дням/сообщениям - 30005 + 31006 30005 0 forums admin_forums - g_ppd_limit + gf_ppd_limit Limit Posts Per 24hrs Количество сообщений в течение 24 часов - 30005 - 30005 + 31006 + 31005 0 @@ -5367,107 +5358,17 @@ member_posts_deleted Posts and/or topics belonging to %s have been deleted Сообщения и темы принадлежащие %s были удалены - 30005 + 31006 30005 0 - - forums - admin_forums - perm_forums_download - Download - Скачивание файлов - 30006 - 30006 - 0 - - - forums - admin_forums - perm_forums_view - Show Forum - Просмотр форума - 30006 - 30006 - 0 - - - forums - admin_forums - perm_forums_read - Read Topics - Чтение тем - 30006 - 30006 - 0 - - - forums - admin_forums - perm_forums_reply - Reply Topics - Ответ в темы - 30006 - 30006 - 0 - - - forums - admin_forums - perm_forums_upload - Upload - Загрузка файлов - 30006 - 30006 - 0 - - - forums - admin_forums - perm_forums_start - Start Topics - Создание тем - 30006 - 30006 - 0 - - - forums - admin_forums - frm_f_name_category - Category Name - Категория - 30006 - 30006 - 0 - - - forums - admin_forums - frm_f_name_forum - Forum Name - Название форума - 30006 - 30006 - 0 - forums admin_forums modify_skin_head Modify Forum Skin Selection Изменение стиля форума - 30006 - 30006 - 0 - - - forums - admin_forums - head_forum_permissions - Forum Permissions: - Права доступа форума: - 30006 + 31006 30006 0 @@ -5477,7 +5378,17 @@ forum_rules_head Forum Rules in Правила для форума - 30006 + 31006 + 31006 + 0 + + + forums + admin_forums + head_forum_permissions + Forum Permissions: + Права доступа форума: + 31006 30006 0 @@ -5487,8 +5398,8 @@ acp_subforum_legend Subforums Подфорумы - 30009 - 30009 + 31006 + 31006 0 @@ -5497,8 +5408,8 @@ acp_posts_deleted_from_tid ACP - Posts Deleted From TID: ACP - Сообщения удаленные из TID: - 30009 - 30009 + 31006 + 31006 0 @@ -5507,28 +5418,8 @@ acp_posts_deleted_from ACP - Posts Deleted From ACP - Сообщения удаленные из - 30009 - 30009 - 0 - - - forums - admin_forums - frm_moveparent - Move all subforums for this forum to which forum?]]> - Перенести все подфорумы данного форума в форум?]]> - 30010 - 30010 - 0 - - - forums - admin_forums - g_max - Max. - Макс. - 30010 - 30010 + 31006 + 31006 0 @@ -5537,7 +5428,7 @@ nodelete_last_cat You cannot delete the only category Вы не можете удалить только категорию - 30010 + 31006 30010 0 @@ -5547,8 +5438,399 @@ fc_group_prefix Group: Группа: - 30012 - 30012 + 31006 + 31006 + 0 + + + forums + admin_forums + copy_perms_from + Copy Permissions From: + Скопировать права доступа из: + 31006 + 31006 + 0 + + + forums + admin_forums + copy_perms_go + Go! + ОК + 31006 + 31006 + 0 + + + forums + admin_forums + sup_mod_already + Super Moderators automatically have this permission regardless of this setting + Супермодераторы автоматически имеют эти права независимо от данных настроек + 31006 + 31001 + 0 + + + forums + admin_forums + gbw_soft_delete_see_post_d + + + 31006 + 31001 + 0 + + + forums + admin_forums + gf_bw_soft_delete_see_post + + Могут видеть содержимое мнимо удаленных сообщений и тем + 31006 + 31005 + 0 + + + forums + admin_forums + gf_bw_soft_delete_reason + + Могут видеть причины мнимого удаления сообщения или темы + + 31006 + 31005 + 0 + + + forums + admin_forums + gbw_soft_delete_topic_see_d + + + 31006 + 31001 + 0 + + + forums + admin_forums + gf_bw_soft_delete_topic_see + + Могут видеть мнимо удаленные темы + 31006 + 31005 + 0 + + + forums + admin_forums + gf_bw_un_soft_delete_topic + + Могут восстанавливать мнимо удаленные темы + 31006 + 31005 + 0 + + + forums + admin_forums + gf_bw_soft_delete_own_topic + + Могут мнимо удалять свои темы? + 31006 + 31005 + 0 + + + forums + admin_forums + gf_bw_soft_delete_topic + all topics]]> + Могут мнимо удалять все темы + 31006 + 31005 + 0 + + + forums + admin_forums + gbw_soft_delete_see_d + + + 31006 + 31001 + 0 + + + forums + admin_forums + gf_bw_soft_delete_see + + Могут видеть мнимо удаленные сообщения + 31006 + 31005 + 0 + + + forums + admin_forums + gf_bw_un_soft_delete + + Могут восстанавливать мнимо удаленные сообщения + 31006 + 31005 + 0 + + + forums + admin_forums + gf_bw_soft_delete_own + + Могут мнимо удалять свои сообщения + 31006 + 31005 + 0 + + + forums + admin_forums + gf_bw_soft_delete + all posts]]> + все сообщения]]> + 31006 + 31005 + 0 + + + forums + admin_forums + soft_delete_info + Soft deletion will hide the item in-line. Those with permission will be able to see the item and restore it + Мнимое удаление скрывает сообщения или темы. Эти права позволяют видеть такие сообщения и восстанавливать их. + 31006 + 31001 + 0 + + + forums + admin_forums + hard_delete_info + Hard deletion will permanently remove the item from its parent. It will either be moved into the trash can if set up, or removed from the database + Настоящее удаление удалит объекты навсегда. Они будут перемещены в корзину, если она используется, или удалены из базы данных + 31006 + 31001 + 0 + + + forums + admin_forums + disable_sharelinks_desc + You can choose to remove the ability to share links from this forum if the content is likely to be sensitive. + Вы можете отключить возможность делится ссылками для данного форума. + 31006 + 31006 + 0 + + + forums + admin_forums + disable_sharelinks + Disable Share Links + Отключить возможность делиться ссылками + 31006 + 31006 + 0 + + + forums + admin_forums + frm_rule_raw_html_desc + Checking this option will prevent any parsing, the code will be output exactly as typed in the editor. + Включение данной опции приведет к отключению механизма обработки текста, таким образом при выводе текста он будет таким же как был введен. + 31006 + 31001 + 0 + + + forums + admin_forums + frm_rule_raw_html_title + Use raw HTML + Использовать HTML + 31006 + 31001 + 0 + + + forums + admin_forums + from_f_perms + Permissions + Права доступа + 31006 + 31004 + 0 + + + forums + admin_forums + using_skin_set + Using Skin Set: + Стиль: + 31006 + 31004 + 0 + + + forums + admin_forums + emptyforum_sofarcycle + Emptying forum: %s topics deleted so far + Очистка форума: %s тем удалено + 31006 + 31006 + 0 + + + forums + admin_forums + t_uploadfail3 + The upload failed - there file was too large. Please try again. + Загрузка не удалась - файл слишком большой. Попробуйте еще раз. + 31006 + 30005 + 0 + + + forums + admin_forums + t_uploadfail4 + The upload failed - there was a problem moving the avatar to the uploads directory. Please verify permissions are set correctly on the uploads folder. + Загрузка не удалась - возникли проблеммы при перемещении аватара в директорию загрузки. Проверьте настройки доступа к директории загрузки. + 31006 + 30005 + 0 + + + forums + admin_forums + t_uploadfail5 + The upload failed - there was a problem processing the image. Please try again. + Загрузка не удалась - возникли проблемы при обработке изображения. Попробуйте еще раз. + 31006 + 30005 + 0 + + + forums + admin_forums + t_noav + We could not determine the avatar you were trying to update with. Please try again. + Не удается найти аватар, который вы хотите обновить. Попробуйте еще раз. + 31006 + 30005 + 0 + + + forums + admin_forums + t_avupdated + + Аватар пользователя обновлен! + 31006 + 30005 + 0 + + + forums + admin_forums + t_noposts + This member has no posts to delete. Please select another member. + У этого пользователя нет сообщений для удаления. Выберите другого пользователя. + 31006 + 30005 + 0 + + + forums + admin_forums + t_badavext + You do not accept that file type on this board for avatars. + Данный тип файла не разрешен для аватара. + 31006 + 30005 + 0 + + + forums + admin_forums + perm_forums_view + Show Forum + Просмотр форума + 31006 + 30006 + 0 + + + forums + admin_forums + perm_forums_read + Read Topics + Чтение тем + 31006 + 30006 + 0 + + + forums + admin_forums + perm_forums_reply + Reply Topics + Ответ в темы + 31006 + 30006 + 0 + + + forums + admin_forums + perm_forums_start + Start Topics + Создание тем + 31006 + 30006 + 0 + + + forums + admin_forums + perm_forums_upload + Upload + Загрузка файлов + 31006 + 30006 + 0 + + + forums + admin_forums + perm_forums_download + Download + Скачивание файлов + 31006 + 30006 + 0 + + + forums + admin_member_form + memchangeavatar + Change Avatar + Изменить аватар + 31006 + 31006 0 @@ -5557,28 +5839,8 @@ m_overrride Override group permission masks with... Переопределить права группы следующими масками - 30005 - - 0 - - - forums - admin_member_form - mem_remove_avatar - Remove Avatar - Удалить аватар - 30005 - 30005 - 0 - - - forums - admin_member_form - mem_posts - Posts - Сообщений - 30005 - 30005 + 31006 + 31006 0 @@ -5587,57 +5849,47 @@ mem_change_button Change... Изменить - 30005 - 30005 + 31006 + 31006 + 0 + + + forums + admin_member_form + mem_posts + Posts + Сообщений + 31006 + 31006 + 0 + + + forums + admin_member_form + mem_remove_avatar + Remove Avatar + Удалить аватар + 31006 + 31006 + 0 + + + forums + admin_member_form + strong_avatar_label + Avatar + Аватар + 31006 + 31006 0 forums admin_rss - rss_im_updateall - Update All RSS Imports... - Обновить все кеши RSS - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_validate - Validate RSS Stream... - Проверить - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_create - Create New RSS Import Stream... - Создать новый поток - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_update - Update RSS Import... - Обновить - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_remove - Remove RSS Articles... - Удалить все записи - 30005 + rss_im_edit + Edit RSS Import Stream... + Изменить + 31006 30005 0 @@ -5647,27 +5899,7 @@ rss_im_delete Delete RSS Import Stream... Удалить поток - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_edit - Edit RSS Import Stream... - Изменить - 30005 - 30005 - 0 - - - forums - admin_rss - rss_rss - RSS - Потоки RSS - 30005 + 31006 30005 0 @@ -5677,37 +5909,17 @@ rss_im_thefeeds RSS Import Streams Потоки RSS Импорта - 30005 + 31006 30005 0 forums admin_rss - rss_im_refresh_info - n minutes. Minimum of 30 minutes, regardless of input.]]> - Проверять новые RSS записи каждые n минут. Минимум 30 минут. - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_valbutton - Validate Stream - Проверить - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_enturl - Enter the URL:]]> - Введите ссылку:]]> - 30005 + rss_rss + RSS + Потоки RSS + 31006 30005 0 @@ -5717,97 +5929,27 @@ rss_im_quickval Quick-Validate an RSS Stream? Быстрая проверка потока - 30005 + 31006 30005 0 forums admin_rss - rss_im_open - RSS Import Topic Open]]> - Открытость тем]]> - 30005 + rss_im_enturl + Enter the URL:]]> + Введите ссылку:]]> + 31006 30005 0 forums admin_rss - rss_im_open_info - - Если «Да», то тема будет создана открытая. «Нет» — тема будет закрыта - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_hidden - RSS Import Topic Hidden]]> - Невидимость тем]]> - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_hidden_info - - Если «Да», то будет создана невидимая тема. «Нет» — тема видимая - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_prefix - RSS Import Topic Prefix]]> - Префикс тем]]> - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_prefix_info - - Префикс, который будет добавлен перед заголовком RSS записи - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_settings - RSS Import Settings]]> - Настройки импорта ]]> - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_pergo - RSS Import Per Go]]> - Количество импортируемых записей за обновление]]> - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_pergo_info - n articles per update. Importing is moderately resource intensive.]]> - n записей за обновление. Импортирование довольно тяжелый процесс.]]> - 30005 + rss_im_valbutton + Validate Stream + Проверить + 31006 30005 0 @@ -5817,77 +5959,107 @@ rss_im_refresh RSS Import Refresh]]> Частота обновления]]> - 30005 + 31006 30005 0 forums admin_rss - rss_im_html - RSS Import Preserve HTML]]> - Сохранить HTML?]]> - 30005 + rss_im_refresh_info + n minutes. Minimum of 30 minutes, regardless of input.]]> + Проверять новые RSS записи каждые n минут. Минимум 30 минут. + 31006 30005 0 forums admin_rss - rss_im_html_info - - Если да, HTML будет сохранен — вы обязаны включить HTML на форуме, чтобы была возможность редактировать импортируемые записи. Если нет, HTML будет конвертироваться по возможности в BB-код. - 30005 + rss_im_pergo + RSS Import Per Go]]> + Количество импортируемых записей за обновление]]> + 31006 30005 0 forums admin_rss - rss_im_poster - RSS Import Poster's Name]]> - Автор записей]]> - 30005 + rss_im_pergo_info + n articles per update. Importing is moderately resource intensive.]]> + n записей за обновление. Импортирование довольно тяжелый процесс.]]> + 31006 30005 0 forums admin_rss - rss_im_poster_info - - От этого имени будет публиковаться тема с RSS записью (отображаемое имя) - 30005 + rss_im_settings + RSS Import Settings]]> + Настройки импорта ]]> + 31006 30005 0 forums admin_rss - rss_im_incpost - RSS Import Increment Poster's Post Count]]> - Увеличивать счетчик сообщений при RSS Импорте]]> - 30005 + rss_im_prefix + RSS Import Topic Prefix]]> + Префикс тем]]> + 31006 30005 0 forums admin_rss - rss_im_incpost_info - - При публикации новой темы из RSS, пользователю, от чьего имени была создана эта темы, будет увеличен счетчик сообщений. - 30005 + rss_im_prefix_info + + Префикс, который будет добавлен перед заголовком RSS записи + 31006 30005 0 forums admin_rss - rss_im_link - RSS Import Add Link To Post]]> - Добавлять ссылку источника]]> - 30005 + rss_im_hidden_info + + Если «Да», то будет создана невидимая тема. «Нет» — тема видимая + 31006 + 30005 + 0 + + + forums + admin_rss + rss_im_hidden + RSS Import Topic Hidden]]> + Невидимость тем]]> + 31006 + 30005 + 0 + + + forums + admin_rss + rss_im_open_info + + Если «Да», то тема будет создана открытая. «Нет» — тема будет закрыта + 31006 + 30005 + 0 + + + forums + admin_rss + rss_im_open + RSS Import Topic Open]]> + Открытость тем]]> + 31006 30005 0 @@ -5897,7 +6069,7 @@ rss_im_link_info If completed, this will add a link to the article source (if available) to the post body]]> Если это поле заполнено, то к сообщению будет добавлена ссылка на источник, откуда взята RSS запись]]> - 30005 + 31006 30005 0 @@ -5907,17 +6079,77 @@ rss_im_link_other *Leave blank to not include a link in the post *Оставьте поле пустым, чтобы не включать ссылку в сообщение - 30005 + 31006 30005 0 forums admin_rss - rss_im_forum_info - Choose a forum to import each RSS item as a new topic - Выберите форум, в который импортировать каждую RSS запись, как новую тему. - 30005 + rss_im_link + RSS Import Add Link To Post]]> + Добавлять ссылку источника]]> + 31006 + 30005 + 0 + + + forums + admin_rss + rss_im_incpost_info + + При публикации новой темы из RSS, пользователю, от чьего имени была создана эта темы, будет увеличен счетчик сообщений. + 31006 + 30005 + 0 + + + forums + admin_rss + rss_im_poster + RSS Import Poster's Name]]> + Автор записей]]> + 31006 + 30005 + 0 + + + forums + admin_rss + rss_im_poster_info + + От этого имени будет публиковаться тема с RSS записью (отображаемое имя) + 31006 + 30005 + 0 + + + forums + admin_rss + rss_im_incpost + RSS Import Increment Poster's Post Count]]> + Увеличивать счетчик сообщений при RSS Импорте]]> + 31006 + 30005 + 0 + + + forums + admin_rss + rss_im_html + RSS Import Preserve HTML]]> + Сохранить HTML?]]> + 31006 + 30005 + 0 + + + forums + admin_rss + rss_im_html_info + + Если да, HTML будет сохранен — вы обязаны включить HTML на форуме, чтобы была возможность редактировать импортируемые записи. Если нет, HTML будет конвертироваться по возможности в BB-код. + 31006 30005 0 @@ -5927,17 +6159,17 @@ rss_im_forum RSS Import Into Forum]]> Импортировать в форумы]]> - 30005 + 31006 30005 0 forums admin_rss - rss_im_ht_info - Most streams do not require authentication - Для большинства потоков не требуется - 30005 + rss_im_forum_info + Choose a forum to import each RSS item as a new topic + Выберите форум, в который импортировать каждую RSS запись, как новую тему. + 31006 30005 0 @@ -5947,7 +6179,7 @@ rss_im_ht_user RSS Import Stream Username]]> Имя пользователя]]> - 30005 + 31006 30005 0 @@ -5957,7 +6189,7 @@ rss_im_ht_pass RSS Import Stream Password]]> Пароль]]> - 30005 + 31006 30005 0 @@ -5967,17 +6199,17 @@ rss_im_content RSS Import Content]]> Содержимое RSS - 30005 + 31006 30005 0 forums admin_rss - rss_im_htaccess - RSS Import htaccess Authentication]]> - .htaccess аутентификация - 30005 + rss_im_ht_info + Most streams do not require authentication + Для большинства потоков не требуется + 31006 30005 0 @@ -5987,7 +6219,17 @@ rss_im_ht_require Does this stream require .htaccess Authentication?]]> Этот поток требует .htaccess аутентификацию?]]> - 30005 + 31006 + 30005 + 0 + + + forums + admin_rss + rss_im_htaccess + RSS Import htaccess Authentication]]> + .htaccess аутентификация + 31006 30005 0 @@ -5997,17 +6239,7 @@ rss_im_enabled RSS Import Enabled]]> Включить импорт?]]> - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_charset - RSS Import Stream Character Set]]> - Кодировка потока]]> - 30005 + 31006 30005 0 @@ -6017,27 +6249,17 @@ rss_im_charset_info Examples: ISO-8859-1, UTF-8. Use UTF-8 if in doubt. Пример: ISO-8859-1, UTF-8. Используйте UTF-8, если сомневаетесь. - 30005 + 31006 30005 0 forums admin_rss - rss_im_articlecount - %s topic(s).]]> - %s темами.]]> - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_removelast - Remove the last n imported topics]]> - Удалить последние n импортированных тем]]> - 30005 + rss_im_charset + RSS Import Stream Character Set]]> + Кодировка потока]]> + 31006 30005 0 @@ -6047,7 +6269,7 @@ rss_im_url_info This must be an RDF or RSS feed Это должно быть RDF или RSS поток. - 30005 + 31006 30005 0 @@ -6057,7 +6279,7 @@ rss_im_url RSS Import Stream URL]]> Ссылка на поток]]> - 30005 + 31006 30005 0 @@ -6067,27 +6289,7 @@ rss_im_title RSS Import Stream Title]]> Название]]> - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_basics - RSS Import Basics]]> - RSS Импорт]]> - 30005 - 30005 - 0 - - - forums - admin_rss - rss_im_removenoconf - Remove (No more confirmation screens!) - Удалить - 30005 + 31006 30005 0 @@ -6097,27 +6299,37 @@ rss_im_blankremove Leave blank to remove them all Оставьте поле пустым для удаления всех - 30005 + 31006 30005 0 forums admin_rss - rss_ex_forums - Export Topics From Forum(s) - Экспортировать темы из форумов - 30005 + rss_im_removenoconf + Remove (No more confirmation screens!) + Удалить + 31006 30005 0 forums admin_rss - rss_ex_forums_info - - ВАЖНО: Маски доступа не работают здесь. Темы будут экспортированы из выбранных форум, независимо от масок доступа к форумам. - 30005 + rss_im_basics + RSS Import Basics]]> + RSS Импорт]]> + 31006 + 30005 + 0 + + + forums + admin_rss + rss_im_removelast + Remove the last n imported topics]]> + Удалить последние n импортированных тем]]> + 31006 30005 0 @@ -6127,7 +6339,17 @@ rss_im_removetopics Remove Posted Topics From Stream: Удалить темы из потока: - 30005 + 31006 + 30005 + 0 + + + forums + admin_rss + rss_im_articlecount + %s topic(s).]]> + %s темами.]]> + 31006 30005 0 @@ -6137,7 +6359,27 @@ rss_ex_cache_info n minutes]]> n минут]]> - 30005 + 31006 + 30005 + 0 + + + forums + admin_rss + rss_ex_forums + Export Topics From Forum(s) + Экспортировать темы из форумов + 31006 + 30005 + 0 + + + forums + admin_rss + rss_ex_forums_info + + ВАЖНО: Маски доступа не работают здесь. Темы будут экспортированы из выбранных форум, независимо от масок доступа к форумам. + 31006 30005 0 @@ -6147,7 +6389,7 @@ rss_ex_cache RSS Export Cache Frequency RSS Экспорт: Частота обновления кеша - 30005 + 31006 30005 0 @@ -6157,7 +6399,7 @@ rss_ex_sort RSS Export Sort By Сортировать RSS Экспорт - 30005 + 31006 30005 0 @@ -6167,7 +6409,7 @@ rss_ex_numitem_info n number of topics]]> n тем ]]> - 30005 + 31006 30005 0 @@ -6177,87 +6419,7 @@ rss_ex_order RSS Export Order By Field Сортировать RSS Экспорт - 30005 - 30005 - 0 - - - forums - admin_rss - rss_ex_update - Update All RSS Export Caches... - Обновить все кеши RSS - 30005 - 30005 - 0 - - - forums - admin_rss - rss_ex_title - RSS Export Stream (Channel) Title - Название - 30005 - 30005 - 0 - - - forums - admin_rss - rss_ex_desc - RSS Export Stream (Channel) Description - Описание - 30005 - 30005 - 0 - - - forums - admin_rss - rss_ex_img - RSS Export Stream Image - Изображение потока - 30005 - 30005 - 0 - - - forums - admin_rss - rss_ex_img_info - Used to show an image in RSS readers - Для отображения изображения в программах для чтения RSS - 30005 - 30005 - 0 - - - forums - admin_rss - rss_optional - * Optional - *Опционально - 30005 - 30005 - 0 - - - forums - admin_rss - rss_ex_enabled - RSS Export Enabled - Включен? - 30005 - 30005 - 0 - - - forums - admin_rss - rss_ex_firstpost - RSS Export Includes First Post of Topic - В RSS Экспорт включать первое сообщение темы? - 30005 + 31006 30005 0 @@ -6267,7 +6429,87 @@ rss_ex_numitem RSS Export No. Items Количество тем RSS Экспорта - 30005 + 31006 + 30005 + 0 + + + forums + admin_rss + rss_ex_img_info + Used to show an image in RSS readers + Для отображения изображения в программах для чтения RSS + 31006 + 30005 + 0 + + + forums + admin_rss + rss_optional + * Optional + *Опционально + 31006 + 30005 + 0 + + + forums + admin_rss + rss_ex_enabled + RSS Export Enabled + Включен? + 31006 + 30005 + 0 + + + forums + admin_rss + rss_ex_firstpost + RSS Export Includes First Post of Topic + В RSS Экспорт включать первое сообщение темы? + 31006 + 30005 + 0 + + + forums + admin_rss + rss_ex_title + RSS Export Stream (Channel) Title + Название + 31006 + 30005 + 0 + + + forums + admin_rss + rss_ex_desc + RSS Export Stream (Channel) Description + Описание + 31006 + 30005 + 0 + + + forums + admin_rss + rss_ex_img + RSS Export Stream Image + Изображение потока + 31006 + 30005 + 0 + + + forums + admin_rss + rss_ex_update + Update All RSS Export Caches... + Обновить все кеши RSS + 31006 30005 0 @@ -6277,7 +6519,7 @@ rss_ex_recache Recache RSS Export Stream... Обновить все кеши RSS Экспорта - 30005 + 31006 30005 0 @@ -6287,7 +6529,7 @@ rss_ex_create Create New RSS Export Stream... Создать новый поток - 30005 + 31006 30005 0 @@ -6297,7 +6539,7 @@ rss_ex_delete Delete RSS Export Stream... Удалить поток - 30005 + 31006 30005 0 @@ -6307,7 +6549,7 @@ rss_ex_edit Edit RSS Export Stream... Изменить - 30005 + 31006 30005 0 @@ -6317,7 +6559,7 @@ rss_options Options Действия - 30005 + 31006 30005 0 @@ -6327,7 +6569,7 @@ rss_enabled Enabled Статус - 30005 + 31006 30005 0 @@ -6337,17 +6579,7 @@ rss_desc RSS Description Описание - 30005 - 30005 - 0 - - - forums - admin_rss - rss_title - RSS Title - Название потока - 30005 + 31006 30005 0 @@ -6357,7 +6589,17 @@ rss_ex_streams RSS Export Streams Потоки RSS Экспорта - 30005 + 31006 + 30005 + 0 + + + forums + admin_rss + rss_title + RSS Title + Название потока + 31006 30005 0 @@ -6367,7 +6609,7 @@ im_noinc not be incremented.]]> не будет увеличен.]]> - 30005 + 31006 30005 0 @@ -6377,7 +6619,7 @@ im_redforum The specified forum is either a redirect forum, or a category, and cannot display new topics. Указанный форум — форум переадресации или категория, или же невозможно открывать новые темы в нем. - 30005 + 31006 30005 0 @@ -6387,17 +6629,7 @@ im_memval We could not validate the member used to import articles. Мы не можем разрешить пользователя, используемого для импорта статей. - 30005 - 30005 - 0 - - - forums - admin_rss - im_invdate - An invalid date was found in at least one of the RSS articles -- current time will be used instead. - Найдена некорректная дата в не менее, чем одной RSS статье — будет использоваться текущее время. - 30005 + 31006 30005 0 @@ -6407,27 +6639,17 @@ im_nodesc At least one article was missing a title or a description/content field. If all articles are missing both fields, nothing would import. Otherwise IP.Board would skip just the items missing both a title and content. Не менее, чем одна статья имеет некорректный заголовок или содержание. Если все статьи имеют оба некорректных поля, ничего не импортируется. IPB пропустит эти данные. - 30005 + 31006 30005 0 forums admin_rss - im_nocontent - We could not find any actual content to import (topics, news articles, etc.) - Не найдено настоящего контента (темы, новости и т.д.) (нечего импортировать) - 30005 - 30005 - 0 - - - forums - admin_rss - im_topiccount - We found %s article(s)/topic(s) in the RSS feed. - Найдено %s статей/тем в RSS. - 30005 + im_invdate + An invalid date was found in at least one of the RSS articles -- current time will be used instead. + Найдена некорректная дата в не менее, чем одной RSS статье — будет использоваться текущее время. + 31006 30005 0 @@ -6437,7 +6659,27 @@ im_nodate A date was not found in at least one of the RSS articles -- current time will be used instead. Дата не найдена в не менее, чем одной RSS статье — будет использоваться текущее время. - 30005 + 31006 + 30005 + 0 + + + forums + admin_rss + im_topiccount + We found %s article(s)/topic(s) in the RSS feed. + Найдено %s статей/тем в RSS. + 31006 + 30005 + 0 + + + forums + admin_rss + im_nocontent + We could not find any actual content to import (topics, news articles, etc.) + Не найдено настоящего контента (темы, новости и т.д.) (нечего импортировать) + 31006 30005 0 @@ -6447,27 +6689,7 @@ im_nocharset Невозможно определить кодировку RSS. - 30005 - 30005 - 0 - - - forums - admin_rss - im_nochannels - We could not find any changes in the RSS feed (nothing to import). If you believe you received this in error, please contacting the site that serves the feed. - Невозможно найти какие-либо изменений в указанной RSS (нечего импортировать). Если вы считаете, что это ошибка, пожалуйста, свяжитесь с сайтом, который предоставляет поток. - 30005 - 30005 - 0 - - - forums - admin_rss - im_charset - %s.]]> - %s. ]]> - 30005 + 31006 30005 0 @@ -6477,37 +6699,27 @@ im_charset_cor %s (correct).]]> %s (корректная)]]> - 30005 + 31006 30005 0 forums admin_rss - im_noitems - No RSS items to import. - Нет RSS записей для импортирования. - 30005 + im_nochannels + We could not find any changes in the RSS feed (nothing to import). If you believe you received this in error, please contacting the site that serves the feed. + Невозможно найти какие-либо изменений в указанной RSS (нечего импортировать). Если вы считаете, что это ошибка, пожалуйста, свяжитесь с сайтом, который предоставляет поток. + 31006 30005 0 forums admin_rss - im_recached - RSS Import(s) Recached! - Кеш RSS обновлен - 30005 - 30005 - 0 - - - forums - admin_rss - im_nourl - There was no URL entered to validate. Please try again. - URL адрес для проверки не введен. Попробуйте еще раз. - 30005 + im_charset + %s.]]> + %s. ]]> + 31006 30005 0 @@ -6517,7 +6729,7 @@ im_doc_type %s, but you entered %s.]]> %s, но вы указали — %s. ]]> - 30005 + 31006 30005 0 @@ -6527,7 +6739,37 @@ im_http HTTP Status Code: HTTP Код статуса: - 30005 + 31006 + 30005 + 0 + + + forums + admin_rss + im_recached + RSS Import(s) Recached! + Кеш RSS обновлен + 31006 + 30005 + 0 + + + forums + admin_rss + im_nourl + There was no URL entered to validate. Please try again. + URL адрес для проверки не введен. Попробуйте еще раз. + 31006 + 30005 + 0 + + + forums + admin_rss + im_noitems + No RSS items to import. + Нет RSS записей для импортирования. + 31006 30005 0 @@ -6537,7 +6779,7 @@ im_notitle - 30005 + 31006 30005 0 @@ -6547,7 +6789,7 @@ im_noimport has no items to import. нет данных в канале для импорта. - 30005 + 31006 30005 0 @@ -6557,17 +6799,7 @@ im_save Save Changes Сохранить - 30005 - 30005 - 0 - - - forums - admin_rss - im_edit - Edit RSS Import Stream - Редактирование: - 30005 + 31006 30005 0 @@ -6577,17 +6809,17 @@ im_full - 30005 + 31006 30005 0 forums admin_rss - im_notneeded - Not Needed - Не требуется - 30005 + im_edit + Edit RSS Import Stream + Редактирование: + 31006 30005 0 @@ -6597,7 +6829,7 @@ im_createnew Create New RSS Import Stream Создание RSS потока импорта - 30005 + 31006 30005 0 @@ -6607,7 +6839,7 @@ im_created RSS Import stream has been created. RSS поток импорта создан. - 30005 + 31006 30005 0 @@ -6617,7 +6849,7 @@ im_edited RSS Import stream has been edited. RSS поток импорта изменен. - 30005 + 31006 30005 0 @@ -6627,7 +6859,7 @@ im_noforumperm Пожалуйста, выберите другой форум для импорта. Один из выбранных не может получать темы. - 30005 + 31006 30005 0 @@ -6637,7 +6869,7 @@ im_noforum Please select another forum to import into. The one selected does not exist. Пожалуйста, выберите другой форум для импорта. Один из выбранных не существует. - 30005 + 31006 30005 0 @@ -6647,7 +6879,7 @@ im_nomember We could not find the member called %s. Please double-check the name. Не удалось найти пользователя. Внимательно проверьте имя. - 30005 + 31006 30005 0 @@ -6657,7 +6889,7 @@ im_noopen Could not open %s to locate channels. This may be a temporary issue. Please confirm the URL is correct. Нельзя открыть %s для локальных каналов. Возможно это временная проблема. Проверьте правильность ввода ссылки на поток. - 30005 + 31006 30005 0 @@ -6667,7 +6899,7 @@ im_completeform You must complete the entire form. Please try again. Вы должны заполнить все поля. Попробуйте еще раз. - 30005 + 31006 30005 0 @@ -6677,7 +6909,7 @@ im_valresults Validation Results for %s
       ·%s]]>
      %s
       ·%s ]]>
      - 30005 + 31006 30005 0 @@ -6687,27 +6919,17 @@ im_title RSS Import Manager Управление потоками RSS - 30005 + 31006 30005 0 forums admin_rss - im_topicsremoved - topics removed. - тем удалено. - 30005 - 30005 - 0 - - - forums - admin_rss - im_noid - No ID was passed. Please try again. - Не один ID не выбран. Попробуйте еще раз. - 30005 + im_notneeded + Not Needed + Не требуется + 31006 30005 0 @@ -6717,17 +6939,17 @@ im_noarticles %s has no imported articles to remove.]]> %s не был произведен.]]> - 30005 + 31006 30005 0 forums admin_rss - im_removed - RSS Import steam has been removed. - RSS поток импорта удален. - 30005 + im_noid + No ID was passed. Please try again. + Не один ID не выбран. Попробуйте еще раз. + 31006 30005 0 @@ -6737,7 +6959,27 @@ im_findtopics We could not locate any topics to delete. Темы для удаления не найдены. - 30005 + 31006 + 30005 + 0 + + + forums + admin_rss + im_topicsremoved + topics removed. + тем удалено. + 31006 + 30005 + 0 + + + forums + admin_rss + im_removed + RSS Import steam has been removed. + RSS поток импорта удален. + 31006 30005 0 @@ -6747,7 +6989,7 @@ im_noload Could not load the RSS stream from the database. It may be missing. Невозможно загрузить строку RSS из базы данных. Возможно, ее просто нет. - 30005 + 31006 30005 0 @@ -6757,17 +6999,7 @@ ex_recached RSS Export(s) Recached! Кеш RSS Экспорта успешно обновлен - 30005 - 30005 - 0 - - - forums - admin_rss - ex_title - RSS Export Manager - Управление потоками RSS Экспорта - 30005 + 31006 30005 0 @@ -6777,7 +7009,17 @@ ex_save Save Changes Сохранить - 30005 + 31006 + 30005 + 0 + + + forums + admin_rss + ex_title + RSS Export Manager + Управление потоками RSS Экспорта + 31006 30005 0 @@ -6787,7 +7029,7 @@ ex_edit Edit RSS Export Stream Изменение потока RSS Экспорта - 30005 + 31006 30005 0 @@ -6797,7 +7039,7 @@ ex_createnew Create New RSS Export Stream Создание нового потока RSS экспорта - 30005 + 31006 30005 0 @@ -6807,7 +7049,7 @@ ex_edited RSS Export stream has been edited. Поток RSS Экспорта изменен. - 30005 + 31006 30005 0 @@ -6817,7 +7059,7 @@ ex_created RSS Export stream has been created. Поток RSS Экспорта создан. - 30005 + 31006 30005 0 @@ -6827,7 +7069,7 @@ ex_completeform You must complete the entire form. Please try again. Вы должны заполнить все поля. Попробуйте еще раз. - 30005 + 31006 30005 0 @@ -6837,7 +7079,7 @@ ex_removed RSS Export stream has been removed. Поток RSS Экспорта удален. - 30005 + 31006 30005 0 @@ -6847,7 +7089,7 @@ ex_noid No ID was passed. Please try again. Не один ID не выбран. Попробуйте еще раз. - 30005 + 31006 30005 0 @@ -6857,7 +7099,7 @@ ex_noload Could not load the RSS stream from the database. It may be missing. Невозможно загрузить строку RSS из базы данных. Возможно ее просто нет. - 30005 + 31006 30005 0 @@ -6867,7 +7109,7 @@ ex_opt_rating Topic Rating По рейтингу - 30006 + 31006 30006 0 @@ -6877,7 +7119,7 @@ ex_opt_starter Topic Starter По последнему автору - 30006 + 31006 30006 0 @@ -6887,7 +7129,7 @@ ex_opt_views Topic Views По кол-ву просмотров - 30006 + 31006 30006 0 @@ -6897,7 +7139,7 @@ ex_opt_last Topic Last Post По последнему сообщению - 30006 + 31006 30006 0 @@ -6907,7 +7149,7 @@ ex_opt_start Topic Start Date По дате создания темы - 30006 + 31006 30006 0 @@ -6917,7 +7159,7 @@ ex_opt_asc Ascending (0-9) По возрастанию (0-9) - 30006 + 31006 30006 0 @@ -6927,7 +7169,7 @@ ex_opt_desc Descending (9-0) По убыванию (9-0) - 30006 + 31006 30006 0 @@ -6937,17 +7179,57 @@ im_channelcount We found %s channel(s) in the RSS feed. Найдено %s каналов в RSS потоке. - 30010 + 31006 30010 0 forums - admin_stats - stats_dateto - Date To ]]> - Дата по]]> - 30005 + admin_rss + rss_im_remove + Remove RSS Articles... + Удалить все записи + 31006 + 30005 + 0 + + + forums + admin_rss + rss_im_update + Update RSS Import... + Обновить + 31006 + 30005 + 0 + + + forums + admin_rss + rss_im_validate + Validate RSS Stream... + Проверить + 31006 + 30005 + 0 + + + forums + admin_rss + rss_im_create + Create New RSS Import Stream... + Создать новый поток + 31006 + 30005 + 0 + + + forums + admin_rss + rss_im_updateall + Update All RSS Imports... + Обновить все кеши RSS + 31006 30005 0 @@ -6957,38 +7239,18 @@ stats_timescale Time Scale ]]> Период времени]]> - 30005 + 31006 30005 0 forums admin_stats - stats_sorting - Result Sorting ]]> - Сортировка результатов]]> - 30005 - 30005 - 0 - - - forums - admin_stats - stats_show - Show - Показать - 30005 - - 0 - - - forums - admin_stats - stats_total - Total]]> - Всего]]> - 30005 - 30005 + stats_dateto + Date To ]]> + Дата по]]> + 31006 + 31006 0 @@ -6997,7 +7259,27 @@ stats_datefrom Date From ]]> Дата с]]> - 30005 + 31006 + 31006 + 0 + + + forums + admin_stats + stats_total + Total]]> + Всего]]> + 31006 + 30005 + 0 + + + forums + admin_stats + stats_results + Results + Результат + 31006 30005 0 @@ -7007,18 +7289,8 @@ stats_count Count Кол-во - 30005 - - 0 - - - forums - admin_stats - stats_results - Results - Результат - 30005 - + 31006 + 31006 0 @@ -7027,8 +7299,8 @@ stats_date Date Дата - 30005 - + 31006 + 31006 0 @@ -7037,7 +7309,7 @@ stats_views_nav Topic Views Просмотры тем - 30005 + 31006 0 @@ -7047,8 +7319,8 @@ stats_title Statistics Center Статистика - 30005 - + 31006 + 30005 0 @@ -7057,18 +7329,8 @@ stats_desc Descending - Newest dates first По убыванию — первые: самые новые - 30005 - - 0 - - - forums - admin_stats - stats_asc - Ascending - Oldest dates first - По возрастанию — первые: самые старые - 30005 - + 31006 + 31006 0 @@ -7077,8 +7339,18 @@ stats_monthly Monthly Ежемесячно - 30005 - + 31006 + 30005 + 0 + + + forums + admin_stats + stats_asc + Ascending - Oldest dates first + По возрастанию — первые: самые старые + 31006 + 31006 0 @@ -7087,7 +7359,7 @@ stats_weekly Weekly Еженедельно - 30005 + 31006 0 @@ -7097,7 +7369,7 @@ stats_views Topic View Statistics Статистика просмотров тем - 30005 + 31006 0 @@ -7107,18 +7379,8 @@ stats_daily Daily Ежедневно - 30005 - - 0 - - - forums - admin_stats - stats_weekno - Week # - Неделя # - 30005 - + 31006 + 31006 0 @@ -7127,7 +7389,17 @@ stats_title_results Statistic Center Results Результаты статистики - 30005 + 31006 + 30005 + 0 + + + forums + admin_stats + stats_weekno + Week # + Неделя # + 31006 0 @@ -7137,8 +7409,8 @@ stats_msg_nav Sent Personal Messages Отправленные личные сообщения - 30005 - + 31006 + 30005 0 @@ -7147,8 +7419,8 @@ stats_to to по - 30005 - + 31006 + 30005 0 @@ -7157,27 +7429,17 @@ stats_msg PM Sent Statistics Статистика личных сообщений - 30005 + 31006 30005 0 - - forums - admin_stats - stats_fromincorrect - - «Дата с:» — неверное время. Пожалуйста, проверьте введенное вами значение. - 30005 - - 0 - forums admin_stats stats_post_nav Number of Posts Количество сообщений - 30005 + 31006 30005 0 @@ -7187,7 +7449,7 @@ stats_post Post Statistics Статистика сообщений - 30005 + 31006 30005 0 @@ -7197,7 +7459,7 @@ stats_topic_nav Topics Started Новых тем - 30005 + 31006 0 @@ -7207,8 +7469,8 @@ stats_topic New Topic Statistics Статистика новых тем - 30005 - + 31006 + 30005 0 @@ -7217,8 +7479,8 @@ stats_reg_nav Registered Users Зарегистрировавшиеся пользователи - 30005 - + 31006 + 30005 0 @@ -7227,8 +7489,18 @@ stats_reg Registration Statistics Статистика регистраций - 30005 - + 31006 + 30005 + 0 + + + forums + admin_stats + stats_fromincorrect + + «Дата с:» — неверное время. Пожалуйста, проверьте введенное вами значение. + 31006 + 31006 0 @@ -7237,18 +7509,8 @@ stats_toincorrect «Дата до:» — неверное время. Пожалуйста, проверьте введенное вами значение - 30005 - - 0 - - - forums - admin_stats - stats_dec - December - Декабрь - 30005 - + 31006 + 30005 0 @@ -7257,8 +7519,18 @@ stats_nov November Ноябрь - 30005 - + 31006 + 30005 + 0 + + + forums + admin_stats + stats_dec + December + Декабрь + 31006 + 31006 0 @@ -7267,18 +7539,8 @@ stats_oct October Октябрь - 30005 - - 0 - - - forums - admin_stats - stats_sep - September - Сентябрь - 30005 - + 31006 + 30005 0 @@ -7287,8 +7549,18 @@ stats_aug August Август - 30005 - + 31006 + 31006 + 0 + + + forums + admin_stats + stats_sep + September + Сентябрь + 31006 + 30005 0 @@ -7297,8 +7569,8 @@ stats_jul July Июль - 30005 - + 31006 + 31006 0 @@ -7307,18 +7579,8 @@ stats_jun June Июнь - 30005 - - 0 - - - forums - admin_stats - stats_may - May - Май - 30005 - + 31006 + 31006 0 @@ -7327,8 +7589,18 @@ stats_apr April Апрель - 30005 - + 31006 + 31006 + 0 + + + forums + admin_stats + stats_may + May + Май + 31006 + 30005 0 @@ -7337,8 +7609,8 @@ stats_mar March Март - 30005 - + 31006 + 30005 0 @@ -7347,8 +7619,8 @@ stats_feb February Февраль - 30005 - 30005 + 31006 + 31006 0 @@ -7357,8 +7629,8 @@ stats_jan January Январь - 30005 - 30005 + 31006 + 31006 0 @@ -7367,17 +7639,7 @@ timescale_weekly Weekly За неделю - 30006 - 30006 - 0 - - - forums - admin_stats - timescale_monthly - Monthly - За месяц - 30006 + 31006 30006 0 @@ -7387,9 +7649,99 @@ timescale_daily Daily За день - 30006 + 31006 30006 0 + + forums + admin_stats + timescale_monthly + Monthly + За месяц + 31006 + 30006 + 0 + + + forums + admin_stats + stats_spam + Spam Service Stats + Статистика спам сервиса + 31006 + 31001 + 0 + + + forums + admin_stats + spam_graph_title + Recent Registrations + Последние регистрации + 31006 + 31006 + 0 + + + forums + admin_stats + spam_spam + Spam + Спам + 31006 + 31006 + 0 + + + forums + admin_stats + spam_ok + Ok + ОК + 31006 + 31006 + 0 + + + forums + admin_stats + statisnotspam + Not Spam + Не спам + 31006 + 31006 + 0 + + + forums + admin_stats + statisspam + Spam + Спам + 31006 + 31006 + 0 + + + forums + admin_stats + stats_sorting + Result Sorting ]]> + Сортировка результатов]]> + 31006 + 30005 + 0 + + + forums + admin_stats + stats_show + Show + Показать + 31006 + 30005 + 0 +
      diff --git a/upload/admin/applications/forums/xml/forums_help.xml b/upload/admin/applications/forums/xml/forums_help.xml index 2fdeb190..cc3f94f2 100644 --- a/upload/admin/applications/forums/xml/forums_help.xml +++ b/upload/admin/applications/forums/xml/forums_help.xml @@ -4,7 +4,7 @@ Сообщения Редактор сообщений
      -Есть две версии редактора сообщений: стандартный и визуальный. Выбрать какой из них использовать вы моежет в ваших настройках.
      +Есть две версии редактора сообщений: стандартный и визуальный. Выбрать, какой из них использовать, вы можете в ваших настройках.


      Опросы
      @@ -36,8 +36,8 @@ Статус форума задается иконкой:
      Обычный форум. Нет непрочитанных сообщений.
      Обычный форум. Есть непрочитанные сообщения.
      - Форум, содержащий под-форумы. Нет непрочитанных сообщений.
      - Форум, содержащий под-форумы. Есть непрочитанные сообщения.
      + Форум, содержащий подфорумы. Нет непрочитанных сообщений.
      + Форум, содержащий подфорумы. Есть непрочитанные сообщения.
      Закрытый форум. Нет непрочитанных сообщений.
      Закрытый форум. Есть непрочитанные сообщения.
      Форум только для чтения.
      @@ -75,7 +75,7 @@ Под каждым сообщением в теме имеется кнопка «Цитата». При нажатии на эту кнопку, вы сможете ответить в тему, с цитированием того сообщения, над которым нажали данную кнопку. Таким образом, при нажатии на эту кнопку, вы попадете на страницу написания ответа в тему, где под формой ответа вы увидите дополнительное текстовое окно, с текстом процитированного сообщения, которое вы можете отредактировать на ваше усмотрение.

      Опции сообщения
      -Вы можете изменить или удалить сообщение нажав соответственно на кнопки "Изменить" или "Удалить".
      +Вы можете изменить или удалить сообщение, нажав соответственно на кнопки "Изменить" или "Удалить".


      Опросы
      @@ -91,13 +91,13 @@ Уведомления
      На форуме существует возможность уведомлять вас о новых сообщениях в темах. Многие пользователи с успехом используют эту функцию для своевременного извещения о том, что в теме имеются новые сообщения.

      -Для слежением за форумом или темой нажмите на кнопку "Подписаться".
      +Для слежения за форумом или темой нажмите на кнопку "Подписаться".

      Есть несколько типов уведомления:
      • Не уведомлять: При выборе этой опции вы не будете получать никаких уведомлений на e-mail, но все новые и обновленные темы будут сохранены на вашей личной странице подписок.
      • Уведомление с задержкой: При выборе этой опции вы будете уведомлены о новых темах или ответах во время своего отсутствия на форуме.
      • Немедленное уведомление: При выборе этой опции вы будете уведомлены о новых темах или ответах, независимо от того, присутствуете ли вы или отсутствуете на форуме.
      • Ежедневное уведомление: При выборе этой опции вы будете ежедневно получать краткое уведомление обо всех новых темах и сообщениях за текущий день.
      • Еженедельное уведомление: При выборе этой опции вы будете еженедельно получать краткое уведомление обо всех новых сообщениях за текущую неделю.



      -Отменить подписки на любой из разделов или тем, на которые вы подписаны, вы можете в личных настройках или зайдя в тему или форум и нажав на "Остановить отслеживание темы".]]>
      +Отменить подписки на любой из разделов или тем, на которые вы подписаны, вы можете в личных настройках или, зайдя в тему или форум и нажав на "Остановить отслеживание темы".]]> Помощь по форумам, темам, опросам и сообщениям. 4 forums diff --git a/upload/admin/applications/forums/xml/forums_lofi_templates.xml b/upload/admin/applications/forums/xml/forums_lofi_templates.xml deleted file mode 100644 index f61d06d1..00000000 --- a/upload/admin/applications/forums/xml/forums_lofi_templates.xml +++ /dev/null @@ -1,1089 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/upload/admin/applications/forums/xml/forums_mobile_templates.xml b/upload/admin/applications/forums/xml/forums_mobile_templates.xml new file mode 100644 index 00000000..c644d1ff --- /dev/null +++ b/upload/admin/applications/forums/xml/forums_mobile_templates.xml @@ -0,0 +1,2550 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/upload/admin/applications/forums/xml/forums_root_templates.xml b/upload/admin/applications/forums/xml/forums_root_templates.xml index 6b9c3367..84703e1d 100644 --- a/upload/admin/applications/forums/xml/forums_root_templates.xml +++ b/upload/admin/applications/forums/xml/forums_root_templates.xml @@ -3,13 +3,14 @@ + + + @@ -488,11 +605,7 @@ - - - {$this->lang->words['attached_file']} - @@ -511,20 +624,22 @@ ]]> forumAttachments $title, $rows, $pages - 1260269067 + 1288018124 0 0 0 + root - + @@ -1090,10 +1282,11 @@ ]]> bbcodePopUpList $rows - 1260269068 + 1288018124 0 0 0 + root @@ -1150,10 +1345,11 @@ ]]> deleteTopicForm $forum, $topic - 1260269068 + 1288018124 0 0 0 + root + + + + + - - - @@ -2184,10 +2470,11 @@ ]]> attachiFrame $JSON, $id - 1260269068 + 1288018125 0 0 0 + root @@ -2704,31 +2999,33 @@

    - « {$this->lang->words['back_topic']} + {$this->lang->words['_laquo']} {$this->lang->words['back_topic']}

    ]]> choose_form - 1260269068 + 1288018125 0 0 0 + root @@ -2811,30 +3110,64 @@ {$announce['announce_post']} -
      + ]]> announcement_show - 1260269068 + 1288018125 0 0 0 + root + - - + + + + + +
      @@ -859,11 +1078,11 @@ {$pages}
      -
      +

      {$this->lang->words['mlist_adv_filt_opt']}

      ]]> showOnlineList - 1260269068 + 1288018125 0 0 0 + root
      + + - - - + + + + @@ -2291,26 +2791,26 @@ function check_form() ]]> coreAttachments - 1260269068 + 1288018125 0 0 0 + root + + + + + + diff --git a/upload/admin/applications/members/xml/members_settings.xml b/upload/admin/applications/members/xml/members_settings.xml index afd6dfd7..ec717047 100644 --- a/upload/admin/applications/members/xml/members_settings.xml +++ b/upload/admin/applications/members/xml/members_settings.xml @@ -1,207 +1,6 @@ - - 1 - spamservice - Сервис мониторинга спама - Настройки для антиспам сервиса от IBR - Members - members - 0 - - - Включить работу с сервисом? - - 53 - yes_no - spam_service_enabled - 0 - - - 1 - 1 - Базовые настройки - 0 - 1 - - spamservice - 0 - - - Ключ для работы с сервисом - Получить ключ вы можете в клиент-центре - 46 - input - spam_service_api_key - - - - 1 - 2 - - 0 - 1 - - spamservice - 0 - - - - Включение данной опции позволит отправлять информацию о пометке пользователя как спамера на сервис антиспама. - 46 - yes_no - spam_service_send_to_ips - 1 - - - 1 - 3 - - 0 - 1 - - spamservice - 0 - - - Лимит времени соединения с сервисом - В течении указанного времени (в секундах) форум будет ждать ответа от сервиса при соединении с ним. - 46 - input - spam_service_timeout - 15 - - - 1 - 4 - - 0 - 1 - - spamservice - 0 - - - Действие в случае истечения лимита времени на соединение с сервисом - - 46 - dropdown - spam_service_action_timeout - 1 - 1=Продолжить регистрацию -2=Пометить пользователя как нуждающегося в проверке администратором -3=Зарегистрировать пользователя и сразу забанить - - 1 - 5 - Взаимодействие с сервисом - 0 - 1 - - spamservice - 0 - - - Действие для код-ответа 0 - Код-ответа 0 означает, что сервис не смог правильно обработать запрос по каким-то техническим причинам. - 46 - dropdown - spam_service_action_0 - 1 - 1=Продолжить регистрацию -2=Пометить пользователя как нуждающегося в проверке администратором -3=Зарегистрировать пользователя и сразу забанить - - 1 - 6 - - 0 - 1 - - spamservice - 0 - - - Действие для код-ответа 1 - Код-ответа 1 высылается сервисом в случае если регистрирующийся пользователь не может быть спамером. - 46 - dropdown - spam_service_action_1 - 1 - 1=Продолжить регистрацию -2=Пометить пользователя как нуждающегося в проверке администратором -3=Зарегистрировать пользователя и сразу забанить - - 1 - 7 - - 0 - 1 - - spamservice - 0 - - - Действие для код-ответа 2 - Код-ответа 2 высылается сервисом в случае если регистрирующийся пользователь может-быть вероятным спамером - 46 - dropdown - spam_service_action_2 - 1 - 1=Продолжить регистрацию -2=Пометить пользователя как нуждающегося в проверке администратором -3=Зарегистрировать пользователя и сразу забанить - - 1 - 8 - - 0 - 1 - - spamservice - 0 - - - Действие для код-ответа 3 - Код-ответа 3 высылается сервисом в случае если регистрирующийся пользователь может быть спамером - 46 - dropdown - spam_service_action_3 - 2 - 1=Продолжить регистрацию -2=Пометить пользователя как нуждающегося в проверке администратором -3=Зарегистрировать пользователя и сразу забанить - - 1 - 9 - - 0 - 1 - - spamservice - 0 - - - Действие для код-ответа 4 - Код-ответа 4 высылается сервисом в случае если регистрирующийся пользователь спамер - 46 - dropdown - spam_service_action_4 - 3 - 1=Продолжить регистрацию -2=Пометить пользователя как нуждающегося в проверке администратором -3=Зарегистрировать пользователя и сразу забанить - - 1 - 10 - - 0 - 1 - - spamservice - 0 - 1 personalmessagesetup @@ -215,7 +14,7 @@ Разрешить ВВ-коды? Если функция включена, то пользователи могут использовать BB-коды в личных сообщениях (далее ЛС).]]> - 19 + 21 yes_no msg_allow_code 1 @@ -233,7 +32,7 @@ Разрешить HTML? Если функция включена, то пользователи могут использовать HTML код в личных сообщениях. Рекомендуем не включать данную функцию из соображений безопасности. - 19 + 21 yes_no msg_allow_html 0 @@ -251,7 +50,7 @@ Максимальное количество ЛС на одной странице при просмотре списка сообщений По умолчанию - 50. - 19 + 21 input show_max_msg_list 50 @@ -269,7 +68,7 @@ Не игнорируемые группы: Пользователи не смогут блокировать получение личных сообщений от пользователей выбранных групп. Можно выбрать несколько. - 19 + 21 multi unblockable_pm_groups @@ -301,9 +100,9 @@ if ( $show == 1 ) 0 - Отключить лимит личного ящик для групп: + Отключить лимит личного ящика для групп: Пользователи выбранных групп смогут отправлять личные сообщения другим пользователям, даже если их личный ящик переполнен. - 19 + 21 multi override_inbox_full @@ -346,7 +145,7 @@ if ( $show == 1 ) Включить систему предупреждений? - 20 + 22 yes_no warn_on 1 @@ -364,7 +163,7 @@ if ( $show == 1 ) Минимальный уровень предупреждений При регистрации уровень предупреждений пользователя всегда нулевой.]]> - 20 + 22 input warn_min 0 @@ -382,7 +181,7 @@ if ( $show == 1 ) Максимальный уровень предупреждений - 20 + 22 input warn_max 10 @@ -400,7 +199,7 @@ if ( $show == 1 ) Разрешить предупреждать пользователя, если у него уже максимальный/минимальный уровень предупреждений? - 20 + 22 yes_no warn_past_max 0 @@ -417,8 +216,8 @@ if ( $show == 1 ) Защищенные группы - Вы можете использовать выбрать более одной (используя клавишу Ctrl).]]> - 20 + Вы можете использовать выбрать более одной (используя клавишу Ctrl).]]> + 22 multi warn_protected @@ -452,7 +251,7 @@ if ( $show == 1 ) Разрешить пользователю видеть свои предупреждения? Если включено, то пользователи смогут видеть свой текущий уровень предупреждений и их причины. - 20 + 22 yes_no warn_show_own 0 @@ -470,7 +269,7 @@ if ( $show == 1 ) Тип отображения предупреждений? - 20 + 22 dropdown warn_show_rating 0 @@ -489,7 +288,7 @@ if ( $show == 1 ) Модераторы могут блокировать пользователей? Администраторы всегда могут блокировать через панель предупреждений.]]> - 20 + 22 yes_no warn_mod_ban 1 @@ -507,7 +306,7 @@ if ( $show == 1 ) Модераторы могут включать проверку всех публикуемых пользователем сообщений? Администраторы всегда могут включать данную проверку через панель предупреждений.]]> - 20 + 22 yes_no warn_mod_modq 1 @@ -525,7 +324,7 @@ if ( $show == 1 ) Модераторы могут отключать пользователю возможность публикации? Администраторы всегда могут отключать публикацию через панель предупреждений.]]> - 20 + 22 yes_no warn_mod_post 1 @@ -543,7 +342,7 @@ if ( $show == 1 ) Количество предупреждений одному пользователю от одного модератора за день - 20 + 22 input warn_mod_day 3 @@ -559,9 +358,9 @@ if ( $show == 1 ) 0 - Супер-модераторы могут блокировать пользователей? + Супермодераторы могут блокировать пользователей? Администраторы по умолчанию могут блокировать через панель предупреждений. - 20 + 22 yes_no warn_gmod_ban 1 @@ -569,7 +368,7 @@ if ( $show == 1 ) 1 12 - Права супер-модераторов + Права супермодераторов 0 1 @@ -577,9 +376,9 @@ if ( $show == 1 ) 0 - Супер-модераторы могут включать проверку всех публикуемых пользователем сообщений? - Могут ли супер-модераторы включать проверку всех публикуемых пользователем сообщений перед публикацией в форум через панель предупреждений? - 20 + Супермодераторы могут включать проверку всех публикуемых пользователем сообщений? + Могут ли супермодераторы включать проверку всех публикуемых пользователем сообщений перед публикацией в форум через панель предупреждений? + 22 yes_no warn_gmod_modq 1 @@ -595,9 +394,9 @@ if ( $show == 1 ) 0 - Супер-модераторы могут отключать пользователю возможность публикации ? + Супермодераторы могут отключать пользователю возможность публикации ? По умолчанию администраторы могут отключать пользователю возможность публикации через панель предупреждений. - 20 + 22 yes_no warn_gmod_post 1 @@ -613,9 +412,9 @@ if ( $show == 1 ) 0 - Количество предупреждений одному пользователю от одного супер-модератора за день + Количество предупреждений одному пользователю от одного супермодератора за день - 20 + 22 input warn_gmod_day 3 @@ -633,7 +432,7 @@ if ( $show == 1 ) Группы, имеющие доступ к системе жалоб? ]]> - 20 + 22 multi report_mod_group_access 4 @@ -668,7 +467,7 @@ if ( $show == 1 ) Включить уведомление на e-mail? Включить отправку уведомлений модераторам на e-mail. - 20 + 22 yes_no report_nemail_enabled 1 @@ -686,7 +485,7 @@ if ( $show == 1 ) Включить уведомления в ЛС Включает отправку уведомлений модераторам личным сообщением. - 20 + 22 yes_no report_pm_enabled 1 @@ -705,7 +504,7 @@ if ( $show == 1 ) 1 reputation Настройки системы репутаций - Настройки при помощи которых вы можете настроить работу системы репутаций на ваших форумах + Настройки, при помощи которых вы можете настроить работу системы репутаций на ваших форумах Members members 0 @@ -713,7 +512,7 @@ if ( $show == 1 ) Включить систему репутаций? - 21 + 23 yes_no reputation_enabled 1 @@ -731,7 +530,7 @@ if ( $show == 1 ) Отключить репутацию группам: Пользователи, выбранных групп, не смогут получать оценки репутации. - 21 + 23 multi reputation_protected_groups @@ -765,7 +564,7 @@ if ( $show == 1 ) Тип репутации Тип позволяет вам выбрать режим работы системы репутации. Вы можете настроить репутацию так чтобы пользователи могли выставлять только положительные оценки, или только отрицательные. - 21 + 23 dropdown reputation_point_types both @@ -785,7 +584,7 @@ both=любое изменение репутации Выделять публикации, имеющий более X баллов Введите число баллов, которое требуется иметь публикации, чтобы она выделялась/подсвечивалась на странице. - 21 + 23 input reputation_highlight 50 @@ -803,7 +602,7 @@ both=любое изменение репутации Отображать репутацию пользователей? Включение данной опции позволит выводить репутацию пользователя в его профиле. - 21 + 23 yes_no reputation_show_profile 1 @@ -821,7 +620,7 @@ both=любое изменение репутации Отображать количество баллов публикаций Включение данной опции позволит выводить количество баллов, около каждого оцененного материала. - 21 + 23 yes_no reputation_show_content 1 @@ -839,7 +638,7 @@ both=любое изменение репутации Разрешить пользователям оценивать свои публикации? Включение данной опции позволит авторам выставлять оценку своим публикациям (сообщения, записи и прочее). - 21 + 23 yes_no reputation_can_self_vote 1 @@ -867,7 +666,7 @@ both=любое изменение репутации Символы, допустимые в именах пользователей
      Чтобы разрешить использование только цифр и букв, используйте комбинацию: a-zA-Z0-9]]>
      - 22 + 24 input username_characters @@ -885,7 +684,7 @@ both=любое изменение репутации Отображаемое сообщение об ошибке Совет: Вы можете использовать {chars}, чтобы отобразить разрешенные символы.]]> - 22 + 24 input username_errormsg Имя может содержать только следующие символы: {chars} @@ -903,7 +702,7 @@ both=любое изменение репутации Запретить переводы строк в именах? Запрет переводов строк и html тегов в именах пользователя и отображаемых именах. - 22 + 24 yes_no usernames_nobr 1 @@ -921,7 +720,7 @@ both=любое изменение репутации Разрешить «Отображаемое имя» Если опция включена, пользователи могут ввести «Отображаемое имя», отличное от «Имени пользователя» (для авторизации). Данная функция НЕОБХОДИМА для внешних методов аутентификации. - 22 + 24 yes_no auth_allow_dnames 0 @@ -939,7 +738,7 @@ both=любое изменение репутации Максимальная длина отображаемого имени Максимальное количество символов, допустимое в отображаемом имени. - 22 + 24 input max_user_name_length 26 @@ -957,7 +756,7 @@ both=любое изменение репутации Запретить «Отображаемые имена», совпадающие с существующими «Именами пользователей» Если опция включена, пользователи не могут выбирать «Отображаемое имя», совпадающее с другим «Отображаемым именем» ИЛИ другим «Именем пользователя». Если опция отключена, пользователи не cмогут выбирать только «Отображаемое имя», совпадающее с другим «Отображаемым именем». - 22 + 24 yes_no auth_dnames_nologinname 1 @@ -984,7 +783,7 @@ both=любое изменение репутации Разрешить пользователям выбирать стиль? - 23 + 25 yes_no allow_skins 1 @@ -1002,7 +801,7 @@ both=любое изменение репутации Количество сообщений, необходимых набрать пользователю, чтобы получить возможность изменять свое звание? Введите 0, чтобы запретить пользователям когда-либо изменять свое звание. - 23 + 25 input post_titlechange 500 @@ -1020,7 +819,7 @@ both=любое изменение репутации Отключить префикс/суффикс к именам Данная настройка позволяет глобально отменить добавление префиксов и суффиксов к именам пользователей. - 23 + 25 yes_no ipb_disable_group_psformat 0 @@ -1038,7 +837,7 @@ both=любое изменение репутации Максимальная длина подписи пользователя (в байтах) - 23 + 25 input max_sig_length 10000 @@ -1056,7 +855,7 @@ both=любое изменение репутации Разрешить HTML в подписи? Разрешение данной функции НЕ рекомендуется, если вы не полностью доверяете пользователям, которым разрешено добавлять подпись. - 23 + 25 yes_no sig_allow_html 0 @@ -1074,7 +873,7 @@ both=любое изменение репутации Разрешить BB-коды в подписи? - 23 + 25 yes_no sig_allow_ibc 1 @@ -1092,7 +891,7 @@ both=любое изменение репутации Тип редактора по умолчанию для пользователей - 23 + 25 dropdown ips_default_editor std @@ -1112,7 +911,7 @@ rte=Визуальный Количество сообщений на страницу темы, выбираемых пользователем Например: 5,15,20,25,30
      Вариант 'Использовать значение форума по умолчанию' будет добавлен автоматически]]>
      - 23 + 25 input postpage_contents 5,10,15,20,25,50 @@ -1131,7 +930,7 @@ rte=Визуальный Количество тем на страницу форума, выбираемых пользователем Например: 5,15,20,25,30
      Вариант 'Использовать значение форума по умолчанию' будет добавлен автоматически.]]>
      - 23 + 25 input topicpage_contents 5,10,15,20,25,50 @@ -1149,7 +948,7 @@ rte=Визуальный Чтобы запретить автоматическое удаление, оставьте это поле пустым или введите 0 - 23 + 25 input subs_autoprune 0 @@ -1167,7 +966,7 @@ rte=Визуальный Автоматически подписывать на каждый форум Примечание: Электронные письма будут отправлены только тем, кто выбрал опцию 'Получать письма от администраторов'.]]> - 23 + 25 multi autoforum_sub_groups @@ -1201,7 +1000,7 @@ if ( $show == 1 ) Разрешить использовать аватары? - 23 + 25 yes_no avatars_on 1 @@ -1219,7 +1018,7 @@ if ( $show == 1 ) Разрешенные расширения файлов для аватаров Разделяйте допустимые расширения файлов запятыми (gif,png,jpeg) и т.д. - 23 + 25 input avatar_ext gif,jpg,jpeg,png @@ -1237,7 +1036,7 @@ if ( $show == 1 ) Разрешить пользователям использовать удаленные URL адреса аватаров? - 23 + 25 yes_no avatar_url 1 @@ -1252,10 +1051,28 @@ if ( $show == 1 ) userprofiles 0 + + Время жизни запросов на восстановление пароля + Сколько дней считать запрос на восстановление пароля действительным + 25 + input + lost_pw_prune + 7 + + + 1 + 15 + + 0 + 1 + + userprofiles + 0 + Максимальный размер загружаемого файла аватара (Кб) В килобайтах - 23 + 25 input avup_size_max 50 @@ -1272,8 +1089,8 @@ if ( $show == 1 ) Разрешить использовать граватары? - /Перейдите по ссылке, чтобы узнать, что такое граватар.]]> - 23 + Перейдите по ссылке, чтобы узнать, что такое граватар.]]> + 25 yes_no allow_gravatars 1 @@ -1291,7 +1108,7 @@ if ( $show == 1 ) Максимальные размеры аватара xВЫСОТА), где x — буква английского алфавита]]> - 23 + 25 input avatar_dims 90x90 @@ -1309,7 +1126,7 @@ if ( $show == 1 ) Размеры по умолчанию для галереи аватаров xВЫСОТА), где x — буква английского алфавита]]> - 23 + 25 input avatar_def 80x80 @@ -1327,7 +1144,7 @@ if ( $show == 1 ) Разрешенные расширения файлов для фотографий Разделяйте допустимые расширения файлов запятыми (gif,png,jpeg) и т.д. - 23 + 25 input photo_ext gif,jpg,jpeg,png @@ -1345,7 +1162,7 @@ if ( $show == 1 ) Отключить автоматическое изменение размеров больших фотографий/аватаров? Пользователю необходимо будет изменять размеры изображения вручную. - 23 + 25 yes_no disable_ipbsize 0 @@ -1363,7 +1180,7 @@ if ( $show == 1 ) Разрешить гостям видеть подписи? - 23 + 25 yes_no guests_sig 1 @@ -1381,7 +1198,7 @@ if ( $show == 1 ) Разрешить гостям видеть публикуемые в сообщениях изображения? - 23 + 25 yes_no guests_img 1 @@ -1399,7 +1216,7 @@ if ( $show == 1 ) Разрешить гостям видеть аватары пользователей? - 23 + 25 yes_no guests_ava 1 @@ -1417,7 +1234,7 @@ if ( $show == 1 ) Позволить пользователям оценивать друг друга? - 23 + 25 yes_no pp_allow_member_rate 1 @@ -1435,7 +1252,7 @@ if ( $show == 1 ) В целях безопасности не рекомендуется включать эту опцию. - 23 + 25 yes_no aboutme_html 0 @@ -1453,7 +1270,7 @@ if ( $show == 1 ) - 23 + 25 yes_no aboutme_bbcode 1 @@ -1471,7 +1288,7 @@ if ( $show == 1 ) - 23 + 25 yes_no aboutme_emoticons 1 @@ -1489,7 +1306,7 @@ if ( $show == 1 ) - 23 + 25 yes_no friends_enabled 1 diff --git a/upload/admin/applications/members/xml/members_tasks.xml b/upload/admin/applications/members/xml/members_tasks.xml index 3ee7343a..3791fe55 100644 --- a/upload/admin/applications/members/xml/members_tasks.xml +++ b/upload/admin/applications/members/xml/members_tasks.xml @@ -37,11 +37,29 @@ 0 members + + 39 + Синхронизация с Twitter/Facebook + twitfacesync.php + 1290033579 + -1 + -1 + 1 + -1 + bacf57b98720cb455a2ef23f0d021a6c + 1 + Синхронизация данных в профилях связанных с учетными записями Facebook/Twitter + 1 + twitfacesync + 1 + 0 + members + 15 Обновление просмотров профиля update_profile_views.php - 1259861100 + 1272331560 -1 -1 1 diff --git a/upload/admin/applications/members/xml/members_xmlskin_templates.xml b/upload/admin/applications/members/xml/members_xmlskin_templates.xml index 669a5dc7..a45adc4c 100644 --- a/upload/admin/applications/members/xml/members_xmlskin_templates.xml +++ b/upload/admin/applications/members/xml/members_xmlskin_templates.xml @@ -1,1383 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + @@ -1581,7 +868,7 @@ $content {$member['id']} {$member['members_display_name']} {parse url="showuser={$member['id']}" template="showuser" seotitle="{$member['members_seo_name']}" base="public"} - {parse date="$member['joined']" format="joined"} + {$member['joined']} {IPSLib::makeNameFormatted( $member['group'], $member['member_group_id'] )} {parse format_number="$member['posts']"} {$member['pp_reputation_points']} @@ -1593,10 +880,11 @@ $content ]]> member_list_show - 1260269071 - 1 + 1288018126 + 0 0 0 + xmlskin @@ -1618,18 +906,18 @@ $content - {parse date="$session['running_time']" format="long" relative="false"} + {$session['running_time']} {$session['member_id']} - {$session['member_name']} - {parse url="showuser={$session['member_id']}" base="public"} + + 0 - {$session['member_name']} + @@ -1647,10 +935,921 @@ $content {$links}]]> showOnlineList - 1260269071 - 1 + 1288018126 + 0 0 0 + xmlskin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/upload/admin/applications/members/xml/public_members_language_pack.xml b/upload/admin/applications/members/xml/public_members_language_pack.xml index 8fd71fb1..0bf93ad1 100644 --- a/upload/admin/applications/members/xml/public_members_language_pack.xml +++ b/upload/admin/applications/members/xml/public_members_language_pack.xml @@ -4,440 +4,10 @@ members public_list - show_all - Show All - Показать всех - 30005 - 30005 - 0 - - - members - public_list - sort_by_posts - Total Posts - по количеству сообщений - 30005 - 30005 - 0 - - - members - public_list - sort_by_mname - Sort by Member Name - Сортировать по имени пользователя - 30005 - 30005 - 0 - - - members - public_list - pcount - Post Count - По количеству сообщений - 30005 - 30005 - 0 - - - members - public_list - sorty_by_jdate - Sort by Joined Date - Сортировать по дате регистрации - 30005 - 30005 - 0 - - - members - public_list - reputation - Reputation - Репутация - 30005 - 30005 - 0 - - - members - public_list - members_start_with - View members starting with - Просмотреть пользователей с именами начинающимися с - 30005 - 30005 - 0 - - - members - public_list - m_dd_views - Profile Views - по количеству просмотров профиля - 30005 - 30005 - 0 - - - members - public_list - m_stars - stars - баллов - 30005 - 30005 - 0 - - - members - public_list - m_views - Views - Просмотров - 30005 - 30005 - 0 - - - members - public_list - s_posts - Post count is - Количество сообщений - 30005 - 30005 - 0 - - - members - public_list - m_rating - Rating - Рейтинг - 30005 - 30005 - 0 - - - members - public_list - m_rating_morethan - Rating is higher than - Рейтинг выше чем - 30005 - 30005 - 0 - - - members - public_list - s_lastpost - Last post is - Последнее сообщение - 30005 - 30005 - 0 - - - members - public_list - s_lastvisit - Last visit is - Время последнего посещения - 30005 - 30005 - 0 - - - members - public_list - s_joined - Join date is - Дата регистрации - 30005 - 30005 - 0 - - - members - public_list - photo_only - Must have a photo - Загрузил фотографию - 30005 - 30005 - 0 - - - members - public_list - s_signature - Signature contains - Подпись содержит - 30005 - 30005 - 0 - - - members - public_list - s_name - Member name - По имени пользователя - 30005 - 30005 - 0 - - - members - public_list - s_morethan - more than - больше чем - 30005 - 30005 - 0 - - - members - public_list - s_lessthan - less than - меньше чем - 30005 - 30005 - 0 - - - members - public_list - s_dateformat - (MM-DD-YYYY) - (ДД-ММ-ГГГГ) - 30005 - 30005 - 0 - - - members - public_list - s_begins - begins with - начинается с - 30005 - 30005 - 0 - - - members - public_list - s_contains - contains - содержит - 30005 - 30005 - 0 - - - members - public_list - s_before - before - до - 30005 - 30005 - 0 - - - members - public_list - s_after - after - после - 30005 - 30005 - 0 - - - members - public_list - no_results - No Results - Нет совпадений - 30005 - 30005 - 0 - - - members - public_list - member_group - Group - Группа - 30005 - 30005 - 0 - - - members - public_list - member_joined - Joined - Дата - 30005 - 30005 - 0 - - - members - public_list - sort_by_name - Member Name - по имени пользователя - 30005 - 30005 - 0 - - - members - public_list - sorting_text_by - by - , сортировать - 30005 - 30005 - 0 - - - members - public_list - sorting_text_with - with - по - 30005 - 30005 - 0 - - - members - public_list - member_name - Name - Имя - 30005 - 30005 - 0 - - - members - public_list - member_posts - Posts - Сообщений - 30005 - 30005 - 0 - - - members - public_list - descending_order - Descending Order - порядке убывания - 30005 - 30005 - 0 - - - members - public_list - ascending_order - Ascending Order - порядке возрастания - 30005 - 30005 - 0 - - - members - public_list - sorting_text_in - in - в - 30005 - 30005 - 0 - - - members - public_list - sort_submit - Apply Filters - Применить фильтры - 30005 - 30005 - 0 - - - members - public_list - sort_by_joined - Join Date - по дате регистрации - 30005 - 30005 - 0 - - - members - public_list - page_title - Member List - Список пользователей - 30005 - 30005 - 0 - - - members - public_list - mlist_header - Member List - Список пользователей - 30005 - - 0 - - - members - public_list - mlist_adv_filt_opt - Advanced Filter Options - Фильтры поиска - 30005 - - 0 - - - members - public_list - mlist_adv_filt - Use advanced filters - Дополнительные фильтры - 30005 - - 0 - - - members - public_list - mlist_view_all_title - View all members - Просмотреть всех пользователей - 30005 + mlist_view_start_title + View members starting with + Просмотреть пользователей с именами начинающимися с + 31006 0 @@ -447,1368 +17,478 @@ mlist_view_all_txt ALL ВСЕ - 30005 + 31006 0 members public_list - mlist_view_start_title - View members starting with - Просмотреть пользователей с именами начинающимися с - 30005 + mlist_view_all_title + View all members + Просмотреть всех пользователей + 31006 0 + + members + public_list + mlist_adv_filt_opt + Advanced Filter Options + Фильтры поиска + 31006 + + 0 + + + members + public_list + mlist_adv_filt + Use advanced filters + Дополнительные фильтры + 31006 + + 0 + + + members + public_list + mlist_header + Member List + Список пользователей + 31006 + + 0 + + + members + public_list + page_title + Member List + Список пользователей + 31006 + 30005 + 0 + + + members + public_list + sort_by_joined + Join Date + по дате регистрации + 31006 + 30005 + 0 + + + members + public_list + sort_submit + Apply Filters + Применить фильтры + 31006 + 30005 + 0 + + + members + public_list + ascending_order + Ascending Order + порядке возрастания + 31006 + 30005 + 0 + + + members + public_list + descending_order + Descending Order + порядке убывания + 31006 + 30005 + 0 + + + members + public_list + member_posts + Posts + Сообщений + 31006 + 30005 + 0 + + + members + public_list + member_name + Name + Имя + 31006 + 30005 + 0 + members public_list sorting_text_results results per page результатов на страницу - 30006 + 31006 30006 0 + + members + public_list + sorting_text_in + in + в + 31006 + 30005 + 0 + + + members + public_list + sorting_text_with + with + по + 31006 + 30005 + 0 + + + members + public_list + sorting_text_by + by + , сортировать + 31006 + 30005 + 0 + + + members + public_list + member_joined + Joined + Дата + 31006 + 30005 + 0 + + + members + public_list + sort_by_name + Member Name + по имени пользователя + 31006 + 30005 + 0 + + + members + public_list + no_results + No Results + Нет совпадений + 31006 + 30005 + 0 + + + members + public_list + member_group + Group + Группа + 31006 + 30005 + 0 + + + members + public_list + s_after + after + после + 31006 + 30005 + 0 + + + members + public_list + s_contains + contains + содержит + 31006 + 30005 + 0 + + + members + public_list + s_before + before + до + 31006 + 30005 + 0 + + + members + public_list + s_begins + begins with + начинается с + 31006 + 30005 + 0 + + + members + public_list + s_lessthan + less than + меньше чем + 31006 + 30005 + 0 + + + members + public_list + s_dateformat + (MM-DD-YYYY) + (ДД-ММ-ГГГГ) + 31006 + 30005 + 0 + + + members + public_list + s_morethan + more than + больше чем + 31006 + 30005 + 0 + + + members + public_list + s_name + Member name + По имени пользователя + 31006 + 30005 + 0 + + + members + public_list + s_signature + Signature contains + Подпись содержит + 31006 + 30005 + 0 + + + members + public_list + s_lastvisit + Last visit is + Время последнего посещения + 31006 + 30005 + 0 + + + members + public_list + photo_only + Must have a photo + Загрузил фотографию + 31006 + 30005 + 0 + + + members + public_list + s_lastpost + Last post is + Последнее сообщение + 31006 + 30005 + 0 + + + members + public_list + s_posts + Post count is + Количество сообщений + 31006 + 30005 + 0 + + + members + public_list + s_joined + Join date is + Дата регистрации + 31006 + 30005 + 0 + + + members + public_list + m_views + Views + Просмотров + 31006 + 30005 + 0 + + + members + public_list + m_rating_morethan + Rating is higher than + Рейтинг выше чем + 31006 + 30005 + 0 + + + members + public_list + m_stars + stars + баллов + 31006 + 30005 + 0 + + + members + public_list + m_rating + Rating + Рейтинг + 31006 + 30005 + 0 + members public_list sort_by Sort by: Сортировать: - 30011 + 31006 30011 0 members - public_messaging - last_read - Last Read: - Прочтено: - 30005 + public_list + m_dd_views + Profile Views + по количеству просмотров профиля + 31006 30005 0 members - public_messaging - participants - Participants - Участники - 30005 - - 0 - - - members - public_messaging - separated_with_commas - , separated with commas - , разделенных запятой - 30005 - - 0 - - - members - public_messaging - part_add - Add - Добавить - 30005 - - 0 - - - members - public_messaging - enter_member_names - Enter member names: - Имена пользователей: - 30005 - - 0 - - - members - public_messaging - invite_more_part - Invite More Participants - Пригласить еще пользователей - 30005 + public_list + members_start_with + View members starting with + Просмотреть пользователей с именами начинающимися с + 31006 30005 0 members - public_messaging - pm_flood_stop - You cannot start another PM topic until %s - Вы не можете отправить новое сообщение до %s - 30005 - - 0 - - - members - public_messaging - unblock - Unblock - Разблокировать - 30005 - - 0 - - - members - public_messaging - unblock_this_user - Unblock this user - Разблокировать пользователя - 30005 - - 0 - - - members - public_messaging - block_this_user - Block this user - Заблокировать пользователя - 30005 + public_list + reputation + Reputation + Репутация + 31006 30005 0 members - public_messaging - not_yet_read - Not yet read - Еще не прочтено - 30005 - - 0 - - - members - public_messaging - topic_deleted - Unavailable: Topic Deleted - Недоступно: тема удалена - 30005 - - 0 - - - members - public_messaging - user_is_blocked - - Пользователь заблокирован и не может быть участником - 30005 - - 0 - - - members - public_messaging - block - Block - Заблокировать - 30005 + public_list + sorty_by_jdate + Sort by Joined Date + Сортировать по дате регистрации + 31006 30005 0 members - public_messaging - more_members - more members - пользователей - 30005 - - 0 - - - members - public_messaging - invite_part - Invite Participants - Пригласить участников - 30005 + public_list + pcount + Post Count + По количеству сообщений + 31006 30005 0 members - public_messaging - can_invite_unlimited - unlimited number of members]]> - неограниченное число пользователей]]> - 30005 + public_list + sort_by_posts + Total Posts + по количеству сообщений + 31006 30005 0 members - public_messaging - turn_noti_off - OFF]]> - Выключить уведомления]]> - 30005 - - 0 - - - members - public_messaging - toggle_noti_title - Toggle notification status for this conversation - Переключить статус уведомления - 30005 - - 0 - - - members - public_messaging - turn_noti_on - ON]]> - Включить уведомления]]> - 30005 - - 0 - - - members - public_messaging - has_left_convo - Has left the conversation - Вышел из переписки - 30005 + public_list + sort_by_mname + Sort by Member Name + Сортировать по имени пользователя + 31006 30005 0 members - public_messaging - is_unable_part - Is unable to participate - Не может принимать участие - 30005 + public_list + show_all + Show All + Показать всех + 31006 30005 0 - - members - public_messaging - may_invite_upto - You may invite up to - Вы можете пригласить до - 30005 - - 0 - - - members - public_messaging - add_participants - Add Participants - Добавить участников - 30005 - 30005 - 0 - - - members - public_messaging - folders - Folders - Папки - 30005 - 30005 - 0 - - - members - public_messaging - go_to_folder - Go to folder - Перейти в папку - 30005 - 30005 - 0 - - - members - public_messaging - delete_folder_title - Delete this folder - Удалить папку - 30005 - - 0 - - - members - public_messaging - empty_folder_title - Empty this folder - Очистить папку - 30005 - - 0 - - - members - public_messaging - add_folder - Add Folder - Добавить папку - 30005 - 30005 - 0 - - - members - public_messaging - folder_add - Add - Добавить - 30005 - 30005 - 0 - - - members - public_messaging - edit_folders - Edit Folders - Изменить папку - 30005 - - 0 - - - members - public_messaging - storage - Storage - Состояние - 30005 - - 0 - - - members - public_messaging - your_messenger_storage - Your messenger storage - Папки личных сообщений заполнены на: - 30005 - - 0 - - - members - public_messaging - folders_edit - Edit - Изменить - 30005 - 30005 - 0 - - - members - public_messaging - col_recipient - Recipient - Адресат - 30005 - 30005 - 0 - - - members - public_messaging - messages - messages - сообщения - 30005 - - 0 - - - members - public_messaging - of_your_quota - of your quota - от лимита - 30005 - - 0 - - - members - public_messaging - pc_and - and - и - 30005 - - 0 - - - members - public_messaging - col_last_message - Last Message - Последнее сообщение - 30005 - 30005 - 0 - - - members - public_messaging - label_pc - Label: - Метка: - 30005 - 30005 - 0 - - - members - public_messaging - col_to - To - Адресат - 30005 - 30005 - 0 - - - members - public_messaging - col_topic - Topic - Тема - 30005 - 30005 - 0 - - - members - public_messaging - col_starter - Starter - Автор - 30005 - 30005 - 0 - - - members - public_messaging - col_date - Date - Дата - 30005 - 30005 - 0 - - - members - public_messaging - search_messages - Search Messages - Поиск сообщений - 30005 - - 0 - - - members - public_messaging - your_search_results - Your Search Results - Результаты поиска - 30005 - - 0 - - - members - public_messaging - col_subject - Subject - Тема - 30005 - 30005 - 0 - - - members - public_messaging - col_replies - Replies - Ответов - 30005 - 30005 - 0 - - - members - public_messaging - pc_other - other - еще - 30005 - - 0 - - - members - public_messaging - pc_others - others - другие - 30005 - - 0 - - - members - public_messaging - go_to_compose - Go to compose screen - Написать личное сообщение - 30005 - 30005 - 0 - - - members - public_messaging - no_messages_row - There are no messages to view - Нет сообщений для отображения - 30005 - - 0 - - - members - public_messaging - compose_new - Compose New - Написать личное сообщение - 30005 - 30005 - 0 - - - members - public_messaging - first_unread_reply - Go to first unread post - К первому непрочитанному сообщению - 30005 - 30005 - 0 - - - members - public_messaging - goto_page - Go to page - К странице - 30005 - 30005 - 0 - - - members - public_messaging - goto_last_post - Go to last post - К последнему сообщению - 30005 - 30005 - 0 - - - members - public_messaging - pc_by - By: - Автор: - 30005 - - 0 - - - members - public_messaging - folder_no_messages_row - There are no messages to view in this folder - Нет сообщений для просмотра - 30005 - 30005 - 0 - - - members - public_messaging - info_not_available - Information Not Available - Информация не доступна - 30005 - 30005 - 0 - - - members - public_messaging - with_selected_opt - With Selected... - С отмеченными - 30005 - - 0 - - - members - public_messaging - option__delete - Delete - Удалить - 30005 - - 0 - - - members - public_messaging - option__markread - Mark Read - Пометить как прочтенное - 30005 - - 0 - - - members - public_messaging - option__markunread - Mark Unread - Снять отметку о прочтении - 30005 - - 0 - - - members - public_messaging - option__turnoff - Turn Off Notifications - Отключить уведомления - 30005 - - 0 - - - members - public_messaging - option__turnon - Turn On Notifications - Включить уведомления - 30005 - - 0 - - - members - public_messaging - add_reply - Add Reply - Ответить - 30005 - 30005 - 0 - - - members - public_messaging - filters__i - Conversations I Started - Исходящие - 30005 - - 0 - - - members - public_messaging - filters__update - Update - Обновить - 30005 - - 0 - - - members - public_messaging - filter__others - Conversations Others Started - Входящие - 30005 - - 0 - - - members - public_messaging - filter__all - All Conversations - Все сообщения - 30005 - - 0 - - - members - public_messaging - filter__show - Show: - Показывать: - 30005 - - 0 - - - members - public_messaging - move_to_opt - Or Move To... - Или переместить в - 30005 - - 0 - - - members - public_messaging - you_cannot_reply - You cannot reply - Вы не можете ответить - 30005 - - 0 - - - members - public_messaging - find_info_about_ip - Find information about this IP - Информация об IP - 30005 - - 0 - - - members - public_messaging - delete_this_post - Delete this post - Удалить это сообщение - 30005 - - 0 - - - members - public_messaging - pc_edit - Edit - Изменить - 30005 - - 0 - - - members - public_messaging - pc_post_button - Post - Отправить - 30005 - - 0 - - - members - public_messaging - pc_fast_reply - Fast Reply - Быстрый ответ - 30005 - - 0 - - - members - public_messaging - edit_this_post - Edit this post - Изменить сообщение - 30005 - - 0 - - - members - public_messaging - pc_reply - Reply - Ответ - 30005 - - 0 - - - members - public_messaging - pc_delete - Delete - Удалить - 30005 - - 0 - - - members - public_messaging - compose_reply - Compose Reply - Ответ - 30005 - 30005 - 0 - - - members - public_messaging - pc_report - Report - Жалоба - 30005 - - 0 - - - members - public_messaging - pc_sent - Sent - Отправлено - 30005 - - 0 - - - members - public_messaging - pc_use_full_reply - Use Full Editor - Расширенная форма - 30005 - - 0 - - - members - public_messaging - editing_message - Editing Message - Редактирование сообщения - 30005 - - 0 - - - members - public_messaging - youmay_add_to - You may add up to - Вы можете добавить до - 30005 - - 0 - - - members - public_messaging - send__invite - Invitation - Приглашение - 30005 - - 0 - - - members - public_messaging - other_recipients - Other Recipients - Остальные получатели - 30005 - - 0 - - - members - public_messaging - send_to_as - Send to others as - Остальным получателям будет отправлено(а) - 30005 - - 0 - - - members - public_messaging - youmay_suffix - other recipients - получателей - 30005 - - 0 - - - members - public_messaging - send__copy - Copy - Копия - 30005 - - 0 - - - members - public_messaging - invite__desc - allows all invited members to participate in a single conversation - позволяет всем приглашенным пользователям поучаствовать в переписке - 30005 - 30005 - 0 - - - members - public_messaging - copy__desc - will send a separate conversation to each member - будет отослана всем остальным получателям - 30005 - 30005 - 0 - - - members - public_messaging - maxperday_hit - You have sent the maximum number of private messages per day that the administrator allows. - Вы отправили максимально разрешенное за день администратором количество личных сообщений. - 30005 - - 0 - - - members - public_messaging - message_subject_send - Message Subject - Тема сообщения - 30005 - - 0 - - - members - public_messaging - sendMsgTitle - Composing Message - Новое личное сообщение - 30005 - - 0 - - - members - public_messaging - err_NOT_ALL_INVITE_USERS_EXIST - The following users do not exist: #NAMES# - Пользователи: #NAMES# не существуют - 30005 - - 0 - - - members - public_messaging - search_term_short - - - 30005 - - 0 - - - members - public_messaging - err_FROM_USER_DOES_NOT_EXIST - The member #FROMNAME# does not exist - Пользователь #FROMNAME# не существует. - 30005 - - 0 - - - members - public_messaging - err_NOT_ALL_INVITE_USERS_CAN_PM - The following users cannot use the messaging system: #NAMES# - Следующие пользователи не могут использовать личные сообщения: #NAMES# - 30005 - - 0 - - - members - public_messaging - err_TO_USER_DOES_NOT_EXIST - The member #TONAME# does not exist - Пользователь #TONAME# не существует. Проверьте введенное имя и повторите попытку. - 30005 - - 0 - - - members - public_messaging - err_TO_USER_CANNOT_USE_PM - The member #TONAME# can not use the messaging system - Пользователь #TONAME# не может использовать личные сообщения - 30005 - - 0 - - - members - public_messaging - err_FROM_USER_BLOCKED - The member #TONAME# has chosen to not receive any new messages from you - Пользователь #TONAME# не хочет получать новые сообщения от вас - 30005 - - 0 - - - members - public_messaging - err_CANNOT_SAVE_TO_SENT_FOLDER - You do not have any space left to store this message in your sent folder - У вас нет свободного места для сохранения этого сообщения в папке с отправленными сообщениями - 30005 - - 0 - - - members - public_messaging - err_INVITE_USERS_BLOCKED - The following CC users have chosen to not receive messages from you: #NAMES# - Следующие пользователи не хотят получать новые сообщения от вас: #NAMES# - 30005 - - 0 - - - members - public_messaging - err_CANT_INVITE_SELF - You cannot invite yourself to this conversation - Вы не можете пригласить самого себя - 30005 - - 0 - - - members - public_messaging - err_CANT_SEND_TO_SELF - You cannot send a conversation to yourself - Вы не можете отправить приглашение самому себе - 30005 - - 0 - - - members - public_messaging - err_TO_USER_FULL - The member #TONAME# cannot receive any new messages - Пользователь #TONAME# больше не может получать новые сообщения - 30005 - - 0 - - - members - public_messaging - err_CANT_INVITE_RECIPIENT - You cannot invite the main recipient - Вы не можете пригласить получателя сообщения - 30005 - - 0 - - - members - public_messaging - err_CANT_INVITE_RECIPIENT_EXIST - One or more recipients are already participating in this conversation - Один или более получателей уже приглашены - 30005 - - 0 - - - members - public_messaging - err_FLOOD_STOP - You cannot start another PM topic until #DATE# - Вы не можете написать личное сообщение до #DATE# - 30005 - - 0 - - - members - public_messaging - t_welcome - Your Messenger - Добро пожаловать в ваш почтовый ящик - 30005 - - 0 - - - members - public_messaging - err_UNKNOWN - An untrapped error occurred: - Обнаружена необработанная ошибка: - 30005 - - 0 - - - members - public_messaging - search_convo_no_results - Sorry, no conversations were found that match your search criteria - Не найдено сообщений, соответствующих критерию поиска - 30005 - - 0 - - - members - public_messaging - search_results_pt - : Search Results - : Результаты поиска - 30005 - - 0 - - - members - public_messaging - messenger__nav - Messenger - Почтовый ящик - 30005 - - 0 - - - members - public_messaging - pro_recips - Recipients - Получатели - 30005 - - 0 - - - members - public_messaging - pro_message - Message - Сообщение - 30005 - - 0 - - - members - public_messaging - deleted_user - Deleted Member - Пользователь удален - 30005 - 30005 - 0 - - - members - public_messaging - err_no_title - You must enter a message title longer than 2 characters. - Заголовок сообщения должен быть более 2 символов. - 30005 - - 0 - - - members - public_messaging - mess_new - Compose New Message - Новое личное сообщение - 30005 - - 0 - - - members - public_messaging - m_messenger - Messenger - Почтовый ящик - 30005 - - 0 - - - members - public_messaging - err_no_chosen_member - You must either choose a member from your address book or enter their name in the appropriate field fully. - Необходимо вручную ввести полное имя пользователя, либо выбрать его из вашего списка контактов. - 30005 - - 0 - - - members - public_messaging - err_errors - The following errors were found - Обнаружены следующие ошибки: - 30005 - - 0 - - - members - public_messaging - err_no_msg - You must enter a message larger than 3 characters. - Текст личного сообщения должен быть более 3 символов. - 30005 - - 0 - - - members - public_messaging - pmpc_full_string - Your messenger folders are %s percent full - Папки личных сообщений заполнены на %s - 30005 - - 0 - - - members - public_messaging - pmpc_info_string - You have %s messages out of %s maximum storable messages - Личных сообщений у вас: %s, из максимально возможных - 30005 - - 0 - - - members - public_messaging - pmpc_unlimited - an unlimited amount of - количество сообщений неограниченно - 30005 - - 0 - - - members - public_messaging - pme_none_sent - This personal message has not been sent - Личное сообщение не отправлено. - 30005 - - 0 - - - members - public_messaging - pms_send_later - Save (Send later) - Черновик (отправить позже) - 30005 - - 0 - - - members - public_messaging - pm_preview - Preview - Предварительный просмотр - 30005 - - 0 - members public_messaging pm_pre_button Preview Message Предварительный просмотр - 30005 - + 31006 + 30005 0 @@ -1817,7 +497,7 @@ to_whom Имя получателя - 30005 + 31006 0 @@ -1827,47 +507,367 @@ sent_text ' has been sent. The recipient(s) will be informed that they have a new message.]]> ' успешно отправлено. Пользователь будет уведомлен о новом личном сообщении от вас.]]> - 30005 + 31006 0 members public_messaging - submit_send - Send Message - Отправить сообщение - 30005 - - 0 - - - members - public_messaging - c_msg_full - WARNING: YOUR FOLDERS ARE FULL
      You MUST delete some saved messages in your inbox or folders before you can receive any more personal messages]]>
      - ВНИМАНИЕ: ПАПКИ ЛИЧНЫХ СООБЩЕНИЙ ПЕРЕПОЛНЕНЫ
      Для возможности получения новых личных писем вы ДОЛЖНЫ удалить некоторые сохраненные сообщения из папок]]>
      - 30005 + pm_preview + Preview + Предварительный просмотр + 31006 30005 0
      members public_messaging - err_NO_ONE_TO_INVITE - There is no one to invite either because you entered an incorrect name or they are currently participating - Невозможно кого-либо пригласить, либо потому что вы ввели неверные имена пользователей или эти пользователи уже приглашены - 30005 + pms_send_later + Save (Send later) + Черновик (отправить позже) + 31006 + 30005 + 0 + + + members + public_messaging + pmpc_unlimited + an unlimited amount of + количество сообщений неограниченно + 31006 + 30005 + 0 + + + members + public_messaging + pme_none_sent + This personal message has not been sent + Личное сообщение не отправлено. + 31006 + 30005 + 0 + + + members + public_messaging + pmpc_info_string + You have %s messages out of %s maximum storable messages + Личных сообщений у вас: %s, из максимально возможных + 31006 + 30005 + 0 + + + members + public_messaging + pmpc_full_string + Your messenger folders are %s percent full + Папки личных сообщений заполнены на %s + 31006 + 30005 + 0 + + + members + public_messaging + err_errors + The following errors were found + Обнаружены следующие ошибки: + 31006 + 31005 + 0 + + + members + public_messaging + err_no_msg + You must enter a message larger than 3 characters. + Текст личного сообщения должен быть более 3 символов. + 31006 0 + + members + public_messaging + err_no_chosen_member + You must either choose a member from your address book or enter their name in the appropriate field fully. + Необходимо вручную ввести полное имя пользователя, либо выбрать его из вашего списка контактов. + 31006 + + 0 + + + members + public_messaging + mess_new + Compose New Message + Новое личное сообщение + 31006 + + 0 + + + members + public_messaging + deleted_user + Deleted Member + Пользователь удален + 31006 + 31005 + 0 + + + members + public_messaging + m_messenger + Messenger + Почтовый ящик + 31006 + 31005 + 0 + + + members + public_messaging + err_no_title + You must enter a message title longer than 2 characters. + Заголовок сообщения должен быть более 2 символов. + 31006 + + 0 + + + members + public_messaging + pro_recips + Recipients + Получатели + 31006 + 30005 + 0 + + + members + public_messaging + messenger__nav + Messenger + Почтовый ящик + 31006 + + 0 + + + members + public_messaging + pro_message + Message + Сообщение + 31006 + 30005 + 0 + + + members + public_messaging + search_results_pt + : Search Results + : Результаты поиска + 31006 + + 0 + + + members + public_messaging + search_convo_no_results + Sorry, no conversations were found that match your search criteria + Не найдено сообщений, соответствующих критерию поиска + 31006 + 30005 + 0 + members public_messaging search_convo_no_keywords You did not enter any words to search for Вы не ввели ни одного слова для поиска - 30005 + 31006 + 30005 + 0 + + + members + public_messaging + t_welcome + Your Messenger + Добро пожаловать в ваш почтовый ящик + 31006 + + 0 + + + members + public_messaging + err_NO_ONE_TO_INVITE + There is no one to invite either because you entered an incorrect name or they are currently participating + Невозможно кого-либо пригласить, либо потому что вы ввели неверные имена пользователей или эти пользователи уже приглашены + 31006 + + 0 + + + members + public_messaging + err_FLOOD_STOP + You cannot start another PM topic until #DATE# + Вы не можете написать личное сообщение до #DATE# + 31006 + + 0 + + + members + public_messaging + err_CANT_INVITE_RECIPIENT_EXIST + One or more recipients are already participating in this conversation + Один или более получателей уже приглашены + 31006 + 31005 + 0 + + + members + public_messaging + err_CANT_INVITE_RECIPIENT + You cannot invite the main recipient + Вы не можете пригласить получателя сообщения + 31006 + 31005 + 0 + + + members + public_messaging + err_CANT_INVITE_SELF + You cannot invite yourself to this conversation + Вы не можете пригласить самого себя + 31006 + 31005 + 0 + + + members + public_messaging + err_CANT_SEND_TO_SELF + You cannot send a conversation to yourself + Вы не можете отправить приглашение самому себе + 31006 + 31005 + 0 + + + members + public_messaging + err_UNKNOWN + An untrapped error occurred: + Обнаружена необработанная ошибка: + 31006 + + 0 + + + members + public_messaging + err_CANNOT_SAVE_TO_SENT_FOLDER + You do not have any space left to store this message in your sent folder + У вас нет свободного места для сохранения этого сообщения в папке с отправленными сообщениями + 31006 + 31005 + 0 + + + members + public_messaging + err_INVITE_USERS_BLOCKED + The following CC users have chosen to not receive messages from you: #NAMES# + Следующие пользователи не хотят получать новые сообщения от вас: #NAMES# + 31006 + + 0 + + + members + public_messaging + err_FROM_USER_BLOCKED + The member #TONAME# has chosen to not receive any new messages from you + Пользователь #TONAME# не хочет получать новые сообщения от вас + 31006 + + 0 + + + members + public_messaging + err_TO_USER_CANNOT_USE_PM + The member #TONAME# can not use the messaging system + Пользователь #TONAME# не может использовать личные сообщения + 31006 + + 0 + + + members + public_messaging + err_TO_USER_FULL + The member #TONAME# cannot receive any new messages + Пользователь #TONAME# больше не может получать новые сообщения + 31006 + + 0 + + + members + public_messaging + err_FROM_USER_DOES_NOT_EXIST + The member #FROMNAME# does not exist + Пользователь #FROMNAME# не существует. + 31006 + + 0 + + + members + public_messaging + err_NOT_ALL_INVITE_USERS_CAN_PM + The following users cannot use the messaging system: #NAMES# + Следующие пользователи не могут использовать личные сообщения: #NAMES# + 31006 + + 0 + + + members + public_messaging + err_TO_USER_DOES_NOT_EXIST + The member #TONAME# does not exist + Пользователь #TONAME# не существует. Проверьте введенное имя и повторите попытку. + 31006 + + 0 + + + members + public_messaging + err_NOT_ALL_INVITE_USERS_EXIST + The following users do not exist: #NAMES# + Пользователи: #NAMES# не существуют + 31006 0 @@ -1877,7 +877,7 @@ err_NO_IDS_TO_DELETE You did not select any messages to remove Вы не выбрали ни одного сообщения для удаления - 30006 + 31006 0 @@ -1887,7 +887,7 @@ err_NO_IDS_TO_MOVE You did not select any messages to move Вы не выбрали ни одного сообщения для переноса - 30006 + 31006 0 @@ -1897,7 +897,7 @@ err_NO_SUCH_FOLDER The folder you are attempting to move into does not exist Вы пытаетесь перенести сообщения в несуществующую директорию - 30006 + 31006 0 @@ -1907,17 +907,7 @@ err_NO_IDS_SELECTED You did not select any messages to perform this action on Вы не выбрали ни одного сообщения для осуществления этого действия - 30006 - - 0 - - - members - public_messaging - err_auth - Authorization Error - Ошибка авторизации - 30006 + 31006 0 @@ -1927,18 +917,1008 @@ err_unspecifed An unspecified error occurred Неизвестная ошибка - 30006 + 31006 0 + + members + public_messaging + err_auth + Authorization Error + Ошибка авторизации + 31006 + 31005 + 0 + + + members + public_messaging + sendMsgTitle + Composing Message + Новое личное сообщение + 31006 + + 0 + + + members + public_messaging + search_term_short + + + 31006 + + 0 + + + members + public_messaging + maxperday_hit + You have sent the maximum number of private messages per day that the administrator allows. + Вы отправили максимально разрешенное за день администратором количество личных сообщений. + 31006 + + 0 + + + members + public_messaging + message_subject_send + Message Subject + Тема сообщения + 31006 + + 0 + + + members + public_messaging + copy__desc + will send a separate conversation to each member + будет отослана всем остальным получателям + 31006 + 31005 + 0 + + + members + public_messaging + invite__desc + allows all invited members to participate in a single conversation + позволяет всем приглашенным пользователям поучаствовать в переписке + 31006 + 30005 + 0 + + + members + public_messaging + send__invite + Invitation + Приглашение + 31006 + + 0 + + + members + public_messaging + send__copy + Copy + Копия + 31006 + + 0 + + + members + public_messaging + send_to_as + Send to others as + Остальным получателям будет отправлено(а) + 31006 + + 0 + + + members + public_messaging + youmay_add_to + You may add up to + Вы можете добавить до + 31006 + + 0 + + + members + public_messaging + youmay_suffix + other recipients + получателей + 31006 + + 0 + + + members + public_messaging + other_recipients + Other Recipients + Остальные получатели + 31006 + 31005 + 0 + + + members + public_messaging + editing_message + Editing Message + Редактирование сообщения + 31006 + 31005 + 0 + + + members + public_messaging + compose_reply + Compose Reply + Ответ + 31006 + 31005 + 0 + + + members + public_messaging + pc_use_full_reply + Use Full Editor + Расширенная форма + 31006 + 30005 + 0 + + + members + public_messaging + pc_fast_reply + Fast Reply + Быстрый ответ + 31006 + + 0 + + + members + public_messaging + pc_post_button + Post + Отправить + 31006 + 30005 + 0 + + + members + public_messaging + pc_delete + Delete + Удалить + 31006 + + 0 + + + members + public_messaging + delete_this_post + Delete this post + Удалить это сообщение + 31006 + 31005 + 0 + + + members + public_messaging + pc_edit + Edit + Изменить + 31006 + + 0 + + + members + public_messaging + edit_this_post + Edit this post + Изменить сообщение + 31006 + 31005 + 0 + + + members + public_messaging + pc_reply + Reply + Ответ + 31006 + 30005 + 0 + + + members + public_messaging + pc_sent + Sent + Отправлено + 31006 + 30005 + 0 + + + members + public_messaging + pc_report + Report + Жалоба + 31006 + 30005 + 0 + + + members + public_messaging + find_info_about_ip + Find information about this IP + Информация об IP + 31006 + + 0 + + + members + public_messaging + you_cannot_reply + You cannot reply + Вы не можете ответить + 31006 + + 0 + + + members + public_messaging + filters__update + Update + Обновить + 31006 + + 0 + + + members + public_messaging + add_reply + Add Reply + Ответить + 31006 + 31005 + 0 + + + members + public_messaging + filters__i + Conversations I Started + Исходящие + 31006 + + 0 + + + members + public_messaging + filter__others + Conversations Others Started + Входящие + 31006 + + 0 + + + members + public_messaging + filter__show + Show: + Показывать: + 31006 + + 0 + + + members + public_messaging + filter__all + All Conversations + Все сообщения + 31006 + + 0 + + + members + public_messaging + move_to_opt + Or Move To... + Или переместить в + 31006 + 31005 + 0 + + + members + public_messaging + option__turnoff + Turn Off Notifications + Отключить уведомления + 31006 + 31005 + 0 + + + members + public_messaging + option__turnon + Turn On Notifications + Включить уведомления + 31006 + 31005 + 0 + + + members + public_messaging + option__markread + Mark Read + Пометить как прочтенное + 31006 + 31005 + 0 + + + members + public_messaging + option__markunread + Mark Unread + Снять отметку о прочтении + 31006 + 31005 + 0 + + + members + public_messaging + option__delete + Delete + Удалить + 31006 + 31005 + 0 + + + members + public_messaging + with_selected_opt + With Selected... + С отмеченными + 31006 + + 0 + + + members + public_messaging + pc_by + By: + Автор: + 31006 + + 0 + + + members + public_messaging + folder_no_messages_row + There are no messages to view in this folder + Нет сообщений для просмотра + 31006 + 30005 + 0 + + + members + public_messaging + goto_last_post + Go to last post + К последнему сообщению + 31006 + 30005 + 0 + + + members + public_messaging + info_not_available + Information Not Available + Информация не доступна + 31006 + 30005 + 0 + + + members + public_messaging + goto_page + Go to page + К странице + 31006 + 30005 + 0 + + + members + public_messaging + compose_new + Compose New + Написать личное сообщение + 31006 + 31005 + 0 + + + members + public_messaging + first_unread_reply + Go to first unread post + К первому непрочитанному сообщению + 31006 + 30005 + 0 + + + members + public_messaging + go_to_compose + Go to compose screen + Написать личное сообщение + 31006 + 30005 + 0 + + + members + public_messaging + pc_other + other + еще + 31006 + + 0 + + + members + public_messaging + no_messages_row + There are no messages to view + Нет сообщений для отображения + 31006 + 31005 + 0 + + + members + public_messaging + label_pc + Label: + Метка: + 31006 + 30005 + 0 + + + members + public_messaging + pc_and + and + и + 31006 + + 0 + + + members + public_messaging + pc_others + others + другие + 31006 + + 0 + + + members + public_messaging + col_to + To + Адресат + 31006 + 31005 + 0 + + + members + public_messaging + col_last_message + Last Message + Последнее сообщение + 31006 + 31005 + 0 + + + members + public_messaging + col_starter + Starter + Автор + 31006 + 31005 + 0 + + + members + public_messaging + col_topic + Topic + Тема + 31006 + 31005 + 0 + + + members + public_messaging + col_date + Date + Дата + 31006 + 31005 + 0 + + + members + public_messaging + col_recipient + Recipient + Адресат + 31006 + 31005 + 0 + + + members + public_messaging + col_replies + Replies + Ответов + 31006 + 31005 + 0 + + + members + public_messaging + col_subject + Subject + Тема + 31006 + 31005 + 0 + + + members + public_messaging + your_search_results + Your Search Results + Результаты поиска + 31006 + + 0 + + + members + public_messaging + search_messages + Search Messages + Поиск сообщений + 31006 + 30005 + 0 + + + members + public_messaging + of_your_quota + of your quota + от лимита + 31006 + 31005 + 0 + + + members + public_messaging + messages + messages + сообщения + 31006 + + 0 + + + members + public_messaging + your_messenger_storage + Your messenger storage + Папки личных сообщений заполнены на: + 31006 + + 0 + + + members + public_messaging + folders_edit + Edit + Изменить + 31006 + 30005 + 0 + + + members + public_messaging + storage + Storage + Состояние + 31006 + + 0 + + + members + public_messaging + edit_folders + Edit Folders + Изменить папку + 31006 + 31005 + 0 + + + members + public_messaging + folder_add + Add + Добавить + 31006 + 30005 + 0 + + + members + public_messaging + add_folder + Add Folder + Добавить папку + 31006 + 31005 + 0 + + + members + public_messaging + empty_folder_title + Empty this folder + Очистить папку + 31006 + 31005 + 0 + + + members + public_messaging + delete_folder_title + Delete this folder + Удалить папку + 31006 + 31005 + 0 + + + members + public_messaging + go_to_folder + Go to folder + Перейти в папку + 31006 + 30005 + 0 + + + members + public_messaging + add_participants + Add Participants + Добавить участников + 31006 + 31005 + 0 + + + members + public_messaging + folders + Folders + Папки + 31006 + 30005 + 0 + + + members + public_messaging + more_members + more members + пользователей + 31006 + 31005 + 0 + + + members + public_messaging + may_invite_upto + You may invite up to + Вы можете пригласить до + 31006 + + 0 + + + members + public_messaging + can_invite_unlimited + unlimited number of members]]> + неограниченное число пользователей]]> + 31006 + 31005 + 0 + + + members + public_messaging + invite_part + Invite Participants + Пригласить участников + 31006 + 30005 + 0 + + + members + public_messaging + turn_noti_off + OFF]]> + Выключить уведомления]]> + 31006 + 30005 + 0 + + + members + public_messaging + turn_noti_on + ON]]> + Включить уведомления]]> + 31006 + 30005 + 0 + + + members + public_messaging + has_left_convo + Has left the conversation + Вышел из переписки + 31006 + 30005 + 0 + + + members + public_messaging + toggle_noti_title + Toggle notification status for this conversation + Переключить статус уведомления + 31006 + 30005 + 0 + + + members + public_messaging + is_unable_part + Is unable to participate + Не может принимать участие + 31006 + 30005 + 0 + + + members + public_messaging + unblock + Unblock + Разблокировать + 31006 + + 0 + + + members + public_messaging + user_is_blocked + + Пользователь заблокирован и не может быть участником + 31006 + + 0 + + + members + public_messaging + unblock_this_user + Unblock this user + Разблокировать пользователя + 31006 + + 0 + + + members + public_messaging + block + Block + Заблокировать + 31006 + 31005 + 0 + + + members + public_messaging + block_this_user + Block this user + Заблокировать пользователя + 31006 + 31005 + 0 + + + members + public_messaging + not_yet_read + Not yet read + Еще не прочтено + 31006 + 31005 + 0 + + + members + public_messaging + last_read + Last Read: + Прочтено: + 31006 + 30005 + 0 + + + members + public_messaging + topic_deleted + Unavailable: Topic Deleted + Недоступно: тема удалена + 31006 + + 0 + + + members + public_messaging + participants + Participants + Участники + 31006 + 31005 + 0 + + + members + public_messaging + separated_with_commas + , separated with commas + , разделенных запятой + 31006 + + 0 + + + members + public_messaging + part_add + Add + Добавить + 31006 + 31005 + 0 + + + members + public_messaging + enter_member_names + Enter member names: + Имена пользователей: + 31006 + 31005 + 0 + + + members + public_messaging + invite_more_part + Invite More Participants + Пригласить еще пользователей + 31006 + 30005 + 0 + + + members + public_messaging + pm_flood_stop + You cannot start another PM topic until %s + Вы не можете отправить новое сообщение до %s + 31006 + 30005 + 0 + members public_messaging msgFolder_drafts Drafts Черновики - 30006 - + 31006 + 31005 0 @@ -1947,8 +1927,8 @@ msgFolder_myconvo My Conversations Мои переписки - 30006 - + 31006 + 31005 0 @@ -1957,8 +1937,8 @@ msgFolder_new New Новые - 30006 - + 31006 + 31005 0 @@ -1967,7 +1947,7 @@ folder_prefix Folder: Папка: - 30006 + 31006 30006 0 @@ -1977,8 +1957,8 @@ edit_msg_title Editing Message Редактирование сообщения - 30006 - + 31006 + 31005 0 @@ -1987,8 +1967,8 @@ macro__notifyon Notifications On Уведомления включены - 30006 - + 31006 + 30006 0 @@ -1997,18 +1977,8 @@ macro__notifyoff Notifications Off Уведомления выключены - 30006 - - 0 - - - members - public_messaging - macro__newmsg - New Messages - Новые сообщения - 30006 - + 31006 + 30006 0 @@ -2017,7 +1987,7 @@ macro__deletedmsg Deleted Message Удаленные сообщения - 30006 + 31006 0 @@ -2027,7 +1997,17 @@ macro__nonewmsg No new messages Нет новых сообщений - 30006 + 31006 + + 0 + + + members + public_messaging + macro__newmsg + New Messages + Новые сообщения + 31006 0 @@ -2037,7 +2017,7 @@ macro__folder Folder Папка - 30006 + 31006 0 @@ -2047,7 +2027,7 @@ macro__compose Compose Написать новое - 30006 + 31006 30006 0 @@ -2057,17 +2037,7 @@ macro__trash Trash Корзина - 30006 - - 0 - - - members - public_messaging - macro__myconvo - My Conversations - Мои переписки - 30006 + 31006 0 @@ -2077,7 +2047,17 @@ macro__new New Новое - 30006 + 31006 + + 0 + + + members + public_messaging + macro__myconvo + My Conversations + Мои переписки + 31006 0 @@ -2087,18 +2067,108 @@ save_message_button Save Message Сохранить сообщение - 30008 + 31006 30008 0 members public_messaging - full - full - полный - 30011 - 30011 + saved_as_a_draft + Your message has been saved as a draft + Ваше сообщение сохранено в черновики + 31006 + 31001 + 0 + + + members + public_messaging + msg_email_go + Send Now + Отправить + 31006 + 31005 + 0 + + + members + public_messaging + msg_email_convo + Archive Conversation + Архивирование переписки + 31006 + 31005 + 0 + + + members + public_messaging + msg_email_convo_text + Send a copy of this conversation to %s + Отправить копию переписки %s + 31006 + 31005 + 0 + + + members + public_messaging + ajax_no_permission + You do not have permission to view that conversation + Вы не можете просматривать эту личную переписку + 31006 + 31005 + 0 + + + members + public_messaging + ajax_no_topic_id + Could not locate a conversation with that ID + Не удалось найти переписку с таким ID + 31006 + 31005 + 0 + + + members + public_messaging + email_participants + Participants: + Участники: + 31006 + 31005 + 0 + + + members + public_messaging + email_has_been_sent + The email has been sent to %s + Письмо отправлено %s + 31006 + 31005 + 0 + + + members + public_messaging + submit_send + Send Message + Отправить сообщение + 31006 + + 0 + + + members + public_messaging + c_msg_full + WARNING: YOUR FOLDERS ARE FULL
      You MUST delete some saved messages in your inbox or folders before you can receive any more personal messages]]>
      + ВНИМАНИЕ: ПАПКИ ЛИЧНЫХ СООБЩЕНИЙ ПЕРЕПОЛНЕНЫ
      Для возможности получения новых личных писем вы ДОЛЖНЫ удалить некоторые сохраненные сообщения из папок]]>
      + 31006 + 31005 0
      @@ -2107,288 +2177,28 @@ blocked Blocked Заблокирован - 30011 + 31006 + 31005 + 0 + + + members + public_messaging + full + full + полный + 31006 30011 0 members - public_online - s_sort_key_click - Last Click - Последним действиям - 30005 - 30005 - 0 - - - members - public_online - s_by - Sort by: - Сортировать по: - 30005 - 30005 - 0 - - - members - public_online - s_show_mem_reg - Show Registered Only - Показать только зарегистрированных - 30005 - 30005 - 0 - - - members - public_online - s_sort_key_name - Member Name - Именам - 30005 - 30005 - 0 - - - members - public_online - s_show_mem_all - Show All Users - Показать всех - 30005 - 30005 - 0 - - - members - public_online - board_index - Viewing Board Index - Просматривает главную страницу форума - 30005 - 30005 - 0 - - - members - public_online - no_options_available - No options available - Нет действий - 30005 - 30005 - 0 - - - members - public_online - users_online - Users online - Кто в онлайне - 30005 - 30005 - 0 - - - members - public_online - page_title - Online Users - Кто в онлайне - 30005 - 30005 - 0 - - - members - public_online - where - Location - Последнее действие - 30005 - 30005 - 0 - - - members - public_online - time - Time - Время - 30005 - 30005 - 0 - - - members - public_online - member_name - Member Name - Имя пользователя - 30005 - 30005 - 0 - - - members - public_online - s_go - Update - Обновить - 30005 - 30005 - 0 - - - members - public_online - s_sort_order_asc - Ascending - В порядке возрастания - 30005 - 30005 - 0 - - - members - public_online - s_sort_order_desc - Descending - В порядке убывания - 30005 - 30005 - 0 - - - members - public_online - s_show_mem_guest - Show Guests Only - Показать только гостей - 30005 - 30005 - 0 - - - members - public_online - WHERE_reports - Viewing Reports - Просматривает жалобы - 30005 - - 0 - - - members - public_online - WHERE_portal - Viewing the portal - Смотрит портал - 30005 - - 0 - - - members - public_online - WHERE_boardrules - Viewing Board Guidelines - Читает правила - 30005 - 30005 - 0 - - - members - public_online - WHERE_sr - Viewing Forum Rules: - Читает правила форума: - 30005 - - 0 - - - members - public_online - WHERE_sf - Viewing Forum: - Просматривает форум: - 30005 - - 0 - - - members - public_online - WHERE_st - Viewing Topic: - Читает тему: - 30005 - - 0 - - - members - public_online - WHERE_login - Logging in... - Авторизуется - 30005 - - 0 - - - members - public_online - WHERE_calendar - Viewing the Calendar - Просматривает календарь - 30005 - 30005 - 0 - - - members - public_online - WHERE_postnew - Posting in forum: - Отвечает в форуме: - 30005 - - 0 - - - members - public_online - WHERE_postrep - Posting in topic: - Отвечает в тему: - 30005 - - 0 - - - members - public_online - WHERE_reg - Registering... - Регистрируется - 30005 - - 0 - - - members - public_online - WHERE_online - Viewing Online List - Кто в онлайне]]> - 30005 - + public_messaging + deleted_member + Deleted Member + Пользователь удален + 31006 + 31005 0 @@ -2397,7 +2207,17 @@ WHERE_profile Viewing Profile: Просматривает профиль: - 30005 + 31006 + 30005 + 0 + + + members + public_online + WHERE_invite + Inviting a friend to the board + Приглашает друга на форум + 31006 0 @@ -2407,7 +2227,27 @@ WHERE_mail Contacting member via email Пишет пользователю e-mail - 30005 + 31006 + 30005 + 0 + + + members + public_online + WHERE_msg + Using Personal Messenger + Использует почтовый ящик + 31006 + + 0 + + + members + public_online + WHERE_usercp + Using User CP + Просматривает или изменяет профиль + 31006 30005 0 @@ -2417,37 +2257,17 @@ WHERE_forward Emailing a topic Отправляет ссылку на тему по e-mail - 30005 + 31006 30005 0 - - members - public_online - WHERE_usercp - Using User CP - Просматривает или изменяет профиль - 30005 - - 0 - - - members - public_online - WHERE_msg - Using Personal Messenger - Использует почтовый ящик - 30005 - - 0 - members public_online WHERE_print Printing a topic Просматривает версию для печати - 30005 + 31006 0 @@ -2457,7 +2277,7 @@ WHERE_search Searching... Ищет - 30005 + 31006 0 @@ -2467,7 +2287,7 @@ WHERE_help Viewing the Help Files Просматривает разделы помощи - 30005 + 31006 0 @@ -2477,797 +2297,357 @@ WHERE_members Viewing the Members List Просматривает список пользователей - 30005 + 31006 0 members public_online - WHERE_invite - Inviting a friend to the board - Приглашает друга на форум - 30005 + WHERE_online + Viewing Online List + Кто в онлайне]]> + 31006 0 members public_online - WHERE_stats - Viewing Stats - Просматривает статистику форума - 30005 + WHERE_postrep + Posting in topic: + Отвечает в тему: + 31006 0 + + members + public_online + WHERE_reg + Registering... + Регистрируется + 31006 + + 0 + + + members + public_online + WHERE_postnew + Posting in forum: + Отвечает в форуме: + 31006 + + 0 + + + members + public_online + WHERE_login + Logging in... + Авторизуется + 31006 + + 0 + + + members + public_online + WHERE_sr + Viewing Forum Rules: + Читает правила форума: + 31006 + + 0 + + + members + public_online + WHERE_st + Viewing Topic: + Читает тему: + 31006 + + 0 + + + members + public_online + WHERE_sf + Viewing Forum: + Просматривает форум: + 31006 + + 0 + + + members + public_online + WHERE_portal + Viewing the portal + Смотрит портал + 31006 + + 0 + + + members + public_online + WHERE_boardrules + Viewing Board Guidelines + Читает правила + 31006 + 30005 + 0 + + + members + public_online + WHERE_calendar + Viewing the Calendar + Просматривает календарь + 31006 + 30005 + 0 + members public_online not_online Not online Не в сети - 30011 + 31006 30011 0 members - public_profile - spm_on - Flagged As Spammer - Спамер - 30005 + public_online + board_index + Viewing Board Index + Просматривает главную страницу форума + 31006 30005 0 members - public_profile - approve_request - Approve Request - Подтвердить запрос - 30005 - - 0 - - - members - public_profile - spm_off - Flag As Spammer - Спамер - 30005 + public_online + no_options_available + No options available + Нет действий + 31006 30005 0 members - public_profile - m_reputation - Reputation: - Репутация: - 30005 - - 0 - - - members - public_profile - no_friends_awaiting_approval - No friends awaiting approval - Нет друзей ожидающих подтверждения - 30005 - - 0 - - - members - public_profile - no_friends_to_display - No friends to display - У пользователя пока нет друзей - 30005 - - 0 - - - members - public_profile - delete_this_comment - Delete this comment - Удалить комментарий - 30005 - - 0 - - - members - public_profile - delete_comment_text - Delete - Удалить - 30005 - - 0 - - - members - public_profile - posted - Posted - Написал - 30005 - - 0 - - - members - public_profile - approve_this_comment - Approve this comment - Подтвердить комментарий - 30005 - - 0 - - - members - public_profile - topics_started - - Мои темы - 30005 + public_online + users_online + Users online + Кто в онлайне + 31006 30005 0 members - public_profile - posts_made - - Мои сообщения - 30005 + public_online + where + Location + Последнее действие + 31006 30005 0 members - public_profile - no_friends_yet - - еще не добавил друзей - 30005 - - 0 - - - members - public_profile - m_rating - User Rating: - Рейтинг: - 30005 - - 0 - - - members - public_profile - report_member - Report Member - Пожаловаться на пользователя - 30005 + public_online + page_title + Online Users + Кто в онлайне + 31006 30005 0 members - public_profile - remove_as_friend - Remove me as a friend - Удалить из друзей - 30005 + public_online + time + Time + Время + 31006 30005 0 members - public_profile - m_rate_2 - Rate user 2 stars - Поставить 2 звездочки - 30005 - - 0 - - - members - public_profile - m_rate_1 - Rate user 1 star - Поставить 1 звездочку - 30005 - - 0 - - - members - public_profile - m_rate_3 - Rate user 3 stars - Поставить 3 звездочки - 30005 - - 0 - - - members - public_profile - m_rate_5 - Rate user 5 stars - Поставить 5 звездочек - 30005 - - 0 - - - members - public_profile - m_rate_4 - Rate user 4 stars - Поставить 4 звездочки - 30005 - - 0 - - - members - public_profile - no_latest_visitors - No latest visitors to show - Нет последних посетителей для отображения - 30005 - - 0 - - - members - public_profile - not_set_status - has not set their status - не установил(а) свой статус - 30005 + public_online + member_name + Member Name + Имя пользователя + 31006 30005 0 members - public_profile - latest_visitors - Latest Visitors - Последние посетители - 30005 - - 0 - - - members - public_profile - update + public_online + s_go Update Обновить - 30005 + 31006 + 30005 + 0 + + + members + public_online + s_show_mem_all + Show All Users + Показать всех + 31006 + 30005 + 0 + + + members + public_online + s_show_mem_reg + Show Registered Only + Показать только зарегистрированных + 31006 + 30005 + 0 + + + members + public_online + s_show_mem_guest + Show Guests Only + Показать только гостей + 31006 + 30005 + 0 + + + members + public_online + s_sort_order_desc + Descending + В порядке убывания + 31006 + 30005 + 0 + + + members + public_online + s_sort_order_asc + Ascending + В порядке возрастания + 31006 + 30005 + 0 + + + members + public_online + s_sort_key_name + Member Name + Именам + 31006 + 30005 + 0 + + + members + public_online + s_sort_key_click + Last Click + Последним действиям + 31006 + 30005 + 0 + + + members + public_online + s_by + Sort by: + Сортировать по: + 31006 + 30005 + 0 + + + members + public_online + WHERE_stats + Viewing Stats + Просматривает статистику форума + 31006 + + 0 + + + members + public_online + WHERE_reports + Viewing Reports + Просматривает жалобы + 31006 + + 0 + + + members + public_profile + no_info + No Information]]> + Нет информации + 31006 30005 0 members public_profile - update_to - Update to: - Обновить: - 30005 + online_offline + Offline + Offline + 31006 30005 0 members public_profile - my_info - My Information - Информация - 30005 - - 0 - - - members - public_profile - view - View - Просмотреть - 30005 - 30005 - 0 - - - members - public_profile - save - Save - Сохранить - 30005 - 30005 - 0 - - - members - public_profile - m_member_title - Member Title: - Статус: - 30005 - - 0 - - - members - public_profile - contact_info - Contact Information - Контактная информация - 30005 - - 0 - - - members - public_profile - m_email - E-mail: - E-mail: - 30005 - - 0 - - - members - public_profile - edit_profile - Edit my Profile - Редактировать профиль - 30005 - - 0 - - - members - public_profile - showing_50_rand_friends - Showing 50 random friends of - Показать 50 случайных друзей - 30005 - 30005 - 0 - - - members - public_profile - click_to_email - Click here to e-mail me - Отправить письмо на e-mail - 30005 - - 0 - - - members - public_profile - friends_view_all - View all - Просмотреть всех - 30005 - - 0 - - - members - public_profile - no_profile_comments - has no profile comments yet. Why not say hello? - не имеет еще комментариев. Почему бы не написать Привет? - 30005 - - 0 - - - members - public_profile - your_photo - Your photo - Ваша фотография - 30005 - 30005 - 0 - - - members - public_profile - chars_remaining - Characters remaining: - Осталось символов: - 30005 - - 0 - - - members - public_profile - status_was_changed - You have updated your status - Статус обновлен - 30005 - 30005 - 0 - - - members - public_profile - ajax_no_meminfo - - У вас недостаточно прав для просмотра профиля пользователя - 30005 - - 0 - - - members - public_profile - profile_field_error__invalid - The data you entered is not in the correct format - Неверный формат даты - 30005 - 30005 - 0 - - - members - public_profile - profile_field_error__too_small - The data you entered is not long enough - Введенные данные меньше минимально допустимого значения - 30005 - 30005 - 0 - - - members - public_profile - profile_field_error__too_big - The data you entered exceeds the maximum allowed - Введенные данные превышают максимально допустимое значение - 30005 - 30005 - 0 - - - members - public_profile - profile_field_error__empty - Cannot be left blank - Нельзя оставлять пустым - 30005 - 30005 - 0 - - - members - public_profile - comment_was_approved - The comment has been approved - Комментарий утвержден - 30005 - - 0 - - - members - public_profile - comment_was_deleted - The comment has been deleted - Комментарий удален - 30005 - - 0 - - - members - public_profile - dname_no_history - No history to display - Нет истории для отображения - 30005 - - 0 - - - members - public_profile - nofriendid - We could not find the member whose friends you requested to view - Не возможно найти пользователя, друзей которого вы хотите просмотреть - 30005 - - 0 - - - members - public_profile - ajax_no_member - We could not find the member you were attempting to view - Невозможно найти пользователя - 30005 - - 0 - - - members - public_profile - ajax_no_warn - Member warning is not currently enabled - Предупреждение временно невозможно - 30005 - - 0 - - - members - public_profile - pp_tab_aboutme - About Me - Обо мне - 30005 - 30005 - 0 - - - members - public_profile - page_title_pp - Viewing Profile - Просмотр профиля - 30005 - - 0 - - - members - public_profile - pp_tab_blog - Blog - Блог - 30005 - 30005 - 0 - - - members - public_profile - pp_tab_gallery - Gallery - Галерея - 30005 - 30005 - 0 - - - members - public_profile - m_group - Group: - Группа: - 30005 - - 0 - - - members - public_profile - m_title_friends - Friends - Друзья - 30005 - - 0 - - - members - public_profile - m_member_since - Joined: - Регистрация: - 30005 - - 0 - - - members - public_profile - m_profile_views - Profile Views: - Просмотров: - 30005 - - 0 - - - members - public_profile - m_bday_unknown - Birthday Unknown - Неизвестен - 30005 - - 0 - - - members - public_profile - m_title_comments - Comments - Комментарии - 30005 - - 0 - - - members - public_profile - m_posts - Active Posts: - Сообщений: - 30005 - - 0 - - - members - public_profile - m_years_old - years old - лет - 30005 - - 0 - - - members - public_profile - m_friends_list - My Friends - Мои друзья - 30005 - - 0 - - - members - public_profile - m_age_unknown - Age Unknown - Неизвестен - 30005 - - 0 - - - members - public_profile - m_approve - Approve - Утвердить - 30005 - - 0 - - - members - public_profile - m_friends_pending - Friends Pending Approval - Друзья в ожидании утверждения - 30005 - - 0 - - - members - public_profile - m_comment_unapp - Un-approve Selected Comments - Снять утверждения выбранных комментариев - 30005 - - 0 - - - members - public_profile - m_comment_app - Approve Selected Comments - Утвердить выбранные комментарии - 30005 - - 0 - - - members - public_profile - m_comment_delete - Delete Selected Comments - Удалить выбранные комментарии - 30005 - - 0 - - - members - public_profile - m_go_button - Go - Пуск - 30005 - - 0 - - - members - public_profile - m_no_comments - Other users have left no comments for - Другие пользователи не оставили комментарии для - 30005 - - 0 - - - members - public_profile - view_dname_history - View display name history - Просмотреть историю изменения имен - 30005 - 30005 - 0 - - - members - public_profile - m_profile_title - - Профиль - 30005 - - 0 - - - members - public_profile - display_name_history - Display name history - История изменения имен - 30005 - - 0 - - - members - public_profile - get_photo - Personal Photo + photo_title + Photo Фотография - 30005 + 31006 + 30005 + 0 + + + members + public_profile + supmod_edit_member + Edit Member + Редактировать пользователя + 31006 + 31006 + 0 + + + members + public_profile + dname_date + Change Date + Дата изменена + 31006 30005 0 @@ -3277,8 +2657,8 @@ dname_name_to To На - 30005 - + 31006 + 30005 0 @@ -3287,118 +2667,58 @@ dname_name_from From С - 30005 - - 0 - - - members - public_profile - dname_window_title - Display Name History For: - История изменения имен для: - 30005 - - 0 - - - members - public_profile - dname_date - Change Date - Дата изменена - 30005 - - 0 - - - members - public_profile - online_offline - Offline - Offline - 30005 - - 0 - - - members - public_profile - total_percent - of total forum posts - от общего объема сообщений - 30005 + 31006 30005 0 - - members - public_profile - posts_per_day - per day - в день - 30005 - 30005 - 0 - - - members - public_profile - private - Private]]> - Скрыто - 30005 - 30005 - 0 - - - members - public_profile - fav_percent - - от всех сообщений этого пользователя - 30005 - - 0 - - - members - public_profile - photo_title - Photo - Фотография - 30005 - 30005 - 0 - - - members - public_profile - no_info - No Information]]> - Нет информации - 30005 - - 0 - members public_profile dname_title История изменения имен пользователя - 30005 - + 31006 + 30005 0 members public_profile - m_last_active - Last Active: - Активность: - 30005 - + dname_window_title + Display Name History For: + История изменения имен для: + 31006 + 30005 + 0 + + + members + public_profile + view_dname_history + View display name history + Просмотреть историю изменения имен + 31006 + 30005 + 0 + + + members + public_profile + get_photo + Personal Photo + Фотография + 31006 + 30005 + 0 + + + members + public_profile + display_name_history + Display name history + История изменения имен + 31006 + 30005 0 @@ -3407,117 +2727,227 @@ m_confirm Please confirm that you wish to proceed Пожалуйста, подтвердите это действие - 30005 - - 0 - - - members - public_profile - ajax_bad_html - There was an error attempting to retrieve the HTML to display - Ошибка при попытке получить HTML для отображения - 30005 - - 0 - - - members - public_profile - m_currently - Currently: - Сейчас: - 30005 - - 0 - - - members - public_profile - m_active_in - Most Active In: - Активен в: - 30005 - - 0 - - - members - public_profile - ignore - Ignore user - Игнорировать сообщения пользователя - 30005 - - 0 - - - members - public_profile - unignore - Unignore user - Отменить игнорирование сообщений пользователя - 30005 + 31006 30005 0 members public_profile - send_message - Send me a message - Отправить сообщение - 30005 + m_profile_title + + Профиль + 31006 + 31006 + 0 + + + members + public_profile + m_no_comments + Other users have left no comments for + Другие пользователи не оставили комментарии для + 31006 + 31006 + 0 + + + members + public_profile + m_go_button + Go + Пуск + 31006 + 31006 + 0 + + + members + public_profile + m_comment_delete + Delete Selected Comments + Удалить выбранные комментарии + 31006 30005 0 members public_profile - add_me_friend - Add me as a friend - Добавить в друзья - 30005 - - 0 - - - members - public_profile - edit_my_sig - Edit my Signature - Редактировать подпись - 30005 - - 0 - - - members - public_profile - supmod_edit_member - Edit Member - Редактировать пользователя - 30005 + m_comment_app + Approve Selected Comments + Утвердить выбранные комментарии + 31006 30005 0 members public_profile - fav_posts - posts - сообщений - 30005 - + m_comment_unapp + Un-approve Selected Comments + Снять утверждения выбранных комментариев + 31006 + 30005 0 members public_profile - profile_read_topic - Read Topic - Читать тему - 30005 + m_approve + Approve + Утвердить + 31006 + 30005 + 0 + + + members + public_profile + m_friends_list + My Friends + Мои друзья + 31006 + 30005 + 0 + + + members + public_profile + m_friends_pending + Friends Pending Approval + Друзья в ожидании утверждения + 31006 + 31006 + 0 + + + members + public_profile + m_age_unknown + Age Unknown + Неизвестен + 31006 + 30005 + 0 + + + members + public_profile + m_years_old + years old + лет + 31006 + 31006 + 0 + + + members + public_profile + m_birthday_prefix + Birthday: + День рождения: + 31006 + 30006 + 0 + + + members + public_profile + m_bday_unknown + Birthday Unknown + Неизвестен + 31006 + 30005 + 0 + + + members + public_profile + m_age_prefix + Age: + Возраст: + 31006 + 30006 + 0 + + + members + public_profile + m_title_comments + Comments + Комментарии + 31006 + 31006 + 0 + + + members + public_profile + m_member_since + Joined: + Регистрация: + 31006 + 31006 + 0 + + + members + public_profile + m_title_friends + Friends + Друзья + 31006 + 31006 + 0 + + + members + public_profile + m_profile_views + Profile Views: + Просмотров: + 31006 + 31006 + 0 + + + members + public_profile + m_last_active + Last Active: + Активность: + 31006 + 31006 + 0 + + + members + public_profile + m_group + Group: + Группа: + 31006 + 31006 + 0 + + + members + public_profile + m_posts + Active Posts: + Сообщений: + 31006 + 31006 + 0 + + + members + public_profile + err_no_posts_to_show + There are no posts to display + Нет сообщений для отображения + 31006 30005 0 @@ -3527,18 +2957,38 @@ profile_in_topic In Topic: В теме: - 30005 + 31006 30005 0 members public_profile - err_no_posts_to_show - There are no posts to display - Нет сообщений для отображения - 30005 - + profile_read_topic + Read Topic + Читать тему + 31006 + 30005 + 0 + + + members + public_profile + pp_tab_gallery + Gallery + Галерея + 31006 + 30005 + 0 + + + members + public_profile + pp_tab_blog + Blog + Блог + 31006 + 30005 0 @@ -3547,7 +2997,7 @@ pp_tab_topics Topics Темы - 30005 + 31006 30005 0 @@ -3557,7 +3007,27 @@ pp_tab_posts Posts Сообщения - 30005 + 31006 + 30005 + 0 + + + members + public_profile + page_title_pp + Viewing Profile + Просмотр профиля + 31006 + 30005 + 0 + + + members + public_profile + pp_tab_aboutme + About Me + Обо мне + 31006 30005 0 @@ -3567,38 +3037,598 @@ err_no_aboutme_to_show Пользователь не пожелал сообщить какую-либо информацию о себе. - 30005 + 31006 + 30005 + 0 + + + members + public_profile + ajax_bad_html + There was an error attempting to retrieve the HTML to display + Ошибка при попытке получить HTML для отображения + 31006 + 31005 + 0 + + + members + public_profile + ajax_no_warn + Member warning is not currently enabled + Предупреждение временно невозможно + 31006 + 31005 + 0 + + + members + public_profile + ajax_no_member + We could not find the member you were attempting to view + Невозможно найти пользователя + 31006 + 31005 + 0 + + + members + public_profile + status_was_changed + You have updated your status + Статус обновлен + 31006 + 30005 + 0 + + + members + public_profile + ajax_no_meminfo + + У вас недостаточно прав для просмотра профиля пользователя + 31006 + 31005 + 0 + + + members + public_profile + profile_field_error__blacklist + A URL you supplied is not allowed + Введенный URL запрещен в системе + 31006 + 31001 + 0 + + + members + public_profile + profile_field_error__too_small + The data you entered is not long enough + Введенные данные меньше минимально допустимого значения + 31006 + 30005 + 0 + + + members + public_profile + profile_field_error__invalid + The data you entered is not in the correct format + Неверный формат даты + 31006 + 30005 + 0 + + + members + public_profile + profile_field_error__empty + Cannot be left blank + Нельзя оставлять пустым + 31006 + 30005 + 0 + + + members + public_profile + profile_field_error__too_big + The data you entered exceeds the maximum allowed + Введенные данные превышают максимально допустимое значение + 31006 + 30005 + 0 + + + members + public_profile + comment_was_approved + The comment has been approved + Комментарий утвержден + 31006 + 31005 + 0 + + + members + public_profile + comment_was_deleted + The comment has been deleted + Комментарий удален + 31006 + 31005 + 0 + + + members + public_profile + nofriendid + We could not find the member whose friends you requested to view + Не возможно найти пользователя, друзей которого вы хотите просмотреть + 31006 0 + + members + public_profile + dname_no_history + No history to display + Нет истории для отображения + 31006 + 30005 + 0 + + + members + public_profile + no_profile_comments + has no profile comments yet. Why not say hello? + не имеет еще комментариев. Почему бы не написать «Привет»? + 31006 + 30005 + 0 + + + members + public_profile + chars_remaining + Characters remaining: + Осталось символов: + 31006 + 31005 + 0 + + + members + public_profile + your_photo + Your photo + Ваша фотография + 31006 + 30005 + 0 + + + members + public_profile + friends_view_all + View all + Просмотреть всех + 31006 + 30005 + 0 + + + members + public_profile + showing_50_rand_friends + Showing 50 random friends of + Показать 50 случайных друзей + 31006 + 30005 + 0 + + + members + public_profile + m_email + E-mail: + E-mail: + 31006 + 30005 + 0 + + + members + public_profile + click_to_email + Click here to e-mail me + Отправить письмо на e-mail + 31006 + 31005 + 0 + + + members + public_profile + contact_info + Contact Information + Контактная информация + 31006 + 31005 + 0 + + + members + public_profile + my_info + My Information + Информация + 31006 + 30005 + 0 + + + members + public_profile + m_member_title + Member Title: + Статус: + 31006 + 31006 + 0 + + + members + public_profile + view + View + Просмотреть + 31006 + 31006 + 0 + + + members + public_profile + save + Save + Сохранить + 31006 + 30005 + 0 + + + members + public_profile + update + Update + Обновить + 31006 + 31006 + 0 + + + members + public_profile + update_to + Update to: + Обновить: + 31006 + 31006 + 0 + + + members + public_profile + not_set_status + has not set their status + не установил(а) свой статус + 31006 + 30005 + 0 + + + members + public_profile + no_latest_visitors + No latest visitors to show + Нет последних посетителей для отображения + 31006 + 30005 + 0 + + + members + public_profile + m_currently + Currently: + Сейчас: + 31006 + 30005 + 0 + + + members + public_profile + latest_visitors + Latest Visitors + Последние посетители + 31006 + 30005 + 0 + + + members + public_profile + m_active_in + Most Active In: + Активен в: + 31006 + 30005 + 0 + + + members + public_profile + ignore + Ignore user + Игнорировать сообщения пользователя + 31006 + 30005 + 0 + + + members + public_profile + send_message + Send me a message + Отправить сообщение + 31006 + 30005 + 0 + + + members + public_profile + unignore + Unignore user + Отменить игнорирование сообщений пользователя + 31006 + 31006 + 0 + + + members + public_profile + add_me_friend + Add me as a friend + Добавить в друзья + 31006 + 31005 + 0 + + + members + public_profile + m_rate_5 + Rate user 5 stars + Поставить 5 звездочек + 31006 + 31006 + 0 + + + members + public_profile + m_rate_4 + Rate user 4 stars + Поставить 4 звездочки + 31006 + 31006 + 0 + + + members + public_profile + m_rate_3 + Rate user 3 stars + Поставить 3 звездочки + 31006 + 31006 + 0 + + + members + public_profile + m_rate_2 + Rate user 2 stars + Поставить 2 звездочки + 31006 + 31006 + 0 + + + members + public_profile + m_rate_1 + Rate user 1 star + Поставить 1 звездочку + 31006 + 31006 + 0 + + + members + public_profile + m_rating + User Rating: + Рейтинг: + 31006 + 31006 + 0 + + + members + public_profile + report_member + Report Member + Пожаловаться на пользователя + 31006 + 30005 + 0 + + + members + public_profile + remove_as_friend + Remove me as a friend + Удалить из друзей + 31006 + 30005 + 0 + + + members + public_profile + topics_started + + Мои темы + 31006 + 31006 + 0 + + + members + public_profile + no_friends_yet + + еще не добавил друзей + 31006 + 30005 + 0 + + + members + public_profile + posts_made + + Мои сообщения + 31006 + 30005 + 0 + + + members + public_profile + approve_this_comment + Approve this comment + Подтвердить комментарий + 31006 + 31005 + 0 + + + members + public_profile + posted + Posted + Написал + 31006 + 30005 + 0 + + + members + public_profile + delete_comment_text + Delete + Удалить + 31006 + 31005 + 0 + + + members + public_profile + no_friends_to_display + No friends to display + У пользователя пока нет друзей + 31006 + 30005 + 0 + + + members + public_profile + delete_this_comment + Delete this comment + Удалить комментарий + 31006 + 31005 + 0 + + + members + public_profile + no_friends_awaiting_approval + No friends awaiting approval + Нет друзей, ожидающих подтверждения + 31006 + 30005 + 0 + members public_profile deny_request Deny Request Запрещенный запрос - 30005 - + 31006 + 31005 0 members public_profile - m_birthday_prefix - Birthday: - День рождения: - 30006 - + m_reputation + Reputation: + Репутация: + 31006 + 31006 0 members public_profile - m_age_prefix - Age: - Возраст: - 30006 - + approve_request + Approve Request + Подтвердить запрос + 31006 + 31005 + 0 + + + members + public_profile + spm_on + Flagged As Spammer + Спамер + 31006 + 30005 + 0 + + + members + public_profile + spm_off + Flag As Spammer + Спамер + 31006 + 30005 0 @@ -3607,8 +3637,8 @@ tab_message_h Message Сообщение - 30006 - 30006 + 31006 + 31006 0 @@ -3617,18 +3647,8 @@ comment_submit_post Post Добавить - 30006 - - 0 - - - members - public_profile - user_controls - User Controls - Управление - 30011 - 30011 + 31006 + 31005 0 @@ -3637,9 +3657,579 @@ pp_comment_added_mod Your comment will have to be approved before it becomes visible Ваш комментарий должен быть одобрен, прежде чем он станет виден всем - 30011 + 31006 30011 0 + + members + public_profile + pp_tab_statusupdates + Recent Status Updates + Изменения статуса + 31006 + 31001 + 0 + + + members + public_profile + err_no_status_to_show + No recent status updates to show + Нет изменений + 31006 + 31001 + 0 + + + members + public_profile + status_reply_done + You have replied to a status + Вы прокомментировали статус + 31006 + 31001 + 0 + + + members + public_profile + status_unlocked + Status Unlocked + Статус разблокирован + 31006 + 31001 + 0 + + + members + public_profile + status_locked + Status Locked + Статус заблокирован + 31006 + 31001 + 0 + + + members + public_profile + status_show_all_x + Show all %s comments + Показать все %s комментариев + 31006 + 31001 + 0 + + + members + public_profile + status_deleted + Status Deleted + Статус удален + 31006 + 31001 + 0 + + + members + public_profile + status_unlock_link + Unlock + Разблокировать + 31006 + 31001 + 0 + + + members + public_profile + status_delete_link + Delete + Удалить + 31006 + 31001 + 0 + + + members + public_profile + status_lock_link + Lock + Заблокировать + 31006 + 31001 + 0 + + + members + public_profile + status_reply_deleted + Reply Deleted + Комментарий удален + 31006 + 31001 + 0 + + + members + public_profile + status_actions_none + There are no actions to display + Нет действий + 31006 + 31001 + 0 + + + members + public_profile + status_updates_title + Status Updates + Изменения статуса + 31006 + 31001 + 0 + + + members + public_profile + status_updates_none + There are no status updates to display + Нет изменений статуса + 31006 + 31001 + 0 + + + members + public_profile + status_no_reply + You cannot reply to this status + Вы не можете ответить на этот статус + 31006 + 31001 + 0 + + + members + public_profile + status_off + An error occurred with this status + Произошла ошибка + 31006 + 31001 + 0 + + + members + public_profile + status_too_many_replies + This status update has reached the maximum number of replies allowed + Достигнуто максимальное количество комментариев статуса + 31006 + 31001 + 0 + + + members + public_profile + add_comments_only + Add comment + Комментировать + 31006 + 31005 + 0 + + + members + public_profile + view_comments_only + Show comments (%s) + Показать комментарии (%s) + 31006 + 31006 + 0 + + + members + public_profile + view_comments_collapse + Hide Comments + Скрыть + 31006 + 31006 + 0 + + + members + public_profile + view_comments_and_add + Add / Show comments (%s) + Добавить / Показать комментарии (%s) + 31006 + 31006 + 0 + + + members + public_profile + email_title_blurb_other + + Новый комментарий к обновлению статуса у %s + 31006 + 31001 + 0 + + + members + public_profile + email_title_blurb_yours + New reply to your status + Новый комментарий к обновлению вашего статуса + 31006 + 31001 + 0 + + + members + public_profile + email_blurb_other + + прокомментировал обновление статуса %s + 31006 + 31001 + 0 + + + members + public_profile + email_blurb_theirs + has made a reply to their status + прокомментировал обновление их статуса + 31006 + 31001 + 0 + + + members + public_profile + email_blurb_yours + has made a reply to your status + прокомментировал обновление вашего статуса + 31006 + 31001 + 0 + + + members + public_profile + st_update + Update: + Обновление: + 31006 + 31006 + 0 + + + members + public_profile + cust_disable + Remove And Disable Customizations + Отключить персонализацию + 31006 + 31005 + 0 + + + members + public_profile + cust_remove + Remove Customizations + Удалить персонализацию + 31006 + 31005 + 0 + + + members + public_profile + js_gender_mystery + Not Telling + Не указал + 31006 + 31001 + 0 + + + members + public_profile + js_gender_female + Female + Женщина + 31006 + 31001 + 0 + + + members + public_profile + js_gender_male + Male + Мужчина + 31006 + 31001 + 0 + + + members + public_profile + status__viewall + + + 31006 + 31006 + 0 + + + members + public_profile + status__addcomment + Add A Comment... + Комментировать + 31006 + 31001 + 0 + + + members + public_profile + status__dfcomment + Comment + Комментировать + 31006 + 31001 + 0 + + + members + public_profile + status__locked + Locked Status + Заблокированный + 31006 + 31001 + 0 + + + members + public_profile + status__singleupdate + Single Update + Пользователя + 31006 + 31006 + 0 + + + members + public_profile + status__membersupdats + + Пользователя + 31006 + 31001 + 0 + + + members + public_profile + status__myfriends + + Друзей + 31006 + 31001 + 0 + + + members + public_profile + status__all_updates + All Updates + Всех + 31006 + 31001 + 0 + + + members + public_profile + status__newstring + %s%s posted a new status]]> + %s%s опубликовал новый статус]]> + 31006 + 31006 + 0 + + + members + public_profile + status__repliedstring + %s%s replied to %s's%s status]]> + %s%s прокомментировал %s%s статус]]> + 31006 + 31006 + 0 + + + members + public_profile + status__status + status + статус + 31006 + 31006 + 0 + + + members + public_profile + status__repliedto + replied to + прокомментировал + 31006 + 31006 + 0 + + + members + public_profile + status__recent_actions + Recent Actions + Последние действия + 31006 + 31006 + 0 + + + members + public_profile + status_updates__overview + Community Status Updates + Обновление статусов + 31006 + 31001 + 0 + + + members + public_profile + no_status_sent + You did not submit a status message + Вы не ввели сообщение + 31006 + 31001 + 0 + + + members + public_profile + allfriendstab + All Friends + Все друзья + 31006 + 31005 + 0 + + + members + public_profile + private + Private]]> + Скрыто + 31006 + 30005 + 0 + + + members + public_profile + posts_per_day + per day + в день + 31006 + 30005 + 0 + + + members + public_profile + total_percent + of total forum posts + от общего объема сообщений + 31006 + 31006 + 0 + + + members + public_profile + fav_posts + posts + сообщений + 31006 + 30005 + 0 + + + members + public_profile + fav_percent + + от всех сообщений этого пользователя + 31006 + 30005 + 0 + + + members + public_profile + edit_my_sig + Edit my Signature + Редактировать подпись + 31006 + 30005 + 0 + + + members + public_profile + edit_profile + Edit my Profile + Редактировать профиль + 31006 + 30005 + 0 + + + members + public_profile + user_controls + User Controls + Управление + 31006 + 31006 + 0 + + + members + public_profile + view_topic + View Topic + Просмотр темы + 31006 + 31001 + 0 + diff --git a/upload/admin/applications/members/xml/versions.xml b/upload/admin/applications/members/xml/versions.xml index ac83b5e1..7dd60e33 100644 --- a/upload/admin/applications/members/xml/versions.xml +++ b/upload/admin/applications/members/xml/versions.xml @@ -228,4 +228,36 @@ 3.0.5 30012 + + 3.1.0 Beta 1 + 31000 + + + 3.1.0 Beta 2 + 31001 + + + 3.1.0 Beta 3 + 31002 + + + 3.1.0 + 31003 + + + 3.1.1 + 31004 + + + 3.1.2 + 31005 + + + 3.1.3 + 31006 + + + 3.1.4 + 31007 + \ No newline at end of file diff --git a/upload/admin/applications_addon/index.html b/upload/admin/applications_addon/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications_addon/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/extensions/coreExtensions.php b/upload/admin/applications_addon/ips/calendar/extensions/coreExtensions.php index 7f005790..952e6043 100644 --- a/upload/admin/applications_addon/ips/calendar/extensions/coreExtensions.php +++ b/upload/admin/applications_addon/ips/calendar/extensions/coreExtensions.php @@ -1,166 +1,171 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class calendarPermMappingCalendar -{ - /** - * Mapping of keys to columns - * - * @access private - * @var array - */ - private $mapping = array( - 'view' => 'perm_view', - 'start' => 'perm_2', - 'nomod' => 'perm_3', - ); - - /** - * Mapping of keys to names - * - * @access private - * @var array - */ - private $perm_names = array( - 'view' => 'Show Calendar', - 'start' => 'Create Events', - 'nomod' => 'Bypass Moderation', - ); - - /** - * Mapping of keys to background colors for the form - * - * @access private - * @var array - */ - private $perm_colors = array( - 'view' => '#fff0f2', - 'start' => '#effff6', - 'nomod' => '#edfaff', - ); - - /** - * Method to pull the key/column mapping - * - * @access public - * @return array - */ - public function getMapping() - { - return $this->mapping; - } - - /** - * Method to pull the key/name mapping - * - * @access public - * @return array - */ - public function getPermNames() - { - return $this->perm_names; - } - - /** - * Method to pull the key/color mapping - * - * @access public - * @return array - */ - public function getPermColors() - { - return $this->perm_colors; - } -} - -/** - * Invision Power Services - * IP.Board v3.0.5 - * Library: Handle public session data - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ - * - * @author $Author: bfarber $ - * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board - * @subpackage Calendar - * @link http://www.iinvisionpower.com - * @since 12th March 2002 - * @version $Revision: 4948 $ - * - */ - -class publicSessions__calendar -{ - /** - * Return session variables for this application - * - * current_appcomponent, current_module and current_section are automatically - * stored. This function allows you to add specific variables in. - * - * @access public - * @author Matt Mecham - * @return array - * @todo [Future] Store which event or calendar a user is viewing? - */ - public function getSessionVariables() - { - return array(); - } - - /** - * Parse/format the online list data for the records - * - * @access public - * @author Brandon Farber - * @param array Online list rows to check against - * @return array Online list rows parsed - */ - public function parseOnlineEntries( $rows ) - { - if( !is_array($rows) OR !count($rows) ) - { - return $rows; - } - - $final = array(); - - //----------------------------------------- - // Extract the topic/forum data - //----------------------------------------- - - foreach( $rows as $row ) - { - if( $row['current_appcomponent'] == 'calendar' ) - { - $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_calendar']; - $row['where_link'] = 'app=calendar&module=calendar&section=calendars'; - } - - $final[ $row['id'] ] = $row; - } - - return $final; - } + + * Invision Power Services + * IP.Board v3.1.4 + * Calendar core extensions + * Last Updated: $LastChangedDate: 2010-09-08 22:56:21 -0400 (Wed, 08 Sep 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Calendar + * @link http://www.invisionpower.com + * @since 27th January 2004 + * @version $Rev: 6843 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

      Incorrect access

      You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class calendarPermMappingCalendar +{ + /** + * Mapping of keys to columns + * + * @access private + * @var array + */ + private $mapping = array( + 'view' => 'perm_view', + 'start' => 'perm_2', + 'nomod' => 'perm_3', + ); + + /** + * Mapping of keys to names + * + * @access private + * @var array + */ + private $perm_names = array( + 'view' => 'Show Calendar', + 'start' => 'Create Events', + 'nomod' => 'Bypass Moderation', + ); + + /** + * Mapping of keys to background colors for the form + * + * @access private + * @var array + */ + private $perm_colors = array( + 'view' => '#fff0f2', + 'start' => '#effff6', + 'nomod' => '#edfaff', + ); + + /** + * Method to pull the key/column mapping + * + * @access public + * @return array + */ + public function getMapping() + { + return $this->mapping; + } + + /** + * Method to pull the key/name mapping + * + * @access public + * @return array + */ + public function getPermNames() + { + return $this->perm_names; + } + + /** + * Method to pull the key/color mapping + * + * @access public + * @return array + */ + public function getPermColors() + { + return $this->perm_colors; + } +} + +/** + *
      + * Invision Power Services
      + * IP.Board v3.1.4
      + * Library: Handle public session data
      + * Last Updated: $Date: 2010-09-08 22:56:21 -0400 (Wed, 08 Sep 2010) $
      + * 
      + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Calendar + * @link http://www.invisionpower.com + * @since 12th March 2002 + * @version $Revision: 6843 $ + * + */ + +class publicSessions__calendar +{ + /** + * Return session variables for this application + * + * current_appcomponent, current_module and current_section are automatically + * stored. This function allows you to add specific variables in. + * + * @access public + * @author Matt Mecham + * @return array + * @todo [Future] Store which event or calendar a user is viewing? + */ + public function getSessionVariables() + { + return array(); + } + + /** + * Parse/format the online list data for the records + * + * @access public + * @author Brandon Farber + * @param array Online list rows to check against + * @return array Online list rows parsed + */ + public function parseOnlineEntries( $rows ) + { + if( !is_array($rows) OR !count($rows) ) + { + return $rows; + } + + $final = array(); + + //----------------------------------------- + // Extract the topic/forum data + //----------------------------------------- + + foreach( $rows as $row ) + { + if( $row['current_appcomponent'] == 'calendar' ) + { + $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_calendar']; + $row['where_link'] = 'app=calendar&module=calendar&section=calendars'; + $row['_whereLinkSeo'] = ipsRegistry::getClass('output')->formatUrl( ipsRegistry::getClass('output')->buildUrl( 'app=calendar', 'public' ), 'calendar', 'app=calendar' ); + } + + $final[ $row['id'] ] = $row; + } + + return $final; + } } \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/extensions/coreVariables.php b/upload/admin/applications_addon/ips/calendar/extensions/coreVariables.php index 70bb390b..afb87aed 100644 --- a/upload/admin/applications_addon/ips/calendar/extensions/coreVariables.php +++ b/upload/admin/applications_addon/ips/calendar/extensions/coreVariables.php @@ -1,62 +1,65 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -$_LOAD = array(); - - -$_LOAD['calendars'] = 1; - -$CACHE['calendars'] = array( - 'array' => 1, - 'allow_unload' => 0, - 'default_load' => 1, - 'recache_file' => IPSLib::getAppDir( 'calendar' ) . '/modules_admin/calendar/calendars.php', - 'recache_class' => 'admin_calendar_calendar_calendars', - 'recache_function' => 'calendarsRebuildCache' - ); - -$CACHE['birthdays'] = array( - 'array' => 1, - 'allow_unload' => 0, - 'default_load' => 1, - 'recache_file' => IPSLib::getAppDir( 'calendar' ) . '/modules_admin/calendar/calendars.php', - 'recache_class' => 'admin_calendar_calendar_calendars', - 'recache_function' => 'calendarRebuildCache' - ); - -$CACHE['calendar'] = array( - 'array' => 1, - 'allow_unload' => 0, - 'default_load' => 1, - 'recache_file' => IPSLib::getAppDir( 'calendar' ) . '/modules_admin/calendar/calendars.php', - 'recache_class' => 'admin_calendar_calendar_calendars', - 'recache_function' => 'calendarRebuildCache' - ); - -$CACHE['rss_calendar'] = array( - 'array' => 1, - 'allow_unload' => 0, - 'default_load' => 1, - 'skip_rebuild_when_upgrading' => 1, - 'recache_file' => IPSLib::getAppDir( 'calendar' ) . '/modules_admin/calendar/calendars.php', - 'recache_class' => 'admin_calendar_calendar_calendars', - 'recache_function' => 'calendarRSSCache' - ); \ No newline at end of file + + * Invision Power Services + * IP.Board v3.1.4 + * Core variables for calendar + * Last Updated: $Date: 2010-09-24 21:21:39 -0400 (Fri, 24 Sep 2010) $ + * + * + * @author $author$ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Calendar + * @link http://www.invisionpower.com + * @version $Rev: 6915 $ + **/ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

      Incorrect access

      You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +$_LOAD = array(); + + +$_LOAD['calendars'] = 1; + +$CACHE['calendars'] = array( + 'array' => 1, + 'allow_unload' => 0, + 'default_load' => 1, + 'recache_file' => IPSLib::getAppDir( 'calendar' ) . '/modules_admin/calendar/calendars.php', + 'recache_class' => 'admin_calendar_calendar_calendars', + 'recache_function' => 'calendarsRebuildCache' + ); + +$CACHE['birthdays'] = array( + 'array' => 1, + 'allow_unload' => 0, + 'default_load' => 1, + 'recache_file' => IPSLib::getAppDir( 'calendar' ) . '/modules_admin/calendar/calendars.php', + 'recache_class' => 'admin_calendar_calendar_calendars', + 'recache_function' => 'calendarRebuildCache' + ); + +$CACHE['calendar'] = array( + 'array' => 1, + 'allow_unload' => 0, + 'default_load' => 1, + 'recache_file' => IPSLib::getAppDir( 'calendar' ) . '/modules_admin/calendar/calendars.php', + 'recache_class' => 'admin_calendar_calendar_calendars', + 'recache_function' => 'calendarRebuildCache' + ); + +$CACHE['rss_calendar'] = array( + 'array' => 1, + 'allow_unload' => 0, + 'default_load' => 1, + 'skip_rebuild_when_upgrading' => 1, + 'recache_file' => IPSLib::getAppDir( 'calendar' ) . '/modules_admin/calendar/calendars.php', + 'recache_class' => 'admin_calendar_calendar_calendars', + 'recache_function' => 'calendarRSSCache' + ); diff --git a/upload/admin/applications_addon/ips/calendar/extensions/dataHookLocations.php b/upload/admin/applications_addon/ips/calendar/extensions/dataHookLocations.php new file mode 100644 index 00000000..73c7cd60 --- /dev/null +++ b/upload/admin/applications_addon/ips/calendar/extensions/dataHookLocations.php @@ -0,0 +1,25 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Define data hook locations (Calendar) + * Last Updated: $Date: 2010-10-12 13:04:59 -0400 (Tue, 12 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Core + * @link http://www.invisionpower.com + * @version $Rev: 6964 $ + */ + +$dataHookLocations = array( + + /* POSTING DATA LOCATIONS */ + array( 'calendarAddEvent', 'Add Calendar Event' ), + array( 'calendarEditEvent', 'Edit Calendar Event' ), + +); \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/extensions/editorSections.php b/upload/admin/applications_addon/ips/calendar/extensions/editorSections.php index ee3783ba..4db41ee2 100644 --- a/upload/admin/applications_addon/ips/calendar/extensions/editorSections.php +++ b/upload/admin/applications_addon/ips/calendar/extensions/editorSections.php @@ -1,34 +1,36 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -/* - * An array of key => value pairs - * When going to parse, the key should be passed to the editor - * to determine which bbcodes should be parsed in the section - * - */ -$BBCODE = array( - 'calendar' => ipsRegistry::getClass('class_localization')->words['ctype__calendar'], + + * Invision Power Services + * IP.Board v3.1.4 + * BBCode Management : Determines if bbcode can be used in this section + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Calendar + * @link http://www.invisionpower.com + * @since 27th January 2004 + * @version $Rev: 5713 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

      Incorrect access

      You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +/* + * An array of key => value pairs + * When going to parse, the key should be passed to the editor + * to determine which bbcodes should be parsed in the section + * + */ +$BBCODE = array( + 'calendar' => ipsRegistry::getClass('class_localization')->words['ctype__calendar'], ); \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/extensions/furlTemplates.php b/upload/admin/applications_addon/ips/calendar/extensions/furlTemplates.php index 12ac7c45..882c2971 100644 --- a/upload/admin/applications_addon/ips/calendar/extensions/furlTemplates.php +++ b/upload/admin/applications_addon/ips/calendar/extensions/furlTemplates.php @@ -1,17 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Sets up SEO templates - * Last Updated: $Date$ + * Last Updated: $Date: 2010-04-13 07:32:04 -0400 (Tue, 13 Apr 2010) $ + * * - * @author $Author$ + * @author $Author: matt $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Forums - * @link http://www.iinvisionpower.com - * @version $Rev$ + * @link http://www.invisionpower.com + * @version $Rev: 6099 $ * */ @@ -68,7 +70,7 @@ $_SEOTEMPLATES = array( 'allowRedirect' => 1, 'out' => array( '#app=calendar$#i', 'calendar/' ), 'in' => array( - 'regex' => "#/calendar/?$#i", + 'regex' => "#/calendar(/|$|\?)#i", 'matches' => array( array( 'app', 'calendar' ) ) ) ), diff --git a/upload/admin/applications_addon/ips/calendar/extensions/index.html b/upload/admin/applications_addon/ips/calendar/extensions/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/calendar/extensions/index.html +++ b/upload/admin/applications_addon/ips/calendar/extensions/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/extensions/memberSync.php b/upload/admin/applications_addon/ips/calendar/extensions/memberSync.php index b734d2a1..db484a5f 100644 --- a/upload/admin/applications_addon/ips/calendar/extensions/memberSync.php +++ b/upload/admin/applications_addon/ips/calendar/extensions/memberSync.php @@ -1,90 +1,92 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -/** - * Member Synchronization extensions - * - * @author $author$ - * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board - * @subpackage Calendar - * @link http://www.iinvisionpower.com - * @version $Rev: 4081 $ - **/ - -class calendarMemberSync -{ - /** - * Registry reference - * - * @access public - * @var object - */ - public $registry; - - /** - * CONSTRUCTOR - * - * @access public - * @return void - **/ - public function __construct() - { - $this->registry = ipsRegistry::instance(); - } - - /** - * This method is called after a member account has been removed - * - * @access public - * @param string $ids SQL IN() clause - * @return void - **/ - public function onDelete( $mids ) - { - if( $this->registry->DB()->checkForTable( 'cal_events' ) ) - { - $this->registry->DB()->update( 'cal_events', array( 'event_member_id' => 0 ), 'event_member_id' . $mids ); - } - } - - /** - * This method is called after a member's account has been merged into another member's account - * - * @access public - * @param array $member Member account being kept - * @param array $member2 Member account being removed - * @return void - **/ - public function onMerge( $member, $member2 ) - { - IPSDebug::addLogMessage( "Markers init done:", 'merge', $member ); - - if( $this->registry->DB()->checkForTable( 'cal_events' ) ) - { - $this->registry->DB()->update( 'cal_events', array( 'event_member_id' => intval($member['member_id']) ), "event_member_id=" . $member2['member_id'] ); - } - } + + * Invision Power Services + * IP.Board v3.1.4 + * Calendar core extensions + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Calendar + * @link http://www.invisionpower.com + * @since 27th January 2004 + * @version $Rev: 5713 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

      Incorrect access

      You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +/** + * Member Synchronization extensions + * + * @author $author$ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Calendar + * @link http://www.invisionpower.com + * @version $Rev: 5713 $ + **/ + +class calendarMemberSync +{ + /** + * Registry reference + * + * @access public + * @var object + */ + public $registry; + + /** + * CONSTRUCTOR + * + * @access public + * @return void + **/ + public function __construct() + { + $this->registry = ipsRegistry::instance(); + } + + /** + * This method is called after a member account has been removed + * + * @access public + * @param string $ids SQL IN() clause + * @return void + **/ + public function onDelete( $mids ) + { + if( $this->registry->DB()->checkForTable( 'cal_events' ) ) + { + $this->registry->DB()->update( 'cal_events', array( 'event_member_id' => 0 ), 'event_member_id' . $mids ); + } + } + + /** + * This method is called after a member's account has been merged into another member's account + * + * @access public + * @param array $member Member account being kept + * @param array $member2 Member account being removed + * @return void + **/ + public function onMerge( $member, $member2 ) + { + IPSDebug::addLogMessage( "Markers init done:", 'merge', $member ); + + if( $this->registry->DB()->checkForTable( 'cal_events' ) ) + { + $this->registry->DB()->update( 'cal_events', array( 'event_member_id' => intval($member['member_id']) ), "event_member_id=" . $member2['member_id'] ); + } + } } \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/extensions/portalPlugins/calendar-cfg.php b/upload/admin/applications_addon/ips/calendar/extensions/portalPlugins/calendar-cfg.php index 8fdf1178..199daa66 100644 --- a/upload/admin/applications_addon/ips/calendar/extensions/portalPlugins/calendar-cfg.php +++ b/upload/admin/applications_addon/ips/calendar/extensions/portalPlugins/calendar-cfg.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Portal plugin: calendar - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Calendar - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 1st march 2002 - * @version $Revision: 4948 $ + * @version $Revision: 5713 $ * */ diff --git a/upload/admin/applications_addon/ips/calendar/extensions/portalPlugins/calendar.php b/upload/admin/applications_addon/ips/calendar/extensions/portalPlugins/calendar.php index e97c6091..e2ade7bb 100644 --- a/upload/admin/applications_addon/ips/calendar/extensions/portalPlugins/calendar.php +++ b/upload/admin/applications_addon/ips/calendar/extensions/portalPlugins/calendar.php @@ -1,20 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Portal plugin: calendar - * Last Updated: $Date: 2009-10-13 17:40:38 -0400 (Tue, 13 Oct 2009) $ + * Last Updated: $Date: 2010-10-22 06:13:38 -0400 (Fri, 22 Oct 2010) $ + * * - * @author $Author: josh $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Calendar - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 1st march 2002 - * @version $Revision: 5228 $ - * + * @version $Revision: 7016 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -28,7 +28,6 @@ class ppi_calendar extends public_portal_portal_portal /** * Initialize module * - * @access public * @return void */ public function init() @@ -38,23 +37,16 @@ class ppi_calendar extends public_portal_portal_portal /** * Show the current calendar month on the portal * - * @access public * @return string HTML content to replace tag with */ public function calendar_show_current_month() { - /* If the calendar is not installed, just return */ - if( ! IPSLib::appIsInstalled( 'calendar' ) ) - { - return ''; - } - //----------------------------------------- // Grab calendar class //----------------------------------------- - require_once( IPSLib::getAppDir( 'calendar', 'calendar' ) . '/calendars.php' ); - $calendar = new public_calendar_calendar_calendars(); + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'calendar' ) . '/modules_public/calendar/calendars.php', 'public_calendar_calendar_calendars' ); + $calendar = new $classToLoad(); $calendar->makeRegistryShortcuts( $this->registry ); $calendar->initCalendar(true); diff --git a/upload/admin/applications_addon/ips/calendar/extensions/portalPlugins/index.html b/upload/admin/applications_addon/ips/calendar/extensions/portalPlugins/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/calendar/extensions/portalPlugins/index.html +++ b/upload/admin/applications_addon/ips/calendar/extensions/portalPlugins/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications/core/sources/reportPlugins/calendar.php b/upload/admin/applications_addon/ips/calendar/extensions/reportPlugins/calendar.php similarity index 92% rename from upload/admin/applications/core/sources/reportPlugins/calendar.php rename to upload/admin/applications_addon/ips/calendar/extensions/reportPlugins/calendar.php index 65c9ab02..8f2ec548 100644 --- a/upload/admin/applications/core/sources/reportPlugins/calendar.php +++ b/upload/admin/applications_addon/ips/calendar/extensions/reportPlugins/calendar.php @@ -1,412 +1,405 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class calendar_plugin -{ - /**#@+ - * Registry objects - * - * @access protected - * @var object - */ - protected $registry; - protected $DB; - protected $settings; - protected $request; - protected $lang; - protected $member; - protected $cache; - /**#@-*/ - - /** - * Holds extra data for the plugin - * - * @access private - * @var array Data specific to the plugin - */ - public $_extra; - - /** - * Constructor - * - * @access public - * @param object Registry object - * @return void - */ - public function __construct( ipsRegistry $registry ) - { - //----------------------------------------- - // 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->cache = $this->registry->cache(); - $this->caches =& $this->registry->cache()->fetchCaches(); - $this->lang = $this->registry->class_localization; - } - - /** - * Display the form for extra data in the ACP - * - * @access public - * @param array Plugin data - * @param object HTML object - * @return string HTML to add to the form - */ - public function displayAdminForm( $plugin_data, &$html ) - { - $return = ''; - - return $return; - } - - /** - * Process the plugin's form fields for saving - * - * @access public - * @param array Plugin data for save - * @return string Error message - */ - public function processAdminForm( &$save_data_array ) - { - return ''; - } - - /** - * Update timestamp for report - * - * @access public - * @param array New reports - * @param array New members cache - * @return boolean - */ - public function updateReportsTimestamp( $new_reports, &$new_members_cache ) - { - return true; - } - - /** - * Get report permissions (only supermods can moderate calendar) - * - * @access public - * @param string Type of perms to check - * @param array Permissions data - * @param array group ids - * @param string Special permissions - * @return boolean - */ - public function getReportPermissions( $check, $com_dat, $group_ids, &$to_return ) - { - if( $this->_extra['report_bypass'] == 0 || $this->memberData['g_is_supmod'] == 1 ) - { - return true; - } - else - { - return false; - } - } - - /** - * Show the report form for this module - * - * @access public - * @param array Application data - * @return string HTML form information - */ - public function reportForm( $com_dat ) - { - $this->registry->class_localization->loadLanguageFile( array( 'public_calendar' ), 'calendar' ); - - $eventid = intval($this->request['event_id']); - - if( ! $eventid ) - { - $this->registry->output->showError( 'reports_no_event', 10177 ); - } - - /** - * Load event - */ - $event = $this->DB->buildAndFetch( array( - 'select' => 'e.*', - 'from' => array( 'cal_events' => 'e' ), - 'where' => 'e.event_id=' . $eventid, - 'add_join' => array( - array( - 'select' => 'c.*', - 'from' => array( 'cal_calendars' => 'c' ), - 'where' => 'c.cal_id=e.event_calendar_id', - 'type' => 'left', - ) - ) - ) ); - - /* Loop through the cache and build calendar jump */ - if ( count( $this->caches['calendars'] ) AND is_array( $this->caches['calendars'] ) ) - { - foreach( $this->caches['calendars'] as $cal_id => $cal ) - { - if( $cal_id == $event['event_calendar_id'] ) - { - /* Got a perm */ - if( ! $this->registry->permissions->check( 'view', $cal ) ) - { - $this->registry->output->showError( 'reports_no_event', 10178 ); - } - } - } - } - - $ex_form_data = array( - 'event_id' => $eventid, - 'ctyp' => 'calendar', - 'title' => $event['event_title'] - ); - - $this->registry->output->setTitle( $this->lang->words['report_cal_page'] ); - $this->registry->output->addNavigation( $this->lang->words['t_welcome'], "app=calendar&module=calendar&cal_id={$event['event_calendar_id']}&do=showevent&event_id={$event['event_id']}" ); - $this->registry->output->addNavigation( $this->lang->words['report_cal_page'], '' ); - - $this->lang->words['report_basic_title'] = $this->lang->words['report_cal_title']; - $this->lang->words['report_basic_url_title'] = $this->lang->words['report_cal_title']; - $this->lang->words['report_basic_enter'] = $this->lang->words['report_cal_msg']; - - $url = $this->settings['base_url'] . "app=calendar&module=calendar&cal_id={$event['event_calendar_id']}&do=showevent&event_id={$event['event_id']}"; - - return $this->registry->getClass('reportLibrary')->showReportForm( $event['event_title'], $url, $ex_form_data ); - } - - /** - * Get section and link - * - * @access public - * @param array Report data - * @return array Section/link - */ - public function giveSectionLinkTitle( $report_row ) - { - ipsRegistry::_loadAppCoreVariables( 'calendar' ); - $calendarCache = $this->cache->getCache('calendars'); - - return array( - 'title' => $calendarCache[ $report_row['exdat1'] ]['cal_title'], - 'url' => "/index.php?app=calendar&module=calendar&cal_id={$report_row['exdat1']}", - ); - } - - /** - * Process a report and save the data appropriate - * - * @access public - * @param array Report data - * @return array Data from saving the report - */ - public function processReport( $com_dat ) - { - $eventid = intval($this->request['event_id']); - - if( ! $eventid ) - { - $this->registry->output->showError( 'reports_no_event', 10179 ); - } - - /** - * Load event - */ - $event = $this->DB->buildAndFetch( array( - 'select' => 'e.*', - 'from' => array( 'cal_events' => 'e' ), - 'where' => 'e.event_id=' . $eventid, - 'add_join' => array( - array( - 'select' => 'c.*', - 'from' => array( 'cal_calendars' => 'c' ), - 'where' => 'c.cal_id=e.event_calendar_id', - 'type' => 'left', - ) - ) - ) ); - - /* Loop through the cache and build calendar jump */ - if ( count( $this->caches['calendars'] ) AND is_array( $this->caches['calendars'] ) ) - { - foreach( $this->caches['calendars'] as $cal_id => $cal ) - { - if( $cal_id == $event['event_calendar_id'] ) - { - /* Got a perm */ - if( ! $this->registry->permissions->check( 'view', $cal ) ) - { - $this->registry->output->showError( 'reports_no_event', 10180 ); - } - } - } - } - - $url = "app=calendar&module=calendar&cal_id={$event['event_calendar_id']}&do=showevent&event_id={$event['event_id']}"; - - $return_data = array(); - $a_url = str_replace("&", "&", $url); - $uid = md5( 'cal_' . $eventid . '_' . $com_dat['com_id'] ); - $status = array(); - - $this->DB->build( array( 'select' => 'status, is_new, is_complete', - 'from' => 'rc_status', - 'where' => "is_new=1 OR is_complete=1", - ) ); - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - if( $row['is_new'] == 1 ) - { - $status['new'] = $row['status']; - } - elseif( $row['is_complete'] == 1 ) - { - $status['complete'] = $row['status']; - } - } - - $this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports_index', 'where' => "uid='{$uid}'" ) ); - $this->DB->execute(); - - if( $this->DB->getTotalRows() == 0 ) - { - $built_report_main = array( - 'uid' => $uid, - 'title' => $this->request['title'], - 'status' => $status['new'], - 'url' => '/index.php?' . $a_url, - 'rc_class' => $com_dat['com_id'], - 'updated_by' => $this->memberData['member_id'], - 'date_updated' => time(), - 'date_created' => time(), - 'exdat1' => $event['event_calendar_id'], - 'exdat2' => $event['event_id'], - 'exdat3' => 0 - ); - - $this->DB->insert( 'rc_reports_index', $built_report_main ); - $rid = $this->DB->getInsertId(); - } - else - { - $the_report = $this->DB->fetch(); - $rid = $the_report['id']; - $this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'] ), "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'; - - $build_report = array( - 'rid' => $rid, - 'report' => IPSText::getTextClass('bbcode')->preDbParse( $this->request['message'] ), - 'report_by' => $this->memberData['member_id'], - 'date_reported' => time(), - ); - - $this->DB->insert( 'rc_reports', $build_report ); - - $reports = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'rc_reports', 'where' => "rid='{$rid}'" ) ); - - $this->DB->update( 'rc_reports_index', array( 'num_reports' => $reports['total'] ), "id='{$rid}'" ); - - $return_data = array( - 'REDIRECT_URL' => $a_url, - 'REPORT_INDEX' => $rid, - 'SAVED_URL' => '/index.php?' . $url, - 'REPORT' => $build_report['report'] - ); - - return $return_data; - } - - /** - * Where to send user after report is submitted - * - * @access public - * @param array Report data - * @return void - */ - public function reportRedirect( $report_data ) - { - $this->registry->output->redirectScreen( $this->lang->words['report_sending'], $this->settings['base_url'] . $report_data['REDIRECT_URL'], true ); - } - - /** - * Retrieve list of users to send notifications to - * - * @access public - * @param string Group ids - * @param array Report data - * @return array Array of users to PM/Email - */ - public function getNotificationList( $group_ids, $report_data ) - { - $notify = array(); - - $this->DB->build( array( - 'select' => 'noti.*', - 'from' => array( 'rc_modpref' => 'noti' ), - 'where' => 'mem.member_group_id IN(' . $group_ids . ')', - 'add_join' => array( - array( - 'select' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id', - 'from' => array( 'members' => 'mem' ), - 'where' => 'mem.member_id=noti.mem_id', - ) - ) - ) ); - $this->DB->execute(); - - if( $this->DB->getTotalRows() > 0 ) - { - while( $row = $this->DB->fetch() ) - { - if( $row['by_pm'] == 1 ) - { - $notify['PM'][] = $row; - } - if( $row['by_email'] == 1 ) - { - $notify['EMAIL'][] = $row; - } - - $notify['RSS'][] = $row; - } - } - - return $notify; - } + + * Invision Power Services + * IP.Board v3.1.4 + * Report Center :: Calendar plugin + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @author Based on original "Report Center" by Luke Scott + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Calendar + * @link http://www.invisionpower.com + * @version $Rev: 5713 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

      Incorrect access

      You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class calendar_plugin +{ + /**#@+ + * Registry objects + * + * @access protected + * @var object + */ + protected $registry; + protected $DB; + protected $settings; + protected $request; + protected $lang; + protected $member; + protected $cache; + /**#@-*/ + + /** + * Holds extra data for the plugin + * + * @access private + * @var array Data specific to the plugin + */ + public $_extra; + + /** + * Constructor + * + * @access public + * @param object Registry object + * @return void + */ + public function __construct( ipsRegistry $registry ) + { + //----------------------------------------- + // 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->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + $this->lang = $this->registry->class_localization; + } + + /** + * Display the form for extra data in the ACP + * + * @access public + * @param array Plugin data + * @param object HTML object + * @return string HTML to add to the form + */ + public function displayAdminForm( $plugin_data, &$html ) + { + $return = ''; + + return $return; + } + + /** + * Process the plugin's form fields for saving + * + * @access public + * @param array Plugin data for save + * @return string Error message + */ + public function processAdminForm( &$save_data_array ) + { + return ''; + } + + /** + * Update timestamp for report + * + * @access public + * @param array New reports + * @param array New members cache + * @return boolean + */ + public function updateReportsTimestamp( $new_reports, &$new_members_cache ) + { + return true; + } + + /** + * Get report permissions (only supermods can moderate calendar) + * + * @access public + * @param string Type of perms to check + * @param array Permissions data + * @param array group ids + * @param string Special permissions + * @return boolean + */ + public function getReportPermissions( $check, $com_dat, $group_ids, &$to_return ) + { + if( $this->_extra['report_bypass'] == 0 || $this->memberData['g_is_supmod'] == 1 ) + { + return true; + } + else + { + return false; + } + } + + /** + * Show the report form for this module + * + * @access public + * @param array Application data + * @return string HTML form information + */ + public function reportForm( $com_dat ) + { + $this->registry->class_localization->loadLanguageFile( array( 'public_calendar' ), 'calendar' ); + + $eventid = intval($this->request['event_id']); + + if( ! $eventid ) + { + $this->registry->output->showError( 'reports_no_event', 10177 ); + } + + /** + * Load event + */ + $event = $this->DB->buildAndFetch( array( + 'select' => 'e.*', + 'from' => array( 'cal_events' => 'e' ), + 'where' => 'e.event_id=' . $eventid, + 'add_join' => array( + array( + 'select' => 'c.*', + 'from' => array( 'cal_calendars' => 'c' ), + 'where' => 'c.cal_id=e.event_calendar_id', + 'type' => 'left', + ) + ) + ) ); + + /* Loop through the cache and build calendar jump */ + if ( count( $this->caches['calendars'] ) AND is_array( $this->caches['calendars'] ) ) + { + foreach( $this->caches['calendars'] as $cal_id => $cal ) + { + if( $cal_id == $event['event_calendar_id'] ) + { + /* Got a perm */ + if( ! $this->registry->permissions->check( 'view', $cal ) ) + { + $this->registry->output->showError( 'reports_no_event', 10178 ); + } + } + } + } + + $ex_form_data = array( + 'event_id' => $eventid, + 'ctyp' => 'calendar', + 'title' => $event['event_title'] + ); + + $this->registry->output->setTitle( $this->lang->words['report_cal_page'] ); + $this->registry->output->addNavigation( $this->lang->words['t_welcome'], "app=calendar&module=calendar&cal_id={$event['event_calendar_id']}&do=showevent&event_id={$event['event_id']}" ); + $this->registry->output->addNavigation( $this->lang->words['report_cal_page'], '' ); + + $this->lang->words['report_basic_title'] = $this->lang->words['report_cal_title']; + $this->lang->words['report_basic_url_title'] = $this->lang->words['report_cal_title']; + $this->lang->words['report_basic_enter'] = $this->lang->words['report_cal_msg']; + + $url = $this->settings['base_url'] . "app=calendar&module=calendar&cal_id={$event['event_calendar_id']}&do=showevent&event_id={$event['event_id']}"; + + return $this->registry->getClass('reportLibrary')->showReportForm( $event['event_title'], $url, $ex_form_data ); + } + + /** + * Get section and link + * + * @access public + * @param array Report data + * @return array Section/link + */ + public function giveSectionLinkTitle( $report_row ) + { + ipsRegistry::_loadAppCoreVariables( 'calendar' ); + $calendarCache = $this->cache->getCache('calendars'); + + return array( + 'title' => $calendarCache[ $report_row['exdat1'] ]['cal_title'], + 'url' => "/index.php?app=calendar&module=calendar&cal_id={$report_row['exdat1']}", + ); + } + + /** + * Process a report and save the data appropriate + * + * @access public + * @param array Report data + * @return array Data from saving the report + */ + public function processReport( $com_dat ) + { + $eventid = intval($this->request['event_id']); + + if( ! $eventid ) + { + $this->registry->output->showError( 'reports_no_event', 10179 ); + } + + /** + * Load event + */ + $event = $this->DB->buildAndFetch( array( + 'select' => 'e.*', + 'from' => array( 'cal_events' => 'e' ), + 'where' => 'e.event_id=' . $eventid, + 'add_join' => array( + array( + 'select' => 'c.*', + 'from' => array( 'cal_calendars' => 'c' ), + 'where' => 'c.cal_id=e.event_calendar_id', + 'type' => 'left', + ) + ) + ) ); + + /* Loop through the cache and build calendar jump */ + if ( count( $this->caches['calendars'] ) AND is_array( $this->caches['calendars'] ) ) + { + foreach( $this->caches['calendars'] as $cal_id => $cal ) + { + if( $cal_id == $event['event_calendar_id'] ) + { + /* Got a perm */ + if( ! $this->registry->permissions->check( 'view', $cal ) ) + { + $this->registry->output->showError( 'reports_no_event', 10180 ); + } + } + } + } + + $url = "app=calendar&module=calendar&cal_id={$event['event_calendar_id']}&do=showevent&event_id={$event['event_id']}"; + + $return_data = array(); + $a_url = str_replace("&", "&", $url); + $uid = md5( 'cal_' . $eventid . '_' . $com_dat['com_id'] ); + $status = array(); + + $this->DB->build( array( 'select' => 'status, is_new, is_complete', + 'from' => 'rc_status', + 'where' => "is_new=1 OR is_complete=1", + ) ); + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + if( $row['is_new'] == 1 ) + { + $status['new'] = $row['status']; + } + elseif( $row['is_complete'] == 1 ) + { + $status['complete'] = $row['status']; + } + } + + $this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports_index', 'where' => "uid='{$uid}'" ) ); + $this->DB->execute(); + + if( $this->DB->getTotalRows() == 0 ) + { + $built_report_main = array( + 'uid' => $uid, + 'title' => $this->request['title'], + 'status' => $status['new'], + 'url' => '/index.php?' . $a_url, + 'rc_class' => $com_dat['com_id'], + 'updated_by' => $this->memberData['member_id'], + 'date_updated' => time(), + 'date_created' => time(), + 'exdat1' => $event['event_calendar_id'], + 'exdat2' => $event['event_id'], + 'exdat3' => 0 + ); + + $this->DB->insert( 'rc_reports_index', $built_report_main ); + $rid = $this->DB->getInsertId(); + } + else + { + $the_report = $this->DB->fetch(); + $rid = $the_report['id']; + $this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'] ), "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'; + + $build_report = array( + 'rid' => $rid, + 'report' => IPSText::getTextClass('bbcode')->preDbParse( $this->request['message'] ), + 'report_by' => $this->memberData['member_id'], + 'date_reported' => time(), + ); + + $this->DB->insert( 'rc_reports', $build_report ); + + $reports = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'rc_reports', 'where' => "rid='{$rid}'" ) ); + + $this->DB->update( 'rc_reports_index', array( 'num_reports' => $reports['total'] ), "id='{$rid}'" ); + + $return_data = array( + 'REDIRECT_URL' => $a_url, + 'REPORT_INDEX' => $rid, + 'SAVED_URL' => '/index.php?' . $url, + 'REPORT' => $build_report['report'] + ); + + return $return_data; + } + + /** + * Where to send user after report is submitted + * + * @access public + * @param array Report data + * @return void + */ + public function reportRedirect( $report_data ) + { + $this->registry->output->redirectScreen( $this->lang->words['report_sending'], $this->settings['base_url'] . $report_data['REDIRECT_URL'], true ); + } + + /** + * Retrieve list of users to send notifications to + * + * @access public + * @param string Group ids + * @param array Report data + * @return array Array of users to PM/Email + */ + public function getNotificationList( $group_ids, $report_data ) + { + $notify = array(); + + $this->DB->build( array( + 'select' => 'noti.*', + 'from' => array( 'rc_modpref' => 'noti' ), + 'where' => 'mem.member_group_id IN(' . $group_ids . ')', + 'add_join' => array( + array( + 'select' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id', + 'from' => array( 'members' => 'mem' ), + 'where' => 'mem.member_id=noti.mem_id', + ) + ) + ) ); + $this->DB->execute(); + + if( $this->DB->getTotalRows() > 0 ) + { + while( $row = $this->DB->fetch() ) + { + $notify[] = $row; + } + } + + return $notify; + } } \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/extensions/reportPlugins/index.html b/upload/admin/applications_addon/ips/calendar/extensions/reportPlugins/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications_addon/ips/calendar/extensions/reportPlugins/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/extensions/rssOutput.php b/upload/admin/applications_addon/ips/calendar/extensions/rssOutput.php index 162b5d63..a61f7a0d 100644 --- a/upload/admin/applications_addon/ips/calendar/extensions/rssOutput.php +++ b/upload/admin/applications_addon/ips/calendar/extensions/rssOutput.php @@ -1,153 +1,140 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class rss_output_calendar -{ - /** - * Expiration date - * - * @access private - * @var integer Expiration timestamp - */ - private $expires = 0; - - /** - * Grab the RSS links - * - * @access public - * @return string RSS document - */ - public function getRssLinks() - { - if( !IPSLib::appIsInstalled('calendar') ) - { - return array(); - } - - $return = array(); - - $_calendarCache = ipsRegistry::cache()->getCache('calendars'); - - if( is_array($_calendarCache) AND count($_calendarCache) ) - { - foreach( $_calendarCache as $r ) - { - /* Got a perm */ - if( ! ipsRegistry::getClass( 'permissions' )->check( 'view', $r ) ) - { - continue; - } - - $return[] = array( 'title' => $r['cal_title'], 'url' => ipsRegistry::getClass('output')->formatUrl( ipsRegistry::$settings['board_url'] . "/index.php?app=core&module=global&section=rss&type=calendar&id=" . $r['cal_id'], '%%' . $r['cal_title'] . '%%', 'section=rss2' ) ); - } - } - - return $return; - } - - /** - * Grab the RSS document content and return it - * - * @access public - * @return string RSS document - */ - public function returnRSSDocument() - { - if( !IPSLib::appIsInstalled('calendar') ) - { - return array(); - } - - //----------------------------------------- - // INIT - //----------------------------------------- - - $cal_id = intval( ipsRegistry::$request['id'] ); - $rss_data = array(); - $to_print = ''; - $this->expires = time(); - - //----------------------------------------- - // Get RSS export - //----------------------------------------- - - $rss_data = ipsRegistry::DB()->buildAndFetch( array( 'select' => '*', - 'from' => 'cal_calendars', - 'where' => 'cal_id=' . $cal_id ) ); - - //----------------------------------------- - // Got one? - //----------------------------------------- - - if ( $rss_data['cal_id'] AND $rss_data['cal_rss_export'] ) - { - //----------------------------------------- - // Correct expires time - //----------------------------------------- - - $this->expires = $this->expires + ($rss_data['cal_rss_update'] * 60); - - //----------------------------------------- - // Need to recache? - //----------------------------------------- - - $time_check = time() - ( $rss_data['cal_rss_update'] * 60 ); - - if ( ( ! $rss_data['cal_rss_cache'] ) OR $time_check > $rss_data['cal_rss_update_last'] ) - { - //----------------------------------------- - // Yes - //----------------------------------------- - - define( 'IN_ACP', 1 ); - - require_once( IPSLib::getAppDir( 'calendar' ) . '/modules_admin/calendar/calendars.php' ); - $rss_export = new admin_calendar_calendar_calendars(); - $rss_export->makeRegistryShortcuts( ipsRegistry::instance() ); - - - return $rss_export->calendarRSSCache( $rss_data['cal_id'], 0 ); - } - else - { - //----------------------------------------- - // No - //----------------------------------------- - - return $rss_data['cal_rss_cache']; - } - } - } - - /** - * Grab the RSS document expiration timestamp - * - * @access public - * @return integer Expiration timestamp - */ - public function grabExpiryDate() - { - return $this->expires ? $this->expires : time(); - } + + * Invision Power Services + * IP.Board v3.1.4 + * RSS output plugin :: calendar + * Last Updated: $Date: 2010-10-20 13:11:07 -0400 (Wed, 20 Oct 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Calendar + * @link http://www.invisionpower.com + * @since 6/24/2008 + * @version $Revision: 7005 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

      Incorrect access

      You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class rss_output_calendar +{ + /** + * Expiration date + * + * @var integer Expiration timestamp + */ + private $expires = 0; + + /** + * Grab the RSS links + * + * @return string RSS document + */ + public function getRssLinks() + { + $return = array(); + + $_calendarCache = ipsRegistry::cache()->getCache('calendars'); + + if( is_array($_calendarCache) AND count($_calendarCache) ) + { + foreach( $_calendarCache as $r ) + { + /* Got a perm */ + if( ! ipsRegistry::getClass( 'permissions' )->check( 'view', $r ) || !$r['cal_rss_export'] ) + { + continue; + } + + $return[] = array( 'title' => $r['cal_title'], 'url' => ipsRegistry::getClass('output')->formatUrl( ipsRegistry::$settings['board_url'] . "/index.php?app=core&module=global&section=rss&type=calendar&id=" . $r['cal_id'], '%%' . $r['cal_title'] . '%%', 'section=rss2' ) ); + } + } + + return $return; + } + + /** + * Grab the RSS document content and return it + * + * @return string RSS document + */ + public function returnRSSDocument() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $cal_id = intval( ipsRegistry::$request['id'] ); + $rss_data = array(); + $to_print = ''; + $this->expires = time(); + + //----------------------------------------- + // Get RSS export + //----------------------------------------- + + $rss_data = ipsRegistry::DB()->buildAndFetch( array( 'select' => '*', + 'from' => 'cal_calendars', + 'where' => 'cal_id=' . $cal_id ) ); + + //----------------------------------------- + // Got one? + //----------------------------------------- + + if ( $rss_data['cal_id'] AND $rss_data['cal_rss_export'] ) + { + //----------------------------------------- + // Correct expires time + //----------------------------------------- + + $this->expires = $this->expires + ($rss_data['cal_rss_update'] * 60); + + //----------------------------------------- + // Need to recache? + //----------------------------------------- + + $time_check = time() - ( $rss_data['cal_rss_update'] * 60 ); + + if ( ( ! $rss_data['cal_rss_cache'] ) OR $time_check > $rss_data['cal_rss_update_last'] ) + { + //----------------------------------------- + // Yes + //----------------------------------------- + + define( 'IN_ACP', 1 ); + + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'calendar' ) . '/modules_admin/calendar/calendars.php', 'admin_calendar_calendar_calendars' ); + $rss_export = new $classToLoad(); + $rss_export->makeRegistryShortcuts( ipsRegistry::instance() ); + + + return $rss_export->calendarRSSCache( $rss_data['cal_id'], 0 ); + } + else + { + //----------------------------------------- + // No + //----------------------------------------- + + return $rss_data['cal_rss_cache']; + } + } + } + + /** + * Grab the RSS document expiration timestamp + * + * @return integer Expiration timestamp + */ + public function grabExpiryDate() + { + return $this->expires ? $this->expires : time(); + } } \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/extensions/search/config.php b/upload/admin/applications_addon/ips/calendar/extensions/search/config.php new file mode 100644 index 00000000..8581b2da --- /dev/null +++ b/upload/admin/applications_addon/ips/calendar/extensions/search/config.php @@ -0,0 +1,35 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Config file + * Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $ + * + * + * @author $author$ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Calendar + * @link http://www.invisionpower.com + * @version $Rev: 5855 $ + **/ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

      Incorrect access

      You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +/* Can search with this app */ +$CONFIG['can_search'] = 1; + +/* Can view new content with this app */ +$CONFIG['can_viewNewContent'] = 1; + +/* Can fetch active content with this app */ +$CONFIG['can_activeContent'] = 1; + +/* Can fetch user generated content */ +$CONFIG['can_userContent'] = 1; \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/extensions/search/engines/index.html b/upload/admin/applications_addon/ips/calendar/extensions/search/engines/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications_addon/ips/calendar/extensions/search/engines/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/extensions/search/engines/sql.php b/upload/admin/applications_addon/ips/calendar/extensions/search/engines/sql.php new file mode 100644 index 00000000..acf0ccdb --- /dev/null +++ b/upload/admin/applications_addon/ips/calendar/extensions/search/engines/sql.php @@ -0,0 +1,545 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Basic Calendar Search + * Last Updated: $Date: 2010-02-23 12:38:11 +0000 (Tue, 23 Feb 2010) $ + * + * + * @author $Author: matt $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Calendar + * @link http://www.invisionpower.com + * @version $Rev: 5861 $ + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

      Incorrect access

      You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class search_engine_calendar extends search_engine +{ + /** + * Constructor + */ + public function __construct( ipsRegistry $registry ) + { + parent::__construct( $registry ); + } + + /** + * Perform a search. + * Returns an array of a total count (total number of matches) + * and an array of IDs ( 0 => 1203, 1 => 928, 2 => 2938 ).. matching the required number based on pagination. The ids returned would be based on the filters and type of search + * + * So if we had 1000 replies, and we are on page 2 of 25 per page, we'd return 25 items offset by 25 + * + * @access public + * @return array + */ + public function search() + { + /* INIT */ + $count = 0; + $results = array(); + $sort_by = IPSSearchRegistry::get('in.search_sort_by'); + $sort_order = IPSSearchRegistry::get('in.search_sort_order'); + $search_term = IPSSearchRegistry::get('in.clean_search_term'); + $content_title_only = IPSSearchRegistry::get('opt.searchTitleOnly'); + $post_search_only = IPSSearchRegistry::get('opt.onlySearchPosts'); + $order_dir = ( $sort_order == 'asc' ) ? 'asc' : 'desc'; + $sortKey = ''; + $sortType = ''; + $rows = array(); + + if ( IPSSearchRegistry::get('opt.noPostPreview') OR IPSSearchRegistry::get('display.onlyTitles') ) + { + $group_by = 'c.event_id'; + } + + /* Sorting */ + switch( $sort_by ) + { + default: + case 'date': + $sortKey = 'c.event_unix_from'; + $sortType = 'numerical'; + break; + case 'title': + $sortKey = 'c.event_title'; + $sortType = 'string'; + break; + } + + /* Query the count */ + $count = $this->DB->buildAndFetch( + array( + 'select' => 'COUNT(*) as total_results', + 'from' => array( 'cal_events' => 'c' ), + 'where' => $this->_buildWhereStatement( $search_term, $content_title_only ), + 'group' => $group_by, + 'add_join' => array( + array( + 'from' => array( 'permission_index' => 'i' ), + 'where' => "i.perm_type='calendar' AND i.perm_type_id=c.event_calendar_id", + 'type' => 'left', + ), + array( + 'from' => array( 'profile_friends' => 'friend' ), + 'where' => 'friend.friends_member_id=c.event_member_id AND friend.friends_friend_id=' . $this->memberData['member_id'], + 'type' => 'left', + ), + ) + ) ); + + /* Do the search */ + $this->DB->build( array( + 'select' => "c.*", + 'from' => array( 'cal_events' => 'c' ), + 'where' => $this->_buildWhereStatement( $search_term, $content_title_only ), + 'group' => $group_by, + 'order' => $sortKey . ' ' . $sort_order, + 'limit' => array( IPSSearchRegistry::get('in.start'), IPSSearchRegistry::get('opt.search_per_page') ), + 'add_join' => array( + array( + 'select' => 'i.*', + 'from' => array( 'permission_index' => 'i' ), + 'where' => "i.perm_type='calendar' AND i.perm_type_id=c.event_calendar_id", + 'type' => 'left', + ), + array( + 'select' => 'mem.members_display_name, mem.member_group_id, mem.mgroup_others', + 'from' => array( 'members' => 'mem' ), + 'where' => "mem.member_id=c.event_member_id", + 'type' => 'left', + ), + array( + 'from' => array( 'profile_friends' => 'friend' ), + 'where' => 'friend.friends_member_id=c.event_member_id AND friend.friends_friend_id=' . $this->memberData['member_id'], + 'type' => 'left', + ), + ) + ) ); + $this->DB->execute(); + + /* Sort */ + while( $r = $this->DB->fetch() ) + { + $rows[] = $r; + } + + /* Return it */ + return array( 'count' => $count['total_results'], 'resultSet' => $rows ); + } + + /** + * Perform the viewNewContent search + * Populates $this->_count and $this->_results + * + * @access public + * @return nothin' + */ + public function viewNewContent() + { + /* Loop through the forums and build a list of forums we're allowed access to */ + $start = IPSSearchRegistry::get('in.start'); + $perPage = IPSSearchRegistry::get('opt.search_per_page'); + + IPSSearchRegistry::set('in.search_sort_by' , 'date' ); + IPSSearchRegistry::set('in.search_sort_order', 'desc' ); + IPSSearchRegistry::set('opt.searchTitleOnly' , true ); + IPSSearchRegistry::set('display.onlyTitles' , true ); + IPSSearchRegistry::set('opt.noPostPreview' , true ); + + /* Time */ + $oldStamp = intval( $this->memberData['last_visit'] ) ? intval( $this->memberData['last_visit'] ) : time(); + + /* Start Where */ + $where = array(); + $where[] = $this->_buildWhereStatement( '' ); + + /* Based on oldest timestamp */ + $where[] = "c.event_unix_from > " . $oldStamp; + + $where = implode( " AND ", $where ); + + /* Fetch the count */ + $count = $this->DB->buildAndFetch( + array( + 'select' => 'COUNT(*) as total_results', + 'from' => array( 'cal_events' => 'c' ), + 'where' => $where, + 'add_join' => array( + array( + 'from' => array( 'permission_index' => 'i' ), + 'where' => "i.perm_type='calendar' AND i.perm_type_id=c.event_calendar_id", + 'type' => 'left', + ), + array( + 'from' => array( 'profile_friends' => 'friend' ), + 'where' => 'friend.friends_member_id=c.event_member_id AND friend.friends_friend_id=' . $this->memberData['member_id'], + 'type' => 'left', + ), + ) + ) ); + + /* Fetch the data */ + $events = array(); + + if( $count['total_results'] ) + { + $this->DB->build( array( + 'select' => "c.*", + 'from' => array( 'cal_events' => 'c' ), + 'where' => $where, + 'order' => 'c.event_unix_from DESC', + 'limit' => array( $start, $perPage ), + 'add_join' => array( + array( + 'select' => 'i.*', + 'from' => array( 'permission_index' => 'i' ), + 'where' => "i.perm_type='calendar' AND i.perm_type_id=c.event_calendar_id", + 'type' => 'left', + ), + array( + 'select' => 'mem.members_display_name, mem.member_group_id, mem.mgroup_others', + 'from' => array( 'members' => 'mem' ), + 'where' => "mem.member_id=c.event_member_id", + 'type' => 'left', + ), + array( + 'from' => array( 'profile_friends' => 'friend' ), + 'where' => 'friend.friends_member_id=c.event_member_id AND friend.friends_friend_id=' . $this->memberData['member_id'], + 'type' => 'left', + ), + ) + ) ); + $o = $this->DB->execute(); + + while( $row = $this->DB->fetch( $o ) ) + { + $events[] = $row; + } + } + + /* Return it */ + return array( 'count' => $count['total_results'], 'resultSet' => $events ); + } + + /** + * Perform the search + * Populates $this->_count and $this->_results + * + * @access public + * @return nothin' + */ + public function viewActiveContent() + { + $seconds = IPSSearchRegistry::get('in.period_in_seconds'); + + /* Loop through the forums and build a list of forums we're allowed access to */ + $where = array(); + $start = IPSSearchRegistry::get('in.start'); + $perPage = IPSSearchRegistry::get('opt.search_per_page'); + $imgIds = array(); + + /* Start Where */ + $where = array(); + $where[] = $this->_buildWhereStatement( '' ); + + /* Generate last post times */ + $where[] = "c.event_unix_from > " . intval( time() - $seconds ); + + $where = implode( " AND ", $where ); + + + /* Fetch the count */ + $count = $this->DB->buildAndFetch( + array( + 'select' => 'COUNT(*) as total_results', + 'from' => array( 'cal_events' => 'c' ), + 'where' => $where, + 'add_join' => array( + array( + 'from' => array( 'permission_index' => 'i' ), + 'where' => "i.perm_type='calendar' AND i.perm_type_id=c.event_calendar_id", + 'type' => 'left', + ), + array( + 'from' => array( 'profile_friends' => 'friend' ), + 'where' => 'friend.friends_member_id=c.event_member_id AND friend.friends_friend_id=' . $this->memberData['member_id'], + 'type' => 'left', + ), + ) + ) ); + + /* Fetch count */ + $events = array(); + + if( $count['total_results'] ) + { + $this->DB->build( array( + 'select' => "c.*", + 'from' => array( 'cal_events' => 'c' ), + 'where' => $where, + 'order' => 'c.event_unix_from DESC', + 'limit' => array( $start, $perPage ), + 'add_join' => array( + array( + 'select' => 'i.*', + 'from' => array( 'permission_index' => 'i' ), + 'where' => "i.perm_type='calendar' AND i.perm_type_id=c.event_calendar_id", + 'type' => 'left', + ), + array( + 'select' => 'mem.members_display_name, mem.member_group_id, mem.mgroup_others', + 'from' => array( 'members' => 'mem' ), + 'where' => "mem.member_id=c.event_member_id", + 'type' => 'left', + ), + array( + 'from' => array( 'profile_friends' => 'friend' ), + 'where' => 'friend.friends_member_id=c.event_member_id AND friend.friends_friend_id=' . $this->memberData['member_id'], + 'type' => 'left', + ), + ) + ) ); + $o = $this->DB->execute(); + + while( $row = $this->DB->fetch( $o ) ) + { + $events[] = $row; + } + } + + /* Return it */ + return array( 'count' => $count['total_results'], 'resultSet' => $events ); + } + + /** + * Perform the viewUserContent search + * Populates $this->_count and $this->_results + * + * @access public + * @return nothin' + */ + public function viewUserContent( $member ) + { + /* Init */ + $start = IPSSearchRegistry::get('in.start'); + $perPage = IPSSearchRegistry::get('opt.search_per_page'); + IPSSearchRegistry::set( 'in.search_sort_by' , 'date' ); + IPSSearchRegistry::set( 'in.search_sort_order', 'desc' ); + IPSSearchRegistry::set( 'gallery.searchInKey', 'images' ); + + /* Ensure we limit by date */ + $this->settings['search_ucontent_days'] = ( $this->settings['search_ucontent_days'] ) ? $this->settings['search_ucontent_days'] : 365; + + /* Start Where */ + $where = array(); + $where[] = $this->_buildWhereStatement( '' ); + + /* Search by author */ + $where[] = "c.event_member_id=" . intval( $member['member_id'] ); + + if ( $this->settings['search_ucontent_days'] ) + { + $where[] = "c.event_unix_from > " . ( time() - ( 86400 * intval( $this->settings['search_ucontent_days'] ) ) ); + } + + $where = implode( " AND ", $where ); + + /* Fetch the count */ + $count = $this->DB->buildAndFetch( + array( + 'select' => 'COUNT(*) as count', + 'from' => array( 'cal_events' => 'c' ), + 'where' => $where, + 'add_join' => array( + array( + 'from' => array( 'permission_index' => 'i' ), + 'where' => "i.perm_type='calendar' AND i.perm_type_id=c.event_calendar_id", + 'type' => 'left', + ), + array( + 'from' => array( 'profile_friends' => 'friend' ), + 'where' => 'friend.friends_member_id=c.event_member_id AND friend.friends_friend_id=' . $this->memberData['member_id'], + 'type' => 'left', + ), + ) + ) ); + + /* Fetch the data */ + $events = array(); + + if ( $count['count'] ) + { + $this->DB->build( array( + 'select' => "c.*", + 'from' => array( 'cal_events' => 'c' ), + 'where' => $where, + 'order' => 'c.event_unix_from DESC', + 'limit' => array( $start, $perPage ), + 'add_join' => array( + array( + 'select' => 'i.*', + 'from' => array( 'permission_index' => 'i' ), + 'where' => "i.perm_type='calendar' AND i.perm_type_id=c.event_calendar_id", + 'type' => 'left', + ), + array( + 'select' => 'mem.members_display_name, mem.member_group_id, mem.mgroup_others', + 'from' => array( 'members' => 'mem' ), + 'where' => "mem.member_id=c.event_member_id", + 'type' => 'left', + ), + array( + 'from' => array( 'profile_friends' => 'friend' ), + 'where' => 'friend.friends_member_id=c.event_member_id AND friend.friends_friend_id=' . $this->memberData['member_id'], + 'type' => 'left', + ), + ) + ) ); + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $events[] = $row; + } + } + + /* Return it */ + return array( 'count' => $count['count'], 'resultSet' => $events ); + } + + /** + * Builds the where portion of a search string + * + * @access private + * @param string $search_term The string to use in the search + * @param bool $content_title_only Search only title records + * @return string + **/ + private function _buildWhereStatement( $search_term, $content_title_only=false ) + { + /* INI */ + $where_clause = array(); + + if( $search_term ) + { + if( $content_title_only ) + { + $where_clause[] = "c.event_title LIKE '%{$search_term}%'"; + } + else + { + $where_clause[] = "(c.event_title LIKE '%{$search_term}%' OR c.event_content LIKE '%{$search_term}%')"; + } + } + + /* Exclude some items */ + if( !$this->memberData['g_is_supmod'] ) + { + /* Approved */ + $where_clause[] = 'c.event_approved=1'; + + /* Owner only */ + $where_clause[] = '(i.owner_only=0 OR c.event_member_id=' . $this->memberData['member_id'] . ')'; + + /* Friend only */ + $where_clause[] = '(i.friend_only=0 OR friend.friends_id ' . $this->DB->buildIsNull( false ) . ')'; + + /* Authorized users only */ + $where_clause[] = '(i.authorized_users ' . $this->DB->buildIsNull() . " OR i.authorized_users='' OR c.event_member_id=" . $this->memberData['member_id'] . " OR i.authorized_users LIKE '%," . $this->memberData['member_id'] . ",%')"; + } + + /* Date Restrict */ + if( $this->search_begin_timestamp && $this->search_end_timestamp ) + { + $where_clause[] = $this->DB->buildBetween( "c.event_unix_from", $this->search_begin_timestamp, $this->search_end_timestamp ); + } + else + { + if( $this->search_begin_timestamp ) + { + $where_clause[] = "c.event_unix_from > {$this->search_begin_timestamp}"; + } + + if( $this->search_end_timestamp ) + { + $where_clause[] = "c.event_unix_from < {$this->search_end_timestamp}"; + } + } + + /* Add in AND where conditions */ + if( isset( $this->whereConditions['AND'] ) && count( $this->whereConditions['AND'] ) ) + { + $where_clause = array_merge( $where_clause, $this->whereConditions['AND'] ); + } + + /* ADD in OR where conditions */ + if( isset( $this->whereConditions['OR'] ) && count( $this->whereConditions['OR'] ) ) + { + $where_clause[] = '( ' . implode( ' OR ', $this->whereConditions['OR'] ) . ' )'; + } + + /* Permissions */ + $where_clause[] = $this->DB->buildRegexp( "i.perm_view", $this->member->perm_id_array ); + + /* Event permissions */ + $where_clause[] = "((c.event_private=1 AND c.event_member_id=" . $this->memberData['member_id'] . ") OR (c.event_private=0 AND " . $this->DB->buildRegexp( "c.event_perms", $this->member->perm_id_array ) . "))"; + + /* Build and return the string */ + return implode( " AND ", $where_clause ); + } + + /** + * Remap standard columns (Apps can override ) + * + * @access public + * @param string $column sql table column for this condition + * @return string column + * @return void + */ + public function remapColumn( $column ) + { + $column = $column == 'member_id' ? 'c.event_member_id' : $column; + + return $column; + } + + /** + * Returns an array used in the searchplugin's setCondition method + * + * @access public + * @param array $data Array of forums to view + * @return array Array with column, operator, and value keys, for use in the setCondition call + **/ + public function buildFilterSQL( $data ) + { + /* INIT */ + $return = array(); + + /* Set up some defaults */ + IPSSearchRegistry::set( 'opt.noPostPreview' , false ); + IPSSearchRegistry::set( 'opt.onlySearchPosts', false ); + + return array(); + } + + /** + * Can handle boolean searching + * + * @access public + * @return boolean + */ + public function isBoolean() + { + return false; + } +} \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/extensions/search/form.php b/upload/admin/applications_addon/ips/calendar/extensions/search/form.php new file mode 100644 index 00000000..139a20db --- /dev/null +++ b/upload/admin/applications_addon/ips/calendar/extensions/search/form.php @@ -0,0 +1,59 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Returns HTML for the form (optional class, not required) + * Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $ + * + * + * @author $author$ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Calendar + * @link http://www.invisionpower.com + * @version $Rev: 5855 $ + **/ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

      Incorrect access

      You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class search_form_calendar +{ + /** + * Construct + * + */ + public function __construct() + { + /* Make object */ + $this->registry = ipsRegistry::instance(); + $this->DB = $this->registry->DB(); + $this->settings =& $this->registry->fetchSettings(); + $this->request =& $this->registry->fetchRequest(); + $this->lang = $this->registry->getClass('class_localization'); + $this->member = $this->registry->member(); + $this->memberData =& $this->registry->member()->fetchMemberData(); + $this->cache = $this->registry->cache(); + $this->caches =& $this->registry->cache()->fetchCaches(); + } + + /** + * Return sort drop down + * + * + * @access public + * @return array + */ + public function fetchSortDropDown() + { + $array = array( 'date' => $this->lang->words['s_search_type_0'], + 'title' => $this->lang->words['forum_sort_title'] ); + + return $array; + } +} diff --git a/upload/admin/applications_addon/ips/calendar/extensions/search/format.php b/upload/admin/applications_addon/ips/calendar/extensions/search/format.php new file mode 100644 index 00000000..0599fc75 --- /dev/null +++ b/upload/admin/applications_addon/ips/calendar/extensions/search/format.php @@ -0,0 +1,109 @@ + + * Invision Power Services + * IP.Board v3.1.4 + * Formats calendar search results + * Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $ + * + * + * @author $author$ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Calendar + * @link http://www.invisionpower.com + * @version $Rev: 5855 $ + **/ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

      Incorrect access

      You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class search_format_calendar extends search_format +{ + /** + * Constructor + */ + public function __construct( ipsRegistry $registry ) + { + parent::__construct( $registry ); + } + + /** + * Parse search results + * + * @access private + * @param array $r Search result + * @return array $html Blocks of HTML + */ + public function parseAndFetchHtmlBlocks( $rows ) + { + return parent::parseAndFetchHtmlBlocks( $rows ); + } + + /** + * Formats the forum search result for display + * + * @access public + * @param array $search_row Array of data + * @return mixed Formatted content, ready for display, or array containing a $sub section flag, and content + **/ + public function formatContent( $data ) + { + $data['misc'] = unserialize( $data['misc'] ); + + /* Format as a ranged event */ + if( $data['misc'] ) + { + return array( ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->calEventRangedSearchResult( $data, IPSSearchRegistry::get('display.onlyTitles') ), 0 ); + } + /* Format as a single day event */ + else + { + return array( ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->calEventSearchResult( $data, IPSSearchRegistry::get('display.onlyTitles') ), 0 ); + } + } + + /** + * Formats / grabs extra data for results + * Takes an array of IDS (can be IDs from anything) and returns an array of expanded data. + * + * @access public + * @return array + */ + public function processResults( $ids ) + { + $rows = array(); + + foreach( $ids as $i => $d ) + { + $rows[ $i ] = $this->genericizeResults( $d ); + } + + return $rows; + } + + /** + * Reassigns fields in a generic way for results output + * + * @param array $r + * @return array + **/ + public function genericizeResults( $r ) + { + $r['app'] = 'calendar'; + $r['content'] = $r['event_content']; + $r['content_title'] = $r['event_title']; + $r['updated'] = $r['event_unix_from']; + $r['type_2'] = 'event'; + $r['type_id_2'] = $r['event_id']; + $r['misc'] = $r['event_unix_to']; + $r['member_id'] = $r['event_member_id']; + + return $r; + } + +} \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/extensions/search/index.html b/upload/admin/applications_addon/ips/calendar/extensions/search/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications_addon/ips/calendar/extensions/search/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/extensions/searchDisplay.php b/upload/admin/applications_addon/ips/calendar/extensions/searchDisplay.php deleted file mode 100644 index b9b8241b..00000000 --- a/upload/admin/applications_addon/ips/calendar/extensions/searchDisplay.php +++ /dev/null @@ -1,74 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class calendarSearchDisplay implements iSearchDisplay -{ - /** - * The search plugin for this app - * - * @access public - * @var object - */ - public $search_plugin; - - /** - * Formats the calendar search result for display - * - * @access public - * @param array $search_row Array of data from search_index - * @return string Formatted content, ready for display - */ - public function formatContent( $search_row ) - { - /* Format as a topic */ - if( $search_row['misc'] ) - { - return ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->calEventRangedSearchResult( $search_row, $this->search_plugin->onlyTitles ); - } - /* Format as a forum */ - else - { - return ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->calEventSearchResult( $search_row, $this->search_plugin->onlyTitles ); - } - } - - /** - * Retuns the html for displaying the calendar filter on the advanced search page - * - * @access public - * @return string - */ - public function getFilterHTML() - { - return ''; - //return ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->forumAdvancedSearchFilters(); - } - - /** - * Builds the SQL filter query - * - * @access public - * @param array - * @return array - */ - public function buildFilterSQL( $data ) - { - return array(); - } -} \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/extensions/searchPlugin.php b/upload/admin/applications_addon/ips/calendar/extensions/searchPlugin.php deleted file mode 100644 index c840cbf9..00000000 --- a/upload/admin/applications_addon/ips/calendar/extensions/searchPlugin.php +++ /dev/null @@ -1,458 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class searchCalendarPlugin implements iSearchIndexPlugin -{ - /** - * Database object - * - * @access private - * @var object - */ - private $DB; - - /** - * Date range restriction start - * - * @access private - * @var integer - */ - private $search_begin_timestamp = 0; - - /** - * Date range restriction end - * - * @access private - * @var integer - */ - private $search_end_timestamp = 0; - - /** - * Array of conditions for this search - * - * @access private - * @var array - */ - private $whereConditions = array(); - - /** - * Remoe self from search results - * - * @access public - * @var boolean - */ - public $removeSelf = false; - - /** - * Only display title - * - * @access public - * @var boolean - */ - public $onlyTitles = false; - - /** - * Setup registry objects - * - * @access public - * @param object ipsRegistry $registry - * @return void - */ - public function __construct( ipsRegistry $registry ) - { - $this->DB = $registry->DB(); - $this->member = $registry->member(); - $this->memberData =& $registry->member()->fetchMemberData(); - } - - /** - * Performs search and returns an array of results - * - * @access public - * @param string $search_term - * @param array $limit_clause The erray should be array( begin, end ) - * @param string $sort_by Column to sort by - * @param string $group_by Column to group by - * @param bool $content_title_only Only search title records - * @return array - */ - public function getSearchResults( $search_term, $limit_clause, $sort_by, $group_by='', $content_title_only=false, $sort_order='' ) - { - /* Group By */ - if( $group_by ) - { - $group_by = 'c.' . $group_by; - } - - /* User prefs */ - $order_dir = ( $sort_order == 'asc' ) ? 'asc' : 'desc'; - - /* Do the search */ - $this->DB->build( array( - 'select' => "c.*", - 'from' => array( 'cal_events' => 'c' ), - 'where' => $this->_buildWhereStatement( $search_term, $content_title_only ), - 'limit' => $limit_clause, - 'order' => "c.event_unix_from " . $order_dir, - 'group' => $group_by, - 'add_join' => array( - array( - 'select' => 'i.*', - 'from' => array( 'permission_index' => 'i' ), - 'where' => "i.perm_type='calendar' AND i.perm_type_id=c.event_calendar_id", - 'type' => 'left', - ), - array( - 'select' => 'mem.members_display_name, mem.member_group_id, mem.mgroup_others', - 'from' => array( 'members' => 'mem' ), - 'where' => "mem.member_id=c.event_member_id", - 'type' => 'left', - ), - array( - 'from' => array( 'profile_friends' => 'friend' ), - 'where' => 'friend.friends_member_id=c.event_member_id AND friend.friends_friend_id=' . $this->memberData['member_id'], - 'type' => 'left', - ), - ) - ) ); - $this->DB->execute(); - - /* Build result array */ - $rows = array(); - - while( $r = $this->DB->fetch() ) - { - /* Reassign stuff to match the search_index */ - $rows[] = $this->formatFieldsForIndex( $r ); - } - - return $rows; - } - - /** - * Performs live search and returns an array of results - * NOT AVAILABLE IN BASIC SEARCH - * - * @access public - * @param string $search_term - * @return array - */ - public function getLiveSearchResults( $search_term ) - { - return array(); - } - - /** - * Returns the total number of results the search will return - * - * @access public - * @param string $search_term Search term - * @param string $group_by Column to group by - * @param bool $content_title_only Only search title records - * @return integer - */ - public function getSearchCount( $search_term, $group_by='', $content_title_only=false ) - { - /* Group By */ - if( $group_by ) - { - $group_by = 'c.' . $group_by; - } - - /* Query the count */ - $this->DB->build( array( - 'select' => 'COUNT(*) as total_results', - 'from' => array( 'cal_events' => 'c' ), - 'where' => $this->_buildWhereStatement( $search_term, $content_title_only ), - 'group' => $group_by, - 'add_join' => array( - array( - 'from' => array( 'permission_index' => 'i' ), - 'where' => "i.perm_type='calendar' AND i.perm_type_id=c.event_calendar_id", - 'type' => 'left', - ), - array( - 'from' => array( 'profile_friends' => 'friend' ), - 'where' => 'friend.friends_member_id=c.event_member_id AND friend.friends_friend_id=' . $this->memberData['member_id'], - 'type' => 'left', - ), - ) - ) ); - $this->DB->execute(); - - $search = $this->DB->fetch(); - - /* Return the count */ - return $search['total_results']; - } - - /** - * Restrict the date range that the search is performed on - * - * @access public - * @param int $begin Start timestamp - * @param int [$end] End timestamp - * @return void - */ - public function setDateRange( $begin, $end=0 ) - { - $this->search_begin_timestamp = $begin; - $this->search_end_timestamp = $end; - } - - /** - * mySQL function for adding special search conditions - * - * @access public - * @param string $column sql table column for this condition - * @param string $operator Operation to perform for this condition, ex: =, <>, IN, NOT IN - * @param mixed $value Value to check with - * @param string $comp Comparison type - * @return void - */ - public function setCondition( $column, $operator, $value, $comp='AND' ) - { - /* Remap */ - $column = $column == 'member_id' ? 'event_member_id' : $column; - $column = $column == 'content_title' ? 'event_title' : $column; - - if( $column == 'app' OR $column == 'type_id' ) - { - return; - } - - /* Build the condition based on operator */ - switch( strtoupper( $operator ) ) - { - case 'IN': - case 'NOT IN': - $this->whereConditions[$comp][] = "c.{$column} {$operator} ( {$value} )"; - break; - - default: - $this->whereConditions[$comp][] = "c.{$column} {$operator} {$value}"; - break; - } - } - - /** - * Allows you to specify multiple conditions that are chained together - * - * @access public - * @param array $conditions Array of conditions, each element has 3 keys: column, operator, value, see the setCondition function for information on each - * @param string $inner_comp Comparison operator to use inside the chain - * @param string $outer_comp Comparison operator to use outside the chain - * @return void - */ - public function setMultiConditions( $conditions, $inner_comp='OR', $outer_comp='AND' ) - { - /* Loop through the conditions to build the statement */ - $_temp = array(); - - foreach( $conditions as $r ) - { - /* REMAP */ - $r['column'] = ( $r['column'] == 'type_id' ) ? 'event_calendar_id' : $r['column']; - - if( $r['column'] == 'app' ) - { - continue; - } - - switch( strtoupper( $r['operator'] ) ) - { - case 'IN': - case 'NOT IN': - $_temp[] = "c.{$r['column']} {$r['operator']} ( {$r['value']} )"; - break; - - default: - $_temp[] = "c.{$r['column']} {$r['operator']} {$r['value']}"; - break; - } - } - - $this->whereConditions[$outer_comp][] = '( ' . implode( $_temp, ' ' . $inner_comp . ' ' ) . ' ) '; - } - - /** - * Set search conditions for "View unread content" - * - * @access public - * @return void - */ - public function setUnreadConditions() - { - $this->setDateRange( intval( $this->memberData['last_visit'] ), time() ); - } - - /** - * Builds the where portion of a search string - * - * @access private - * @param string $search_term The string to use in the search - * @param bool $content_title_only Search only title records - * @return string - **/ - private function _buildWhereStatement( $search_term, $content_title_only=false ) - { - /* INI */ - $where_clause = array(); - - if( $search_term ) - { - if( $content_title_only ) - { - $where_clause[] = "c.event_title LIKE '%{$search_term}%'"; - } - else - { - $where_clause[] = "c.event_title LIKE '%{$search_term}%' OR c.event_content LIKE '%{$search_term}%'"; - } - } - - /* Exclude some items */ - if( !$this->memberData['g_is_supmod'] ) - { - /* Owner only */ - $where_clause[] = '(i.owner_only=0 OR c.event_member_id=' . $this->memberData['member_id'] . ')'; - - /* Friend only */ - $where_clause[] = '(i.friend_only=0 OR friend.friends_id ' . $this->DB->buildIsNull( false ) . ')'; - - /* Authorized users only */ - $where_clause[] = '(i.authorized_users ' . $this->DB->buildIsNull() . " OR i.authorized_users='' OR c.event_member_id=" . $this->memberData['member_id'] . " OR i.authorized_users LIKE '%," . $this->memberData['member_id'] . ",%')"; - } - - /* Date Restrict */ - if( $this->search_begin_timestamp && $this->search_end_timestamp ) - { - $where_clause[] = $this->DB->buildBetween( "c.event_unix_from", $this->search_begin_timestamp, $this->search_end_timestamp ); - } - else - { - if( $this->search_begin_timestamp ) - { - $where_clause[] = "c.event_unix_from > {$this->search_begin_timestamp}"; - } - - if( $this->search_end_timestamp ) - { - $where_clause[] = "c.event_unix_from < {$this->search_end_timestamp}"; - } - } - - /* Add in AND where conditions */ - if( isset( $this->whereConditions['AND'] ) && count( $this->whereConditions['AND'] ) ) - { - $where_clause = array_merge( $where_clause, $this->whereConditions['AND'] ); - } - - /* ADD in OR where conditions */ - if( isset( $this->whereConditions['OR'] ) && count( $this->whereConditions['OR'] ) ) - { - $where_clause[] = '( ' . implode( ' OR ', $this->whereConditions['OR'] ) . ' )'; - } - - /* Permissions */ - $where_clause[] = $this->DB->buildRegexp( "i.perm_view", $this->member->perm_id_array ); - - /* Event permissions */ - $where_clause[] = "((c.event_private=1 AND c.event_member_id=" . $this->memberData['member_id'] . ") OR (c.event_private=0 AND " . $this->DB->buildRegexp( "c.event_perms", $this->member->perm_id_array ) . "))"; - - /* Build and return the string */ - return implode( " AND ", $where_clause ); - } - - /** - * Reassigns fields in a way the index exepcts - * - * @param array $r - * @return array - **/ - public function formatFieldsForIndex( $r ) - { - $r['app'] = 'calendar'; - $r['content'] = $r['event_content']; - $r['content_title'] = $r['event_title']; - $r['updated'] = $r['event_unix_from']; - $r['type_2'] = 'event'; - $r['type_id_2'] = $r['event_id']; - $r['misc'] = $r['event_unix_to']; - $r['member_id'] = $r['event_member_id']; - - return $r; - } - - /** - * This function grabs the actual results for display - * - * @param array $ids - * @return query result - **/ - public function getResultsForSphinx( $ids ) - { - $this->DB->build( array( - 'select' => "c.*", - 'from' => array( 'cal_events' => 'c' ), - 'where' => 'c.event_id IN( ' . implode( ',', $ids ) . ')', - 'order' => 'c.event_unix_from DESC', - 'add_join' => array( - array( - 'select' => 'mem.members_display_name, mem.member_group_id, mem.mgroup_others', - 'from' => array( 'members' => 'mem' ), - 'where' => "mem.member_id=c.event_member_id", - 'type' => 'left', - ) - ) - ) ); - return $this->DB->execute(); - } - - /** - * Gets the name of the field this search index uses for dates.... >_< - * - * @return string - **/ - public function getDateField() - { - return 'event_unix_from'; - } - - /** - * Gets field names for other conditions - * - * @param string Column - * @return string - **/ - public function getConditionField( $column ) - { - switch( $column ) - { - case 'member_id': - return 'event_member_id'; - break; - } - - return $column; - } -} \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/extensions/sphinxTemplate.php b/upload/admin/applications_addon/ips/calendar/extensions/sphinxTemplate.php index baf7843f..5197a612 100644 --- a/upload/admin/applications_addon/ips/calendar/extensions/sphinxTemplate.php +++ b/upload/admin/applications_addon/ips/calendar/extensions/sphinxTemplate.php @@ -1,93 +1,96 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -$appSphinxTemplate = <<cache_store VALUES( 'sphinx_calendar_counter', (SELECT max(event_id) FROM cal_events), '', 0, UNIX_TIMESTAMP() ) - - # Query posts for the main source - sql_query = SELECT e.*, e.event_id as search_id, \ - REPLACE( pi.perm_view, '*', 0 ) as perm_view, \ - CASE WHEN pi.authorized_users IS NULL THEN 0 ELSE pi.authorized_users END AS authorized_users, \ - CASE WHEN pi.friend_only=0 THEN 0 ELSE e.event_member_id END AS friend_only, \ - CASE WHEN pi.owner_only=0 THEN 0 ELSE e.event_member_id END AS owner_only \ - FROM cal_events e \ - LEFT JOIN permission_index pi ON ( pi.perm_type_id=e.event_calendar_id AND pi.perm_type='calendar' ) \ - WHERE e.event_id <= ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_calendar_counter' ) - - # Fields - sql_attr_uint = search_id - sql_attr_uint = friend_only - sql_attr_uint = owner_only - sql_attr_timestamp = event_unix_from - sql_attr_multi = uint perm_view from field - sql_attr_multi = uint authorized_users from field - sql_attr_uint = event_member_id - - sql_ranged_throttle = 0 -} - -source calendar_search_delta : calendar_search_main -{ - # Override the base sql_query_pre - sql_query_pre = - - # Query posts for the main source - sql_query = SELECT e.*, e.event_id as search_id, \ - REPLACE( pi.perm_view, '*', 0 ) as perm_view, \ - CASE WHEN pi.authorized_users IS NULL THEN 0 ELSE pi.authorized_users END AS authorized_users, \ - CASE WHEN pi.friend_only=0 THEN 0 ELSE e.event_member_id END AS friend_only, \ - CASE WHEN pi.owner_only=0 THEN 0 ELSE e.event_member_id END AS owner_only \ - FROM cal_events e \ - LEFT JOIN permission_index pi ON ( pi.perm_type_id=e.event_calendar_id AND pi.perm_type='calendar' ) \ - WHERE e.event_id > ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_calendar_counter' ) -} - -index calendar_search_main -{ - source = calendar_search_main - path = /calendar_search_main - - docinfo = extern - mlock = 0 - morphology = none - min_word_len = 2 - charset_type = sbcs - html_strip = 0 -} - -index calendar_search_delta : calendar_search_main -{ - source = calendar_search_delta - path = /calendar_search_delta -} - - - -EOF; + + * Invision Power Services + * IP.Board v3.1.4 + * Sphinx template file + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Calendar + * @link http://www.invisionpower.com + * @version $Rev: 5713 $ + * @since 3.0.0 + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

      Incorrect access

      You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +$appSphinxTemplate = <<cache_store VALUES( 'sphinx_calendar_counter', (SELECT max(event_id) FROM cal_events), '', 0, UNIX_TIMESTAMP() ) + + # Query posts for the main source + sql_query = SELECT e.*, e.event_id as search_id, \ + REPLACE( pi.perm_view, '*', 0 ) as perm_view, \ + CASE WHEN pi.authorized_users IS NULL THEN 0 ELSE pi.authorized_users END AS authorized_users, \ + CASE WHEN pi.friend_only=0 THEN 0 ELSE e.event_member_id END AS friend_only, \ + CASE WHEN pi.owner_only=0 THEN 0 ELSE e.event_member_id END AS owner_only \ + FROM cal_events e \ + LEFT JOIN permission_index pi ON ( pi.perm_type_id=e.event_calendar_id AND pi.perm_type='calendar' ) \ + WHERE e.event_id <= ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_calendar_counter' ) + + # Fields + sql_attr_uint = search_id + sql_attr_uint = friend_only + sql_attr_uint = owner_only + sql_attr_timestamp = event_unix_from + sql_attr_multi = uint perm_view from field + sql_attr_multi = uint authorized_users from field + sql_attr_uint = event_member_id + + sql_ranged_throttle = 0 +} + +source calendar_search_delta : calendar_search_main +{ + # Override the base sql_query_pre + sql_query_pre = + + # Query posts for the main source + sql_query = SELECT e.*, e.event_id as search_id, \ + REPLACE( pi.perm_view, '*', 0 ) as perm_view, \ + CASE WHEN pi.authorized_users IS NULL THEN 0 ELSE pi.authorized_users END AS authorized_users, \ + CASE WHEN pi.friend_only=0 THEN 0 ELSE e.event_member_id END AS friend_only, \ + CASE WHEN pi.owner_only=0 THEN 0 ELSE e.event_member_id END AS owner_only \ + FROM cal_events e \ + LEFT JOIN permission_index pi ON ( pi.perm_type_id=e.event_calendar_id AND pi.perm_type='calendar' ) \ + WHERE e.event_id > ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_calendar_counter' ) +} + +index calendar_search_main +{ + source = calendar_search_main + path = /calendar_search_main + + docinfo = extern + mlock = 0 + morphology = none + min_word_len = 2 + charset_type = sbcs + html_strip = 0 +} + +index calendar_search_delta : calendar_search_main +{ + source = calendar_search_delta + path = /calendar_search_delta +} + + + +EOF; diff --git a/upload/admin/applications_addon/ips/calendar/index.html b/upload/admin/applications_addon/ips/calendar/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/calendar/index.html +++ b/upload/admin/applications_addon/ips/calendar/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/modules_admin/calendar/calendars.php b/upload/admin/applications_addon/ips/calendar/modules_admin/calendar/calendars.php index 30cbb8c8..0867ebaa 100644 --- a/upload/admin/applications_addon/ips/calendar/modules_admin/calendar/calendars.php +++ b/upload/admin/applications_addon/ips/calendar/modules_admin/calendar/calendars.php @@ -1,845 +1,838 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class admin_calendar_calendar_calendars extends ipsCommand -{ - /** - * Skin file - * - * @access public - * @var object - */ - public $html; - - /** - * Main execution method - * - * @access public - * @param object ipsRegistry reference - * @return void - */ - public function doExecute( ipsRegistry $registry ) - { - /* Load Skin and Lang */ - $this->html = $this->registry->output->loadTemplate( 'cp_skin_calendar' ); - $this->html->form_code = 'module=calendar&section=calendars'; - $this->html->form_code_js = 'module=calendar§ion=calendars'; - - $this->lang->loadLanguageFile( array( 'admin_calendar' ) ); - - switch( $this->request['do'] ) - { - case 'calendar_delete': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'calendar_delete' ); - $this->calendarDelete(); - break; - - case 'calendar_add': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'calendar_manage' ); - $this->calendarForm( 'new' ); - break; - - case 'calendar_add_do': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'calendar_manage' ); - $this->calendarSave( 'new' ); - break; - - case 'calendar_edit': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'calendar_manage' ); - $this->calendarForm( 'edit' ); - break; - - case 'calendar_edit_do': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'calendar_manage' ); - $this->calendarSave( 'edit' ); - break; - - case 'calendar_move': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'calendar_manage' ); - $this->calendarMove(); - break; - - case 'calendar_rebuildcache': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'calendar_manage' ); - $this->calendarRebuildCache( 1 ); - break; - - case 'calendar_rss_cache': - $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'calendar_manage' ); - $this->calendarRSSCache( intval( $this->request['cal_id'] ), 1 ); - break; - - case 'calendars_list': - default: - $this->calendarsList(); - break; - } - - /* Output */ - $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); - $this->registry->output->sendOutput(); - } - - /** - * Update the calendar position - * - * @access public - * @return void - */ - public function calendarMove() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - require_once( IPS_KERNEL_PATH . 'classAjax.php' ); - $ajax = new classAjax(); - - //----------------------------------------- - // Checks... - //----------------------------------------- - - if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) - { - $ajax->returnString( $this->lang->words['postform_badmd5'] ); - exit(); - } - - //----------------------------------------- - // Save new position - //----------------------------------------- - - $position = 1; - - if( is_array($this->request['calendars']) AND count($this->request['calendars']) ) - { - foreach( $this->request['calendars'] as $this_id ) - { - $this->DB->update( 'cal_calendars', array( 'cal_position' => $position ), 'cal_id=' . $this_id ); - - $position++; - } - } - - $this->calendarsRebuildCache(); - - $ajax->returnString( 'OK' ); - exit(); - } - - /** - * Delete a calendar - * - * @access public - * @return void - */ - public function calendarDelete() - { - /* INIT */ - $cal_id = intval( $this->request['cal_id'] ); - - if ( ! $cal_id ) - { - $this->registry->output->global_message = $this->lang->words['c_noid']; - $this->components_list(); - return; - } - - /* Delete Calendar Events */ - $this->DB->delete( 'cal_events', 'event_calendar_id= ' .$cal_id ); - - /* Delete Calendar */ - $this->DB->delete( 'cal_calendars', 'cal_id=' . $cal_id ); - $this->DB->delete( 'permission_index', "app='calendar' AND perm_type='calendar' AND perm_type_id=" . $cal_id ); - - /* Recache and bounce */ - /* Rebuild Caches and Bounce */ - $this->calendarsRebuildCache(); - $this->calendarRebuildCache( 0 ); - $this->calendarRSSCache( 0, 0 ); - - $this->registry->output->global_message = $this->lang->words['c_removed']; - $this->calendarsList(); - } - - /** - * Handles the calednar new/edit form - * - * @access public - * @param string $type Either new or edit - * @return void - */ - public function calendarSave( $type='new' ) - { - /* INIT */ - $cal_id = intval( $this->request['cal_id'] ); - $cal_title = trim( IPSText::stripslashes( IPSText::htmlspecialchars( $_POST['cal_title'] ) ) ); - $cal_moderate = intval( $this->request['cal_moderate'] ); - $cal_event_limit = intval( $this->request['cal_event_limit'] ); - $cal_bday_limit = intval( $this->request['cal_bday_limit'] ); - $cal_rss_export = intval( $this->request['cal_rss_export'] ); - $cal_rss_export_days = intval( $this->request['cal_rss_export_days'] ); - $cal_rss_export_max = intval( $this->request['cal_rss_export_max'] ); - $cal_rss_update = intval( $this->request['cal_rss_update'] ); - $cal_perms = array( 'perm_read' => '', 'perm_post' => '', 'perm_nomod' => '' ); - - /* Error Checks */ - if ( $type == 'edit' ) - { - if ( ! $cal_id OR ! $cal_title ) - { - $this->registry->output->global_message = $this->lang->words['c_noid']; - $this->calendarsList(); - return; - } - } - else - { - if ( ! $cal_title ) - { - $this->registry->output->global_message = $this->lang->words['c_completeform']; - $this->calendarForm( $type ); - return; - } - } - - /* DB Array */ - $array = array( 'cal_title' => $cal_title, - 'cal_moderate' => $cal_moderate, - 'cal_event_limit' => $cal_event_limit, - 'cal_bday_limit' => $cal_bday_limit, - 'cal_rss_export' => $cal_rss_export, - 'cal_rss_export_days' => $cal_rss_export_days, - 'cal_rss_export_max' => $cal_rss_export_max, - 'cal_rss_update' => $cal_rss_update, - ); - - /* Create Calendar */ - if ( $type == 'new' ) - { - $this->DB->insert( 'cal_calendars', $array ); - $cal_id = $this->DB->getInsertId(); - $this->registry->output->global_message = $this->lang->words['c_added']; - } - /* Modify Calendar */ - else - { - $this->DB->update( 'cal_calendars', $array, 'cal_id='.$cal_id ); - $this->registry->output->global_message = $this->lang->words['c_edited']; - } - - /* Permissions */ - require_once( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php' ); - $permissions = new classPublicPermissions( ipsRegistry::instance() ); - $permissions->savePermMatrix( $this->request['perms'], $cal_id, 'calendar' ); - - /* Rebuild Caches and Bounce */ - $this->calendarsRebuildCache(); - $this->calendarRebuildCache( 0 ); - $this->calendarRSSCache( $cal_id, 0 ); - $this->cache->rebuildCache( 'rss_output_cache' ); - - $this->calendarsList(); - } - - /** - * Add/Edit Calendar Form - * - * @access public - * @param string $type Either new or edit - * @return void - */ - public function calendarForm( $type='new' ) - { - //----------------------------------------- - // Init Vars - //----------------------------------------- - - $cal_id = $this->request['cal_id'] ? intval( $this->request['cal_id'] ) : 0; - $form = array(); - $form['perm_read'] = ""; - $form['perm_post'] = ""; - $form['perm_nomod'] = ""; - $form['perm_read_all'] = ""; - $form['perm_post_all'] = ""; - $form['perm_nomod_all'] = ""; - - /* New Calendar */ - if ( $type == 'new' ) - { - /* Form Bits */ - $formcode = 'calendar_add_do'; - $title = $this->lang->words['c_addcal']; - $button = $this->lang->words['c_addcal']; - - /* Data */ - $calendar = array( 'perm_read' => '', - 'perm_post' => '', - 'perm_nomod' => '', - 'cal_title' => '', - 'cal_moderate' => '', - 'cal_event_limit' => '', - 'cal_bday_limit' => '', - 'cal_rss_export' => '', - 'cal_rss_update' => '', - 'cal_rss_export_days' => '', - 'cal_rss_export_max' => '', - 'cal_id' => 0 ); - } - /* Edit Calendar */ - else - { - /* Data */ - $calendar = $this->DB->buildAndFetch( array( - 'select' => 'c.*', - 'from' => array( 'cal_calendars' => 'c' ), - 'where' => 'c.cal_id=' . $cal_id, - 'add_join' => array( - array( - 'select' => 'p.*', - 'from' => array( 'permission_index' => 'p' ), - 'where' => "p.perm_type='calendar' AND perm_type_id=c.cal_id", - 'type' => 'left', - ) - ) - ) ); - - if ( ! $calendar['cal_id'] ) - { - $this->registry->output->global_message = $this->lang->words['c_noid']; - $this->calendarsList(); - return; - } - - /* Form Bits */ - $formcode = 'calendar_edit_do'; - $title = $this->lang->words['c_editbutton'].$calendar['cal_title']; - $button = $this->lang->words['c_savebutton']; - } - - /* Permissions */ - require_once( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php' ); - $permissions = new classPublicPermissions( ipsRegistry::instance() ); - $form['perm_matrix'] = $permissions->adminPermMatrix( 'calendar', $calendar ); - - /* Form Elements */ - $form['cal_title'] = $this->registry->output->formInput( 'cal_title' ,( isset( $_POST['cal_title'] ) AND $_POST['cal_title'] ) ? $_POST['cal_title'] : $calendar['cal_title'] ); - $form['cal_moderate'] = $this->registry->output->formYesNo( 'cal_moderate' , ( isset( $this->request['cal_moderate'] ) AND $this->request['cal_moderate'] ) ? $this->request['cal_moderate'] : $calendar['cal_moderate'] ); - $form['cal_event_limit'] = $this->registry->output->formSimpleInput( 'cal_event_limit' , ( isset( $this->request['cal_event_limit'] ) AND $this->request['cal_event_limit'] ) ? $this->request['cal_event_limit'] : $calendar['cal_event_limit'], 5 ); - $form['cal_bday_limit'] = $this->registry->output->formSimpleInput( 'cal_bday_limit' , ( isset( $this->request['cal_bday_limit'] ) AND $this->request['cal_bday_limit'] ) ? $this->request['cal_bday_limit'] : $calendar['cal_bday_limit'], 5 ); - $form['cal_rss_export'] = $this->registry->output->formYesNo( 'cal_rss_export' , ( isset( $this->request['cal_rss_export'] ) AND $this->request['cal_rss_export'] ) ? $this->request['cal_rss_export'] : $calendar['cal_rss_export'] ); - $form['cal_rss_update'] = $this->registry->output->formSimpleInput( 'cal_rss_update' , ( isset( $this->request['cal_rss_update'] ) AND $this->request['cal_rss_update'] ) ? $this->request['cal_rss_update'] : $calendar['cal_rss_update'], 5 ); - $form['cal_rss_export_days'] = $this->registry->output->formSimpleInput( 'cal_rss_export_days' , ( isset( $this->request['cal_rss_export_days'] ) AND $this->request['cal_rss_export_days'] ) ? $this->request['cal_rss_export_days'] : $calendar['cal_rss_export_days'], 5 ); - $form['cal_rss_export_max'] = $this->registry->output->formSimpleInput( 'cal_rss_export_max' , ( isset( $this->request['cal_rss_export_max'] ) AND $this->request['cal_rss_export_max'] ) ? $this->request['cal_rss_export_max'] : $calendar['cal_rss_export_max'], 5 ); - - /* Output */ - $this->registry->output->html .= $this->html->calendarForm( $form, $title, $formcode, $button, $calendar ); - } - - /** - * List Calendars - * - * @access public - * @return void - */ - public function calendarsList() - { - /* INIT */ - $content = ""; - $seen_count = 0; - $total_items = 0; - $rows = array(); - - /* Query calendars */ - $this->DB->build( array( 'select' => '*', 'from' => 'cal_calendars', 'order' => 'cal_position ASC' ) ); - $this->DB->execute(); - - /* Get number of rows */ - $total_items = $this->DB->getTotalRows(); - - /* Loop through the calendars */ - while( $r = $this->DB->fetch() ) - { - $seen_count++; - - $rows[] = $r; - } - - /* Output */ - $this->registry->output->html .= $this->html->calendarOverviewScreen( $rows ); - } - - /** - * Rebuild the RSS Cache - * - * @access public - * @param mixed $calendar_id Specify which calendar to rebuild, all is default - * @param bool $return If set to 0, the cache will be output to the browser - * @return mixed void, or the RSS document - */ - public function calendarRSSCache( $calendar_id='all', $return=0 ) - { - /* INIT */ - $seenids = array(); - $calevents = ""; - - /* Calendar Class */ - require_once( IPSLib::getAppDir( 'calendar' ) . '/modules_public/calendar/calendars.php' ); - $calendar = new public_calendar_calendar_calendars(); - $calendar->makeRegistryShortcuts( $this->registry ); - - /* RSS Class */ - require_once( IPS_KERNEL_PATH . 'classRss.php' ); - $class_rss = new classRss(); - - $class_rss->use_sockets = $this->use_sockets; - $class_rss->doc_type = IPS_DOC_CHAR_SET; - - /* Reset the cache */ - $cache = array(); - - /* Get the calendars */ - $this->DB->build( array( - 'select' => 'c.*', - 'from' => array( 'cal_calendars' => 'c' ), - 'where' => 'c.cal_rss_export_days > 0 AND c.cal_rss_export_max > 0 AND c.cal_rss_export=1', - 'add_join' => array( - array( - 'select' => 'p.*', - 'from' => array( 'permission_index' => 'p' ), - 'where' => "p.perm_type='calendar' AND perm_type_id=c.cal_id", - 'type' => 'left', - ) - ) - ) ); - $outer = $this->DB->execute(); - - /* Loop through the calendars */ - while( $row = $this->DB->fetch( $outer ) ) - { - //print_r($row);exit; - /* Add Calendar to cache */ - if ( $row['cal_rss_export'] ) - { - $cache[] = array( 'url' => $this->settings['board_url'].'/index.php?app=core&module=global&section=rss&type=calendar&id='.$row['cal_id'], 'title' => $row['cal_title'] ); - } - - /* Are we including events from this calendar? */ - if( $calendar_id == $row['cal_id'] OR $calendar_id == 'all' ) - { - /* Create the RSS Channel */ - $channel_id = $class_rss->createNewChannel( array( 'title' => $row['cal_title'], - 'link' => $this->settings['board_url'].'/index.php?app=calendar&module=calendar&cal_id='.$row['cal_id'], - 'pubDate' => $class_rss->formatDate( time() ), - 'ttl' => $row['cal_rss_update'] * 60, - 'description' => $row['cal_title'] - ) ); - - /* Check guest permissions */ - if( $row['perm_view'] == '*' OR preg_match( "/(^|,)".$this->settings['guest_group']."(,|$)/", $row['perm_view'] ) ) - { - $pass = 1; - } - - if ( ! $pass ) - { - continue; - } - - /* Sort out the dates */ - $row['cal_rss_export_days'] = intval ($row['cal_rss_export_days'] ) + 1; - - list( $month, $day, $year ) = explode( ',', gmdate('n,j,Y', time()) ); - - $timenow = gmmktime( 0,0,0, $month, 1, $year ); - $timethen = time() + ( $row['cal_rss_export_days'] * 86400 ) + 86400; - $nowtime = time() - 86400; - $items = 0; - - /* Get Events */ - $calendar->calendarGetEventsSQL( 0, 0, array( 'timenow' => $timenow, 'timethen' => $timethen, 'cal_id' => $row['cal_id'] ), 0 ); - - /* Check the events */ - for( $i = 0 ; $i <= $row['cal_rss_export_days'] ; $i++ ) - { - /* Get the month, day, and year */ - list( $month, $day, $year ) = explode( ',', gmdate('n,j,Y', $nowtime) ); - - /* Get the events for this day */ - $eventcache = $calendar->calendarGetDayEvents( $month, $day, $year ); - - /* Loop through the events */ - foreach( $eventcache as $event ) - { - if ( ! in_array( $event['event_id'], $seenids ) ) - { - /* Reached the max? */ - if ( $row['cal_rss_export_max'] <= $items ) - { - break; - } - - /* Get the event info */ - if ( $calendar->getInfoEvents( $event, $month, $day, $year, 0 ) ) - { - /* Approved */ - if ( ! $event['event_approved'] ) - { - continue; - } - - /* Check Private */ - if ( $event['event_private'] ) - { - continue; - } - - /* Check Permis */ - if ( $event['event_perms'] != '*' AND ! preg_match( "/(^|,)".$this->settings['guest_group']."(,|$)/", $event['event_perms'] ) ) - { - continue; - } - - /* Get Dates */ - list( $m , $d , $y ) = explode( ",", gmdate('n,j,Y', $event['event_unix_from'] ) ); - list( $m1, $d1, $y1 ) = explode( ",", gmdate('n,j,Y', $event['event_unix_to'] ) ); - - $event['_from_month'] = $m; - $event['_from_day'] = $d; - $event['_from_year'] = $y; - $event['_to_month'] = $m1; - $event['_to_day'] = $d1; - $event['_to_year'] = $y1; - - //----------------------------------------- - // Coming from RSS rebuild? - //----------------------------------------- - - if( !$this->html ) - { - /* Load Skin and Lang */ - $this->html = $this->registry->output->getTemplate( 'calendar' ); - - $this->lang->loadLanguageFile( array( 'admin_calendar' ) ); - } - - //----------------------------------------- - // Parse bbcode - //----------------------------------------- - - IPSText::getTextClass( 'bbcode' )->parse_html = 0; - IPSText::getTextClass( 'bbcode' )->parse_smilies = intval( $event['event_smilies'] ); - IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; - IPSText::getTextClass( 'bbcode' )->parsing_section = 'calendar'; - IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $event['member_group_id']; - IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $event['mgroup_others']; - - $event['event_content'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $event['event_content'] ); - - if ( $event['recurring'] ) - { - $event['event_content'] = $this->html->calendar_rss_recurring( $event ); - } - else if ( $event['single'] ) - { - $event['event_content'] = $this->html->calendar_rss_single( $event ); - } - else - { - $event['event_content'] = $this->html->calendar_rss_range( $event ); - } - - $event['event_unix_from'] = $event['event_tz'] ? $event['event_unix_from'] : $event['event_unix_from'] + ( $this->settings['time_offset'] * 3600 ); - - /* Add the item to our channel */ - $class_rss->addItemToChannel( $channel_id, array( 'title' => $event['event_title'], - 'link' => $this->settings['board_url'].'/index.php?app=calendar&module=calendar&do=showevent&cal_id='.$row['cal_id'].'&event_id='.$event['event_id'], - 'description' => $event['event_content'], - 'pubDate' => $class_rss->formatDate( $event['event_unix_from'] ), - 'guid' => $event['event_id'] - ) ); - - } - - /* Increment */ - $seenids[ $event['event_id'] ] = $event['event_id']; - $items++; - } - } - - $nowtime += 86400; - } - - /* Create the RSS Document */ - $class_rss->createRssDocument(); - - /* Update the cache */ - $this->DB->update( 'cal_calendars', array( 'cal_rss_update_last' => time(), 'cal_rss_cache' => $class_rss->rss_document ), 'cal_id='.$row['cal_id'] ); - } - } - - /* Update Cache */ - $this->cache->setCache( 'rss_calendar', $cache, array( 'donow' => 1, 'array' => 1 ) ); - - /* Return */ - if ( $return ) - { - $this->registry->output->global_message = $this->lang->words['c_rssrecached']; - $this->calendarsList(); - return; - } - /* Print */ - else - { - return $class_rss->rss_document; - } - } - - /** - * Rebuild Calendar Cache - * - * @access public - * @param bool Whether to return or not - * @return void - */ - public function calendarRebuildCache( $return=0 ) - { - /* INIT */ - $this->settings['calendar_limit'] = intval( $this->settings['calendar_limit'] ) < 2 ? 1 : intval( $this->settings['calendar_limit'] ); - - //-------------------------------------------- - // Grab an extra day for the TZ diff - //-------------------------------------------- - - $this->settings['calendar_limit']++; - - list( $month, $day, $year ) = explode( ',', gmdate('n,j,Y', time() ) ); - - $timenow = gmmktime( 0,0,0, $month, 1, $year ); - $timethen = time() + (intval($this->settings['calendar_limit']) * 86400); - $seenids = array(); - $nowtime = time() - 86400; - $birthdays = array(); - $calevents = array(); - $calendars = array(); - - $a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() ) ); - $day = $a[2]; - $month = $a[1]; - $year = $a[0]; - $daysinmonth = date( 't', time() ); - - //----------------------------------------- - // Get 24hr before and 24hr after to make - // sure we don't break any timezones - //----------------------------------------- - - $last_day = $day - 1; - $last_month = $month; - $last_year = $year; - $next_day = $day + 1; - $next_month = $month; - $next_year = $year; - - //----------------------------------------- - // Calculate dates.. - //----------------------------------------- - - if ( $last_day == 0 ) - { - $last_month -= 1; - $last_day = gmdate( 't', time() ); - } - - if ( $last_month == 0 ) - { - $last_month = 12; - $last_year -= 1; - } - - if ( $next_day > gmdate( 't', time() ) ) - { - $next_month += 1; - $next_day = 1; - } - - if ( $next_month == 13 ) - { - $next_month = 1; - $next_year += 1; - } - - //-------------------------------------------- - // Get classes - //-------------------------------------------- - - require_once( IPSLib::getAppDir( 'calendar' ) . '/modules_public/calendar/calendars.php' ); - $calendar = new public_calendar_calendar_calendars( $this->registry ); - $calendar->makeRegistryShortcuts( $this->registry ); - - //-------------------------------------------- - // Get stuff - //-------------------------------------------- - - $this->DB->build( array( - 'select' => 'c.*', - 'from' => array( 'cal_calendars' => 'c' ), - 'order' => 'c.cal_position ASC', - 'add_join' => array( - array( - 'select' => 'p.*', - 'from' => array( 'permission_index' => 'p' ), - 'where' => "p.perm_type='calendar' AND perm_type_id=c.cal_id", - 'type' => 'left', - ) - ) - ) ); - $this->DB->execute(); - - while( $row = $this->DB->fetch() ) - { - $row['_perm_read'] = $perms['perm_view']; - - $calendars[ $row['cal_id'] ] = $row; - } - - $calendar->calendarGetEventsSQL( 0, 0, array('timenow' => $timenow, 'timethen' => $timethen ) ); - - //-------------------------------------------- - // OK.. Go through days and check events - //-------------------------------------------- - - for( $i = 0 ; $i <= $this->settings['calendar_limit'] ; $i++ ) - { - list( $_month, $tday, $year ) = explode( ',', gmdate('n,j,Y', $nowtime) ); - - $eventcache = $calendar->calendarGetDayEvents( $_month, $tday, $year ); - - foreach( $eventcache as $event ) - { - if ( ! in_array( $event['event_id'], $seenids ) ) - { - if ( $calendar->getInfoEvents( $event, $_month, $tday, $year, 0 ) ) - { - if ( ! $event['event_approved'] ) - { - continue; - } - - unset( $event['event_content'], $event['event_smilies'] ); - - $event['_perm_read'] = $calendars[ $event['event_calendar_id'] ]['perm_view']; - $calevents[ $event['event_id'] ] = $event; - } - - $seenids[ $event['event_id'] ] = $event['event_id']; - } - } - - $nowtime += 86400; - } - - //----------------------------------------- - // Grab birthdays - //----------------------------------------- - - $append_string = ""; - - if( ! date("L") ) - { - if( $month == "2" AND ( $day == "28" OR $day == "27" ) ) - { - $append_string = " or( bday_month=2 AND bday_day=29 )"; - } - } - - $this->DB->build( array( - 'select' => 'member_id, members_seo_name, members_display_name, member_group_id, bday_day, bday_month, bday_year', - 'from' => 'members', - 'where' => "( bday_day=$last_day AND bday_month=$last_month ) - or ( bday_day=$day AND bday_month=$month ) - or ( bday_day=$next_day AND bday_month=$next_month ) {$append_string}" - ) ); - - $this->DB->execute(); - - $birthdays = array(); - - while( $r = $this->DB->fetch() ) - { - $birthdays[ $r['member_id'] ] = $r; - } - - //-------------------------------------------- - // Update calendar array - //-------------------------------------------- - - $this->cache->setCache( 'calendar' , $calevents, array( 'array' => 1 ) ); - $this->cache->setCache( 'birthdays', $birthdays, array( 'array' => 1 ) ); - - if ( $return ) - { - $this->registry->output->global_message = $this->lang->words['c_recached']; - $this->calendarsList(); - } - } - - /** - * Builds a cache of the current calendars - * - * @access public - * @return bool Returns true - */ - public function calendarsRebuildCache() - { - /* INI */ - $cache = array(); - - /* Query Calenar with permissions */ - $this->DB->build( array( - 'select' => 'c.*', - 'from' => array( 'cal_calendars' => 'c' ), - 'order' => 'c.cal_position ASC', - 'add_join' => array( - array( - 'select' => 'p.*', - 'from' => array( 'permission_index' => 'p' ), - 'where' => "p.perm_type='calendar' AND perm_type_id=c.cal_id", - 'type' => 'left', - ) - ) - ) ); - $this->DB->execute(); - - /* Add to cache */ - while( $r = $this->DB->fetch() ) - { - $cache[ $r['cal_id'] ] = $r; - } - - /* Save */ - $this->cache->setCache( 'calendars', $cache, array( 'donow' => 1, 'array' => 1 ) ); - - return TRUE; - } + + * Invision Power Services + * IP.Board v3.1.4 + * Calendar Management + * Last Updated: $LastChangedDate: 2010-10-24 20:11:34 -0400 (Sun, 24 Oct 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Calendar + * @link http://www.invisionpower.com + * @since 27th January 2004 + * @version $Rev: 7024 $ + */ + +if ( ! defined( 'IN_ACP' ) ) +{ + print "

      Incorrect access

      You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; + exit(); +} + +class admin_calendar_calendar_calendars extends ipsCommand +{ + /** + * Skin file + * + * @var object + */ + public $html; + + /** + * Main execution method + * + * @param object ipsRegistry reference + * @return void + */ + public function doExecute( ipsRegistry $registry ) + { + /* Load Skin and Lang */ + $this->html = $this->registry->output->loadTemplate( 'cp_skin_calendar' ); + $this->html->form_code = 'module=calendar&section=calendars'; + $this->html->form_code_js = 'module=calendar§ion=calendars'; + + $this->lang->loadLanguageFile( array( 'admin_calendar' ) ); + + switch( $this->request['do'] ) + { + case 'calendar_delete': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'calendar_delete' ); + $this->calendarDelete(); + break; + + case 'calendar_add': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'calendar_manage' ); + $this->calendarForm( 'new' ); + break; + + case 'calendar_add_do': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'calendar_manage' ); + $this->calendarSave( 'new' ); + break; + + case 'calendar_edit': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'calendar_manage' ); + $this->calendarForm( 'edit' ); + break; + + case 'calendar_edit_do': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'calendar_manage' ); + $this->calendarSave( 'edit' ); + break; + + case 'calendar_move': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'calendar_manage' ); + $this->calendarMove(); + break; + + case 'calendar_rebuildcache': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'calendar_manage' ); + $this->calendarRebuildCache( 1 ); + break; + + case 'calendar_rss_cache': + $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'calendar_manage' ); + $this->calendarRSSCache( intval( $this->request['cal_id'] ), 1 ); + break; + + case 'calendars_list': + default: + $this->calendarsList(); + break; + } + + /* Output */ + $this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper(); + $this->registry->output->sendOutput(); + } + + /** + * Update the calendar position + * + * @return void + */ + public function calendarMove() + { + //----------------------------------------- + // INIT + //----------------------------------------- + + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' ); + $ajax = new $classToLoad(); + + //----------------------------------------- + // Checks... + //----------------------------------------- + + if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false ) + { + $ajax->returnString( $this->lang->words['postform_badmd5'] ); + exit(); + } + + //----------------------------------------- + // Save new position + //----------------------------------------- + + $position = 1; + + if( is_array($this->request['calendars']) AND count($this->request['calendars']) ) + { + foreach( $this->request['calendars'] as $this_id ) + { + $this->DB->update( 'cal_calendars', array( 'cal_position' => $position ), 'cal_id=' . $this_id ); + + $position++; + } + } + + $this->calendarsRebuildCache(); + + $ajax->returnString( 'OK' ); + exit(); + } + + /** + * Delete a calendar + * + * @return void + */ + public function calendarDelete() + { + /* INIT */ + $cal_id = intval( $this->request['cal_id'] ); + + if ( ! $cal_id ) + { + $this->registry->output->global_message = $this->lang->words['c_noid']; + $this->components_list(); + return; + } + + /* Delete Calendar Events */ + $this->DB->delete( 'cal_events', 'event_calendar_id= ' .$cal_id ); + + /* Delete Calendar */ + $this->DB->delete( 'cal_calendars', 'cal_id=' . $cal_id ); + $this->DB->delete( 'permission_index', "app='calendar' AND perm_type='calendar' AND perm_type_id=" . $cal_id ); + + /* Recache and bounce */ + /* Rebuild Caches and Bounce */ + $this->calendarsRebuildCache(); + $this->calendarRebuildCache( 0 ); + $this->calendarRSSCache( 0, 0 ); + + $this->registry->output->global_message = $this->lang->words['c_removed']; + $this->calendarsList(); + } + + /** + * Handles the calednar new/edit form + * + * @param string $type Either new or edit + * @return void + */ + public function calendarSave( $type='new' ) + { + /* INIT */ + $cal_id = intval( $this->request['cal_id'] ); + $cal_title = trim( IPSText::stripslashes( IPSText::htmlspecialchars( $_POST['cal_title'] ) ) ); + $cal_moderate = intval( $this->request['cal_moderate'] ); + $cal_event_limit = intval( $this->request['cal_event_limit'] ); + $cal_bday_limit = intval( $this->request['cal_bday_limit'] ); + $cal_rss_export = intval( $this->request['cal_rss_export'] ); + $cal_rss_export_days = intval( $this->request['cal_rss_export_days'] ); + $cal_rss_export_max = intval( $this->request['cal_rss_export_max'] ); + $cal_rss_update = intval( $this->request['cal_rss_update'] ); + + /* Error Checks */ + if ( $type == 'edit' ) + { + if ( ! $cal_id OR ! $cal_title ) + { + $this->registry->output->global_message = $this->lang->words['c_noid']; + $this->calendarsList(); + return; + } + } + else + { + if ( ! $cal_title ) + { + $this->registry->output->global_message = $this->lang->words['c_completeform']; + $this->calendarForm( $type ); + return; + } + } + + /* DB Array */ + $array = array( 'cal_title' => $cal_title, + 'cal_moderate' => $cal_moderate, + 'cal_event_limit' => $cal_event_limit, + 'cal_bday_limit' => $cal_bday_limit, + 'cal_rss_export' => $cal_rss_export, + 'cal_rss_export_days' => $cal_rss_export_days, + 'cal_rss_export_max' => $cal_rss_export_max, + 'cal_rss_update' => $cal_rss_update, + ); + + /* Create Calendar */ + if ( $type == 'new' ) + { + $this->DB->insert( 'cal_calendars', $array ); + $cal_id = $this->DB->getInsertId(); + $this->registry->output->global_message = $this->lang->words['c_added']; + } + /* Modify Calendar */ + else + { + $this->DB->update( 'cal_calendars', $array, 'cal_id='.$cal_id ); + $this->registry->output->global_message = $this->lang->words['c_edited']; + } + + /* Permissions */ + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php', 'classPublicPermissions' ); + $permissions = new $classToLoad( ipsRegistry::instance() ); + $permissions->savePermMatrix( $this->request['perms'], $cal_id, 'calendar' ); + + /* Rebuild Caches and Bounce */ + $this->calendarsRebuildCache(); + $this->calendarRebuildCache( 0 ); + $this->calendarRSSCache( $cal_id, 0 ); + $this->cache->rebuildCache( 'rss_output_cache' ); + + $this->calendarsList(); + } + + /** + * Add/Edit Calendar Form + * + * @param string $type Either new or edit + * @return void + */ + public function calendarForm( $type='new' ) + { + //----------------------------------------- + // Init Vars + //----------------------------------------- + + $cal_id = $this->request['cal_id'] ? intval( $this->request['cal_id'] ) : 0; + $form = array(); + + /* New Calendar */ + if ( $type == 'new' ) + { + /* Form Bits */ + $formcode = 'calendar_add_do'; + $title = $this->lang->words['c_addcal']; + $button = $this->lang->words['c_addcal']; + + /* Data */ + $calendar = array( + 'cal_title' => '', + 'cal_moderate' => '', + 'cal_event_limit' => '', + 'cal_bday_limit' => '', + 'cal_rss_export' => '', + 'cal_rss_update' => '', + 'cal_rss_export_days' => '', + 'cal_rss_export_max' => '', + 'cal_id' => 0 + ); + } + /* Edit Calendar */ + else + { + /* Data */ + $calendar = $this->DB->buildAndFetch( array( + 'select' => 'c.*', + 'from' => array( 'cal_calendars' => 'c' ), + 'where' => 'c.cal_id=' . $cal_id, + 'add_join' => array( + array( + 'select' => 'p.*', + 'from' => array( 'permission_index' => 'p' ), + 'where' => "p.perm_type='calendar' AND perm_type_id=c.cal_id", + 'type' => 'left', + ) + ) + ) ); + + if ( ! $calendar['cal_id'] ) + { + $this->registry->output->global_message = $this->lang->words['c_noid']; + $this->calendarsList(); + return; + } + + /* Form Bits */ + $formcode = 'calendar_edit_do'; + $title = $this->lang->words['c_editbutton'].$calendar['cal_title']; + $button = $this->lang->words['c_savebutton']; + } + + /* Permissions */ + $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php', 'classPublicPermissions' ); + $permissions = new $classToLoad( ipsRegistry::instance() ); + $form['perm_matrix'] = $permissions->adminPermMatrix( 'calendar', $calendar ); + + /* Form Elements */ + $form['cal_title'] = $this->registry->output->formInput( 'cal_title' ,( isset( $_POST['cal_title'] ) AND $_POST['cal_title'] ) ? $_POST['cal_title'] : $calendar['cal_title'] ); + $form['cal_moderate'] = $this->registry->output->formYesNo( 'cal_moderate' , ( isset( $this->request['cal_moderate'] ) AND $this->request['cal_moderate'] ) ? $this->request['cal_moderate'] : $calendar['cal_moderate'] ); + $form['cal_event_limit'] = $this->registry->output->formSimpleInput( 'cal_event_limit' , ( isset( $this->request['cal_event_limit'] ) AND $this->request['cal_event_limit'] ) ? $this->request['cal_event_limit'] : $calendar['cal_event_limit'], 5 ); + $form['cal_bday_limit'] = $this->registry->output->formSimpleInput( 'cal_bday_limit' , ( isset( $this->request['cal_bday_limit'] ) AND $this->request['cal_bday_limit'] ) ? $this->request['cal_bday_limit'] : $calendar['cal_bday_limit'], 5 ); + $form['cal_rss_export'] = $this->registry->output->formYesNo( 'cal_rss_export' , ( isset( $this->request['cal_rss_export'] ) AND $this->request['cal_rss_export'] ) ? $this->request['cal_rss_export'] : $calendar['cal_rss_export'] ); + $form['cal_rss_update'] = $this->registry->output->formSimpleInput( 'cal_rss_update' , ( isset( $this->request['cal_rss_update'] ) AND $this->request['cal_rss_update'] ) ? $this->request['cal_rss_update'] : $calendar['cal_rss_update'], 5 ); + $form['cal_rss_export_days'] = $this->registry->output->formSimpleInput( 'cal_rss_export_days' , ( isset( $this->request['cal_rss_export_days'] ) AND $this->request['cal_rss_export_days'] ) ? $this->request['cal_rss_export_days'] : $calendar['cal_rss_export_days'], 5 ); + $form['cal_rss_export_max'] = $this->registry->output->formSimpleInput( 'cal_rss_export_max' , ( isset( $this->request['cal_rss_export_max'] ) AND $this->request['cal_rss_export_max'] ) ? $this->request['cal_rss_export_max'] : $calendar['cal_rss_export_max'], 5 ); + + /* Output */ + $this->registry->output->html .= $this->html->calendarForm( $form, $title, $formcode, $button, $calendar ); + } + + /** + * List Calendars + * + * @return void + */ + public function calendarsList() + { + /* INIT */ + $rows = array(); + + /* Query calendars */ + $this->DB->build( array( 'select' => '*', 'from' => 'cal_calendars', 'order' => 'cal_position ASC' ) ); + $this->DB->execute(); + + /* Loop through the calendars */ + while( $r = $this->DB->fetch() ) + { + $rows[] = $r; + } + + /* Output */ + $this->registry->output->html .= $this->html->calendarOverviewScreen( $rows ); + } + + /** + * Rebuild the RSS Cache + * + * @param mixed $calendar_id Specify which calendar to rebuild, all is default + * @param bool $return If set to 0, the cache will be output to the browser + * @return mixed void, or the RSS document + */ + public function calendarRSSCache( $calendar_id='all', $return=0 ) + { + /* Hack to make sure it's installed */ + if( !$this->DB->checkForTable('cal_calendars') ) + { + return; + } + + /* INIT */ + $seenids = array(); + $calevents = ""; + + /* Calendar Class */ + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'calendar' ) . '/modules_public/calendar/calendars.php', 'public_calendar_calendar_calendars' ); + $calendar = new $classToLoad(); + $calendar->makeRegistryShortcuts( $this->registry ); + + /* RSS Class */ + $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classRss.php', 'classRss' ); + $class_rss = new $classToLoad(); + + $class_rss->use_sockets = $this->use_sockets; + $class_rss->doc_type = IPS_DOC_CHAR_SET; + + /* Reset the cache */ + $cache = array(); + + /* Get the calendars */ + $this->DB->build( array( 'select' => 'c.*', + 'from' => array( 'cal_calendars' => 'c' ), + 'where' => 'c.cal_rss_export_days > 0 AND c.cal_rss_export_max > 0 AND c.cal_rss_export=1', + 'add_join' => array( array( 'select' => 'p.*', + 'from' => array( 'permission_index' => 'p' ), + 'where' => "p.perm_type='calendar' AND perm_type_id=c.cal_id", + 'type' => 'left' ) ) + ) ); + $outer = $this->DB->execute(); + + /* Loop through the calendars */ + while( $row = $this->DB->fetch( $outer ) ) + { + $row['cal_rss_export_max'] = $row['cal_rss_export_max'] ? $row['cal_rss_export_max'] : 10; + + //print_r($row);exit; + /* Add Calendar to cache */ + if ( $row['cal_rss_export'] ) + { + $cache[] = array( 'url' => $this->settings['board_url'].'/index.php?app=core&module=global&section=rss&type=calendar&id='.$row['cal_id'], 'title' => $row['cal_title'] ); + } + + /* Are we including events from this calendar? */ + if( $calendar_id == $row['cal_id'] OR $calendar_id == 'all' ) + { + /* Create the RSS Channel */ + $channel_id = $class_rss->createNewChannel( array( 'title' => $row['cal_title'], + 'link' => $this->settings['board_url'].'/index.php?app=calendar&module=calendar&cal_id='.$row['cal_id'], + 'pubDate' => $class_rss->formatDate( time() ), + 'ttl' => $row['cal_rss_update'] * 60, + 'description' => $row['cal_title'] + ) ); + + /* Check guest permissions */ + if( $row['perm_view'] == '*' OR preg_match( "/(^|,)".$this->settings['guest_group']."(,|$)/", $row['perm_view'] ) ) + { + $pass = 1; + } + + if ( ! $pass ) + { + continue; + } + + /* Sort out the dates */ + $row['cal_rss_export_days'] = intval ($row['cal_rss_export_days'] ) + 1; + + list( $month, $day, $year ) = explode( ',', gmdate('n,j,Y', time()) ); + + $timenow = gmmktime( 0,0,0, $month, 1, $year ); + $timethen = time() + ( $row['cal_rss_export_days'] * 86400 ) + 86400; + $nowtime = time() - 86400; + $items = 0; + + /* Get Events */ + $calendar->calendarGetEventsSQL( 0, 0, array( 'timenow' => $timenow, 'timethen' => $timethen, 'cal_id' => $row['cal_id'] ), 0 ); + + /* Check the events */ + for( $i = 0 ; $i <= $row['cal_rss_export_days'] ; $i++ ) + { + /* Get the month, day, and year */ + list( $month, $day, $year ) = explode( ',', gmdate('n,j,Y', $nowtime) ); + + /* Get the events for this day */ + $eventcache = $calendar->calendarGetDayEvents( $month, $day, $year ); + + /* Loop through the events */ + foreach( $eventcache as $event ) + { + if ( ! in_array( $event['event_id'], $seenids ) ) + { + /* Reached the max? */ + if ( $row['cal_rss_export_max'] <= $items ) + { + break; + } + + /* Get the event info */ + if ( $calendar->getInfoEvents( $event, $month, $day, $year, 0 ) ) + { + /* Approved */ + if ( ! $event['event_approved'] ) + { + continue; + } + + /* Check Private */ + if ( $event['event_private'] ) + { + continue; + } + + /* Check Permis */ + if ( $event['event_perms'] != '*' AND ! preg_match( "/(^|,)".$this->settings['guest_group']."(,|$)/", $event['event_perms'] ) ) + { + continue; + } + + /* Set the timezone to the board default */ + //$event['event_unix_from'] = $event['event_unix_from'] + ( $this->settings['time_offset'] * 3600 ); + //$event['event_unix_to'] = $event['event_unix_to'] + ( $this->settings['time_offset'] * 3600 ); + + /* Get Dates */ + list( $m , $d , $y ) = explode( ",", gmdate('n,j,Y', $event['event_unix_from'] ) ); + list( $m1, $d1, $y1 ) = explode( ",", gmdate('n,j,Y', $event['event_unix_to'] ) ); + + $event['_from_month'] = $m; + $event['_from_day'] = $d; + $event['_from_year'] = $y; + $event['_to_month'] = $m1; + $event['_to_day'] = $d1; + $event['_to_year'] = $y1; + + //----------------------------------------- + // Coming from RSS rebuild? + //----------------------------------------- + + if( !$this->html ) + { + /* Load Skin and Lang */ + $this->html = $this->registry->output->getTemplate( 'calendar' ); + + $this->lang->loadLanguageFile( array( 'admin_calendar' ) ); + } + + //----------------------------------------- + // Parse bbcode + //----------------------------------------- + + IPSText::getTextClass( 'bbcode' )->parse_html = 0; + IPSText::getTextClass( 'bbcode' )->parse_smilies = intval( $event['event_smilies'] ); + IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; + IPSText::getTextClass( 'bbcode' )->parsing_section = 'calendar'; + IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $event['member_group_id']; + IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $event['mgroup_others']; + + $event['event_content'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $event['event_content'] ); + + if ( $event['recurring'] ) + { + $event['event_content'] = $this->html->calendar_rss_recurring( $event ); + } + else if ( $event['single'] ) + { + $event['event_content'] = $this->html->calendar_rss_single( $event ); + } + else + { + $event['event_content'] = $this->html->calendar_rss_range( $event ); + } + + /* Add the item to our channel */ + $class_rss->addItemToChannel( $channel_id, array( 'title' => $event['event_title'], + 'link' => $this->settings['board_url'].'/index.php?app=calendar&module=calendar&do=showevent&cal_id='.$row['cal_id'].'&event_id='.$event['event_id'], + 'description' => $event['event_content'], + 'pubDate' => $class_rss->formatDate( $event['event_unix_from'] ), + 'guid' => $event['event_id'] + ) ); + + } + + /* Increment */ + $seenids[ $event['event_id'] ] = $event['event_id']; + $items++; + } + } + + $nowtime += 86400; + } + + /* Create the RSS Document */ + $class_rss->createRssDocument(); + + /* Update the cache */ + $this->DB->update( 'cal_calendars', array( 'cal_rss_update_last' => time(), 'cal_rss_cache' => $class_rss->rss_document ), 'cal_id='.$row['cal_id'] ); + } + } + + /* Update Cache */ + $this->cache->setCache( 'rss_calendar', $cache, array( 'donow' => 1, 'array' => 1 ) ); + + /* Return */ + if ( $return ) + { + $this->registry->output->global_message = $this->lang->words['c_rssrecached']; + $this->calendarsList(); + return; + } + /* Print */ + else + { + return $class_rss->rss_document; + } + } + + /** + * Rebuild Calendar Cache + * + * @param bool Whether to return or not + * @return void + */ + public function calendarRebuildCache( $return=0 ) + { + /* Hack to make sure it's installed */ + if( !$this->DB->checkForTable('cal_calendars') ) + { + return; + } + + /* INIT */ + $this->settings['calendar_limit'] = intval( $this->settings['calendar_limit'] ) < 2 ? 1 : intval( $this->settings['calendar_limit'] ); + + //-------------------------------------------- + // Grab an extra day for the TZ diff + //-------------------------------------------- + + $this->settings['calendar_limit']++; + + list( $month, $day, $year ) = explode( ',', gmdate('n,j,Y', time() ) ); + + $timenow = gmmktime( 0,0,0, $month, 1, $year ); + $timethen = time() + (intval($this->settings['calendar_limit']) * 86400); + $seenids = array(); + $nowtime = time() - 86400; + $birthdays = array(); + $calevents = array(); + $calendars = array(); + + $a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() ) ); + $day = $a[2]; + $month = $a[1]; + $year = $a[0]; + $daysinmonth = date( 't', time() ); + + //----------------------------------------- + // Get 24hr before and 24hr after to make + // sure we don't break any timezones + //----------------------------------------- + + $last_day = $day - 1; + $last_month = $month; + $last_year = $year; + $next_day = $day + 1; + $next_month = $month; + $next_year = $year; + + //----------------------------------------- + // Calculate dates.. + //----------------------------------------- + + if ( $last_day == 0 ) + { + $last_month -= 1; + $last_day = gmdate( 't', time() ); + } + + if ( $last_month == 0 ) + { + $last_month = 12; + $last_year -= 1; + } + + if ( $next_day > gmdate( 't', time() ) ) + { + $next_month += 1; + $next_day = 1; + } + + if ( $next_month == 13 ) + { + $next_month = 1; + $next_year += 1; + } + + //-------------------------------------------- + // Get classes + //-------------------------------------------- + + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'calendar' ) . '/modules_public/calendar/calendars.php', 'public_calendar_calendar_calendars' ); + $calendar = new $classToLoad(); + $calendar->makeRegistryShortcuts( $this->registry ); + + //-------------------------------------------- + // Get stuff + //-------------------------------------------- + + $this->DB->build( array( + 'select' => 'c.*', + 'from' => array( 'cal_calendars' => 'c' ), + 'order' => 'c.cal_position ASC', + 'add_join' => array( + array( + 'select' => 'p.*', + 'from' => array( 'permission_index' => 'p' ), + 'where' => "p.perm_type='calendar' AND perm_type_id=c.cal_id", + 'type' => 'left', + ) + ) + ) ); + $this->DB->execute(); + + while( $row = $this->DB->fetch() ) + { + $row['_perm_read'] = $row['perm_view']; + + $calendars[ $row['cal_id'] ] = $row; + } + + $calendar->calendarGetEventsSQL( 0, 0, array('timenow' => $timenow, 'timethen' => $timethen ) ); + + //-------------------------------------------- + // OK.. Go through days and check events + //-------------------------------------------- + + for( $i = 0 ; $i <= $this->settings['calendar_limit'] ; $i++ ) + { + list( $_month, $tday, $year ) = explode( ',', gmdate('n,j,Y', $nowtime) ); + + $eventcache = $calendar->calendarGetDayEvents( $_month, $tday, $year ); + + foreach( $eventcache as $event ) + { + if ( ! in_array( $event['event_id'], $seenids ) ) + { + if ( $calendar->getInfoEvents( $event, $_month, $tday, $year, 0 ) ) + { + if ( ! $event['event_approved'] ) + { + continue; + } + + unset( $event['event_content'], $event['event_smilies'] ); + + $event['_perm_read'] = $calendars[ $event['event_calendar_id'] ]['perm_view']; + $calevents[ $event['event_id'] ] = $event; + } + + $seenids[ $event['event_id'] ] = $event['event_id']; + } + } + + $nowtime += 86400; + } + + //----------------------------------------- + // Grab birthdays + //----------------------------------------- + + $append_string = ""; + + if( ! date("L") ) + { + if( $month == "2" AND ( $day == "28" OR $day == "27" ) ) + { + $append_string = " or( bday_month=2 AND bday_day=29 )"; + } + } + + $this->DB->build( array( + 'select' => 'member_id, members_seo_name, members_display_name, member_group_id, bday_day, bday_month, bday_year', + 'from' => 'members', + 'where' => "( bday_day=$last_day AND bday_month=$last_month ) + or ( bday_day=$day AND bday_month=$month ) + or ( bday_day=$next_day AND bday_month=$next_month ) {$append_string}" + ) ); + + $this->DB->execute(); + + $birthdays = array(); + + while( $r = $this->DB->fetch() ) + { + $birthdays[ $r['member_id'] ] = $r; + } + + //-------------------------------------------- + // Update calendar array + //-------------------------------------------- + + $this->cache->setCache( 'calendar' , $calevents, array( 'array' => 1 ) ); + $this->cache->setCache( 'birthdays', $birthdays, array( 'array' => 1 ) ); + + if ( $return ) + { + $this->registry->output->global_message = $this->lang->words['c_recached']; + $this->calendarsList(); + } + } + + /** + * Builds a cache of the current calendars + * + * @return bool Returns true + */ + public function calendarsRebuildCache() + { + /* Hack to make sure it's installed */ + if( !$this->DB->checkForTable('cal_calendars') ) + { + return; + } + + /* INI */ + $cache = array(); + + /* Query Calenar with permissions */ + $this->DB->build( array( + 'select' => 'c.*', + 'from' => array( 'cal_calendars' => 'c' ), + 'order' => 'c.cal_position ASC', + 'add_join' => array( + array( + 'select' => 'p.*', + 'from' => array( 'permission_index' => 'p' ), + 'where' => "p.perm_type='calendar' AND perm_type_id=c.cal_id", + 'type' => 'left', + ) + ) + ) ); + $this->DB->execute(); + + /* Add to cache */ + while( $r = $this->DB->fetch() ) + { + $cache[ $r['cal_id'] ] = $r; + } + + /* Save */ + $this->cache->setCache( 'calendars', $cache, array( 'donow' => 1, 'array' => 1 ) ); + + return TRUE; + } } \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/modules_admin/calendar/defaultSection.php b/upload/admin/applications_addon/ips/calendar/modules_admin/calendar/defaultSection.php index 5e1844b7..29cfa037 100644 --- a/upload/admin/applications_addon/ips/calendar/modules_admin/calendar/defaultSection.php +++ b/upload/admin/applications_addon/ips/calendar/modules_admin/calendar/defaultSection.php @@ -1,16 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Calendar default section + * Last Updated: $Date: 2010-04-15 15:46:26 -0400 (Thu, 15 Apr 2010) $ + * * * @author $author$ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Calendar - * @link http://www.iinvisionpower.com - * @version $Rev: 4948 $ + * @link http://www.invisionpower.com + * @version $Rev: 6133 $ **/ if ( ! defined( 'IN_IPB' ) ) diff --git a/upload/admin/applications_addon/ips/calendar/modules_admin/calendar/index.html b/upload/admin/applications_addon/ips/calendar/modules_admin/calendar/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/calendar/modules_admin/calendar/index.html +++ b/upload/admin/applications_addon/ips/calendar/modules_admin/calendar/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/modules_admin/calendar/xml/index.html b/upload/admin/applications_addon/ips/calendar/modules_admin/calendar/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/calendar/modules_admin/calendar/xml/index.html +++ b/upload/admin/applications_addon/ips/calendar/modules_admin/calendar/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/modules_admin/index.html b/upload/admin/applications_addon/ips/calendar/modules_admin/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/calendar/modules_admin/index.html +++ b/upload/admin/applications_addon/ips/calendar/modules_admin/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/modules_public/calendar/calendars.php b/upload/admin/applications_addon/ips/calendar/modules_public/calendar/calendars.php index 0f650f58..63e2ed35 100644 --- a/upload/admin/applications_addon/ips/calendar/modules_public/calendar/calendars.php +++ b/upload/admin/applications_addon/ips/calendar/modules_public/calendar/calendars.php @@ -1,19 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Calendar View - * Last Updated: $Date: 2009-10-13 17:40:38 -0400 (Tue, 13 Oct 2009) $ + * Last Updated: $Date: 2010-11-12 17:23:13 -0500 (Fri, 12 Nov 2010) $ + * * - * @author $Author: josh $ + * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Calendar - * @link http://www.iinvisionpower.com - * @version $Rev: 5228 $ - * + * @link http://www.invisionpower.com + * @version $Rev: 7175 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -27,71 +27,62 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Temporary HTML output * - * @access private * @var string */ - private $output = ""; + protected $output = ""; /** * Page title * - * @access private * @var string */ - private $page_title = ""; + protected $page_title = ""; /** * Chosen month * - * @access private * @var int */ - private $chosen_month = 0; + protected $chosen_month = 0; /** * Chosen year * - * @access private * @var int */ - private $chosen_year = 0; + protected $chosen_year = 0; /** * Current date * - * @access private * @var array */ - private $now_date = array(); + protected $now_date = array(); /** * Now date parts * - * @access private * @var array */ - private $now = array( 'mday' => '', 'mon' => '', 'year' => '' ); + protected $now = array( 'mday' => '', 'mon' => '', 'year' => '' ); /** * Timestamp for our date * - * @access private * @var int */ - private $our_datestamp = 0; + protected $our_datestamp = 0; /** * Array of date parts for first date * - * @access private * @var array */ - private $first_day_array = array(); + protected $first_day_array = array(); /** * Words for the month (for translation) * - * @access private * @var array * @todo [Future] Deprecate this, and use the locale date functionality instead */ @@ -100,7 +91,6 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Words for the days. Gets setup special for calendars starting on Monday * - * @access private * @var array */ public $day_words = array(); @@ -108,39 +98,34 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Cache of results from a monthly query * - * @access private * @var array */ - private $query_month_cache = array(); + protected $query_month_cache = array(); /** * Cache of results from a birthday query * - * @access private * @var array */ - private $query_bday_cache = array(); + protected $query_bday_cache = array(); /** * Cache of event results * - * @access private * @var array */ - private $event_cache = array(); + protected $event_cache = array(); /** * Cache of events we've already displayed, to prevent duplication for recurring/ranged events. * - * @access private * @var array */ - private $shown_events = array(); + protected $shown_events = array(); /** * Calendar ID * - * @access private * @var int */ public $calendar_id = 1; @@ -148,7 +133,6 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Calendar data * - * @access private * @var array */ public $calendar = array(); @@ -156,23 +140,20 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Calendar jump select list * - * @access private * @var string */ - private $calendar_jump = ""; + protected $calendar_jump = ""; /** * Parsed member data * - * @access private * @var array */ - private $parsed_members = array(); + protected $parsed_members = array(); /** * Can we read the events * - * @access private * @var bool */ public $can_read = false; @@ -180,31 +161,27 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Can we post the events * - * @access private * @var bool */ - private $can_post = false; + protected $can_post = false; /** * Can we avoid a mod queue * - * @access private * @var bool */ - private $can_avoid_queue = false; + protected $can_avoid_queue = false; /** * Can we moderate events * - * @access private * @var bool */ - private $can_moderate = false; + protected $can_moderate = false; /** * Class entry point * - * @access public * @param object Registry reference * @return void [Outputs to screen/redirects] */ @@ -269,7 +246,7 @@ class public_calendar_calendar_calendars extends ipsCommand /* Page Title */ if( $this->page_title == "" ) { - $this->page_title = $this->settings['board_name'] . " " . $this->lang->words['page_title']; + $this->page_title = $this->lang->words['page_title'] . ' - ' . $this->settings['board_name']; } $this->registry->output->setTitle( $this->page_title ); @@ -277,7 +254,7 @@ class public_calendar_calendar_calendars extends ipsCommand /* Navigation */ if( ! is_array( $this->registry->output->_navigation ) ) { - $this->registry->output->addNavigation( $this->lang->words['page_title'], 'app=calendar&module=calendar' ); + $this->registry->output->addNavigation( $this->lang->words['page_title'], 'app=calendar', 'calendar', 'app=calendar' ); $this->registry->output->addNavigation( $this->calendar['cal_title'] , "app=calendar&module=calendar&cal_id={$this->calendar_id}" ); } @@ -289,7 +266,6 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Initialize calendar * - * @access public * @return void */ public function initCalendar( $byPassPermError=false ) @@ -297,7 +273,7 @@ class public_calendar_calendar_calendars extends ipsCommand /* Make sure the calednar is installed and enabled */ if( ! IPSLib::appIsInstalled( 'calendar' ) ) { - $this->registry->output->showError( 'no_permission', 1076 ); + $this->registry->output->showError( 'no_permission', 1076, null, null, 404 ); } /* Load language */ @@ -306,19 +282,6 @@ class public_calendar_calendar_calendars extends ipsCommand /* Max Birthdays */ $this->settings['bday_show_cal_max'] = 5; - /* Get calendar details */ - if( $this->request['cal_id'] OR $this->request['calendar_id'] ) - { - $this->calendar_id = intval( $this->request['cal_id'] ) ? intval( $this->request['cal_id'] ) : intval( $this->request['calendar_id'] ); - } - else - { - $this->calendar_id = 1; - } - - /* Sneaky cheaty */ - $this->request['_cal_id'] = $this->calendar_id; - /* Get all calendar details */ if( ! count( $this->caches['calendars'] ) ) { @@ -344,6 +307,20 @@ class public_calendar_calendar_calendars extends ipsCommand $this->cache->setCache( 'calendars', $_cal_cache, array( 'array' => 1 ) ); } + + /* Get calendar details */ + if( ( isset($this->request['cal_id']) AND $this->request['cal_id'] ) OR ( isset($this->request['calendar_id']) AND $this->request['calendar_id'] ) ) + { + $this->calendar_id = intval( $this->request['cal_id'] ) ? intval( $this->request['cal_id'] ) : intval( $this->request['calendar_id'] ); + } + else + { + $cal_ids = array_keys( $this->caches['calendars'] ); + $this->calendar_id = $cal_ids[0]; + } + + /* Sneaky cheaty */ + $this->request['_cal_id'] = $this->calendar_id; /* Loop through the cache and build calendar jump */ if ( count( $this->caches['calendars'] ) AND is_array( $this->caches['calendars'] ) ) @@ -389,7 +366,7 @@ class public_calendar_calendar_calendars extends ipsCommand if ( ! $this->can_read && ! $byPassPermError ) { - $this->registry->output->showError( 'cal_no_perm', 1040 ); + $this->registry->output->showError( 'cal_no_perm', 1040, null, null, 403 ); } /* There is something whacky with getdate and GMT @@ -406,14 +383,14 @@ class public_calendar_calendar_calendars extends ipsCommand 'seconds' => $a[5] ); - if( $this->request['year'] ) + if( isset($this->request['year']) AND $this->request['year'] ) { $this->request['y'] = $this->request['year']; } /* Set the chosen month and year */ - $this->chosen_month = ( ! $this->request['m'] OR ! intval( $this->request['m'] ) ) ? $this->now_date['mon'] : intval( $this->request['m'] ); - $this->chosen_year = ( ! $this->request['y'] OR ! intval( $this->request['y'] ) ) ? $this->now_date['year'] : intval( $this->request['y'] ); + $this->chosen_month = ( ! isset($this->request['m']) OR ! $this->request['m'] OR ! intval( $this->request['m'] ) ) ? $this->now_date['mon'] : intval( $this->request['m'] ); + $this->chosen_year = ( ! isset($this->request['y']) OR ! $this->request['y'] OR ! intval( $this->request['y'] ) ) ? $this->now_date['year'] : intval( $this->request['y'] ); /* Make sure the date is in range. */ if( ! checkdate( $this->chosen_month, 1 , $this->chosen_year ) ) @@ -434,9 +411,9 @@ class public_calendar_calendar_calendars extends ipsCommand if( ! $this->settings['ipb_calendar_mon'] ) { - $this->day_words = array( $this->lang->words['D_1'], $this->lang->words['D_2'], + $this->day_words = array( $this->lang->words['D_0'], $this->lang->words['D_1'], $this->lang->words['D_2'], $this->lang->words['D_3'], $this->lang->words['D_4'], $this->lang->words['D_5'], - $this->lang->words['D_6'], $this->lang->words['D_0'] ); + $this->lang->words['D_6'] ); } else { @@ -449,7 +426,6 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Deletes an event from the calendar * - * @access public * @return void */ public function calendarEventDelete() @@ -469,18 +445,21 @@ class public_calendar_calendar_calendars extends ipsCommand if ( ! $cal_id OR ! $event_id ) { - $this->registry->output->showError( 'calendar_bad_delete', 1041 ); + $this->registry->output->showError( 'calendar_bad_delete', 1041, null, null, 404 ); } - if ( ! $this->can_moderate && ( $this->memberData['member_id'] > 0 && $this->memberData['member_id'] <> $memcheck['event_member_id'] ) ) + if ( ! $this->can_moderate ) { - $this->registry->output->showError( 'calendar_delete_no_perm', 1042 ); + if( !$this->memberData['member_id'] OR $this->memberData['member_id'] <> $memcheck['event_member_id'] ) + { + $this->registry->output->showError( 'calendar_delete_no_perm', 1042, null, null, 403 ); + } } /* Check MD5 */ if ( $md5check != $this->member->form_hash ) { - $this->registry->output->showError( 'calendar_bad_key', 2040 ); + $this->registry->output->showError( 'calendar_bad_key', 2040, null, null, 403 ); } /* Delete */ @@ -496,7 +475,6 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Approves an event * - * @access public * @return void */ public function calendarEventApprove() @@ -517,13 +495,13 @@ class public_calendar_calendar_calendars extends ipsCommand /* Check */ if ( ! $this->can_moderate ) { - $this->registry->output->showError( 'calendar_bad_approve', 1043 ); + $this->registry->output->showError( 'calendar_bad_approve', 1043, null, null, 403 ); } /* Check MD5 */ if ( $md5check != $this->member->form_hash ) { - $this->registry->output->showError( 'calendar_bad_key', 2041 ); + $this->registry->output->showError( 'calendar_bad_key', 2041, null, null, 403 ); } /* Check Dates */ @@ -537,7 +515,7 @@ class public_calendar_calendar_calendars extends ipsCommand if( ! $event['event_id'] ) { - $this->registry->output->showError( 'calendar_event_not_found', 1045 ); + $this->registry->output->showError( 'calendar_event_not_found', 1045, null, null, 404 ); } /* Update Event... */ @@ -553,7 +531,6 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Build calendar permissions * - * @access public * @param int Calendar ID * @return void */ @@ -616,7 +593,6 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Find a date * - * @access public * @return void */ public function calendarFindDate() @@ -643,7 +619,6 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Shows the events for a week * - * @access public * @return void */ public function calendarShowWeek() @@ -840,7 +815,7 @@ class public_calendar_calendar_calendars extends ipsCommand $this->output = str_replace( "", $this->getMiniCalendar( $next_month['month_id'], $next_month['year_id'] ), $this->output ); /* Navigation */ - $this->registry->output->addNavigation( $this->lang->words['page_title'], 'app=calendar&module=calendar' ); + $this->registry->output->addNavigation( $this->lang->words['page_title'], 'app=calendar', 'calendar', 'app=calendar' ); $this->registry->output->addNavigation( $this->calendar['cal_title'] , 'app=calendar&module=calendar&cal_id=' . $this->calendar_id ); $this->registry->output->addNavigation( $this->month_words[$this->chosen_month - 1]." ".$this->chosen_year, '' ); @@ -849,7 +824,6 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Displays the specified month * - * @access public * @return void */ public function calendarShowMonth() @@ -889,25 +863,26 @@ class public_calendar_calendar_calendars extends ipsCommand /* Get prev / this / next calendars */ $this->output = str_replace( "", $this->getMiniCalendar( $prev_month['month_id'], $prev_month['year_id'] ), $this->output ); - $this->output = str_replace( "", $this->getMiniCalendar( $this->chosen_month , $this->chosen_year ), $this->output ); + //$this->output = str_replace( "", $this->getMiniCalendar( $this->chosen_month , $this->chosen_year ), $this->output ); $this->output = str_replace( "", $this->getMiniCalendar( $next_month['month_id'], $next_month['year_id'] ), $this->output ); /* Navigation */ - $this->registry->output->addNavigation( $this->lang->words['page_title'], 'app=calendar&module=calendar' ); + $this->registry->output->addNavigation( $this->lang->words['page_title'], 'app=calendar', 'calendar', 'app=calendar' ); $this->registry->output->addNavigation( $this->calendar['cal_title'] , 'app=calendar&module=calendar&cal_id=' . $this->calendar_id ); $this->registry->output->addNavigation( $this->month_words[$this->chosen_month - 1] ." " . $this->chosen_year, '' ); + + $this->page_title = $this->month_words[$this->chosen_month - 1] . ' - ' . $this->settings['board_name']; } /** * Build the ID for the current day * - * @access private * @param int $year The year * @param int $month The month * @param int $day The day * @return string */ - private function _buildDayID( $year, $month, $day ) + protected function _buildDayID( $year, $month, $day ) { return 'day-' . $year . '_' . $month . '_' . $day; } @@ -915,7 +890,6 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Form for creating/modifying calendar events * - * @access public * @param string $type Either add or edit * @return void */ @@ -927,7 +901,7 @@ class public_calendar_calendar_calendars extends ipsCommand /* INIT */ $event_id = $this->request['event_id'] ? intval( $this->request['event_id'] ) : 0; - $calendar_id = $this->request['calendar_id'] ? intval( $this->request['calendar_id'] ) : 0; + $calendar_id = $this->request['calendar_id'] ? intval( $this->request['calendar_id'] ) : $this->calendar_id; $form_type = $this->request['formtype']; $recur_menu = ""; $calendar_jump = ""; @@ -936,7 +910,7 @@ class public_calendar_calendar_calendars extends ipsCommand /* Check */ if ( ! $this->memberData['member_id'] ) { - $this->registry->output->showError( 'calendar_no_guests', 1046 ); + $this->registry->output->showError( 'calendar_no_guests', 1046, null, null, 403 ); } /* Got permission to post to this calendar? */ @@ -944,7 +918,7 @@ class public_calendar_calendar_calendars extends ipsCommand if ( ! $this->can_post ) { - $this->registry->output->showError( 'calendar_no_post_perm', 1047 ); + $this->registry->output->showError( 'calendar_no_post_perm', 1047, null, null, 403 ); } /* Edit calendar option */ @@ -986,7 +960,7 @@ class public_calendar_calendar_calendars extends ipsCommand { if ( ! $event_id ) { - $this->registry->output->showError( 'calendar_event_not_found', 1048 ); + $this->registry->output->showError( 'calendar_event_not_found', 1048, null, null, 404 ); } /* Get the evnet */ @@ -995,7 +969,7 @@ class public_calendar_calendar_calendars extends ipsCommand if ( ! $event = $this->DB->fetch() ) { - $this->registry->output->showError( 'calendar_event_not_found', 1049 ); + $this->registry->output->showError( 'calendar_event_not_found', 1049, null, null, 404 ); } //----------------------------------------- @@ -1023,7 +997,7 @@ class public_calendar_calendar_calendars extends ipsCommand if( $check == 0 ) { - $this->registry->output->showError( 'calendar_event_not_found', 10411 ); + $this->registry->output->showError( 'calendar_event_not_found', 10411, null, null, 404 ); } } @@ -1043,7 +1017,7 @@ class public_calendar_calendar_calendars extends ipsCommand if ( $can_edit != 1 ) { - $this->registry->output->showError( 'calendar_no_edit_perm', 10410 ); + $this->registry->output->showError( 'calendar_no_edit_perm', 10410, null, null, 403 ); } $tz_offset = $event['event_tz']; @@ -1058,7 +1032,7 @@ class public_calendar_calendar_calendars extends ipsCommand { $divhide = ""; $hour_min = explode( ":", $event['event_timeset'] ); - $convert_hours = ( $hour_min[0] * 3600 ) + ( $hour_min[1] * 60 ); + // $convert_hours = ( $hour_min[0] * 3600 ) + ( $hour_min[1] * 60 ); /* Bug #20521 */ /* This code adds a 0 to the end if it only has 1 (e.g. changes 13:0 to 13:00) - purely cosmetic */ @@ -1142,7 +1116,7 @@ class public_calendar_calendar_calendars extends ipsCommand $time_select .= ""; /* Start off nav */ - $this->registry->output->addNavigation( $this->lang->words['page_title'], 'app=calendar&module=calendar' ); + $this->registry->output->addNavigation( $this->lang->words['page_title'], 'app=calendar', 'calendar', 'app=calendar' ); $this->registry->output->addNavigation( $this->calendar['cal_title'] , 'app=calendar&module=calendar&cal_id=' . $this->calendar_id ); $this->registry->output->addNavigation( $this->lang->words['post_new_event'], '' ); @@ -1186,7 +1160,7 @@ class public_calendar_calendar_calendars extends ipsCommand 'pub_select' => $public, 'priv_select' => $private, 'timezone' => $time_select, - 'dropdown' => $this->calendar_jump, + 'dropdown' => $calendar_jump, //$this->calendar_jump, By using $this->calendar_jump, the selected='selected' wasn't set. 'timestuff' => array( 'formtype' => $form_type, 'timestart' => $event['event_timeset'], @@ -1251,7 +1225,6 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Saves the add/edit calendar event form * - * @access public * @param string $type Either add or edit * @return void */ @@ -1272,7 +1245,7 @@ class public_calendar_calendar_calendars extends ipsCommand $calendar_id = intval( $this->request['calendar_id'] ); $allow_emoticons = $this->request['enableemo'] == 'yes' ? 1 : 0; $private_event = $this->request['e_type'] == 'private' ? 1 : 0; - $event_title = trim( $this->request['event_title'] ); + $event_title = IPSText::getTextClass( 'bbcode' )->stripBadWords( trim( $this->request['event_title'] ) ); $day = intval( $this->request['e_day'] ); $month = intval( $this->request['e_month'] ); $year = intval( $this->request['e_year'] ); @@ -1280,7 +1253,7 @@ class public_calendar_calendar_calendars extends ipsCommand $end_month = intval( $this->request['end_month'] ); $end_year = intval( $this->request['end_year'] ); $recur_unit = intval( $this->request['recur_unit'] ); - $event_tz = intval( $this->request['event_tz'] ); + $event_tz = floatval( $this->request['event_tz'] ); $offset = 0; $event_all_day = 0; $event_calendar_id = intval( $this->request['event_calendar_id'] ); @@ -1317,31 +1290,33 @@ class public_calendar_calendar_calendars extends ipsCommand } $this->settings['max_post_length'] = $this->settings['max_post_length'] ? $this->settings['max_post_length'] : 2140000; + + /* Check Permissions */ + if ( $this->request['auth_key'] != $this->member->form_hash ) + { + $this->registry->output->showError( 'no_permission', 10410, null, null, 403 ); + } /* Check Permissions */ - if ( ! $this->memberData['member_id']) + if ( ! $this->memberData['member_id'] ) { - $this->registry->output->showError( 'calendar_no_guests', 10412 ); + $this->registry->output->showError( 'calendar_no_guests', 10412, null, null, 403 ); } $this->calendarBuildPermissions( $event_calendar_id ); if ( ! $this->can_post ) { - $this->registry->output->showError( 'calendar_no_post_perm', 10413 ); + $this->registry->output->showError( 'calendar_no_post_perm', 10413, null, null, 403 ); } /* WHATDOWEDO? */ - if ( $type == 'add' ) - { - - } - else + if ( $type == 'edit' ) { /* Check ID */ if ( ! $event_id ) { - $this->registry->output->showError( 'calendar_event_not_found', 10414 ); + $this->registry->output->showError( 'calendar_event_not_found', 10414, null, null, 404 ); } /* Get the event */ @@ -1350,7 +1325,7 @@ class public_calendar_calendar_calendars extends ipsCommand if ( ! $event = $this->DB->fetch() ) { - $this->registry->output->showError( 'calendar_event_not_found', 10415 ); + $this->registry->output->showError( 'calendar_event_not_found', 10415, null, null, 404 ); } /* Do we have permission to edit this event */ @@ -1365,7 +1340,7 @@ class public_calendar_calendar_calendars extends ipsCommand if ( $can_edit != 1 ) { - $this->registry->output->showError( 'calendar_no_edit_perm', 10416 ); + $this->registry->output->showError( 'calendar_no_edit_perm', 10416, null, null, 403 ); } } @@ -1529,23 +1504,28 @@ class public_calendar_calendar_calendars extends ipsCommand /* Create new event */ if ( $type == 'add' ) { + $_eventData = array( 'event_calendar_id' => $event_calendar_id, + 'event_member_id' => $this->memberData['member_id'], + 'event_content' => $this->request['Post'], + 'event_title' => $event_title, + 'event_smilies' => $allow_emoticons, + 'event_perms' => $read_perms, + 'event_private' => $private_event, + 'event_approved' => $event_approved, + 'event_unixstamp' => time(), + 'event_recurring' => $recur_unit, + 'event_tz' => $event_tz, + 'event_timeset' => count( $hour_min ) > 0 ? intval( $hour_min[0] ).":".intval( $hour_min[1] ) : 0, + 'event_unix_from' => $_final_unix_from, + 'event_unix_to' => $_final_unix_to, + 'event_all_day' => $event_all_day + ); + + /* Data Hook Location */ + IPSLib::doDataHooks( $_eventData, 'calendarAddEvent' ); + /* Add it to the DB */ - $this->DB->insert( 'cal_events', array( - 'event_calendar_id' => $event_calendar_id, - 'event_member_id' => $this->memberData['member_id'], - 'event_content' => $this->request['Post'], - 'event_title' => $event_title, - 'event_smilies' => $allow_emoticons, - 'event_perms' => $read_perms, - 'event_private' => $private_event, - 'event_approved' => $event_approved, - 'event_unixstamp' => time(), - 'event_recurring' => $recur_unit, - 'event_tz' => $event_tz, - 'event_timeset' => count( $hour_min ) > 0 ? intval( $hour_min[0] ).":".intval( $hour_min[1] ) : 0, - 'event_unix_from' => $_final_unix_from, - 'event_unix_to' => $_final_unix_to, - 'event_all_day' => $event_all_day ) ); + $this->DB->insert( 'cal_events', $_eventData ); /* Recache */ $this->calendarCallRecache(); @@ -1557,28 +1537,33 @@ class public_calendar_calendar_calendars extends ipsCommand } else { - $this->registry->output->redirectScreen( $this->lang->words['new_event_mod'], $this->settings['base_url'] . "app=calendar&module=calendar&cal_id{$event_calendar_id}" ); + $this->registry->output->redirectScreen( $this->lang->words['new_event_mod'], $this->settings['base_url'] . "app=calendar&module=calendar&cal_id={$event_calendar_id}" ); } } /* Edit Event */ else { + $_eventData = array( 'event_calendar_id' => $event_calendar_id, + 'event_content' => $this->request['Post'], + 'event_title' => $event_title, + 'event_smilies' => $allow_emoticons, + 'event_perms' => $read_perms, + 'event_private' => $private_event, + 'event_approved' => $event_approved, + 'event_unixstamp' => time(), + 'event_recurring' => $recur_unit, + 'event_tz' => $event_tz, + 'event_timeset' => count( $hour_min ) > 0 ? intval( $hour_min[0] ).":".intval( $hour_min[1] ) : 0, + 'event_unix_from' => $_final_unix_from, + 'event_unix_to' => $_final_unix_to, + 'event_all_day' => $event_all_day + ); + + /* Data Hook Location */ + IPSLib::doDataHooks( $_eventData, 'calendarEditEvent' ); + /* Update the database recored */ - $this->DB->update( 'cal_events', array( - 'event_calendar_id' => $event_calendar_id, - 'event_content' => $this->request['Post'], - 'event_title' => $event_title, - 'event_smilies' => $allow_emoticons, - 'event_perms' => $read_perms, - 'event_private' => $private_event, - 'event_approved' => $event_approved, - 'event_unixstamp' => time(), - 'event_recurring' => $recur_unit, - 'event_tz' => $event_tz, - 'event_timeset' => count( $hour_min ) > 0 ? intval( $hour_min[0] ).":".intval( $hour_min[1] ) : 0, - 'event_unix_from' => $_final_unix_from, - 'event_unix_to' => $_final_unix_to, - 'event_all_day' => $event_all_day ), 'event_id='.$event_id ); + $this->DB->update( 'cal_events', $_eventData, 'event_id='.$event_id ); /* Recache */ $this->calendarCallRecache(); @@ -1598,7 +1583,6 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Display the events for a calendar date * - * @access public * @return void */ public function calendarShowDay() @@ -1684,12 +1668,17 @@ class public_calendar_calendar_calendars extends ipsCommand $switch = 0; } - $this->output .= $this->calendarMakeBirthdayHTML($month, $day, $switch); + if( $this->calendar['cal_bday_limit'] ) + { + $this->output .= $this->calendarMakeBirthdayHTML($month, $day, $switch); + } /* Navigation */ - $this->registry->output->addNavigation( $this->lang->words['page_title'], 'app=calendar&module=calendar' ); + $this->registry->output->addNavigation( $this->lang->words['page_title'], 'app=calendar', 'calendar', 'app=calendar' ); $this->registry->output->addNavigation( $this->calendar['cal_title'] , 'app=calendar&module=calendar&cal_id=' . $this->calendar_id ); $this->registry->output->addNavigation( $this->month_words[$this->chosen_month - 1] ." " . $this->chosen_year, '' ); + + $this->page_title = $this->month_words[$this->chosen_month - 1] . ' ' . $day . ' - ' . $this->settings['board_name']; /* Output */ $this->output .= $this->registry->output->getTemplate( 'calendar' )->calendarEventsList( $events_html ); @@ -1698,7 +1687,6 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Show a single event based on eventid * - * @access public * @return void */ public function calendarShowEvent() @@ -1709,7 +1697,7 @@ class public_calendar_calendar_calendars extends ipsCommand /* Check */ if( ! $event_id ) { - $this->registry->output->showError( 'calendar_event_not_found', 10429 ); + $this->registry->output->showError( 'calendar_event_not_found', 10429, null, null, 404 ); } /* Get it from the DB */ @@ -1718,15 +1706,25 @@ class public_calendar_calendar_calendars extends ipsCommand if ( ! $event = $this->DB->fetch() ) { - $this->registry->output->showError( 'calendar_event_not_found', 10430 ); + $this->registry->output->showError( 'calendar_event_not_found', 10430, null, null, 404 ); } /* Is it a private event */ if ( $event['event_private'] == 1 and $this->memberData['member_id'] != $event['event_member_id'] ) { - $this->registry->output->showError( 'calendar_event_not_found', 10431 ); + $this->registry->output->showError( 'calendar_event_not_found', 10431, null, null, 403 ); } - + + /* approved? */ + if( ! $this->memberData['g_is_supmod'] ) + { + /* Approved */ + if ( ! $event['event_approved'] ) + { + $this->registry->output->showError( 'calendar_event_not_found', 10432.1, null, null, 404 ); + } + } + /* Do we have permission to see the event? */ if( $event['event_perms'] != '*' ) { @@ -1749,7 +1747,7 @@ class public_calendar_calendar_calendars extends ipsCommand if( $check == 0 ) { - $this->registry->output->showError( 'calendar_event_not_found', 10432 ); + $this->registry->output->showError( 'calendar_event_not_found', 10432, null, null, 404 ); } } @@ -1762,24 +1760,37 @@ class public_calendar_calendar_calendars extends ipsCommand $event['event_content'] = IPSText::searchHighlight( $event['event_content'], $this->request['hl'] ); $event['event_title'] = IPSText::searchHighlight( $event['event_title'], $this->request['hl'] ); } + + /** + * Handle time zones + */ + $set_offset = 0; + + if( $event['event_timeset'] AND !$event['event_all_day'] AND !$event['event_recurring'] ) + { + $set_offset = $this->settings['time_offset'] * 3600; + } + + $event['event_unix_from'] = $event['event_unix_from'] + $set_offset; + $event['event_unix_to'] = $event['event_unix_to'] ? $event['event_unix_to'] + $set_offset : 0; /* Output */ $this->output .= $this->registry->output->getTemplate( 'calendar' )->calendarEventsList( $this->calendarMakeEventHTML( $event ) ); /* Navigation */ - $this->registry->output->addNavigation( $this->lang->words['page_title'], 'app=calendar&module=calendar' ); + $this->registry->output->addNavigation( $this->lang->words['page_title'], 'app=calendar', 'calendar', 'app=calendar' ); $this->registry->output->addNavigation( $this->calendar['cal_title'] , 'app=calendar&module=calendar&cal_id=' . $this->calendar_id ); $this->registry->output->addNavigation( $event['event_title'], '' ); + $this->page_title = $event['event_title'] . ' - ' . $this->settings['board_name']; } /** * Builds the html for an event * - * @access public * @param array Array of event data * @return string Parsed event HTML - **/ + */ public function calendarMakeEventHTML( $event ) { /* INIT */ @@ -1827,11 +1838,13 @@ class public_calendar_calendar_calendars extends ipsCommand } /* Date */ - $set_offset = 0; - if( $event['event_timeset'] AND !$event['event_all_day'] ) - { - $set_offset = ( $this->memberData['member_id'] ? $this->memberData['time_offset'] : $this->settings['time_offset'] ) * 3600; - } + // Offset is already applied in the generic getCalendarEventsSql() method + //$set_offset = 0; + + //if( $event['event_timeset'] AND !$event['event_all_day'] ) + //{ + // $set_offset = ( $this->memberData['member_id'] ? $this->memberData['time_offset'] : $this->settings['time_offset'] ) * 3600; + //} /** * Since set_offset takes into account the member timezone, we need to reverse the submitted time zone @@ -1839,14 +1852,16 @@ class public_calendar_calendar_calendars extends ipsCommand //$event['event_unix_from'] = $event['event_unix_from'] - ($event['event_tz'] * 3600); //$event['event_unix_to'] = $event['event_unix_to'] ? $event['event_unix_to'] - ($event['event_tz'] * 3600) : 0; - $tmp = explode( ',', gmdate( 'n,j,Y,G,i', $event['event_unix_from'] + $set_offset ) ); + $event['event_unix_from'] = $event['_unix_from'] ? $event['_unix_from'] : $event['event_unix_from']; + $event['event_unix_to'] = $event['_unix_to'] ? $event['_unix_to'] : $event['event_unix_to']; + + $tmp = explode( ',', gmdate( 'n,j,Y,G,i', $event['event_unix_from'] ) ); - $event['mday'] = $tmp[1]; - $event['month'] = $tmp[0]; - $event['year'] = $tmp[2]; - $event['month_text'] = $this->month_words[ $tmp[0] - 1 ]; - - $event['_start_date'] = gmstrftime( $this->settings['clock_joined'], $event['event_unix_from'] + $set_offset ); + $event['mday'] = $tmp[1]; + $event['month'] = $tmp[0]; + $event['year'] = $tmp[2]; + $event['month_text'] = $this->month_words[ $tmp[0] - 1 ]; + $event['_start_date'] = gmstrftime( $this->settings['clock_joined'], $event['event_unix_from'] ); $this->request['d'] = $event['mday']; $this->request['m'] = $event['month']; @@ -1858,12 +1873,12 @@ class public_calendar_calendar_calendars extends ipsCommand if( $event['event_recurring'] == 0 AND $event['event_unix_to'] ) { $type = $this->lang->words['se_range']; - $de = $this->lang->words['se_ends'] . ' ' . gmstrftime( $this->settings['clock_joined'], $event['event_unix_to'] + $set_offset ); + $de = $this->lang->words['se_ends'] . ' ' . gmstrftime( $this->settings['clock_joined'], $event['event_unix_to'] ); } else if ( $event['event_recurring'] ) { $type = $this->lang->words['se_recur']; - $de = $this->lang->words['se_ends'] . ' ' . gmstrftime( $this->settings['clock_joined'], $event['event_unix_to'] + $set_offset ); + $de = $this->lang->words['se_ends'] . ' ' . gmstrftime( $this->settings['clock_joined'], $event['event_unix_to'] ); } $event['time'] = ''; @@ -1917,11 +1932,10 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Builds the html for a mini calendar * - * @access public - * @var int $month Numeric value of month to build - * @var int $year Year to build + * @param int $month Numeric value of month to build + * @param int $year Year to build * @return string Mini-cal HTML - **/ + */ public function getMiniCalendar( $month, $year ) { //----------------------------------------- @@ -1936,7 +1950,6 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Gets birthdays and stores them in the query_bday_cache * - * @access public * @param integer $month Month * @return void */ @@ -1967,7 +1980,6 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Generates the sql to query events * - * @access public * @param integer $month Month to get events from * @param integer $year Year to get events from * @param array $get_cached Get from cache @@ -2009,11 +2021,6 @@ class public_calendar_calendar_calendars extends ipsCommand $extra = ( isset( $get_cached['cal_id'] ) AND $get_cached['cal_id'] ) ? "event_calendar_id=" . intval( $get_cached['cal_id'] ) . " AND " : ''; $this->DB->build( array( - //'queryKey' => 'fetchEventsAll', - //'queryVars' => array( 'extra' => $extra, 'timenow' => $timenow, 'timethen' => $timethen, 'month' => $month ), - //'queryLocation' => $this->registry->dbFunctions()->fetchQueryFileName( 'public', 'calendar' ), - //'queryClass' => $this->registry->dbFunctions()->fetchQueryFileClassName( 'public', 'calendar' ), - 'select' => '*', 'from' => 'cal_events', 'where' => "{$extra} event_approved=1 @@ -2029,11 +2036,6 @@ class public_calendar_calendar_calendars extends ipsCommand $extra = $this->can_moderate ? "event_approved IN (0,1)" : "event_approved=1"; $this->DB->build( array( - //'queryKey' => 'fetchEventsCal', - //'queryVars' => array( 'event_calendar_id' => $this->calendar_id, 'extra' => $extra, 'timenow' => $timenow, 'timethen' => $timethen, 'month' => $month ), - //'queryLocation' => $this->registry->dbFunctions()->fetchQueryFileName( 'public', 'calendar' ), - //'queryClass' => $this->registry->dbFunctions()->fetchQueryFileClassName( 'public', 'calendar' ), - 'select' => '*', 'from' => 'cal_events', 'where' => "event_calendar_id = {$this->calendar_id} AND {$extra} @@ -2088,9 +2090,12 @@ class public_calendar_calendar_calendars extends ipsCommand /* Times */ $set_offset = 0; + if( $r['event_timeset'] AND ! $r['event_all_day'] ) { - $set_offset = ( $this->memberData['member_id'] ? $this->memberData['time_offset'] : $this->settings['time_offset'] ) * 3600; + // Bug Fix #21275 + //$set_offset = ( $this->memberData['member_id'] ? $this->memberData['time_offset'] : $this->settings['time_offset'] ) * 3600; + $set_offset = $this->settings['time_offset'] * 3600; } $r['_unix_from'] = $r['event_unix_from'] ? $r['event_unix_from'] + $set_offset : 0; @@ -2099,6 +2104,9 @@ class public_calendar_calendar_calendars extends ipsCommand /* Recurring Events */ if( $r['event_recurring'] > 0 ) { + $r['_unix_from'] = $r['_unix_from'] - $set_offset; + $r['_unix_to'] = $r['_unix_to'] - $set_offset; + $r['recurring'] = 1; /* Get recurring months */ @@ -2243,12 +2251,11 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Gets the days events * - * @access public * @param string $month Month * @param string $day Day * @param string $year Year * @return array Get events for selected day - **/ + */ public function calendarGetDayEvents( $month="", $day="", $year="" ) { /* INIT */ @@ -2290,7 +2297,6 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Get event info * - * @access public * @param array $event Event data * @param int $month Month * @param int $day Day @@ -2410,7 +2416,6 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Builds the html for the monthly events * - * @access public * @param int $month Numeric value of the month to get events from * @param int $year Year to get events from * @param bool $minical Set to 1 if this is for the minicalendar @@ -2653,9 +2658,8 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Displays birthdays for the specified date * - * @access public * @return void - **/ + */ public function calendarShowBirthdays() { /* INIT */ @@ -2673,7 +2677,7 @@ class public_calendar_calendar_calendars extends ipsCommand $this->output .= $this->registry->output->getTemplate('calendar')->calendarEventsList( $this->calendarMakeBirthdayHTML( $month, $day ) ); /* Navigation */ - $this->registry->output->addNavigation( $this->lang->words['page_title'], 'app=calendar&module=calendar' ); + $this->registry->output->addNavigation( $this->lang->words['page_title'], 'app=calendar', 'calendar', 'app=calendar' ); $this->registry->output->addNavigation( $this->calendar['cal_title'] , 'app=calendar&module=calendar&cal_id=' . $this->calendar_id ); $this->registry->output->addNavigation( $this->lang->words['cal_birthdays'] ." " . $day ." " . $this->month_words[$this->chosen_month - 1] . " " . $this->chosen_year, '' ); } @@ -2681,12 +2685,11 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Make Birthday HTML (return HTML for bdays) * - * @access public * @param integer $month Month * @param integer $day Day * @param bool $switch Don't show an error page if no birthdays, just return * @return string HTML output - **/ + */ public function calendarMakeBirthdayHTML($month, $day, $switch=0) { /* Check birthday setting */ @@ -2748,11 +2751,10 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Builds a month dropdown * - * @access private * @param integer $month Month to select by default * @return string Dropdown HTML */ - private function calendarGetMonthDropDown( $month=0 ) + protected function calendarGetMonthDropDown( $month=0 ) { $return = ""; @@ -2775,11 +2777,10 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Builds a year dropdown * - * @access private - * @var integer $year Year to select by default + * @param integer $year Year to select by default * @return string HTML dropdown */ - private function calendarGetYearDropDown( $year=0 ) + protected function calendarGetYearDropDown( $year=0 ) { $return = ""; @@ -2814,11 +2815,10 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Builds a day dropdown * - * @access private * @param integer $day day to select by default * @return string HTML dropdown */ - private function calendarGetDayDropDown( $day=0 ) + protected function calendarGetDayDropDown( $day=0 ) { if( $day == "" ) { @@ -2840,12 +2840,11 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Figures out what the next month on the calendar is * - * @access private * @param integer $month Current Month * @param integer $year Current Year * @return array Month data */ - private function calendarGetNextMonth( $month, $year ) + protected function calendarGetNextMonth( $month, $year ) { $next_month = array(); @@ -2867,13 +2866,12 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Recaches calendars * - * @access private * @return void */ - private function calendarCallRecache() + protected function calendarCallRecache() { - require_once( IPS_ROOT_PATH . 'applications_addon/ips/calendar/modules_admin/calendar/calendars.php' ); - $calendars = new admin_calendar_calendar_calendars( $this->registry ); + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir('calendar') . '/modules_admin/calendar/calendars.php' , 'admin_calendar_calendar_calendars' ); + $calendars = new $classToLoad(); $calendars->makeRegistryShortcuts( $this->registry ); $calendars->calendarRebuildCache( 0 ); } @@ -2881,12 +2879,11 @@ class public_calendar_calendar_calendars extends ipsCommand /** * Figures out what the previous month on the calendar is * - * @access private * @param integer $month Current Month * @param integer $year Current Year * @return array Month data - **/ - private function calendarGetPreviousMonth($month, $year) + */ + protected function calendarGetPreviousMonth($month, $year) { $prev_month = array(); $prev_month['year_id'] = $year; diff --git a/upload/admin/applications_addon/ips/calendar/modules_public/calendar/defaultSection.php b/upload/admin/applications_addon/ips/calendar/modules_public/calendar/defaultSection.php index d231b3fb..362d3f41 100644 --- a/upload/admin/applications_addon/ips/calendar/modules_public/calendar/defaultSection.php +++ b/upload/admin/applications_addon/ips/calendar/modules_public/calendar/defaultSection.php @@ -1,16 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Default calendar section + * Last Updated: $Date: 2010-04-15 15:46:26 -0400 (Thu, 15 Apr 2010) $ + * * * @author $author$ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Calendar - * @link http://www.iinvisionpower.com - * @version $Rev: 4948 $ + * @link http://www.invisionpower.com + * @version $Rev: 6133 $ */ if ( ! defined( 'IN_IPB' ) ) diff --git a/upload/admin/applications_addon/ips/calendar/modules_public/calendar/index.html b/upload/admin/applications_addon/ips/calendar/modules_public/calendar/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/calendar/modules_public/calendar/index.html +++ b/upload/admin/applications_addon/ips/calendar/modules_public/calendar/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/modules_public/index.html b/upload/admin/applications_addon/ips/calendar/modules_public/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/calendar/modules_public/index.html +++ b/upload/admin/applications_addon/ips/calendar/modules_public/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/setup/index.html b/upload/admin/applications_addon/ips/calendar/setup/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/calendar/setup/index.html +++ b/upload/admin/applications_addon/ips/calendar/setup/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/setup/versions/index.html b/upload/admin/applications_addon/ips/calendar/setup/versions/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications_addon/ips/calendar/setup/versions/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/setup/versions/install/index.html b/upload/admin/applications_addon/ips/calendar/setup/versions/install/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications_addon/ips/calendar/setup/versions/install/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/setup/versions/install/sql/calendar_mysql_inserts.php b/upload/admin/applications_addon/ips/calendar/setup/versions/install/sql/calendar_mysql_inserts.php index 622f69c0..d3b22c9d 100644 --- a/upload/admin/applications_addon/ips/calendar/setup/versions/install/sql/calendar_mysql_inserts.php +++ b/upload/admin/applications_addon/ips/calendar/setup/versions/install/sql/calendar_mysql_inserts.php @@ -3,4 +3,4 @@ $INSERT[] ="INSERT INTO cal_calendars (cal_id, cal_title, cal_moderate, cal_position, cal_event_limit, cal_bday_limit, cal_rss_export, cal_rss_export_days, cal_rss_export_max, cal_rss_update, cal_rss_update_last, cal_rss_cache, cal_permissions) VALUES (1, 'Основной календарь', 1, 0, 2, 1, 1, 14, 20, 1440, UNIX_TIMESTAMP(), '', 'a:3:{s:9:\"perm_read\";s:1:\"*\";s:9:\"perm_post\";s:3:\"4,3\";s:10:\"perm_nomod\";s:0:\"\";}');"; $INSERT[] ="INSERT INTO permission_index VALUES(NULL, 'calendar', 'calendar', 1, ',4,2,3,6,', ',4,3,6,', ',4,6,', '', '', '', '', 0, 0, NULL)"; -$INSERT[] = "INSERT INTO rc_classes (onoff, class_title, class_desc, author, author_url, pversion, my_class, group_can_report, mod_group_perm, extra_data, lockd) VALUES(1, 'Плагин календаря', 'Плагин отправки жалоб на события календаря', 'Invision Power Services, Inc', 'http://', 'v1.0', 'calendar', ',1,2,3,4,6,', ',4,6,', 'N;', 1);"; +$INSERT[] = "INSERT INTO rc_classes (onoff, class_title, class_desc, author, author_url, pversion, my_class, group_can_report, mod_group_perm, extra_data, lockd, app) VALUES(1, 'Плагин календаря', 'Плагин отправки жалоб на события календаря', 'Invision Power Services, Inc', '', 'v1.0', 'calendar', ',1,2,3,4,6,', ',4,6,', 'N;', 1, 'calendar');"; diff --git a/upload/admin/applications_addon/ips/calendar/setup/versions/install/sql/calendar_mysql_tables.php b/upload/admin/applications_addon/ips/calendar/setup/versions/install/sql/calendar_mysql_tables.php index ef09aba9..d669cc2a 100644 --- a/upload/admin/applications_addon/ips/calendar/setup/versions/install/sql/calendar_mysql_tables.php +++ b/upload/admin/applications_addon/ips/calendar/setup/versions/install/sql/calendar_mysql_tables.php @@ -17,7 +17,8 @@ $TABLE[] = "CREATE TABLE cal_calendars ( cal_rss_update_last int(10) unsigned NOT NULL default '0', cal_rss_cache mediumtext, cal_permissions mediumtext, - PRIMARY KEY (cal_id) + PRIMARY KEY (cal_id), + KEY cal_rss_export (cal_rss_export) );"; $TABLE[] = "CREATE TABLE cal_events ( event_id int(10) unsigned NOT NULL auto_increment, @@ -31,13 +32,13 @@ $TABLE[] = "CREATE TABLE cal_events ( event_approved tinyint(1) NOT NULL default '0', event_unixstamp int(10) unsigned NOT NULL default '0', event_recurring int(2) unsigned NOT NULL default '0', - event_tz int(4) NOT NULL default '0', + event_tz VARCHAR(4) NOT NULL default '0', event_timeset varchar(6) NOT NULL default '0', event_unix_from int(10) unsigned NOT NULL default '0', event_unix_to int(10) unsigned NOT NULL default '0', event_all_day tinyint(1) NOT NULL default '0', PRIMARY KEY (event_id), - KEY daterange (event_calendar_id,event_approved,event_unix_from,event_unix_to), + KEY daterange ( event_approved , event_unix_from , event_unix_to ), KEY approved (event_calendar_id,event_approved) );"; ?> \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/setup/versions/install/sql/calendar_mysql_uninstall.php b/upload/admin/applications_addon/ips/calendar/setup/versions/install/sql/calendar_mysql_uninstall.php index 5544ece8..1e734f3d 100644 --- a/upload/admin/applications_addon/ips/calendar/setup/versions/install/sql/calendar_mysql_uninstall.php +++ b/upload/admin/applications_addon/ips/calendar/setup/versions/install/sql/calendar_mysql_uninstall.php @@ -1,2 +1,2 @@ - +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/skin_cp/cp_skin_calendar.php b/upload/admin/applications_addon/ips/calendar/skin_cp/cp_skin_calendar.php index f1919f9a..0cd22803 100644 --- a/upload/admin/applications_addon/ips/calendar/skin_cp/cp_skin_calendar.php +++ b/upload/admin/applications_addon/ips/calendar/skin_cp/cp_skin_calendar.php @@ -1,274 +1,276 @@ - -

      {$this->lang->words['c_title']}

      - - - -form_code}&do=$formcode&cal_id={$calendar['cal_id']}' method='post'> - _admin_auth_key}' /> - -
      -

      $title

      - -
        -
      • - - {$form['cal_title']} -
      • -
      • - - {$form['cal_moderate']} -
      • -
      • - - {$form['cal_event_limit']} -
      • -
      • - - {$form['cal_bday_limit']} -
      • - -
      • - -
      • - - {$form['cal_rss_export']} -
      • -
      • - - {$form['cal_rss_export_days']} -
      • -
      • - - {$form['cal_rss_export_max']} -
      • -
      • - - {$form['cal_rss_update']} -
      • -
      - - {$form['perm_matrix']} - -
      -
      - -
      -
      -
      - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Calendar overview screen - * - * @access public - * @param array Calendars - * @return string HTML - */ -public function calendarOverviewScreen( $rows ) { - -$IPBHTML = ""; - -//--starthtml--// -$IPBHTML .= << -

      {$this->lang->words['c_title']}

      - - - - -
      -

      {$this->lang->words['c_calendars']}

      - -
      - -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * RSS recurring event - * - * @access public - * @param array Event data - * @return string HTML - */ -public function calendar_rss_recurring( $event ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= <<{$event['event_content']}

      -
      -

      {$this->lang->words['c_recurring']} -
      {$this->lang->words['c_fromcolon']} {$event['_from_month']}/{$event['_from_day']}/{$event['_from_year']} -
      {$this->lang->words['c_tocolon']} {$event['_to_month']}/{$event['_to_day']}/{$event['_to_year']}

      -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * RSS ranged event - * - * @access public - * @param array Event data - * @return string HTML - */ -public function calendar_rss_range( $event ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= <<{$event['event_content']}

      -
      -

      {$this->lang->words['c_ranged']} -
      {$this->lang->words['c_fromcolon']} {$event['_from_month']}/{$event['_from_day']}/{$event['_from_year']} -
      {$this->lang->words['c_tocolon']} {$event['_to_month']}/{$event['_to_day']}/{$event['_to_year']}

      -HTML; - -//--endhtml--// -return $IPBHTML; -} - -/** - * RSS single day event - * - * @access public - * @param array Event data - * @return string HTML - */ -public function calendar_rss_single( $event ) { - -$IPBHTML = ""; -//--starthtml--// - -$IPBHTML .= <<{$event['event_content']}

      -
      -

      {$this->lang->words['c_singleday']} {$event['_from_month']}/{$event['_from_day']}/{$event['_from_year']}

      -HTML; - -//--endhtml--// -return $IPBHTML; -} - -} + + * Invision Power Services + * IP.Board v3.1.4 + * Calendar skin file + * Last Updated: $Date: 2010-11-15 11:39:10 -0500 (Mon, 15 Nov 2010) $ + * + * + * @author $Author: ips_terabyte $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Calendar + * @link http://www.invisionpower.com + * @since Friday 19th May 2006 17:33 + * @version $Revision: 7185 $ + */ + +class cp_skin_calendar extends output +{ + +/** + * Prevent our main destructor being called by this class + * + * @access public + * @return void + */ +public function __destruct() +{ +} + +/** + * Form to add/edit a calendar + * + * @access public + * @param array Form elements + * @param string Form title + * @param string Action code + * @param string Button text + * @param array Calendar data + * @return string HTML + */ +public function calendarForm($form, $title, $formcode, $button, $calendar) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= << +

      {$this->lang->words['c_title']}

      + + + +
      form_code}&do=$formcode&cal_id={$calendar['cal_id']}' method='post'> + _admin_auth_key}' /> + +
      +

      $title

      + +
        +
      • + + {$form['cal_title']} +
      • +
      • + + {$form['cal_moderate']} +
      • +
      • + + {$form['cal_event_limit']} +
      • +
      • + + {$form['cal_bday_limit']} +
      • + +
      • + +
      • + + {$form['cal_rss_export']} +
      • +
      • + + {$form['cal_rss_export_days']} +
      • +
      • + + {$form['cal_rss_export_max']} +
      • +
      • + + {$form['cal_rss_update']} +
      • +
      + + {$form['perm_matrix']} + +
      +
      + +
      +
      +
      +
      +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Calendar overview screen + * + * @access public + * @param array Calendars + * @return string HTML + */ +public function calendarOverviewScreen( $rows ) { + +$IPBHTML = ""; + +//--starthtml--// +$IPBHTML .= << +

      {$this->lang->words['c_title']}

      + + + + +
      +

      {$this->lang->words['c_calendars']}

      + +
      + +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * RSS recurring event + * + * @access public + * @param array Event data + * @return string HTML + */ +public function calendar_rss_recurring( $event ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= <<{$event['event_content']}

      +
      +

      {$this->lang->words['c_recurring']} +
      {$this->lang->words['c_fromcolon']} {$event['_from_month']}/{$event['_from_day']}/{$event['_from_year']} +
      {$this->lang->words['c_tocolon']} {$event['_to_month']}/{$event['_to_day']}/{$event['_to_year']}

      +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * RSS ranged event + * + * @access public + * @param array Event data + * @return string HTML + */ +public function calendar_rss_range( $event ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= <<{$event['event_content']}

      +
      +

      {$this->lang->words['c_ranged']} +
      {$this->lang->words['c_fromcolon']} {$event['_from_month']}/{$event['_from_day']}/{$event['_from_year']} +
      {$this->lang->words['c_tocolon']} {$event['_to_month']}/{$event['_to_day']}/{$event['_to_year']}

      +HTML; + +//--endhtml--// +return $IPBHTML; +} + +/** + * RSS single day event + * + * @access public + * @param array Event data + * @return string HTML + */ +public function calendar_rss_single( $event ) { + +$IPBHTML = ""; +//--starthtml--// + +$IPBHTML .= <<{$event['event_content']}

      +
      +

      {$this->lang->words['c_singleday']} {$event['_from_month']}/{$event['_from_day']}/{$event['_from_year']}

      +HTML; + +//--endhtml--// +return $IPBHTML; +} + +} diff --git a/upload/admin/applications_addon/ips/calendar/skin_cp/index.html b/upload/admin/applications_addon/ips/calendar/skin_cp/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/calendar/skin_cp/index.html +++ b/upload/admin/applications_addon/ips/calendar/skin_cp/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/tasks/calendarevents.php b/upload/admin/applications_addon/ips/calendar/tasks/calendarevents.php index 007963e5..40c738eb 100644 --- a/upload/admin/applications_addon/ips/calendar/tasks/calendarevents.php +++ b/upload/admin/applications_addon/ips/calendar/tasks/calendarevents.php @@ -1,19 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Task: Gathers birthday and calendar events for a few days and caches them - * Last Updated: $LastChangedDate: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $LastChangedDate: 2010-10-20 13:11:07 -0400 (Wed, 20 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Calendar - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th January 2004 - * @version $Rev: 3887 $ + * @version $Rev: 7005 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -27,7 +28,6 @@ class task_item /** * Parent task manager class * - * @access protected * @var object */ protected $class; @@ -35,7 +35,6 @@ class task_item /** * This task data * - * @access protected * @var array */ protected $task = array(); @@ -43,7 +42,6 @@ class task_item /** * Prevent logging * - * @access protected * @var boolean */ protected $restrict_log = false; @@ -51,7 +49,6 @@ class task_item /**#@+ * Registry Object Shortcuts * - * @access protected * @var object */ protected $registry; @@ -60,13 +57,14 @@ class task_item protected $request; protected $lang; protected $member; + protected $memberData; protected $cache; + protected $caches; /**#@-*/ /** * Constructor * - * @access public * @param object ipsRegistry reference * @param object Parent task class * @param array This task data @@ -92,7 +90,6 @@ class task_item /** * Run this task * - * @access public * @return void */ public function runTask() @@ -105,8 +102,8 @@ class task_item define( 'IN_ACP', 1 ); - require_once( IPSLib::getAppDir( 'calendar' ) . '/modules_admin/calendar/calendars.php' ); - $calendars = new admin_calendar_calendar_calendars(); + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir('calendar') . '/modules_admin/calendar/calendars.php' , 'admin_calendar_calendar_calendars' ); + $calendars = new $classToLoad(); $calendars->makeRegistryShortcuts( $this->registry ); $calendars->calendarRebuildCache( 0 ); diff --git a/upload/admin/applications_addon/ips/calendar/tasks/index.html b/upload/admin/applications_addon/ips/calendar/tasks/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/calendar/tasks/index.html +++ b/upload/admin/applications_addon/ips/calendar/tasks/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/xml/calendar_lofi_templates.xml b/upload/admin/applications_addon/ips/calendar/xml/calendar_lofi_templates.xml deleted file mode 100644 index 3771049a..00000000 --- a/upload/admin/applications_addon/ips/calendar/xml/calendar_lofi_templates.xml +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/upload/admin/applications_addon/ips/calendar/xml/calendar_mobile_templates.xml b/upload/admin/applications_addon/ips/calendar/xml/calendar_mobile_templates.xml new file mode 100644 index 00000000..999c8372 --- /dev/null +++ b/upload/admin/applications_addon/ips/calendar/xml/calendar_mobile_templates.xml @@ -0,0 +1,731 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/upload/admin/applications_addon/ips/calendar/xml/calendar_root_css.xml b/upload/admin/applications_addon/ips/calendar/xml/calendar_root_css.xml index e7590ec1..4cd52196 100644 --- a/upload/admin/applications_addon/ips/calendar/xml/calendar_root_css.xml +++ b/upload/admin/applications_addon/ips/calendar/xml/calendar_root_css.xml @@ -2,7 +2,7 @@ 0 - 1260269066 + 1288018123 ipb_calendar /************************************************************************/ /* IP.Board 3 CSS - By Rikki Tissier - (c)2008 Invision Power Services */ @@ -11,8 +11,9 @@ /************************************************************************/ div#calendar_list { - width: 17%; + width: 92%; padding: 10px; + margin: 8px 0 15px 0; } div#calendar_list ol { @@ -129,6 +130,10 @@ div#mini_calendars table, border-top: 0; } +.mini-cal-wrap { + width: 100%; +} + div#mini_calendars th.view_week { padding: 6px 2px; } @@ -149,6 +154,7 @@ div#mini_calendars th, div#mini_calendars td, .cal_color { margin-right: 8px; padding: 0 7px; + border-radius: 2px; -moz-border-radius: 2px; -webkit-border-radius: 2px; } @@ -157,6 +163,7 @@ div#mini_calendars th, div#mini_calendars td, background-color: #d5dde5; color: #fff; font-size: 0.8em; + border-radius: 2px; -moz-border-radius: 2px; -webkit-border-radius: 2px; padding: 2px 5px; @@ -192,5 +199,6 @@ div#mini_calendars th, div#mini_calendars td, 0 0 + root diff --git a/upload/admin/applications_addon/ips/calendar/xml/calendar_root_templates.xml b/upload/admin/applications_addon/ips/calendar/xml/calendar_root_templates.xml index 2243a95d..b0c04b77 100644 --- a/upload/admin/applications_addon/ips/calendar/xml/calendar_root_templates.xml +++ b/upload/admin/applications_addon/ips/calendar/xml/calendar_root_templates.xml @@ -1,6 +1,401 @@ + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - diff --git a/upload/admin/applications_addon/ips/calendar/xml/calendar_xmlskin_templates.xml b/upload/admin/applications_addon/ips/calendar/xml/calendar_xmlskin_templates.xml index f6ef97a9..d3a8897f 100644 --- a/upload/admin/applications_addon/ips/calendar/xml/calendar_xmlskin_templates.xml +++ b/upload/admin/applications_addon/ips/calendar/xml/calendar_xmlskin_templates.xml @@ -1,6 +1,403 @@ + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - diff --git a/upload/admin/applications_addon/ips/calendar/xml/hooks/board_index_calendar.xml b/upload/admin/applications_addon/ips/calendar/xml/hooks/board_index_calendar.xml index 2ce87fb2..a8b65429 100644 --- a/upload/admin/applications_addon/ips/calendar/xml/hooks/board_index_calendar.xml +++ b/upload/admin/applications_addon/ips/calendar/xml/hooks/board_index_calendar.xml @@ -6,7 +6,7 @@ Выводит на главной странице мини-календарь Invision Power Services, Inc. - http:// + 1.0.0 diff --git a/upload/admin/applications_addon/ips/calendar/xml/hooks/index.html b/upload/admin/applications_addon/ips/calendar/xml/hooks/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications_addon/ips/calendar/xml/hooks/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/xml/index.html b/upload/admin/applications_addon/ips/calendar/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/calendar/xml/index.html +++ b/upload/admin/applications_addon/ips/calendar/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/calendar/xml/versions.xml b/upload/admin/applications_addon/ips/calendar/xml/versions.xml index b740c4dd..9b46ee91 100644 --- a/upload/admin/applications_addon/ips/calendar/xml/versions.xml +++ b/upload/admin/applications_addon/ips/calendar/xml/versions.xml @@ -1,7 +1,7 @@ - 3.0.5 - 30012 + 3.1.4 + 31007 \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/extensions/coreExtensions.php b/upload/admin/applications_addon/ips/chat/extensions/coreExtensions.php deleted file mode 100644 index 8c0ce99d..00000000 --- a/upload/admin/applications_addon/ips/chat/extensions/coreExtensions.php +++ /dev/null @@ -1,81 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class publicSessions__chat -{ - /** - * Return session variables for this application - * - * current_appcomponent, current_module and current_section are automatically - * stored. This function allows you to add specific variables in. - * - * @access public - * @author Matt Mecham - * @return array - */ - public function getSessionVariables() - { - return array( '1_type' => 'chat', - '1_id' => 1 ); - } - - /** - * Parse/format the online list data for the records - * - * @access public - * @author Brandon Farber - * @param array Online list rows to check against - * @return array Online list rows parsed - */ - public function parseOnlineEntries( $rows ) - { - ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_chatsigma' ), 'chat' ); - ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_chatpara' ), 'chat' ); - - if( !is_array($rows) OR !count($rows) ) - { - return $rows; - } - - $final = $rows; - - //----------------------------------------- - // Extract the chat data - //----------------------------------------- - - foreach( $rows as $row ) - { - if( $row['current_appcomponent'] == 'chat' ) - { - $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['chat_online']; - $row['where_link'] = 'app=chat'; - - $final[ $row['id'] ] = $row; - } - } - - return $final; - } -} \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/extensions/coreVariables.php b/upload/admin/applications_addon/ips/chat/extensions/coreVariables.php deleted file mode 100644 index 16f4cb97..00000000 --- a/upload/admin/applications_addon/ips/chat/extensions/coreVariables.php +++ /dev/null @@ -1,28 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -$_LOAD = array(); - - -$_LOAD['chatting'] = 1; diff --git a/upload/admin/applications_addon/ips/chat/extensions/index.html b/upload/admin/applications_addon/ips/chat/extensions/index.html deleted file mode 100644 index 203e7ede..00000000 --- a/upload/admin/applications_addon/ips/chat/extensions/index.html +++ /dev/null @@ -1 +0,0 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/index.html b/upload/admin/applications_addon/ips/chat/index.html deleted file mode 100644 index 203e7ede..00000000 --- a/upload/admin/applications_addon/ips/chat/index.html +++ /dev/null @@ -1 +0,0 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/modules_admin/addonchat/chat.php b/upload/admin/applications_addon/ips/chat/modules_admin/addonchat/chat.php deleted file mode 100644 index da5c3887..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_admin/addonchat/chat.php +++ /dev/null @@ -1,179 +0,0 @@ -Incorrect accessYou cannot access this file directly."; - exit(); -} - - -class admin_chat_addonchat_chat extends ipsCommand -{ - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load HTML - //----------------------------------------- - - $this->html = $this->registry->output->loadTemplate( 'cp_skin_chat' ); - - $this->registry->class_localization->loadLanguageFile( array( 'admin_chat' ) ); - - //----------------------------------------- - // Set up stuff - //----------------------------------------- - - $this->form_code = $this->html->form_code = 'module=addonchat&section=chat'; - $this->form_code_js = $this->html->form_code_js = 'module=addonchat§ion=chat'; - - switch($this->request['do']) - { - case 'chatsettings': - $this->_chatConfig(); - break; - case 'chatsave': - $this->_chatSave(); - break; - - default: - $this->_chatSplash(); - break; - } - - //----------------------------------------- - // Pass to CP output hander - //----------------------------------------- - - $this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper(); - $this->registry->getClass('output')->sendOutput(); - } - - /** - * Chat splash page - * - * @access private - * @return void [Outputs to screen] - */ - private function _chatSplash() - { - //----------------------------------------- - // Do we have an order number - //----------------------------------------- - - if ( $this->settings['chat_account_no'] ) - { - $this->_chatConfig(); - } - else - { - $this->registry->output->html = $this->html->addonchatKey(); - $this->registry->output->showInsideIframe( '' ); - } - } - - /** - * Save your key to enable chat - * - * @access private - * @return void [Outputs to screen] - */ - private function _chatSave() - { - $acc_number = $this->request['account_no']; - - if ( $acc_number == "" ) - { - $this->registry->output->showError( $this->lang->words['addon_invalid_key'], 1190 ); - } - - //----------------------------------------- - // Load libby-do-dah - //----------------------------------------- - - require_once( IPSLib::getAppDir( 'core' ).'/modules_admin/tools/settings.php' ); - $settings = new admin_core_tools_settings(); - $settings->makeRegistryShortcuts( $this->registry ); - - $settings->html = $this->registry->output->loadTemplate( 'cp_skin_tools', 'core' ); - ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_tools' ), 'core' ); - $settings->form_code = $settings->html->form_code = 'module=tools&section=settings'; - $settings->form_code_js = $settings->html->form_code_js = 'module=tools§ion=settings'; - - $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => $acc_number ), "conf_key='chat_account_no'" ); - $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => '' ) , "conf_key='chat04_account_no'" ); - - $settings->settingsRebuildCache(); - - $this->DB->update( 'core_sys_module', array( 'sys_module_position' => 2 ), "sys_module_key='parachat'" ); - $this->DB->update( 'core_sys_module', array( 'sys_module_position' => 1 ), "sys_module_key='addonchat'" ); - - $this->cache->rebuildCache( 'module_cache', 'global' ); - - //----------------------------------------- - // Show config - //----------------------------------------- - - $this->_chatConfig(); - } - - /** - * Show the configuration page - * - * @access private - * @return void [Outputs to screen] - */ - private function _chatConfig() - { - //----------------------------------------- - // Load libby-do-dah - //----------------------------------------- - - require_once( IPSLib::getAppDir( 'core' ).'/modules_admin/tools/settings.php' ); - $settings = new admin_core_tools_settings(); - $settings->makeRegistryShortcuts( $this->registry ); - - $settings->html = $this->registry->output->loadTemplate( 'cp_skin_tools', 'core' ); - ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_tools' ), 'core' ); - $settings->form_code = $settings->html->form_code = 'module=tools&section=settings'; - $settings->form_code_js = $settings->html->form_code_js = 'module=tools§ion=settings'; - - //----------------------------------------- - // Did we reset the component? - //----------------------------------------- - - if ( ! $this->settings['chat_account_no'] ) - { - $this->_chatSplash(); - } - - $this->request['conf_title_keyword'] = 'chat'; - $settings->return_after_save = $this->settings['base_url'] . $this->form_code . '&do=chatsettings'; - - $settings->_viewSettings(); - } - -} \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/modules_admin/addonchat/defaultSection.php b/upload/admin/applications_addon/ips/chat/modules_admin/addonchat/defaultSection.php deleted file mode 100644 index 07b8a1e4..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_admin/addonchat/defaultSection.php +++ /dev/null @@ -1,30 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -/** -* Very simply returns the default section if one is not -* passed in the URL -*/ - -$DEFAULT_SECTION = 'chat'; \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/modules_admin/addonchat/index.html b/upload/admin/applications_addon/ips/chat/modules_admin/addonchat/index.html deleted file mode 100644 index 203e7ede..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_admin/addonchat/index.html +++ /dev/null @@ -1 +0,0 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/modules_admin/addonchat/xml/index.html b/upload/admin/applications_addon/ips/chat/modules_admin/addonchat/xml/index.html deleted file mode 100644 index 203e7ede..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_admin/addonchat/xml/index.html +++ /dev/null @@ -1 +0,0 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/modules_admin/addonchat/xml/menu.xml b/upload/admin/applications_addon/ips/chat/modules_admin/addonchat/xml/menu.xml deleted file mode 100644 index 22c8f2b5..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_admin/addonchat/xml/menu.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Manage AddonChat - - - Manage AddonChat - chat - - - 0 - - - - - \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/modules_admin/index.html b/upload/admin/applications_addon/ips/chat/modules_admin/index.html deleted file mode 100644 index 203e7ede..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_admin/index.html +++ /dev/null @@ -1 +0,0 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/modules_admin/parachat/chat.php b/upload/admin/applications_addon/ips/chat/modules_admin/parachat/chat.php deleted file mode 100644 index f7bd4e28..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_admin/parachat/chat.php +++ /dev/null @@ -1,197 +0,0 @@ -Incorrect accessYou cannot access this file directly."; - exit(); -} - - -class admin_chat_parachat_chat extends ipsCommand -{ - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load HTML - //----------------------------------------- - - $this->html = $this->registry->output->loadTemplate( 'cp_skin_chat' ); - - $this->registry->class_localization->loadLanguageFile( array( 'admin_chat' ) ); - - //----------------------------------------- - // Set up stuff - //----------------------------------------- - - $this->form_code = $this->html->form_code = 'module=parachat&section=chat'; - $this->form_code_js = $this->html->form_code_js = 'module=parachat§ion=chat'; - - switch($this->request['do']) - { - case 'chatsettings': - $this->_chatConfig(); - break; - case 'chatsave': - $this->_chatSave(); - break; - - default: - case 'ipchat04': - $this->request[ 'code'] = 'show' ; - $this->_chatSplash(); - break; - } - - //----------------------------------------- - // Pass to CP output hander - //----------------------------------------- - - $this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper(); - $this->registry->getClass('output')->sendOutput(); - } - - /** - * Chat splash page - * - * @access private - * @return void [Outputs to screen] - */ - private function _chatSplash() - { - //----------------------------------------- - // Do we have an order number - //----------------------------------------- - - if ( $this->settings['chat04_account_no'] ) - { - $this->_chatConfig(); - } - else - { - $this->registry->output->html = $this->html->parachatKey(); - $this->registry->output->showInsideIframe( '' ); - } - } - - /** - * Save your key to enable chat - * - * @access private - * @return void [Outputs to screen] - */ - private function _chatSave() - { - $acc_number = $this->request['account_no']; - - if ( $acc_number == "" ) - { - $this->registry->output->showError( $this->lang->words['para_invalid_key'], 1193 ); - } - - //----------------------------------------- - // Load libby-do-dah - //----------------------------------------- - - require_once( IPSLib::getAppDir( 'core' ).'/modules_admin/tools/settings.php' ); - $settings = new admin_core_tools_settings(); - $settings->makeRegistryShortcuts( $this->registry ); - - $settings->html = $this->registry->output->loadTemplate( 'cp_skin_tools', 'core' ); - ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_tools' ), 'core' ); - $settings->form_code = $settings->html->form_code = 'module=tools&section=settings'; - $settings->form_code_js = $settings->html->form_code_js = 'module=tools§ion=settings'; - - $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => $acc_number ), "conf_key='chat04_account_no'" ); - $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => '' ) , "conf_key='chat_account_no'" ); - - $settings->settingsRebuildCache(); - - $this->DB->update( 'core_sys_module', array( 'sys_module_position' => 1 ), "sys_module_key='parachat'" ); - $this->DB->update( 'core_sys_module', array( 'sys_module_position' => 2 ), "sys_module_key='addonchat'" ); - - $this->cache->rebuildCache( 'module_cache', 'global' ); - - //----------------------------------------- - // Show config - //----------------------------------------- - - $this->_chatConfig(); - } - - /** - * Show the configuration page - * - * @access private - * @return void [Outputs to screen] - */ - private function _chatConfig() - { - //----------------------------------------- - // Load libby-do-dah - //----------------------------------------- - - require_once( IPSLib::getAppDir( 'core' ).'/modules_admin/tools/settings.php' ); - $settings = new admin_core_tools_settings(); - $settings->makeRegistryShortcuts( $this->registry ); - - $settings->html = $this->registry->output->loadTemplate( 'cp_skin_tools', 'core' ); - ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_tools' ), 'core' ); - $settings->form_code = $settings->html->form_code = 'module=tools&section=settings'; - $settings->form_code_js = $settings->html->form_code_js = 'module=tools§ion=settings'; - - //----------------------------------------- - // Did we reset the component? - //----------------------------------------- - - if ( ! $this->settings['chat04_account_no'] ) - { - $this->_chatSplash(); - } - else - { - //----------------------------------------- - // Update version 6 or 7 - //----------------------------------------- - - if ( preg_match( "#^\d#", $this->settings['chat04_account_no'] ) ) - { - $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => 7 ), "conf_key='parachat_version'" ); - } - else - { - $this->DB->update( 'core_sys_conf_settings', array( 'conf_value' => 6 ), "conf_key='parachat_version'" ); - } - - $settings->settingsRebuildCache(); - } - - $this->request['conf_title_keyword'] = 'chat04'; - $settings->return_after_save = $this->settings['base_url'] . $this->form_code . '&do=chatsettings'; - - $settings->_viewSettings(); - } - -} \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/modules_admin/parachat/defaultSection.php b/upload/admin/applications_addon/ips/chat/modules_admin/parachat/defaultSection.php deleted file mode 100644 index ad69ec42..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_admin/parachat/defaultSection.php +++ /dev/null @@ -1,30 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -/** -* Very simply returns the default section if one is not -* passed in the URL -*/ - -$DEFAULT_SECTION = 'chat'; diff --git a/upload/admin/applications_addon/ips/chat/modules_admin/parachat/index.html b/upload/admin/applications_addon/ips/chat/modules_admin/parachat/index.html deleted file mode 100644 index 203e7ede..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_admin/parachat/index.html +++ /dev/null @@ -1 +0,0 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/modules_admin/parachat/xml/index.html b/upload/admin/applications_addon/ips/chat/modules_admin/parachat/xml/index.html deleted file mode 100644 index 203e7ede..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_admin/parachat/xml/index.html +++ /dev/null @@ -1 +0,0 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/modules_admin/parachat/xml/menu.xml b/upload/admin/applications_addon/ips/chat/modules_admin/parachat/xml/menu.xml deleted file mode 100644 index e8373aa1..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_admin/parachat/xml/menu.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Manage ParaChat - - - Manage ParaChat - chat - - - 0 - - - - - \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/modules_public/addonchat/chat.php b/upload/admin/applications_addon/ips/chat/modules_public/addonchat/chat.php deleted file mode 100644 index 7ce984a0..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_public/addonchat/chat.php +++ /dev/null @@ -1,136 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class public_chat_addonchat_chat extends ipsCommand -{ - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load HTML and LANG - //----------------------------------------- - - ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_chataddon' ) ); - - if ( ! $this->settings['chat_account_no'] ) - { - $this->registry->output->showError( 'no_chat_account_number', 1090 ); - } - - //----------------------------------------- - // Get extra settings - //----------------------------------------- - - $this->DB->build( array( 'select' => 'conf_key,conf_value,conf_default', 'from' => 'core_sys_conf_settings', 'where' => "conf_key LIKE 'chat%'" ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $value = $r['conf_value'] != "" ? $r['conf_value'] : $r['conf_default']; - - $this->settings[ $r['conf_key']] = $value ; - } - - //----------------------------------------- - // Can this group access chat? - //----------------------------------------- - - if( $this->settings['chat_access_groups'] ) - { - $access_groups = explode( ",", $this->settings['chat_access_groups'] ); - - $my_groups = array( $this->memberData['member_group_id'] ); - - if( $this->memberData['mgroup_others'] ) - { - $my_groups = array_merge( $my_groups, explode( ",", IPSText::cleanPermString( $this->memberData['mgroup_others'] ) ) ); - } - - $access_allowed = 0; - - foreach( $my_groups as $group_id ) - { - if( in_array( $group_id, $access_groups ) ) - { - $access_allowed = 1; - } - } - - if( !$access_allowed ) - { - $this->registry->output->showError( 'no_chat_access', 1091 ); - } - } - - //----------------------------------------- - // Got address? - //----------------------------------------- - - if ( ! $this->settings['chat_server_addr'] ) - { - $this->settings['chat_server_addr'] = ''; - } - - //----------------------------------------- - // Server - //----------------------------------------- - - $this->settings['chat_server_addr'] = str_replace( 'http://', '', $this->settings['chat_server_addr'] ); - - //----------------------------------------- - // Details - //----------------------------------------- - - $width = $this->settings['chat_width'] ? $this->settings['chat_width'] : 600; - $height = $this->settings['chat_height'] ? $this->settings['chat_height'] : 350; - $lang = $this->settings['chat_language'] ? $this->settings['chat_language'] : 'en'; - $user = ""; - $pass = ""; - - //----------------------------------------- - // Got ID? - //----------------------------------------- - - if ( $this->memberData['member_id'] ) - { - $user = $this->memberData['members_display_name']; - - $member = IPSMember::load( $this->memberData['email'] ); - $pass = $member['members_pass_hash']; - } - - $this->output .= $this->registry->getClass('output')->getTemplate('chatsigma')->chat_inline( $this->settings['chat_server_addr'], preg_replace( "/.+?\-(\d+)$/", "\\1", $this->settings['chat_account_no'] ), $lang, $width, $height, $user, $pass); - - $this->registry->output->addNavigation( $this->lang->words['live_chat'], '' ); - $this->registry->output->setTitle( $this->lang->words['live_chat'] ); - $this->registry->output->addContent( $this->output ); - $this->registry->output->sendOutput(); - } -} \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/modules_public/addonchat/defaultSection.php b/upload/admin/applications_addon/ips/chat/modules_public/addonchat/defaultSection.php deleted file mode 100644 index f8467a15..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_public/addonchat/defaultSection.php +++ /dev/null @@ -1,30 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -/** -* Very simply returns the default section if one is not -* passed in the URL -*/ - -$DEFAULT_SECTION = 'chat'; diff --git a/upload/admin/applications_addon/ips/chat/modules_public/addonchat/index.html b/upload/admin/applications_addon/ips/chat/modules_public/addonchat/index.html deleted file mode 100644 index 203e7ede..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_public/addonchat/index.html +++ /dev/null @@ -1 +0,0 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/modules_public/ajax/defaultSection.php b/upload/admin/applications_addon/ips/chat/modules_public/ajax/defaultSection.php deleted file mode 100644 index 8854a5d7..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_public/ajax/defaultSection.php +++ /dev/null @@ -1,30 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -/** -* Very simply returns the default section if one is not -* passed in the URL -*/ - -$DEFAULT_SECTION = 'update'; diff --git a/upload/admin/applications_addon/ips/chat/modules_public/ajax/update.php b/upload/admin/applications_addon/ips/chat/modules_public/ajax/update.php deleted file mode 100644 index b3978b25..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_public/ajax/update.php +++ /dev/null @@ -1,101 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class public_chat_ajax_update extends ipsAjaxCommand -{ - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Got sess ID and mem ID? - //----------------------------------------- - - if ( ! $this->member->getProperty('member_id') ) - { - $this->returnString( "no" ); - } - - //----------------------------------------- - // Two hours of not doing anything... - //----------------------------------------- - - if ( $this->member->getProperty('last_activity') < ( time() - 7200 ) ) - { - $this->returnString( "no" ); - } - - $tmp_cache = $this->cache->getCache('chatting'); - $new_cache = array(); - - //----------------------------------------- - // Goforit - //----------------------------------------- - - if ( is_array( $tmp_cache ) and count( $tmp_cache ) ) - { - foreach( $tmp_cache as $id => $data ) - { - //----------------------------------------- - // Not hit in 2 mins? - //----------------------------------------- - - if ( $data['updated'] < ( time() - 120 ) ) - { - continue; - } - - if ( $id == $this->member->getProperty('member_id') ) - { - continue; - } - - $new_cache[ $id ] = $data; - } - } - - //----------------------------------------- - // Add in us - //----------------------------------------- - - $new_cache[ $this->member->getProperty('member_id') ] = array( 'updated' => time(), 'name' => $this->member->getProperty('members_display_name') ); - - //----------------------------------------- - // Update cache - //----------------------------------------- - - $this->cache->setCache( 'chatting', $new_cache, array( 'donow' => 1, 'array' => 1 ) ); - - //----------------------------------------- - // Something to return - //----------------------------------------- - - $this->returnString( "ok" ); - } -} \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/modules_public/index.html b/upload/admin/applications_addon/ips/chat/modules_public/index.html deleted file mode 100644 index 203e7ede..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_public/index.html +++ /dev/null @@ -1 +0,0 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/modules_public/parachat/chat.php b/upload/admin/applications_addon/ips/chat/modules_public/parachat/chat.php deleted file mode 100644 index 87b58c68..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_public/parachat/chat.php +++ /dev/null @@ -1,273 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'."; - exit(); -} - -class public_chat_parachat_chat extends ipsCommand -{ - /** - * Main class entry point - * - * @access public - * @param object ipsRegistry reference - * @return void [Outputs to screen] - */ - public function doExecute( ipsRegistry $registry ) - { - //----------------------------------------- - // Load HTML and LANG - //----------------------------------------- - - ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_chatpara' ) ); - - if ( ! $this->settings['chat04_account_no'] ) - { - $this->registry->output->showError( 'no_chat_account_number', 1092 ); - } - - //----------------------------------------- - // Get extra settings - //----------------------------------------- - - $this->DB->build( array( 'select' => 'conf_key,conf_value,conf_default', 'from' => 'core_sys_conf_settings', 'where' => "conf_key LIKE 'chat04%'" ) ); - $this->DB->execute(); - - while( $r = $this->DB->fetch() ) - { - $value = $r['conf_value'] != "" ? $r['conf_value'] : $r['conf_default']; - - $this->settings[ $r['conf_key']] = $value ; - } - - if( $this->settings['chat04_access_groups'] ) - { - $access_groups = explode( ",", $this->settings['chat04_access_groups'] ); - - $my_groups = array( $this->memberData['member_group_id'] ); - - if( $this->memberData['mgroup_others'] ) - { - $my_groups = array_merge( $my_groups, explode( ",", IPSText::cleanPermString( $this->memberData['mgroup_others'] ) ) ); - } - - $access_allowed = 0; - - foreach( $my_groups as $group_id ) - { - if( in_array( $group_id, $access_groups ) ) - { - $access_allowed = 1; - } - } - - if( !$access_allowed ) - { - $this->registry->output->showError( 'no_chat_access', 1093 ); - } - } - - //----------------------------------------- - // Width and Height - //----------------------------------------- - - $width = $this->settings['chat04_width'] ? $this->settings['chat04_width'] : 600; - $height = $this->settings['chat04_height'] ? $this->settings['chat04_height'] : 350; - - //----------------------------------------- - // v6 < specifics - //----------------------------------------- - - if ( intval($this->settings['parachat_version']) < 7 ) - { - //----------------------------------------- - // Got room? - //----------------------------------------- - - if ( ! $this->settings['chat04_default_room'] ) - { - $this->registry->output->showError( 'no_chat_default_room', 1094 ); - } - - //----------------------------------------- - // Got service type? - //----------------------------------------- - - if ( ! $this->settings['chat04_servicetype'] ) - { - $this->registry->output->showError( 'no_chat_service_type', 1095 ); - } - - //----------------------------------------- - // Make sure it has # - //----------------------------------------- - - $this->settings[ 'chat04_default_room'] = '#' . str_replace( '#', '', $this->settings['chat04_default_room'] ); - - //----------------------------------------- - // Get service library - //----------------------------------------- - - $CHAT_SERVER = array( - 'advanced' => '', - 'premium' => '', - ); - - $CHAT_FOLDER = array( - 'advanced' => 'pca', - 'premium' => 'pcp', - ); - - $CHAT_ONLINELIST = array( - 'advanced' => 'cgi-bin/userlist/advanced/group.cgi?group=', - 'premium' => 'cgi-bin/userlist/premium/group.cgi?group=', - ); - - $server = $this->settings['parachat_codebase_url'] ? $this->settings['parachat_codebase_url'] : 'http://'. $CHAT_SERVER[ $this->settings['chat04_servicetype'] ].'/'. $CHAT_FOLDER[ $this->settings['chat04_servicetype'] ]; - - //----------------------------------------- - // Lang? - //----------------------------------------- - - $this->settings[ 'chat04_default_lang'] = ( $this->settings['chat04_default_lang'] == "" ? 'english.conf' : $this->settings['chat04_default_lang'] ); - - //----------------------------------------- - // Text mode - //----------------------------------------- - - $this->settings[ 'chat04_plainmode'] = ( $this->settings['chat04_plainmode'] ? 'PlainText' : 'MegaText' ); - - //----------------------------------------- - // Style options.. - //----------------------------------------- - - $style = array( - 'applet_bg' => $this->settings['chat04_style_applet_bg'] ? str_replace( '#', '', $this->settings['chat04_style_applet_bg'] ) : 'BCD0ED', - 'applet_fg' => $this->settings['chat04_style_applet_fg'] ? str_replace( '#', '', $this->settings['chat04_style_applet_fg'] ) : '345487', - 'window_bg' => $this->settings['chat04_style_window_bg'] ? str_replace( '#', '', $this->settings['chat04_style_window_bg'] ) : 'F5F9FD', - 'window_fg' => $this->settings['chat04_style_window_fg'] ? str_replace( '#', '', $this->settings['chat04_style_window_fg'] ) : '345487', - 'font_size' => $this->settings['chat04_style_font_size'] ? str_replace( '#', '', $this->settings['chat04_style_font_size'] ) : '11', - ); - - //----------------------------------------- - // Show chat.. - //----------------------------------------- - - $template = 'legacy'; - - $options = array( - 'server' => $server, - 'account' => $this->settings['chat04_account_no'], - 'room' => $this->settings['chat04_default_room'], - 'width' => $width, - 'height' => $height, - 'language' => $this->settings['chat04_default_lang'], - 'plainmode' => $this->settings['chat04_plainmode'], - 'style' => $style, - ); - } - else - { - //----------------------------------------- - // Show chat.. - //----------------------------------------- - - $server = $this->settings['parachat_codebase_url'] ? $this->settings['parachat_codebase_url'] : ""; - $room = $this->settings['chat04_default_room'] ? $this->settings['chat04_default_room'] : "Lobby"; - - if ( strstr( strtolower( $this->settings['chat04_default_room'] ), 'lobby_' ) ) - { - $room = 'Lobby'; - } - - $template = 'current'; - - $options = array( - 'server' => $server, - 'account' => $this->settings['chat04_account_no'], - 'room' => $room, - 'width' => $width, - 'height' => $height, - ); - } - - $this->output .= $this->registry->getClass('output')->getTemplate('chatpara')->chat_inline( $template, $options ); - - //----------------------------------------- - // Show chat.. - //----------------------------------------- - - $this->output = str_replace( '' , $this->_autoLogin(), $this->output ); - $this->output = str_replace( '', $this->settings['chat04_customparams'], $this->output ); - - $this->registry->output->addNavigation( $this->lang->words['live_chat'], '' ); - $this->registry->output->setTitle( $this->lang->words['live_chat'] ); - $this->registry->output->addContent( $this->output ); - $this->registry->output->sendOutput(); - } - - /** - * Autologin - * - * @access private - * @return string HTML autologin content - */ - private function _autoLogin() - { - if ( $this->memberData['member_id'] ) - { - $member = IPSMember::load( $this->memberData['email'] ); - $pass = $member['members_pass_hash']; - - $tmpname = $this->memberData['members_display_name']; - $namearray = array(); - $name = ""; - - //----------------------------------------- - // Okay, we need to safe format this name - //----------------------------------------- - - $tmpname = preg_replace( "#\s#", "_", $tmpname ); - $tmpname = preg_replace( "#(?:[^\w\d\_])#is", "-", $tmpname ); - - if ( intval( $this->settings['parachat_version'] ) > 6 ) - { - $return =" - - memberData['member_id'] . "")."\">\n"; - - } - else - { - $return = "\n". - "\n". - "\n". - "\n"; - } - - return $return; - } - else - { - return ''; - } - } -} \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/modules_public/parachat/defaultSection.php b/upload/admin/applications_addon/ips/chat/modules_public/parachat/defaultSection.php deleted file mode 100644 index f8467a15..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_public/parachat/defaultSection.php +++ /dev/null @@ -1,30 +0,0 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -/** -* Very simply returns the default section if one is not -* passed in the URL -*/ - -$DEFAULT_SECTION = 'chat'; diff --git a/upload/admin/applications_addon/ips/chat/modules_public/parachat/index.html b/upload/admin/applications_addon/ips/chat/modules_public/parachat/index.html deleted file mode 100644 index 203e7ede..00000000 --- a/upload/admin/applications_addon/ips/chat/modules_public/parachat/index.html +++ /dev/null @@ -1 +0,0 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/setup/index.html b/upload/admin/applications_addon/ips/chat/setup/index.html deleted file mode 100644 index 203e7ede..00000000 --- a/upload/admin/applications_addon/ips/chat/setup/index.html +++ /dev/null @@ -1 +0,0 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/skin_cp/cp_skin_chat.php b/upload/admin/applications_addon/ips/chat/skin_cp/cp_skin_chat.php deleted file mode 100644 index 64a32684..00000000 --- a/upload/admin/applications_addon/ips/chat/skin_cp/cp_skin_chat.php +++ /dev/null @@ -1,97 +0,0 @@ - -

      {$this->lang->words['para_help_title']}

      - - -
      form_code}&do=chatsave' method='post'> - - - - - -
      - {$this->lang->words['ordered_ipchat']} - - - {$this->lang->words['free_evaluation']}
      -
      - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Enter addonchat key - * - * @access public - * @return string HTML - */ -public function addonchatKey() { - -$IPBHTML = ""; -//--starthtml--// -$IPBHTML .= << -

      {$this->lang->words['addon_help_title']}

      - - -
      form_code}&do=chatsave' method='post'> - - - - - - -
      {$this->lang->words['own_addonchat']}
      -
      -EOF; - -//--endhtml--// -return $IPBHTML; -} - - - -} diff --git a/upload/admin/applications_addon/ips/chat/skin_cp/index.html b/upload/admin/applications_addon/ips/chat/skin_cp/index.html deleted file mode 100644 index 203e7ede..00000000 --- a/upload/admin/applications_addon/ips/chat/skin_cp/index.html +++ /dev/null @@ -1 +0,0 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/xml/admin_chat_language_pack.xml b/upload/admin/applications_addon/ips/chat/xml/admin_chat_language_pack.xml deleted file mode 100644 index 5e368ee9..00000000 --- a/upload/admin/applications_addon/ips/chat/xml/admin_chat_language_pack.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - chat - admin_chat - enter_chatid - enter your AddonChat Account ID here... - - 30012 - - 0 - - - chat - admin_chat - free_evaluation - Free Instant Evaluation - - 30012 - - 0 - - - chat - admin_chat - ordered_ipchat - Ordered IP Chat? - - 30012 - - 0 - - - chat - admin_chat - enter_siteid - enter your Site ID here... - - 30012 - - 0 - - - chat - admin_chat - btn_continue - Continue... - - 30012 - - 0 - - - chat - admin_chat - own_addonchat - Own AddOn Chat? - - 30012 - - 0 - - - chat - admin_chat - para_help_title - Invision Power Chat (ParaChat) - - 30012 - - 0 - - - chat - admin_chat - para_invalid_key - Sorry, that is not a valid IP Chat account number - - 30012 - - 0 - - - chat - admin_chat - addon_invalid_key - Sorry, that is not a valid IP Chat account number - - 30012 - - 0 - - - chat - admin_chat - addon_help_title - Invision Power Chat (AddonChat) - - 30012 - - 0 - - - diff --git a/upload/admin/applications_addon/ips/chat/xml/chat_lofi_templates.xml b/upload/admin/applications_addon/ips/chat/xml/chat_lofi_templates.xml deleted file mode 100644 index 96364a83..00000000 --- a/upload/admin/applications_addon/ips/chat/xml/chat_lofi_templates.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - diff --git a/upload/admin/applications_addon/ips/chat/xml/chat_modules.xml b/upload/admin/applications_addon/ips/chat/xml/chat_modules.xml deleted file mode 100644 index 2154d03e..00000000 --- a/upload/admin/applications_addon/ips/chat/xml/chat_modules.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - ParaChat - chat - parachat - Use the ParaChat chat service - 1.0.0 - - 0 - 1 - - - 0 - 0 - - - Addon Chat - chat - addonchat - Use the Addon Chat chat service - 1.0.0 - - 0 - 1 - - - 0 - 0 - - - ParaChat - chat - parachat - - 1.0.0 - - 1 - 1 - - - 0 - 1 - - - AddonChat - chat - addonchat - - 1.0.0 - - 1 - 1 - - - 0 - 1 - - - AddonChat - chat - addonchat - - 1.0.0 - - 1 - 1 - - - 0 - 1 - - - diff --git a/upload/admin/applications_addon/ips/chat/xml/chat_root_css.xml b/upload/admin/applications_addon/ips/chat/xml/chat_root_css.xml deleted file mode 100644 index e3fc499b..00000000 --- a/upload/admin/applications_addon/ips/chat/xml/chat_root_css.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - 0 - 1260269066 - ipchat - #parachat, #parachat_help -{ - background: #eef3f8; - padding: 4px; -} - -#parachat { - padding-top: 10px; - padding-bottom: 10px; - text-align: center; -} - -#parachat_help { - -} - 1 - chat - 1 - - 0 - - 0 - 0 - - diff --git a/upload/admin/applications_addon/ips/chat/xml/chat_root_templates.xml b/upload/admin/applications_addon/ips/chat/xml/chat_root_templates.xml deleted file mode 100644 index 56a5c610..00000000 --- a/upload/admin/applications_addon/ips/chat/xml/chat_root_templates.xml +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - - - diff --git a/upload/admin/applications_addon/ips/chat/xml/chat_settings.xml b/upload/admin/applications_addon/ips/chat/xml/chat_settings.xml deleted file mode 100644 index 132f0aea..00000000 --- a/upload/admin/applications_addon/ips/chat/xml/chat_settings.xml +++ /dev/null @@ -1,667 +0,0 @@ - - - - - 1 - chat - AddonChat Settings - This will allow you to customize your AddonChat chat room - IPS Apps - chat - 1 - - - Chat Room Account Number? - Removing this number will remove all links / chat functionality within IPB. - - 51 - input - chat_account_no - - - - 1 - 1 - Account Specifics - 0 - 1 - - chat - 0 - - - Chat Room Server? - ]]> - 51 - input - chat_server_addr - - - - 1 - 2 - - 1 - 1 - - chat - 0 - - - - - 51 - yes_no - chat_who_on - 1 - - - 1 - 3 - - 0 - 1 - - chat - 0 - - - - - 51 - yes_no - chat_hide_whoschatting - 1 - - - 1 - 4 - - 0 - 1 - - chat - 0 - - - Chat Room Dimensions (WIDTH)? - - 51 - input - chat_width - 600 - - - 1 - 5 - Showing the chat room - 0 - 1 - - chat - 0 - - - Chat Room Dimensions (HEIGHT)? - - 51 - input - chat_height - 350 - - - 1 - 6 - - 0 - 1 - - chat - 0 - - - Default Chat Room Interface Language? - - 51 - dropdown - chat_language - en - en=English -ar=Arabic -de=German -es=Spanish -fr=French -hr=Croation -it=Italian -iw=Hebrew -nl=Dutch -pl=Polish -pt=Portuguese - - 1 - 7 - - 1 - 1 - - chat - 0 - - - Allow bbcode and color formatting - Do you wish to allow bbcode and color formatting? - 51 - yes_no - chat_allow_bbcode - 1 - - - 1 - 8 - - 0 - 1 - - chat - 0 - - - Allow chat access to these groups - You may select more than one - 51 - multi - chat_access_groups - - #show_groups# - - 1 - 9 - Access Permissions - 0 - 1 - - chat - 0 - - - Allow moderator access to these groups - You may select more than one - please choose carefully! - 51 - multi - chat_mod_groups - - #show_groups# - - 1 - 10 - - 0 - 1 - - chat - 0 - - - Allow admin access to these groups - You may select more than one - please choose carefully! - 51 - multi - chat_admin_groups - - #show_groups# - - 1 - 11 - - 1 - 1 - - chat - 0 - - - 1 - chat04 - ParaChat Settings - This will allow you to customize your Invision Chat integration settings for the new 2004 edition - IPS Apps - chat - 1 - - - Chat Site ID / Account No. - If you are using Parachat v8 or greater, enter your site ID (1234, for example). If you are using an older version of Parachat please enter your group number (ip0000, for example) - 11 - input - chat04_account_no - - - - 1 - 1 - Account Specifics - 0 - 1 - - chat04 - 0 - - - Custom Applet Codebase URL - This should be left blank during an evaluation. - 11 - input - parachat_codebase_url - - - - 1 - 2 - - 0 - 1 - - chat04 - 0 - - - Chat Room Version - - 11 - dropdown - parachat_version - 6 - 6=Parachat v6 or below -7=Parachat v8 or greater - - 1 - 3 - - 1 - 1 - - chat04 - 0 - - - - - 11 - yes_no - chat04_who_on - 1 - - - 1 - 4 - - 0 - 1 - - chat04 - 0 - - - - - 11 - yes_no - chat04_hide_whoschatting - 1 - - - 1 - 5 - - 1 - 1 - - chat04 - 0 - - - Chat Room Dimensions (WIDTH)? - - 11 - input - chat04_width - 600 - - - 1 - 8 - Showing the chat room - 0 - 1 - - chat04 - 0 - - - Chat Room Dimensions (HEIGHT)? - - 11 - input - chat04_height - 350 - - - 1 - 9 - - 0 - 1 - - chat04 - 0 - - - Load the chat room in...? - - 11 - dropdown - chat04_display - self - self=Normal IPB Page - - 1 - 12 - - 0 - 1 - - chat04 - 0 - - - Additional PARAM information - -<param name="cmd.BeepEnter" value="true"> -
      <param name="cmd.BeepLeave" value="true"> -
      Please refer to the Invision Chat documentation for more info.]]>
      - 11 - textarea - chat04_customparams - - - - 1 - 13 - - 0 - 0 - - chat04 - 0 -
      - - Chat Room Pop-up Window Padding? (in px) - Allows window to open without scrollbars - 11 - input - chat04_poppad - 50 - - - 1 - 14 - - 1 - 1 - - chat04 - 0 - - - Allow chat access to these groups - You may select more than one - 11 - multi - chat04_access_groups - - #show_groups# - - 1 - 25 - Access Permissions - 1 - 1 - - chat04 - 0 - - - Default Chat Room Language - This is the default language used for the chat user inteface (buttons and labels, etc) - 11 - dropdown - chat04_default_lang - english.conf - english.conf=English -spanish.conf=Spanish -portuguese.conf=Portuguese -italian.conf=Italian -french.conf=French -german.conf=German - - 1 - 99 - Version 6 Settings (Not required for v8) - 0 - 0 - - chat04 - 0 - - - Chat Room Type - This is the type of chat service you purchased - 11 - dropdown - chat04_servicetype - - advanced=Advanced -premium=Premium - - 1 - 100 - - 0 - 1 - - chat04 - 0 - - - Default Chat Room - This is the room that your chat users will be logged into first - 11 - input - chat04_default_room - - - - 1 - 101 - - 0 - 1 - - chat04 - 0 - - - - - 11 - yes_no - chat04_plainmode - 0 - - - 1 - 102 - - 0 - 0 - - chat04 - 0 - - - Applet: Background Color - To change your chat applet background color select any RGB value. - 11 - input - chat04_style_applet_bg - #BCD0ED - - - 1 - 130 - - 0 - 0 - - chat04 - 0 - - - Applet: Foreground Color - To change your chat applet foreground color select any RGB value. - 11 - input - chat04_style_applet_fg - #345487 - - - 1 - 131 - - 0 - 0 - - chat04 - 0 - - - Chat Window: Background Color - To change your chat window background color select any RGB value. - 11 - input - chat04_style_window_bg - #F5F9FD - - - 1 - 132 - - 0 - 0 - - chat04 - 0 - - - Chat Window: Foreground Color - To change your chat window foreground color select any RGB value. - 11 - input - chat04_style_window_fg - #345487 - - - 1 - 133 - - 0 - 0 - - chat04 - 0 - - - Chat Room Font Size - - 11 - input - chat04_style_font_size - 10 - - - 1 - 135 - - 1 - 0 - - chat04 - 0 - -
      -
      diff --git a/upload/admin/applications_addon/ips/chat/xml/chat_xmlskin_templates.xml b/upload/admin/applications_addon/ips/chat/xml/chat_xmlskin_templates.xml deleted file mode 100644 index 9c22fc59..00000000 --- a/upload/admin/applications_addon/ips/chat/xml/chat_xmlskin_templates.xml +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - - diff --git a/upload/admin/applications_addon/ips/chat/xml/hooks.xml b/upload/admin/applications_addon/ips/chat/xml/hooks.xml deleted file mode 100644 index c26a9087..00000000 --- a/upload/admin/applications_addon/ips/chat/xml/hooks.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - board_whos_chatting.xml - 0 - - \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/xml/hooks/board_whos_chatting.xml b/upload/admin/applications_addon/ips/chat/xml/hooks/board_whos_chatting.xml deleted file mode 100644 index 5c85a082..00000000 --- a/upload/admin/applications_addon/ips/chat/xml/hooks/board_whos_chatting.xml +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - Shows who is in chat if installed and enabled - Invision Power Services, Inc - dont@mail.me - http:// - - - 1.0.0 - 10000 - - chat_whos_chatting - - - - - boardIndexWhosChatting.php - templateHooks - boardIndexWhosChatting - - registry = ipsRegistry::instance(); - $this->DB = $this->registry->DB(); - $this->settings =& $this->registry->fetchSettings(); - $this->request =& $this->registry->fetchRequest(); - $this->lang = $this->registry->getClass('class_localization'); - $this->member = $this->registry->member(); - $this->memberData =& $this->registry->member()->fetchMemberData(); - $this->cache = $this->registry->cache(); - $this->caches =& $this->registry->cache()->fetchCaches(); - } - - public function getOutput() - { - //----------------------------------------- - // INIT - //----------------------------------------- - - $member_ids = array(); - $to_load = array(); - - //----------------------------------------- - // Check module/app - //----------------------------------------- - - $module = ''; - - if( !IPSLib::appIsInstalled('chat') ) - { - return ''; - } - - if( IPSLib::moduleIsEnabled( 'addonchat', 'chat' ) ) - { - $_hide_whoschatting = $this->settings['chat_hide_whoschatting']; - $_who_on = $this->settings['chat_who_on']; - } - else if( IPSLib::moduleIsEnabled( 'parachat', 'chat' ) ) - { - $_hide_whoschatting = $this->settings['chat04_hide_whoschatting']; - $_who_on = $this->settings['chat04_who_on']; - } - else - { - return ''; - } - - //----------------------------------------- - // Check - //----------------------------------------- - - if ( ! $_who_on ) - { - return; - } - - //----------------------------------------- - // Sort and show :D - //----------------------------------------- - - if ( is_array( $this->caches['chatting'] ) AND count( $this->caches['chatting'] ) ) - { - foreach( $this->caches['chatting'] as $id => $data ) - { - if ( $data['updated'] < ( time() - 120 ) ) - { - continue; - } - - $to_load[ $id ] = $id; - } - } - - //----------------------------------------- - // Got owt? - //----------------------------------------- - - if ( count($to_load) ) - { - $this->DB->build( array( 'select' => 'm.member_id, m.members_display_name, m.member_group_id, m.members_seo_name', - 'from' => array( 'members' => 'm' ), - 'where' => "m.member_id IN(" . implode( ",", $to_load ) . ")", - 'add_join' => array( 0 => array( 'select' => 's.login_type, s.current_appcomponent', - 'from' => array( 'sessions' => 's' ), - 'where' => 's.member_id=m.member_id', - 'type' => 'left' ) ), - 'order' => 'm.members_display_name' ) ); - $this->DB->execute(); - - while ( $m = $this->DB->fetch() ) - { - if( $m['member_id'] == $this->memberData['member_id'] ) - { - continue; - } - - $m['members_display_name'] = IPSLib::makeNameFormatted( $m['members_display_name'], $m['member_group_id'] ); - - if( $m['login_type'] ) - { - if ( $this->memberData['g_access_cp'] and ($this->settings['disable_admin_anon'] != 1) ) - { - $member_ids[] = "buildSEOUrl( "showuser={$m['member_id']}", 'public', $m['seo_name'], 'showuser' ) . "'>{$m['members_display_name']}"; - } - } - else - { - $member_ids[] = "buildSEOUrl( "showuser={$m['member_id']}", 'public', $m['seo_name'], 'showuser' ) . "'>{$m['members_display_name']}"; - } - } - } - - //----------------------------------------- - // Got owt? - //----------------------------------------- - - if ( count( $member_ids ) ) - { - $this->html = $this->registry->getClass('output')->getTemplate('boards')->whoschatting_show( intval(count($member_ids)), $member_ids ); - } - else - { - if ( ! $_hide_whoschatting ) - { - $this->html = $this->registry->getClass('output')->getTemplate('boards')->whoschatting_empty(); - } - } - - return $this->html; - } -}]]> - - - - - - - - - - - - - diff --git a/upload/admin/applications_addon/ips/chat/xml/index.html b/upload/admin/applications_addon/ips/chat/xml/index.html deleted file mode 100644 index 203e7ede..00000000 --- a/upload/admin/applications_addon/ips/chat/xml/index.html +++ /dev/null @@ -1 +0,0 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/xml/information.xml b/upload/admin/applications_addon/ips/chat/xml/information.xml deleted file mode 100644 index de3b8178..00000000 --- a/upload/admin/applications_addon/ips/chat/xml/information.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - Chat Services - Chat - Invision Power Services, Inc. - - 08198fd56e656d80c69841a289166b2f - 1 - - - - - \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/chat/xml/public_chat_language_pack.xml b/upload/admin/applications_addon/ips/chat/xml/public_chat_language_pack.xml deleted file mode 100644 index c3cf3fb8..00000000 --- a/upload/admin/applications_addon/ips/chat/xml/public_chat_language_pack.xml +++ /dev/null @@ -1,205 +0,0 @@ - - - - - chat - public_chataddon - sigmachat_chatsigma - 1 - - 30012 - - 0 - - - chat - public_chataddon - sigmachat_help_text - -
      - * Microsoft Virtual Machine (for MSIE)
      - * Sun Java™ Plugin (for Netscape, Opera, MSIE, etc..)
      -
      - Older versions of Netscape (on certain platforms) such as v4.08, and v4.7x may not run the software. We strongly recommend upgrading to a newer version of Netscape (v6.xx or better) if this is the case. Certain browsers running on Macintosh platforms are not capable of running our software due to problems outside of our control. As WebTV does not support Java™, WebTV users will not be able to access the live chat rooms.
      -
      - Users behind firewalls may need to inform their local IT/network administrator to allow TCP connections on ports 9000-9009 at client.invisionchat.com.
      -
      - AOL Members: Some users have reported that the built-in AOL browser has difficulty connecting to our service, or does not load colors/emoticons properly. To resolve this, minimize your AOL connection, and use the Internet Explorer browser that came with your computer to access our chat rooms.
      -
      ]]>
      - - 30012 - - 0 -
      - - chat - public_chataddon - chat_online - Chatting in live chat - - 30012 - - 0 - - - chat - public_chataddon - sigmachat_help - Live Chat Help - - 30012 - - 0 - - - chat - public_chataddon - sigmachat_title - Live Chat Main Window - - 30012 - - 0 - - - chat - public_chatpara - chat_online - Chatting in live chat - - 30012 - - 0 - - - chat - public_chatpara - para_err_java_start - Sorry, your browser is not Java enabled, please visit - - 30012 - - 0 - - - chat - public_chatpara - para_err_java_end - our Java support pages - - 30012 - - 0 - - - chat - public_chatpara - parachat_help_text - -
      - * Microsoft Virtual Machine (for MSIE)
      - * Sun Java™ Plugin (for Netscape, Opera, MSIE, etc..)
      -
      - Older versions of Netscape (on certain platforms) such as v4.08, and v4.7x may not run the software. We strongly recommend upgrading to a newer version of Netscape (v6.xx or better) if this is the case. Certain browsers running on Macintosh platforms are not capable of running our software due to problems outside of our control. As WebTV does not support Java™, WebTV users will not be able to access the live chat rooms.
      -
      - Users behind firewalls may need to inform their local IT/network administrator to allow TCP connections on ports 9000-9009 at client.invisionchat.com.
      -
      - AOL Members: Some users have reported that the built-in AOL browser has difficulty connecting to our service, or does not load colors/emoticons properly. To resolve this, minimize your AOL connection, and use the Internet Explorer browser that came with your computer to access our chat rooms.
      -
      ]]>
      - - 30012 - - 0 -
      - - chat - public_chatpara - parachat_chatpara - 1 - - 30012 - - 0 - - - chat - public_chatpara - parachat_help - Live Chat Help - - 30012 - - 0 - - - chat - public_chatpara - parachat_title - Live Chat Main Window - - 30012 - - 0 - - - chat - public_chatsigma - sigmachat_title - Live Chat Main Window - - 30012 - - 0 - - - chat - public_chatsigma - sigmachat_help - Live Chat Help - - 30012 - - 0 - - - chat - public_chatsigma - sigmachat_online - Chatting in live chat - - 30012 - - 0 - - - chat - public_chatsigma - sigmachat_help_text - -
      - * Microsoft Virtual Machine (for MSIE)
      - * Sun Java™ Plugin (for Netscape, Opera, MSIE, etc..)
      -
      - Older versions of Netscape (on certain platforms) such as v4.08, and v4.7x may not run the software. We strongly recommend upgrading to a newer version of Netscape (v6.xx or better) if this is the case. Certain browsers running on Macintosh platforms are not capable of running our software due to problems outside of our control. As WebTV does not support Java™, WebTV users will not be able to access the live chat rooms.
      -
      - Users behind firewalls may need to inform their local IT/network administrator to allow TCP connections on ports 9000-9009 at client.invisionchat.com.
      -
      - AOL Members: Some users have reported that the built-in AOL browser has difficulty connecting to our service, or does not load colors/emoticons properly. To resolve this, minimize your AOL connection, and use the Internet Explorer browser that came with your computer to access our chat rooms.
      -
      ]]>
      - - 30012 - - 0 -
      - - chat - public_chatsigma - sigmachat_chatsigma - 1 - - 30012 - - 0 - -
      -
      diff --git a/upload/admin/applications_addon/ips/chat/xml/versions.xml b/upload/admin/applications_addon/ips/chat/xml/versions.xml deleted file mode 100644 index b740c4dd..00000000 --- a/upload/admin/applications_addon/ips/chat/xml/versions.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - 3.0.5 - 30012 - - \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/index.html b/upload/admin/applications_addon/ips/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/index.html +++ b/upload/admin/applications_addon/ips/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/portal/extensions/coreExtensions.php b/upload/admin/applications_addon/ips/portal/extensions/coreExtensions.php index d9e16ca4..aa6f64e4 100644 --- a/upload/admin/applications_addon/ips/portal/extensions/coreExtensions.php +++ b/upload/admin/applications_addon/ips/portal/extensions/coreExtensions.php @@ -1,77 +1,79 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -class publicSessions__portal -{ - /** - * Return session variables for this application - * - * current_appcomponent, current_module and current_section are automatically - * stored. This function allows you to add specific variables in. - * - * @access public - * @author Matt Mecham - * @return array - */ - public function getSessionVariables() - { - return array(); - } - - - /** - * Parse/format the online list data for the records - * - * @access public - * @author Brandon Farber - * @param array Online list rows to check against - * @return array Online list rows parsed - */ - public function parseOnlineEntries( $rows ) - { - if( !is_array($rows) OR !count($rows) ) - { - return $rows; - } - - $final = array(); - - //----------------------------------------- - // Extract the topic/forum data - //----------------------------------------- - - foreach( $rows as $row ) - { - if( $row['current_appcomponent'] == 'portal' ) - { - $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_portal']; - } - - $final[ $row['id'] ] = $row; - } - - return $final; - } + + * Invision Power Services + * IP.Board v3.1.4 + * Library: Handle public session data + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Portal + * @link http://www.invisionpower.com + * @since 12th March 2002 + * @version $Revision: 5713 $ + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

      Incorrect access

      You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +class publicSessions__portal +{ + /** + * Return session variables for this application + * + * current_appcomponent, current_module and current_section are automatically + * stored. This function allows you to add specific variables in. + * + * @access public + * @author Matt Mecham + * @return array + */ + public function getSessionVariables() + { + return array(); + } + + + /** + * Parse/format the online list data for the records + * + * @access public + * @author Brandon Farber + * @param array Online list rows to check against + * @return array Online list rows parsed + */ + public function parseOnlineEntries( $rows ) + { + if( !is_array($rows) OR !count($rows) ) + { + return $rows; + } + + $final = array(); + + //----------------------------------------- + // Extract the topic/forum data + //----------------------------------------- + + foreach( $rows as $row ) + { + if( $row['current_appcomponent'] == 'portal' ) + { + $row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_portal']; + } + + $final[ $row['id'] ] = $row; + } + + return $final; + } } \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/portal/extensions/coreVariables.php b/upload/admin/applications_addon/ips/portal/extensions/coreVariables.php index 9e992d76..d16d304f 100644 --- a/upload/admin/applications_addon/ips/portal/extensions/coreVariables.php +++ b/upload/admin/applications_addon/ips/portal/extensions/coreVariables.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Core variables for portal - * Last Updated: $LastChangedDate: 2009-12-07 21:57:46 -0500 (Mon, 07 Dec 2009) $ + * Last Updated: $LastChangedDate: 2010-10-05 21:26:08 -0400 (Tue, 05 Oct 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Portal - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 27th January 2004 - * @version $Rev: 5529 $ + * @version $Rev: 6945 $ * */ @@ -41,11 +43,14 @@ if( ! $_REQUEST['module'] AND $_REQUEST['app'] == 'portal' ) $_LOAD = array(); -$_LOAD['portal'] = 1; -$_LOAD['emoticons'] = 1; -$_LOAD['bbcode'] = 1; -$_LOAD['badwords'] = 1; -$_LOAD['calendars'] = 1; +$_LOAD['portal'] = 1; +$_LOAD['emoticons'] = 1; +$_LOAD['bbcode'] = 1; +$_LOAD['badwords'] = 1; +$_LOAD['calendars'] = 1; +$_LOAD['ranks'] = 1; +$_LOAD['reputation_levels'] = 1; +$_LOAD['attachtypes'] = 1; $CACHE['portal'] = array( 'array' => 1, diff --git a/upload/admin/applications_addon/ips/portal/extensions/index.html b/upload/admin/applications_addon/ips/portal/extensions/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/portal/extensions/index.html +++ b/upload/admin/applications_addon/ips/portal/extensions/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/portal/extensions/portalPlugins/index.html b/upload/admin/applications_addon/ips/portal/extensions/portalPlugins/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/portal/extensions/portalPlugins/index.html +++ b/upload/admin/applications_addon/ips/portal/extensions/portalPlugins/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/portal/extensions/portalPlugins/portal-cfg.php b/upload/admin/applications_addon/ips/portal/extensions/portalPlugins/portal-cfg.php index a8162f4c..86e1de9f 100644 --- a/upload/admin/applications_addon/ips/portal/extensions/portalPlugins/portal-cfg.php +++ b/upload/admin/applications_addon/ips/portal/extensions/portalPlugins/portal-cfg.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Portal plugin: portal - * Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Portal - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 1st march 2002 - * @version $Revision: 4948 $ + * @version $Revision: 5713 $ * */ diff --git a/upload/admin/applications_addon/ips/portal/extensions/portalPlugins/portal.php b/upload/admin/applications_addon/ips/portal/extensions/portalPlugins/portal.php index 06c412e4..8f307868 100644 --- a/upload/admin/applications_addon/ips/portal/extensions/portalPlugins/portal.php +++ b/upload/admin/applications_addon/ips/portal/extensions/portalPlugins/portal.php @@ -1,20 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Portal plugin: portal - * Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $Date: 2010-10-22 06:13:38 -0400 (Fri, 22 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Portal - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 1st march 2002 - * @version $Revision: 3887 $ - * + * @version $Revision: 7016 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -28,7 +28,6 @@ class ppi_portal extends public_portal_portal_portal /** * Initialize module * - * @access public * @return void */ public function init() @@ -38,7 +37,6 @@ class ppi_portal extends public_portal_portal_portal /** * Show the site navgiational block * - * @access public * @return string HTML content to replace tag with */ public function portal_sitenav() @@ -81,7 +79,6 @@ class ppi_portal extends public_portal_portal_portal /** * Show the affiliates block * - * @access public * @return string HTML content to replace tag with */ public function portal_affiliates() @@ -97,5 +94,4 @@ class ppi_portal extends public_portal_portal_portal return $this->registry->getClass('output')->getTemplate('portal')->affiliates(); } - } \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/portal/index.html b/upload/admin/applications_addon/ips/portal/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/portal/index.html +++ b/upload/admin/applications_addon/ips/portal/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/portal/modules_admin/index.html b/upload/admin/applications_addon/ips/portal/modules_admin/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/portal/modules_admin/index.html +++ b/upload/admin/applications_addon/ips/portal/modules_admin/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/portal/modules_admin/portal/defaultSection.php b/upload/admin/applications_addon/ips/portal/modules_admin/portal/defaultSection.php index a01e6d82..04f23782 100644 --- a/upload/admin/applications_addon/ips/portal/modules_admin/portal/defaultSection.php +++ b/upload/admin/applications_addon/ips/portal/modules_admin/portal/defaultSection.php @@ -1,16 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Portal default section + * Last Updated: $Date: 2010-04-15 15:46:26 -0400 (Thu, 15 Apr 2010) $ + * * * @author $author$ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Portal - * @link http://www.iinvisionpower.com - * @version $Rev: 4948 $ + * @link http://www.invisionpower.com + * @version $Rev: 6133 $ **/ if ( ! defined( 'IN_IPB' ) ) diff --git a/upload/admin/applications_addon/ips/portal/modules_admin/portal/index.html b/upload/admin/applications_addon/ips/portal/modules_admin/portal/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/portal/modules_admin/portal/index.html +++ b/upload/admin/applications_addon/ips/portal/modules_admin/portal/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/portal/modules_admin/portal/portal.php b/upload/admin/applications_addon/ips/portal/modules_admin/portal/portal.php index 25c73324..ba34bb14 100644 --- a/upload/admin/applications_addon/ips/portal/modules_admin/portal/portal.php +++ b/upload/admin/applications_addon/ips/portal/modules_admin/portal/portal.php @@ -1,19 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * IP.Portal - * Last Updated: $Date: 2009-10-01 10:02:08 -0400 (Thu, 01 Oct 2009) $ + * Last Updated: $Date: 2010-10-21 14:02:34 -0400 (Thu, 21 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Portal - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 1st April 2004 - * @version $Revision: 5190 $ + * @version $Revision: 7011 $ */ if ( ! defined( 'IN_ACP' ) ) @@ -22,13 +23,11 @@ if ( ! defined( 'IN_ACP' ) ) exit(); } - class admin_portal_portal_portal extends ipsCommand { /** * Portal objects * - * @access private * @var array */ private $portal_objects = array(); @@ -36,7 +35,6 @@ class admin_portal_portal_portal extends ipsCommand /** * Skin object * - * @access private * @var object Skin templates */ private $html; @@ -44,7 +42,6 @@ class admin_portal_portal_portal extends ipsCommand /** * Shortcut for url * - * @access private * @var string URL shortcut */ private $form_code; @@ -52,7 +49,6 @@ class admin_portal_portal_portal extends ipsCommand /** * Shortcut for url (javascript) * - * @access private * @var string JS URL shortcut */ private $form_code_js; @@ -60,7 +56,6 @@ class admin_portal_portal_portal extends ipsCommand /** * Main class entry point * - * @access public * @param object ipsRegistry reference * @return void [Outputs to screen] */ @@ -122,7 +117,6 @@ class admin_portal_portal_portal extends ipsCommand /** * Rebuild portal cache * - * @access public * @return void */ public function portalRebuildCache() @@ -142,7 +136,6 @@ class admin_portal_portal_portal extends ipsCommand /** * View portal tags (settings) * - * @access private * @return void [Outputs to screen] */ private function _portalViewTags() @@ -175,7 +168,7 @@ class admin_portal_portal_portal extends ipsCommand //------------------------------- // Grab config file //------------------------------- - + $PORTAL_CONFIG = array(); require( $file ); $this->registry->output->html .= $this->html->portal_pop_overview( $PORTAL_CONFIG['pc_title'], $PORTAL_CONFIG['pc_exportable_tags'] ); @@ -190,7 +183,6 @@ class admin_portal_portal_portal extends ipsCommand /** * Show settings for the portal * - * @access private * @return void [Outputs to screen] */ private function _portalSettings() @@ -224,7 +216,7 @@ class admin_portal_portal_portal extends ipsCommand //------------------------------- // Grab config file //------------------------------- - + $PORTAL_CONFIG = array(); require ( $file ); if ( ! $PORTAL_CONFIG['pc_settings_keyword'] ) @@ -238,8 +230,8 @@ class admin_portal_portal_portal extends ipsCommand // Grab, init and load settings //------------------------------- - require_once( IPSLib::getAppDir( 'core' ).'/modules_admin/tools/settings.php' ); - $settings = new admin_core_tools_settings(); + $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'core' ).'/modules_admin/tools/settings.php', 'admin_core_tools_settings' ); + $settings = new $classToLoad(); $settings->makeRegistryShortcuts( $this->registry ); ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_tools' ), 'core' ); @@ -257,7 +249,6 @@ class admin_portal_portal_portal extends ipsCommand /** * List the portal objects * - * @access private * @return void [Outputs to screen] */ private function _portalList() @@ -274,7 +265,6 @@ class admin_portal_portal_portal extends ipsCommand /** * Get the portal objects from disk * - * @access private * @return void [Outputs to screen] */ private function _getPortalObjects() @@ -336,6 +326,7 @@ class admin_portal_portal_portal extends ipsCommand $PORTAL_CONFIG['pc_key'] = $matches[1]; $PORTAL_CONFIG['_cfg_location'] = str_replace( '\\', '/', $file->getPathname() ); $PORTAL_CONFIG['_file_location'] = str_replace( '\\', '/', str_replace( '-cfg', '', $file->getPathname() ) ); + $PORTAL_CONFIG['_app_dir'] = $_app_dir; $this->portal_objects[ $matches[1] ] = $PORTAL_CONFIG; } } @@ -350,4 +341,4 @@ class admin_portal_portal_portal extends ipsCommand return; } } -} +} \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/portal/modules_admin/portal/xml/index.html b/upload/admin/applications_addon/ips/portal/modules_admin/portal/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/portal/modules_admin/portal/xml/index.html +++ b/upload/admin/applications_addon/ips/portal/modules_admin/portal/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/portal/modules_public/index.html b/upload/admin/applications_addon/ips/portal/modules_public/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/portal/modules_public/index.html +++ b/upload/admin/applications_addon/ips/portal/modules_public/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/portal/modules_public/portal/defaultSection.php b/upload/admin/applications_addon/ips/portal/modules_public/portal/defaultSection.php index a01e6d82..04f23782 100644 --- a/upload/admin/applications_addon/ips/portal/modules_public/portal/defaultSection.php +++ b/upload/admin/applications_addon/ips/portal/modules_public/portal/defaultSection.php @@ -1,16 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Portal default section + * Last Updated: $Date: 2010-04-15 15:46:26 -0400 (Thu, 15 Apr 2010) $ + * * * @author $author$ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Portal - * @link http://www.iinvisionpower.com - * @version $Rev: 4948 $ + * @link http://www.invisionpower.com + * @version $Rev: 6133 $ **/ if ( ! defined( 'IN_IPB' ) ) diff --git a/upload/admin/applications_addon/ips/portal/modules_public/portal/index.html b/upload/admin/applications_addon/ips/portal/modules_public/portal/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/portal/modules_public/portal/index.html +++ b/upload/admin/applications_addon/ips/portal/modules_public/portal/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/portal/modules_public/portal/portal.php b/upload/admin/applications_addon/ips/portal/modules_public/portal/portal.php index 2d702ff8..344b99e6 100644 --- a/upload/admin/applications_addon/ips/portal/modules_public/portal/portal.php +++ b/upload/admin/applications_addon/ips/portal/modules_public/portal/portal.php @@ -1,19 +1,21 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * IP.Portal - * Last Updated: $Date: 2009-12-07 21:57:46 -0500 (Mon, 07 Dec 2009) $ + * Last Updated: $Date: 2010-10-21 14:02:34 -0400 (Thu, 21 Oct 2010) $ + * * - * @author $Author: bfarber $ + * @author $Author: ips_terabyte $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board * @subpackage Portal - * @link http://www.iinvisionpower.com + * @link http://www.invisionpower.com * @since 1st April 2004 - * @version $Revision: 5529 $ + * @version $Revision: 7011 $ */ if ( ! defined( 'IN_IPB' ) ) @@ -95,7 +97,7 @@ class public_portal_portal_portal extends ipsCommand if( ! IPSLib::appIsInstalled( 'portal' ) ) { - $this->registry->output->showError( 'no_permission', 1076 ); + $this->registry->output->showError( 'no_permission', 1076, null, null, 404 ); } //----------------------------------------- @@ -104,6 +106,11 @@ class public_portal_portal_portal extends ipsCommand foreach( $this->cache->getCache('portal') as $portal_data ) { + if( ! IPSLib::appIsInstalled( $portal_data['_app_dir'] ) ) + { + continue; + } + if ( $portal_data['pc_settings_keyword'] ) { $conf_groups[] = "'" . $portal_data['pc_settings_keyword'] . "'"; @@ -192,7 +199,7 @@ class public_portal_portal_portal extends ipsCommand //----------------------------------------- // Require modules... //----------------------------------------- - + if ( is_array( $found_modules ) AND count( $found_modules ) ) { foreach( $found_modules as $mod_name => $pointless ) @@ -201,9 +208,8 @@ class public_portal_portal_portal extends ipsCommand { if ( file_exists( $this->caches['portal'][ $mod_name ]['_file_location'] ) ) { - require_once( $this->caches['portal'][ $mod_name ]['_file_location'] ); - $constructor = 'ppi_' . $mod_name; - $this->module_objects[ $mod_name ] = new $constructor; + $constructor = IPSLib::loadLibrary( $this->caches['portal'][ $mod_name ]['_file_location'], 'ppi_' . $mod_name, $this->caches['portal'][ $mod_name ]['_app_dir'] ); + $this->module_objects[ $mod_name ] = new $constructor(); $this->module_objects[ $mod_name ]->makeRegistryShortcuts( $this->registry ); $this->module_objects[ $mod_name ]->init(); } diff --git a/upload/admin/applications_addon/ips/portal/setup/index.html b/upload/admin/applications_addon/ips/portal/setup/index.html deleted file mode 100644 index 203e7ede..00000000 --- a/upload/admin/applications_addon/ips/portal/setup/index.html +++ /dev/null @@ -1 +0,0 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/portal/skin_cp/cp_skin_portal.php b/upload/admin/applications_addon/ips/portal/skin_cp/cp_skin_portal.php index 8eca74c5..c211d705 100644 --- a/upload/admin/applications_addon/ips/portal/skin_cp/cp_skin_portal.php +++ b/upload/admin/applications_addon/ips/portal/skin_cp/cp_skin_portal.php @@ -1,142 +1,144 @@ - -

      {$this->lang->words['portal_pop_tags']} {$title}

      - - - - - -EOF; - -if ( is_array( $tags ) AND count( $tags ) ) -{ - foreach( $tags as $tag => $tag_data ) - { - $IPBHTML .= << - - - -EOF; - } -} - -$IPBHTML .= << - - -EOF; - -//--endhtml--// -return $IPBHTML; -} - -/** - * Portal overview - * - * @access public - * @param array Available portal objects - * @return string HTML - */ -public function portal_overview( $objects ) { - -$IPBHTML = ""; -//--starthtml--// -$IPBHTML .= << -

      {$this->lang->words['main_title']}

      - - -
      -

      {$this->lang->words['portal_main_title']}

      - -
      {$this->lang->words['portal_pop_name']}{$this->lang->words['portal_pop_desc']}
      <!--::{$tag}::-->
      {$tag_data[1]}
      - - - - - -EOF; - -if ( is_array( $objects ) AND count( $objects ) ) -{ - foreach( $objects as $key => $data ) - { - $IPBHTML .= << - - - - -EOF; - } -} - -$IPBHTML .= << - - -EOF; - -//--endhtml--// -return $IPBHTML; -} - - + + * Invision Power Services + * IP.Board v3.1.4 + * Portal skin file + * Last Updated: $Date: 2010-05-19 21:06:53 -0400 (Wed, 19 May 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @subpackage Portal + * @link http://www.invisionpower.com + * @since Friday 19th May 2006 17:33 + * @version $Revision: 6326 $ + */ + +class cp_skin_portal extends output +{ + +/** + * Prevent our main destructor being called by this class + * + * @access public + * @return void + */ +public function __destruct() +{ +} + +/** + * Portal tag details + * + * @access public + * @param string Page title + * @param array Available tags + * @return string HTML + */ +public function portal_pop_overview( $title, $tags ) { + +$IPBHTML = ""; +//--starthtml--// +$IPBHTML .= << +

      {$this->lang->words['portal_pop_tags']} {$title}

      +
       {$this->lang->words['portal_main_key']} 
      {$this->lang->words[{$data['pc_title']}
      {$data['pc_desc']}
      - {$this->lang->words[ - -
      + + + + +EOF; + +if ( is_array( $tags ) AND count( $tags ) ) +{ + foreach( $tags as $tag => $tag_data ) + { + $IPBHTML .= << + + + +EOF; + } +} + +$IPBHTML .= << + + +EOF; + +//--endhtml--// +return $IPBHTML; +} + +/** + * Portal overview + * + * @access public + * @param array Available portal objects + * @return string HTML + */ +public function portal_overview( $objects ) { + +$IPBHTML = ""; +//--starthtml--// +$IPBHTML .= << +

      {$this->lang->words['main_title']}

      + + +
      +

      {$this->lang->words['portal_main_title']}

      + +
      {$this->lang->words['portal_pop_name']}{$this->lang->words['portal_pop_desc']}
      <!--::{$tag}::-->
      {$tag_data[1]}
      + + + + + +EOF; + +if ( is_array( $objects ) AND count( $objects ) ) +{ + foreach( $objects as $key => $data ) + { + $IPBHTML .= << + + + + +EOF; + } +} + +$IPBHTML .= << + + +EOF; + +//--endhtml--// +return $IPBHTML; +} + + } \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/portal/skin_cp/index.html b/upload/admin/applications_addon/ips/portal/skin_cp/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/portal/skin_cp/index.html +++ b/upload/admin/applications_addon/ips/portal/skin_cp/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/portal/xml/index.html b/upload/admin/applications_addon/ips/portal/xml/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/applications_addon/ips/portal/xml/index.html +++ b/upload/admin/applications_addon/ips/portal/xml/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/applications_addon/ips/portal/xml/portal_lofi_templates.xml b/upload/admin/applications_addon/ips/portal/xml/portal_lofi_templates.xml deleted file mode 100644 index f75bcae5..00000000 --- a/upload/admin/applications_addon/ips/portal/xml/portal_lofi_templates.xml +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - diff --git a/upload/admin/applications_addon/ips/portal/xml/portal_mobile_templates.xml b/upload/admin/applications_addon/ips/portal/xml/portal_mobile_templates.xml new file mode 100644 index 00000000..33c89bb8 --- /dev/null +++ b/upload/admin/applications_addon/ips/portal/xml/portal_mobile_templates.xml @@ -0,0 +1,175 @@ + + + + + + + + + + + + + diff --git a/upload/admin/applications_addon/ips/portal/xml/portal_root_templates.xml b/upload/admin/applications_addon/ips/portal/xml/portal_root_templates.xml index 89715b31..9a1dd9cd 100644 --- a/upload/admin/applications_addon/ips/portal/xml/portal_root_templates.xml +++ b/upload/admin/applications_addon/ips/portal/xml/portal_root_templates.xml @@ -4,24 +4,25 @@ diff --git a/upload/admin/applications_addon/ips/portal/xml/portal_settings.xml b/upload/admin/applications_addon/ips/portal/xml/portal_settings.xml index 4d6178dc..afa48064 100644 --- a/upload/admin/applications_addon/ips/portal/xml/portal_settings.xml +++ b/upload/admin/applications_addon/ips/portal/xml/portal_settings.xml @@ -13,7 +13,7 @@ Название страницы портала То, что будет записано между элементами title на странице портала. - 29 + 31 input csite_title Портал @@ -31,7 +31,7 @@ Формат даты для тем Аналогично функции strftime PHP.]]> - 29 + 31 input csite_article_date %d.%m.%y %H:%M @@ -49,7 +49,7 @@ Показывать меню навигации по сайту? - 29 + 31 yes_no csite_nav_show 1 @@ -67,7 +67,7 @@ Ссылки меню навигации по сайту http://www.apple.com [Вебсайт Apple]

      {board_url} будет преобразовано в адрес вашего форума]]>
      - 29 + 31 textarea csite_nav_contents - 29 + 31 yes_no csite_fav_show 0 @@ -109,7 +109,7 @@ Поддерживается HTML - 29 + 31 textarea csite_fav_contents @@ -139,7 +139,7 @@ Введите URL к теме с опросом Не заполняйте, чтобы не отображать блок с опросом. - 30 + 32 input poll_poll_url @@ -163,10 +163,28 @@ portal 1 + + Не закреплять важные темы + При включении этой опции темы, закрепленные на форуме, на портале будут выводиться, как обычные, а не находиться постоянно наверху. + 33 + yes_no + portal_exclude_pinned + 1 + + + 1 + 3 + + 0 + 1 + + portal_recent_topics + 0 + Разделы, из которых будет производиться экспорт статей Можно выбрать несколько, используя клавишу Сtrl. - 31 + 33 multi recent_topics_article_forum @@ -200,7 +218,7 @@ $key = 'recent_topics_article_forum[]'; Количество отображаемых тем - 31 + 33 input recent_topics_article_max 15 @@ -215,28 +233,10 @@ $key = 'recent_topics_article_forum[]'; portal_recent_topics 0 - - - При включении этой опции темы, закрепленные на форуме, на портале будут выводиться, как обычные, а не находиться постоянно наверху. - 23 - yes_no - portal_exclude_pinned - 1 - - - 1 - 3 - - 0 - 1 - - portal_recent_topics - 0 - Количество отображаемых обсуждений - 31 + 33 input recent_topics_discuss_number 1 diff --git a/upload/admin/applications_addon/ips/portal/xml/portal_xmlskin_templates.xml b/upload/admin/applications_addon/ips/portal/xml/portal_xmlskin_templates.xml index f3d87c40..c095253e 100644 --- a/upload/admin/applications_addon/ips/portal/xml/portal_xmlskin_templates.xml +++ b/upload/admin/applications_addon/ips/portal/xml/portal_xmlskin_templates.xml @@ -1,85 +1,93 @@ - - - - + + + + diff --git a/upload/admin/applications_addon/ips/portal/xml/public_portal_language_pack.xml b/upload/admin/applications_addon/ips/portal/xml/public_portal_language_pack.xml index bc9d8d2a..8b7a305f 100644 --- a/upload/admin/applications_addon/ips/portal/xml/public_portal_language_pack.xml +++ b/upload/admin/applications_addon/ips/portal/xml/public_portal_language_pack.xml @@ -121,6 +121,16 @@ 30008 0 + + portal + public_portal + recent_topics + Featured Topics + Обсуждаемое + 31005 + 31005 + 0 + portal public_portal @@ -171,5 +181,25 @@ 30008 0 + + portal + public_portal + but_forums + Forums + Форумы + 31005 + 31005 + 0 + + + portal + public_portal + but_active + Active Topics + Активные темы + 31005 + 31005 + 0 + diff --git a/upload/admin/applications_addon/ips/portal/xml/versions.xml b/upload/admin/applications_addon/ips/portal/xml/versions.xml index 41009742..9b46ee91 100644 --- a/upload/admin/applications_addon/ips/portal/xml/versions.xml +++ b/upload/admin/applications_addon/ips/portal/xml/versions.xml @@ -1,7 +1,7 @@ - 3.0.5 - 30012 - + 3.1.4 + 31007 + \ No newline at end of file diff --git a/upload/admin/applications_addon/other/index.html b/upload/admin/applications_addon/other/index.html new file mode 100644 index 00000000..dfdb4ca9 --- /dev/null +++ b/upload/admin/applications_addon/other/index.html @@ -0,0 +1,10 @@ + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/extensions/coreVariables.php b/upload/admin/extensions/coreVariables.php index aa6c95ae..ef5708db 100644 --- a/upload/admin/extensions/coreVariables.php +++ b/upload/admin/extensions/coreVariables.php @@ -1,17 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Core variables file: defines caches, resets, etc. - * Last Updated: $Date: 2009-11-27 15:29:20 -0500 (Fri, 27 Nov 2009) $ + * Last Updated: $Date: 2010-10-18 20:34:07 -0400 (Mon, 18 Oct 2010) $ + * * - * @author $Author: michael $ + * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board - * @link http://www.iinvisionpower.com - * @version $Rev: 5489 $ + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @link http://www.invisionpower.com + * @version $Rev: 6992 $ * @since 3.0.0 * */ @@ -63,6 +65,13 @@ class coreVariables 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/applications/applications.php', 'recache_class' => 'admin_core_applications_applications', 'recache_function' => 'applicationsRecache' ); + + $CACHE['navigation_tabs'] = array( 'array' => 1, + 'allow_unload' => 0, + 'default_load' => 1, + 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/applications/applications.php', + 'recache_class' => 'admin_core_applications_applications', + 'recache_function' => 'applicationsRecache' ); $CACHE['module_cache'] = array( 'array' => 1, 'allow_unload' => 0, @@ -245,6 +254,27 @@ class coreVariables 'recache_class' => 'admin_forums_rss_export', 'recache_function' => 'doRssRebuildCache' ); + + $CACHE['sharelinks'] = array( + 'array' => 1, + 'allow_unload' => 0, + 'default_load' => 0, + 'skip_rebuild_when_upgrading' => 0, + 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/tools/sharelinks.php', + 'recache_class' => 'admin_core_tools_sharelinks', + 'recache_function' => 'rebuildCache' + ); + + $CACHE['notifications'] = array( + 'array' => 1, + 'allow_unload' => 0, + 'default_load' => 0, + 'skip_rebuild_when_upgrading' => 0, + 'recache_file' => IPS_ROOT_PATH . '/sources/classes/member/notifications.php', + 'recache_class' => 'notifications', + 'recache_function' => 'rebuildNotificationsCache' + ); + if ( IN_DEV ) { @@ -276,7 +306,25 @@ class coreVariables $_RESET = array(); ###### New IPB 3.0.0 Redirects ###### + + /* Share links */ + if ( isset( $_REQUEST['sharelink'] ) AND ! isset( $_REQUEST['app'] ) ) + { + /* Some set ups parse ; automagically (bah) */ + if ( ! strstr( $_REQUEST['sharelink'], ';' ) ) + { + $_REQUEST['sharelink'] = preg_replace( "#sharelink=(.*)$#", "\\1", $_SERVER['QUERY_STRING'] ); + } + list( $key, $url, $title ) = explode( ';', $_REQUEST['sharelink'] ); + $_RESET['url'] = $url; + $_RESET['title'] = $title; + $_RESET['key'] = $key; + $_RESET['app'] = 'core'; + $_RESET['module'] = 'global'; + $_RESET['section'] = 'share'; + } + if( isset( $_REQUEST['showannouncement'] ) && $_REQUEST['showannouncement'] ) { $_RESET['app'] = 'forums'; @@ -294,7 +342,7 @@ class coreVariables $_RESET['section'] = 'boards'; $_RESET['module'] = 'forums'; } - + # FORUM if( isset( $_REQUEST['showforum'] ) && $_REQUEST['showforum'] ) { @@ -305,12 +353,15 @@ class coreVariables } # TOPIC - if( isset( $_REQUEST['showtopic'] ) && $_REQUEST['showtopic'] ) + if( ( isset( $_REQUEST['showtopic'] ) && $_REQUEST['showtopic'] ) OR ( isset($_REQUEST['act']) AND $_REQUEST['act'] == 'ST' ) ) { $_RESET['app'] = 'forums'; $_RESET['module'] = 'forums'; $_RESET['section'] = 'topics'; - $_RESET['t'] = $_REQUEST['showtopic']; + if ( !$_REQUEST['t'] ) + { + $_RESET['t'] = $_REQUEST['showtopic']; + } } if( ( isset( $_REQUEST['act'] ) && $_REQUEST['act'] == 'findpost' ) || isset( $_REQUEST['findpost'] ) && $_REQUEST['findpost'] ) @@ -346,7 +397,7 @@ class coreVariables } # SUBSMANAGER - Needed here to redirect stored IPN to new app - if ( isset( $_REQUEST['act'] ) && $_REQUEST['act'] == 'paysubs' ) + if ( isset( $_REQUEST['act'] ) && strtolower($_REQUEST['act']) == 'paysubs' ) { $_RESET['app'] = 'subscriptions'; @@ -418,6 +469,12 @@ class coreVariables $_RESET['section'] = 'printtopic'; } + # Calendar + if( isset( $_REQUEST['act'] ) && $_REQUEST['act'] == 'calendar' ) + { + $_RESET['app'] = 'calendar'; + } + return $_RESET; } @@ -479,12 +536,18 @@ class coreVariables */ public function fetchBitwise() { - $_BITWISE = array( 'facebook' => array( 'fbc_s_pic', 'fbc_s_avatar', 'fbc_s_status', 'fbc_s_aboutme' ), // facebook == profile_portal.fb_bwoptions + $_BITWISE = array( 'facebook' => array( 'fbc_s_pic', 'fbc_s_avatar', 'fbc_s_status', 'fbc_s_aboutme', 'fbc_si_status' ), // facebook == profile_portal.fb_bwoptions + 'twitter' => array( 'tc_s_pic', 'tc_s_avatar', 'tc_s_status', 'tc_s_aboutme', 'tc_s_bgimg', 'tc_si_status' ), // twitter = profile_portal.tc_bwoptions 'members' => array( 'bw_is_spammer', 'bw_from_sfs', 'bw_vnc_type', # 1 based on topic marking table, 0 based on last_visit 'bw_forum_result_type', # 1 is list, 0 is forum - 'bw_no_status_update' ), # 1 is yes ban, 0 is no, allow + 'bw_no_status_update', # 1 is yes ban, 0 is no, allow + 'bw_status_email_mine', # 1 is 'send me an email when anyone replies to my status updates', 0 is DO NOT DO WHAT 1 DOES OR ELSE + 'bw_status_email_all', # 1 is 'send me an email when anyone replies to any status update I replied to', 0 is OMG DO NOT DO THAT + 'bw_disable_customization', # 1 yeah, 0 nah boi + 'bw_local_password_set', # 1 means "user was created by remote, but has local password set", 0 means not, or not local user + ), 'groups' => array( 'gbw_mod_post_unit_type' , # 1 is days, 0 is posts @@ -493,6 +556,21 @@ class coreVariables 'gbw_sig_unit_type' , # 1 is days, 0 is posts 'gbw_promote_unit_type' , # 1 is days, 0 is posts 'gbw_no_status_update' , # 1 is blocked, 0 is not. Quite simple really + 'gbw_soft_delete' , # 1 is ok, 0 is not + 'gbw_soft_delete_own' , # 1 is ok, 0 is not + 'gbw_soft_delete_own_topic' , # 1 is ok, 0 is not + 'gbw_un_soft_delete' , # 1 is ok, 0 is not + 'gbw_soft_delete_see' , # 1 is ok, 0 is not + 'gbw_soft_delete_topic' , # 1 is ok, 0 is not + 'gbw_un_soft_delete_topic' , # 1 is ok, 0 is not + 'gbw_soft_delete_topic_see' , # 1 is ok, 0 is not + 'gbw_soft_delete_reason' , # 1 means can read reason, 0 means cannot + 'gbw_soft_delete_see_post' , # seriously. + 'gbw_allow_customization' , # 1 YES, 0 NO + 'gbw_allow_url_bgimage' , #^^ + 'gbw_allow_upload_bgimage' , #^^ + 'gbw_view_reps' , # 1 allows them to view who gave rep to a post, 0 is can't + 'gbw_no_status_import' , # 1 prevents members in group from importing statuses from services. ) ); diff --git a/upload/admin/extensions/index.html b/upload/admin/extensions/index.html index 203e7ede..dfdb4ca9 100644 --- a/upload/admin/extensions/index.html +++ b/upload/admin/extensions/index.html @@ -1 +1,10 @@ - IP.Board - Bulletin Board System

      403: IP.Board -> Forbidden


      You have reached this page in error, please use your back button to return to the forum.
      IP.Board \ No newline at end of file + +IP.Board - Bulletin Board System + +

      403: IP.Board -> Forbidden

      +
      +You have reached this page in error, please use your back button to return to the forum. +
      +IP.Board + + \ No newline at end of file diff --git a/upload/admin/extensions/sphinxTemplate.php b/upload/admin/extensions/sphinxTemplate.php index e31dda1c..cfde1971 100644 --- a/upload/admin/extensions/sphinxTemplate.php +++ b/upload/admin/extensions/sphinxTemplate.php @@ -1,74 +1,76 @@ -Incorrect accessYou cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; - exit(); -} - -$sphinxTemplate = << - sql_user = - sql_pass = - sql_db = - sql_port = -} - - - -############################################################################# -## indexer settings -############################################################################# - -indexer -{ - mem_limit = 256M -} - -############################################################################# -## searchd settings -############################################################################# - -searchd -{ - address = 127.0.0.1 - port = - log = /log/searchd.log - query_log = /log/query.log - read_timeout = 5 - max_children = 30 - pid_file = /log/searchd.pid - max_matches = 1000 - seamless_rotate = 0 - preopen_indexes = 0 - unlink_old = 1 -} - -# --eof-- - -EOF; + + * Invision Power Services + * IP.Board v3.1.4 + * Sphinx template file + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @link http://www.invisionpower.com + * @version $Rev: 5713 $ + * @since 3.0.0 + * + */ + +if ( ! defined( 'IN_IPB' ) ) +{ + print "

      Incorrect access

      You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; + exit(); +} + +$sphinxTemplate = << + sql_user = + sql_pass = + sql_db = + sql_port = +} + + + +############################################################################# +## indexer settings +############################################################################# + +indexer +{ + mem_limit = 256M +} + +############################################################################# +## searchd settings +############################################################################# + +searchd +{ + address = 127.0.0.1 + port = + log = /log/searchd.log + query_log = /log/query.log + read_timeout = 5 + max_children = 30 + pid_file = /log/searchd.pid + max_matches = 1000 + seamless_rotate = 0 + preopen_indexes = 0 + unlink_old = 1 +} + +# --eof-- + +EOF; diff --git a/upload/admin/extensions/userAgents.php b/upload/admin/extensions/userAgents.php index ea8baac3..3a26f6b4 100644 --- a/upload/admin/extensions/userAgents.php +++ b/upload/admin/extensions/userAgents.php @@ -1,20 +1,22 @@ + * Invision Power Services + * IP.Board v3.1.4 + * User agent (browser and spider) mappings + * Last Updated: $Date: 2010-10-07 18:12:54 -0400 (Thu, 07 Oct 2010) $ + * + * + * @author $Author: bfarber $ + * @copyright (c) 2001 - 2009 Invision Power Services, Inc. + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @link http://www.invisionpower.com + * @version $Rev: 6954 $ + * @since 3.0.0 + * + */ if ( ! defined( 'IN_IPB' ) ) { @@ -22,6 +24,75 @@ if ( ! defined( 'IN_IPB' ) ) exit(); } +//----------------------------------------- +// Mobile devices. These go first so they are matched +// http://en.wikipedia.org/wiki/List_of_user_agents_for_mobile_phones +//----------------------------------------- + +$BROWSERS['blackberry'] = array( + 'b_title' => "Blackberry", + 'b_regex' => array( "blackberry(\d+?)/([0-9.]{1,10})" => "2" ) + ); + +$BROWSERS['iphone'] = array( + 'b_title' => "iPhone", + 'b_regex' => array( "iphone;" => "0" ) + ); + +$BROWSERS['ipodtouch'] = array( + 'b_title' => "iPod Touch", + 'b_regex' => array( "ipod;" => "0" ) + ); + +$BROWSERS['sonyericsson'] = array( + 'b_title' => "Sony Ericsson", + 'b_regex' => array( "^SonyEricsson[A-Za-z0-9]" => "0" ) + ); + +$BROWSERS['nokia'] = array( + 'b_title' => "Nokia", + 'b_regex' => array( "Nokia[A-Za-z0-9]" => "0" ) + ); + +$BROWSERS['motorola'] = array( + 'b_title' => "Motorola", + 'b_regex' => array( "^mot-[A-Za-z0-9]" => "0" ) + ); + +$BROWSERS['samsung'] = array( + 'b_title' => "Samsung", + 'b_regex' => array( "^samsung-[A-Za-z0-9]" => "0" ) + ); + +$BROWSERS['siemens'] = array( + 'b_title' => "Siemens (Openwave)", + 'b_regex' => array( "^sie-[A-Za-z0-9]" => "0" ) + ); + +$BROWSERS['htc'] = array( + 'b_title' => "Nexus(Google)/Android/HTC", + 'b_regex' => array( "(android |htc-|htc_)([A-Za-z0-9.]{1,10})" => "2" ) + ); + +$BROWSERS['lg'] = array( + 'b_title' => "LG", + 'b_regex' => array( "^(lg|lge)-[A-Za-z0-9]" => "0" ) + ); + +$BROWSERS['palm'] = array( + 'b_title' => "Palm", + 'b_regex' => array( "(palmsource/| pre/[0-9.]{1,10}|palm webos)" => "0" ) + ); + +$BROWSERS['operamini'] = array( + 'b_title' => "Opera Mini", + 'b_regex' => array( "opera mini[ /]([0-9.]{1,10})" => "1" ) + ); + +//----------------------------------------- +// Browsers +//----------------------------------------- + $BROWSERS['amaya'] = array( 'b_title' => "Amaya", 'b_regex' => array( "amaya/([0-9.]{1,10})" => "1" ) @@ -31,11 +102,6 @@ $BROWSERS['aol'] = array( 'b_title' => "AOL", 'b_regex' => array( "aol[ /\-]([0-9.]{1,10})" => "1" ) ); - -$BROWSERS['blackberry'] = array( - 'b_title' => "Blackberry", - 'b_regex' => array( "blackberry(\d+?)/([0-9.]{1,10})" => "2" ) - ); $BROWSERS['camino'] = array( 'b_title' => "Camino", @@ -93,15 +159,7 @@ $BROWSERS['safari'] = array( 'b_title' => "Safari", 'b_regex' => array( "version/([0-9.]{1,10})\s+?safari/([0-9.]{1,10})" => "1" ) ); -$BROWSERS['iphone'] = array( - 'b_title' => "iPhone", - 'b_regex' => array( "iphone;" => "0" ) - ); - -$BROWSERS['ipodtouch'] = array( - 'b_title' => "iPod Touch", - 'b_regex' => array( "ipod;" => "0" ) - ); + $BROWSERS['webtv'] = array( 'b_title' => "Webtv", @@ -120,7 +178,7 @@ $BROWSERS['mozilla'] = array( 'b_title' => "Mozilla", 'b_regex' => array( "^mozilla/([5-9]\.[0-9a-z.]{1,10})" => "1" ) ); - + //----------------------------------------- // SEARCH ENGINES //----------------------------------------- @@ -150,6 +208,12 @@ $ENGINES['google'] = array( 'b_title' => "Google", 'b_regex' => array( "Googl(e|ebot)(-Image)?/([0-9.]{1,10})" => "\\\\3","Googl(e|ebot)(-Image)?/" => "" ) ); + +$ENGINES['facebook'] = array( + 'b_title' => "Facebook", + 'b_regex' => array( "facebookexternalhit/([0-9.]{1,10})" => "\\\\1" ) + ); + $ENGINES['infoseek'] = array( 'b_title' => "Infoseek", 'b_regex' => array( "SideWinder[ /]?([0-9a-z.]{1,10})" => "1","Infoseek" => "" ) diff --git a/upload/admin/index.php b/upload/admin/index.php index 2b4e8d46..fec1baac 100644 --- a/upload/admin/index.php +++ b/upload/admin/index.php @@ -1,17 +1,19 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Admin control panel gateway index.php file - * Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board - * @link http://www.iinvisionpower.com - * @version $Rev: 3887 $ + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @link http://www.invisionpower.com + * @version $Rev: 5713 $ * */ diff --git a/upload/admin/install/index.php b/upload/admin/install/index.php index 8859bc9f..967a0292 100644 --- a/upload/admin/install/index.php +++ b/upload/admin/install/index.php @@ -1,18 +1,20 @@ * Invision Power Services - * IP.Board v3.0.5 + * IP.Board v3.1.4 * Installation Gateway - * Last Updated: $LastChangedDate: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $ + * Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $ + * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. - * @license http://www.iinvisionpower.com/community/board/license.html - * @package Invision Power Board - * @link http://www.iinvisionpower.com + * @license http://www.invisionpower.com/community/board/license.html + * @package IP.Board + * @link http://www.invisionpower.com * @since 14th May 2003 - * @version $Rev: 3887 $ + * @version $Rev: 5713 $ */ define( 'IPB_THIS_SCRIPT', 'admin' ); diff --git a/upload/admin/js/3rd_party/edit_area/autocompletion.js b/upload/admin/js/3rd_party/edit_area/autocompletion.js deleted file mode 100644 index c5d646a3..00000000 --- a/upload/admin/js/3rd_party/edit_area/autocompletion.js +++ /dev/null @@ -1,491 +0,0 @@ -/** - * Autocompletion class - * - * An auto completion box appear while you're writing. It's possible to force it to appear with Ctrl+Space short cut - * - * Loaded as a plugin inside editArea (everything made here could have been made in the plugin directory) - * But is definitly linked to syntax selection (no need to do 2 different files for color and auto complete for each syntax language) - * and add a too important feature that many people would miss if included as a plugin - * - * - init param: autocompletion_start - * - Button name: "autocompletion" - */ - -var EditArea_autocompletion= { - - /** - * Get called once this file is loaded (editArea still not initialized) - * - * @return nothing - */ - init: function(){ - // alert("test init: "+ this._someInternalFunction(2, 3)); - - if(editArea.settings["autocompletion"]) - this.enabled= true; - else - this.enabled= false; - this.current_word = false; - this.shown = false; - this.selectIndex = -1; - this.forceDisplay = false; - this.isInMiddleWord = false; - this.autoSelectIfOneResult = false; - this.delayBeforeDisplay = 100; - this.checkDelayTimer = false; - this.curr_syntax_str = ''; - - this.file_syntax_datas = {}; - } - /** - * Returns the HTML code for a specific control string or false if this plugin doesn't have that control. - * A control can be a button, select list or any other HTML item to present in the EditArea user interface. - * Language variables such as {$lang_somekey} will also be replaced with contents from - * the language packs. - * - * @param {string} ctrl_name: the name of the control to add - * @return HTML code for a specific control or false. - * @type string or boolean - */ - /*,get_control_html: function(ctrl_name){ - switch( ctrl_name ){ - case 'autocompletion': - // Control id, button img, command - return parent.editAreaLoader.get_button_html('autocompletion_but', 'autocompletion.gif', 'toggle_autocompletion', false, this.baseURL); - break; - } - return false; - }*/ - /** - * Get called once EditArea is fully loaded and initialised - * - * @return nothing - */ - ,onload: function(){ - if(this.enabled) - { - var icon= document.getElementById("autocompletion"); - if(icon) - editArea.switchClassSticky(icon, 'editAreaButtonSelected', true); - } - - this.container = document.createElement('div'); - this.container.id = "auto_completion_area"; - editArea.container.insertBefore( this.container, editArea.container.firstChild ); - - // add event detection for hiding suggestion box - parent.editAreaLoader.add_event( document, "click", function(){ editArea.plugins['autocompletion']._hide();} ); - parent.editAreaLoader.add_event( editArea.textarea, "blur", function(){ editArea.plugins['autocompletion']._hide();} ); - - } - - /** - * Is called each time the user touch a keyboard key. - * - * @param (event) e: the keydown event - * @return true - pass to next handler in chain, false - stop chain execution - * @type boolean - */ - ,onkeydown: function(e){ - if(!this.enabled) - return true; - - if (EA_keys[e.keyCode]) - letter=EA_keys[e.keyCode]; - else - letter=String.fromCharCode(e.keyCode); - // shown - if( this._isShown() ) - { - // if escape, hide the box - if(letter=="Esc") - { - this._hide(); - return false; - } - // Enter - else if( letter=="Entrer") - { - var as = this.container.getElementsByTagName('A'); - // select a suggested entry - if( this.selectIndex >= 0 && this.selectIndex < as.length ) - { - as[ this.selectIndex ].onmousedown(); - return false - } - // simply add an enter in the code - else - { - this._hide(); - return true; - } - } - else if( letter=="Tab" || letter=="Down") - { - this._selectNext(); - return false; - } - else if( letter=="Up") - { - this._selectBefore(); - return false; - } - } - // hidden - else - { - - } - - // show current suggestion list and do autoSelect if possible (no matter it's shown or hidden) - if( letter=="Space" && CtrlPressed(e) ) - { - //parent.console.log('SHOW SUGGEST'); - this.forceDisplay = true; - this.autoSelectIfOneResult = true; - this._checkLetter(); - return false; - } - - // wait a short period for check that the cursor isn't moving - setTimeout("editArea.plugins['autocompletion']._checkDelayAndCursorBeforeDisplay();", editArea.check_line_selection_timer +5 ); - this.checkDelayTimer = false; - return true; - } - /** - * Executes a specific command, this function handles plugin commands. - * - * @param {string} cmd: the name of the command being executed - * @param {unknown} param: the parameter of the command - * @return true - pass to next handler in chain, false - stop chain execution - * @type boolean - */ - ,execCommand: function(cmd, param){ - switch( cmd ){ - case 'toggle_autocompletion': - var icon= document.getElementById("autocompletion"); - if(!this.enabled) - { - if(icon != null){ - editArea.restoreClass(icon); - editArea.switchClassSticky(icon, 'editAreaButtonSelected', true); - } - this.enabled= true; - } - else - { - this.enabled= false; - if(icon != null) - editArea.switchClassSticky(icon, 'editAreaButtonNormal', false); - } - return true; - } - return true; - } - ,_checkDelayAndCursorBeforeDisplay: function() - { - this.checkDelayTimer = setTimeout("if(editArea.textarea.selectionStart == "+ editArea.textarea.selectionStart +") EditArea_autocompletion._checkLetter();", this.delayBeforeDisplay - editArea.check_line_selection_timer - 5 ); - } - // hide the suggested box - ,_hide: function(){ - this.container.style.display="none"; - this.selectIndex = -1; - this.shown = false; - this.forceDisplay = false; - this.autoSelectIfOneResult = false; - } - // display the suggested box - ,_show: function(){ - if( !this._isShown() ) - { - this.container.style.display="block"; - this.selectIndex = -1; - this.shown = true; - } - } - // is the suggested box displayed? - ,_isShown: function(){ - return this.shown; - } - // setter and getter - ,_isInMiddleWord: function( new_value ){ - if( typeof( new_value ) == "undefined" ) - return this.isInMiddleWord; - else - this.isInMiddleWord = new_value; - } - // select the next element in the suggested box - ,_selectNext: function() - { - var as = this.container.getElementsByTagName('A'); - - // clean existing elements - for( var i=0; i= as.length || this.selectIndex < 0 ) ? 0 : this.selectIndex; - as[ this.selectIndex ].className += " focus"; - } - // select the previous element in the suggested box - ,_selectBefore: function() - { - var as = this.container.getElementsByTagName('A'); - - // clean existing elements - for( var i=0; i= as.length || this.selectIndex < 0 ) ? as.length-1 : this.selectIndex; - as[ this.selectIndex ].className += " focus"; - } - ,_select: function( content ) - { - cursor_forced_position = content.indexOf( '{@}' ); - content = content.replace(/{@}/g, '' ); - editArea.getIESelection(); - - // retrive the number of matching characters - var start_index = Math.max( 0, editArea.textarea.selectionEnd - content.length ); - - line_string = editArea.textarea.value.substring( start_index, editArea.textarea.selectionEnd + 1); - limit = line_string.length -1; - nbMatch = 0; - for( i =0; i 0 ) - parent.editAreaLoader.setSelectionRange(editArea.id, editArea.textarea.selectionStart - nbMatch , editArea.textarea.selectionEnd); - - parent.editAreaLoader.setSelectedText(editArea.id, content ); - range= parent.editAreaLoader.getSelectionRange(editArea.id); - - if( cursor_forced_position != -1 ) - new_pos = range["end"] - ( content.length-cursor_forced_position ); - else - new_pos = range["end"]; - parent.editAreaLoader.setSelectionRange(editArea.id, new_pos, new_pos); - this._hide(); - } - - - /** - * Parse the AUTO_COMPLETION part of syntax definition files - */ - ,_parseSyntaxAutoCompletionDatas: function(){ - //foreach syntax loaded - for(var lang in parent.editAreaLoader.load_syntax) - { - if(!parent.editAreaLoader.syntax[lang]['autocompletion']) // init the regexp if not already initialized - { - parent.editAreaLoader.syntax[lang]['autocompletion']= {}; - // the file has auto completion datas - if(parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION']) - { - // parse them - for(var i in parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION']) - { - datas = parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION'][i]; - tmp = {}; - if(datas["CASE_SENSITIVE"]!="undefined" && datas["CASE_SENSITIVE"]==false) - tmp["modifiers"]="i"; - else - tmp["modifiers"]=""; - tmp["prefix_separator"]= datas["REGEXP"]["prefix_separator"]; - tmp["match_prefix_separator"]= new RegExp( datas["REGEXP"]["prefix_separator"] +"$", tmp["modifiers"]); - tmp["match_word"]= new RegExp("(?:"+ datas["REGEXP"]["before_word"] +")("+ datas["REGEXP"]["possible_words_letters"] +")$", tmp["modifiers"]); - tmp["match_next_letter"]= new RegExp("^("+ datas["REGEXP"]["letter_after_word_must_match"] +")$", tmp["modifiers"]); - tmp["keywords"]= {}; - //console.log( datas["KEYWORDS"] ); - for( var prefix in datas["KEYWORDS"] ) - { - tmp["keywords"][prefix]= { - prefix: prefix, - prefix_name: prefix, - prefix_reg: new RegExp("(?:"+ parent.editAreaLoader.get_escaped_regexp( prefix ) +")(?:"+ tmp["prefix_separator"] +")$", tmp["modifiers"] ), - datas: [] - }; - for( var j=0; j it's valid - if( !match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length == 0 ) - { - if( ! before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) ) - hasMatch = true; - } - // we still need to check the prefix if there is one - else if( this.curr_syntax[i]["keywords"][prefix]['prefix'].length > 0 ) - { - if( before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) ) - hasMatch = true; - } - - if( hasMatch ) - results[results.length]= [ this.curr_syntax[i]["keywords"][prefix], this.curr_syntax[i]["keywords"][prefix]['datas'][j] ]; - } - } - } - } - // it doesn't match any possible word but we want to display something - // we'll display to list of all available words - else if( this.forceDisplay || match_prefix_separator ) - { - for(var prefix in this.curr_syntax[i]["keywords"]) - { - for(var j=0; j it's valid - if( !match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length == 0 ) - { - hasMatch = true; - } - // we still need to check the prefix if there is one - else if( match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length > 0 ) - { - var before = last_chars; //.substr( 0, last_chars.length ); - if( before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) ) - hasMatch = true; - } - - if( hasMatch ) - results[results.length]= [ this.curr_syntax[i]["keywords"][prefix], this.curr_syntax[i]["keywords"][prefix]['datas'][j] ]; - } - } - } - } - } - - // there is only one result, and we can select it automatically - if( results.length == 1 && this.autoSelectIfOneResult ) - { - // console.log( results ); - this._select( results[0][1]['replace_with'] ); - } - else if( results.length == 0 ) - { - this._hide(); - } - else - { - // build the suggestion box content - var lines=[]; - for(var i=0; i"+ results[i][1]['comment']; - if(results[i][0]['prefix_name'].length>0) - line+=''+ results[i][0]['prefix_name'] +''; - line+=''; - lines[lines.length]=line; - } - // sort results - this.container.innerHTML = '
        '+ lines.sort().join('') +'
      '; - - var cursor = _$("cursor_pos"); - this.container.style.top = ( cursor.cursor_top + editArea.lineHeight ) +"px"; - this.container.style.left = ( cursor.cursor_left + 8 ) +"px"; - this._show(); - } - - this.autoSelectIfOneResult = false; - time=new Date; - t2= time.getTime(); - - //parent.console.log( begin_word +"\n"+ (t2-t1) +"\n"+ html ); - } - } -}; - -// Load as a plugin -editArea.settings['plugins'][ editArea.settings['plugins'].length ] = 'autocompletion'; -editArea.add_plugin('autocompletion', EditArea_autocompletion); \ No newline at end of file diff --git a/upload/admin/js/3rd_party/edit_area/edit_area.css b/upload/admin/js/3rd_party/edit_area/edit_area.css deleted file mode 100644 index 172b366f..00000000 --- a/upload/admin/js/3rd_party/edit_area/edit_area.css +++ /dev/null @@ -1,530 +0,0 @@ -body, html{ - margin: 0; - padding: 0; - height: 100%; - border: none; - overflow: hidden; - background-color: #FFF; -} - -body, html, table, form, textarea{ - font: 12px monospace, sans-serif; -} - -#editor{ - border: solid #888 1px; - overflow: hidden; -} - -#result{ - z-index: 4; - overflow-x: auto; - overflow-y: scroll; - border-top: solid #888 1px; - border-bottom: solid #888 1px; - position: relative; - clear: both; -} - -#result.empty{ - overflow: hidden; -} - -#container{ - overflow: hidden; - border: solid blue 0; - position: relative; - z-index: 10; - padding: 0 5px 0 45px; - /*padding-right: 5px;*/ -} - -#textarea{ - position: relative; - top: 0; - left: 0; - margin: 0; - padding: 0; - width: 100%; - height: 100%; - overflow: hidden; - z-index: 7; - border-width: 0; - background-color: transparent; - resize: none; -} - -#textarea, #textarea:hover{ - outline: none; /* safari outline fix */ -} - -#content_highlight{ - white-space: pre; - margin: 0; - padding: 0; - position : absolute; - z-index: 4; - overflow: visible; -} - - -#selection_field, #selection_field_text{ - margin: 0; - background-color: #E1F2F9; -/* height: 1px; */ - position: absolute; - z-index: 5; - top: -100px; - padding: 0; - white-space: pre; - overflow: hidden; -} - -#selection_field.show_colors { - z-index: 3; - background-color:#EDF9FC; - -} - -#selection_field strong{ - font-weight:normal; -} - -#selection_field.show_colors *, #selection_field_text * { - visibility: hidden; -} - -#selection_field_text{ - background-color:transparent; -} - -#selection_field_text strong{ - font-weight:normal; - background-color:#3399FE; - color: #FFF; - visibility:visible; -} - -#container.word_wrap #content_highlight, -#container.word_wrap #selection_field, -#container.word_wrap #selection_field_text, -#container.word_wrap #test_font_size{ - white-space: pre-wrap; /* css-3 */ - white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - word-wrap: break-word; /* Internet Explorer 5.5+ */ - width: 99%; -} - -#line_number{ - position: absolute; - overflow: hidden; - border-right: solid black 1px; - z-index:8; - width: 38px; - padding: 0 5px 0 0; - margin: 0 0 0 -45px; - text-align: right; - color: #AAAAAA; -} - -#test_font_size{ - padding: 0; - margin: 0; - visibility: hidden; - position: absolute; - white-space: pre; -} - -pre{ - margin: 0; - padding: 0; -} - -.hidden{ - opacity: 0.2; - filter:alpha(opacity=20); -} - -#result .edit_area_cursor{ - position: absolute; - z-index:6; - background-color: #FF6633; - top: -100px; - margin: 0; -} - -#result .edit_area_selection_field .overline{ - background-color: #996600; -} - - -/* area popup */ -.editarea_popup{ - border: solid 1px #888888; - background-color: #ECE9D8; - width: 250px; - padding: 4px; - position: absolute; - visibility: hidden; - z-index: 15; - top: -500px; -} - -.editarea_popup, .editarea_popup table{ - font-family: sans-serif; - font-size: 10pt; -} - -.editarea_popup img{ - border: 0; -} - -.editarea_popup .close_popup{ - float: right; - line-height: 16px; - border: 0; - padding: 0; -} - -.editarea_popup h1,.editarea_popup h2,.editarea_popup h3,.editarea_popup h4,.editarea_popup h5,.editarea_popup h6{ - margin: 0; - padding: 0; -} - -.editarea_popup .copyright{ - text-align: right; -} - -/* Area_search */ -div#area_search_replace{ - /*width: 250px;*/ -} - -div#area_search_replace img{ - border: 0; -} - -div#area_search_replace div.button{ - text-align: center; - line-height: 1.7em; -} - -div#area_search_replace .button a{ - cursor: pointer; - border: solid 1px #888888; - background-color: #DEDEDE; - text-decoration: none; - padding: 0 2px; - color: #000000; - white-space: nowrap; -} - -div#area_search_replace a:hover{ - /*border: solid 1px #888888;*/ - background-color: #EDEDED; -} - -div#area_search_replace #move_area_search_replace{ - cursor: move; - border: solid 1px #888; -} - -div#area_search_replace #close_area_search_replace{ - text-align: right; - vertical-align: top; - white-space: nowrap; -} - -div#area_search_replace #area_search_msg{ - height: 18px; - overflow: hidden; - border-top: solid 1px #888; - margin-top: 3px; -} - -/* area help */ -#edit_area_help{ - width: 350px; -} - -#edit_area_help div.close_popup{ - float: right; -} - -/* area_toolbar */ -.area_toolbar{ - /*font: 11px sans-serif;*/ - width: 100%; - /*height: 21px; */ - margin: 0; - padding: 0; - background-color: #ECE9D8; - text-align: center; -} - -.area_toolbar, .area_toolbar table{ - font: 11px sans-serif; -} - -.area_toolbar img{ - border: 0; - vertical-align: middle; -} - -.area_toolbar input{ - margin: 0; - padding: 0; -} - -.area_toolbar select{ - font-family: 'MS Sans Serif',sans-serif,Verdana,Arial; - font-size: 7pt; - font-weight: normal; - margin: 2px 0 0 0 ; - padding: 0; - vertical-align: top; - background-color: #F0F0EE; -} - -table.statusbar{ - width: 100%; -} - -.area_toolbar td.infos{ - text-align: center; - width: 130px; - border-right: solid 1px #888; - border-width: 0 1px 0 0; - padding: 0; -} - -.area_toolbar td.total{ - text-align: right; - width: 50px; - padding: 0; -} - -.area_toolbar td.resize{ - text-align: right; -} -/* -.area_toolbar span{ - line-height: 1px; - padding: 0; - margin: 0; -}*/ - -.area_toolbar span#resize_area{ - cursor: nw-resize; - visibility: hidden; -} - -/* toolbar buttons */ -.editAreaButtonNormal, .editAreaButtonOver, .editAreaButtonDown, .editAreaSeparator, .editAreaSeparatorLine, .editAreaButtonDisabled, .editAreaButtonSelected { - border: 0; margin: 0; padding: 0; background: transparent; - margin-top: 0; - margin-left: 1px; - padding: 0; -} - -.editAreaButtonNormal { - border: 1px solid #ECE9D8 !important; - cursor: pointer; -} - -.editAreaButtonOver { - border: 1px solid #0A246A !important; - cursor: pointer; - background-color: #B6BDD2; -} - -.editAreaButtonDown { - cursor: pointer; - border: 1px solid #0A246A !important; - background-color: #8592B5; -} - -.editAreaButtonSelected { - border: 1px solid #C0C0BB !important; - cursor: pointer; - background-color: #F4F2E8; -} - -.editAreaButtonDisabled { - filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); - -moz-opacity:0.3; - opacity: 0.3; - border: 1px solid #F0F0EE !important; - cursor: pointer; -} - -.editAreaSeparatorLine { - margin: 1px 2px; - background-color: #C0C0BB; - width: 2px; - height: 18px; -} - -/* waiting screen */ -#processing{ - display: none; - background-color:#ECE9D8; - border: solid #888 1px; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 100; - text-align: center; -} - -#processing_text{ - position:absolute; - left: 50%; - top: 50%; - width: 200px; - height: 20px; - margin-left: -100px; - margin-top: -10px; - text-align: center; -} -/* end */ - - -/**** tab browsing area ****/ -#tab_browsing_area{ - display: none; - background-color: #CCC9A8; - border-top: 1px solid #888; - text-align: left; - margin: 0; -} - -#tab_browsing_list { - padding: 0; - margin: 0; - list-style-type: none; - white-space: nowrap; -} -#tab_browsing_list li { - float: left; - margin: -1px; -} -#tab_browsing_list a { - position: relative; - display: block; - text-decoration: none; - float: left; - cursor: pointer; - line-height:14px; -} - -#tab_browsing_list a span { - display: block; - color: #000; - background: #ECE9D8; - border: 1px solid #888; - border-width: 1px 1px 0; - text-align: center; - padding: 2px 2px 1px 4px; - position: relative; /*IE 6 hack */ -} - -#tab_browsing_list a b { - display: block; - border-bottom: 2px solid #617994; -} - -#tab_browsing_list a .edited { - display: none; -} - -#tab_browsing_list a.edited .edited { - display: inline; -} - -#tab_browsing_list a img{ - margin-left: 7px; -} - -#tab_browsing_list a.edited img{ - margin-left: 3px; -} - -#tab_browsing_list a:hover span { - background: #F4F2E8; - border-color: #0A246A; -} - -#tab_browsing_list .selected a span{ - background: #046380; - color: #FFF; -} - - -#no_file_selected{ - height: 100%; - width: 150%; /* Opera need more than 100% */ - background: #CCC; - display: none; - z-index: 20; - position: absolute; -} - - -/*** Non-editable mode ***/ -.non_editable #editor -{ - border-width: 0 1px; -} - -.non_editable .area_toolbar -{ - display: none; -} - -/*** Auto completion ***/ -#auto_completion_area -{ - background: #FFF; - border: solid 1px #888; - position: absolute; - z-index: 15; - width: 280px; - height: 180px; - overflow: auto; - display:none; -} - -#auto_completion_area a, #auto_completion_area a:visited -{ - display: block; - padding: 0 2px 1px; - color: #000; - text-decoration:none; -} - -#auto_completion_area a:hover, #auto_completion_area a:focus, #auto_completion_area a.focus -{ - background: #D6E1FE; - text-decoration:none; -} - -#auto_completion_area ul -{ - margin: 0; - padding: 0; - list-style: none inside; -} -#auto_completion_area li -{ - padding: 0; -} -#auto_completion_area .prefix -{ - font-style: italic; - padding: 0 3px; -} \ No newline at end of file diff --git a/upload/admin/js/3rd_party/edit_area/edit_area.js b/upload/admin/js/3rd_party/edit_area/edit_area.js deleted file mode 100644 index 27674f67..00000000 --- a/upload/admin/js/3rd_party/edit_area/edit_area.js +++ /dev/null @@ -1,525 +0,0 @@ -/****** - * - * EditArea - * Developped by Christophe Dolivet - * Released under LGPL, Apache and BSD licenses (use the one you want) - * -******/ - - function EditArea(){ - var t=this; - t.error= false; // to know if load is interrrupt - - t.inlinePopup= [{popup_id: "area_search_replace", icon_id: "search"}, - {popup_id: "edit_area_help", icon_id: "help"}]; - t.plugins= {}; - - t.line_number=0; - - parent.editAreaLoader.set_browser_infos(t); // navigator identification - // fix IE8 detection as we run in IE7 emulate mode through X-UA tag - if( t.isIE >= 8 ) - t.isIE = 7; - - t.last_selection={}; - t.last_text_to_highlight=""; - t.last_hightlighted_text= ""; - t.syntax_list= []; - t.allready_used_syntax= {}; - t.check_line_selection_timer= 50; // the timer delay for modification and/or selection change detection - - t.textareaFocused= false; - t.highlight_selection_line= null; - t.previous= []; - t.next= []; - t.last_undo=""; - t.files= {}; - t.filesIdAssoc= {}; - t.curr_file= ''; - //t.loaded= false; - t.assocBracket={}; - t.revertAssocBracket= {}; - // bracket selection init - t.assocBracket["("]=")"; - t.assocBracket["{"]="}"; - t.assocBracket["["]="]"; - for(var index in t.assocBracket){ - t.revertAssocBracket[t.assocBracket[index]]=index; - } - t.is_editable= true; - - - /*t.textarea=""; - - t.state="declare"; - t.code = []; // store highlight syntax for languagues*/ - // font datas - t.lineHeight= 16; - /*t.default_font_family= "monospace"; - t.default_font_size= 10;*/ - t.tab_nb_char= 8; //nb of white spaces corresponding to a tabulation - if(t.isOpera) - t.tab_nb_char= 6; - - t.is_tabbing= false; - - t.fullscreen= {'isFull': false}; - - t.isResizing=false; // resize var - - // init with settings and ID (area_id is a global var defined by editAreaLoader on iframe creation - t.id= area_id; - t.settings= editAreas[t.id]["settings"]; - - if((""+t.settings['replace_tab_by_spaces']).match(/^[0-9]+$/)) - { - t.tab_nb_char= t.settings['replace_tab_by_spaces']; - t.tabulation=""; - for(var i=0; i0) - t.syntax_list= t.settings["syntax_selection_allow"].replace(/ /g,"").split(","); - - if(t.settings['syntax']) - t.allready_used_syntax[t.settings['syntax']]=true; - - - }; - EditArea.prototype.init= function(){ - var t=this, a, s=t.settings; - t.textarea = _$("textarea"); - t.container = _$("container"); - t.result = _$("result"); - t.content_highlight = _$("content_highlight"); - t.selection_field = _$("selection_field"); - t.selection_field_text= _$("selection_field_text"); - t.processing_screen = _$("processing"); - t.editor_area = _$("editor"); - t.tab_browsing_area = _$("tab_browsing_area"); - t.test_font_size = _$("test_font_size"); - a = t.textarea; - - if(!s['is_editable']) - t.set_editable(false); - - t.set_show_line_colors( s['show_line_colors'] ); - - if(syntax_selec= _$("syntax_selection")) - { - // set up syntax selection lsit in the toolbar - for(var i=0; i= '3' ) { - t.content_highlight.style.paddingLeft= "1px"; - t.selection_field.style.paddingLeft= "1px"; - t.selection_field_text.style.paddingLeft= "1px"; - } - - if(t.isIE && t.isIE < 8 ){ - a.style.marginTop= "-1px"; - } - /* - if(t.isOpera){ - t.editor_area.style.position= "absolute"; - }*/ - - if( t.isSafari ){ - t.editor_area.style.position = "absolute"; - a.style.marginLeft ="-3px"; - if( t.isSafari < 3.2 ) // Safari 3.0 (3.1?) - a.style.marginTop ="1px"; - } - - // si le textarea n'est pas grand, un click sous le textarea doit provoquer un focus sur le textarea - parent.editAreaLoader.add_event(t.result, "click", function(e){ if((e.target || e.srcElement)==editArea.result) { editArea.area_select(editArea.textarea.value.length, 0);} }); - - if(s['is_multi_files']!=false) - t.open_file({'id': t.curr_file, 'text': ''}); - - t.set_word_wrap( s['word_wrap'] ); - - setTimeout("editArea.focus();editArea.manage_size();editArea.execCommand('EA_load');", 10); - //start checkup routine - t.check_undo(); - t.check_line_selection(true); - t.scroll_to_view(); - - for(var i in t.plugins){ - if(typeof(t.plugins[i].onload)=="function") - t.plugins[i].onload(); - } - if(s['fullscreen']==true) - t.toggle_full_screen(true); - - parent.editAreaLoader.add_event(window, "resize", editArea.update_size); - parent.editAreaLoader.add_event(parent.window, "resize", editArea.update_size); - parent.editAreaLoader.add_event(top.window, "resize", editArea.update_size); - parent.editAreaLoader.add_event(window, "unload", function(){ - // in case where editAreaLoader have been already cleaned - if( parent.editAreaLoader ) - { - parent.editAreaLoader.remove_event(parent.window, "resize", editArea.update_size); - parent.editAreaLoader.remove_event(top.window, "resize", editArea.update_size); - } - if(editAreas[editArea.id] && editAreas[editArea.id]["displayed"]){ - editArea.execCommand("EA_unload"); - } - }); - - - /*date= new Date(); - alert(date.getTime()- parent.editAreaLoader.start_time);*/ - }; - - - - //called by the toggle_on - EditArea.prototype.update_size= function(){ - var d=document,pd=parent.document,height,width,popup,maxLeft,maxTop; - - if( typeof editAreas != 'undefined' && editAreas[editArea.id] && editAreas[editArea.id]["displayed"]==true){ - if(editArea.fullscreen['isFull']){ - pd.getElementById("frame_"+editArea.id).style.width = pd.getElementsByTagName("html")[0].clientWidth + "px"; - pd.getElementById("frame_"+editArea.id).style.height = pd.getElementsByTagName("html")[0].clientHeight + "px"; - } - - if(editArea.tab_browsing_area.style.display=='block' && ( !editArea.isIE || editArea.isIE >= 8 ) ) - { - editArea.tab_browsing_area.style.height = "0px"; - editArea.tab_browsing_area.style.height = (editArea.result.offsetTop - editArea.tab_browsing_area.offsetTop -1)+"px"; - } - - height = d.body.offsetHeight - editArea.get_all_toolbar_height() - 4; - editArea.result.style.height = height +"px"; - - width = d.body.offsetWidth -2; - editArea.result.style.width = width+"px"; - //alert("result h: "+ height+" w: "+width+"\ntoolbar h: "+this.get_all_toolbar_height()+"\nbody_h: "+document.body.offsetHeight); - - // check that the popups don't get out of the screen - for( i=0; i < editArea.inlinePopup.length; i++ ) - { - popup = _$(editArea.inlinePopup[i]["popup_id"]); - maxLeft = d.body.offsetWidth - popup.offsetWidth; - maxTop = d.body.offsetHeight - popup.offsetHeight; - if( popup.offsetTop > maxTop ) - popup.style.top = maxTop+"px"; - if( popup.offsetLeft > maxLeft ) - popup.style.left = maxLeft+"px"; - } - - editArea.manage_size( true ); - editArea.fixLinesHeight( editArea.textarea.value, 0,-1); - } - }; - - - EditArea.prototype.manage_size= function(onlyOneTime){ - if(!editAreas[this.id]) - return false; - - if(editAreas[this.id]["displayed"]==true && this.textareaFocused) - { - var area_height,resized= false; - - //1) Manage display width - //1.1) Calc the new width to use for display - if( !this.settings['word_wrap'] ) - { - var area_width= this.textarea.scrollWidth; - area_height= this.textarea.scrollHeight; - // bug on old opera versions - if(this.isOpera && this.isOpera < 9.6 ){ - area_width=10000; - } - //1.2) the width is not the same, we must resize elements - if(this.textarea.previous_scrollWidth!=area_width) - { - this.container.style.width= area_width+"px"; - this.textarea.style.width= area_width+"px"; - this.content_highlight.style.width= area_width+"px"; - this.textarea.previous_scrollWidth=area_width; - resized=true; - } - } - // manage wrap width - if( this.settings['word_wrap'] ) - { - newW=this.textarea.offsetWidth; - if( this.isFirefox || this.isIE ) - newW-=2; - if( this.isSafari ) - newW-=6; - this.content_highlight.style.width=this.selection_field_text.style.width=this.selection_field.style.width=this.test_font_size.style.width=newW+"px"; - } - - //2) Manage display height - //2.1) Calc the new height to use for display - if( this.isOpera || this.isFirefox || this.isSafari ) { - area_height= this.getLinePosTop( this.last_selection["nb_line"] + 1 ); - } else { - area_height = this.textarea.scrollHeight; - } - //2.2) the width is not the same, we must resize elements - if(this.textarea.previous_scrollHeight!=area_height) - { - this.container.style.height= (area_height+2)+"px"; - this.textarea.style.height= area_height+"px"; - this.content_highlight.style.height= area_height+"px"; - this.textarea.previous_scrollHeight= area_height; - resized=true; - } - - //3) if there is new lines, we add new line numbers in the line numeration area - if(this.last_selection["nb_line"] >= this.line_number) - { - var newLines= '', destDiv=_$("line_number"), start=this.line_number, end=this.last_selection["nb_line"]+100; - for( i = start+1; i < end; i++ ) - { - newLines+='
      '+i+"
      "; - this.line_number++; - } - destDiv.innerHTML= destDiv.innerHTML + newLines; - - this.fixLinesHeight( this.textarea.value, start, -1 ); - } - - //4) be sure the text is well displayed - this.textarea.scrollTop="0px"; - this.textarea.scrollLeft="0px"; - if(resized==true){ - this.scroll_to_view(); - } - } - - if(!onlyOneTime) - setTimeout("editArea.manage_size();", 100); - }; - - EditArea.prototype.execCommand= function(cmd, param){ - - for(var i in this.plugins){ - if(typeof(this.plugins[i].execCommand)=="function"){ - if(!this.plugins[i].execCommand(cmd, param)) - return; - } - } - switch(cmd){ - case "save": - if(this.settings["save_callback"].length>0) - eval("parent."+this.settings["save_callback"]+"('"+ this.id +"', editArea.textarea.value);"); - break; - case "load": - if(this.settings["load_callback"].length>0) - eval("parent."+this.settings["load_callback"]+"('"+ this.id +"');"); - break; - case "onchange": - if(this.settings["change_callback"].length>0) - eval("parent."+this.settings["change_callback"]+"('"+ this.id +"');"); - break; - case "EA_load": - if(this.settings["EA_load_callback"].length>0) - eval("parent."+this.settings["EA_load_callback"]+"('"+ this.id +"');"); - break; - case "EA_unload": - if(this.settings["EA_unload_callback"].length>0) - eval("parent."+this.settings["EA_unload_callback"]+"('"+ this.id +"');"); - break; - case "toggle_on": - if(this.settings["EA_toggle_on_callback"].length>0) - eval("parent."+this.settings["EA_toggle_on_callback"]+"('"+ this.id +"');"); - break; - case "toggle_off": - if(this.settings["EA_toggle_off_callback"].length>0) - eval("parent."+this.settings["EA_toggle_off_callback"]+"('"+ this.id +"');"); - break; - case "re_sync": - if(!this.do_highlight) - break; - case "file_switch_on": - if(this.settings["EA_file_switch_on_callback"].length>0) - eval("parent."+this.settings["EA_file_switch_on_callback"]+"(param);"); - break; - case "file_switch_off": - if(this.settings["EA_file_switch_off_callback"].length>0) - eval("parent."+this.settings["EA_file_switch_off_callback"]+"(param);"); - break; - case "file_close": - if(this.settings["EA_file_close_callback"].length>0) - return eval("parent."+this.settings["EA_file_close_callback"]+"(param);"); - break; - - default: - if(typeof(eval("editArea."+cmd))=="function") - { - if(this.settings["debug"]) - eval("editArea."+ cmd +"(param);"); - else - try{eval("editArea."+ cmd +"(param);");}catch(e){}; - } - } - }; - - EditArea.prototype.get_translation= function(word, mode){ - if(mode=="template") - return parent.editAreaLoader.translate(word, this.settings["language"], mode); - else - return parent.editAreaLoader.get_word_translation(word, this.settings["language"]); - }; - - EditArea.prototype.add_plugin= function(plug_name, plug_obj){ - for(var i=0; i"); - } - }; - - EditArea.prototype.load_script= function(url){ - try{ - script = document.createElement("script"); - script.type = "text/javascript"; - script.src = url; - script.charset= "UTF-8"; - head = document.getElementsByTagName("head"); - head[0].appendChild(script); - }catch(e){ - document.write("\";\n", $sub_scripts); - - - // add the script and use a last compression - if( $this->param['compress'] ) - { - $last_comp = array( 'Á' => 'this', - 'Â' => 'textarea', - 'Ã' => 'function', - 'Ä' => 'prototype', - 'Å' => 'settings', - 'Æ' => 'length', - 'Ç' => 'style', - 'È' => 'parent', - 'É' => 'last_selection', - 'Ê' => 'value', - 'Ë' => 'true', - 'Ì' => 'false' - /*, - 'Î' => '"', - 'Ï' => "\n", - 'À' => "\r"*/); - } - else - { - $last_comp = array(); - } - - $js_replace= ''; - foreach( $last_comp as $key => $val ) - $js_replace .= ".replace(/". $key ."/g,'". str_replace( array("\n", "\r"), array('\n','\r'), $val ) ."')"; - - $this->datas.= sprintf("editAreaLoader.iframe_script= \"\"%s;\n", - str_replace( array_values($last_comp), array_keys($last_comp), $sub_scripts ), - $js_replace); - - if($this->load_all_plugins) - $this->datas.="editAreaLoader.all_plugins_loaded=true;\n"; - - - // load the template - $this->datas.= sprintf("editAreaLoader.template= \"%s\";\n", $this->get_html_content("template.html")); - // load the css - $this->datas.= sprintf("editAreaLoader.iframe_css= \"\";\n", $this->get_css_content("edit_area.css")); - - // $this->datas= "function editArea(){};editArea.prototype.loader= function(){alert('bouhbouh');} var a= new editArea();a.loader();"; - - } - - function send_datas() - { - if($this->param['debug']){ - $header=sprintf("/* USE PHP COMPRESSION\n"); - $header.=sprintf("javascript size: based files: %s => PHP COMPRESSION => %s ", $this->file_loaded_size, strlen($this->datas)); - if($this->use_gzip){ - $gzip_datas= gzencode($this->datas, 9, FORCE_GZIP); - $header.=sprintf("=> GZIP COMPRESSION => %s", strlen($gzip_datas)); - $ratio = round(100 - strlen($gzip_datas) / $this->file_loaded_size * 100.0); - }else{ - $ratio = round(100 - strlen($this->datas) / $this->file_loaded_size * 100.0); - } - $header.=sprintf(", reduced by %s%%\n", $ratio); - $header.=sprintf("compression time: %s\n", $this->get_microtime()-$this->start_time); - $header.=sprintf("%s\n", implode("\n", $this->infos)); - $header.=sprintf("*/\n"); - $this->datas= $header.$this->datas; - } - $mtime= time(); // ensure that the 2 disk files will have the same update time - // generate gzip file and cahce it if using disk cache - if($this->use_gzip){ - $this->gzip_datas= gzencode($this->datas, 9, FORCE_GZIP); - if($this->param['use_disk_cache']) - $this->file_put_contents($this->gzip_cache_file, $this->gzip_datas, $mtime); - } - - // generate full js file and cache it if using disk cache - if($this->param['use_disk_cache']) - $this->file_put_contents($this->full_cache_file, $this->datas, $mtime); - - // generate output - if($this->use_gzip) - echo $this->gzip_datas; - else - echo $this->datas; - -// die; - } - - - function get_content($end_uri) - { - $end_uri=preg_replace("/\.\./", "", $end_uri); // Remove any .. (security) - $file= $this->path.$end_uri; - if(file_exists($file)){ - $this->infos[]=sprintf("'%s' loaded", $end_uri); - /*$fd = fopen($file, 'rb'); - $content = fread($fd, filesize($file)); - fclose($fd); - return $content;*/ - return $this->file_get_contents($file); - }else{ - $this->infos[]=sprintf("'%s' not loaded", $end_uri); - return ""; - } - } - - function get_javascript_content($end_uri) - { - $val=$this->get_content($end_uri); - - $this->compress_javascript($val); - $this->prepare_string_for_quotes($val); - return $val; - } - - function compress_javascript(&$code) - { - if($this->param['compress']) - { - // remove all comments - // (\"(?:[^\"\\]*(?:\\\\)*(?:\\\"?)?)*(?:\"|$))|(\'(?:[^\'\\]*(?:\\\\)*(?:\\'?)?)*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$)) - $code= preg_replace("/(\"(?:[^\"\\\\]*(?:\\\\\\\\)*(?:\\\\\"?)?)*(?:\"|$))|(\'(?:[^\'\\\\]*(?:\\\\\\\\)*(?:\\\\\'?)?)*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "$1$2$3", $code); - // remove line return, empty line and tabulation - $code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', " ", $code); - // add line break before "else" otherwise navigators can't manage to parse the file - $code= preg_replace('/(\b(else)\b)/', "\n$1", $code); - // remove unnecessary spaces - $code= preg_replace('/( |\t|\r)*(;|\{|\}|=|==|\-|\+|,|\(|\)|\|\||&\&|\:)( |\t|\r)*/', "$2", $code); - } - } - - function get_css_content($end_uri){ - $code=$this->get_content($end_uri); - // remove comments - $code= preg_replace("/(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "", $code); - // remove spaces - $code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', "", $code); - // remove spaces - $code= preg_replace('/( |\t|\r)?(\:|,|\{|\})( |\t|\r)+/', "$2", $code); - - $this->prepare_string_for_quotes($code); - return $code; - } - - function get_html_content($end_uri){ - $code=$this->get_content($end_uri); - //$code= preg_replace('/(\"(?:\\\"|[^\"])*(?:\"|$))|' . "(\'(?:\\\'|[^\'])*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "$1$2$3", $code); - $code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', " ", $code); - $this->prepare_string_for_quotes($code); - return $code; - } - - function prepare_string_for_quotes(&$str){ - // prepare the code to be putted into quotes - /*$pattern= array("/(\\\\)?\"/", '/\\\n/' , '/\\\r/' , "/(\r?\n)/"); - $replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r' , '\\\n"$1+"');*/ - $pattern= array("/(\\\\)?\"/", '/\\\n/' , '/\\\r/' , "/(\r?\n)/"); - if($this->param['compress']) - $replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r' , '\n'); - else - $replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r' , "\\n\"\n+\""); - $str= preg_replace($pattern, $replace, $str); - } - - function replace_scripts($var, $param1, $param2) - { - $this->$var=stripslashes($param2); - return $param1."[];"; - } - - /* for php version that have not thoses functions */ - function file_get_contents($file) - { - $fd = fopen($file, 'rb'); - $content = fread($fd, filesize($file)); - fclose($fd); - $this->file_loaded_size+= strlen($content); - return $content; - } - - function file_put_contents($file, &$content, $mtime=-1) - { - if($mtime==-1) - $mtime=time(); - $fp = @fopen($file, "wb"); - if ($fp) { - fwrite($fp, $content); - fclose($fp); - touch($file, $mtime); - return true; - } - return false; - } - - function get_microtime() - { - list($usec, $sec) = explode(" ", microtime()); - return ((float)$usec + (float)$sec); - } - } -?> diff --git a/upload/admin/js/3rd_party/edit_area/edit_area_full.gz b/upload/admin/js/3rd_party/edit_area/edit_area_full.gz deleted file mode 100644 index 8cfc846f..00000000 Binary files a/upload/admin/js/3rd_party/edit_area/edit_area_full.gz and /dev/null differ diff --git a/upload/admin/js/3rd_party/edit_area/edit_area_full.js b/upload/admin/js/3rd_party/edit_area/edit_area_full.js deleted file mode 100644 index db136a89..00000000 --- a/upload/admin/js/3rd_party/edit_area/edit_area_full.js +++ /dev/null @@ -1,38 +0,0 @@ - function EAL(){var t=this;t.version="0.8.1.1";date=new Date();t.start_time=date.getTime();t.win="loading";t.error=false;t.baseURL="";t.template="";t.lang={};t.load_syntax={};t.syntax={};t.loadedFiles=[];t.waiting_loading={};t.scripts_to_load=[];t.sub_scripts_to_load=[];t.resize=[];t.hidden={};t.default_settings={debug:false,smooth_selection:true,font_size:"10",font_family:"monospace",start_highlight:false,toolbar:"search,go_to_line,fullscreen,|,undo,redo,|,select_font,|,change_smooth_selection,highlight,reset_highlight,word_wrap,|,help",begin_toolbar:"",end_toolbar:"",is_multi_files:false,allow_resize:"both",show_line_colors:false,min_width:400,min_height:125,replace_tab_by_spaces:false,allow_toggle:true,language:"en",syntax:"",syntax_selection_allow:"basic,brainfuck,c,coldfusion,cpp,css,html,java,js,pas,perl,php,python,ruby,robotstxt,sql,tsql,vb,xml",display:"onload",max_undo:30,browsers:"known",plugins:"",gecko_spellcheck:false,fullscreen:false,is_editable:true,cursor_position:"begin",word_wrap:false,autocompletion:false,load_callback:"",save_callback:"",change_callback:"",submit_callback:"",EA_init_callback:"",EA_delete_callback:"",EA_load_callback:"",EA_unload_callback:"",EA_toggle_on_callback:"",EA_toggle_off_callback:"",EA_file_switch_on_callback:"",EA_file_switch_off_callback:"",EA_file_close_callback:""};t.advanced_buttons=[ ['new_document','newdocument.gif','new_document',false],['search','search.gif','show_search',false],['go_to_line','go_to_line.gif','go_to_line',false],['undo','undo.gif','undo',true],['redo','redo.gif','redo',true],['change_smooth_selection','smooth_selection.gif','change_smooth_selection_mode',true],['reset_highlight','reset_highlight.gif','resync_highlight',true],['highlight','highlight.gif','change_highlight',true],['help','help.gif','show_help',false],['save','save.gif','save',false],['load','load.gif','load',false],['fullscreen','fullscreen.gif','toggle_full_screen',false],['word_wrap','word_wrap.gif','toggle_word_wrap',true],['autocompletion','autocompletion.gif','toggle_autocompletion',true] ];t.set_browser_infos(t);if(t.isIE>=6||t.isGecko||(t.isWebKit&&!t.isSafari<3)||t.isOpera>=9||t.isCamino)t.isValidBrowser=true; -else t.isValidBrowser=false;t.set_base_url();for(var i=0;i0)s["toolbar"]=s["begin_toolbar"]+","+s["toolbar"];if(s["end_toolbar"].length>0)s["toolbar"]=s["toolbar"]+","+s["end_toolbar"];s["tab_toolbar"]=s["toolbar"].replace(/ /g,"").split(",");s["plugins"]=s["plugins"].replace(/ /g,"").split(",");for(i=0;i0){s["syntax"]=s["syntax"].toLowerCase();t.load_script(t.baseURL+"reg_syntax/"+s["syntax"]+".js");}eAs[s["id"]]={"settings":s};eAs[s["id"]]["displayed"]=false;eAs[s["id"]]["hidden"]=false;t.start(s["id"]);},delete_instance:function(id){var d=document,fs=window.frames,span,iframe;eAL.execCommand(id,"EA_delete");if(fs["frame_"+id]&&fs["frame_"+id].editArea){if(eAs[id]["displayed"])eAL.toggle(id,"off");fs["frame_"+id].editArea.execCommand("EA_unload");}span=d.getElementById("EditAreaArroundInfos_"+id);if(span)span.parentNode.removeChild(span);iframe=d.getElementById("frame_"+id);if(iframe){iframe.parentNode.removeChild(iframe);try{delete fs["frame_"+id];}catch(e){}}delete eAs[id];},start:function(id){var t=this,d=document,f,span,father,next,html='',html_toolbar_content='',template,content,i;if(t.win!="loaded"){setTimeout("eAL.start('"+id+"');",50);return;}for(i in t.waiting_loading){if(t.waiting_loading[i]!="loaded"&&typeof(t.waiting_loading[i])!="function"){setTimeout("eAL.start('"+id+"');",50);return;}}if(!t.lang[eAs[id]["settings"]["language"]]||(eAs[id]["settings"]["syntax"].length>0&&!t.load_syntax[eAs[id]["settings"]["syntax"]])){setTimeout("eAL.start('"+id+"');",50);return;}if(eAs[id]["settings"]["syntax"].length>0)t.init_syntax_regexp();if(!d.getElementById("EditAreaArroundInfos_"+id)&&(eAs[id]["settings"]["debug"]||eAs[id]["settings"]["allow_toggle"])){span=d.createElement("span");span.id="EditAreaArroundInfos_"+id;if(eAs[id]["settings"]["allow_toggle"]){checked=(eAs[id]["settings"]["display"]=="onload")?"checked='checked'":"";html+="
      ";html+="";html+="
      ";}if(eAs[id]["settings"]["debug"])html+="
      ";html=t.translate(html,eAs[id]["settings"]["language"]);span.innerHTML=html;father=d.getElementById(id).parentNode;next=d.getElementById(id).nextSibling;if(next==null)father.appendChild(span); -else father.insertBefore(span,next);}if(!eAs[id]["initialized"]){t.execCommand(id,"EA_init");if(eAs[id]["settings"]["display"]=="later"){eAs[id]["initialized"]=true;return;}}if(t.isIE){t.init_ie_textarea(id);}area=eAs[id];for(i=0;i';}for(i=0;i';t.iframe_script+='';}if(!t.iframe_css){t.iframe_css="";}template=t.template.replace(/\[__BASEURL__\]/g,t.baseURL);template=template.replace("[__TOOLBAR__]",html_toolbar_content);template=t.translate(template,area["settings"]["language"],"template");template=template.replace("[__CSSRULES__]",t.iframe_css);template=template.replace("[__JSCODE__]",t.iframe_script);template=template.replace("[__EA_VERSION__]",t.version);area.textarea=d.getElementById(area["settings"]["id"]);eAs[area["settings"]["id"]]["textarea"]=area.textarea;if(typeof(window.frames["frame_"+area["settings"]["id"]])!='undefined')delete window.frames["frame_"+area["settings"]["id"]];father=area.textarea.parentNode;content=d.createElement("iframe");content.name="frame_"+area["settings"]["id"];content.id="frame_"+area["settings"]["id"];content.style.borderWidth="0px";setAttribute(content,"frameBorder","0");content.style.overflow="hidden";content.style.display="none";next=area.textarea.nextSibling;if(next==null)father.appendChild(content); -else father.insertBefore(content,next);f=window.frames["frame_"+area["settings"]["id"]];f.document.open();f.eAs=eAs;f.area_id=area["settings"]["id"];f.document.area_id=area["settings"]["id"];f.document.write(template);f.document.close();},toggle:function(id,toggle_to){if(!toggle_to)toggle_to=(eAs[id]["displayed"]==true)?"off":"on";if(eAs[id]["displayed"]==true&&toggle_to=="off"){this.toggle_off(id);} -else if(eAs[id]["displayed"]==false&&toggle_to=="on"){this.toggle_on(id);}return false;},toggle_off:function(id){var fs=window.frames,f,t,parNod,nxtSib,selStart,selEnd,scrollTop,scrollLeft;if(fs["frame_"+id]){f=fs["frame_"+id];t=eAs[id]["textarea"];if(f.editArea.fullscreen['isFull'])f.editArea.toggle_full_screen(false);eAs[id]["displayed"]=false;t.wrap="off";setAttribute(t,"wrap","off");parNod=t.parentNode;nxtSib=t.nextSibling;parNod.removeChild(t);parNod.insertBefore(t,nxtSib);t.value=f.editArea.textarea.value;selStart=f.editArea.last_selection["selectionStart"];selEnd=f.editArea.last_selection["selectionEnd"];scrollTop=f.document.getElementById("result").scrollTop;scrollLeft=f.document.getElementById("result").scrollLeft;document.getElementById("frame_"+id).style.display='none';t.style.display="inline";try{t.focus();}catch(e){};if(this.isIE){t.selectionStart=selStart;t.selectionEnd=selEnd;t.focused=true;set_IE_selection(t);} -else{if(this.isOpera&&this.isOpera < 9.6){t.setSelectionRange(0,0);}try{t.setSelectionRange(selStart,selEnd);}catch(e){};}t.scrollTop=scrollTop;t.scrollLeft=scrollLeft;f.editArea.execCommand("toggle_off");}},toggle_on:function(id){var fs=window.frames,f,t,selStart=0,selEnd=0,scrollTop=0,scrollLeft=0,curPos,elem;if(fs["frame_"+id]){f=fs["frame_"+id];t=eAs[id]["textarea"];area=f.editArea;area.textarea.value=t.value;curPos=eAs[id]["settings"]["cursor_position"];if(t.use_last==true){selStart=t.last_selectionStart;selEnd=t.last_selectionEnd;scrollTop=t.last_scrollTop;scrollLeft=t.last_scrollLeft;t.use_last=false;} -else if(curPos=="auto"){try{selStart=t.selectionStart;selEnd=t.selectionEnd;scrollTop=t.scrollTop;scrollLeft=t.scrollLeft;}catch(ex){}}this.set_editarea_size_from_textarea(id,document.getElementById("frame_"+id));t.style.display="none";document.getElementById("frame_"+id).style.display="inline";area.execCommand("focus");eAs[id]["displayed"]=true;area.execCommand("update_size");f.document.getElementById("result").scrollTop=scrollTop;f.document.getElementById("result").scrollLeft=scrollLeft;area.area_select(selStart,selEnd-selStart);area.execCommand("toggle_on");} -else{elem=document.getElementById(id);elem.last_selectionStart=elem.selectionStart;elem.last_selectionEnd=elem.selectionEnd;elem.last_scrollTop=elem.scrollTop;elem.last_scrollLeft=elem.scrollLeft;elem.use_last=true;eAL.start(id);}},set_editarea_size_from_textarea:function(id,frame){var elem,width,height;elem=document.getElementById(id);width=Math.max(eAs[id]["settings"]["min_width"],elem.offsetWidth)+"px";height=Math.max(eAs[id]["settings"]["min_height"],elem.offsetHeight)+"px";if(elem.style.width.indexOf("%")!=-1)width=elem.style.width;if(elem.style.height.indexOf("%")!=-1)height=elem.style.height;frame.style.width=width;frame.style.height=height;},set_base_url:function(){var t=this,elems,i,docBasePath;if(!this.baseURL){elems=document.getElementsByTagName('script');for(i=0;i';html+='';return html;},get_control_html:function(button_name,lang){var t=this,i,but,html,si;for(i=0;i";case "|":case "separator":return '';case "select_font":html="";return html;case "syntax_selection":html="";return html;}return "["+button_name+"]";},get_template:function(){if(this.template==""){var xhr_object=null;if(window.XMLHttpRequest)xhr_object=new XMLHttpRequest(); -else if(window.ActiveXObject)xhr_object=new ActiveXObject("Microsoft.XMLHTTP"); -else{alert("XMLHTTPRequest not supported. EditArea not loaded");return;}xhr_object.open("GET",this.baseURL+"template.html",false);xhr_object.send(null);if(xhr_object.readyState==4)this.template=xhr_object.responseText; -else this.has_error();}},translate:function(text,lang,mode){if(mode=="word")text=eAL.get_word_translation(text,lang); -else if(mode="template"){eAL.current_language=lang;text=text.replace(/\{\$([^\}]+)\}/gm,eAL.translate_template);}return text;},translate_template:function(){return eAL.get_word_translation(EAL.prototype.translate_template.arguments[1],eAL.current_language);},get_word_translation:function(val,lang){var i;for(i in eAL.lang[lang]){if(i==val)return eAL.lang[lang][i];}return "_"+val;},load_script:function(url){var t=this,d=document,script,head;if(t.loadedFiles[url])return;try{script=d.createElement("script");script.type="text/javascript";script.src=url;script.charset="UTF-8";d.getElementsByTagName("head")[0].appendChild(script);}catch(e){d.write('');}t.loadedFiles[url]=true;},add_event:function(obj,name,handler){try{if(obj.attachEvent){obj.attachEvent("on"+name,handler);} -else{obj.addEventListener(name,handler,false);}}catch(e){}},remove_event:function(obj,name,handler){try{if(obj.detachEvent)obj.detachEvent("on"+name,handler); -else obj.removeEventListener(name,handler,false);}catch(e){}},reset:function(e){var formObj,is_child,i,x;formObj=eAL.isIE ? window.event.srcElement:e.target;if(formObj.tagName!='FORM')formObj=formObj.form;for(i in eAs){is_child=false;for(x=0;x old_sel["start"])this.setSelectionRange(id,new_sel["end"],new_sel["end"]); -else this.setSelectionRange(id,old_sel["start"]+open_tag.length,old_sel["start"]+open_tag.length);},hide:function(id){var fs=window.frames,d=document,t=this,scrollTop,scrollLeft,span;if(d.getElementById(id)&&!t.hidden[id]){t.hidden[id]={};t.hidden[id]["selectionRange"]=t.getSelectionRange(id);if(d.getElementById(id).style.display!="none"){t.hidden[id]["scrollTop"]=d.getElementById(id).scrollTop;t.hidden[id]["scrollLeft"]=d.getElementById(id).scrollLeft;}if(fs["frame_"+id]){t.hidden[id]["toggle"]=eAs[id]["displayed"];if(fs["frame_"+id]&&eAs[id]["displayed"]==true){scrollTop=fs["frame_"+id].document.getElementById("result").scrollTop;scrollLeft=fs["frame_"+id].document.getElementById("result").scrollLeft;} -else{scrollTop=d.getElementById(id).scrollTop;scrollLeft=d.getElementById(id).scrollLeft;}t.hidden[id]["scrollTop"]=scrollTop;t.hidden[id]["scrollLeft"]=scrollLeft;if(eAs[id]["displayed"]==true)eAL.toggle_off(id);}span=d.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='none';}d.getElementById(id).style.display="none";}},show:function(id){var fs=window.frames,d=document,t=this,span;if((elem=d.getElementById(id))&&t.hidden[id]){elem.style.display="inline";elem.scrollTop=t.hidden[id]["scrollTop"];elem.scrollLeft=t.hidden[id]["scrollLeft"];span=d.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='inline';}if(fs["frame_"+id]){elem.style.display="inline";if(t.hidden[id]["toggle"]==true)eAL.toggle_on(id);scrollTop=t.hidden[id]["scrollTop"];scrollLeft=t.hidden[id]["scrollLeft"];if(fs["frame_"+id]&&eAs[id]["displayed"]==true){fs["frame_"+id].document.getElementById("result").scrollTop=scrollTop;fs["frame_"+id].document.getElementById("result").scrollLeft=scrollLeft;} -else{elem.scrollTop=scrollTop;elem.scrollLeft=scrollLeft;}}sel=t.hidden[id]["selectionRange"];t.setSelectionRange(id,sel["start"],sel["end"]);delete t.hidden[id];}},getCurrentFile:function(id){return this.execCommand(id,'get_file',this.execCommand(id,'curr_file'));},getFile:function(id,file_id){return this.execCommand(id,'get_file',file_id);},getAllFiles:function(id){return this.execCommand(id,'get_all_files()');},openFile:function(id,file_infos){return this.execCommand(id,'open_file',file_infos);},closeFile:function(id,file_id){return this.execCommand(id,'close_file',file_id);},setFileEditedMode:function(id,file_id,to){var reg1,reg2;reg1=new RegExp('\\\\','g');reg2=new RegExp('"','g');return this.execCommand(id,'set_file_edited_mode("'+file_id.replace(reg1,'\\\\').replace(reg2,'\\"')+'",'+to+')');},execCommand:function(id,cmd,fct_param){switch(cmd){case "EA_init":if(eAs[id]['settings']["EA_init_callback"].length>0)eval(eAs[id]['settings']["EA_init_callback"]+"('"+id+"');");break;case "EA_delete":if(eAs[id]['settings']["EA_delete_callback"].length>0)eval(eAs[id]['settings']["EA_delete_callback"]+"('"+id+"');");break;case "EA_submit":if(eAs[id]['settings']["submit_callback"].length>0)eval(eAs[id]['settings']["submit_callback"]+"('"+id+"');");break;}if(window.frames["frame_"+id]&&window.frames["frame_"+id].editArea){if(fct_param!=undefined)return eval('window.frames["frame_'+id+'"].editArea.'+cmd+'(fct_param);'); -else return eval('window.frames["frame_'+id+'"].editArea.'+cmd+';');}return false;}};var eAL=new EAL();var eAs={}; function getAttribute(elm,aName){var aValue,taName,i;try{aValue=elm.getAttribute(aName);}catch(exept){}if(! aValue){for(i=0;i < elm.attributes.length;i++){taName=elm.attributes[i] .name.toLowerCase();if(taName==aName){aValue=elm.attributes[i] .value;return aValue;}}}return aValue;};function setAttribute(elm,attr,val){if(attr=="class"){elm.setAttribute("className",val);elm.setAttribute("class",val);} -else{elm.setAttribute(attr,val);}};function getChildren(elem,elem_type,elem_attribute,elem_attribute_match,option,depth){if(!option)var option="single";if(!depth)var depth=-1;if(elem){var children=elem.childNodes;var result=null;var results=[];for(var x=0;x0){results=results.concat(result);}} -else if(result!=null){return result;}}}}if(option=="all")return results;}return null;};function isChildOf(elem,parent){if(elem){if(elem==parent)return true;while(elem.parentNode !='undefined'){return isChildOf(elem.parentNode,parent);}}return false;};function getMouseX(e){if(e!=null&&typeof(e.pageX)!="undefined"){return e.pageX;} -else{return(e!=null?e.x:event.x)+document.documentElement.scrollLeft;}};function getMouseY(e){if(e!=null&&typeof(e.pageY)!="undefined"){return e.pageY;} -else{return(e!=null?e.y:event.y)+document.documentElement.scrollTop;}};function calculeOffsetLeft(r){return calculeOffset(r,"offsetLeft")};function calculeOffsetTop(r){return calculeOffset(r,"offsetTop")};function calculeOffset(element,attr){var offset=0;while(element){offset+=element[attr];element=element.offsetParent}return offset;};function get_css_property(elem,prop){if(document.defaultView){return document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop);} -else if(elem.currentStyle){var prop=prop.replace(/-\D/gi,function(sMatch){return sMatch.charAt(sMatch.length-1).toUpperCase();});return elem.currentStyle[prop];} -else return null;}var _mCE;function start_move_element(e,id,frame){var elem_id=(e.target||e.srcElement).id;if(id)elem_id=id;if(!frame)frame=window;if(frame.event)e=frame.event;_mCE=frame.document.getElementById(elem_id);_mCE.frame=frame;frame.document.onmousemove=move_element;frame.document.onmouseup=end_move_element;mouse_x=getMouseX(e);mouse_y=getMouseY(e);_mCE.start_pos_x=mouse_x-(_mCE.style.left.replace("px","")||calculeOffsetLeft(_mCE));_mCE.start_pos_y=mouse_y-(_mCE.style.top.replace("px","")||calculeOffsetTop(_mCE));return false;};function end_move_element(e){_mCE.frame.document.onmousemove="";_mCE.frame.document.onmouseup="";_mCE=null;};function move_element(e){var newTop,newLeft,maxLeft;if(_mCE.frame&&_mCE.frame.event)e=_mCE.frame.event;newTop=getMouseY(e)-_mCE.start_pos_y;newLeft=getMouseX(e)-_mCE.start_pos_x;maxLeft=_mCE.frame.document.body.offsetWidth-_mCE.offsetWidth;max_top=_mCE.frame.document.body.offsetHeight-_mCE.offsetHeight;newTop=Math.min(Math.max(0,newTop),max_top);newLeft=Math.min(Math.max(0,newLeft),maxLeft);_mCE.style.top=newTop+"px";_mCE.style.left=newLeft+"px";return false;};var nav=eAL.nav;function getSelectionRange(textarea){return{"start":textarea.selectionStart,"end":textarea.selectionEnd};};function setSelectionRange(t,start,end){t.focus();start=Math.max(0,Math.min(t.value.length,start));end=Math.max(start,Math.min(t.value.length,end));if(this.isOpera&&this.isOpera < 9.6){t.selectionEnd=1;t.selectionStart=0;t.selectionEnd=1;t.selectionStart=0;}t.selectionStart=start;t.selectionEnd=end;if(isIE)set_IE_selection(t);};function get_IE_selection(t){var d=document,div,range,stored_range,elem,scrollTop,relative_top,line_start,line_nb,range_start,range_end,tab;if(t&&t.focused){if(!t.ea_line_height){div=d.createElement("div");div.style.fontFamily=get_css_property(t,"font-family");div.style.fontSize=get_css_property(t,"font-size");div.style.visibility="hidden";div.innerHTML="0";d.body.appendChild(div);t.ea_line_height=div.offsetHeight;d.body.removeChild(div);}range=d.selection.createRange();try{stored_range=range.duplicate();stored_range.moveToElementText(t);stored_range.setEndPoint('EndToEnd',range);if(stored_range.parentElement()==t){elem=t;scrollTop=0;while(elem.parentNode){scrollTop+=elem.scrollTop;elem=elem.parentNode;}relative_top=range.offsetTop-calculeOffsetTop(t)+scrollTop;line_start=Math.round((relative_top / t.ea_line_height)+1);line_nb=Math.round(range.boundingHeight / t.ea_line_height);range_start=stored_range.text.length-range.text.length;tab=t.value.substr(0,range_start).split("\n");range_start+=(line_start-tab.length)*2;t.selectionStart=range_start;range_end=t.selectionStart+range.text.length;tab=t.value.substr(0,range_start+range.text.length).split("\n");range_end+=(line_start+line_nb-1-tab.length)*2;t.selectionEnd=range_end;}}catch(e){}}setTimeout("get_IE_selection(document.getElementById('"+t.id+"'));",50);};function IE_textarea_focus(){event.srcElement.focused=true;}function IE_textarea_blur(){event.srcElement.focused=false;}function set_IE_selection(t){var nbLineStart,nbLineStart,nbLineEnd,range;if(!window.closed){nbLineStart=t.value.substr(0,t.selectionStart).split("\n").length-1;nbLineEnd=t.value.substr(0,t.selectionEnd).split("\n").length-1;try{range=document.selection.createRange();range.moveToElementText(t);range.setEndPoint('EndToStart',range);range.moveStart('character',t.selectionStart-nbLineStart);range.moveEnd('character',t.selectionEnd-nbLineEnd-(t.selectionStart-nbLineStart));range.select();}catch(e){}}};eAL.waiting_loading["elements_functions.js"]="loaded"; - EAL.prototype.start_resize_area=function(){var d=document,a,div,width,height,father;d.onmouseup=eAL.end_resize_area;d.onmousemove=eAL.resize_area;eAL.toggle(eAL.resize["id"]);a=eAs[eAL.resize["id"]]["textarea"];div=d.getElementById("edit_area_resize");if(!div){div=d.createElement("div");div.id="edit_area_resize";div.style.border="dashed #888888 1px";}width=a.offsetWidth-2;height=a.offsetHeight-2;div.style.display="block";div.style.width=width+"px";div.style.height=height+"px";father=a.parentNode;father.insertBefore(div,a);a.style.display="none";eAL.resize["start_top"]=calculeOffsetTop(div);eAL.resize["start_left"]=calculeOffsetLeft(div);};EAL.prototype.end_resize_area=function(e){var d=document,div,a,width,height;d.onmouseup="";d.onmousemove="";div=d.getElementById("edit_area_resize");a=eAs[eAL.resize["id"]]["textarea"];width=Math.max(eAs[eAL.resize["id"]]["settings"]["min_width"],div.offsetWidth-4);height=Math.max(eAs[eAL.resize["id"]]["settings"]["min_height"],div.offsetHeight-4);if(eAL.isIE==6){width-=2;height-=2;}a.style.width=width+"px";a.style.height=height+"px";div.style.display="none";a.style.display="inline";a.selectionStart=eAL.resize["selectionStart"];a.selectionEnd=eAL.resize["selectionEnd"];eAL.toggle(eAL.resize["id"]);return false;};EAL.prototype.resize_area=function(e){var allow,newHeight,newWidth;allow=eAs[eAL.resize["id"]]["settings"]["allow_resize"];if(allow=="both"||allow=="y"){newHeight=Math.max(20,getMouseY(e)-eAL.resize["start_top"]);document.getElementById("edit_area_resize").style.height=newHeight+"px";}if(allow=="both"||allow=="x"){newWidth=Math.max(20,getMouseX(e)-eAL.resize["start_left"]);document.getElementById("edit_area_resize").style.width=newWidth+"px";}return false;};eAL.waiting_loading["resize_area.js"]="loaded"; - EAL.prototype.get_regexp=function(text_array){res="(\\b)(";for(i=0;i0)res+="|";res+=this.get_escaped_regexp(text_array[i]);}res+=")(\\b)";reg=new RegExp(res);return res;};EAL.prototype.get_escaped_regexp=function(str){return str.toString().replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\}|\{|\$|\^|\|)/g,"\\$1");};EAL.prototype.init_syntax_regexp=function(){var lang_style={};for(var lang in this.load_syntax){if(!this.syntax[lang]){this.syntax[lang]={};this.syntax[lang]["keywords_reg_exp"]={};this.keywords_reg_exp_nb=0;if(this.load_syntax[lang]['KEYWORDS']){param="g";if(this.load_syntax[lang]['KEYWORD_CASE_SENSITIVE']===false)param+="i";for(var i in this.load_syntax[lang]['KEYWORDS']){if(typeof(this.load_syntax[lang]['KEYWORDS'][i])=="function")continue;this.syntax[lang]["keywords_reg_exp"][i]=new RegExp(this.get_regexp(this.load_syntax[lang]['KEYWORDS'][i]),param);this.keywords_reg_exp_nb++;}}if(this.load_syntax[lang]['OPERATORS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['OPERATORS']){if(typeof(this.load_syntax[lang]['OPERATORS'][i])=="function")continue;if(nb>0)str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['OPERATORS'][i]);nb++;}if(str.length>0)this.syntax[lang]["operators_reg_exp"]=new RegExp("("+str+")","g");}if(this.load_syntax[lang]['DELIMITERS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['DELIMITERS']){if(typeof(this.load_syntax[lang]['DELIMITERS'][i])=="function")continue;if(nb>0)str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['DELIMITERS'][i]);nb++;}if(str.length>0)this.syntax[lang]["delimiters_reg_exp"]=new RegExp("("+str+")","g");}var syntax_trace=[];this.syntax[lang]["quotes"]={};var quote_tab=[];if(this.load_syntax[lang]['QUOTEMARKS']){for(var i in this.load_syntax[lang]['QUOTEMARKS']){if(typeof(this.load_syntax[lang]['QUOTEMARKS'][i])=="function")continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['QUOTEMARKS'][i]);this.syntax[lang]["quotes"][x]=x;quote_tab[quote_tab.length]="("+x+"(\\\\.|[^"+x+"])*(?:"+x+"|$))";syntax_trace.push(x);}}this.syntax[lang]["comments"]={};if(this.load_syntax[lang]['COMMENT_SINGLE']){for(var i in this.load_syntax[lang]['COMMENT_SINGLE']){if(typeof(this.load_syntax[lang]['COMMENT_SINGLE'][i])=="function")continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_SINGLE'][i]);quote_tab[quote_tab.length]="("+x+"(.|\\r|\\t)*(\\n|$))";syntax_trace.push(x);this.syntax[lang]["comments"][x]="\n";}}if(this.load_syntax[lang]['COMMENT_MULTI']){for(var i in this.load_syntax[lang]['COMMENT_MULTI']){if(typeof(this.load_syntax[lang]['COMMENT_MULTI'][i])=="function")continue;var start=this.get_escaped_regexp(i);var end=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_MULTI'][i]);quote_tab[quote_tab.length]="("+start+"(.|\\n|\\r)*?("+end+"|$))";syntax_trace.push(start);syntax_trace.push(end);this.syntax[lang]["comments"][i]=this.load_syntax[lang]['COMMENT_MULTI'][i];}}if(quote_tab.length>0)this.syntax[lang]["comment_or_quote_reg_exp"]=new RegExp("("+quote_tab.join("|")+")","gi");if(syntax_trace.length>0)this.syntax[lang]["syntax_trace_regexp"]=new RegExp("((.|\n)*?)(\\\\*("+syntax_trace.join("|")+"|$))","gmi");if(this.load_syntax[lang]['SCRIPT_DELIMITERS']){this.syntax[lang]["script_delimiters"]={};for(var i in this.load_syntax[lang]['SCRIPT_DELIMITERS']){if(typeof(this.load_syntax[lang]['SCRIPT_DELIMITERS'][i])=="function")continue;this.syntax[lang]["script_delimiters"][i]=this.load_syntax[lang]['SCRIPT_DELIMITERS'];}}this.syntax[lang]["custom_regexp"]={};if(this.load_syntax[lang]['REGEXPS']){for(var i in this.load_syntax[lang]['REGEXPS']){if(typeof(this.load_syntax[lang]['REGEXPS'][i])=="function")continue;var val=this.load_syntax[lang]['REGEXPS'][i];if(!this.syntax[lang]["custom_regexp"][val['execute']])this.syntax[lang]["custom_regexp"][val['execute']]={};this.syntax[lang]["custom_regexp"][val['execute']][i]={'regexp':new RegExp(val['search'],val['modifiers']),'class':val['class']};}}if(this.load_syntax[lang]['STYLES']){lang_style[lang]={};for(var i in this.load_syntax[lang]['STYLES']){if(typeof(this.load_syntax[lang]['STYLES'][i])=="function")continue;if(typeof(this.load_syntax[lang]['STYLES'][i])!="string"){for(var j in this.load_syntax[lang]['STYLES'][i]){lang_style[lang][j]=this.load_syntax[lang]['STYLES'][i][j];}} -else{lang_style[lang][i]=this.load_syntax[lang]['STYLES'][i];}}}var style="";for(var i in lang_style[lang]){if(lang_style[lang][i].length>0){style+="."+lang+" ."+i.toLowerCase()+" span{"+lang_style[lang][i]+"}\n";style+="."+lang+" ."+i.toLowerCase()+"{"+lang_style[lang][i]+"}\n";}}this.syntax[lang]["styles"]=style;}}};eAL.waiting_loading["reg_syntax.js"]="loaded"; -var editAreaLoader= eAL;var editAreas=eAs;EditAreaLoader=EAL;editAreaLoader.iframe_script= "".replace(/Á/g,'this').replace(/Â/g,'textarea').replace(/Ã/g,'function').replace(/Ä/g,'prototype').replace(/Å/g,'settings').replace(/Æ/g,'length').replace(/Ç/g,'style').replace(/È/g,'parent').replace(/É/g,'last_selection').replace(/Ê/g,'value').replace(/Ë/g,'true').replace(/Ì/g,'false'); -editAreaLoader.template= " EditArea [__CSSRULES__] [__JSCODE__]
      [__TOOLBAR__]
       
       
       {$this->lang->words['portal_main_key']} 
      {$this->lang->words[{$data['pc_title']}
      {$data['pc_desc']}
      + {$this->lang->words[ + +
      {$position}: {$line_abbr} 0, {$char_abbr} 0 {$total}: {$line_abbr} 0, {$char_abbr} 0 resize
      {$processing}
      {$search} {$close_popup}
      {$replace} {$move_popup}

      {$find_next} {$replace} {$replace_all}
      {$close_popup}

      Editarea [__EA_VERSION__]


      {$shortcuts}:

      {$tab}: {$add_tab}
      {$shift}+{$tab}: {$remove_tab}
      {$ctrl}+f: {$search_command}
      {$ctrl}+r: {$replace_command}
      {$ctrl}+h: {$highlight}
      {$ctrl}+g: {$go_to_line}
      {$ctrl}+z: {$undo}
      {$ctrl}+y: {$redo}
      {$ctrl}+e: {$help}
      {$ctrl}+q, {$esc}: {$close_popup}
      {$accesskey} E: {$toggle}

      {$about_notice}
      "; -editAreaLoader.iframe_css= ""; diff --git a/upload/admin/js/3rd_party/edit_area/edit_area_full_with_plugins.gz b/upload/admin/js/3rd_party/edit_area/edit_area_full_with_plugins.gz deleted file mode 100644 index 19cd98c4..00000000 Binary files a/upload/admin/js/3rd_party/edit_area/edit_area_full_with_plugins.gz and /dev/null differ diff --git a/upload/admin/js/3rd_party/edit_area/edit_area_full_with_plugins.js b/upload/admin/js/3rd_party/edit_area/edit_area_full_with_plugins.js deleted file mode 100644 index 4e218100..00000000 --- a/upload/admin/js/3rd_party/edit_area/edit_area_full_with_plugins.js +++ /dev/null @@ -1,39 +0,0 @@ - function EAL(){var t=this;t.version="0.8.1.1";date=new Date();t.start_time=date.getTime();t.win="loading";t.error=false;t.baseURL="";t.template="";t.lang={};t.load_syntax={};t.syntax={};t.loadedFiles=[];t.waiting_loading={};t.scripts_to_load=[];t.sub_scripts_to_load=[];t.resize=[];t.hidden={};t.default_settings={debug:false,smooth_selection:true,font_size:"10",font_family:"monospace",start_highlight:false,toolbar:"search,go_to_line,fullscreen,|,undo,redo,|,select_font,|,change_smooth_selection,highlight,reset_highlight,word_wrap,|,help",begin_toolbar:"",end_toolbar:"",is_multi_files:false,allow_resize:"both",show_line_colors:false,min_width:400,min_height:125,replace_tab_by_spaces:false,allow_toggle:true,language:"en",syntax:"",syntax_selection_allow:"basic,brainfuck,c,coldfusion,cpp,css,html,java,js,pas,perl,php,python,ruby,robotstxt,sql,tsql,vb,xml",display:"onload",max_undo:30,browsers:"known",plugins:"",gecko_spellcheck:false,fullscreen:false,is_editable:true,cursor_position:"begin",word_wrap:false,autocompletion:false,load_callback:"",save_callback:"",change_callback:"",submit_callback:"",EA_init_callback:"",EA_delete_callback:"",EA_load_callback:"",EA_unload_callback:"",EA_toggle_on_callback:"",EA_toggle_off_callback:"",EA_file_switch_on_callback:"",EA_file_switch_off_callback:"",EA_file_close_callback:""};t.advanced_buttons=[ ['new_document','newdocument.gif','new_document',false],['search','search.gif','show_search',false],['go_to_line','go_to_line.gif','go_to_line',false],['undo','undo.gif','undo',true],['redo','redo.gif','redo',true],['change_smooth_selection','smooth_selection.gif','change_smooth_selection_mode',true],['reset_highlight','reset_highlight.gif','resync_highlight',true],['highlight','highlight.gif','change_highlight',true],['help','help.gif','show_help',false],['save','save.gif','save',false],['load','load.gif','load',false],['fullscreen','fullscreen.gif','toggle_full_screen',false],['word_wrap','word_wrap.gif','toggle_word_wrap',true],['autocompletion','autocompletion.gif','toggle_autocompletion',true] ];t.set_browser_infos(t);if(t.isIE>=6||t.isGecko||(t.isWebKit&&!t.isSafari<3)||t.isOpera>=9||t.isCamino)t.isValidBrowser=true; -else t.isValidBrowser=false;t.set_base_url();for(var i=0;i0)s["toolbar"]=s["begin_toolbar"]+","+s["toolbar"];if(s["end_toolbar"].length>0)s["toolbar"]=s["toolbar"]+","+s["end_toolbar"];s["tab_toolbar"]=s["toolbar"].replace(/ /g,"").split(",");s["plugins"]=s["plugins"].replace(/ /g,"").split(",");for(i=0;i0){s["syntax"]=s["syntax"].toLowerCase();t.load_script(t.baseURL+"reg_syntax/"+s["syntax"]+".js");}eAs[s["id"]]={"settings":s};eAs[s["id"]]["displayed"]=false;eAs[s["id"]]["hidden"]=false;t.start(s["id"]);},delete_instance:function(id){var d=document,fs=window.frames,span,iframe;eAL.execCommand(id,"EA_delete");if(fs["frame_"+id]&&fs["frame_"+id].editArea){if(eAs[id]["displayed"])eAL.toggle(id,"off");fs["frame_"+id].editArea.execCommand("EA_unload");}span=d.getElementById("EditAreaArroundInfos_"+id);if(span)span.parentNode.removeChild(span);iframe=d.getElementById("frame_"+id);if(iframe){iframe.parentNode.removeChild(iframe);try{delete fs["frame_"+id];}catch(e){}}delete eAs[id];},start:function(id){var t=this,d=document,f,span,father,next,html='',html_toolbar_content='',template,content,i;if(t.win!="loaded"){setTimeout("eAL.start('"+id+"');",50);return;}for(i in t.waiting_loading){if(t.waiting_loading[i]!="loaded"&&typeof(t.waiting_loading[i])!="function"){setTimeout("eAL.start('"+id+"');",50);return;}}if(!t.lang[eAs[id]["settings"]["language"]]||(eAs[id]["settings"]["syntax"].length>0&&!t.load_syntax[eAs[id]["settings"]["syntax"]])){setTimeout("eAL.start('"+id+"');",50);return;}if(eAs[id]["settings"]["syntax"].length>0)t.init_syntax_regexp();if(!d.getElementById("EditAreaArroundInfos_"+id)&&(eAs[id]["settings"]["debug"]||eAs[id]["settings"]["allow_toggle"])){span=d.createElement("span");span.id="EditAreaArroundInfos_"+id;if(eAs[id]["settings"]["allow_toggle"]){checked=(eAs[id]["settings"]["display"]=="onload")?"checked='checked'":"";html+="
      ";html+="";html+="
      ";}if(eAs[id]["settings"]["debug"])html+="
      ";html=t.translate(html,eAs[id]["settings"]["language"]);span.innerHTML=html;father=d.getElementById(id).parentNode;next=d.getElementById(id).nextSibling;if(next==null)father.appendChild(span); -else father.insertBefore(span,next);}if(!eAs[id]["initialized"]){t.execCommand(id,"EA_init");if(eAs[id]["settings"]["display"]=="later"){eAs[id]["initialized"]=true;return;}}if(t.isIE){t.init_ie_textarea(id);}area=eAs[id];for(i=0;i';}for(i=0;i';t.iframe_script+='';}if(!t.iframe_css){t.iframe_css="";}template=t.template.replace(/\[__BASEURL__\]/g,t.baseURL);template=template.replace("[__TOOLBAR__]",html_toolbar_content);template=t.translate(template,area["settings"]["language"],"template");template=template.replace("[__CSSRULES__]",t.iframe_css);template=template.replace("[__JSCODE__]",t.iframe_script);template=template.replace("[__EA_VERSION__]",t.version);area.textarea=d.getElementById(area["settings"]["id"]);eAs[area["settings"]["id"]]["textarea"]=area.textarea;if(typeof(window.frames["frame_"+area["settings"]["id"]])!='undefined')delete window.frames["frame_"+area["settings"]["id"]];father=area.textarea.parentNode;content=d.createElement("iframe");content.name="frame_"+area["settings"]["id"];content.id="frame_"+area["settings"]["id"];content.style.borderWidth="0px";setAttribute(content,"frameBorder","0");content.style.overflow="hidden";content.style.display="none";next=area.textarea.nextSibling;if(next==null)father.appendChild(content); -else father.insertBefore(content,next);f=window.frames["frame_"+area["settings"]["id"]];f.document.open();f.eAs=eAs;f.area_id=area["settings"]["id"];f.document.area_id=area["settings"]["id"];f.document.write(template);f.document.close();},toggle:function(id,toggle_to){if(!toggle_to)toggle_to=(eAs[id]["displayed"]==true)?"off":"on";if(eAs[id]["displayed"]==true&&toggle_to=="off"){this.toggle_off(id);} -else if(eAs[id]["displayed"]==false&&toggle_to=="on"){this.toggle_on(id);}return false;},toggle_off:function(id){var fs=window.frames,f,t,parNod,nxtSib,selStart,selEnd,scrollTop,scrollLeft;if(fs["frame_"+id]){f=fs["frame_"+id];t=eAs[id]["textarea"];if(f.editArea.fullscreen['isFull'])f.editArea.toggle_full_screen(false);eAs[id]["displayed"]=false;t.wrap="off";setAttribute(t,"wrap","off");parNod=t.parentNode;nxtSib=t.nextSibling;parNod.removeChild(t);parNod.insertBefore(t,nxtSib);t.value=f.editArea.textarea.value;selStart=f.editArea.last_selection["selectionStart"];selEnd=f.editArea.last_selection["selectionEnd"];scrollTop=f.document.getElementById("result").scrollTop;scrollLeft=f.document.getElementById("result").scrollLeft;document.getElementById("frame_"+id).style.display='none';t.style.display="inline";try{t.focus();}catch(e){};if(this.isIE){t.selectionStart=selStart;t.selectionEnd=selEnd;t.focused=true;set_IE_selection(t);} -else{if(this.isOpera&&this.isOpera < 9.6){t.setSelectionRange(0,0);}try{t.setSelectionRange(selStart,selEnd);}catch(e){};}t.scrollTop=scrollTop;t.scrollLeft=scrollLeft;f.editArea.execCommand("toggle_off");}},toggle_on:function(id){var fs=window.frames,f,t,selStart=0,selEnd=0,scrollTop=0,scrollLeft=0,curPos,elem;if(fs["frame_"+id]){f=fs["frame_"+id];t=eAs[id]["textarea"];area=f.editArea;area.textarea.value=t.value;curPos=eAs[id]["settings"]["cursor_position"];if(t.use_last==true){selStart=t.last_selectionStart;selEnd=t.last_selectionEnd;scrollTop=t.last_scrollTop;scrollLeft=t.last_scrollLeft;t.use_last=false;} -else if(curPos=="auto"){try{selStart=t.selectionStart;selEnd=t.selectionEnd;scrollTop=t.scrollTop;scrollLeft=t.scrollLeft;}catch(ex){}}this.set_editarea_size_from_textarea(id,document.getElementById("frame_"+id));t.style.display="none";document.getElementById("frame_"+id).style.display="inline";area.execCommand("focus");eAs[id]["displayed"]=true;area.execCommand("update_size");f.document.getElementById("result").scrollTop=scrollTop;f.document.getElementById("result").scrollLeft=scrollLeft;area.area_select(selStart,selEnd-selStart);area.execCommand("toggle_on");} -else{elem=document.getElementById(id);elem.last_selectionStart=elem.selectionStart;elem.last_selectionEnd=elem.selectionEnd;elem.last_scrollTop=elem.scrollTop;elem.last_scrollLeft=elem.scrollLeft;elem.use_last=true;eAL.start(id);}},set_editarea_size_from_textarea:function(id,frame){var elem,width,height;elem=document.getElementById(id);width=Math.max(eAs[id]["settings"]["min_width"],elem.offsetWidth)+"px";height=Math.max(eAs[id]["settings"]["min_height"],elem.offsetHeight)+"px";if(elem.style.width.indexOf("%")!=-1)width=elem.style.width;if(elem.style.height.indexOf("%")!=-1)height=elem.style.height;frame.style.width=width;frame.style.height=height;},set_base_url:function(){var t=this,elems,i,docBasePath;if(!this.baseURL){elems=document.getElementsByTagName('script');for(i=0;i';html+='';return html;},get_control_html:function(button_name,lang){var t=this,i,but,html,si;for(i=0;i";case "|":case "separator":return '';case "select_font":html="";return html;case "syntax_selection":html="";return html;}return "["+button_name+"]";},get_template:function(){if(this.template==""){var xhr_object=null;if(window.XMLHttpRequest)xhr_object=new XMLHttpRequest(); -else if(window.ActiveXObject)xhr_object=new ActiveXObject("Microsoft.XMLHTTP"); -else{alert("XMLHTTPRequest not supported. EditArea not loaded");return;}xhr_object.open("GET",this.baseURL+"template.html",false);xhr_object.send(null);if(xhr_object.readyState==4)this.template=xhr_object.responseText; -else this.has_error();}},translate:function(text,lang,mode){if(mode=="word")text=eAL.get_word_translation(text,lang); -else if(mode="template"){eAL.current_language=lang;text=text.replace(/\{\$([^\}]+)\}/gm,eAL.translate_template);}return text;},translate_template:function(){return eAL.get_word_translation(EAL.prototype.translate_template.arguments[1],eAL.current_language);},get_word_translation:function(val,lang){var i;for(i in eAL.lang[lang]){if(i==val)return eAL.lang[lang][i];}return "_"+val;},load_script:function(url){var t=this,d=document,script,head;if(t.loadedFiles[url])return;try{script=d.createElement("script");script.type="text/javascript";script.src=url;script.charset="UTF-8";d.getElementsByTagName("head")[0].appendChild(script);}catch(e){d.write('');}t.loadedFiles[url]=true;},add_event:function(obj,name,handler){try{if(obj.attachEvent){obj.attachEvent("on"+name,handler);} -else{obj.addEventListener(name,handler,false);}}catch(e){}},remove_event:function(obj,name,handler){try{if(obj.detachEvent)obj.detachEvent("on"+name,handler); -else obj.removeEventListener(name,handler,false);}catch(e){}},reset:function(e){var formObj,is_child,i,x;formObj=eAL.isIE ? window.event.srcElement:e.target;if(formObj.tagName!='FORM')formObj=formObj.form;for(i in eAs){is_child=false;for(x=0;x old_sel["start"])this.setSelectionRange(id,new_sel["end"],new_sel["end"]); -else this.setSelectionRange(id,old_sel["start"]+open_tag.length,old_sel["start"]+open_tag.length);},hide:function(id){var fs=window.frames,d=document,t=this,scrollTop,scrollLeft,span;if(d.getElementById(id)&&!t.hidden[id]){t.hidden[id]={};t.hidden[id]["selectionRange"]=t.getSelectionRange(id);if(d.getElementById(id).style.display!="none"){t.hidden[id]["scrollTop"]=d.getElementById(id).scrollTop;t.hidden[id]["scrollLeft"]=d.getElementById(id).scrollLeft;}if(fs["frame_"+id]){t.hidden[id]["toggle"]=eAs[id]["displayed"];if(fs["frame_"+id]&&eAs[id]["displayed"]==true){scrollTop=fs["frame_"+id].document.getElementById("result").scrollTop;scrollLeft=fs["frame_"+id].document.getElementById("result").scrollLeft;} -else{scrollTop=d.getElementById(id).scrollTop;scrollLeft=d.getElementById(id).scrollLeft;}t.hidden[id]["scrollTop"]=scrollTop;t.hidden[id]["scrollLeft"]=scrollLeft;if(eAs[id]["displayed"]==true)eAL.toggle_off(id);}span=d.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='none';}d.getElementById(id).style.display="none";}},show:function(id){var fs=window.frames,d=document,t=this,span;if((elem=d.getElementById(id))&&t.hidden[id]){elem.style.display="inline";elem.scrollTop=t.hidden[id]["scrollTop"];elem.scrollLeft=t.hidden[id]["scrollLeft"];span=d.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='inline';}if(fs["frame_"+id]){elem.style.display="inline";if(t.hidden[id]["toggle"]==true)eAL.toggle_on(id);scrollTop=t.hidden[id]["scrollTop"];scrollLeft=t.hidden[id]["scrollLeft"];if(fs["frame_"+id]&&eAs[id]["displayed"]==true){fs["frame_"+id].document.getElementById("result").scrollTop=scrollTop;fs["frame_"+id].document.getElementById("result").scrollLeft=scrollLeft;} -else{elem.scrollTop=scrollTop;elem.scrollLeft=scrollLeft;}}sel=t.hidden[id]["selectionRange"];t.setSelectionRange(id,sel["start"],sel["end"]);delete t.hidden[id];}},getCurrentFile:function(id){return this.execCommand(id,'get_file',this.execCommand(id,'curr_file'));},getFile:function(id,file_id){return this.execCommand(id,'get_file',file_id);},getAllFiles:function(id){return this.execCommand(id,'get_all_files()');},openFile:function(id,file_infos){return this.execCommand(id,'open_file',file_infos);},closeFile:function(id,file_id){return this.execCommand(id,'close_file',file_id);},setFileEditedMode:function(id,file_id,to){var reg1,reg2;reg1=new RegExp('\\\\','g');reg2=new RegExp('"','g');return this.execCommand(id,'set_file_edited_mode("'+file_id.replace(reg1,'\\\\').replace(reg2,'\\"')+'",'+to+')');},execCommand:function(id,cmd,fct_param){switch(cmd){case "EA_init":if(eAs[id]['settings']["EA_init_callback"].length>0)eval(eAs[id]['settings']["EA_init_callback"]+"('"+id+"');");break;case "EA_delete":if(eAs[id]['settings']["EA_delete_callback"].length>0)eval(eAs[id]['settings']["EA_delete_callback"]+"('"+id+"');");break;case "EA_submit":if(eAs[id]['settings']["submit_callback"].length>0)eval(eAs[id]['settings']["submit_callback"]+"('"+id+"');");break;}if(window.frames["frame_"+id]&&window.frames["frame_"+id].editArea){if(fct_param!=undefined)return eval('window.frames["frame_'+id+'"].editArea.'+cmd+'(fct_param);'); -else return eval('window.frames["frame_'+id+'"].editArea.'+cmd+';');}return false;}};var eAL=new EAL();var eAs={}; function getAttribute(elm,aName){var aValue,taName,i;try{aValue=elm.getAttribute(aName);}catch(exept){}if(! aValue){for(i=0;i < elm.attributes.length;i++){taName=elm.attributes[i] .name.toLowerCase();if(taName==aName){aValue=elm.attributes[i] .value;return aValue;}}}return aValue;};function setAttribute(elm,attr,val){if(attr=="class"){elm.setAttribute("className",val);elm.setAttribute("class",val);} -else{elm.setAttribute(attr,val);}};function getChildren(elem,elem_type,elem_attribute,elem_attribute_match,option,depth){if(!option)var option="single";if(!depth)var depth=-1;if(elem){var children=elem.childNodes;var result=null;var results=[];for(var x=0;x0){results=results.concat(result);}} -else if(result!=null){return result;}}}}if(option=="all")return results;}return null;};function isChildOf(elem,parent){if(elem){if(elem==parent)return true;while(elem.parentNode !='undefined'){return isChildOf(elem.parentNode,parent);}}return false;};function getMouseX(e){if(e!=null&&typeof(e.pageX)!="undefined"){return e.pageX;} -else{return(e!=null?e.x:event.x)+document.documentElement.scrollLeft;}};function getMouseY(e){if(e!=null&&typeof(e.pageY)!="undefined"){return e.pageY;} -else{return(e!=null?e.y:event.y)+document.documentElement.scrollTop;}};function calculeOffsetLeft(r){return calculeOffset(r,"offsetLeft")};function calculeOffsetTop(r){return calculeOffset(r,"offsetTop")};function calculeOffset(element,attr){var offset=0;while(element){offset+=element[attr];element=element.offsetParent}return offset;};function get_css_property(elem,prop){if(document.defaultView){return document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop);} -else if(elem.currentStyle){var prop=prop.replace(/-\D/gi,function(sMatch){return sMatch.charAt(sMatch.length-1).toUpperCase();});return elem.currentStyle[prop];} -else return null;}var _mCE;function start_move_element(e,id,frame){var elem_id=(e.target||e.srcElement).id;if(id)elem_id=id;if(!frame)frame=window;if(frame.event)e=frame.event;_mCE=frame.document.getElementById(elem_id);_mCE.frame=frame;frame.document.onmousemove=move_element;frame.document.onmouseup=end_move_element;mouse_x=getMouseX(e);mouse_y=getMouseY(e);_mCE.start_pos_x=mouse_x-(_mCE.style.left.replace("px","")||calculeOffsetLeft(_mCE));_mCE.start_pos_y=mouse_y-(_mCE.style.top.replace("px","")||calculeOffsetTop(_mCE));return false;};function end_move_element(e){_mCE.frame.document.onmousemove="";_mCE.frame.document.onmouseup="";_mCE=null;};function move_element(e){var newTop,newLeft,maxLeft;if(_mCE.frame&&_mCE.frame.event)e=_mCE.frame.event;newTop=getMouseY(e)-_mCE.start_pos_y;newLeft=getMouseX(e)-_mCE.start_pos_x;maxLeft=_mCE.frame.document.body.offsetWidth-_mCE.offsetWidth;max_top=_mCE.frame.document.body.offsetHeight-_mCE.offsetHeight;newTop=Math.min(Math.max(0,newTop),max_top);newLeft=Math.min(Math.max(0,newLeft),maxLeft);_mCE.style.top=newTop+"px";_mCE.style.left=newLeft+"px";return false;};var nav=eAL.nav;function getSelectionRange(textarea){return{"start":textarea.selectionStart,"end":textarea.selectionEnd};};function setSelectionRange(t,start,end){t.focus();start=Math.max(0,Math.min(t.value.length,start));end=Math.max(start,Math.min(t.value.length,end));if(this.isOpera&&this.isOpera < 9.6){t.selectionEnd=1;t.selectionStart=0;t.selectionEnd=1;t.selectionStart=0;}t.selectionStart=start;t.selectionEnd=end;if(isIE)set_IE_selection(t);};function get_IE_selection(t){var d=document,div,range,stored_range,elem,scrollTop,relative_top,line_start,line_nb,range_start,range_end,tab;if(t&&t.focused){if(!t.ea_line_height){div=d.createElement("div");div.style.fontFamily=get_css_property(t,"font-family");div.style.fontSize=get_css_property(t,"font-size");div.style.visibility="hidden";div.innerHTML="0";d.body.appendChild(div);t.ea_line_height=div.offsetHeight;d.body.removeChild(div);}range=d.selection.createRange();try{stored_range=range.duplicate();stored_range.moveToElementText(t);stored_range.setEndPoint('EndToEnd',range);if(stored_range.parentElement()==t){elem=t;scrollTop=0;while(elem.parentNode){scrollTop+=elem.scrollTop;elem=elem.parentNode;}relative_top=range.offsetTop-calculeOffsetTop(t)+scrollTop;line_start=Math.round((relative_top / t.ea_line_height)+1);line_nb=Math.round(range.boundingHeight / t.ea_line_height);range_start=stored_range.text.length-range.text.length;tab=t.value.substr(0,range_start).split("\n");range_start+=(line_start-tab.length)*2;t.selectionStart=range_start;range_end=t.selectionStart+range.text.length;tab=t.value.substr(0,range_start+range.text.length).split("\n");range_end+=(line_start+line_nb-1-tab.length)*2;t.selectionEnd=range_end;}}catch(e){}}setTimeout("get_IE_selection(document.getElementById('"+t.id+"'));",50);};function IE_textarea_focus(){event.srcElement.focused=true;}function IE_textarea_blur(){event.srcElement.focused=false;}function set_IE_selection(t){var nbLineStart,nbLineStart,nbLineEnd,range;if(!window.closed){nbLineStart=t.value.substr(0,t.selectionStart).split("\n").length-1;nbLineEnd=t.value.substr(0,t.selectionEnd).split("\n").length-1;try{range=document.selection.createRange();range.moveToElementText(t);range.setEndPoint('EndToStart',range);range.moveStart('character',t.selectionStart-nbLineStart);range.moveEnd('character',t.selectionEnd-nbLineEnd-(t.selectionStart-nbLineStart));range.select();}catch(e){}}};eAL.waiting_loading["elements_functions.js"]="loaded"; - EAL.prototype.start_resize_area=function(){var d=document,a,div,width,height,father;d.onmouseup=eAL.end_resize_area;d.onmousemove=eAL.resize_area;eAL.toggle(eAL.resize["id"]);a=eAs[eAL.resize["id"]]["textarea"];div=d.getElementById("edit_area_resize");if(!div){div=d.createElement("div");div.id="edit_area_resize";div.style.border="dashed #888888 1px";}width=a.offsetWidth-2;height=a.offsetHeight-2;div.style.display="block";div.style.width=width+"px";div.style.height=height+"px";father=a.parentNode;father.insertBefore(div,a);a.style.display="none";eAL.resize["start_top"]=calculeOffsetTop(div);eAL.resize["start_left"]=calculeOffsetLeft(div);};EAL.prototype.end_resize_area=function(e){var d=document,div,a,width,height;d.onmouseup="";d.onmousemove="";div=d.getElementById("edit_area_resize");a=eAs[eAL.resize["id"]]["textarea"];width=Math.max(eAs[eAL.resize["id"]]["settings"]["min_width"],div.offsetWidth-4);height=Math.max(eAs[eAL.resize["id"]]["settings"]["min_height"],div.offsetHeight-4);if(eAL.isIE==6){width-=2;height-=2;}a.style.width=width+"px";a.style.height=height+"px";div.style.display="none";a.style.display="inline";a.selectionStart=eAL.resize["selectionStart"];a.selectionEnd=eAL.resize["selectionEnd"];eAL.toggle(eAL.resize["id"]);return false;};EAL.prototype.resize_area=function(e){var allow,newHeight,newWidth;allow=eAs[eAL.resize["id"]]["settings"]["allow_resize"];if(allow=="both"||allow=="y"){newHeight=Math.max(20,getMouseY(e)-eAL.resize["start_top"]);document.getElementById("edit_area_resize").style.height=newHeight+"px";}if(allow=="both"||allow=="x"){newWidth=Math.max(20,getMouseX(e)-eAL.resize["start_left"]);document.getElementById("edit_area_resize").style.width=newWidth+"px";}return false;};eAL.waiting_loading["resize_area.js"]="loaded"; - EAL.prototype.get_regexp=function(text_array){res="(\\b)(";for(i=0;i0)res+="|";res+=this.get_escaped_regexp(text_array[i]);}res+=")(\\b)";reg=new RegExp(res);return res;};EAL.prototype.get_escaped_regexp=function(str){return str.toString().replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\}|\{|\$|\^|\|)/g,"\\$1");};EAL.prototype.init_syntax_regexp=function(){var lang_style={};for(var lang in this.load_syntax){if(!this.syntax[lang]){this.syntax[lang]={};this.syntax[lang]["keywords_reg_exp"]={};this.keywords_reg_exp_nb=0;if(this.load_syntax[lang]['KEYWORDS']){param="g";if(this.load_syntax[lang]['KEYWORD_CASE_SENSITIVE']===false)param+="i";for(var i in this.load_syntax[lang]['KEYWORDS']){if(typeof(this.load_syntax[lang]['KEYWORDS'][i])=="function")continue;this.syntax[lang]["keywords_reg_exp"][i]=new RegExp(this.get_regexp(this.load_syntax[lang]['KEYWORDS'][i]),param);this.keywords_reg_exp_nb++;}}if(this.load_syntax[lang]['OPERATORS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['OPERATORS']){if(typeof(this.load_syntax[lang]['OPERATORS'][i])=="function")continue;if(nb>0)str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['OPERATORS'][i]);nb++;}if(str.length>0)this.syntax[lang]["operators_reg_exp"]=new RegExp("("+str+")","g");}if(this.load_syntax[lang]['DELIMITERS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['DELIMITERS']){if(typeof(this.load_syntax[lang]['DELIMITERS'][i])=="function")continue;if(nb>0)str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['DELIMITERS'][i]);nb++;}if(str.length>0)this.syntax[lang]["delimiters_reg_exp"]=new RegExp("("+str+")","g");}var syntax_trace=[];this.syntax[lang]["quotes"]={};var quote_tab=[];if(this.load_syntax[lang]['QUOTEMARKS']){for(var i in this.load_syntax[lang]['QUOTEMARKS']){if(typeof(this.load_syntax[lang]['QUOTEMARKS'][i])=="function")continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['QUOTEMARKS'][i]);this.syntax[lang]["quotes"][x]=x;quote_tab[quote_tab.length]="("+x+"(\\\\.|[^"+x+"])*(?:"+x+"|$))";syntax_trace.push(x);}}this.syntax[lang]["comments"]={};if(this.load_syntax[lang]['COMMENT_SINGLE']){for(var i in this.load_syntax[lang]['COMMENT_SINGLE']){if(typeof(this.load_syntax[lang]['COMMENT_SINGLE'][i])=="function")continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_SINGLE'][i]);quote_tab[quote_tab.length]="("+x+"(.|\\r|\\t)*(\\n|$))";syntax_trace.push(x);this.syntax[lang]["comments"][x]="\n";}}if(this.load_syntax[lang]['COMMENT_MULTI']){for(var i in this.load_syntax[lang]['COMMENT_MULTI']){if(typeof(this.load_syntax[lang]['COMMENT_MULTI'][i])=="function")continue;var start=this.get_escaped_regexp(i);var end=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_MULTI'][i]);quote_tab[quote_tab.length]="("+start+"(.|\\n|\\r)*?("+end+"|$))";syntax_trace.push(start);syntax_trace.push(end);this.syntax[lang]["comments"][i]=this.load_syntax[lang]['COMMENT_MULTI'][i];}}if(quote_tab.length>0)this.syntax[lang]["comment_or_quote_reg_exp"]=new RegExp("("+quote_tab.join("|")+")","gi");if(syntax_trace.length>0)this.syntax[lang]["syntax_trace_regexp"]=new RegExp("((.|\n)*?)(\\\\*("+syntax_trace.join("|")+"|$))","gmi");if(this.load_syntax[lang]['SCRIPT_DELIMITERS']){this.syntax[lang]["script_delimiters"]={};for(var i in this.load_syntax[lang]['SCRIPT_DELIMITERS']){if(typeof(this.load_syntax[lang]['SCRIPT_DELIMITERS'][i])=="function")continue;this.syntax[lang]["script_delimiters"][i]=this.load_syntax[lang]['SCRIPT_DELIMITERS'];}}this.syntax[lang]["custom_regexp"]={};if(this.load_syntax[lang]['REGEXPS']){for(var i in this.load_syntax[lang]['REGEXPS']){if(typeof(this.load_syntax[lang]['REGEXPS'][i])=="function")continue;var val=this.load_syntax[lang]['REGEXPS'][i];if(!this.syntax[lang]["custom_regexp"][val['execute']])this.syntax[lang]["custom_regexp"][val['execute']]={};this.syntax[lang]["custom_regexp"][val['execute']][i]={'regexp':new RegExp(val['search'],val['modifiers']),'class':val['class']};}}if(this.load_syntax[lang]['STYLES']){lang_style[lang]={};for(var i in this.load_syntax[lang]['STYLES']){if(typeof(this.load_syntax[lang]['STYLES'][i])=="function")continue;if(typeof(this.load_syntax[lang]['STYLES'][i])!="string"){for(var j in this.load_syntax[lang]['STYLES'][i]){lang_style[lang][j]=this.load_syntax[lang]['STYLES'][i][j];}} -else{lang_style[lang][i]=this.load_syntax[lang]['STYLES'][i];}}}var style="";for(var i in lang_style[lang]){if(lang_style[lang][i].length>0){style+="."+lang+" ."+i.toLowerCase()+" span{"+lang_style[lang][i]+"}\n";style+="."+lang+" ."+i.toLowerCase()+"{"+lang_style[lang][i]+"}\n";}}this.syntax[lang]["styles"]=style;}}};eAL.waiting_loading["reg_syntax.js"]="loaded"; -var editAreaLoader= eAL;var editAreas=eAs;EditAreaLoader=EAL;editAreaLoader.iframe_script= "".replace(/Á/g,'this').replace(/Â/g,'textarea').replace(/Ã/g,'function').replace(/Ä/g,'prototype').replace(/Å/g,'settings').replace(/Æ/g,'length').replace(/Ç/g,'style').replace(/È/g,'parent').replace(/É/g,'last_selection').replace(/Ê/g,'value').replace(/Ë/g,'true').replace(/Ì/g,'false'); -editAreaLoader.all_plugins_loaded=true; -editAreaLoader.template= " EditArea [__CSSRULES__] [__JSCODE__]
      [__TOOLBAR__]
       
       
      {$position}: {$line_abbr} 0, {$char_abbr} 0 {$total}: {$line_abbr} 0, {$char_abbr} 0 resize
      {$processing}
      {$search} {$close_popup}
      {$replace} {$move_popup}

      {$find_next} {$replace} {$replace_all}
      {$close_popup}

      Editarea [__EA_VERSION__]


      {$shortcuts}:

      {$tab}: {$add_tab}
      {$shift}+{$tab}: {$remove_tab}
      {$ctrl}+f: {$search_command}
      {$ctrl}+r: {$replace_command}
      {$ctrl}+h: {$highlight}
      {$ctrl}+g: {$go_to_line}
      {$ctrl}+z: {$undo}
      {$ctrl}+y: {$redo}
      {$ctrl}+e: {$help}
      {$ctrl}+q, {$esc}: {$close_popup}
      {$accesskey} E: {$toggle}

      {$about_notice}
      "; -editAreaLoader.iframe_css= ""; diff --git a/upload/admin/js/3rd_party/edit_area/edit_area_functions.js b/upload/admin/js/3rd_party/edit_area/edit_area_functions.js deleted file mode 100644 index dfafd311..00000000 --- a/upload/admin/js/3rd_party/edit_area/edit_area_functions.js +++ /dev/null @@ -1,1214 +0,0 @@ - //replace tabulation by the good number of white spaces - EditArea.prototype.replace_tab= function(text){ - return text.replace(/((\n?)([^\t\n]*)\t)/gi, editArea.smartTab); // slower than simple replace... - }; - - // call by the replace_tab function - EditArea.prototype.smartTab= function(){ - val=" "; - return EditArea.prototype.smartTab.arguments[2] + EditArea.prototype.smartTab.arguments[3] + val.substr(0, editArea.tab_nb_char - (EditArea.prototype.smartTab.arguments[3].length)%editArea.tab_nb_char); - }; - - EditArea.prototype.show_waiting_screen= function(){ - width = this.editor_area.offsetWidth; - height = this.editor_area.offsetHeight; - if( !(this.isIE && this.isIE<6) ) - { - width -= 2; - height -= 2; - } - this.processing_screen.style.display= "block"; - this.processing_screen.style.width = width+"px"; - this.processing_screen.style.height = height+"px"; - this.waiting_screen_displayed = true; - }; - - EditArea.prototype.hide_waiting_screen= function(){ - this.processing_screen.style.display="none"; - this.waiting_screen_displayed= false; - }; - - EditArea.prototype.add_style= function(styles){ - if(styles.length>0){ - newcss = document.createElement("style"); - newcss.type="text/css"; - newcss.media="all"; - if(newcss.styleSheet){ // IE - newcss.styleSheet.cssText = styles; - } else { // W3C - newcss.appendChild(document.createTextNode(styles)); - } - document.getElementsByTagName("head")[0].appendChild(newcss); - } - }; - - EditArea.prototype.set_font= function(family, size){ - var t=this, a=this.textarea, s=this.settings, elem_font, i, elem; - // list all elements concerned by font changes - var elems= ["textarea", "content_highlight", "cursor_pos", "end_bracket", "selection_field", "selection_field_text", "line_number"]; - - if(family && family!="") - s["font_family"]= family; - if(size && size>0) - s["font_size"] = size; - if( t.isOpera && t.isOpera < 9.6 ) // opera<9.6 can't manage non monospace font - s['font_family']="monospace"; - - // update the select tag - if( elem_font = _$("area_font_size") ) - { - for( i = 0; i < elem_font.length; i++ ) - { - if( elem_font.options[i].value && elem_font.options[i].value == s["font_size"] ) - elem_font.options[i].selected=true; - } - } - - /* - * somethimes firefox has rendering mistake with non-monospace font for text width in textarea vs in div for changing font size (eg: verdana change between 11pt to 12pt) - * => looks like a browser internal random bug as text width can change while content_highlight is updated - * we'll check if the font-size produce the same text width inside textarea and div and if not, we'll increment the font-size - * - * This is an ugly fix - */ - if( t.isFirefox ) - { - var nbTry = 3; - do { - var div1 = document.createElement( 'div' ), text1 = document.createElement( 'textarea' ); - var styles = { - width: '40px', - overflow: 'scroll', - zIndex: 50, - visibility: 'hidden', - fontFamily: s["font_family"], - fontSize: s["font_size"]+"pt", - lineHeight: t.lineHeight+"px", - padding: '0', - margin: '0', - border: 'none', - whiteSpace: 'nowrap' - }; - var diff, changed = false; - for( i in styles ) - { - div1.style[ i ] = styles[i]; - text1.style[ i ] = styles[i]; - } - // no wrap for this text - text1.wrap = 'off'; - text1.setAttribute('wrap', 'off'); - t.container.appendChild( div1 ); - t.container.appendChild( text1 ); - // try to make FF to bug - div1.innerHTML = text1.value = 'azertyuiopqsdfghjklm'; - div1.innerHTML = text1.value = text1.value+'wxcvbn^p*ù$!:;,,'; - diff = text1.scrollWidth - div1.scrollWidth; - - // firefox return here a diff of 1 px between equals scrollWidth (can't explain) - if( Math.abs( diff ) >= 2 ) - { - s["font_size"]++; - changed = true; - } - t.container.removeChild( div1 ); - t.container.removeChild( text1 ); - nbTry--; - }while( changed && nbTry > 0 ); - } - - - // calc line height - elem = t.test_font_size; - elem.style.fontFamily = ""+s["font_family"]; - elem.style.fontSize = s["font_size"]+"pt"; - elem.innerHTML = "0"; - t.lineHeight = elem.offsetHeight; - - // update font for all concerned elements - for( i=0; i tags - t.add_style("pre{font-family:"+s["font_family"]+"}"); - - // old opera and IE>=8 doesn't update font changes to the textarea - if( ( t.isOpera && t.isOpera < 9.6 ) || t.isIE >= 8 ) - { - var parNod = a.parentNode, nxtSib = a.nextSibling, start= a.selectionStart, end= a.selectionEnd; - parNod.removeChild(a); - parNod.insertBefore(a, nxtSib); - t.area_select(start, end-start); - } - - // force update of selection field - this.focus(); - this.update_size(); - this.check_line_selection(); - }; - - EditArea.prototype.change_font_size= function(){ - var size=_$("area_font_size").value; - if(size>0) - this.set_font("", size); - }; - - - EditArea.prototype.open_inline_popup= function(popup_id){ - this.close_all_inline_popup(); - var popup= _$(popup_id); - var editor= _$("editor"); - - // search matching icon - for(var i=0; i lines.length) - start= this.textarea.value.length; - else{ - for(var i=0; i0){ - //alert(miss_top); - zone.scrollTop= zone.scrollTop + miss_top; - }else if( zone.scrollTop > cursor_pos_top){ - // when erase all the content -> does'nt scroll back to the top - //alert("else: "+cursor_pos_top); - zone.scrollTop= cursor_pos_top; - } - - // manage left scroll - //var cursor_pos_left= parseInt(_$("cursor_pos").style.left.replace("px","")); - var cursor_pos_left= _$("cursor_pos").cursor_left; - var max_width_visible= zone.clientWidth + zone.scrollLeft; - var miss_left= cursor_pos_left + 10 - max_width_visible; - if(miss_left>0){ - zone.scrollLeft= zone.scrollLeft + miss_left + 50; - }else if( zone.scrollLeft > cursor_pos_left){ - zone.scrollLeft= cursor_pos_left ; - }else if( zone.scrollLeft == 45){ - // show the line numbers if textarea align to it's left - zone.scrollLeft=0; - } - }; - - EditArea.prototype.check_undo= function(only_once){ - if(!editAreas[this.id]) - return false; - if(this.textareaFocused && editAreas[this.id]["displayed"]==true){ - var text=this.textarea.value; - if(this.previous.length<=1) - this.switchClassSticky(_$("undo"), 'editAreaButtonDisabled', true); - - if(!this.previous[this.previous.length-1] || this.previous[this.previous.length-1]["text"] != text){ - this.previous.push({"text": text, "selStart": this.textarea.selectionStart, "selEnd": this.textarea.selectionEnd}); - if(this.previous.length > this.settings["max_undo"]+1) - this.previous.shift(); - - } - if(this.previous.length >= 2) - this.switchClassSticky(_$("undo"), 'editAreaButtonNormal', false); - } - - if(!only_once) - setTimeout("editArea.check_undo()", 3000); - }; - - EditArea.prototype.undo= function(){ - //alert("undo"+this.previous.length); - if(this.previous.length > 0) - { - this.getIESelection(); - // var pos_cursor=this.textarea.selectionStart; - this.next.push( { "text": this.textarea.value, "selStart": this.textarea.selectionStart, "selEnd": this.textarea.selectionEnd } ); - var prev= this.previous.pop(); - if( prev["text"] == this.textarea.value && this.previous.length > 0 ) - prev =this.previous.pop(); - this.textarea.value = prev["text"]; - this.last_undo = prev["text"]; - this.area_select(prev["selStart"], prev["selEnd"]-prev["selStart"]); - this.switchClassSticky(_$("redo"), 'editAreaButtonNormal', false); - this.resync_highlight(true); - //alert("undo"+this.previous.length); - this.check_file_changes(); - } - }; - - EditArea.prototype.redo= function(){ - if(this.next.length > 0) - { - /*this.getIESelection();*/ - //var pos_cursor=this.textarea.selectionStart; - var next= this.next.pop(); - this.previous.push(next); - this.textarea.value= next["text"]; - this.last_undo= next["text"]; - this.area_select(next["selStart"], next["selEnd"]-next["selStart"]); - this.switchClassSticky(_$("undo"), 'editAreaButtonNormal', false); - this.resync_highlight(true); - this.check_file_changes(); - } - if( this.next.length == 0) - this.switchClassSticky(_$("redo"), 'editAreaButtonDisabled', true); - }; - - EditArea.prototype.check_redo= function(){ - if(editArea.next.length == 0 || editArea.textarea.value!=editArea.last_undo){ - editArea.next= []; // undo the ability to use "redo" button - editArea.switchClassSticky(_$("redo"), 'editAreaButtonDisabled', true); - } - else - { - this.switchClassSticky(_$("redo"), 'editAreaButtonNormal', false); - } - }; - - - // functions that manage icons roll over, disabled, etc... - EditArea.prototype.switchClass = function(element, class_name, lock_state) { - var lockChanged = false; - - if (typeof(lock_state) != "undefined" && element != null) { - element.classLock = lock_state; - lockChanged = true; - } - - if (element != null && (lockChanged || !element.classLock)) { - element.oldClassName = element.className; - element.className = class_name; - } - }; - - EditArea.prototype.restoreAndSwitchClass = function(element, class_name) { - if (element != null && !element.classLock) { - this.restoreClass(element); - this.switchClass(element, class_name); - } - }; - - EditArea.prototype.restoreClass = function(element) { - if (element != null && element.oldClassName && !element.classLock) { - element.className = element.oldClassName; - element.oldClassName = null; - } - }; - - EditArea.prototype.setClassLock = function(element, lock_state) { - if (element != null) - element.classLock = lock_state; - }; - - EditArea.prototype.switchClassSticky = function(element, class_name, lock_state) { - var lockChanged = false; - if (typeof(lock_state) != "undefined" && element != null) { - element.classLock = lock_state; - lockChanged = true; - } - - if (element != null && (lockChanged || !element.classLock)) { - element.className = class_name; - element.oldClassName = class_name; - } - }; - - //make the "page up" and "page down" buttons works correctly - EditArea.prototype.scroll_page= function(params){ - var dir= params["dir"], shift_pressed= params["shift"]; - var lines= this.textarea.value.split("\n"); - var new_pos=0, length=0, char_left=0, line_nb=0, curLine=0; - var toScrollAmount = _$("result").clientHeight -30; - var nbLineToScroll = 0, diff= 0; - - if(dir=="up"){ - nbLineToScroll = Math.ceil( toScrollAmount / this.lineHeight ); - - // fix number of line to scroll - for( i = this.last_selection["line_start"]; i - diff > this.last_selection["line_start"] - nbLineToScroll ; i-- ) - { - if( elem = _$('line_'+ i) ) - { - diff += Math.floor( ( elem.offsetHeight - 1 ) / this.lineHeight ); - } - } - nbLineToScroll -= diff; - - if(this.last_selection["selec_direction"]=="up"){ - for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]-nbLineToScroll, lines.length); line_nb++){ - new_pos+= lines[line_nb].length + 1; - } - char_left=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"]-1); - if(shift_pressed) - length=this.last_selection["selectionEnd"]-new_pos-char_left; - this.area_select(new_pos+char_left, length); - view="top"; - }else{ - view="bottom"; - for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]+this.last_selection["line_nb"]-1-nbLineToScroll, lines.length); line_nb++){ - new_pos+= lines[line_nb].length + 1; - } - char_left=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"]-1); - if(shift_pressed){ - //length=this.last_selection["selectionEnd"]-new_pos-char_left; - start= Math.min(this.last_selection["selectionStart"], new_pos+char_left); - length= Math.max(new_pos+char_left, this.last_selection["selectionStart"] )- start ; - if(new_pos+char_left < this.last_selection["selectionStart"]) - view="top"; - }else - start=new_pos+char_left; - this.area_select(start, length); - - } - } - else - { - var nbLineToScroll= Math.floor( toScrollAmount / this.lineHeight ); - // fix number of line to scroll - for( i = this.last_selection["line_start"]; i + diff < this.last_selection["line_start"] + nbLineToScroll ; i++ ) - { - if( elem = _$('line_'+ i) ) - { - diff += Math.floor( ( elem.offsetHeight - 1 ) / this.lineHeight ); - } - } - nbLineToScroll -= diff; - - if(this.last_selection["selec_direction"]=="down"){ - view="bottom"; - for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]+this.last_selection["line_nb"]-2+nbLineToScroll, lines.length); line_nb++){ - if(line_nb==this.last_selection["line_start"]-1) - char_left= this.last_selection["selectionStart"] -new_pos; - new_pos+= lines[line_nb].length + 1; - - } - if(shift_pressed){ - length=Math.abs(this.last_selection["selectionStart"]-new_pos); - length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"]); - //length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, char_left); - this.area_select(Math.min(this.last_selection["selectionStart"], new_pos), length); - }else{ - this.area_select(new_pos+char_left, 0); - } - - }else{ - view="top"; - for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]+nbLineToScroll-1, lines.length, lines.length); line_nb++){ - if(line_nb==this.last_selection["line_start"]-1) - char_left= this.last_selection["selectionStart"] -new_pos; - new_pos+= lines[line_nb].length + 1; - } - if(shift_pressed){ - length=Math.abs(this.last_selection["selectionEnd"]-new_pos-char_left); - length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"])- char_left-1; - //length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, char_left); - this.area_select(Math.min(this.last_selection["selectionEnd"], new_pos+char_left), length); - if(new_pos+char_left > this.last_selection["selectionEnd"]) - view="bottom"; - }else{ - this.area_select(new_pos+char_left, 0); - } - - } - } - //console.log( new_pos, char_left, length, nbLineToScroll, toScrollAmount, _$("result").clientHeigh ); - this.check_line_selection(); - this.scroll_to_view(view); - }; - - EditArea.prototype.start_resize= function(e){ - parent.editAreaLoader.resize["id"] = editArea.id; - parent.editAreaLoader.resize["start_x"] = (e)? e.pageX : event.x + document.body.scrollLeft; - parent.editAreaLoader.resize["start_y"] = (e)? e.pageY : event.y + document.body.scrollTop; - if(editArea.isIE) - { - editArea.textarea.focus(); - editArea.getIESelection(); - } - parent.editAreaLoader.resize["selectionStart"] = editArea.textarea.selectionStart; - parent.editAreaLoader.resize["selectionEnd"] = editArea.textarea.selectionEnd; - parent.editAreaLoader.start_resize_area(); - }; - - EditArea.prototype.toggle_full_screen= function(to){ - var t=this, p=parent, a=t.textarea, html, frame, selStart, selEnd, old, icon; - if(typeof(to)=="undefined") - to= !t.fullscreen['isFull']; - old = t.fullscreen['isFull']; - t.fullscreen['isFull']= to; - icon = _$("fullscreen"); - selStart = t.textarea.selectionStart; - selEnd = t.textarea.selectionEnd; - html = p.document.getElementsByTagName("html")[0]; - frame = p.document.getElementById("frame_"+t.id); - - if(to && to!=old) - { // toogle on fullscreen - - t.fullscreen['old_overflow'] = p.get_css_property(html, "overflow"); - t.fullscreen['old_height'] = p.get_css_property(html, "height"); - t.fullscreen['old_width'] = p.get_css_property(html, "width"); - t.fullscreen['old_scrollTop'] = html.scrollTop; - t.fullscreen['old_scrollLeft'] = html.scrollLeft; - t.fullscreen['old_zIndex'] = p.get_css_property(frame, "z-index"); - t.fullscreen['old_fHeight'] = p.get_css_property(frame, "height"); - t.fullscreen['old_fWidth'] = p.get_css_property(frame, "width"); - - if(t.isOpera){ - html.style.height = "100%"; - html.style.width = "100%"; - } - html.style.overflow = "hidden"; - html.scrollTop = 0; - html.scrollLeft = 0; - - frame.style.position = "absolute"; - frame.style.width = html.clientWidth+"px"; - frame.style.height = html.clientHeight+"px"; - frame.style.display = "block"; - frame.style.zIndex = "999999"; - frame.style.top = "0px"; - frame.style.left = "0px"; - - // if the iframe was in a div with position absolute, the top and left are the one of the div, - // so I fix it by seeing at witch position the iframe start and correcting it - frame.style.top = "-"+p.calculeOffsetTop(frame)+"px"; - frame.style.left = "-"+p.calculeOffsetLeft(frame)+"px"; - - // parent.editAreaLoader.execCommand(t.id, "update_size();"); - // var body=parent.document.getElementsByTagName("body")[0]; - // body.appendChild(frame); - - t.switchClassSticky(icon, 'editAreaButtonSelected', false); - t.fullscreen['allow_resize']= t.resize_allowed; - t.allow_resize(false); - - //t.area_select(selStart, selEnd-selStart); - - - // opera can't manage to do a direct size update - if(t.isFirefox ){ - p.editAreaLoader.execCommand(t.id, "update_size();"); - t.area_select(selStart, selEnd-selStart); - t.scroll_to_view(); - t.focus(); - }else{ - setTimeout("p.editAreaLoader.execCommand('"+ t.id +"', 'update_size();');editArea.focus();", 10); - } - - if ( t.isSafari ) - { - p.document.getElementsByTagName('body')[0].scrollTo(); - } - - } - else if(to!=old) - { // toogle off fullscreen - frame.style.position = "static"; - frame.style.zIndex = t.fullscreen['old_zIndex']; - - frame.style.height = parseInt( t.fullscreen['old_fHeight'] ) + 'px'; - frame.style.width = parseInt( t.fullscreen['old_fWidth'] ) + 'px'; - - if(t.isOpera) - { - html.style.height = "auto"; - html.style.width = "auto"; - html.style.overflow = "auto"; - } - else if(t.isIE && p!=top) - { // IE doesn't manage html overflow in frames like in normal page... - html.style.overflow = "auto"; - } - else - { - html.style.overflow = t.fullscreen['old_overflow']; - } - - html.scrollTop = t.fullscreen['old_scrollTop']; - html.scrollLeft = t.fullscreen['old_scrollLeft']; - - // p.editAreaLoader.hide(t.id); - //p.editAreaLoader.show(t.id); - - t.switchClassSticky(icon, 'editAreaButtonNormal', false); - if(t.fullscreen['allow_resize']) - t.allow_resize(t.fullscreen['allow_resize']); - if(t.isFirefox || t.isSafari ){ - t.area_select(selStart, selEnd-selStart); - setTimeout("editArea.scroll_to_view();", 10); - } - - //p.editAreaLoader.remove_event(p.window, "resize", editArea.update_size); - } - - }; - - EditArea.prototype.allow_resize= function(allow){ - var resize= _$("resize_area"); - if(allow){ - - resize.style.visibility="visible"; - parent.editAreaLoader.add_event(resize, "mouseup", editArea.start_resize); - }else{ - resize.style.visibility="hidden"; - parent.editAreaLoader.remove_event(resize, "mouseup", editArea.start_resize); - } - this.resize_allowed= allow; - }; - - - EditArea.prototype.change_syntax= function(new_syntax, is_waiting){ - // alert("cahnge to "+new_syntax); - // the syntax is the same - if(new_syntax==this.settings['syntax']) - return true; - - // check that the syntax is one allowed - var founded= false; - for(var i=0; i"; - elem.innerHTML= "*"+ this.files[id]['title'] + close +""; - _$('tab_browsing_list').appendChild(elem); - var elem= document.createElement('text'); - this.update_size(); - } - - // open file callback (for plugin) - if(id!="") - this.execCommand('file_open', this.files[id]); - - this.switch_to_file(id, true); - return true; - } - else - return false; - }; - - // close the given file - EditArea.prototype.close_file= function(id){ - if(this.files[id]) - { - this.save_file(id); - - // close file callback - if(this.execCommand('file_close', this.files[id])!==false) - { - // remove the tab in the toolbar - var li= _$(this.files[id]['html_id']); - li.parentNode.removeChild(li); - // select a new file - if(id== this.curr_file) - { - var next_file= ""; - var is_next= false; - for(var i in this.files) - { - if( is_next ) - { - next_file = i; - break; - } - else if( i == id ) - is_next = true; - else - next_file = i; - } - // display the next file - this.switch_to_file(next_file); - } - // clear datas - delete (this.files[id]); - this.update_size(); - } - } - }; - - // backup current file datas - EditArea.prototype.save_file= function(id){ - var t= this, save, a_links, a_selects, save_butt, img, i; - if(t.files[id]) - { - var save= t.files[id]; - save['last_selection'] = t.last_selection; - save['last_text_to_highlight'] = t.last_text_to_highlight; - save['last_hightlighted_text'] = t.last_hightlighted_text; - save['previous'] = t.previous; - save['next'] = t.next; - save['last_undo'] = t.last_undo; - save['smooth_selection'] = t.smooth_selection; - save['do_highlight'] = t.do_highlight; - save['syntax'] = t.settings['syntax']; - save['text'] = t.textarea.value; - save['scroll_top'] = t.result.scrollTop; - save['scroll_left'] = t.result.scrollLeft; - save['selection_start'] = t.last_selection["selectionStart"]; - save['selection_end'] = t.last_selection["selectionEnd"]; - save['font_size'] = t.settings["font_size"]; - save['font_family'] = t.settings["font_family"]; - save['word_wrap'] = t.settings["word_wrap"]; - save['toolbar'] = {'links':{}, 'selects': {}}; - - // save toolbar buttons state for fileSpecific buttons - a_links= _$("toolbar_1").getElementsByTagName("a"); - for( i=0; i