-
Posts
6,648 -
Joined
-
Last visited
-
Days Won
365
Everything posted by bernhard
-
Or something like While ($pages->count("title=".$title.", parent...) $title.="-1"; Sorry on mobile
-
I was really surprised why you are asking this when you are developing awesome modules with ajax field reloading at the same time
-
hi kixe, sorry - i was unclear. "think it would be good to handle this one as well" was meant as "would be good to handle this as a wrong input" and maybe give an appropriate error message that helps the user find a correct string. "val" was just a placeholder for any value. as i said i don't need this because i switched to standard name for children + creating title field on page save per custom module. i agree that there is room for improvement in the core at this special step of naming children automatically
- 101 replies
-
- template
- autogenerate
-
(and 2 more)
Tagged with:
-
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
- 101 replies
-
- template
- autogenerate
-
(and 2 more)
Tagged with:
-
for reference here my very basic module to replace [tags] in description with any code: https://processwire.com/talk/topic/11208-inputfieldtagreplacer/
-
How do we enable html tags in fields setup "description" box?
bernhard replied to Zahari M.'s topic in Getting Started
for reference here my very basic module to replace [tags] in description with any code: https://processwire.com/talk/topic/11208-inputfieldtagreplacer/ -
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
-
Page Field vs. PageTable Field differences
bernhard replied to Jonathan Lahijani's topic in General Support
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? -
Show a field in admin only if the page you are editing has children
bernhard replied to cb2004's topic in General Support
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 -
Show a field in admin only if the page you are editing has children
bernhard replied to cb2004's topic in General Support
what do you exactly mean by "text box" ? ? -
Show a field in admin only if the page you are editing has children
bernhard replied to cb2004's topic in General Support
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')); } }); -
i'm sorry for that! you should have done the screencast before developing your module than i could have told you earlier
-
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/
-
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/ ?
-
i've implemented something like that today (alpha): https://processwire.com/talk/topic/11810-savebuttonenhanced
-
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?
-
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
-
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.
-
-
i put together a small module for this: https://processwire.com/talk/topic/11805-pagelistselectunselectbutton/
-
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
- 6 replies
-
- 14
-
-
does this help? https://processwire.com/talk/topic/4822-ckeditor-justify-plugin-walkthrough/
-
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
-
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
-
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