Skin.SetImage Default Folder
#1
Hello,

Is it possible to predefine the folder where the browser should open to when using Skin.SetImage?

Thanks in advance Smile
Reply
#2
I agree I wanted this for jx720 and custom home menu items which is why it had https://github.com/JezzX/skin.jx720/tree...tton_icons folder in it so people could pick extras
Reply
#3
Jezz_X Wrote:I agree I wanted this for jx720 and custom home menu items which is why it had https://github.com/JezzX/skin.jx720/tree...tton_icons folder in it so people could pick extras

Jezz_x, thanks for the reply but umm... I don't think I understood your response. Sad
Reply
#4
Couldn't you use Skin.SetFile(string,mask,folderpath) instead?
Reply
#5
Hitcher Wrote:Couldn't you use Skin.SetFile(string,mask,folderpath) instead?
Well then, it's settled... that worked perfectly
Smile Thanks!
Reply
#6
can't you only set one mask though eg you can't do
Skin.SetFile(Background,.bmp,.png,.jpg,.gif,special://skin/)
because .png gets read as the path were as setimage only shows image types
Reply
#7
Jezz_X Wrote:can't you only set one mask though eg you can't do
Skin.SetFile(Background,.bmp,.png,.jpg,.gif,special://skin/)
because .png gets read as the path were as setimage only shows image types

After a little testing I was able to use the following successfully:
PHP Code:
Skin.SetFile(UIBackground,.png|.jpg|.gif,ThePath
Reply
#8
guess we should change that on the wiki then Smile
Reply
#9
Updated the wiki.

Anyone know how you'd not specify the mask but specify the folderpath?

Would it simply be a matter of missing it altogether - Skin.SetFile(string,,folderpath) ?
Reply
#10
yeah should be
Reply
#11
To confirm, based on my testing...

PHP Code:
Skin.SetFile(stringName
will open the file browser at its default starting folder with "no" file type filter or mask if you prefer...

PHP Code:
Skin.SetFile(stringName,.png
will open the file browser at its default starting folder with one file type filter as specified by the mask string... in this case, a PNG image file

PHP Code:
Skin.SetFile(stringName,.png|.gif
will open the file browser at its default starting folder with as many file type filters as specified by the mask string; the "|" character must be used to separate the file type mask... in this case, PNG and GIF image files...

PHP Code:
Skin.SetFile(stringName,,startingFolderPath
will open the file browser at the speficied folder path with no file filter...

And if I've made any sense, I'm sure you get the picture... Smile
Reply
#12
Thanks for the clarification.
Reply
#13
Guys, I'm not able to make it work...

what's the right code in order to predefine special://skin/backgrounds/ as a starting folder for Skin.SetLargeImage ??
My skins:

Amber
Quartz

Reply
#14
For folders you want Skin.SetPath(string[,value])

Quote:Pops up a folder browser and allows the user to select a folder of images to be used in a multi image control else where in the skin via the info tag Skin.String(string). If the value parameter is specified, then the file browser dialog does not pop up, and the path is set directly.

And as LargeImage is no longer I guess that should be removed.
Reply
#15
Hitcher Wrote:For folders you want Skin.SetPath(string[,value])

And as LargeImage is no longer I guess that should be removed.


1. So I should use Skin.SetImage and NOT Skin.SetLargeImage even for custom backdrops? Are you sure?

2. I don't want to setup multi image. I want to pop up special://skin/backgrounds/ and let user select single image from that folder (or he can navigate away, if he does not like them. In other words I have a folder with background images that I would like to present to a user, so he can choose one of them (if he prefers).

This code:

Code:
<onclick>Skin.SetFile(Settings_Background,,special://skin/backgounds/)</onclick>
<onclick>Skin.SetImage(Settings_Background,,special://skin/backgounds/)</onclick>
<onclick>Skin.SetFile(Settings_Background,,special://skin/backgounds)</onclick>
<onclick>Skin.SetImage(Settings_Background,,special://skin/backgounds)</onclick>

_always_ opens up XBMC default folder to browse from and not ../skin/backgrounds were my pre-made backdrops are.
My skins:

Amber
Quartz

Reply

Logout Mark Read Team Forum Stats Members Help
Skin.SetImage Default Folder0