Jump to content


  • Posts

  • Joined

  • Last visited

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location

Recent Profile Visitors

4,735 profile views

Stikki's Achievements

Full Member

Full Member (4/6)



  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.
  • Create New...