Changeset 1871


Ignore:
Timestamp:
Mar 4, 2007, 11:40:28 PM (17 years ago)
Author:
rub
Message:

Add on $conf value of the function get_recent_post_dates

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/notification_by_mail.php

    r1857 r1871  
    354354              if ($conf['nbm_send_html_mail'] and $conf['nbm_send_recent_post_dates'])
    355355              {
    356                 $recent_post_dates = get_recent_post_dates(7, 3, 9);
     356                $recent_post_dates = get_recent_post_dates_array(
     357                  $conf['recent_post_dates']['NBM']);
    357358                foreach ($recent_post_dates as $date_detail)
    358359                {
  • trunk/feed.php

    r1858 r1871  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | file          : $Id$
     
    165165}
    166166
    167 $dates = get_recent_post_dates(5, 6, 6);
     167$dates = get_recent_post_dates_array($conf['recent_post_dates']['RSS']);
    168168
    169169foreach($dates as $date_detail)
  • trunk/include/config_default.inc.php

    r1857 r1871  
    577577// nbm_treatment_timeout_default is used by default
    578578$conf['nbm_treatment_timeout_default'] = 20;
     579
     580// Parameters used in get_recent_post_dates for the 2 kind of notification
     581$conf['recent_post_dates'] = array(
     582  'RSS' => array('max_dates' => 5, 'max_elements' => 6, 'max_cats' => 6),
     583  'NBM' => array('max_dates' => 7, 'max_elements' => 3, 'max_cats' => 9)
     584  );
    579585
    580586// +-----------------------------------------------------------------------+
  • trunk/include/functions_notification.inc.php

    r1857 r1871  
    512512}
    513513
     514/*
     515  Call function get_recent_post_dates but
     516  the parameters to be passed to the function, as an indexed array.
     517 
     518*/
     519function get_recent_post_dates_array($args)
     520{
     521  return
     522    get_recent_post_dates
     523    (
     524      (empty($args['max_dates']) ? 3 : $args['max_dates']),
     525      (empty($args['max_elements']) ? 3 : $args['max_elements']),
     526      (empty($args['max_cats']) ? 3 : $args['max_cats'])
     527    );
     528}
     529
     530
    514531/**
    515532 * returns html description about recently published elements grouped by post date
Note: See TracChangeset for help on using the changeset viewer.