Kodi Community Forum

Full Version: Adding Profile Custom Settings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Is it possible to add a custom setting to a profile? If so, can someone point me towards the right direction (literature)?

I'd like to be able to add a custom image, in my case an avatar-like image, and display it on the login page for each user.

If at all possible, please keep in mind that I don't know how to add custom settings. I have looked at other skins with settings but I cannot seem to understand how it works and the wiki was not that helpful... if anyone can educate me, it would be much appreciated.

how do you create a new custom setting?
where is it stored?
how do you save it?

Thank you in advance for your time. Below is a screenshot as to why I want to learn it... I don't really need it because it's just my son, friend and myself, but i think this is kinda kool and can't seem to stop myself from digging further, further and further.... it's actually fun!

Image

Apologies, however, please refrain from giving answers such as try Skin.setString | skin.setImage | skin.hasSetting as this type of answers do not assist any beginner in understanding the process.

Respectfully,
Dom
Dom DXecutioner Wrote:Apologies, however, please refrain from giving answers such as try Skin.setString | skin.setImage | skin.hasSetting as this type of answers do not assist any beginner in understanding the process.

Respectfully,
Dom

Don't know if this answer is in that category, but it looks like the xml you would need to modify is in the skin 720 folder "LoginScreen.xml"
Can't you just use the profile image?
bridgman Wrote:Don't know if this answer is in that category, but it looks like the xml you would need to modify is in the skin 720 folder "LoginScreen.xml"

somewhat, but i suspect it's more my fault; perhaps i did not articulate my goal effectively... nevertheless, as you can see from the screenshot, i have already changed the "LoginScreen.xml" but thank you for your reponse

Hitcher Wrote:Can't you just use the profile image?

I ended up going that route, albeit, it does not seem very elegant... using the picture property seems redundant if i want to keep the profile "card" on the homescreen with the same picture as the "avatar-like" image...

thank you gentlemen for your assistance... i still need to figure out how to add custom settings, however.

i have seen a piece of code that goes something like "skin.setString(string,value)"; could one of you explain what this means?

string: would this be the field/variable that stores the custom setting? if so, is this the same way that it is referenced back?
value: would this be the value of the field/variable

many thanks
Make a button in your settings with <onclick>Skin.SetPath($INFO[System.ProfileName])</onclick>. Then get the path with Skin.String($INFO[System.ProfileName]) in your texture.
`Black Wrote:Make a button in your settings with <onclick>Skin.SetPath($INFO[System.ProfileName])</onclick>. Then get the path with Skin.String($INFO[System.ProfileName]) in your texture.

Thanks for the tip...

As previously mentioned, I ended up using the profile's picture property as the avatar for the time being; take a look...

Image
Dom DXecutioner Wrote:somewhat, but i suspect it's more my fault; perhaps i did not articulate my goal effectively... nevertheless, as you can see from the screenshot, i have already changed the "LoginScreen.xml" but thank you for your reponse

Sorry about that. Thought the pic was a mockup. Looks great by the way.
bridgman Wrote:Sorry about that. Thought the pic was a mockup. Looks great by the way.

worry not... i'm partially responsible for miscommunication and thanks; here's a couple of additional screenshots:

Image

Image

Image

i'm not really sure where i'm going with this, but i have a few ideas...
and a couple of more screenshots...

Image

Image

Image

I really like this view, however, the issue I'm having is that when you scroll, you can see the image loading... perhaps is because the fanart is a bigger file, not really sure though... i'll figure it out, eventually Smile
As you should use the background="true" attribute for thumbs as well as for fanart, you will see them loading at least the first time you scroll.

Btw. my tip from yesterday is not correct, it's Skin.String($INFO[ListItem.Label]) if you want to use the image in the login screen and Skin.String($INFO[System.ProfileName]) if you're actually logged in. Smile
`Black Wrote:As you should use the background="true" attribute for thumbs as well as for fanart, you will see them loading at least the first time you scroll.

Btw. my tip from yesterday is not correct, it's Skin.String($INFO[ListItem.Label]) if you want to use the image in the login screen and Skin.String($INFO[System.ProfileName]) if you're actually logged in. Smile

I'm using the following:
PHP Code:
<texture background="true">$INFO[ListItem.Property(Fanart_Image)]</texture

I can actually see it each time you scroll, whether first time or otherwise... I thought that perhaps there might have been a "thumb" property for the fanart as well.

Many thanks 'Black