Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter artikel104

    (@artikel104)

    I’m not sure I’m getting this. How do you mean the_date is not defined? the_date is a function that displays or returns the date of a post, or a set of posts if published on the same day. When there are multiple posts on a page published under the same day, the_date() only displays the date for the first post (that is, the first instance of the_date()). It doesn’t need to be defined, does it?

    I tried adding:

    date_i18n($strDate,$items[“mystrdate”])

    before the_date function, but that didn’t work.

    Thread Starter artikel104

    (@artikel104)

    Somehow I’m not getting working. Below I posted my code (includes a completely different styling as you’ll see), including the the_date that used to work. Maybe you can see what I’m doing wrong? I understand that this is out of scope of your (great) plugin, but I’d be very thankfull if you’d know a solution.

    <?php
    $strDate=rssmi_get_default_date_format();

    // don’t mess with this php code
    foreach($myarray as $items) {

    $useMediaImage=$items[“useMediaImage”];

    if ($pag!==1){
    $total = $total +1;
    if ($maxperPage>0 && $total>=$maxperPage) break;
    }

    $idnum=$idnum +1;
    // END don’t mess with this php code

    $openWindow=rssmi_lightbox_filter($items[“mylink”],$targetWindow); //Lightbox filter

    // show date (group similar posts)
    $readable .= the_date(‘l j F’, ‘<p style=”text-align:right;margin-bottom:1px!important;margin-top:5px;border-bottom-style:dotted;border-width:1px;padding-bottom:1px;”>’, ”, false);

    // make post container and show post title
    $readable .= ‘ <div id=”post-‘ .$idnum.'” style=”margin-bottom:0px!important”>
    <p style=”margin:0px”>’ .date_i18n($strDate,$items[“mystrdate”]). ‘ | ‘ .$items[“mytitle”]. ‘</p>’;

    // make excerpt container and hide if “show more” option is checked
    if (!empty($items[“mydesc”]) && $showDesc==1){

    if ($showmore==1 && $showDesc==1){
    $readable .= ‘ <div id=”‘.$idnum.'” class=”post-content” style=”display:none;border-bottom:1px solid #e7e6e6;border-top:1px solid #e7e6e6;padding:2px;”>’;

    }else{
    $readable .= ‘ <div id=”‘.$idnum.'” class=”post-content” style=”border-bottom:1px solid #e7e6e6;border-top:1px solid #e7e6e6;padding:2px;”>’;
    }

    // excerpt code
    $readable .= showexcerpt($items[“mydesc”],$descNum,$openWindow,$stripAll,$items[“mylink”],$adjustImageSize,$float,$noFollow,$items[“myimage”],$items[“mycatid”],$stripSome,$useMediaImage);
    $readable .= ‘<p style=”text-align:right;font-size:12px;”>’.$attribution.’ ‘.$items[“myGroup”].’</p>’;

    // close excerpt container
    $readable .= ‘</div>’;

    }

    // close post container
    $readable .= ‘</div>’;

    } // don’t mess with this php code

    $readable .= ‘</div>’;

    ?>

    Where it says: // show date (group similar posts), is where the the problem occors. I only get to see the date of the last post (it is not groupign and re-showing).

    Thanks in advance,
    Hiltjo

    Thread Starter artikel104

    (@artikel104)

    sorry, my bad. I didn’t mean it like that. Let me try to rephrase my question: wordpress has the the_date code which you can use to sort the posts by date. Do you know why this doesn’t work when I try to use this code in the template?

    The reason why I’m asking is because I had used the option before to insert the rss posts as posts in my site (I have a specific way of styling the posts which is then easy to do). I’d prefer to use the shortcode and make a template for it since then I can seperate my posts from the regular (non rss feed) posts I have on my site. I’m now playing around with the template to adjust it to my needs and noticed that the the_date function is not working. Any clue why?

    Thread Starter artikel104

    (@artikel104)

    I got it fixed with the following code:

    $html .= the_date('l j F', '<h2 style="margin-bottom:10px!important">', '</h2>', false);

    I must have mistyped somewhere in my previous tries. Sorry for the confusion! Thanks for the support! ??

    Thread Starter artikel104

    (@artikel104)

    Sorry, I mean false. Tried that too… If I put it to false, assign it to a variable (e.g. $trydatethisway) and then echo the variable, gives the same result.

    Thread Starter artikel104

    (@artikel104)

    I tried setting the $echo to true but this didn’t change the output. The days keep appearing all under each other in stead of grouping the posts and putting the day above the group that is of that day…

    The get_the_date function always returns the date which I don’t want. I want like this:

    Wednesday 7th July
    post 6
    post 5
    post 4

    Tuesday 6th July
    post 3
    post 2
    post 1

    In stead of what I get now:
    Wednesday 7th July
    Tuesday 6th July
    Post 6
    post 5
    post 4
    post 3
    post 2
    post 1

    Any clue on why the_date function doesn’t work according to the first sample on my page? (while it does work on the ‘classic’ theme in WordPress.

    Thread Starter artikel104

    (@artikel104)

    Thanks!!

    Thread Starter artikel104

    (@artikel104)

    Wow, that’s a quick reply ??

    I see what you mean and checked the import_posts.php. I’m quite the beginner when it comes to php so for now it’s to hard for me to adjust this… I’ll keep studying and when i see a way to do it i’ll let you know (maybe you’d want to include this in future updates).

    I saw that one content field is already added (rssmi_source_link for the item url) so the idea for now is to make 3 additional content fields:
    rssmi_source_name * includes the feed name given in the plugin options
    rssmi_source_url * includes the feed url
    rssmi_source_date * includes the original post date

    I assume there will already be variables used in the plugin containing that data so I guess i’ll need to see how to add those in the wp_rss_multi_importer_post function ??

Viewing 8 replies - 1 through 8 (of 8 total)