When both modules are installed (Imagepicker and Filepicker) and in both quotas are set to 25 mb per user, will they add to 50 in total or do both modules share the quota?

Comments

hutch’s picture

Each module has it's own quota system. Using a helper module you could collect the info from both modules, a start would be to look at functions filepicker_get_all_bytes() and imagepicker_get_all_bytes()
Using theming you could modify things where you want.

kressin’s picture

I changed the path of file picker to use a common path with image picker. So far so good. Count is still different. I supposed because one module uses db_select('image picker') and the other db_select('filepicker'). Would it work if both modules used a common database, say db_select('image picker')?

hutch’s picture

Would it work if both modules used a common database, say db_select('image picker')?

Pretty much a surefire way to break both.

Writing a helper module is the way to go, not that hard:
myhelper.info:

name = Myhelper
description = Site specific stuff.
package = Other
core = 7.x

myhelper.module:

<?php

function myhelper_menu() {
  $items = array();
  $items['myhelper_test'] = array(
    'title'            => 'test',
    'page callback'    => 'myhelper_test',
    'access callback'  => TRUE,
    'type'             => MENU_CALLBACK,
  );
  return $items;
}

function myhelper_test() {
  $output = 'hello world<br />';
  // test stuff here
  return $output;
}

Access the test page with something like
http://mysite.com/myhelper_test