49 Commits

Author SHA1 Message Date
Bharat Mediratta
9e0631ab0d Provide a "default moderate" option for comments. The default behavior
is unchanged, but you now have the option to set all new comments to
be unpublished and then moderate them through the Admin > Content >
Comments interface.

Fixes #2126.
2014-05-28 14:54:02 -04:00
Bharat Mediratta
9396342250 Drop the requirement to have the install() function set the module
version.  It's redundant.  Fixes #1985.
2013-01-31 19:55:53 -05:00
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Bharat Mediratta
b7e89613fc Installer for comment module version 6 still set rss_visible to "both"
not "all".  Fix that now and rebuild the installer package.  Fixes #1917.
2012-10-08 14:04:40 -07:00
Bharat Mediratta
5400c4be26 Oops, fix up a bug originally added in
7d66ab2e94 when I tweaked the name of
the rss_available variable to be rss_visible, but got it wrong.  Bump
the comment module to 6 so that we run the installer and clean up old
vars.

Fixes #1854.
2012-05-07 13:45:13 -07:00
Bharat Mediratta
7d66ab2e94 Improve comment RSS feed visibility, initially added by Thomas E. Horner in
fc942aacda.

Change some variable names, refactor out visibility checking code, actually
check visibility at generation time instead of just suppressing the UI,
update module.info

Fixes #1829.
2012-03-29 13:06:44 -07:00
Bharat Mediratta
60286bfba3 Merge commit 'fc942aa' 2012-03-29 06:37:00 -07:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Thomas E. Horner
fc942aacda availability of rss is now configurable 2011-07-08 09:33:51 +02:00
Bharat Mediratta
c12c43a415 A little more work on kandsten's fix for IPv6 support in
10785b1e82:

- some style cleanup
- bump the module version in module.info
- rebuild the installer.sql
2011-03-27 11:38:37 -07:00
Kriss Andsten
10785b1e82 Extend comment module field lenghts to fit IPv6 remote host addresses and long (but legally so) hostnames. 2011-03-27 11:34:52 -07:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
94ada2361d Fix a bug in the upgrader where we weren't bumping the version number
during the upgrade path, so the 2nd stanza (version 2 to version 3) was never getting executed.
2010-06-15 16:14:30 -07:00
Bharat Mediratta
87fde3f360 Create a UI under Admin > Settings > Comments where you can limit
comments only to registered users.  It's simplistic, but is better
than adding a permission since generally this setting will be used
Gallery-wide.

Fixes ticket #1002
2010-06-05 23:35:32 -07:00
Bharat Mediratta
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Tim Almdal
a5a8cfd1bc Re-generate the install.sql so that the keys of the block lists are an md5 hash of the module_name:block_id. Also change the packager so we delete the _cache variable for the module gallery not core. 2009-11-12 13:14:02 -08:00
Bharat Mediratta
4828db003f Remove 'ENGINE=InnoDB' specification from tables that we create. Use
the system's default table specification.  Fixes ticket #597.
2009-08-27 15:47:54 -07:00
Bharat Mediratta
7863aa16f9 Update tags module to notify modules when items related to a tag are
affected.  Practically speaking this means that we'll reindex items
when tags are added or removed from them.

API change:
  Remove item_related_updated_batch event.

Rationale:
  While this is an efficient event, it requires module developers to
  support two event APIs for staying up to date and increases the
  likelihood that they'll forget one and have data corruption.  Force
  them all through the slower but more reliable pipe, for now.  We
  can always try to improve efficiency by using the batch_start and
  batch_stop events.
2009-08-08 14:30:21 -07:00
Bharat Mediratta
3b0baa8271 Replay change from Romain DE LISEZ to change the state column to be a varchar 2009-06-23 13:45:16 -07:00
Bharat Mediratta
e49c4a2459 Upgrade to version 2 and change the state column to a varchar for
Postgres compatibility.
2009-06-23 13:40:23 -07:00
Bharat Mediratta
bfca0c7903 Refactor the install/upgrade code to be more flexible.
Add xxx_installer::upgrade($version) method so that upgrade stanzas
are separate from install stanzas.  In the old code, to do an upgrade
meant that you had to re-evolve everything from the initial install
because we'd step through each version's changes.  But what we really
want is for the initial install to start off in the perfect initial
state, and the upgrades to do the work behind the scenes.  So now the
install() function gets things set up properly the first time, and the
upgrade() function does any work to catch you up to the latest code.
See gallery_installer.php for a good example.
2009-06-23 12:00:49 -07:00
Bharat Mediratta
7aed923908 Restructure the module lifecycle.
Install: <module>_installer::install() is called, any necessary tables
are created.

Activate: <module>_installer::activate() is called.  Module
controllers are routable, helpers are accessible, etc.  The module is
in use.

Deactivate: <module>_installer::deactivate() is called.  Module code
is not accessible or routable.  Module is *not* in use, but its tables
are still around.

Uninstall: <module>_installer::uninstall() is called.  Module is
completely removed from the database.

Admin > Modules will install and activate modules, but will only
deactivate (will NOT uninstall modules).
2009-05-26 05:28:59 +00:00
Bharat Mediratta
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Bharat Mediratta
cdf873f1b3 Remove extra blank line. 2009-04-05 17:50:57 +00:00
Tim Almdal
8082060434 Forgot to remove a back tick 2009-03-18 01:24:54 +00:00
Tim Almdal
8e1817d4e4 Couple of sql statements that had incorrect prefix handling or no
prefix handling.
2009-03-18 01:20:30 +00:00
Tim Almdal
c04ff8e02f Change the pattern to identify tables that need prefix substitution to
mirror the drupal pattern of using braces {}.
2009-02-28 06:37:28 +00:00
Tim Almdal
bd15853708 This implements table prefix for all the queries in core, user, exif,
tag, search, comment and notification modules (Ticket #68)
2009-02-27 21:07:18 +00:00
Bharat Mediratta
7b68ca9946 Refactor dashboard -> block_manager since it'll manage blocks site
wide, not just in the dashboard.
2009-01-18 06:55:04 +00:00
Bharat Mediratta
d568a1e9fd Implement relevance ranked boolean searching on a full text index of
item and comment data.  Whew!

It's not pretty yet.  And you have to manually update the index
currently in admin/maintenance.  But it works.
2009-01-17 00:52:50 +00:00
Bharat Mediratta
f3ba69c1d6 Make sure that helper functions are all static. Add new
File_Structure_Test to make sure we don't regress.

According to the PHP docs, the "public" keyword is implied on static
functions, so remove it.  Also, require private static functions to
start with an _.

http://php.net/manual/en/language.oop5.visibility.php
2009-01-14 04:12:02 +00:00
Bharat Mediratta
c5f77510a7 Refactor dashboard block handling out into a dashboard helper so that
module installers don't have to know the grotty details of how it works.
2009-01-12 08:51:54 +00:00
Bharat Mediratta
bc421a615a Implement deleting dashboard blocks.
* Refactor blocks so that they have a separate id vs css_id.  This way
  we can have a unique identifier for each visual block.

* Store blocks with a random id as their unique identifier

* Add Admin_Dashboard::remove_block() and modify
  themes/admin_default/views/block.html.php to call it when you click the
  remove box.
2009-01-12 08:26:38 +00:00
Bharat Mediratta
b19729435c Dashboard blocks are now data driven, and you can add new blocks to
both the sidebar and the center content area from a dropdown at the
top of the dashboard sidebar.
2009-01-12 07:39:53 +00:00
Andy Staudacher
3df7889128 Increase length for user-agent and accept fields in comments table.
And truncate strings before passing them to MySQL.
2009-01-11 05:36:31 +00:00
Bharat Mediratta
44bfc1c6a4 Auto-delete 7-day old spam/deleted comments. 2009-01-10 11:25:33 +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
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
Tim Almdal
9644dcc480 1) Removed the published boolean database field
2) Replaced it with a string field (state) which contains the state of the comment. i.e. published, unpublished, spam.  Unsure if we want to create constants in comments.php to standardize the valid values... thoughts?
3) synchronized the spamfilter and comment unit tests with the current functionality
2009-01-02 18:54:37 +00:00
Tim Almdal
206edb59b9 Update the api to allow each driver to specify validation rules and generate the appropriate form content. Add a callback so if the driver changes in the driver selection dropdown, then the api form fields are updated with the new form fields for that driver 2009-01-02 18:31:23 +00:00
Bharat Mediratta
f29aad03a6 Make some columns smaller so that multi-column keys don't exceed 1024
bytes on some systems.
2008-12-30 01:37:09 +00:00
Tim Almdal
69603ede7a Implemented bharat's suggestions to the comment module in preparation for the spam_filter module 2008-12-29 21:09:44 +00:00
Tim Almdal
95f1440ef2 Changes to the comment module to support spam filtering. Basically added two columns to the comment table. The url of the author's web site(default null) and a flag to indicate that the comment is visible (default true).
The comment block has changed to only display comments that are visible.

And there is code added to call the spam_filter helper if the spam_filter module is installed.
2008-12-29 19:37:19 +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
c95c17b133 Centralize logging around installing/uninstalling modules. 2008-11-27 09:45:26 +00:00
Bharat Mediratta
0fe8d44472 Create module helper and refactor all the code that creates, updates
and deletes modules into it.
2008-11-13 10:38:28 +00:00
Bharat Mediratta
1ba012db0e Chain away temporary variables 2008-11-09 23:45:47 +00:00
Jozef Selesi
aa437293e6 Fix line endings. 2008-11-09 23:34:03 +00:00
Jozef Selesi
434e56351e Install/uninstall support for the comment module. Missing from the previous commit. 2008-11-09 23:06:31 +00:00