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.

PHP in template help

December 08, 2010 4:25am

Subscribe [1]
  • #1 / Dec 08, 2010 4:25am

    Kippi

    83 posts

    Hi,

    Can anyone help me translate this from 1.6 to 2.1

    <?php
    global $LOC;
    $year = $LOC->decode_date("%Y", $LOC->now);
    ?>

    Im using it in connecting to Lows Yearly Archive Plugin with this code:

    {exp:low_yearly_archives channel="news" start_month="1" status="not closed" sort="asc" start_year="<?=$year?>" end_year="<?=$year?>"}
    {months}
    {if num_entries > 0}
    <div class="colTwo_inner"><a href="http://{site_url}/news/archive/{year}/{month_num}/" title="{num_entries} entries in {month} {year}">{month}_</a></div>
    {/if}
    {/months}
    {/exp:low_yearly_archives}

    Im wonder if this needs to be translated for 2.1 too

    start_year="<?=$year?>" end_year="<?=$year?>

    Thanks, Kippi

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases