Example #1
0
function osclasswizards_popular_regions($limit = 20)
{
    View::newInstance()->_exportVariableToView('list_regions', Search::newInstance()->listRegions('%%%%', '>='));
    if (osc_count_list_regions() > 0) {
        $array = array();
        while (osc_has_list_regions()) {
            if (osc_list_region_items() > 0) {
                $region_name = osc_list_region_name();
                $array[$region_name] = osc_list_region_items();
            }
        }
        arsort($array);
        return array_slice($array, 0, $limit);
    } else {
        return false;
    }
}
Example #2
0
            <h3><strong><?php 
    _e("Location", 'bender');
    ?>
</strong></h3>
            <ul>
            <?php 
    while (osc_has_list_regions()) {
        ?>
                <li><a href="<?php 
        echo osc_list_region_url();
        ?>
"><?php 
        echo osc_list_region_name();
        ?>
 <em>(<?php 
        echo osc_list_region_items();
        ?>
)</em></a></li>
            <?php 
    }
    ?>
            </ul>
        </div>
        <?php 
}
?>
    </div>
</div>
<div class="clear"><!-- do not close, use main clossing tag for this case -->
<?php 
osc_current_web_theme_path('footer.php');