Sourcecode in Site/objectFunctions.js:
1: function constructor(title, alias, creator) {
2: this.title = title;
3: this.alias = alias;
4: this.creator = creator;
5: this.createtime = this.lastoffline = new Date();
6: this.email = creator.email;
7: this.online = 0;
8: this.blocked = 0;
9: this.trusted = creator.trusted;
10: this.enableping = 0;
11:
12: // create initial preferences
13: var prefs = new HopObject();
14: prefs.tagline = null;
15: prefs.discussions = 1;
16: prefs.usercontrib = 0;
17: prefs.archive = 1;
18: prefs.days = 3;
19: // retrieve locale-object from root
20: var loc = root.getLocale();
21: prefs.language = loc.getLanguage();
22: prefs.country = loc.getCountry();
23: prefs.timezone = root.getTimeZone().getID();
24: prefs.longdateformat = "EEEE, dd. MMMM yyyy, h:mm a";
25: prefs.shortdateformat = "yyyy.MM.dd, HH:mm";
26: this.preferences_xml = Xml.writeToString(prefs);
27: return this;
28: }
|