Browse files

clean up files.

  • Loading branch information...
1 parent 0734ae1 commit 2218224521d32ad2992c9906fcaadcbb99a9cafb @beenhero committed May 19, 2009
Showing with 14 additions and 10,486 deletions.
  1. +13 −0 db/migrate/20081204075833_create_games.rb
  2. 0 ...nity_engine/assets → public/plugin_assets/community_engine}/stylesheets/bak_reset-fonts-grids.css
  3. 0 ...ugins/community_engine/assets → public/plugin_assets/community_engine}/stylesheets/bak_screen.css
  4. 0 ...or/plugins/community_engine/assets → public/plugin_assets/community_engine}/stylesheets/fonts.css
  5. 0 ...or/plugins/community_engine/assets → public/plugin_assets/community_engine}/stylesheets/forum.css
  6. 0 ...or/plugins/community_engine/assets → public/plugin_assets/community_engine}/stylesheets/grids.css
  7. 0 ...or/plugins/community_engine/assets → public/plugin_assets/community_engine}/stylesheets/print.css
  8. 0 ...plugins/community_engine/assets → public/plugin_assets/community_engine}/stylesheets/prototip.css
  9. 0 ...or/plugins/community_engine/assets → public/plugin_assets/community_engine}/stylesheets/reset.css
  10. +1 −0 vendor/plugins/community_engine
  11. +0 −2 vendor/plugins/community_engine/.gitignore
  12. +0 −4 vendor/plugins/community_engine/CHANGELOG
  13. +0 −30 vendor/plugins/community_engine/LICENSE
  14. +0 −239 vendor/plugins/community_engine/README.markdown
  15. +0 −22 vendor/plugins/community_engine/Rakefile
  16. +0 −7 vendor/plugins/community_engine/about.yml
  17. +0 −15 vendor/plugins/community_engine/app/controllers/activities_controller.rb
  18. +0 −44 vendor/plugins/community_engine/app/controllers/admin_controller.rb
  19. +0 −82 vendor/plugins/community_engine/app/controllers/ads_controller.rb
  20. +0 −15 vendor/plugins/community_engine/app/controllers/application.rb
  21. +0 −162 vendor/plugins/community_engine/app/controllers/base_controller.rb
  22. +0 −121 vendor/plugins/community_engine/app/controllers/categories_controller.rb
  23. +0 −202 vendor/plugins/community_engine/app/controllers/clippings_controller.rb
  24. +0 −35 vendor/plugins/community_engine/app/controllers/comment_sweeper.rb
  25. +0 −123 vendor/plugins/community_engine/app/controllers/comments_controller.rb
  26. +0 −72 vendor/plugins/community_engine/app/controllers/contests_controller.rb
  27. +0 −68 vendor/plugins/community_engine/app/controllers/events_controller.rb
  28. +0 −29 vendor/plugins/community_engine/app/controllers/favorite_sweeper.rb
  29. +0 −36 vendor/plugins/community_engine/app/controllers/favorites_controller.rb
  30. +0 −72 vendor/plugins/community_engine/app/controllers/forums_controller.rb
  31. +0 −127 vendor/plugins/community_engine/app/controllers/friendships_controller.rb
  32. +0 −76 vendor/plugins/community_engine/app/controllers/homepage_features_controller.rb
  33. +0 −56 vendor/plugins/community_engine/app/controllers/invitations_controller.rb
  34. +0 −69 vendor/plugins/community_engine/app/controllers/messages_controller.rb
  35. +0 −68 vendor/plugins/community_engine/app/controllers/metro_areas_controller.rb
  36. +0 −19 vendor/plugins/community_engine/app/controllers/moderators_controller.rb
  37. +0 −20 vendor/plugins/community_engine/app/controllers/monitorships_controller.rb
  38. +0 −107 vendor/plugins/community_engine/app/controllers/offerings_controller.rb
  39. +0 −201 vendor/plugins/community_engine/app/controllers/photos_controller.rb
  40. +0 −36 vendor/plugins/community_engine/app/controllers/post_sweeper.rb
  41. +0 −247 vendor/plugins/community_engine/app/controllers/posts_controller.rb
  42. +0 −135 vendor/plugins/community_engine/app/controllers/sb_posts_controller.rb
  43. +0 −43 vendor/plugins/community_engine/app/controllers/sessions_controller.rb
  44. +0 −21 vendor/plugins/community_engine/app/controllers/sitemap_controller.rb
  45. +0 −96 vendor/plugins/community_engine/app/controllers/skills_controller.rb
  46. +0 −72 vendor/plugins/community_engine/app/controllers/statistics_controller.rb
  47. +0 −38 vendor/plugins/community_engine/app/controllers/taggable_sweeper.rb
  48. +0 −62 vendor/plugins/community_engine/app/controllers/tags_controller.rb
  49. +0 −63 vendor/plugins/community_engine/app/controllers/theme_controller.rb
  50. +0 −120 vendor/plugins/community_engine/app/controllers/topics_controller.rb
  51. +0 −396 vendor/plugins/community_engine/app/controllers/users_controller.rb
  52. +0 −16 vendor/plugins/community_engine/app/controllers/vote_sweeper.rb
  53. +0 −24 vendor/plugins/community_engine/app/controllers/votes_controller.rb
  54. +0 −9 vendor/plugins/community_engine/app/controllers/xmlrpc_controller.rb
  55. +0 −2 vendor/plugins/community_engine/app/helpers/ads_helper.rb
  56. +0 −331 vendor/plugins/community_engine/app/helpers/base_helper.rb
  57. +0 −2 vendor/plugins/community_engine/app/helpers/categories_helper.rb
  58. +0 −2 vendor/plugins/community_engine/app/helpers/clippings_helper.rb
  59. +0 −2 vendor/plugins/community_engine/app/helpers/comments_helper.rb
  60. +0 −2 vendor/plugins/community_engine/app/helpers/contests_helper.rb
  61. +0 −31 vendor/plugins/community_engine/app/helpers/forums_helper.rb
  62. +0 −14 vendor/plugins/community_engine/app/helpers/friendships_helper.rb
  63. +0 −2 vendor/plugins/community_engine/app/helpers/homepage_features_helper.rb
  64. +0 −2 vendor/plugins/community_engine/app/helpers/invitations_helper.rb
  65. +0 −2 vendor/plugins/community_engine/app/helpers/metro_areas_helper.rb
  66. +0 −2 vendor/plugins/community_engine/app/helpers/moderators_helper.rb
  67. +0 −2 vendor/plugins/community_engine/app/helpers/monitorships_helper.rb
  68. +0 −2 vendor/plugins/community_engine/app/helpers/offerings_helper.rb
  69. +0 −2 vendor/plugins/community_engine/app/helpers/photos_helper.rb
  70. +0 −22 vendor/plugins/community_engine/app/helpers/posts_helper.rb
  71. +0 −2 vendor/plugins/community_engine/app/helpers/sb_posts_helper.rb
  72. +0 −2 vendor/plugins/community_engine/app/helpers/sessions_helper.rb
  73. +0 −7 vendor/plugins/community_engine/app/helpers/sitemap_helper.rb
  74. +0 −2 vendor/plugins/community_engine/app/helpers/skills_helper.rb
  75. +0 −2 vendor/plugins/community_engine/app/helpers/statistics_helper.rb
  76. +0 −2 vendor/plugins/community_engine/app/helpers/tags_helper.rb
  77. +0 −2 vendor/plugins/community_engine/app/helpers/topics_helper.rb
  78. +0 −12 vendor/plugins/community_engine/app/helpers/users_helper.rb
  79. +0 −43 vendor/plugins/community_engine/app/models/ad.rb
  80. +0 −3 vendor/plugins/community_engine/app/models/asset.rb
  81. +0 −20 vendor/plugins/community_engine/app/models/category.rb
  82. +0 −13 vendor/plugins/community_engine/app/models/choice.rb
  83. +0 −80 vendor/plugins/community_engine/app/models/clipping.rb
  84. +0 −5 vendor/plugins/community_engine/app/models/clipping_image.rb
  85. +0 −105 vendor/plugins/community_engine/app/models/comment.rb
  86. +0 −46 vendor/plugins/community_engine/app/models/contest.rb
  87. +0 −24 vendor/plugins/community_engine/app/models/country.rb
  88. +0 −35 vendor/plugins/community_engine/app/models/event.rb
  89. +0 −47 vendor/plugins/community_engine/app/models/favorite.rb
  90. +0 −38 vendor/plugins/community_engine/app/models/forum.rb
  91. +0 −54 vendor/plugins/community_engine/app/models/friendship.rb
  92. +0 −3 vendor/plugins/community_engine/app/models/friendship_status.rb
  93. +0 −13 vendor/plugins/community_engine/app/models/homepage_feature.rb
  94. +0 −36 vendor/plugins/community_engine/app/models/invitation.rb
  95. +0 −20 vendor/plugins/community_engine/app/models/message.rb
  96. +0 −10 vendor/plugins/community_engine/app/models/metro_area.rb
  97. +0 −7 vendor/plugins/community_engine/app/models/moderatorship.rb
  98. +0 −5 vendor/plugins/community_engine/app/models/monitorship.rb
  99. +0 −7 vendor/plugins/community_engine/app/models/offering.rb
  100. +0 −61 vendor/plugins/community_engine/app/models/photo.rb
  101. +0 −44 vendor/plugins/community_engine/app/models/poll.rb
  102. +0 −187 vendor/plugins/community_engine/app/models/post.rb
  103. +0 −5 vendor/plugins/community_engine/app/models/role.rb
  104. +0 −42 vendor/plugins/community_engine/app/models/sb_post.rb
  105. +0 −10 vendor/plugins/community_engine/app/models/skill.rb
  106. +0 −3 vendor/plugins/community_engine/app/models/state.rb
  107. +0 −32 vendor/plugins/community_engine/app/models/tag.rb
  108. +0 −73 vendor/plugins/community_engine/app/models/topic.rb
  109. +0 −459 vendor/plugins/community_engine/app/models/user.rb
  110. +0 −108 vendor/plugins/community_engine/app/models/user_notifier.rb
  111. +0 −10 vendor/plugins/community_engine/app/models/user_observer.rb
  112. +0 −19 vendor/plugins/community_engine/app/models/vote.rb
  113. +0 −41 vendor/plugins/community_engine/app/views/activities/_activity.html.haml
  114. +0 −14 vendor/plugins/community_engine/app/views/activities/_icon.haml
  115. +0 −14 vendor/plugins/community_engine/app/views/activities/index.html.haml
  116. +0 −14 vendor/plugins/community_engine/app/views/activities/network.html.haml
  117. +0 −31 vendor/plugins/community_engine/app/views/admin/contests.html.haml
  118. +0 −4 vendor/plugins/community_engine/app/views/admin/messages.html.haml
  119. +0 −40 vendor/plugins/community_engine/app/views/admin/users.html.haml
  120. +0 −46 vendor/plugins/community_engine/app/views/ads/edit.html.haml
  121. +0 −33 vendor/plugins/community_engine/app/views/ads/index.html.haml
  122. +0 −44 vendor/plugins/community_engine/app/views/ads/new.html.haml
  123. +0 −36 vendor/plugins/community_engine/app/views/ads/show.html.haml
  124. +0 −16 vendor/plugins/community_engine/app/views/base/_about_nav.html.haml
  125. +0 −19 vendor/plugins/community_engine/app/views/base/_homepage_banner_message.html.haml
  126. +0 −6 vendor/plugins/community_engine/app/views/base/about.html.haml
  127. +0 −8 vendor/plugins/community_engine/app/views/base/advertise.html.haml
  128. +0 −24 vendor/plugins/community_engine/app/views/base/faq.html.haml
  129. +0 −5 vendor/plugins/community_engine/app/views/base/plaxo.haml
  130. +0 −40 vendor/plugins/community_engine/app/views/base/site_index.html.haml
  131. +0 −21 vendor/plugins/community_engine/app/views/base/teaser.html.haml
  132. +0 −9 vendor/plugins/community_engine/app/views/categories/_tips.html.haml
  133. +0 −34 vendor/plugins/community_engine/app/views/categories/edit.html.haml
  134. +0 −30 vendor/plugins/community_engine/app/views/categories/index.html.haml
  135. +0 −9 vendor/plugins/community_engine/app/views/categories/new.html.haml
  136. +0 −43 vendor/plugins/community_engine/app/views/categories/show.html.haml
  137. +0 −18 vendor/plugins/community_engine/app/views/clippings/_clipping.haml
  138. +0 −3 vendor/plugins/community_engine/app/views/clippings/_images.html.haml
  139. +0 −26 vendor/plugins/community_engine/app/views/clippings/_meta.html.haml
  140. +0 −25 vendor/plugins/community_engine/app/views/clippings/edit.html.haml
  141. +0 −34 vendor/plugins/community_engine/app/views/clippings/index.html.haml
  142. +0 −1 vendor/plugins/community_engine/app/views/clippings/load_images_from_uri.rjs
  143. +0 −28 vendor/plugins/community_engine/app/views/clippings/new.html.haml
  144. +0 −134 vendor/plugins/community_engine/app/views/clippings/new_clipping.html.haml
  145. +0 −56 vendor/plugins/community_engine/app/views/clippings/show.html.haml
  146. +0 −34 vendor/plugins/community_engine/app/views/clippings/site_index.html.haml
  147. +0 −37 vendor/plugins/community_engine/app/views/comments/_comment.html.haml
  148. +0 −43 vendor/plugins/community_engine/app/views/comments/_comment_form.html.haml
  149. +0 −18 vendor/plugins/community_engine/app/views/comments/index.html.haml
  150. +0 −36 vendor/plugins/community_engine/app/views/contests/edit.rhtml
  151. +0 −12 vendor/plugins/community_engine/app/views/contests/index.html.haml
  152. +0 −36 vendor/plugins/community_engine/app/views/contests/new.rhtml
  153. +0 −33 vendor/plugins/community_engine/app/views/contests/show.rhtml
  154. +0 −24 vendor/plugins/community_engine/app/views/events/edit.html.haml
  155. +0 −29 vendor/plugins/community_engine/app/views/events/index.html.haml
  156. +0 −24 vendor/plugins/community_engine/app/views/events/new.html.haml
  157. +0 −21 vendor/plugins/community_engine/app/views/events/show.html.haml
  158. +0 −5 vendor/plugins/community_engine/app/views/favorites/_favorite.haml
  159. +0 −17 vendor/plugins/community_engine/app/views/favorites/create.rjs
  160. +0 −14 vendor/plugins/community_engine/app/views/favorites/destroy.rjs
  161. +0 −10 vendor/plugins/community_engine/app/views/favorites/index.html.haml
  162. +0 −13 vendor/plugins/community_engine/app/views/favorites/show.haml
  163. +0 −19 vendor/plugins/community_engine/app/views/forums/_form.html.haml
  164. +0 −8 vendor/plugins/community_engine/app/views/forums/edit.html.haml
  165. +0 −68 vendor/plugins/community_engine/app/views/forums/index.html.haml
  166. +0 −6 vendor/plugins/community_engine/app/views/forums/new.html.haml
  167. +0 −85 vendor/plugins/community_engine/app/views/forums/show.html.haml
  168. +0 −14 vendor/plugins/community_engine/app/views/friendships/_friendship.html.haml
  169. +0 −14 vendor/plugins/community_engine/app/views/friendships/_friendships.rhtml
  170. +0 −14 vendor/plugins/community_engine/app/views/friendships/accepted.html.haml
  171. +0 −8 vendor/plugins/community_engine/app/views/friendships/denied.html.haml
  172. +0 −3 vendor/plugins/community_engine/app/views/friendships/index.rhtml
  173. +0 −29 vendor/plugins/community_engine/app/views/friendships/index.rxml
  174. +0 −7 vendor/plugins/community_engine/app/views/friendships/pending.html.haml
  175. +0 −12 vendor/plugins/community_engine/app/views/friendships/show.html.haml
  176. +0 −35 vendor/plugins/community_engine/app/views/homepage_features/edit.rhtml
  177. +0 −30 vendor/plugins/community_engine/app/views/homepage_features/index.html.haml
  178. +0 −34 vendor/plugins/community_engine/app/views/homepage_features/new.rhtml
  179. +0 −33 vendor/plugins/community_engine/app/views/homepage_features/show.rhtml
  180. +0 −16 vendor/plugins/community_engine/app/views/invitations/index.rhtml
  181. +0 −35 vendor/plugins/community_engine/app/views/invitations/new.html.haml
  182. +0 −8 vendor/plugins/community_engine/app/views/layouts/_post.rxml
  183. +0 −42 vendor/plugins/community_engine/app/views/layouts/application.html.haml
  184. +0 −30 vendor/plugins/community_engine/app/views/layouts/beta.html.haml
  185. +0 −61 vendor/plugins/community_engine/app/views/layouts/test_application.html.haml
  186. +0 −36 vendor/plugins/community_engine/app/views/messages/_inbox.html.haml
  187. +0 −32 vendor/plugins/community_engine/app/views/messages/_sent.html.haml
  188. +0 −9 vendor/plugins/community_engine/app/views/messages/_sidebar_nav.html.haml
  189. +0 −7 vendor/plugins/community_engine/app/views/messages/index.html.haml
  190. +0 −27 vendor/plugins/community_engine/app/views/messages/new.html.haml
  191. +0 −27 vendor/plugins/community_engine/app/views/messages/show.html.haml
  192. +0 −16 vendor/plugins/community_engine/app/views/metro_areas/edit.html.haml
  193. +0 −28 vendor/plugins/community_engine/app/views/metro_areas/index.html.haml
  194. +0 −16 vendor/plugins/community_engine/app/views/metro_areas/new.html.haml
  195. +0 −22 vendor/plugins/community_engine/app/views/metro_areas/show.html.haml
  196. +0 −14 vendor/plugins/community_engine/app/views/moderators/_toggle.rhtml
  197. +0 −5 vendor/plugins/community_engine/app/views/moderators/create.rjs
  198. +0 −1 vendor/plugins/community_engine/app/views/moderators/destroy.rjs
  199. +0 −4 vendor/plugins/community_engine/app/views/monitorships/create.rjs
  200. +0 −4 vendor/plugins/community_engine/app/views/monitorships/destroy.rjs
  201. +0 −47 vendor/plugins/community_engine/app/views/offerings/_chooser.html.haml
  202. +0 −14 vendor/plugins/community_engine/app/views/photos/_manage_photos.haml
  203. +0 −22 vendor/plugins/community_engine/app/views/photos/_show_image_list.haml
  204. +0 −31 vendor/plugins/community_engine/app/views/photos/edit.html.haml
  205. +0 −27 vendor/plugins/community_engine/app/views/photos/index.html.haml
  206. +0 −9 vendor/plugins/community_engine/app/views/photos/index.rxml
  207. +0 −5 vendor/plugins/community_engine/app/views/photos/manage_photos.rjs
  208. +0 −75 vendor/plugins/community_engine/app/views/photos/new.html.haml
  209. +0 −8 vendor/plugins/community_engine/app/views/photos/recent.html.haml
  210. +0 −43 vendor/plugins/community_engine/app/views/photos/show.html.haml
  211. +0 −34 vendor/plugins/community_engine/app/views/photos/slideshow.rhtml
  212. +0 −15 vendor/plugins/community_engine/app/views/polls/_edit.haml
  213. +0 −4 vendor/plugins/community_engine/app/views/polls/_excerpt.haml
  214. +0 −10 vendor/plugins/community_engine/app/views/polls/_new.haml
  215. +0 −36 vendor/plugins/community_engine/app/views/polls/_poll_ui.haml
  216. +0 −8 vendor/plugins/community_engine/app/views/polls/_polls_sidebar.haml
  217. +0 −20 vendor/plugins/community_engine/app/views/posts/_author_profile.html.haml
  218. +0 −12 vendor/plugins/community_engine/app/views/posts/_favorited_post.haml
  219. +0 −29 vendor/plugins/community_engine/app/views/posts/_post.html.haml
  220. +0 −29 vendor/plugins/community_engine/app/views/posts/_send_to_friend.rhtml
  221. +0 −1 vendor/plugins/community_engine/app/views/posts/_sidebar_post.html.haml
  222. +0 −44 vendor/plugins/community_engine/app/views/posts/edit.html.haml
  223. +0 −19 vendor/plugins/community_engine/app/views/posts/featured.haml
  224. +0 −23 vendor/plugins/community_engine/app/views/posts/index.html.haml
  225. +0 −42 vendor/plugins/community_engine/app/views/posts/manage.html.haml
  226. +0 −65 vendor/plugins/community_engine/app/views/posts/new.html.haml
  227. +0 −35 vendor/plugins/community_engine/app/views/posts/popular.html.haml
  228. +0 −21 vendor/plugins/community_engine/app/views/posts/preview.rhtml
  229. +0 −29 vendor/plugins/community_engine/app/views/posts/recent.html.haml
  230. +0 −83 vendor/plugins/community_engine/app/views/posts/show.html.haml
  231. +0 −13 vendor/plugins/community_engine/app/views/sb_posts/_dummy_forum_post.rhtml
  232. +0 −30 vendor/plugins/community_engine/app/views/sb_posts/_edit.rhtml
  233. +0 −13 vendor/plugins/community_engine/app/views/sb_posts/edit.html.erb
  234. +0 −6 vendor/plugins/community_engine/app/views/sb_posts/edit.js.rjs
  235. +0 −61 vendor/plugins/community_engine/app/views/sb_posts/index.rhtml
  236. +0 −20 vendor/plugins/community_engine/app/views/sb_posts/index.rxml
  237. +0 −59 vendor/plugins/community_engine/app/views/sb_posts/monitored.rhtml
  238. +0 −15 vendor/plugins/community_engine/app/views/sb_posts/monitored.rxml
  239. +0 −3 vendor/plugins/community_engine/app/views/sb_posts/update.js.rjs
  240. +0 −19 vendor/plugins/community_engine/app/views/sessions/new.html.haml
  241. +0 −16 vendor/plugins/community_engine/app/views/shared/_admin_nav.html.haml
  242. +0 −15 vendor/plugins/community_engine/app/views/shared/_bio_help.html.haml
  243. +0 −12 vendor/plugins/community_engine/app/views/shared/_footer_content.html.haml
  244. +0 −37 vendor/plugins/community_engine/app/views/shared/_header.html.haml
  245. +0 −32 vendor/plugins/community_engine/app/views/shared/_location_chooser.html.haml
  246. +0 −14 vendor/plugins/community_engine/app/views/shared/_login_sidebar.html.haml
  247. +0 −8 vendor/plugins/community_engine/app/views/shared/_messages.html.haml
  248. +0 −40 vendor/plugins/community_engine/app/views/shared/_scripts_and_styles.html.haml
  249. +0 −30 vendor/plugins/community_engine/app/views/shared/_user_menu.html.haml
  250. +0 −20 vendor/plugins/community_engine/app/views/sitemap/index.html.haml
  251. +0 −28 vendor/plugins/community_engine/app/views/sitemap/index.xml.builder
  252. +0 −7 vendor/plugins/community_engine/app/views/skills/_sidebar_menu.html.haml
  253. +0 −13 vendor/plugins/community_engine/app/views/skills/edit.html.haml
  254. +0 −25 vendor/plugins/community_engine/app/views/skills/index.html.haml
  255. +0 −9 vendor/plugins/community_engine/app/views/skills/new.html.haml
  256. +0 −15 vendor/plugins/community_engine/app/views/skills/show.html.haml
  257. +0 −33 vendor/plugins/community_engine/app/views/statistics/activities.rxml
  258. +0 −66 vendor/plugins/community_engine/app/views/statistics/index.html.haml
  259. +0 −28 vendor/plugins/community_engine/app/views/tags/index.html.haml
  260. +0 −62 vendor/plugins/community_engine/app/views/tags/show.html.haml
  261. +0 −27 vendor/plugins/community_engine/app/views/topics/_form.html.haml
  262. +0 −22 vendor/plugins/community_engine/app/views/topics/_recent_topics_sidebar.haml
  263. +0 −7 vendor/plugins/community_engine/app/views/topics/edit.html.haml
  264. +0 −19 vendor/plugins/community_engine/app/views/topics/new.html.haml
  265. +0 −141 vendor/plugins/community_engine/app/views/topics/show.html.haml
  266. +0 −16 vendor/plugins/community_engine/app/views/topics/show.rxml
  267. +0 −11 vendor/plugins/community_engine/app/views/user_notifier/activation.rhtml
  268. +0 −9 vendor/plugins/community_engine/app/views/user_notifier/comment_notice.rhtml
  269. +0 −15 vendor/plugins/community_engine/app/views/user_notifier/follow_up_comment_notice.rhtml
  270. +0 −8 vendor/plugins/community_engine/app/views/user_notifier/forgot_username.rhtml
  271. +0 −8 vendor/plugins/community_engine/app/views/user_notifier/friendship_request.rhtml
  272. +0 −8 vendor/plugins/community_engine/app/views/user_notifier/message_notification.rhtml
  273. +0 −14 vendor/plugins/community_engine/app/views/user_notifier/new_forum_post_notice.rhtml
  274. +0 −32 vendor/plugins/community_engine/app/views/user_notifier/post_recommendation.rhtml
  275. +0 −7 vendor/plugins/community_engine/app/views/user_notifier/reset_password.rhtml
  276. +0 −14 vendor/plugins/community_engine/app/views/user_notifier/signup_invitation.rhtml
  277. +0 −16 vendor/plugins/community_engine/app/views/user_notifier/signup_notification.rhtml
  278. +0 −39 vendor/plugins/community_engine/app/views/users/_dashboard_nav.html.haml
  279. +0 −49 vendor/plugins/community_engine/app/views/users/_profile_user_info_sidebar.html.haml
  280. +0 −21 vendor/plugins/community_engine/app/views/users/_search_options.html.haml
  281. +0 −8 vendor/plugins/community_engine/app/views/users/_sidebar_user.html.haml
  282. +0 −1 vendor/plugins/community_engine/app/views/users/_skill.html.haml
  283. +0 −30 vendor/plugins/community_engine/app/views/users/_user.html.haml
  284. +0 −42 vendor/plugins/community_engine/app/views/users/dashboard.html.haml
  285. +0 −80 vendor/plugins/community_engine/app/views/users/edit.html.haml
  286. +0 −53 vendor/plugins/community_engine/app/views/users/edit_account.html.haml
  287. +0 −13 vendor/plugins/community_engine/app/views/users/forgot_password.html.haml
  288. +0 −13 vendor/plugins/community_engine/app/views/users/forgot_username.html.haml
  289. +0 −18 vendor/plugins/community_engine/app/views/users/index.html.haml
  290. +0 −35 vendor/plugins/community_engine/app/views/users/invite.html.haml
  291. +0 −52 vendor/plugins/community_engine/app/views/users/new.html.haml
  292. +0 −13 vendor/plugins/community_engine/app/views/users/resend_activation.html.haml
  293. +0 −105 vendor/plugins/community_engine/app/views/users/show.html.haml
  294. +0 −9 vendor/plugins/community_engine/app/views/users/signup_completed.html.haml
  295. +0 −28 vendor/plugins/community_engine/app/views/users/statistics.html.haml
  296. +0 −68 vendor/plugins/community_engine/app/views/users/welcome_about.html.haml
  297. +0 −22 vendor/plugins/community_engine/app/views/users/welcome_invite.html.haml
  298. +0 −26 vendor/plugins/community_engine/app/views/users/welcome_photo.html.haml
  299. +0 −6 vendor/plugins/community_engine/app/views/votes/create.rjs
  300. BIN vendor/plugins/community_engine/assets/charts/charts.swf
Sorry, we could not display the entire diff because too many files (1,825) changed.
View
13 db/migrate/20081204075833_create_games.rb
@@ -0,0 +1,13 @@
+class CreateGames < ActiveRecord::Migration
+ def self.up
+ create_table :games do |t|
+ t.integer :platform_id, :genre_id, :company_id
+ t.string :description, :unique_id, :esrb, :cero, :pegi
+ end
+ add_index :games, [:platform_id, :genre_id, :company_id]
+ end
+
+ def self.down
+ drop_table :games
+ end
+end
View
0 ...ets/stylesheets/bak_reset-fonts-grids.css → ...ine/stylesheets/bak_reset-fonts-grids.css
File renamed without changes.
View
0 ..._engine/assets/stylesheets/bak_screen.css → ...mmunity_engine/stylesheets/bak_screen.css
File renamed without changes.
View
0 ...unity_engine/assets/stylesheets/fonts.css → ...ts/community_engine/stylesheets/fonts.css
File renamed without changes.
View
0 ...unity_engine/assets/stylesheets/forum.css → ...ts/community_engine/stylesheets/forum.css
File renamed without changes.
View
0 ...unity_engine/assets/stylesheets/grids.css → ...ts/community_engine/stylesheets/grids.css
File renamed without changes.
View
0 ...unity_engine/assets/stylesheets/print.css → ...ts/community_engine/stylesheets/print.css
File renamed without changes.
View
0 ...ty_engine/assets/stylesheets/prototip.css → ...community_engine/stylesheets/prototip.css
File renamed without changes.
View
0 ...unity_engine/assets/stylesheets/reset.css → ...ts/community_engine/stylesheets/reset.css
File renamed without changes.
1 vendor/plugins/community_engine
@@ -0,0 +1 @@
+Subproject commit ae9c167e2d996e4a06ea74a0b3d342d3a51267e8
View
2 vendor/plugins/community_engine/.gitignore
@@ -1,2 +0,0 @@
-.DS_Store
-
View
4 vendor/plugins/community_engine/CHANGELOG
@@ -1,4 +0,0 @@
-= 0.10.7
-
-* Updating CE to be compatible with Rails 2.1.2
-* Lots of il8n refactoring, mainly using symbol tokens instead of string for localization in views.
View
30 vendor/plugins/community_engine/LICENSE
@@ -1,30 +0,0 @@
-The "CommunityEngine" plugin is distributed under the MIT license (which
-is the same license that Ruby on Rails is distributed under). This license
-does not include any code found in the "engine_plugins" directory. Those plugins
-are each licensed individually and their licenses should be reviewed before
-you use this application. Most plugins are also licensed under the MIT
-license, but some may not be. If a plugin does not
-have a license, due diligence should be taken to find the license on the
-plugin's website.
-
-
-The MIT license:
-Copyright (c) 2008 Curbly, LLC
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
View
239 vendor/plugins/community_engine/README.markdown
@@ -1,239 +0,0 @@
-CommunityEngine
-================
-
-Information at: [http://www.communityengine.org](http://www.communityengine.org)
-
-Requirements:
-
- - RAILS VERSION 2.1.2
- - The engines plugin for Rails 2.1.2
- - ImageMagick
- - Several gems:
- rmagick
- hpricot
- htmlentities
- RedCloth
- rake 0.8.3
- haml
- aws-s3 (if using s3 for photos)
-
-Getting CommunityEngine Running
---------------------------------
-1. From the command line
-
- $ rails site_name (create a rails app if you don't have one already)
-
-
-2. Install the engines plugin:
-
- $ script/plugin install git://github.com/lazyatom/engines.git
-
-3. Put the community engine plugin into plugins directory (use one of the following methods):
-
- * If you're not using git, and just want to add the source files:
-
- Download a tarball from https://github.com/bborn/communityengine/tarball/master and unpack it into /vendor/plugins/community_engine
-
- * Using git, make a shallow clone of the community_engine repository:
-
- $ git clone --depth 1 git://github.com/bborn/communityengine.git vendor/plugins/community_engine
-
- * If you want to keep your community_engine plugin up to date using git, you'll have to add it as a submodule:
-
- http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#submodules
-
-4. Create your database and modify your `config/database.yml` appropriately.
-
-5. Delete public/index.html (if you haven't already)
-
-6. Modify your environment.rb as indicated below:
-
- ## environment.rb should look something like this:
- RAILS_GEM_VERSION = '2.1.2' unless defined? RAILS_GEM_VERSION
- require File.join(File.dirname(__FILE__), 'boot')
- require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')
-
- Rails::Initializer.run do |config|
- #resource_hacks required here to ensure routes like /:login_slug work
- config.plugins = [:engines, :community_engine, :white_list, :all]
- config.plugin_paths += ["#{RAILS_ROOT}/vendor/plugins/community_engine/engine_plugins"]
-
- ... Your stuff here ...
- end
- # Include your application configuration below
- require "#{RAILS_ROOT}/vendor/plugins/community_engine/engine_config/boot.rb"
-
-7. Modify each environment file (`development.rb`, `test.rb`, and `production.rb`) as indicated below:
-
- # development.rb, production.rb, and test.rb should include something like:
- APP_URL = "http://localhost:3000" (or whatever your URL will be for that particular environment)
-
-8. Modify your routes.rb as indicated below:
-
- # Add this after any of your own existing routes, but before the default rails routes:
- map.from_plugin :community_engine
- # Install the default routes as the lowest priority.
- map.connect ':controller/:action/:id'
- map.connect ':controller/:action/:id.:format'
-
-9. Generate the community engine migrations:
-
- $ script/generate plugin_migration
-
-10. From the command line:
-
- $ rake db:migrate
-
-11. You may need to change these lines in `application.rb` (if you're not using cookie sessions):
-
- # See ActionController::RequestForgeryProtection for details
- # Uncomment the :secret if you're not using the cookie session store
- protect_from_forgery # :secret => 'your_secret_string'
-
-12. Run tests (remember, you must run `rake test` before you can run the community_engine tests):
-
- $ rake test
- $ rake community_engine:test
-
-13. Start your server and check out your site!
-
- $ mongrel_rails start
- or
- $ ./script/server
-
-
-
-Optional Configuration
-======================
-
-
-To override the default configuration, create an `application.yml` file in `RAILS_ROOT/config`
-
-The application configuration defined in this file overrides the one defined in `/community_engine/engine_config/application.yml`
-
-This is where you can change commonly used configuration variables, like `AppConfig.community_name`, etc.
-
-This YAML file will get converted into an OpenStruct, giving you things like `AppConfig.community_name`, `AppConfig.support_email`, etc.
-
-Photo Uploading
----------------
-
-By default CommunityEngine uses the filesystem to store photos.
-
-To use Amazon S3 as the backend for your file uploads, you'll need the aws-s3 gem installed, and you'll need to add a file called `amazon_s3.yml` to the application's root config directory (examples are in `/community_engine/sample_files`).
-
-You'll need to change your configuration in your `application.yml` to tell CommunityEngine to use s3 as the photo backend.
-
-Finally, you'll need an S3 account for S3 photo uploading.
-
-
-Create an s3.yml file in RAILS_ROOT/config
-------------------------------------------------------
-
-CommunityEngine includes the `s3.rake` tasks for backing up your site to S3. If you plan on using these, you'll need to add a file in `RAILS_ROOT/config/s3.yml`. (Sample in `sample_files/s3.yml`)
-
-Roles
-------
-
-CommunityEngine Users have a Role (by default, it's admin, moderator, or member)
-
-To set a user as an admin, you must manually change his `role_id` through the database.
-Once logged in as an admin, you'll be able to toggle other users between moderator and member (just go to their profile page and look on the sidebar.)
-
-Admins and moderators can edit and delete other users posts.
-
-There is a rake task to make an existing user into an admin:
-
- rake community_engine:make_admin email=user@foo.com
-
-(Pass in the e-mail of the user you'd like to make an admin)
-
-
-Themes
-------
-
-To create a theme:
-
-1. Add a 'themes' directory in RAILS_ROOT with the following structure:
-
- /RAILS_ROOT
- /themes
- /your_theme_name
- /views
- /images
- /stylesheets
- /javascripts
-
-2. Add `theme: your_theme_name` to your `application.yml` (you'll have to restart your server after doing this)
-
-3. Customize your theme. For example: you can create a `/RAILS_ROOT/theme/your_theme_name/views/shared/_scripts_and_styles.html.haml` to override the default one, and pull in your theme's styleshees.
-
- To get at the stylesheets (or images, or javascripts) from your theme, just add /theme/ when referencing the resource, for example:
-
- = stylesheet_link_tag 'theme/screen' # this will reference the screen.css stylesheet within the selected theme's stylesheets directory.
-
-*Note: when running in production mode, theme assets (images, js, and stylesheets) are automatically copied to you public directory (avoiding a Rails request on each image load).*
-
-
-Localization
-------------
-
-Localization is done via an extended version of [Globalite](http://code.google.com/p/globalite/).
-
-Strings and Symbols respond to the `.l` method that allows for a look up of the symbol (or a symbolized version of the string) into a strings file which is stored in yaml.
-
-For complex strings with substitutions, Symbols respond to the `.l` method with a hash passed as an argument, for example:
-
- :welcome.l :name => current_user.name
-
-And in your language file you'd have:
-
- welcome: "Welcome {name}"
-
-To customize the language, or add a new language create a new yaml file in `RAILS_ROOT/lang/ui`.
-The name of the file should be `LANG-LOCALE.yml` (`e.g. en-US.yml` or `es-PR`)
-The language only file (`es.yml`) will support all locales.
-
-To wrap all localized strings in a `<span>` that shows their localization key, put this in your `environment.rb` (don't forget to take it out in production!):
-
- Globalite.show_localization_keys_for_debugging = true if RAILS_ENV.eql?('development')
-
-Note, this will affect the look and feel of buttons. You can highlight what is localized by using the `span.localized` style (look in `screen.css`)
-
-
-
-Other notes
------------
-
-Any views you create in your app directory will override those in `community_engine/app/views`.
-For example, you could create `RAILS_ROOT/app/views/layouts/application.html.haml` and have that include your own stylesheets, etc.
-
-You can also override CommunityEngine's controllers by creating identically-named controllers in your application's `app/controllers` directory.
-
-
-Gotchas
--------
-
-1. I get errors running rake! Error: (wrong number of arguments (3 for 1)
- - make sure you have the latest version of rake
-2. I get test errors after upgrading to Rails 2.1
- - make sure you have upgraded to the Engines 2.1 plugin, and modified your environment.rb to use Rails 2.1.
-
-
-Contributors - Thanks! :)
--------------------------
-
-- Bryan Kearney - localization
-- Alex Nesbitt - forgot password bugs
-- Alejandro Raiczyk - Spanish localization
-- [Fritz Thielemann](http://github.com/fritzek) - German localization, il8n
-- [Oleg Ivanov](http://github.com/morhekil) - `acts_as_taggable_on_steroids`
-- David Fugere - French localization
-- Barry Paul - routes refactoring
-
-
-To Do
-----
-* Track down `<RangeError ... is recycled object>` warnings on tests (anyone know where that's coming from?)
-
-Bug tracking is via [Lighthouse](http://communityengine.lighthouseapp.com)
View
22 vendor/plugins/community_engine/Rakefile
@@ -1,22 +0,0 @@
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-desc 'Default: run unit tests.'
-task :default => :test
-
-desc 'Test the community_engine plugin.'
-Rake::TestTask.new(:test) do |t|
- t.libs << 'lib'
- t.pattern = 'test/**/*_test.rb'
- t.verbose = true
-end
-
-desc 'Generate documentation for the community_engine plugin.'
-Rake::RDocTask.new(:rdoc) do |rdoc|
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = 'CommunityEngine'
- rdoc.options << '--line-numbers' << '--inline-source'
- rdoc.rdoc_files.include('README')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
View
7 vendor/plugins/community_engine/about.yml
@@ -1,7 +0,0 @@
-author: Bruno Bornsztein
-email: bruno.bornsztein@gmail.com
-homepage: http://www.missingmethod.com
-summary: A social networking engine
-description: Adds basic social networking capabilities to your existing application, including users, blogs, photos, clippings, favorites, and more.
-license: MIT
-version: 0.10.7
View
15 vendor/plugins/community_engine/app/controllers/activities_controller.rb
@@ -1,15 +0,0 @@
-class ActivitiesController < BaseController
- before_filter :login_required, :except => :index
- before_filter :find_user, :except => :index
- before_filter :require_current_user, :except => :index
-
- def network
- @activities = @user.network_activity(:size => 15, :current => params[:page])
- end
-
- def index
- @activities = User.recent_activity(:size => 30, :current => params[:page], :limit => 1000)
- @popular_tags = popular_tags(30, ' count DESC')
- end
-
-end
View
44 vendor/plugins/community_engine/app/controllers/admin_controller.rb
@@ -1,44 +0,0 @@
-class AdminController < BaseController
- before_filter :admin_required
-
- def contests
- @contests = Contest.find(:all)
-
- respond_to do |format|
- format.html # index.rhtml
- format.xml { render :xml => @contests.to_xml }
- end
- end
-
- def messages
- @user = current_user
- @messages = Message.find(:all, :page => {:current => params[:page], :size => 50}, :order => 'created_at DESC')
- end
-
- def users
- cond = Caboose::EZ::Condition.new
- if params['login']
- cond.login =~ "%#{params['login']}%"
- end
- if params['email']
- cond.email =~ "%#{params['email']}%"
- end
-
- @users = User.recent.find(:all, :page => {:current => params[:page], :size => 100}, :conditions => cond.to_sql)
- end
-
- def activate_user
- user = User.find(params[:id])
- user.activate
- flash[:notice] = :the_user_was_activated.l
- redirect_to :action => :users
- end
-
- def deactivate_user
- user = User.find(params[:id])
- user.deactivate
- flash[:notice] = "The user was deactivated".l
- redirect_to :action => :users
- end
-
-end
View
82 vendor/plugins/community_engine/app/controllers/ads_controller.rb
@@ -1,82 +0,0 @@
-class AdsController < BaseController
- before_filter :login_required
- before_filter :admin_required
-
- # GET /ads
- # GET /ads.xml
- def index
- @ads = Ad.find(:all)
-
- respond_to do |format|
- format.html # index.rhtml
- format.xml { render :xml => @ads.to_xml }
- end
- end
-
- # GET /ads/1
- # GET /ads/1.xml
- def show
- @ad = Ad.find(params[:id])
-
- respond_to do |format|
- format.html # show.rhtml
- format.xml { render :xml => @ad.to_xml }
- end
- end
-
- # GET /ads/new
- def new
- @ad = Ad.new
- end
-
- # GET /ads/1;edit
- def edit
- @ad = Ad.find(params[:id])
- end
-
- # POST /ads
- # POST /ads.xml
- def create
- @ad = Ad.new(params[:ad])
-
- respond_to do |format|
- if @ad.save
- flash[:notice] = :ad_was_successfully_created.l
- format.html { redirect_to ad_url(@ad) }
- format.xml { head :created, :location => ad_url(@ad) }
- else
- format.html { render :action => "new" }
- format.xml { render :xml => @ad.errors.to_xml }
- end
- end
- end
-
- # PUT /ads/1
- # PUT /ads/1.xml
- def update
- @ad = Ad.find(params[:id])
-
- respond_to do |format|
- if @ad.update_attributes(params[:ad])
- flash[:notice] = :ad_was_successfully_updated.l
- format.html { redirect_to ad_url(@ad) }
- format.xml { head :ok }
- else
- format.html { render :action => "edit" }
- format.xml { render :xml => @ad.errors.to_xml }
- end
- end
- end
-
- # DELETE /ads/1
- # DELETE /ads/1.xml
- def destroy
- @ad = Ad.find(params[:id])
- @ad.destroy
-
- respond_to do |format|
- format.html { redirect_to ads_url }
- format.xml { head :ok }
- end
- end
-end
View
15 vendor/plugins/community_engine/app/controllers/application.rb
@@ -1,15 +0,0 @@
-class ApplicationController < ActionController::Base
- # helper_method :commentable_url
- #
- # def commentable_url(comment)
- # if comment.recipient
- # if comment.commentable_type != "User"
- # polymorphic_url([comment.recipient, comment.commentable])+"#comment_#{comment.id}"
- # else
- # user_url(comment.recipient)+"#comment_#{comment.id}"
- # end
- # else
- # polymorphic_url(comment.commentable)+"#comment_#{comment.id}"
- # end
- # end
-end
View
162 vendor/plugins/community_engine/app/controllers/base_controller.rb
@@ -1,162 +0,0 @@
-require 'hpricot'
-require 'open-uri'
-require 'pp'
-
-class BaseController < ApplicationController
- include AuthenticatedSystem
- include LocalizedApplication
- around_filter :set_locale
- before_filter :login_from_cookie
- skip_before_filter :verify_authenticity_token, :only => :footer_content
- helper_method :commentable_url
-
- caches_action :site_index, :footer_content, :if => Proc.new{|c| c.cache_action? }
- def cache_action?
- !logged_in? && controller_name.eql?('base') && params[:format].blank?
- end
-
- if AppConfig.closed_beta_mode
- before_filter :beta_login_required, :except => [:teaser]
- end
-
- def teaser
- redirect_to home_path and return if logged_in?
- render :layout => 'beta'
- end
-
- def rss_site_index
- redirect_to :controller => 'base', :action => 'site_index', :format => 'rss'
- end
-
- def plaxo
- render :layout => false
- end
-
- def site_index
- @posts = Post.find_recent(:limit => 20)
-
- @rss_title = "#{AppConfig.community_name} "+:recent_posts.l
- @rss_url = rss_url
- respond_to do |format|
- format.html { get_additional_homepage_data }
- format.rss do
- render_rss_feed_for(@posts, { :feed => {:title => "#{AppConfig.community_name} "+:recent_posts.l, :link => recent_url},
- :item => {:title => :title,
- :link => Proc.new {|post| user_post_url(post.user, post)},
- :description => :post,
- :pub_date => :published_at}
- })
- end
- end
- end
-
- def footer_content
- get_recent_footer_content
- render :partial => 'shared/footer_content' and return
- end
-
- def homepage_features
- @homepage_features = HomepageFeature.find_features
- @homepage_features.shift
- render :partial => 'homepage_feature', :collection => @homepage_features and return
- end
-
- def about
- end
-
- def advertise
- end
-
- def faq
- end
-
- def css_help
- end
-
- def admin_required
- current_user && current_user.admin? ? true : access_denied
- end
-
- def find_user
- if @user = User.active.find(params[:user_id] || params[:id])
- @is_current_user = (@user && @user.eql?(current_user))
- unless logged_in? || @user.profile_public?
- flash.now[:error] = :this_users_profile_is_not_public_youll_need_to_create_an_account_and_log_in_to_access_it.l
- redirect_to :controller => 'sessions', :action => 'new'
- end
- return @user
- else
- flash.now[:error] = :please_log_in.l
- redirect_to :controller => 'sessions', :action => 'new'
- return false
- end
- end
-
- def require_current_user
- @user ||= User.find(params[:user_id] || params[:id] )
- unless admin? || (@user && (@user.eql?(current_user)))
- redirect_to :controller => 'sessions', :action => 'new' and return false
- end
- return @user
- end
-
- def popular_tags(limit = nil, order = ' tags.name ASC', type = nil)
- sql = "SELECT tags.id, tags.name, count(*) AS count
- FROM taggings, tags
- WHERE tags.id = taggings.tag_id "
- sql += " AND taggings.taggable_type = '#{type}'" unless type.nil?
- sql += " GROUP BY tag_id"
- sql += " ORDER BY #{order}"
- sql += " LIMIT #{limit}" if limit
- Tag.find_by_sql(sql).sort{ |a,b| a.name.downcase <=> b.name.downcase}
- end
-
-
- def get_recent_footer_content
- @recent_clippings = Clipping.find_recent(:limit => 10)
- @recent_photos = Photo.find_recent(:limit => 10)
- @recent_comments = Comment.find_recent(:limit => 13)
- @popular_tags = popular_tags(30, ' count DESC')
- @recent_activity = User.recent_activity(:size => 15, :current => 1)
-
- end
-
- def get_additional_homepage_data
- @sidebar_right = true
- @homepage_features = HomepageFeature.find_features
- @homepage_features_data = @homepage_features.collect {|f| [f.id, f.public_filename(:large) ] }
-
- @active_users = User.find_by_activity({:limit => 5, :require_avatar => false})
- @featured_writers = User.find_featured
-
- @featured_posts = Post.find_featured
-
- @topics = Topic.find(:all, :limit => 5, :order => "replied_at DESC")
-
- @active_contest = Contest.get_active
- @popular_posts = Post.find_popular({:limit => 10})
- @popular_polls = Poll.find_popular(:limit => 8)
- end
-
-
- def commentable_url(comment)
- if comment.recipient && comment.commentable
- if comment.commentable_type != "User"
- polymorphic_url([comment.recipient, comment.commentable])+"#comment_#{comment.id}"
- elsif comment
- user_url(comment.recipient)+"#comment_#{comment.id}"
- end
- elsif comment.commentable
- polymorphic_url(comment.commentable)+"#comment_#{comment.id}"
- end
- end
-
- def commentable_comments_url(commentable)
- if commentable.owner && commentable.owner != commentable
- "#{polymorphic_path([commentable.owner, commentable])}#comments"
- else
- "#{polymorphic_path(commentable)}#comments"
- end
- end
-
-end
View
121 vendor/plugins/community_engine/app/controllers/categories_controller.rb
@@ -1,121 +0,0 @@
-class CategoriesController < BaseController
- before_filter :login_required, :except => [:show, :most_viewed, :rss]
- before_filter :admin_required, :only => [:new, :edit, :update, :create, :destroy, :index]
-
- # GET /categories
- # GET /categories.xml
- def index
- @categories = Category.find(:all)
-
- respond_to do |format|
- format.html # index.rhtml
- format.xml { render :xml => @categories.to_xml }
- end
- end
-
- # GET /categories/1
- # GET /categories/1.xml
- def show
- @category = Category.find(params[:id])
- @sidebar_right = true
-
- cond = Caboose::EZ::Condition.new
- cond.category_id == @category.id
- order = (params[:popular] ? "view_count #{params[:popular]}": "published_at DESC")
-
- @posts = Post.find :all, :page => {:current => params[:page]}, :order => order, :conditions => cond.to_sql, :include => :tags
-
-
- @popular_posts = @category.posts.find(:all, :limit => 10, :order => "view_count DESC")
- @popular_polls = Poll.find_popular_in_category(@category)
-
- @rss_title = "#{AppConfig.community_name}: #{@category.name} "+:posts.l
- @rss_url = formatted_category_path(@category, :rss)
-
- @active_users = User.find(:all,
- :include => :posts,
- :limit => 5,
- :conditions => ["posts.category_id = ? AND posts.published_at > ?", @category.id, 14.days.ago],
- :order => "users.view_count DESC"
- )
-
- respond_to do |format|
- format.html # show.rhtml
- format.rss {
- render_rss_feed_for(@posts, {:feed => {:title => "#{AppConfig.community_name}: #{@category.name} "+:posts.l, :link => category_url(@category)},
- :item => {:title => :title,
- :link => Proc.new {|post| user_post_url(post.user, post)},
- :description => :post,
- :pub_date => :published_at} })
- }
- end
- end
-
- # GET /categories/new
- def new
- @category = Category.new
- end
-
- # GET /categories/1;edit
- def edit
- @category = Category.find(params[:id])
- end
-
- # POST /categories
- # POST /categories.xml
- def create
- @category = Category.new(params[:category])
-
- respond_to do |format|
- if @category.save
- flash[:notice] = :category_was_successfully_created.l
-
- format.html { redirect_to category_url(@category) }
- format.xml do
- headers["Location"] = category_url(@category)
- render :nothing => true, :status => "201 Created"
- end
- else
- format.html { render :action => "new" }
- format.xml { render :xml => @category.errors.to_xml }
- end
- end
- end
-
- # PUT /categories/1
- # PUT /categories/1.xml
- def update
- @category = Category.find(params[:id])
-
- respond_to do |format|
- if @category.update_attributes(params[:category])
- format.html { redirect_to category_url(@category) }
- format.xml { render :nothing => true }
- else
- format.html { render :action => "edit" }
- format.xml { render :xml => @category.errors.to_xml }
- end
- end
- end
-
- # DELETE /categories/1
- # DELETE /categories/1.xml
- def destroy
- @category = Category.find(params[:id])
- @category.destroy
-
- respond_to do |format|
- format.html { redirect_to categories_url }
- format.xml { render :nothing => true }
- end
- end
-
- def show_tips
- @category = Category.find(params[:id] )
- render :partial => "/categories/tips", :locals => {:category => @category}
- rescue ActiveRecord::RecordNotFound
- render :partial => "/categories/tips", :locals => {:category => nil}
- end
-
-
-end
View
202 vendor/plugins/community_engine/app/controllers/clippings_controller.rb
@@ -1,202 +0,0 @@
-class ClippingsController < BaseController
- before_filter :login_required, :only => [:new, :edit, :update, :create, :destroy, :new_clipping]
- before_filter :find_user, :only => [:new, :edit, :index, :show]
- before_filter :require_current_user, :only => [:new, :edit, :update, :destroy]
- uses_tiny_mce(:options => AppConfig.default_mce_options, :only => [:show,:new_clipping])
-
- cache_sweeper :taggable_sweeper, :only => [:create, :update, :destroy]
-
- def site_index
- cond = Caboose::EZ::Condition.new
- if params[:tag_name]
- cond.append ['tags.name = ?', params[:tag_name]]
- end
-
- cond.append ['created_at > ?', 4.weeks.ago] unless params[:recent]
- order = (params[:recent] ? "created_at DESC" : "clippings.favorited_count DESC")
-
-
- @clippings = Clipping.find(:all,
- :page => {:size => 30, :current => params[:page]},
- :order => order,
- :conditions => cond.to_sql,
- :include => :tags
- )
-
- @rss_title = "#{AppConfig.community_name}: #{params[:popular] ? :popular.l : :recent.l} "+:clippings.l
- @rss_url = rss_site_clippings_path
- respond_to do |format|
- format.html
- format.rss {
- render_rss_feed_for(@clippings,
- { :feed => {:title => @rss_title, :link => url_for(:controller => 'clippings', :action => 'site_index') },
- :item => {:title => :title_for_rss,
- :description => Proc.new {|clip| description_for_rss(clip)},
- :link => Proc.new {|clip| user_clipping_url(clip.user, clip)},
- :pub_date => :created_at} })
-
- }
- end
-
- end
-
- # GET /clippings
- # GET /clippings.xml
- def index
- @user = User.find(params[:user_id])
-
- cond = Caboose::EZ::Condition.new
- cond.user_id == @user.id
- if params[:tag_name]
- cond.append ['tags.name = ?', params[:tag_name]]
- end
-
- @clippings = Clipping.find(:all,
- :page => {:size => 30, :current => params[:page]},
- :order => "created_at DESC",
- :conditions => cond.to_sql,
- :include => :tags )
-
- @tags = Clipping.tag_counts :conditions => { :user_id => @user.id }, :limit => 20
- @clippings_data = @clippings.collect {|c| [c.id, c.image_url, c.description, c.url ] }
-
- @rss_title = "#{AppConfig.community_name}: #{@user.login}'s clippings"
- @rss_url = formatted_user_clippings_path(@user,:rss)
-
- respond_to do |format|
- format.html # index.rhtml
- format.js { render :inline => @clippings_data.to_json }
- # format.widget { render :template => 'clippings/widget', :layout => false }
- format.rss {
- render_rss_feed_for(@clippings,
- { :feed => {:title => @rss_title, :link => url_for(:controller => 'clippings', :action => 'index', :user_id => @user) },
- :item => {:title => :title_for_rss,
- :description => Proc.new {|clip| description_for_rss(clip)},
- :link => :url,
- :pub_date => :created_at} })
-
- }
- end
- end
-
- # GET /clippings/1
- # GET /clippings/1.xml
- def show
- @user = User.find(params[:user_id])
- @clipping = Clipping.find(params[:id])
- @previous = @clipping.previous_clipping
- @next = @clipping.next_clipping
-
- @related = Clipping.find_related_to(@clipping)
-
- respond_to do |format|
- format.html # show.rhtml
- end
- end
-
- def load_images_from_uri
- uri = URI.parse(params[:uri])
- begin
- doc = Hpricot( open( uri ) )
- rescue
- render :inline => "<h1>Sorry, there was an error fetching the images from the page you requested</h1><a href='#{params[:uri]}'>Go back...</a>"
- return
- end
- @page_title = (doc/"title")
- # get the images
- @images = []
- (doc/"img").each do |img|
- begin
- if URI.parse(URI.escape(img['src'])).scheme.nil?
- img_uri = "#{uri.scheme}://#{uri.host}/#{img['src']}"
- else
- img_uri = img['src']
- end
- @images << img_uri
- rescue
- nil
- end
- end
- respond_to do |format|
- format.js
- end
- end
-
- def new_clipping
- @user = current_user
- @clipping = @user.clippings.new({:url => params[:uri], :description => params[:selection]})
- @post = @user.posts.new_from_bookmarklet(params)
- render :action => "new_clipping", :layout => false
- end
-
- # GET /clippings/new
- def new
- @user = User.find(params[:user_id])
- @clipping = @user.clippings.new
- end
-
- # GET /clippings/1;edit
- def edit
- @clipping = Clipping.find(params[:id])
- @user = User.find(params[:user_id])
- end
-
- # POST /clippings
- # POST /clippings.xml
- def create
- @user = current_user
- @clipping = @user.clippings.new(params[:clipping])
- @clipping.user = @user
- @clipping.tag_list = params[:tag_list] || ''
-
- respond_to do |format|
- if @clipping.save!
- flash[:notice] = :clipping_was_successfully_created.l
- format.html {
- unless params[:user_id]
- redirect_to @clipping.url rescue redirect_to user_clipping_url(@user, @clipping)
- else
- redirect_to user_clipping_url(@user, @clipping)
- end
- }
- else
- format.html { render :action => "new" }
- end
- end
- end
-
- # PUT /clippings/1
- # PUT /clippings/1.xml
- def update
- @user = User.find(params[:user_id])
- @clipping = Clipping.find(params[:id])
- @clipping.tag_list = params[:tag_list] || ''
-
- respond_to do |format|
- @clipping.save!
- if @clipping.update_attributes(params[:clipping])
- format.html { redirect_to user_clipping_url(@user, @clipping) }
- else
- format.html { render :action => "edit" }
- end
- end
- end
-
- # DELETE /clippings/1
- # DELETE /clippings/1.xml
- def destroy
- @user = User.find(params[:user_id])
- @clipping = Clipping.find(params[:id])
- @clipping.destroy
-
- respond_to do |format|
- format.html { redirect_to user_clippings_url(@user) }
- end
- end
-
- protected
-
- def description_for_rss(clip)
- "<a href='#{user_clipping_url(clip.user, clip)}' title='#{clip.title_for_rss}'><img src='#{clip.image_url}' alt='#{clip.description}' /></a>"
- end
-end
View
35 vendor/plugins/community_engine/app/controllers/comment_sweeper.rb
@@ -1,35 +0,0 @@
-class CommentSweeper < ActionController::Caching::Sweeper
- observe Comment
-
- def after_create(comment)
- expire_cache_for(comment)
- end
-
- # If our sweeper detects that a comment was updated call this
- def after_update(comment)
- expire_cache_for(comment)
- end
-
- # If our sweeper detects that a comment was deleted call this
- def after_destroy(comment)
- expire_cache_for(comment)
- end
-
- private
- def expire_cache_for(record)
- # Expire the footer content
- expire_action :controller => 'base', :action => 'footer_content'
-
- if record.commentable_type.eql?('Post')
- expire_action :controller => 'posts', :action => 'show', :id => record.commentable , :user_id => record.commentable.user
-
- if Post.find_recent(:limit => 16).include?(record.commentable)
- # Expire the home page
- expire_action :controller => 'base', :action => 'site_index'
- # Expire the category pages
- expire_action :controller => 'categories', :action => 'show', :id => record.commentable.category
- end
- end
-
- end
-end
View
123 vendor/plugins/community_engine/app/controllers/comments_controller.rb
@@ -1,123 +0,0 @@
-class CommentsController < BaseController
- before_filter :login_required, :except => [:index]
-
- if AppConfig.allow_anonymous_commenting
- skip_before_filter :verify_authenticity_token, :only => [:create] #because the auth token might be cached anyway
- skip_before_filter :login_required, :only => [:create]
- end
-
- uses_tiny_mce(:options => AppConfig.simple_mce_options, :only => [:index])
-
- cache_sweeper :comment_sweeper, :only => [:create, :destroy]
-
- def show
- @comment = Comment.find(params[:id])
- render :text => @comment.inspect
- end
-
- def index
- @commentable = params[:commentable_type].camelize.constantize.find(params[:commentable_id])
-
- unless logged_in? || @commentable && @commentable.owner.profile_public?
- flash.now[:error] = :this_users_profile_is_not_public_youll_need_to_create_an_account_and_log_in_to_access_it.l
- redirect_to :controller => 'sessions', :action => 'new' and return
- end
-
- if @commentable
- @comments = @commentable.comments.recent.find(:all, :page => {:size => 10, :current => params[:page]})
-
- if @comments.to_a.empty?
- render :text => :no_comments_found.l_with_args(:type => params[:commentable_type].camelize.constantize) and return
- else
- @title = @comments.first.commentable_name
-
- respond_to do |format|
- format.html {
- @user = @comments.first.recipient
- render :action => 'index' and return
- }
- format.rss {
- @rss_title = "#{AppConfig.community_name}: #{@commentable.class.to_s.underscore.capitalize} Comments - #{@title}"
- @rss_url = formatted_comments_path(@commentable.class.to_s.underscore, @commentable.id, :rss)
- render_comments_rss_feed_for(@comments, @title) and return
- }
- end
- end
- end
-
- respond_to do |format|
- format.html {
- flash[:notice] = :no_comments_found.l_with_args(:type => params[:commentable_type].camelize.constantize)
- redirect_to :controller => 'base', :action => 'site_index' and return
- }
- end
- end
-
- def new
- @commentable = params[:commentable_type].camelize.constantize.find(params[:commentable_id])
- redirect_to commentable_comments_url(@commentable)
- end
-
-
- def create
- @commentable = params[:commentable_type].camelize.constantize.find(params[:commentable_id])
- @comment = Comment.new(params[:comment])
- @comment.recipient = @commentable.owner
-
- @comment.user_id = current_user.id if current_user
- @comment.author_ip = request.remote_ip #save the ip address for everyone, just because
-
- respond_to do |format|
- if (logged_in? || verify_recaptcha(@comment)) && @comment.save
- @commentable.add_comment @comment
- @comment.send_notifications
-
- flash.now[:notice] = :comment_was_successfully_created.l
- format.html {
- redirect_to commentable_url(@comment)
- }
- format.js {
- render :partial => 'comments/comment.html.haml', :locals => {:comment => @comment, :highlighted => true}
- }
- else
- flash.now[:error] = :comment_save_error.l_with_args(:error => @comment.errors.full_messages.to_sentence)
- format.html {
- redirect_to :controller => params[:commentable_type].underscore.pluralize, :action => 'show', :id => params[:commentable_id]
- }
- format.js{
- render :inline => flash[:error], :status => 500
- }
- end
- end
- end
-
- def destroy
- @comment = Comment.find(params[:id])
- if @comment.can_be_deleted_by(current_user) && @comment.destroy
- flash.now[:notice] = :the_comment_was_deleted.l
- else
- flash.now[:error] = :comment_could_not_be_deleted.l
- end
- respond_to do |format|
- format.html { redirect_to users_url }
- format.js {
- render :inline => flash[:error], :status => 500 if flash[:error]
- render :nothing => true if flash[:notice]
- }
- end
- end
-
-
- private
- def render_comments_rss_feed_for(comments, title)
- render_rss_feed_for(comments,
- { :feed => {:title => title},
- :item => { :title => :title_for_rss,
- :description => :comment,
- :link => Proc.new {|comment| commentable_url(comment)},
- :pub_date => :created_at
- }
- })
- end
-
-end
View
72 vendor/plugins/community_engine/app/controllers/contests_controller.rb
@@ -1,72 +0,0 @@
-class ContestsController < BaseController
- before_filter :login_required, :except => [:show, :current]
- before_filter :admin_required, :except => [:show, :current, :index]
-
- uses_tiny_mce(:options => AppConfig.default_mce_options, :only => [:new, :edit ])
-
- def current
- @contest = Contest.current
- redirect_to :action => "index" and return unless @contest
- render :action => 'show'
- end
-
-
- def index
- @contests = Contest.find(:all)
-
- respond_to do |format|
- format.html
- end
- end
-
- def show
- @contest = Contest.find(params[:id])
-
- respond_to do |format|
- format.html
- end
- end
-
- def new
- @contest = Contest.new
- end
-
- def edit
- @contest = Contest.find(params[:id])
- end
-
- def create
- @contest = Contest.new(params[:contest])
-
- respond_to do |format|
- if @contest.save
- flash[:notice] = :contest_was_successfully_created.l
-
- format.html { redirect_to contest_url(@contest) }
- else
- format.html { render :action => "new" }
- end
- end
- end
-
- def update
- @contest = Contest.find(params[:id])
-
- respond_to do |format|
- if @contest.update_attributes(params[:contest])
- format.html { redirect_to contest_url(@contest) }
- else
- format.html { render :action => "edit" }
- end
- end
- end
-
- def destroy
- @contest = Contest.find(params[:id])
- @contest.destroy
-
- respond_to do |format|
- format.html { redirect_to contests_url }
- end
- end
-end
View
68 vendor/plugins/community_engine/app/controllers/events_controller.rb
@@ -1,68 +0,0 @@
-class EventsController < BaseController
- uses_tiny_mce(:options => AppConfig.default_mce_options, :only => [:new, :edit, :create, :update ])
-
- before_filter :admin_required, :except => [:index, :show]
-
- def show
- @event = Event.find(params[:id])
- end
-
- def index
- @is_admin_user = (current_user && current_user.admin?)
- @events = Event.upcoming.find(:all, :page => {:current => params[:page]})
- end
-
- def new
- @event = Event.new(params[:event])
- end
-
- def edit
- @event = Event.find(params[:id])
- end
-
- def create
- @event = Event.new(params[:event])
- @event.user = current_user
-
- respond_to do |format|
- if @event.save
- flash[:notice] = :event_was_successfully_created.l
-
- format.html { redirect_to events_path }
- else
- format.html { render :action => "new" }
- end
- end
- end
-
- def update
- @event = Event.find(params[:id])
- if params[:metro_area_id]
- @event.metro_area = MetroArea.find(params[:metro_area_id])
- else
- @event.metro_area = nil
- end
-
-
- respond_to do |format|
- if @event.update_attributes(params[:event])
- format.html { redirect_to events_path }
- else
- format.html { render :action => "edit" }
- end
- end
- end
-
- # DELETE /homepage_features/1
- # DELETE /homepage_features/1.xml
- def destroy
- @event = Event.find(params[:id])
- @event.destroy
-
- respond_to do |format|
- format.html { redirect_to events_path }
- end
- end
-
-
-end
View
29 vendor/plugins/community_engine/app/controllers/favorite_sweeper.rb
@@ -1,29 +0,0 @@
-class FavoriteSweeper < ActionController::Caching::Sweeper
- observe Favorite
-
- def after_create(favorite)
- expire_cache_for(favorite)
- end
-
- def after_destroy(favorite)
- expire_cache_for(favorite)
- end
-
- private
- def expire_cache_for(record)
- #the favorite is for a post
- if record.favoritable_type.eql?('Post')
- # expire the show page
- expire_page :controller => 'posts', :action => 'show', :id => record.favoritable, :user_id => record.favoritable.user
-
- if Post.find_recent(:limit => 16).include?(record.favoritable)
- # Expire the home page
- expire_action :controller => 'base', :action => 'site_index'
-
- # Expire the category page for this post
- expire_action :controller => 'categories', :action => 'show', :id => record.favoritable.category
- end
- end
-
- end
-end
View
36 vendor/plugins/community_engine/app/controllers/favorites_controller.rb
@@ -1,36 +0,0 @@
-class FavoritesController < BaseController
- before_filter :login_required, :only => [:destroy]
- before_filter :find_user, :only => [:show, :index]
-
- cache_sweeper :favorite_sweeper, :only => [:create, :destroy]
-
- def create
- @favoritable = params[:favoritable_type].classify.constantize.find(params[:favoritable_id])
- @favorite = Favorite.new(:ip_address => request.remote_ip, :favoritable => @favoritable )
- @favorite.user = current_user || nil
- @favorite.save
-
- respond_to do |format|
- format.js
- end
- end
-
- def destroy
- @favorite = current_user.favorites.find(params[:id])
- @favorite.destroy
-
- respond_to do |format|
- format.js
- end
- end
-
- def show
- @favorite = @user.favorites.find(params[:id])
- end
-
- def index
- @favorites = Favorite.recent.by_user(@user).find :all, :page => {:current => params[:page]}
- end
-
-
-end
View
72 vendor/plugins/community_engine/app/controllers/forums_controller.rb
@@ -1,72 +0,0 @@
-class ForumsController < BaseController
- before_filter :login_required, :except => [:index, :show]
- before_filter :find_or_initialize_forum
- helper :application
- uses_tiny_mce :options => AppConfig.default_mce_options
-
- def index
- @forums = Forum.find(:all, :order => "position")
- respond_to do |format|
- format.html
- format.xml { render :xml => @forums.to_xml }
- end
- end
-
- def show
- respond_to do |format|
- format.html do
- # keep track of when we last viewed this forum for activity indicators
- (session[:forums] ||= {})[@forum.id] = Time.now.utc if logged_in?
-
- @topics = @forum.topics.find(:all,
- :page => {:size => 20, :current => params[:page]},
- :include => :replied_by_user,
- :order => 'sticky DESC, replied_at DESC')
- end
-
- format.xml do
- render :xml => @forum.to_xml
- end
- end
- end
-
- # new renders new.rhtml
-
- def create
- @forum.attributes = params[:forum]
- @forum.tag_list = params[:tag_list] || ''
- @forum.save!
- respond_to do |format|
- format.html { redirect_to forums_path }
- format.xml { head :created, :location => formatted_forum_url(:id => @forum, :format => :xml) }
- end
- end
-
- def update
- @forum.attributes = params[:forum]
- @forum.tag_list = params[:tag_list] || ''
- @forum.save!
- respond_to do |format|
- format.html { redirect_to forums_path }
- format.xml { head 200 }
- end
- end
-
- def destroy
- @forum.destroy
- respond_to do |format|
- format.html { redirect_to forums_path }
- format.xml { head 200 }
- end
- end
-
- protected
- def find_or_initialize_forum
- @forum = params[:id] ? Forum.find(params[:id]) : Forum.new
- end
-
- #overide in your app
- def authorized?
- current_user.admin?
- end
-end
View
127 vendor/plugins/community_engine/app/controllers/friendships_controller.rb
@@ -1,127 +0,0 @@
-class FriendshipsController < BaseController
- before_filter :login_required, :except => [:accepted, :index]
- before_filter :find_user, :only => [:accepted, :pending, :denied]
- before_filter :require_current_user, :only => [:accept, :deny, :pending, :destroy]
-
- def index
- @body_class = 'friendships-browser'
-
- @user = (params[:id] ||params[:user_id]) ? User.find((params[:id] || params[:user_id] )): Friendship.find(:first, :order => "rand()").user
- @friendships = Friendship.find(:all, :conditions => ['user_id = ? OR friend_id = ?', @user.id, @user.id], :limit => 40, :order => "rand()")
- @users = User.find(:all, :conditions => ['users.id in (?)', @friendships.collect{|f| f.friend_id }])
-
- respond_to do |format|
- format.html
- format.xml { render :action => 'index.rxml', :layout => false}
- end
- end
-
- def deny
- @user = User.find(params[:user_id])
- @friendship = @user.friendships.find(params[:id])
-
- respond_to do |format|
- if @friendship.update_attributes(:friendship_status => FriendshipStatus[:denied]) && @friendship.reverse.update_attributes(:friendship_status => FriendshipStatus[:denied])
- flash[:notice] = :the_friendship_was_denied.l
- format.html { redirect_to denied_user_friendships_path(@user) }
- else
- format.html { render :action => "edit" }
- end
- end
- end
-
- def accept
- @user = User.find(params[:user_id])
- @friendship = @user.friendships_not_initiated_by_me.find(params[:id])
-
- respond_to do |format|
- if @friendship.update_attributes(:friendship_status => FriendshipStatus[:accepted]) && @friendship.reverse.update_attributes(:friendship_status => FriendshipStatus[:accepted])
- flash[:notice] = :the_friendship_was_accepted.l
- format.html {
- redirect_to accepted_user_friendships_path(@user)
- }
- else
- format.html { render :action => "edit" }
- end
- end
- end
-
- def denied
- @user = User.find(params[:user_id])
- @friendships = @user.friendships.find(:all, :conditions => ["friendship_status_id = ?", FriendshipStatus[:denied].id], :page => {:current => params[:page]})
-
- respond_to do |format|
- format.html
- end
- end
-
-
- def accepted
- @user = User.find(params[:user_id])
- @friend_count = @user.accepted_friendships.count
- @pending_friendships_count = @user.pending_friendships.count
-
- @friendships = @user.friendships.accepted.find :all, :page => {:size => 12, :current => params[:page], :count => @friend_count}
-
- respond_to do |format|
- format.html
- end
- end
-
- def pending
- @user = User.find(params[:user_id])
- @friendships = @user.friendships.find(:all, :conditions => ["initiator = ? AND friendship_status_id = ?", false, FriendshipStatus[:pending].id])
-
- respond_to do |format|
- format.html
- end
- end
-
- def show
- @friendship = Friendship.find(params[:id])
- @user = @friendship.user
-
- respond_to do |format|
- format.html
- end
- end
-
-
- def create
- @user = User.find(params[:user_id])
- @friendship = Friendship.new(:user_id => params[:user_id], :friend_id => params[:friend_id], :initiator => true )
- @friendship.friendship_status_id = FriendshipStatus[:pending].id
- reverse_friendship = Friendship.new(params[:friendship])
- reverse_friendship.friendship_status_id = FriendshipStatus[:pending].id
- reverse_friendship.user_id, reverse_friendship.friend_id = @friendship.friend_id, @friendship.user_id
-
- respond_to do |format|
- if @friendship.save && reverse_friendship.save
- UserNotifier.deliver_friendship_request(@friendship) if @friendship.friend.notify_friend_requests?
- format.html {
- flash[:notice] = :friendship_requested.l_with_args(:friend => @friendship.friend.login)
- redirect_to accepted_user_friendships_path(@user)
- }
- format.js { render( :inline => :requested_friendship_with.l+" #{@friendship.friend.login}." ) }
- else
- flash.now[:error] = :friendship_could_not_be_created.l
- @users = User.find(:all)
- format.html { redirect_to user_friendships_path(@user) }
- format.js { render( :inline => "Friendship request failed." ) }
- end
- end
- end
-
- def destroy
- @user = User.find(params[:user_id])
- @friendship = Friendship.find(params[:id])
- Friendship.transaction do
- @friendship.destroy
- @friendship.reverse.destroy
- end
- respond_to do |format|
- format.html { redirect_to accepted_user_friendships_path(@user) }
- end
- end
-
-end
View
76 vendor/plugins/community_engine/app/controllers/homepage_features_controller.rb
@@ -1,76 +0,0 @@
-class HomepageFeaturesController < BaseController
- uses_tiny_mce(:options => AppConfig.default_mce_options, :only => [:new, :edit ])
-
- before_filter :login_required
- before_filter :admin_required
- # GET /homepage_features
- # GET /homepage_features.xml
- def index
- @homepage_features = HomepageFeature.find(:all, :conditions => ["parent_id IS NULL"], :order => "created_at desc")
-
- respond_to do |format|
- format.html # index.rhtml
- end
- end
-
- # GET /homepage_features/1
- # GET /homepage_features/1.xml
- def show
- @homepage_feature = HomepageFeature.find(params[:id])
-
- respond_to do |format|
- format.html # show.rhtml
- end
- end
-
- # GET /homepage_features/new
- def new
- @homepage_feature = HomepageFeature.new
- end
-
- # GET /homepage_features/1;edit
- def edit
- @homepage_feature = HomepageFeature.find(params[:id])
- end
-
- # POST /homepage_features
- # POST /homepage_features.xml
- def create
- @homepage_feature = HomepageFeature.new(params[:homepage_feature])
-
- respond_to do |format|
- if @homepage_feature.save
- flash[:notice] = :homepage_feature_was_successfully_created.l
-
- format.html { redirect_to homepage_feature_url(@homepage_feature) }
- else
- format.html { render :action => "new" }
- end
- end
- end
-
- # PUT /homepage_features/1
- # PUT /homepage_features/1.xml
- def update
- @homepage_feature = HomepageFeature.find(params[:id])
-
- respond_to do |format|
- if @homepage_feature.update_attributes(params[:homepage_feature])
- format.html { redirect_to homepage_feature_url(@homepage_feature) }
- else
- format.html { render :action => "edit" }
- end
- end
- end
-
- # DELETE /homepage_features/1
- # DELETE /homepage_features/1.xml
- def destroy
- @homepage_feature = HomepageFeature.find(params[:id])
- @homepage_feature.destroy
-
- respond_to do |format|
- format.html { redirect_to homepage_features_url }
- end
- end
-end
View
56 vendor/plugins/community_engine/app/controllers/invitations_controller.rb
@@ -1,56 +0,0 @@
-class InvitationsController < BaseController
- before_filter :login_required
-
- def index
- @user = current_user
- @invitations = @user.invitations
-
- respond_to do |format|
- format.html
- end
- end
-
-
- def show
- @invitation = Invitation.find(params[:id])
-
- respond_to do |format|
- format.html
- end
- end
-
-
- def new
- @user = current_user
- @invitation = Invitation.new
- end