-
Posts
6,130 -
Joined
-
Last visited
-
Days Won
302
Everything posted by bernhard
-
didn't have time to integrate a module... one of those sentences i love processwire for
-
ProcessWire ApiGen (dynamic + up to date + all branches)
bernhard replied to kongondo's topic in API & Templates
awesome! the search could maybe be a great help if it worked would also prefer a light theme i think... -
awesome! but i'm still excited how (and when) PW 3 will handle client side image resizing https://processwire.com/blog/posts/happy-new-year-heres-a-roadmap-for-processwire-in-2016/#what-else-is-coming-for-processwire-3.x-in-2016
-
clients sites need to talk to one main site
bernhard replied to Marco Angeli's topic in General Support
hi marco, sounds like https://processwire.com/api/modules/multi-site-support/ option #2 would be worth a try. but it depends a lot on the setup of your sites. are they exactly the same or should they be different? i think pw 3.0 should also be able to grab data from other installations but i have no experience with it so far -
Module Profile Export module (also upgrade PW 2.0 to 2.1)
bernhard replied to ryan's topic in Modules/Plugins
had an issue today when using a name like "example.com transfer profile" it showed up in the select box but after clicking on "continue" it said "no site profile found" -
thank you adrian - i know i wasn't dreaming! that's really strange because recently i discovered that i don't see some site elements that should be there. thats not related to processwire. don't know where this comes from, its only on my new laptop with touchscreen. i also do not see pagelistactions on hover... it only works on firefox, not on chrome and IE but thats offtopic here and i will investigate when i have more time...
-
hmmm... i thought there was an option for this in the core recently but can't find where. or have i been dreaming?!
-
Good idea. Would be good for images but in my case I have to do some php work on button click so it would have to be some complicated ajax...
-
@lostkobrakai can you confirm that when clicking this button the page is NOT saved. so if you edit other fields the changes will get lost. any way to change this behaviour? the reason is i created a button "create invoice" for a client and if he changes some fields (address for example) and clicks the button "create invoice" without saving the page before this changes will get lost
-
You would have to use OR instead of AND Glad it helped
-
Thank you Adrian. Seems that the blog post came 3 months too early for me. I read it but didn't remember. Now it makes sense
-
if you want to get access to eg $pages in modules you have to do something like $pages = wire('pages'); sometimes i see people using $this->wire('pages') like here for example: https://processwire.com/talk/topic/11939-make-dashboard-plugin-page-the-default-admin-page/?p=111017 is there any difference in those two methods? i also saw $this->user->name and i was not sure if that would work inside a module because i thought it should be wire('user')->name thank you in advance
-
hi christophe, maybe this helps: put this in your /site/ready.php $wire->addHookAfter("ProcessPageEdit::buildForm", function(HookEvent $event){ $process = $event->object; $page = $process->getPage(); $user = wire('user'); // example: limit code to one template if($page->template != 'basic-page') return; // example: limit it to user role if(!$user->hasRole("membres")) return; $config = wire('config'); $config->scripts->append($config->urls->templates . 'scripts/yourscript.js'); $config->styles->append($config->urls->templates . 'styles/yourstyle.css'); }); of course you will have to put your script or style-files in the appropriate folders (in the example above it would be the folder /site/templates/scripts or /site/templates/styles
-
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
- 100 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
- 100 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')); } });