archive dealy

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

Postby LoneOwl » Fri May 31, 2002 2:13 am

Code: Select all
elsif ($ProfArchive{$i} == 3) {
   # Weekly archiving. This takes calculations.
   if ($Week_Day) {
      # We're not on Sunday. Find the previous Sunday.
      $CorrectedWeeklyTime = ($newstime - ($Week_Day * 86400));
      # Make sure that we don't run into Daylight Savings problems.
      if ($AMPM eq 'AM') {
         $CorrectedWeeklyTime += 14400;
      }
      elsif ($AMPM eq 'PM') {
         $CorrectedWeeklyTime -= 14400;
      }
      
      my @cweeklytime = localtime($CorrectedWeeklyTime);
      $FileName = "$i-archive-$cweeklytime[3]-" . ($cweeklytime[4] + 1) . '-' . ($cweeklytime[5] + 1900);
   }
   else {
      # It's a Sunday. Just use the current day as the archive title.
      $FileName = "$i-archive-$Month_Day-$ActualMonth-$Year";   
   }
}


crcore.pl starting at 1050.... I'll keep looking at it....
User avatar
LoneOwl
 
Posts: 1465
Joined: Sun Mar 10, 2002 2:57 am
Location: That one place, you know?

Postby l0rdphi1 » Fri May 31, 2002 2:38 am

Weekly? ...they work fine for me.
User avatar
l0rdphi1
 
Posts: 3590
Joined: Sat Mar 09, 2002 10:03 pm
Location: Pennsylvania, United States of America

Postby LoneOwl » Fri May 31, 2002 2:42 am

Code: Select all
<PerlCode>
$ArchiveTimeOne = GetTheDate_WeeklyArchive($CorrectedWeeklyTime);
$ArchiveTimeTwo = GetTheDate_WeeklyArchive($CorrectedWeeklyTime + (60 * 60 * 24 * 7));
</PerlCode>
<a href="<Field: FileName>">Archives from <Field: ArchiveTimeOne> to <Field: ArchiveTimeTwo></a><br>

I would have expected better from you mark. Anyway, whatever date format you have for the archive dates, will be used for each....
Last edited by LoneOwl on Fri May 31, 2002 2:46 am, edited 1 time in total.
User avatar
LoneOwl
 
Posts: 1465
Joined: Sun Mar 10, 2002 2:57 am
Location: That one place, you know?

Postby LoneOwl » Fri May 31, 2002 4:17 am

I looked perfectly fine when I used it....
User avatar
LoneOwl
 
Posts: 1465
Joined: Sun Mar 10, 2002 2:57 am
Location: That one place, you know?


Return to Customization

Who is online

Users browsing this forum: No registered users and 1 guest

cron