We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10378
    • 375 Posts
    Is it possible to query Quip comments in a way to restrict the output to only display comments of a currently logged in user?

    I know that it's possible to query MODx resources this way:

    $c = $modx->newQuery('modResource');
    $c->where(array(
       'parent:IN' => array(23,24,25),
       'deleted' => false,
       'hidemenu' => false,
       'published' => true,
    ));
    $c->sortby('menuindex','ASC');
    $c->limit(10);
    $resources = $modx->getCollection('modResource',$c);
    


    Any hint on how this could be done with Quip tables?
      Freelancer @bitego http://www.bitego.com
      ---
      GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
      More infos here: http://www.bitego.com/extras/goodnews/
    • You can work with it in the exact same way (but with the right names and fields, of course) with Quip or any other addon. Just find the schema, which is usually in core/components/packagename/model/schema/, and sometimes in _build/schema.

      For Quip that's here: https://github.com/splittingred/Quip/blob/develop/core/components/quip/model/schema/quip.mysql.schema.xml

      You'll probably want to just load up the class, which takes care of configuration and calling addPackage. One way to do that (from the Quip snippet):
      $quip = $modx->getService('quip','Quip',$modx->getOption('quip.core_path',null,$modx->getOption('core_path').'components/quip/').'model/quip/',$scriptProperties);
      if (!($quip instanceof Quip)) return '';
      
      $quip->initialize($modx->context->get('key'));;

      .. and then just do what you want to do smiley
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.