Talk:System variables for skins

From TrillWiki

Jump to: navigation, search

Contents

[edit] Stub status

We need to test out the ins-and-outs of how often these variables get updated. --Tometheus 00:31, 9 March 2006 (CST)


[edit] System Variable suggestions

[edit] General Suggestions

A way to tell what relative position a panel is in (i.e. if the user has moved the nicklist from the left to the right.)

kwk: visible="(%panel.location% > (%window.width% / 2))"
kwk: visible="(%panel.x% > (%window.width% / 2))"

kwk: i think it would be neat to have buttons effect variables too so you can turn variables on/off, etc without having to do phases, etc

Tom: We should be able to get any thing that us user configurable via Trillian's preferences that effects skins... such as font style / color / size so we can make the skin conform in its other controls. This also could lead to moving things like the contact list colors/fonts into Trilly's preferences.

eh?one: [Due to the complexity of using SystemVariables in entities (see comments below) ] I recommend that cs switch to a different character and leave the % syntax as a deprecated method of perusal. syntax like {window.width} or simply window.width would be ideal.

kwk: The %variable% syntax is used in the language xml files, the events system and the plugin API capability (coming soon). Therefore, it would be weird to change skin to be different. I know its not as pretty, but it is the consistent choice.
eh?one: ah, that makes sense having everything similar. it would be great if we could even use the same system variables and expression syntax in the events system. good luck on a smooth 3.0 release :)

[edit] Specific SystemVariables Suggestions

Insert new items alphabetically please. (Add votes to help prioritize the list)

Variable Description Votes
%ContactList.IconView% The current icon view size. (So we can, for instance, set the font size appropriately) X
%Contact.IsAway% 1 if contact is away (plugin mediums may have different status codes)

Tometheus: This isn't a %text.*% variable, this is a logic variable

X
%iconholder.items% Number of icons on iconholder XXX
%message.buddyicon% Used in sizing of frames if a person does or doesn't have a Buddy Icon. Possibly visability of buttons and such as well.

Tometheus: Note, we don't need this one if we have the variables below. We can just use (%.height%>0) for the logic value.

XX
%message.buddyicon.height% Height of buddy icon, differentiating 96px and 48px icons. No more stupid phases for MSN and AIM... X
%message.buddyicon.width% Width of buddy icon, differentiating 96px and 48px icons. No more stupid phases for MSN and AIM... X
%message.typing% Is the other side typing? Save us from using resizeable switchers that don't exist! XX
%message.secureim% Are we safe? I hope so! X
%message.medium% Returns AIM, ICQ, ..., different from %message.aim% etc

eh?one: might make more sense to use %window.medium% instead since this could be applied to transfer, channel and console windows as well

XX
%rand% A random integer between 0 and 9 X
%System.LargeFonts% Since most skinners won't know how to do the conversion, it would be nice if it was something like &mypixelsize;*%System.LargeFonts% that would leave it normal for smallfonts mode and then do the conversion for largefonts. There should probably be two variables for this.. one for scaling up a control in largefonts mode (i.e. the editbox) and one for scaling down a font size til it matches the smallfonts size (i.e. for a topic control on a static background) This is critical for making skins SF/LF compatible. XX
%System.[OS]% The operating system is [OS].
%System.[colors]% It would be sweet to be able to get the color variables from the system too so a person could make skins conform to the system colors. X
%Text.!ContactID% Contact's actual ID/SN or conference/channel name depending on the window, perhaps aliased to %Text.ChannelName% (to be used in a topic control) XX
%Text.ContactName% Contact's (locally renamed) display name (to be used in a topic control) XX
%Text.ContactNameRemote% Contact's (remote) display name (to be used in a topic control) XX
%Text.ContactStatus% Contact's Current Status X
%Text.!ContactNote% Contains contacts entered note information. could be very useful with multiline topics X
%Text.!LastMessage% The Last message typed... handy for winshade ;-) X
%Text.!LastUser% The Last user who typed message... also handy for winshade
%Text.Users.Ops% Number of Ops
%Text.Users.HalfOps% Number of Non-Ops
%Text.Users.Voice% These are
%Text.Users.Normal% self-explainatory
%Text.Users.Total% Might want them as numbers too, for arithmetic... Procent-Bars sound cool ;-)... X
%Text.UserID% My User ID for this connection (to be used in a topic control) X
%Text.UserName% My User (display) Name for this connection (to be used in a topic control) X
%Text.UserProfile% My Trillian Profile Name (to be used in a topic control) XX
%Text.Topic% Channel/Conference topic X
%Text.!LastTimeStamp% Might want to split this up into several values, not sure... X
%Text.(etc)% See comment below
%Window.Focus% Skin our own focus effects X
%Window.IsChat% for use primarily in topic controls placed in taskbar-buttons. X
%Window.IsTransfer% self-explanitory X
%Window.IsMainWindow% self-explanitory X
%Window.IsChannel% self-explanitory X
%Window.IsConsole% self-explanitory X
%Window.IsTemplate% self-explanitory X
%Window.IsInsideContainer% self-explanitory X
%Window.IsInsideTabbedContainer% self-explanitory X
%Window.Top / Left% This coupled with system metrics variables for the current resolution would give skinners the ability to simulate transparent windows by positioning an image inside the window.
%Panel.Width% panel width
%Panel.Height% panel height
%Area.Width% width of the frame or icontrol
%Area.Height% height of the frame or icontrol
%[topicControl].desired_width% The minimum width required to show the full topic, without scrolling.

[edit] Comments

Tometheus: the %Text.*% variables should be able to make all of the old topic controls obsolete. This way a skin / user can exactly customize what gets put in a topic. (i.e. if I want to put "FantasitcalSkin: %Text.UserID%: %Text.ContactID% - %Text.Topic" as my channel topic, I could)


eh?one: syntax for %Text.*% variables might be better being split up into %Contact.*%, %User.*%, and etc objects, especially if a lot of text variables are to be created (and it seems like we have quite a list as it is)
Tometheus: well, the %Text.*% notation is meant to indicate that it is something to be used inside a topic control (label) as opposed to something you do math with. (Your last addition was a math thing :D ) It can be further divided into notation like: %Text.Contact.Name% or something.
Sjoerd: At the moment, I'm wondering: How would we differentiate between local and remote user? %text.user.remote.*% and %text.user.local.*%
We also need access to information about messages, so it'd be like %text.message.author.*%, * would be localname(John Smith), remotename(Johnie loves someone special), realname(john_smith@hotmail.com). I hope you know what I mean with those. There'll also be %text.message.time.*%, * being: Y, M, D, H, M or S. Also text represenations of those. yyyy would be fourdigit representation. %text.message.timestamp% would return the user's timestamp. And more things like that
We'd also want to access icons, but that might be too much to ask for systemvariables.
If not inside a message control, %text.message.*% would be about the latest message.
There're two sides: I like the ability of having [the current suggested] entries. Just how to reach them is what I'm not sure about. the %text.*%, I agree about. But, I'm thinking more about seperating these entries even more. %text.message.*%, %text.contact.*%, ... The idea is great, I'm just thinking about having sub-subs... It's really a matter of preferences though. Why do you want them to be like one-dotted, and I'd like to have sub-sections... Why? Well... it's open for debate.
My reason for %*.*.*%, I want text. About the user I'm chatting with (contact). I want his realname. %text.contact.realname%.
I want text, about the message. The author to be precise. I want his LocalName. %text.message.author.localname%.
On an extra note, I think I'd like having all lowercase or case-ignoring :)...
Tometheus: So something like: text.user.local.name, text.user.local.ID, text.user.local.profile (the trillian profile name), and text.user.remote.ID (the 'realname'), text.user.remote.name (my display name for her), text.user.remote.remotename (her chosen display name). (With their corresponding text.message entries) ?
Sjoerd: Might be nice for us to IM eachother sometime tomorrow... To not keep adding deeper indents...
But, besides that. Let's just put my thoughts again. You're bang on! Hadn't even considered text.user.local.profile yet! But I think we might dub that one text.user.local.echo, 'localecho'. IM me sometime tomorrow if you'd like: trillian@sjoerdjob.com

Sjoerd: This might also be a huge leap ahead preparing Trillian for the feature request I like most: http://www.ceruleanstudios.com/forums/showthread.php?s=&threadid=60052 If you read what I and Trill and others talked about there... I think you'll like it! This way we could just have a lot of topics all littered around the control! We might be forced to create a multi-line topic control too, so that we can use multiple lines... And have the height of a control resize to make it all fit! But now, I'm going to far! :)

eh?one: using system variables within dtd files may be a bit challenging at first due to their syntax involving the "%" character. for ease of use it is reccommended you setup and use the following entities if you plan to use system variables in dtd files: <!ENTITY % per '&#37;'><!ENTITY per '&#37;'> for simplified usage, i reccommend that cs switch to a different character and leave the % syntax as a deprecated method of perusal. syntax like {window.width} or simply window.width would be ideal

eh?one: it would be cool if %framebar.height% was expanded to include all objects (icontrols, frames, etc) and if %object.visible% property was added.

eh?one: in stixe, a lot of functions are enabled based on the chat medium being used, which is fine for the 5 mediums that come with trillian, but limits future expandibility thru plugins in that new mediums won't be able to add features such as channels. ie: <icontrol source="btnToolbarConference" name="toolbar-invite" visible="%message.aim% + %message.msn% + %message.yahoo%"> should be changed to <icontrol source="btnToolbarConference" name="toolbar-invite" visible="%message.canchannel%">

Personal tools