change the background through javascript
4 posters
Page 1 of 1
change the background through javascript
how do I do this in bb3 forum. found that only runs on phpbb so if you want my help, let it be the other way just to be with such a changing picture. healthier and please help.
Sorry for bad English
Here's the CSS and Java script phpbb might benefit
ACP - Display - Pictures and Colors - Colors - CSS Stylesheet:
- Code:
/* Tùy chọn hình nền - www.FMvi.org */
#custom_background{background-image:url('http://i48.servimg.com/u/f48/16/58/89/73/backgr18.jpg') !important;box-shadow:0 0 10px rgba(0,0,0,0.8) inset;color:#FFF;position:relative;padding:15px 0 15px 15px}
#custom_background span{-moz-transition:all .2s ease-in-out 0;background:none no-repeat scroll 50% 50% #000;border-radius:7px 7px 7px 7px;box-shadow:0 1px 7px #000 inset, 0 1px 0 rgba(255,255,255,0.05), 0 0 1px rgba(255,255,255,0.35);cursor:pointer;display:block;float:left;height:90px;margin-right:15px;width:140px}
#custom_background span:hover{box-shadow:0 1px 2px #000 inset, 0 1px 0 rgba(255,255,255,0.05), 0 0 1px rgba(255,255,255,0.35)}
#bg1{background-image:url(http://i48.servimg.com/u/f48/16/58/89/73/backgr20.jpg)!important;background-repeat:repeat-x!important}
#bg6{background-image:url(http://i48.servimg.com/u/f48/16/58/89/73/backgr15.jpg)!important}
#bg5{background-image:url(http://i48.servimg.com/u/f48/16/58/89/73/backgr16.jpg)!important}
#bg2{background-image:url(http://i48.servimg.com/u/f48/16/58/89/73/backgr17.jpg)!important}
#bg3{background-image:url(http://i48.servimg.com/u/f48/16/58/89/73/guitar10.jpg)!important}
#bg4{background-image:url(http://i48.servimg.com/u/f48/16/58/89/73/backgr18.jpg)!important}
#custom_url{clear:left;padding-top:10px;text-align:center}
#custom_input{background:none repeat scroll 0 0 rgba(0,0,0,0.5);border:0 none;border-radius:4px 4px 4px 4px;box-shadow:0 1px 3px rgba(0,0,0,0.75) inset, 0 1px 0 rgba(255,255,255,0.15);color:#FFF;font-size:20px;height:40px;margin-left:-15px;margin-right:8px;white-space:nowrap;width:780px;padding:0 10px 0 0}
#custom_submit{background:url(http://i48.servimg.com/u/f48/16/58/89/73/highli10.png) repeat-x scroll 0 0 rgba(197,206,213,0.4);border-radius:4px 4px 4px 4px;box-shadow:0 1px 3px rgba(0,0,0,0.6);color:#FFF;cursor:pointer;display:inline-block;font-size:20px;font-weight:400;line-height:40px;text-shadow:0 -1px 0 #4C5057;padding:0 10px}
.bg1{background:url(http://i48.servimg.com/u/f48/16/58/89/73/backgr20.jpg) repeat fixed 50% 0 #000!important}
.bg2{background:url(http://i48.servimg.com/u/f48/16/58/89/73/backgr12.jpg) no-repeat fixed 50% 0 #000!important}
.bg3{background:url(http://i48.servimg.com/u/f48/16/58/89/73/guitar10.jpg) repeat fixed 50% 0 #000!important}
.bg4{background:url(http://i48.servimg.com/u/f48/16/58/89/73/backgr14.jpg) repeat fixed 50% 0 #000!important}
.bg5{background:url(http://i48.servimg.com/u/f48/16/58/89/73/backgr11.jpg) no-repeat fixed 50% 0 #0E1E2D!important}
.bg6{background:url(http://i48.servimg.com/u/f48/16/58/89/73/backgr19.jpg) no-repeat fixed 50% 0 #000!important}
.bg_custom{background-attachment:fixed;background-color:#000;background-repeat:repeat}
#nav_background{background-color:#000;border:3px dotted #444!important;border-radius:15px 15px 15px 15px;cursor:pointer;float:right;padding:5px}
#nav_background:hover{background-color:#FFF}
#nav_background:active{background-color:#E71E7B}
ACP - Modules - HTML & JAVASCRIPT - Javascript codes management
Add a Javascript Code
Title * : Tùy chỉnh hình nền
Placement : In all the pages
Javascript Code * :
- Code:
var CopyrightNoticeEn = 'Copyright by FmVi. All Rights Reserved. Use, modification, and/or distribution of this script is not allowed without direct permission from baivong (gialangsangai2000@yahoo.com). This entire copyright notice must remain in the original, copied, or modified script';
var CopyrightNoticeVi = 'Bản quyền FmVi. Giữ toàn quyền. Việc sử dụng, sửa đổi , và / hoặc phân phối mã này mà không được phép trực tiếp từ baivong (gialangsangai2000@yahoo.com) là không được phép. Toàn bộ thông báo bản quyền này phải được giữ nguyên khi sao chép, hoặc sửa đổi';
$(function () {
$("#pun-intro").prepend('<img src="http://i48.servimg.com/u/f48/16/58/89/73/nav_ba10.png" alt="Change background image" title="Change background image" id="nav_background" />');
$("#content").prepend('<div id="toggle_background" style="display: none;"><div id="custom_background"><span id="bg1"></span><span id="bg6"></span><span id="bg5"></span><span id="bg2"></span><span id="bg3"></span><span id="bg4"></span><div id="custom_url"><input type="text" placeholder=" Chọn hình nền khác bằng cách nhập một URL hình ảnh và nhấn [Thay đổi]" id="custom_input"><strong id="custom_submit">Thay đổi</strong></div></div></div>');
$("#custom_background span").click(function () {
$("body, .main-head, .main-foot, #pun-intro").removeClass("bg1 bg2 bg3 bg4 bg5 bg6 bg_custom").addClass($(this).attr("id"));
my_setcookie("custom_background", $(this).attr("id"), true);
});
$("#custom_submit").click(function () {
var urlbg = $("#custom_input").val();
$("body, .main-head, .main-foot, #pun-intro").removeClass("bg1 bg2 bg3 bg4 bg5 bg6 bg_custom").addClass("bg_custom").css("background-image", "url('" + urlbg + "')");
my_setcookie("custom_background", urlbg, true);
});
$("#nav_background").click(function () {
$("#toggle_background").slideToggle()
});
if (my_getcookie("custom_background") != "") {
if (my_getcookie("custom_background").length > 4) {
$("body, .main-head, .main-foot, #pun-intro").addClass("bg_custom").css("background-image", "url(" + my_getcookie("custom_background") + ")");
} else {
$("body, .main-head, .main-foot, #pun-intro").addClass(my_getcookie("custom_background"))
}
}
});
Re: change the background through javascript
i dont understand the screen shot,
they are images but not background images? can you try to explain what the whole java is supposed to be doing as well
Thanx
they are images but not background images? can you try to explain what the whole java is supposed to be doing as well
Thanx
kirk- Forumaster
- Posts : 11037
Reputation : 653
Language : English,Vulcan,Klingon, Romulan,& Gorn
Re: change the background through javascript
than once and changing background and color categories in the title
can also put your picture and can also be changed. but i dont know how to be for phpbb3. Here this is how it works http://dejan.forumcanadien.org/forum phpbb please help
can also put your picture and can also be changed. but i dont know how to be for phpbb3. Here this is how it works http://dejan.forumcanadien.org/forum phpbb please help
Re: change the background through javascript
This is a drop-down skin changer that you could use: https://help.forumotion.com/t71484-add-multi-themes-to-your-forum
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: change the background through javascript
www.fmvi.vn That is where the screen shot is from I bet. (Not advertising either.) They won't give the code either. Will have to have someone to code this and make this a tutorial. The only bad thing to get it to work is that almost everything must be transparent.
!_NICK_!- Active Poster
- Posts : 1505
Reputation : 69
Language : English, HTML, and CSS
Location : In the middle of no return.
Similar topics
» Useing Javascript To Change The Background?
» Message Background Javascript Not working as Well
» Background Music Player (Javascript) Probelm
» How do I change background Move logo on to the middle and change letter colour!
» Javascript code for skin change
» Message Background Javascript Not working as Well
» Background Music Player (Javascript) Probelm
» How do I change background Move logo on to the middle and change letter colour!
» Javascript code for skin change
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum