• Resolved attackta

    (@attackta)


    hi and congrats for your grat plugin.
    Althougk i have a proble with date. It changes the month of posts in place of date. For example for a post yesterday it gives me APR 4 2015 and troday post MAY 4 2015.
    Also i want to change the view and be this way: 4 APR 2015
    An id possiple to arrange under the title of the post.
    Can you tell me what i must change in the css and php files?

    https://www.ads-software.com/plugins/advanced-recent-posts/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Eugene Holin

    (@eugenyh)

    Hello, attackta! Thank you for review!

    To change date in widget you need open file lptw-recent-posts.php and:

    If widget with fluid images:
    – find line #143
    <span class="lptw-post-date date-<?php echo $color_scheme; ?>"><?php echo $month_word.' '.date("d, Y", strtotime($post_date)); ?></span>
    – and change it to
    <span class="lptw-post-date date-<?php echo $color_scheme; ?>"><?php echo date("d", strtotime($post_date)).' '.$month_word.' '.date("Y", strtotime($post_date)); ?></span>

    To change the date and title places, need to swap lines #142-144 and #145-147

    If widget with thumbnails:
    – find line #382
    <span class="lptw-post-date"><?php echo $month_word.' '.date("d, Y", strtotime($post_date)); ?></span>
    – and change it to
    <span class="lptw-post-date"><?php echo date("d", strtotime($post_date)).' '.$month_word.' '.date("Y", strtotime($post_date)); ?></span>

    To change the date and title places in this widget, need to swap lines #381-383 and #384-386

    To change shortcode output.
    If the basic layout:
    – find line #597
    if ( $a['show_date'] ) {$content .= '<span class="lptw-post-date date-'.$a['color_scheme'].'">'.$month_word.' '.date("d, Y", strtotime($post_date)).'</span>';}
    – and change it to
    if ( $a['show_date'] ) {$content .= '<span class="lptw-post-date date-'.$a['color_scheme'].'">'.date("d", strtotime($post_date)).' '.$month_word.' '.date("Y", strtotime($post_date)).'</span>';}

    To change the date and title places, need to swap lines #597 and #598

    If the thumbnails layout
    – find line #614
    if ( $a['show_date'] ) { $content .= '<span class="lptw-post-date">'.$month_word.' '.date("d, Y", strtotime($post_date)).'</span>'; }
    – and change it to
    if ( $a['show_date'] ) { $content .= '<span class="lptw-post-date">'.date("d", strtotime($post_date)).' '.$month_word.' '.date("Y", strtotime($post_date)).'</span>'; }

    To change the date and title places, need to swap lines #614 and #615

    Change the css code is not necessary.

    Did this solve the problem?

    Thread Starter attackta

    (@attackta)

    well there is a serious problem with date,
    the php file lptw-recent-posts that you have do not change the date but the month each day!!!
    i tried to fix it in russians as you see below:
    $months_ru = Array(1 => “01”, 2 => “02”, 3 => “03”, 4 => “04”, 5 => “05”, 6 => “06”, 7 => “07”, 8 => “08”, 9 => “09”, 10 => “10”, 11 => “11”, 12 => “12”, 13 => “13”, 14 => “14”, 15 => “15”, 16 => “16”, 17 => “17”, 18 => “18”, 19 => “19”, 20 => “20”, 21 => “21”, 22 => “22”, 23 => “23”, 24 => “24”, 25 => “25”, 26 => “26”, 27 => “27”, 28 => “28”, 29 => “29”, 30 => “30”, 31 => “31”);
    $months_full_ru = Array(1 => “01”, 2 => “02”, 3 => “03”, 4 => “04”, 5 => “05”, 6 => “06”, 7 => “07”, 8 => “08”, 9 => “09”, 10 => “10”, 11 => “11”, 12 => “12”, 13 => “13”, 14 => “14”, 15 => “15”, 16 => “16”, 17 => “17”, 18 => “18”, 19 => “19”, 20 => “20”, 21 => “21”, 22 => “22”, 23 => “23”, 24 => “24”, 25 => “25”, 26 => “26”, 27 => “27”, 28 => “28”, 29 => “29”, 30 => “30”, 31 => “31”);
    $months_en = Array(1 => “Jan”, 2 => “Feb”, 3 => “Mar”, 4 => “Apr”, 5 => “May”, 6 => “Jun”, 7 => “Jul”, 8 => “Aug”, 9 => “Sep”, 10 => “Oct”, 11 => “Nov”, 12 => “Dec”);
    $months_full_en = Array(1 => “January”, 2 => “February”, 3 => “March”, 4 => “April”, 5 => “May”, 6 => “June”, 7 => “July”, 8 => “August”, 9 => “September”, 10 => “October”, 11 => “November”, 12 => “December”);

    but when it came 13 April it shows me now 1.1.1970
    Can you please fix that php file because i found veriy useful your plugin except thiw problem?
    My site is lepantomag.gr

    Plugin Author Eugene Holin

    (@eugenyh)

    Dear attackta!

    No need to write the numbers in the array with the names of the months! He only for the names of the months that we write in the form of text: January, February, March, etc.

    Unfortunately, site lepantomag.gr is not working. Tell me please, which date format do you need? I’m currently working on a new version of the plug-in, it will be able to select the date format and more convenient localization. The new version of the plugin will be published a few days ago.

    Thread Starter attackta

    (@attackta)

    as i wrote before the problem is that the code as you have it do not work correct, it doesn;t change the date, but the month..
    I tried what o wrote before, but now there is problem after 12 April, cause 12 is the month for your code and when it turns to 13 it gives me 1.1.1970!!!
    My site is working, can’ t see it ?
    I want to display the date like this: 14.04.2015 and if you can to put code for time also like this: 15:14 | 14.04.2015
    Hope to find a solution!:)

    Plugin Author Eugene Holin

    (@eugenyh)

    Please wait a few hours, I’ll publish a new version of the plugin, which will be able to change the date format.

    Thread Starter attackta

    (@attackta)

    thanks! inform me when it is ready!

    Thread Starter attackta

    (@attackta)

    Also i want to mention that i use shortcode and when i put show date false in still appears the date.
    Please inform me if you correct it, because i find your plugin excelent behind this problem.
    Thanks

    Thread Starter attackta

    (@attackta)

    well can you help me until you find a solution to not to show at all the date please?
    Inform me if that is possible, cause i have serious problem with my homepage as it is….

    Plugin Author Eugene Holin

    (@eugenyh)

    Please wait a moment. The new version of the plugin will be available soon.

    Plugin Author Eugene Holin

    (@eugenyh)

    Dear attackta!
    The new version of the plugin is released.
    I hope it solve your problem with the date format.

    Thread Starter attackta

    (@attackta)

    Great, great, great!!!!
    Many thanks, 10 stars! ??
    see how my site looks!

    Plugin Author Eugene Holin

    (@eugenyh)

    Your website looks awesome!
    Stay tuned ??

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Great plugin! Problem with date’ is closed to new replies.