rubysherpas / forem Goto Github PK
View Code? Open in Web Editor NEWThe best Rails 3 and Rails 4 forum engine. Ever.
Home Page: http://forem.herokuapp.com
License: MIT License
The best Rails 3 and Rails 4 forum engine. Ever.
Home Page: http://forem.herokuapp.com
License: MIT License
Hello,
Not a bug, just something to be aware of. I just ran into an error due to having a partial named _head.haml.html in my application.html.haml. It was then load app/views/forem/forums/_head.html.erb.
Maybe something like _forum_head.html.erb?
Thanks,
Albert
Admins can lock and hide but cannot delete topic created by other users.
Hey,
I followed your instructions and installed forem, but when I try to view the forum I get the following error message.
ActionView::Template::Error (undefined local variable or method `blogs_path' for #<#Class:0x7f4f21002090:0x7f4f20ffda40>):
I created the initializer per the instruction and configured the application controller
App controller code http://pastie.org/private/nuf4t0cz11dscgirz4kpq
This is what I currently have on my gem file
source 'http://rubygems.org'
gem 'rails', '3.1.0'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'pg'
gem 'devise', '1.4.5'
gem "cancan"
gem 'json'
gem 'ckeditor', :git => 'git://github.com/galetahub/rails-ckeditor.git', :branch => 'rails3'
gem 'forem', :git => "git://github.com/radar/forem.git"
gem 'forem-theme-base', :git => "git://github.com/radar/forem-theme-base.git"
gem 'kaminari'
gem 'gravatar_image_tag'
gem 'activeadmin'
gem 'sass-rails', " ~> 3.1.0"
gem "meta_search", '>= 1.1.0.pre'
gem 'therubyracer'
gem 'paperclip'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
#gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
gem 'jquery-rails'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug'
A few quick suggestions as requested by Ryan.
Grouped 1 to 3 where 1 is what I'd consider essential
Group 1
Email notifications - email sent when a thread someone has posted in has received a reply (with options)
Latest posts link - to show the latest posts made on the forum, most of my regular users (who hang around the forum) use the forum this way.
Thread status icons - to show if a thread contains new posts/whether you have replied in the thread or not/whether it's a 'hot' thread etc
Who's viewing forum - when on the forum homepage, shows how many people are visiting each particular forum. It's surprising how lifeless forum systems feel without this.
Whos online - list of people active
Group 2
Who visited today - list of people who visited in last 24hrs
I'll add more as and when I think of em/get time
Hi there,
I am still quite new to rails and especially bundler. I cloned the repository and added the entries you specified in the readme. When I try execute bundle install I get the following error:
You cannot specify the same gem twice coming from different sources. You specified that forem (>= 0) should come from git://github.com/radar/forem.git (at master) and source at /projectPath/
From other examples I have found people mention duplication within the gemspec file which I do not see. Any ideas?
Thanks.
Steve
It would be nice, if, when not signed in user tries to create topic is redirected to the sign in page, that then he would be redirected back to create form of a topic. For now, as far as I see, after signing in it redirects to the root_url.
ActionView::Template::Error (undefined local variable or method `current_user' for #Forem::ForumsController:0xb6e48d18):
27: <% end %>
28:
29:
30:
31: <% if forem_admin? %>
32: <%= link_to "Admin Area", admin_root_path %>
33: <% end %>
Is what I get back. I did everything given in "Installation", except I modified the Gemfile a bit. It didn't work with the gems given; I specified the rails gem to use the 3-1-stable branch and the rack gem to use the rack-1.3 branch. Then it worked to do "bundle install", but well, the said error is what I get back when I open up localhost:3000/forums. Where to define this method, "current_user"?
It could be that it's just me being stupid, and I'm sorry if it is. If it isn't, I think this is fixable easily?
Cheers!
Simon
your Gemfile.lock requires rails 3.1.0beta while RefineryCMS itself 3.0.5
We'd like to use textile rather than markdown for post formatting (for consistency with our cms).
Does anyone have suggestions for how this could be architected / an appropriate pattern for having plain text, or markdown, as default, but the possibility to change to something else?
Hello,
I just install the this library and I am able to create forum and categories. However, when I click on a forum, I got this error message:
NameError in Forem::ForumsController#show
uninitialized constant Forum
Rails.root: C:/projects/EcoSearch
Application Trace | Framework Trace | Full Trace
Request
Parameters:
{"id"=>"1"}
Could you please let me know what I am missing?
Thank you,
Feature/suggestion, be able to setup groups and setup ACLs (Access Control Lists) per forum/category based on groups/roles
On master there is no public directory with base theme styles. Should there be? I ask because, In Forem::ApplicationHelper there is a helper method that references a none existent theme
def forem_theme_tag
stylesheet_link_tag("forem/#{Forem.theme}/style.css")
end
Also when I visit the demo site at http://forem.heroku.com/
I see a stylesheet include of
"/assets/forem/base/style-f6c5227a7309b163c14209ff02ad8f57.css"
Where does this base theme come from? Or should we be rolling our own entirely?
PGError: ERROR: column "forem_topics.id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT "forem_topics".* FROM "forem_topics" INNER JOIN "for...
^
: SELECT "forem_topics".* FROM "forem_topics" INNER JOIN "forem_posts" ON "forem_posts"."topic_id" = "forem_topics"."id" WHERE "forem_topics"."hidden" = 'f' GROUP BY topic_id ORDER BY forem_posts.created_at DESC, forem_topics.id LIMIT 5
::Forem::Topic.visible.select("DISTINCT topic_id, forem_topics.*").limit(5).includes(:posts) works for me in postgres.
Rather than hack around the "problem" of having authentication within the dummy application, I've gone ahead and added Devise to it within the devise
branch. So far this is working, it just needs a bit of cleanup. This issue is to remind us that this needs doing.
If the User model has an email method, we should use it to display gravatars of those people on the posts.
When I acces "http://localhost/forem/forums/1", it throws the error message of " undefined local variable or method `per' ".
It occurs at app/controllers/forem/forums_controller.rb:11:in `show' :
@forum.topics.visible.by_pinned_or_most_recent_post.page(params[:page]).per(20)
I don't know what this per method is. Do I miss any gem?
An example can be seen on the heroku site. Compare the started by and latest post users for any of the topics that have more than one post:
http://forem.heroku.com/forums/1
Marcus started the following, and Bob is the latest user:
http://forem.heroku.com/forums/1/topics/10
I think it has to do with the scope methods that are all set for created_at DESC.
topic_listing.posts.first.user
link_to_latest_post(topic_listing.posts.last)
The dummy app calls a couple javascript files that aren't there. Either we need to manually add rails-jquery and rails-ujs javascripts, or update the dummy app to use the asset pipeline.
In my layout I have some user-management stuff (login/logout/etc.) Oddly, that breaks with forem. It can not find the routes to my controller.
ActionView::Template::Error (No route matches {:action=>"change_persona", :method=>:post, :controller=>"user_sessions"}):
13: <%= current_user.email %>
14: <% if current_persona %>
15: as
16: <%= form_tag :controller => '/user_sessions', :method => :post, :action => :change_persona do |f| %>
17: <%= collection_select(
18: :id,
19: :persona,
app/views/layouts/application.html.erb:16:in `_app_views_layouts_application_html_erb___733005464_88044600'
Any thoughts here?
I've been having some problems with the developer-accessibility of engine routes and route helpers, and would appreciate comments.
If we can drop some stuff in the readme, or think of patches to forem or rails, I'd consider this a success.
I tried looking into the rails engines code and rake routes stuff, but got lost/frustrated quite quickly. I'd spend longer on it now but I am swamped with non-rails stuff at the moment, so thought I'd see if anyone had ideas.
You have already activated rake 0.9.3.beta.1, but your Gemfile requires rake 0.9.2.2. Using bundle exec may solve this.
Raverting to 1.9.2-p290 resolves:
rvm use 1.9.2-p290 --default
bundle install
rake forem:install:migrations
Creates migrations as expected.
Would it take a lot of work to include WYSIWYG posting in Forem? I'm thinking about using it with Refinery CMS, which has WYSIWYG tools and HTML formatted content - it would make a ton of sense to have it work the same with Forem too? Would it be a lot of work or just a matter of disabling markdown marshaling code so it works directly with HTML and adding some javascript or partials to include the editor controls?
Just started working on Polish translations for forem, would you be interested in merging them into main master repository?
The header for this page is written in english and doesn't use I18n.t
to get a translation, additionally the last post stuff is English too.
See: http://forem.heroku.com/forums/1 for the "is there a forem GitHub repo" topic. Says it was started by a, but was actually started by denysonique.
Hi,
I notice the following issues with the installer:
Currently forem relies on activerecord it should factor this out and use templates similar to padrino-admin(?) or a glue between different ORMs (I don't think this is possible). A bullet list of what needs to be converted for this to work would be appreciated.
First, thanks for the work on this...
Anyway, https://github.com/radar/forem/blob/master/app/helpers/forem/posts_helper.rb#L10 should be...
options.reverse_merge! :size => 60
I cloned this repo a little bit ago, but I had some trouble running the tests. Steps to reproduce:
Models names and attributesm such as Topic and Post, are not translated - for example in a new topic form, i have "Subject" and "Text" instead of translated into in my case Polish.
But even when I add such as translation to my config/locale/pl.yml:
pl:
activerecord:
attributes:
topic:
subject: Temat
text: Tekst
I still have Subject
and Text
as labels in new topic form. Why?
Running webrick for development I keep getting this nasty error:
Showing /home/kulpae/.rvm/gems/ruby-1.9.2-p180/bundler/gems/forem-76d997679209/app/views/forem/categories/_category.html.erb where line #1 raised:
undefined method `can_read_forem_forums?' for #<User:0x000000050f3020>
I've an initializer config/initializers/forem.rb with
Forem.user_class = User
Observations:
"Refinery CMS Integration
Requires Refinery CMS rails-3-1 branch"
There is no such branch there. Probably, it has been removed. And now, I can't get it wo work with Refinery. Using the latest thing of everything brings up loads of dependency errors (marginal note: I had to use the rack-1.3 branch of the git rack to get bundler to finish at all).
It's also possible that the reason is that my single steps were wrong or in wrong order. But yet, the "Refinery CMS Integration" entry doesn't tell much what to do.
I am now trying to set it up like the installation entry tells me to and posting everything that happens...
To get a refinery cms app:
refinerycms blah
(does loads of stuff, works.)
Now to add forem, I put this in the Gemfile, as given:
gem 'rails', :git => "git://github.com/rails/rails.git"
gem 'arel', :git => "git://github.com/rails/arel.git"
gem 'rack', :git => "git://github.com/rack/rack.git", :branch => "rack-1.3"
gem 'sprockets', :git => "git://github.com/sstephenson/sprockets"
gem 'forem', :git => "git://github.com/radar/forem.git"
And change
gem 'refinerycms', '~> 1.0.3'
to
gem 'refinerycms', :git => "git://github.com/resolve/refinerycms.git"
and do:
cd blah
bundle install
It tells me:
Could not find gem 'rack (~> 1.3.2)', required by 'rails', in any of the sources
So I change the rack Gemfile entry, adding the :branch option:
gem 'rack', :git => "git://github.com/rack/rack.git", :branch => "rack-1.3"
and run
bundle install
again.
Output is:
Could not find gem 'refinerycms-generators (~> 1.1), required by 'refinerycms', in any of the sources
=> do this:
gem 'refinerycms-generators', :git => "git://github.com/resolve/refinerycms-generators.git"
And get this:
Bundler could not find compatible versions for gem "refinerycms-generators":
In Gemfile:
refinerycms depends on
refinerycms-generators (~> 1.0.1)
refinerycms-generators (1.1.0)
So apparently, refinerycms will screw up its dependencies when it comes to using edge versions of rails etc.
And yes, I post this as a forem issue, because it apparently doesn't work what's given there in the instructions. ;)
Please fix! Great work though, I haven't seen any other forum that even tries to easily integrate with RefineryCMS, still, you outclass the other rails 3 forums in this case, guys.
Cheers!
Simon
When i want to create a new topic (e.g. http://localhost:3000/forem/forums/1/topics/new ), with user logged in, it redirects to the home page. The console displays this message:
Started GET "/forem/forums/1/topics/new" for 127.0.0.1 at 2011-09-11 17:34:00 +0800
Creating scope :page. Overwriting existing method Forem::Topic.page.
Processing by Forem::TopicsController#new as HTML
Parameters: {"forum_id"=>"1"}
Refinery::Page Load (0.3ms) SELECT .......
I googled and found it is caused by kaminari, see this issue: https://github.com/amatsuda/kaminari/issues/57 While i use the kaminari's master branch in my rails project, the error still exists. I wonder if this belongs to kaminari's bug.
My gem file is the same as this one: #38 (comment)
Thanks.
We just ran into an issue where the fix for #88 caused the install generator to break for new applications. It was requiring the user_class
configuration option to set and was giving a non-trivial error message to users.
I think that we should have a test for the install generator which is more of an "integration" test than the current "unit" test that lives in spec/generators
. This integration test should use the wonderful Aruba to create a brand new Rails application and walk through the install steps for Forem, running checks on the output of the content of the installer.
Without this, there's a chance that any change to Forem could again break the install generator, and when that happens anybody who's trying out Forem for the first time will see this and think bad things about Forem. The install generator (and the installation process) should amaze people at what it did for them and how easy it was.
Let's not break this again, ever.
Massive thanks to Aston J for pointing this out.
Current feature plans (italics is @radar reply to my initial email)
Subscribe/Unsubscribe link on topic view if logged in
I think this is fine. It should indicate clearly if a person is subscribed or not.
Either a check box or automatic subscription when adding a post to a topic
Determining if a user should be automatically subscribed could be done with a forem_auto_subscribe field on the "users" table that defaults to true. This could then be toggled on a profile page somewhere for the user, perhaps? We don't have somewhere like that in Forem at the moment.
Initially, an unsubscribe link in the email footer (vs a management page for subscriptions?)
That would be fine, I think.
Emails get sent out every reply to everyone but the person who added the new reply
That's correct. My concern with this is that it won't work at scale, but that's something to just think about for the future. There should of course be only one email per person.
Text of post is in email?
Not sure how you'd go about preserving the formatting here. I think just a notification of "Blah has posted in your topic called 'blah'" is fine, for now. If you want to go ahead and put the post text in the email then be my guest. I'd actually prefer it that way.
Hey,
I recently started "working" on my own version of forem, because I had to modify the views, and also the controllers. Well, what catched my eye was that, when e.g. a forum creation failed in the admin area, the flash showed up again on the next page I opened. I heard about this issue before, it's fixable really damn easy. Just replace
flash[:blah] = "..."
with
flash.now[:blah] = "..."
in every case where this occurs. I think it has something to do with flash itself waiting for a redirection, but "receiving" none, and therefore showing up again on the next page, where it thinks a redirection has happened.
(vendor/forem/app/controllers/forem/admin/forums_controller.rb is my example controller here, it has this issue.)
Thanks for your awesome but simple engine!
Simon
The blockquote tag doesn't seem to be supported for either
After running rails g forem:install and starting my app, I goto /forums and I'm getting the following error message
undefined local variable or method `forem_user' for #<Forem::ForumsController:0x5a28248> Extracted source (around line #7):
4:
5:<br>
6:<footer id='admin_link'>
7:<% if forem_admin? %>
8:<%= link_to t("area", :scope => "forem.admin"), admin_root_path %>
9:<% end %>
10:</footer> ```
It would be nice if the forum had category support like phpbb3 does.
Just thought that it would be really useful if Forem had private messaging.
The installer, once complete, should create a test forum with a topic created by a dummy user. Otherwise the forum looks empty.
Hello,
Had a bit of a problem installing forem. In the instructions it says use:
gem 'forem', :git => "git://github.com/radar/forem.git"
But doing this for me, pulled version 0.0.1, mostly likely because that's the last Git tag you guys have? maybe. Anyways, the only way I could get the latest master was manually download it. Then I added it to a vendor/gems directory, then referenced it like:
gem 'forem', :path => "#{File.expand_path(FILE)}/../vendor/gems/forem-0.1"
Is version 0.1 the latest? Is there a newer/better way of doing this?
Currently users (and admins) can't edit posts within a topic. This is pretty standard forum behaviour.
It should be quite simple to do this the easy way: allowing users and admins to perform ordinary model updates.
I imagine there are concerns about post versioning, e.g. letting people see how the post looked before it was edited?
Steps to reproduce:
The new (and hidden) topic will still appear under the forum it was created in as the "Last Post".
Last week, I spoke with somebody was interested to know if Forem had any kind of authorization system. I told him it didn't, because I didn't know how to build one for it as applications can have their own authorization system.
So I spent some time thinking about this on the plane ride back from Chicago. Here are my thoughts in no particular order. It would be great if I could get some feedback on this issue:
In many other forum systems out there, there are permission systems built into them. Forem is unique in that it's an engine and supposed to be pluggable into other applications, rather than being something standalone such as (my understanding) how phpBB and vBulletin work.
Of course, Forem can be "standalone" by just mounting it inside an empty Rails application. I don't think there will ever be a case where we have a true standalone version.
Anyway...
This complicates things. By creating our own permission system we would limit those people who may have their own permissions systems within their applications. This is definitely not ideal. Forem is already able to adapt to different authentication systems, so why not authorization also?
I propose that we build a flexible authorization system into Forem so that people can set up permissions on their forem installs in the easiest way possible using their own authorization if that's what they have, or suggesting to use CanCan instead.
I think that we should have methods on the User
class which define the permissions that people have. For example, there would be a can_read_forum?
method which would take one argument and do something like this:
def can_read_forum?(forum)
permissions.where(:object => forum, :permission_type => "read")
end
The code inside the can_read_forum?
method will be application-specific, but the API for the permissions is something that we should provide.
There could even be a possibility that we provide a Forem::Permissions::Default
module which, when included into a User
-like class, would then provide defaults for these permission methods, which then can be overridden in the model as the application designers wish. I think it would be best to have a blacklist-by-default, but I am open to ideas on this one on why it's a bad idea if anybody thinks so.
Alternatively we get them to include a module called Forem::Permissions
which then provides the following API:
can_read_forum do
permissions.where(:object => forum, :permission_type => "read")
end
This then will store the given block which will be executed (using instance_eval
) on the current_user
object.
With this kind of permission system I cannot think of a clean way that you could allow anonymous access to forums (for example). How could we fix that?
Thanks lads!
I'm thinking about using forem in application which is based on MongoDB. Will it work without additional changes?
I am very new to Rails and coding in general, so this may be a stupid question. I followed the instructions to for the installation. I created the user, current_user, admin, all that good stuff.
The files were never created in my app directory. For example, my app/views only has layouts, sessions, and users -- no forem files.
What am I doing wrong? How do I fix this? Do I have to create all those pages and files manually?
Thanks for your help
Once a topic is hidden, there does not appear to be a way to make it visible again.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.