- Adres van je forum: http://www.hpmagicworld.nl
Event. modificaties op je forum: Ja
Wanneer ontstond het probleem? Toen ik met Automod de mod Group icons installeerde
phpBB versie: 3.0.12
Heb je onlangs iets veranderd aan je forum? /
Wat is het probleem?
Ik heb een probleem, mijn forum ligt eruit ik krijg een witte pagina.. Ik ben stom geweest ik had de gedachte ik probeer Group Icons beter werkend te krijgen in de hoop dat de icons ook bij mijn topics komen te staan maar helaas. Die mod had ik toen een tijd geleden al geinstalleerd, nu heb ik Automod gecontrolleerd of alles klopte. De Shop mod heb ik ermee werkend gekregen maar toen ik Group icons wou proberen vloog mijn forum eruit.
Ik krijg het niet opgelost, dit is wat automod overigs aangaf bij me:
Code: Selecteer alles
index.php
Find
$sql = 'SELECT group_id, group_name, group_colour, group_type
In-Line Find
group_name
The In-Line Find specified by the MOD could not be found. The Find specified by the MOD could not be found
Find
$sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type
In-Line Find
g.group_name
The In-Line Find specified by the MOD could not be found. The Find specified by the MOD could not be found
Find
$group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
Add After
$group_icon = (!empty($row['group_icon'])) ? '<img style="vertical-align: middle;" src="' . $phpbb_root_path . $config['group_icons_path'] . '/' . $row['group_icon'] . '" alt="' . $group_name . '" title="' . $group_name . '" /> ' : '';
Success
Find
$legend[] = '<span' . $colour_text . '>' . $group_name . '</span>';
In-Line Find
$legend[] =
The In-Line Find specified by the MOD could not be found. The Find specified by the MOD could not be found
Find
$legend[] = '<a' . $colour_text . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . $group_name . '</a>';
In-Line Find
$legend[] =
The In-Line Find specified by the MOD could not be found. The Find specified by the MOD could not be found
viewonline.php
Find
// Grab group details for legend display
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
{
$sql = 'SELECT group_id, group_name, group_colour, group_type
FROM ' . GROUPS_TABLE . '
WHERE group_legend = 1
ORDER BY group_name ASC';
}
else
{
$sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type
FROM ' . GROUPS_TABLE . ' g
LEFT JOIN ' . USER_GROUP_TABLE . ' ug
ON (
g.group_id = ug.group_id
AND ug.user_id = ' . $user->data['user_id'] . '
AND ug.user_pending = 0
)
WHERE g.group_legend = 1
AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')
ORDER BY g.group_name ASC';
}
$result = $db->sql_query($sql);
$legend = '';
while ($row = $db->sql_fetchrow($result))
{
if ($row['group_name'] == 'BOTS')
{
$legend .= (($legend != '') ? ', ' : '') . '<span style="color:#' . $row['group_colour'] . '">' . $user->lang['G_BOTS'] . '</span>';
}
else
{
$legend .= (($legend != '') ? ', ' : '') . '<a style="color:#' . $row['group_colour'] . '" href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
}
}
$db->sql_freeresult($result);
Replace With
// Grab group details for legend display
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
{
$sql = 'SELECT group_id, group_name, group_icon, group_colour, group_type
FROM ' . GROUPS_TABLE . '
WHERE group_legend = 1
ORDER BY group_name ASC';
}
else
{
$sql = 'SELECT g.group_id, g.group_name, g.group_icon, g.group_colour, g.group_type
FROM ' . GROUPS_TABLE . ' g
LEFT JOIN ' . USER_GROUP_TABLE . ' ug
ON (
g.group_id = ug.group_id
AND ug.user_id = ' . $user->data['user_id'] . '
AND ug.user_pending = 0
)
WHERE g.group_legend = 1
AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')
ORDER BY g.group_name ASC';
}
$result = $db->sql_query($sql);
$legend = array();
while ($row = $db->sql_fetchrow($result))
{
$colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : '';
$group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
$group_icon = (!empty($row['group_icon'])) ? '<img style="vertical-align: middle;" src="' . $phpbb_root_path . $config['group_icons_path'] . '/' . $row['group_icon'] . '" alt="' . $group_name . '" title="' . $group_name . '" /> ' : '';
if ($row['group_name'] == 'BOTS' || ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')))
{
$legend[] = $group_icon . '<span' . $colour_text . '>' . $group_name . '</span>';
}
else
{
$legend[] = $group_icon . '<a' . $colour_text . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . $group_name . '</a>';
}
}
$db->sql_freeresult($result);
$legend = implode(', ', $legend);
The Find specified by the MOD could not be found
adm/style/acp_groups.html
Find
<!-- IF S_EDIT -->
Add After
<script type="text/javascript">
// <![CDATA[
function update_group_icon(newicon)
{
document.getElementById('icon_group').src = (newicon) ? "{GROUP_ICONS_PATH}/" + encodeURI(newicon) : "./images/spacer.gif";
}
// ]]></script>
Success
Find
<dl>
<dt><label for="group_rank">{L_GROUP_RANK}:</label></dt>
<dd><select name="group_rank" id="group_rank">{S_RANK_OPTIONS}</select></dd>
</dl>
Add Before
<dl>
<dt><label for="group_icon">{L_GROUP_ICON}:</label></dt>
<dd><select name="group_icon" id="group_icon" onchange="update_group_icon(this.options[selectedIndex].value);">{S_FILENAME_LIST}</select> <img style="vertical-align: middle;" src="{GROUP_ICON}" id="icon_group" alt="" title="" /></dd>
</dl>
Success
includes/cache.php
Find
/**
* Obtain ranks
*/
function obtain_ranks()
Add Before
/**
* Obtain group icons
*/
function obtain_group_icons()
{
if (($group_icons = $this->get('_group_icons')) === false)
{
global $db, $user;
$sql = 'SELECT g.group_id, g.group_name, g.group_icon, g.group_type, u.user_id
FROM ' . GROUPS_TABLE . ' g
LEFT JOIN ' . USERS_TABLE . ' u
ON (g.group_id = u.group_id)';
$result = $db->sql_query($sql);
$group_icons = array();
while ($row = $db->sql_fetchrow($result))
{
if (!empty($row['group_icon'])){
$group_icons[$row['user_id']] = array(
'empty' => false,
'name' => $row['group_name'],
'icon' => $row['group_icon']
);
}else{
$group_icons[$row['user_id']] = array(
'empty' => true
);
}
}
$db->sql_freeresult($result);
$this->put('_group_icons', $group_icons);
}
return $group_icons;
}
Success
includes/functions_content.php
Find
function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false, $custom_profile_url = false)
{
static $_profile_cache;
// We cache some common variables we need within this function
if (empty($_profile_cache))
{
global $phpbb_root_path, $phpEx;
$_profile_cache['base_url'] = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u={USER_ID}');
$_profile_cache['tpl_noprofile'] = '{USERNAME}';
$_profile_cache['tpl_noprofile_colour'] = '<span style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</span>';
$_profile_cache['tpl_profile'] = '<a href="{PROFILE_URL}">{USERNAME}</a>';
$_profile_cache['tpl_profile_colour'] = '<a href="{PROFILE_URL}" style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</a>';
}
global $user, $auth;
In-Line Find
$auth
The In-Line Find specified by the MOD could not be found. The Find specified by the MOD could not be found
Find
// Build correct username colour
$username_colour = ($username_colour) ? '#' . $username_colour : '';
Add Before
// Get the group icon if available
if (empty($group_icons))
{
global $cache;
$group_icons = $cache->obtain_group_icons();
}
// Display the group icon with group name as legend
if (isset($group_icons[$user_id]))
{
if(!$group_icons[$user_id]['empty']){
$group_name = (!empty($user->lang['G_' . $group_icons[$user_id]['name']])) ? $user->lang['G_' . $group_icons[$user_id]['name']] : $group_icons[$user_id]['name'];
$group_icon = $group_icons[$user_id]['icon'];
$group_info = '<img style="vertical-align: middle;" src="' . $phpbb_root_path . $config['group_icons_path'] . '/' . $group_icon . '" title="' . $group_name . '" /> ';//'" alt="' . $group_name .
}else $group_info='';
}else{
global $cache;
$cache->destroy('_group_icons');
$group_icons = $cache->obtain_group_icons();
$group_info='';
}
Success
Find
return str_replace(array('{USERNAME_COLOUR}', '{USERNAME}'), array($username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_noprofile'] : $_profile_cache['tpl_noprofile_colour']);
In-Line Find
str_replace
The In-Line Find specified by the MOD could not be found. The Find specified by the MOD could not be found
Find
return str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_profile'] : $_profile_cache['tpl_profile_colour']);
In-Line Find
str_replace
The In-Line Find specified by the MOD could not be found. The Find specified by the MOD could not be found
includes/functions_display.php
Find
'SELECT' => 'm.*, u.user_colour, g.group_colour, g.group_type',
In-Line Find
g.group_type
The In-Line Find specified by the MOD could not be found. The Find specified by the MOD could not be found
Find
$group_name = (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']);
Add After
$group_icon = (!empty($row['group_icon'])) ? '<img style="vertical-align: middle;" src="' . $phpbb_root_path . $config['group_icons_path'] . '/' . $row['group_icon'] . '" alt="' . $group_name . '" title="' . $group_name . '" /> ' : '';
Success
Find
$forum_moderators[$f_id][] = '<span' . (($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . ';"' : '') . '>' . $group_name . '</span>';
In-Line Find
$forum_moderators[$f_id][] =
The In-Line Find specified by the MOD could not be found. The Find specified by the MOD could not be found
Find
$forum_moderators[$f_id][] = '<a' . (($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . ';"' : '') . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . $group_name . '</a>';
In-Line Find
$forum_moderators[$f_id][] =
The In-Line Find specified by the MOD could not be found. The Find specified by the MOD could not be found
includes/functions_user.php
Find
'group_rank' => 'int',
Add Before
'group_icon' => 'string',
Success
Find
$user_attribute_ary = array(
Replace With
$user_attribute_ary = array('group_icon',
The Find specified by the MOD could not be found
includes/acp/acp_board.php
Find
'ranks_path' => array('lang' => 'RANKS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
Add After
'group_icons_path' => array('lang' => 'GROUP_ICONS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
Success
includes/acp/acp_groups.php
Find
'rank' => request_var('group_rank', 0),
Add Before
'icon' => request_var('group_icon', ''),
Success
Find
if ((isset($submit_ary['avatar']) && $submit_ary['avatar'] && (!isset($group_row['group_avatar']))) || $delete)
{
if (isset($group_row['group_avatar']) && $group_row['group_avatar'])
{
avatar_delete('group', $group_row, true);
}
}
Add After
if (isset($submit_ary['icon']) && $submit_ary['icon'] != $group_row['group_icon'])
{
$cache->destroy('_group_icons');
}
Success
Find
$test_variables = array(
Add After
'icon' => 'string',
Success
Find
$group_rank = $submit_ary['rank'];
Add Before
$group_icon = $submit_ary['icon'];
Success
Find
$group_rank = 0;
Add Before
$group_icon = '';
Success
Find
$group_rank = $group_row['group_rank'];
Add Before
$group_icon = $group_row['group_icon'];
Success
Find
$sql = 'SELECT *
FROM ' . RANKS_TABLE . '
WHERE rank_special = 1
ORDER BY rank_title';
$result = $db->sql_query($sql);
Add Before
// Select a group icon
$icons = $existing_imgs = array();
$sql = 'SELECT *
FROM ' . GROUPS_TABLE . "
ORDER BY group_icon";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$existing_imgs[] = $row['group_icon'];
if ($action == 'edit' && $group_id == $row['group_id'])
{
$icons = $row;
}
}
$db->sql_freeresult($result);
$imglist = filelist($phpbb_root_path . $config['group_icons_path'], '');
$edit_img = $filename_list = '';
foreach ($imglist as $path => $img_ary)
{
sort($img_ary);
foreach ($img_ary as $img)
{
$img = $path . $img;
// Do use the same icon for groups
if (!in_array($img, $existing_imgs) || $img == $group_icon)
{
if ($icons && $img == $icons['group_icon'])
{
$selected = ' selected="selected"';
$edit_img = $img;
}
else
{
$selected = '';
}
if (strlen($img) > 255)
{
continue;
}
$filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . $img . '</option>';
}
}
}
$filename_list = '<option value=""' . (($edit_img == '') ? ' selected="selected"' : '') . '>' . $user->lang['SELECT_GROUP_ICON'] . '</option>' . $filename_list;
unset($existing_imgs, $imglist);
Success
Find
'S_RANK_OPTIONS' => $rank_options,
Add Before
'GROUP_ICONS_PATH' => $phpbb_root_path . $config['group_icons_path'],
'GROUP_ICON' => ($edit_img) ? $phpbb_root_path . $config['group_icons_path'] . '/' . $edit_img : $phpbb_admin_path . 'images/spacer.gif',
'S_FILENAME_LIST' => $filename_list,
Success
includes/ucp/ucp_groups.php
Find
'rank' => request_var('group_rank', 0),
Add Before
'icon' => request_var('group_icon', ''),
Success
Find
if ((isset($submit_ary['avatar']) && $submit_ary['avatar'] && (!isset($group_row['group_avatar']))) || $delete)
{
if (isset($group_row['group_avatar']) && $group_row['group_avatar'])
{
avatar_delete('group', $group_row, true);
}
}
Add After
if (isset($submit_ary['icon']) && $submit_ary['icon'] != $group_row['group_icon'])
{
$cache->destroy('_group_icons');
}
Success
Find
$test_variables = array(
Add After
'icon' => 'string',
Success
Find
$group_rank = $submit_ary['rank'];
Add Before
$group_icon = $submit_ary['icon'];
Success
Find
$group_rank = 0;
Add Before
$group_icon = '';
Success
Find
$group_rank = $group_row['group_rank'];
Add Before
$group_icon = $group_row['group_icon'];
Success
Find
$sql = 'SELECT *
FROM ' . RANKS_TABLE . '
WHERE rank_special = 1
ORDER BY rank_title';
$result = $db->sql_query($sql);
Add Before
// Select a group icon
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
$icons = $existing_imgs = array();
$sql = 'SELECT *
FROM ' . GROUPS_TABLE . '
ORDER BY group_icon';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$existing_imgs[] = $row['group_icon'];
if ($action == 'edit' && $group_id == $row['group_id'])
{
$icons = $row;
}
}
$db->sql_freeresult($result);
$imglist = filelist($phpbb_root_path . $config['group_icons_path'], '');
$edit_img = $filename_list = '';
foreach ($imglist as $path => $img_ary)
{
sort($img_ary);
foreach ($img_ary as $img)
{
$img = $path . $img;
// Do use the same icon for groups
if (!in_array($img, $existing_imgs) || $img == $group_icon)
{
if ($icons && $img == $icons['group_icon'])
{
$selected = ' selected="selected"';
$edit_img = $img;
}
else
{
$selected = '';
}
if (strlen($img) > 255)
{
continue;
}
$filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . $img . '</option>';
}
}
}
$filename_list = '<option value=""' . (($edit_img == '') ? ' selected="selected"' : '') . '>' . $user->lang['SELECT_GROUP_ICON'] . '</option>' . $filename_list;
unset($existing_imgs, $imglist);
Success
Find
'S_RANK_OPTIONS' => $rank_options,
Add Before
'GROUP_ICONS_PATH' => $phpbb_root_path . $config['group_icons_path'],
'GROUP_ICON' => ($edit_img) ? $phpbb_root_path . $config['group_icons_path'] . '/' . $edit_img : $phpbb_root_path . 'images/spacer.gif',
'S_FILENAME_LIST' => $filename_list,
Success
language/en/common.php
Find
?>
Add Before
// Group Icon
$lang = array_merge($lang, array(
'GROUP_ICON' => 'Group icon',
'SELECT_GROUP_ICON' => 'Select a group icon',
));
Success
language/en/acp/common.php
Find
?>
Add Before
// Group Icons
$lang = array_merge($lang, array(
'GROUP_ICONS_PATH' => 'Group icons storage path',
'GROUP_ICONS_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. <samp>images/group_icons</samp>.',
));
Success
styles/prosilver/template/ucp_groups_manage.html
Find
<!-- INCLUDE ucp_header.html -->
Add After
<script type="text/javascript">
// <![CDATA[
function update_group_icon(newicon)
{
document.getElementById('icon_group').src = (newicon) ? "{GROUP_ICONS_PATH}/" + encodeURI(newicon) : "./images/spacer.gif";
}
// ]]></script>
Success
Find
<dl>
<dt><label for="group_rank">{L_GROUP_RANK}:</label></dt>
<dd><select name="group_rank" id="group_rank">{S_RANK_OPTIONS}</select></dd>
</dl>
Add Before
<dl>
<dt><label for="group_icon">{L_GROUP_ICON}:</label></dt>
<dd><select name="group_icon" id="group_icon" onchange="update_group_icon(this.options[selectedIndex].value);">{S_FILENAME_LIST}</select> <img style="vertical-align: middle;" src="{GROUP_ICON}" id="icon_group" alt="" title="" /></dd>
</dl>
Success
styles/subsilver2/template/ucp_groups_manage.html
Find
<!-- INCLUDE ucp_header.html -->
Add After
<script type="text/javascript">
// <![CDATA[
function update_group_icon(newicon)
{
document.getElementById('icon_group').src = (newicon) ? "{GROUP_ICONS_PATH}/" + encodeURI(newicon) : "./images/spacer.gif";
}
// ]]></script>
Success
Find
<tr>
<td class="row1" width="35%"><label for="group_rank">{L_GROUP_RANK}:</label></td>
<td class="row2"><select name="group_rank" id="group_rank">{S_RANK_OPTIONS}</select></td>
</tr>
Add Before
<tr>
<td class="row1" width="35%"><label for="group_icon">{L_GROUP_ICON}:</label></td>
<td class="row2"><select name="group_icon" id="group_icon" onchange="update_group_icon(this.options[selectedIndex].value);">{S_FILENAME_LIST}</select> <img style="vertical-align: middle;" src="{GROUP_ICON}" id="icon_group" alt="" title="" /></td>
</tr>
Success
Alvast bedankt