Jump to content

bernhard

Members
  • Posts

    5,861
  • Joined

  • Last visited

  • Days Won

    275

Everything posted by bernhard

  1. hi nikosch, thank you for your effort on this. it would be really great to give everyone a quick and easy impression of your module with a tool like licecap. example & link are here: https://processwire.com/talk/topic/11757-page-add-comfort-option/ thank you again
  2. outputformatting is always off when bootstrapping pw so your file-fields will always return arrays no matter what the setting in the admin is ps: yeah - the once in a lifetime moment when adrian has already posted a reply and i added (little) additional value with my answer. i will print that post and hang it up in my living room
  3. worked like a charm just installed it on several of my domains as one of my certs ran out and it is so easy: https://devblog.plesk.com/2015/12/lets-encrypt-plesk/ there's also an option to secure your plesk panel now (think this was not there from the beginning?!)
  4. ok thank you for all the explanations
  5. thank you. seems that the headers are not set... should that be done by the uikit script? is this an issue i should report to them?
  6. a nullpage will return 0 for the id, not NULL, so the correct way to check is just like i wrote if($item->id) { // this is a page } or if(!$item->id) { // this is a nullpage } see here: https://processwire.com/api/types/nullpage/ @tooth-paste can you show us your current code? that would make it easier. in your case it would be something like if($items->count() > 0) { // we found x children, so show the arrow }
  7. a quick&dirty hack could be to use something like this (http://modules.processwire.com/modules/page-list-better-label/) to modify the page label and use some jquery to hide all pages that do not have ##templatexy## in their label of course that's in no way secure but if you only need some kind of shortcuts that could be a fast solution...
  8. if($whateverpage->id) { // show your arrow/text } just put it in an IF and check the page id
  9. Thank you for the snippet lostkobrakai. Do you think it would somehow be possible or make sense to have kind of an export button (like the one at templates) that makes it possible to copy/download a script with all the API commands to create an exact copy of that field with all settings?
  10. i think that should be built in the core! thank you for building it. i've also come across this problem sometimes...
  11. maybe you are looking for this? http://modules.processwire.com/modules/process-dashboard/
  12. i think some of the usecases can be solved by using normal pages and using https://processwire.com/talk/topic/11040-visual-page-selector-commercial-page-picker-module-for-processwire/ for selecting them on other pages
  13. get your point maybe the easiest would be to send every new user a short HOWTO with the most important info (some problems that come up now and then) how to attach images to your post how to get notified of replies to your questions (direct link to settings) how to use google to search the forum ?
  14. just a small thing: i think it would be good to turn the option "follow this topic" ON by default. i know you can do this in your settings, but i think for new users this can be really hard to find - especially if they don't even know about it i think this kind of opt-out would make more sense and would prevent new users from missing answeres to their questions (for example if they think their question is already answered but then someone comes whith a new hint and they never read it because they never check back to this topic...)
  15. hi citech, i would recommend to create a separate template + page for that directly in the PW pagetree! if you put your file directly in the root you may run into problems some day (eg if you want to do a profile export). it's very easy to setup, although it is also a LITTLE more work: create a template (contact) + template file (eg /site/templates/contact.php) create a page in PW pagetree (eg /tools/contact) no you can point your form submit to /tools/contact and you have everything well organised and in place. you should try to keep all your own work/changes in the site-folder. this method does also have the benefit that you have all the PW api available (like sanitization which you will have to do with your contact data) and can also use urlsegments and all the great pw stuff welcome and have fun with PW edit: use caution what settings you use for "trailing slashes" or you may point your form to a 301 redirect. it can make a difference if you use /tools/contact or /tools/contact/
  16. thank you pierre-luc. yes that's why i thought it should be an $config->ajax request... this is the code for the upload via uikit: /** * * stickerframeupload * */ var progressbar = $("#stickerframeprogressbar"), bar = progressbar.find('.uk-progress-bar'), settings = { action: config.pageUrl + 'setstickerframe/', // upload url single: false, // make one request per file = true/false filelimit: 1, params: {width: $('#stickerframemodal .rahmen').width()}, //allow : '*.(png)', // allow only PNG images loadstart: function() { bar.css("width", "0%").text("0%"); progressbar.removeClass("uk-hidden"); }, progress: function(percent) { percent = Math.ceil(percent); bar.css("width", percent+"%").text(percent+"%"); }, allcomplete: function(response) { bar.css("width", "100%").text("100%"); setTimeout(function(){ progressbar.addClass("uk-hidden"); }, 250); var res = JSON.parse(response); config.stickerframetmp = res.stickerframe; config.stickerframepreviewtmp = res.stickerframepreview; $('#stickerframemodal .rahmen').attr('src',res.stickerframepreview); } }; var select = UIkit.uploadSelect($("#stickerframeinput"), settings), drop = UIkit.uploadDrop($("#stickerframedrop"), settings); here is the info about uikit drag&drop upload: http://getuikit.com/docs/upload.html yes, jquery; no proxy...
  17. as this is now built in the core i will not take this further... https://processwire.com/blog/posts/processwire-3.0.9-adds-new-long-click-and-save-actions/#new-page-edit-save-actions
  18. ok maybe thats related to tracydebugger? ErrorException: Class 'wireTempDir' not found in /var/www/...module:65 Stack trace: #0 [internal function]: Tracy\Debugger::shutdownHandler() #1 {main} (stored in /var/www/.../site/assets/logs/tracy/exception--2016-03-02--17-39--0979d2c325.html)
  19. there are still some wrong wireTempDir that shoud be WireTempDir
  20. thank you adrian, never used those configs so i was not aware of them. thanks for the adivce! will use wireTempDir here and in future
  21. ah, of course that was the problem! i had a save() directly after the removeAll() but that didn't make any difference. but adrian got me on the right track: removeAll() save() createPDF() add() save() // early return when no valid page object if(!$page->id) return false; $page->of(false); $page->stickerpdf->removeAll(); $page->save('stickerpdf'); // get mpdf instance $pdf = $this->modules->get('WirePDF'); $mpdf = $pdf->mpdf; // filename for generated pdf $filename = 'sticker.pdf'; $path = wire('config')->paths->files . $page->id . '/'; $filename = $path.$filename; $mpdf->WriteFixedPosHTML( '<div style="font-size: 10pt;">TEST ' . date('H:i:s') . '</div>', 29, 53, 67, 1 ); $mpdf->Output($filename, 'F'); $page->stickerpdf->add($filename); $page->save('stickerpdf'); thank you both!
  22. all the same. already tried save('stickerpdf') and save() PS: PW 2.7.2
  23. hi everyone, can you please confirm that i'm not doing anything wrong with this: // filename for generated pdf $filename = 'sticker' . date('ymdHis') . '.pdf'; $path = wire('config')->paths->files . $page->id . '/'; $filename = $path.$filename; $mpdf->WriteFixedPosHTML( '<div style="font-size: 10pt;">TEST ' . date('H:i:s') . '</div>', 29, 53, 67, 1 ); $mpdf->Output($filename, 'F'); $page->of(false); $page->stickerpdf->removeAll(); $page->stickerpdf->add($filename); $page->save('stickerpdf'); this code works, but as soon as i change the filename to a static value (like sticker.pdf without the timestamp) after the second creation of the file (= first overwrite of an existing file) the sticker field will hold a 0 byte file with name "sticker.pdf" and i get the error Warning: filemtime(): stat failed for /var/www/.../site/assets/files/1030/sticker.pdf in /var/www/.../wire/core/Pagefile.php on line 324
×
×
  • Create New...