function chosen_region_select() { View::newInstance()->_exportVariableToView('list_regions', Search::newInstance()->listRegions('%%%%', '>=', 'region_name ASC')); if (osc_count_list_regions() > 0) { echo '<select name="sRegion" data-placeholder="' . __('Select a region...', 'twitter') . '" style="width: 200px;" class="chzn-select"">'; echo '<option></option>'; while (osc_has_list_regions()) { echo '<option value="' . osc_list_region_name() . '">' . osc_list_region_name() . '</option>'; } echo '</select>'; } View::newInstance()->_erase('list_regions'); }
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; } }
"> <strong><?php _e('See all listings', 'bender'); ?> »</strong></a> </p> <?php } } ?> </div> </div><!-- main --> <div id="sidebar"> <div class="widget-box"> <?php if (osc_count_list_regions() > 0) { ?> <div class="box location"> <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();