Guest User

msa

a guest
Feb 19th, 2014
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.00 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * <pre>
  5. * Invision Power Services
  6. * IP.Board v3.4.6
  7. * Core variables file: defines caches, resets, etc.
  8. * Last Updated: $Date: 2013-03-19 18:24:44 -0400 (Tue, 19 Mar 2013) $
  9. * </pre>
  10. *
  11. * @author $Author: bfarber $
  12. * @copyright (c) 2001 - 2009 Invision Power Services, Inc.
  13. * @license http://www.invisionpower.com/company/standards.php#license
  14. * @package IP.Board
  15. * @link http://www.invisionpower.com
  16. * @version $Rev: 12088 $
  17. * @since 3.0.0
  18. *
  19. */
  20.  
  21. if ( ! defined( 'IN_IPB' ) )
  22. {
  23. print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
  24. exit();
  25. }
  26.  
  27. class coreVariables
  28. {
  29. /**
  30. * Fetch the caches array
  31. *
  32. * @access public
  33. * @return array Caches
  34. */
  35. public function fetchCaches()
  36. {
  37. //-----------------------------------------
  38. // Extension File: Registered Caches
  39. //-----------------------------------------
  40.  
  41. $CACHE['systemvars'] = array( 'array' => 1,
  42. 'allow_unload' => 0,
  43. 'default_load' => 1,
  44. 'recache_file' => '',
  45. 'recache_function' => '' );
  46.  
  47. $CACHE['licenseData'] = array( 'array' => 1,
  48. 'allow_unload' => 0,
  49. 'default_load' => 0,
  50. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/tools/licensekey.php',
  51. 'recache_class' => 'admin_core_tools_licensekey',
  52. 'recache_function' => 'recache' );
  53.  
  54. $CACHE['login_methods'] = array( 'array' => 1,
  55. 'allow_unload' => 0,
  56. 'default_load' => 1,
  57. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/tools/login.php',
  58. 'recache_class' => 'admin_core_tools_login',
  59. 'recache_function' => 'loginsRecache' );
  60.  
  61. /* Apps and modules */
  62. $CACHE['vnums'] = array( 'array' => 1,
  63. 'allow_unload' => 0,
  64. 'default_load' => 1,
  65. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/applications/applications.php',
  66. 'recache_class' => 'admin_core_applications_applications',
  67. 'recache_function' => 'versionNumbersRecache' );
  68.  
  69. $CACHE['app_cache'] = array( 'array' => 1,
  70. 'allow_unload' => 0,
  71. 'default_load' => 1,
  72. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/applications/applications.php',
  73. 'recache_class' => 'admin_core_applications_applications',
  74. 'recache_function' => 'applicationsRecache' );
  75.  
  76. $CACHE['navigation_tabs'] = array( 'array' => 1,
  77. 'allow_unload' => 0,
  78. 'default_load' => 1,
  79. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/applications/applications.php',
  80. 'recache_class' => 'admin_core_applications_applications',
  81. 'recache_function' => 'applicationsRecache' );
  82.  
  83. $CACHE['module_cache'] = array( 'array' => 1,
  84. 'allow_unload' => 0,
  85. 'default_load' => 1,
  86. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/applications/applications.php',
  87. 'recache_class' => 'admin_core_applications_applications',
  88. 'recache_function' => 'moduleRecache' );
  89.  
  90. $CACHE['app_menu_cache'] = array( 'array' => 1,
  91. 'allow_unload' => 0,
  92. 'default_load' => 1,
  93. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/applications/applications.php',
  94. 'recache_class' => 'admin_core_applications_applications',
  95. 'recache_function' => 'applicationsMenuDataRecache',
  96. 'acp_only' => 1 );
  97.  
  98. $CACHE['hooks'] = array( 'array' => 1,
  99. 'allow_unload' => 0,
  100. 'default_load' => 1,
  101. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/applications/hooks.php',
  102. 'recache_class' => 'admin_core_applications_hooks',
  103. 'recache_function' => 'rebuildHooksCache' );
  104.  
  105. /* User agents and skins */
  106. $CACHE['useragents'] = array( 'array' => 1,
  107. 'allow_unload' => 0,
  108. 'default_load' => 1,
  109. 'recache_file' => IPS_ROOT_PATH . 'sources/classes/useragents/userAgentFunctions.php',
  110. 'recache_class' => 'userAgentFunctions',
  111. 'recache_function' => 'rebuildUserAgentCaches' );
  112.  
  113. $CACHE['useragentgroups'] = array( 'array' => 1,
  114. 'allow_unload' => 0,
  115. 'default_load' => 1,
  116. 'recache_file' => IPS_ROOT_PATH . 'sources/classes/useragents/userAgentFunctions.php',
  117. 'recache_class' => 'userAgentFunctions',
  118. 'recache_function' => 'rebuildUserAgentGroupCaches' );
  119.  
  120. $CACHE['skinsets'] = array( 'array' => 1,
  121. 'allow_unload' => 0,
  122. 'default_load' => 1,
  123. 'recache_file' => IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php',
  124. 'recache_class' => 'skinCaching',
  125. 'recache_function' => 'rebuildSkinSetsCache' );
  126.  
  127. $CACHE['outputformats'] = array( 'array' => 1,
  128. 'allow_unload' => 0,
  129. 'default_load' => 1,
  130. 'recache_file' => IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php',
  131. 'recache_class' => 'skinCaching',
  132. 'recache_function' => 'rebuildOutputFormatCaches' );
  133.  
  134. $CACHE['skin_remap'] = array( 'array' => 1,
  135. 'allow_unload' => 0,
  136. 'default_load' => 1,
  137. 'recache_file' => IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php',
  138. 'recache_class' => 'skinCaching',
  139. 'recache_function' => 'rebuildURLMapCache' );
  140.  
  141.  
  142. /* Basic caches */
  143. $CACHE['group_cache'] = array( 'array' => 1,
  144. 'allow_unload' => 0,
  145. 'default_load' => 1,
  146. 'recache_file' => IPSLib::getAppDir( 'members' ) . '/modules_admin/groups/groups.php',
  147. 'recache_class' => 'admin_members_groups_groups',
  148. 'recache_function' => 'rebuildGroupCache' );
  149.  
  150. $CACHE['settings'] = array( 'array' => 1,
  151. 'allow_unload' => 0,
  152. 'default_load' => 1,
  153. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/settings/settings.php',
  154. 'recache_class' => 'admin_core_settings_settings',
  155. 'recache_function' => 'settingsRebuildCache' );
  156.  
  157. $CACHE['lang_data'] = array( 'array' => 1,
  158. 'allow_unload' => 0,
  159. 'default_load' => 1,
  160. 'recache_file' => IPS_ROOT_PATH . 'sources/classes/class_localization.php',
  161. 'recache_class' => 'class_localization',
  162. 'recache_function' => 'rebuildLanguagesCache' );
  163.  
  164.  
  165.  
  166. $CACHE['banfilters'] = array( 'array' => 1,
  167. 'allow_unload' => 0,
  168. 'default_load' => 1,
  169. 'recache_file' => IPSLib::getAppDir( 'members' ) . '/modules_admin/members/banfilters.php',
  170. 'recache_class' => 'admin_members_members_banfilters',
  171. 'recache_function' => 'rebuildBanCache' );
  172.  
  173.  
  174. $CACHE['stats'] = array( 'array' => 1,
  175. 'allow_unload' => 0,
  176. 'default_load' => 1,
  177. 'recache_file' => IPSLib::getAppDir( 'members' ) . '/modules_admin/members/tools.php',
  178. 'recache_class' => 'admin_members_members_tools',
  179. 'recache_function' => 'rebuildStats' );
  180.  
  181. /* Text handling */
  182. $CACHE['emoticons'] = array(
  183. 'array' => 1,
  184. 'allow_unload' => 0,
  185. 'default_load' => 0,
  186. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/posts/emoticons.php',
  187. 'recache_class' => 'admin_core_posts_emoticons',
  188. 'recache_function' => 'emoticonsRebuildCache'
  189. );
  190.  
  191.  
  192. $CACHE['badwords'] = array(
  193. 'array' => 1,
  194. 'allow_unload' => 0,
  195. 'default_load' => 1,
  196. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/posts/badwords.php',
  197. 'recache_class' => 'admin_core_posts_badwords',
  198. 'recache_function' => 'badwordsRebuildCache'
  199. );
  200.  
  201. $CACHE['bbcode'] = array(
  202. 'array' => 1,
  203. 'allow_unload' => 0,
  204. 'default_load' => 1,
  205. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/posts/bbcode.php',
  206. 'recache_class' => 'admin_core_posts_bbcode',
  207. 'recache_function' => 'bbcodeRebuildCache'
  208. );
  209.  
  210. $CACHE['mediatag'] = array(
  211. 'array' => 1,
  212. 'allow_unload' => 0,
  213. 'default_load' => 1,
  214. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/posts/media.php',
  215. 'recache_class' => 'admin_core_posts_media',
  216. 'recache_function' => 'recacheMediaTag'
  217. );
  218.  
  219. $CACHE['profilefields'] = array(
  220. 'array' => 1,
  221. 'allow_unload' => 0,
  222. 'default_load' => 1,
  223. 'recache_file' => IPSLib::getAppDir( 'members' ) . '/modules_admin/cfields/customfields.php',
  224. 'recache_class' => 'admin_members_cfields_customfields',
  225. 'recache_function' => 'rebuildCache'
  226. );
  227.  
  228. $CACHE['ranks'] = array(
  229. 'array' => 1,
  230. 'allow_unload' => 0,
  231. 'default_load' => 0,
  232. 'recache_file' => IPSLib::getAppDir( 'members' ) . '/modules_admin/members/ranks.php',
  233. 'recache_class' => 'admin_members_members_ranks',
  234. 'recache_function' => 'titlesRecache'
  235. );
  236.  
  237. $CACHE['reputation_levels'] = array(
  238. 'array' => 1,
  239. 'allow_unload' => 0,
  240. 'default_load' => 0,
  241. 'recache_file' => IPSLib::getAppDir( 'members' ) . '/modules_admin/members/reputation.php',
  242. 'recache_class' => 'admin_members_members_reputation',
  243. 'recache_function' => 'rebuildReputationLevelCache'
  244. );
  245.  
  246. $CACHE['rss_output_cache'] = array(
  247. 'array' => 1,
  248. 'allow_unload' => 0,
  249. 'default_load' => 1,
  250. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/tools/cache.php',
  251. 'recache_class' => 'admin_core_tools_cache',
  252. 'recache_function' => 'rebuildRssCache'
  253. );
  254.  
  255. $CACHE['rss_export'] = array(
  256. 'array' => 1,
  257. 'allow_unload' => 0,
  258. 'default_load' => 1,
  259. 'skip_rebuild_when_upgrading' => 1,
  260. 'recache_file' => IPSLib::getAppDir( 'forums' ) . '/modules_admin/rss/export.php',
  261. 'recache_class' => 'admin_forums_rss_export',
  262. 'recache_function' => 'doRssRebuildCache'
  263. );
  264.  
  265. $CACHE['sharelinks'] = array(
  266. 'array' => 1,
  267. 'allow_unload' => 0,
  268. 'default_load' => 0,
  269. 'skip_rebuild_when_upgrading' => 0,
  270. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/tools/sharelinks.php',
  271. 'recache_class' => 'admin_core_tools_sharelinks',
  272. 'recache_function' => 'rebuildCache'
  273. );
  274.  
  275. $CACHE['notifications'] = array(
  276. 'array' => 1,
  277. 'allow_unload' => 0,
  278. 'default_load' => 0,
  279. 'skip_rebuild_when_upgrading' => 0,
  280. 'recache_file' => IPS_ROOT_PATH . '/sources/classes/member/notifications.php',
  281. 'recache_class' => 'notifications',
  282. 'recache_function' => 'rebuildNotificationsCache'
  283. );
  284.  
  285. $CACHE['report_plugins'] = array(
  286. 'array' => 1,
  287. 'allow_unload' => 0,
  288. 'default_load' => 0,
  289. 'skip_rebuild_when_upgrading' => 0,
  290. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/sources/classes/reportLibrary.php',
  291. 'recache_class' => 'reportLibrary',
  292. 'recache_function' => 'rebuildReportCache'
  293. );
  294.  
  295. $CACHE['report_cache'] = array(
  296. 'array' => 1,
  297. 'allow_unload' => 0,
  298. 'default_load' => 0,
  299. 'skip_rebuild_when_upgrading' => 1,
  300. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/sources/classes/reportLibrary.php',
  301. 'recache_class' => 'reportLibrary',
  302. 'recache_function' => 'updateCacheTime'
  303. );
  304.  
  305. /* SEO */
  306. $CACHE['meta_tags'] = array(
  307. 'array' => 1,
  308. 'allow_unload' => 0,
  309. 'default_load' => 1,
  310. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/templates/meta.php',
  311. 'recache_class' => 'admin_core_templates_meta',
  312. 'recache_function' => 'rebuildMetaTagCache'
  313. );
  314. $CACHE['ipseo_acronyms'] = array(
  315. 'array' => 1,
  316. 'allow_unload' => 0,
  317. 'default_load' => 1,
  318. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/posts/acronyms.php',
  319. 'recache_class' => 'admin_core_posts_acronyms',
  320. 'recache_function' => 'recache'
  321. );
  322. $CACHE['ipseo_ignore_messages'] = array(
  323. 'array' => 1,
  324. 'allow_unload' => 0,
  325. 'default_load' => 0,
  326. 'recache_file' => IPSLib::getAppDir( 'core' ) . '/modules_admin/seo/advice.php',
  327. 'recache_class' => 'admin_core_seo_advice',
  328. 'recache_function' => 'recache'
  329. );
  330.  
  331.  
  332. if ( IN_DEV )
  333. {
  334. $CACHE['indev'] = array(
  335. 'array' => 1,
  336. 'allow_unload' => 0,
  337. 'default_load' => 1,
  338. 'recache_file' => '',
  339. 'recache_class' => '',
  340. 'recache_function' => ''
  341. );
  342. }
  343.  
  344. $_LOAD['report_cache'] = 1;
  345. $_LOAD['report_plugins'] = 1;
  346. $_LOAD['rss_output_cache'] = 1;
  347.  
  348. return array( 'caches' => $CACHE,
  349. 'cacheload' => $_LOAD );
  350. }
  351.  
  352. /**
  353. * Fetch the redirect mapping for short-hand urls
  354. *
  355. * @access public
  356. * @return array Redirect mappings
  357. */
  358. public function fetchRedirects()
  359. {
  360. $_RESET = array();
  361.  
  362. /* Make old skin selectors work */
  363. if ( isset($_REQUEST['k']) && $_REQUEST['k'] && isset($_REQUEST['settingNewSkin']) && $_REQUEST['settingNewSkin'] )
  364. {
  365. $_RESET['app'] = 'core';
  366. $_RESET['module'] = 'global';
  367. $_RESET['section'] = 'skin';
  368. $_RESET['skinId'] = intval( $_REQUEST['settingNewSkin'] );
  369.  
  370. /* Return here to stop other rules parsing */
  371. return $_RESET;
  372. }
  373. else if ( isset($_REQUEST['setAsMobile']) && $_REQUEST['setAsMobile'] )
  374. {
  375. $_RESET['app'] = 'core';
  376. $_RESET['module'] = 'global';
  377. $_RESET['section'] = 'skin';
  378. $_RESET['skinId'] = 'setAsMobile';
  379.  
  380. /* Return here to stop other rules parsing */
  381. return $_RESET;
  382. }
  383.  
  384. ###### New IPB 3.0.0 Redirects ######
  385.  
  386. /* Share links */
  387. if ( isset( $_REQUEST['sharelink'] ) AND is_string( $_REQUEST['sharelink'] ) AND ! isset( $_REQUEST['app'] ) )
  388. {
  389. /* Some set ups parse ; automagically (bah) */
  390. if ( ! strstr( $_REQUEST['sharelink'], ';' ) )
  391. {
  392. $_REQUEST['sharelink'] = preg_replace( "#sharelink=(.*)$#", "\\1", $_SERVER['QUERY_STRING'] );
  393. }
  394.  
  395. list( $key, $url, $title ) = explode( ';', $_REQUEST['sharelink'] );
  396. $_RESET['url'] = $url;
  397. $_RESET['title'] = $title;
  398. $_RESET['key'] = $key;
  399. $_RESET['app'] = 'core';
  400. $_RESET['module'] = 'global';
  401. $_RESET['section'] = 'share';
  402. }
  403.  
  404. if( !empty( $_REQUEST['showannouncement'] ) )
  405. {
  406. $_RESET['app'] = 'forums';
  407. $_RESET['module'] = 'forums';
  408. $_RESET['section'] = 'announcements';
  409. $_RESET['announce_id'] = intval( $_REQUEST['showannouncement'] );
  410. }
  411.  
  412. ###### Redirect IPB 2.x to IPB 3.0 URLS ######
  413.  
  414. # IDX
  415. if( isset( $_REQUEST['act'] ) && $_REQUEST['act'] == 'idx' )
  416. {
  417. $_RESET['app'] = 'forums';
  418. $_RESET['section'] = 'boards';
  419. $_RESET['module'] = 'forums';
  420. }
  421.  
  422. # FORUM
  423. if( !empty( $_REQUEST['showforum'] ) )
  424. {
  425. $_RESET['app'] = 'forums';
  426. $_RESET['module'] = 'forums';
  427. $_RESET['section'] = 'forums';
  428. $_RESET['showforum'] = intval( $_REQUEST['showforum'] );
  429. $_RESET['f'] = intval( $_REQUEST['showforum'] );
  430. }
  431.  
  432. # TOPIC
  433. if( !empty( $_REQUEST['showtopic'] ) OR ( isset($_REQUEST['act']) AND $_REQUEST['act'] == 'ST' ) )
  434. {
  435. $_RESET['app'] = 'forums';
  436. $_RESET['module'] = 'forums';
  437. $_RESET['section'] = 'topics';
  438.  
  439. if ( !$_REQUEST['t'] )
  440. {
  441. $_RESET['t'] = intval( $_REQUEST['showtopic'] );
  442. }
  443. else if( $_REQUEST['t'] AND !$_REQUEST['showtopic'] )
  444. {
  445. $_RESET['showtopic'] = intval( $_REQUEST['t'] );
  446. }
  447. }
  448.  
  449. if( ( isset( $_REQUEST['act'] ) && $_REQUEST['act'] == 'findpost' ) || !empty( $_REQUEST['findpost'] ) )
  450. {
  451. $_RESET['pid'] = intval( ( $_REQUEST['pid'] ) ? $_REQUEST['pid'] : $_REQUEST['findpost'] );
  452. $_RESET['app'] = 'forums';
  453. $_RESET['module'] = 'forums';
  454. $_RESET['section'] = 'findpost';
  455. }
  456.  
  457. # PROFILE
  458. if( isset( $_REQUEST['showuser'] ) )
  459. {
  460. $_RESET['app'] = 'members';
  461. $_RESET['module'] = 'profile';
  462. $_RESET['section'] = 'view';
  463. $_RESET['id'] = intval( $_REQUEST['showuser'] );
  464. }
  465.  
  466. if( isset( $_REQUEST['act'] ) && $_REQUEST['act'] == 'members' )
  467. {
  468. $_RESET['app'] = 'members';
  469. $_RESET['module'] = 'list';
  470. }
  471.  
  472. # RSS
  473. if ( isset( $_GET['act'] ) && $_GET['act'] == 'rss' && ! empty( $_GET['id'] ) )
  474. {
  475. $_RESET['app'] = 'core';
  476. $_RESET['module'] = 'global';
  477. $_RESET['section'] = 'rss';
  478. $_RESET['type'] = 'forums';
  479. }
  480.  
  481. # Redirect IPN URLs to IP.Nexus / IP.Subscriptions
  482. if ( ( isset( $_REQUEST['act'] ) and $_REQUEST['act'] == 'paysubs' ) or ( isset( $_REQUEST['app'] ) and $_REQUEST['app'] == 'subscriptions' ) )
  483. {
  484. /* Brute force allow access */
  485. if ( ! defined( 'IPS_ENFORCE_ACCESS' ) )
  486. {
  487. define( 'IPS_ENFORCE_ACCESS', TRUE );
  488. }
  489.  
  490. $_RESET['old'] = '1';
  491.  
  492. // If Nexus is installed, go to Nexus
  493. $subs_version = IPSLib::fetchVersionNumber( 'subscriptions' );
  494. if ( IPSLib::extractAppLocationKey('nexus') == 'ips' && $subs_version['long'] < 10008 )
  495. {
  496. $_RESET['app'] = 'nexus';
  497. $_RESET['module'] = 'payments';
  498. $_RESET['section'] = 'receive';
  499. $_RESET['validate'] = 'paypal';
  500. }
  501. // Otherwise go to IP.Subscriptions
  502. else
  503. {
  504. $_RESET['app'] = 'subscriptions';
  505.  
  506. if ( isset( $_REQUEST['CODE'] ) )
  507. {
  508. if ( $_REQUEST['CODE'] == 'incoming' )
  509. {
  510. $_RESET['module'] = 'incoming';
  511. $_RESET['section'] = 'receive';
  512. $_RESET['do'] = 'validate';
  513. }
  514. else if ( $_REQUEST['CODE'] == 'paydone' )
  515. {
  516. $_RESET['module'] = 'incoming';
  517. $_RESET['section'] = 'receive';
  518. $_RESET['do'] = 'done';
  519. }
  520. else
  521. {
  522. $_RESET['do'] = $_REQUEST['CODE'];
  523. }
  524. }
  525. }
  526. }
  527.  
  528. #Fix IP.Board 2.1 style module links
  529. if( isset( $_REQUEST['act'] ) && $_REQUEST['act'] == 'module' && isset( $_REQUEST['module'] ) )
  530. {
  531. $_REQUEST['autocom'] = $_REQUEST['module'];
  532. }
  533. if( isset( $_REQUEST['cmd'] ) )
  534. {
  535. $_RESET['req'] = $_REQUEST['cmd'];
  536. }
  537.  
  538. # ALL
  539. if( ! isset( $_REQUEST['do'] ) AND ( isset( $_REQUEST['CODE'] ) OR isset( $_REQUEST['code'] ) ) )
  540. {
  541. $_RESET['do'] = ( $_REQUEST['CODE'] ) ? $_REQUEST['CODE'] : $_REQUEST['code'];
  542. }
  543.  
  544. if( isset( $_REQUEST['autocom'] ) or isset( $_REQUEST['automodule'] ) )
  545. {
  546. $_RESET['app'] = $_REQUEST['autocom'] ? $_REQUEST['autocom'] : $_REQUEST['automodule'];
  547. }
  548. # Blog friendly urls
  549. else if( isset( $_GET['autocom'] ) or isset( $_GET['automodule'] ) )
  550. {
  551. $_RESET['app'] = $_GET['autocom'] ? $_GET['autocom'] : $_GET['automodule'];
  552. }
  553.  
  554. # Calendar
  555. if( isset( $_REQUEST['act'] ) && $_REQUEST['act'] == 'calendar' )
  556. {
  557. $_RESET['app'] = 'calendar';
  558. }
  559.  
  560. return $_RESET;
  561. }
  562.  
  563. /**
  564. * SEO templates
  565. *
  566. * OUT FORMAT REGEX:
  567. * First array element is a regex to run to see if we've a match for the URL
  568. * The second array element is the template to use the results of the parenthesis capture
  569. *
  570. * Special variable #{__title__} is replaced with the $title data passed to output->formatUrl( $url, $title)
  571. *
  572. * IMPORTANT: Remember that when these regex are used, the output has not been fully parsed so you will get:
  573. * showuser={$data['member_id']} NOT showuser=1 so do not try and match numerics only!
  574. *
  575. * IN FORMAT REGEX
  576. *
  577. * This allows the registry to piece back together a URL based on the template regex
  578. * So, for example: "/user/(\d+?)/", 'matches' => array( array( 'showuser' => '$1' ) )tells IP.Board to populate 'showuser' with the result
  579. * of the parenthesis capture #1
  580. *
  581. * @access public
  582. * @return array SEO templates
  583. */
  584. public function fetchTemplates()
  585. {
  586. $templates = array(
  587. # SPECIAL TEMPLATE: Used when checking permalinks. {start}permalink{end}. If you changed these templates to use something like:
  588. # /forums/forum-12-my-forum.html then you would need to use start => '/', end => '.html'
  589. # varBlock is the bit that separates the FURL from other variables. varSep is the bit that separates the vars. So if you wanted to use:
  590. # /forums/forum-12-my-forum.html?st/20 or /forums/forum-12-my-forum.html?st-20-view-newpost
  591. # You'd use 'varBlock' = '?' and 'varSep' => ','
  592.  
  593. '__data__' => array( 'start' => '-',
  594. 'end' => '/',
  595. 'varBlock' => '?',
  596. 'varPage' => 'page-',
  597. 'varSep' => '&',
  598. 'varJoin' => '=' ),
  599. );
  600.  
  601. return $templates;
  602. }
  603.  
  604. /**
  605. * Fetch bitwise mappings
  606. * You can add to any of these arrays, but you cannot remove keys or re-order them. BAD THINGS WILL HAPPEN
  607. *
  608. * @access public
  609. * @return array Bitwise mappings
  610. */
  611. public function fetchBitwise()
  612. {
  613. $_BITWISE = array( 'facebook' => array( 'fbc_s_pic', 'fbc_s_status', 'fbc_s_aboutme', 'fbc_si_status' ), // facebook == profile_portal.fb_bwoptions
  614. 'twitter' => array( 'tc_s_pic', 'tc_s_status', 'tc_s_aboutme', 'tc_s_bgimg', 'tc_si_status' ), // twitter = profile_portal.tc_bwoptions
  615. 'members' => array( 'bw_is_spammer', #1
  616. 'bw_from_sfs', #2
  617. 'bw_vnc_type', #4 # 1 based on topic marking table, 0 based on last_visit
  618. 'bw_forum_result_type', #8 # 1 is list, 0 is forum
  619. 'bw_no_status_update', #16 # 1 is yes ban, 0 is no, allow
  620. 'bw_status_email_mine', #32 # 1 is 'send me an email when anyone replies to my status updates', 0 is DO NOT DO WHAT 1 DOES OR ELSE
  621. 'bw_status_email_all', #64 # 1 is 'send me an email when anyone replies to any status update I replied to', 0 is OMG DO NOT DO THAT
  622. 'bw_disable_customization', #128 # 1 yeah, 0 nah boi
  623. 'bw_local_password_set', #256 # 1 means "user was created by remote, but has local password set", 0 means not, or not local user
  624. 'bw_disable_tagging', #512 # 1 means no tagging for this dude
  625. 'bw_disable_prefixes', #1024 # 1 means no prefixes
  626. 'bw_using_skin_gen', #2048 # 1 means yes. 0 means.. well, I think you can figure that out
  627. 'bw_disable_gravatar', #4096 # If 1, Gravatar will not be used for this user
  628. 'bw_paste_plain', #8192 # If 1, editor will paste as plain text
  629. 'bw_html_sig' #16384 # If 1, signature is HTML
  630. ),
  631.  
  632. 'groups' => array(
  633. 'gbw_mod_post_unit_type' , #1 1 is days, 0 is posts
  634. 'gbw_ppd_unit_type' , #2 1 is days, 0 is posts
  635. 'gbw_displayname_unit_type' , #4 1 is days, 0 is posts
  636. 'gbw_sig_unit_type' , #8 1 is days, 0 is posts
  637. 'gbw_promote_unit_type' , #16 1 is days, 0 is posts
  638. 'gbw_no_status_update' , #32 1 is blocked, 0 is not. Quite simple really
  639. 'gbw_soft_delete' , #64 1 is ok, 0 is not - NO LONGER USED
  640. 'gbw_soft_delete_own' , #128 1 is ok, 0 is not
  641. 'gbw_soft_delete_own_topic' , #256 1 is ok, 0 is not - NO LONGER USED
  642. 'gbw_un_soft_delete' , #512 1 is ok, 0 is not - NO LONGER USED
  643. 'gbw_soft_delete_see' , #1024 1 is ok, 0 is not - NO LONGER USED
  644. 'gbw_soft_delete_topic' , #2048 1 is ok, 0 is not - NO LONGER USED
  645. 'gbw_un_soft_delete_topic' , #4096 1 is ok, 0 is not - NO LONGER USED
  646. 'gbw_soft_delete_topic_see' , #8192 1 is ok, 0 is not - NO LONGER USED
  647. 'gbw_soft_delete_reason' , #16384 1 means can read reason, 0 means cannot - NO LONGER USED
  648. 'gbw_soft_delete_see_post' , #32768 seriously. - NO LONGER USED
  649. 'gbw_allow_customization' , #65536 1 YES, 0 NO
  650. 'gbw_allow_url_bgimage' , #131072 ^^
  651. 'gbw_allow_upload_bgimage' , #262144 ^^
  652. 'gbw_view_reps' , #524288 1 allows them to view who gave rep to a post, 0 is can't
  653. 'gbw_no_status_import' , #1048576 1 prevents members in group from importing statuses from services.
  654. 'gbw_disable_tagging' , #2097152 1 means no tagging for this group
  655. 'gbw_disable_prefixes' , #4194304 1 means cannot prefixes
  656. 'gbw_view_last_info' , #8388608 1 for yes, 0 for NOOOOO
  657. 'gbw_view_online_lists' , #16777216 1 for yes
  658. 'gbw_hide_leaders_page' , #33554432 1 for yes
  659. ) );
  660.  
  661. return $_BITWISE;
  662. }
  663. }
Advertisement
Add Comment
Please, Sign In to add comment