Advertisement:

Author Topic: (SOLVED) osclasswizards Theme  (Read 2491 times)

Rotchel1989

  • Guest
(SOLVED) osclasswizards Theme
« on: August 16, 2015, 12:20:05 am »
Hi, I need your help for some problem i have!

Like on the picture i have Premium Listings on top of my page!
But then i have Categories this i will like to have Latest Listing first,
But don't know how to do this! Hope you can help me with this!

I just starting in this,

Think this is the file to change? or what else?
Thanks

    // meta tag robots
    osc_add_hook('header','osclasswizards_follow_construct');

    osclasswizards_add_body_class('home');

   if(osclasswizards_show_as() == 'gallery'){
        $loop_template   =   'loop-grid.php';
      $listClass = 'listing-grid';
    }else{
      $loop_template   =   'loop-list.php';
      $listClass   = '';
   }
   
?>
<?php osc_current_web_theme_path('header.php') ; ?>
<?php

    osc_get_premiums(osclasswizards_premium_listings_shown_home());
   
    if(osc_count_premiums() > 0) {

?>

<h1 class="title">
  <?php _e('Premium Listings',OSCLASSWIZARDS_THEME_FOLDER);?>
</h1>
<div id="listing-card-list" class="listing-card-list listings_grid listings_grids">
  <ul class="row">
    <?php
  $listcount = 1;
      while ( osc_has_premiums() ) {
   ?>
    <?php $size = explode('x', osc_thumbnail_dimensions()); ?>
    <li class="listing-card premium col-sm-6 col-md-3">
      <article class="loop_premium">
        <div class="figure">
          <figure>
            <?php if( osc_images_enabled_at_items() ) { ?>
            <?php if(osc_count_premium_resources()) { ?>
            <a class="listing-thumb" href="<?php echo osc_premium_url() ; ?>" title="<?php echo osc_esc_html(osc_premium_title()) ; ?>"><img class="img-responsive" src="<?php echo osc_resource_thumbnail_url(); ?>" title="" alt="<?php echo osc_esc_html(osc_premium_title()) ; ?>" width="<?php echo $size[0]; ?>" height="<?php echo $size[1]; ?>"></a>
            <?php } else { ?>
            <a class="listing-thumb" href="<?php echo osc_premium_url() ; ?>" title="<?php echo osc_esc_html(osc_premium_title()) ; ?>"><img class="img-responsive" src="<?php echo osc_current_web_theme_url('images/no_photo.gif'); ?>" title="" alt="<?php echo osc_esc_html(osc_premium_title()) ; ?>" width="<?php echo $size[0]; ?>" height="<?php echo $size[1]; ?>"></a>
            <?php } ?>
            <?php } ?>
            <span class="ribbon"> <i class="fa fa-star"></i> </span> </figure>
        </div>
        <div class="listing-attr">
          <h4><a href="<?php echo osc_premium_url() ; ?>" title="<?php echo osc_esc_html(osc_premium_title()) ; ?>"><?php echo osc_premium_title() ; ?></a></h4>
          <article> <span class="category"><i class="fa fa-<?php echo osclasswizards_category_icon( osc_premium_category_id() ); ?>"></i><?php echo osc_premium_category() ; ?></span> <span class="location"><i class="fa fa-map-marker"></i><?php echo osc_premium_city(); ?>
            <?php if(osc_premium_region()!='') { ?>
            (<?php echo osc_premium_region(); ?>)
            <?php } ?>
            </span> <span class="date"> <i class="fa fa-clock-o"></i> <?php echo osc_format_date(osc_premium_pub_date()); ?> </span> </article>
          <?php if( osc_price_enabled_at_items() ) { ?>
          <span class="currency-value"><?php echo osc_format_price(osc_premium_price(), osc_premium_currency_symbol()); ?></span>
          <?php } ?>
          <?php $admin = false; ?>
          <?php if($admin){ ?>
          <span class="admin-options"> <a href="<?php echo osc_premium_edit_url(); ?>" rel="nofollow">
          <?php _e('Edit item', OSCLASSWIZARDS_THEME_FOLDER); ?>
          </a> <span>|</span> <a class="delete" onclick="javascript:return confirm('<?php echo osc_esc_js(__('This action can not be undone. Are you sure you want to continue?', OSCLASSWIZARDS_THEME_FOLDER)); ?>')" href="<?php echo osc_premium_delete_url();?>" >
          <?php _e('Delete', OSCLASSWIZARDS_THEME_FOLDER); ?>
          </a>
          <?php if(osc_premium_is_inactive()) {?>
          <span>|</span> <a href="<?php echo osc_premium_activate_url();?>" >
          <?php _e('Activate', OSCLASSWIZARDS_THEME_FOLDER); ?>
          </a>
          <?php } ?>
          </span>
          <?php } ?>
        </div>
      </article>
    </li>
    <?php
      if($listcount%4 == 0)
      {
         echo '</ul><ul class="row">';
      }
      $listcount++;
  }
  ?>
  </ul>
</div>
<?php
   }
 ?>
<?php osc_run_hook('inside-main'); ?>
<div class="content">
  <div class="title">
    <h1>
      <?php _e('Latest Listings', OSCLASSWIZARDS_THEME_FOLDER) ; ?>
      <span class="sorting"> <a href="<?php echo osc_base_url(true); ?>?sShowAs=list" class="list-button <?php if(osclasswizards_show_as()=='list')echo "active"; ?>" data-class-toggle="listing-grid" data-destination="#listing-card-list"><span> <i class="fa fa-th-list"></i> </span></a> <a href="<?php echo osc_base_url(true); ?>?sShowAs=gallery" class="grid-button <?php if(osclasswizards_show_as()=='gallery') echo "active"; ?>" data-class-toggle="listing-grid" data-destination="#listing-card-list"><span> <i class="fa fa-th-large"></i></span></a> </span> </h1>
  </div>
  <div class="latest_ads">
    <?php if( osc_count_latest_items() == 0) { ?>
    <p class="empty">
      <?php _e("There aren't listings available at this moment", OSCLASSWIZARDS_THEME_FOLDER); ?>
    </p>
    <?php } else { ?>
    <?php
    View::newInstance()->_exportVariableToView("listType", 'latestItems');
    View::newInstance()->_exportVariableToView("listClass",$listClass);
   osc_current_web_theme_path($loop_template);
    ?>
    <?php if( osc_count_latest_items() == osc_max_latest_items() ) { ?>
    <p class="see_more_link"><a href="<?php echo osc_search_show_all_url() ; ?>"> <strong>
      <?php _e('See all listings', OSCLASSWIZARDS_THEME_FOLDER) ; ?>
      &raquo;</strong></a> </p>
    <?php } ?>
    <?php } ?>
  </div>
  <?php if(osc_get_preference('show_popular', 'osclasswizards_theme') == '1'){?>
  <div id="tab_filter">
    <h2 class="title"> <?php echo sprintf(__('Popular in %s', OSCLASSWIZARDS_THEME_FOLDER), osc_page_title()) ; ?> </h2>
    <?php if(osclasswizards_popular_searches() && osclasswizards_show_popular_searches() ){ ?>
    <section id='Searches'>
      <div class="popular_cities">
        <?php $searches   =   osclasswizards_popular_searches( osclasswizards_popular_searches_limit() ); ?>
        <ul>
          <?php foreach($searches as $search){?>
          <?php if($search['s_search'] !=""){?>
          <li><a href="<?php echo osc_search_url(array('sPattern' => $search['s_search'])); ?>"><?php echo  $search['s_search']; ?> <em>(<?php echo $search['total']; ?>)</em></a></li>
          <?php } ?>
          <?php } ?>
        </ul>
      </div>
    </section>
    <?php } ?>
    <?php if(osclasswizards_popular_regions() && osclasswizards_show_popular_regions() ){ ?>
    <section id='Regions'>
      <div class="popular_regions">
        <?php $regions   =   osclasswizards_popular_regions(osclasswizards_popular_regions_limit()); ?>
        <ul>
          <?php foreach($regions as $region => $count){?>
          <li><a href="<?php echo osc_search_url( array( 'sRegion' => $region ) ); ?>"><i class="fa fa-map-marker"></i><?php echo $region; ?> <em>(<?php echo $count; ?>)</em></a></li>
          <?php } ?>
        </ul>
      </div>
    </section>
    <?php } ?>
    <?php if(osclasswizards_popular_citites() && osclasswizards_show_popular_cities() ){ ?>
    <section id='Cities'>
      <div class="popular_cities">
        <?php $cities   =   osclasswizards_popular_citites(osclasswizards_popular_cities_limit()); ?>
        <ul>
          <?php foreach($cities as $city => $count){?>
          <li><a href="<?php echo osc_search_url( array( 'sCity' => $city ) ); ?>"><i class="fa fa-map-marker"></i><?php echo $city; ?> <em>(<?php echo $count; ?>)</em></a></li>
          <?php } ?>
        </ul>
      </div>
    </section>
    <?php } ?>
  </div>
  <?php } ?>
  <?php if( osc_get_preference('homepage-728x90', 'osclasswizards_theme') != "") { ?>
  <div class="ads_home"> <?php echo osc_get_preference('homepage-728x90', 'osclasswizards_theme'); ?> </div>
  <?php } ?>
</div>
<?php osc_current_web_theme_path('footer.php') ; ?>
« Last Edit: August 16, 2015, 09:59:42 am by Rotchel1989 »

Hennessy Pappy

  • Jr. Member
  • **
  • Posts: 52
  • r1
Re: Girl Student needs your help! osclasswizards Theme
« Reply #1 on: August 16, 2015, 07:10:02 am »
I can give you an answer but your question is not clear? you mean you want :

1. premuim
2.lastest listing
3.categories

?

Rotchel1989

  • Guest
Re: Girl Student needs your help! osclasswizards Theme
« Reply #2 on: August 16, 2015, 07:21:00 am »
Yes Dear

Hennessy Pappy

  • Jr. Member
  • **
  • Posts: 52
  • r1
Re: Girl Student needs your help! osclasswizards Theme
« Reply #3 on: August 16, 2015, 07:43:55 am »
Here you go. If you haven't modified your main.php just replace  it  with the file attached ..  dont forget to backup first..just in case  ;)


Rotchel1989

  • Guest
Re: Girl Student needs your help! osclasswizards Theme
« Reply #4 on: August 16, 2015, 08:14:32 am »
Wow this is working well! You are good and fast!

Hope you can and are willing to help me with my next problem!

How do i remove the Categories in the Span,
Location and posted date on separated lines?

Last: how to delete the Popular in Property Ads?

Thanks

Rotchel1989

  • Guest
Re: Girl Student needs your help! osclasswizards Theme
« Reply #5 on: August 16, 2015, 08:16:14 am »
This is the picture!

The Span = Category - Location and posted date
Category delete

Line 1: Location
Line 2 Posted Date

-------------------------------

How to Delete the Popular?

Thanks
« Last Edit: August 16, 2015, 08:31:18 am by Rotchel1989 »

Hennessy Pappy

  • Jr. Member
  • **
  • Posts: 52
  • r1
Re: Girl Student needs your help! osclasswizards Theme
« Reply #6 on: August 16, 2015, 08:20:00 am »
I don't understand the question. Your English is terrible :D  ... show with pic.

Hennessy Pappy

  • Jr. Member
  • **
  • Posts: 52
  • r1
Re: Girl Student needs your help! osclasswizards Theme
« Reply #7 on: August 16, 2015, 08:54:49 am »



remove this code in your main.php  to remove popular items

Code: [Select]

<?php if(osc_get_preference('show_popular''osclasswizards_theme') == '1'){?>
  <div id="tab_filter">
    <h2 class="title"> <?php echo sprintf(__('Popular in %s'OSCLASSWIZARDS_THEME_FOLDER), osc_page_title()) ; ?> </h2>
    <?php if(osclasswizards_popular_searches() && osclasswizards_show_popular_searches() ){ ?>
    <section id='Searches'>
      <div class="popular_cities">
        <?php $searches = osclasswizards_popular_searchesosclasswizards_popular_searches_limit() ); ?>
        <ul>
          <?php foreach($searches as $search){?>
          <?php if($search['s_search'] !=""){?>
          <li><a href="<?php echo osc_search_url(array('sPattern' => $search['s_search'])); ?>"><?php echo  $search['s_search']; ?> <em>(<?php echo $search['total']; ?>)</em></a></li>
          <?php ?>
          <?php ?>
        </ul>
      </div>
    </section>
    <?php ?>
    <?php if(osclasswizards_popular_regions() && osclasswizards_show_popular_regions() ){ ?>
    <section id='Regions'>
      <div class="popular_regions">
        <?php $regions = osclasswizards_popular_regions(osclasswizards_popular_regions_limit()); ?>
        <ul>
          <?php foreach($regions as $region => $count){?>
          <li><a href="<?php echo osc_search_url( array( 'sRegion' => $region ) ); ?>"><i class="fa fa-map-marker"></i><?php echo $region?> <em>(<?php echo $count?>)</em></a></li>
          <?php ?>
        </ul>
      </div>
    </section>
    <?php ?>
    <?php if(osclasswizards_popular_citites() && osclasswizards_show_popular_cities() ){ ?>
    <section id='Cities'>
      <div class="popular_cities">
        <?php $cities = osclasswizards_popular_citites(osclasswizards_popular_cities_limit()); ?>
        <ul>
          <?php foreach($cities as $city => $count){?>
          <li><a href="<?php echo osc_search_url( array( 'sCity' => $city ) ); ?>"><i class="fa fa-map-marker"></i><?php echo $city?> <em>(<?php echo $count?>)</em></a></li>
          <?php ?>
        </ul>
      </div>
    </section>
    <?php ?>
  </div>
  <?php ?>
  <?php if( osc_get_preference('homepage-728x90''osclasswizards_theme') != "") { ?>
  <div class="ads_home"> <?php echo osc_get_preference('homepage-728x90''osclasswizards_theme'); ?> </div>
  <?php ?>




Do you want to remove the category and location ?   
« Last Edit: August 16, 2015, 09:03:06 am by Hennessy Pappy »

Rotchel1989

  • Guest
Re: Girl Student needs your help! osclasswizards Theme
« Reply #8 on: August 16, 2015, 09:04:20 am »
Only the Category i want to remove!

The location and Date Posted Separated Line

Now is like This: Location - Date Posted


And i looking for this:
Location
Date Posted

Rotchel1989

  • Guest
Re: Girl Student needs your help! osclasswizards Theme
« Reply #9 on: August 16, 2015, 09:14:19 am »
Picture what i try to receive!

Hennessy Pappy

  • Jr. Member
  • **
  • Posts: 52
  • r1
Re: Girl Student needs your help! osclasswizards Theme
« Reply #10 on: August 16, 2015, 09:18:34 am »
Edit loop-grid.php

go to the div with the class list-attr and remove the  this 
Code: [Select]
<span class="category"><i class="fa fa-<?php echo osclasswizards_category_iconosc_item_category_id() ); ?>"></i> <?php echo osc_item_category() ; ?></span>

Rotchel1989

  • Guest
Re: Girl Student needs your help! osclasswizards Theme
« Reply #11 on: August 16, 2015, 09:33:01 am »
Thanks,

This is last of the problem i have!
Can i make date posted a new line?

Thanks a lot


Hennessy Pappy

  • Jr. Member
  • **
  • Posts: 52
  • r1
Re: Girl Student needs your help! osclasswizards Theme
« Reply #12 on: August 16, 2015, 09:37:32 am »
Just put a  <br>  just before 
Code: [Select]
<span class="date"> <i class="fa fa-clock-o"></i> <?php echo osc_format_date(osc_item_pub_date()); ?> </span> or you can style it as display:block

Rotchel1989

  • Guest
Re: Girl Student needs your help! osclasswizards Theme
« Reply #13 on: August 16, 2015, 09:58:29 am »
Thanks a lot!

This works perfect!