Putting dynamic content on top header

Been trying with various ways  to add some dynamic content next to my D7's Logo but can't figure it out alone.

All i wanna do is add the hello bar that appears over the rotating banner, a small greeting per say, with the logged in user's Avatar next to it. I've tried putting it through injections, through hardcoded php in the _sub_header.html template file etc but no luck.

If anyone knows anything please help, would really appreciate it!

Quote · 29 Apr 2010

Hello, what dynamic content do you mean ? what place where do you want to put your content ?

PS: If possible do not write me personally, please try to ask on the forum first
Quote · 29 Apr 2010

I want to put the user's Avatar next to the websites logo!

Quote · 29 Apr 2010

Anybody?

Quote · 30 Apr 2010

Just looking at this on my site at the moment, I also wanted to move the avatar to the banner - same as for my D6 site and put the quotes at the bottom - I'm simply mimicking the style and layout for my D6 site - I want my upgrade to D7 to be more or less transparent to my users.

The quotes are simple enough - you just need to modify the sys_injections table - look for quotes_injection and then change the key to injection_footer_after

This is only half of the story though - as the quotes do not display correctly - this is mostly as the css has a position:absolute attribute - this needs to be changed to position:relative, or removed altogether. This can be changed in unit.css - look for the .quote_div class name. Whilst you are there you might also want to change the rest of the styling.

You can also put the quotes block anywhere you like by creating your own injection point - simply add the following to your template in the position you want to inject the code.

<bx_injection:my_injection />

Then change the key in the sys_injections table to my_injection.

You can include any kind of custom content in this manner by adding it to the sys_injections table - include the php code you want to execute in the data field and make sure you change the type to php.

In this manner you can include the avatar and username in the banner.

The code that puts the avatar and username in the promo block is in design.inc.php - you will need to remove / comment this out to remove the avatar and hello text from the promo, or you might like to change it to something else - we can also use this code to display the avatar in our banner

$aInfo = getProfileInfo();
$sWelcomeElement = '<div class="label_thumbnail">' . get_member_thumbnail($aInfo['ID'], "left", false) . '</div><div class="label_thumb">' . _t('_Hello member', $aInfo['NickName']) . '</div><div class="clear_both"></div>';

Simple create a new entry into the sys_injections table - I called it 'avatar' - then add in the info. You have to change the way that the code is handled slightly - but not too much

$aInfo = getProfileInfo();
return '<div class="label_thumbnail">' . get_member_thumbnail($aInfo['ID'], "left", false) . '</div><div class="label_thumb">' . _t('_Hello member', $aInfo['NickName']) . '</div><div class="clear_both"></div>';

Make sure that you set the key to injection_logo_after.

You will now see the avatar and text displayed in the header - but you will notice that it does not display 100% correctly - this is because there are no style elements associated with it - the original style applied in index.css no longer applies as the elements were explicitly defined - to remedy this simply create the following styles in general.css for the image and text respectively and style them to suit your needs

.sys_ml_wrapper .label_thumbnail .thumbnail_block{}

.sys_ml_wrapper .label_thumb {}

HTH

/DM

Dolphin - Ajax Masturbation
Quote · 2 May 2010

Just looking at this on my site at the moment, I also wanted to move the avatar to the banner - same as for my D6 site and put the quotes at the bottom - I'm simply mimicking the style and layout for my D6 site - I want my upgrade to D7 to be more or less transparent to my users.

The quotes are simple enough - you just need to modify the sys_injections table - look for quotes_injection and then change the key to injection_footer_after

This is only half of the story though - as the quotes do not display correctly - this is mostly as the css has a position:absolute attribute - this needs to be changed to position:relative, or removed altogether. This can be changed in unit.css - look for the .quote_div class name. Whilst you are there you might also want to change the rest of the styling.

You can also put the quotes block anywhere you like by creating your own injection point - simply add the following to your template in the position you want to inject the code.

<bx_injection:my_injection />

Then change the key in the sys_injections table to my_injection.

You can include any kind of custom content in this manner by adding it to the sys_injections table - include the php code you want to execute in the data field and make sure you change the type to php.

In this manner you can include the avatar and username in the banner.

The code that puts the avatar and username in the promo block is in design.inc.php - you will need to remove / comment this out to remove the avatar and hello text from the promo, or you might like to change it to something else - we can also use this code to display the avatar in our banner

$aInfo = getProfileInfo();
$sWelcomeElement = '<div class="label_thumbnail">' . get_member_thumbnail($aInfo['ID'], "left", false) . '</div><div class="label_thumb">' . _t('_Hello member', $aInfo['NickName']) . '</div><div class="clear_both"></div>';

Simple create a new entry into the sys_injections table - I called it 'avatar' - then add in the info. You have to change the way that the code is handled slightly - but not too much

$aInfo = getProfileInfo();
return '<div class="label_thumbnail">' . get_member_thumbnail($aInfo['ID'], "left", false) . '</div><div class="label_thumb">' . _t('_Hello member', $aInfo['NickName']) . '</div><div class="clear_both"></div>';

Make sure that you set the key to injection_logo_after.

You will now see the avatar and text displayed in the header - but you will notice that it does not display 100% correctly - this is because there are no style elements associated with it - the original style applied in index.css no longer applies as the elements were explicitly defined - to remedy this simply create the following styles in general.css for the image and text respectively and style them to suit your needs

.sys_ml_wrapper .label_thumbnail .thumbnail_block{}

.sys_ml_wrapper .label_thumb {}

HTH

/DM

Thanks for the addition DM, now what i had in mind was creating a very simple user CP to give them the ability of doing most usual things from there... things are now pretty easy for me! :)

Quote · 2 May 2010

Hay there,

I am also working on more or less same task, need to show other users thumb nails in header region.

if sys_injections is useful, i cant find 'quotes_injection'

am I on righ track or any thing else needed?

plz help.

Quote · 9 Jun 2010

Hay there,

I am also working on more or less same task, need to show other users thumb nails in header region.

if sys_injections is useful, i cant find 'quotes_injection'

am I on righ track or any thing else needed?

plz help.

ibs,

I wrote this up as a tutorial on my site - might make it a bit clearer to understand - http://www.deeemm.com/resources/tutorials/42-dolphin-70x-modifications/142-d7-move-avatar-from-promo-to-banner.html

Dolphin - Ajax Masturbation
Quote · 9 Jun 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.