punbbonrails.git
18 years agoReduced User#is_guest?, User#is_admin?, User#is_mod? callsmaster
Nguyễn Thái Ngọc Duy [Mon, 28 Aug 2006 13:25:49 +0000 (28 20:25 +0700)]
Reduced User#is_guest?, User#is_admin?, User#is_mod? calls

18 years agoReduced User#can_moderate? and Topic#can_reply? calls
Nguyễn Thái Ngọc Duy [Mon, 28 Aug 2006 13:09:11 +0000 (28 20:09 +0700)]
Reduced User#can_moderate? and Topic#can_reply? calls

18 years agoRemoved Settings plugin, moved Settings model into app/models
Nguyễn Thái Ngọc Duy [Sat, 26 Aug 2006 09:29:42 +0000 (26 16:29 +0700)]
Removed Settings plugin, moved Settings model into app/models

18 years agoReduced ApplicationController#current_user calls (by half with forum/view, might...
Nguyễn Thái Ngọc Duy [Sat, 26 Aug 2006 04:46:31 +0000 (26 11:46 +0700)]
Reduced ApplicationController#current_user calls (by half with forum/view, might be more with views such as topic/view or user_profile/*)

18 years agoReduced Time#now calls a bit (seven calls according to action_profiler)
Nguyễn Thái Ngọc Duy [Sat, 26 Aug 2006 04:19:47 +0000 (26 11:19 +0700)]
Reduced Time#now calls a bit (seven calls according to action_profiler)

18 years agoShow static 'Pages: 1' if there is only one page (so paginate_links shows nothing)
Nguyễn Thái Ngọc Duy [Fri, 25 Aug 2006 10:25:29 +0000 (25 17:25 +0700)]
Show static 'Pages: 1' if there is only one page (so paginate_links shows nothing)

18 years agoActivate Ferret in SearchController.
Nguyễn Thái Ngọc Duy [Fri, 25 Aug 2006 10:22:14 +0000 (25 17:22 +0700)]
Activate Ferret in SearchController.
Added DISTINCT to all id select queries.
Quoted forum_id

18 years agoBacked to acts_as_ferret stable branch (ferret 0.9.6)
Nguyễn Thái Ngọc Duy [Fri, 25 Aug 2006 10:14:58 +0000 (25 17:14 +0700)]
Backed to acts_as_ferret stable branch (ferret 0.9.6)

18 years agoPlugged in svn://projects.jkraemer.net/acts_as_ferret/trunk/plugin/acts_as_ferret r83
Nguyễn Thái Ngọc Duy [Fri, 25 Aug 2006 03:17:13 +0000 (25 10:17 +0700)]
Plugged in svn://projects.jkraemer.net/acts_as_ferret/trunk/plugin/acts_as_ferret r83

18 years agoFixed regression caused by commit 2d101132c219d4e23c2ce65216e8e91270339650
Nguyễn Thái Ngọc Duy [Thu, 24 Aug 2006 10:49:19 +0000 (24 17:49 +0700)]
Fixed regression caused by commit 2d101132c219d4e23c2ce65216e8e91270339650

18 years agoSearchController is in! Fulltext search and markread action is not functional yet
Nguyễn Thái Ngọc Duy [Thu, 24 Aug 2006 10:41:12 +0000 (24 17:41 +0700)]
SearchController is in! Fulltext search and markread action is not functional yet

18 years agoUse Topic#set_close_status instead of Topic.update_all directly
Nguyễn Thái Ngọc Duy [Thu, 24 Aug 2006 10:38:03 +0000 (24 17:38 +0700)]
Use Topic#set_close_status instead of Topic.update_all directly

18 years agoMake use of User#get_disp_topics
Nguyễn Thái Ngọc Duy [Thu, 24 Aug 2006 10:37:37 +0000 (24 17:37 +0700)]
Make use of User#get_disp_topics

18 years agoAdded SQL queries for search controller
Nguyễn Thái Ngọc Duy [Thu, 24 Aug 2006 10:37:02 +0000 (24 17:37 +0700)]
Added SQL queries for search controller
Also moved update_all calls from moderator controller to topic model

18 years agoUse quote(true) instead of hardcoding value 1
Nguyễn Thái Ngọc Duy [Thu, 24 Aug 2006 10:34:49 +0000 (24 17:34 +0700)]
Use quote(true) instead of hardcoding value 1

18 years agoCycle rowodd, roweven
Nguyễn Thái Ngọc Duy [Thu, 24 Aug 2006 10:33:18 +0000 (24 17:33 +0700)]
Cycle rowodd, roweven

18 years agoCorrected action user_posts
Nguyễn Thái Ngọc Duy [Thu, 24 Aug 2006 10:30:58 +0000 (24 17:30 +0700)]
Corrected action user_posts

18 years agoAdded ApplicationController#get_ident
Nguyễn Thái Ngọc Duy [Thu, 24 Aug 2006 10:30:19 +0000 (24 17:30 +0700)]
Added ApplicationController#get_ident

18 years agoCorrected action search/user_posts (not show_user)
Nguyễn Thái Ngọc Duy [Thu, 24 Aug 2006 10:29:32 +0000 (24 17:29 +0700)]
Corrected action search/user_posts (not show_user)

18 years agoTired of Oxygen and Cornflower. Let's make full use of available themes
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 11:06:58 +0000 (23 18:06 +0700)]
Tired of Oxygen and Cornflower. Let's make full use of available themes

18 years agoLet ModeratorController in. Tests may come later
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 10:54:12 +0000 (23 17:54 +0700)]
Let ModeratorController in. Tests may come later

18 years agoSort topics properly (stickies first, honor Forum#sort_by)
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 10:46:13 +0000 (23 17:46 +0700)]
Sort topics properly (stickies first, honor Forum#sort_by)

18 years agoFixed views to prepare for the on-coming ModeratorController
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 10:24:18 +0000 (23 17:24 +0700)]
Fixed views to prepare for the on-coming ModeratorController

18 years agoDisplay forum/view properly (icons, links...)
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 09:45:19 +0000 (23 16:45 +0700)]
Display forum/view properly (icons, links...)

18 years agotopic closing indication
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 09:43:33 +0000 (23 16:43 +0700)]
topic closing indication

18 years agoAdded User#get_disp_posts
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 09:42:43 +0000 (23 16:42 +0700)]
Added User#get_disp_posts
Raise exception if there is no post to display (wrong page parameter)

18 years agoAdded pseudo function Censoring.censor_words
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 09:42:03 +0000 (23 16:42 +0700)]
Added pseudo function Censoring.censor_words

18 years agoTextual changes
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 08:41:29 +0000 (23 15:41 +0700)]
Textual changes

18 years agoWrong SQL because I didn't write tests :(
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 07:58:30 +0000 (23 14:58 +0700)]
Wrong SQL because I didn't write tests :(

There are actually differences between ON <condition> and WHERE <condition>

18 years agoQuickjump is back. forum/view/id will redirect to external url if it's a redirect...
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 07:46:24 +0000 (23 14:46 +0700)]
Quickjump is back. forum/view/id will redirect to external url if it's a redirect forum

18 years agoDon't set forum_perms on administrators
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 07:34:48 +0000 (23 14:34 +0700)]
Don't set forum_perms on administrators

18 years agoLet moderators and administrators view forums
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 07:32:13 +0000 (23 14:32 +0700)]
Let moderators and administrators view forums

18 years agoAdjust Forum#moderators if moderators' groups are changed or moderators are deleted
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 06:10:20 +0000 (23 13:10 +0700)]
Adjust Forum#moderators if moderators' groups are changed or moderators are deleted

18 years agoAdded Forum.remove_moderator, which remove a user as a moderator from all forums
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 06:03:05 +0000 (23 13:03 +0700)]
Added Forum.remove_moderator, which remove a user as a moderator from all forums

18 years agoShow forum moderators
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 05:26:13 +0000 (23 12:26 +0700)]
Show forum moderators

18 years agoUse Hash for Forum#moderators instead of Array to cache username
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 05:22:27 +0000 (23 12:22 +0700)]
Use Hash for Forum#moderators instead of Array to cache username

18 years agoForum moderator is functional (non-forum moderators no longer have moderator privileg...
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 05:06:08 +0000 (23 12:06 +0700)]
Forum moderator is functional (non-forum moderators no longer have moderator privilege in forums they are not moderators)

18 years agoModerator management
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 04:19:28 +0000 (23 11:19 +0700)]
Moderator management

18 years agoSimple hack to hide admin menu
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 02:47:18 +0000 (23 09:47 +0700)]
Simple hack to hide admin menu

18 years agoBan in action
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 02:10:02 +0000 (23 09:10 +0700)]
Ban in action

18 years agoBan functions
Nguyễn Thái Ngọc Duy [Wed, 23 Aug 2006 01:47:10 +0000 (23 08:47 +0700)]
Ban functions

18 years agoActivated ban button in user_profile/admin
Nguyễn Thái Ngọc Duy [Tue, 22 Aug 2006 13:53:22 +0000 (22 20:53 +0700)]
Activated ban button in user_profile/admin

18 years agoBan administration
Nguyễn Thái Ngọc Duy [Tue, 22 Aug 2006 13:45:57 +0000 (22 20:45 +0700)]
Ban administration

18 years agoBan model
Nguyễn Thái Ngọc Duy [Tue, 22 Aug 2006 13:25:19 +0000 (22 20:25 +0700)]
Ban model

18 years agoAnother big bad commit with additional permission checks and coverage tests
Nguyễn Thái Ngọc Duy [Tue, 22 Aug 2006 09:27:34 +0000 (22 16:27 +0700)]
Another big bad commit with additional permission checks and coverage tests

AdminController#update_options was restructured. Added #update_permissions.
Splitted TopicController#view into view and find_topic.
Removed TopicController#post_valid?
Raise exceptions in stead of just set flash[:error] and redirect
Fixed some template errors encountered by tests
Most tests in this commit are coverage tests.
Added assert_form to check form action
Fixed fixtures/settings.yaml (empty maintenance_message)

18 years agoW3C markup validation fixes encountered by /admin/index test
Nguyễn Thái Ngọc Duy [Tue, 22 Aug 2006 03:54:49 +0000 (22 10:54 +0700)]
W3C markup validation fixes encountered by /admin/index test

18 years agoImported http://redgreenblu.com/svn/projects/assert_valid_markup r16
Nguyễn Thái Ngọc Duy [Tue, 22 Aug 2006 03:45:36 +0000 (22 10:45 +0700)]
Imported redgreenblu.com/svn/projects/assert_valid_markup r16

18 years agoUpdated models and their tests
Nguyễn Thái Ngọc Duy [Tue, 22 Aug 2006 03:33:25 +0000 (22 10:33 +0700)]
Updated models and their tests

18 years agoCode split
Nguyễn Thái Ngọc Duy [Mon, 21 Aug 2006 10:33:24 +0000 (21 17:33 +0700)]
Code split

18 years agoAdded test:coverage:* tasks (require rcov 0.7.0)
Nguyễn Thái Ngọc Duy [Mon, 21 Aug 2006 01:38:02 +0000 (21 08:38 +0700)]
Added test:coverage:* tasks (require rcov 0.7.0)

18 years agoSplitted out profile editing functions into UserProfileController
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 13:49:27 +0000 (20 20:49 +0700)]
Splitted out profile editing functions into UserProfileController

18 years agoReworked user/list
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 10:02:36 +0000 (20 17:02 +0700)]
Reworked user/list

18 years agoImported PunBB's license
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 09:01:32 +0000 (20 16:01 +0700)]
Imported PunBB's license

18 years agoUser#admin (except moderator part)
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 08:54:06 +0000 (20 15:54 +0700)]
User#admin (except moderator part)

18 years agoTopic#posts sorted by Post#created_at
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 05:35:01 +0000 (20 12:35 +0700)]
Topic#posts sorted by Post#created_at

18 years agoAdded User#posters
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 04:44:38 +0000 (20 11:44 +0700)]
Added User#posters
Use attr_accessible in favor of attr_protected

18 years agoCorrected user admin link (to /user/admin/:id)
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 03:31:22 +0000 (20 10:31 +0700)]
Corrected user admin link (to /user/admin/:id)

18 years agoGive users a change to see what's going on if they are not allowed to read the board...
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 03:29:38 +0000 (20 10:29 +0700)]
Give users a change to see what's going on if they are not allowed to read the board. And allow them to log out :-/

18 years agoReworked commit 6d2f215da42f3c904d9e0cdb832f4669aa1ddb28 (caused only one category...
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 03:24:10 +0000 (20 10:24 +0700)]
Reworked commit 6d2f215da42f3c904d9e0cdb832f4669aa1ddb28 (caused only one category board to break)

18 years agoGroup addition/deletion
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 02:57:50 +0000 (20 09:57 +0700)]
Group addition/deletion

18 years agoMissing fixtures (:categories and :forums) caused test_update_on_topic to fail
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 02:04:15 +0000 (20 09:04 +0700)]
Missing fixtures (:categories and :forums) caused test_update_on_topic to fail

18 years agoreports.yml lacks message fields, causing unit/report_test.rb to fail. Also remove...
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 01:56:12 +0000 (20 08:56 +0700)]
reports.yml lacks message fields, causing unit/report_test.rb to fail. Also remove redundant validation in Report model

18 years agoUser validations
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 01:50:18 +0000 (20 08:50 +0700)]
User validations

18 years agoTopic validations
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 01:33:25 +0000 (20 08:33 +0700)]
Topic validations

18 years agoRank validations
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 01:29:47 +0000 (20 08:29 +0700)]
Rank validations

18 years agoPost validations
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 01:28:34 +0000 (20 08:28 +0700)]
Post validations

18 years agoGroup validations
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 01:20:02 +0000 (20 08:20 +0700)]
Group validations

18 years agoForum validations
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 01:16:49 +0000 (20 08:16 +0700)]
Forum validations

18 years agoCensoring validations
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 01:02:01 +0000 (20 08:02 +0700)]
Censoring validations

18 years agoCategory validations
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 00:59:07 +0000 (20 07:59 +0700)]
Category validations

18 years agoBan validation checks
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 00:56:59 +0000 (20 07:56 +0700)]
Ban validation checks

18 years agoGroup editing
Nguyễn Thái Ngọc Duy [Sun, 20 Aug 2006 00:40:24 +0000 (20 07:40 +0700)]
Group editing

18 years agoMake sure if either a category or a forum or a topic is deleted, all dependent object...
Nguyễn Thái Ngọc Duy [Sat, 19 Aug 2006 10:38:33 +0000 (19 17:38 +0700)]
Make sure if either a category or a forum or a topic is deleted, all dependent objects are deleted too (category -> forum -> topic -> post)

18 years agoForum administration was reviewed. Forum permission editing is functional. Deleting...
Nguyễn Thái Ngọc Duy [Sat, 19 Aug 2006 09:46:45 +0000 (19 16:46 +0700)]
Forum administration was reviewed. Forum permission editing is functional. Deleting forums need work though due to the lack of AdminController#prune

18 years agoAdded category deletion confirmation
Nguyễn Thái Ngọc Duy [Sat, 19 Aug 2006 07:21:19 +0000 (19 14:21 +0700)]
Added category deletion confirmation

18 years agoSome system info in admin panel
Nguyễn Thái Ngọc Duy [Sat, 19 Aug 2006 06:44:28 +0000 (19 13:44 +0700)]
Some system info in admin panel

18 years agoforum/view can understand params[:pid] and show the proper page
Nguyễn Thái Ngọc Duy [Sat, 19 Aug 2006 04:28:02 +0000 (19 11:28 +0700)]
forum/view can understand params[:pid] and show the proper page

18 years agoHide quick post form if current user is not allowed to post replies
Nguyễn Thái Ngọc Duy [Sat, 19 Aug 2006 03:35:12 +0000 (19 10:35 +0700)]
Hide quick post form if current user is not allowed to post replies

18 years agoCleaned up layouts/applications.rhtml
Nguyễn Thái Ngọc Duy [Sat, 19 Aug 2006 03:29:11 +0000 (19 10:29 +0700)]
Cleaned up layouts/applications.rhtml

Moved controller dependent parts out of the layout: forum/index, forum/view, topic/view. foot_links for /search has been dropped because search controller has not yet implemented

18 years agoRenamed main.rhtml to application.rhtml so that we won't need to explicitly "specify...
Nguyễn Thái Ngọc Duy [Sat, 19 Aug 2006 01:01:31 +0000 (19 08:01 +0700)]
Renamed main.rhtml to application.rhtml so that we won't need to explicitly "specify layout 'main'"

18 years agoRefactored TopicController into several functions
Nguyễn Thái Ngọc Duy [Fri, 18 Aug 2006 09:38:24 +0000 (18 16:38 +0700)]
Refactored TopicController into several functions

18 years agoWhat a beautiful day! I wrote a wrong function. Then I wrote a wrong test too!
Nguyễn Thái Ngọc Duy [Fri, 18 Aug 2006 09:23:37 +0000 (18 16:23 +0700)]
What a beautiful day! I wrote a wrong function. Then I wrote a wrong test too!

Repeat yourself tenth: YOU CAN POST IF ONLY FORUMS ARE NOT REDIRECTED FORUMS

18 years agoPost#poster and Post#poster_email are automatically set based on Post#poster_user...
Nguyễn Thái Ngọc Duy [Fri, 18 Aug 2006 08:23:31 +0000 (18 15:23 +0700)]
Post#poster and Post#poster_email are automatically set based on Post#poster_user on creation

18 years agoStricter validation on Forum and Category
Nguyễn Thái Ngọc Duy [Fri, 18 Aug 2006 08:20:31 +0000 (18 15:20 +0700)]
Stricter validation on Forum and Category

Forum is valids if it has a valid category.
Category is valids if has a non-empty cat_name.

18 years agoAdded Topic#can_reply?, validates_associated and attr_accessible
Nguyễn Thái Ngọc Duy [Fri, 18 Aug 2006 08:18:30 +0000 (18 15:18 +0700)]
Added Topic#can_reply?, validates_associated and attr_accessible

18 years agoAdded Forum#can_post?
Nguyễn Thái Ngọc Duy [Fri, 18 Aug 2006 07:50:43 +0000 (18 14:50 +0700)]
Added Forum#can_post?

18 years agoReindentation
Nguyễn Thái Ngọc Duy [Fri, 18 Aug 2006 04:36:49 +0000 (18 11:36 +0700)]
Reindentation

18 years agoSplitted out Forum#view into Forum#view and Forum#find_forum
Nguyễn Thái Ngọc Duy [Fri, 18 Aug 2006 02:12:00 +0000 (18 09:12 +0700)]
Splitted out Forum#view into Forum#view and Forum#find_forum

18 years agoRedirect to forum/index if forum/view/id is unable to serve the requests
Nguyễn Thái Ngọc Duy [Thu, 17 Aug 2006 23:38:26 +0000 (18 06:38 +0700)]
Redirect to forum/index if forum/view/id is unable to serve the requests

18 years agoAdded task :dump_fixture to dump a table to output in yaml format
Nguyễn Thái Ngọc Duy [Thu, 17 Aug 2006 23:36:45 +0000 (18 06:36 +0700)]
Added task :dump_fixture to dump a table to output in yaml format

18 years agoRenamed forum/list to forum/index no more additional redirect in forum/index
Nguyễn Thái Ngọc Duy [Thu, 17 Aug 2006 10:23:12 +0000 (17 17:23 +0700)]
Renamed forum/list to forum/index no more additional redirect in forum/index

18 years agoMoved User#group#g_read_board checking to ApplicationController
Nguyễn Thái Ngọc Duy [Thu, 17 Aug 2006 10:02:33 +0000 (17 17:02 +0700)]
Moved User#group#g_read_board checking to ApplicationController

18 years agoModified config/routes.rb the first time. Moved forum/list into homepage
Nguyễn Thái Ngọc Duy [Thu, 17 Aug 2006 09:30:39 +0000 (17 16:30 +0700)]
Modified config/routes.rb the first time. Moved forum/list into homepage

18 years agoIgnore cases checking for email/username uniqueness
Nguyễn Thái Ngọc Duy [Thu, 17 Aug 2006 09:19:27 +0000 (17 16:19 +0700)]
Ignore cases checking for email/username uniqueness

18 years agoUsing fixtures directly instead of calling Class#find_by_id. The test code is reduced...
Nguyễn Thái Ngọc Duy [Thu, 17 Aug 2006 09:18:01 +0000 (17 16:18 +0700)]
Using fixtures directly instead of calling Class#find_by_id. The test code is reduced a bit

18 years agohtml_escape for Forum#forum_name
Nguyễn Thái Ngọc Duy [Thu, 17 Aug 2006 04:48:40 +0000 (17 11:48 +0700)]
html_escape for Forum#forum_name

18 years agoSupport for redirect forums
Nguyễn Thái Ngọc Duy [Thu, 17 Aug 2006 04:45:57 +0000 (17 11:45 +0700)]
Support for redirect forums

18 years agoWrong condition on redirect_url editability
Nguyễn Thái Ngọc Duy [Thu, 17 Aug 2006 04:34:57 +0000 (17 11:34 +0700)]
Wrong condition on redirect_url editability

18 years agoforum/list honors forums.disp_position.
Nguyễn Thái Ngọc Duy [Thu, 17 Aug 2006 04:32:03 +0000 (17 11:32 +0700)]
forum/list honors forums.disp_position.

18 years agoShould be @categories[i], not cat
Nguyễn Thái Ngọc Duy [Thu, 17 Aug 2006 04:29:13 +0000 (17 11:29 +0700)]
Should be @categories[i], not cat