Osclass forums
Support forums => Themes => Real Estate => Topic started by: romantica on January 21, 2014, 01:04:00 am
-
Hello help please how to display ads on the premium theme realestate 1.2.0 does not appear on the home pge!
thank
-
hello anyone to help me display Premium ads on the home page? realestate theme is a non official theme? it is useless to ask for help on this forum?
my liver I do not understand!
thank you
-
If you want, try this:
attached is a file named search_premium.
Unzip into your Osclass installation folder.
Edit this file code to correct theme name. Currently osshaft_usa. your's may be just "usa'.
Now place below code wherever you want the premium ads to display:
<?php osc_current_web_theme_path('search_premium.php') ; ?></div>
If you place the above line of code into an existing div or wrapper or ? you may not have to do any css editing. It should just conform to that code.
The search_premium file is set to display just 2 ads ( I think ) but you can edit to display more. It is a file I created for someone some time ago.
Tom
-
thank you the code with div and </ div> or without the tag? since I put this code in item.php and does not work!
-
Does not "need" a div /div to work but should be placed within existing for styling. Experiment with placement. it is possible that it is not working due to your chose of placement within the existing code. Also make sure to change the theme name within the search_premium file to the name of your theme.
Best I can tell you is it does work for the themes I inserted it but have never used it in the usa theme. I know of no reason why it won't work in that theme. Try placing it into a different file such as the main.php just before the footer tag just to see if it works there so as to confirm it does or does not work.
TRY THIS:
<div id="premium">
<?php osc_current_web_theme_path('search_premium.php') ; ?></div>
Using above - You may have to edit the css file for best layout......
Later today I will try it in the usa theme just to see.
Tom
-
I placed into osshaft_usa theme at main, footer, search, item pages and all worked well.
Note that all ads marked premium will show. It is NOT limited to just 2 as I first thought.
Tom
-
by placing the code in main.php it me decale the home page, do you want me to post the main.ph page?
my site :www.immoitalia.it (http://www.immoitalia.it)
-
Attach or PM the pages you want the code placed into.
Being I do NOT have your modified theme I will NOT be able to style for best appearance
Tom
-
ok search.ph
<?php
/*
* Osclass – software for creating and publishing online classified
* advertising platforms
*
* Copyright (C) 2013 Osclass
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
?>
<?php osc_current_web_theme_path('header.php') ; ?>
<div class="content home">
<div id="right-side">
<h1><?php _e('risultati della ricerca', 'realestate') ; ?></h1>
<div class="ad_list">
<div id="list_head">
<?php _e('Ordina per', 'realestate'); ?>:
<div class="ui-actionbox">
<?php $i = 0 ; ?>
<?php $orders = osc_list_orders();
foreach($orders as $label => $params) {
$orderType = ($params['iOrderType'] == 'asc') ? '0' : '1'; ?>
<?php if(osc_search_order() == $params['sOrder'] && osc_search_order_type() == $orderType) { ?>
<a class="current" href="<?php echo osc_update_search_url($params) ; ?>"><?php echo $label; ?></a>
<?php } else { ?>
<a href="<?php echo osc_update_search_url($params) ; ?>"><?php echo $label; ?></a>
<?php } ?>
<?php $i++ ; ?>
<?php } ?>
</div>
</div>
<?php if(osc_count_items() == 0) { ?>
<p class="empty" ><?php printf(__('Non ci sono risultati corrispondenti "%s"', 'realestate'), osc_search_pattern()) ; ?></p>
<?php } else { ?>
<?php require('search_gallery.php') ; ?>
<?php } ?>
<?php osc_alert_form() ; ?>
<?php if(osc_search_pagination() != ''){ ?>
<div class="paginate" >
<div class="ui-actionbox">
<?php echo osc_search_pagination(); ?>
</div>
</div>
<?php } ?>
</div>
</div>
<?php require('search_sidebar.php') ; ?>
<div class="clear"></div>
<script type="text/javascript">
$(function() {
function log( message ) {
$( "<div/>" ).text( message ).prependTo( "#log" );
$( "#log" ).attr( "scrollTop", 0 );
}
$( "#sCity" ).autocomplete({
source: "<?php echo osc_base_url(true); ?>?page=ajax&action=location",
minLength: 2,
select: function( event, ui ) {
log( ui.item ?
"<?php _e('selezionato', 'realestate'); ?>: " + ui.item.value + " aka " + ui.item.id :
"<?php _e('nessuna scelta l\'entrata era ', 'realestate'); ?> " + this.value );
}
});
});
function checkEmptyCategories() {
var n = $("input[id*=cat]:checked").length;
if(n>0) {
return true;
} else {
return false;
}
}
</script>
</div>
<div id="premium">
<?php osc_current_web_theme_path('search_premium.php') ; ?></div>
<?php osc_current_web_theme_path('footer.php') ; ?>
-
Sorry for taking so many hours. Been busy.
Attached is your search file with code placed at line #54 but you can move it.
Tom
-
thank you it put 2 Premium ads in bulk! how to align and show all premium listings?
thank you
immoitalia.it (http://immoitalia.it)
-
Align and design layout will have to be done in the css file.
I had 8 test premium ads and they all showed so not sure way only 2 for you. Clear browser cache, try dis-abling, then re-enabling premium in listings edit.
Tom
-
I just went to your site search page and can not see the search_premium so apparently you removed it so can not advice you on css layout.
Tom
-
TOM I thank you chnage theme of the problems seen with realestate usa! after having made the update to 3.2.2 to 3.3.2 osclass everything works!
thank you for all
-
I truly am sorry. I was responding thinking you were using 3.3.2
My bad for not asking.
Tom
-
Thank you nothing wrong usa real estate was on osclass 3.2.2, by cons I do not try to osclass 3.3.2!
thank you Tom