We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28215
    • 4,149 Posts
    Doh. Guess I should have tested the build before throwing that up there. rolleyes

    I’ll fix the stuff tomorrow and get a solid version up. Thanks.

    P.S. Quip and Gallery both have backend pages. You might want to take a look at them as well.
      shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
      • 30491
      • 44 Posts
      :) thanks for the useful tips

      I’ve looked at gallery and quip, its a tad too complicated for my needs, doodles appears to be easier and simple to read and understand.
        • 28215
        • 4,149 Posts
        tourshi:

        I’ve updated and fixed the bugs in the Doodles 3PC, and committed them to SVN. Thanks.
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
          • 30491
          • 44 Posts
          Hey again,

          Thanks alot, worked flawlessly smiley just what i needed to better understand how the manager pages work and operate
            • 28215
            • 4,149 Posts
            I’ll be speaking a little on Custom Manager Pages at MODxpo, if you’re coming, by the way. laugh
              shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
              • 5811
              • 1,717 Posts
              I get the following message when I build the Doodle component:
              Console running...
              Attempting to install package with signature: doodles-1.0-beta1
              Package found...now preparing to install.
              Grabbing package workspace...
              Workspace environment initiated, now installing package...
              Attempting to preserve files at E:\www\modx200rc1/core/components/doodles into archive E:/www/modx200rc1/core/packages/doodles-1.0-beta1/modCategory/468c03c5bfc68545d309fd72c88d8f31.1.preserved.zip
              Language string not found: "doodles"
              Language string not found: "doodles.desc"
              Created table`revo_doodles` SQL: CREATE TABLE `revo_doodles` (`id` INTEGER unsigned NOT NULL AUTO_INCREMENT,`name` VARCHAR(255) NOT NULL DEFAULT ’’,`description` TEXT NOT NULL,`location` TEXT NOT NULL,`downloads` INT(10) unsigned NOT NULL DEFAULT ’0’,`createdon` DATETIME NULL,`createdby` INT(10) unsigned NOT NULL DEFAULT ’0’,`editedon` DATETIME NULL,`editedby` INT(10) unsigned NOT NULL DEFAULT ’0’, PRIMARY KEY (`id`)) TYPE=MyISAM
              Successfully installed package doodles-1.0-beta1
              Two language string seems to be missing

              Otherwise as soon Doodles are added thru the module, they could be displayed thru the snippet.

              My question is regarding these few lines of the snippet that I don’t understand:
              $dood = $modx->getService('doodles','Doodles',$modx->getOption('doodles.core_path',null,$modx->getOption('core_path').'components/doodles/').'model/doodles/',$scriptProperties);
              if (!($dood instanceof Doodles)) return '';
              
              /* setup default properties */
              $tpl = $modx->getOption('tpl',$scriptProperties,'rowTpl');
              $sort = $modx->getOption('sort',$scriptProperties,'name');
              $dir = $modx->getOption('dir',$scriptProperties,'ASC');
              I have read the documentation regarding MODx services and getServices, but I don’t understand where (in which file) are defined the ’tpl’,’sort’ and ’dir’ options. Apologies because may be it’s obvious but ...
                • 28215
                • 4,149 Posts
                I wouldn’t worry about the warnings (errors are in red[/red], warnings in blue).



                My question is regarding these few lines of the snippet that I don’t understand:

                /* setup default properties */
                $tpl = $modx->getOption('tpl',$scriptProperties,'rowTpl');
                $sort = $modx->getOption('sort',$scriptProperties,'name');
                $dir = $modx->getOption('dir',$scriptProperties,'ASC');


                I have read the documentation regarding MODx services and getServices, but I don’t understand where (in which file) are defined the ’tpl’,’sort’ and ’dir’ options. Apologies because may be it’s obvious but ...

                $modx->getOption() is a utility method that basically checks to see if a key (1st parameter) exists in an array (2nd parameter), and provides a default value if it doesn’t (3rd parameter). It also checks $modx->config as well.

                $scriptProperties is an array of all the properties passed to an Element (such as the properties defined in the tag). So, if I passed a tag like this:

                [[!Doodles? &tpl=`myTpl`]]


                $scriptProperties[’tpl’] would equal ’myTpl’, and the Doodles script would try to grab a chunk with its name when rendering each doodle row. If I hadn’t had passed ’tpl’ in my tag properties, it would have defaulted to ’rowTpl’ as a value for $tpl.
                  shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                  • 5811
                  • 1,717 Posts

                  Ok Thanks, now I understand.
                  And at the bottom of this page the use of $scriptProperties is explained. I missed it!