Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by joer80

  1. I had an edit button that edits the page you are on, but I am playing with just making it highlight all of the sections on the page and make an edit button for that section. See this video. I dont like how it doesnt give you live preview though, so I am playing with vue to do this.
  2. For small websites, I have used top-level pages as pages, and use child pages as content rows. For larger ones I use the normal pages as pages that can have child pages, and make a Settings page that holds sitewide settings, with theme children, and layouts as children of the theme. I can assign a design row or php code snippet to a page, template, or make it sitewide. You can see some details on my forum post.
  3. How much time does padloper save vs just starting from the stripe examples?
  4. I run a cpanel server in AWS on their cpanel cloudlinux image. I turn on the nightly backup option in cpanel that stores versioned backups for 7 days. If a client gets hacked, I can roll back 7 days with only one versioned backup set. I have the default ssd for the websites and attached a regular magnetic hard drive for cheaper backup storage for the nightly backups. That config doesnt support offsite s3 upload, so I tell aws to do a nightly snapshot of my disks and keep them for 5 days. This also saves me bandwith since those don't count against you. Versioned backups takes 15 min compared to 4 hours or more if you copy every file. cpanel does auto ssl and has a file browser that allows you to upload a zip file of the website, and decompress by right clicking it. Pretty handy. I do not like using cheap client hosting as it is never setup well. My php settings as far as ram and timeout scripts can use are better. I also have a large mysql cache.
  5. Another advantage of storing the template code in the database is you can attach all php/html, js, css, and images/files, into the one page so it is completely portable. So you could import a component page into your theme folder, and everything that is needed is there. And to uninstall you just delete the one page.
  6. I have one selector that pulls all children of the different layout type pages in one query using "or groups", and I just loop through the results. Each item will have itself for the data side but the items template file is not really used for logic or html. The magic is I load a component file for the logic and html bones. So when a child section is loaded, say an intro section, the variable is saved as $section, and I check for the existence of the section component. If there I include it, if not I make it and include it. ie. $filename = '../assets/cache/PHP/component_' . $snippet->template . '.php'; If not there you can get that templates component file and make the file like this: template=component,name=' . $snippet->template. When you edit the component via ace php text editor, you clear the cache/php/ folder. That way no extra database work is needed, it just includes the file with the proper path like processwire would a normal template file. The difference is instead of all of my template files being in processwire folder and needing to be uploaded, I can sort them into folders like uikit or template, and organize them and version control them and never upload. An example of a theme component may be a page heading, php snippet, footer, header, blurbs, etc. This also has the advantage of almost never needing to sync code changes between servers in a load balanced environment. All php code is in the database and saved into cached files that can be cleared or rebuilt at any time if a new instance spins up. I do need to sync assets like uploaded files and images though. So the section template has the fields, but the section component has the logic and html.
  7. I have background color, gradient and background image groups on design templates like sections. (This website used for page headings and footers also.) The entire website was designed within processwire. I only have one physical template file and everything runs through that. (It pulls the sitewide, template, and page rows designed from backend. Supports parent and child themes.)
  8. Frontend built in UIkit 3. Backend is a modified version of what I did for HealthCARE Express. I am using the top level pages to hold information only, so no design rows as children. Children are always sub pages. The page builder area is under a settings page that has children for things like the navigation menus, and themes. (The themes hold the page layouts, color schemes and uikit and theme components.) Here is a video showing adding an intro section to a basic page. (Basic page has an inner page heading row already added.) . Instead of adding a text item, I could have added a code item and echoed text tied to the basic page. I may also make a hook for auto creating the layout page to save that step, and add a link on the front end for adding new rows without needing to visit the backend settings area. I put menus under settings so you can design the top menus, main menu, and footer column menus from one spot, and every widget that reads them gets set at one time. You can also control if they open in the same or new windows, and add off site links this way. I just feel like depending on only hidden and non hidden root pages is not enough. Also, an incoming theme can default to reading a menu named a certain way. Menus are primarily set via selector, so you do not need to edit it them every time you add a service for example, like if you wanted to have a service menu in wordpress. So if I do a page template for a Service, there can still be a rich text box and image field for that service attached to the page template, so there is no way for someone to mess up the design just to edit, and to reduce confusion, but if you want to use the page builder to add rows, you can dig into that settings page and edit the rows for the page. I also have front end editing turned on so you can double click almost anything to edit, and added a small drop down at the top right of the page that loops through all rows on your page so you have a shortcut to edit just that row from the backend. The page builder rows are matched by path. ie. /about/ would match /settings/themes/selectedtheme/bypage/about/ and might match /settings/themes/selectedtheme/bytemplate/basic-page/ also, if the about page was a basic page template. Everything will match the sitewide folder. This type of thing lets you do things like add a call to action on a group of pages by adding that row to the template instead of the page. Or add a css file or javascript file to a group or sitewide. The layouts template holds the layout types, like per page or per template, and layout types can have children like sections, containers, grids, cells, images, text, accordions, php or html code, etc. I have also played with doing a page group layout type so you can group a few pages together and add a row or code snippet to those as well. This output method does not require php eval. I actually just start an output buffer and include. That gets added to a snippet array variable that I can sort and edit until the very end when it is time to output. The first level in the array is 8 slots that works as placeholders, and then each of those 8 slots holds the rows or code snippets for that placeholder. ie. before html, head, body-top, body-header, body-main, body-footer, body-bottom, after html are the default placements code can target. The second level also has weights. In addition to targeting a placeholder, a section will also have a priority drop down of highest, high, medium, low, lowest. That way a bottom call to action can be tied to the body-main spot as low priority, and no matter if it is added to the template, page group, page or sitewide, it will always sink to the bottom. Plugins used: Inputfield Ace Extended, MarkInPageTree, Breadcrumb Dropdowns, Prev/Next Tabs (for switch from row to row), Hanna Code The page builder has almost all of UIkit added so you can add a grid to a section and set the child width by drop downs, or you can use drop downs to set them on the child cell pages individually. The cell pages would allow you to add heading, text, images, accordions, etc. If you add a text item to a cell for example, the first tab is content for the rich text editor, and the second tab is design for things like text alignment per device. (So you can say center on mobile or left align on desktop without writing any code!) . The advanced tab holds an id over ride, extra classes box, and a javascript and css box that will minify on page save and be included into your website. This allows any item to add advanced css or js in a portable way. I will attach some screenshots! https://www.medpracticesuccess.com/
  9. Does anyone know if support for export and Import of "Select Options" fields is coming soon? Or if it is hard to do? This is currently the most time consuming thing for me needing to pull templates from one website to another. Needing to repopulate them all manually. Thanks!
  10. does using the connect page fields module like that make it so deleting a user removes the other page also?
  11. That is very interesting looking. I will look into this... I have a feeling the issue with adding children is because the user template is under the admin tree and it wants to use it like a process. Maybe this would let me pull it out of the admin tree? Not sure yet.
  12. That is probably what I will try next just so if a user is removed, I know the dependant pages will also be! I just was not sure why the children method was not working and if I am not suppose to do it that way, if repeaters would be any safer. Good find! If I do it via api, it would probably work also...
  13. I was not aware that it is discouraged to put children under user pages. What is the reasoning? I am curious if the same reasoning would apply to using a repeater on user pages or are they encouraged? I can do a hidden page at home if both are discouraged but I would rather not since there is the chance of things becoming out of sync. ie. If you delete a user manually, it is not going to automatically delete the hidden root pages that belong to him that are detached.
  14. I enabled the user template to have children of the correct template but it does not allow it to have children. It just gives the error I posted. I am wondering if it is a bug. In this situation I want to allow users to attach Licenses to their user accounts. Each will have 4 fields or so and they can have a number of them. It would make sense to me to store them as children. If this is not possible I may need to make a hidden page at root to store them under? Or maybe do a repeater?
  15. I am trying to add a child page to a user and I am getting an error. Enabled the user template to have children but when I add a child page there is an error. Does anyone have any ideas? The error is: "The template 'user' does not allow parents of type 'user'" but it never lets me select the template I allowed. Thanks!
  16. That is a good point. We probably need to do this through an s3 files and s3 images field type. If the project used sessions stored in the database and only these fields for files and images, I think all user uploaded assets would be the same on all web servers.
  17. I am also considering mounting assets folder as a bucket. https://github.com/s3fs-fuse/s3fs-fuse/wiki/Fuse-Over-Amazon
  18. Scripting via the rest apis could be very handy and make it worth while. One pro also is also the file storage is cheaper. Around half the price per gig for storage. Doing something like aurora over a regular mysql could be different though. Not only is it fully managed and replicated but the storage system is also distributed in a way that may take a lot of the pain points you mentioned away. Docs say you do not need to assign a storage number and you are only charged for what you use and it can grow up to 64 TB without rebooting. It also has up to 15 low-latency read replicas, point-in-time recovery, continuous backup to Amazon S3, and replication across three Availability Zones (AZs) by default. It says it keeps 6 copies at all times and instance failover typically takes less than 30 seconds.
  19. Another option might be to make a hook that uploads the files to s3. That should already be HA. I think we have a plugin for this already, but it may not work as if you fire up a new web server, the file will not be in the local install but it will be on s3. It will need to know how to pull it back down if missing. This also adds quite a bit of hassle in needing to setup s3 buckets and IAM roles for every website.
  20. I was thinking about some of the ways to provide a low cost high availability service in my hosting environment for my clients. I already use RDS by amazon, so it automatically replicates my database over 2 availability zones and does fail over. This seems to take care of the database layer, but my files are spread out/out of sync over the 2 servers home folders. There is still the need to sync the asset files. Would it be a good way to solve this by simply using an image field that stores the user uploaded images in the database instead of in the assets folder? I would guess I would need to make a new image field type for this. For performance, I would think you would want it to cache to the local disks asset folder on the first load so it doesn't cause extra db strain. It would only pull the blob one time. It sounds like a nightmare trying to rsync a number of home directories and only use that source when the copy is full. Maybe the way to do this would be to make a hook on page save instead of adding a new field type. ie. On page save, add images to the database so I can rebuild if missing. Let me know your thoughts! Thanks!
  21. How would you nest more than one deep? For example, with my approach, I can insert a section, then a grid, then a cell, and then put an accordion into one cell, and then put another grid into that accordion. So I can do text in the left part of an accordion and an image in the right. Here is another screencast. Also shows I got rid of the content layer. I don't find it necessary. This is a one pager I did for our imaging clinic. It had an accordion example. https://www.hceimaging.com/
  22. I had the need to do something similar before. We wanted to know how far users got into a multi-step order process, and also what values they were putting in during each step and the referring pages. I found inserting a record on every page load worked well and was fast. Don't increment anything or it is slow, just insert new records and use a weekly or monthly cron to process the data to keep the table size manageable. Add in an optimize command also to clear db overhead after rows are deleted. I insert the session_id, timestamp, ip address, etc, but none of the data is public. Used for troubleshooting.
  23. Give me a hypothetical situation and I can see if the page layout group method would be enough. By assigning a page layout to each page to form groups of pages. A page can have its own items and the items attached to its page group at the same time. As an additional layer, you can use hanna codes to share code between page groups even.
  24. My next step is to see how hard it will be to make a module that will allow me to keep them all up to date as I make changes and add templates. I will have 5 installs within a week!
  • Create New...