Results 1 to 1 of 1

Thread: Ad views daily in dashboard

  1. #1
    Thread Starter
    votepartners's Avatar
    Join Date
    Aug 2011
    Location
    United Kingdom
    Posts
    79
    Thanks
    1
    Thanked 9 Times in 8 Posts

    Ad views daily in dashboard

    Very simply mod if you want to allow daily views in dashboard.

    Only to changes in dashboard.php

    Find:
    PHP Code:
                                if (get_post_meta($post->ID'cp_total_count'true))
                                    
    $ad_views number_format(get_post_meta($post->ID'cp_total_count'true));
                                else
                                    
    $ad_views '-'
    and put after it:
    PHP Code:
                                // added daily counter

                                
    if (get_post_meta($post->ID'cp_daily_count'true))
                                    
    $ad_views_daily number_format(get_post_meta($post->ID'cp_daily_count'true));
                                else
                                    
    $ad_views_daily '-'
    '-' you can change on '0'.


    Next find:
    PHP Code:
    <td class="text-center"><?php echo $ad_views?></td>
    and replace the:
    PHP Code:
    <td class="text-center"><?php echo $ad_views?> (<?php _e'Total views''appthemes' ); ?>)<br /><?php echo $ad_views_daily?> (<?php _e'Today''appthemes' ); ?>)</td>
    If you have Dreamveawer for example you can insert additional column for each counter instead of parentheses.


    ONE SMALL PROBLEM:

    If no one will watch today of specific ad, both counters will show the total views. It will look like:
    5 (Total views)
    5 (Today)
    properly should be:
    0 (Total views)
    5 (Today)

    Can anybody solve this problem?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Total views and today's views remain the same
    By amersvoort in forum Report ClassiPress Bugs
    Replies: 7
    Last Post: August 27th, 2015, 08:15 AM
  2. [SOLVED] Total Views and Today Views Not showing up ????
    By stolarczykk in forum Report ClassiPress Bugs
    Replies: 13
    Last Post: March 24th, 2012, 07:51 AM
  3. [SOLVED] Daily views not resetting - total and daily keep the same
    By amersvoort in forum Report ClassiPress Bugs
    Replies: 7
    Last Post: January 10th, 2012, 11:45 AM
  4. [MOD NEEDED] disable number of views in User Dashboard
    By 3shades in forum ClassiPress General Discussion
    Replies: 1
    Last Post: October 27th, 2011, 11:04 AM
  5. Nice mod for ad views in dashboard
    By aggieoutlaw8 in forum ClassiPress General Discussion
    Replies: 3
    Last Post: October 26th, 2011, 07:18 PM