function pop_init_config()
{
    // block send_friend, send_friend_post
    if (Params::getParam('action') == 'send_friend' || Params::getParam('action') == 'send_friend_post') {
        pop_redirect_404();
    }
    if (Params::getParam('action') == 'pub_profile') {
        Params::setParam('itemsPerPage', osc_default_results_per_page_at_search());
    }
    if (!osc_rewrite_enabled()) {
        if (Params::getParam('page') == 'search' && Params::getParam('hook') == 'load_more_listing') {
            // no stdio at search page, only via ajax
            osc_add_hook('after_search', 'pop_echo_pop_print_listing_card');
        }
    }
}
<?php

// meta tag robots
if (osc_count_items() == 0 || stripos($_SERVER['REQUEST_URI'], 'search')) {
    osc_add_hook('header', 'pop_nofollow_construct');
} else {
    osc_add_hook('header', 'pop_follow_construct');
}
$listClass = 'item';
pop_add_body_class('search');
if (osc_count_latest_items() == 0) {
    pop_redirect_404(sprintf(__('There are no results matching "%s"', 'pop'), osc_search_pattern()));
}
osc_current_web_theme_path('header.php');
?>

<?php 
if (osc_count_latest_items() == 0) {
    ?>
    <div class="clear"></div>
    <p class="empty" ><?php 
    printf(__('There are no results matching "%s"', 'pop'), osc_search_pattern());
    ?>
</p>
<?php 
} else {
    View::newInstance()->_exportVariableToView("listType", 'latestItems');
    View::newInstance()->_exportVariableToView("listClass", $listClass);
    osc_current_web_theme_path('loop.php');
}
osc_current_web_theme_path('footer.php');