当前theme为bartik
\themes\bartik\templates 下 node.tpl.php
<?php /** * @file * Bartik's theme implementation to display a node. * * Available variables: * - $title: the (sanitized) title of the node. * - $content: An array of node items. Use render($content) to print them all, * or print a subset such as render($content['field_example']). Use * hide($content['field_example']) to temporarily suppress the printing of a * given element. * - $user_picture: The node author's picture from user-picture.tpl.php. * - $date: Formatted creation date. Preprocess functions can reformat it by * calling format_date() with the desired parameters on the $created variable. * - $name: Themed username of node author output from theme_username(). * - $node_url: Direct URL of the current node. * - $display_submitted: Whether submission information should be displayed. * - $submitted: Submission information created from $name and $date during * template_preprocess_node(). * - $classes: String of classes that can be used to style contextually through * CSS. It can be manipulated through the variable $classes_array from * preprocess functions. The default values can be one or more of the * following: * - node: The current template type; for example, "theming hook". * - node-[type]: The current node type. For example, if the node is a * "Blog entry" it would result in "node-blog". Note that the machine * name will often be in a short form of the human readable label. * - node-teaser: Nodes in teaser form. * - node-preview: Nodes in preview mode. * The following are controlled through the node publishing options. * - node-promoted: Nodes promoted to the front page. * - node-sticky: Nodes ordered above other non-sticky nodes in teaser * listings. * - node-unpublished: Unpublished nodes visible only to administrators. * - $title_prefix (array): An array containing additional output populated by * modules, intended to be displayed in front of the main title tag that * appears in the template. * - $title_suffix (array): An array containing additional output populated by * modules, intended to be displayed after the main title tag that appears in * the template. * * Other variables: * - $node: Full node object. Contains data that may not be safe. * - $type: Node type; for example, story, page, blog, etc. * - $comment_count: Number of comments attached to the node. * - $uid: User ID of the node author. * - $created: Time the node was published formatted in Unix timestamp. * - $classes_array: Array of html class attribute values. It is flattened * into a string within the variable $classes. * - $zebra: Outputs either "even" or "odd". Useful for zebra striping in * teaser listings. * - $id: Position of the node. Increments each time it's output. * * Node status variables: * - $view_mode: View mode; for example, "full", "teaser". * - $teaser: Flag for the teaser state (shortcut for $view_mode == 'teaser'). * - $page: Flag for the full page state. * - $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. * * Field variables: for each field instance attached to the node a corresponding * variable is defined; for example, $node->body becomes $body. When needing to * access a field's raw values, developers/themers are strongly encouraged to * use these variables. Otherwise they will have to explicitly specify the * desired field language; for example, $node->body['en'], thus overriding any * language negotiation rule that was previously applied. * * @see template_preprocess() * @see template_preprocess_node() * @see template_process() */ ?> <div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>> <?php print render($title_prefix); ?> <?php if (!$page): ?> <h2<?php print $title_attributes; ?>> <a href="<?php print $node_url; ?>"><?php print $title; ?></a> </h2> <?php endif; ?> <?php print render($title_suffix); ?> <?php if ($display_submitted): ?> <div class="meta submitted"> <?php print $user_picture; ?> <?php print $submitted; ?> </div> <?php endif; ?> <div class="content clearfix"<?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); ?> <!-- 添加这个判断,是为了防止分享出现在摘要模式上, --> <?php if ($page): ?> <!-- Baidu Button BEGIN --> <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare"> <a class="bds_tsina"></a> <a class="bds_qzone"></a> <a class="bds_tqq"></a> <a class="bds_renren"></a> <a class="bds_t163"></a> <a class="bds_tuita"></a> <a class="bds_share189"></a> <a class="bds_tqf"></a> <a class="bds_tieba"></a> <span class="bds_more">更多</span> <a class="shareCount"></a> </div> <div class="clearfix"></div> <!--防止后面的内容紧跟分享的按钮 --> <script type="text/javascript" id="bdshare_js" data="type=tools&uid=0" ></script> <script type="text/javascript" id="bdshell_js"></script> <script type="text/javascript"> document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000) </script> <!-- Baidu Button END --> <?php endif; ?> </div> <?php // Remove the "Add new comment" link on the teaser page or if the comment // form is being displayed on the same page. if ($teaser || !empty($content['comments']['comment_form'])) { 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 render($content['comments']); ?> </div>
相关推荐
界面并不花哨,新游戏_暂停_退出都设为按钮 应用了快捷键功能 可以关闭开启声音! 很值得下载看看!资源免费,大家分享!!
当用户在您的网站上遇到一个死胡同,我们的404错误页面模板能将潜在的挫败转化为一次愉悦的体验。这不仅是一个简单的错误页面,而是一段艺术,一份惊喜,一道亮丽的风景。 亮点介绍: 创意设计,将访客的失望转化...
今天小编就为大家分享一篇layui自己添加图片按钮并点击跳转页面的例子,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
添加好后进入wp后台发布日志时插入代码,在HTML编辑模式下选中代码,点mycode按钮,就自动把要添加的代码格式化啦!自动插件代码后,语句lang=”LANGUAGE”就是对应你的程序语言。如果是css就手动改为lang=”css”是...
应用场景:用户a登录进系统,页面上有个按钮,点击之后会动态添加路由并且跳转,跳转过去之后,用户刷新后也会停留在当前页面。 不点这个按钮,浏览器输入地址,用户会跳到404页面 github:...
可设置在“RiPro资源购买小工具”购买按钮/下载按钮上方自动添加检测按钮 前端自动检测 可设置页面加载完成后对本文章的下载按钮进行检测并展示检测结果 前端短代码 可设置开启短代码 [mel_pan_check] 在文章内...
(注意:只要用户点击了分享按钮并弹出了分享页面即可见,即使用户中途没有进行分享而直接关闭了分享页面) 1、专业版 配置微信appid和公众号后台相应配置后,在微信中分享到朋友圈中时可显示帖子标题、简介、缩略...
插件启用后会在文章单页的底部添加一些国内流行的社会化分享按钮例如:腾讯微博、新浪微博、腾讯空间、人人网、开心网、豆瓣、百度搜藏等等国内流行的社会化分享服务。 China-AddThis与同类服务的区别 China-Add...
简单的侨民*分享按钮 这些脚本的目的是在您的网站上为社交网络添加一个简单的共享按钮。 如果您想要更复杂的按钮,您可以使用 。 中还有其他选项可用。 安装 复制你网站公共部分php下的文件。 用法 像这样selectpod....
// flags 打开扩展页面开启首页chrome:// newtab 打开设置chrome:// settings 公开历史查看页面的源代码重新载入页面Eruda-移动浏览器控制台书签当前标签分享当前页面贡献如果您有建议,可以通过打开一个问题来...
Simple Share Buttons Adder 完全符合它在罐头上所说的 - 简单地将共享按钮添加到您的所有帖子和页面。 这个插件有一个专门的网站! 查看 没有盗链到另一个网站来缓慢下载或跟踪使用,这很简单,正如承诺的那样。 ...
wap v2.1版本 更新说明 [20141030]1、页面直接添加了搜索表单2、幻灯等添加了批量排序3、简化了后台搜索功能按钮4、修正了幻灯片链接无法点击的问题5、添加了微信分享设置与转发代码6、修正了内容页面不换行的问题7...
5. 移动端广场的绘画详情弹窗添加关闭按钮 6. 首页局限性提示内容支持自定义 7. 绘画分享至广场携带绘画参数 8. 绘画针对某图片进行放大或变体操作时,提示绘画异常 9. 对话接口错误提示优化 10. 登录方式默认为微信...
Wishtack的“添加到愿望清单”按钮扩展名将自动在您喜欢的任何购物网站的任何产品页面的右下方添加一个“添加到愿望清单”按钮。 然后,您可以在任何社交网络上或通过电子邮件分享您的愿望。 共享后,您的朋友就可以...
第一种:在分享的页面在添加显眼的“首页”悬浮按钮,点击按钮跳转到首页。这种方法,好容易理解,可是万一页面多,需要开发不少这样的悬浮按钮,而且点击返回依旧是退出小程序。 第二种:分享的时候不是分享本页面...
我们可以看到页面顶部和底部都有分享的按钮。然后我把鼠标移动到其中一个按钮上: 可以看到,中间的按钮变大了。当然,图片看不出动画效果,大家可以自己去站点查看(好吧,我承认,这是我的站,想骗你进去,哈哈)...
最近在做一个手机站,要求点击分享可以直接打开微信分享出去。而不是jiathis,share分享这种的点击出来二维码。在网上看了很多,都说APP能唤起微信,手机网页实现不了。也找了很多都不能直接唤起微信。
1、页面直接添加了搜索表单 2、幻灯等添加了批量排序 3、简化了后台搜索功能按钮 4、修正了幻灯片链接无法点击的问题 5、添加了微信分享设置与转发代码 6、修正了内容页面不换行的问题 7、新闻,产品,案例...
本文给大家分享js实现点击按钮字体放大缩小实例代码,代码简单易懂,需要的朋友参考下吧 具体代码如下所示: <style> .bb{color:red;} .cc{color:green;} .chapter {font-size: 1.5em;} .normal{font-size:...
本文实例讲述了JS简单实现动态添加HTML标记的方法。分享给大家供大家参考,具体如下: ...本示例通过单击“动态添加文本”按钮,将在页面中动态添加一个文本框。 三 代码 <html xmlns="http://www