Welcome, Guest
Please Login or Register.    Lost Password?

Capping Months/Years
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Capping Months/Years
#7821
Capping Months/Years 5 Years, 11 Months ago  
With the new XML format, is there a way that we can replace any text with whatever we want? For example, if we're creating a skin which requires months and years to be displayed in text, but wish to replace certain words with our own words.

Example:
(remember these are all text format in the skins)
October --> Halloween
2008 --> Year '08

We would have to replace "20" with "Year '"... Is that possible?

These are just random examples, not the actual text cap I wish to place.
knowbase
Junior Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2008/10/26 10:17 By knowbase.
The administrator has disabled public write access.
 
#7841
Re:Capping Months/Years 5 Years, 11 Months ago  
You can change the contents of normal text elements but it's not possible to change the content of the month or year elements. So basically you could create a script which checks the today's date and changes the text element accordingly but it wouldn't change when the user changes the months in the calendar.
Rainy
Moderator
Posts: 5963
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#7858
Re:Capping Months/Years 5 Years, 10 Months ago  
I'm sorry, I don't understand. Can you provide an example? I don't know that much about scripting yet, but I wanted to know if this was possible before I try coding a skin.
knowbase
Junior Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#7869
Re:Capping Months/Years 5 Years, 10 Months ago  
Here's a very simple example which just changes the month name to "Halloween" if the current date is 31st of October. The example only updates the text on startup/refresh but it would also be possible e.g. to create a timer which checks the current time every now and then and updates the text if necessary.
File Attachment:
File Name: Nahka.zip
File Size: 1607
Rainy
Moderator
Posts: 5963
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#7880
Re:Capping Months/Years 5 Years, 10 Months ago  
Oh I see. What about the year? Can we change that? Would it change only when refreshed?
knowbase
Junior Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2008/11/03 05:19 By knowbase.
The administrator has disabled public write access.
 
#7889
Re:Capping Months/Years 5 Years, 10 Months ago  
The year works exactly the same way as the month. Can you give some more details what exactly are you trying to do? I might be able to help you better.
Rainy
Moderator
Posts: 5963
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12
get the latest posts directly to your desktop