We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37241
    • 3 Posts
    Hi, I'm a revo beginner.

    I'v made an original tv input type
    It contains only two files.

    1) core/model/modx/processors/element/tv/renders/mgr/input/test.php
    2) manager/templates/default/element/tv/renders/input/test.tpl

    ( I follow this tutorial and it works fine. http://rtfm.modx.com/display/revolution20/Adding+a+Custom+TV+Input+Type )

    Now, I want to pack it.
    So I tried to use PackMan.
    But I can't understand how to use...

    In this case,
    Should I use "directories" tab ?
    How can I set "manager" directory ?

    Please help & guide me.
      • 37241
      • 3 Posts
      I try this PackMan settings, but failed...
      ( file name is different from above )
        • 4172
        • 5,888 Posts
        put your files under a new folder for your TV

        for example:
        /core/components/mycustomtv/elements/tv/input/test.php
        and
        /core/components/mycustomtv/elements/tv/test.tpl

        in your test.php use this:
        $path = 'components/mycustomtv/';
        $corePath = $this->xpdo->getOption('mycustomtv.core_path', null, $this->xpdo->getOption('core_path') . $path);
        return $modx->smarty->fetch($corePath . 'elements/tv/mycustomtv.tpl');


        create a plugin for your tv to get it into the TVInputRenderList
        <?php
        
        $corePath = $modx->getOption('mycustomtv.core_path',null,$modx->getOption('core_path').'components/mycustomtv/');
        switch ($modx->event->name) {
            case 'OnTVInputRenderList':
                $modx->event->output($corePath.'elements/tv/input/');
                break;
        }
        return;

        and check the event OnTVInputRenderList for this plugin

        then you can add this plugin with packman and in Directorys use

        source: {core_path}components/mycustomtv/
        target: {core_path}components/
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 37241
          • 3 Posts
          i notice my mistake from your advice.
          "directories" tab must select directories, not file...

          this setting works, my files appear in collect directories.
          source: {core_path}model/modx/processors/element/tv/renders/mgr/input/
          target: {core_path}model/modx/processors/element/tv/renders/mgr/
          and
          source: {base_path}manager/templates/default/element/tv/renders/input/
          target: {base_path}manager/templates/default/element/tv/renders/

          but this is not good because other files in "input" directory are also copied.
          so, your way is better.
          THANK YOU !!

          but, is it necessary that create plugin ?
          i install this package, and no plugins appear.
          http://modx.com/extras/package/googlemapstv

          do you know how to do like that ?