Jump to content

bernhard

Members
  • Posts

    6,629
  • Joined

  • Last visited

  • Days Won

    358

Everything posted by bernhard

  1. Hi everyone, I'm proud to share my first fieldtype module and I think it's a quite handy one It helps you to create all kinds of table/matrix inputs very quickly and easily. You have loads of options for customizing your field via plain javascript. See the handsontable docs for that Please consider this module ALPHA until i got some more time to test it. Any help would be highly appreciated Numbers are for example always tricky. Different locale settings, different types, rounding errors and so on... Download: https://gitlab.com/baumrock/FieldtypeHandsontable Result: Installation/Configuration: Just install the Fieldtype, add a field to your template and set the handsontable options in the fields details. If you have InputfieldAceExtended installed you will also have code highlighting for your code: Get data: If you retrieve the data from the API with outputformatting ON you have some helper methods available: getData() + getRows() get all data of the field getRow($row) get one special row, eg getRow(1) or getRow("2017") getCols() get all data but by columns not by rows getCol($col) get one special column, eg getCol(1) or getCol("mycolumnheader") You can also access rowHeaders and colHeaders directly (see examples) Simple Example: Caution: the examples below are outdated! see this post:
  2. also check if your server is blacklisted: https://mxtoolbox.com/blacklists.aspx maybe you want to use a service for sending your mails: https://www.sparkpost.com/pricing/ (free for < 100.000 mails / month)
  3. Hi, just stumbled over a little module that i built for my last project. it helped me to test performance of my rockdatatables module to generate 3000 random json datasets and i want to share it with you. maybe it saves some time for someone. https://gitlab.com/baumrock/RockDummyData/ easy example: $rdd = $modules->get('RockDummyData'); for($i=0; $i<15; $i++) { // this has to be inside the for-loop to always get a new dummy $dummy = $rdd->getDummy(); echo date("d.m.Y H:i:s", $dummy->timestamp) . "<br>"; } more advanced: $json = new stdClass(); $json->data = array(); $rdd = $modules->get('RockDummyData'); for($i=0; $i<3000; $i++) { // this has to be inside the for-loop to always get a new dummy $dummy = $rdd->getDummy(); $obj = new stdClass(); $obj->name = $dummy->forename . ' ' . $dummy->surname; $obj->position = $dummy->job; $obj->office = $dummy->city; $obj->color = $dummy->color; $obj->start_date = new stdClass(); $obj->start_date->display = date('d.m.Y',$dummy->timestamp); $obj->start_date->sort = $dummy->timestamp; $obj->salary = rand(0,10000); $json->data[] = $obj; } echo json_encode($json); you have to store your random datasets on your own into the /data folder. there are several services for creating all kinds of random data on the web - if you know one service that allows sharing those datasets let me know and i can include common needed data into the module
  4. i recently found one very nice solution that would even be free for 1 "operator" and that has an API and is abased on PHP & MySQL so it should perfectly fit with processwire: https://www.livezilla.net/features/en/ so we would have a live-chat AND helpdesk in one place. and it should be quite easy do create a processwire module that creates a widget on our clients sites where they can report issues in the way WE want (with custom forms and the info we need). it would just have to create a ticket via the api and we could manage all the tickets in one place for all our customers. i didn't try it until now, but if anybody wants to give it a try i would be interested in the results
  5. thank you macrura but the hash feature is not working in panels as i stated above anyhow - one click more than needed is ok for my client. thats nothing with priority so far. just wanted to throw in this idea and i'm happy if this finds it's way into this module. if not sooner, than later. totally fine for me i'm sure it would not be a big addition t edit: added a PR (quickfix) on github to support query strings like /?docs=my-single-docs-page taking the pagename of the docs page as parameter
  6. thanks for mentioning me here mr-fan but i don't think my module would be a good solution here. its only intended to display data (like lister and listerpro do) but with a lot more customization options (like different renderers, eg rendering timestamps as dd.mm.yyyy but sorting based on the unix integer etc) i recently worked with chart.js (pulling data from my datatables module to have live filtering and sorting and see details that the chart hides because it shows only accumulated data). its very easy to use! you only have to provide a data array and set the options and thats it. some snippets may help to get an idea: var soll = { label: 'Controlling', data: getDataKum(goals[chartname]), borderColor: 'black', borderWidth: 1, borderDash: [10, 5, 2, 5], backgroundColor: 'rgba(0,0,0,0)', }; var ist = { label: 'IST', data: getDataKum(getIstData(chartname)), borderColor: 'green', borderWidth: 1, backgroundColor: 'rgba(0,0,0,0)', }; // chart data var data = { labels: ['jan', 'feb', '...'], datasets: [soll, ist], } // draw chart // this is inside a loop to draw 4 charts with the same settings // [...] $el = $('#'+chartname+'_chart'); charts[chartname] = initChart( $el, data ); /** * chart initialisation draw */ var initChart = function($el, data) { var myChart = new Chart($el, { type: 'line', data: data, options: { scales: { yAxes: [{ ticks: { beginAtZero: true } }] }, elements: { line: { tension: 0 } }, tooltips: { mode: 'index' }, }, }); return myChart; } getDataKum() just returns an array of values. you could also just provide a static array via $config->js, for example: // php $config->js('mysampledata', [1, 2, 3]); // js var myChart = new Chart($el, { type: 'line', data: ProcessWire.config.mysampledata, [...] }); happy charting
  7. I read my post again.. Sorry for being too short and unclear. My situation is that I want to place some links to the docs in several places of my custom process modules (eg in field descriptions or the like). That means I don't have the page editor and thus no help tab. I can easily link to the docs process page but then all help sites are visible. That's not what I want. I want to link directly to ONE help topic. Bea's solution with the anchor tags does not work in modals because the modal does not open the link at the intended position. And it would be better to have only the intended topic visible in this case in my opinion. I hope you understand what I mean now?
  8. hi @Macrura thank you for your efforts on this. it's similar to what i was up to do on my own. do you think it would be possible and not too much effort to have doc-pages available via urlsegments? the problem with the # tags is, that it does not work in panels. or at least i don't know how it would be nice to be able to link to the docs via links like this: <a href="/admin/setup/admin-help/myhelptopic?modal=panel" class="pw-panel">help for myhelptopic</a>
  9. thank you @Robin S and @tpr - the last update fixed my repeater-image-problem
  10. sorry for my late reply! your fix didn't work for me. curious if it helps vmo...
  11. i came across this issue on PW 3.0.63 i did some testing and it seems that this issue is not fixed with @Zeka s solution. it is still not working for squared images! see this tests: i changed the function to @Robin S suggested fix and it works: /** * Return an image no larger than the given width and height * * #pw-group-resize-and-crop * * @param int $width Max allowed width * @param int $height Max allowed height * @param array $options See `Pageimage::size()` method for options * @return Pageimage * */ public function maxSize($width, $height, $options = array()) { $defaults = array( 'upscaling' => false, 'cropping' => false ); $options = array_merge($defaults, $options); return $this->size($width, $height, $options); } works also with smaller images using upscaling => true and cropping => true
  12. hi falk, the settings should be fine - actually you would not have to change anything after updating an old installation. do you have any other modules installed? try with a clean installation first. for example i had a problem with uploads recently because of a 3rd party module... good luck
  13. thanks for your answer. i tried it on a fresh install on my local dev and had the same issue. i created a zip of the installation so you can try: https://transfer.sh/eAZ7L/reptest.zip (8,5MB) admin url /processwire admin admin! test tprtest1!
  14. hi @tpr i just found a bug when using latest version of AOS (just did the update from 1.4.1 to 1.4.6). it also existed in the later version. i have a repeater including an image field and an "editor" role with edit-access for the home-template (and all children). the problem is that the image in the repeater field gets uploaded and after reaching 100% disappears. i did some debugging and i found out the following: aos uninstalled: works aos installed: does not work (either enabled or disabled) upload as superuser works at all setups ajax error after fileupload: {"error":false,"message":"The requested process does not exist"} when i try to edit the repeater item directly ( /admin/page/edit/?id=1024&InputfieldFileAjax=1 ) in the admin i get this error: i hope i was clear enough with my informations so that you can fix this as easy as possible if you need more information just let me know! PS: regular image fields outside repeaters work as expected
  15. interesting... i just tried it with a phone of my friend, same result... both android and chrome my phone: android 6.0 + chrome his phone: android 6.0.1 + chrome will do some more testing soon
  16. hi ryan, first let me say thank you for that great addition!! it's always impressive how you not only integrate existing solutions but also improve them first tries on my laptop went very well. on my android phone i got this problem: original image: resize settings: resized on laptop (chrome): resized on android phone: any ideas what could happen here? i thought it might be better to post here than opening a github issue - maybe others could also try and share their results?
  17. awesome Looks really interesting! I'm impressed with how far you've taken this already. Is this a fairly common need? (chunked uploads). I'm not sure I've come across a case where I would have used this on a site before, but I imagine there are cases this could be a real life saver. i think this would be a great addition as well and would like to support lostkobrakai here. i already stumbled over this problem here: and it came up some other times as well: i ended up needing my client to upload everything via FTP or dropbox and pasting the links into a textfield. i wanted to develop a module that scans the directory and adds the files automatically to a file field but all of this is a really bad solution regarding UX. i almost had to build a video-platform once where this would also have been a very welcome feature. otherwise i would have had to use some 3rd party uploader with all the problems (different design, maybe opening security holes, ...). especially regarding security i would feel much more comfortable when having a built in solution rather than adding any 3rd party hack... ps: it may not be a very common need, but it can be a fundamental one
  18. Hi @ryan thanks as always for your work and all the progress! may i ask about one special feature here that lots of us are waiting for since < 2016 and that was on the roadmap of 2016 and 2017 and still there are no news about it... I'm talking about client side image resizing... Roadmap 2016 Roadmap 2017 Please don't get me wrong - the intention of this posting is really not to point to you with my fingers (like "but you said you will do that..."). and of course, i could have tried to implement it on my own... but i'm not sure how much sense that would make. first of all, since it is on the roadmap for such a long time, it is risky to put effort in something that maybe solved by the core one week later and likely much better. secondly i'm not that familiar to javascript and last but not least, i think this should really be built into the core image field because i think that is a main feature of a content management software! if you don't think that you can make that happen soon it would be nice to know. maybe we could find someone in the forum that has the abilities to do it. i would also be happy to sponsor development, or at least a part, if someone else would be willing to join. ps: i know that we already have media manager and jquery file upload, but i don't think that this is a good solution. processwire is so easy and flexible in almost all situations that it just feels too bad to not being able to just put an imagefield on one template and make the client upload several large images and display them as a gallery... would really be happy to hear your opinion about that and of course, also the opinion of all the others
  19. great job! i already did a calendar using https://fullcalendar.io/ but without recurring events (thats a lot more difficult do implement and i see you also had to set a hard max of 2800 so far...). i guess you can count me to your customers before end of may 1) is the calendar custom css? can it easily be adopted to other styles/themes? 2) is there drag&drop support for events? i build this on fullcalendar+pw. but it's not a must have...
  20. bernhard

    Dev to Live

    you can just create a config-dev.php on your dev and pw will use this one (only if it is present, so you just have to make sure it does not get uploaded to your live site). interesting link. I'm thinking about this topic for quite some time and came up with this approach: but i think the most solid approach is to use the api (like the migrations module does or like i showed in the last posting). would be interested in your experiences though
  21. bernhard

    Dev to Live

    hi thor, if you copy over your files and database you will have an exact copy. only thing you would maybe have to change is the settings in /site/config.php (database settings, if you have different ones at dev and live). the only problem would be that you overwrite the data of the live website's database. for example if you had some user input while developing on your dev and then you upload your dev-db to your live-db you would lose this data. that's been discussed several times before (because it can be a littly tricky). see or migrations module: https://modules.processwire.com/modules/migrations/ https://processwire.com/blog/posts/introduction-migrations-module/
  22. i didn't realize this part of his message and so i was totally confused by the posting of course you can loop over the returned array of images but not over the FIELD in a setup like he posted ( like $pagearray->fieldname ) maybe some selectors like this would be possible in your case? @oma
  23. I don't understand your question and maybe the others didn't as well because there is no answer so far... You cannot loop over an image field. You can loop over a pagearray and that's what you are doing. And you already have only one selector... Maybe you can use ->each() but that's quite the same, only shorter..
  24. Interesting, have to check my version because I also have image upload problems in one recent project. Is it related to images in repeaters in your case?
  25. I edited my post above. Sure you can have multiple super users but it also happened to me that I forgot the name of the initial admin and I had to find out in the database... User id 41 can be very handy to know in those cases
×
×
  • Create New...