Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

bugs fixed

  • Loading branch information...
commit 8aa588a9df81378b161f539ccf2d3bd760e7c2a1 1 parent 8b0c709
@muyuan muyuan authored
Showing with 16 additions and 17 deletions.
  1. +10 −5 README.md
  2. +4 −4 controllers/sign.js
  3. +2 −8 public/stylesheets/style.css
View
15 README.md
@@ -1,12 +1,12 @@
##Node Club
###### 介绍
-Node Club 是用 **Node.js****MongoDb** 开发的新型社区软件,界面优雅,功能丰富,已在Node.js 中文技术社区 [CNode](http://cnodejs.org) 得到应用,但你完全可以用它搭建自己的社区。
+Node Club 是用 **Node.js****MongoDb** 开发的新型社区软件,界面优雅,功能丰富,小巧迅速,已在Node.js 中文技术社区 [CNode](http://cnodejs.org) 得到应用,但你完全可以用它搭建自己的社区。
###### 安装部署
// install node npm mongodb
// run mongod
- cd Node-Club
+ cd nodeclub
npm install ./
cp config.default.js config.js
// modify the config file as yours
@@ -15,7 +15,12 @@ Node Club 是用 **Node.js** 和 **MongoDb** 开发的新型社区软件,界
###### 其它
小量修改了两个依赖模块:node-markdown,express
- 1.node-markdown/lib/markdown.js allowedTags 添加 `embed` 标签以支持 flash 视频,allowedAttributes 添加 `embed:'src|quality|width|height|align|allowScriptAccess|allowFullScreen|mode|type'`
- 2.express/node_modules/connect/lib/middleware/csrf.js 添加 `if (req.xhr === true) return next();if (req.body.user_action && req.body.user_action == 'upload_image') return next();`
+ 1.node-markdown/lib/markdown.js allowedTags 添加 `embed` 标签以支持 flash 视频,allowedAttributes 添加:
-
+ embed:'src|quality|width|height|align|allowScriptAccess|allowFullScreen|mode|type'
+
+ 2.express/node_modules/connect/lib/middleware/csrf.js 添加:
+
+ if (req.xhr === true) return next();
+ if (req.body.user_action && req.body.user_action == 'upload_image') return next();
+
View
8 controllers/sign.js
@@ -79,7 +79,7 @@ exports.signup = function(req,res,next){
user.active = false;
user.save(function(err){
if(err) return next(err);
- mail_ctrl.send_active_mail(email,md5(email+'nodeclub'),name,email,function(err,success){
+ mail_ctrl.send_active_mail(email,md5(email+config.session_secret),name,email,function(err,success){
if(success){
res.render('sign/signup', {success:'欢迎加入 ' + config.name + '!我们已给您的注册邮箱发送了一封邮件,请点击里面的链接来激活您的帐号。'});
return;
@@ -144,7 +144,7 @@ exports.active_account = function(req,res,next){
var email = req.query.email;
User.findOne({name:name},function(err,user){
- if(!user || md5(email+'nodeclub') != key){
+ if(!user || md5(email+config.session_secret) != key){
res.render('notify/notify',{error: '信息有误,帐号无法被激活。'});
return;
}
@@ -180,7 +180,7 @@ exports.search_pass = function(req,res,next){
res.render('sign/search_pass', {error:'没有这个电子邮箱。',email:email});
return;
}
- mail_ctrl.send_reset_pass_mail(email,md5(email+'nodeclub'),user.name,function(err,success){
+ mail_ctrl.send_reset_pass_mail(email,md5(email+config.session_secret),user.name,function(err,success){
res.render('notify/notify',{success: '我们已给您填写的电子邮箱发送了一封邮件,请点击里面的链接来重置密码。'});
});
});
@@ -192,7 +192,7 @@ exports.reset_pass = function(req,res,next){
var name = req.query.name;
User.findOne({name:name},function(err,user){
- if(!user || md5(user.email+'nodeclub') != key){
+ if(!user || md5(user.email+config.session_secret) != key){
res.render('notify/notify',{error: '信息有误,密码无法重置。'});
return;
}
View
10 public/stylesheets/style.css
@@ -5,7 +5,7 @@ body,p {
font-family: "Helvetica Neue","Georgia" Helvetica, Arial, sans-serif;
}
#wrapper {
- background: #d0d6db;
+ background: #eee;
}
#main {
width: 960px;
@@ -482,8 +482,6 @@ a.count:hover {
padding-left: 0px;
padding-right: 0px;
border-radius: 0px;
- background-image: none;
- background-color: #323f4b;
}
.navbar .brand {
padding: 10px 10px 0px 20px;
@@ -495,7 +493,7 @@ a.count:hover {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
- background: #d0d6db url('../images/search.png') no-repeat 4px 4px;
+ background: #eee url('../images/search.png') no-repeat 4px 4px;
padding: 4px 5px 4px 22px;
color: #666;
border: 0px;
@@ -512,10 +510,6 @@ a.count:hover {
.navbar .nav>li>a{
font-weight: bold;
}
-.navbar .nav .divider-vertical {
- background-color:#2b3741;
- border-right: 1px solid #2f3b46;
-}
.form-actions {
border-top: none;
}
Please sign in to comment.
Something went wrong with that request. Please try again.