Jump to content

Peter Knight

Members
  • Posts

    1,374
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by Peter Knight

  1. On 11/15/2022 at 8:16 AM, Inxentas said:

    Yes, and that worked perfectly! Thank you @BitPoet.

    I was hesitant to change the .htaccess file but truth be told, this is kind of a legacy project, so in the end I did not do much research on what that would affect. Are there any PW related issues I should take into account?

    PS. I received a mail asking me to click a "mark as solution" button. I wanted to mark your reply as the solution but I'm not seeing that button. I fear I'm going blind.

    Hi @Inxentas

    I just experienced the same issue. Would this hosting company have a name beginning letter H ?

     

  2. 21 hours ago, gebeer said:

    Thank you for bringing this to my attention. Sorry to hear you're having trouble. This module hasn't been maintained for a long time. It definitely could need some love and care. Just a few days ago this came to my mind oout of the blue. I'm quite busy atm but hope that I can spare some time and look into this. But it may take another week or so.

    Hey, no problem at all. I was just flagging it in case it was still in development. Good to be busy. 
    I'll keep a watch on this thread in case any future developments.

  3.  

    Hi @gebeer
    I'm trying out the module and I had a few issues

    When it comes to using the Module itself, my preferred method is to allow Pick from any page

    1. I add the field to a template and I can see the tree / site structure
    2. I drill down to the page which has images and Select this
    3. Nothing happens to the placeholder thumbnail at this stage so I save the page
    4. When I return to the field, I am asked again to 'Choose a page'

    When I return to the field setup , I occasionally get an error below even though this is described in the docs as Optional
     

    Quote

    Missing required value - Choose image fields that supply images

    I also note that in the list of possible image fields listed, the Module is not picking up any image fields.

    Thanks for reading

  4. 40 minutes ago, poljpocket said:

    I guess you are using FormBuilder? If so, please refer to the FormBuilder section of the paid modules section. You can only see this and will only receive support when you have an active license.

    Yes, using FormBuilder (and have a license) but It's possibly more of a WireMail SMTP question as that's what the screengrab of the UI is from.

  5. Hi

    I have a webform which asks for 

    • Name [Name_1]
    • Email [Email]
    • Message [Message]

    When the webform is recieved, I would like the Name and Email in the email header what the user has submitted.
    While I can output these values in the email's html body, I cannot succefully inject them into email header.

    I am using WireMail SMTP and have tried adding $Name_1 and $Email to the fields below.

    1087896258_CleanShotGoogleChromeModuleWireMailSMTPampersand.ie2024-01-08at14_30.37@2x.thumb.png.042141b68b26cb3458c7b574ca53cf3b.png

    Would appreciate any pointers as I don't see any related posts on Google or the PW forums.

    Thanks

    CleanShot Google ChromeAmpersand WWW Form - Contact Page - peter@edenstudios.com - Eden Studios Mail2024-01-08 at 14.27.55@2x.png

  6. I've been looking at various Redirect Modules and I don't think my current requirement is possible with any of them.

    I want to enter a PageID (my source page) and create a 301 redirect to a different URL (destination).

    Normally you might do this in the htaccess file with page paths but I'd rather do something within PW itself.

    Jumplinks comes close to supporting this but doesn't support page IDs.

    The reason I need page IDs to be specified in the source and destination is that my client often updates the page path for SEO experiments etc.

    If I were to use page Paths as the source and destination, they might stop working.

  7. TinyMCE Module looks great. One item I can't see is the ability to group related toolbar icons with a pipe.

    The official docs on TinyMCE mention to use a pipe  but I can't see how to apply it to the Toolbar settings.

    Interestingly, if you manually type a pipe, it does add it to the Toolbar but only accepts a single one.

    1834683243_CleanShot2023-05-18at12_59.07@2x.thumb.png.2efe04fc77a338faac2dc7abd46aede4.pngTin

     

  8. On 10/15/2021 at 4:33 PM, Mike Rockett said:

    @Peter Knight - That's odd, I was quite sure this bug was fixed. Internally, the module stores a schema version and then it does a comparison to see if an update is required. So if it is adding this column again, it means the stored schema version went out of sync. Could you check the database to see what the _schemaVersion is set to? Not sure which table it is, but it should be relatively simple to find.

    Hi @Mike Rockett

    My SchemaVersion is set to 4

    {"schemaVersion":4,"wildcardCleaning":"fullClean","enhancedWildcardCleaning":"","legacyDomain":"","statusCodes":"200 301 302","enable404Monitor":"","moduleDebug":"","redirectsImported":true,"moduleDisable":"","_schemaVersion":2}

     

  9. Hi

    I have a little script that ouputs a default hero image if an image isn't set on the page.

    All works great (see below).

    I've realised I want to add an image Crop to one or both of these but when I add a Croppabelmage to the page specific image, I get an error. And I get this error even if no image is set. 

    I understand what's happening. It's looking for getCrop even though there's no image in the field.

    But how to side-step it or do a proper check in this instance?

     <?php
     // Set var for the Hero / Masthead background image
     
    // A - The default image
     $image_default = $pages->get(1034)->Hero_Photo_Default->url; 
    
    // or B - The specific page image
    $image_hero = $page->Hero_Photo->url; 
     ?>
    
    
    
    
           <!-- START: Masthead -->   
              <div class="uk-section-default uk-margin-large-bottom  ">
    
                  
                  <?php  
                  if (count($image_hero)){
    
                    echo"
                  <div 
                  class='uk-section uk-section-xlarge pk-section-masthead uk-light uk-background-cover' 
                  style='background-image: url({$image_hero})'>
    
    
                    ";}
    
                  else 
                    {echo"
                   <div 
                  class='uk-section uk-section-xlarge pk-section-masthead uk-light uk-background-cover' 
                  style='background-image: url({$image_default})'>
                  ";}
    
                  ?>
                 
                      <div class="uk-container">
                          <!-- <h1><?=$page->title?></h1> --->
                      </div>
    
                  </div>
              </div>
            <!-- END: Masthead -->

     

  10. 5 minutes ago, fruid said:

    my SMTP-server has a limited amount of emails that it can send per day. Is there a way to find out if an email was actually sent or not?

    You could try sending the emails via PostMark
    It's easy to integrate with WireMail SMTP, credits are cheap and it'll give you a dashboard on amounts of emails sent/bounced etc

  11. 22 hours ago, Peter Knight said:

    Should Croppable Image 3 work with Image fields in Repeater Matrix

    I have a regular field called Images which correctly displays my 3 Croppable Image options.

    When the same Images field is added to a Repeater Matrix field, only a single Croppable Image option will display.

    You can see it in effect on the attached. The image field at the top is in the repeater.

    To test it further, I added a different image field to the Repeater, and again only see a single Croppable Image option.

    Can anyone confirm if this is a bug?

    Using 

    • Croppable Image 1.2.0
    • Processwire 3.0.200
    • Repeater Matrix 0.0.8

    Thanks

     

    CleanShot 2022-10-10 at 15.28.38@2x.png

    @horstI discovered what was happening here.

    If a crop has a template name it won't appear in a repeater


    staff-square,300,300,team-detail (works)
    staff-square,300,300 (not working)

    I don't have a fix for it other than to create a duplicate crop setting without a template name.

     

  12. Should Croppable Image 3 work with Image fields in Repeater Matrix

    I have a regular field called Images which correctly displays my 3 Croppable Image options.

    When the same Images field is added to a Repeater Matrix field, only a single Croppable Image option will display.

    You can see it in effect on the attached. The image field at the top is in the repeater.

    To test it further, I added a different image field to the Repeater, and again only see a single Croppable Image option.

    Can anyone confirm if this is a bug?

    Using 

    • Croppable Image 1.2.0
    • Processwire 3.0.200
    • Repeater Matrix 0.0.8

    Thanks

     

    CleanShot 2022-10-10 at 15.28.38@2x.png

  13. Thanks everyone.

    This works great. I thought I'd have to make something much more complex.

    <?php
    echo "<a href='" . ($page->prev("template=staff-detail")->path ?: $page->siblings("template=staff-detail")->last->path)."'><i class='fas fa-arrow-left'></i></a>";
    			
    echo "<a href='" . ($page->next("template=staff-detail")->path ?: $page->siblings("template=staff-detail")->first->path) . "'><i class='fas fa-arrow-right'></i></a>";
    			 ?>

    The colon in the two echo statements seems to be some kind of shorthand for if/else. I hadn't seen it before so thanks for the tip.

    ?

     

    • Like 2
  14. Hi

    I have series of staff pages and each page has a back and forward arrow to allow you to jump to the previous or next person

    • Staff overview
    • Staff 1 (template=staff-detail)
    • Staff 2 (template=staff-detail)
    • Staff 3 (template=staff-detail)
    • Staff 4 (template=staff-detail)

    I had it all working as follows

    <!-- START: Next and Back for staff -->
    <?php
    if($page->prev("template=staff-detail")->id) {
    echo "<a href='{$page->prev->path}'><i class='fas fa-arrow-left'></i></a>";
    } ?>
    			 
    <?php
    if($page->next("template=staff-detail")->id) {
    echo "<a href='{$page->next->path}'><i class='fas fa-arrow-right'></i></a>";
    } ?>
    <!-- END: Next and Back for staff -->

    However, I now want to change the next and back arrows to infinitely loop through siblings.

    IE

    1. if you get to Staff 4 and click next arrow, you get to Staff 1
    2. if you get to Staff 1 and click previous arrow, you get to Staff 4

    I couldn't find anything in the docs which allows for some kind of infinite loop? Can anyone guide me on how to approach this?

    Many thanks

    P

    CleanShot 2022-05-31 at 15.54.36@2x.png

  15. Does anyone know if this Module works in RepeaterMatrix or what I might be doing wrong to get a Call to undefined function wireRenderFile() error?

    Used within the template itself (and outside Matrix), I can successfully render my file using the following

    <?php $myfile = $page->fieldtypeselectfile; ?>
    <?php echo wireRenderFile("$myfile");?>

    However, when I create a Matrix Repeater field called Element_Picker.php and add that same code into

    site/templates/fields/matrix/Element_Picker.php

    I get an error

    Fatal Error: Uncaught Error: Call to undefined function wireRenderFile() in site/templates/fields/matrix/Element_Picker.php:3
    
    #0 wire/core/TemplateFile.php (327): require()
    #1 wire/core/Wire.php (414): TemplateFile->___render()
    #2 wire/core/WireHooks.php (951): Wire->_callMethod('___render', Array)
    #3 wire/core/Wire.php (485): WireHooks->runHooks(Object(TemplateFile), 'render', Array)
    #4 site/modules/FieldtypeRepeaterMatrix/RepeaterMatrixPage.php (284): Wire->__call('render', Array)
    #5 site/templates/fields/matrix.php (3): RepeaterMatrixPage->render()
    #6 wire/core/TemplateFile.php (32 (line 3 of site/templates/fields/matrix/Element_Picker.php)
    
    This error message was shown because: you are logged in as a Superuser. Error has been logged.

    Thanks. Much appreciated as always. 
     

     

  16. Hi @Martijn Geerts
    Great Module. Thanks for contributing this to the community.
    I think I've found a bug using ProcessWire 3.0.184

    If I specify a subfolder such as blocks/ or just blocks, I can see the list of available files in the fieldtypeselectfile dropdown.
    But on the frontend, I get an error as follows. I can see that the blocks subdirectory isn't being recognised.
     

    Quote

    Error: Exception: Filename doesn't exist: site/templates/PK-CTA-2button.php (in wire/core/TemplateFile.php line 177)

    Happy-ish to just work off the main templates folder but for house-keeping purposes, I'd love to specify a sub-folder.

  17. 18 hours ago, bernhard said:

    Yes, you can use InputfieldTextTags https://processwire.com/blog/posts/pw-3.0.177/

    But it would be a lot easier to use HannaCode or a custom Textformatter module which replaces [file=foo-bar.php] with the content of the file foo-bar.php

    Thanks @bernhard
    I've been trying this and much to my surprise, I have it working as follows. Have yet to try it within a Repeater Matrix for the moment.

    <?php $myfile = $page->fieldtypeselectfile; ?>
    <?php echo wireRenderFile("$myfile");?>

    I did find a bug whereby this only seems to scan files within the template folder and not a custom directory but I'll mention that on the main Module thread.

    Thanks.

  18. 20 hours ago, aagd said:

    In the RepeaterMatrix field create two repeater matrix item types: cta1 & cta2. They don't even have to have any fields, i guess.

    In the template file that should output the repeater items you can output them like this:

    <?php
    
    foreach($page->repeater_matrix_field as $item){
    
      if ($item->type == "cta1"){
        echo wireRenderFile("Call-to-Action01.php");
      }
    
      if ($item->type == "cta2"){
        echo wireRenderFile("Call-to-Action02.php");
      }
    }
    
    ?>

    RepeaterMatrix is a pro module, though. Not Core.

    Thanks @aagd. Good idea and certainly something I'm about to explore. I used 2 examples but I'll probably at some stage end up with a lot more. My concern is about scalability here and having to create a field to associate with each file. Ideally I'd love a file select field that I can simply point at a directory.

  19. Hi 

    Is there a field type in the Core which will allow be to select one (or more) files within the PW file system?

    For context...

    I want to create two stand-alone PHP files which contain simple HTML as follows

    • Call-to-Action-01.php would be <h2>Call us</h2>
    • Call-to-Action-02.php would be <h2>Email us</h2>

    These would be stored within the PW /templates directory (I think).

    I then want to use RepeaterMatrix to select one or both and output them into my template where necessary.

    I was then looking at the $files->render() method and have the following working

    <?php $string = $files->render($Call-to-Action01.php); ?>

    So that's a good start but now how to select ?

    Thanks ?

     

     

×
×
  • Create New...