Jump to content

guy

Members
  • Posts

    61
  • Joined

  • Last visited

Everything posted by guy

  1. I've been testing a form in Form Builder and am having an issue when I add more than 1 formbuilderfile input to the same form. The 1st works as expected, but the rest don't save the file to the entries database. You're just left with a reference to its name but a file size of 0kb. If you set the 1st formbuilderfile input to accept 2 files it works fine. The issue only occurs when adding multiple formbuilderfile input's. The issue isn't with the input itself, as moving the order in which they appear means the first in the form will work as expected and the 2nd and later will always fail. P.S I've just started working with Form Builder and haven't access to the support forum yet. By all means move this post if needed, just please let me read it....
  2. Been using Ryans code for the login page and I'm finding I get a server error if the user enters a username which includes an @ the error seems to be coming from: $username = $sanitizer->username($input->post->username); $pass = $input->post->pass; // this line has nothing to do with the problem, just left it in for consistency $u = $users->get($username); When sanitizing the username, the value we get back is not loved by the $users selector. The error is logged as: For myself I didn't need the user to be able to enter @ as I'm not passing an email, therefore I've flipped out the sanitizer to use name instead, i.e. $username = $sanitizer->name($input->post->username); I assumed this was a bug with the username sanitizer, however if there's a code change I could make it would be great to hear.
  3. Hey Diogo, thanks for your thoughts. From an admin perspective would creating a page for each of a pages sections (perhaps 10 in some places) not look rather messy? I'm not saying its the wrong approach, just wondering how it could be laid out so it didn't look all a bit confusing for the end user. If using sub pages for each of a pages sections, I'd assume it best to keep them directly under their parent so as to make the job of finding the part you want to edit as easy as possible. This would mean they'd be sitting next to actual sub pages and I worry that even if they are hidden the whole thing will look very cluttered. The site has over 130 pages so I want to keep its admin as simple to understand as possible, hence isolating a pages sections within a repeater only found on that page seemed more practical. When I'd considered the pages root for each section I imagined the admin structure looking something like the following, would this be accurate? Page 1section 1 section 2 section 3 section 4 Sub-Page 1section 1 section 2 section 3 section 4 Sub-Page 2section 1 section 2 Sub-Page 3section 1 section 2 section 3 I can see this getting a little messy (some pages will have up to 10 sections) with a large number of pages. That said pw will only show the sub pages the users requested to see, so this would control the clutter a bit. ********** I've had a thought ********* Assuming the above model is acurate it may be possible to clean this up using just CSS and a bit of jQuery. Processwire places each page within a div and adds the template name to the end of a class, i.e. PageListTemplate_section-hero (the template for which is called section-hero). Therefore if we established a rule that all section templates were prepended with a string like "tbs-section-" (something a bit random) follwed by the sections name, these could be automatically hidden via the stylesheet: [class^="PageListTemplate_tbs-section-"], [class*=" PageListTemplate_tbs-section-"] { display: none; } Then we could pop a button onto the pages inline actions menu which would allow the user to toggle these pages on and off. Still thinking about how best to do this as I'd rather avoid changing the core modules of pw, the functions which would be good to hook with are in ProcessPageList. I'll look into this a bit more and post back what i come up with. Feeling quite positive about this method, Thank you again Diogo for your input, it really helped, hopefully the above sits better with you.
  4. Hi, I was hoping to just get some advice on whether the method we're proposing for building certain site pages is the correct one when using Processwire. I've attached an image which gives an overview of the idea, i'll explain a bit further below: We're building site pages which are broken down into multiple sections. These sections can be 3 different heights, have 3 base layouts for the positioning of content, can accept 4+ different types of user generated (page specific) content, alongside an override which would place a reusable block with its own template in a position. If that's not clear hopefully the image helps.... I am proposing the use of a repeater field to handle the content and placement for each section. This is where I am looking for either a thumbs up or a hell no...... I propose we create fieldsets within the repeater each of which handles 1 of the 4+ types of page specific content (video block, text block, link block etc...). We would then have a page field which can pull in our reusable page templates (offers, USP's etc...). These are all stored in pages which are not customisable from this repeater, therefore they would just place their pages content into the page. Now to get all this working I would have all of the above, 4+ page specific blocks & the reusable pages, within a single repeater, which in turn could then be added to the page x number of times. Obviously this would look like s#it, and be a UI knightmare, so I would hook up another field at the start of the repeater which displayed 5 buttons, 1 per section type available. All 5 section types are then hidden by default (jQuery) and only upon selecting a button can you enter content (jQuery). Furthermore if these buttons are built from a single input then the value can be passed to the pages template and it'll know which of the sections to render. Hopefully this should remove issues like the users clicking all 5 buttons and entering content. I'm a little concerned as to the size of this repeater as every repitition would be generating all the fields, even if the user can't see them. Other than that creating alot of excess blank data fields I believe this should work fine. Being new to pw though I thought I'd push it out there so someone can tell me about the plugin I can download and save myself from typing such a long winded post ever again.....
  5. We're currently putting together a client portal and are wondering if it's possible to request an authenicated Processwire page from another Processwire site on a subdomain? (subdomain structure follows method 1: http://processwire.com/api/modules/multi-site-support/ i.e seperate databases) The client portal sits on portal.domain.com & the client Processwire sites will sit at client1.domain.com. We're wanting a solution where connections to client1.domain.com are blocked unless the user has authenicated on portal.domain.com. The reason for not simple authenticating the client on client1.domain.com is we are creating a dashboard for the projects which requires authentication to access at portal.domain.com. This will allow each client to list their projects, view them (i.e why we need this to work), approve stages, store docs etc. Any advice or pointers would be awesome,
×
×
  • Create New...