Đăng nhập
Latest topics
» Tôi sẽ đỗ đại học!by nightWalker 9/2/2024, 7:00 pm
» Kỷ niệm xưa của chúng ta
by nightWalker 9/2/2024, 6:49 pm
» Bị lệch khung cần người giúp đỡ
by webhuy28 7/10/2021, 10:34 pm
» [HỎI ĐÁP] Danh sách bạn bè không thể hiển thị
by anhdaodaica1 2/10/2021, 10:04 pm
» [HỎI ĐÁP] Thông tin tài khoản không thể lưu thay đổi
by anhdaodaica1 2/10/2021, 6:05 am
» Phim bố già full
by huy.pc52 24/8/2021, 12:20 am
» Xin code Box HTML cho Forumvi
by Larva 1/7/2021, 12:57 pm
» Hello Anh Em Chinh phục
by HoàngTửNaivip5p 28/5/2021, 5:03 am
» Trang chủ tin tức cập nhật HOT 2016
by kenbi05 1/1/2020, 11:02 pm
» Không Dang9 bài viết = hình ảnh được
by huy.pc52 30/11/2019, 10:52 am
» CHÚC ANH EM NĂM MỚI VUI VẺ TRÀNG ĐẦY HẠNH PHÚC
by sps.kủn 12/2/2019, 1:16 pm
» Skin CNTT-K3 2015 (Full Mod)[✔]
by kenbi05 6/7/2018, 12:30 am
» baivong, handsome,....
by sps.kủn 29/6/2018, 1:54 pm
» [SHARE] SKIN ĐHFM.V7 @PUNBB
by tonyhoaivu 2/5/2018, 2:37 pm
» Share Skin Xanh Dương Cùi Bắp
by tonyhoaivu 28/4/2018, 5:57 pm
» Xin Skin http://v1.hotrofm.net/
by tonyhoaivu 28/4/2018, 5:45 pm
» Xin Skin Rao Vặt
by tonyhoaivu 15/4/2018, 12:07 pm
» Làm Sao Để Xóa Khung Này
by tonyhoaivu 14/4/2018, 7:18 pm
» [Lập nhóm]Lập nhóm fm
by vietkanpy 31/3/2018, 11:53 am
» [Help] về server úp ảnh của phutu [✔]
by baivong 17/3/2018, 10:18 pm
» Đừng khóc cho “tôi – Chinh Phục!”…
by AnHung 27/2/2018, 5:33 pm
» [Share] Skin Diendandaihoc.com [ Punbb ] [✔]
by Lu Mờ 13/2/2018, 7:28 pm
» Mời mấy thím vào groups Forumotion Việt Nam.
by dang02315 13/2/2018, 12:40 am
» Có thể làm các kiểu giao diện được không?
by Lu Mờ 9/2/2018, 3:40 pm
» ltns chinhphuc.info
by Shinichi Kudo 27/1/2018, 2:27 am
Top posting users this week
No user |
Resize y chang vbb (không ảnh hưởng tới banner)
+3
Kiến
Hân
KaitouKid
7 posters
Trang 1 trong tổng số 1 trang
Resize y chang vbb (không ảnh hưởng tới banner)
Demo : http://teenproqn.us.to/forum-f24/topic-t212.htm#447
Cho vào Viewtopic nha
Cho vào Viewtopic nha
- Code:
window.onload = function resizeImagesForumotion()
{
if (document.images.length > 0)
{
var maxWidth =768;
var imgHeight;
var imgWidth;
for (var i = 0; i < document.images.length; i++)
{
imgWidth = document.images[i].width;
imgHeight = document.images[i].height;
if (document.images[i].width > maxWidth &&
document.images[i].src !=
"http://i81.servimg.com/u/f81/14/01/69/16/banner14.jpg") {
image = new Image();
image = document.images[i];
newImage = image.cloneNode( true ) ;
newImage.origHeight = image.height;
newImage.origWidth = image.width;
newImage.width = maxWidth ;
imgHeight = imgHeight / (imgWidth/ maxWidth );
newImage.height = imgHeight;
newImage.style.cursor = 'pointer';
if( image.outerHTML )
{
newImage.onclick = "var altHeight;
var altWidth; altHeight = this.height ; altWidth = this.width;
this.width = this.origWidth; this.height = this.origHeight;
this.origWidth = altWidth; this.origHeight = altHeight; ";
} else {
newImage.onclick = function () {
var altHeight;
var altWidth;
altHeight = this.height ;
altWidth = this.width;
this.width = this.origWidth;
this.height = this.origHeight;
this.origWidth = altWidth;
this.origHeight = altHeight;
};
}
if( parentNode = image.parentNode )
{
textMessage = document.createTextNode(' Hình ảnh tại
[url=http://vboy.4rumer.net/]http://teenproqn.us.to[/url] đã được thu nhỏ, click vào để xem với kích thước
thật');
elem = document.createElement("td");
elem.setAttribute( "align", "center");
elem.style.backgroundColor = '#FFFFCC';
elem.style.color = '#000';
elem.style.fontSize = '10pt';
elem.appendChild( textMessage );
elem.appendChild( document.createElement("br"));
elem.appendChild( newImage );
tableRow = document.createElement("tr");
tableRow.appendChild(elem);
TableElem = document.createElement("table");
TableElem.setAttribute( "border", "0");
TableElem.appendChild( tableRow );
frag = document.createElement("div");
frag.appendChild( TableElem );
if( image.outerHTML )
{
image.outerHTML = frag.innerHTML;
} else {
parentNode.replaceChild( TableElem, image );
}
}
} }
}
}
Re: Resize y chang vbb (không ảnh hưởng tới banner)
Mình chơi CF nên ghét cay ghét đắng bọn chó hack, lũ gà chơi ngu cứ viện cớ để hack
Re: Resize y chang vbb (không ảnh hưởng tới banner)
Hình như code này bị thiếu cái thẻ
- Code:
<script>
- Code:
<!-- BEGIN switch_image_resize -->
<script>window.onload = function resizeImagesForumotion()
{
if (document.images.length > 0)
{
var maxWidth =768;
var imgHeight;
var imgWidth;
for (var i = 0; i < document.images.length; i++)
{
imgWidth = document.images[i].width;
imgHeight = document.images[i].height;
if (document.images[i].width > maxWidth &&
document.images[i].src !=
"http://baivong.us.to/users/1911/13/87/62/album/10144610.jpg") {
image = new Image();
image = document.images[i];
newImage = image.cloneNode( true ) ;
newImage.origHeight = image.height;
newImage.origWidth = image.width;
newImage.width = maxWidth ;
imgHeight = imgHeight / (imgWidth/ maxWidth );
newImage.height = imgHeight;
newImage.style.cursor = 'pointer';
if( image.outerHTML )
{
newImage.onclick = "var altHeight;
var altWidth; altHeight = this.height ; altWidth = this.width;
this.width = this.origWidth; this.height = this.origHeight;
this.origWidth = altWidth; this.origHeight = altHeight; ";
} else {
newImage.onclick = function () {
var altHeight;
var altWidth;
altHeight = this.height ;
altWidth = this.width;
this.width = this.origWidth;
this.height = this.origHeight;
this.origWidth = altWidth;
this.origHeight = altHeight;
};
}
if( parentNode = image.parentNode )
{
textMessage = document.createTextNode(' Hình ảnh tại
[url=http://baivong.us.to/]http://baivong.us.to[/url] đã được thu nhỏ, click vào để xem với kích thước
thật');
elem = document.createElement("td");
elem.setAttribute( "align", "center");
elem.style.backgroundColor = '#FFFFCC';
elem.style.color = '#000';
elem.style.fontSize = '10pt';
elem.appendChild( textMessage );
elem.appendChild( document.createElement("br"));
elem.appendChild( newImage );
tableRow = document.createElement("tr");
tableRow.appendChild(elem);
TableElem = document.createElement("table");
TableElem.setAttribute( "border", "0");
TableElem.appendChild( tableRow );
frag = document.createElement("div");
frag.appendChild( TableElem );
if( image.outerHTML )
{
image.outerHTML = frag.innerHTML;
} else {
parentNode.replaceChild( TableElem, image );
}
}
} }
}
} </script>
<!-- END switch_image_resize -->
Re: Resize y chang vbb (không ảnh hưởng tới banner)
battuvuong đã viết:Mình chơi CF nên ghét cay ghét đắng bọn chó hack, lũ gà chơi ngu cứ viện cớ để hack
Chú ấy lạc qua đây
Chú phải bình luận cái chỗ này nè HTML Trang sự kiện Đột Kích
Lạc lối
Re: Resize y chang vbb (không ảnh hưởng tới banner)
Ủa, rê chuột vô nó bựa ảnh lên là do code này đó hả?
Mình cho rằng là do cái CSS cơ:
Mình cho rằng là do cái CSS cơ:
- Code:
/*post body image-------------------------------------------------------------------*/
.postbody img{max-width:600px;}
.postbody img:hover{
max-width:1200px;
overflow:auto;
}
.postbody img:before { content: ".";
display: block;
height: 30px;
width: auto; background: #FFFFCC url(http://i292.photobucket.com/albums/mm30/huylordno1/resizeimg.jpg) top left no-repeat;}
Re: Resize y chang vbb (không ảnh hưởng tới banner)
mình đã thử bỏ cái css rồi resize ảnh vẫn hoạt động to nhỏ như thường mà
Similar topics
» [mẹo vặt] Sử dụng code Resize ảnh mà ko làm resize banner
» [Thắc mắc] Code Posting body y chang Vbb của cuoi.ace.st
» Code flash gì gì đó, dành cho người không có banner!! (banner 1 màu)
» [Banner] Chia sẻ banner bookstore
» Tự động resize ảnh lớn
» [Thắc mắc] Code Posting body y chang Vbb của cuoi.ace.st
» Code flash gì gì đó, dành cho người không có banner!! (banner 1 màu)
» [Banner] Chia sẻ banner bookstore
» Tự động resize ảnh lớn
Trang 1 trong tổng số 1 trang
Permissions in this forum:
Bạn không có quyền trả lời bài viết
|
|