Beispiel #1
0
            ?>
</p>
                            <?php 
        }
        ?>
                            <p><?php 
        echo osc_highlight(strip_tags(osc_item_description()));
        ?>
</p>
                        </div>
                    </div>
                    <?php 
    }
    ?>
                    <?php 
    if (osc_count_latest_items() == osc_max_latest_items()) {
        ?>
                    <div class="row show-all-ads">
                        <div class="span12 columns">
                            <a class="btn primary" href="<?php 
        echo osc_search_show_all_url();
        ?>
"><strong><?php 
        _e("See all offers", 'twitter_bootstrap');
        ?>
 &raquo;</strong></a>
                        </div>
                    </div>
                    <?php 
    }
    ?>
Beispiel #2
0
/**
 * Gets number of latest items
 *
 * @return int
 */
function osc_count_latest_items($total_latest_items = null, $category = array())
{
    if (!View::newInstance()->_exists('latestItems')) {
        $search = Search::newInstance();
        if (!is_numeric($total_latest_items)) {
            $total_latest_items = osc_max_latest_items();
        }
        View::newInstance()->_exportVariableToView('latestItems', $search->getLatestItems($total_latest_items, $category));
    }
    return (int) View::newInstance()->_count('latestItems');
}
Beispiel #3
0
/**
 * Gets number of latest items
 *
 * @return int
 */
function osc_count_latest_items($total_latest_items = null, $options = array())
{
    if (!View::newInstance()->_exists('latestItems')) {
        $search = Search::newInstance();
        if (!is_numeric($total_latest_items)) {
            $total_latest_items = osc_max_latest_items();
        }
        if (is_array($options) && empty($options)) {
            $options = osc_get_subdomain_params();
        } else {
            if ($options == null) {
                $options = array();
            }
        }
        View::newInstance()->_exportVariableToView('latestItems', $search->getLatestItems($total_latest_items, $options));
    }
    return (int) View::newInstance()->_count('latestItems');
}
Beispiel #4
0
function osc_count_latest_items()
{
    if (!View::newInstance()->_exists('items')) {
        View::newInstance()->_exportVariableToView('items', Item::newInstance()->listLatest(osc_max_latest_items()));
    }
    return osc_priv_count_items();
}
Beispiel #5
0
/**
 * Gets number of latest items
 *
 * @return int
 */
function osc_count_latest_items()
{
    if (!View::newInstance()->_exists('items')) {
        $search = new Search();
        $search->limit(0, osc_max_latest_items());
        View::newInstance()->_exportVariableToView('items', $search->getLatestItems());
    }
    return osc_priv_count_items();
}