XtGem Forum catalog
logo

Chatbox|Admin nhận làm wap/web, giá cả thương lượng... Thông tin admin tại mỗi bài viết.
Home · Bang hội ·
* Đăng Nhập hoặc Đăng Kí
để sử dụng hết chức năng của diễn đàn.
Hi, Khách!
HomeBang hội » Wapmaster » All shared script » [WAPKA] Perfect Thumbnail V1 - Lấy ảnh đầu tiên trong bài viết
Xuống dưới » [WAPKA] Perfect Thumbnail V1 - Lấy ảnh đầu tiên trong bài viết
avatar by Pham_loi Pham_loi
Chức vụ:
05:30:32, 16-08-2016

Hello everybody, Thumbnail will be make your site look more beautiful. Over many versions, but all version before are not good for SEO, so difficult and unstable. Now, I will share you Perfect Thumbnail V1 - Get first IMG from article in topic.

DEMO: http://forumvn.biz

NOTE:
- Working fine in devices which are support HTML5
- Make sure have jQuery

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
Copy code



Step.1: Change your Box1 TIF Exload
Make sure name="fix" arround ::theme:: and have a name="themethumb"
Example:
<div name="fix"><div name="themethumb"></div>::theme::</div>
Copy code



Step.2: Change your Box1 MIF
Make sure class="eachmsg" arround ::msg::
Example:
<div name="dpro" class="eachmsg">::msg::</div>
Copy code


Step.3: Post this code below Exloader topic in Home
<div id="load1" style="display:none"></div>
<script language="javascript">
function gload(u,i){
 $('#load1').load(u+' body',function(data){
  data=$(data).find('.eachmsg').first().html();
  data=data.split('[img')[1.split('[/img')[0;
  $('div[name=themethumb:eq('+i+')').html('<img src="'+data+'" width="70px" height="70px"/>');
  })
}
dem = document.getElementsByName('fix').length;
for(i=0;i<dem;i++){
 a = $('div[name=fix:eq('+i+')').find('a').attr('href');
 gload(a,i);
}
</script>

Copy code


So. That is all. I hope you success. For more question, please comment here!

Read more: Share: Perfect Thumbnail V1 - Get first IMG from article - Guides

WapkaInternational.Com

Like: 0
Lên trên  Tổng số: 1







Trực Tuyến: Khách: 1
Diễn đàn teen Việt Nam
CopyRight 2014