Đăng nhập
Latest topics
» Tôi sẽ đỗ đại học!by NgocPRO 6/11/2024, 8:37 am
» 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 |
[Solved]View Topic Body mình không resize được ảnh [ lạ ]
3 posters
Trang 1 trong tổng số 1 trang
[Solved]View Topic Body mình không resize được ảnh [ lạ ]
code nó đây
Đã chỉnh resize và trong code đã có nhưng không thể resize dc.ảnh cứ max size hoài.
Mình lấy code view khác vào thì lại dc.chẳng hiểu sao.rõ ràng còn lấy đoạn resize image trong code dùng được thay cho cái không dùng được mà cũng không được
ai bắt lỗi dùm với
THANK THANK
DEMO :
- Code:
<script type="text/javascript">
//<![CDATA[
var multiquote_img_off = '{JS_MULTIQUOTE_IMG_OFF}';
var multiquote_img_on = '{JS_MULTIQUOTE_IMG_ON}';
//]]>
</script>
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td align="left" valign="middle" nowrap="nowrap">
<span class="nav">
<!-- BEGIN switch_user_authpost -->
<a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" id="{POST_IMG_ID}one" alt="{L_POST_NEW_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authpost -->
<!-- BEGIN switch_user_authreply -->
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" id="i_reply" alt="{L_POST_REPLY_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authreply -->
</span>
</td>
<td align="left" valign="middle" nowrap="nowrap">
<!-- BEGIN switch_twitter_btn -->
<span id="twitter_btn" style="margin-left: 6px; ">
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</span>
<!-- END switch_twitter_btn -->
<!-- BEGIN switch_fb_likebtn -->
<span id="fb_likebtn" style="margin-left: 6px; ">
<iframe src="http://www.facebook.com/plugins/like.php?href={FORUM_URL}{TOPIC_URL}&layout=button_count&show_faces=false&width=100&action=like&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
</span>
<!-- END switch_fb_likebtn -->
</td>
<td class="nav" valign="middle" width="100%"><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_SEP}<a class="nav" href="{U_ALBUM}">{L_ALBUM}</a>{NAV_CAT_DESC_SECOND}</span></td>
<td align="right" valign="bottom" nowrap="nowrap" width="100%">
<span class="gensmall bold">
<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&pub=forumotion">{L_SHARE}</a>
|
<script type="text/javascript">//<![CDATA[
var url_favourite = '{U_FAVOURITE_JS_PLUS_MENU}';
var url_newposts = '{U_NEWPOSTS_JS_PLUS_MENU}';
var url_egosearch = '{U_EGOSEARCH_JS_PLUS_MENU}';
var url_unanswered = '{U_UNANSWERED_JS_PLUS_MENU}';
var url_watchsearch = '{U_WATCHSEARCH_JS_PLUS_MENU}';
var url_tellfriend = '{U_TELLFRIEND_JS_PLUS_MENU}';
insert_plus_menu('f{FORUM_ID}&t={TOPIC_ID}','{JS_SESSION_ID}', {JS_AUTH_FAVOURITES});
//]]>
</script>
</span>
</td>
</tr>
</table>
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr align="right">
<td class="catHead" colspan="3" height="28">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="9%" class="noprint"> </td>
<td align="center" class="t-title">
<h1 class="cattitle"> {TOPIC_TITLE}</h1>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="alt1" colspan="2" align="right" valign="top"><span class="smallfont">{PAGINATION}</span></td>
</tr>
{POLL_DISPLAY}
<!-- BEGIN postrow -->
<!-- BEGIN displayed -->
<table class="tborder" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><td class="thead" height="20" colspan="3"><span class="smallfont"> <img src="{postrow.displayed.MINI_TIME_IMG}"
alt="" border="0" />{postrow.displayed.POST_DATE}</span></td></tr>
<tr class="post">
<td class="alt2" valign="top" width="200" colspan="3">
<table cellpadding="0" cellspacing="6" border="0" width="100%">
<tr>
<td class="alt2">
<table width="197" border="0" cellspacing="0" cellpadding="0" align="center" style="margin-top:0px;">
<tr><td width="36" height="25" background="http://i34.servimg.com/u/f34/14/04/26/89/chuan_10.gif"></td><td width="143" height="25" background="http://i34.servimg.com/u/f34/14/04/26/89/chuan_11.gif"></td><td width="18" height="25" background="http://i34.servimg.com/u/f34/14/04/26/89/chuan_12.gif"></td></tr><tr><td width="36" height="42" background="http://i34.servimg.com/u/f34/14/04/26/89/chuan_13.gif"></td><td width="143" height="42" style="background:url(http://i34.servimg.com/u/f34/14/04/26/89/status10.gif)" align="center" class="smallfont"><em id="vbstatus_11698847" style="color:red">{postrow.displayed.POSTER_HUMOR}
</em></td><td width="18" height="40" background="http://i34.servimg.com/u/f34/14/04/26/89/chuan_14.gif"></td></tr><tr><td width="36" height="40" background="http://i34.servimg.com/u/f34/14/04/26/89/chuan_15.gif"></td><td width="143" height="40" background="http://i34.servimg.com/u/f34/14/04/26/89/chuan_16.gif"></td><td width="18" height="40" background="http://i34.servimg.com/u/f34/14/04/26/89/chuan_17.gif"></td></tr></table>
<table cellSpacing="0" cellPadding="0" border="0" style="width:auto">
<td>
<img src="http://www.fileden.com/files/2009/2/13/2319435/bgavatar_01.png" width="13" height="6" alt=""></td>
<td background="http://www.fileden.com/files/2009/2/13/2319435/bgavatar_02.png" width="150" height="6">
<img src="http://www.fileden.com/files/2009/2/13/2319435/bgavatar_02_news.png" width="4" height="6" alt=""></td>
<td>
<img src="http://www.fileden.com/files/2009/2/13/2319435/bgavatar_03.png" width="6" height="6" alt=""></td>
</tr>
<tr>
<td background="http://www.fileden.com/files/2009/2/13/2319435/bgavatar_04.png" width="13" height="0">
<img src="http://www.fileden.com/files/2009/2/13/2319435/bgavatar_04_new.png" width="13" height="8" alt=""></td>
<td>
{postrow.displayed.POSTER_AVATAR}</td>
<td background="http://www.fileden.com/files/2009/2/13/2319435/bgavatar_06.png" width="6" height="0">
<img src="http://www.fileden.com/files/2009/2/13/2319435/bgavatar_06_news.png" width="6" height="1" alt=""></td>
<img src="http://www.fileden.com/files/2009/2/13/2319435/bgavatar_06.png" width="6" height="1" alt=""></td>
</tr>
<tr>
<td>
<img src="http://www.fileden.com/files/2009/2/13/2319435/bgavatar_07.png" width="13" height="6" alt=""></td>
<td background="http://www.fileden.com/files/2009/2/13/2319435/bgavatar_08.png" width="150" height="6">
<img src="http://www.fileden.com/files/2009/2/13/2319435/bgavatar_08_news.png" width="1" height="6" alt=""></td>
<td>
<img src="http://www.fileden.com/files/2009/2/13/2319435/bgavatar_09.png" width="6" height="6" alt=""></td>
</table>
</td>
<td align="left" width="55%">
<a name="{postrow.displayed.U_POST_ID}"></a><strong><font color=green>Lover</font> - {postrow.displayed.POSTER_NAME}</strong>
<span class="smallfont">
<br>
{postrow.displayed.RANK_IMAGE}
</span>
<table cellspacing="0"
cellpadding="0"><tr><td
class="onlinetest">{postrow.displayed.ONLINE_IMG}</td></tr></table>
</td>
<td align="left" width="30%">
<!-- sig -->
<div>
<fieldset><legend><left><img src="http://sinhvienit.net/@forum/images/galaga/s_yellow.gif" border="0"> Level: {postrow.displayed.POSTER_POSTS}</legend> </left>
<span style='font-size:7pt; color:gray'><img src="http://aladinbandenbin.me.megaweb.vn/download/MTMwMzU0ODU1MS4ysword-icon.png" border="0">Công kích: {postrow.displayed.POSTER_POSTS}%</span><br/><div style='width:120px;align:center'>
<table cellspacing='0' cellpadding='0' width='120' border='0'>
<tr>
<td width='3' height='13' class='nopad'><img width='3' height='13' src='http://narfam.net/forum/styles/Narfam1/misc/level/img_left.gif' alt='' /></td>
<td width='114' height='13' class='nopad' style='line-height: 13px;background: url(http://narfam.net/forum/styles/Narfam1/misc/level/img_backing.gif) repeat-x top left;'><img src='http://sinhvienit.net/@forum/images/rpg/exp.gif' width='"{postrow.displayed.POSTER_POSTS} - "%' height='9' alt='' /></td>
<td width='3' height='13' class='nopad'><img width='3' height='13' src='http://narfam.net/forum/styles/Narfam1/misc/level/img_right.gif' alt='' /></td>
</tr>
</table>
</div>
<span style='font-size:7pt; color:gray'><img src="http://aladinbandenbin.me.megaweb.vn/download/MTMwMzU0ODUyMC43Armor-icon.png" border="0">Sinh mệnh: {postrow.displayed.POSTER_POSTS}/100</span><br/><div style='width:120px;align:center'>
<table cellspacing='0' cellpadding='0' width='120' border='0'>
<tr>
<td width='3' height='13' class='nopad'><img width='3' height='13' src='http://narfam.net/forum/styles/Narfam1/misc/level/img_left.gif' alt='' /></td>
<td width='114' height='13' class='nopad' style='line-height: 13px;background: url(http://narfam.net/forum/styles/Narfam1/misc/level/img_backing.gif) repeat-x top left;'><img src='http://sinhvienit.net/@forum/images/rpg/hp.gif' width='"{postrow.displayed.POSTER_POSTS}"%' height='9' alt='' /></td>
<td width='3' height='13' class='nopad'><img width='3' height='13' src='http://narfam.net/forum/styles/Narfam1/misc/level/img_right.gif' alt='' /></td>
</tr>
</table>
</div>
<span style='font-size:7pt; color:gray'><img src="http://aladinbandenbin.me.megaweb.vn/download/MTMwMzU0ODUzMi45Shield-Security-icon.png" border="0">Sức thủ: {postrow.displayed.POSTER_AGE}/100<div style='width:120px;align:center'>
<table cellspacing='0' cellpadding='0' width='120' border='0'>
<tr>
<td width='3' height='13' class='nopad'><img width='3' height='13' src='http://narfam.net/forum/styles/Narfam1/misc/level/img_left.gif' alt='' /></td>
<td width='114' height='13' class='nopad' style='line-height: 13px;background: url(http://narfam.net/forum/styles/Narfam1/misc/level/img_backing.gif) repeat-x top left;'><img src='http://sinhvienit.net/@forum/images/rpg/green.gif' width="{postrow.displayed.POSTER_AGE}%" height='9' alt='' /><img src='http://narfam.net/forum/styles/Narfam1/misc/level/mp.gif' height='9' alt='' /></td>
<td width='3' height='13' class='nopad'><img width='3' height='13' src='http://narfam.net/forum/styles/Narfam1/misc/level/img_right.gif' alt='' /></td>
</tr>
</table>
</div>
</fieldset></div>
<!-- / sig -->
</td>
<td align="left" width="30%"><span class="smallfont">
<!-- BEGIN profile_field -->
<div style="padding: 2px;">
<div style="padding: 3px; border: 1px #0900FF dashed;">
{postrow.displayed.profile_field.LABEL}
{postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
</div>
</div>
<!-- END profile_field -->
{postrow.displayed.POSTER_RPG}
</b>
</span>
<img src="http://www.fileden.com/files/2009/2/13/2319435/vide.gif" alt="" style="width: 200px; height: 1px;" /></td>
</tr></table>
</td>
</tr>
<td height="27" width=100% background="http://www.fileden.com/files/2009/2/13/2319435/p310.gif" colspan=3>
</td>
<tr>
<td class="alt1" valign="top" width="100%" height="28" colspan="3">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="smallfont"><img src="{postrow.displayed.MINI_POST_IMG}" alt="{postrow.displayed.L_MINI_POST_ALT}"
title="{postrow.displayed.L_MINI_POST_ALT}" border="0" />{L_POST_SUBJECT}: {postrow.displayed.POST_SUBJECT}</span></td>
<td align="right" valign="top" nowrap="nowrap" class="post-options">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle" nowrap="nowrap">
<!--start post cảm ơn you hack-->
<!-- BEGIN switch_vote_active -->
<div class="vote gensmall">
<!-- BEGIN switch_vote -->
<div class="vote-button"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}" target="thanks" onclick="exec_refresh();"><img src="http://www.fileden.com/files/2009/2/13/2319435/post_thanks_you_hack.gif" id="Thanks button" border="0" alt="Cảm ơn người này" vspace="1" /></a>
</a>
</div>
<!-- END switch_vote -->
</div>
<!-- END switch_vote_active -->
<!-- BEGIN switch_vote_active -->
<div class="vote gensmall">
<!-- BEGIN switch_vote -->
<div class="vote-button">
<a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}"></a></div>
<!-- END switch_vote -->
</div>
<!-- END switch_vote_active -->
<!--end post cảm ơn you hack-->
{postrow.displayed.PROFILE_IMG} {postrow.displayed.PM_IMG} {postrow.displayed.EMAIL_IMG} {postrow.displayed.WWW_IMG}
{postrow.displayed.AIM_IMG} {postrow.displayed.YIM_IMG} {postrow.displayed.MSN_IMG} {postrow.displayed.SKYPE_IMG}
<script type="text/javascript"><!--
if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 &amp;&amp; navigator.userAgent.indexOf('5.') == -1 &amp;&amp;
navigator.userAgent.indexOf('6.') == -1 ) {
document.write('{postrow.displayed.ICQ_IMG}');
} else {
document.write('</td><td> </td><td valign="top" nowrap="nowrap"><div style="position:relative"><div
style="position:absolute">{postrow.displayed.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">{postrow.displayed.ICQ_STATUS_IMG}</div></div>');
}
//-->
</script>
<noscript>{postrow.displayed.ICQ_IMG}</noscript>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="hr">
<hr />
</td>
</tr>
<tr>
<td colspan="2"><!-- google_ad_section_start --><tr>
<td colspan="2">
<!-- google_ad_section_start -->
<table cellSpacing="0" cellPadding="0" border="0" style="width:auto">
<tr>
<td style="padding: 0px"><img src="http://www.fileden.com/files/2009/2/13/2319435/admin_10.gif"></td>
<td style="padding: 0px" background="http://www.fileden.com/files/2009/2/13/2319435/admin_11.gif"></td>
<td style="padding: 0px"><img src="http://www.fileden.com/files/2009/2/13/2319435/admin_12.gif"></td>
</tr>
<tr>
<td valign="top" style="padding: 0px" background="http://www.fileden.com/files/2009/2/13/2319435/admin_13.gif">
<img src="http://www.fileden.com/files/2009/2/13/2319435/admin_14.gif"></td>
<td style="padding: 0px; background-color: #ffffff" bgColor="#ffffff">
<!-- google_ad_section_start -->
<center><font color=red><b>Tiêu Đề:</font><blink> {TOPIC_TITLE}</blink></b></br><br>--------------------------------------------------<br></center>
{postrow.displayed.MESSAGE}<!-- google_ad_section_end -->
</td>
<td style="padding: 0px" background="http://www.fileden.com/files/2009/2/13/2319435/admin_15.gif"></td>
</tr>
<tr>
<td style="padding: 0px"><img src="http://www.fileden.com/files/2009/2/13/2319435/admin_16.gif"></td>
<td style="padding: 0px" background="http://www.fileden.com/files/2009/2/13/2319435/admin_17.gif"></td>
<td style="padding: 0px"><img src="http://www.fileden.com/files/2009/2/13/2319435/admin_18.gif"></td>
</tr>
</table>
<p align="center">
<!-- google_ad_section_end -->
<!-- BEGIN switch_signature -->
<div class="sig-content">
<div><div style="margin: auto;width: 100%;"><div style="margin: auto;width: 100%;"><fieldset style="border: 1px dashed #309100;width: 95%;"><legend class="signtop">Chữ kí của {postrow.displayed.POSTER_NAME}</legend><div style="overflow: auto; max-height: 150px;"><center>{postrow.displayed.SIGNATURE_NEW}</center></div></fieldset></fieldset><br></div></div><br></div></div></fieldset><span class="gensmall"></span>
</div>
<!-- END switch_signature --><br>
<!-- BEGIN switch_vote_active --><!-- BEGIN switch_bar -->
<span class="smallfont">{postrow.displayed.POSTER_NAME} được cảm ơn {postrow.displayed.switch_vote_active.L_VOTE_TITLE} trong bài này</span>
<!-- END switch_bar --> <!-- END switch_vote_active --></font><br/>
<center>
<!-- Code Blog poster -->
<div align="center">
<center>
<table>
<tr>
<td class="alt1" colspan="2" align="right" valign="top"><span class="smallfont">
<p align="center"><span class="gensmall">
<img src="http://i94.photobucket.com/albums/l94/trainamdinh9x/newnew.gif"><blink><font color="#FF0000"><b>Copy đường link dưới đây gửi đến nick yahoo bạn bè!</b></font></blink><img src="http://i94.photobucket.com/albums/l94/trainamdinh9x/newnew.gif"><br>
<img src="http://www.megapic.vn/images/52367384587995676642.gif">
<span class="cattitle"><textarea style="border: 1px dashed rgb(102, 102, 102); width: 80%; height: 30" rows="2" name="embedhtml" cols="100" readonly="readonly" onclick="this.select()" id="embedhtml">:-O :-O {TOPIC_TITLE}--- http://love4all.hot4um.com{TOPIC_URL} Hot Hot! xem ngay kẻo nguội. Bấm vào link nhé. Nhớ gửi cho các bạn khác xem nữa nhé. Trang 9/7 nhiều cái hay quá à!!!
</textarea></textarea></span></span></td>
</tr>
</table>
</center>
</div>
<!-- / Code Blog poster -->
</center>
<br/>
<span class="gensmall">{postrow.displayed.EDITED_MESSAGE}</span>
</td>
</tr></p>
</table>
<div align="right" width="100%">{postrow.displayed.THANK_IMG}
{postrow.displayed.MULTIQUOTE_IMG} {postrow.displayed.QUOTE_IMG} {postrow.displayed.EDIT_IMG} {postrow.displayed.DELETE_IMG} {postrow.displayed.IP_IMG} {postrow.displayed.REPORT_IMG}</div>
</td>
</tr>
</table>
<!-- END displayed -->
<!-- BEGIN hidden -->
<table class="tborder" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="postdetails {postrow.hidden.ROW_CLASS}" colspan="2" align="center">{postrow.hidden.MESSAGE}</td>
</tr></table>
<!-- END hidden -->
<!-- END postrow -->
<!-- BEGIN no_post -->
<table class="tborder" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr align="center">
<td class="alt1" colspan="2" height="28">
<span class="smallfont">{no_post.L_NO_POST}</span>
</td>
</tr></table>
<!-- END no_post -->
<tr align="right">
<td class="catBottom" colspan="3" height="28">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="9%" class="noprint"> </td>
<td align="center" class="t-title"><a name="bottomtitle"></a><h1 class="cattitle">{TOPIC_TITLE}</h1></td>
<td align="right" nowrap="nowrap" width="9%" class="browse-arrows"><a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a> <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a> <a href="#top">{L_BACK_TO_TOP}</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<!-- BEGIN promot_trafic -->
<table class="forumline" width="100%" border="0" cellpadding="1" cellspacing="0" id="ptrafic_close" style="display:none;margin: 1px 0px 1px 0px">
<tr>
<td class="catBottom" height="28">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><h1 class="cattitle"> {PROMOT_TRAFIC_TITLE}</h1></td>
<td align="right" valign="middle" width="10"><span class="gensmall"><a href="javascript:ShowHideLayer('ptrafic_open','ptrafic_close');"><img src="{TABS_MORE_IMG}" alt="+" align="middle" border="0" /></a></span></td>
</tr>
</table>
</td>
</tr>
</table>
<table class="forumline" width="100%" border="0" cellpadding="1" cellspacing="0" id="ptrafic_open" style="display:'';margin: 1px 0px 1px 0px">
<tr>
<td class="catBottom" height="28">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><h1 class="cattitle"> {PROMOT_TRAFIC_TITLE}</h1></td>
<td align="right" valign="middle" width="10"><span class="gensmall"><a href="javascript:ShowHideLayer('ptrafic_open','ptrafic_close');"><img src="{TABS_LESS_IMG}" alt="-" align="middle" border="0" /></a></span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="row2 postbody" valign="top">
<!-- BEGIN link -->
» <a style="text-decoration:none" href="{promot_trafic.link.U_HREF}" target="_blank" title="{promot_trafic.link.TITLE}">{promot_trafic.link.TITLE}</a>
<!-- END link -->
</td>
</tr>
</table>
<!-- END promot_trafic -->
<table class="forumline noprint" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="row2" valign="top" {COLSPAN_PAGINATION} width="150"><span class="gensmall">{PAGE_NUMBER}</span></td>
<!-- BEGIN topicpagination -->
<td class="row1" align="right" valign="top" ><span class="gensmall">{PAGINATION}</span></td>
<!-- END topicpagination -->
</tr>
<!-- BEGIN switch_user_logged_in -->
<!-- BEGIN watchtopic -->
<tr>
<td class="row2" colspan="2" align="right" valign="top"><span class="gensmall">{S_WATCH_TOPIC}</span></td>
</tr>
<!-- END watchtopic -->
<!-- END switch_user_logged_in -->
<tr>
<td class="row2" colspan="2" align="center" style="padding:0px">
<!-- BEGIN switch_user_logged_in -->
<font size="2" face="tahoma" color="green"><center>* Viết tiếng Việt có dấu, là tôn trọng người đọc.
* Chia sẻ bài sưu tầm có ghi rõ nguồn, là tôn trọng người viết.
* Thực hiện những điều trên, là tôn trọng chính mình.</font></center>
<font size="2" face="tahoma" color="red"><b>-Nếu chèn smilies có vấn đề thì bấm A/a trên phải khung viết bài</font>
<a name="quickreply"></a><br>
<center>{QUICK_REPLY_FORM}</center>
<!-- END switch_user_logged_in -->
</td>
</tr>
<tr>
<td style="margin:0; padding: 0;" colspan="2">
<table border="0" cellpadding="0" width="100%" cellspacing="0" id="info_open" style="display:''">
<tbody>
<!-- BEGIN show_permissions -->
<tr>
<td class="alt2" valign="top" width="25%"><span class="smallfont">{L_TABS_PERMISSIONS}</span></td>
<td class="alt1" valign="top" width="75%"><span class="smallfont">{S_AUTH_LIST}</span></td>
</tr>
<!-- END show_permissions -->
<tr>
<td class="tfoot" colspan="2" height="28">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle" width="100%"><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_SEP}<a
class="nav" href="{U_ALBUM}">{L_ALBUM}</a>{NAV_CAT_DESC_SECOND}</span></td>
<!-- BEGIN show_permissions -->
<td align="right" valign="middle"><span class="smallfont"><a
href="javascript:ShowHideLayer('info_open','info_close');"><img src="{TABS_LESS_IMG}" alt="-" align="middle" border="0" /></a></span></td>
<!-- END show_permissions -->
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="margin:0; padding: 0;" colspan="2">
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="info_close" style="display:none;">
<tbody>
<tr>
<td class="tfoot" colspan="2" height="28">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle" width="100%"><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_SEP}<a
class="nav" href="{U_ALBUM}">{L_ALBUM}</a>{NAV_CAT_DESC_SECOND}</span></td>
<td align="right" valign="middle"><span class="smallfont"><a
href="javascript:ShowHideLayer('info_open','info_close');"><img src="{TABS_MORE_IMG}" alt="+" align="middle" border="0" /></a></span></td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
<form action="{S_JUMPBOX_ACTION}" method="get" name="jumpbox" onsubmit="if(document.jumpbox.f.value == -1){return false;}">
<table class="noprint" width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td align="left" valign="middle" nowrap="nowrap" {WIDTH_GALLERY}>
<span class="nav">
<!-- BEGIN switch_user_authpost -->
<a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" id="{POST_IMG_ID}Newtopic" alt="{L_POST_NEW_TOPIC}"
align="middle" border="0" /></a>
<!-- END switch_user_authpost -->
<!-- BEGIN switch_user_authreply -->
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" alt="{L_POST_REPLY_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authreply -->
</span>
</td>
<!-- BEGIN viewtopic_bottom -->
<td align="right" nowrap="nowrap"><span class="smallfont">{L_JUMP_TO}: {S_JUMPBOX_SELECT} <input class="liteoption" type="submit"
value="{L_GO}" /></span></td>
<!-- END viewtopic_bottom -->
<!-- BEGIN moderation_panel -->
<td align="center">
<span class="smallfont">{moderation_panel.U_YOUR_PERSONAL_MODERATE}</span>
</td>
<td align="center" width="250">
<span class="smallfont"> </span>
</td>
<!-- END moderation_panel -->
</tr>
</table>
</form>
<!-- BEGIN viewtopic_bottom -->
<table class="noprint" width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td colspan="2" align="left" valign="top" nowrap="nowrap">
{S_TOPIC_ADMIN}
<form name="action" method="get" action="{S_FORM_MOD_ACTION}">
<input type="hidden" name="t" value="{TOPIC_ID}" />
<input type="hidden" name="sid" value="{S_SID}" />
<span class="gen">{L_MOD_TOOLS}
{S_SELECT_MOD} <input class="liteoption" type="submit" value="{L_GO}" /></span>
</form>
</td>
</tr>
</table>
<!-- END viewtopic_bottom -->
<!-- BEGIN switch_image_resize -->
<script type="text/javascript">
//<![CDATA[
$(resize_images({ 'selector' : '.postbody', 'max_width' : {switch_image_resize.IMG_RESIZE_WIDTH}, 'max_height' : {switch_image_resize.IMG_RESIZE_HEIGHT} }));
//]]>
</script>
<!-- END switch_image_resize -->
<script type="text/javascript">
<!--
function exec_refresh()
{
myvar = myvar + ' .';
var timerID = setTimeout('exec_refresh();', 20);
if (timeout > 0)
{
timeout -= 1;
}
else
{
clearTimeout(timerID);
window.status = '';
window.location.reload();
}
}
var myvar = '';
var timeout = 50;
//-->
</script>
<iframe name="thanks" height="0" width="0" frameborder="0"></iframe>
Đã chỉnh resize và trong code đã có nhưng không thể resize dc.ảnh cứ max size hoài.
Mình lấy code view khác vào thì lại dc.chẳng hiểu sao.rõ ràng còn lấy đoạn resize image trong code dùng được thay cho cái không dùng được mà cũng không được
ai bắt lỗi dùm với
THANK THANK
DEMO :
- Code:
http://love4all.hot4um.com/t32-topic#37
Re: [Solved]View Topic Body mình không resize được ảnh [ lạ ]
ai giúp mình cái code trên kia với.mà resize bằng color box thế nào.cho mình xin cái link với
Hic
Hic
Re: [Solved]View Topic Body mình không resize được ảnh [ lạ ]
overall_header, chèn dưới:
- Code:
<script src="{JQUERY_PATH}" type="text/javascript"></script>
- Code:
<script type="text/javascript" src="http://9977.forumvi.com/h21-page"></script>
- Code:
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index: 999; overflow:hidden;}
#cboxOverlay{position:fixed; width:100%; height:100%;}
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
#cboxContent{position:relative;}
#cboxLoadedContent{overflow:auto;}
#cboxTitle{margin:0;}
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
.cboxPhoto{float:left; margin:auto; border:0; display:block;}
.cboxIframe{width:100%; height:100%; display:block; border:0;}
#cboxTopLeft{width:14px; height:14px; background:url(http://cC5.upanh.com/24.289.31393594.X450/controls.png) no-repeat 0 0;}
#cboxTopCenter{height:14px; background:url(http://cC4.upanh.com/24.289.31393593.1Ew0/border.png) repeat-x top left;}
#cboxTopRight{width:14px; height:14px; background:url(http://cC5.upanh.com/24.289.31393594.X450/controls.png) no-repeat -36px 0;}
#cboxBottomLeft{width:14px; height:43px; background:url(http://cC5.upanh.com/24.289.31393594.X450/controls.png) no-repeat 0 -32px;}
#cboxBottomCenter{height:43px; background:url(http://cC4.upanh.com/24.289.31393593.1Ew0/border.png) repeat-x bottom left;}
#cboxBottomRight{width:14px; height:43px; background:url(http://cC5.upanh.com/24.289.31393594.X450/controls.png) no-repeat -36px -32px;}
#cboxMiddleLeft{width:14px; background:url(http://cC5.upanh.com/24.289.31393594.X450/controls.png) repeat-y -175px 0;}
#cboxMiddleRight{width:14px; background:url(http://cC5.upanh.com/24.289.31393594.X450/controls.png) repeat-y -211px 0;}
#cboxContent{background:#fff; overflow:visible;}
#cboxLoadedContent{margin-bottom:5px;}
#cboxLoadingOverlay{background:url(http://cC1.upanh.com/24.289.31393600.KjA0/loadingbackground.png) no-repeat center center;}
#cboxLoadingGraphic{background:url(http://cC9.upanh.com/24.289.31393598.aoo0/loading.gif) no-repeat center center;}
#cboxTitle{position:absolute; bottom:-25px; left:0; text-align:center; width:100%; font-weight:bold; color:#7C7C7C;}
#cboxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;}
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{position:absolute; bottom:-29px; background:url(http://cC5.upanh.com/24.289.31393594.X450/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;}
#cboxPrevious{left:0px; background-position: -51px -25px;}
#cboxPrevious.hover{background-position:-51px 0px;}
#cboxNext{left:27px; background-position:-75px -25px;}
#cboxNext.hover{background-position:-75px 0px;}
#cboxClose{right:0; background-position:-100px -25px;}
#cboxClose.hover{background-position:-100px 0px;}
.cboxSlideshow_on #cboxSlideshow{background-position:-125px 0px; right:27px;}
.cboxSlideshow_on #cboxSlideshow.hover{background-position:-150px 0px;}
.cboxSlideshow_off #cboxSlideshow{background-position:-150px -25px; right:27px;}
.cboxSlideshow_off #cboxSlideshow.hover{background-position:-125px 0px;}
/*post body image-------------------------------------------------------------------*/
.postbody img{max-width:600px;}
Re: [Solved]View Topic Body mình không resize được ảnh [ lạ ]
không được chinsu ơi.
xem đi nè
xem đi nè
- Code:
http://love4all.hot4um.com/t32-topic#37
Re: [Solved]View Topic Body mình không resize được ảnh [ lạ ]
chèn script này chưa, sao view source không thấy:
- Code:
<script type="text/javascript" src="http://9977.forumvi.com/h21-page">
Được sửa bởi batonchinsu ngày 6/7/2011, 10:01 am; sửa lần 1.
Re: [Solved]View Topic Body mình không resize được ảnh [ lạ ]
Haizzz. Chưa cho nó cái tên cái tuổi mà gọi hình ảnh trong nó ra thì gọi làm sao được.
Tìm:
Tìm:
- Code:
{postrow.displayed.MESSAGE}
- Code:
<div class="postbody">{postrow.displayed.MESSAGE}</div>
Re: [Solved]View Topic Body mình không resize được ảnh [ lạ ]
thank thank.mình làm dc rồi.thank 2 bạn lắm nhá.lusm thật pro.chinsu nhiệt tình ghê
Re: [Solved]View Topic Body mình không resize được ảnh [ lạ ]
hihi mình không biết cái bước đó vì còn kém, giờ mới biết, tks tnpu_ilusm nhé
Mà bạn sinhviena1 up lại cái link script colorbox đi mình sửa thành code khác lúc nào không biết đâu
cái link này nè:
Mà bạn sinhviena1 up lại cái link script colorbox đi mình sửa thành code khác lúc nào không biết đâu
cái link này nè:
- Code:
http://9977.forumvi.com/h21-page
- Code:
// ColorBox v1.3.16 - a full featured, light-weight, customizable lightbox based on jQuery 1.3+
// Copyright (c) 2011 Jack Moore - jack@colorpowered.com
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
(function ($, document, window) {
var
// ColorBox Default Settings.
// See http://colorpowered.com/colorbox for details.
defaults = {
transition: "elastic",
speed: 300,
width: false,
initialWidth: "600",
innerWidth: false,
maxWidth: false,
height: false,
initialHeight: "450",
innerHeight: false,
maxHeight: false,
scalePhotos: true,
scrolling: true,
inline: false,
html: false,
iframe: false,
fastIframe: true,
photo: false,
href: false,
title: false,
rel: false,
opacity: 0.9,
preloading: true,
current: "Image {current} of {total}",
previous: "previous",
next: "next",
close: "close",
open: false,
returnFocus: true,
loop: true,
slideshow: false,
slideshowAuto: true,
slideshowSpeed: 2500,
slideshowStart: "start slideshow",
slideshowStop: "stop slideshow",
onOpen: false,
onLoad: false,
onComplete: false,
onCleanup: false,
onClosed: false,
overlayClose: true,
escKey: true,
arrowKey: true
},
// Abstracting the HTML and event identifiers for easy rebranding
colorbox = 'colorbox',
prefix = 'cbox',
// Events
event_open = prefix + '_open',
event_load = prefix + '_load',
event_complete = prefix + '_complete',
event_cleanup = prefix + '_cleanup',
event_closed = prefix + '_closed',
event_purge = prefix + '_purge',
// Special Handling for IE
isIE = $.browser.msie && !$.support.opacity, // feature detection alone gave a false positive on at least one phone browser and on some development versions of Chrome.
isIE6 = isIE && $.browser.version < 7,
event_ie6 = prefix + '_IE6',
// Cached jQuery Object Variables
$overlay,
$box,
$wrap,
$content,
$topBorder,
$leftBorder,
$rightBorder,
$bottomBorder,
$related,
$window,
$loaded,
$loadingBay,
$loadingOverlay,
$title,
$current,
$slideshow,
$next,
$prev,
$close,
$groupControls,
// Variables for cached values or use across multiple functions
settings = {},
interfaceHeight,
interfaceWidth,
loadedHeight,
loadedWidth,
element,
index,
photo,
open,
active,
closing = false,
publicMethod,
boxElement = prefix + 'Element';
// ****************
// HELPER FUNCTIONS
// ****************
// jQuery object generator to reduce code size
function $div(id, cssText) {
var div = document.createElement('div');
if (id) {
div.id = prefix + id;
}
div.style.cssText = cssText || false;
return $(div);
}
// Convert % values to pixels
function setSize(size, dimension) {
dimension = dimension === 'x' ? $window.width() : $window.height();
return (typeof size === 'string') ? Math.round((/%/.test(size) ? (dimension / 100) * parseInt(size, 10) : parseInt(size, 10))) : size;
}
// Checks an href to see if it is a photo.
// There is a force photo option (photo: true) for hrefs that cannot be matched by this regex.
function isImage(url) {
return settings.photo || /\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(url);
}
// Assigns function results to their respective settings. This allows functions to be used as values.
function process(settings) {
for (var i in settings) {
if ($.isFunction(settings[i]) && i.substring(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time.
settings[i] = settings[i].call(element);
}
}
settings.rel = settings.rel || element.rel || 'nofollow';
settings.href = $.trim(settings.href || $(element).attr('href'));
settings.title = settings.title || element.title;
}
function trigger(event, callback) {
if (callback) {
callback.call(element);
}
$.event.trigger(event);
}
// Slideshow functionality
function slideshow() {
var
timeOut,
className = prefix + "Slideshow_",
click = "click." + prefix,
start,
stop,
clear;
if (settings.slideshow && $related[1]) {
start = function () {
$slideshow
.text(settings.slideshowStop)
.unbind(click)
.bind(event_complete, function () {
if (index < $related.length - 1 || settings.loop) {
timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed);
}
})
.bind(event_load, function () {
clearTimeout(timeOut);
})
.one(click + ' ' + event_cleanup, stop);
$box.removeClass(className + "off").addClass(className + "on");
timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed);
};
stop = function () {
clearTimeout(timeOut);
$slideshow
.text(settings.slideshowStart)
.unbind([event_complete, event_load, event_cleanup, click].join(' '))
.one(click, start);
$box.removeClass(className + "on").addClass(className + "off");
};
if (settings.slideshowAuto) {
start();
} else {
stop();
}
}
}
function launch(elem) {
if (!closing) {
element = elem;
process($.extend(settings, $.data(element, colorbox)));
$related = $(element);
index = 0;
if (settings.rel !== 'nofollow') {
$related = $('.' + boxElement).filter(function () {
var relRelated = $.data(this, colorbox).rel || this.rel;
return (relRelated === settings.rel);
});
index = $related.index(element);
// Check direct calls to ColorBox.
if (index === -1) {
$related = $related.add(element);
index = $related.length - 1;
}
}
if (!open) {
open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys.
$box.show();
if (settings.returnFocus) {
try {
element.blur();
$(element).one(event_closed, function () {
try {
this.focus();
} catch (e) {
// do nothing
}
});
} catch (e) {
// do nothing
}
}
// +settings.opacity avoids a problem in IE when using non-zero-prefixed-string-values, like '.5'
$overlay.css({"opacity": +settings.opacity, "cursor": settings.overlayClose ? "pointer" : "auto"}).show();
// Opens inital empty ColorBox prior to content being loaded.
settings.w = setSize(settings.initialWidth, 'x');
settings.h = setSize(settings.initialHeight, 'y');
publicMethod.position(0);
if (isIE6) {
$window.bind('resize.' + event_ie6 + ' scroll.' + event_ie6, function () {
$overlay.css({width: $window.width(), height: $window.height(), top: $window.scrollTop(), left: $window.scrollLeft()});
}).trigger('resize.' + event_ie6);
}
trigger(event_open, settings.onOpen);
$groupControls.add($title).hide();
$close.html(settings.close).show();
}
publicMethod.load(true);
}
}
// ****************
// PUBLIC FUNCTIONS
// Usage format: $.fn.colorbox.close();
// Usage from within an iframe: parent.$.fn.colorbox.close();
// ****************
publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) {
var $this = this, autoOpen;
if (!$this[0] && $this.selector) { // if a selector was given and it didn't match any elements, go ahead and exit.
return $this;
}
options = options || {};
if (callback) {
options.onComplete = callback;
}
if (!$this[0] || $this.selector === undefined) { // detects $.colorbox() and $.fn.colorbox()
$this = $('<a/>');
options.open = true; // assume an immediate open
}
$this.each(function () {
$.data(this, colorbox, $.extend({}, $.data(this, colorbox) || defaults, options));
$(this).addClass(boxElement);
});
autoOpen = options.open;
if ($.isFunction(autoOpen)) {
autoOpen = autoOpen.call($this);
}
if (autoOpen) {
launch($this[0]);
}
return $this;
};
// Initialize ColorBox: store common calculations, preload the interface graphics, append the html.
// This preps colorbox for a speedy open when clicked, and lightens the burdon on the browser by only
// having to run once, instead of each time colorbox is opened.
publicMethod.init = function () {
// Create & Append jQuery Objects
$window = $(window);
$box = $div().attr({id: colorbox, 'class': isIE ? prefix + (isIE6 ? 'IE6' : 'IE') : ''});
$overlay = $div("Overlay", isIE6 ? 'position:absolute' : '').hide();
$wrap = $div("Wrapper");
$content = $div("Content").append(
$loaded = $div("LoadedContent", 'width:0; height:0; overflow:hidden'),
$loadingOverlay = $div("LoadingOverlay").add($div("LoadingGraphic")),
$title = $div("Title"),
$current = $div("Current"),
$next = $div("Next"),
$prev = $div("Previous"),
$slideshow = $div("Slideshow").bind(event_open, slideshow),
$close = $div("Close")
);
$wrap.append( // The 3x3 Grid that makes up ColorBox
$div().append(
$div("TopLeft"),
$topBorder = $div("TopCenter"),
$div("TopRight")
),
$div(false, 'clear:left').append(
$leftBorder = $div("MiddleLeft"),
$content,
$rightBorder = $div("MiddleRight")
),
$div(false, 'clear:left').append(
$div("BottomLeft"),
$bottomBorder = $div("BottomCenter"),
$div("BottomRight")
)
).children().children().css({'float': 'left'});
$loadingBay = $div(false, 'position:absolute; width:9999px; visibility:hidden; display:none');
$('body').prepend($overlay, $box.append($wrap, $loadingBay));
$content.children()
.hover(function () {
$(this).addClass('hover');
}, function () {
$(this).removeClass('hover');
}).addClass('hover');
// Cache values needed for size calculations
interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();//Subtraction needed for IE6
interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width();
loadedHeight = $loaded.outerHeight(true);
loadedWidth = $loaded.outerWidth(true);
// Setting padding to remove the need to do size conversions during the animation step.
$box.css({"padding-bottom": interfaceHeight, "padding-right": interfaceWidth}).hide();
// Setup button events.
$next.click(function () {
publicMethod.next();
});
$prev.click(function () {
publicMethod.prev();
});
$close.click(function () {
publicMethod.close();
});
$groupControls = $next.add($prev).add($current).add($slideshow);
// Adding the 'hover' class allowed the browser to load the hover-state
// background graphics. The class can now can be removed.
$content.children().removeClass('hover');
$('.' + boxElement).live('click', function (e) {
// checks to see if it was a non-left mouse-click and for clicks modified with ctrl, shift, or alt.
if (!((e.button !== 0 && typeof e.button !== 'undefined') || e.ctrlKey || e.shiftKey || e.altKey)) {
e.preventDefault();
launch(this);
}
});
$overlay.click(function () {
if (settings.overlayClose) {
publicMethod.close();
}
});
// Set Navigation Key Bindings
$(document).bind('keydown.' + prefix, function (e) {
var key = e.keyCode;
if (open && settings.escKey && key === 27) {
e.preventDefault();
publicMethod.close();
}
if (open && settings.arrowKey && $related[1]) {
if (key === 37) {
e.preventDefault();
$prev.click();
} else if (key === 39) {
e.preventDefault();
$next.click();
}
}
});
};
publicMethod.remove = function () {
$box.add($overlay).remove();
$('.' + boxElement).die('click').removeData(colorbox).removeClass(boxElement);
};
publicMethod.position = function (speed, loadedCallback) {
var
animate_speed,
// keeps the top and left positions within the browser's viewport.
posTop = Math.max(document.documentElement.clientHeight - settings.h - loadedHeight - interfaceHeight, 0) / 2 + $window.scrollTop(),
posLeft = Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2 + $window.scrollLeft();
// setting the speed to 0 to reduce the delay between same-sized content.
animate_speed = ($box.width() === settings.w + loadedWidth && $box.height() === settings.h + loadedHeight) ? 0 : speed;
// this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly,
// but it has to be shrank down around the size of div#colorbox when it's done. If not,
// it can invoke an obscure IE bug when using iframes.
$wrap[0].style.width = $wrap[0].style.height = "9999px";
function modalDimensions(that) {
// loading overlay height has to be explicitly set for IE6.
$topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = that.style.width;
$loadingOverlay[0].style.height = $loadingOverlay[1].style.height = $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = that.style.height;
}
$box.dequeue().animate({width: settings.w + loadedWidth, height: settings.h + loadedHeight, top: posTop, left: posLeft}, {
duration: animate_speed,
complete: function () {
modalDimensions(this);
active = false;
// shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation.
$wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px";
$wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px";
if (loadedCallback) {
loadedCallback();
}
},
step: function () {
modalDimensions(this);
}
});
};
publicMethod.resize = function (options) {
if (open) {
options = options || {};
if (options.width) {
settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth;
}
if (options.innerWidth) {
settings.w = setSize(options.innerWidth, 'x');
}
$loaded.css({width: settings.w});
if (options.height) {
settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight;
}
if (options.innerHeight) {
settings.h = setSize(options.innerHeight, 'y');
}
if (!options.innerHeight && !options.height) {
var $child = $loaded.wrapInner("<div style='overflow:auto'></div>").children(); // temporary wrapper to get an accurate estimate of just how high the total content should be.
settings.h = $child.height();
$child.replaceWith($child.children()); // ditch the temporary wrapper div used in height calculation
}
$loaded.css({height: settings.h});
publicMethod.position(settings.transition === "none" ? 0 : settings.speed);
}
};
publicMethod.prep = function (object) {
if (!open) {
return;
}
var speed = settings.transition === "none" ? 0 : settings.speed;
$window.unbind('resize.' + prefix);
$loaded.remove();
$loaded = $div('LoadedContent').html(object);
function getWidth() {
settings.w = settings.w || $loaded.width();
settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w;
return settings.w;
}
function getHeight() {
settings.h = settings.h || $loaded.height();
settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h;
return settings.h;
}
$loaded.hide()
.appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations.
.css({width: getWidth(), overflow: settings.scrolling ? 'auto' : 'hidden'})
.css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height.
.prependTo($content);
$loadingBay.hide();
// floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width.
//$(photo).css({'float': 'none', marginLeft: 'auto', marginRight: 'auto'});
$(photo).css({'float': 'none'});
// Hides SELECT elements in IE6 because they would otherwise sit on top of the overlay.
if (isIE6) {
$('select').not($box.find('select')).filter(function () {
return this.style.visibility !== 'hidden';
}).css({'visibility': 'hidden'}).one(event_cleanup, function () {
this.style.visibility = 'inherit';
});
}
function setPosition(s) {
publicMethod.position(s, function () {
var prev, prevSrc, next, nextSrc, total = $related.length, iframe, complete;
if (!open) {
return;
}
complete = function () {
$loadingOverlay.hide();
trigger(event_complete, settings.onComplete);
};
if (isIE) {
//This fadeIn helps the bicubic resampling to kick-in.
if (photo) {
$loaded.fadeIn(100);
}
}
$title.html(settings.title).add($loaded).show();
if (total > 1) { // handle grouping
if (typeof settings.current === "string") {
$current.html(settings.current.replace(/\{current\}/, index + 1).replace(/\{total\}/, total)).show();
}
$next[(settings.loop || index < total - 1) ? "show" : "hide"]().html(settings.next);
$prev[(settings.loop || index) ? "show" : "hide"]().html(settings.previous);
prev = index ? $related[index - 1] : $related[total - 1];
next = index < total - 1 ? $related[index + 1] : $related[0];
if (settings.slideshow) {
$slideshow.show();
}
// Preloads images within a rel group
if (settings.preloading) {
nextSrc = $.data(next, colorbox).href || next.href;
prevSrc = $.data(prev, colorbox).href || prev.href;
nextSrc = $.isFunction(nextSrc) ? nextSrc.call(next) : nextSrc;
prevSrc = $.isFunction(prevSrc) ? prevSrc.call(prev) : prevSrc;
if (isImage(nextSrc)) {
$('<img/>')[0].src = nextSrc;
}
if (isImage(prevSrc)) {
$('<img/>')[0].src = prevSrc;
}
}
} else {
$groupControls.hide();
}
if (settings.iframe) {
iframe = $('<iframe/>').addClass(prefix + 'Iframe')[0];
if (settings.fastIframe) {
complete();
} else {
$(iframe).load(complete);
}
iframe.name = prefix + (+new Date());
iframe.src = settings.href;
if (!settings.scrolling) {
iframe.scrolling = "no";
}
if (isIE) {
iframe.frameBorder=0;
iframe.allowTransparency = "true";
}
$(iframe).appendTo($loaded).one(event_purge, function () {
iframe.src = "//about:blank";
});
} else {
complete();
}
if (settings.transition === 'fade') {
$box.fadeTo(speed, 1, function () {
$box[0].style.filter = "";
});
} else {
$box[0].style.filter = "";
}
$window.bind('resize.' + prefix, function () {
publicMethod.position(0);
});
});
}
if (settings.transition === 'fade') {
$box.fadeTo(speed, 0, function () {
setPosition(0);
});
} else {
setPosition(speed);
}
};
publicMethod.load = function (launched) {
var href, setResize, prep = publicMethod.prep;
active = true;
photo = false;
element = $related[index];
if (!launched) {
process($.extend(settings, $.data(element, colorbox)));
}
trigger(event_purge);
trigger(event_load, settings.onLoad);
settings.h = settings.height ?
setSize(settings.height, 'y') - loadedHeight - interfaceHeight :
settings.innerHeight && setSize(settings.innerHeight, 'y');
settings.w = settings.width ?
setSize(settings.width, 'x') - loadedWidth - interfaceWidth :
settings.innerWidth && setSize(settings.innerWidth, 'x');
// Sets the minimum dimensions for use in image scaling
settings.mw = settings.w;
settings.mh = settings.h;
// Re-evaluate the minimum width and height based on maxWidth and maxHeight values.
// If the width or height exceed the maxWidth or maxHeight, use the maximum values instead.
if (settings.maxWidth) {
settings.mw = setSize(settings.maxWidth, 'x') - loadedWidth - interfaceWidth;
settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw;
}
if (settings.maxHeight) {
settings.mh = setSize(settings.maxHeight, 'y') - loadedHeight - interfaceHeight;
settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh;
}
href = settings.href;
$loadingOverlay.show();
if (settings.inline) {
// Inserts an empty placeholder where inline content is being pulled from.
// An event is bound to put inline content back when ColorBox closes or loads new content.
$div().hide().insertBefore($(href)[0]).one(event_purge, function () {
$(this).replaceWith($loaded.children());
});
prep($(href));
} else if (settings.iframe) {
// IFrame element won't be added to the DOM until it is ready to be displayed,
// to avoid problems with DOM-ready JS that might be trying to run in that iframe.
prep(" ");
} else if (settings.html) {
prep(settings.html);
} else if (isImage(href)) {
$(photo = new Image())
.addClass(prefix + 'Photo')
.error(function () {
settings.title = false;
prep($div('Error').text('This image could not be loaded'));
})
.load(function () {
var percent;
photo.onload = null; //stops animated gifs from firing the onload repeatedly.
if (settings.scalePhotos) {
setResize = function () {
photo.height -= photo.height * percent;
photo.width -= photo.width * percent;
};
if (settings.mw && photo.width > settings.mw) {
percent = (photo.width - settings.mw) / photo.width;
setResize();
}
if (settings.mh && photo.height > settings.mh) {
percent = (photo.height - settings.mh) / photo.height;
setResize();
}
}
if (settings.h) {
photo.style.marginTop = Math.max(settings.h - photo.height, 0) / 2 + 'px';
}
if ($related[1] && (index < $related.length - 1 || settings.loop)) {
photo.style.cursor = 'pointer';
photo.onclick = function () {
publicMethod.next();
};
}
if (isIE) {
photo.style.msInterpolationMode = 'bicubic';
}
setTimeout(function () { // A pause because Chrome will sometimes report a 0 by 0 size otherwise.
prep(photo);
}, 1);
});
setTimeout(function () { // A pause because Opera 10.6+ will sometimes not run the onload function otherwise.
photo.src = href;
}, 1);
} else if (href) {
$loadingBay.load(href, function (data, status, xhr) {
prep(status === 'error' ? $div('Error').text('Request unsuccessful: ' + xhr.statusText) : $(this).contents());
});
}
};
// Navigates to the next page/image in a set.
publicMethod.next = function () {
if (!active && $related[1] && (index < $related.length - 1 || settings.loop)) {
index = index < $related.length - 1 ? index + 1 : 0;
publicMethod.load();
}
};
publicMethod.prev = function () {
if (!active && $related[1] && (index || settings.loop)) {
index = index ? index - 1 : $related.length - 1;
publicMethod.load();
}
};
// Note: to use this within an iframe use the following format: parent.$.fn.colorbox.close();
publicMethod.close = function () {
if (open && !closing) {
closing = true;
open = false;
trigger(event_cleanup, settings.onCleanup);
$window.unbind('.' + prefix + ' .' + event_ie6);
$overlay.fadeTo(200, 0);
$box.stop().fadeTo(300, 0, function () {
$box.add($overlay).css({'opacity': 1, cursor: 'auto'}).hide();
trigger(event_purge);
$loaded.remove();
setTimeout(function () {
closing = false;
trigger(event_closed, settings.onClosed);
}, 1);
});
}
};
// A method for fetching the current element ColorBox is referencing.
// returns a jQuery object.
publicMethod.element = function () {
return $(element);
};
publicMethod.settings = defaults;
// Initializes ColorBox when the DOM has loaded
$(publicMethod.init);
}(jQuery, document, this));
$(document).ready(function(){
$('.postbody img').slideDown(1, function(){
if($(this).height() > 120)
{
$(this).replaceWith('<a href="'+$(this).attr('src')+'" title="9/7 BHN No.1"><img title="Click vào ảnh xem kích thước thật" src="'+$(this).attr('src')+'"></a>');
}
});
$(".postbody a[href]").filter(function() {
return /\.(gif|png|jpg|jpeg|bmp)$/i.test(this.href);
}).attr('rel','imgbaivong');
});
$(document).ready(function(){
$("a[rel='imgbaivong']").colorbox({slideshow:true});
});
Similar topics
» View topic body bị lỗi[✔]
» [Thắc mắc]Về view-topic body!
» [Giúp đỡ] Sửa View topic body
» sao 4r em lại có 2 phần nội dung bài viết luôn giúp em với
» Cho em xin view topic body này
» [Thắc mắc]Về view-topic body!
» [Giúp đỡ] Sửa View topic body
» sao 4r em lại có 2 phần nội dung bài viết luôn giúp em với
» Cho em xin view topic body này
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