Commit Graph

199 Commits (3fbd49d786e57ebde5736793a5050cda8796205d)

Author SHA1 Message Date
Dries Buytaert 34af2a3a8e CHANGES:
- Rewrote the cron system.  Removed cron.module and moved all cron
  related options to settings.module.  Cron was a confusing thing:
  it has been made simpler both in terms of code and configuration.

   + You had to rehash your modules to make the cron show up in
     the list.  This is no longer required.

   + You couldn't tell what cron "watchdog" or cron "story" were
     up to.  Instead, we now display a clear description message
     for every cron involved.

   + The user interface of setting.module - and the admin section
     in general, looks a bit ackward but I couldn't care less and
     don't want to see this improve at the time being.

- Improved setting.module:
   + Now uses variable_set().
   + Added some help and documentaition on how to setup cron.

- Improved ./export.

- Updated CHANGELOG.


TODO:

- I'm now going to look into UnConeD's question with regard to
  check_output() and $theme->node(), as well as the filter and
  macro stuff.  I'll probably be fine-tuning setting.module a
  bit more on my way.
2001-05-19 13:41:52 +00:00
Steven Wittens e7c727a634 Oops, I used sort() instead of asort(), which destroys the keys in associative arrays. 2001-05-18 22:03:05 +00:00
Steven Wittens 507b2a8cd1 Made module_list() return an alphabetically sorted list.
On Windows machines (not sure about *nix boxes) it's not always pre-sorted by the filesystem. It has no effect code-wise, but it will cause all module-lists in Drupal to be sorted alphabetically (e.g. the links in admin.php).
2001-05-18 21:57:52 +00:00
Kjartan Mannes eeb572b1fc - Changed form_file($name) to form_file($title, $name, $size, $description = 0).
This change extends the functionality and makes it conform more with the
  other form_* functions.
2001-05-18 09:17:00 +00:00
Dries Buytaert 031e4d4208 - Tidied up the field_get() API and improved the implementation of
both field_set() and field_get().
2001-05-17 20:50:15 +00:00
Dries Buytaert e5c7aefa5b - Removed debug output. 2001-05-17 19:51:42 +00:00
Dries Buytaert 6c38796219 - Fixed bug in account.module.
- Simplified field_set() API.

- Made UnConeD's cool common timestamp format conform with the
  general coding style.  Sorry to be so picky about this but I
  really can't help it. ;)
2001-05-17 19:14:50 +00:00
Steven Wittens e2f051b385 Improved and optimized format_interval() 2001-05-17 18:25:08 +00:00
Steven Wittens daee55e0ec Updated the custom timestamp format to include locale support. 2001-05-17 17:56:52 +00:00
Kjartan Mannes 30c236f22b - Extended form() to take an optional forth parameter which is appended to
the <FORM> tag.
- Added form_file($name) for file uploads. (requires form() to be called with
  $options='ENCRYPT="multipart/form-data"'.)
2001-05-17 11:49:19 +00:00
Dries Buytaert 6f02738cc2 - Removed the "history"-field from the SQL table "users" and added
this information to the "users"-field in both nodes and comments.
  This database/table change reduces the number of SQL queries and
  makes Drupal scale better where a lot of voting/moderation takes
  place.  Last but not least it can be considered a new and better
  foundation for future moderation metrics / algorithms.  In other
  words: it is plain better.

    --> oops, all voting/moderation results will be lost!
    --> requires database update, see "2.00-to-x.xx.sql"!

- Updated database/database.mysql
2001-05-16 20:54:37 +00:00
natrak f40efdcada - Updated to only die() if page is directly requested. 2001-05-16 14:45:36 +00:00
Dries Buytaert ced0838a82 - Fixed bug in path_uri() 2001-05-16 12:31:08 +00:00
Dries Buytaert 14ddbc473c - Created 2 new functions:
+ path_uri(): returns the fully-qualified URI of your drupal site.
    + path_img(): returns the image directory or http://image-server.com/
                  in case you prefer to load-balance bandwidth usage.

  Replaced all occurences of the variable "site_url" with path_uri()
  and removed "site_url" from "setting.module".

- Drastically simplified the node_save() API, which should make the
  node-forms more secure.  Updated "story.module", "book.module",
  "forum.module", "page.module" and "node.module" to reflect this
  change.  This is needs more testing so hit it, beat it, tease it.

- Fixed an occasional glitch in the configuration file loading logic.

- Made "queue.module" display an informative notice when an anonymous
  user tries accessing the moderation queue.

- Updated the hard-coded information in drupal.module a bit.
2001-05-15 18:38:57 +00:00
Dries Buytaert bb3ccea5f7 - Fixed typo: "$language" should have been "$languages". 2001-05-14 20:05:39 +00:00
Dries Buytaert e22f1042fc - Renamed "hostname.conf" to "setting.php" (cfr. "setting.module").
Note that - when upgrading - you have to rename all your existing
  configuration files to reflect this change:

     yourdomain.com.conf -> yourdomain.com.php

  By default, i.e. if no configuration file is found, setting.php
  will be used instead.  Using the ".php"-extension will fix most
  configuration/security issues with .htaccess-files ...

- Removed some dead code from forum.module.
2001-05-14 19:41:18 +00:00
Dries Buytaert 86bb9a10cb - Made the main page display sub-topics when a specific topic
is selected.

- Made theme_link() less "hard coded", we still have to make
  it fully configurable though.

- Fixed glitch in story submission: the warning messages were
  not displayed.

- Tidied up block.module a bit.
2001-05-12 21:06:13 +00:00
Dries Buytaert dda4e903a4 CHANGES:
- Added moderator support to topics.
2001-05-10 20:40:31 +00:00
Dries Buytaert 0000c2e401 - Code review: improved search API, tidied up the search related code,
and fixed a tiny bug when searching for users.
2001-05-09 18:28:09 +00:00
Dries Buytaert 25c379fb61 - Added custom PHP error handler to track down warnings and errors.
(Jeroen: let's sit back and wait until that warning bites again.)

- Simplified drupal.module.  We still need a feature list, anyone?
2001-05-06 17:19:58 +00:00
Dries Buytaert be8e898d23 - Uhm. Rewrote the module system: less code clutter, less run-time
overhead, and a lot better (simpler) module API.  I had to edit a
  LOT of files to get this refactored but I'm sure it was worth the
  effort.

  For module writers / maintainers:

  None of the hooks changed, so 95% of the old modules should still
  work.  You can remove some code instead as "$module = array(...)"
  just became obsolete.  Also - and let's thank God for this - the
  global variable "$repository" has been eliminated to avoid modules
  relying on, and poking in drupal's internal data structures.  Take
  a look at include/module.inc to investigate the details/changes.

- Improved design of the content modules "story", "book" and "node"
  (to aid smooth integration of permisions + moderate.module).  I'm
  still working on the permissions but I got side tracked for which
  I "Oops!".
2001-05-05 13:57:29 +00:00
Dries Buytaert 343e71c8eb CHANGES:
- Added moderator permissions to nodes.

- Added moderator support to structure.module.

- Added new moderate.module.

- Renamed moderation.module to queue.module to avoid confusing.
  Updated theme yaroon as it seems to have a hard-coded reference
  to moderation.module.

- Polished on:
   + account.module: improved access list
   + fixed HTML typo in node.module

ACTIONS:

- Jeroen: can jeroen2.theme be removed from ./themes/yaroon?
2001-05-02 20:52:19 +00:00
Dries Buytaert fead09a8de Welp. Large commit ahead.
CHANGES:

- Added "read" and "write" permissions into drupal but removed
  it again because - when finished after 3 hours of work - it
  was considered nothing but added complexity that didn't buy
  us anything. :I

  (I'll explain this in detail on the mailing list, I guess.)

- Added a very simple help.module to group all available
  documentation on a single page.

- Fixed bug in node_control(), book.module: UnConeD forgot to
  global $user when updating the combobox code.

- Removed static wishlist.module: in future, the wishlist can
  be maintained as a page in our collaborative book.

- Revised most of settings.module: tidied up the code and the
  descriptions to accompany the settings and introduced a new
  "default maximum number of nodes to display on the main page"
  variable.

- Revised most of comment.module: the administration interface
  looks better now, integrated node permissions, and -finally-
  made it possible to delete comments.

- Polished on:
   + account.module
   + structure.module
   + locale.module
   + module.module
   + forum.module

- Form-ified:
   + account.php
   + account.module
   + setting.module
   + cvs.module
   + submit.php
   + comment.module
   + forum.module
   + book.module
   + page.module
   + locale.module

- Updated CHANGELOG

INFO:

- Designed a "generic tracker system with optional backends"
  on paper.  The idea is to allow registered users to hot-list
  certain topics, individual nodes or threads (comments) and
  to "plug-in" output backends like - for instance - an e-mail
  digest.  The design requires "intelligent blocks" though.


TODO:

- I want to tidy up the headline.module and backend.class as
  well as merge in headlineRSS10.module.  Julian spent quite
  some time working on headline.module but I'm not sure what
  he changed and whether he'd contribute it back?
2001-04-30 17:13:08 +00:00
Dries Buytaert ef7d5e1201 CHANGES:
- Added new form_* functions to common.inc, used for building
  forms: it should improve 'stability' (no form typos, every-
  thing properly escaped/unescaped) and should help providing
  a very consistent user interface (wrt forms).

- Adjusted node.module to use the new form functions.
  (Can be used as an example.)

- Adjusted book.module to use the new form functions.
  (Can be used as an example.)

- Merged function.inc into common.inc!

- Slowly removing all global $status and $rstatus variables:
  use node_status() instead.

TODO:

- Apart from implementing the permission system, I'll spend
  some time updating most modules today and tomorrow to use
  the new form functions.
2001-04-29 12:39:55 +00:00
Dries Buytaert 828f36cdf1 - Addition: added a new, tiny forum module: I will use this forum
module to develop and test the permission system along with the
  regular nodes.  And hopefully, this forum module will grow into
  a very useable piece of code for drop.org.

  Requires a new SQL table "forum", see 2.00-to-x.xx.sql.

- Removed 1 unused hook from page.module.

- Removed 1 unused function from comment.inc.
2001-04-29 10:03:21 +00:00
Kjartan Mannes 95f92686e4 CHANGES
- Modified conf_init() to use default.conf if nothing else can be found.
- Added some comments to hostname.conf to reflect the changes and
  provide more information on how to rename the file.

TODO
- The Drupal handbook should be updated once the CVS version is released.
- Should try to remove the remainder of info from hostname.conf and go for a
  completely web-based administration if possible.
- Does having all the settings in a SQL database make Drupal add more
  overhead than including a .conf file? If nobody knows for sure some tests
  should be done. If yes, concider having the admin interface generate an
  include file in addition to saving to the database.
2001-04-27 06:45:07 +00:00
natrak 4f6b21519e CHANGES
- Modified conf_init() to use default.conf if nothing else can be found.
- Added some comments to hostname.conf to reflect the changes and
  provide more information on how to rename the file.

TODO
- The Drupal handbook should be updated once the CVS version is released.
- Should try to remove the remainder of info from hostname.conf and go for a
  completely web-based administration if possible.
- Does having all the settings in a SQL database make Drupal add more
  overhead than including a .conf file? If nobody knows for sure some tests
  should be done. If yes, concider having the admin interface generate an
  include file in addition to saving to the database.
2001-04-27 06:45:06 +00:00
Kjartan Mannes bd8952ebb2 Changes
- Fixed an error in module_rehash_blocks() that didn't handle '-symbols.
- Removed some module depencies. Drupal will now run (sorta) even if there
  are no modules installed.
- Changed theme_link() to check if certain modules are installed before
  offering a link to them.

Todo
- Check all SQL queries to make sure they are addslashes'ed correctly.
- Check the effects of changing the PHP magic_quotes setting.
- Make the theme_link() function to be customizable either via the admin
  page and/or in the module itself.
2001-04-23 11:06:18 +00:00
natrak 78def0485b Changes
- Fixed an error in module_rehash_blocks() that didn't handle '-symbols.
- Removed some module depencies. Drupal will now run (sorta) even if there
  are no modules installed.
- Changed theme_link() to check if certain modules are installed before
  offering a link to them.

Todo
- Check all SQL queries to make sure they are addslashes'ed correctly.
- Check the effects of changing the PHP magic_quotes setting.
- Make the theme_link() function to be customizable either via the admin
  page and/or in the module itself.
2001-04-23 11:06:17 +00:00
Steven Wittens 839cb3f4cb - Oops: left in a debug-statement 2001-04-21 22:49:14 +00:00
Steven Wittens 2e25565b86 - Fixed bug when node-navigation-combobox wouldn't select the correct item if drupal was run from a sub-directory. 2001-04-21 22:48:28 +00:00
Steven Wittens 323c30e1dc - Added "custom" date/time format... to allow user-timezone-adjusted custom date formats. I didn't add special logic to translate parts of it, but it's not really needed, as this is only meant for internal usage (e.g. checking if timestamp A is on the same date as timestamp B).
Some modules (such as diary) should be changed to take advantage of this function, as they are now still using GMT+0 dates in some cases (e.g. the recent diary entries box).
2001-04-21 21:18:47 +00:00
Steven Wittens d6554be786 - Fixed typo "sumbission" 2001-04-21 19:21:11 +00:00
Steven Wittens a66c4e59ec - Centered the comment controls... much nicer :) 2001-04-21 17:35:29 +00:00
Steven Wittens b24aff1da2 Made the "add" and "update" options in the node-combobox appear only when logged in. 2001-04-21 15:51:23 +00:00
Dries Buytaert cccb132c81 - Addition: added a "promote" field to the node table, which
makes "promoting nodes" to the main page possible.  Stories
  and reviews could be promoted by default, but - on accasion
  a good book entry could be manually promoted too.  Thus all
  existing content types can be shown on the main page, not
  just stories.

  Requires a SQL update, see 2.00-to-x.xx.sql!

- Addition: implemented "auto-post new submissions" feature
  to disable or by-pass the moderation queue in addition to
  "moderate new submissions".

  TODO: admin moderation versus registered user moderation.

- Addition: added category and topic support to page.module.
2001-04-21 14:19:20 +00:00
Dries Buytaert 3f1979aa3c - Addition: made it so that comments can be enabled/disabled on
a node per node basis, rather then on a category per category
  basis.  The default settings for each individual category can
  be changed though.

  Example: it can be setup so that - by default - all stories
  posted to the category "article" will have comments enabled
  but stories submitted to "announcement" not.

  Different configuration schemes can easily be added later.

  Requires a SQL update, see 2.00-to-x.xx.sql/database.mysql.

- Addition: made submit.php only use categories that users can
  actually submit new content to.
2001-04-19 19:59:48 +00:00
Dries Buytaert a6e6dfb921 - Addition: added 2 new functions check_mail() and check_name()
to functions.inc useful for resp. verifying an e-mail address
  and username: currently used by account.php - but reusable by
  Julian's refer.module for example (prepares integration).
2001-04-19 19:54:37 +00:00
Dries Buytaert 78cd8cda09 - Addition: added a new function "module_hook($module, $hook)" to check
wether a module implements a certain hook or not.
2001-04-19 19:51:24 +00:00
Dries Buytaert 8e94fe1625 - structure.inc: added category_name($cid) and topic_name($tid).
They both return a linked string with the respective category,
  or topic name.  Updated all themes to use these new functions.

- (stripped tabs from emsa files, nevermind)
2001-04-18 20:40:21 +00:00
Dries Buytaert b1c66cb5de Another big update so please read this carefully because there is important information hidden in it.
Made it so that we can disable/enable comments on a category by category basis. In order to accomplish this I had to make a few (*temporary*) changes.

I moved all comment code from the "module level" (eg. story.module) to the "node level".  It was nothing but the logical next step in nodifying drupal.  This enables us to add comments to all existing content types including book entries.  But also for book entries, this to can be toggled on and off. :-)

Moreover module writers don't have to worry about the complex comment logic: it is "abstracted" away.  This implies that story.module got smaller, faster and easier to comprehend. :-)

In order to accomplish this, I had to update ALL THEMES, which I did - and on my way I updated Goofy, Oranzh and UnConeD - with the previous changes.  All themes are up-to-date now!  I also had to remove the [ reply to this story ] links, and temporally re-introcuded the "Add comment" button in the "Comment control".  Tempora lly that is, UnConeD. ;)

I plan to upgrade drop.org either tommorow or wednesday so test away if you have some time to kill. ;)

Oh, I also fixed a few bugs and made various small improvements.
2001-04-16 18:21:22 +00:00
Dries Buytaert 53c67ac0a2 - a few changes which might help overcome Jeroen's redeclartion problem
(or might not)
2001-04-16 13:26:38 +00:00
Dries Buytaert a61830b45e - forgot to disable some debug information 2001-04-16 12:31:11 +00:00
Dries Buytaert b9952f537d Large commit, read it carefully, and make the required changes to
your theme:

- corrected some missing translations in story.module.  Oops!
- grealty simplified the "moderation threshold mechanism"(tm) so
  that module writers don't have to worry about this.  As a result
  story.module and book.module became a bit smaller and easier to
  grasp.
- greatly simplified new "category" and "topic" code which is soon
  going to replace the "section" code.  Needs more work though so
  hang on thight.
- includes/section.inc and modules/section.module are replaced by
  includes/structure.module and modules/structure.module.
- beautified example.theme a bit without adding HTML complexity:
  it is a good example but still useful as a theme
- made theme example use "categories" and "topics"
    --> TAKE A LOOK AT IT AND UPDATE YOUR THEME
- made theme marvin use "categories" and "topics"
    --> TAKE A LOOK AT IT AND UPDATE YOUR THEME
- added 2 new "story listings" to administrator interface of
  story.module to verify story integrity.
- optimized comment table a bit (work in progress)
2001-04-16 11:38:12 +00:00
Dries Buytaert 49a7dccb64 - make the version CVS function a bit better 2001-04-16 08:36:25 +00:00
Dries Buytaert 1f0565806b - improved submit.php:
it now uses the new category code, incl content bindings.
  You can setup different "categories" which map on a content
  type.  Example:
    review   -> review.module
    article  -> story.module
    column   -> story.module
    announc. -> story.module
    addons   -> file.module
    themes   -> file.module
- "generalised" story.module and book.module's output.
- fixed bug in includes/timer.inc
- fixed glitch in theme example.theme: it said "$how by" but
  the variable $how has never been declared.
- added "drupal development settings" to display some timings
- more work on the categories/topics -> does NOT work yet
2001-04-15 17:01:32 +00:00
Dries Buytaert f1716fbd9c - improved settings.module and fixed a few quircks along the way:
+ added "reset to defaults"
   + added "development settings" - for drupal development only
   + made a few things more consistent
2001-04-15 09:36:00 +00:00
Dries Buytaert 024c75e720 - tidied up the old code 2001-04-14 19:33:53 +00:00
Dries Buytaert 4847cb22f5 - node_save returns the $nid --> can come in very handy one day :) 2001-04-14 19:32:15 +00:00
Dries Buytaert 2da4122d3c - added new variable: theme_footer which can be used to provide a
footer message like a copyright notice. Themes should use this!
2001-04-14 19:31:28 +00:00