Jump to content

joer80

Members
  • Posts

    356
  • Joined

  • Last visited

Everything posted by joer80

  1. Has anyone tried to share a login with a wordpress install? So if you logged in with wordpress, you would also be logged into processwire? Thanks!
  2. This capability would directly impact how many of my projects I do in Processwire and how many I do in Oxygen/Wordpress/ACF. I am currently only using Processwire for things that will make heavy use of the API for very custom projects, and using Oxygen for all projects that are design/marketing/brochure heavy. Its just so much faster to see changes as I make them. This is what I would like to see, working backward from the user side to the tech side. When I edit a page, as I am changing fields, if I change a text box or a drop down or a range slider to change a heading font size, my page preview is updated as fast as possible, so I can see what that new heading size looks like on the page. As soon as the field is changed, it adds the change to a change history list that I can use to roll back edits I don't like without needing to remember what changed. Next, when I am ready for the user to see my changes I have made to my draft version of the page, I can hit a publish changes button to make my draft version replace the live version of the page. I am assuming editing the page in this live preview mode would need to make a new copy of the page that would replace the live page if you save it. Right now, I must save after every font size change to see if it works, and it doesnt remember how far down the admin page I was, so I must scroll all the way back down to that field and change the size again and hit save again and switch tabs again. Its not a great experience. These changes would be great!
  3. What is the best way to get datetime field as the unix timestamp? (Not formated) I am grabbing the formatted date and putting it back to a unix timestamp and figure, it would be better to just grab the unformatted data! $s = strtotime($location->location_message_start); Thanks!
  4. Does anyone know if it is possible to show more pages/links in the admin page tree before it shows more button? Thanks!
  5. This got me where I needed to go! This is what I did: $wire->addHookBefore('ProcessPageLister::execute', function(HookEvent $event) { if($event->page->process != "ProcessUser") return; $lister = $event->object; $lister->defaultSelector = 'name%=, firstname%=, lastname%=, email%='; });
  6. I know, it's really a pretty big deal. It makes it hard to reuse things.
  7. Is there a way to change the default user filter? Instead of name and roles, I am interested in it being First Name Last Name. Thanks!
  8. In the past, one of the primary functions of a page builder would be just to implement things like flexbox, so you could have child divs stack vertically or horizontally, or align child items vertically or horizontally, or whatnot, but now the new thing is to provide a third grid option, as an easy to use front end for handling things with CSS Grid. Check out the way oxygen just introduced CSS grid controls. I think we should do something similar in our approach. https://oxygenbuilder.com/2021/02/23/oxygen-3-7-now-available/?mc_cid=9b6f18191d&mc_eid=c2de8efb6e
  9. I dont think anyone here is wanting gutenberg. Take a look at this video. Its basically just the PW backend in a side window instead of full page so you can see what you are editing while you are editing. That way you dont scroll down to a box, save, get shot back up to the top, switch tabs, hit refresh. All that is wasted time. You just edit the box and see the changes. Now, once the editing experience is updated, I think it would be nice to be able to have 2 sets of children for each page. One for the page path/child pages/url, and one for the design rows/sections on that page. So the tree would have a page path mode, and a page design mode that shows children of the page, based on the mode you are in. In the design mode, children of that page would be rows on the page, path mode would be child pages. ie. When I edit a Category page in path mode, maybe it has a text field for Page Title and Page Description, which have nothing to do with design, and its children are the products in that category. If I edit that same category page in page design mode, the first child page is called Intro Section, and has fields for design related settings for that row. I think this would be the best approach becuase the api would have a clear support for adding fields for both view modes, but not force anyone to use anspecificic front end framework or theme. It would be nice to have a slider field time for font sizes.
  10. I know some things I have struggled with in the past is exporting fields from one website to another to jump start a project, and option fields can't be imported in. I have to go to each of, say 20 fields, and manually copy and paste all options in for all of them. When I am working in a page backend in one tab, and have another tab open with the front end to see my changes, I can save the backend tab, and instead of staying where it is at, it shoots me to the top of the page. This isn't great. Would prefer it to stay there so I can tweak, save, tweak, save. Most other backend system I don't even need to hit save as changes I am making are live, but this is a step in the right direction! Also would be nice to have a way to not have to switch back and forth between tabs. Getting live editing would be even better! I even purchased the plugin for this and wasn't a huge fan of it.
  11. I have a client that wants to make all links on a CKeditor field open in a new window and not have to check the attribute in the checkbox. Is there a way to tell it to default to this?
  12. I have been working on a way to layout the files in my template folder that allows people to have more than one theme per website, and better organize the template files and pages, and this is what I came up with. What do you guys think? Has anyone done anything similar? File Layout: /templates/ _init.php. (includes and variables you want all pages to access. I put setting('theme', 'kick-off-news'); to define the active theme.) default.php (Template files can be told to use this for default behavior, or you can clone its contents for more control. I haven't needed to yet.) What is in the default.php file: <? namespace ProcessWire; //sitewide variables and/or functions. ie. Define setting('theme') as active theme. include('_init.php'); //The default temmplate can use the default HTML for the active theme $templateFilePath = $config->paths->templates . 'themes/' . setting('theme') . '/default.php'; //Render template file for the active theme echo $files->render($templateFilePath); ?> /temlates/themes/ (Holds all theme folders.) /temlates/themes/kick-off-news/ Here is what I am putting in the theme folder: /content/ (This has content subfolders for organization. ie. I did /by-page/ and /by-template/. (folders can be autoloaded from page path and template name.) /includes/ (Used for code that will be included across templates, like navigation.) /css/ /js/ /img/ default.php (You can clone for more control if needed, but I have not need to.) Below is an example of what could be in the /temlates/themes/kick-off-news/default.php file. <? namespace ProcessWire; ?> <!DOCTYPE html> <html lang="en"> <head> <? include('./includes/head.php'); ?> </head> <body> <? include('./includes/topAd.php'); include('./includes/header.php'); include('./includes/navigation.php'); //Use selected homepage if no page path. if($page->path == '/'){ $pagePath = setting('home'); //active homepage path. ie /pages/home/ } else { $pagePath = $page->path; } //Load content file for this page if it exists if(file_exists('./content/by-page' . $pagePath . $page->name . '.php')){ include('./content/by-page' . $pagePath . $page->name . '.php'); } else { //Load content file for this template if it exists if(file_exists('./content/by-template/' . $page->template . '/' . $page->template . '.php')){ include('./content/by-template/' . $page->template . '/' . $page->template . '.php'); } } include('./includes/footer.php'); include('./includes/mobilenav.php'); include('./includes/bottom.php'); ?> </body> </html> The reason why I like to be able to select an active homepage is to be able to make another homepage, and flip back and forth on which one is active as needed. No need to copy any paste data, or upload files to another page after it is approved. I mainly only use one or the other, as far as page or template html goes, but I guess you could use both at the same time with a few changes. The advantage to using using one at a time is you dont need to check for a template content file if there is a page content file. If you want to be able to load both, you probably need to have them set output variables, and after they are both loaded, push the results out. Maybe an array with a priority key and html value and loop through the array after they both load. Was overkill for me though. How I did site Tree to organize and separate the pages from the news articles. I also think there is an advantage to this over sticking all template files in the same folder, as you can put related supporting files in the same group. A news category page sidebar can be in the same folder as the news category template. Or related news layouts are next to their parent file.
  13. So setting it manually with axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; worked! Thanks for all the help guys!
  14. So interestingly enough, my axios post by default has all of the cookies needed for the post to be done by the admin user, but it is not seen as an ajax request, so it will not continue if I force it to be ajax with if(!$config->ajax) return; This is how I am doing it. methods: { processForm: function() { //event const self = this; //so .then can access outside this. axios.post('/post/', { pageID: this.pageID, text_heading: this.text_heading }) .then(function (response) { if(response.data == 'success'){ UIkit.notification({ message: '<span uk-icon="icon: check"></span> Changes saved.', status: 'success', /* primary, warning, danger */ pos: 'bottom-right', timeout: 2500 }); } else { UIkit.notification({ message: '<span uk-icon="icon: warning"></span> ' + response.data, status: 'danger', pos: 'bottom-right', timeout: 2500 }); } }) .catch(function (error) { console.log(error); });
  15. Why is no one suggesting Invision Community? Its the forum software we are on right now.
  16. 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?
  17. 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!
  18. 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!
  19. This was very helpful to me! Thank you!
  20. 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!
×
×
  • Create New...