Jump to content

joer80

Members
  • Posts

    363
  • Joined

  • Last visited

Everything posted by joer80

  1. Why is no one suggesting Invision Community? Its the forum software we are on right now.
  2. So i was under the impression the axios post doesnt have the superuser cookie just because I did. Are you saying it would if I did?
  3. I started a proof of concept using vue to do live front end edits to processwire fields and have a question. I successfully bound the text field to the vue variable and used axios to send the post to my processwire page /post/ on save, but how do I secure this post page so others can not post edits to this /posts/ page? Thanks!
  4. If I pass in rich text content with <p> tags into $sanitizer->truncate(), it seems to strip out the p tags even if I pass in the keepFormatTags option. Can anyone else confirm? $s = $sanitizer->truncate($news_story->content, ['type' => 'sentence','maxLength' => 600,'keepFormatTags' => true]); Thanks!
  5. This was very helpful to me! Thank you!
  6. Would you consider adding an insert action to the collection panel? That way people can add children? I love this! Thank you for releasing it!
  7. I added a module for this that hooks on page save. Added an ace css text field for color coded markup and when I save, if that page has a css field, it creates the .css file on the server using a timestamp name. public function init() { $this->pages->addHookBefore('save', $this, 'updateThisPage'); $this->pages->addHookAfter('save', $this, 'makeMergeFiles'); } and something like $myfile = fopen('../assets/css/' . $newAssetFilename . '.css', "w"); fwrite($myfile, $allCSS); fclose($myfile); For some reason if I move a page it doesnt work right. Have to save it to fix, but it hasnt bothered me enough to research it. lol I usually add one to my template page, and the individual page and it finds all pages with this field and merges everything into one file. I do one for js also.
  8. Oh wow! That is really neat. I will keep that in mind. After taking the time to figure it all out, I am wondering now if in my situation it would just be better to keep the tree natural, and make a dashboard that you see by default after login, that groups the pages how I want them to be grouped. lol But this may be handy to keep in the mind in the future if I redo an existing website and dont want to do redirects and need that flexibility.
  9. Thanks @kongondo I think I have it. Ryans post helped a ton! This is not a live website yet so I am playing around with the tree layout, but I do see perks for this. This is the tree: Root - Pages - Posts - Services - Products - Menus So I wanted pages to be special in that for a page like /pages/about/, you could opt to use the short form /about/. This not only matches most websites you would migrate to processwire, but it is so clean and organized. Also, I wanted you to be able to have 2 homepages, and edit the root page and select which page you want to load as your active homepage. You could even make the blog or posts page your homepage with a click. After looking at Ryans code, I ended up turning on page segments for root and doing the below code in my root.php. //Allow pages to sit under root instead of under pages area. if($input->urlSegment(1)){ //might be 404 or a url directly under root. $realPage = $pages->get('/pages/' . $input->urlSegment(1) . '/'); if($realPage->id){ $page = $realPage; } else { throw new Wire404Exception(); } } else { //matched a page, no need to check for short link. //Set the root variable and page variable. (If on homepage, use the selected homepage instead) if($page->id == 1){ $root = $page; $page = $page->selected_homepage; } else { $root = $pages->get('/'); } } I also fixed the page path like this in site/init.php //If we are viewing the long path for a page, set the path value to the short version. (Pages live in /pages/) $wire->addHookBefore('Page::path', function($event) { $page = $event->object; if($page->template == 'page') { $event->replace = true; $event->return = "/$page->name/"; } });
  10. So what I want to happen, is if I visit /about-us/, it will load the /pages/about-us/ page as $page without the user seeing a redirect. Is that what this would do? Or would they get redirected?
  11. I have a page located at /pages/about-us/. Is it possible to write code that looks for it at /about-us/ before I throw the 404? I would like all children of pages to check this way. Not just this one. Thanks!
  12. The FieldTypeDecimal module worked to allow people to enter cents! Do you think this should be in core or if we should allow the core float field to do this? I would think entering money would be very common?
  13. Its for the backend. People are entering money that I want to be sortable on the front end and it is odd to enter money into the backend and not have the option for 2 decimal spots.
  14. Is it possible to have a float field not drop an ending 0? Thanks!
  15. I would like a profile that allowed a front end edit ability, similar to what divi does on wordpress. I want to try and work on one, but it will be a bit before I can.
  16. Because of pixel doubling, they really need to do a 27" 5k display. That way there is no scaling blur. 4k for windows is fine though. New mac pro is too much for 99% of everyone. I wish they would have done a tower for us. I feel like the new mac pro is mac enterprise and they still need to do a pro.
  17. That helps! It sounds like I need to get access to their Azure Active Directory and not their 365 account. Thanks!
  18. They use office 365 online for email. Is that enough or do I need to launch a vm with azure?
  19. Has anyone used a single sign in module or done code to allow users to login with Office 365?
  20. I dont think I have it down yet. I really think a page builder needs to live update while you change fields to be competitive with things like DIVI and Beaverbuilder and Elementor. This is what I am working on with vue. I am just looping through all fields attached to the page and making vue form fields that have 2 way databinding. So when you type new text in, it changes as you type. Or if you hit center text, it centers it instantly. I am using the REST API plugin to push the page data back to the database when you hit save. I plan on releasing the site profile to the community when I am done. It should be better than the above wordpress solutions as they are very hack solutions. You can not, for example, add any element inside a tab module or an accordian. You can only type manual code into their rich text. With mine, I can add a grid with columns or really anything inside anything.
  21. If you are concerned about the total number of fields in the profile, any template that uses a text align field can use the same text align field. ie. Text, blurb, sections, etc. I think it is a necessary add to have a page builder. If you are concerned about it slowing the page load down, it doesn't seem to. I don't have caching enabled and it is snappy. Turning template caching on removes the issue even if there is one. I could get by with just one text align field, but I like having one for small screens and one for larger screens. That way I can make text center on mobile when the column stacks, but left align on desktops when they are side by side, without writing code. I think it is worth it. I still have a website that runs on a database less than 1 mb. At least until I import all of their blog posts. You could run the whole thing in ram.
  22. No, I create generic fields. Things like single_line_text1, single_line_text2, checkbox1, checkbox2, richtext1, richtext2. Then any page that needs one just pulls one in. The tabs I use are usually Content, Design, and Advanced. Not many fields at all.
  23. 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 don't like how it doesnt give you live preview though, so I am playing with vue to do this.
×
×
  • Create New...