I was not sure where to post this since it is asking about a trick I am trying to do and not posting a trick. I did not feel it belong in the 7.1 forum and not the fun and foo forum. Anyway, on to the show.
My members are requesting that their "pages" reflect their profile. I decided to start with the Account page. Modzzz offers some customisers and I might decide to go that route. However, I would like to try and understand why adding the profile customiser to the account page sometimes fails to load the css code. I am probably misunderstanding how things works.
I added to the member.php:
bx_import('BxDolInstallerUtils');
and then I added:
// add profile customizer
$profileID = getLoggedId();
if (BxDolInstallerUtils::isModuleInstalled("profile_customize")) {
$_page_cont[$_ni]['page_main_css'] = '<style type="text/css">' .
BxDolService::call('profile_customize', 'get_profile_style', array($profileID)) . '</style>';
}
And it works. However, sometimes it stops working. I can go and the account page has the member's customisations. Then after a day or two; I really don't know the time period, one can go to their account page and it will not load in the CSS, and you will see the __page_main_css__ on the page instead. I can go into the admin panel, go to cache and clear it about 10 times for good measure and then the account page will once again load in the member's customisation and it will stay for a couple of days or so.
Why does this happen? It never happens with the Profile Page, so I am assuming that I am not doing something quite right here. My guess is that I lose the $profileID that is sent to the profile customiser but why? member.php uses:
$member['ID'] = getLoggedId();
$member['Password'] = getLoggedPassword();
I know that I could have just used $member[ID] but I decided to stay with the $profileID that is used by the Profile Customiser. In order to present the member with their account page, the member ID has to be present. There is so much that I need to learn about Dolphin.