ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Adding {count} to {entries}{/entries} in 1.6.

June 22, 2007 7:36am

Subscribe [1]
  • #1 / Jun 22, 2007 7:36am

    Linda A's avatar

    Linda A

    663 posts

    In previous versions of EE, I have used a hack someone kindly provided to create a {count} variable that could be used between {entries}{/entries}.

    In 1.6, however, it appears the mod.weblog_calendar.php file has changed so that the same edit can no longer be done. I am wondering if anyone can help me figure out how to do the same in 1.6.

    This is what I had:

    In <system>/modules/weblog/mod.weblog_calendar.php:
    
    Find:
    
    $out = str_replace(LD.'day_number'.RD, $day, $out);
    
    Immediately below that, add:
    
    $out = (isset($data[$day])) ? str_replace(LD.'count'.RD, count($data[$day]), $out) : str_replace(LD.'count'.RD, '0',$out);
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases