[Customisation Database Commits] r249 - in /trunk: includes/ includes/hooks/ includes/hooks/hook_titania.php titania/includes/core/titania.php
Nathan Guse
exreaction at phpbb.com
Wed Jun 24 20:33:43 UTC 2009
Author: exreaction
Date: Wed Jun 24 20:33:42 2009
New Revision: 249
Log:
Here we go, the only way to fix the rewrite/$phpbb_root_path issues we were having.
Don't forget to copy the hooks file to includes/hooks/ and purge your cache!
Added:
trunk/includes/
trunk/includes/hooks/
trunk/includes/hooks/hook_titania.php (with props)
Modified:
trunk/titania/includes/core/titania.php
Added: trunk/includes/hooks/hook_titania.php
==============================================================================
*** trunk/includes/hooks/hook_titania.php (added)
--- trunk/includes/hooks/hook_titania.php Wed Jun 24 20:33:42 2009
***************
*** 0 ****
--- 1,32 ----
+ <?php
+ /**
+ *
+ * @package Titania
+ * @version $Id$
+ * @copyright (c) 2008 phpBB Customisation Database Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ *
+ */
+
+ /**
+ * @ignore
+ */
+ if (!defined('IN_PHPBB'))
+ {
+ exit;
+ }
+
+ $phpbb_hook->register(array('template', 'display'), 'titania_template_display', 'last');
+
+ function titania_template_display(&$hook, $handle, $include_once)
+ {
+ global $template, $phpbb_root_path;
+
+ foreach ($template->_tpldata['.'][0] as $id => &$row)
+ {
+ $row = str_replace($phpbb_root_path, generate_board_url() . '/', $row);
+
+ //echo '<br /><br />' . $id . "\t - \t";
+ //var_export($row);
+ }
+ }
\ No newline at end of file
Propchange: trunk/includes/hooks/hook_titania.php
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Modified: trunk/titania/includes/core/titania.php
==============================================================================
*** trunk/titania/includes/core/titania.php (original)
--- trunk/titania/includes/core/titania.php Wed Jun 24 20:33:42 2009
***************
*** 233,265 ****
}
else
{
! $u_login_logout = append_sid(TITANIA_ROOT . 'index.' . PHP_EXT, 'mode=logout', true, phpbb::$user->session_id);
}
- $board = self::$absolute_board;
phpbb::$template->assign_vars(array(
// rewrite the login URL to redirect to the currently viewed page.
! 'U_LOGIN_LOGOUT' => $u_login_logout,
! 'LOGIN_REDIRECT' => self::$page,
! 'S_LOGIN_ACTION' => append_sid(PHPBB_ROOT_PATH . 'ucp.' . PHP_EXT, 'mode=login'),
'T_TITANIA_TEMPLATE_PATH' => self::$template_path,
'T_TITANIA_THEME_PATH' => self::$theme_path,
'T_TITANIA_STYLESHEET' => self::$absolute_path . '/style.php?style=' . self::$config->style,
-
- 'T_THEME_PATH' => "{$board}styles/" . phpbb::$user->theme['theme_path'] . '/theme',
- 'T_TEMPLATE_PATH' => "{$board}styles/" . phpbb::$user->theme['template_path'] . '/template',
- 'T_SUPER_TEMPLATE_PATH' => (isset(phpbb::$user->theme['template_inherit_path']) && phpbb::$user->theme['template_inherit_path']) ? "{$board}styles/" . phpbb::$user->theme['template_inherit_path'] . '/template' : "{$board}styles/" . phpbb::$user->theme['template_path'] . '/template',
- 'T_IMAGESET_PATH' => "{$board}styles/" . phpbb::$user->theme['imageset_path'] . '/imageset',
- 'T_IMAGESET_LANG_PATH' => "{$board}styles/" . phpbb::$user->theme['imageset_path'] . '/imageset/' . phpbb::$user->data['user_lang'],
- 'T_IMAGES_PATH' => "{$board}images/",
- 'T_SMILIES_PATH' => $board . phpbb::$config['smilies_path'] . '/',
- 'T_AVATAR_PATH' => $board . phpbb::$config['avatar_path'] . '/',
- 'T_AVATAR_GALLERY_PATH' => $board . phpbb::$config['avatar_gallery_path'] . '/',
- 'T_ICONS_PATH' => $board . phpbb::$config['icons_path'] . '/',
- 'T_RANKS_PATH' => $board . phpbb::$config['ranks_path'] . '/',
- 'T_UPLOAD_PATH' => $board . phpbb::$config['upload_path'] . '/',
- 'T_STYLESHEET_LINK' => (!phpbb::$user->theme['theme_storedb']) ? "{$board}styles/" . phpbb::$user->theme['theme_path'] . '/theme/stylesheet.css' : $board . 'style.' . PHP_EXT . '?sid=' . phpbb::$user->session_id . '&id=' . phpbb::$user->theme['style_id'] . '&lang=' . phpbb::$user->data['user_lang'],
));
}
--- 233,249 ----
}
else
{
! $u_login_logout = append_sid(self::$absolute_path . 'index.' . PHP_EXT, 'mode=logout', true, phpbb::$user->session_id);
}
phpbb::$template->assign_vars(array(
// rewrite the login URL to redirect to the currently viewed page.
! 'U_LOGIN_LOGOUT' => $u_login_logout,
! 'LOGIN_REDIRECT' => self::$page,
'T_TITANIA_TEMPLATE_PATH' => self::$template_path,
'T_TITANIA_THEME_PATH' => self::$theme_path,
'T_TITANIA_STYLESHEET' => self::$absolute_path . '/style.php?style=' . self::$config->style,
));
}
More information about the customisationdb-commits
mailing list