Jump to content

bernhard

Members
  • Posts

    6,062
  • Joined

  • Last visited

  • Days Won

    295

Everything posted by bernhard

  1. hi kixe, thank you for your work, i can use this in my current project but i found two bugs: date('d.m.Y H:i:s') forename surname gives an error due to the space in date() date('dmY',created) forename surname 07012016-2016-01-07t22-23-12-01-00thu-07-jan-2016-22-23-12-0100europe-viennapm31europe-vienna07-test-test i don't need date('Ymd',val), but just tried it and think it would be good to handle this one as well. didn't look at your code but i think the regex should get some fine tuning
  2. for reference here my very basic module to replace [tags] in description with any code: https://processwire.com/talk/topic/11208-inputfieldtagreplacer/
  3. for reference here my very basic module to replace [tags] in description with any code: https://processwire.com/talk/topic/11208-inputfieldtagreplacer/
  4. one line when using http://modules.processwire.com/modules/markup-simple-navigation/ 'show_root' => true just in case you don't know somas great module
  5. hi jonathan, i like the idea because i'm a fan of pagetables but i can't seem to find a usecase where this would be really useful? can you give an example?
  6. hi cb2004, glad it worked. 1) google https://www.google.at/search?q=site:processwire.com+hooks&gws_rd=cr&ei=IzeMVuCqMYSnU7jZuIAK 2) the helloworld module https://github.com/ryancramerdesign/ProcessWire/blob/master/site-default/modules/Helloworld.module 3) blog (especially for my suggested way of using ready.php) https://processwire.com/blog/posts/processwire-2.6.7-core-updates-and-more/ i recommend reading the blog regularly - that's a great place to learn 4) go through the modules directory and see how others do it. start with simple modules and then go further. and one day you will have to dive into the "wire" folder have fun
  7. this in your /site/ready.php <?php $wire->addHookAfter("ProcessPageEdit::buildForm", function(HookEvent $event){ $process = $event->object; $form = $event->return; $page = $process->getPage(); // remove field when actual page has no children if($page->numChildren == 0) { $form->remove($form->getChildByName('your_field_name')); } });
  8. i'm sorry for that! you should have done the screencast before developing your module than i could have told you earlier
  9. Just throwing in an idea: could you trigger the ajax loading of the field somehow after adding a new page? BTW: I managed to add the unselect button on my own https://processwire.com/talk/topic/11805-pagelistselectunselectbutton/
  10. Thank you for the screencast kixe! Isn't it doing the same like the awesome https://processwire.com/talk/topic/9857-module-page-field-edit-links/ ?
  11. i've implemented something like that today (alpha): https://processwire.com/talk/topic/11810-savebuttonenhanced
  12. ok i found it! the clicks didn't work when i was editing any field, so i added a second click to remove focus from the input // if any field has focus click the button twice if($('input:focus').length > 0) $($(this).data('submit')).click(); $($(this).data('submit')).click(); some other things... i'm not sure how the dropdown is positioned. there is this code: data-at='right bottom+1' i would prefer a left aligned dropdown like in the screenshots in the first post, but sometimes they are on the right side: another issue is when i click on the children tab it is anywhere in the middle: the module can be easily extended with other options - any ideas?
  13. hi rick, thank you. $($(this).data('submit')).click(); should trigger the click on the connected button (can be "publish" or "save without publish" or just "save"). wich button to click is stored in the data attribute called "submit". values are taken from the $actions array: 'buttons' => array('#submit_save', '#submit_save_unpublished') so line 131 gets something like this: $('#submit_publish').click(); at least that is the plan
  14. i really liked the "save + new" and "save + close" button back in my joomla days here is the first version of a module to bring this functionality to processwire. i know there's the save actions module, but that's not exactly what i wanted... module is alpha state https://github.com/BernhardBaumrock/SaveButtonEnhanced i have one problem where i need your help: i want to submit the #ProcessPageEdit form via a jquery click() event: https://github.com/BernhardBaumrock/SaveButtonEnhanced/blob/master/SaveButtonEnhanced.module#L126 but unfortunately that does not submit the form reliably. sometimes it works, sometimes it doesn't. most of the time i need a second click. also i was not able to trigger the click like this: $('body').on('click', '.sbe_action', function() { console.log('clicked a sbe item'); }); it just did nothing does anyone know what is the problem here? would really appreciate it.
  15. cool i think you have a typo in your first codeblock?
  16. i put together a small module for this: https://processwire.com/talk/topic/11805-pagelistselectunselectbutton/
  17. Hello and happy new year to everybody This little module adds an unselect button to PageListSelect. You can define to which PageLists the button is added via module config (CSS selector). it solves this issue: https://processwire.com/talk/topic/9677-unselectclear-button-for-pagelistselect/ https://github.com/BernhardBaumrock/PageListSelectUnselectButton Changelog: v 2.0.0 - added support for ajax loaded fields including repeaters - added sanitization for the jquery selector
  18. does this help? https://processwire.com/talk/topic/4822-ckeditor-justify-plugin-walkthrough/
  19. I'm on mobile. Maybe you want to have a look at semantic labels: http://semantic-ui.com/elements/label.html#basic The great thing is that you don't have to load a heavy framework. It's all devided into small components. That's really great when you are missing something in another framework. Maybe you could provide different marker styles easily using semantic
  20. Credits go to tpr but I think the forum could profit if we spread the word and more people used it to show their work. I think it's the most efficient way to show modules/features and so on
  21. hey kixe, also the best wishes to you would you mind doing a short screencast so that we do not have to install it, create the fields etc... http://www.cockos.com/licecap/ is a cool small tool to do that in seconds on win/osx. it creates a GIF so you don't even have to upload it to youtube or the like. just record and post it directly here in the forum. thank you for sharing your module
  22. https://processwire.com/talk/topic/803-tinymce-insert-image-modal-window/?p=6802
  23. +1 for at least more integrated cropping. i agree that apeisa and horst did an awesome job on their modules but i don't think that should be a reason to not build this functionality into the core. i use those modules in every project and i really think that's a very common and core-worthy thing. thank you peter for your work on the mockups
  24. Hi henrik, this problem comes from the fact, that there is no outputformatting when bootstrapping PW. therefore image fields are always arrays even if they are set to max = 1 and all your textformatters won't work. https://processwire.com/talk/topic/5375-image-paths-when-bootstrapping-pw/ regarding your ajax problem: you don't need to create a file outside your site folder! you have two options: 1) create a separate template only for ajax requests and also a page for that (eg hidden page /ajax) - then you can just call this page and return your content 2) return your ajax content from within the same file. if you are using delayed output strategy that's really easy. all you have to do is put something like this on top of your template file: if($config->ajax) { // do your ajax stuff here echo 'i am an ajax response'; die(); } // regular call $headline = '<h1>' . $page->title . '</h1>'; $content = $page->body; and so on... hope that helps! good luck
×
×
  • Create New...