Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Stikki

  1. So you want to add inline filter mode, similar to what we have in GUI currently? As far as i understood. This: $pages->find('template=user')->toJSON($userFilter, JSON_PRETTY_PRINT) conflicts with header: protected function renderJSON($event) { $options = $event->arguments(0) ? $event->arguments(0) : 0; $event->return = $this->encode($event->object, $options); } Could do type check, so i won't be breaking exiting code. Or it could be second parameter? I'll see what i can do with system templates.
  2. Howdy, Custom fields were meant to be injected by hooks, there is currently no other way. Currently there are no filtering mechanism and it's purely renderer as it was meant to be, filtering is done based on template field selection, could be inline also. If you have ready pull request, lemme take a look.
  3. Howdy, i was just wondering if there is already workaround in core that would automatically sniff for composer.json up on module installation and install dependencies? What i'm currently doing is that i include vendor folder into modules, but somehow this feels stupid as of core could just handle this part up on module installation and place dependencies under ROOT_PATH/vendor/? i tried quickly to look around for previous posts about this topic, but couldn't find anything. Cheers!
  4. Or get + set combined: $data = $cache->get('my-key', WireCache::expireHourly, function() { return []; // return array (for example), if returns absolute false, won't get cached. });
  5. So, tell me am i stupid or isn't system just handling this? What i'm doing: // Save record locally $record->save(); $record = $pages->get($record->id); // Reload record to refresh database columns, stupid i know! -- But it seems that i have to reload page data to acquire some properties from database, even tho i would expect $pages->save() method to handle return values to $page object ($record in my case). So system just ain't handling this, or am i missing something? Thanks everyone!
  6. Where do i get? From here: https://github.com/IDT-media/IntegerAutoIncrement What does this do? Adds additional option to Fieldtype Integer to make it auto increment. How to use? Simply install this module, Create / Modify Field that is Integer, set auto increment on/off. Enjoy!
  7. So this is turning another Drupal? Shame.
  8. Howdy dragan, Will look into this matter when i start testing with 3.x series, haven't touched that yet. And what comes to Matrix repeater, it only works with standard fields currently, special fields would require own checkpoint, and since haven't used Matrix repeater myself yet, there is no check for that. You can always hook to getValue() method and implement you own check without hacking module.
  9. My solution was following: function t($text) { return include(wire('config')->paths->templates . '_translations.php'); } _translations.php: <?php $translations = []; $translations[$text] = _x('String', 'General'); return $translations[$text]; This to avoid actual function file to be translatable at any point + better access for strings overall. EDIT: Actually, this was good idea, but ain't working Sorry about posting, back to drawing board.
  10. Thanks for the confirmation Wanze, this is exactly what i meant. Cheers also.
  11. Thank you again Mr. Kobra Danke
  12. And more stuff follows: Is there full documentation what stuff method: getModuleInfo() can return? Documentation says: * 1. Using a static getModuleInfo method: * --------------------------------------- * * public static function getModuleInfo() { * return array( * 'title' => 'Your Module Title', * 'version' => 100, * 'author' => 'Ryan Cramer', * 'summary' => 'Description of what this module does and who made it.', * 'href' => 'http://www.domain.com/info/about/this/module/', * 'singular' => false, * 'autoload' => false, * 'requires' => array('HelloWorld>=1.0.1', 'PHP>=5.4.1', 'ProcessWire>=2.4.1'), * 'installs' => array('Module1', 'Module2', 'Module3'), * ); * } while example in ProcessCommentsManager.module: public static function getModuleInfo() { return array( 'title' => 'Comments', 'summary' => 'Manage comments in your site outside of the page editor.', 'version' => 5, 'author' => 'Ryan Cramer', 'icon' => 'comments', 'requires' => 'FieldtypeComments', 'permission' => 'comments-manager', 'permissions' => array( 'comments-manager' => 'Use the comments manager', ), 'page' => array( 'name' => 'comments', 'parent' => 'setup', 'title' => 'Comments', ), 'nav' => array( array( 'url' => '?go=approved', 'label' => __('Approved', __FILE__), ), array( 'url' => '?go=pending', 'label' => __('Pending', __FILE__), ), array( 'url' => '?go=spam', 'label' => __('Spam', __FILE__), ), array( 'url' => '?go=all', 'label' => __('All', __FILE__), ) ) ); } So are 'page' and 'nav' part of Process Module interface, and if so, where can i read about this?
  13. Okey, then again * Optional methods for Module interface * ===================================== * 1. __construct() - called before module config is populated. * 2. init() - called after module config is populated. * 3. ready() - called after init(), after API ready. * Note that ready() applies to 'autoload' modules only. * 4. ___install() - called when module is installed. * 5. ___uninstall() - called when module is uninstalled. While method header says: * While the method is required, if you don't need it, then just leave the implementation blank.
  14. Howdy howdy, I was reading stuff about module interfaces init() method and it's declared as required method while being only documentational guidance with in interface. Even all loading methods that i see are checking against existence of this method and executing it only if it's present. So my question: is this actually required method anymore? If not, documentation needs some update.
  15. It should reset $to on each iteration as you initialize wireMail over and over again, but if it doesn't try: $mail->to(); which should reset recipients list before adding more recipients into list.
  16. Yeah baby, this is what i wanted. I love ya! This system dosen't stop amaze me day after day. Cheers for your answer
  17. Howdy again, Is it possible like have virtual directories? With this i mean that when i have Users listed on frontend under members page (actual page with FE template), is it possible to list users from under admin/access/users virtually, so it would be a bit more user friendly to edit these users (if access) directly under members tree? Can't move users as admin template is required, not that this would be good idea anyways, so was just wondering if this kind of "dual" behavior is somehow possible where Lister would consider having virtual child elements under this template. Anyways, thanks again for possible answers
  18. New version out (0.0.2) Allows user define global data output in module options + individual data based on template. Added forum user Manol's feature request regarding PageImage and PageFile fields.
  19. Somewhat more "elegant" way: $form->insertAfter($submit, $form->find("type=submit")->last); Thanks for reminding that $form is actually WireArray
  20. Yup, like stated before it's CSS "issue". But field could as well be positioned better in WireArray. Anyways i'll use process mapping for now, but just my 50 cents
  21. Correct Mr Kobra, but this requires some process mapping, etc. Would be cool if hidden fields would be not present at any visual presence at all, but this has to do for now, thanks a lot!
  22. Hello again, Tried to make module today that adds exit and exit + save buttons, but came to conclusion that hidden fields are on the way Solution is simple: never add hidden fields before visible output, or don't include em as block type elements at all (CSS). So example in ProcessPageEdit::___buildForm : Instead of: if($saveName) { $submit = $this->modules->get('InputfieldSubmit'); $submit->attr('id+name', $saveName); $submit->attr('value', $saveLabel); $submit->addClass('head_button_clone'); $form->append($submit); } if($submit2) $form->append($submit2); /* if($this->input->get->modal && $this->page->className() == 'Page') { $submit = $this->modules->get('InputfieldSubmit'); $submit->attr('name', $saveName); $submit->attr('id', 'submit_save_top'); $submit->attr('value', $saveLabel); $form->append($submit); } */ $field = $this->modules->get('InputfieldHidden'); $field->attr('name', 'id'); $field->attr('value', $this->page->id); $form->append($field); return $form; To: $field = $this->modules->get('InputfieldHidden'); $field->attr('name', 'id'); $field->attr('value', $this->page->id); $form->append($field); if($saveName) { $submit = $this->modules->get('InputfieldSubmit'); $submit->attr('id+name', $saveName); $submit->attr('value', $saveLabel); $submit->addClass('head_button_clone'); $form->append($submit); } if($submit2) $form->append($submit2); /* if($this->input->get->modal && $this->page->className() == 'Page') { $submit = $this->modules->get('InputfieldSubmit'); $submit->attr('name', $saveName); $submit->attr('id', 'submit_save_top'); $submit->attr('value', $saveLabel); $form->append($submit); } */ return $form; Or something similar. Dunno if this is correct place for stuff like this, if not please redirect me to correct forum for future. Module works fine btw It's just visuals bothers me. Cheers
  23. Okey so it's saved into table fieldgroups_fields, damn i'm blind. Beer is on me guys. I'm having very good morning now, thanks for opening my eyes, this awesome.
  24. Hello everyone, Been working rough 5-6 months with this beast and i gotta tell you that it's almost perfect Of course every software has it's ups and downs, just like life does and nothing is perfect or meant for everyone, but here we go... I think database structure is about correct and flexible enough, what i don't like is that i can have similar field with 3x different prefix just because i need different control data for that same field. How about if template would control fields data instead of field? Field could have it's own control data as default, but i would really like to see that template could at least control some data, like visibility, appearance, required, stuff like this. Why? Because past 5-6 months i faced fact that for example when i need to custom admin interface for some template i would like to use same field over and over again, but it's kind of impossible when width can be 50%, 33% or 100% for different templates, data how ever is very same. Feels so stupid to create field over and over again, when it could use existing database tables. You already have control tables for fields and data tables separated, which is good model, so how big deal would this to be to implement something like this? If this already exists and i'm blind, lemme know and i'll buy you beer I hope i'm not the only one feeling like this, cheers for listening
  25. That is true. Tried to override TemplateFile::___renderI(), but any change seems to cause 404.
  • Create New...