Jump to content

rick

Members
  • Posts

    635
  • Joined

  • Last visited

  • Days Won

    6

rick last won the day on May 20 2021

rick had the most liked content!

Contact Methods

  • Website URL
    https://simulatedconcepts.com

Profile Information

  • Gender
    Male
  • Location
    Texas
  • Interests
    Web applications, scotch, hunting, fishing, scotch, graphic design. Did I mention scotch?

Recent Profile Visitors

7,504 profile views

rick's Achievements

Hero Member

Hero Member (6/6)

700

Reputation

3

Community Answers

  1. Shoutout to @matjazp! Thanks for all your help!
  2. You can check out the blog module. It will handle the article content and related info. As far as the front-end looking like other magazine layouts, there are numerous free magazine html/css templates and more paid templates. You may want to consider a paid template. The free templates look like free templates. ?
  3. Basically reiterating @wbmnfktr a Table is semantic while the DIVs are not. There a quite a few google search results for css div tables dating back to '08 where others have attempted replicating the html table using div elements. The main issue nowadays is the device screen sizes. Tables don't scale well at different resolutions. That being said, css has display:table, display:table-row, and display:table-cell type attributes, as well as using pseudo selectors like :last-child to reference specific elements. You could also hide specific table columns at different resolutions. I know this isn't the answer you were looking for, but maybe it helps with segregating large datasets into manageable chunks.
  4. Hello @olafgleba , What a fun project to work on. Reading through your post a couple of times it is clear you have everything under control, but simply have a question about processing payments for this parent (registration) -> child (art schools) relationship. First, I have no experience with padloper or formbuilder to say whether they can handle multiple vendors with multiple products. I'll leave that for the more experienced members. Lastly, I would contact stripe support and ask them the best means to handle multiple merchant accounts from a single URL (registration). This is where I think issues will arise. Normally you would define a single URL in the merchant account setup. But your solution would mean that you (registration) would also provide one or more merchant ids for each transaction. Stripe support will be able to answer that. I hope this helps. Also, keep us posted on this project (if allowed).
  5. Typography is not a simple topic but I'll try to explain how I use it. But first, the difference between EM/REM. Generally, an EM got it roots in print where it refers to the width of the upper-case M. When css came about, they changed it to refer to a relationship of the parent element. By default, one EM generally is 16 pixels in the browser world. The REM (Root EM) is in relation to the root (usually the HTML definition if no ::root{} is defined) font size as you have defined in CSS. Some inconsistency -- You can use both EM and REM in margin/padding definitions. However, when using EM as the unit in a margin definition it looks only at the current element; It does not refer back up to a parent. This is not the case with REMs. The REM declaration is always looking at the root. // EM html { font-size: 16px; } article { font-size: 20px; } p { font-size: 1.1em; margin-bottom: 1em; } <article> This is 20px. <p>This is 1.1 x 20px. The bottom margin is 1.1em regardless of parent font size setting.</p> </article> // REM html { font-size: 18px; } article { font-size: 20px; } p { font-size: 1.1rem; margin-bottom: 1rem; } <article> This is 20px. <p>This is 1.1 x 18px. The bottom margin is 1 x 18px.</p> </article> The viewport width/height (VW/VH) allows for a 'fluid' scaling. However, the drawback is that smaller devices will not zoom in or out should the font size scale too small. Also, on very wide screens this scaling would likely make the text way too big, to the point of interfering with other content. My method: I define my base font size as 16px (usually the browser default). I also include variables to make future changes very simple. I put my font size break points at the top of my css file (usually after ::ROOT{} ) so that I don't have to go hunting should I need to change something. To avoid the confusion between parent references, I define all font sizes, margins, paddings, widths, etc. in REMs, except for the base ::root{} definition which is in pixels. :root { --fs-norm: 1rem; // defaults to browser's font-size definition --fs-big: 2rem; --fs-hdg: clamp(3.5rem, 10vw + 1rem, 14rem); // This sets the min and max font-sizes and scales in between } @media (min-width: 40rem) { :root { --fs-norm: 1.125rem; --fs-big: 3rem; } } body { font-size: var(--fs-norm); line-height: 1.6; } h1 { font-size: var(--fs-hdg); text-transform: uppercase; } I hope this helps. Like I said, this isn't a simple topic where you can say, "Use x because...". ps. Not a front-end guru so others may have a better reply.
  6. Maybe I'm off base here, but since you say the user is the issue, why not create your own ISAM routine by hooking the registration to it's own domain/database and passing the result to the proper installation login/user.
  7. Personally, I prefer the old-school way rather than the ProcessWire way simply because it becomes too cumbersome to use ProcessWire to create Admissions forms, Tax forms, Milspec forms, Aircraft maintenance forms, etc. which I do almost monthly. I did begin with the ProcessWire way and spent way too much time trying to get the layout correct on both the front end and back end, so I stopped using its forms. As you know PHP has some built-in validation such as email, url, dns, etc. The remaining form types are simple enough to validate manually (ie, not using ProcessWire). Don't get me wrong, ProcessWire is great for the majority of solutions I require and I use it as the base for all current projects. But Ryan built it to satisfy his requirements, which don't necessarily meet with our requirements 100% of the time. When I create complex forms I use css grid and flexbox with custom styles to achieve the necessary front-end layout -- I don't allow user access to any back-end forms. Custom javascript is sometimes required to validate some form elements client side, including ajax calls, but it is nothing major. Also, I don't have to bloat my forms by including one or more third-party javascript libraries. If I receive a request for a simple form such as a contact form, then yes, I use the ProcessWire way. Otherwise, I find it much simpler to do it the old-school manual way.
  8. Hello @umesh and welcome to the forum. There are a few topics covering remote storage or assets/files here, here, and here. The latter discussing a module. Hope this helps.
  9. The config->paths->root also contains the current process as part of the path. For example, if you are currently within a custom process module named 'widget', then the returned path is '/path/to/docroot/widget/'. You could use a combination of string functions with DOCUMENT_ROOT, CONTEXT_DOCUMENT_ROOT, and SCRIPT_FILENAME values to validate the directory. As far as I know, the script_filename value is not vulnerable so should provide a base from which to test and extract the doc root with some confidence.
  10. Hi @August, The way I limit pages to users is setting the $page->created_user_id to the $user->id. Then my selector to retrieve pages is based on the created user id matching the currently logged in user. Hope this helps. Just thinkin' out loud.
  11. Wow! Thank you! I was hoping for a suggestion where to look, not a complete working example. That is the cool thing about you, @Robin S, you are always above and beyond anyone's request for assistance. Much respect!
  12. Ok, apparently the term 'PATH" means the complete filespec (path + file). I still cannot get the allowedPath parameter to accept any entry. It always uses /site/template. I did however get this to work by providing the filespec as the first parameter. So from my first example, $file = "somefile.php"; $path = $this->wire('config')->urls('siteModules')."myModule/includes/"; $filespec = $path . $file; $result = wireRenderFile($filespec); return $result; works just fine, so I will mark this topic as solved. Can anyone reproduce this behavior? Just checking to see if this is a bug or my stupidity. ?
  13. The error is thrown from the wire/core/TemplateFile.php:171'/site/templates/somefile.php'. line 170 public function setFilename($filename) { bd($filename); // Shows invalid /site/templates/somefile.php if(empty($filename)) return false; if(is_file($filename)) { $this->filename = $filename; return true; } else { $error = "Filename doesn't exist: $filename"; if($this->throwExceptions) throw new WireException($error); $this->error($error); $this->filename = $filename; // in case it will exist when render() is called return false; } }
  14. I thought so as well. I tried with both urls and paths. I get the same error stating templates but tracy shows the path is correct.
  15. Howdy! I've been exploring using the wireRenderFile() function in a test module. I keep getting one error or another depending on how I attempt to render the file. According to the api doc one of the default paths is /site/modules/. In this directory I have my module, which has a sub directory for files to be rendered as needed. $file = "somefile.php"; $path = $this->wire('config')->urls('siteModules')."myModule/includes/"; $result = wireRenderFile($file, array(), array('allowedPaths' => "$path")); return $result; // Error: Filename doesn't exist: ***/site/templates/somefile.php It appears that wireRenderFile is not accepting the allowedPaths option. Tracy dump shows $path = ***/site/modules/myModule/includes/'. Any ideas on what I am overlooking? See last posting.
×
×
  • Create New...