Default Backgrounds
#1
I am sorry if this is a really dump question and if it is well documented somewhere but I have not been able to find it.
How would I go about setting up default backgrounds for movies,tvshow and so on where are they mapped ?
Reply
#2
This depends on what you're doing.

If you're modifying an existing skin, chances are they already have a background include with links to various background images, normally contained within the %skin%/backgrounds/ folder, and accessed via special://skin/backgrounds/file.ext (I believe there's performance issues that mean the background images aren't contained within the textures.tbt file...?)

If you're creating a skin from scratch, then you probably want a backgrounds include, with various conditions to decide which background to display. For example, I use the following to decide to display the movies background...

PHP Code:
Window.IsVisible(videolibrary) + [Container.Content(movies) | SubString(Container.FolderPath,videodb://movies,left) | SubString(Container.FolderPath,library://video/movies,left] 

(Not that that's likely the best conditional variability - it's been a long while since I looked at that code. Examine your favourite skin for a likely-better-and-more-up-to-date example)
Reply
#3
thank you for this, this will ge me there only one thing what is the left ? as in
"(Container.FolderPath,videodb://"movies,left") "?
Reply
#4
Left is an optional parameter to SubString and basically means the SubString function will check the beginning of the string for the text instead of anywhere in the string. So in the above example, SubString will check that Container.FolderPath begins with "videodb://movies" and return true if it does.

Another example without the left parameter would be SubString(Container.FolderPath,movies). If you ran that, it would return true. but if you added the left it would return false because Container.FolderPath doesn't begin with movies.

Hope that makes sense.
Reply
#5
that makes alot of sence thank you
Reply

Logout Mark Read Team Forum Stats Members Help
Default Backgrounds0