aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/bbcode.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2003-07-13 15:15:05 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2003-07-13 15:15:05 +0000
commit8633c91692e5bb160d51bfc5e3a5057e1605b874 (patch)
tree4c72b336c87986832efe3a1e0a05e28cf21bff21 /phpBB/includes/bbcode.php
parent91a695268344d4bb250c440498aeb9df69c6b515 (diff)
downloadforums-8633c91692e5bb160d51bfc5e3a5057e1605b874.tar
forums-8633c91692e5bb160d51bfc5e3a5057e1605b874.tar.gz
forums-8633c91692e5bb160d51bfc5e3a5057e1605b874.tar.bz2
forums-8633c91692e5bb160d51bfc5e3a5057e1605b874.tar.xz
forums-8633c91692e5bb160d51bfc5e3a5057e1605b874.zip
Cope with secondary (per forum) styles, probably other minor things too ... there is a known permissions problem, will work on that soon. Ashe, the bbcode primary/secondary stuff may need some tightening, particularly since it only checks the bbcode_bitfield for the primary template (which may not exist as coped with later) ... I'll leave that to you to alter.
git-svn-id: file:///svn/phpbb/trunk@4236 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/bbcode.php')
-rw-r--r--phpBB/includes/bbcode.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index 18b5e961a7..db0f330c36 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -276,16 +276,18 @@ class bbcode
);
}
- if ($bbcode_id != -1 && !($user->theme['bbcode_bitfield'] & (1 << $bbcode_id)))
+ if ($bbcode_id != -1 && !($user->theme['primary']['bbcode_bitfield'] & (1 << $bbcode_id)))
{
return $bbcode_hardtpl[$tpl_name];
}
if (empty($this->bbcode_template))
{
- $tpl_filename = $template->make_filename('bbcode.html');
+ global $user;
- if (!$fp = @fopen($tpl_filename, 'rb'))
+ $tpl_filename = (file_exists($phpbb_root_path . 'styles/templates/' . $user->theme['primary']['template_path'] . '/bbcode.html')) ? $phpbb_root_path . 'styles/templates/' . $user->theme['primary']['template_path'] . '/bbcode.html' : $phpbb_root_path . 'styles/templates/' . $user->theme['secondary']['template_path'] . '/bbcode.html';
+
+ if (!($fp = @fopen($tpl_filename, 'rb')))
{
trigger_error('Could not load bbcode template');
}