Jump to content

Soma

Moderators
  • Posts

    6,808
  • Joined

  • Last visited

  • Days Won

    159

Everything posted by Soma

  1. So with the selector of above you could get the lastest modified date with $selArray = array( "id!=$config->adminRootPageID|$config->trashPageID|$config->http404PageID", "template!=admin", "has_parent!=$config->adminRootPageID", "include=all", "sort=-modified" ); $lastDateModified = date("Y.m.d H:i:s", $pages->get(implode(",",$selArray))->modified); // or $lastDateModified = date("Y.m.d H:i:s", $pages->findOne(implode(",",$selArray))->modified);
  2. This should give you some understanding: $selArray = array( "id!=$config->adminRootPageID|$config->trashPageID|$config->http404PageID", // ID as in /wire/config.php "template!=admin", "has_parent!=$config->adminRootPageID", // excludes "admin" branch all children recursively "include=all", // all pages regardless of access and status "sort=-modified", ); $list = ""; foreach($pages->find(implode(",",$selArray)) as $p) { $date = date("Y.m.d H:i:s", $p->modified); $list .= "<li><a href='{$config->urls->admin}page/edit/?id=$p->id'>$date - $p->path</a></li>"; } echo "<ul>$list</ul>";
  3. TextDomainHelper is just a rough Helper module I did for some guy helping with finding translations in admin and not sure of any side effects. I put TextDomainHelper.module in site/modules/ and it's still working. Then I installed it, along with ChromePhpLogger.module and I also get a timeout on ModulesManager. Other than what you mentioned but ok. Little testing, it seems the ChromePhp::log() output in TextDomainHelper.module to output infos is causing trouble. So it looks like ChomePhp is the problem here but no idea what exactly or why, maybe something with loading files from assets. Just can say that using ChromePhp logger in the admin (turned off in the module by default) works well with ModulesManager. But glad you found out why it wasn't working, I don't think you need TextDomainHelper anyway.
  4. TextHelperDomain? You mean TextDomainHelper from my gists https://gist.github.com/somatonic/4520324 ? I'm not sure what this would have to do with the problems you have/had. ?
  5. You know that moment when everything is slow as hell but your brain?

  6. You can also populate a page field with a custom php code in the field settings and use api to fill dropdown with child pages of current page. Like context aware.
  7. I have a custom css that positions the error below field with position absolute and some trickery. Custom required message I'm not not sure really is needed instead of a generalized message that it requires a value but see it being useful for certain cases.
  8. RT @AJTroxell: Absolutely loving @processwire! In two days I am happier with this than any CMS i've ever used. (including ee)

  9. Delete cache ... load page ... see if it created a new cache.
  10. Oh and I gladly will accept any PR or help if anyone finds the time to implement those fixes. Currently short on bandwidth. No and I don't have any notices on php 5.3.
  11. Ah yes the module inits on page edit screens. I don't see any errors. DO you mean the array to string conversion notices martijn tells about? I'm not seeing theses notices anywhere so wondering what PHP version you see them? For me it just output "Array" where there is a array in $data_value... So that means my previous try to fix doesn't remove the notices? Ah yes there still seems to be settings that are arrays. The editRoles etc are on template field not? The fix you posted is simple but would just show the ids of the roles, and I would like to output title and links as with parent_id or template_id. I will try to catch the roles also, hope that there's isn't much more. And leave a implode in there for those missing in case.
  12. After having a problem with floats, we found out that all the PHP float and number function aren't locale save and compatible. We have a language support installed and the german locale is set via the language pack, after that the float fields stop working correctly. After removing the locale they work again. It's simply that the locale puts the float like "9,13" and not "9.13" and it fails. It would require some more workarounds as there is now to make it work or just leave out the locale setting when using languages, which is kinda annoying not able to use it.
  13. right $me->is("have-fun")
  14. good one I also wrote about in some thread... and for those being even more lazy can also use the even shorter $page->is(selector) if($page->is('template=template1|template2|template3|template4')){ edit: or if just for one template instead if($page->template == "basic-page"){ use if($page->is("basic-page")){
  15. Just for the record and for those wondering what $event->replace = true; does: It prevents the hooked function to get executed when you use addHookBefore().
  16. Heh, I once tried for ages to use "status<Page::statusHidden" in a selector string... BTW where is the if ($this->page->template = 'template-name') { gone?
  17. This would be a good candidate for a simple custom field, nuff said.
  18. not as a string should work... $page->addStatus(Page::statusHidden); Cheers
  19. how about public function preservePages(HookEvent $event) { $event->replace = true; ... Thanks for the beer. Really strange that you can't just remove permission to delete pages, for what reason? Feels weird when deleting page and it just gets hidden.
  20. Hmm, not sure really. But the "edit" or "install" part works? Wouldn't make sense. What you mean with "Only once!" ? Here some more you could test. 1. make the getActions method public or protected instead of private. 2. try make the $this->modules->get('InputfieldMarkup'); => wire("modules")->get('InputfieldMarkup'); 3. throw the computer out the window
  21. We already got through this guys .... Here http://processwire.com/talk/topic/4189-flexibility-in-page-design/?p=47083 and here above on this page http://processwire.com/talk/topic/4189-flexibility-in-page-design/?p=47085
  22. I'm not sure I understand what you're posting here last two posts. Anyone? Since I can't reproduce nor see any wrong code I can't really do anything... also it looks like you're the only one experience this. Anyone?
  23. Can you enable debug mode in site/config.php and see if there's any error/warnings? Or if nothing in PW error log or apache error log? If you said $button = $this->modules->get('InputfieldMarkup'); is the problem, which shouldn't at all, can you look if the InputfieldMarkup.module exists in you /wire/modules/Inputfield/ ? Or put this code in a template file and call the page and see what happens? $button = $modules->get('InputfieldMarkup'); $button->value = "<a href='#'>markup test</a>"; echo $button->render(); if that fails there's no problem with MM but your PW install. But then looking at you screenshot the other button made the same way work, so I'm confused.
  24. I don't think phpinfo will help with permission problems if there's any, but then I'm not sure anymore what problems you currently have with PW or ModulesManager... Generally it's usually a permission problem when writing or reading files fails, and it's not something I can do anything about, at least I'm not aware of and most of the problems with php setting is already covered by the MM module to throw an descriptive error. I'm no guru when it comes to permissions and what all can go wrong on all those hostings and combinations of settings. Huh? What problem? Any more infos? Errors? I don't think there's any problems with any of the above, nothing wrong here, not something I can say Ahhhh.... I think you have other problem with you general PW install, like some missing files if the $this->modules->get('InputfieldMarkup'); has a problem cause there's nothing wrong with it.
  25. I just looked into this again and there's no argument for removeAll() just for remove($key). See here in source https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/core/WireArray.php#L790 removeAll() removes ALL pages from a Wire/PageArray (pages, images, POST vars etc). So I'm not sure about why it works for you because it shouldn't and also doesn't work for me. Assuming user_app is a page field allowing multiple pages to be selected. It's a WireArray/PageArray and you add pages to it like this from API: $user->of(false); $page1 = $pages->get("/somepage/"); $page2 = $pages->get("/someotherpage/"); $user->user_app->add($page1); $user->user_app->add($page2); $user->save(); Now we got 2 pages added to the page field. If you now do a $page->user_app->removeAll($page1) they all get removed so does $user->user_app->removeAll(); But if you do: $page2 = $pages->get("/someotherpage/"); $user->user_app->remove($page2); $user->of(false); $user->save(); Now only the $page2 which is in the array gets removed. It works all as expected and make sense.
×
×
  • Create New...