Changeset 486

Show
Ignore:
Timestamp:
05/23/05 10:05:04 (4 years ago)
Author:
mbonetti
Message:

new plugin hook after feed items

Location:
trunk/rss
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/rss/feed.php

    r482 r486  
    2929############################################################################### 
    3030# $Log$ 
     31# Revision 1.80  2005/05/23 08:05:04  mbonetti 
     32# new plugin hook after feed items 
     33# 
    3134# Revision 1.79  2005/05/20 07:42:21  mbonetti 
    3235# CVS Log messages in the file header 
     
    486489 
    487490 
    488      $severalFeeds = count($cids) > 1; 
     491    $severalFeeds = count($cids) > 1; 
    489492    if ($hasUnreadItems && $iid == "") { 
    490493         echo "\n<div id=\"feedaction\" class=\"withmargin\">"; 
     
    499502     } 
    500503      
    501       
    502     $shown = itemsList($title, $items, ($severalFeeds? (IL_NO_COLLAPSE | IL_FOLDER_VIEW):IL_CHANNEL_VIEW)); 
    503  
    504  
     504    $ilRet = itemsList($title, $items, ($severalFeeds? (IL_NO_COLLAPSE | IL_FOLDER_VIEW):IL_CHANNEL_VIEW)); 
     505    $ilRet[] = $iid; 
     506    $ilRet[] = $cid; 
     507    rss_plugin_hook('rss.plugins.items.afteritems', $ilRet); 
     508     
     509 
     510     
    505511    if ($nv != null) { 
    506512        list($prev,$succ,$up) = $nv; 
  • trunk/rss/util.php

    r480 r486  
    428428function itemsList($title,$items, $options = IL_NONE){ 
    429429 
     430    $retChannels = $retUnread = $retRead = 0; 
     431     
     432 
    430433    $anchor = "";    
    431434    if (!defined('FEEDCONTENT_ANCHOR_SET')) { 
     
    515518     
    516519        if ($prev_cid != $cid) { 
     520 
     521             $retChannels++; 
     522              
    517523             $prev_cid = $cid; 
    518524             if ($cntr++ > 0) { 
     
    598604     
    599605             if ($iunread & FEED_MODE_UNREAD_STATE) { 
    600             $cls = "item unread"; 
    601              } 
     606                $cls = "item unread"; 
     607                $retUnread++; 
     608             } else { 
     609                $retRead++; 
     610             } 
    602611     
    603612             // some url fields are juste guid's which aren't actual links 
     
    712721    } 
    713722 
    714     return $ret; 
     723    return array($retChannels,$retUnread,$retRead); 
    715724} 
    716725