當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。