Commit Graph

28 Commits (6e9982e090965b473ee570dbf70cbd7510f9d36c)

Author SHA1 Message Date
Dries Buytaert 04ad9b8af9 - fixed issue depricated call-by-reference issues
- fixed small visual glitch in includes/function.inc
- changed SQL tables around a bit to be more consistent
  (result: small changes to a lot of different files)
- improved robustness of includes/node.inc
- improved output of cron.module
- improved output of node.php
2001-03-29 19:50:31 +00:00
Dries Buytaert 1f79863053 - large commit of everything else that has been queued in my backlog:
it's not 100% stable yet
2001-03-25 10:57:01 +00:00
Dries Buytaert 68f2112b4d - nodified index.php:
the index page will only display stories for now but this will/can
    change in the near future
- all other files now thinks in terms of nodes, rather then stories
2001-03-24 17:04:11 +00:00
Dries Buytaert accd5f0c31 - applied David Norman's patch to turn all <?'s into fully qualified
<?php's.
2001-03-10 11:07:52 +00:00
Dries Buytaert 3958a714cd - some important changes to our theme API which can be summerized as:
abstract() + article() = story()

  abstract() and article() have been merged into a new function story()
  which looks like:

  function story($story_object, $reply) {
    if (!reply) {
       // full story
    }
    else {
       // main page version / abstract
    }
  }

  This should allow you to "compress" your theme as abstract() and
  article() tended to be 98% identical.

  => I didn't really merge your themes so I leave it up to *you* to
     improved the code!!! Do it ASAP as we release drupal 2.00 in 7
     days.

  In future we'll have similar functions for other content types as
  for example:

     review($review, $reply);
     enquete($enquete, $reply);
     ...
2001-03-08 08:16:23 +00:00
Dries Buytaert f516626a29 A rather large and important update:
revised most of the SQL queries and tried to make drupal as secure as possible (while trying to avoid redundant/duplicate checks).  For drupal's sake, try to screw something up.  See the mail about PHPNuke being hacked appr. 6 days ago.  The one who finds a problem is rewarded a beer (and I'm willing to ship it to Norway if required).  I beg you to be evil.  Try dumping a table a la "http://localhost/index.php?date=77778;DROP TABLE users" or something. ;)
2001-03-07 21:29:40 +00:00
Dries Buytaert de2e393933 - various updates, bugfixes and improvements 2001-02-04 22:09:38 +00:00
Dries Buytaert ea97888533 I know, I know, it is getting nasty lately but I have another large commit after nothing but code.
This time I redid the "category"-stuff.  Categories - from now on called sections - are now maintained from the admin pages, can have their own post, dump and timout thresholds as discussed earlier (some weeks ago).  By tomorrow evening users will be able to enable or disable section as well - i.e. to customize the content of drop.org.
2001-01-21 19:41:11 +00:00
Dries Buytaert 2952d16f78 - updated/improved discussion engine: it needs additional fine-tuning
though but I think this is stable enough for public consumption and
  real-life testing.
   ==> a first big step towards a flexible comment engine.

IMPORTANT:
  - Required theme updatins:

    UnConeD: check your $theme->controls() as I added a very, very
             dummy implementation

  - Required database updates:

    alter table users modify mode tinyint(1) DEFAULT '' NOT NULL;
    alter table comments change sid lid int(6) DEFAULT '0' NOT NULL;
    alter table comments add link varchar(16) DEFAULT '' NOT NULL;
    update comments set link = 'story';
2001-01-20 12:20:31 +00:00
Dries Buytaert 44c4800434 - here a bunch of changes to make "drupal" (for now) work with PHP 4.0.4
- tidied up some of the code and mainly working on the documentation
2000-12-30 11:58:14 +00:00
Dries Buytaert 524773f6da Yet another large batch of updates:
- I rearranged some of the code and clean-up some of the mess.

 - Added "blocks" which can be user defined/controlled: check
   to see.  The positioning of blocks is rather basic for the
   moment, so I'm all open for input on that.
2000-12-23 23:25:28 +00:00
Dries Buytaert a461e3696c * tiny improvements (!= bug fixes) 2000-11-14 09:03:44 +00:00
Dries Buytaert 9559f61fca Another batch with a lot of internal updates, yet no visual changes to the
site:

- watchdog (rewrite):
   + the collected information provides more details and insights
     for post-mortem research
   + input limitation
- database abstraction layer:
   + mysql errors are now verbose and is no longer displayed in a
     browser - fixes a possible security risk
- admin.php:
   + updated watchdog page
   + fixed security flaw
- diary.php:
   + fixed nl2br problem
- themes:
   + fixed comment bug in all 3 themes.
- misc:
   + renamed some global variables for sake of consistency:
      $sitename  -->  $site_name
      $siteurl   -->  $site_url
   + added input check where (a) exploitable and (b) possible
   + added input size check
   + various small improvements
   + fixed various typoes

... and much, much more in fact.
2000-11-13 08:17:45 +00:00
Dries Buytaert 11ee95dadc A big, fat commit with a shitload of internal changes. Not that much
visual changes:

- removed redundant files user.class.php, calendar.class.php
  and backend.class.php.
- converted *all* mysql queries to queries supported by the
  database abstraction layer.
- expanded the watchdog to record more information on what
  actually happened.
- bugfix: anonymous readers where not able to view comments.
- bugfix: anonymous readers could gain read-only access to
  the submission queue.
- bugfix: invalid includes in backend.php
- bugfix: invalid use of '$user->block'

and last but not least:

- redid 50% of the user account system
2000-10-19 13:31:23 +00:00
Dries Buytaert 73077e8778 A lot of (non-visual) updates! 2000-10-10 10:51:00 +00:00
Dries Buytaert 9a5e960638 * Reorganised a few things and fixed the theme-update bug reported by UCD. 2000-10-04 10:25:08 +00:00
Dries Buytaert 1f0a87f4e7 Over the last 2 days I redid and reorganized an afwul lot of code and
made quite a lot of additions.   The most remarkable addition is the
diary server, which I slapped together in less then 40 minutes.   Most
of the other changes are however `unvisible' for the user but add much
value to a better maintainability from a developer's objective.  Like
always, I fixed quite a number of small bugs that creeped into the code
so we should have a bigger, better and more stable drop.org.

Unfortunatly, some theme update _are_ required:


REQUIRED THEME UPDATES:
=======================

* use format_username() where usernames are used
* use format_date() where timestamps/dates are used
* use format_email() where e-mail addresses are displayed
* use format_url() where url are displayed
* replace 'formatTimestamp' with format_date
* replace 'morelink_*' with 'display_morelink'

[most of these functions are in function.inc or template.inc]

___PLEASE___ (<- this should get your attention ;) update your themes
as soon as possible - it only takes 30 min. to get in sync with the
other themes.  Don't start whining about the fact you don't know what
to change ... either eat the source cookie, or ask me to elaborate on
a few changes.  Just let me know what's puzzling you and I'll try to
help you out!


TODO LIST FOR NEXT WEEK
=======================
* Add checks for max. text length in textarea's?  Is there an HMTL
  attribute for this or ...?
* Comment moderation + mojo
* Edit/admin user accounts: block, delete, change permissions, ...
* E-mail password, change password, change e-mail address -> extra
  checks and routines to validate such `special' changes.
* Input checking - input filter: bad words, html tags, ...
2000-09-11 07:45:22 +00:00
Dries Buytaert 9966696dd6 * Small bugfixes and minor updates. 2000-06-25 16:53:56 +00:00
Dries Buytaert 0f5a60e109 IMPORANT - IMPORTANT - :)
=========================

Wulp.  I did a major upgrade by (a) breaking a lot of stuff and (b) by
re-doing those things in a much better way.  I redesigned the stories
and submissions SQL tables, the way they work and the way they co-
operate together.

In addition, I changed the way parameters are passed to
$theme->abstract() and $theme->article().  Instead of passing a
sh!tload of parameters that only cluttered the code and required too
much pre-processing on the engine-side, we now pass a singly object
$story.  $story has more variables then the paramaters we used to pass,
so it allows for better theming (if you feel like it).

I'm not finished yet but I decided to upload my changes so you can
start patching and updating your themes: PLEASE update your themes
ASAP!  I don't plan making heavy changes like this again, so don't
get intimiated. ;)  You mainly have to update article() and abstract()
as well as a minor update of footer():

article(), abstract():
----------------------
 - use the $story object - see my theme!
 - the morelink can now be themed.  Currently you can use the function
   morelink_bytes() in function.inc to `render' the old morelink.  The
   idea is to make a morelink_words() or morelink_lines() sooner or
   later because "188 bytes in body" is not half as clear as "52 words
   in body".  Clearly, "52 words" is much more informative. ;-)

footer():
---------
 - in the article-part, you need to update the displayRelatedLinks():
   instead of passing it $sid, you need to pass it $story (after you
   globaled $story).

Everything should display correct on the following pages:
 - main page
 - article page (follow a `read more | xxx bytes in bdoy | x comments' link)
 - submission queue
Check if they work with your theme: they should as they work fine for
me (theme `Dries') ...  If you got stuck, just look at my theme or ask
for a hand on the list!


Hopefully you can update your themes asap.  Thanks in advance.
2000-06-21 15:41:20 +00:00
Dries Buytaert 8a7690af57 Wheep! Wheep! Major performance optimization for index.php: we reduced the
number of SQL on the mainpage with factor 10 and shortened the code with 4
lines.  There is only *one* optimized SQL query left, being:

$result = db_query("SELECT stories.*, COUNT(comments.sid) AS comments FROM
stories LEFT JOIN comments ON stories.sid = comments.sid WHERE
stories.status = 1 AND stories.time <= $date GROUP BY stories.sid ORDER BY
stories.sid DESC LIMIT $number");

 Note: we use a LEFT JOIN to retrieve the number of comments associated
       with each story.  By retrieving this data now, we elimate a *lot*
       of individual queries that would otherwise be required inside the
       while-loop.  If there is no matching record for the right table in
       the ON-part of the LEFT JOIN, a row with all columns set to NULL
       is used for the right table.  This is required, as not every story
       has a counterpart in the comments table (at a given time).
2000-06-21 11:03:54 +00:00
Dries Buytaert 76f305571c * Changed a few things to make development easier without breaking things
to the outside world.  It's a first step towards improving the submission
  queue.

* More important (to the theme babies): instead of passing individual
  parameters I'm considering to pass an object.
    $theme->abstract($story->aid, $story->informant, $story->time,
     stripslashes($story->subject), stripslashes($story->abstract),
     stripslashes($story->comments), $story->category, $story->department,
     $morelink);
  would become:
    $theme->abstract($story);
  What do you guys think about pushing this trough?  It would be much better
  and would give extra `power' to the themes.
2000-06-16 11:00:57 +00:00
Dries Buytaert 07118dbd48 * Improved calendar.class.php speed-wise: did some inline caching to make
rendering a calendar less expensive.
* Added a function displayCalendar($theme, $active_date) to functions.inc.
* Adjusted index.php so it would support URIs formated like
  "?date=$unix_timestamp".
* Integrated the calendar in my personal theme: themes/Dries/theme.class.
  If you want to include the calendar in your theme, check the code in my
  $theme->footer(): global $date and call displayCalendar($theme, $date).

Check the main page at http://beta.drop.org/ with theme 'Dries' to see it
yourself!
2000-06-03 11:39:07 +00:00
Kjartan Mannes 92a0d43be9 Hopefully this will not break anything *prays*
;)
2000-06-02 18:36:15 +00:00
Kjartan Mannes 61584ea057 Fixed a typo 2000-05-20 00:38:26 +00:00
Kjartan Mannes e6998fd322 Wheeeeee... I think I finally figured this out :P 2000-05-19 23:33:15 +00:00
Dries Buytaert 02d673dc5e Just testing (and bored too). 2000-05-19 11:24:43 +00:00
Kjartan Mannes c678127f72 I got bored *G* 2000-05-19 11:20:58 +00:00
Dries Buytaert 008612ad49 Imported sources 2000-05-18 19:51:59 +00:00