We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17919
    • 5 Posts
    Hello,

    After some time on a wrong encoding on a month in french, with accent (février), inside pages containing Ditto and Reflect snippet, I have to modify a sources file and a Snippet :

    //assets/snippets/ditto/extenders/dateFilter.extender.inc.php
    221: $modx->setPlaceholder($dittoID."month", utf8_encode($month_text));


    And in the Reflect snippet :

    450 foreach ($months as $mon=>$month) {
    451    $month_text =  utf8_encode(strftime("%B", mktime(10, 10, 10, $mon, 10, $year)));
    452    $month_url = $ditto->buildURL("month=".$mon."&year=".$year."&day=false&start=0",$templatesDocumentID,$id);


    The pages content.

    Page = Archives by month (118) :
    <h2 id="archives_by_months">[+wp_month+] [+wp_day+] [+wp_year+]</h2>
    
    [!Ditto? &id=`wp` &display=`all` &extenders=`dateFilter` &parents=`29` &dateSource=`unpub_date` &sortBy=`unpub_date` &sortDir=`asc` &dateFormat=`Le %d %B %Y - %HH%M` &tpl=`Affichage des concerts` &language=`francais-utf8` &showPublishedOnly=`0`!]


    Page = Archives (52) :
    [!Reflect?config=`wordpress` &targetID=`118` &getDocuments=`1` &groupByYears=`1` &showItems=`1` &dittoSnippetParameters=`startID:29` &dateSource=`unpub_date` &sortBy=`unpub_date` &showPublishedOnly=`0` &seeThruUnpub=`1` &monthSortDir=`ASC` &orderBy=`DESC` &id=`wp`!]


    Page = Content (29) :
    [[Ditto? &tpl=`Affichage des concerts` &startID=`29` &paginate=`1` &summarize=`10` &trunc=`1` &truncSpli=`0` &truncLen=`100` &dateSource=`unpub_date`  &sortBy=`unpub_date` &sortDir=`asc` &dateFormat=`Le %d %B %Y - %HH%M` &extenders=`summary,dateFilter`  &tplPaginatePage=`tplDitoPaginatePage`]]


    And in the page Archives, it show the OLD dates, and the FUTURE dates! How can I remove the FUTURE dates?

    Thanks,

    Maelvon