SmartFAQ is developed by The SmartFactory (https://www.smartfactory.ca), a division of InBox Solutions (https://www.inboxsolutions.net)

How can I clean up the Blocks Administration page to show only online blocks by default?
The default behaviour of the Blocks Administration page (Admin => System => Blocks) is that it shows you a list of all the blocks on your site - both online and offline.

This can be very annoying as the list can take a long time to load if you have a lot of blocks. Also, the 'offline' blocks tend to be the ones that you aren't using. Fortunately, it is easy to change the default view so that it only shows the online blocks by default. Here's how:

1. Open the file:
XOOPS_ROOT/modules/system/admin/blockadmin/blocksadmin.php

2. Find the following code:

function list_blocks()
    {
        global 
$xoopsUser$xoopsConfig;
        include_once 
XOOPS_ROOT_PATH.'/class/xoopslists.php';
        
//OpenTable();
        
$selmod = isset($_GET['selmod']) ? intval($_GET['selmod']) : 0;
        
$selvis = isset($_GET['selvis']) ? intval($_GET['selvis']) : [b][color=FF0000]2[/color][/b];
        
$selgrp = isset($_GET['selgrp']) ? intval($_GET['selgrp']) : XOOPS_GROUP_USERS;
        echo 
"


3. Change the value '2' (highlighted in red above) to a '1'.

4. Save the file. Done!

Of course, if you want to see the offline blocks, you can still do this in Blocks Admin. This hack only affects the default view.

Credit: Solution posted in forum by MIGOE.


The comments are owned by the author. We aren't responsible for their content.


Login

Who's Online

287 user(s) are online (3 user(s) are browsing XOOPS FAQ)


Members: 0


Guests: 287


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Did you know ?

Some modules don't work properly, if run on a PHP5 platform with the register_long_arrays directive turned off

Random question

Hi, my provider just updated the server where I have installed xoops and now I have this error message

"XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run."

Could someone point me to the right direction to solve this problem. Thanks.