Jump to content

adrian

PW-Moderators
  • Posts

    10,902
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. Genuinely curious on their reason for this - seems like the opposite of what most people would want.
  2. I would try the session fingerprint config setting. Start by setting it to false and if that works you can try to make it more secure after that: https://github.com/processwire/processwire/blob/36984e4a057268b7a45b848e1b3b6ee757583459/wire/config.php#L241 Obviously make the change in your site/config.php file, not the wire one I pointed to.
  3. Nice work! Just in case you would find it cleaner, you can use this version in your site/init.php file rather than setting up an actual module. Sometimes this approach is nicer than having lots of different little helper modules. $this->addHookAfter("ProcessTemplate::buildEditForm", function(HookEvent $event) { $languages = $this->wire('languages'); $template = $event->arguments[0]; $form = $event->return; $field = $this->modules->get("InputfieldText"); $field->attr('id+name', 'seo_rules'); $field->attr('value', $template->seo_rules); if($languages) { $field->useLanguages = true; foreach($languages as $language) $field->set('value' . $language->id, $template->get('seo_rules' . $language->id)); } $field->label = $this->_('Seo rule'); $field->description = $this->_('If you want to add a custom rule to MarkupSEO'); $field->notes = $this->_('To define a variable use {title} syntax'); $form->insertAfter($field, $form->tags); $event->return = $form; }); $this->addHookBefore("ProcessTemplate::executeSave", function() { $template = $this->templates->get($this->input->post->id); $template->set('seo_rules', $this->input->post->seo_rules); $languages = $this->wire('languages'); if($languages) { foreach($languages as $language) { $template->set('seo_rules'.$language->id, $this->input->post->{"seo_rules__$language->id"}); } } });
  4. I know this is a Reno thing in general, but I wonder if AoS could get rid of the large page titles and put them back in the breadcrumb like they are in the default theme - it just seems like such a waste of vertical space. vs
  5. Thanks again @Robin S - seems like you have looked into this a lot more than me I see now that the sort field in the field is actually correct, but as you said, is not available as a property from the API.
  6. I am not sure exactly what you want to do, but if for example you want to show the 10 most recent posts with their titles and summaries, I would use the selector to get the pages/posts as the children of the Posts parent, so something like this: foreach($page->children("show=1, limit=10, sort=-published_date") as $post) { // output $post->title, $post->summary etc for each post } Is that what you are looking for? BTW, I would use the key of the "show" options field, rather than the label, but it's really up to you.
  7. Apparently I do that without realizing it Thanks for removing the shift hotkey - the ALT+d is good to know.
  8. Wow - you are completely right. It's so weird that the sort db field for the page table field just matches the sort value of the actual pages. When you re-order the entries in the page table field it seems to recreate all the rows in the new order, but without changing the "sort" field value. I wonder if this was intentional or an oversight?
  9. I think you should deal with it now. Take a look at the "modules" database table via PHPMyAdmin (or similar) and see if there are in fact more than one entry in the class field/column for ProcessLogger. You should probably just be able to delete one of them to remove the error, but I would like to know why it happened in the first place. Was this a completely fresh install with a new empty database?
  10. I don't mind it auto-focused on the modules/templates/fields pages, but on the page edit page where there are other fields it suggests that you need to do something in it first. Perhaps it would even be ok auto-focused if they search icon was still displayed so you knew what it was for. On a related note, I am having some frustration with the search box in the Reno compact header autofocusing (or triggered by some key action - I am not sure). I am noticing when using the Tracy console panel and strangely often when I type $page->field etc - it gets to "$page-" and then the cursor moves to the search box and the ">field" end up in there instead. Is it me, or something that can be tweaked?
  11. Yeah, this is what I get where "items" is the name of my pagtable field.
  12. Both of these will find the same pages: $pages->find("show=1")); $pages->find("show.label=CTRL Daily");
  13. You should be able to use the built-in "sort" field exactly the same way.
  14. Sure - perhaps you could show me the code you have so far so it will be easier to modify to add the sort value back in.
  15. Something like this: foreach($page->children() as $child) { echo "<p>{$child->title}</p><p>{$child->text_area}</p>"; } You can also use a selector in the children() method if you want to limit which child pages are shown, or to sort them, etc.
  16. You need to set the "sort" property of each item, so if you keep track if their initial sort value you can set them manually when you add them back in.
  17. Looking at the filter box, I am not sure it should be automatically focused. While this might seem nice, it removes the search icon, so it's actually hard to know what the input field is actually for. This is probably most important when editing a page with a Profields Table field on it. As a site editor I am not sure I'd know what to do with that input box. Also, on the issue of Table fields, if you have more than one on a page, the filter box filters all the fields. I am actually thinking that it might be best to remove the filter box altogether for Table fields because the latest version supports pagination and has its own filter functionality that works via ajax across all paginations, which of course your filter box doesn't do. The same could actually be said for for Listers - is there much point having the filter box when it only filters the current page of results?
  18. Here are the details on multi-instance setup: https://processwire.com/blog/posts/multi-instance-pw3/
  19. Yeah, it won't work if you have it in the loop because it will delete the image you added in the last loop. If you simply want to prevent doubling of existing images by filename, you can do something like this whereby you check to see if the image already exists. if(!$product_page->images_product->get("name={$image_name}.jpg")) $product_page->images_product->add($image_path);
  20. Is this what you are looking for? $product_page->images_product->deleteAll();
  21. Thanks @tpr - that last round of fixes really helped with the side menu. Something I just noticed. Does this layout with the compact header look as intended? It seems a bit weird to me - the tabs are no longer tabs. Same thing happens on the templates pages as well.
  22. That shouldn't happen - I wonder if it's a browser autofill thing perhaps?
  23. Sorry - i just noticed that unchecking the "Enable module" button is not turning off all features. As one example, the template edit button in the page list actions still appears. I am also having a little trouble with the automatically hiding sidebar in Reno - if you have opened a submenu, when you move the mouse away from the menu, the main sidebar slides away, but the submenu is still shown. Also, when I check the "One-line sidebar menus" option there is space between the main and sub menu which results in a flicker when moving between the two. I actually don't know what this option is supposed to do?
  24. A little more feedback. I like the Reno compact header, but you lose the ability to collapse the sidebar. I think in reality as a superuser I would never collapse the sidebar, but I think I would prefer most editors to not see the sidebar by default - it might be nice if they could show it if they want access to the Add New/Find/Recent menu items, but I think most don't ever use those, so I think that their initial view should be no sidebar. Would it be possible to make that configurable? I think if I had that (and the submenu auto-hide like I mentioned above) I would be sold on Reno as the default theme for everyone. I know I have said it once already today, but I really am stoked by just how different AoS makes the experience and the look of the admin - thank you! One more thing - I eluded to it earlier today, but any thoughts on implementing something like this: https://processwire.com/talk/topic/7653-module-adminthemecustomizer/ - I'd love an easy way to theme the admin to a client's color scheme!
  25. I think I saw the same thing - they appeared in the Modules > Install submenu though. Is that the same for you?
×
×
  • Create New...