Jump to content

maxf5

Members
  • Posts

    143
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by maxf5

  1. Doesn't it work when he prefix his file with: <?php namespace ProcessWire;
  2. Hm it's strange. Can you try this? $frz = $languages->get("fr"); $p->of(false); $p->summary->setLanguageValue($frz, $row['description_fr']); $p->save();
  3. Your code snippet is inside a foreach, right? You have to save the Page at the end. $p->save();
  4. I am using the module on various multilingual sites and it's working fine! When you have Jumplinks installed it sometimes hits an 404 on /sitemap.xml even though the link/sitemap is working. Do you have to create an extra page and template (xml header) for it?
  5. Excuse me, i don't wanted to offend!! And i know PW owe cmscritic pretty much. Maybe the one or another wouldn't have found to PW without it giving attention to our wonderful system in a big lake of cms.
  6. When you 're lucky and happy with your WP blog for your needs, it's okay. This shouldn't be an offence against gay people. They were always my favorite singers (Little Richard, Rob Halford, Freddie Mercury,.. ). I just have an antipathy for everything wp related.
  7. Welcome to ******** webdevelopment 2018: Buy a theme for 59$ and change the logo and a few colors https://demo.tagdiv.com/newspaper/
  8. @cmscritic, you should fix that 3.2 mb stock photo. maybe with that one $ rm -rf $ git clone https://github.com/processwire/processwire
  9. I made this with Page Tables. It's not 100% perfect yet, but works for my demands _init.php: // Main Content if ($page->views) { $content = "<div id='views' data-uk-grid-margin>"; $contentview = ""; foreach ($page->views as $view) { $typ = $view->template; $id = $view->name; $colxl = $view->colxl; $gridcountxl = $colxl; $colsm = $view->colsm; $gridcountsm = $colsm; $colxs = $view->colxs; $gridcountxs = $colxs; $fw = $view->fullwidth; $nmnp = $view->removemargin; $border = $view->hasborder; switch ($typ) { case "Text": $text = $view->textfield; $ct = "<div id='{$id}' class='uk-width-small-". $colxs ."-12 uk-width-medium-". $colsm ."-12 uk-width-large-". $colxl ."-12'>$text"; $ct .= checkGrid($gridcountxs, $gridcountsm, $gridcountxl); $ct .= "</div>"; $contentview .= fullWidth($fw, $cv=$ct, $nmnp, $border); break; case "SlideGalerie": $bilder = $view->images; $sg = ""; $sg .= "<div id='{$id}' class='product-gallery views owl-carousel owl-theme'>"; foreach ($bilder as $b) { $bbig = $b->width(1920, $options); $bsmall = $b->size(485,325, $options); $bretina = $b->size(970,650, $options); $sg .= "<div class='g-item'>"; $sg .= "<a href='{$bbig->url}' data-uk-lightbox=\"{group:'{$view->name}'}\">"; $sg .= "<img data-src='{$bsmall->url}' data-src-retina='{$bretina->url}' class='owl-lazy' alt='$b->description'>"; $sg .= "</a>"; $sg .= "</div>"; } $sg .= "</div>"; $sg .= checkGrid($gridcountxs, $gridcountsm, $gridcountxl); $contentview .= fullWidth($fw, $cv=$sg, $nmnp, $border); break; // Case .. Case .. Case .. } $content .= $contentview; $content .= "</div>"; } _func.php /** * @param string $gridcountxs * @param string $gridcountsm * @param string $gridcountxl * @return string */ function checkGrid($gridcountxs = '', $gridcountsm = '', $gridcountxl = '') { $out = ''; if ($gridcountxs >= 12) { $out .= "<div class='uk-clearfix uk-visible-small'></div>"; } if ($gridcountsm >= 12) { $out .= "<div class='uk-clearfix uk-visible-medium'></div>"; } if ($gridcountxl >= 12) { $out .= "<div class='uk-clearfix uk-visible-large'></div>"; } return $out; } /** * @param string $fw * @param $cv * @param string $nmnp * @param string $border * @return string */ function fullWidth($fw = '', $cv, $nmnp = '', $border = '') { if ($nmnp) { $nomargin = 'uk-margin-top-remove'; } else { $nomargin = ''; } switch ($border) { case '1': $b = 'border-top'; break; case '2': $b = 'border-right'; break; case '3': $b = 'border-bottom'; break; case '4': $b = 'border-left'; break; case '5': $b = 'border-all'; break; default: $b = ''; break; } $fout = ''; if ($fw) { $fout = "<div class='full-width " . $nomargin . " " . $b . "'>" . $cv . "</div>"; } else { $fout = "<div class='uk-container uk-container-center uk-margin-large-top " . $nomargin . "'><div class='uk-grid " . $b . "'>" . $cv . "</div></div>"; } return $fout; }
  10. @justb3a Same problem here with an image field in a repeater: ErrorException: Undefined index: title in C:\laragon\www\XXX\site\modules\ImageExtra\ImageExtra.module:523 PW 3.0.95
  11. best site in 2018 so far, nice design
  12. Hi @FrancisChung, yes i am on the latest version (2017.3.2). Maybe let's read some PHPStorm documentations to make it run.
  13. +1 for that! Still waiting for a ProcessWire Plugin for PhpStorm. All those lints are horrible
  14. I fixed the problem now after checking all modules. The website was intended to be multilingual, so i prepared all the fields to be multilingual (text, textarea, url). After the launch of the site the multilingual feature wasn't needed anymore, so i deleted the second language but forgot to reset all the fields to be not multingual. In 3.0.84 i had no problems, in 3.0.85 i get errors. But it now runs as it should on 3.0.88
  15. Hi guys, i built a site on 3.0.80 i think. I could update the site every week to the newest dev version without problems until 3.0.84. On the frontend and when i want to edit a page in the backend i have this error:
  16. Today i gave an -mostly wordpress- agency access to the backend for writing news, editing seo settings etc. First thing from them was: Is that a cms or pinterest? I didn't recognized it until then
  17. Yes, sorry for the short message. When i want to update from 3.0.84 to 3.0.85 this error appears. the frontend is crashed and the backend is in whitescreen. It happens when i update via the upgrades module or manually via ftp upload. /** * Provides direct reference access to variables in the $data array * * Otherwise the same as get() * * @param string $key * @return mixed|null * */ public function __get($key) { return $this->get($key); }
  18. Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in xxx/wire/core/WireData.php on line 329
  19. https://www.captiva-power.de (german pc and notebook producer/distributor) Ups, just saw your blog and you already used it
  20. Hey @Soma thank you. I already know that solution and i am using it for the website, 'selector' => 'navhide!=1', (it's a checkbox) I wanted to get something dynamic when a new children is added. The parent is the news-listing and the children are the news; you get the point. I can live with that workaround for the moment
  21. Hey guys, i want to limit the children of a page (id:1101) to 3 children. Can somebody help me with the hook? selector_level2" => "limit=3" <- this would do it for all parents.. best regards
  22. Do you have an email field in the form? Make sure that in this field settings under input -> verify email address is not checked. the form is counting this field as two fields instead of one and you will get that error.
  23. Hm, it should work that way and has nothing to do with your tabs. Check the id (1006) again, maybe it's just a typo Is that page unpublished maybe?
  24. I normally would do the following. So you don't have to echo everything in strings. <?php $imgoptions = [ 'quality' => 100, 'upscaling' => false, ]; $products = $page->siblings("id!=$page"); ?> <?php foreach ($products as $prod) : ?> <div class='uk-width-1-2@s'> <?php if (count($prod->images)) : ?> <?php $fatboy = $prod->url; $thumb = $prod->images->first()->height(300, $imgoptions)->url; $w414 = $prod->images->first()->width(414)->url; $w320 = $prod->images->first()->width(320)->url; $imgdesc = $prod->images->first()->description; ?> <a href='<?= $fatboy; ?>'> <img class='lazyload prod-thumb-ov' src='<?= $thumb ?>' data-src='<?= $thumb ?>' data-srcset='<?= $w414 ?> 414w,<?= $w320 ?> 320w' data-sizes='auto' alt='<?= $imgdesc ?>'> </a> <?php endif; ?> </div> <div class='uk-width-1-2@s'> <?= $prod->title ?> </div> <?php endforeach; ?> Seperating the logic from the view is always good. but this doesn't count as spaghetti code so far
×
×
  • Create New...