2001-03-10 11:07:52 +00:00
< ? php
2000-05-18 19:51:59 +00:00
2001-02-04 22:09:38 +00:00
include_once " includes/common.inc " ;
2000-05-18 19:51:59 +00:00
2001-05-20 13:51:40 +00:00
page_header ();
2001-05-12 21:06:13 +00:00
2000-05-18 19:51:59 +00:00
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
$theme -> header ();
2001-06-20 20:00:40 +00:00
2001-06-30 07:59:18 +00:00
if ( user_access ( " access content " )) {
2001-06-20 20:00:40 +00:00
$result = db_query ( " SELECT nid, type FROM node WHERE " . ( $meta ? " attributes LIKE '% " . check_input ( $meta ) . " %' AND " : " " ) . " promote = '1' AND status = ' " . node_status ( " posted " ) . " ' AND timestamp <= ' " . ( $date > 0 ? check_input ( $date ) : time ()) . " ' ORDER BY timestamp DESC LIMIT " . ( $user -> nodes ? $user -> nodes : variable_get ( default_nodes_main , 10 )));
while ( $node = db_fetch_object ( $result )) {
node_view ( node_get_object ( array ( " nid " => $node -> nid , " type " => $node -> type )), 1 );
}
}
else {
$theme -> box ( " Access denied " , message_access ());
2001-04-16 11:38:12 +00:00
}
2001-06-20 20:00:40 +00:00
2000-05-18 19:51:59 +00:00
$theme -> footer ();
2001-05-20 13:51:40 +00:00
page_footer ();
2001-04-15 17:01:32 +00:00
2000-05-19 11:20:58 +00:00
?>