asculta virgin radio

Distribuiţi | 

Quick Start Topic

 Scris de Vizitator la data de Lun Ian 18, 2016 7:32 am





File Name: Quick Start Topic
Author: Daemon
Functionality: Punbb


Create New Widgets

Widget Name: Quick Title
Use Table Type: No



Cod:
<ul class="tool_list">

<li>
<a class="new_topic" id="new_topic" href="#newtopic">Create New Topic</a>
</li>
</ul><script>
jQuery(document).ready(function() {
if(window.location.pathname == '/' || window.location.pathname == '/forum')
 var opts = jQuery('form[name="jumpbox"] select').html();
 var form_newtpc = document.createElement('div');
 form_newtpc.className = 'ntpc_element',
 form_newtpc.style.display = 'none',
 form_newtpc.innerHTML = '<h3 class="dialog_title">Select Forum</h3><hr class="bsHr"><a href="#" class="dialog_close">×</a><div class="space"><select class="ntpc_s">'+opts+'</select><br><div class="space_b"><button type="button" id="getf" class="button_continue">Proceed</button></div></div>';
jQuery('body').append(form_newtpc);
jQuery('.dialog_close').click(function(d) {
 d.preventDefault();
jQuery('.modal_ntpc').fadeOut('450');
jQuery(form_newtpc).animate({"height": "toggle"}, 400);
});
jQuery('#new_topic').click(function(d) {
 d.preventDefault();
 jQuery('<div class="modal_ntpc"></div>').insertBefore(form_newtpc);
 jQuery(form_newtpc).animate({"height": "toggle"}, 400);
jQuery('#getf').click(function() {
 var selectedValue = jQuery('.ntpc_s').val();
 var value = selectedValue.match(/\d+/g);
if(selectedValue == -1) {
 jQuery('.type_warning').remove();
 jQuery('<span class="type_warning">Este campo é obrigatório</span>').insertBefore('.space_b');
}
else {
 location.href = '/post?f='+value+'&mode=newtopic';
}
});
});
});
</script> <style>
.modal_ntpc {
background: rgba(200,200,200,0.8);
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 900;
}
.ntpc_element {
left: 50%;
margin-left: -250px;
margin-top: -210px;
top: 43%;
z-index: 999;
width: 35%;
max-width: 500px;
position: fixed;
background: #fff;
box-shadow: 0px 5px 55px rgba(0,0,0,0.4);
}
.type_warning{color: #a52638;}
.ntpc_element select {
background: #fff url(http://i.imgur.com/Kj9CW90.png) repeat-x top;
min-height: 32px;
border: 1px solid #b3b3b3;
width: 100%;
max-width: 350px;
border-radius: 3px;
padding: 7px 25px 7px 7px;
position: relative;
cursor: pointer;
margin-bottom: 5px;
}
.ntpc_element .space {padding: 15px;}
.dialog_close {
position: absolute;
top: 0;
right: 0;
display: block;
color: #000;
width: 44px;
height: 44px;
line-height: 48px;
font-size: 34px;
font-weight: 300;
text-align: center;
z-index: 999;
-webkit-transition: 0.2s all linear;
-moz-transition: 0.2s all linear;
-ms-transition: 0.2s all linear;
-o-transition: 0.2s all linear;
transition: 0.2s all linear;
}
.dialog_close:hover {color: #cd3816 !important;}
.ntpc_element .space_b {
margin-top: 15px;
}
.ntpc_element .button_continue {
background: #262e33;
color: #ffffff;
font-size: 13px;
font-weight: 500;
text-align: center;
text-decoration: none;
text-shadow: none;
white-space: nowrap;
cursor: pointer;
display: inline-block;
vertical-align: middle;
padding: 10px 20px;
border-radius: 3px;
border: 1px solid rgba(0,0,0,0.1);
-webkit-transition: 0.1s all linear;
-moz-transition: 0.1s all linear;
-ms-transition: 0.1s all linear;
-o-transition: 0.1s all linear;
transition: 0.1s all linear;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
.ntpc_element .button_continue:hover {opacity: 0.9;}
.dialog_title {
color: #333;
font-size: 26px !important;
font-weight: 300 !important;
text-align: left;
line-height: 1.2;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
margin: 0;
padding: 12px 15px 0 15px;
}
.dialog_title ~ .bsHr {
margin: 12px 15px 0 15px;
}
hr.bsHr {
margin: 15px 0;
height: 0;
padding: 0;
border-width: 2px 0 0 0;
border-style: solid;
border-color: #ebebeb;
}
.tool_list {
width: 100%;
display: inline;
padding: 0;
list-style: none;
margin: 0;
}
.new_topic {
background: #94a66a;
color: #ffffff !important;
display: block;
width: 100%;
text-overflow: ellipsis;
overflow: hidden;
text-shadow: 1px 1px 0px rgba(0,0,0,0.2);
font-size: 14px;
line-height: 42px;
font-weight: 500;
text-align: center;
text-decoration: none;
text-shadow: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
white-space: nowrap;
cursor: pointer;
display: inline-block;
vertical-align: middle;
padding: 0 20px;
border-radius: 3px;
border: 1px solid rgba(0,0,0,0.1);
-webkit-transition: 0.1s all linear;
-moz-transition: 0.1s all linear;
-ms-transition: 0.1s all linear;
-o-transition: 0.1s all linear;
transition: 0.1s all linear;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
.new_topic:hover {
opacity: 0.9;
}
</style>
Offline
avatar
Vizitator
Vizitator


Re: Quick Start Topic

 Scris de Lcnn la data de Lun Ian 18, 2016 8:33 am

Foarte tare acest script!
Offline
avatar
Lcnn
Administrator

Mesaje : 321
Varsta : 25
Localizare : Timisoara

Vezi profilul utilizatorului http://phpbb2.phpdevil.com
Pagina 1 din 1

Permisiunile acestui forum:Nu puteti raspunde la subiectele acestui forum
phpbb2.phpdevil.com :: PHPDEVIL # Web-design :: Tutoriale :: PunBB-
Mergi direct la:  

pHpDeviL | For the love of the game...