
Re: User Personal Galleries Page Customization
it has been a while since i looked at phpbb2 code.
i jsut quickly did below, there may well be functions etc that need including.
below simply lists the categories that a user has with the description. it does not separate subcats and all that so a. make a backup b. you install this at your own risk
OPEN
album_personal_index.php
FIND
}
$sql = "SELECT COUNT(DISTINCT u.user_id) AS total
FROM ". USERS_TABLE ." AS u, ". ALBUM_TABLE ." AS p, " . ALBUM_CAT_TABLE . " AS c
WHERE u.user_id <> ". ANONYMOUS ."
AND c.cat_user_id = u.user_id
AND c.cat_id = p.pic_cat_id";
if ( !($result = $db->sql_query($sql)) )
{
BEFORE, ADD
$sql = "SELECT cat_id, cat_view_level, cat_title, cat_desc, cat_user_id
FROM ". ALBUM_CAT_TABLE ."
WHERE cat_user_id = " . $user_id ."
AND cat_parent <> 0
AND cat_view_level IN ($cat_view_level)
ORDER BY cat_title
";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query last pic on profile information', '', __LINE__, __FILE__, $sql);
}
while( $row2 = $db->sql_fetchrow($result) )
{
$row_cat_id = $row2['cat_id'];
$pers_ind_cat_url = append_sid(album_append_uid("album_cat.$phpEx?cat_id=" . $row_cat_id . "&user_id=" . $user_id));
$template->assign_block_vars('memberrow.cats', array(
'TITLE' => '<a href="' . $pers_ind_cat_url . '">' . $row2['cat_title'] . '</a>',
'DESC' => $row2['cat_desc'],
));
}
OPEN
album_personal_index_body.tpl
FIND
<td class="{memberrow.ROW_CLASS}" align="center"> <span class="gen">{memberrow.ALBUM_IMG}</span></td>
REPLACE WITH
<td class="{memberrow.ROW_CLASS}" align="left"><span class="genmed"><table><tr><td>
<!-- BEGIN cats -->
• ; {memberrow.cats.TITLE}<br/>
<span class="gensmall"> {memberrow.cats.DESC}<br/><br/></span>
<!-- END cats -->
</td></tr></table></span></td>
note: • ; {memberrow.cats.TITLE}<br/> should in the beginning be " & # 8226 ; " but it makes a • out of the 8 226