- ubuntu12.04环境下使用kvm ioctl接口实现最简单的虚拟机
- Ubuntu 通过无线网络安装Ubuntu Server启动系统后连接无线网络的方法
- 在Ubuntu上搭建网桥的方法
- ubuntu 虚拟机上网方式及相关配置详解
CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.
这篇CFSDN的博客文章phpcms中的评论样式修改方法由作者收集整理,如果你对这篇文章有兴趣,记得点赞哟.
phpcms中自带的评论插件很好用!但是样式个人感觉丑的狠,百度一下也没能找到解决方式,也许是自己的搜索方式不对,于是自己就研究了研究,这里可以使用两种方法进行修改 。
方法一:
使用PHPCMS中的get方法进行获取数据 。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
//拼接评论表的commentid字段值
{php
$commentid
=
'content_'
.
$catid
.
'-'
.
$id
.
'-'
.
$modelid
;}
//查询获取数据
{pc:get sql=
"SELECT * FROM v9_comment_data_1 where commentid = '$commentid'"
cache=
"0"
return
=
"data"
}
//循环输出
{loop
$data
$key
$val
}
<li
class
=
"list-group-item"
>
<div
class
=
"media"
>
<a
class
=
"media-left"
href=
"#"
>
<img src=
"{IMG_PATH}tou.png"
class
=
"img-circle"
alt=
"..."
>
</a>
<div
class
=
"media-body"
>
<h5
class
=
"media-heading"
>{
$val
[username]}</h5>
<span style=
"font-size:10px;"
>{
$val
[content]}</span>
</div>
</div>
</li>
{/loop}
{/pc}
|
方法二:
除了使用get方法进行获取数据之外还有一种最简单的方式,找到 /phpcms/templates/default/comment/show_list.html 找到如下代码,进行样式的修改即可 。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{pc:comment action=
"lists"
commentid=
"$commentid"
siteid=
"$siteid"
page=
"$_GET['page']"
hot=
"$hot"
num=
"20"
}
{
if
!
empty
(
$data
)}
<div
class
=
"comment_button"
><a href=
"{APP_PATH}index.php?m=comment&c=index&a=init&commentid={$commentid}&title={urlencode(($comment[title] ? $comment[title] : $title))}&url={urlencode(($comment[url] ? $comment[url] : $url))}&hot=0&iframe=1"
{
if
empty
(
$hot
)}
class
=
"on"
{/
if
}>最新</a> <a href=
"{APP_PATH}index.php?m=comment&c=index&a=init&commentid={$commentid}&title={urlencode(($comment[title] ? $comment[title] : $title))}&url={urlencode(($comment[url] ? $comment[url] : $url))}&hot=1&iframe=1"
{
if
$hot
}
class
=
"on"
{/
if
}>最热</a></div>
<div
class
=
"comment"
>
{loop
$data
$r
}
<h5
class
=
"title fn"
>{direction(
$r
[direction])} <font color=
"#FF0000"
>{format::
date
(
$r
[creat_at], 1)}</font> {
if
$r
[userid]}{get_nickname(
$r
[userid])}{
else
}{
$r
[username]}{/
if
} </h5>
<div
class
=
"content"
>{
$r
[content]}
<div
class
=
"rt"
><a href=
"javascript:void(0)"
onclick=
"reply({$r[id]}, '{$commentid}')"
>回复</a> <a href=
"javascript:void(0)"
onclick=
"support({$r[id]}, '{$commentid}')"
>支持</a>(<font id=
"support_{$r[id]}"
>{
$r
[support]}</font>)
</div>
<div id=
"reply_{$r[id]}"
style=
"display:none"
></div>
</div>
<div
class
=
"bk30 hr mb8"
></div>
{/loop}
</div>
<div id=
"pages"
class
=
"text-r"
>{
$pages
}</div>
{/
if
}
{/pc}
|
以上所述是小编给大家介绍的phpcms中的评论样式修改方法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对我网站的支持! 。
原文链接:http://www.cnblogs.com/itsuibi/archive/2016/10/20/5983017.html 。
最后此篇关于phpcms中的评论样式修改方法的文章就讲到这里了,如果你想了解更多关于phpcms中的评论样式修改方法的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。
我正在使用评论系统,现在,我想重写 url 评论的片段并附加一个符号#,我想将页面部分移动到评论列表,正好是最后一个评论用户,带有 username 我在发表评论时使用 next 重定向用户: {
这个问题在这里已经有了答案: "Rate This App"-link in Google Play store app on the phone (21 个回答) 关闭2年前。 有没有一种方法可以要
长期潜伏者第一次海报... 我们正在使用 Facebook 的 API 将其集成到我们的网络应用程序中,并且我们能够通过 {page-id}/ratings 部分中的 {open_graph_stor
我正在尝试让 Visual Studio 2012 自动格式化我的评论 block ,就像它对我的 C# block 所做的那样。我希望我的评论看起来像这样: /* * Here is my C#
在 MySQl 中创建表时对每个字段进行注释是否会影响性能?我正在处理一个包含 1000 多个表的数据库,几乎每个表中的每个字段都有注释。我只是想知道这是否会以任何方式影响 MySQL 的性能? 最佳
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 7年前关闭。 Improve thi
这个问题在这里已经有了答案: SQL select only rows with max value on a column [duplicate] (27 个答案) 关闭 5 年前。 我这里有 2
如何在评论中正确编写 --> 或 -->? 我正在维护一个包含许多小程序代码条目的大型 html 文件。说: a --> b. 我在 HTML 中将其编码为 -->: a --> b. 但是,我
这是一个简单的问题。有没有办法允许用户直接在我的应用程序中输入评论和/或评级,并将这些数据发回 Android Market?如果是这样,如果我使用 EditText View 允许用户输入,代码会是
注释是否表示代码中带有//或/* */的注释? 最佳答案 不,注释不是评论。使用语法 @Annotation 将注释添加到字段、类或方法。最著名的注解之一是@Override,用于表示方法正在覆盖父类
我有一个包含两个模型的 Django 应用程序:第一个是 django.contrib.auth.User,第二个是我创建的 Product。 我会为每个产品添加评论,因此每个注册用户都可以为每个产品
有没有办法评论多行......其中已经有一些评论? 即 ... Hello world! Multi-line comment end --> 看来连
这个问题在这里已经有了答案: 关闭 10 年前。 Possible Duplicate: obj.nil? vs. obj == nil 现在通过 ruby koans 工作,发现这个评论嵌入在
这是一个基本问题 .gemrc 文件中是否允许注释? 如果是,你会怎么做? 我这里查了没用 docs.rubygems.org/read/chapter/11 最佳答案 文档说:The config
有没有办法在 SASS 中添加 sass-only 注释?你知道,所以输出 .css 文件没有那些注释 例如, /* global variables */ $mainColor: #666; /*
我想搜索在任何媒体上发布的评论中的任何特定关键字或几个关键字的组合。我的要求是在 API 的帮助下获取包含该关键字的评论。我浏览了 Instagram API 的文档,发现只能通过哈希标签进行搜索,而
在 WordPress 中,您可以在页面加载之前执行以下操作来编辑文章的内容: add_filter('the_content', 'edit_content'); function edit_con
在指示要合并的内容时, checkin 合并的最佳方法是什么?我已经说过 10 个变更集我正在从我的主分支合并到一个发布分支。每一个都包含我在 checkin 主分支时写的详细注释。现在,当我合并时,
我知道如何查询常规网站的社交参与度计数。可以使用Facebook图形浏览器(https://developers.facebook.com/tools/explorer/)或throug api轻松实
我正在尝试从 YouTube 视频中获得特定评论。例如,我想从 YouTube 视频的第 34 条评论中获取详细信息。有谁知道在不阅读所有评论列表的情况下我该怎么做? 或者,如果没有任何解决方案可以仅
我是一名优秀的程序员,十分优秀!