Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. Something that's in dev since 2.3.1 is that you can make the autoload specific. More infos can found here http://processwire.com/talk/topic/3768-processwire-231-dev-branch/ : 3. Conditional autoload modules. This is because if you look at your module, it will get loaded and hook added in init on EVERY request, even on front-end. So to make this easy you can use a selector or an anonymous function (php 5.3 only). To only load this module in the admin, you could then do "autoload" => "template=admin",
  2. Thanks Martijin for you help also. It was fixed with value.toString() The "transp" is ok and it was the easiest way to keep backward compatibility. It would require to reinstall the module to change the schema, though it could also be done with a update script check. I don't see why transp is a problem. And just because of transparent making the data field to 11 chars instead of 6 is not nice at the end. But I'm not happy at all to add the prevent collapse issue, which is IMO a problem of the admin theme from the start. And since the default admin theme has no clearing on the widget content box, I'm fighting with this in various modules and custom admin pages and the admin theme. Resulting in the same fix in different modules and themes over and over again. Some solve it this way some the other way. It would be a easy fix in the core and I mentioned this so many times already that I gave up. This results in so many inconsistency now throughout the themes and modules, I hope with the new admin theme update in the future this will be fixed in some way.
  3. The colorpicker has been updated to 1.0.7. with fixed and a new swatches feature. - Since 1.0.6 the colorpicker supports color swatches to add predefined colors for easy selection. Thanks @Rayden for the implementation. - It's now also possible to add a transparent default or swatch value with the string "transp". - fixed a bug with numeric values like 333333, 555555 which caused the colorpicker to not init correctly. A screen showing the swatches. Thanks for Raymond Geerts for the update and fixes.
  4. Not sure if you got it working or not, but I did a quick test and you you're right it doesn't save formated fields like page fields. I got it working by creating a clone of the saved page and then uncache and get the page from DB to get old value. Now it also saves the page fields. public function saveReady($event) { $p = $event->arguments("page"); $p = clone($p); echo "new headline: " . $p->headline; // debug $this->pages->uncache($p); $old = $this->pages->get($p->id); // get page from db echo " | old headline: " . $old->headline; // debug // exit(); // debug }
  5. I noticed this too, that it doesn't work when no key is set only label. Not sure about the \r\n, I think that's system dependence. I also noticed that if you enter 0 as a key (0:=option) it will not work with querying with selectors, as the data field is a text field and not a integer. YOu have to start with 1:=option to make it work.
  6. RT @ePirat: Ok habe mich jetzt entschieden: ProcessWire statt Joomla, allein schon wegen http://t.co/1OXDETxDSW

  7. Not error but notice. And debug mode on.
  8. You use delegate events... in jQuery this is done now with .on() previous with .live() $('.container').on('click', 'a.editlink', function(){ $link = $(this); ... });
  9. I'm also using dev and dev all over so that can't be issue. I meant more your browser Any javascript errors?
  10. You can add any tinymce config to the field tinymce settings, look at the tinymce documentation what you need. Then enter them in the custom advanced config textarea. http://www.tinymce.com/wiki.php/Configuration3x:cleanup
  11. Works fine here since ever, can you provide more details on your environment?
  12. I proposed this idea several times already in various threads... right in the repeater thread once it was published. I played with the idea and even tried to work out adapting repeater module, but to no success yet as it gets a lot more complicated than first thought. Since there were no real response or interest I haven't spent more time with it. One try was also to build a block module, but haven't got the time to further develop this and it's in a proof of concept alpha stage, only front-end editing and not backend interface. Searching those seems one of the harder things to solve as it gets complicated, but if using a spider or something it wouldn't be a real problem. Scalability would be another consideration, as I can image people using this then to build vast websites with every block being a page, with repeaters inside resulting in even more pages. You get the idea.
  13. Silence can't distract you, then you're empty... I'm full of things.
  14. jQuery: $('li:odd').addClass("odd"); done.
  15. Hehe, I was about to write already, that I kinda can't understand people listen to music when working/coding. I can't, as if coding wasn't hard enough and doesn't need your attention fully - how the hell can you listen to music!? I remember that THE best animator of our time Milt Kahl (Disney) was once asked by his animator fellows, if he listens to music while drawing. He almost got angry at them yelling what I said above.
  16. I don't see anything wrong in doing so what you do include/load a php in a function. But usually it's another class or library. The scope on $this, doesn't exists from in that. So kinda with teppo that it might not easy to deal with it how you go with it depending on what methods you call and for what. instead of $this in the included function if would be more like $module = new MyAwesomeModule(); $var = $module->bla1(…); or $module = wire("modules")->get("MyAwesomeModule"); $var = $module->bla1(…);
  17. RT @alguintu: That moment when you no longer care whether the design looks good as long as the client shuts up. #webdesignhell

  18. You got the problem right there in the error message. A page need to first be saved before images can be added or loaded. I think the from processing tries to render image field with the uploaded image but isn't really yet uploaded or saved. Not sure what you're using this for but FormTemplateProcessor isn't meant to work with file fields and also not recommended for front end forms with uploads. Kinda big security risk there. There's some examples around for different forms for front-end with file uploads. http://processwire.com/talk/topic/2089-create-simple-forms-using-api/ long thread with various things. Some examples you'll find in my gists namely https://gist.github.com/somatonic/5236008 https://gist.github.com/somatonic/4150974
  19. ...nothing, this works ok. Don't know why it shouldn't.
  20. You would instead hook Page::path. It' used by url and making url also hookable doesn't make sense and maybe even for performance reasons as it can be called many times in a request. Or you could add your own url method to Page.
  21. To me it sounds more like you want a custom admin page to frame a pho ftp client to access and upload your design files from the admin instead over a IDE or coding tool ftp.
  22. There's a note in source that custom code doesn't yet work with the validPage check. However, in my quick test you can still use it to select unpublished page via normal parent/template config and using PageListSelect or PageListSelectMultiple.
  23. Those pages are the last modified/created, and you get them because you're logged in as admin. "include=all" doesn't only mean you get also pages from the trash but also unpublished and hidden ones. I would try to test your code for if it finds something, so you can from the start rule out other things $items = $pages->find("template=vacancy, limit=10, sort=-modified"); if(count($items)) ... else ... or print out the PageArray result, it should give id's of the pages found 123|2939|2331 echo $items; If you search doesn't return anything, and without template=vacancy it does, then that looks like it's wrong something there?
  24. RT @decadeofdefeat: I just discovered @processwire and I am literally high fiving the air. Thanks for building an awesome and straightforwa…

×
×
  • Create New...