Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Forums / Cotonti / Core Labs / User Avatar in User Menu

a litle core hack

scriptor
#22821 2010-02-11 02:37
To Display the User Avatar in the User menu you must only change the header.php in the core folder.
Find:
$t->assign(array (
			"HEADER_USER_NAME" => $usr['name'],
			"HEADER_USER_ADMINPANEL" => $out['adminpanel'],
			"HEADER_USER_LOGINOUT" => $out['loginout'],
			"HEADER_USER_PROFILE" => $out['profile'],
			"HEADER_USER_PMS" => $out['pms'],
			"HEADER_USER_PFS" => $out['pfs'],
			"HEADER_USER_PMREMINDER" => $out['pmreminder'],
			"HEADER_USER_MESSAGES" => $usr['messages']
		));

And Change it with:
$sql = sed_sql_query("SELECT * from sed_users WHERE user_id='".$usr['id']."' LIMIT 1");
		$row = sed_sql_fetcharray($sql);
		
		$t->assign(array (
			"HEADER_USER_NAME" => $usr['name'],
			"HEADER_USER_ADMINPANEL" => $out['adminpanel'],
			"HEADER_USER_LOGINOUT" => $out['loginout'],
			"HEADER_USER_PROFILE" => $out['profile'],
			"HEADER_USER_PMS" => $out['pms'],
			"HEADER_USER_PFS" => $out['pfs'],
			"HEADER_USER_PMREMINDER" => $out['pmreminder'],
			"HEADER_USER_MESSAGES" => $usr['messages'],
			"HEADER_USER_AVATAR" => $row['user_avatar']
		));

Then You can use {HEADER_USER_AVATAR} in your header.tpl :)
[url=http://www.freak-forum.de]Freak-Forum.de[/url] - The Freakstyle Community<br />
[url=http://www.adelmann-solutions.com]adelmann-solutions, webdesign Freiburg[/url]