Jump to content

bernhard

Members
  • Posts

    6,062
  • Joined

  • Last visited

  • Days Won

    295

Everything posted by bernhard

  1. I've created a little module for that: https://processwire.com/talk/topic/13064-inputfieldfile-image-sorting-autosorting/
  2. proud to share the release of a little handy sorting module for image and file fields (edit: some bugs in the screencast that are already solved) the autosort option can be set in the field-admin: Caution there is some work planned on the images field, so this may break the functionality of this module. have this in mind. github: https://github.com/BernhardBaumrock/InputfieldFileSort module directory: http://modules.processwire.com/modules/inputfield-file-sort/ changelog 1.0.0 initial release
  3. had this issue today with my vagrant scotchbox and found this solution: https://github.com/scotch-io/scotch-box/issues/124 maybe of interest for someone
  4. you are right, though it would have to be either version 2.6.7 or 2.6.8 because before 2.6.7 there is no hooking via ready.php
  5. sorry adrian for being late - there was too much going on in this thread so i set notifications to weekly... the simplest solution would be to send a get request like this: some errors: https://validator.nu/?doc=https://processwire.com/talk/&out=json valid: https://validator.nu/?doc=https://processwire.com/&out=json maybe parse this json and set the color of the panel to green = valid, orange = warnings, red = errors and a link to the validator report. nothing more needed, i think
  6. hi robin, as simple as this: (put it in your /site/ready.php file and adjust to your needs) $this->pages->addHookAfter('added', function($event) { $page = $event->arguments[0]; if($page->template != 'your-template-name') return; $page->setAndSave('title', 'my page - ' . date("YmdHis")); }); set page name format for children to something like Y/m/d H:i:s and set title to locked
  7. basically i support this request. i've come across this problem several times and wished there was a better solution. it was also requested here: https://processwire.com/talk/topic/7347-grouping-fields-within-admin/ (and maybe more often...) i think there are several cases where this could be very useful: SEO is one example, facebook could be another one: assume you build a catalog of different content types (boat, car, tshirt, whatsoever...). all those content types are different templates and need different fields. ok, now what if you want to add some kind of facebook share info to each product? you need fields like "ogimage, ogtitle, ogdescription" and you would have to add those fields to EVERY template... the actions tab makes it a little bit easier for you, but if you want to put all of them in a fieldset you have to click around A LOT you could put everything in one template and do some showif things, but that would lack access control and some other stuff (for example if you want edit access for user A only for products X, Y, Z and B for 1, 2, X) what if facebook decides to add a new tag "fancynewtag"? you would have to do everything again. i think in such cases it would really be great to have kind of fieldgroups that you can add to your templates like single fields and that reflect such kind of "global" updates. now it would be as easy as: create field "newfancytag" add this field to your fieldgroup "ogtags" all your templates are updated automaticalle (in other words: are not changed, but the fields appear in the processpageedit interface) hmmm... an idea coming to my mind: could this somehow be accomplished with the runtimemarkup fieldtype? similar to this: https://processwire.com/talk/topic/10804-module-runtimemarkup-fieldtype-inputfield/?p=114190 @steveooo did i understand you correctly?
  8. hi cb, i think addhookafter "saveReady" should be fine. and just set the values, the save will take place afterwards: // change this $page->setAndSave("title", $page->page_quote->title); // to that $page->title = $page->page_quote->title;
  9. hi guys, bringing up a very old topic here... i wonder why the only 2 topics on cloudflare are this one here and that one: https://processwire.com/talk/topic/8324-thanks-for-procache-and-aiom/ the free plan sounds great for many projects. has anyone of you ever experienced any drawbacks? it seems to me that PW + ProCache + Cloudflare (including free SSL) should be a really easy and good setup? looking forward to hearing your opinions
  10. I know this behaviour and I've accepted it long time ago and thought it was a good solution. Reading your post now (it's not the first time that this topic pops up) I think maybe it would be even better to have the trash button and have an option to "undo/restore" that action for a limited time. That's how Google does it at gmail and I have to admit that I have used this feature not only once Though I also have to say that I think ît has priority 500...
  11. That looks strange... Does anybody know why lostkobrakai's solution does not work?
  12. thank you lostkobrakai, just tried it and it is a really nice tool! also interesting blog post about quiz duell im ersten: https://stormforger.com/blog/2014/05/27/load-testing-an-interactive-tv-show-with-over-1-million-users/
  13. I've played around with this a little bit and want to share some results: manual import/export seems to work quite well (never used that before) and most of it should be possible to automate. it becomes a little tricky when you delete fields or change the fieldtype or the like. deleting fields would be the easier one because it would leave the field untouched on field import, remove the field from all the templates that have used it before (you would have to make this step manualle before you can delete the field on your "master" pw instance) and after the import see if there are fields not used by any template and delete them. changing ckeditor field "body" to text worked. changing it back to ckeditor did not work. first, it asked for a second commit (could be hard to handle in a script?): (see the message on top of the screenshot) and even then it did not replicate the change @john i don't want to get offtopic here. am i talking about what your intentions have been?
  14. another reason could be that you setup 2 vagrant machines to test import/export of fields and forgot to give them different ips, so you have different hosts, 2 machines but in fact only one served website (one working, one giving the httphost error)
  15. hi john, that would be absolutely awesome! it would open up a lot of possibilities and could solve an often discussed problem with pw of having different live/production states of a site. see for example this post (and above example of lostkobrakai's update script): https://processwire.com/talk/topic/12383-developmentstaging-of-processwire-site/?p=115027 if we could outsource the config of all the templates and fields to files and then synch them to github or even update a site like this via github commits that would be great!!
  16. hi slave, welcome to the forum. you can use the code of my TemplatePreviewImages and adjust the following lines: https://github.com/BernhardBaumrock/TemplatePreviewImages/blob/master/TemplatePreviewImages.module#L63-L76 should be quite simple, good luck
  17. Of course... I don't use lots of them so I didn't think of that
  18. hi adrian, what do you think about integrating a w3 validator into the tracy bar? i was thinking about implementing this as a little module, but i think it would even be better to have this as an option built into tracy. or is it a gain a feature that's already covered anywhere?
  19. hi surffun, of course this is possible. see the docs for all the options: https://github.com/somatonic/MarkupSimpleNavigation#markupsimplenavigation-116 // you need this line only once $menu = $modules->get('MarkupSimpleNavigation'); // your main menu echo $menu->render(array( 'outer_tpl' => '<ul class="show-only-on-big-screens">||</ul>', // all other options here )); // your footer menu for mobile echo $menu->render(array( 'outer_tpl' => '<ul class="show-only-on-small-screens">||</ul>', // all other options here )); and then you can hide/show the menu by defining css rules for the classes "show-only-on-small/big-screens": http://www.w3schools.com/cssref/css3_pr_mediaquery.asp
  20. @horst if that kind of full res images are really needed i would present lower quality images and make a link somewhere "show/download full res image", don't you think? @chris have a look at the docs. all the options and what they do are well explained here: https://processwire.com/api/fieldtypes/images/ edit: my example creates a new image with maximum dimensions of 1000px (height OR width) and keeping the original aspect ratio 3000x2000 would get 1000x666 2000x3000 would get 666x1000 500x500 would get 500x500 (see option "upscaling")
  21. that's why i said "just kidding"... i thought that would be enough justification for such a statement on an off-topic forum...
  22. yep, that was my educated guess...
  23. must be a lonely world outside without jquery... just kidding did some basic testing and liked it! would fit very well in my next project...
  24. ok. got some news on this - i did some very basic tests the tests were performed on my live server, so there are 2 things to mention: 1) if you test your server you may check back if your provider does allow that 2) i had some normal traffic an my vps, so that may has influenced the tests, but it is accurate enough for my purpose test setup: jmeter VPS with 2GB ram and shared cpu website: very basic website, actually just html with not much php/mysql requests period: 60 seconds regarding to my first post i was interested in the performance @ 200 page impressions per minute. results: 200 users, cache OFF 200 users, template cache ON ### ProCache ON ### 200 users 2000 users 5000 users 0% error rate in all tests trying 10.000 users i got some problems (100% cpu load on my local machine, no response from jmeter...) don't know why there is almost no difference between template cache ON/OFF but no time for further investigation on this for the time. i guess it is because it is defacto only a basic html page with no PW fields. as i should have almost only cached requests on my site there should be really no problems as long as i do not get much more than 2000 requests per minute and that is more than 10 times as much as i need
×
×
  • Create New...