<h1><strong><?php echo osc_item_title(); ?> </strong></h1> <!-- <div class="item-header"> <div> <?php if (osc_item_pub_date() !== '') { printf(__('<strong class="publish">Published date</strong>: %1$s', 'osclassclsx'), osc_format_date(osc_item_pub_date())); } ?> </div> <div> <?php if (osc_item_mod_date() !== '') { printf(__('<strong class="update">Modified date:</strong> %1$s', 'osclassclsx'), osc_format_date(osc_item_mod_date())); } ?> </div> <?php if (count($location) > 0) { ?> <ul id="item_location"> <li><strong><?php _e("Location", 'osclassclsx'); ?> </strong>: <?php echo implode(', ', $location); ?> </li> </ul>
</div> <div id="main"> <div id="type_dates"> <strong><?php echo osc_item_category(); ?> </strong> <em class="publish"><?php if (osc_item_pub_date() != '') { echo __('Published date', 'modern') . ': ' . osc_format_date(osc_item_pub_date()); } ?> </em> <em class="update"><?php if (osc_item_mod_date() != '') { echo __('Modified date', 'modern') . ': ' . osc_format_date(osc_item_mod_date()); } ?> </em> </div> <ul id="item_location"> <?php if (osc_item_country() != "") { ?> <li><?php _e("Country", 'modern'); ?> : <strong><?php echo osc_item_country(); ?> </strong></li><?php
?> </strong> <em class="publish"> <?php if (osc_item_pub_date() != '') { echo __('Added', 'newcorp') . ': ' . osc_format_date(osc_item_pub_date()); } ?> </em> <?php if (osc_item_pub_date() != osc_item_mod_date()) { ?> <em class="update"> <?php if (osc_item_mod_date() != '') { echo __('Modified', 'newcorp') . ': ' . osc_format_date(osc_item_mod_date()); } ?> </em> <?php } ?> </div> <ul id="item_location"> <?php if (osc_item_country() != "") { ?> <li><?php _e('Country', 'newcorp'); ?> : <strong><?php
</h1> <div id="type_dates"> <em class="publish"> <?php if (osc_item_pub_date() != '') { echo __('Added', 'masjob') . ': ' . osc_format_date(osc_item_pub_date()); } ?> </em> <?php if (osc_item_pub_date() != osc_item_mod_date()) { ?> <em class="update"> <?php if (osc_item_mod_date() != '') { echo __('Modified', 'masjob') . ': ' . osc_format_date(osc_item_mod_date()); } ?> </em> <?php } ?> </div> <div id="description"> <ul id="item_location"> <?php if (osc_item_country() != "") { ?> <li><strong><?php _e("Country", 'masjob'); ?>
echo '</div>'; echo '</div>'; } //echo join(', ',$regionData); ?> <div class="has-icon dates"> <div class="ico-dates ico"></div> <div><?php if (osc_item_pub_date() != '') { echo __('Published', 'realestate') . ': ' . osc_format_date(osc_item_pub_date()); } ?> </div> <div><?php if (osc_item_mod_date() != '') { echo __('Modified', 'realestate') . ': ' . osc_format_date(osc_item_mod_date()); } ?> </div> </div> <div class="has-icon author"> <div class="ico-author ico"></div> <?php if (osc_item_user_id() != null) { ?> <?php echo osc_item_contact_name(); ?> <?php } else { ?>
echo osc_item_formated_price(); ?> </small> · <?php } echo osc_item_title(); ?> </h1> <p class="no-margin"><?php printf(__('<strong>Published date:</strong> %s %s', 'twitter_bootstrap'), osc_format_date(osc_item_pub_date()), date(osc_time_format(), strtotime(osc_item_pub_date()))); ?> </p> <?php if (osc_item_mod_date() != '') { ?> <p class="no-margin"><?php printf(__('<strong>Modified date:</strong> %s %s', 'twitter_bootstrap'), osc_format_date(osc_item_mod_date()), date(osc_time_format(), strtotime(osc_item_mod_date()))); ?> </p> <?php } ?> <?php $item_location = item_detail_location(); ?> <?php if (count($item_location) > 0) { ?> <p class="no-margin"><?php printf(__('<strong>Location:</strong> %s', 'twitter_bootstrap'), implode(', ', $item_location)); ?> </p>
?> <?php } ?> </li> <li> <?php if (osc_item_pub_date() !== '') { printf(__('<i class="fa fa-calendar-o"></i> Published date: %1$s', OSCLASSWIZARDS_THEME_FOLDER), osc_format_date(osc_item_pub_date())); } ?> </li> <li> <?php if (osc_item_mod_date() !== '') { printf(__('<span class="update"><i class="fa fa-calendar"></i> Modified date:</span> %1$s', OSCLASSWIZARDS_THEME_FOLDER), osc_format_date(osc_item_mod_date())); } ?> </li> <?php if (count($location) > 0) { ?> <li> <ul id="item_location"> <li><i class="fa fa-map-marker"></i> <?php echo implode(', ', $location); ?> </li> </ul> </li> <?php
function seo_sitemap_generator() { $start_time = microtime(true); $min = 1; $show_items = ''; if (Params::getParam('sitemap_items') != '') { $show_items = Params::getParam('sitemap_items'); } else { $show_items = osc_get_preference('allSeo_sitemap_items', 'plugin-all_in_one') != '' ? osc_get_preference('allSeo_sitemap_items', 'plugin-all_in_one') : ''; } $limit_items = ''; if (Params::getParam('sitemap_items_limit') != '') { $limit_items = Params::getParam('sitemap_items_limit'); } else { $limit_items = osc_get_preference('allSeo_sitemap_items_limit', 'plugin-all_in_one') != '' ? osc_get_preference('allSeo_sitemap_items_limit', 'plugin-all_in_one') : ''; } $limit_items = intval($limit_items); $locales = osc_get_locales(); $filename = osc_base_path() . 'sitemap.xml'; //link sitemap @unlink($filename); //remove original sitemap $start_xml = '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL . '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . PHP_EOL; file_put_contents($filename, $start_xml); // INDEX seo_sitemap_add_url(osc_base_url(), date('Y-m-d'), 'always'); $categories = Category::newInstance()->listAll(false); $countries = Country::newInstance()->listAll(); foreach ($categories as $c) { $search = new Search(); $search->addCategory($c['pk_i_id']); if ($search->count() >= $min) { seo_sitemap_add_url(osc_search_url(array('sCategory' => $c['s_slug'])), date('Y-m-d'), 'hourly'); foreach ($countries as $country) { if (count($countries) > 1) { $search = new Search(); $search->addCategory($c['pk_i_id']); $search->addCountry($country['pk_c_code']); if ($search->count() > $min) { seo_sitemap_add_url(osc_search_url(array('sCategory' => $c['s_slug'], 'sCountry' => $country['s_name'])), date('Y-m-d'), 'hourly'); } } $regions = Region::newInstance()->findByCountry($country['pk_c_code']); foreach ($regions as $region) { $search = new Search(); $search->addCategory($c['pk_i_id']); $search->addCountry($country['pk_c_code']); $search->addRegion($region['pk_i_id']); if ($search->count() > $min) { seo_sitemap_add_url(osc_search_url(array('sCategory' => $c['s_slug'], 'sCountry' => $country['s_name'], 'sRegion' => $region['s_name'])), date('Y-m-d'), 'hourly'); $cities = City::newInstance()->findByRegion($region['pk_i_id']); foreach ($cities as $city) { $search = new Search(); $search->addCategory($c['pk_i_id']); $search->addCountry($country['pk_c_code']); $search->addRegion($region['pk_i_id']); $search->addCity($city['pk_i_id']); if ($search->count() > $min) { seo_sitemap_add_url(osc_search_url(array('sCategory' => $c['s_slug'], 'sCountry' => $country['s_name'], 'sRegion' => $region['s_name'], 'sCity' => $city['s_name'])), date('Y-m-d'), 'hourly'); } } } } } } } foreach ($countries as $country) { $regions = Region::newInstance()->findByCountry($country['pk_c_code']); foreach ($regions as $region) { $cities = CityStats::newInstance()->listCities($region['pk_i_id']); $l = min(count($cities), 30); for ($k = 0; $k < $l; $k++) { if ($cities[$k]['items'] > $min) { seo_sitemap_add_url(osc_search_url(array('sCountry' => $country['s_name'], 'sRegion' => $region['s_name'], 'sCity' => $cities[$k]['city_name'])), date('Y-m-d'), 'hourly'); } } } } // ITEMS if ($show_items == 1) { $max_secure = 10000; $mSearch = new Search(); $mSearch->limit(0, $limit_items); // fetch number of item for sitemap $aItems = $mSearch->doSearch(); View::newInstance()->_exportVariableToView('items', $aItems); //exporting our searched item array if (osc_count_items() > 0) { $i = 0; while (osc_has_items() and $i < $limit_items and $i < $max_secure) { seo_sitemap_add_url(osc_item_url(), substr(osc_item_mod_date() != '' ? osc_item_mod_date() : osc_item_pub_date(), 0, 10), 'daily'); $i++; } } } $end_xml = '</urlset>'; file_put_contents($filename, $end_xml, FILE_APPEND); // PING SEARCH ENGINES seo_sitemap_ping_engines(); $time_elapsed = microtime(true) - $start_time; return $time_elapsed; }
</div> <div id="main"> <div id="type_dates"> <strong><?php echo osc_item_category(); ?> </strong> <em class="publish"><?php if (osc_item_pub_date() != '') { echo osc_format_date(osc_item_pub_date()); } ?> </em> <em class="update"><?php if (osc_item_mod_date() != '') { echo osc_format_date(osc_item_mod_date()); } ?> </em> </div> <ul id="item_location"> <?php if (osc_item_country() != "") { ?> <li><?php _e("Country", 'modern'); ?> : <strong><?php echo osc_item_country(); ?> </strong></li><?php