mariovaldez.net

MV.net forums
It is currently 14 Jul 2016, 00:31

All times are UTC - 7 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
PostPosted: 26 Oct 2004, 23:09 
Hi all,

How long is a new Content displayed in the overview of Phprojekt?
After two weeks, i think, it´s not really new.

thx pepper.


Report this post
Top
  
Reply with quote  
PostPosted: 27 Oct 2004, 15:54 
User avatar

Joined: 06 Mar 2003, 03:21
Posts: 447
Location: Monterrey, NL, Mexico
Pepper:

> How long is a new Content displayed in the
> overview of Phprojekt? After two weeks,
> i think, it´s not really new.
> thx pepper.

Hi.

As the root user, check the configuration of the CMS module, specifically the option named "How old can the documents in the summary be". The number you enter is in days.

Regards,

Mario A. Valdez-Ramirez.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: 28 Oct 2004, 12:24 
Comment out all the original code in cm_summary.inc.php between the <?php & ?>
and insert this:
Code:
// Altered by Mark Coudriet
include_once ($path_pre . "cm/cm_lib.inc.php");
//if (!$tdwidth) { $cm_tdwidth = (600 + 12); } else { $cm_tdwidth = (($tdwidth * 2) + 12); }
$cm_tdwidth="100%";
if ($tr_hover) { $cm_hover = $terminfarbe; } else { $cm_hover = ""; }
echo "<table cellpadding=\"3\" cellspacing=\"1\" border=\"0\"><tr><td>";

$cm_nodocs = true;
$result2 = db_query("select cmdb_title, cmdb_directory, cmdb_parentdir, cmdb_abstract, cmdb_date_update, cmdb_type from content3 where cmdb_parentdir like '/%' and cmdb_type like '%" . CM_HITTYPE_ANNOUNCE . "%' " . fcm_access_sqldef ($user_kurz) . " order by cmdb_date_update desc") or db_die();
//if ( $result2 ) echo "<b>".$cm_text["summaryannounces"]."</b> <i>(Last ". ($cm_sum_oldestleafallowed * 1.5) ." days)</i>";
while ($row2 = db_fetch_row($result2)) {
   if ($cm_nodocs) {
      echo "<b>".$cm_text["summaryannounces"]."</b> <i>(Last ". ($cm_sum_oldestleafallowed * 1.5) ." days)</i>";
      $cm_nodocs = false;
   }
   // Give Special Announces an experation date
   if (fcm_diffdate_days ($row2[4]) < ($cm_sum_oldestleafallowed * 1.5)) {
      fcm_articlelist_nostyle ($row2[1], $row2[0], $row2[3], $row2[4], fcm_is_cleditable ($row2[1], $user_kurz, $row2[5]), true, $cm_tdwidth, $terminfarbe, "");
      //$trip_flag = 1;
   }
}
//if (!$trip_flag) { echo "<br>No ".$cm_text["summaryannounces"].".."; }
//else $trip_flag = "";
echo "</td></tr></table>";

echo "<table cellpadding=\"3\" cellspacing=\"1\" border=\"0\"><tr><td>";

$cm_nodocs = true;
$cm_rowcolor = $bgcolor1;
$result2 = "";
//$result2 = db_query("select cmdb_title, cmdb_directory, cmdb_parentdir, cmdb_abstract, cmdb_date_update, cmdb_type from content3 where cmdb_directory like '/%' and cmdb_type like '%" . CM_HITTYPE_PAGE . "%' and cmdb_type not like '%" . CM_HITTYPE_ANNOUNCE . "%' " . fcm_access_sqldef ($user_kurz) . " order by cmdb_date_update desc") or db_die();
$result2 = db_query("select cmdb_title, cmdb_directory, cmdb_parentdir, cmdb_abstract, cmdb_date_update, cmdb_type, cmdb_logo from content3 where cmdb_directory like '/%' and cmdb_type like '%" . CM_HITTYPE_PAGE . "%' and cmdb_type not like '%" . CM_HITTYPE_ANNOUNCE . "%' " . fcm_access_sqldef ($user_kurz) . " order by cmdb_date_update desc") or db_die();

//if ( $result2 ) echo "<b>".$cm_text["summarynewdocs"]."</b> <i>(Last ". $cm_sum_oldestleafallowed ." days)</i>";
while ($row2 = db_fetch_row($result2)) {
   if ($cm_nodocs) {
      echo "<b>".$cm_text["summarynewdocs"]."</b> <i>(Last ". $cm_sum_oldestleafallowed ." days)</i>";
      $cm_nodocs = false;
   }
  if (fcm_diffdate_days ($row2[4]) < $cm_sum_oldestleafallowed) {
    fcm_articlelist_nostyle ($row2[1], $row2[0], $row2[3], $row2[4], fcm_is_cleditable ($row2[1], $user_kurz, $row2[5]), false, $cm_tdwidth, $cm_rowcolor, $cm_hover);
   $trip_flag = 1;
    if ($cm_rowcolor == $bgcolor1) { $cm_rowcolor = $bgcolor2; } else { $cm_rowcolor = $bgcolor1; }
  }
}
//if (!$trip_flag) { echo "<br>No ".$cm_text["summarynewdocs"]."..."; }
echo "</td></tr></table>";


Report this post
Top
  
Reply with quote  
 Post subject: post topic
PostPosted: 28 Oct 2004, 12:27 
The Topic of my post is so small it may be missed.
I just said "You may also want to try this...", because it will print for the users how many days the content is shown.

:D


Report this post
Top
  
Reply with quote  
 Post subject: Good idea this patch...
PostPosted: 29 Oct 2004, 14:59 
User avatar

Joined: 06 Mar 2003, 03:21
Posts: 447
Location: Monterrey, NL, Mexico
Mark:

> I just said "You may also want to try this...",
> because it will print for the users how many
> days the content is shown.


Hi. Good idea your patch.
I just would change the two SQL strings from:
Code:
...from content3...

to
Code:
...from " . CM_DB_PREFIX . "content3...

just in case the database prefix is being used.


Regards,

Mario A. Valdez-Ramirez.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: ThXS
PostPosted: 31 Oct 2004, 09:02 
Your right, thanks for pointing that out! :D


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group