Commit Graph

46 Commits

Author SHA1 Message Date
Bharat Mediratta
8ae2305289 Hide the "no comments yet" text after the first comment is posted.
Fixes ticket #196.
2009-04-06 00:27:24 +00:00
Bharat Mediratta
802f2431c7 Concatenate chopped up internationalized string. 2009-04-03 23:12:52 +00:00
Bharat Mediratta
921f3a2eee Put csrf token into Admin_View and Theme_View by default, then use it
directly wherever possible instead of access::csrf_token().
2009-03-27 03:43:21 +00:00
Chad Kieffer
cd8d1c6582 Temp fix for photostreamin admin dashboard, other miscellaneous css fixes. Apply jQuery UI button css to submit inputs in the admin theme. 2009-02-23 05:14:05 +00:00
Jakob Hilden
7d96448ecb added additional comment link, if no comments have been made yet. 2009-02-23 00:46:25 +00:00
Bharat Mediratta
f5169dd451 Leave the comments title around, but add the "Be the first to comment"
message below it.
2009-02-22 20:16:56 +00:00
Chad Kieffer
5dcf2794c5 Fixes to comment admin buttons. 2009-02-20 07:10:20 +00:00
Chad Kieffer
d04dbadfa1 Apply buttons to comment moderation and action buttons, beginnings of a photo stream carousel block in admin dashboard. 2009-02-15 22:36:51 +00:00
Chad Kieffer
9bbe8053c7 Added a show comment form button. Add comment form is revealed when the button is clicked. Used jQuery UI Effect to .highlight() to bring attention to newly added comments. Also added a named anchor to our block library to allow direct linking/scrolling to those blocks on the page. 2009-02-12 07:07:11 +00:00
Chad Kieffer
55cd2afde5 Admin theme style cleanup. Merged separate selected, available, unavailable into a single set of reusable classes. Applied alternating row bg colors. Removed inline CSS from admin views. Moved user admin css into admin_default theme style sheet. 2009-01-24 20:06:13 +00:00
Andy Staudacher
e4a9b19bf9 Changing t() placeholder syntax from {{replace_me}} to %replace_me. 2009-01-15 10:02:41 +00:00
Andy Staudacher
e53916dd06 Simplifying the way t() is called. Refactoring localization function t($message, $options=array()) into 2 separate functions:
- the new t($message, $options=array()) is for simple strings, optionally with placeholder interpolation.
- t2($singular, $plural, $count, $options=array()) is for plurals.
2009-01-15 09:30:15 +00:00
Bharat Mediratta
66fe884cb5 Use the author's avatar, not the logged in user's one. 2009-01-11 22:47:54 +00:00
Bharat Mediratta
01666c5579 Fix all file structure issues (tabs, bad preambles, etc).
Note: installer/install.php is now on the "direct access" list.
2009-01-11 02:27:00 +00:00
Chad Kieffer
aed5a4c788 2009-01-10 22:39:24 +00:00
Chad Kieffer
82848bd3a9 HTML format cleanup 2009-01-10 19:13:00 +00:00
Bharat Mediratta
44bfc1c6a4 Auto-delete 7-day old spam/deleted comments. 2009-01-10 11:25:33 +00:00
Bharat Mediratta
74766e5b82 Create a 'recently deleted' queue 2009-01-10 11:11:24 +00:00
Bharat Mediratta
9d584a528b Update the queue counts in the menu list whenever we
approve/unapprove/spam a comment.
2009-01-10 07:55:16 +00:00
Bharat Mediratta
9b90b4b0cd Use the theme's avatar as the default if Gravatar doesn't have one. 2009-01-10 06:18:35 +00:00
Bharat Mediratta
a5c4e3d465 Integrate Gravatar. Boy, that was easy. 2009-01-10 05:56:11 +00:00
Bharat Mediratta
a7feeb576f Big set of changes to comments, with related changes to akismet and
user modules.

* Don't delete vars when we delete a module.  This makes
  reinstalling a module a lot easier.

* Add user::lookup() as the preferred way to load a user, so that
  other modules don't delve into the user module (that'd be a
  problem when we swap out user modules)

* Notify site admins if Akismet is not fully configured

* Bundle all server variables into the comment so that if/when we
  re-check the comment, we are not using the server info from the
  site admin's request.

* Update Akismet to grab request context data from the comment

* Pre-seed comment fields if we have a logged in user.  Update
  comment::create() API to clarify it for this.

* Delete comment::update(), that's a controller function.

* Add url to User_Model

* Add author_name() author_email() and author_url() to
  Comment_Model.  It'll return the appropriate values depending
  on whether the comment was left by a logged in user or a guest.

* Use resetForm() instead of clearForm() when we reload the
  comment form after ajax submit, this way we preserve the
  pre-seeded values.

* In the user profile page, ignore blank passwords.
2009-01-10 00:34:23 +00:00
Chad Kieffer
3c31549011 Added gCommentsAdminMenu to clearfix. 2009-01-09 08:08:22 +00:00
Chad Kieffer
f97d7da720 Reformated comment admin table layout. Added bulk action checkboxes and menu, reply link, and edit link, all of which need to be wired up. 2009-01-09 07:33:22 +00:00
Bharat Mediratta
a0f3c09a07 Eliminate unused avatar code (for now) 2009-01-09 04:43:34 +00:00
Andy Staudacher
a631fe29f3 i18n refactoring: Rename all _() (reserved by gettext) calls to t().
- And refactor printf to our string interpolation / pluralization syntax
- Also, a slight change to the translations_incomings table, using binary(16) instead of char(32) as message key.
2009-01-08 17:13:06 +00:00
Bharat Mediratta
e9d61d5f9d "delete" is a reserved word in Chrome, apparently. 2009-01-08 03:05:53 +00:00
Bharat Mediratta
8bf388a6f6 Incremental improvement in comment moderation:
1) Akismet now detects when we change a comment's published state and submits
   info back to akismet.com as appropriate

2) We now show 4 different queues (all / approved / unapproved / spam) and let you
   move messages between the queues

3) We track and display "spam caught" stats.

4) You can delete comments entirely.
2009-01-08 02:50:23 +00:00
Bharat Mediratta
01dcbbcda5 Add very basic comment listing which shows the different queues
(approved, unapproved, spam).
2009-01-07 09:08:53 +00:00
Chad Kieffer
bdff96bd54 Added a jump to comments button with a scroll to effect. 2009-01-03 19:09:32 +00:00
Chad Kieffer
a57ede2f96 Added default user avatar. Comment thread updates, including display of avatar. Sidebar block display white space updates. Combined gLoginMenu and gCredits css. 2009-01-03 01:11:20 +00:00
Bharat Mediratta
cd1d023754 Change the preamble for views in two ways:
1) drop unnecessary semicolon
2) start with <?php for extra security in the case that the server itself doesn't
   have short_tags enabled (the app won't work, but we need to make sure that we're
   still secure)
2009-01-01 00:23:29 +00:00
Bharat Mediratta
0bb82b7621 Gut the comment module and simplify it. Stop trying to support Atom
and XML for now, we have no driver for those technologies so anything
we implement is not going to be sufficiently tested and therefore
it'll be broken.

Change all comment functions to return JSON and update the JS to deal
purely with JSON.  This is our new protocol for talking to the browser
and it should be flexible and portable.

Create comments.html.php.  This duplicates comment.html.php, but will
be more efficient for rendering comments since we won't be creating a
new View for every comment we render.
2008-12-25 00:47:40 +00:00
Bharat Mediratta
78ce8615f3 Implement the "recent comments" block with real data. 2008-12-21 02:02:41 +00:00
Bharat Mediratta
81e87dfecd Change "datetime" to "created" to give some semantics to this field. 2008-12-21 01:29:25 +00:00
Bharat Mediratta
ad0ddc236c Fix preamble 2008-12-20 07:30:27 +00:00
Bharat Mediratta
b933d1a170 Move Recent Comments into its own block. 2008-12-20 01:25:03 +00:00
Bharat Mediratta
140736a1e4 Several large changes:
1) Changed the way that we get forms.  Now, if you want to get a form
   for a REST resource you prefix /form to the resource id.  So:
    /form/photo/1    : returns a form for editing photo id 1
    /form/comments/1 : returns a form for adding a comment to photo id 1
    /form/comment/1  : returns a form for editing comment id 1

2) Changed the comment module to have two controllers:
    comment:  deals with a single comment resource
    comments: deal with collections of comments attached to an item

Related stuff:
- Moved the comments js into the theme
- Reworked Comment_Helper for clarity
- Moved form generation code down into Comment_Helper
- Cleaned up routes (eliminating new comment ones added in recent rev)
- Added form() function to all REST controllers
- Changed comment module to use a block instead of an arbitrary helper call from the theme
- Comment controller only returns HTML currently, but returns a 201 Created status
  code when a new comment is added, which the Ajax code can catch and act upon.
- Got rid of a lot of extra views in comment module
2008-11-16 07:14:12 +00:00
Bharat Mediratta
2d463c5531 use text::alternate where appropriate 2008-11-15 21:54:16 +00:00
Jozef Selesi
fbc810098f Do comment add in a single request, some code cleanup. 2008-11-15 17:39:14 +00:00
Jozef Selesi
5e10b44a95 Remove unnecessary pasted code. 2008-11-15 17:04:16 +00:00
Jozef Selesi
f9eaa8c220 Initial add comment implementation. 2008-11-15 16:52:23 +00:00
Chad Kieffer
c63ddc3432 Major updates to form CSS. Now using unordered lists for layouts. Added .gInline for forms like login, search, tags. Updated comment, login, search, and tagging forms. All form styles live in screen.css now. Still a lot to do, but this is a good foundation. 2008-11-13 03:39:18 +00:00
Jozef Selesi
a1ca946a89 Make comment post time display more user-friendly by displaying 'today', 'yesterday', 'x days ago' etc. 2008-11-12 12:00:13 +00:00
Bharat Mediratta
b0a3308740 Minor cleanup; localization, indentation, etc. 2008-11-11 22:46:25 +00:00
Jozef Selesi
752459c64c Display comments from the database. 2008-11-11 20:54:12 +00:00