We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

want to replace console username with user avatar . | Forum

Sprintally®
Sprintally® Aug 11 '14

i think we can do it via language edit . can any one help me ?

nothing is impossible by custom code modification may be there is a way . if we put code which generate the user avatar in pace of language section that may generate a user avatar by replacing console #username .


waiting for replay .please reply as soon as possible . Thanks  

Alia Team
Alia Aug 11 '14
Edwards, all I can tell is that currently username displayed within the console comes from /ow_system_plugins/base/classes/console_event_handler.php :

if ( OW::getUser()->isAuthenticated() )
        {
           $item = new BASE_CMP_ConsoleDropdownMenu(BOL_UserService::getInstance()->getDisplayName(OW::getUser()->getId()));
            $item->setUrl($router->urlForRoute('base_user_profile', array('username' => OW::getUser()->getUserObject()->getUsername())));

            $item->addItem('main', array('label' => $language->text('base', 'console_item_label_profile'), 'url' => $router->urlForRoute('base_user_profile', array('username' => OW::getUser()->getUserObject()->getUsername()))));
            $item->addItem('main', array('label' => $language->text('base', 'edit_index'), 'url' => $router->urlForRoute('base_edit')));
            $item->addItem('main', array('label' => $language->text('base', 'preference_index'), 'url' => $router->urlForRoute('base_preference_index')));
            $item->addItem('foot', array('label' => $language->text('base', 'console_item_label_sign_out'), 'url' => $router->urlForRoute('base_sign_out')));

You will need to edit this code ( using BOL_AvatarService ) and most likely console's .html files to be able to display avatars there.

This is not a complex change, but requires very good knowledge of .php. Unfortunately I can not provide you with detailed instructions. You will need to investigate this further and try on your own. May be other community members will be able to help you.
Sprintally®
Sprintally® Aug 11 '14
hay can you please inbox me ..  i just want to replace console user name with user avatar .
Alia Team
Alia Aug 12 '14
Unfortunately I can not provide more detailed information on this, since this will require creating additional code and quite a lot of experimenting with the console.
Sprintally®
Sprintally® Aug 12 '14
thanks
Sean
Sean Aug 13 '14
This might be a nice optional setting for a future build?

Display username, Display Avatar, Display username and Avatar?
Sprintally®
Sprintally® Aug 14 '14
this is a important section for community website . 
Sprintally®
Sprintally® Aug 19 '14
waw it's amazing ...  how to do this ? 
Sprintally®
Sprintally® Aug 19 '14
i suggest you 1 more things The E club  .. you can put icons to console { notification , message , user }
Sprintally®
Sprintally® Aug 19 '14
hmm that's great