Profile Cover Using Profile Cutomizer Module

There are a couple of profile cover mods in the market but after examining them and visiting the demo pages, they really were not whatt I was looking to accomplish.  However, what I was wanting to accomplish was very easily done with the Boonex Profile Customizer module.  To me, the perfect location for the profile cover would be the sub-menu block.  I had already modified the Profile Customizer so members could add a background to the block.  What was needed was a way for the member to set the height of the block; I decided to let them set it from 125 pixels up to 400 pixels.  However, if you look at the admin menu of the profile customizer it does not include a height setting, only background, fonts, and borders.  Easy enough to add in the extra menu item in the class BxProfileCustomizeTemplate

in the function:  function getAdminPage($sType = '', $iUnitId = '')

just add in the height

$aMenu = array();
$aItems = array('background', 'font', 'border', 'height');

 

and in function: function _getCustomUnitForm($aUnit = array())

                'type' => array(
                    'type' => 'select',
                    'name' => 'type',
                    'required' => true,
                    'values' => array(
                            'background' => _t('_bx_profile_customize_page_background'),
                            'font' => _t('_bx_profile_customize_page_font'),
                            'border' => _t('_bx_profile_customize_page_border'),
                            'height' => _t('_bx_profile_customize_box_height'),
                        ),

 

Then add in the function to handle it:

function _customPageHeight($sPage, $sTarget, $aVars)

 

and in the class BxProfileCustomizeModule

function _compileHeight($aParam)

You will need to add in some language keys of course.

 

I also made some changes to my top_menu class to move the sub-menu to the bottom of the block.

 

While this is not a true tutorial on how to accomplish using the Profile Customizer to change the Sub-menu Block into a profile cover, it does outline what I did and anyone with some basic coding skills can do this. 

Geeks, making the world a better place
Quote · 12 Mar 2015

Can you show us screenprint how it looks?

Thanks

Quote · 12 Mar 2015

I am interested in what you did here.  Anyway you can include all the code in your next post?

 

Thanks!

http://www.mytikibar.com
Quote · 12 Mar 2015

Yes, I will write up a full tutorial.  The Profile Customizer module is a nice little module.  When I first set up my site, I had a few users that wanted to be able to just add their CSS.  That would have opened up a support issue when they trashed their pages.  I will include a screen shot as well.

Geeks, making the world a better place
Quote · 12 Mar 2015

Awesome!

http://www.mytikibar.com
Quote · 12 Mar 2015

I will work on it now.  I will put it in the tutorials section of Notes and place a link here to the tutorial.

Geeks, making the world a better place
Quote · 12 Mar 2015

Note:

Now of course we could just set a fix height for the Sub-menu block and add the background parameter to the block.  However, that means if a user is not interested in having a profile cover, they will have a tall Sub-menu block on their profile page.  My method will allow the user to adjust the height of the Profile Cover or leave the height to the default if they do not wish to have a Profile Cover on their page.  If you are not interested in having the height of the block adjustable, then you can just set the height and add the background parameter to the Sub-menu block and call it a day.  I will continue with my tutorial on allowing the block to be adjustable in height by the member.

Geeks, making the world a better place
Quote · 12 Mar 2015

Here it is in action:

profile_cover.jpg · 168.4K · 1642 views
Geeks, making the world a better place
Quote · 12 Mar 2015

As promised:

http://www.boonex.com/n/profile-cover-using-the-profile-customize-module

Geeks, making the world a better place
Quote · 12 Mar 2015

It works!

http://www.mytikibar.com
Quote · 12 Mar 2015

What would be nice is to use jquery to move the background around to set an xpos and ypos (see css background-position) in place of the left top, right top, etc.  In fact, that would be a good thing for Boonex to do to the Profile Customiser.  I may see about that another time, for now I will just go with the built in background position that Boonex provided.

Geeks, making the world a better place
Quote · 12 Mar 2015
 
 
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.