JANUARY SALE: Directory Theme Now Only $49 -- Learn More

Ask the community

This is a community support forum where you can ask
questions and interact with other PremiumPress Customers.

"ohits" view count


  • Lewis
    Newbie 4 points
    July 13, 2013 at 3:08 am

    I used to be able to add back view count for the property listing on the homepage in Version 7.1.

    I am trying to upgrade 7.1 to 7.1.4 and realize there are quite a lot of changes in the code and I don’t know where I should put this code in. Can you help Mark?

    Thanks.

    /* Added back for view counts in styles.css*/
    .RPoptionslist .oshare { background:#ddd url(images/oshare.png) no-repeat 5px center; }
    .RPoptionslist .ohits { background:#ddd url(images/ohits.png) no-repeat 5px center; }
    .RPoptionslist .ochart { background:#ddd url(images/ochart.png) no-repeat 5px center; }
    .RPoptionslist .oreport { background:#ddd url(images/oreport.png) no-repeat 5px center; }
    .RPoptionslist .oshare:hover { background: #666 url(images/osharea.png) no-repeat 5px center; color:#FFFFFF; }
    .RPoptionslist .ohits:hover { background:#666 url(images/ohitsa.png) no-repeat 5px center; color:#FFFFFF;}
    .RPoptionslist .ochart:hover { background:#666 url(images/ocharta.png) no-repeat 5px center; color:#FFFFFF; }
    .RPoptionslist .oreport:hover { background:#666 url(images/oreport.png) no-repeat 5px center; color:#FFFFFF; }
    /* End of view counts */

  • Mark Fail
    Mark Fail
    Super Guru 12,899 points
    July 13, 2013 at 4:21 am

    the code above is css for elements that simply dont exist in the newer version, im not sure its possible to bring this back without custoizing the _item.php file.

    have u tried using the one from 7.1?


  • Lewis
    Newbie 4 points
    July 13, 2013 at 4:27 am

    I noticed there was a _item_small.php prior to 7.1, which does not exist anymore. I never touched the _item.php. So I believe all I did was modifying ./template_realtorpress/_item_small.php and ./template_realtorpress/styles.css to restore the view count on the homepage listing while I upgraded it to 7.1.

    How do I incorporate it back to 7.1.4? This feature is really important to my client so I cannot lose it.

    Thanks

  • Ian
    Ian
    Super Guru 1,200 points
    July 13, 2013 at 6:01 am

    That doesn’t make sense. If _item_small.php didn’t exist in 7.1 then you must have edited _item.php, no?


  • Lewis
    Newbie 4 points
    July 13, 2013 at 12:46 pm

    Sorry I mean _item_small.php is not there anymore with 7.1.4. I have it when I am running 7.1

  • Mark Fail
    Mark Fail
    Super Guru 12,899 points
    July 13, 2013 at 4:19 pm

    Item-small was replaced with item and now there is just one file


  • Lewis
    Newbie 4 points
    July 13, 2013 at 6:00 pm

    Hi Mark, Ian,

    Beside the above css code, I also have the following code added to the _item_small.php for 7.1.

    Would that work if I add these back to the _item.php? Would it be sufficient?

    I am no expert in php, I was just lucky making it worked in 7.1 by trial and error. So I will need your expert advice. Thanks.

    <!– New addition for view count in _item_small.php –>
    <div class=”RPoptionslist-wrapper clearfix”>
    <div class=”RPoptionslist”>
    <!– ID)?>” title=”<?php echo $post->post_title?>” class=”ohits”><?php echo $PPT->_e(array(‘button’,’13’)); ?>
    ” rel=”nofollow”><?php echo $PPT->_e(array(‘button’,’15’)); ?> –>
    <?php echo get_post_meta($post->ID, ‘hits’, true); ?> <?php echo $PPT->_e(array(‘title’,’6′)); ?>
    <div>
    </div>

    <!– end of new addition –>


  • Lewis
    Newbie 4 points
    July 13, 2013 at 7:18 pm

    Or is there an easier way to add the view count back? So I don’t have to worry about customizing it every time there is an upgrade comes out. As I believe this is a pretty useful function for a lot of real estate agents. The view counts actually draws attention of the potential buyers.

    Thanks very much for your time.

  • Ian
    Ian
    Super Guru 1,200 points
    July 14, 2013 at 2:42 am

    I don’t see any reason why your code shouldn’t work in _item.php as it did in _item_small.php

Viewing 9 posts - 1 through 9 (of 9 total)