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

    I use Modx Evolution 1.10.12 and multiTV 1.7

    Is it possible with multiTV if you make several events and the date of a specific event expires, that the specific event with the expired date is unpublished/deleted huh

    Appeltje (from the Netherlands)

    This question has been answered by appeltje. See the first response.

    • You could work each row in multiTV with PHx modifiers.
        • 1934
        • 23 Posts
        Jako,

        Thanks for responding, I will look up which PHx modifier to use.
        I don't know the right one yet, but i will get there
        thanks

        Appeltje
        • If you have PHx plugin installed you could use custom modifiers. You have to translate the date to unixtime (strtotime modifier) and compare it with today.

          Something like this
          [+date:strtotime:gt=`[+phx:strtotime=`today`+]`:then=`whatever`:else=`nothing`+]
            • 1934
            • 23 Posts
            Jako,

            I have PHx plugin installed and will install phx:strtotime.
            Thanks for your support, i will try to get it in the huh??.config.inc.php of the configs multiTV.

            I'am sorry if my english is not completely oke, you see I'am a dutch guy.

            thanks,
            Appeltje
              • 1934
              • 23 Posts
              Jako,

              I can't get it to work, below is the meeting.config.inc.php in the map /tvs/multitv/configs/
              I have installed PHx and phx:strtotime, what am I doing wrong ? look in rowTpl

              <?php
              $settings['display'] = 'vertical';
              $settings['fields'] = array(
              	'text' => array(
              		'caption' => 'Titel vergadering',
              		'type' => 'text'
              	),
              	'textarea' => array(
              		'caption' => 'Eventuele uitleg',
              		'type' => 'textarea'
              	),
              	'wie' => array(
              		'caption' => 'Voor wie is vergadering',
              		'type' => 'dropdown',
              		'standard' => 'afgevaardigden',
              		'elements' => 'afgevaardigden||alle leden'
              	),
              	'file' => array(
              		'caption' => 'Vergaderstuk',
              		'type' => 'file'
              	),
              	'date' => array(
              		'caption' => 'Datum en tijd',
              		'type' => 'date'
              	),
              	'locatie' => array(
              		'caption' => 'Locatie',
              		'type' => 'text'
              	),
              	'title1' => array(
              		'caption' => 'Titel bijlage 1',
              		'type' => 'text'
              	),
              	'file1' => array(
              		'caption' => 'Bijlage 1',
              		'type' => 'file'
              	),
              	'title2' => array(
              		'caption' => 'Titel bijlage 2',
              		'type' => 'text'
              	),
              	'file2' => array(
              		'caption' => 'Bijlage 2',
              		'type' => 'file'
              	),
              	'title3' => array(
              		'caption' => 'Titel bijlage 3',
              		'type' => 'text'
              	),
              	'file3' => array(
              		'caption' => 'Bijlage 3',
              		'type' => 'file'
              	),
              	'title4' => array(
              		'caption' => 'Titel bijlage 4',
              		'type' => 'text'
              	),
              	'file4' => array(
              		'caption' => 'Bijlage 4',
              		'type' => 'file'
              	),
              	'title5' => array(
              		'caption' => 'Titel bijlage 5',
              		'type' => 'text'
              	),
              	'file5' => array(
              		'caption' => 'Bijlage 5',
              		'type' => 'file'
              	)
              );
              $settings['templates'] = array(
              	'outerTpl' => '<div>[+wrapper+]</div>',
              	'rowTpl' => '[+date:strtotime:gt=`[+date:strtotime=`today`+]`:then=`<div>[+file1:isnot=``:then=`<div class="fright">Bijlage(n) : <div class="fright"><a href="[+file1+]" target="_blank" class="link-2">[+title1+]</a>[+file2:isnot=``:then=`<br /><a href="[+file2+]" target="_blank" class="link-2">[+title2+]</a>`:else=``+][+file3:isnot=``:then=`<br /><a href="[+file3+]" target="_blank" class="link-2">[+title3+]</a>`:else=``+][+file4:isnot=``:then=`<br /><a href="[+file4+]" target="_blank" class="link-2">[+title4+]</a>`:else=``+][+file5:isnot=``:then=`<a href="[+file5+]" target="_blank" class="link-2">[+title5+]</a>`:else=``+]</div></div>`:else=``+]<img src="assets/templates/hbv/images/vergadering.png" class="fleftpdf"> Datum : <strong>[+date:mydate=`%d-%m-%Y`+]</strong><br />Aanvangstijd : [+date:mydate=`%H:%M`:isnot=`00:00`:then=`<strong>[+date:mydate=`%H:%M`+]u</strong>`:else=`nog niet bekend`+]<br />Locatie : [+locatie+]<br />Vergadering : [+file:isnot=``:then=`<a href="[+file+]" target="_blank" class="link-2">[+text+]</a>`:else=`[+text+]`+]<br />Wie : [+wie+][+textarea:isnot=``:then=`<br /><div class="uitlegvergadering">[+textarea+]</div>`:else=``+]</div>`:else=``+]'
              );
              $settings['configuration'] = array(
              	'enablePaste' => FALSE,
              	'enableClear' => FALSE,
              	'csvseparator' => ','
              );
              ?>
              


              greetings Appeltje
              • Break the PHx constructs into pieces and see which parts do not work.
                [+date:strtotime+]
                [+date:strtotime=`today`+]
                [+date:strtotime:gt=`[+date:strtotime=`today`+]`:then=`xxx`:else=`yyy`+]
                

                and so on …
                  • 1934
                  • 23 Posts
                  Jako,

                  For the test, I have two dates 2013-11-27 and 2013-11-06.
                  the part [+date:strtotime+] works en gives different numbers
                  the part [+date:strtotime=`today`+] gives the same numbers as above, is that correct ? they should be the same

                  Appeltje
                  • Sorry mistake: [+phx:input=`today`:strtotime+] should do the thing.
                    • discuss.answer
                      • 1934
                      • 23 Posts
                      Jako,

                      That does the trick.
                      Thanks very much, it works well !!!!!

                      Appeltje