Changeset 78

Show
Ignore:
Timestamp:
09/19/08 17:13:04 (2 months ago)
Author:
nperriault
Message:

enhanced ads management

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0/apps/main/templates/_ads.php

    r77 r78  
    44  <ul class="ads_list"> 
    55  <?php foreach ($ads as $ad => $content): ?> 
     6    <?php if (!isset($content['langs']) || (is_array($content['langs']) && in_array($sf_user->getCulture(), $content['langs']))): ?> 
    67    <li> 
    78      <h4><?php echo link_to($content['title'], $content['url']) ?></h4> 
     
    1112      </p> 
    1213    </li> 
     14  <?php endif; ?> 
    1315  <?php endforeach; ?> 
    1416  </ul> 
  • branches/1.0/apps/main/templates/layout.php

    r77 r78  
    5353      <?php endif; ?> 
    5454      <?php include_component('events', 'recentEvents') ?> 
    55       <?php include_partial('global/ads') ?> 
     55      <?php include_partial('global/ads', array('sf_cache_key' => $sf_user->getCulture())) ?> 
    5656      <?php include_component('utils', 'stats') ?> 
    5757      </div> 
  • branches/1.0/config/app.yml-dist

    r61 r78  
    171171    max_items:           8 
    172172 
     173  sidebar: 
     174    ads: 
     175      ad1_intl: 
     176        langs:           [en, es, pt] 
     177        title:           My advertisement 
     178        url:             http://foo.bar/ 
     179        text:            Some text here. 
     180      ad1_fr: 
     181        langs:           [fr] 
     182        title:           Ma publicitĂ© 
     183        url:             http://foo.bar/ 
     184        text:            Un peu de texte par lĂ . 
     185 
    173186  tags: 
    174187    limit:               50