Adding Background Attachment To Profile Customiser

geek_girl posted 25th of July 2014 in Community Voice. 0 comments.

You will need to edit the file /modules/boonex/profile_customise/classes/BxProfileCustomizeTemplate.php; note: make a backup of the file first in case of an oops.

Around line 600 find the function:

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

scroll down until you find the position block arrary:

                'position' => array(
                    'type' => 'select',
                    'name' => 'position',
                    'values' => array(
                        'default' => _t('_bx_profile_customize_default'),
                        'left top' => _t('_bx_profile_customize_top_left'),
                        'center top' => _t('_bx_profile_customize_top_center'),
                        'right top' => _t('_bx_profile_customize_top_right'),
                        'left center' => _t('_bx_profile_customize_center_left'),
                        'center center' => _t('_bx_profile_customize_center'),
                        'right center' => _t('_bx_profile_customize_center_right'),
                        'left bottom' => _t('_bx_profile_customize_bottom_left'),
                        'center bottom' => _t('_bx_profile_customize_bottom_center'),
                        'right bottom' => _t('_bx_profile_customize_bottom_right')
                    'value' => isset($aVars['position']) ? $aVars['position'] : 'default',
                    'caption' => _t('_bx_profile_customize_position'),
                    'attrs' => array(
                            'multiplyable' => false
                    'display' => true,

Just after the above, add this block of code:

                'attachment' => array(
                    'type' => 'select',
                    'name' => 'attachment',
                    'values' => array(
                        'default' => _t('_bx_profile_customize_default'),
                        'fixed' => _t('_bx_profile_customize_fixed')
                    'value' => isset($aVars['attachment']) ? $aVars['attachment'] : 'default',
                    'caption' => _t('_bx_profile_customize_attachment'),
                    'attrs' => array(
                            'multiplyable' => false
                    'display' => true,

Note: add the following language keys:





You also have to add the bits to the BxProfileCustomizerModule.php file so that it can handle the new case of attachment.

in that file find: function _compileBackground($aParam)

Add your new attachment case:

                case 'attachment':
                    $sParams .= 'background-attachment: ' . $sValue . ';';

Recommended by
Please login to post a comment.
No comments so far.