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


PHP node_is_page函数代码示例

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


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

示例1: business_responsive_theme_preprocess_node

/**
 * Override or insert variables into the node template.
 */
function business_responsive_theme_preprocess_node(&$variables)
{
    $node = $variables['node'];
    if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {
        $variables['classes_array'][] = 'node-full';
    }
}
开发者ID:solomon123,项目名称:ethiodiaspora,代码行数:10,代码来源:template.php

示例2: touch_preprocess_node

/**
 * Override or insert variables into the node template.
 */
function touch_preprocess_node(&$variables)
{
    $variables['submitted'] = t('By !username on !datetime', array('!username' => $variables['name'], '!datetime' => $variables['date']));
    if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {
        $variables['classes_array'][] = 'node-full';
    }
}
开发者ID:morest,项目名称:ictfax,代码行数:10,代码来源:template.php

示例3: arup_preprocess_node

/**
 * Override or insert variables into the node template.
 */
function arup_preprocess_node(&$variables)
{
    $node = $variables['node'];
    if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {
        $variables['classes_array'][] = 'node-full';
    }
}
开发者ID:Eluchel,项目名称:dev-arupconsult,代码行数:10,代码来源:template.php

示例4: metro_zymphonies_theme_preprocess_node

/**
 * Override or insert variables into the node template.
 */
function metro_zymphonies_theme_preprocess_node(&$variables)
{
    $node = $variables['node'];
    if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {
        $variables['classes_array'][] = 'node-full';
    }
}
开发者ID:eroslover,项目名称:drupal7,代码行数:10,代码来源:template.php

示例5: jeugdwerksupport_preprocess_node

/**
 * Override or insert variables into the node template.
 */
function jeugdwerksupport_preprocess_node(&$variables)
{
    $node = $variables['node'];
    // Add template suggestions
    if (!$variables['page']) {
        if ($variables['teaser']) {
            $variables['theme_hook_suggestions'][] = 'node__' . $variables['node']->type . '__teaser';
            $variables['theme_hook_suggestions'][] = 'node__' . $variables['node']->nid . '__teaser';
            $variables['theme_hook_suggestions'][] = 'node__teaser';
        }
    }
    // Add class 'node-full'
    if ($variables['view_mode'] == 'full' && node_is_page($node)) {
        $variables['classes_array'][] = 'node-full';
    }
    // Set custom date format
    $variables['date'] = format_date($node->created, 'custom', 'F jS Y');
    // Add summary variable
    if ($variables['view_mode'] == 'full') {
        $items = field_get_items('node', $node, 'body', $node->language);
        if ($items) {
            // If there's a single summary, just set the summary variable
            if (count($items) == 1) {
                $variables['summary'] = $items[0]['summary'];
            } else {
                foreach ($items as $item) {
                    $variables['summary'][] = $item['summary'];
                }
            }
        }
    }
}
开发者ID:Jeugdwerksupport,项目名称:drupal-theme,代码行数:35,代码来源:template.php

示例6: praanaconsulting_theme_preprocess_node

/**
 * Override or insert variables into the node template.
 */
function praanaconsulting_theme_preprocess_node(&$variables)
{
    $node = $variables['node'];
    if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {
        $variables['classes_array'][] = 'node-full';
    }
}
开发者ID:vmamidela,项目名称:praanaconsulting,代码行数:10,代码来源:template.php

示例7: responsive_business_preprocess_node

/**
 * Override or insert variables into the node template.
 */
function responsive_business_preprocess_node(&$variables)
{
    $node = $variables['node'];
    if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {
        $variables['classes_array'][] = 'node-full';
    }
    $variables['date'] = t('!datetime', array('!datetime' => date('j M, Y', $variables['created'])));
}
开发者ID:brainsum,项目名称:memosaic,代码行数:11,代码来源:template.php

示例8: kurr_preprocess_node

/**
 * Override or insert variables into the node template.
 */
function kurr_preprocess_node(&$variables)
{
    if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {
        $variables['classes_array'][] = 'node-full';
    }
    $stats = statistics_get($variables['node']->nid);
    $variables['stats_total_count'] = $stats['totalcount'];
}
开发者ID:hpcalaf,项目名称:henrypleas3,代码行数:11,代码来源:template.php

示例9: venture_theme_preprocess_node

/**
 * Override or insert variables into the node template.
 */
function venture_theme_preprocess_node(&$variables)
{
    $node = $variables['node'];
    if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {
        $variables['classes_array'][] = 'node-full';
    }
    $variables['date'] = t('!datetime', array('!datetime' => date('j F Y', $variables['created'])));
}
开发者ID:AVE303,项目名称:janenjoost,代码行数:11,代码来源:template.php

示例10: flux_preprocess_node

/**
 * Override or insert variables into the node template.
 */
function flux_preprocess_node(&$variables)
{
    $variables['date'] = format_date($variables['node']->created, 'custom', 'F j, Y');
    $variables['submitted'] = t('!datetime · !username', array('!username' => $variables['name'], '!datetime' => $variables['date']));
    if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {
        $variables['classes_array'][] = 'node-full';
    }
}
开发者ID:sheldonrampton,项目名称:pushtape-drops,代码行数:11,代码来源:template.php

示例11: bizutv_preprocess_node_video

function bizutv_preprocess_node_video(&$vars, $hook)
{
    global $user;
    if ($vars['view_mode'] == 'full' && node_is_page($vars['node'])) {
        $channels = array();
        $parents = array_values(taxonomy_get_parents($vars['node']->field_channel['und'][0]['tid']));
        $channel = $vars['node']->field_channel['und'][0]['taxonomy_term'];
        if (count($parents)) {
            $channels[] = array('url' => url('taxonomy/term/' . $parents[0]->tid), 'name' => $parents[0]->name, 'tid' => $parents[0]->tid);
        }
        $channels[] = array('url' => url('taxonomy/term/' . $channel->tid), 'name' => $channel->name, 'tid' => $channel->tid);
        $name = bizutv_helper_get_user_name($vars['node']->uid);
        $node_view = node_view($vars['node']);
        $node = $vars['node'];
        $theme_vars['node'] = $node;
        global $ibtmedia_device;
        if ($ibtmedia_device == 'mobile' || $ibtmedia_device == 'tablet') {
            $vars['node']->video_player = theme('bizutv_mobile_player', $theme_vars);
        } else {
            $vars['node']->video_player = theme('bizutv_videoplayer', $theme_vars);
        }
        $vars['node']->display_name = l($name, 'user/' . $vars['node']->uid);
        $vars['node']->disqus_comment = render($node_view['disqus']);
        $vars['node']->rate_widget = render($node_view['rate_videos']);
        $vars['node']->autostart = 'true';
        $node_view['links']['statistics']['#links']['statistics_counter']['title'] = !empty($node_view['links']['statistics']['#links']['statistics_counter']['title']) ? str_replace('reads', 'views', $node_view['links']['statistics']['#links']['statistics_counter']['title']) : NULL;
        $vars['node']->reads = bizutv_video_get_node_hits($vars['node']->nid);
        $vars['taxonomy_parent'] = $channels;
        if ($vars['node']->field_stock) {
            foreach ($vars['node']->field_stock['und'] as $key => $stock_tag) {
                $vars['node']->field_stock['und'][$key]['taxonomy_term'] = taxonomy_term_load($stock_tag['tid']);
            }
        }
        $video_field = field_get_items('node', $node, 'field_video');
        $fid = !empty($video_field[0]['fid']) ? $video_field[0]['fid'] : NULL;
        $duration = null;
        if ($fid) {
            $vars['duration'] = bizutv_video_time_to_iso8601_duration($fid);
        }
        $vars['thumbnail_url'] = !empty($video_field[0]['thumbnailfile']->uri) ? file_create_url($video_field[0]['thumbnailfile']->uri) : NULL;
        if (module_exists('bizutv_email')) {
            if ($user->uid) {
                $send_email_form = drupal_get_form('bizutv_email_form', $node);
                $vars['send_email_form'] = drupal_render($send_email_form);
                $errors = form_get_errors();
            } else {
                $vars['send_email_form'] = '<p> <a href="/linkedin/check-session?lType=initiate" class="btn-sign-in"> Sign in or sign up</a> now! </p>';
            }
        }
    }
    $node_user = user_load($vars['node']->uid);
    if (in_array('company', $node_user->roles)) {
        $profile = bizutv_company_get_account_profile($vars['node']->uid);
        $field = field_get_items('profile2', $profile, 'field_website');
        $vars['company_url'] = !empty($field[0]['url']) ? $field[0]['url'] : NULL;
        $vars['company_title'] = !empty($field[0]['title']) ? $field[0]['title'] : NULL;
    }
}
开发者ID:johnedelatorre,项目名称:fusion,代码行数:58,代码来源:template.php

示例12: beauty_theme_preprocess_node

/**
 * Override or insert variables into the node template.
 */
function beauty_theme_preprocess_node(&$variables)
{
    $node = $variables['node'];
    if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {
        $variables['classes_array'][] = 'node-full';
    }
    $variables['date1'] = t('!datetime', array('!datetime' => date('\\<\\s\\p\\a\\n\\>d\\<\\/\\s\\p\\a\\n\\>\\<\\b\\r\\>M\\<\\b\\r\\>Y', $variables['created'])));
    $variables['date'] = t('!datetime', array('!datetime' => date('l, j F Y', $variables['created'])));
}
开发者ID:paulcherrypipka,项目名称:superboard,代码行数:12,代码来源:template.php

示例13: multipurpose_preprocess_node

/**
 * Override or insert variables into the node template.
 */
function multipurpose_preprocess_node(&$variables)
{
    $node = $variables['node'];
    if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {
        $variables['classes_array'][] = 'node-full';
    }
    //$variables['date'] = t('!datetime', array('!datetime' =>  date('j F Y', $variables['created'])));
    $variables['date'] = date('j', $variables['created']) . ' ' . t(strip_tags(date('F', $variables['created']))) . ' ' . date('Y', $variables['created']);
}
开发者ID:Tamaranakonechna,项目名称:mysite,代码行数:12,代码来源:template.php

示例14: blogbuzz_preprocess_node

/**
 * Override or insert variables into the node template.
 */
function blogbuzz_preprocess_node(&$vars)
{
    if ($vars['view_mode'] != 'full' && $vars['id'] == 1) {
        $vars['classes_array'][] = 'node-first';
    }
    if ($vars['view_mode'] == 'full' && node_is_page($vars['node'])) {
        $vars['classes_array'][] = 'node-full';
    }
}
开发者ID:alexdbrown,项目名称:disney_movies,代码行数:12,代码来源:template.php

示例15: cni_preprocess_node

function cni_preprocess_node(&$variables)
{
    $node = $variables['node'];
    if (!empty($node->classes_array)) {
        $variables['classes_array'] = array_merge($variables['classes_array'], $node->classes_array);
    }
    if (node_is_page($node) !== false) {
        drupal_add_js('//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-56e774978692f861', 'external');
    }
}
开发者ID:etype-services,项目名称:cni-theme,代码行数:10,代码来源:template.php


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