https://www.icyphoenix.com/viewtopic.php?f=26&t=3726&p=25811#p25811
-----------------------------------
Artie
Mon 10 Mar, 2008 17:26

Re: Sub Cat Link On Profile Page
-----------------------------------
[size=10][color=red]I have moved this topic to the Customizations forum where it is more suited[/color][/size]

Assuming you want to direct the existing link to a user's sub-cat and assuming that the user has only 1 subcat the following code change should work for you.

OPEN [b]includes/usercp_viewprofile.php[/b]

FIND
[codeblock]$recentrow[] = $row;[/codeblock]
AFTER ADD
[codeblock]if ($row['cat_parent'] > 0) $sub_cat_id = $row['cat_id'];[/codeblock]

FIND
[codeblock]// Mighty Gorgon - Full Album Pack - END[/codeblock]
BEFORE ADD
[codeblock]if (!empty($sub_cat_id))
{
	$u_personal_gallery = append_sid('album_cat.' . $phpEx . '?cat_id=' . $sub_cat_id .'&user_id=' . $profiledata['user_id']);
}
else
{ 
  $u_personal_gallery = append_sid('album.' . $phpEx . '?user_id=' . $profiledata['user_id']);
}[/codeblock]

FIND
[codeblock]'U_PERSONAL_GALLERY' => append_sid('album.' . $phpEx . '?user_id=' . $profiledata['user_id']),[/codeblock]
REPLACE WITH
[codeblock]'U_PERSONAL_GALLERY' => $u_personal_gallery,[/codeblock]


