Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. Just click on the filename in the backend. It's a link to the file / image.
  2. Sure, but the bottleneck is between user and internet (opera turbo servers are internet, too). So this won't speed up anything on the upload.
  3. Opera turbo only improves download and not uploads. Uploads would only get slower. internet -> big data / fast -> opera (improvements) -> smaller data / slow -> client client -> big data / slow -> opera (improvements) -> smaller data / fast -> internet client -> big data / slow -> internet
  4. Imagine following page-tree with a field "speed" on all pages: - beachbuggies ( speed = 50 ) - buggy #1 ( speed = '' ) - buggy #2 ( speed = '' ) - buggy #3 ( speed = 60 ) Now buggy #1 and #2 will show a (max) speed of 50, which is inherited from the beachbuggies group, while buggy #3 will show a speed of 60.
  5. Schema.io provides the backend for everything shop related, everything else would be managed in processwire's backend. In the template files you'd use both api's to create the whole website.
  6. You can hardly change the internet connection of your customer, so your options are only those two: - Up the max_execution_time of php, so it's long enough to receive the full files. - Use every possibility to get the image smaller on the customers side before the upload.
  7. And most importantly, it works in the admin as well. So users aren't confused to see empty fields in listers and so on.
  8. This should normally work ok, but to answer the question, the password salt is in the site/config.php and nowhere else.
  9. There are various topics in the forum about importers. The only thing different in really "mass" creation is that you need to be aware of timeouts / memory_limits and batching things before you hit them.
  10. I just wanted to share a small module I just made, that can inherit values from pages, that are higher up in the page tree. This inheritance will only show for formatted output, so for example in listers or in the frontend. When using the unformatted value one will see, if a field is really set or not. <?php class FieldtypeInheritInteger extends FieldtypeInteger { public static function getModuleInfo() { return array( 'title' => 'Inherit Integer', 'version' => 101, 'summary' => 'If empty tries to get values of the same field from further above the pagetree. This does only work for formatted values so empty values won\'t ne overwritten by editing a page.' ); } public function ___formatValue(Page $page, Field $field, $value) { if(!$this->isEmptyValue($field, $value)) return $value; $parent = $page->parent("$field!=''"); if($parent->id) return $parent->getFormatted($field); else return $value; } public function ___markupValue(Page $page, Field $field, $value = null, $property = '') { return $this->___formatValue($page, $field, $value); } }
  11. Exactly like you did mention it: $this->pages or wire('pages').
  12. I'm not sure if that's a Lister issue, but by default the pages should really be sorted by "sort" and not "-modified", which makes less sense in the module's context. Edit: It would also be nice if there would be a way to exclude some fields (e.g. mode) from the new save-reminder functionality.
  13. The foreach does already give you $item, no need to retrieve it again.
  14. public function afterSaveReady($event) { // Get the soon to be saved page object from the given event $page = $event->arguments[0]; // Sample condition and changes if($page->template == "myTemplate" && !$page->isTrash()){ $newSortedPages = $page->itemsList; foreach($newSortedPages as $sortPage){ // insert snippet to save new sort value } } }
  15. Textformatters are meant to work with every textual input field out of the box, so yeah, just don't use it where you don't want it.
  16. May I ask, why you're not simply using the option to rename the "Children" tab to "Item List", where you can sort the children directly without detour? But You can surely do it like that as well. Create a hook like this one, but use Pages::saved instead of saveReady: https://processwire-recipes.com/recipes/extending-page-save-process/ Get the fields data and use some of those snippets to save the new sorting: https://processwire.com/talk/topic/3378-move-and-sort-pages-with-the-api/?p=33241
  17. I doubt this module was created with multilanguage capabilities in mind and it won't turn other languages active by itself. Just loop over the created pages and activate them with this snippet: https://processwire-recipes.com/recipes/activate-all-languages/
  18. See here: https://processwire.com/talk/topic/648-storing-module-config-using-api/?p=5241
  19. Leaving the url and returning a 404 status code will work from .htaccess, but leaving the url and showing the 404 website needs processwire to run. Therefore for that need you'd need to hook into pw to throw the 404 and not use any htaccess redirects.
  20. I never were good at htaccess rules, but my regex understanding does get better from time to time, so try this. RewriteRule ^en/(.*)$ /http404/ [R=307,L] RewriteRule ^se/(.*)$ /http404/ [R=307,L]
  21. You need to use the id, to make it work, e.g. "roles=1024".
  22. I'm not sure where you see that WP is so much different than PW from the user perspective, except maybe the initial Dashboard. It's neither themed like the frontend nor can it provide more or less than what's possible in pw and people seem to love it. The posts / site listings can be mimiced by listers, the plugin and settings area shouldn't be visible to less-permissioned users anyway (our fields/templates). The Design area is simply a page somewhere in the pagetree (there are various ways to get this special page in the navigation). I'm not sure about comments, as I don't use them, but I doubt them being handled overly different. Users are already shown in a lister. There's a page to edit the own profile. Additionally you can really limit your users down to the bare minimum they need to see. Hide pages, they don't need to edit, or even hide the whole pagetree and let them only use listers. There's a lot you can do there. And if some feature is really not present (dashboard) you can still look in the modules directory or code an own process module to resemble your needs. By now I did lot's those custom process modules and it's really not that hard to integrate own layouts / views into the backend with the cohesive styling it's providing. If you find that users cannot grasp what their changes in the backend do in the frontend there are various examples where people integrated the fredi module or links to the backend. So people can decide in the frontend what they want to edit and from there go directly to edit it in the backend interface. When talking about "casual" users, who can edit their own content, but shouldn't know about a backend – that's 100% frontend – at least in my opinion. It's part of the service you offer the user. This can look like a "backend" but you're really better of not trying to integrate that in any way with the real pw backend. Just code it like any other frontend-part and use the api. Think about when the code of the backend would change a bit. Suddenly your users cannot edit their content anymore. That's not what you want.
  23. I didn't remember you posted about this already, otherwise I wouldn't have open another topic about it. https://processwire.com/talk/topic/10751-ala-love-your-cms/
  24. @pwired. You can find out about these things, when looking into the wire/core (and wire/modules/) folders. These classes are just things the core itself uses and are not providing an "api" like $page or $pages. About the length of the snippet: Even raw php wouldn't need that much more lines to read from an mysql table.
  25. Totally right Christophe. Database is a core class like Page and $myDB is a variable like any other.
×
×
  • Create New...