Show
Ignore:
Timestamp:
01/07/07 06:33:27 (14 years ago)
Author:
Mitchman
Message:

Fixed the date in the header of the RSS item. Added Date to the body and fixed better checks for the link to make sure double  http:// is not added. Link also is complete now.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/mods/rss_feed/class.rss.php

    r145 r173  
    2727        while ($kill = $this->kill_list_->getKill()) 
    2828        { 
     29            $url = KB_HOST; 
     30            if(strncasecmp("http://", KB_HOST, 7)) 
     31            { 
     32                $url = "http://".KB_HOST; 
     33            } 
     34            if($url[strlen($url) - 1] != '/') 
     35            { 
     36                $url .= '/'; 
     37            } 
     38            /* date in format:  Tue, 03 Jun 2003 09:39:21 GMT  
     39            Hack added because the time is not parsed correctly by strtotime() 
     40            */ 
     41            $timestamp = $kill->getTimeStamp(); 
     42            $timestring = explode(" ", $timestamp); 
     43            $datestring = strftime("%a, %d %b %Y " , strtotime($timestamp)); 
     44            $datestring .= $timestring[1]; 
     45            $datestring .= strftime(" %Z" , strtotime($timestamp)); 
    2946            $html .= "<item> 
    3047    <title>".$kill->getVictimName()." was killed</title> 
     
    3552            <br /><b>Corp:</b> ".shorten($kill->getVictimCorpName())." 
    3653            <br /><b>System:</b> ".shorten($kill->getSolarSystemName(), 10)." 
     54            <br /><b>Date:</b> ".$timestamp." 
    3755            <br /> 
    3856            <br /><b>Killed By:</b> 
    3957            <br /><b>Final Blow:</b> ".$kill->getFBPilotName()." 
    4058            <br /><b>Corp:</b> ".shorten($kill->getFBCorpName())." 
    41             <br /> 
    4259        </p> 
    4360     ]]> 
    4461    </description> 
    45     <guid>http://".KB_HOST."?a=kill_detail&amp;kll_id=".$kill->getID()."</guid> 
    46     <pubDate>".strftime("%a, %d %b %Y %T %Z" , strtotime($kill->getTimeStamp()))."</pubDate> 
     62    <guid>".$url."index.php?a=kill_detail&amp;kll_id=".$kill->getID()."</guid> 
     63    <pubDate>".$datestring."</pubDate> 
    4764</item>\n"; 
    4865        }