當前位置: 首頁>>代碼示例>>PHP>>正文


PHP theme_links函數代碼示例

本文整理匯總了PHP中theme_links函數的典型用法代碼示例。如果您正苦於以下問題:PHP theme_links函數的具體用法?PHP theme_links怎麽用?PHP theme_links使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了theme_links函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: teca3_links__locale_block

function teca3_links__locale_block(&$variables)
{
    $variables['attributes']['class'][] = 'nav';
    $variables['attributes']['class'][] = 'navbar-nav';
    return theme_links($variables);
    //return '<ul class="language-switcher-locale-url nav nav-pills">'.$variables['tree'].'</ul>';
}
開發者ID:drupdateio,項目名稱:teca,代碼行數:7,代碼來源:template.php

示例2: k373k_links

/**
  Draw menu.
*/
function k373k_links($variables) {
  if (array_key_exists('id', $variables['attributes']) && $variables['attributes']['id'] == 'main-menu-links') {
      $pid = variable_get('menu_main_links_source', 'main-menu');
    $tree = menu_tree($pid);
    return drupal_render($tree);
  }
  return theme_links($variables);
}
開發者ID:neochief,項目名稱:373.kiev.ua,代碼行數:11,代碼來源:template.php

示例3: paeme_links__locale_block

/**
 * @file
 * template.php
 */
function paeme_links__locale_block(&$vars)
{
    foreach ($vars['links'] as $language => $langInfo) {
        $vars['links'][$language]['title'] = $language;
    }
    $content = theme_links($vars);
    return $content;
}
開發者ID:akapivo,項目名稱:www.paeme.be,代碼行數:12,代碼來源:template.php

示例4: solsud_links

/**
 * Implements theme_links().
 */
function solsud_links($variables)
{
    if (array_key_exists('id', $variables['attributes']) && $variables['attributes']['id'] == 'main-menu-links') {
        $tree = menu_tree('main-menu');
        return drupal_render($tree);
    }
    return theme_links($variables);
}
開發者ID:maxocub,項目名稱:solsud,代碼行數:11,代碼來源:template.php

示例5: bartik_plus_links

function bartik_plus_links($variables)
{
    if (array_key_exists('id', $variables['attributes']) && $variables['attributes']['id'] == 'main-menu-links') {
        $pid = variable_get('menu_main_links_source', 'main-menu');
        $tree = menu_tree($pid);
        return '<div id="main-menu-links">' . drupal_render($tree) . "</div>";
    }
    return theme_links($variables);
}
開發者ID:Chaogan-Yan,項目名稱:rfmri.org,代碼行數:9,代碼來源:template.php

示例6: THEME_links__locale_block

function THEME_links__locale_block(&$vars)
{
    foreach ($vars['links'] as $language => $langInfo) {
        $abbr = $langInfo['language']->language;
        $name = $langInfo['language']->native;
        $vars['links'][$language]['title'] = '<abbr title="' . $name . '">' . $abbr . '</abbr>';
        $vars['links'][$language]['html'] = TRUE;
    }
    $content = theme_links($vars);
    return $content;
}
開發者ID:georgepetridis,項目名稱:DrupalFiles,代碼行數:11,代碼來源:template.php

示例7: glossy_links

/**
 * Implements theme_links().
 */
function glossy_links($vars) {
	// Add superfish dropdowns effect to main menu
  if (array_key_exists('id', $vars['attributes']) && $vars['attributes']['id'] == 'main-menu' && variable_get('dh_display_menu_tree', true)) {
      $pid = variable_get('menu_main_links_source', 'main-menu');
			$tree = menu_tree($pid);
			$output = drupal_render($tree);
			$output = '<div class="superfish">' .$output. '</div>';
			return preg_replace('/<ul class="menu/i', '<ul class="main-menu clearfix', $output, 1);
  }
  return theme_links($vars);
}
開發者ID:redtrayworkshop,項目名稱:msdworkshop,代碼行數:14,代碼來源:template.php

示例8: hyx_links__locale_block

function hyx_links__locale_block(&$variables)
{
    global $language;
    $variables['attributes']['class'][] = 'list-inline';
    foreach ($variables['links'] as $id => $link) {
        $variables['links'][$id]['attributes']['class'][] = 'btn hyx-radio';
        //$variables['links'][$id]['attributes']['data-title-xs'] = ucfirst($id);
        $variables['links'][$id]['title'] = ucfirst($id);
    }
    $content = theme_links($variables);
    return $content;
}
開發者ID:lcube45,項目名稱:hyx,代碼行數:12,代碼來源:template.php

示例9: phptemplate_taxonomy_links

function phptemplate_taxonomy_links($node, $vid)
{
    if (count($node->taxonomy)) {
        $tags = array();
        foreach ($node->taxonomy as $term) {
            if ($term->vid == $vid) {
                $tags[] = array('title' => $term->name, 'href' => taxonomy_term_path($term), 'attributes' => array('rel' => 'tag'));
            }
        }
        if ($tags) {
            return theme_links($tags, array('class' => 'links inline'));
        }
    }
}
開發者ID:sojo,項目名稱:d6_friendsofsilence,代碼行數:14,代碼來源:template.php

示例10: mies_links

function mies_links($links, $attributes = array('class' => 'links'))
{
    global $teaser;
    //dprint_r($links);
    // Unset the "node read more" link.
    if (isset($links["node_read_more"])) {
        $readmore = $links["node_read_more"];
        unset($links["node_read_more"]);
        //array_push($links,$readmore);
    }
    // Redirect the "comment add" to the Node-Page
    if (isset($links["comment_add"])) {
        $links["comment_add"]["href"] = ereg_replace("comment/reply", "node", $links["comment_add"]["href"]);
    }
    return theme_links($links, $attributes);
}
開發者ID:benthebear,項目名稱:Mies,代碼行數:16,代碼來源:template.php

示例11: popularity_page

function popularity_page() {
  print theme_header(FALSE);
  print <<<EOS
<h1>How do we calculate popularity?</h1>

<p>In Status Time Capsule, your popularity depends on:</p>

<ul>
  <li>average number of comments per status,</li>
  <li>average number of likes per status, and</li>
  <li>variance of these numbers among your statuses.</li>
</ul>

<p>Therefore, someone that consistently attracts comments and likes to all of his/her statuses may be ranked as more popular, compared to someone that has occasional popular statuses (with lots of likes and comments).</p>

<p>Technically, we calculate the lower bound of Wilson score confidence interval for a Bernoulli parameter for each user of our app. Then, we rank these lower bound values and derive the top most popular users as well as the percentage of people ranked below yours. For more explanation about the algorithm, see <a href="http://www.evanmiller.org/how-not-to-sort-by-average-rating.html">the article by Evan Miller</a>.</p>

EOS;
  print theme_links();
  print theme_footer();
  // Ugly error suppression
  @log_insert('popularity_hit');
}
開發者ID:ryandao,項目名稱:Facebook-Status-Time-Capsule,代碼行數:23,代碼來源:popularity.php

示例12: _phptemplate_links_inline

function _phptemplate_links_inline($links, $attributes)
{
    foreach ($links as $key => $link) {
        $index = strpos($key, '_');
        if (!$index) {
            $index = strpos($key, '-');
        }
        if ($index) {
            $group = substr($key, 0, $index);
        } else {
            $group = 'other';
        }
        $link_groups[$group][$key] = $link;
    }
    $output = '';
    if (count($link_groups) == 0) {
        return '';
    } else {
        if (count($link_groups) == 1) {
            return theme_links($links, $attributes);
        } else {
            $output = '<div' . drupal_attributes($attributes) . ">\n";
            foreach ($link_groups as $group => $links) {
                $output .= _phptemplate_links_as_div($links, array('class' => "link-group link-group-{$group}")) . "\n";
            }
            $output .= '</div>';
            return $output;
        }
    }
}
開發者ID:nabuur,項目名稱:nabuur-d5,代碼行數:30,代碼來源:template.php

示例13: get_pane_links

 /**
  * Render the links to display when editing a pane.
  */
 function get_pane_links($pane, $content_type)
 {
     if (!empty($this->no_edit_links)) {
         return '';
     }
     $links = array();
     if (!empty($pane->shown)) {
         $links['top']['disabled'] = array('title' => t('Disable this pane'), 'href' => $this->get_url('hide', $pane->pid), 'attributes' => array('class' => array('use-ajax')));
     } else {
         $links['top']['enable'] = array('title' => t('Enable this pane'), 'href' => $this->get_url('show', $pane->pid), 'attributes' => array('class' => array('use-ajax')));
     }
     if (isset($this->display->title_pane) && $this->display->title_pane == $pane->pid) {
         $links['top']['panels-set-title'] = array('title' => t('&#x2713;Panel title'), 'html' => TRUE);
     } else {
         $links['top']['panels-set-title'] = array('title' => t('Panel title'), 'href' => $this->get_url('panel-title', $pane->pid), 'attributes' => array('class' => array('use-ajax')));
     }
     $subtype = ctools_content_get_subtype($content_type, $pane->subtype);
     if (ctools_content_editable($content_type, $subtype, $pane->configuration)) {
         $links['top']['settings'] = array('title' => isset($content_type['edit text']) ? $content_type['edit text'] : t('Settings'), 'href' => $this->get_url('edit-pane', $pane->pid), 'attributes' => array('class' => array('ctools-use-modal')));
     }
     if (user_access('administer advanced pane settings')) {
         $links['top']['css'] = array('title' => t('CSS properties'), 'href' => $this->get_url('pane-css', $pane->pid), 'attributes' => array('class' => array('ctools-use-modal')));
     }
     if (user_access('administer panels styles')) {
         $links['style'] = $this->get_style_links('pane', $pane->pid);
     }
     if (user_access('administer pane access')) {
         $contexts = $this->display->context;
         // Make sure we have the logged in user context
         if (!isset($contexts['logged-in-user'])) {
             $contexts['logged-in-user'] = ctools_access_get_loggedin_context();
         }
         $visibility_links = array();
         if (!empty($pane->access['plugins'])) {
             foreach ($pane->access['plugins'] as $id => $test) {
                 $plugin = ctools_get_access_plugin($test['name']);
                 $access_title = isset($plugin['title']) ? $plugin['title'] : t('Broken/missing access plugin %plugin', array('%plugin' => $test['name']));
                 $access_description = ctools_access_summary($plugin, $contexts, $test);
                 $visibility_links[] = array('title' => $access_description, 'href' => $this->get_url('access-configure-test', $pane->pid, $id), 'attributes' => array('class' => array('ctools-use-modal', 'panels-italic')));
             }
         }
         if (empty($visibility_links)) {
             $visibility_links['no_rules'] = array('title' => t('No rules'), 'attributes' => array('class' => array('panels-text')));
         }
         $visibility_links['add_rule'] = array('title' => t('Add new rule'), 'href' => $this->get_url('access-add-test', $pane->pid), 'attributes' => array('class' => array('ctools-use-modal')));
         $visibility_links['settings'] = array('title' => t('Settings'), 'href' => $this->get_url('access-settings', $pane->pid), 'attributes' => array('class' => array('ctools-use-modal')));
         $links['visibility'] = $visibility_links;
     }
     if (user_access('use panels locks')) {
         $lock_type = !empty($pane->locks['type']) ? $pane->locks['type'] : 'none';
         switch ($lock_type) {
             case 'immovable':
                 $lock_method = t('Immovable');
                 break;
             case 'regions':
                 $lock_method = t('Regions');
                 break;
             case 'none':
             default:
                 $lock_method = t('No lock');
                 break;
         }
         $lock_links['lock'] = array('title' => $lock_method, 'attributes' => array('class' => array('panels-text')));
         $lock_links['change'] = array('title' => t('Change'), 'href' => $this->get_url('lock', $pane->pid), 'attributes' => array('class' => array('ctools-use-modal')));
         $links['lock'] = $lock_links;
     }
     if (panels_get_caches() && user_access('use panels caching features')) {
         $method = isset($pane->cache['method']) ? $pane->cache['method'] : 0;
         $info = panels_get_cache($method);
         $cache_method = isset($info['title']) ? $info['title'] : t('No caching');
         $cache_links['title'] = array('title' => $cache_method, 'attributes' => array('class' => array('panels-text')));
         $cache_links['change'] = array('title' => t('Change'), 'href' => $this->get_url('cache-method', $pane->pid), 'attributes' => array('class' => array('ctools-use-modal')));
         if (panels_plugin_get_function('cache', $info, 'settings form')) {
             $cache_links['settings'] = array('title' => t('Settings'), 'href' => $this->get_url('cache-settings', $pane->pid), 'attributes' => array('class' => array('ctools-use-modal')));
         }
         $links['cache'] = $cache_links;
     }
     $links['bottom']['remove'] = array('title' => t('Remove'), 'href' => '#', 'attributes' => array('class' => array('pane-delete'), 'id' => "pane-delete-panel-pane-{$pane->pid}"));
     // Allow others to add/remove links from pane context menu.
     // Grouped by 'top', 'style', 'visibility', 'lock', 'cache' and 'bottom'
     drupal_alter('get_pane_links', $links, $pane, $content_type);
     $dropdown_links = $links['top'];
     $category_labels = array('style' => 'Style', 'visibility' => 'Visibility rules', 'lock' => 'Locking', 'cache' => 'Caching');
     foreach ($category_labels as $category => $label) {
         if (array_key_exists($category, $links)) {
             $dropdown_links[] = array('title' => '<hr />', 'html' => TRUE);
             $dropdown_links[] = array('title' => '<span class="dropdown-header">' . t($label) . '</span>' . theme_links(array('links' => $links[$category], 'attributes' => array(), 'heading' => array())), 'html' => TRUE, 'attributes' => array('class' => array('panels-sub-menu')));
         }
     }
     $dropdown_links[] = array('title' => '<hr />', 'html' => TRUE);
     $dropdown_links = array_merge($dropdown_links, $links['bottom']);
     return theme('ctools_dropdown', array('title' => theme('image', array('path' => ctools_image_path('icon-configure.png', 'panels'))), 'links' => $dropdown_links, 'image' => TRUE));
 }
開發者ID:casivaagustin,項目名稱:drupal-services,代碼行數:96,代碼來源:panels_renderer_editor.class.php

示例14: zen_swissmon_links

function zen_swissmon_links($variables)
{
    if (!isset($variables['links'])) {
        return theme_links($variables);
    }
    $links = $variables['links'];
    foreach ($links as $key => $link) {
        if ($link['title'] == t('My account')) {
            global $user;
            $link['title'] = t('Signed in as') . ' ' . $user->name;
        }
        $links[$key] = $link;
    }
    $variables['links'] = $links;
    return theme_links($variables);
}
開發者ID:rettichschnidi,項目名稱:naturvielfalt,代碼行數:16,代碼來源:template.php

示例15: event_list

		</div>
		
		<div id="hc_popular" style="display:none;">
		<?php 
event_list(1);
?>
		
		</div>
		
		<div id="hc_newest" style="display:none;">
		<?php 
event_list(2);
?>
		
		</div>
		
		<h2>Theme: <?php 
select_theme();
?>
</h2>
		
		<h2>&nbsp;</h2>
		<?php 
theme_links();
?>
		
	</aside>
	
	<?php 
get_footer();
開發者ID:pvidali,項目名稱:BCSR-1,代碼行數:30,代碼來源:event.php


注:本文中的theme_links函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。