This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _data = {} | |
if ((plot_id > 0) && (plot_id < 11)) { | |
plot_number = "plot_" + plot_id; | |
} | |
if ((street_id !== null) && (plot_number !== null) && (plot_id !== null)) { | |
adc_print("update plot " + plot_number); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<title>chat</title> | |
</head> | |
<body> | |
{{> entryfield}} | |
{{> messages}} | |
</body> | |
<template name="entryfield"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<title>ffff</title> | |
</head> | |
<body> | |
<h1>ffff</h1> | |
{{> welcome }} | |
{{> persons }} | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Collection: | |
Site = new Meteor.Collection('site'); | |
// Publication: | |
Meteor.publish('site', function () { | |
var host = headers.get(this, 'host'); | |
return Site.find({'domain': host}); | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// helper for all templates. | |
Handlebars.registerHelper("site", function(){ | |
return Site.findOne({}); // Missing the query for the collection here. Need to narrow it down. | |
}); | |
Handlebars.registerHelper("siteTheme", function(){ | |
site = Site.findOne({}); // See comment on line 3. | |
if(typeof site == 'object'){ | |
Session.set('theme', site.theme); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
users = new Meteor.Collection('Users'); | |
Meteor.startup -> | |
Iconv = Meteor.require('iconv').Iconv | |
userIds = '53882537:128' | |
userInfo = HTTP.get( | |
'http://search.baihe.com/mystruts/userInfo.action', | |
{ | |
params: {userIds: userIds} | |
headers: {"Content-Type": "application/json; charset=utf-8"} | |
} |