Jump to content

neophron

Members
  • Posts

    149
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by neophron

  1. You're absolutely right. I wrote my question too hasty. I'm gonna find a different way for applying a color to a teaser.
  2. Hi there, meanwhile the client had a new wish and I need your help again. An archive page shall contain children, which will be moved there manually. Structure:archive (archive) --> shows teaser from child pages child-page 02 child-page 01 child-page 03 child-page 01 child-page 01 child-page 02 The classical way to echo child pages is by: <?php foreach ($page->children() as $teaser) : ?> But I need again the data from the color_field mentioned above <?= $teaser->parent->select_color->title; ?> The logic now would be something like this: Find all children from parent=1223|1224|1225 and echo a teaser only if they are children from archive
  3. Hi guys, 5 years later… for separating the date components from a date field, I found this solution. This works fine. <?php $d = strtotime($page->datefield); echo date('d', $d) . '<br>'; //e.g 8 echo date('F Y', $d); //e.g. November 2015 ?> But I want to germanize the output. I tried this: <?php setlocale(LC_ALL, 'de_DE.UTF-8'); $d = strftime("%d. %B %G", strtotime($veranstaltung->datefield)); echo date('%d.', $d) . '<br>'; echo date('%B', $d); ?> But I'm getting an error: A non well formed numeric value encountered In my config.php I have these lines: $config->timezone = 'Europe/Berlin'; setlocale(LC_ALL, 'de_DE.UTF-8'); I don't know, if these settings from the date field are correct
  4. Thanks! Now it works fine 🙂 I'm going to have a look at this »Latte«
  5. Thanks, but now I'm getting this error from this line: Trying to get property 'children' of non-object
  6. I'm still getting an error. I this think, that this line causes trouble <?php foreach ($pages->findIDs('1223|1224|1225, sort=-created')->children as $item) : ?>
  7. Thanks for the hint. I created this, but it gives throws me an error: <?php foreach ($pages->findIDs('1223|1224|1225, sort=-created')->children as $item) : ?> <?php if ($item->matches('parent=1223')) : ?> <a href='<?= $item->url; ?>' class='teaser-angebot-wrapper <?= $item->select_color->title; ?>'> <section> <h3><?= $item->title; ?></h3> <p>Ausstattung: <?= $item->textfield_01; ?></p> </section> </a> <?php elseif ($item->matches('parent=1224')) : ?> <a href='<?= $item->url; ?>' class='teaser-angebot-wrapper <?= $item->select_color->title; ?>'> <section> <h3><?= $item->title; ?></h3> <p>Wo / Wann: <?= $item->textfield_02; ?></p> </section> </a> <?php endif ?> <?php endforeach ?>
  8. Hi guys, I'm struggling with the following situation: Structure: parent_page 01 (template01) --> shows teaser from child pages child-page 01 child-page 01 child-page 01 parent_page 02 (template01) --> shows teaser from child pages child-page 02 child-page 02 child-page 02 parent_page 03 (template02) --> shows teaser from child pages child-page 03 child-page 03 child-page 03 collect_page (template_collect) --> //This page shows teasers from all child pages In the template01 and 02 is a select options field (select_color) for 3 colors. The child pages gets the parent color by: $page->parent->select_color->title; Now I need the parent colors for all teasers on the collect_page. Something like: <?php foreach ($pages->findIDs('1223|1224|1225, sort=-created')->children as $item) : ?> <?php if item is child page from parent with ID=1223 -> select_color->title : ?> <?php elseif item is child page from parent with ID=1224 -> select_color->title : ?> <?php elseif item is child page from parent with ID=1225 -> select_color->title : ?>
  9. There is a long comment (in german) from a guy, he's complaining about PW. Part of the stuff, he's talking about, is beyond my knowledge (MySQL, queries). He mentions, that he must work with PW, maybe that's why he is unhappy. https://www.heise.de/forum/heise-online/Kommentare/WordPress-Alternative-Websites-flexibel-gestalten-und-verwalten-mit-ProcessWire/Bitte-nicht/thread-7053784/#posting_40820682
  10. Thanks for this comparison, a lot useful informations. I remember how many years ago (around 2013–14) I was looking for a new CMS and for some time I played with Craft. Later I found also Bolt CMS (also with TWIG support) and Kirby interesting.
  11. Hi, today I had to move a PW installation (3.0.193) to a client hosting company with Plesk. For some reason an image with multi-file array of items (Pageimages) won't be rendered. The front end will be empty, no error messages at all. The single-file (Pageimage) works, but only as long as I'm logged in. I'm using the matrix repeater with the ISOLATING ITEM OUTPUT TO SEPARATE VIEW FILES method. I have to admit, that during writing this, it came to my mind, that the Matrix Repeater could be the problem. So, I'm going to ask Ryan .
  12. Hi Chris, thanks for the help. Meanwhile the website I needed it for, is »on stage« with a solution from @elabx. But I'm going to check your code in a cloned version of the website. You're right! greetings, Nikolai
  13. Hi guys, I need some help with this gallery: <?php $options = array('cropping' => true, 'upscaling' => false, 'quality' => 80); // cropping => true is default and same like 'center' foreach ($item_gallery->gallery as $img) { if ($img->width > $img->height) { // check for orientation $slide = $img->size(2400, 0); // we have a landscape oriented image } else { $slide = $img->height(1800); // we have a portrait oriented image } // output your markup here echo " <figure> <a class='uk-inline' href='{$slide->url}' data-caption='{$slide->description}'> <img class='photo' data-src='{$slide->size(760, 0,$options)->url}' alt='{$slide->description}' uk-img> </a> <figcaption class='uk-hidden@s'> <p>{$slide->description}</p> </figcaption> </figure> "; } ?> The goal is to show in a uikit lightbox images that are max. 1200px wide and the max height is 900px. The client will upload images that are 2x bigger, to have resources for the retina output. How should I define the srcset and the sizes if you have all these different proportions and orientations? I saw that in sizes I can use this: (orientation: portrait) Thanks in advance.
  14. Thanks for the link, I had this link buried somewhere in my bookmarks. Sadly most of the nav examples are equal to the UIkit accordion, where a parent page is only a trigger. The big screen navigation has the usual dropdown (ul.level_2) You mean adding a redirection link to the parent page, based on a template that can be hidden via: 'selector' => 'template!=basic-page-hidden', home parent-page 01 parent-page 01 (redirect) child-page child-page child-page parent-page 02 parent-page 02 (redirect) child-page child-page child-page about contact
  15. Hi guys, for a website, the client wishes a mobile menu with an accordion nav. Since I'm using UIkit in the frontend, I implemented this https://getuikit.com/docs/nav with Somas MarkupSimpleNavigation module. The problem is, that the accordion nav solution from UIkit converts all parent pages into accordion triggers. You can't access these pages by clicking on it. I've seen other solutions, where only the arrow or plus icon is the trigger and the name is the link. This is my code: <?php $treeMenu = $modules->get("MarkupSimpleNavigation"); // load the module $options = array( 'parent_class' => 'parent', 'current_class' => 'current', 'has_children_class' => 'has_children uk-parent', 'levels' => true, 'levels_prefix' => 'level-', 'max_levels' => 3, 'firstlast' => false, 'collapsed' => false, 'show_root' => true, 'selector' => 'template!=basic-page-hidden', 'selector_field' => 'nav_selector', 'outer_tpl' => '<ul class="level_1 uk-nav-primary uk-nav-parent-icon" uk-nav>||</ul>', 'inner_tpl' => '<ul class="level_2 uk-nav-sub">||</ul>', 'list_tpl' => '<li%s>||</li>', 'list_field_class' => '', 'item_tpl' => '<a href="{url}">{title}</a>', 'item_current_tpl' => '<a href="{url}">{title}</a>', 'xtemplates' => '', 'xitem_tpl' => '<a href="{url}">{title}</a>', 'xitem_current_tpl' => '<span>{title}</span>', 'date_format' => 'Y/m/d', 'code_formatting' => false, 'debug' => false ); echo $treeMenu->render($options); ?> This the result, where the parent pages are triggers. So, I'm looking for a solution, where the only the arrows are triggers.
  16. What about purchasing the same domain name with ue, oe or ae?
  17. Ok, I solved this problem by deinstalling and installing it again.
  18. I can only say, that a domain with an »Umlaut« causes trouble, especially the emails with this domain name. A few years ago, I had to build a website with a domain with an »ü«. I remember how suddenly part of the email was converted into an »xn--« Since then, when a client want's a fancy Umlaut domain, I'm sending him some informations about alls pro and cons and usually they agree, that it's better without. Check this: https://bambule.de/umlaut-domains-ja-oder-nein-unsere-empfehlung/ https://webhoster.de/oe-ae-ue-¬-sind-umlaute-in-der-domain-sinnvoll/
  19. Hi, for my personal websites with a lot of paintings, I installed your module and it is really helpful 🙂 Recently I'm getting this error in the backend from Tracy (check screenshot). I have a 3.0.184 multi language installation. 153: } elseif($v instanceof \ProcessWire\Pageimage && $v) { 154: $thumb_url = $v->getCrop($subfield); 155: $thumb_url = $v->pagefiles->url . $this->resizeThumb($v, $thumb_url, $size); 156: } 157: 158: } else { // all normal image fields 159: 160: if($v instanceof \ProcessWire\Pageimages && count($v)) { 161: $thumb_url = $page->$field->first()->size($size[0],$size[1])->url; 162: } elseif($v instanceof \ProcessWire\Pageimage && $v) { 163: $thumb_url = $page->$field->size($size[0],$size[1])->url; 164: } 165: 166: } After skipping the error message, I'm getting an javascript error when I click on a > in the page tree (like »Liguria«).
  20. Thanks for this solution.
  21. Hi guys, thanks for your ideas, thoughts and blabbering 🙂. May be you are familiar with the following situation: A customer with almost zero knowledge about web design/development needs a website and approaches a print designer, who knows a little bit more about the »web and stuff«. Like »in the land of the blind, the one-eyed man is king« the designer prepares a design with different functions and presents his ideas to the »two-eyed guy«, the web designer. In my case, I tried to convince the designer to use Figma instead of Indesign. But due to lack of time, I received Indesign files 😞 Meanwhile I finally could convince the designer, to use a single form with different sections. So the headline of this thread is meanwhile obsolete. But nevertheless I think, that this conversation contain some good stuff. The thing is, that such guidelines could be integrated only in bigger projects with a bigger budget (here in Germany). And first you have to convince some persons, that usability and accessibility is meanwhile really important (https://www.deque.com/blog/accessibility-importance-for-seo/)
  22. The designers wish is, that these three separate forms, should be placed in a »switcher« from Uikit (https://getuikit.com/docs/switcher). I've never seen such stacking with different forms. No idea how they will behave inside the switcher.
  23. Hi there, I received a design guide, where 3 different forms are placed on the same page. All of them have about 6–8 input fields and some radio buttons.The website is going to be from a doctor's office, specialized in geriatrics. So may be half of the website users, will be people above 70. There are discussions, that more than 2 forms on one page is a bad practice. Till now I avoided two forms on one page, but now I have to find good reasons not to place more than one form on a page. Do you have any experiences with multiple forms one one page?
  24. @netcarver Thanks. I renamed the module directory like this: _EmailObfuscation Now, I'm getting these errors / messages: Deprecated : Function get_magic_quotes_gpc() is deprecated in /wire/core/WireInputData.php on line 81 Notice: Trying to access array offset on value of type int in /wire/core/PagesLoader.php on line 138 I can log in the backend, but I'm getting a blank page with a lot of errors. Deprecated: Function get_magic_quotes_gpc() is deprecated in /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/WireInputData.php on line 81 Warning: Cannot modify header information - headers already sent by (output started at /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/WireInputData.php:81) in /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/admin.php on line 27 Deprecated: Function get_magic_quotes_gpc() is deprecated in /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/WireInputData.php on line 81 Warning: session_regenerate_id(): Cannot regenerate session id - headers already sent in /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/Session.php on line 787 Warning: Cannot modify header information - headers already sent by (output started at /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/WireInputData.php:81) in /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/Session.php on line 799 Warning: Cannot modify header information - headers already sent by (output started at /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/WireInputData.php:81) in /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/Session.php on line 1036 Warning: Cannot modify header information - headers already sent by (output started at /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/WireInputData.php:81) in /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/Session.php on line 1037
  25. Hi there, I have two PW installations on the same hosting company (Ionos 😞 ). Till two or three weeks ago everything's worked fine. Now both websites show almost the same errors: Deprecated : Array and string offset access syntax with curly braces is deprecated in /homepages/39/d334050941/htdocs/processwire_06.07.18/site/modules/EmailObfuscation/EmailObfuscation.module on line 161 Deprecated : Array and string offset access syntax with curly braces is deprecated in /homepages/39/d334050941/htdocs/processwire_06.07.18/site/modules/EmailObfuscation/EmailObfuscation.module on line 163 Deprecated : Array and string offset access syntax with curly braces is deprecated in /homepages/39/d334050941/htdocs/processwire_06.07.18/site/modules/EmailObfuscation/EmailObfuscation.module on line 164 Deprecated : Array and string offset access syntax with curly braces is deprecated in /homepages/39/d334050941/htdocs/processwire_06.07.18/site/modules/EmailObfuscation/EmailObfuscation.module on line 171 Deprecated : Array and string offset access syntax with curly braces is deprecated in /homepages/39/d334050941/htdocs/processwire_06.07.18/site/modules/EmailObfuscation/EmailObfuscation.module on line 171 Deprecated : Array and string offset access syntax with curly braces is deprecated in /homepages/39/d334050941/htdocs/processwire_06.07.18/site/modules/EmailObfuscation/EmailObfuscation.module on line 171 Deprecated : Array and string offset access syntax with curly braces is deprecated in /homepages/39/d334050941/htdocs/processwire_06.07.18/site/modules/EmailObfuscation/EmailObfuscation.module on line 171 Warning : ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/Session.php on line 238 Warning : session_name(): Cannot change session name when headers already sent in /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/Session.php on line 242 Warning : ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/Session.php on line 248 Warning : ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/Session.php on line 249 Warning : ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/Session.php on line 250 Warning : ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/Session.php on line 251 Warning : Cannot modify header information - headers already sent by (output started at /homepages/39/d334050941/htdocs/processwire_06.07.18/site/modules/EmailObfuscation/EmailObfuscation.module:161) in /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/modules/Process/ProcessPageView.module on line 142 Deprecated : Function get_magic_quotes_gpc() is deprecated in /homepages/39/d334050941/htdocs/processwire_06.07.18/wire/core/WireInputData.php on line 81 I called the »support« and asked them, what they exactly changed, but they couldn't help me. I have to wait till Monday. PHP is 7.4, PW is 3.0.165 and the EmailObfuscation modules is the latest version. The bad thing is, hat the backend is not accessible. Is there a way to deactivate a module via ftp?
×
×
  • Create New...