Posts: 833 Location: Lone Star State
Tue 06 Jan, 2009 01:00
OK, I'm now using ver 1.2.0.27
You almost need to be specific where you want the link on the page, because it does make a difference where you need to place the code.
The following code should allow you to place it as shown in the attach pic below.
OPEN
profile_add_body.tpl
FIND
<tr>
<td class="row-header" colspan="2"><span>{L_AVATAR_PANEL}</span></td>
</tr>
AFTER ADD
<tr>
<td colspan="2"><span><a href="{U_USER_SUBCAT}">{L_USER_SUBCAT}</a></span></td>
</tr>
OPEN
includesusercp_register.php
FIND
$template->assign_block_vars('switch_cpl_avatar', array() );
BEFORE ADD
//////////////////////////////////////
$sql = "SELECT * FROM " . ALBUM_CAT_TABLE . "
WHERE cat_user_id = " . $userdata['user_id'];
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query album information', '', __LINE__, __FILE__, $sql);
}
while($row = $db->sql_fetchrow($result))
{
$sub_cat_id = ($row['cat_parent'] > 0) ? $row['cat_id'] : '';
}
$db->sql_freeresult($result);
if (!empty($sub_cat_id))
{
$u_personal_gallery = append_sid('album_cat.' . $phpEx . '?cat_id=' . $sub_cat_id .'&user_id=' . $userdata['user_id']);
}
else
{
$u_personal_gallery = append_sid('album.' . $phpEx . '?user_id=' . $userdata['user_id']);
}
//////////////////////////////////////
FIND
'L_PROFILE' => $lang['Avatar_panel']));
BEFORE ADD
'U_USER_SUBCAT' => $u_personal_gallery,
'L_USER_SUBCAT' => "HERE IS YOUR SUB_CAT LINK",
MODIFY TO SUIT YOUR NEEDS
