Adding a File Picker to theme's setting

Adding a File Picker to theme's setting

Nadav Kavalerchik發表於
Number of replies: 4
Core developers的相片 Plugin developers的相片 Testers的相片 Translators的相片

I am putting toghter a new theme. One of the setting is a "logo" element.

Currently, I am using a text field that holds the URL for the logo image.

I wish to store the image inside Moodle's File storage. soewhere. does not matter (maybe part of the theme?)

I found only the "admin_setting_configfile" class. but it has no "Browse" button to upload a file. It only has a file-path text field to the moodledata. which is not that different then the text field class i am already using.

How do I add a file picker to the theme's setting page.

評比平均分數: -
In reply to Nadav Kavalerchik

Re: Adding a File Picker to theme's setting

Mary Evans發表於

This is something I wanted to know and raised a question in the Developers Meeting last month.

I think someone like Rajesh Taneja would know as he deals with all Administration development.

I was going to set up new Moodle Tracker and ask for this as an improvement.

DONE! Checkout MDL-35434

In reply to Mary Evans

Re: Adding a File Picker to theme's setting

Nadav Kavalerchik發表於
Core developers的相片 Plugin developers的相片 Testers的相片 Translators的相片

Thanks!

I missed that meeting (was on vacation) 傷心

Hope it is a quick development and that Rajesh will pick it up soon. Since I could really LOVE to see that feature added to the Theme I am working on.

BTW, currently, I use a "workaround" and uploaded the needed images to a site's main menu and hide it and then save the images links inside the theme setting page, using a text field. ( I know. a weird workaround )

In reply to Nadav Kavalerchik

Re: Adding a File Picker to theme's setting

Mary Evans發表於

Hi,

Most people do this but would save time it the file picker was visible in the editor of the settings page.

微笑

Mary