Việc gì cũng làm được, quan trọng là chúng ta có muốn làm hay không?
Admin
Tổng số bài gửi : 129 Star : 331 Reputation : 10 Join date : 14/02/2012 Age : 32 Đến từ : Đăk Lăk Châm ngôn sống : Việc gì cũng làm được, quan trọng là chúng ta có muốn làm hay không?
Tiêu đề: [code] thông điệp yêu thương tự cập nhật C3zone
Tiêu đề:
demo: như forum mình, bạn thử thì biết. hihi làm TDYT = colorbox Dán hết code sau vào Mod_new
Code:
<table style="background: #fff;color: #555555;border: 2px solid #bbb;-moz-border-radius:5px;" cellpadding="6" cellspacing="2" border="0" width="930px" align="center"><tbody><tr><td nowrap="nowrap" style="background: #fff;color: #313131;border: 1px solid #ccc;-moz-border-radius:5px"><span style="cursor: pointer;" onmouseover="showtip('<font size=5>GỬI THÔNG ĐIỆP - CLICK !!</font><br>Chỉ dành cho thành viên có <font color=#FF5F5F>nick màu</font> hoặc <font color=#C2FFAF>trên 20 bài viết</font> ...');" onmouseout="hidetip();" class="c3luvmes cboxElement"><img src="http://www.c3zone.net/users/2611/10/63/87/album/tdyt210.png"><img
src="http://www.c3zone.net/users/2611/10/63/87/album/tdyt_s10.png"></span></td><td width="100%" style="background: #fff url(http://www.c3zone.net/users/2611/10/63/87/album/master10.gif);color: #313131;border: 1px solid #ccc;-moz-border-radius:5px"><marquee behavior="scroll" onmouseover="this.stop()" onmouseout="this.start()" scrollamount="1" scrolldelay="25" direction="left" truespeed="truespeed"><!-- BEGIN post_row --><span style="margin-left:0px" class="modnew"><span onmouseover="showtip('Thông điệp được gửi vào lúc <font color=yellow>{post_row.TIME}</font> ...');" onmouseout="hidetip();" style="color:#2F2F2F; font-size:11px"><b><span style="color:#102070"><strong>{post_row.POSTER}</strong></span> </b> nhắn với <span style="color:#FF009A;font-weight:bold">{post_row.TITLE}:</span></span> <span class="lovemes">{post_row.TEXT} </span></span><!-- END post_row --> <span style="padding: 0px 40px"></span></span></marquee></td></tr></tbody></table>
<div style="display:none;" > <!-- BEGIN switch_user_logged_out -->
titleluvmes = 'Bạn phải là thành viên có nick màu hoặc có trên 20 bài viết'; jQuery(document).ready(function() { jQuery(".c3box a[href*=2]").parent().empty(); jQuery(".c3zonee:contains('»')").remove(); jQuery(".c3luvmes").colorbox({ width: "52%", innerHeight: "175px", title: titleluvmes, inline: true, href: "#c3_luvmes",
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',
// 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); }
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 () {
// **************** // 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 }
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();
// Setting padding to remove the need to do size conversions during the animation step. $box.css({"padding-bottom": interfaceHeight, "padding-right": interfaceWidth}).hide();
// 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.
// 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;
// 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.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});
$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;
// 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 (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) {
// 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);
* Không dùng những ngôn từ thiếu lịch sự. * Bài viết sưu tầm nên ghi rõ nguồn. * Tránh spam nhảm không liên quan đến chủ đề. Yêu cầu viết tiếng Việt có dấu.