Custom Block - How to get additional variables
You can create custom block and you can render variables using block view function

function MODULENAME_block_info() {
    $blocks = array();    
    $blocks['top_five_adverts'] = array(
        'info' =&gt; t('Top Five Adverts'),
    );
}

function MODULENAME_block_view($delta = '') {
    $block = array();

    switch ($delta) {
        case 'top_five_adverts':
            $block['subject'] = '';
            $block['content'] = theme('top_five_adverts_list', array('data' =&gt; getAdverts()));
            break;
    }
    return $block;
}

function MODULENAME_theme() {
    return array(
            'top_five_adverts_list' =&gt; array(
            'variables' =&gt; array('data' =&gt; null),
            'template' =&gt; 'theme/top_five_adverts_list',
        ),
    );
}


Create top_five_adverts_list.tpl.php in theme folder of that module