Fixed jeroen.theme.
1. comment() function only gets 2 arguments. And as I made example.theme from jeroen.theme I don't see how thread got in there.
2. That must have sneaked in while I stripped down my theme to get to example.theme.
3. Fixed, it was already done in my top-right navigation box, but I must've forgotten it at the bottom.
4. OK, no more variable timestamp but straigt in the code. :)
Jeroen.
Read them carefully because the other theme might need updating too (I
don't think so though). I could only commit it now because I didn't
had the time to write up these comments/remarks yet. So here goes:
1. the comment() function only takes 2 arguments - $thread is no longer
needed and shouldn't be used in the code either.
2. I added 2 COLSPAN's to fix a <TD> problem in the story() function.
3. <A HREF="">home</A> is will not work properly when using drupal in
a subdirectory! Simply use <A HREF="index.php">home</A> instead -
it does matters. ;-)
4. Removed the $timestamp = format_timestamp(...)'s and used them
"directly" just like this is done for format_username and others.
It's generally more consistent now. :-)
OK, this is perfectionism. I had http://jeroen.drop.org/ validated once again, and noticed an error with a </P>, it said that the paragraph wasn't opened. But it occured near a story as we do <P> check_output(story->abstract) </P> I was pretty certain the paragraph was open. :) OK, so it wasn't the theme's fault, neither was it the engine. Then I went to take a look at the actual story and what did I see. It used a BLOCKQUOTE. After deleting the BLOCKQUOTE, messing around with the HTML, trying to insert it again. It always gave me the error when it was inserted... What's my conclusion? BLOCKQUOTE isn't allowed inside a paragraph...
Solution? We could take the option to use the blockquote HTML tag in a story or comment out of drupal. But I really like blockquote. So I now changed <P> check_output(story->abstract) </P> to <BR> check_output(story->abstract) </BR> because, basicly, that does the same thing. I'd advise you to do so too, I might do it for you if you please. Not that I really care about it, but lately we've got some queer w3-lovers on our back. Let's shake them off, allright? ;)
Jeroen.
If we're lucky this tiny jeroen.theme update might just save us from 5 HTML 4.01 bugs.
If we're very lucky it'll solve 7.
If we're unlucky only the code has improved.
Jeroen.
OK and this should be marvin.theme. We gained like 20 lines or so. But there aren't many graphics in marvin and a lot of stuff I'd put on several lines, Dries doesn't. Nevertheless, a good optimalization. Glad Dries came up with this. :)
Jeroen.
OK I fixed UnConeD's theme. Let's hope I didn't break anything. It were 256 lines and now there are 227 left. A save of 30 lines. Not too bad huh?
Let me check Dries' theme now.
Jeroen.
Jeroen.
P.S.: I don't think I'll get unconed.theme and marvin.theme updated today. But I promise I'll do it tomorrow. Had to go eat with my family, just got back and in 2 hours I am leavin for the movies. Hope you don't mind, but it's always cooler to commit patches closer to the release date... gives you this "rush" feeling. Ahh, deliberately doing stuff on the nick of time... sweet :)
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);
...
I updated some things, remove some PHP lines in the comment function, that I think weren't necessary (did that in the previous commit but forgot to mention it) also I renamed all the PHP?> tags to ?>. I read in the docs at http://php.net that this is the way to go. Also I renamed all <? to <?PHP. I added a BCGOLOR again, so my theme's build up is a little nicer again. Spotted four (yes 4) bugs. I now use regular HTML to assign colors but in abstract and article, the sections were still done the old way. Fixed that now, but left them black. Oh yeah, I fixed that weird rendering of my theme I think Dries was talking about. He didn't exactly mention what was wrong but I assume that it were the links in abstract and article that didn't display at the right of the story. Because I deleted some tables I had to add COLSPAN="2". However, when I loaded my page locally on eden it displayed correct. But when I browsed to drop it didn't (in the same browser) Do you get it? I sure don't. It was the same HTML code, but seems differently parsed when coming from an outside server. Allthough I don't see why Netscape would see apache locally as something different than another one. Nevertheless, I think it's fixed.
Jeroen.
I tweaked my theme a bit, don't know if it'll help much but I was able to squeeze a table out of abstract and article. So what you'd say? Well, since the abstract function is called for every post on the main page, I thought that it'd improve it a bit. Of course it isn't much but less tables to show the same is always a good thing. Also, due of the deleted table, I could delete some backgrounds (less traffic from the server to the client) and placed them once in a TABLE header. OK, but a cool side-effect is that it's more HTML 4.01 compliant. Because BACKGROUNDs are allowed in TABLEs and I think it's a bit unclear if they can be in TD yes or no. Either way, this brought to my attention that my !DOCTYPE is strict... I started of strict though... But I think it's a better idea to switch to transitional/loose. OK I think that was it... Oh also because of the changed TABLE structure I had to delete some BGCOLORs. Again, it might be a teeny weeny bit faster, but when you see my site being build up it isn't that nice anymore. (bgcolors are displayed faster than backgrounds). Nevertheless its the result that counts not? Let's hope everything still works.
Jeroen.
$theme->comment() only takes 2 parameters ever since the comment
system rewrite 2 months ago. Make sure to update your local tree
before you start hacking away on your themes.
- added a couple of missing t() functions
- improved the comments module, fixed the score problem Jeroen
reported earlier -> it's slicker but I hope it won't break anything
Nevertheless, here's the new footerleft.gif, you might want to check out htpp://jeroen.drop.org before Dries loads it up, otherwise you'll probably think I'm crazy :)
Jeroen.
Jeroen.
P.S.: Dries, I think we can release it tomorrow, but wait and upload it to http://jeroen.drop.org first so I can check. And at noon we'll let it out. It's yearning to, I can here it growl and make roaring noises in my laptop...
$link) are no longer needed by the engine so I decided to tidy them up -
I recommand you to do same if you feel like it (and if you haven't
already done so).
OK, now it's finished, really. Fixed a small gfx glitch, and the categories seem to be called sections now...
It's done, and ready for release. Really.
Jeroen.
I placed all the blocks left, regardless if their region was left or right, what I did was this:
theme_blocks("all", $this);
in my left <TD>.
Now I changed it to
theme_block("left", $this);
in the left <TD> and
theme_blocks("right", $this);
in the right. If everything was this easy.
OK, really, this theme is NS4.7 NS4.76 mozilla (but mozilla 0.8 cuz he's buggy as hell with the BACKGROUNDS in TDs) and IE comliant or compatible, whatever it's being called.
Jeroen. -- Happy.
Jeroen.
P.S.: I think my theme is completed... Of course the code might need some cleaning up but I think it is ready to be used by droppies without giving away the code. That'll be in the next drupal release.
It's ready for public release and can be added the the drupal CVS releases. First however, make sure you check htpp://jeroen.drop.org first and let me know if you find any more bugs. I still have to change a bit one a .gif before my footer is correct but that won't be a problem.
And thanks to Dries for solving some theme-problems.
Jeroen
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.
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';
IMPORTANT: you have to drop 2 tables "blocks" and "layout"
and you have to recreate them again with those
in database/database.mysql
- integrated the documentation written by UnConeD
integrated them were appropriate. It works better and the code is
more readable then it used to be:
(see http://drop.org/discussion.php?id=44&pid=0#0)
- story authors can no longer moderate their own stories
(requested by Natrak)
- fix inie-winnie small detail in theme marvin
- configuration:
+ renamed $db_name to $db_user
+ renamed $db_base to $db_name
- fixed small diary glitch
- fixed initial-comment-score problem
- fixed comment rating bug: improved the API and updated the
themes
- removed some tabs from Steven ;)
- fixed backend warnings and improved robustness
I'm not happy yet with the headline grabber - it generates
too many SQL errors.
- some small cosmetic changes in comment.module
- fixed minor glitch in format_interval()
- removed droplets
- added (optional) admin_blocks module
- added (optional) affiliate module
- added (optional) about module (only placeholder, under construction)
- fixed some tiny bugs (e.g. quote bug in search.php)
- partionally rewrote some modules to be big, bad and better
- partionally rewrote some modules to be more uniform
- added GNU GPL license to CVS
Also:
- installed PHP 4.0.4 on my localhost and now working
towards PHP 4.0.4 compatibility.
- I think I'll baptize the engine "drupal". If you have a
better idea, try convincing me ASAP.
Todo:
- more testing (also with PHP 4.0.4)
- make "project"-module: download, info, blah blah
- complete documentation
- 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.
1. improved .htaccess to be more "secure": to keep prying
eyes out
2. rewrote the administration section from scratch using a
modular approach
3. improved the information gathered by error.php - we can
now (hopefully) track what bots are crawling us.
4. fixed a bug in submit.php, fixed a bug in theme zaphod,
fixed a bug in theme marvin.
5. rewrote cron from scratch - it now interfaces with
modules as it should have been from the beginning.
Very cool if you ask me - it can use UNIX/Linux
crontabs.
6. updated widget.inc to be module aware - needs more
work though - maybe this afternoon?
7. updated most modules: small bugfixes, improvements, and
even the documentation
8. removed diary.php and made it a module - you can now
run a drop.org site without a diary system if someone
would prefer so
9. updated all themes to use the new modules where
appropriate
10. added a robots.txt because the error message in the
watchdog become annoying.
11. added the new configuration system (mutliple vhosts
on the same source tree) - use hostname.conf instead
of config.inc
12. removed calendar.inc and made it a module
13. added format_interval() to functions.inc (UnConeD)
14. whatever I forgot ...
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.
- fixed bug in discussion.php
- theme update: comment() now takes 3 arguments:
$comment - an object with comment data
$link - a link to the reply form of that particular
comment
$thread - the subthread of that particular comment
- theme 'marvin' and theme 'zaphod' are updated, theme
'unconed' is left to be done
(suggestion UnConeD)
- Added anchors to comment links to easy comment navigation.
(suggestion UnConeD)
- Fixed duplicate `you voted' after moderating a story.
(suggestion UnConeD)
- Fixed quote bug in administration center.
- Expanded user administration with timezone information.
- Improved the theme system by eliminating the "preview" function.
Let's not make the system more complex then it ought to be.
- Refined watchdog administration.
- ...
- fixed a bug in account.php: the confirmation url is now correct.
- improved error checking + security in diary.php.
- fixed a bug in the html code of theme zaphod.
- improved the date handling: always call format_date().
- expanded account information in administration pages.
- added a new variable $siteurl to ./includes/config.inc.
- added comment moderation to theme zaphod.
- "alter table users add timezone varchar(8);"
- !!! added new timezone feature !!! :o)
UnConeD: will you add the nl2br()'s to your theme or do you want
me to do so? Remark that it will look screwed up (too
many <br>'s) with the current stories but it won't with
new entries ...
+ 'nocomments' should be removed as it's no longer supported.
+ '$sid' should be passed or you'll get moderation errors.
+ 'get' should be 'post' in the control form.
+ renamed the 'Refresh'-button to 'Save'.
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
---------
- improved the user information page.
- improved the story submission page.
- fixed comments score bug: '.00' --> 'x.00'
- tried fixing the calendar wrapping - UnConeD, is it fixed now?
- provided a link back to the submission queue after having voted
for a story.
- fixed comment subject bug (and security flaw) by replacing
quotes by ".
- updated theme 'zaphod': fixed 2 bugs.
- updated theme 'marvin': fixed 1 bug and improved the layout so
things wrap (hopefully) better in Windows.
- comments have by default no subject pre-set - if no subject is
provided, the user is warned and when a comment eventually got
submitted without a subject, a subject is composed using the x
first characters of the comment's body.
- improved comments on submit.php
- corrected a typo in the FAQ.
UnConeD
-------
- replace 'article.php' by 'discussion.php'
- comment() still uses old references to account.php: the
parameters you supply to account.php does no longer hold.
You have to update those links to the new syntax.
- commentcontrol() is outdated - copy paste the one of
theme 'marvin' and adjust it to your likings.
- Added a basic implementation of comment moderation
- Updated and renamed my 2 themes: I removed redundant boxes and tried to
work towards simplicity.
- Disabled the other themes as they are broken (I gave you sufficent time
to update them).
- Removed redundant files.
- Added security checks with regard to the usage of HTML tags.
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, ...
--------
* URI/URL enhancements to make the URLs more comprehensive and shorter.
* Fixed a bug in submit.php that slipped in during the latest commit.
* Changed a few tidbits on the calendar.
* Fixed a bug in most themes:
$tid --> $cid
COUNT(tid) --> COUNT(cid)
Updated most themes except for UnConeD's.
* Fixed a handful of problems with Jeroen's theme. However, Jeroen's
theme is still not working yet - some features are completly missing,
making the theme not very useful ...
Any known bugs left? If not, I'll head on tonight and add some new
features. I'll probably add basic admin tools to edit articles and
such. Once done, we can start on the comment moderation.
browser, but now the Status box show in 9pt too and I dont want that, does
anyone know how to break out a stylesheet so you still can assign font sizes
within the body, without them being overruled by the stylesheet?
I replaced much of the giffies filenames with more human-readable ones.
Yes this implies a lot of removing and replacing giffies. Expect some more
cvs updates. :)