[Imc-tech] Authors in summary
Clint Popetz
cpopetz at cpopetz.com
Tue Sep 17 14:15:05 CDT 2002
Here's a patch I applied to our instantiation of dada, which puts the
author's name in the newswire summary column listings. This was
requested by a few people at our site, and is done by active. The
reasoning given to me was "Regular users of the site know whose rants
they care to read." :)
It should probably be a toggle if it goes into the mainline. I'm also
fine with it remaining a patch.
-Clint
-------------- next part --------------
*** components/newswire_column.inc Fri May 10 12:34:15 2002
--- components/newswire_column.inc Tue Sep 17 14:07:33 2002
***************
*** 26,30 ****
// where N is set in Site Prefs
$oracle = new ArticleOracle();
! $oracle->set_selectfields('articles.objectid,articles.edit_datetime,articles.heading,articles.media,articles.rating');
$oracle->set_where_clause('articles.local_interest = 1');
$oracle->set_where_clause('articles.parentid = 0 AND articles.displayable = 1');
--- 26,30 ----
// where N is set in Site Prefs
$oracle = new ArticleOracle();
! $oracle->set_selectfields('articles.objectid,articles.edit_datetime,articles.heading,articles.media,articles.author,articles.rating');
$oracle->set_where_clause('articles.local_interest = 1');
$oracle->set_where_clause('articles.parentid = 0 AND articles.displayable = 1');
*************** if ($oracle->error_flag) {
*** 50,58 ****
$dateobj->set_from_mysql_datetime($arr['edit_datetime']);
echo ("\n<tr>");
! echo ('<td colspan="1" align="left" bgcolor="'.$PageConfig->listing_altcolor.'">');
$mediaarr = split(',',$arr['media']);
foreach ($mediaarr as $m) {
echo('<img src="'.$g_url.'images/icons/'.$m.'.gif" alt="'.$m.'"> ');
}
echo ('</td>');
echo ('<td colspan="1" align="right" bgcolor="'.$PageConfig->listing_altcolor.'" class="tinystring">'.$dateobj->get_datetime_short().'</td>');
--- 50,59 ----
$dateobj->set_from_mysql_datetime($arr['edit_datetime']);
echo ("\n<tr>");
! echo ('<td colspan="1" align="left" bgcolor="'.$PageConfig->listing_altcolor.'" class="tinystring">');
$mediaarr = split(',',$arr['media']);
foreach ($mediaarr as $m) {
echo('<img src="'.$g_url.'images/icons/'.$m.'.gif" alt="'.$m.'"> ');
}
+ echo(" ".$arr['author']);
echo ('</td>');
echo ('<td colspan="1" align="right" bgcolor="'.$PageConfig->listing_altcolor.'" class="tinystring">'.$dateobj->get_datetime_short().'</td>');
*************** if ($oracle->error_flag) {
*** 69,73 ****
// where N is set in Site Prefs
$oracle = new ArticleOracle();
! $oracle->set_selectfields('articles.objectid,articles.edit_datetime,articles.heading,articles.media,articles.rating');
$oracle->set_where_clause('articles.local_interest != 1');
$oracle->set_where_clause('articles.parentid = 0 AND articles.displayable = 1');
--- 70,74 ----
// where N is set in Site Prefs
$oracle = new ArticleOracle();
! $oracle->set_selectfields('articles.objectid,articles.edit_datetime,articles.heading,articles.media,articles.author,articles.rating');
$oracle->set_where_clause('articles.local_interest != 1');
$oracle->set_where_clause('articles.parentid = 0 AND articles.displayable = 1');
*************** if ($oracle->error_flag) {
*** 93,101 ****
$dateobj->set_from_mysql_datetime($arr['edit_datetime']);
echo ("\n<tr>");
! echo ('<td colspan="1" align="left" bgcolor="'.$PageConfig->listing_altcolor.'">');
$mediaarr = split(',',$arr['media']);
foreach ($mediaarr as $m) {
echo('<img src="'.$g_url.'images/icons/'.$m.'.gif" alt="'.$m.'"> ');
}
echo ('</td>');
echo ('<td colspan="1" align="right" bgcolor="'.$PageConfig->listing_altcolor.'" class="tinystring">'.$dateobj->get_datetime_short().'</td>');
--- 94,103 ----
$dateobj->set_from_mysql_datetime($arr['edit_datetime']);
echo ("\n<tr>");
! echo ('<td colspan="1" align="left" bgcolor="'.$PageConfig->listing_altcolor.'" class="tinystring">');
$mediaarr = split(',',$arr['media']);
foreach ($mediaarr as $m) {
echo('<img src="'.$g_url.'images/icons/'.$m.'.gif" alt="'.$m.'"> ');
}
+ echo(" ".$arr['author']);
echo ('</td>');
echo ('<td colspan="1" align="right" bgcolor="'.$PageConfig->listing_altcolor.'" class="tinystring">'.$dateobj->get_datetime_short().'</td>');
More information about the Imc-tech
mailing list