Jump to content

WillyC

Members
  • Posts

    343
  • Joined

  • Last visited

  • Days Won

    10

Posts posted by WillyC

  1. Art bot,
    Databass selector  and.WireArray selector diffnt things and not do same thing .this is the way

    one.is airplane / other is tractor

    WireArray selector for any.things in memory : fields : templates : fieldgroupos : smogashsnags : ur own tipos : and if necessario - pages in memory { b.coz PageArray extendo WireArray } but u shlud use airplane for.pages
    not tractor

    WireArray selectors = genral purpoose for any things u can hold in WireArray in mem. ,, tractor

    Databass selector == more power ful and optimizely justed for.pages ,, airplane

    !!! if u using WireArray selector for |find|filter| pages 
      then you are loaded pages u should not / not necessario / not fficent / 
      donut push pages round in.tractor 

    fly,
    $willyc

    • Like 4
  2. art fulbot,
    usea that select-options field type.if you not want pages fer select opts.
     
    thats blog tut.very olden days, they are was not select-options type then {{ but I still like to uses pages most times }} 

    for comment
      donut use pages 4 comments
      install ProcessCommentsManger module in Modules>Core>Process
      edit.comment field .. clicka Input tab .. choose "yes" for "use comment manger rather then in-page editor"

    for findning comment use comments find() methoda 

    n.joy youwill or ask more
    love,
    $willy

    • Like 3
  3. @Matzn that not.how obj inheritennce work {
    .clsses inherit code 
      not runs time valus }

     

    class A{public $foo;}
    class B extends A{}
    $a=new A();
    $a->foo='Foo';
    $b=new B();
    echo $a->foo; //  'Foo'
    echo $b->foo; // emptys.. nothing

     

    modules work.same {
      .mabe.u want this  in 
      you TestModuleChild ? } >>>

    public function __construct(){
      $this->setArray($this->modules->getConfig('TestModule'));
    }

    • Like 4
  4. @Siddhi Jagtap u.file perms is no write.

    /site/assets/* need tobe readerable/writedable to.apache

    sound like apache .run as account that.not you - 

    mabe find new web host that less truble or u.can

    find out.user what apache run as - "apache", "nobody", "buldnog", etc. if user "apache": https://processwire.com/docs/security/file-permissions/#determining-what-user-apache-runs-as

    chgrp -R apache /site/assets

    find /site/assets -type d -exec chmod 775 {} \;

    find /site/assets -type f -exec chmod 664 {} \;

    https://processwire.com/docs/security/file-permissions/#how-to-change-permissions-of-existing-files

    but also visitarlos cont'la lachpud may helper - https://processwire.com/docs/security/file-permissions/

    • Like 3
  5. how.abt u use $cache 2 do jus do it. 1once per hour ?

    echo $cache->get('topic-count', 3600, function() use($topics) {
      $str = '';
      $strategy = pages()->get("template=genre, name=strategy");
      foreach($topics as $topic) {
        $count = pages()->count("template=game, genre=$strategy, topic=$topic");
        $str .= "<li>$topic->title: $count games</li>";
      }
      return $str;
    }); 

    also.2 make faster u better should uses "id" not name, so "topics" no 'topics.name' and "genre" not genre.name etc. othrwis pw have to look those up for u (?) every time of foreach

    @rjgamer

    • Like 2
  6. @MSP01

    1.. pw cachis any.thing it load, so no.many how times u.cal $page->feld or $page->parent->smoga or $page->feld->bilpa --- it load feld or smoga or bilpa 1 time....... if autojoinin  for.feld smoga or bilpa then it load it with th 1 queery that loader page 

    2) yes 1 sql to loader template=settings page and 1 sql to loader somesetting. ifs somesetting.feld is autojoinin then 1 sql for both. if u.cal eithers template=settings page agains or somesetting agains then alredy loadeded so no xtra sql unless u $pages->uncacheAll() whch clearys it all

    3- may be. autojoinin can makes littel small faster but at cost of memry .use autojoinin only for.felds that u accessor on.evry load of $page. title good  one to be.autojoinin ......most othrs not;;; body or images and most betters not autojoinin

    • Like 7
  7. $page->find()start from $page
    if $page != home { $page->find( 'parnet=/blog/' ) will.alwayse return NO things }

    so >>> u.must use $pages->find()
    noT $page->find() !!

    OAR u can.uses $pages->get('/blog/')->children( 'limit=3, include=all' )

    if usesing $pages say shits bout array it mean yoU write-over it some where 
    >>> u did a $pages = array some.where !

    fix that.or u can uses wire( 'pages ')->find(' you.selectoro stuff here ');
    or functiones api pages()->find( 'selectros in this' ) 
    amen

    • Like 7
  8.  wire( 'sanitizer')->entities( $u->title ) => $url . $u->id,
      wire( 'sanitizer')->entities( $u->request_type->title ),
      wire( 'sanitizer' )->entities( $dog_ref->title ) => $url . $dog_ref->id,
     wire( 'sanitizer' )->entities( $mailer->name ),
      ... 
    "<a href=''>Schváliť</a>", // u NO.entitties on this.ones

    • Like 3
×
×
  • Create New...