aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/includes/functions_posting.php39
2 files changed, 40 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 5db02b774a..3f01b8a024 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -195,7 +195,7 @@ function gen_forum_rules($mode, &$forum_id)
foreach ($rules as $rule)
{
$template->assign_block_vars('rules', array(
- 'RULE' => ($auth->acl_gets('f_' . $rule, 'm_', 'a_', $forum_id)) ? $user->lang['RULES_' . strtoupper($rule) . '_CAN'] : $user->lang['RULES_' . strtoupper($rule) . '_CANNOT'])
+ 'RULE' => ($auth->acl_gets('f_' . $rule, 'm_', 'a_', intval($forum_id))) ? $user->lang['RULES_' . strtoupper($rule) . '_CAN'] : $user->lang['RULES_' . strtoupper($rule) . '_CANNOT'])
);
}
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 4d62320c09..f9e59efefb 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -507,4 +507,43 @@ function generate_smilies($mode)
}
}
+// Generate Topic Icons
+function generate_topic_icons($mode, $enable_icons)
+{
+ global $template, $config;
+
+ if (!$enable_icons)
+ {
+ return (false);
+ }
+
+ $result = false;
+
+ // Grab icons
+ $icons = array();
+ obtain_icons($icons);
+
+ if (sizeof($icons))
+ {
+ $result = true;
+
+ foreach ($icons as $id => $data)
+ {
+ if ($data['display'])
+ {
+ $template->assign_block_vars('topic_icon', array(
+ 'ICON_ID' => $id,
+ 'ICON_IMG' => $phpbb_root_path . $config['icons_path'] . '/' . $data['img'],
+ 'ICON_WIDTH' => $data['width'],
+ 'ICON_HEIGHT' => $data['height'],
+
+ 'S_ICON_CHECKED' => ($id == $icon_id && $mode != 'reply') ? ' checked="checked"' : '')
+ );
+ }
+ }
+ }
+
+ return ($result);
+}
+
?> \ No newline at end of file