Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Item Manager - image picker
#4
Hello,

excellent job! That is the right way how to achieve that.

Just create 2 clones of the original "FieldText.php" and "InputText.php" files. Rename it to "FieldFilepicker.php" under plugins/imanager/lib/processors/fields/
and "InputFilepicker.php" under plugins/imanager/lib/processors/inputs/

Rename the php classes in these files to "FieldFilepicker" and "InputFilepicker" and insert your code there that you posted above.
(just change the window.open line to

Code:
window.open("'.IM_SITE_URL.'plugins/i18n_specialpages/browser/filebrowser.php?func=fill_image_'.$this->id.'&type=images", "browser", "width=800,height=500,left=100,top=100,scrollbars=yes");


to make it a bit more dynamic)

Then edit the "plugins/imanager/tpl/row.fields.im.tpl" file and put there a new option line:
Code:
<option value="filepicker"[[selected-filepicker]]>File Picker</option>
And make a backup of that file. That's all you need to do. Now you can select the File Picker field under the "Fields Menu".
At the next ItemManager release your files remain unchanged with the exception of row.fields.im.tpl, but you have created a copy of that file.

regards
Reply


Messages In This Thread
Item Manager - image picker - by tomot - 2016-10-09, 04:53:12
RE: Item Manager - image picker - by Bigin - 2016-10-09, 19:27:42
RE: Item Manager - image picker - by tomot - 2016-10-09, 21:00:19
RE: Item Manager - image picker - by Bigin - 2016-10-09, 22:12:55
RE: Item Manager - image picker - by tomot - 2016-10-10, 01:55:52
RE: Item Manager - image picker - by Bigin - 2016-10-10, 02:09:45



Users browsing this thread: 1 Guest(s)