Jump to content

HannaP

Members
  • Posts

    23
  • Joined

Posts posted by HannaP

  1. Thanks, that helped.

    Batcher then complained about the same in line 163
    which I changed like that, too

    if (wireCount($this->input->post->pages) && $this->input->post->a == $this->_('Execute')) {

    The module seems to work now but still gives warnings:

    Warning: Trying to access array offset on value of type null in /home/hannelore/webs/AGVPW/site/assets/cache/FileCompiler/site/modules/ProcessBatcher/ProcessBatcher.module on line 361
    
    Warning: Trying to access array offset on value of type null in /home/hannelore/webs/AGVPW/site/assets/cache/FileCompiler/site/modules/ProcessBatcher/ProcessBatcher.module on line 362
    
    Warning: Trying to access array offset on value of type null in /home/hannelore/webs/AGVPW/site/assets/cache/FileCompiler/site/modules/ProcessBatcher/ProcessBatcher.module on line 363

    This using PHP 8.0.9
    ProcessWire 3.0.165
    Batcher 1.0.4

  2. On 11/18/2020 at 11:59 AM, kongondo said:

    Line #341 of ProcessBatcher has this code:

    <?php namespace ProcessWire;
    
      if (!count($this->input->post->title)) {
      // code
      }

    That needs to be changed to ensure that the variable being counted ($input->post->title) is an array or a countable object.

    Can anybody show me how to change that line?

  3. I'm about to update an old site from PW 2.7.2/ PHP 7.4  to  3.0.165/ PHP 8.0

    I have a problem with a HannaCode/PHP thing.

    This
     

    require_once($config->paths->assets . "moon_phase/moonphase.php");

    worked in 2.7.2 but throws an error in 3.0.165
    as if it can't find moon_phase/moonphase.php anymore.

    What can I do so it works again?

    Any help appreciated.

     

    PS.: just tested - seems to be related to PHP 8 because it works on PHP 7.4

     

     

  4. I'ld like to share the changes I made to make this module work with PHP8

     

    MarkupiCalendar/iCalcreator/iCalcreator.class.php
    lines 3037-3038:
    from

    ( in_array( $fbMember{0}, array( 'P', '+', '-' )))) {
              if( 'P' != $fbMember{0} )


    to

    ( in_array( $fbMember[0], array( 'P', '+', '-' )))) {
              if( 'P' != $fbMember[0] )

    line 4196:
    from

    $unique .= $base{mt_rand( $start, $end )};


    to

    $unique .= $base[mt_rand( $start, $end )];

    MarkupiCalendar/iCalcreator/iCalUtilityFunctions.class.php
    line 66:
    from

    $tzid = ( isset( $theDate['tz'] )) ? $theDate['tz'] : ( 7 == count( $theDate )) ? end( $theDate ) : null;


    to

    $tzid = (( isset( $theDate['tz'] )) ? $theDate['tz'] : ( 7 == count( $theDate ))) ? end( $theDate ) : null;

     

  5. Hi Jannis,

    Is  that you want this

    <li class="has_children"><a href="#">Über uns</a>

    appear like a headline ? with no link?

    I think it would be a good idea to give those 'headlines' their own template like 'ueberschrift' or so.

    Then you could proceed similar to what I posted here using a hook.

    • Like 1
  6. just want to add results from above tests for 'tree.jpg'.

    • file_exists = 1
    • exif_read_data = TRUE
    • exif = TRUE
    • exif["Orientation"] = TRUE
    • Orientation = 8

    frontend, halfsized is in right orientation: yes [x ] - no [ ]
    backend Original    is in right orientation: yes [ ] - no [x]
    backend Thumbnail    is in right orientation: yes [x] - no [ ]

    Is this what I normally would have to expect?

    -----------

    No additional image-related modules in use,

    PW is 2.7.2

  7. @horst

    I refererred to the original image when talking about 'large' image. it's the one I see when clicking on a thumbnail in the backend.

    I have two of those candidates that behave differently.

    Thanks for clarifying about the orientation stuff of exif-tags. I didn't know that.  I used exiftool to output the CW 270 and gThumb for the other one.

    I would like to send you a link via PM, so you can inspect those images further, if that helps.

  8. Even with AutoRotate set to true I have some photos that won't be rotated . They are ok in large version, but not in admin thumb.

    I noticed that they have something like this in their exif-tag:

    Camera Model Name  : Canon EOS 450D
    Orientation    : Rotate 270 CW

    whereas those that work fine have something like Orientation: bottom-left.

    Maybe that helps ..
     

  9. Solved it myself ...

    Finally managed to set up hooks:

    function myItemString(HookEvent $event) {
        $child = $event->arguments('page'); // current rendered child page
        // any logic with $child possible here
        
        /**
         * Überschriften
         */
        if ($child->template->name == 'menue-ueberschrift') {
            $event->return = "<span> $child->title</span>";
        };
    
        /**
         * active
         */
        if ($child->template->name == 'standard') {
            if ($child->id == wire('page')->id) {
                $event->return = "<span> $child->title</span>";
    
            }
        };
    }
    
    // setup the hook after on ___getItemString($class, $page) method
    $nav->addHookAfter('getItemString', null, 'myItemString');
    /* Render Navigation Markup adding options, too---------------- */
    echo $nav->render()
    

    Seems to work so I guess it's ok.

    And I've learned something new :-)

    Cheers Hanna

    • Like 2
  10. Hello all,

    I have two questions:

    First:

    using MSN Module ... is it possible to have "unlinked" items  in the menu?.
    I have several pages that serve as headlines to structure the content better. They have a seprate template (menu-ueberschrift) and they should not be clickable ... just be there as plain text. These Items have children. I want an uncollapsed menu..

    Second question:

    Goes into the same direction: I would like to have active pages without links, too. I think there is no need for links  for a page I'm currently viewing.

    Hopefully someone can help, as I'm stuck here.

  11. Hello,

    I'm trying to setup a multi-language site in German|English|Polish ( German being the default).

    In _main.php template that comes with the installation I've found this line:

    <html lang="<?php echo _x('en', 'HTML language code'); ?>">

    I don't quite understand what this line should output. Can somebody help, please?

  12. @LostKobrakai

    This is awsome!

    Thanks so much for this piece of code. I still have to learn a lot till I can do this on my own.

    Works like a charm ... I only had to update my PW from master 2.6.1 to the dev branch (Use of ready.php requires at least PW 2.6.7 I guess).

    The module code you helped me with in your first answer would probably do, but adding an extra button is of course much nicer.

    @horst

    Thank you very much for your code as well.

    I'll take it to study how things work in PW. Maybe it helps me with other tasks later on ...

    Again ... Thanks to both of you.

    • Like 3
  13. Hello all,

    My page has a lot of images. I created a gallery_image field to upload and display them. Unfortunately they are sort of unordered in the backend, though the filenames are numbered sequentially. I understand that this reflects the order of finished uploads. I figured out how to sort them on the frontend, but is there a way to do the same in backend?

    I guess this HookAfterPagesSave.module
    found here https://processwire-recipes.com/recipes/extending-page-save-process/
    might do the trick but I'm too new to processwire and too unexperienced in coding to see what code to write.

    Anyone can help?
    Thanks in advance
    Hanna

  14. Hello,

    honestly that was my first concern,too. But I quickly realised how easily things can be put together without needing a module for this, another one for the next task and so on. In PW I can do almost everything using my templates. Makes me independent from 3rd party module developers once there are upgrades. I expect things won't break that much when PW is upgraded to a new version. Glad I found PW!

    • Like 6
  15. Hello all,

    I wonder what is the best way to replace photos in a gallery that was created using the image input field.

    I have a number of galleries with 50+ images in them. Every now and then the photos have to be replaced with new ones. Clicking 50+ times on the wastebin icon is not really cool. Is there a better way to do this from the backend?

    Thanks for ideas

    Hanna

  16. Hello everybody,

    I found about processwire when in search of a new CMS for my sites.

    Mainly there were articles in blogs that made me curious. I found it difficult at first ... wasn't used to the freedom the system gives me. Yes it's a freedom to have fields and templates for whatever you like. But coming from other cmses one is not used to having that freedom. In most cms you're told what to do where and how. Processwire is different. Also ... the many tutorials are very helpful, the API docs , the forum. Though I didn't need to ask questions here myself up to now I found answers for all the problems that arose while working.

    Putting it together: I feel comfortable here and hope to make some more sites with it.

    • Like 8
×
×
  • Create New...