Jump to content

WillyC

Members
  • Posts

    328
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by WillyC

  1. @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')); }
  2. @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/
  3. Bern hard u.can does $wire->addHook('/mymodule/{foo}/{bar}(/{baz})?/', function($e) { return "<pre> foo: $e->foo bar: $e->bar baz: $e->baz "; }); @ bern berna hard @ @bernhard
  4. 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
  5. @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
  6. u.can do on anyee page template like .this if($config->ajax){ // u do.ajax $data=['status'=>'ok', 'massage'=>'hi whirld']; header('content-type: application/json'); echo json_encode($data); exit; }else{ // u.do html }
  7. super user.s required to create fielders y templatos purposefulness of super user this.is with out such purpose is not.super
  8. no argumentas needeed what.u wants is event->return wire()->addHookAfter('Page::render', function (HookEvent $event) { $page = $event->return; });
  9. $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
  10. 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
  11. looks.ikes u w ant $table->setEncodeEntities(false);
  12. u want.to set for.use serveors timezine no client not big prolem if.u set wrong
  13. here.u go echo $pages("parent=/")->implode('<a href={url}>{title}</a> ');
  14. template=airport|city, title|body%=air u donut need.Airport bcoz u got %=air template=airport|city, title|body%=air, title%=USA template=airport|city, title|body%=air, title%=USA, id!=[title%=nyc] or.in pw v3 u can do template=airport|city, title|body%=air, title%=USA, title!%=nyc
  15. sorte all.by price ? text=a|b, sort=price sorte.by text thens by price ? text=a|b, sort=text, sort=price
  16. it.not matter donut look.at tables just use.it ? work for me pw store utf8 like idn that need .only ascii
  17. thats.sound like hole diffrnt cms no ? WirePress why sholud pw main stream ? pw is seaworthy.vessel not canooe for stream
  18. i dunno.twig butt i try answer neway for.theis port echo $twig->render('promocoes/index.twig.html', array( 'promocoes' => $promocoes, )); where $promocoes comes.from ? can u.show code for thats ? try remove.this {% if promocoes %} and {% endif %} try removes "key," from {% for key, promocao in promocoes %} alsos look.u have unclose span tag <span> Nº {{promocao.getnumero}} </span <--need close! -=-=-edito-=-=- nm. > <!-- found.it
  19. lost koberoaki bcoz he ask how.to do w/pw i.ansor more for "cylng lots pages" then "sum lotso pages" uses.either for sum butt uses my codes if u.might needs more todo
  20. can u.better shloud poste code samplos ? when squegee local.systemos use no.outputs formoatting $page->of(false); u ca also checks ferst if value than.outputs if($page->description){ print $page->description;} else{ print "descriptions no";} with u uses.twig ? i dunno ifsos mabe uses outputs fomatting $page->of(true); can.check w if($page->of()){/*has foratting*/}else{/*not.does have*/} ok ? or : no
  21. $sum=0; $start=0; $limit=1000; do{ $mypages=wire('pages')->find("start=$start, limit=$limit, $myselector"); print "processng pages.frm $start<BR>"; foreach ($mypages as $mypage) $sum += $mypage->amount; wire('pages')->uncacheAll(); $start+=$limit; }while($mypages->count());
  22. include("/home/shutterblue/public_html/content/index.php"); $wire->pages->setOutputFormatting( true ); // u cansadd.this when boot trap $homepage = $wire->pages->get(1);
  23. ovis u post.here same thng 3 yrs same ,,bug,, nobodys ever else seen peoples helps u ands u.no replys if u needs help.go back und first reply to peoples.thet helpd u here https://processwire.com/talk/topic/3363-image-field-description-not-saving/ and.here (!) https://processwire.com/talk/topic/11102-image-fields-stop-saving-descriptions-after-a-while/page-2
  24. u.haves anee caches ? likes tamplate cache on ?
×
×
  • Create New...