Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. Awesome work Ryan! Will try to ad some of my soon.
  2. Ryan, cool to know this is also possible.
  3. Another way to install a module is to use API call $modules->get("modulename"); //or wire("modules")->get("modulename"); Any module called like this not yet installed will get installed.
  4. Look at module dependencies on my link posted previously.
  5. I don't quite understand what is messy about it? Well, I don't know if it would be possible to hook the admin edit page process on execute method and do something, but I think you want to avoid doing it anyway and have a dedicated process for your fieldtype. However you can create something on install of the module. Have the Inputfield install the process module and on that process module you have something like: public function ___install() { $p = new Page(); $p->template = $this->templates->get("admin"); $p->parent = $this->pages->get(3); // /processwire/page/ $p->title = 'MyProcess'; $p->name = 'myprocess'; $p->process = $this; $p->save(); } Edit: For module dependencies there's a thread dedicated to that http://processwire.c...e +dependencies
  6. You'd have to create a admin page somewhere in /admin/ that uses the process module as process. Then you can ping the url.
  7. I don't think so. Creating a separate process module is the only way as far as I know, and perfectly valid to do so.
  8. I would recommend Sublime Text 2, it also has vintage mode built in and numerous plugins.
  9. Ryan, first time I hear about this. Never had something else bound to Alt other than special chars. And if it's a issue it's there to change for the user. I could change it to ctrl+p which would be print. See where I'm going? Thanks for the feedback Michael. I wasn't really thinking about getting it to work, because it's not broken, it's by intention and something to avoid problems. I think on save yes, as this would be the one making sense. There's "esc" mapped to close dialogs, but it doesn't work on input focus to you have to shift+tab then hit "esc". Also clicking outside will close it. You can navigation the tree with tabs and enter to open branches. I'm not sure I want to go this far anyway. Something like a overlay for the shortcuts would be nice. Still this is basic module to originally give page save shortcuts but turned out much bigger. Also it's global and not on a user basis, and checks to hide templates and fields for editors are still on the plan.
  10. Thanks Ryan for the suggestions. I'm not sure what u mean by this is quit application. On my mac command q is quit alt q is a special char. I sent you from my phone so keeping it short.
  11. Hello, just commited a new update. Added new action to search for Pages using PW internal ajax search "alt+q". You can even select template to filter. Added setting to change the fields used in page search. Default "title body". Search uses %= (SQL like) Changed dialogs to position fixed so they appear right where you are and page doesn't jump Added check so it doesn't get initialized on login screen
  12. Thanks, nice catch. It's corrected in the latest commit.
  13. It should be then $thumb->url;
  14. Don't want to put down default admin, but my admin theme has it all. Even drop-downs. https://github.com/somatonic/teflon-admin-theme-pw2
  15. Ok lol funny, it seems the hotkey jquery plugin already is ignoring commands if inside text inputs! So this already is solved this way. I thought it would be unnecessary to implement and I'm not sure it really is the best solution, but will help avoid problems in first place (as it also stated in Resigs plugin) . It would be nice to not needing to leave input focus to be able to save or do other actions while typing. But guess not really an issue.
  16. I always use a text field to copy in video url or code. If needed inside a text I use a tag that will be replaced.
  17. Thanks Pete. But that's not really a solution I like
  18. Interesting fact is that after building couple sites, some with lots of images, there's been always a good solutions (image per page) that even without a media manager it just works. The on page files has limits it seems at first, but it has also many pros. People working with me or clients wheren't really asking for something, but saying this is amazingly simple. Drag upload all files, arrange them and the gallery is finished. I find it fascinating that you can actually do pretty much with that system and even without a "real" media manager all the other cms have, which I mostly found akward to use.
  19. Yeah I know, you can change it in the settings. I also thought the same but couldn't decide what would be best.
  20. Thanks all! Little update for 0.0.6 - added View Page to the list "ctrl+v". - Also, I was thinking about adding a shortcut to the Template and Field pages. I figured simplest is to add a link in the label in front of the searchfield. If you open the dialog, you can now simply press "shift+tab" to focus on that link and hit enter. Edit: lol, just figured that "shift+tab" doesn't seem to work in FF. Back to the drawingboard ¨ Edit2: Ok this seem related to OS setting in MacOSX. If in FF make sure this in enabled http://support.mozil...enus or buttons
  21. Just made a little test and changed code to add setOutputFormatting to false. This is required to get it to work.
  22. I think it's easy if you see the repeaters as pages array Out of my head this can be done like this: $elements = $page->repeater->find("checkboxfield=1");
  23. How about foreach($u->execute() as $filename) { $img = $page->images->add($filename); $img->description = "what you want to say about the image"; } Edit: guess not. But it should also be possible to create a pagefile and add description before adding. $page->setOutputFormatting(false); // or $page->of(false); foreach($u->execute() as $filename) { $img = new Pageimage($page->images, $filename); $img->description = "what you want"; $page->images->add($img); } $page->save(); $page->setOutputFormatting(true); // or $page->of(true); Not tested but should work. I'm sure Ryan will come up with something else. But the solution you found is totally valid and also nice.
  24. Not sure what exactly you need. Those numbers with the "next" looks like a pager? Is that coming from where? The $types->render() causes it? However this is not what you need, you just have to foreach the types and output them any way you like. $types = new PageArray(); foreach($products as $product) { // get the types selected, assuming your page field is "catalog_product_type" // add() will import a set of page array or a single as of latest PW, if older PW you can // use import() method to import arrays $types->add($product->catalog_product_type); } echo "<ul>"; foreach($types->sort('title') as $type) { echo "<li>$type->title, $type->url, $type->id</li>"; } echo "</ul>";
  25. Marty the machine! Like it
×
×
  • Create New...