This is a more up-to-date version of "Yaroon". Glad some people are actually using it. If you encounter any bugs just drop them in my personal mailbox or fase them through to the mailinglist and let everyone know that I can't commit anything that, more or less,... works.
Greets,
Jeroen.
- format_username() now takes a second optional parameter which gives the
real name of the user.
Rest
- updated the calls to format_username() where appropriate to show the name
of the user instead of the account id. Clicking on a name will still give you
the account info etc. If you find a place where the real name is not shown
let me know.
- format_username() now takes a second optional parameter which gives the
real name of the user.
Rest
- updated the calls to format_username() where appropriate to show the name
of the user instead of the account id. Clicking on a name will still give you
the account info etc. If you find a place where the real name is not shown
let me know.
+ added $theme->images()
- blog.module:
+ improved user-friendliness and rewrote most of the output routines
+ made quoted text /italic/ by default
+ integrated discussion system like it should
+ ...
- marvin.theme:
+ small visual improvements
Basically this is a 'nice version' of a hack that you could do as a theme author.
I've updated all the standard themes, but 3rd party themes will of course have to be updated by their authors, in the following manner:
- Replace the box() declaration:
< function box($subject, $content) {
> function box($subject, $content, $region = "main") {
- Replace the theme_account call:
< theme_account($this);
> theme_account("region", $this);
Note that you'll have to replace "region" with the correct region that the box is placed in. However if you have a one-column theme, you should use "all", and not for example "left" (if all boxes are on the left).
Usually the "region" here should be the same as the nearest theme_blocks() call.
Those theme authors who want to can make boxes that appear in the center look different from those that appear in the sides for example.
- Fixed tiny quote problem in account.php.
- Fixed tiny bug in comment.inc.
- Fixed tiny bug in comment.module.
- Fixed tiny bug in meta.module.
- Simplified user_access() API.
- Rewrote link system: still needs fine-tuning and testing so don't
upgrade if you are running a production site. ;)
Updated all modules and themes to reflect this change. All other
themes and modules need updating too!
- Changed meta.module, node.module and index.php to use comma-seperated
lists of attributes rather then "foo=a,bar=b" lists. This makes it a
a lot easier to use both modules. In addition, error handling can be
discarded as it can't be made any simpler, really ...
It fits rather nicely in Drupal's design so I'm getting more and more
happy with this meta.module (but we are not 100% there yet).
- node.module, node.inc:
+ Improved the node-related admin interface so that navigating back
and forth the administrative menus is made both easier and faster.
+ Removed some redundant database fields from the node table. See
2.00-to-x.xx.sql!
+ Added 2 news hooks called "node_insert" and "node_update". Just
like this is the case with the existing hook "node_delete" these
new hooks will automatically get called when a node has been
inserted or udpated. Note that this is an optional call-back that
only needs to be implemented when required. With the addition of
these two hooks, the node mechanism (version 1) is pretty well
completed.
- watchdog.module:
+ Fixed bug whit the 'regular messages' query in the watchdog.module.
- book.module:
+ Fixed bug in book.module: the 'parent' was not set properly when
updating a book page.
+ Made it so that older versions of a book page are automatically
reactived upon deletion of the most recent version, i.e. when
doing a version roll-back.
- comment.inc:
+ Undid Remco's patch to comment.inc; it does not work in some cases.
- conf.module:
+ Fine-tuned some of the options in conf.module a bit.
- marvin.theme:
+ Visual changes to make it look better on Windows browsers. Mind
to give some feedback on this?
+ Fixed 3 HTML typos/bugs.
+ XHTML-ified the theme at a best effort basis; I didn't carry the
XHTML specification with me.
+ Made use of the theme_slogan variable to display the site's slogan.
+ As soon we have at least one valid XHTML theme we can wonder on how
to integrate other XML namespaces (cfr. MathML story at drop.org).
- database.mysql:
+ Updated database.mysql so that it contains all the latest "database
patches".
'=' instead of ';' and ':'. It is considered to be more readable.
--> A _first_ step towards and improved index.module. Stay tuned
for more.
+ Important:
If you update from CVS - apply the queries in 2.00-to-x.xx.sql!
- Changed all 'attribute' to 'attributes'.
+ Important:
If you update from CVS - apply the queries in 2.00-to-x.xx.sql!
+ Important:
This might require to ieni-wieni small update to your custom
themes and/or node-related modules:
- themes: node_index($node->attribute) -> node_index($node)
- node modules: attribute -> attributes
- fixed the trailing | in some cases.
- removed theme_morelinks().
- added node_links().
- simplified BaseTheme->links().
- updated themes.
Notes
- the new links system is taking form, but concider it beta. There might still
be some major changes ahead so I suggest waiting a little longer before
modifying your theme to take advantage of it.
- fixed the trailing | in some cases.
- removed theme_morelinks().
- added node_links().
- simplified BaseTheme->links().
- updated themes.
Notes
- the new links system is taking form, but concider it beta. There might still
be some major changes ahead so I suggest waiting a little longer before
modifying your theme to take advantage of it.
update, you'll break your site as you need switching from structure
to index.module: so this can be considered an intermediate commit.
If you upgrade, and you are welcome to, just create a collection
called "section" (for now) and assign your nodes some attributes
in the described format.
Feedback and bugreports are welcomed. Questions will be answered.
CHANGES:
- comment system:
+ when replying to a node (rather then to a comment), that
node is displayed above the reply form.
+ when replying to a comment (rather then to a node), that
comment is displayd above the reply form.
- removed structure.inc, removed structure.module.
- node.inc:
+ added 2 new node functions called 'node_attribute_edit()' and
'node_attribute_save()' used to 'hook in' any indexing system
including your home-brewed stuff if you'd want to. Currently,
index.module is the facto default index system.
See story.module for usage.
- book.module, story.module, poll.module, page.module, forum.module:
+ added preview functionality to administration section (via node
module).
+ removed all references to structure.inc (category, topic).
- moderate.module:
+ removed all references to structure.inc (category, topic).
- book.module, story.module, page.module, forum.module:
+ increased the sizes of some textareas.
- submit.php:
+ removed all references to structure.inc (category, topic).
- marvin.theme:
+ removed dead code: function story() was depricated.
- unconed.theme:
+ removed hardcoded references to drop.org.
- marvin.theme, unconed.theme, jeroen.theme, yaroon.theme, example.theme:
+ removed all references to structure.inc (category, topic).
TODO:
- file.module, trip_link.module:
+ update preview functionality:
see story.module for example.
+ remove references to 'cid' and 'tid', use 'attribute' instead:
see story.module for example.
- extend and build upon index.module as well as making it configurable
- created a BaseTheme class in theme.inc.
- added links($links = array(), $status = 0, $node = 0) to BaseTheme.
- modified all themes to extend from BaseTheme.
- modiefied theme_link() to take advantage of $theme->links().
- theme_morelink() does not require a $theme argument.
Todo
- add the other standard variables and functions to BaseTheme.
- some themes could use some more modifications.
Weird
- marvin.theme still has a story() function.
- created a BaseTheme class in theme.inc.
- added links($links = array(), $status = 0, $node = 0) to BaseTheme.
- modified all themes to extend from BaseTheme.
- modiefied theme_link() to take advantage of $theme->links().
- theme_morelink() does not require a $theme argument.
Todo
- add the other standard variables and functions to BaseTheme.
- some themes could use some more modifications.
Weird
- marvin.theme still has a story() function.
+ 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.
I updated the theme a bit, changed some variables and the drop down menu... I hope it works because frankly I haven't tested it... I mean, I tested it but not that toroughly. Hope with me :)
I'll write a short story about it.
Jeroen.
The result is an incredible loss of size, especially on larger pages.... on a typical drupal page (header/footer, 1 story box, 1 comment mod box, 4 comments and 1 side box) the difference was 23K vs 15K, which I find quite good. You should also notice how big some pages were in the old version, which are still tiny in the new version.
There are a few problems though:
- You can't use it in some parts of the admin section (preview a story), since admin.php leaves out the header(), so the html-generating functions are not included there.
- Because drop can occasionally insert HTML directly, without going through themes, I have to wrap each box in its own <script> tag. The optimization would benefit even more if i could group all function calls in one <script> tag, but it's not possible at the moment.
I suggest you take a snapshot of an original goofy-page (drop.org) and compare it with the output of this one (cvs-version) to see how it works exactly. And finally, it works on both IE5 and NS4, so I assume it does on most browsers.
- 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?
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)
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)
I also applied UnConeD's remark about the PHP_SELF. And remover jeroen2.theme, added yaroon.theme and commit it now. Dries, if you have 5 minutes, just move the jeroen2 directory to yaroon.
Jeroen.
- all these themes are getting a pain to maintain but I guess nothing we can do about it. Hopefully the theme API is about to stabalize soon. In future, we should certainly keep the number of "supported" below 10 so as so we have, say, 11 themes I suggest to kick out the one that is less interesting. It will then become an "unsupported theme" available through drop.org/drupal but maybe not in prime condition. It think we'll have our hands full with 10 themes already. It is really the max IMHO. Comments/suggestions/noding heads?
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.
This should be it. For now... I applied most of the remarks you told me to. Only the seemingly floating squares... well let's just say they add to the mysteriousness of the page. I can't delete them. I don't think my site would look without them. We'll just see what the users think of it shall we? I can ask them abou the squares once it's released. So, all there is now is the fat vertical bar in NS 4.76. I also don't know what it looks like in Opera... and UnConeD, does it show a bit OK in IE? I polished the navigation box' algorithm a bit. Even more stable now.
I do have one remark Dries. When submitting something you don't have to choose story or book anymore but you have to select one of the categories. Is this OK? But wouldn't it be more logical to choose what type of thing you are going to submit. I don't think you will be placing an Announcement in the book. By the way how do you add a page to the book now? I can't find it... Or do I have to create book and story myself... Ahh heck Dries it's just broken OK? ;)
For the rest. Oh yes, I am not going to work with the categories. The squares in front of a $story->title represent the topic the title is under (e.g.: linux, science, Media, Announcements) But not the category (I see them as a some sort of sub-folder in each topic) I haven't found a good way to display it yet. I still have to find how to import it in the lay-out so it wouldn't mess up. I already liked the fact that I don't have text-links for the former categories anymore... We'll see what happens...
Jeroen.
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)
Again, a nightly commit :) The last one because tomorrow I'll be in bed at a reasonable time since the morning after school starts... I wish they had a pill for _that_ ;) I think it's ready for release. Added more stability concerning the navigation box. It should now handle all possible URL's on a drupal site. To make sure I catch them all I implemented something that check whether a value is not set to one. It is set to one when the URL matches an option in the list. I saw that we also have a ?mod=moderation (which should only be visible to people that are logged in so I couldn't put it in the list standard) and for the rest nodes. Therefore, when in moderation/a node page it displays Moderation/Node in the list, else not. If I didn't do this Main would be set to the default value... we had that problem before... I needed to use $REQUEST_URI for the modules because it gives you the whole URL, $PHP_SELF only gives you a string until the first ? in the URL... This way I couldn't make up whether you were on the diary or book page. (module.php?mod=book and module.php?mod=diary) With a substr($REQUEST_URI,12,9) I could. Dries told me today that $REQUEST_URI isn't as good as $PHP_SELF, but this is an easy way to fix it. Voila I think that's it. (now that I think of it, I don't even have to do a substr() for the book module since there isn't anything that can be put behind it. With diary for example I have to do the substring because things like &op=add can be put behind it, but that's not the case with the book...) After this change I think that everything is fixed. Oh yes I also fixed a rather flagrant allignment bug. I align the big right td centered which would cause the comment's tree to be centered too so there wasn't much left of a tree anymore. ;) Added one table that fixed this. OK, I think the theme is ready for release. The only problem still is the vertical spacer which is fat in NS 4.76. If someone knows why or finds any other bugs in my theme please let me know. But for me, it's finished, until the next block code is stable and released, I'm planning to get rid of the account box too and expand the navigation menu somewhat. with indented options etc... but that's for later... Now I am going to sleep (after some more fixes I already have in mind) Bye!
Jeroen.
(I'm not sending the mail right away, first the fixes.) OK, it's 04.32. I did some other nice thing IMO, but it's not going to work anymore one we have more than 1000 nodes... Ack.. Just click a story or comment somewhere and check out the navigation box... Goodmorning. ;)
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
OK after a boring family 50 year marriage anniversary (what's the exact word...) of my grand-parents which lasted twelve hours (no computer in the mean time, ack) I got home and stared themeing. All I did in these three hours is fix the navigation box. In the code there was an attribute "selected" set in <option> main of the drop-down list. I copied that from linux.com... But now it seems that the option with selected appears as default in the list. So, when going to account it should be account appearing as default in the drop down list. But we load the same HTML for each page in Drupal. This caused Main to be "selected" for every page we load. That's where the problem was. So, how do we change that... After some time I went to irc.homelien.no #php (cool people by the way) and asked how I could get the URL the browser was currently on. They told me about $REQUEST_URI. OK... REQUEST_URI... Then the standard procedure followed when discovering something new. You tink that it returns the whole URL, but it doesn't only the last significant part (which is a good thing) After finding that out, you wonder why it still doesn't work, and it takes you some more time to find out that you have to globlify the variable $REQUEST_URI if you want to use it. OK, and after that it worked. :) So what I do now for every option in the list is: <?if ($REQUEST_URI == "/index.php") echo "selected"; ?> And this for every page we have. Houston we have a working drop-down list. :) Not only that I found out but also that NS 4.76 can't do CSS good. It just sucks actually, it can't even do a a:hover { color: <?php echo $color; ?> } That's one of the reasons Dries why you didn't notice much. It can't even do a a.active or a.visited either... (40 minutes and a NS 4.76-looking-nice theme later, happy Easter Dries :), it is 03.40, I should really start getting some normal hours again, school starts Tuesday...) OK Dries as you read, I added some twenty <font face="Helvetica">'s in the theme (NS 4.76 didn't seem to be able to do Arial) set the color links differently and hope that you like it a bit. I know the font is still a bit small, but if I do a +1 there it's huge in NS 6.01. But Dries, why don't you just back off from the NS 4.76 (there's a new version 4.77 btw) and get yourself something a bit more recent. You'll be astonished of how beautiful the wired actually is :) There is however still one pain in the ass. I can't the vertical spacer to be only one pixel in width. But I'll manage to get that right to eventually. OK, I am off to bed. Goodnight, and to all of you, a happy Easter (Google's cool too :))
Jeroen.
footer message like a copyright notice. Themes should use this!
- small improvement to example theme
- added theme_footer to theme marvin
- small improvement to database.inc
On a side not, I'm browsing drop.org from a Windows ME computer and came
to the conclusion that only theme UnConeD looks cool, and that the other
themes not 100%. Theme marvin's font seems to be huge and the sideboxes
wrap (which is ugly).
This is another version of my theme. I hope things will look better now, allthough UnConeD but also Dries told me that there were no/only one fat border. It was due to the DOCTYPE I added. People at irc.homelien.no #html told me that the doctype _should_ not affect the code, and that the browser _should_ ommit the doctype line. Well it looks like it doesn't always do that. Therefore I commented out <!-- --> the doctype. I don't know if w3 is going to like this but I sure hope so. For the drop down menu at the top. I know that it doesn't work, and it still doesn't I just copy pasted the code from http://linux.com/ but it doesn't seem to work. It doesn't remember the current page. If anyone knows why this would be, make sure to let me know please. They set the variable location to something in the javascript but don't do anything with it... I did a search on the linux.com code and they only use it somewhere at the top (they compare top.location.href with location.href... But I don't know what it means... Even if I copy pasted that part in my code it still didn't work. Therefore, this commit with a drop down menu that works for 95%... *snif*
I added a bit more color, as UnConeD asked with some random stuff too (you know how I love random thingies), and I changed the font-size, but already said that in another mail... All I am looking for now is a logo to go in the upper left corner... I tried some thingies, but really suck at doing logos, not only that but also the HTML didn't want to co-operate.
Jeroen.
P.S.: this can count as a bug report. When clicking a section at the main page it should give you a search of all stories of that section shouldn't it? Well it doesn't do that, nomatter what you click there are never any results...
Oh UnConeD, what do you mean with the td on the left being to wide? It's OK here in linux, it is set to 20%. Maybe you could mail me a little screenshot?
It's 03.40, I've had enough. HTML sucks big time. Wanna know why? Check out http://php.net and look at their purple 1-pixel-high seperator lines at the top and the bottom. Look at the source, and then look at mine. Tell me what I do wrong. Please please please please. This has been driving me nuts today... So ever fat border you see in my theme should be in fact 1 pixel high. That way it'll look a whole lot nicer. But I just can't do it. So UnConeD or anyone else knows how to? Just let me know please. Every section has it's own color. I have 8 colors at the moment. Comments have not yet been implemented. Just have a look at the main page.
I like this theme a lot more, then the one I committed yesterday, but who knows what I'll think of it tomorrow. Oh by the way, again about the seperator lines. They did seem to work in the theme I sent last night did they? I simply don't get it.
Goodnight,
Jeroen.
Just a theme... Guess I was kindof bored today and made a theme. I discovered the tags: topmargin="0" leftmargin="0" marginwidth="0" marginheight="0", and thought, well, how about I build a theme around those tags... And so I did. It isn't finished yet. Not even close, but when you add my theme to the array in your_hostname.conf in the includes dir (insert it as the first element, so it'd be the default theme) and load the main page locally on your computer you should see something with the color scheme of the Petit Bateau clothing line for babies. Something without gfx (Yes it sounds weird reading this from Jeroen :)) No subliminal random messages or changing graphics involved. Nothing. I especcially mention the header on the page. It says drop.org in the left upper corner. I don't want a logo there, just the text. Somehow I must find it _cool_ or so, don't know why. Mmm, now that I think of it, I might just make it http://drop.org/ too. Going to try that. Well, it's 01.40 now, I think you'll understand that I didn't really feel like implementing the whole comment function at this time... :) So, there are no comments visible yet. The layout is still crappy, and the links don't have the desired color yet.
Nevertheless, tell me what you think of it. :) Doesn't have to be good opinions. Color schemes are to be discussed, but I must've already adapted to the childish blue I think. So what do we got? A freaky, yet simple design that somehow makes the hair on my butt arise... A stupid color scheme. No graphics. No specials. Boxes only on the left while news on the right (something I haven't seen to much up untill now. Despite all of this I seem to like it :)
Goodnight,
Jeroen.
I updated my jeroen.theme. Its navigation box on the right is nicer now :), also, in that navigation box, I changed help into handbook. It looked more appropriate.
Jeroen.
- fixed update bug in book.module
- provide a log message when both adding and updating book pages
- all configurable variables are now accessed through "variable_get()":
- rewrote watchdog and submission throttle and removed watchdog.inc
- improved robustness of sections.inc
- imporved story.module
- updated ./database/database.sql
- removed ban.inc and ban.module and integrated it in account.module
under the name "access control" --> the ban code was not really up
to standard so this has now been dealt with. This refactoring and
reintegration cuts down the code size with 100 lines too. :-)
(The ban.module code was really old and it showed.)
- added node.module and made the other modules reuse some of this
code --> cut down the code size of modules by at least 100 lines
and adds stability.
- added a status() function to admin.php to display a conform status
message where appropriate. See admin.php for usage.
- removed $theme->control() and made comments.inc handle this itself
wrapped in a $theme->box(). No need to clutter the themes with
such complexity --> updated all themes already. :-)
- some small visual changes to some administration pages to be more
consistent across different modules.
(reported by UnConeD)
- added "add node" link to book selection box and made it display the
current location
- removed tabs and whitespaces from themes - done automatically
I changed cellpadding="0" to cellpadding is="1" in the box function. I saw on http://drop.org/ that the box subjects sticked to the border. This shoud fix it.
Jeroen.
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. :)