https://www.icyphoenix.com/viewtopic.php?f=26&t=1436&p=10922#p10922
-----------------------------------
luckyou03
Tue 27 Mar, 2007 04:00

Re: Wanting To Add A Personal Gallery Management Link
-----------------------------------
First off, thank you. I tried the code and im getting errors maybe if you looked at the whole thing it might be better, its not to big.

[code linenumbers=false]<?php 
/***************************************************************************
 *                               cpl_menu.php
 *                            -------------------
 *	 mod version		  : 1.0.5
 *   date                 : Monday, 08.22.2005
 *   copyright            : Dustin < adminkrez@dumbassjones.com >
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
}


$album_user_id = $userdata['user_id'];

$sql = "SELECT c.cat_id
                FROM ". ALBUM_CAT_TABLE ." AS c
                WHERE c.cat_user_id = '$album_user_id' AND c.cat_parent = 0
                LIMIT 1";

        if( !($result = $db->sql_query($sql)) )
        {
            message_die(GENERAL_ERROR, 'Could not query category information', '', __LINE__, __FILE__, $sql);
        }

        if ($db->sql_numrows($result) == 0)
        {

            $create_personal_cat_manage_link = append_sid(album_append_uid('album_personal_cat_admin.' . $phpEx . '?action=create&amp;user_id=' . $album_user_id));
            
        }
        else
                $thisrow = $db->sql_numrows($result) ;
                        $cat_id = $thisrow['cat_id'];
            $create_personal_cat_manage_link = append_sid(album_append_uid('album_personal_cat_admin.' . $phpEx . '?cat_id='.$cat_id.'user_id=' . $album_user_id));
        }
        $db->sql_freeresult($result);
         

$template->set_filenames(array(
	'cpl_menu_output' => 'profile_cpl_menu.tpl')
);

$template->assign_vars(array(
	'L_CPL_REG_INFO' => $lang['Registration_info'],
	'L_CPL_PROFILE_INFO' => $lang['Profile_info'],
	'L_CPL_AVATAR_PANEL' => $lang['Avatar_panel'],
	'L_CPL_PREFERENCES' => $lang['Preferences'],
	'L_CPL_SETTINGS_OPTIONS' => $lang['Cpl_Settings_Options'],
	'L_CPL_BOARD_SETTINGS' => $lang['Cpl_Board_Settings'],
	'L_CPL_PRIVATE_MESSAGES' => $lang['Private_Messages'],
	'L_CPL_NEWMSG' => $lang['Cpl_NewMSG'],
	'L_CPL_PERSONAL_PROFILE' => $lang['Cpl_Personal_Profile'],
	'L_CPL_VIEW_PROFILE' => $lang['Cpl_View_Profile'], 

	'U_CPL_NEWMSG' => append_sid('privmsg.'.$phpEx.'?mode=post'),
	'U_CPL_REGISTRATION_INFO' => append_sid('profile.'.$phpEx.'?mode=editprofile&cpl_mode=reg_info'),
	'U_CPL_PROFILE_INFO' => append_sid('profile.'.$phpEx.'?mode=editprofile&cpl_mode=profile_info'),
	'U_CPL_PREFERENCES' => append_sid('profile.'.$phpEx.'?mode=editprofile&cpl_mode=preferences'),
	'U_CPL_BOARD_SETTINGS' => append_sid('profile.'.$phpEx.'?mode=editprofile&cpl_mode=board_settings'),
	'U_CPL_AVATAR_PANEL' => append_sid('profile.'.$phpEx.'?mode=editprofile&cpl_mode=avatar'),
		'U_YOUR_PERSONAL_GALLERY' => append_sid("album.$phpEx?user_id=". $userdata['user_id']),
		'UPLOAD_PERSONAL_GALLERY' => append_sid("album_upload.php?cat_id=1&user_id=". $userdata['user_id']),
		'U_USERS_PERSONAL_GALLERIES' => append_sid("album_personal_index.$phpEx"),
                'U_PERSONAL_CAT_ADMIN' => $create_personal_cat_manage_link,
));

$template->assign_var_from_handle('CPL_MENU_OUTPUT', 'cpl_menu_output');

?>[/code]

The first error i got was

[code linenumbers=false]Parse error: syntax error, unexpected '}' in /home/sweetpro/public_html/cpl_menu.php on line 48[/code]

so i removed the } and got this error

[code linenumbers=false]Fatal error: Call to undefined function: album_append_uid() in /home/sweetpro/public_html/cpl_menu.php on line 46[/code]


