Comments (6)
$comments变量默认只在评论模版里声明,所以你在首页用新版代码无效了。可以用旧版代码<?php Smilies_Plugin::output(); ?>
也是兼容的。js无效有两种可能,一个是你用的主题没有在footer.php里按标准写上插件节点<?php $this->footer(); ?>
,二就是其他js代码和表情插入js冲突了。
from smilies.
你这个需求比较特殊……考虑到首页一版没有评论框,插件并没有往首页输出js。你可以手动修改Plugin.php的第629行改成
if ($widget->is('single') || $widget->is('index')) {
即可。
from smilies.
按照你的方法改了,但是完全没有显示出来?
如果用旧的版本,<div id="smiliesbox" style="display:block;">。。。。</div>
是可以正常显示,但是js无效。但现在用了新的版本,连
from smilies.
513行:
public static function insertjs($widget)
{
$options = Helper::options();
$settings = $options->plugin('Smilies');
$textareaid = $settings->textareaid;
$textareaid = $textareaid ? $textareaid : _t('一般无需填写');
$idset = ($widget->is('single') || $widget->is('index')) ? $textareaid : 'text';
$txtid = $settings->jqmode ? '#'.$idset : $idset;
$txtdom = 'domId("'.$txtid.'")';
if ($widget->is('single') || $widget->is('index') && $idset==_t('一般无需填写')) {
$txtid = 'textarea';
$txtdom = 'domTag("'.$txtid.'")';
}
629行:
if ($widget->is('single') || $widget->is('index')) {
因为只改动629的代码并没有效果,而且div并没有调用,所以我改了513行的代码,但同样没有效果。
from smilies.
果然优秀!!!而且解释得很清楚!
from smilies.
能用上就行:P
from smilies.
Related Issues (3)
- 预览与排序文字排版错乱,以及评论的时候表情为什么竖着显示?? HOT 2
- php5.6.27无法扫描表情文件夹 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smilies.