升级1.2后标签列表不好用了

解决您在不同平台环境下遇到的安装和升级问题
回复
伊斯蓝
帖子: 14
注册时间: 2018年 9月 26日 16:04

升级1.2后标签列表不好用了

帖子 伊斯蓝 »

为了写文章方便
给write-post加了个标签列表
1.1的效果是这样
图片
现在升级到1.2
效果变成这样了
图片
源代码是这样的
图片

代码: 全选

<section class="typecho-post-option">
                <label for="token-input-tags" class="typecho-label"><?php _e('标签'); ?></label>
                <p>
                <input id="tags" name="tags" type="text" value="<?php $post->tags(',', false); ?>" class="w-100 text" />
                <style>.tagshelper a{cursor: pointer; padding: 0px 6px; margin: 2px 0;display: inline-block;border-radius: 2px;text-decoration: none;}.tagshelper a:hover{background: #ccc;color: #fff;}
                </style>
                <script> $(document).ready(function(){
                    $('#tags').after('<div style="margin-top: 35px;" class="tagshelper">标签选择:<ul style="list-style: none;border: 1px solid #D9D9D6;padding: 6px 12px; max-height: 240px;overflow: auto;background-color: #FFF;border-radius: 2px;"><?php
                        $stack = Typecho_Widget::widget('Widget_Metas_Tag_Cloud')->stack;
                        $i = 0; 
                        while (isset($stack[$i])) {
                        echo "<a id=\"$i\" onclick=\"$(\'#tags\').tokenInput(\'add\', {id: \'".$stack[$i]['name']."\', tags: \'".$stack[$i]['name']."\'});\">",$stack[$i]['name'], "</a>";
                        $i++;
                        if (isset($stack[$i])) echo "  ";}
                        ?></ul></div>');
                    });
                </script>
                </p>
            </section>
求大佬帮忙修改或指点
感激不尽
Lopwon
帖子: 173
注册时间: 2016年 11月 14日 11:19

Re: 升级1.2后标签列表不好用了

帖子 Lopwon »

伊斯蓝
帖子: 14
注册时间: 2018年 9月 26日 16:04

Re: 升级1.2后标签列表不好用了

帖子 伊斯蓝 »

感谢大佬
终于解决这个问题了
weich
帖子: 174
注册时间: 2018年 4月 6日 07:48
联系:

Re: 升级1.2后标签列表不好用了

帖子 weich »

1.21在用那个插件直接不显示,我就用代码了
回复