What does this do?

This provides a filepicker to module developers. Also a frontend integration in conjunction with FrontEndUsers module is planned (not ready yet)

How is it used?

After installation the module settings can be found in "Extensions->GBFilePicker". (not ready yet)

For developers:

Actually there is just one function that might be useful: CreateFilePickerInput().
Here is an example how to integrate the filepicker input in other modules:


if($GPFilePicker =& $this->GetModuleInstance('GBFilePicker')) {
	// prints out a file dropdown showing only images in "[your uploads dir]/images";
	// selected images will appear as thumbnail preview below the dropdown
	echo $GBFilePicker->CreateFilePickerInput($id, 'FilePickerInput_1','','images');
	
	// prints out a button and a hidden input field to browse images in "[your uploads dir]/images" using the built in filebrowser
	// selected images will appear as thumbnail preview below the button;
	// value is stored in the hidden input field
	echo $this->CreateFilePickerInput($id, 'FilePickerInput_2','','images','','','image','browser');
	
	// prints out a file dropdown showing all files in uploads dir;
	echo $this->CreateFilePickerInput($id, 'GBFilePicker_file_dropdown','','','','','file');
	
	// prints out a button and a text input field to browse images in uploads/images using the built in filebrowser
	// value is stored in the text input field
	echo $this->CreateFilePickerInput($id, 'GBFilePicker_file_filepicker','','','','','file','browser');
}

Click here to view the generated API documentation for more details.

For designers:

You can use this module in conjunction with the {content_module} tag of the CMSms core.
Just place this in your template to get an additional content block that shows a filepicker in backend when editing the page:


{content_module block="filepicker block" module="GBFilePicker"}

What parameters are available?

all params are optional

Support

This module does not include commercial support. However, there are a number of resources available to help you with it:


Please report any kind of feedback.

Copyright and License

As per the GPL, this software is provided as-is.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Or read it online: http://www.gnu.org/licenses/licenses.html#GPL
Please read the text of the license for the full disclaimer.

Copyright © 2010, Georg Busch (NaN). All Rights Are Reserved.

This module has been released under the GNU Public License. You must agree to this license before using the module.