Jump to content

benbyf

Members
  • Content Count

    670
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by benbyf


  1. Anyone done much with plans/products/subscriptions? going round in circles abit. looking to create a customer, add and plan/subscription, and charge them for the first installment, but cant seem to work out the API flow to put it all together 😞


  2. 10 hours ago, Rob(AU) said:

    Hi Ben, I've been using another Payments module. Am I understanding correctly that yours does not depend on the PaymentModule?

    If not I can uninstall the unused modules ...

     

    Thanks

    It does, but doesnt really need to. it uses the PaymentModule for inhereitance of structure. As my module doesn't totally adhere to the render structure it might be worth striping out the dependancy at some point.


  3. 1 hour ago, elabx said:

    Piece of cake with ProcessWire I say 😄!

    Registration with LoginRegister Pro, feedback/rating with comments module and probably I'd think of an admin dashboard or someway to present comments/rating in a nicer way than just going to the video page and look at the fields. 

    If you didnt want to build an admin module you could add functionality to your templates depending on the user role. e.g. Superuser can see who has watched each video on the video's page, and you could provide a page which only exists for the admin that displays a list of videos and users who have watched them etc etc

    • Like 2

  4. GRRRRRRRR ok found something that worked in the form settings for pages two levels deep i have to turn off Disable session tracking and CSRF protection? which must be getting in the way and disallowing everything. not sure how to get around this but might add a honey pot as replace meant... but either way I get LOTS of spam before sooooooo not great... gonna have to fob off FormBuilder at this rate


  5. I have a a form in my site footer that can be accessed anywhere on site, I've added the form in the _inc.php file and added the render in the pages footer.php. However, this works well on the homepage e.g. you can submit said form and get a thank you on reload, doesnt work at all on other pages... Just lots like a fresh reload. Any thing im doing wrong here or ways to diagnose as there isn't an error log for formbuilder etc...?


  6. no problem at all. You gave me an idea actually, maybe we could try ProFields:Tables and setup a simple set of fields for each form element–might contrains the types of inputs you could use but might be a start... maybe wth a set of defaults that can be stored somewhere else.

    • Like 2

  7. Hi, Looking to create form elements on a page–some input with a colection of form inputs and the appropriate labels and variables for that input. I've used ProForms in the past and rolled out my own when creating simply one off forms, but I wonder if anyone has found a good way of allowing form creation on page editing so that clients can adhocly make and edit forms?

    Thanks

    • Like 1

  8. Unable to install module (ProcessRedirects): Specified key was too long; max key length is 1000 bytes

    get this when installing ProcessRedirects on PW 3.0.139. It adds an empty admin page to Setup and dies before publishing. Any help would be appreciated.


  9. 43 minutes ago, strandoo said:

    @benbyf Hi Ben. I've been trying out this module and modified the form for use with the Padloper shopping cart. (I was using a different Stripe module but I needed to upgrade to one that uses Intents). All is working well, but I've just realised that I've got a lot of 'incomplete' transactions listed in my Stripe Admin panel. I see the cancelIntent() function in the module, but I'm not sure when/how I should call this. Could I use this to get rid of my backlog of incomplete transaction? Sorry if I'm  being thick, but I guess I don't quite understand the Stripe Intents concept. Thanks.

    Great to hear its working for you. I have the same issue but its nothing that is wrong per say. Everytime a intent is created it creates an incomplete transaction on your account which is then followed by a completed transaction or failed depending on the user suceeding in the transaction. If you can work out how to get around this let me know, but I thought it was just a quirk of the new way of working.


  10. On 11/30/2012 at 11:22 AM, Soma said:

    Working example:

    
    $pa = $pages->find("template=basic-page,images.count>0");
    foreach($pa as $p){
       foreach($p->images as $i){
           $ImageSizer = new ImageSizer($i->filename);
           $ImageSizer->resize(120,0);
       }
    }
     

     

    will this need a $p->save to make it work?


  11. 1 minute ago, gebeer said:

    If someone wanted to wrap this into a portable inputfield module, they could create an module which extend InputfieldTable class and add the logic there. 🙂

    this would be ace. if I had more time I would look into it, but sort of scares me. 😕


  12. 22 hours ago, gebeer said:

    This looks really useful. Might still be a bit cumbersome for editors with all those start end rows columns. But nice how you made changes reflect instantly in the preview. Mind to share the code? 🙂

    What do you need the row settings for, Couldn't you act on drag&drop of the rows themselves inside the table field?

    Want to save the col and row info in the db so i can use it for css grid in the frontend. This will allow the client to add content that spans the first row, has two on the send that goes across half the grid, has 4 on the third row and has 2 with a gap in the middle on the fourth.... basically given them power to making interesting layout with whitespace.

    Ideally your right I would have the grid power the input of the PW fields and hide the col and row inputs but this is what i have so far.

     

    admin.php

    $config->scripts->add($config->urls->templates . "admin.js");
    $config->styles->add($config->urls->templates . "admin.css");

    admin.cs

    .table-grid{
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    }
    .grid-item{
        /* border: 1px solid £; */
        padding: 0.5em;
    }
    .activeGridName{
        background: rgb(197, 219, 226) !important;
    }

    admin.js

    $(function(){
        
        // custom grid script for pages with applicable table
        // name of input field
        var inputFieldName = "#wrap_Inputfield_featured_grid";
    
        if($(inputFieldName)){ // table found
            
            var table = "<br><div class='table-grid-container'><label class='uk-form-label'>Frontend representation</label><div class='table-grid Inputfield'>";
    
            // setup table
            var rows = $(inputFieldName+" .InputfieldContent table tbody tr"); // UI has 1 hidden row
            for (var i = 1; i < rows.length; i++) {
                
                var director = $(rows).eq(i).find(".InputfieldPageAutocomplete input.ui-autocomplete-input");
                var tds = $(rows).eq(i).find("td");
                var colStart = $(tds).eq(2).find('input');
                var colStartValue = $(colStart).attr("value");
                var rowStart = $(tds).eq(3).find('input');
                var rowStartValue = $(rowStart).attr("value");
                var colEnd = $(tds).eq(4).find('input');
                var colEndValue = $(colEnd).attr("value");
                var rowEnd = $(tds).eq(5).find('input');
                var rowEndValue = $(rowEnd).attr("value");
    
                var name = $(director).attr("value");
    
                $(colStart).addClass('table-value-input')
                            .attr('data-table-type','colStart')
                            .attr('data-name-data',name);
                $(rowStart).addClass('table-value-input')
                            .attr('data-table-type','rowStart')
                            .attr('data-name-data',name);
                $(colEnd).addClass('table-value-input')
                            .attr('data-table-type','colEnd')
                            .attr('data-name-data',name)
                $(rowEnd).addClass('table-value-input')
                            .attr('data-table-type','rowEnd')
                            .attr('data-name-data',name)
    
                $(rows).eq(i).attr("data-name",name);
                // console.log(colStart + " - " + rowStart + " - " + colEnd + " - " + rowEnd);
                
                var styles = "grid-row-start: "+rowStartValue+"; grid-column-start: "+colStartValue+"; grid-row-end: "+rowEndValue+"; grid-column-end: "+colEndValue+";";
                table += "<div class='grid-item Inputfield' style='"+styles+"' data-name='"+name+"'>"+name+"</div>";
            }
    
            table += "</div></div>";
            
            // add table to UI
            $(inputFieldName+" .InputfieldContent").append(table)
    
    
            // value changes and event listening
            $(document).on("change", "input.table-value-input", function(){
                var name = $(this).attr("data-name-data");
                var data = $(this).attr("value");
                var type = $(this).attr('data-table-type');
                console.log(data);
                console.log(type);
                console.log(name);
                
                switch (type) {
                    case "colStart":
                        $(".grid-item[data-name='"+name+"']").css("grid-column-start", data);
                        break;
                    case "rowStart":
                        $(".grid-item[data-name='"+name+"']").css("grid-row-start", data);
                        break;
                    case "colEnd":
                        $(".grid-item[data-name='"+name+"']").css("grid-column-end", data);
                        break;
                    case "rowEnd":
                        $(".grid-item[data-name='"+name+"']").css("grid-row-end", data);
                        break;
                    default:
                        break;
                }
            });
            $(document).on("mouseover", "[data-name]", function(){
                var data = $(this).attr("data-name");
                $("[data-name='"+data+"']").addClass("activeGridName");
            });
            $(document).on("mouseout", "[data-name]", function(){
                var data = $(this).attr("data-name");
                $("[data-name='"+data+"']").removeClass("activeGridName");
            });
        }
    
    });

    Main problem at the moment is it isn't very portable–you have to know the field name for it to work.

    • Like 2

  13. I did this as @psy mentioned using those two modules.

    On 12/11/2019 at 11:28 AM, 3fingers said:

    Thanks @bernhard, I'll dig it deeper with your suggestion, even though it seems like their rates are way too high for my project.

    @psy Nice module! I'd love to use it to complete this task, looks like it could let me easily list files of a dropbox folder into my site.

    How to share, instead, just some specific files (belonging to the dropbox folder) to a specific user?

    The ideal situation would be:

    1) My client (whom is the one has access to the dropox panel and can upload files) decide to share just few files to user "x" (user "x" has previously registered to my pw site and has a private page).
    2) Choosen files appears as links on the private user page ( I've noticed this on the thread you posted, but it's just part of the job).

    One solution that comes into my mind would be to copy/paste such file links to a repeater belonging to the user page and iterate it on the front-end.

    In my implementation I allowed my client to upload to folders in dropbox and in Processwire assign users access to specific folders (and the files within). On the frontend I would present the logged in user on the site with thier folder and files the client was sharing with them -> this was for promotional materials but could be anything really.

    • Like 2

  14. On 12/8/2019 at 12:18 PM, szabesz said:

    Hi @benbyf

    Just ideas, I hope this helps:

    As far as I know, the closest module which at least partially could be used for such grid building is @Macrura's Inputfield Selectize: https://processwire.com/talk/topic/13549-selectizejs-modules-family/ 

    Another idea – which also needs additional coding – but could be a working solution is to use @gebeer's new module FieldtypeImage Picker which is currently being polished: https://processwire.com/talk/topic/22665-module-fieldtypeimagepicker-pick-images-from-a-folder/

    And for the grid part you could implement a grid builder with something like this: https://gridstackjs.com/

    FieldtypeImage Picker could be used for setting the image, and the event of that selection could notify gridstack.js which could then set the content of corresponding the grid cell accordingly. As for uploading images on the fly, I have no idea about the possibilities, but if you can use ajax request in the correct order, then it might be possible to wire it all up.

    If a PW image inputfield is set to replace images with an already uploaded image having the same file name, then PW uploads and assigns the image to that page without the need to click the Save button, therefore images uploaded to the very same page could be made available right after being uploaded, provided FieldtypeImage Picker "be refreshed". You could consult Gebeer for such a possibility...

    Again, I am just brainstorming here.

     

     

    Thanks! Hugely usefull! Think my main issue is the grid editing element so I might implement most of the site and leave the editable image/link section till last and maybe look at building something. I would like it to mirror the frontend as much as possible, so i could just use css grid and do some limited js stuff pushing the page id's, item number and span columns and rows into the database..... mmmmmmmmmmmmm

    • Like 1

  15. Is there any way to create an input grid within a edit page which allows the user to select a cell and assign a page to it, e.g. from a list of pages of template "x" select one and assing it so that in the templates the table can be created and cells refer to the page itself or its id?

    I'm working on a site where the clients wishes to have a grid layout that they can adhocly put different page images into that link to the pages about that project. However they want each cell to be assignable or not and be able to span 1 or more cells... making an expressive layout.

    Any thoughts would be appreciated

×
×
  • Create New...