HỏiXin Code TWIG đọc từ đầu diễn đàn

12 bài đăng
09.07.2016 / 20:15
kayer
Bài đăng: 240
Member
Đã đủ 18 dấu + làm người lớn

Search trên google share mấy cái ko hoạt động nên nhờ ae phố nhỏ giúp

09.07.2016 / 20:32
duongchung
Bài đăng: 352
Member
Cox Vô Tâm

Thêm $read=1 vào link

09.07.2016 / 21:12
kayer
Bài đăng: 240
Member
Đã đủ 18 dấu + làm người lớn
duongchung đã viết

Thêm $read=1 vào link

Bạn nói cụ thể hơn chút đi

09.07.2016 / 21:31
mad
Bài đăng: 2434
Member
Nhào vô cắn tao đi, tao sợ mày à cắn bừa.

{%if api.r.get('read')!=1%}<script>function turn(){location.href="linkforum&read=1";setTimeout(function(){turn()},1000)}</script>{%endif%}

09.07.2016 / 21:37
hanhphucao
Bài đăng: 2470
Admin
Admin là người tận tâm và luôn hành xử đúng mực.

Chú ý box đăng bài nhé :)

09.07.2016 / 21:49
hanhphucao
Bài đăng: 2470
Admin
Admin là người tận tâm và luôn hành xử đúng mực.

Dán code sau vào đầu hoặc cuối diễn đàn

Mã PHP:

PHP
  1. if(($_GET["id"]=="topic")&&($_GET["read"]!="1")&&(isset($_GET["page"]))){
  2. echo '<style type="text/css">body{display:none!important}</style><meta http-equiv="refresh" content="0;url=/forums.php?id=topic&f='.$_GET["f"].'&t='.$_GET["t"].'&read=1&page='.$_GET["page"].'"/>';
  3. }else if(($_GET["id"]=="topic")&&($_GET["read"]!="1")&&(!isset($_GET["page"]))){
  4. echo '<style type="text/css">body{display:none!important}</style><meta http-equiv="refresh" content="0;url=/forums.php?id=topic&f='.$_GET["f"].'&t='.$_GET["t"].'&read=1"/>';
  5. };

hoặc Mã TWIG:

TWIG
  1. {%if api.r.get('id')=='topic' and api.r.get('read')!='1' and api.r.get('page')%}
  2. <style type="text/css">body{display:none!important}</style>
  3. <meta http-equiv="refresh" content="0;url=/forums.php?id=topic&f={{api.r.get('f')}}&t={{api.r.get('t')}}&read=1&page={{api.r.get('page')}}"/>
  4. {%elseif api.r.get('id')=='topic' and api.r.get('read')!='1' and api.r.get('page')==''%}
  5. <style type="text/css">body{display:none!important}</style>
  6. <meta http-equiv="refresh" content="0;url=/forums.php?id=topic&f={{api.r.get('f')}}&t={{api.r.get('t')}}&read=1"/>
  7. {%endif%}

Updated: Thêm code bằng TWIG

Đã chỉnh sửa. hanhphucao (09.07.2016 / 21:50)
09.07.2016 / 21:51
Kelry
Bài đăng: 77
Member
[ĐB] fb.com/groups/wapegovn

đb cái bọn này bị ngáo nhiều lên ngu cmnr =]] đb cái đơn giản đi hoá thành phức tạp

09.07.2016 / 21:54
Kelry
Bài đăng: 77
Member
[ĐB] fb.com/groups/wapegovn

đb vào đây http://wapego.net/cpanel.php?i ... _list đb chỉ thêm đoạn &read=1 là xong =]]

TWIG
  1. <div class="topic"><a href="{{topic_url}}&read=1">{{topic_icon}} {{lock_icon}} {{pin_icon}} {{poll_notice}} {{topic_name}} ({{messages}})</a>
  2. {% if show_author %}
  3. <a href="{{author_profile_url}}">[{{author_nick}}]</a>
  4. {% endif %}
  5. </div>
Đã chỉnh sửa. Kelry (09.07.2016 / 21:56)
09.07.2016 / 21:56
kayer
Bài đăng: 240
Member
Đã đủ 18 dấu + làm người lớn
hanhphucao đã viết

Dán code sau vào đầu hoặc cuối diễn đàn

Mã PHP:

PHP
  1. if(($_GET[&quot;id&quot;]==&quot;topic&quot;)&amp;&amp;($_GET[&quot;read&quot;]!=&quot;1&quot;)&amp;&amp;(isset($_GET[&quot;page&quot;]))){
  2. echo '&lt;style type=&quot;text/css&quot;&gt;body{display:none!important}&lt;/style&gt;&lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;url=/forums.php?id=topic&amp;f='.$_GET[&quot;f&quot;].'&amp;t='.$_GET[&quot;t&quot;].'&amp;read=1&amp;page='.$_GET[&quot;page&quot;].'&quot;/&gt;';
  3. }else if(($_GET[&quot;id&quot;]==&quot;topic&quot;)&amp;&amp;($_GET[&quot;read&quot;]!=&quot;1&quot;)&amp;&amp;(!isset($_GET[&quot;page&quot;]))){
  4. echo '&lt;style type=&quot;text/css&quot;&gt;body{display:none!important}&lt;/style&gt;&lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;url=/forums.php?id=topic&amp;f='.$_GET[&quot;f&quot;].'&amp;t='.$_GET[&quot;t&quot;].'&amp;read=1&quot;/&gt;';
  5. };

hoặc Mã TWIG:

TWIG
  1. {%if api.r.get('id')=='topic' and api.r.get('read')!='1' and api.r.get('page')%}
  2. &lt;style type=&quot;text/css&quot;&gt;body{display:none!important}&lt;/style&gt;
  3. &lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;url=/forums.php?id=topic&amp;f={{api.r.get('f')}}&amp;t={{api.r.get('t')}}&amp;read=1&amp;page={{api.r.get('page')}}&quot;/&gt;
  4. {%elseif api.r.get('id')=='topic' and api.r.get('read')!='1' and api.r.get('page')==''%}
  5. &lt;style type=&quot;text/css&quot;&gt;body{display:none!important}&lt;/style&gt;
  6. &lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;url=/forums.php?id=topic&amp;f={{api.r.get('f')}}&amp;t={{api.r.get('t')}}&amp;read=1&quot;/&gt;
  7. {%endif%}

Updated: Thêm code bằng TWIG

Vào thiết kế > cài đặt bố trí > diễn đàn > danh sách bố cục topic

Tìm biến {{topic_url}} thêm &read=1 sẽ được {{topic_url}}&read=1 và LƯU lại

09.07.2016 / 22:00
hanhphucao
Bài đăng: 2470
Admin
Admin là người tận tâm và luôn hành xử đúng mực.

sor=new rất nể :haiz: