Hi, i have 2 easy questions if any one can help me.
The first one is that i wanted only the premium ads to appear on the main.php page. What i did was the following, i copied the code from search_list.php and overwrote the actual code on main.php. The problem is that everything is good but the ads dont have the gold frame around them, they just look the same as the free ads. This is the actual code:
<div class="search-header span11 columns">
<h3><?php _e('Latest Items', 'twitter') ; ?></h3>
<?php if( osc_count_latest_items() == 0) { ?>
<p>
<?php _e('No Latest Items', 'twitter') ; ?>
</p>
<?php } else { ?>
<?php
osc_get_premiums() ;
if( osc_count_premiums() > 0 ) {
?>
<?php while ( osc_has_premiums() ) { ?>
<div class="premium line span11 columns">
<div class="photo">
<?php if( osc_count_premium_resources() ) { ?>
<a href="<?php echo osc_premium_url() ; ?>">
<img src="<?php echo osc_resource_thumbnail_url() ; ?>" width="100px" height="75px" title="<?php echo osc_premium_title(); ?>" alt="<?php echo osc_premium_title(); ?>" />
</a>
<?php } else { ?>
<img src="<?php echo osc_current_web_theme_url('images/no_photo.gif') ; ?>" alt="" title=""/>
<?php } ?>
</div>
<div class="description">
<h3><?php if( osc_price_enabled_at_items() ) { ?> <small><strong><?php echo osc_premium_formated_price() ; ?></strong></small> · <?php } ?><a href="<?php echo osc_premium_url() ; ?>"><?php echo osc_premium_title(); ?></a> <span class="label"><a href="<?php echo osc_item_category_url( osc_premium_category_id() ) ; ?>"><?php echo osc_premium_category() ; ?></a></span></h3>
<p><?php printf(__('<strong>Publish date</strong>: %s', 'twitter'), osc_format_date( osc_premium_pub_date() ) ) ; ?></p>
<?php
$location = array() ;
if( osc_premium_country() != '' ) {
$location[] = sprintf( __('<strong>Country</strong>: %s', 'twitter'), osc_premium_country() ) ;
}
if( osc_premium_region() != '' ) {
$location[] = sprintf( __('<strong>Region</strong>: %s', 'twitter'), osc_premium_region() ) ;
}
if( osc_premium_city() != '' ) {
$location[] = sprintf( __('<strong>City</strong>: %s', 'twitter'), osc_premium_city() ) ;
}
if( count($location) > 0) { ?>
<p><?php echo implode(' · ', $location) ; ?></p>
<?php } ?>
<p><?php echo osc_highlight( strip_tags( osc_premium_description() ) ) ; ?></p>
</div>
</div>
<?php } ?>
<?php } ?>
<?php if( osc_count_premiums() == 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') ; ?> »</strong></a>
</div>
</div>
<?php } ?>
<?php } ?>
</div>
</div>
<?php osc_current_web_theme_path('footer.php') ; ?>
If im not mistaken the <div class="premium line span11 columns"> is the one that gives the gold color to the ad, but its not working, else i dont know what im doing wrong!
Second thing is that i want that after my users log in using the login page, they are automatically redirected to the paypal item details, if im not mistaken i have to change something in the login.php page in order to change the page from redirecting to the dashboard to redirecting to the paypal item page.
Any help will be appreciated THANKS!!