• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP flag_create_link函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: flag_create_link

 * - $fields: an array of $field objects. Each one contains:
 *   - $field->content: The output of the field.
 *   - $field->raw: The raw data for the field, if it exists. This is NOT output safe.
 *   - $field->class: The safe class id to use.
 *   - $field->handler: The Views field handler object controlling this field. Do not use
 *     var_export to dump this object, as it can't handle the recursion.
 *   - $field->inline: Whether or not the field should be inline.
 *   - $field->inline_html: either div or span based on the above flag.
 *   - $field->separator: an optional separator that may appear before a field.
 * - $row: The raw result object from the query, with all data it fetched.
 *
 * @ingroup views_templates
 */
global $user;
if ($user->uid) {
    $flag = flag_create_link('vote', $row->nid);
} else {
    $flag = l(t('Sign In'), 'user');
}
foreach ($fields as $id => $field) {
    ?>
  <?php 
    if (!empty($field->separator)) {
        ?>
    <?php 
        print $field->separator;
        ?>
  <?php 
    }
    ?>
开发者ID:pietromalerba,项目名称:ShowCase-Drupal-Test-project,代码行数:30,代码来源:views-view-fields--sessions.tpl.php


示例2: flag_create_link

    if (!empty($field->separator)) {
        ?>
      <?php 
        print $field->separator;
        ?>
    <?php 
    }
    ?>
  
    <?php 
    print $field->wrapper_prefix;
    ?>
      <?php 
    print $field->label_html;
    ?>
      <?php 
    print $field->content;
    ?>
     
    <?php 
    print $field->wrapper_suffix;
    ?>
  <?php 
}
?>
    
  <?php 
print flag_create_link("session_schedule", $row->nid);
?>
</div>
开发者ID:teodyseguin,项目名称:website,代码行数:30,代码来源:views-view-fields--personal-schedule--my-schedule.tpl.php


示例3: boinc_preprocess_comment

function boinc_preprocess_comment(&$vars, $hook)
{
    global $user;
    //$vars['sample_variable'] = t('Lorem ipsum.');
    //drupal_set_message('debug: <pre>' . print_r($vars,true) . '</pre>');
    $links = array();
    $moderator_links = array();
    $cid = $vars['comment']->cid;
    $nid = $vars['comment']->nid;
    if ($hook == 'comment') {
        if (user_access('administer comments')) {
            // Reorganize links for moderators
            $vars['links'] = array();
            $links['reply'] = array('title' => bts('Reply'), 'href' => "comment/reply/{$nid}/{$cid}", 'attributes' => array('title' => bts('Reply to this comment')));
            $links['quote'] = array('title' => bts('Quote'), 'href' => "comment/reply/{$nid}/{$cid}", 'attributes' => array('title' => bts('Reply to this comment with quote')), 'fragment' => 'comment-form', 'query' => 'quote=1');
            // Move edit and delete controls into moderator links
            $moderator_links['edit'] = array('title' => bts('Edit'), 'href' => "comment/edit/{$cid}", 'attributes' => array('title' => bts('Edit this comment')));
            $moderator_links['delete'] = array('title' => bts('Delete'), 'href' => "comment/delete/{$cid}", 'attributes' => array('title' => bts('Delete this comment')));
            // Add hide link
            $comment_control = "comment_control/{$cid}";
            if ($vars['comment']->status == 0) {
                $moderator_links['hide'] = array('title' => bts('Hide'), 'href' => "{$comment_control}/hide", 'attributes' => array('title' => bts('Hide this comment')));
            } else {
                $moderator_links['unhide'] = array('title' => bts('Unhide'), 'href' => "{$comment_control}/unhide", 'attributes' => array('title' => bts('Unhide this comment')));
            }
            // Add link to convert comment into a new topic
            $reply_count = db_result(db_query('
        SELECT COUNT(*) FROM comments WHERE pid = %d', $cid));
            if ($reply_count == 0) {
                $moderator_links['convert'] = array('title' => bts('Convert'), 'href' => "{$comment_control}/convert", 'attributes' => array('title' => bts('Convert this comment to a new topic')));
            }
            $vars['moderator_links'] = theme_links($moderator_links);
        } else {
            $links = comment_links($vars['comment'], FALSE);
            if (user_access('post comments')) {
                $links['comment_quote'] = array('title' => bts('Quote'), 'href' => "comment/reply/{$nid}/{$cid}", 'attributes' => array('title' => bts('Reply to this comment with quote')), 'fragment' => 'comment-form', 'query' => 'quote=1');
            }
        }
        ksort($links);
        $vars['links'] = theme_links($links);
        if ($user->uid) {
            $abuse_link = flag_create_link('abuse_comment', $cid);
            if ($abuse_link) {
                $report_comment_link = '' . '<ul class="links">' . '<li class="first">' . $abuse_link . '</li>' . '</ul>';
                $vars['links'] = $report_comment_link . $vars['links'];
            }
        }
        // Show signatures based on user preference
        $vars['show_signatures'] = $user->hide_signatures ? FALSE : TRUE;
    }
}
开发者ID:JuhaSointusalo,项目名称:boinc,代码行数:51,代码来源:template.php


示例4: flag_create_link

?>
"/>
  <div class="user-details">
    <div class="btn btn-default">        
      <?php 
if ($account['user']->uid === $GLOBALS['user']->uid) {
    ?>
        <a href="/user/<?php 
    print $GLOBALS['user']->uid;
    ?>
/edit">Edit Profile</a>
      <?php 
} else {
    ?>
        <?php 
    print flag_create_link('cf_follow_user', $account['user']->uid);
    ?>
      <?php 
}
?>
    </div>
  </div>
</div>
<div class="col-lg-9 col-md-9 col-xs-8 user-profile-right-col">
  <?php 
$cf_user_statistics_blocks = module_invoke('community_features', 'block_view', 'cf_user_statistics');
?>
  <?php 
//dpm($cf_user_statistics_blocks);
?>
  <?php 
开发者ID:emilyf,项目名称:CM-Bootstrap-Modules,代码行数:31,代码来源:cf-user-likes.tpl.php


示例5: flag_create_link

          </a>
          <div class="action">
              <div class="group">
                  <div class="add-to-cart"><i class="fa fa-cart-plus"></i><?php 
print $fields['add_to_cart_form']->content;
?>
</div>
                  <?php 
if (user_is_logged_in()) {
    ?>
                        <span class="wishlist"><?php 
    print flag_create_link('bookmark', $fields['nid']->content);
    ?>
</span>
                        <span class="compare"><?php 
    print flag_create_link('compare', $fields['nid']->content);
    ?>
</span>
                  <?php 
} else {
    ?>
                        <a href="<?php 
    print base_path() . 'user';
    ?>
"><i class="fa fa-heart-o"></i></a>
                        <a href="<?php 
    print base_path() . 'user';
    ?>
"><i class="fa fa-refresh"></i></a>
                  <?php 
}
开发者ID:xrfind,项目名称:ecommerce,代码行数:31,代码来源:views-view-fields--products--block-6.tpl.php


示例6: flag_create_link

    echo "<a href='/user/{$user->uid}/edit'>Edit Profile</a>";
  }
  echo flag_create_link('cf_follow_user', $account['user']->uid);*/
?>
      <?php 
if ($uid === $GLOBALS['user']->uid) {
    ?>
        <a href="/user/<?php 
    print $GLOBALS['user']->uid;
    ?>
/edit">Edit Profile</a>
      <?php 
} else {
    ?>
        <?php 
    print flag_create_link('cf_follow_user', $uid);
    ?>
      <?php 
}
?>
    </div>
  </div>
</div>


<div class="col-lg-9 col-md-9 col-xs-8 user-profile-right-col">
  <?php 
$cf_user_statistics_blocks = module_invoke('community_features', 'block_view', 'cf_user_statistics');
?>
  <?php 
//dpm($cf_user_statistics_blocks);
开发者ID:emilyf,项目名称:CM-Bootstrap-Modules,代码行数:31,代码来源:cf-user-followers.php


示例7: flag_create_link

        <?php 
    print $node->content['nivaria_translate_content_link']['#value'];
    ?>
    </div>
    <?php 
}
?>
    <!-- End Translate link -->

    <!-- Mark Highlighted in Newsletter -->
    <?php 
if (user_access(PERM_ADMIN_CONTESTS)) {
    ?>
    <div class="link-highlight-arquideas-newsletter">
        <?php 
    print flag_create_link('newsletter', $node->nid);
    ?>
    </div>
    <?php 
}
?>
    <!-- End Mark Highlighted in Newsletter -->


    <?php 
if ($links) {
    ?>
    <div class="links">
      <?php 
    print $links;
    ?>
开发者ID:nivaria,项目名称:arquideasprod,代码行数:31,代码来源:node-contest.tpl.php


示例8: render

	<div class="col-md-8 col-sm-11"><h2><?php 
print $title_attributes;
print render($content['field_link']);
?>
</h2> 
								<?php 
print render($content['field_description']);
?>
								<div class="hidden-md hidden-lg"><p><?php 
print flag_create_link('my_library', $node->nid);
?>
</p></div>
	</div>
	<div class="col-md-3 hidden-sm hidden-xs">
		<br><?php 
print flag_create_link('my_library', $node->nid);
?>
	</div>
 </div>
  


  <div class="content"<?php 
print $content_attributes;
?>
>
    <?php 
// We hide the comments and links now so that we can render them later.
hide($content['comments']);
hide($content['links']);
print render($content);
开发者ID:OULibraries,项目名称:oulib_docreg,代码行数:31,代码来源:node--guides--teaser.tpl.php


示例9: print_r

    include 'views-ezproxy_url.inc';
    ?>
      <div class="row" style="border-top:1px dashed #cccccc; padding:5px;">
	  <div>
	  
	  </div>
		<div class="col-md-1 col-sm-1 col-xs-3">
			<?php 
    print_r($view->style_plugin->get_field($key, 'ops_1'));
    ?>
			
		</div>
		
		<div class="col-md-1 col-sm-1 col-xs-3">
            <?php 
    print flag_create_link('my_library', $view->style_plugin->get_field($key, "nid"));
    ?>
        </div>
	  
		<div class="col-md-10 col-sm-10 col-xs-6">
            <a href="<?php 
    print $db_url;
    ?>
" target="_blank" rel="nofollow"><?php 
    print $view->style_plugin->get_field($key, "field_link_2");
    ?>
</a>  
		</div>
			
		
		
开发者ID:OULibraries,项目名称:oulib_docreg,代码行数:28,代码来源:views-view-unformatted--my_guides.tpl.php


示例10: unset

    unset($content['links']['comment']['#links']['comment-add']);
}
// Only display the wrapper div if there are links.
$links = render($content['links']);
//if ($links):
?>
<!--		<div class="link-wrapper">-->
<!--			--><?php 
//print $links;
?>
<!--		</div>-->
<!--	--><?php 
//endif;
?>
	<?php 
print flag_create_link('favorites', $node->nid);
?>
	<?php 
print render($content['comments']);
?>
	<?php 
if (!empty($node->field_picture)) {
    ?>
	<div class="cloud-picture">
		<div class="clip"></div>
		<div class="cloud-picture-wrapper">
			<?php 
    print theme_image_style(array('style_name' => 'cloud_picture_small', 'path' => $node->field_picture['und'][0]['uri']));
    ?>
		</div>
	</div>
开发者ID:ayavuzerdogan,项目名称:thinkloud,代码行数:31,代码来源:node.tpl.php


示例11: flag_create_link

 * - $promote: Flag for front page promotion state.
 * - $sticky: Flags for sticky post setting.
 * - $status: Flag for published status.
 * - $comment: State of comment settings for the node.
 * - $readmore: Flags true if the teaser content of the node cannot hold the
 *   main body content.
 * - $is_front: Flags true when presented in the front page.
 * - $logged_in: Flags true when the current user is a logged-in member.
 * - $is_admin: Flags true when the current user is an administrator.
 *
 * @see template_preprocess()
 * @see template_preprocess_node()
 */
global $user;
if ($user->uid) {
    $flag = flag_create_link('vote', $node->nid);
} else {
    $flag = l(t('Sign In'), 'user', array('query' => 'destination=node/' . $node->nid));
}
$counts = flag_get_counts('node', $node->nid);
$count = $counts['vote'];
?>
<div id="node-<?php 
print $node->nid;
?>
" class="node<?php 
if ($sticky) {
    print ' sticky';
}
if (!$status) {
    print ' node-unpublished';
开发者ID:pietromalerba,项目名称:ShowCase-Drupal-Test-project,代码行数:31,代码来源:node-session.tpl.php


示例12: drupal_get_path_alias

    global $user;
    $body = '';
    $fullurl = 'http://' . $_SERVER['HTTP_HOST'];
    $url = $fullurl . '/' . drupal_get_path_alias('node/' . $node->nid);
    if (!empty($node->body['und']) && isset($node->body['und'])) {
        $node_body = $node->body['und'][0]['value'];
        $body = strip_tags($node_body);
    }
    $flag_link = '';
    $flag_dest = '';
    $get_destination = drupal_get_destination();
    if (isset($get_destination['destination']) && !empty($get_destination['destination'])) {
        $flag_dest = $get_destination['destination'];
    }
    if ($user->uid) {
        $flag_link = flag_create_link('saved_articles', $node->nid);
    } else {
        $flag_link = '<a href="user/?destination=' . $flag_dest . '" title="Click to save content" class="flag flag-action flag-link-toggle flag-processed" rel="nofollow"><img src="' . $save_img . '"></a>';
    }
    ?>

<?php 
    // Copy to clipboard script
    ?>
<script type="text/javascript">
  function customCopyText(objId) {
    var copyTextarea = document.querySelector('#' + objId);
    copyTextarea.select();
    try {
      var successful = document.execCommand('copy');
      var msg = successful ? 'successful' : 'unsuccessful';
开发者ID:snehal-addweb,项目名称:Mortgagespeak,代码行数:31,代码来源:node--alpha_content.tpl.php


示例13: openContestButton

    <?php 
    if (!$is_edit && isset($contest) && $contest->field_contest_state[0]['value'] == ContestState::OPEN && $node->field_inscription_state[0]['value'] == InscriptionState::PREINSCRIPTED) {
        print '<div class="open-contest-button">' . openContestButton($contest) . '</div>';
    }
    ?>
    <!-- END INSCRIPTION, PAYMENT OR PRESENTATION LINK -->

    <div class="clearfix">&nbsp;</div>

    <!-- Mark Special Arquideas Prize -->
    <?php 
    if ($contest->field_contest_state[0]['value'] == ContestState::FINISHED && user_access(PERM_ADMIN_CONTESTS)) {
        ?>
    <div class="link-special-arquideas-prize">
        <?php 
        print flag_create_link('arquideas_prize', $node->nid);
        ?>
    </div>
    <?php 
    }
    ?>
    <!-- End Mark Special Arquideas Prize -->
    </div>
    <?php 
}
?>

    <?php 
if (!$is_edit && $page == 1) {
    ?>
        <!-- Edit link -->
开发者ID:nivaria,项目名称:arquideasprod,代码行数:31,代码来源:node-inscription.tpl.php


示例14: flag_create_link

print $compete_rank;
?>
</li>
                </ul>               
                
                </div><!--/source ranking-->
              
                
                <div class="source_actions clearfix">
                <ul>                
                	<li><?php 
print flag_create_link('watchlist', $node->nid);
?>
</li>
                	<li><?php 
print flag_create_link('blacklist', $node->nid);
?>
</li>                	
                </ul>              
                
                </div><!--/source actions-->
                


<?php 
// SET UP FILTERING
$sorting = check_plain($_GET['timeframe']);
if (empty($sorting)) {
    $sorting = 'all';
}
//default
开发者ID:ntulip,项目名称:tattler,代码行数:31,代码来源:node-source.tpl.php


示例15: array

  
  <?php 
if (user_access('administer tattler')) {
    $options = array('attributes' => array('rel' => '#overlay'));
    ?>
    <li class="tags">
      <?php 
    print l(t('Edit Node Essentials'), 'buzz/' . $row->nid . '/edit', $options);
    ?>
    </li>  
  <?php 
}
?>
    
  <li><?php 
print flag_create_link('watchlist', $row->node_node_data_field_source_nid);
?>
</li> 
  <li><?php 
print flag_create_link('blacklist', $row->node_node_data_field_source_nid);
?>
</li>     

  </ul>              
  
  </div><!--/source actions-->   
  <div class="close_entry_detail"><a class="mention_close_link" href="#">CLOSE</a></div>  
  
  </div><!--/entry detail--> 
  
</li><!--/entry-->
开发者ID:ntulip,项目名称:tattler,代码行数:30,代码来源:views-view-fields--mention--block-1.tpl.php


示例16: flag_create_link

  <h2><?php 
print $row->node_title;
?>
</h2>
  
  <div class="source_and_date"><?php 
print $source_link;
?>
</div><!--/source and date-->  
  </div><!--/float left-->
  
  <div class="actions" style="display: none;">
  <ul>
    <li><?php 
print flag_create_link('watchlist', $row->nid);
?>
</li> 
    <li><?php 
print flag_create_link('blacklist', $row->nid);
?>
</li>     
    <!--li><a id="<?php 
print $row->nid;
?>
" class="buzz_icon blacklist"></a></li-->
  </ul>
  
  </div><!--/actions-->   
  </div><!--/entry summary-->         
    
</li><!--/entry-->
开发者ID:ntulip,项目名称:tattler,代码行数:31,代码来源:views-view-fields--sources--block-1.tpl.php


示例17: render

</span>
      </div>
      
      <?php 
print render($content);
?>
      <?php 
print render($content['add_to_cart']);
?>
      
      <div class="actions">
        <?php 
print flag_create_link('wishlist', $node->nid);
?>
        <?php 
print flag_create_link('compare', $node->nid);
?>
      </div><!-- .actions -->
    </div>
  </div>

    <div class="product-tab">
      <ul class="nav nav-tabs">
        <li class="active"><a href="#description"><?php 
print $content['body']['#title'];
?>
</a></li>
        <li><a href="#reviews"><?php 
print t('Reviews');
?>
</a></li>
开发者ID:ivanvincent,项目名称:imsv_fe,代码行数:31,代码来源:node--product.tpl.php


示例18: flag_create_link

<?php

/**
 * @file
 * Default simple view template to display a single comment.
 *
 * Rather than doing anything with this particular template, it is more
 * efficient to use a variant of the comment.tpl.php based upon the view,
 * which will be named comment-view-VIEWNAME.tpl.php. This isn't actually
 * a views template, which is why it's not used here, but is a template
 * 'suggestion' given to the comment template, and is used exactly
 * the same as any other variant of the comment template file, such as
 * node-nodeTYPE.tpl.php
 *
 * @ingroup views_templates
 */
print $comment;
print flag_create_link('ranking', $row->cid);
开发者ID:faxe-kommune,项目名称:OS2loop,代码行数:18,代码来源:views-view-row-comment--loop-post-comments-other-comments.tpl.php


示例19: flag_create_link

    ?>
        <div class="user-signature clear-block">
          <?php 
    print $signature;
    ?>
        </div>
      <?php 
}
?>
    </div>

    <?php 
if ($links) {
    ?>
      <div class="links"><?php 
    print $links;
    ?>
</div>
    <?php 
} else {
    ?>
      <div class="links"><?php 
    print flag_create_link('report_comment', $comment->cid);
    ?>
</div>
    <?php 
}
?>
  </div>
</div>
开发者ID:syahrasi,项目名称:majalahversi,代码行数:30,代码来源:comment.tpl.php


示例20: db_query

        }
        /*if ($keuzevrijheid) $where .= " AND vc.field_keuzevrijheid_value = '$keuzevrijheid'";*/
        //, vc.field_keuzevrijheid_value
        $query = db_query("SELECT DISTINCT vc.field_maandpremie_value, vc.nid, n2.title FROM {node} n INNER JOIN {content_type_contract} vc ON (n.nid = vc.field_verzekeraar_nid) LEFT JOIN {node} n2 ON (vc.vid = n2.vid) WHERE " . $where, $node->nid);
    }
    $vcontracts = array();
    while ($row = db_fetch_array($query)) {
        $pr = (int) number_format(str_replace(",", ".", $row['field_maandpremie_value']), 2, '', '');
        $vcontracts[$pr] = array('nid' => $row['nid'], 'title' => $row['title'], 'maandpremie' => number_format(str_replace(",", ".", $row['field_maandpremie_value']), 2, ',', ''), 'keuzevrijheid' => 'Beperkte zorgkeuze');
    }
    ksort($vcontracts);
    $vcontracts = current($vcontracts);
    $contract_price = !empty($node->field_insurance_premie_from[0]['value']) ? $node->field_insurance_premie_from[0]['value'] : $vcontracts['maandpremie'];
    $contract_title = $vcontracts['title'];
    $contract_zorgkeuze = !empty($node->field_keuzevrijheid[0]['value']) ? $node->field_keuzevrijheid[0]['value'] : $vcontracts['keuzevrijheid'];
    $link = flag_create_link('compare', $vcontracts['nid']);
    if ($contract_title == '<none>') {
        $contract_title = '';
    }
    /*foreach($vcontracts as $vcontract){
         $contract_price = $vcontract['maandpremie'];
         $contract_title = $vcontract['title'];
         $contract_zorgkeuze = $vcontract['keuzevrijheid'];
      $link = flag_create_link('compare', $vcontract['nid']);
         break;
       }*/
    ?>
<table>
	<tr>
		<td class="row-0 no_text first"></td>
		<td class="no_text first"></td>
开发者ID:andrygorokhovets,项目名称:vergelijkz,代码行数:31,代码来源:node-insurance.tpl.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP flash函数代码示例发布时间:2022-05-15
下一篇:
PHP fixup_string函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap