Permalink
Browse files

Converted line endings to UNIX format

  • Loading branch information...
xtremespb committed Jun 1, 2015
1 parent 8a612f0 commit e76ee7d30112815f64ef961d31944ae5e52eea90
Showing with 9,858 additions and 9,858 deletions.
  1. +1 −1 bin/monit.template
  2. +31 −31 config_auth.js
  3. +51 −51 core/parser.js
  4. +25 −25 core/socketsender.js
  5. +665 −665 core/xbbcode.js
  6. +1 −1 modules/auth/install.js
  7. +111 −111 modules/auth/providers/facebook.js
  8. +118 −118 modules/auth/providers/google.js
  9. +102 −102 modules/auth/providers/vk.js
  10. +88 −88 modules/auth/providers/yandex.js
  11. +12 −12 modules/auth/public/modules/auth/css/register.css
  12. +12 −12 modules/auth/public/modules/auth/css/reset.css
  13. +41 −41 modules/auth/public/modules/auth/css/user_profile.css
  14. +481 −481 modules/auth/public/modules/auth/js/profile.js
  15. +70 −70 modules/auth/public/modules/auth/js/pwd.js
  16. +11 −11 modules/auth/views/activate.html
  17. +62 −62 modules/auth/views/login_user.html
  18. +6 −6 modules/auth/views/logout.html
  19. +7 −7 modules/auth/views/mail_change_email_html.html
  20. +5 −5 modules/auth/views/mail_change_email_txt.html
  21. +8 −8 modules/auth/views/mail_register_html.html
  22. +7 −7 modules/auth/views/mail_register_txt.html
  23. +8 −8 modules/auth/views/mail_reset_html.html
  24. +7 −7 modules/auth/views/mail_reset_txt.html
  25. +55 −55 modules/auth/views/password.html
  26. +234 −234 modules/auth/views/profile.html
  27. +88 −88 modules/auth/views/register.html
  28. +46 −46 modules/auth/views/reset.html
  29. +1 −1 modules/billing_accounts/install.js
  30. +1 −1 modules/billing_conf/install.js
  31. +1 −1 modules/billing_frontend/install.js
  32. +1 −1 modules/billing_profiles/install.js
  33. +1 −1 modules/blog/install.js
  34. +166 −166 modules/blog/public/modules/blog/css/frontend.css
  35. +142 −142 modules/blog/public/modules/blog/js/blog_comment.js
  36. +118 −118 modules/blog/public/modules/blog/js/blog_post.js
  37. +75 −75 modules/blog/public/modules/blog/js/wysibb/lang/de.js
  38. +71 −71 modules/blog/public/modules/blog/js/wysibb/lang/fr.js
  39. +67 −67 modules/blog/public/modules/blog/js/wysibb/lang/tr.js
  40. +70 −70 modules/blog/public/modules/blog/js/wysibb/lang/vn.js
  41. +8 −8 modules/blog/views/parts_comment.html
  42. +2 −2 modules/blog/views/parts_comment_deleted.html
  43. +11 −11 modules/blog/views/parts_comments_form.html
  44. +5 −5 modules/blog/views/parts_pagination.html
  45. +11 −11 modules/blog/views/parts_post.html
  46. +82 −82 modules/blog/views/post.html
  47. +25 −25 modules/blog/views/post_view.html
  48. +1 −1 modules/browse/install.js
  49. +1 −1 modules/catalog/install.js
  50. +1 −1 modules/catalog_orders/install.js
  51. +1 −1 modules/catalog_payment_robokassa/install.js
  52. +1 −1 modules/chat/install.js
  53. +1 −1 modules/cp/install.js
  54. +231 −231 modules/cp/public/modules/cp/js/main.js
  55. +1 −1 modules/feedback/install.js
  56. +1 −1 modules/files/install.js
  57. +1 −1 modules/invites/install.js
  58. +1 −1 modules/lang/install.js
  59. +1 −1 modules/log/install.js
  60. +1 −1 modules/maintenance/install.js
  61. +1 −1 modules/menu/install.js
  62. +1 −1 modules/pages/install.js
  63. +1 −1 modules/parts/install.js
  64. +1 −1 modules/portfolio/install.js
  65. +1 −1 modules/search/install.js
  66. +1 −1 modules/settings/install.js
  67. +1 −1 modules/siteconf/install.js
  68. +1 −1 modules/social/install.js
  69. +131 −131 modules/social/public/modules/social/css/frontend.css
  70. +6 −6 modules/social/public/modules/social/js/jquery.typing.min.js
  71. +831 −831 modules/social/public/modules/social/js/social.js
  72. +113 −113 modules/social/views/social.html
  73. +1 −1 modules/support/install.js
  74. +1 −1 modules/templates/install.js
  75. +136 −136 modules/textedit/admin.js
  76. +1 −1 modules/textedit/install.js
  77. +3 −3 modules/textedit/module.js
  78. +8 −8 modules/textedit/public/modules/textedit/css/main.css
  79. +121 −121 modules/textedit/public/modules/textedit/js/main.js
  80. +48 −48 modules/textedit/views/editor.html
  81. +27 −27 modules/textedit/views/error.html
  82. +1 −1 modules/user/install.js
  83. +1 −1 modules/warehouse/install.js
  84. +1 −1 modules/warehouse_conf/install.js
  85. +302 −302 public/css/taracot_default.css
  86. +11 −11 public/css/taracot_default_ie.css
  87. +705 −705 public/js/ckeditor/CHANGES.md
  88. +1,264 −1,264 public/js/ckeditor/LICENSE.md
  89. +1 −1 public/js/ckeditor/adapters/jquery.js
  90. +49 −49 public/js/ckeditor/build-config.js
  91. +1 −1 public/js/ckeditor/ckeditor.js
  92. +134 −134 public/js/ckeditor/contents.css
  93. +3 −3 public/js/ckeditor/lang/en.js
  94. +3 −3 public/js/ckeditor/lang/ru.js
  95. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js
  96. +25 −25 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt
  97. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/af.js
  98. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js
  99. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js
  100. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js
  101. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js
  102. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js
  103. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/da.js
  104. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/de.js
  105. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/el.js
  106. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js
  107. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/en.js
  108. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js
  109. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/es.js
  110. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/et.js
  111. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js
  112. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js
  113. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js
  114. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js
  115. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js
  116. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js
  117. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/he.js
  118. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js
  119. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js
  120. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js
  121. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/id.js
  122. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/it.js
  123. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js
  124. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/km.js
  125. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js
  126. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js
  127. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js
  128. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js
  129. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js
  130. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js
  131. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js
  132. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js
  133. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/no.js
  134. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js
  135. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js
  136. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js
  137. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js
  138. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js
  139. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/si.js
  140. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js
  141. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js
  142. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js
  143. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js
  144. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js
  145. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js
  146. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/th.js
  147. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js
  148. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js
  149. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js
  150. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js
  151. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js
  152. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js
  153. +1 −1 public/js/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js
  154. +1 −1 public/js/ckeditor/plugins/base64image/dialogs/base64image.js
  155. +1 −1 public/js/ckeditor/plugins/clipboard/dialogs/paste.js
  156. +1 −1 public/js/ckeditor/plugins/codemirror/js/beautify.min.js
  157. +1 −1 public/js/ckeditor/plugins/codemirror/js/codemirror.addons.min.js
  158. +1 −1 public/js/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js
  159. +1 −1 public/js/ckeditor/plugins/codemirror/js/codemirror.min.js
  160. +1 −1 public/js/ckeditor/plugins/codemirror/js/codemirror.mode.bbcode.min.js
  161. +1 −1 public/js/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js
  162. +1 −1 public/js/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js
  163. +1 −1 public/js/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js
  164. +1 −1 public/js/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js
  165. +1 −1 public/js/ckeditor/plugins/colordialog/dialogs/colordialog.js
  166. +1 −1 public/js/ckeditor/plugins/dialog/dialogDefinition.js
  167. +1 −1 public/js/ckeditor/plugins/div/dialogs/div.js
  168. +1 −1 public/js/ckeditor/plugins/find/dialogs/find.js
  169. +1 −1 public/js/ckeditor/plugins/flash/dialogs/flash.js
  170. +1 −1 public/js/ckeditor/plugins/forms/dialogs/button.js
  171. +1 −1 public/js/ckeditor/plugins/forms/dialogs/checkbox.js
  172. +1 −1 public/js/ckeditor/plugins/forms/dialogs/form.js
  173. +1 −1 public/js/ckeditor/plugins/forms/dialogs/hiddenfield.js
  174. +1 −1 public/js/ckeditor/plugins/forms/dialogs/radio.js
  175. +1 −1 public/js/ckeditor/plugins/forms/dialogs/select.js
  176. +1 −1 public/js/ckeditor/plugins/forms/dialogs/textarea.js
  177. +1 −1 public/js/ckeditor/plugins/forms/dialogs/textfield.js
  178. +1 −1 public/js/ckeditor/plugins/iframe/dialogs/iframe.js
  179. +1 −1 public/js/ckeditor/plugins/image/dialogs/image.js
  180. +1 −1 public/js/ckeditor/plugins/link/dialogs/anchor.js
  181. +1 −1 public/js/ckeditor/plugins/link/dialogs/link.js
  182. +1 −1 public/js/ckeditor/plugins/liststyle/dialogs/liststyle.js
  183. +1 −1 public/js/ckeditor/plugins/pages/dialogs/pages.js
  184. +1 −1 public/js/ckeditor/plugins/pages/lang/de.js
  185. +1 −1 public/js/ckeditor/plugins/pages/lang/en.js
  186. +1 −1 public/js/ckeditor/plugins/pages/lang/ru.js
  187. +1 −1 public/js/ckeditor/plugins/pages/plugin.js
  188. +1 −1 public/js/ckeditor/plugins/pastefromword/filter/default.js
  189. +28 −28 public/js/ckeditor/plugins/scayt/LICENSE.md
  190. +25 −25 public/js/ckeditor/plugins/scayt/README.md
  191. +1 −1 public/js/ckeditor/plugins/scayt/dialogs/options.js
  192. +71 −71 public/js/ckeditor/plugins/scayt/dialogs/toolbar.css
  193. +1 −1 public/js/ckeditor/plugins/smiley/dialogs/smiley.js
  194. +20 −20 public/js/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt
  195. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/af.js
  196. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/ar.js
  197. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/bg.js
  198. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/ca.js
  199. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/cs.js
  200. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/cy.js
  201. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/da.js
  202. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/de.js
  203. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/el.js
  204. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js
  205. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/en.js
  206. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/eo.js
  207. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/es.js
  208. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/et.js
  209. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/fa.js
  210. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/fi.js
  211. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js
  212. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/fr.js
  213. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/gl.js
  214. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/he.js
  215. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/hr.js
  216. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/hu.js
  217. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/id.js
  218. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/it.js
  219. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/ja.js
  220. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/km.js
  221. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/ku.js
  222. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/lt.js
  223. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/lv.js
  224. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/nb.js
  225. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/nl.js
  226. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/no.js
  227. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/pl.js
  228. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js
  229. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/pt.js
  230. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/ru.js
  231. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/si.js
  232. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/sk.js
  233. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/sl.js
  234. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/sq.js
  235. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/sv.js
  236. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/th.js
  237. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/tr.js
  238. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/tt.js
  239. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/ug.js
  240. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/uk.js
  241. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/vi.js
  242. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js
  243. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/lang/zh.js
  244. +1 −1 public/js/ckeditor/plugins/specialchar/dialogs/specialchar.js
  245. +1 −1 public/js/ckeditor/plugins/table/dialogs/table.js
  246. +1 −1 public/js/ckeditor/plugins/tabletools/dialogs/tableCell.js
  247. +1 −1 public/js/ckeditor/plugins/templates/dialogs/templates.js
  248. +1 −1 public/js/ckeditor/plugins/templates/templates/default.js
  249. +28 −28 public/js/ckeditor/plugins/wsc/LICENSE.md
  250. +25 −25 public/js/ckeditor/plugins/wsc/README.md
  251. +66 −66 public/js/ckeditor/plugins/wsc/dialogs/ciframe.html
  252. +52 −52 public/js/ckeditor/plugins/wsc/dialogs/tmpFrameset.html
  253. +82 −82 public/js/ckeditor/plugins/wsc/dialogs/wsc.css
  254. +1 −1 public/js/ckeditor/plugins/wsc/dialogs/wsc.js
  255. +1 −1 public/js/ckeditor/plugins/wsc/dialogs/wsc_ie.js
  256. +111 −111 public/js/ckeditor/styles.js
  257. +35 −35 public/js/helper.js
  258. +280 −280 public/js/jquery.medved.table.js
  259. +4 −4 public/js/jquery.min.js
  260. +480 −480 public/js/json2.js
  261. +995 −995 public/js/jstorage.js
  262. +9 −9 public/js/moment.min.js
  263. +2 −2 public/js/socket.io.min.js
  264. +4 −4 version.js
View
@@ -1,7 +1,7 @@
check process nodejs with pidfile "/var/run/!{root.pname}.pid"
start program = "/etc/init.d/taracot-!{root.pname} start"
stop program = "/etc/init.d/taracot-!{root.pname} stop"
if failed port true protocol HTTP
if failed port !{root.taracot_port} protocol HTTP
request /
with timeout 10 seconds
then restart
View
@@ -1,31 +1,31 @@
module.exports = {
'facebook': {
'clientID': 'your client ID here',
'clientSecret': 'your client secret here',
'requestURL': 'https://www.facebook.com/dialog/oauth?client_id=[client_id]&redirect_uri=[redirect_uri]&response_type=code&scope=email',
'callbackURL': 'https://demo.taracot.org/auth/facebook'
},
'google': {
'clientID': 'your client ID here',
'clientSecret': 'your client secret here',
'requestURL': 'https://accounts.google.com/o/oauth2/auth?redirect_uri=[redirect_uri]&response_type=code&client_id=[client_id]&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile',
'callbackURL': 'https://demo.taracot.org/auth/google'
},
'yandex': {
'clientID': 'your client ID here',
'clientSecret': 'your client secret here',
'requestURL': 'https://oauth.yandex.ru/authorize?response_type=code&client_id=[client_id]',
'callbackURL': 'https://demo.taracot.org/auth/yandex'
},
'vk': {
'clientID': 'your client ID here',
'clientSecret': 'your client secret here',
'requestURL': 'http://oauth.vk.com/authorize?client_id=[client_id]&redirect_uri=[redirect_uri]&response_type=code',
'callbackURL': 'https://demo.taracot.org/auth/vk'
}
};
module.exports = {
'facebook': {
'clientID': 'your client ID here',
'clientSecret': 'your client secret here',
'requestURL': 'https://www.facebook.com/dialog/oauth?client_id=[client_id]&redirect_uri=[redirect_uri]&response_type=code&scope=email',
'callbackURL': 'https://demo.taracot.org/auth/facebook'
},
'google': {
'clientID': 'your client ID here',
'clientSecret': 'your client secret here',
'requestURL': 'https://accounts.google.com/o/oauth2/auth?redirect_uri=[redirect_uri]&response_type=code&client_id=[client_id]&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile',
'callbackURL': 'https://demo.taracot.org/auth/google'
},
'yandex': {
'clientID': 'your client ID here',
'clientSecret': 'your client secret here',
'requestURL': 'https://oauth.yandex.ru/authorize?response_type=code&client_id=[client_id]',
'callbackURL': 'https://demo.taracot.org/auth/yandex'
},
'vk': {
'clientID': 'your client ID here',
'clientSecret': 'your client secret here',
'requestURL': 'http://oauth.vk.com/authorize?client_id=[client_id]&redirect_uri=[redirect_uri]&response_type=code',
'callbackURL': 'https://demo.taracot.org/auth/vk'
}
};
View
@@ -1,51 +1,51 @@
var htmlToText = require('html-to-text'),
snowball = require('snowball');
module.exports = function(app) {
var parser = {
html2text: function(html) {
return htmlToText.fromString(html);
},
words: function(text, title) {
var _desc = text.replace(/\n/g, ' ').replace(/\s{2,}/g, ' ').split(/ /);
if (title) text += ' ' + title;
var _words = text.replace(/\n/g, ' ').replace(/[^0-9a-z\u0400-\u04FF\s\-'`]/gi, '').replace(/ё/g, 'е').replace(/Ё/g, 'Е').toLowerCase().replace(/\s{2,}/g, ' ').split(/ /);
var _check = {},
words = [],
desc = [];
for (var i = 0; i < _words.length; i++)
if (!_check[_words[i]] && _words[i].length > 2) {
_check[_words[i]] = 1;
words.push(_words[i]);
}
if (_desc.length > 50) {
desc = _desc.slice(0, 49);
desc.push('...');
} else {
desc = _desc;
}
var _desc_str = _desc.join(' ');
if (_desc_str.indexOf('!{root.') > -1) _desc_str = _desc_str.substring(0, _desc_str.indexOf('!{root.'));
return {
words: words.join(' '),
desc: _desc_str
};
},
stem_all: function(words) {
var stemmer;
for (var i = 0; i < words.length; i++) {
if (words[i].match(/[\u0400-\u04FF]/gi)) {
stemmer = new snowball('Russian');
} else {
stemmer = new snowball('English');
}
stemmer.setCurrent(words[i]);
stemmer.stem();
if (!words[i].match(/[0-9]/)) words[i] = stemmer.getCurrent();
}
return words;
}
};
return parser;
};
var htmlToText = require('html-to-text'),
snowball = require('snowball');
module.exports = function(app) {
var parser = {
html2text: function(html) {
return htmlToText.fromString(html);
},
words: function(text, title) {
var _desc = text.replace(/\n/g, ' ').replace(/\s{2,}/g, ' ').split(/ /);
if (title) text += ' ' + title;
var _words = text.replace(/\n/g, ' ').replace(/[^0-9a-z\u0400-\u04FF\s\-'`]/gi, '').replace(/ё/g, 'е').replace(/Ё/g, 'Е').toLowerCase().replace(/\s{2,}/g, ' ').split(/ /);
var _check = {},
words = [],
desc = [];
for (var i = 0; i < _words.length; i++)
if (!_check[_words[i]] && _words[i].length > 2) {
_check[_words[i]] = 1;
words.push(_words[i]);
}
if (_desc.length > 50) {
desc = _desc.slice(0, 49);
desc.push('...');
} else {
desc = _desc;
}
var _desc_str = _desc.join(' ');
if (_desc_str.indexOf('!{root.') > -1) _desc_str = _desc_str.substring(0, _desc_str.indexOf('!{root.'));
return {
words: words.join(' '),
desc: _desc_str
};
},
stem_all: function(words) {
var stemmer;
for (var i = 0; i < words.length; i++) {
if (words[i].match(/[\u0400-\u04FF]/gi)) {
stemmer = new snowball('Russian');
} else {
stemmer = new snowball('English');
}
stemmer.setCurrent(words[i]);
stemmer.stem();
if (!words[i].match(/[0-9]/)) words[i] = stemmer.getCurrent();
}
return words;
}
};
return parser;
};
View
@@ -1,25 +1,25 @@
var crypto = require('crypto');
module.exports = function(app) {
var redis_client = app.get('redis_client');
var socketsender = {
emit: function(userid, msgtype, msg) {
if (!userid || !msgtype || !msg) return;
var io = app.get('socket.io');
var sid = userid + crypto.createHash('md5').update(app.get('config').salt + '.' + userid).digest('hex');
redis_client.get(app.get('config').redis.prefix + 'socketio_sessions_' + sid, function(err, _sessions) {
var sessions = [];
if (_sessions) sessions = _sessions.split(',');
for (var i = 0; i < sessions.length; i++) {
var _msg = {
session: sessions[i],
msg: msg,
msgtype: msgtype
};
redis_client.publish(app.get('config').redis.prefix + 'medved_ipc', JSON.stringify(_msg));
}
});
}
};
return socketsender;
};
var crypto = require('crypto');
module.exports = function(app) {
var redis_client = app.get('redis_client');
var socketsender = {
emit: function(userid, msgtype, msg) {
if (!userid || !msgtype || !msg) return;
var io = app.get('socket.io');
var sid = userid + crypto.createHash('md5').update(app.get('config').salt + '.' + userid).digest('hex');
redis_client.get(app.get('config').redis.prefix + 'socketio_sessions_' + sid, function(err, _sessions) {
var sessions = [];
if (_sessions) sessions = _sessions.split(',');
for (var i = 0; i < sessions.length; i++) {
var _msg = {
session: sessions[i],
msg: msg,
msgtype: msgtype
};
redis_client.publish(app.get('config').redis.prefix + 'medved_ipc', JSON.stringify(_msg));
}
});
}
};
return socketsender;
};
Oops, something went wrong.

0 comments on commit e76ee7d

Please sign in to comment.