/** * Setup Advertisements * * Grabs an advertisement for each available position and outputs it to the template. */ function setup_ads() { global $cache, $config, $db, $phpbb_root_path, $phpEx, $template, $user, $forum_id; if (!isset($config['ads_version'])) { return; } $user->add_lang('mods/ads'); // Automatically update if required if (version_compare($config['ads_version'], '1.0.12', '<')) { if (!class_exists('umil')) { if (!file_exists($phpbb_root_path . 'umil/umil.' . $phpEx)) { trigger_error('Please download the latest UMIL (Unified MOD Install Library) from: <a href="http://www.phpbb.com/mods/umil/">phpBB.com/mods/umil</a>', E_USER_ERROR); } include $phpbb_root_path . 'umil/umil.' . $phpEx; } $umil = new umil(true); include $phpbb_root_path . 'ads/versions.' . $phpEx; $umil->run_actions('update', $versions, 'ads_version'); unset($versions); } if (!$config['ads_enable']) { return; } $forum_id = $forum_id ? $forum_id : request_var('f', 0); $ads = get_ads($user->data['user_id'], $forum_id); if (sizeof($ads)) { foreach ($ads as $position_id => $code) { $template->assign_vars(array('ADS_' . $position_id => $code)); } } if (sizeof($ads) || isset($user->data['ad_owner']) && $user->data['ad_owner']) { if (isset($user->data['ad_owner']) && $user->data['ad_owner']) { $template->_tpldata['.'][0]['ADS_8'] = isset($template->_tpldata['.'][0]['ADS_8']) ? $template->_tpldata['.'][0]['ADS_8'] : ''; $template->_tpldata['.'][0]['ADS_8'] .= '<div class="copyright" style="text-align: center; margin-top: 5px;"><a href="' . append_sid("{$phpbb_root_path}ads/my_ads.{$phpEx}") . '">' . $user->lang['MY_ADS'] . '</a></div>'; } $template->assign_var('ADS_CLICK_FILE', $phpbb_root_path . 'ads/click.' . $phpEx); $template->assign_var('ADS_VIEW_FILE', $phpbb_root_path . 'ads/view.' . $phpEx); } }
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License * */ /** * @ignore */ if (!defined('IN_TITANIA')) { exit; } //define('TEST_INSTALLATION', true); titania::$hook->register_ary('phpbb_com_', array('titania_page_header', 'titania_page_footer', array('titania_queue', 'update_first_queue_post'), array('titania_topic', '__construct'), array('titania_post', '__construct'), array('titania_post', 'post'), array('titania_post', 'edit'), array('titania_queue', 'approve'), array('titania_queue', 'deny'), array('titania_queue', 'close'), array('titania_queue', 'delete'), array('titania_contribution', 'assign_details'))); // Do we need to install the DB stuff? if (!isset(phpbb::$config['titania_hook_phpbb_com']) || version_compare(phpbb::$config['titania_hook_phpbb_com'], '1.0.1', '<')) { phpbb::_include('../umil/umil', false, 'umil'); $umil = new umil(true, phpbb::$db); $umil->run_actions('update', array('1.0.0' => array('table_column_add' => array(array(TITANIA_TOPICS_TABLE, 'phpbb_topic_id', array('UINT', 0)))), '1.0.1' => array('table_column_add' => array(array(TITANIA_POSTS_TABLE, 'phpbb_post_id', array('UINT', 0))))), 'titania_hook_phpbb_com'); unset($umil); } /** * .com custom header and footer */ function phpbb_com_titania_page_header($hook, $page_title) { if (defined('TEST_INSTALLATION')) { return; } phpbb::$template->assign_vars(array('S_BODY_CLASS' => 'customise customisation-database', 'S_IS_WEBSITE' => true)); global $auth, $phpEx, $template, $user; $root_path = TITANIA_ROOT . '../../'; $base_path = generate_board_url(true) . '/'; include $root_path . 'vars.' . PHP_EXT;
<?php /** * * @package Anti-Spam ACP * @copyright (c) 2008 EXreaction * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ if (!defined('IN_PHPBB')) { exit; } if (!file_exists($phpbb_root_path . 'umil/umil.' . $phpEx)) { if (!file_exists($phpbb_root_path . 'antispam/umil.' . $phpEx)) { trigger_error('Please download the latest UMIL (Unified MOD Install Library) from: <a href="http://www.phpbb.com/mods/umil/">phpBB.com/mods/umil</a>', E_USER_ERROR); } else { include $phpbb_root_path . 'antispam/umil.' . $phpEx; } } else { include $phpbb_root_path . 'umil/umil.' . $phpEx; } $umil = new umil(true); include $phpbb_root_path . 'antispam/asacp_versions.' . $phpEx; $umil->run_actions('update', $versions, 'asacp_version');