7
I can't also write good PHP|Smarty code! but I
can- think
- read
- copy/paste code-snippets
- understand XOOPS basis
- use common sense
Results:
1. I found file (data preparation for block), function in it and template for user menu (by reading xoops_version.php from System Module)
They are: system_blocks.php(modules/system/blocks/system_blocks.php), function b_system_user_show(), template system_block_user.html
2. From IStats copy-paste code into function b_system_user_show() (from it's block function) and slightly changed smarty-variable name (don't ask, why changed...)
global $xoopsUser;
if (is_object($xoopsUser)) {
$block['uavatar'] = $xoopsUser->getVar('user_avatar');
if (file_exists(XOOPS_ROOT_PATH.'/uploads/'.$block['uavatar'])) {
$block['uavatar'] = '.XOOPS_URL.'/uploads/'.$block['uavatar'].'" alt="avatar" />';
}else{
$block['uavatar'] = '';
}
3. Cloned templateset, edit system_block_user.html and add new smarty-variable <{$block.uavatar}> into needed place of template
4. Update module System
5. Have fun