分享
  • 收藏
  • 举报
    X
    救急,标签里如何获取该论坛帖子所在社群的群名称?谢谢
    • 中国羊病网 消费98.9元 2019-03-24 23:47 23:47
    940
    6

    <!--你当前选择的模板文件是:common/view/title/img_001.htm-->

    <link href="__STATIC__/images/template/title/img_001/style.css" rel="stylesheet" type="text/css" />

    <div class="qb_img_001">

    <?php if(is_array($__LIST__) || $__LIST__ instanceof \think\Collection || $__LIST__ instanceof \think\Paginator): $i = 0; $__LIST__ = $__LIST__;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$rs): $mod = ($i % 2 );++$i;?>

    <ul>

    <ol><a href="<?php echo $rs['url']; ?>" target="_blank"><img onerror="this.src='__STATIC__/images/nopic.png'" src="<?php echo $rs['picurl']; ?>"></a></ol>

    <li>

    <h3><a href="<?php echo $rs['url']; ?>" target="_blank"><?php echo $rs['title']; ?></a></h3>

    <p><?php echo get_word($rs['content'],$cleng>10?:200); ?></p> <div>获取该帖子所在社群的群名称</div>

    </li>

    </ul>

    <?php endforeach; endif; else: echo "" ;endif; ?>

    </div> 

    <script type="text/javascript">

    $(window).resize(function () {          //当浏览器大小变化时

       qb_img_001(); 

    });

    $(function(){ 

    qb_img_001();

    });

    function qb_img_001(){

    $('.qb_img_001').each(function(){

    $(this).find('ul').removeAttr('class');

    var thisObjW=$(this).width();

    if(thisObjW>1200){

    $(this).find('ul').addClass('type1');

    }else if(thisObjW<1200 && thisObjW>801){

    $(this).find('ul').addClass('type2');

    }else if(thisObjW<800 && thisObjW>501){

    $(this).find('ul').addClass('type3');

    }else if(thisObjW<500 && thisObjW>351){

    $(this).find('ul').addClass('type4');

    }else{

    $(this).find('ul').addClass('type5');

    }

    });

    }

    $('.qb_img_001 img').hover(

    function(){$(this).animate({"max-width":"150%","max-height":"150%"},300);},

    function(){$(this).animate({"max-width":"98%","max-height":"96%"},300);}

    );

    </script>







    红色的位置是admin老大给获取的论坛内容


    9
    赏礼
    赏钱
    收藏
    点击回复
        全部留言
    • 6
    • admin 超级管理员 消费:3.03元 2019-03-25 09:02 09:026楼

      换成这个

      <?php echo fun('qun@getByid',$rs['ext_id'])['title']; ?>


      中国羊病网 消费:98.9元 2019-03-25 10:42
      感谢老大,也一并感谢回帖的朋友,问题已经解决,谢谢!
    0 赏钱 赏礼回复
    • snscn 普通粉丝 消费:1862.35元 2019-03-25 07:25 07:25
      其他手机
      6楼
      有简单的齐博标签不用。。。。
    0 赏钱 赏礼回复
    • 中国羊病网 普通粉丝 消费:98.9元 2019-03-25 07:19 07:196楼

      <!--你当前选择的模板文件是:common/view/title/img_001.htm-->

      <link href="http://www.chongwuzhao.com/public\static//images/template/title/img_001/style.css" rel="stylesheet" type="text/css" />

      <div class="qb_img_001">

      <?php if(is_array($__LIST__) || $__LIST__ instanceof \think\Collection || $__LIST__ instanceof \think\Paginator): $i = 0; $__LIST__ = $__LIST__;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$rs): $mod = ($i % 2 );++$i;?>

      <ul>

      <ol><a href="<?php echo $rs['url']; ?>" target="_blank"><img onerror="this.src='__STATIC__/images/nopic.png'" src="<?php echo $rs['picurl']; ?>"></a></ol>

      <li>

      <h3><a href="<?php echo $rs['url']; ?>" target="_blank"><?php echo $rs['title']; ?></a></h3>

      <p><?php echo fun('bbs@getContents',$rs['id'],$cleng>200?:400); ?></p>

      <div>所属栏目:<?php echo $rs['sort_name']; ?>

      所属圈子:{notempty name="$info.qun"}<a href="{:urls('qun/content/show',['id'=>$info['ext_id']])}">{$info['qun']['title']}</a>{else /}{/notempty}{notempty name="$info.qun"}<a href="{:urls('qun/content/show',['id'=>$info['ext_id']])}">{$info['qun']['title']}</a>{else /}{/notempty}


      红色的获取不到圈子的名称

      </div>

      </li>

      </ul>

      <?php endforeach; endif; else: echo "" ;endif; ?>

      </div> 

      <script type="text/javascript">

      $(window).resize(function () {          //当浏览器大小变化时

         qb_img_001();

      });

      $(function(){ 

      qb_img_001();

      });

      function qb_img_001(){

      $('.qb_img_001').each(function(){

      $(this).find('ul').removeAttr('class');

      var thisObjW=$(this).width();

      if(thisObjW>1200){

      $(this).find('ul').addClass('type1');

      }else if(thisObjW<1100 && thisObjW>701){

      $(this).find('ul').addClass('type2');

      }else if(thisObjW<700 && thisObjW>401){

      $(this).find('ul').addClass('type3');

      }else if(thisObjW<400 && thisObjW>251){

      $(this).find('ul').addClass('type4');

      }else{

      $(this).find('ul').addClass('type5');

      }

      });

      }

      $('.qb_img_001 img').hover(

      function(){$(this).animate({"max-width":"150%","max-height":"150%"},200);},

      function(){$(this).animate({"max-width":"98%","max-height":"96%"},200);}

      );

      </script>


    0 赏钱 赏礼回复
    • verycong 风格开发者 消费:118.73元 2019-03-24 23:59 23:596楼
      {notempty name="$info.qun"}<a href="{:urls('qun/content/show',['id'=>$info['ext_id']])}">{$info['qun']['title']}</a>{else /}{/notempty}


      中国羊病网 消费:98.9元 2019-03-25 07:13
      您好,感谢回复,但是我尝试了,不行,您那个应该是直接写在文件里的吧。 我这个需要在标签里获取到。我搞上去,不显示,麻烦再帮我看下,谢谢。
    0 赏钱 赏礼回复
    更多回复
    恢复多功能编辑器
  • 3 1
  • 推荐内容
    扫一扫访问手机版
    请选择要切换的马甲:

     
    网页即时交流
    QQ咨询
    咨询热线
    020-28998648