Deleting, Removing, Editing Personalize Blocks Drupal 7 User Account Profile Setting

How to edit, remove or delete personalize blocks that can bee seen on user profile page seen in the image below:


How to remove the Personalize Blocks section from the User account edit page or control what is listed there for users to show/not show with description says "Blocks consist of content or information that complements the main content of the page. Enable or disable //optional blocks using the checkboxes below."

Step 1: Go to on your path directory ~modules/block/block.module , then open to edit the block.module. Please make sure to back-up your default block.module. To open block.module, you may use Notepad++. In the block.module php file, find the word "personalize" (you may use Ctrl+F).

It may look like this. Click image to Enlarge.

// Only display the fieldset if there are any personalizable blocks.
if ($blocks) {
$form['block'] = array(
'#type' => 'fieldset',
'#title' => t('Personalize blocks'),
'#description' => t('Blocks consist of content or information that complements the main content of the page. Enable or disable optional blocks using the checkboxes below.'),
'#weight' => 3,
'#collapsible' => TRUE,
'#tree' => TRUE,
);
$form['block'] += $blocks;


Step 2: Then put the double slash on the could above, I suggest you do the double slash comment one at a time to observe some of the changes of the user edit profile page. It may look like this image below:

It may look like this. Click image to Enlarge.

// Only display the fieldset if there are any personalizable blocks.
if ($blocks) {
$form['block'] = array(
//'#type' => 'fieldset',
//'#title' => t('Personalize blocks'),
//'#description' => t('Blocks consist of content or information that complements the main content of the page. Enable or disable optional blocks using the checkboxes below.'),
//'#weight' => 3,
//'#collapsible' => TRUE,
//'#tree' => TRUE,
);
$form['block'] += $blocks;

Step 3: Then find the word "checkbox", then put also the double slash as you will see the image below.

It may look like this. Click image to Enlarge.

$blocks = array();
foreach ($result as $block) {
$data = module_invoke($block->module, 'block_info');
if ($data[$block->delta]['info']) {
$blocks[$block->module][$block->delta] = array(
//'#type' => 'checkbox',
'#title' => check_plain($data[$block->delta]['info']),
'#default_value' => isset($account->data['block'][$block->module][$block->delta]) ? $account->data['block'][$block->module][$block->delta] : ($block->custom == 1),
);

Step 4: Done, I suggest you do the double slash comment one at a time to observe some of the changes of the user edit profile page.

This post is under Deleting, Removing, Editing Personalize Blocks Drupal 7 User Account Profile Setting title.

If encounter problem, just replace the module.module original copy. But these steps were already proven and tested. Hope this will helps, too.

Popular posts from this blog

Manny Pacquiao vs Adrien Broner Fight Update

Nonito Donaire vs. Stephon Young Fight Replay Update

Removing powered by Phpfox