Jump to content

bernhard

Members
  • Posts

    6,671
  • Joined

  • Last visited

  • Days Won

    366

Everything posted by bernhard

  1. thanks, got it have to start using it. i understood the multilanguage part but never needed it so far. but it seems that i will use more tags and less imagesfields in the future (i used to create single fields for what you describe) thanks!
  2. could anybody of you guys using image tags please give me an example when and what for you use it? i've never used image tags in the past 3 years and would like to make sure if i was missing something or if i just had no use for it thanks!
  3. Hallo GGTB und willkommen im Forum, es gibt auch ein paar Österreicher und Schweizer hier... da wäre die sprachliche Barriere vernachlässigbar Also definitiv nur Deutschland oder deutschsprachig / EU ? LG
  4. @joe_g keep in mind that whenever you update your processwire installation this issue will return (if your hoster didn't change the config until then)
  5. thank you robin, it worked! still i would like to know what's going on and why it does not work as expected...
  6. hi robin, coming from other cms the widgets seem to be quite common. i created somthing like this some time ago and never needed it again until now. but you will find some useful information here: and here: in the screencast you see it starting at 2:15
  7. took me some time today to find out why my page was not showing up... i ended up creating a hook that does what apeisa had in his mind some years ago // set all languages active automatically $wire->addHookAfter('Pages::added', function($event) { $page = $event->arguments(0); foreach ($this->wire->languages as $lang) $page->set("status$lang", 1); $page->save(); }); does anybody see any danger in that? i'm not so experienced with multilang yet... edit: somehow it seems that ->setAndSave(...) does NOT work in this situation. @Can or @dragan can you confirm that?
  8. please see this screencast. i have two questions: dou you also experience the bug related to inputfield toggles that i demonstrate at 0:09 ? one does not see it clearly but i click the inputfield but the field does not get collapsed. i have this in all my installations. you have to click the chevron icon on the right first. after you clicked it once you can click everywhere on the inputfields label to toggle it. why is the opened and openReady event fired twice? i tried to understand the code but i have no explanation yet. the trigger is here: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/templates-admin/scripts/inputfields.js#L1018 i put a console.log() here: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/templates-admin/scripts/inputfields.js#L1000 (fired only once) but if i catch the opened event like this, i always get 2 logs: <script> $(document).on('opened', 'li', function(e) { console.log('opened!'); console.log($(e.target)); }); $(document).on('openReady', 'li', function() { console.log('openReady!'); }); </script> i thought maybe the event is fired on different li elements, but e.target returns the same element...
  9. in fact this is wrong! this is correct: $pages->get(123); // returns also hidden and unpublished pages $pages->find('id=123'); // returns a "PageArray", but only published + visible pages $pages->findOne('id=123'); // returns a single "Page" object, also only published + visible pages find and findOne can be modified with your selector like "include=hidden"...
  10. unfortunately i can only quote soma here. though it would be interesting to hear @ryan s opinion in this case...
  11. i had something similar 2 times until now...
  12. hi everybody, I'm working on my new datatables module. i pass a pagearray (rows of the table) and for each column i call the column callback that returns the value of the cell: // check type if(!is_array($rows) AND !($rows instanceof PageArray)) throw new WireException("Data must be an Array or a PageArray"); // create objects for each row (page) foreach($rows as $row) { $obj = new \stdClass(); // create property for each column foreach($this->cols as $col) { if(is_callable($col->data)) { $obj->{$col->name} = $col->data->__invoke($row, $col); } } $json->data[] = $obj; } return json_encode($json); $col->data->__invoke($row, $col) makes it possible to define the tables columns like this: $col = new ProcessWire\dtCol(); $col->name = "id"; $col->title = "Page ID"; $col->data = function($page) { return $page->id; }; $this->cols->add($col); the problem is, that $page inside the $col->data function has of(false)! what i need to be able to do is this: $page->of(true); return $page->title; // return current's language title doing a $this->wire->pages->of(false); works, but that's no possible solution. does anybody know whats going on here? thank you! edit: maybe this could be related to that i'm including the code via eval() ?
  13. hi dweeda and welcome to the forum, not sure what you are trying to do exactly. maybe you can be more clear about what you are trying to achieve? if you need the script to run as a special user you can use https://processwire.com/api/ref/session/force-login/ but your question sounds a bit strange. maybe (as often in pw) there is a much more elegant solution and you don't need all this bootstrapping
  14. you can report issues here: https://github.com/processwire/processwire-issues but i think it's too early to report this as an issue since the image field is commonly used without any problems. i guess it is somehow related to your setup. what is the output of your response (you see it in the network tab of your dev-tools)? it seems that you have an error that throws only when debug is ON. when you switch it off the error is supressed and therefore the upload works. check also your error logs of processwire and your server. i'm quite sure you'll find valuable information there
  15. Hi HarryPhone, sounds like you are just a little too early. Your usecase looks like a perfect fit for my new modules agree with this, would do it a little different though: i would use my RockDatatables instead of the Core AdminDataTable. you will be much quicker and you will have much more options regarding rendering the table (coloring cells, rendering linked icons and the like). regarding the import you have serveral options (there are several csv modules around). it's also very easy to write your own XML importer: using my module you can build highly customized listers. its also very easy to create processmodules to make them available as single pages in the pw admin. the module is not released yet and has some drawbacks (like mobile usage or handling large datasets is not yet implemented, that would be a case for regular listers), but maybe it's interesting to know that something like this is coming up.
  16. hi ocr_b, what do you mean by "suddenly"? did you install some updates? any server changes? any other installed modules (or updates of those)? try it with a fresh install, different image, different server etc...
  17. Thanks! Looks very interesting. Though I have to say that I have no time to implement that in the near future.
  18. Already done The fields are there for really simple tables and the files for more complex ones. The module will include all files related to a field automatically (PHP, js and CSS).
  19. very soon, it can be done. and even more!
  20. did a total rewrite of the module and will release it the next weeks when i'm done
  21. datatables is free & open source: https://datatables.net/faqs/index#Licensing if you plan to use it you might be happy to hear that i'm working on a new fieldtype that works similar (but even better) than my handsontable fieldtype edit: sorry, seems you are only talking about the editor. i used datatables a lot with custom action icons opening pw-panels and regular pw-edit screens. works like a charm!
  22. hi kixe, thanks for sharing this would you mind adding some screenshots or a sample usecase to know when your module would be useful? maybe you could also point out the differences to somas colorpicker module? thanks!
  23. thank you @dragan for reporting that. took me some time to get it working and in the end it was only one function call to addslashes ^^ please check the latest version of the inputfield: https://gitlab.com/baumrock/FieldtypeHandsontable/commit/57d5e117fa87470cfea784bb1f9a24e3895b8ac2
  24. hi robin, thanks for your words i've not yet found the time to make the field queryable via pw selectors. i'm not sure how that should (could) be implemented in the best way. as i've never built a queryable inputfield i would be happy to hear some thoughts about it from someone more experienced. ... or a PR where i can learn from
  25. your example works like a charm here, i just added a comma after the i18n object
×
×
  • Create New...