当前位置: 首页>>代码示例>>PHP>>正文


PHP trigger_notify函数代码示例

本文整理汇总了PHP中trigger_notify函数的典型用法代码示例。如果您正苦于以下问题:PHP trigger_notify函数的具体用法?PHP trigger_notify怎么用?PHP trigger_notify使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了trigger_notify函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 function __construct($source_filepath, $library = null)
 {
     $this->source_filepath = $source_filepath;
     trigger_notify('load_image_library', array(&$this));
     if (is_object($this->image)) {
         return;
         // A plugin may have load its own library
     }
     $extension = strtolower(get_extension($source_filepath));
     if (!in_array($extension, array('jpg', 'jpeg', 'png', 'gif'))) {
         die('[Image] unsupported file extension');
     }
     if (!($this->library = self::get_library($library, $extension))) {
         die('No image library available on your server.');
     }
     $class = 'image_' . $this->library;
     $this->image = new $class($source_filepath);
 }
开发者ID:HassenLin,项目名称:piwigo_utf8filename,代码行数:18,代码来源:image.class.php

示例2: check_status

// | General Public License for more details.                              |
// |                                                                       |
// | You should have received a copy of the GNU General Public License     |
// | along with this program; if not, write to the Free Software           |
// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// | USA.                                                                  |
// +-----------------------------------------------------------------------+
include_once PHPWG_ROOT_PATH . 'admin/include/functions.php';
include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php';
// +-----------------------------------------------------------------------+
// | Check Access and exit when user status is not ok                      |
// +-----------------------------------------------------------------------+
check_status(ACCESS_ADMINISTRATOR);
$help_link = get_root_url() . 'admin.php?page=help&section=';
$selected = null;
if (!isset($_GET['section'])) {
    $selected = 'add_photos';
} else {
    $selected = $_GET['section'];
}
$tabsheet = new tabsheet();
$tabsheet->set_id('help');
$tabsheet->select($selected);
$tabsheet->assign();
trigger_notify('loc_end_help');
$template->set_filenames(array('help' => 'help.tpl'));
$template->assign(array('HELP_CONTENT' => load_language('help/help_' . $tabsheet->selected . '.html', '', array('return' => true)), 'HELP_SECTION_TITLE' => $tabsheet->sheets[$tabsheet->selected]['caption']));
// +-----------------------------------------------------------------------+
// |                           sending html code                           |
// +-----------------------------------------------------------------------+
$template->assign_var_from_handle('ADMIN_CONTENT', 'help');
开发者ID:donseba,项目名称:Piwigo,代码行数:31,代码来源:help.php

示例3: auto_login

    }
}
// Now check the auto-login
if ($user['id'] == $conf['guest_id']) {
    auto_login();
}
// using Apache authentication override the above user search
if ($conf['apache_authentication']) {
    $remote_user = null;
    foreach (array('REMOTE_USER', 'REDIRECT_REMOTE_USER') as $server_key) {
        if (isset($_SERVER[$server_key])) {
            $remote_user = $_SERVER[$server_key];
            break;
        }
    }
    if (isset($remote_user)) {
        if (!($user['id'] = get_userid($remote_user))) {
            $user['id'] = register_user($remote_user, '', '', false);
        }
    }
}
// automatic login by authentication key
if (isset($_GET['auth'])) {
    auth_key_login($_GET['auth']);
}
$user = build_user($user['id'], (defined('IN_ADMIN') and IN_ADMIN) ? false : true);
if ($conf['browser_language'] and (is_a_guest() or is_generic()) and $language = get_browser_language()) {
    $user['language'] = $language;
}
trigger_notify('user_init', $user);
开发者ID:donseba,项目名称:Piwigo,代码行数:30,代码来源:user.inc.php

示例4: l10n

            $_SESSION['page_infos'][] = l10n('Successfully registered, you will soon receive an email with your connection settings. Welcome!');
        }
        // log user and redirect
        $user_id = get_userid($_POST['login']);
        log_user($user_id, false);
        redirect(make_index_url());
    }
    $registration_post_key = get_ephemeral_key(2);
} else {
    $registration_post_key = get_ephemeral_key(6);
}
$login = !empty($_POST['login']) ? htmlspecialchars(stripslashes($_POST['login'])) : '';
$email = !empty($_POST['mail_address']) ? htmlspecialchars(stripslashes($_POST['mail_address'])) : '';
//----------------------------------------------------- template initialization
//
// Start output of page
//
$title = l10n('Registration');
$page['body_id'] = 'theRegisterPage';
$template->set_filenames(array('register' => 'register.tpl'));
$template->assign(array('U_HOME' => make_index_url(), 'F_KEY' => $registration_post_key, 'F_ACTION' => 'register.php', 'F_LOGIN' => $login, 'F_EMAIL' => $email, 'obligatory_user_mail_address' => $conf['obligatory_user_mail_address']));
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if (!isset($themeconf['hide_menu_on']) or !in_array('theRegisterPage', $themeconf['hide_menu_on'])) {
    include PHPWG_ROOT_PATH . 'include/menubar.inc.php';
}
include PHPWG_ROOT_PATH . 'include/page_header.php';
trigger_notify('loc_end_register');
flush_page_messages();
$template->parse('register');
include PHPWG_ROOT_PATH . 'include/page_tail.php';
开发者ID:lcorbasson,项目名称:Piwigo,代码行数:31,代码来源:register.php

示例5: check

 /**
  * Check integrities
  *
  * @param void
  * @return void
  */
 function check()
 {
     global $page, $header_notes, $conf;
     // Ignore list
     $conf_c13y_ignore = unserialize($conf['c13y_ignore']);
     if (is_array($conf_c13y_ignore) and isset($conf_c13y_ignore['version']) and $conf_c13y_ignore['version'] == PHPWG_VERSION and is_array($conf_c13y_ignore['list'])) {
         $ignore_list_changed = false;
         $this->ignore_list = $conf_c13y_ignore['list'];
     } else {
         $ignore_list_changed = true;
         $this->ignore_list = array();
     }
     // Retrieve list
     $this->retrieve_list = array();
     $this->build_ignore_list = array();
     trigger_notify('list_check_integrity', $this);
     // Information
     if (count($this->retrieve_list) > 0) {
         $header_notes[] = l10n_dec('%d anomaly has been detected.', '%d anomalies have been detected.', count($this->retrieve_list));
     }
     // Treatments
     if (isset($_POST['c13y_submit_correction']) and isset($_POST['c13y_selection'])) {
         $corrected_count = 0;
         $not_corrected_count = 0;
         foreach ($this->retrieve_list as $i => $c13y) {
             if (!empty($c13y['correction_fct']) and $c13y['is_callable'] and in_array($c13y['id'], $_POST['c13y_selection'])) {
                 if (is_array($c13y['correction_fct_args'])) {
                     $args = $c13y['correction_fct_args'];
                 } else {
                     if (!is_null($c13y['correction_fct_args'])) {
                         $args = array($c13y['correction_fct_args']);
                     } else {
                         $args = array();
                     }
                 }
                 $this->retrieve_list[$i]['corrected'] = call_user_func_array($c13y['correction_fct'], $args);
                 if ($this->retrieve_list[$i]['corrected']) {
                     $corrected_count += 1;
                 } else {
                     $not_corrected_count += 1;
                 }
             }
         }
         if ($corrected_count > 0) {
             $page['infos'][] = l10n_dec('%d anomaly has been corrected.', '%d anomalies have been detected corrected.', $corrected_count);
         }
         if ($not_corrected_count > 0) {
             $page['errors'][] = l10n_dec('%d anomaly has not been corrected.', '%d anomalies have not been corrected.', $not_corrected_count);
         }
     } else {
         if (isset($_POST['c13y_submit_ignore']) and isset($_POST['c13y_selection'])) {
             $ignored_count = 0;
             foreach ($this->retrieve_list as $i => $c13y) {
                 if (in_array($c13y['id'], $_POST['c13y_selection'])) {
                     $this->build_ignore_list[] = $c13y['id'];
                     $this->retrieve_list[$i]['ignored'] = true;
                     $ignored_count += 1;
                 }
             }
             if ($ignored_count > 0) {
                 $page['infos'][] = l10n_dec('%d anomaly has been ignored.', '%d anomalies have been ignored.', $ignored_count);
             }
         }
     }
     $ignore_list_changed = ($ignore_list_changed or count(array_diff($this->ignore_list, $this->build_ignore_list)) > 0 or count(array_diff($this->build_ignore_list, $this->ignore_list)) > 0);
     if ($ignore_list_changed) {
         $this->update_conf($this->build_ignore_list);
     }
 }
开发者ID:lcorbasson,项目名称:Piwigo,代码行数:75,代码来源:check_integrity.class.php

示例6: get_quick_search_results_no_cache

/**
 * @see get_quick_search_results but without result caching
 */
function get_quick_search_results_no_cache($q, $options)
{
    global $conf;
    $q = trim(stripslashes($q));
    $search_results = array('items' => array(), 'qs' => array('q' => $q));
    $q = trigger_change('qsearch_pre', $q);
    $scopes = array();
    $scopes[] = new QSearchScope('tag', array('tags'));
    $scopes[] = new QSearchScope('photo', array('photos'));
    $scopes[] = new QSearchScope('file', array('filename'));
    $scopes[] = new QSearchScope('author', array(), true);
    $scopes[] = new QNumericRangeScope('width', array());
    $scopes[] = new QNumericRangeScope('height', array());
    $scopes[] = new QNumericRangeScope('ratio', array(), false, 0.001);
    $scopes[] = new QNumericRangeScope('size', array());
    $scopes[] = new QNumericRangeScope('filesize', array());
    $scopes[] = new QNumericRangeScope('hits', array('hit', 'visit', 'visits'));
    $scopes[] = new QNumericRangeScope('score', array('rating'), true);
    $scopes[] = new QNumericRangeScope('id', array());
    $createdDateAliases = array('taken', 'shot');
    $postedDateAliases = array('added');
    if ($conf['calendar_datefield'] == 'date_creation') {
        $createdDateAliases[] = 'date';
    } else {
        $postedDateAliases[] = 'date';
    }
    $scopes[] = new QDateRangeScope('created', $createdDateAliases, true);
    $scopes[] = new QDateRangeScope('posted', $postedDateAliases);
    // allow plugins to add their own scopes
    $scopes = trigger_change('qsearch_get_scopes', $scopes);
    $expression = new QExpression($q, $scopes);
    // get inflections for terms
    $inflector = null;
    $lang_code = substr(get_default_language(), 0, 2);
    @(include_once PHPWG_ROOT_PATH . 'include/inflectors/' . $lang_code . '.php');
    $class_name = 'Inflector_' . $lang_code;
    if (class_exists($class_name)) {
        $inflector = new $class_name();
        foreach ($expression->stokens as $token) {
            if (isset($token->scope) && !$token->scope->is_text) {
                continue;
            }
            if (strlen($token->term) > 2 && ($token->modifier & (QST_QUOTED | QST_WILDCARD)) == 0 && strcspn($token->term, '\'0123456789') == strlen($token->term)) {
                $token->variants = array_unique(array_diff($inflector->get_variants($token->term), array($token->term)));
            }
        }
    }
    trigger_notify('qsearch_expression_parsed', $expression);
    //var_export($expression);
    if (count($expression->stokens) == 0) {
        return $search_results;
    }
    $qsr = new QResults();
    qsearch_get_tags($expression, $qsr);
    qsearch_get_images($expression, $qsr);
    // allow plugins to evaluate their own scopes
    trigger_notify('qsearch_before_eval', $expression, $qsr);
    $ids = qsearch_eval($expression, $qsr, $tmp, $search_results['qs']['unmatched_terms']);
    $debug[] = "<!--\nparsed: " . $expression;
    $debug[] = count($expression->stokens) . ' tokens';
    for ($i = 0; $i < count($expression->stokens); $i++) {
        $debug[] = $expression->stokens[$i] . ': ' . count($qsr->tag_ids[$i]) . ' tags, ' . count($qsr->tag_iids[$i]) . ' tiids, ' . count($qsr->images_iids[$i]) . ' iiids, ' . count($qsr->iids[$i]) . ' iids' . ' modifier:' . dechex($expression->stoken_modifiers[$i]) . (!empty($expression->stokens[$i]->variants) ? ' variants: ' . implode(', ', $expression->stokens[$i]->variants) : '');
    }
    $debug[] = 'before perms ' . count($ids);
    $search_results['qs']['matching_tags'] = $qsr->all_tags;
    $search_results = trigger_change('qsearch_results', $search_results, $expression, $qsr);
    global $template;
    if (empty($ids)) {
        $debug[] = '-->';
        $template->append('footer_elements', implode("\n", $debug));
        return $search_results;
    }
    $permissions = !isset($options['permissions']) ? true : $options['permissions'];
    $where_clauses = array();
    $where_clauses[] = 'i.id IN (' . implode(',', $ids) . ')';
    if (!empty($options['images_where'])) {
        $where_clauses[] = '(' . $options['images_where'] . ')';
    }
    if ($permissions) {
        $where_clauses[] = get_sql_condition_FandF(array('forbidden_categories' => 'category_id', 'forbidden_images' => 'i.id'), null, true);
    }
    $query = '
SELECT DISTINCT(id) FROM ' . IMAGES_TABLE . ' i';
    if ($permissions) {
        $query .= '
    INNER JOIN ' . IMAGE_CATEGORY_TABLE . ' AS ic ON id = ic.image_id';
    }
    $query .= '
  WHERE ' . implode("\n AND ", $where_clauses) . "\n" . $conf['order_by'];
    $ids = query2array($query, null, 'id');
    $debug[] = count($ids) . ' final photo count -->';
    $template->append('footer_elements', implode("\n", $debug));
    $search_results['items'] = $ids;
    return $search_results;
}
开发者ID:lcorbasson,项目名称:Piwigo,代码行数:98,代码来源:functions_search.inc.php

示例7: prepend_append_array_items

        }
    }
    if (isset($search['fields']['ip'])) {
        $clauses[] = 'IP LIKE "' . $search['fields']['ip'] . '"';
    }
    $clauses = prepend_append_array_items($clauses, '(', ')');
    $where_separator = implode("\n    AND ", $clauses);
    $query = '
SELECT
    date,
    time,
    user_id,
    IP,
    section,
    category_id,
    tag_ids,
    image_id,
    image_type
  FROM ' . HISTORY_TABLE . '
  WHERE ' . $where_separator . '
;';
    // LIMIT '.$conf['nb_logs_page'].' OFFSET '.$page['start'].'
    $result = pwg_query($query);
    while ($row = pwg_db_fetch_assoc($result)) {
        $data[] = $row;
    }
    return $data;
}
add_event_handler('get_history', 'get_history');
trigger_notify('functions_history_included');
开发者ID:donseba,项目名称:Piwigo,代码行数:30,代码来源:functions_history.inc.php

示例8: array_diff

//    linked category
// 4. if no category reachable, no jumpto link
$query = '
SELECT category_id
  FROM ' . IMAGE_CATEGORY_TABLE . '
  WHERE image_id = ' . $_GET['image_id'] . '
;';
$authorizeds = array_diff(array_from_query($query, 'category_id'), explode(',', calculate_permissions($user['id'], $user['status'])));
if (isset($_GET['cat_id']) and in_array($_GET['cat_id'], $authorizeds)) {
    $url_img = make_picture_url(array('image_id' => $_GET['image_id'], 'image_file' => $image_file, 'category' => $cache['cat_names'][$_GET['cat_id']]));
} else {
    foreach ($authorizeds as $category) {
        $url_img = make_picture_url(array('image_id' => $_GET['image_id'], 'image_file' => $image_file, 'category' => $cache['cat_names'][$category]));
        break;
    }
}
if (isset($url_img)) {
    $template->assign('U_JUMPTO', $url_img);
}
// associate to albums
$query = '
SELECT id
  FROM ' . CATEGORIES_TABLE . '
    INNER JOIN ' . IMAGE_CATEGORY_TABLE . ' ON id = category_id
  WHERE image_id = ' . $_GET['image_id'] . '
;';
$associated_albums = query2array($query, null, 'id');
$template->assign(array('associated_albums' => $associated_albums, 'represented_albums' => $represented_albums, 'STORAGE_ALBUM' => $storage_category_id, 'CACHE_KEYS' => get_admin_client_cache_keys(array('tags', 'categories'))));
trigger_notify('loc_end_picture_modify');
//----------------------------------------------------------- sending html code
$template->assign_var_from_handle('ADMIN_CONTENT', 'picture_modify');
开发者ID:donseba,项目名称:Piwigo,代码行数:31,代码来源:picture_modify.php

示例9: unset

    unset($info);
}
if (count($user_representative_updates_for)) {
    $updates = array();
    foreach ($user_representative_updates_for as $cat_id => $image_id) {
        $updates[] = array('user_id' => $user['id'], 'cat_id' => $cat_id, 'user_representative_picture_id' => $image_id);
    }
    mass_updates(USER_CACHE_CATEGORIES_TABLE, array('primary' => array('user_id', 'cat_id'), 'update' => array('user_representative_picture_id')), $updates);
}
if (count($categories) > 0) {
    // Update filtered data
    if (function_exists('update_cats_with_filtered_data')) {
        update_cats_with_filtered_data($categories);
    }
    $template->set_filename('index_category_thumbnails', 'mainpage_categories.tpl');
    trigger_notify('loc_begin_index_category_thumbnails', $categories);
    $tpl_thumbnails_var = array();
    foreach ($categories as $category) {
        if (0 == $category['count_images']) {
            continue;
        }
        $category['name'] = trigger_change('render_category_name', $category['name'], 'subcatify_category_name');
        if ($page['section'] == 'recent_cats') {
            $name = get_cat_display_name_cache($category['uppercats'], null);
        } else {
            $name = $category['name'];
        }
        $representative_infos = $infos_of_image[$category['representative_picture_id']];
        $tpl_var = array_merge($category, array('ID' => $category['id'], 'representative' => $representative_infos, 'TN_ALT' => strip_tags($category['name']), 'URL' => make_index_url(array('category' => $category)), 'CAPTION_NB_IMAGES' => get_display_images_count($category['nb_images'], $category['count_images'], $category['count_categories'], true, '<br>'), 'DESCRIPTION' => trigger_change('render_category_literal_description', trigger_change('render_category_description', @$category['comment'], 'subcatify_category_description')), 'NAME' => $name));
        if ($conf['index_new_icon']) {
            $tpl_var['icon_ts'] = get_icon($category['max_date_last'], $category['is_child_date_last']);
开发者ID:lcorbasson,项目名称:Piwigo,代码行数:31,代码来源:category_cats.inc.php

示例10: set_status_header

/**
 * Sets the http status header (200,401,...)
 * @param int $code
 * @param string $text for exotic http codes
 */
function set_status_header($code, $text = '')
{
    if (empty($text)) {
        switch ($code) {
            case 200:
                $text = 'OK';
                break;
            case 301:
                $text = 'Moved permanently';
                break;
            case 302:
                $text = 'Moved temporarily';
                break;
            case 304:
                $text = 'Not modified';
                break;
            case 400:
                $text = 'Bad request';
                break;
            case 401:
                $text = 'Authorization required';
                break;
            case 403:
                $text = 'Forbidden';
                break;
            case 404:
                $text = 'Not found';
                break;
            case 500:
                $text = 'Server error';
                break;
            case 501:
                $text = 'Not implemented';
                break;
            case 503:
                $text = 'Service unavailable';
                break;
        }
    }
    $protocol = $_SERVER["SERVER_PROTOCOL"];
    if ('HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol) {
        $protocol = 'HTTP/1.0';
    }
    header("{$protocol} {$code} {$text}", true, $code);
    trigger_notify('set_status_header', $code, $text);
}
开发者ID:mathieumd,项目名称:Piwigo,代码行数:51,代码来源:functions_html.inc.php

示例11: redirect

    redirect(get_gallery_home_url());
}
if ('lost' == $page['action'] and !is_a_guest()) {
    redirect(get_gallery_home_url());
}
// +-----------------------------------------------------------------------+
// | template initialization                                               |
// +-----------------------------------------------------------------------+
$title = l10n('Password Reset');
if ('lost' == $page['action']) {
    $title = l10n('Forgot your password?');
    if (isset($_POST['username_or_email'])) {
        $template->assign('username_or_email', htmlspecialchars(stripslashes($_POST['username_or_email'])));
    }
}
$page['body_id'] = 'thePasswordPage';
$template->set_filenames(array('password' => 'password.tpl'));
$template->assign(array('title' => $title, 'form_action' => get_root_url() . 'password.php', 'action' => $page['action'], 'username' => isset($page['username']) ? $page['username'] : $user['username'], 'PWG_TOKEN' => get_pwg_token()));
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if (!isset($themeconf['hide_menu_on']) or !in_array('thePasswordPage', $themeconf['hide_menu_on'])) {
    include PHPWG_ROOT_PATH . 'include/menubar.inc.php';
}
// +-----------------------------------------------------------------------+
// |                           html code display                           |
// +-----------------------------------------------------------------------+
include PHPWG_ROOT_PATH . 'include/page_header.php';
trigger_notify('loc_end_password');
flush_page_messages();
$template->pparse('password');
include PHPWG_ROOT_PATH . 'include/page_tail.php';
开发者ID:squidjam,项目名称:Piwigo,代码行数:31,代码来源:password.php

示例12: make_picture_url

$template->assign('U_CANONICAL', make_picture_url(array('image_id' => $picture['current']['id'], 'image_file' => $picture['current']['file'])));
// +-----------------------------------------------------------------------+
// |                               sub pages                               |
// +-----------------------------------------------------------------------+
include PHPWG_ROOT_PATH . 'include/picture_rate.inc.php';
if ($conf['activate_comments']) {
    include PHPWG_ROOT_PATH . 'include/picture_comment.inc.php';
}
if ($metadata_showable and pwg_get_session_var('show_metadata') != null) {
    include PHPWG_ROOT_PATH . 'include/picture_metadata.inc.php';
}
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if ($conf['picture_menu'] and (!isset($themeconf['hide_menu_on']) or !in_array('thePicturePage', $themeconf['hide_menu_on']))) {
    if (!isset($page['start'])) {
        $page['start'] = 0;
    }
    include PHPWG_ROOT_PATH . 'include/menubar.inc.php';
}
include PHPWG_ROOT_PATH . 'include/page_header.php';
trigger_notify('loc_end_picture');
flush_page_messages();
if ($page['slideshow'] and $conf['light_slideshow']) {
    $template->pparse('slideshow');
} else {
    $template->parse_picture_buttons();
    $template->pparse('picture');
}
//------------------------------------------------------------ log informations
pwg_log($picture['current']['id'], 'picture');
include PHPWG_ROOT_PATH . 'include/page_tail.php';
开发者ID:lcorbasson,项目名称:Piwigo,代码行数:31,代码来源:picture.php

示例13: process_combinable

 /**
  * Process one combinable file.
  *
  * @param Combinable $combinable
  * @param bool $return_content
  * @param bool $force
  * @param string $header CSS directives that must appear first in
  *                       the minified file (only used when
  *                       $return_content===true)
  * @return null|string
  */
 private function process_combinable($combinable, $return_content, $force, &$header)
 {
     global $conf;
     if ($combinable->is_template) {
         if (!$return_content) {
             $key = array($combinable->path, $combinable->version);
             if ($conf['template_compile_check']) {
                 $key[] = filemtime(PHPWG_ROOT_PATH . $combinable->path);
             }
             $file = PWG_COMBINED_DIR . 't' . base_convert(crc32(implode(',', $key)), 10, 36) . '.' . $this->type;
             if (!$force && file_exists(PHPWG_ROOT_PATH . $file)) {
                 $combinable->path = $file;
                 $combinable->version = false;
                 return;
             }
         }
         global $template;
         $handle = $this->type . '.' . $combinable->id;
         $template->set_filename($handle, realpath(PHPWG_ROOT_PATH . $combinable->path));
         trigger_notify('combinable_preparse', $template, $combinable, $this);
         //allow themes and plugins to set their own vars to template ...
         $content = $template->parse($handle, true);
         if ($this->is_css) {
             $content = self::process_css($content, $combinable->path, $header);
         } else {
             $content = self::process_js($content, $combinable->path);
         }
         if ($return_content) {
             return $content;
         }
         file_put_contents(PHPWG_ROOT_PATH . $file, $content);
         $combinable->path = $file;
     } elseif ($return_content) {
         $content = file_get_contents(PHPWG_ROOT_PATH . $combinable->path);
         if ($this->is_css) {
             $content = self::process_css($content, $combinable->path, $header);
         } else {
             $content = self::process_js($content, $combinable->path);
         }
         return $content;
     }
 }
开发者ID:squidjam,项目名称:Piwigo,代码行数:53,代码来源:template.class.php

示例14: elseif

} elseif ('search' == $page['section']) {
    $page['meta_robots']['nofollow'] = 1;
}
if ($filter['enabled']) {
    $page['meta_robots']['noindex'] = 1;
}
// see if we need a redirect because of a permalink
if ('categories' == $page['section'] and isset($page['category'])) {
    $need_redirect = false;
    if (empty($page['category']['permalink'])) {
        if ($conf['category_url_style'] == 'id-name' and @$page['hit_by']['cat_url_name'] !== str2url($page['category']['name'])) {
            $need_redirect = true;
        }
    } else {
        if ($page['category']['permalink'] !== @$page['hit_by']['cat_permalink']) {
            $need_redirect = true;
        }
    }
    if ($need_redirect) {
        $redirect_url = script_basename() == 'picture' ? duplicate_picture_url() : duplicate_index_url();
        if (!headers_sent()) {
            // this is a permanent redirection
            set_status_header(301);
            redirect_http($redirect_url);
        }
        redirect($redirect_url);
    }
    unset($need_redirect, $page['hit_by']);
}
trigger_notify('loc_end_section_init');
开发者ID:squidjam,项目名称:Piwigo,代码行数:30,代码来源:section_init.inc.php

示例15: unset

        unset($letter['CHANGE_COLUMN']);
        $letter['TITLE'] = $current_letter;
        $template->append('letters', $letter);
    }
} else {
    // +-----------------------------------------------------------------------+
    // |                        tag cloud construction                         |
    // +-----------------------------------------------------------------------+
    // we want only the first most represented tags, so we sort them by counter
    // and take the first tags
    usort($tags, 'counter_compare');
    $tags = array_slice($tags, 0, $conf['full_tag_cloud_items_number']);
    // depending on its counter and the other tags counter, each tag has a level
    $tags = add_level_to_tags($tags);
    // we want tags diplayed in alphabetic order
    usort($tags, 'tag_alpha_compare');
    // display sorted tags
    foreach ($tags as $tag) {
        $template->append('tags', array_merge($tag, array('URL' => make_index_url(array('tags' => array($tag))))));
    }
}
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if (!isset($themeconf['hide_menu_on']) or !in_array('theTagsPage', $themeconf['hide_menu_on'])) {
    include PHPWG_ROOT_PATH . 'include/menubar.inc.php';
}
include PHPWG_ROOT_PATH . 'include/page_header.php';
trigger_notify('loc_end_tags');
flush_page_messages();
$template->pparse('tags');
include PHPWG_ROOT_PATH . 'include/page_tail.php';
开发者ID:lcorbasson,项目名称:Piwigo,代码行数:31,代码来源:tags.php


注:本文中的trigger_notify函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。