Lietotāju sarunas
BUZZ AMATU MEKLĒJUMOS | KONKURSS! IESPĒJA IEGŪT ESKLUZĪVU REKLĀMAS VIETU PORTĀLĀ!
Atlikušie simboli: 200

Lappuse 1 no 11
Forums » uCoz sistēma » Vizuālie skripti » Mini-čats
Mini-čats
wuxmachine Pievienots: Piektdiena, 16.03.25, 00:45 | Ieraksts # 1 Offline

Ieraksti: 1081
GENERALISSIMO
Dodamies uz bottom part of website, kur apakšā ievietojam šo kodu:
Quote
<style> .chat_box {display:none;position:fixed;bottom:15px;right:15px;border:1px solid #dddddd;background:#fbfbfb;padding:4px;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:2px 2px 3px #9b9b9b;-webkit-box-shadow:2px 2px 3px #9b9b9b;box-shadow:2px 2px 3px #9b9b9b;} .chat_box div.close {display:block;position:absolute;right:0;top:0;background:url('http://buzz.ucoz.lv/askripti2/mchat1.png') no-repeat;width:16px;height:16px;opacity:0.6;-moz-opacity:0.6;filter:alpha(opacity=60);filter:progid:DXImageTransform.Microsoft.Alpha(opacity=60);} .chat_box div.close:hover {cursor:pointer;opacity:1.0;-moz-opacity:1.0;filter:alpha(opacity=100);filter:progid:DXImageTransform.Microsoft.Alpha(opacity=100);} div.chat_button {display:block;width:75px;height:75px;background:url('http://buzz.ucoz.lv/askripti2/mchat2.png') no-repeat;position:fixed;bottom:15px;right:15px;opacity:0.8;-moz-opacity:0.8;filter:alpha(opacity=80);filter:progid:DXImageTransform.Microsoft.Alpha(opacity=80);} div.chat_button:hover {cursor:pointer;opacity:1.0;-moz-opacity:1.0;filter:alpha(opacity=100);filter:progid:DXImageTransform.Microsoft.Alpha(opacity=100);} </style> <div class="chat_button" onclick="$('.chat_button').fadeOut('fast');$('.chat_box').slideToggle('slow');"></div> <div class="chat_box"><div class="close" onclick="$('.chat_box').slideToggle('fast');$('.chat_button').fadeIn('slow');"></div> <div id="chatBox">$CHAT_BOX$<script type="text/javascript"> $('#mchatMsgF').keyup(function(){ var url = ["http://", "https://", "www", ".ru", ".su", ".com", ".net", "mat"]; var field = $(this).val(); for (i=0; i<url.length; i++){ if(field.toLowerCase().indexOf(url[i],'ig')!=-1) if(field.search(document.location.host)==-1) { _uWnd.alert('Adreses un lamuvārdi aizliegti!','',{w:180,h:38,tm:3000}); $(this).val(field.replace(url[i],'')); } } }); </script></div> <script type="text/javascript"> function reloadTimeC() { $('#chatBox').load('/ #chatBox',function(data){ $('#reloadSec').html('<span style="color:green;padding-top:4px;">Refrešot</span>'); setTimeout("$('#reloadSec').html('')",1000); }); }; setInterval(reloadTimeC,30000); </script> </div>
Tālāk dodamies uz Tag board appearance of entries, kur visu aizvietojam ar šo:
Quote
<?if($NUMBER$=1)?><style>body {background: #ffffff !important;} a.ipbavatar { width: 40px; height: 40px; }a.ipbavatar { display: block; float: left; position: relative; top: 0px; left: 0px; bottom: 0px; right: 0px; box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.5) inset; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; } .linnov { overflow: hidden; border-bottom: 1px dotted #D7D9DB; } a.ipbavatar img { width: 40px; height: 40px; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;float: left; width: 40px; height: 40px; } #body{} ::-webkit-scrollbar { width: 5px; height: 9px; } ::-webkit-scrollbar-track-piece { background-color: #ffffff; -webkit-border-radius: 5px; } ::-webkit-scrollbar-thumb:vertical { height: 9px; background-color: #666; -webkit-border-radius: 5px; } ::-webkit-scrollbar-thumb:horizontal { width: 5px; background-color: #666; -webkit-border-radius: 5px; } </style> <?endif?> [l] <div style="word-wrap:break-word;"> <div style="background:#ffffff;padding:1px;border:1px solid #cfcece;border-radius:2px;"> <table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td width="38" style="padding: 2px;"> <a class="ipbavatar" style="text-decoration:none" title="Profils" href="javascript://" rel="nofollow" onclick="return show_profile('$USER_ID$');"> <?if($AVATAR_URL$)?> <img alt="$USERNAME$" src="$AVATAR_URL$" style="float: left;width: 40px;height:40px;"> <?else?> <img alt="$USERNAME$" src="http://buzz.ucoz.lv/citasbildes/buzznoavatar.png" style="float: left;width: 40px;height:40px;"> <?endif?> </a> </td> <td style="font-size:7pt; color:#666; padding-left:4px;"> <a style="text-decoration:none" href="javascript:void('Apply to')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+='<b>$NAME$, ';return false;"> <?if($USER_ID$=1)?><?else?>[color=#248BFF]<?endif?>$USERNAME$</a></b> ierakstīja <span style="font-size:7pt">$DATE$, $TIME$</span> <a style="text-decoration:none" href="/index/14-$USER_ID$-0-1" target="_blank" title="Rakstīt vēstuli">[color=#527D24]Rakstīt vēstuli</a> </td> </tr> </tbody> </table> <div class="linnov"> </div> <div style="padding:3px; text-align:left;"> $MESSAGE$ </div> [/color][/color] </div>
Tālāk dodamies uz Tag board Form for adding new messages, kur aizvietojam visu saturu ar šo:
Quote
<?if(!$CAN_ADD$)?>
<?if($LOGIN_LINK$)?> <a href="$LOGIN_LINK$"> <div style="background:#F3F3F3;padding:5px 0 5px 0;border:1px solid #eaeaea;color:#444;border-radius:4px;margin:10px 0 0 0;font-size:7pt;"> Ierakstam nepieciešama autorizācija<br/></div></a> <?else?>Pieeja leigta<?endif?>
<?else?> <table border="0" cellpadding="1" cellspacing="1" width="100%"> <tr> <td width="70%" align="left"> <a href="$RELOAD_URI$" title="Pārlādēt"> <img alt="" border="0" align="absmiddle" src="http://buzz.ucoz.lv/askripti2/arrow.png"></a> <?if($SMILES_URI$)?> <a href="$SMILES_URI$" title="Ievietot emocijikonu"> <img alt="" border="0" align="absmiddle" src="http://buzz.ucoz.lv/askripti2/smiley.png"></a> <?endif?> <?if($MSGCTRL_URI$)?> <a href="$MSGCTRL_URI$" title="Labot ierakstu"> <img alt="" border="0" align="absmiddle" src="http://buzz.ucoz.lv/askripti2/edit_bg.png" width="15" height="15"></a> <?endif?> <a href="javascript:void('Apply to')" onclick="bbCode('b');return false;"> <img border="0" align="absmiddle" src="http://icons.iconarchive.com/icons/custom-icon-design/pretty-office-8/16/Text-bold-icon.png" height="16" width="16" title="Treknraksts" /></a> <a href="javascript:void('Apply to')" onclick="bbCode('i');return false;"> <img border="0" align="absmiddle" src="http://icons.iconarchive.com/icons/icons8/windows-8/16/Editing-Italic-icon.png" height="16" width="16" title="Slīpraksts" /></a> <a href="javascript:void('Apply to')" onclick="bbCode('u');return false;"> <img border="0" align="absmiddle" src="http://icons.iconarchive.com/icons/icons8/windows-8/16/Editing-Underline-icon.png" height="16" width="16" title="Pasvītrots" /></a> <a href="javascript://" onclick="url_mchat();return false;"> <img border="0" align="absmiddle" src="http://buzz.ucoz.lv/askripti2/link.png" height="16" width="16" title="Adrese" /></a> <a href="javascript:void('Apply to')" onclick="bbCode('quote');return false;"> <img border="0" align="absmiddle" src="http://buzz.ucoz.lv/askripti2/quotes.png" height="16" width="16" title="Citāts" /></a> <td>$FLD_AUTOUPD$
<b id="jeuwu28">$MAX_MESSAGE_LEN$</b>
</td> <?if(!$USER_LOGGED_IN$)?> <table border="0" cellpadding="1" cellspacing="1" width="100%"> <tr><td colspan="2">$FLD_NAME$</td></tr> <tr><td width="50%">$FLD_EMAIL$</td><td>$FLD_URL$</td></tr> </table> <?endif?> <?if($FLD_CUSTOM1$ || $FLD_CUSTOM2$)?> <table border="0" cellpadding="1" cellspacing="1" width="100%"> <tr><td width="50%">$FLD_CUSTOM1$</td><td>$FLD_CUSTOM2$</td></tr> </table> <?endif?> <?if($FLD_SECURE$)?> <table class="micha" border="0" cellpadding="1" cellspacing="1"> <tr><td width="50%">$FLD_SECURE$</td><td align="right">$IMG_SECURE$</td></tr> </table> <?endif?> <script type="text/javascript"> function sbtFrmMC991(f){$('#mchatBtn').css({display:'none'});$('#mchatAjax').css({display:''});_uPostForm('MCaddFrm',{type:'POST',url:'/mchat/?29399178.7043772'});} function countMessLength(){var rst = 300-$('#mchatMsgF').val().length;if (rst<0){rst=0;$('#mchatMsgF').val($('#mchatMsgF').val().substr(0,300));}$('#jeuwu28').html(rst);} var tID7174=-1;var tAct7174=false; function setT7174(s){var v=parseInt(s.options[s.selectedIndex].value);document.cookie="mcrtd="+s.selectedIndex+"; path=/";if(tAct7174){clearInterval(tID7174);tAct7174=false;}if(v>0){tID7174=setInterval("document.getElementById('mchatIfm2').src='/mchat/?'+Math.random();",v*1000);tAct7174=true;}} function initSel7174() {var res=document.cookie.match(/(\W|^)mcrtd=([0-9]+)/);if(res){s=$("#mchatRSel")[0];;s.selectedIndex=parseInt(res[2]);setT7174(s);}$("#mchatMsgF").bind("keydown",function(e){if(e.keyCode==13 && e.ctrlKey && !e.shiftKey){e.preventDefault();sbtFrmMC991();}})} </script> <table class="micha" border="0" cellpadding="1" cellspacing="1" width="100%"> <tr><td width="40%" rowspan="2" style="max-width: 88px">$FLD_MESSAGE$</td></tr> <script type="text/javascript" src="http://buzz.ucoz.lv/askripti2/bbcodes.js"></script> <Style> #mchatBtn { font-size: 8pt; background: url('http://buzz.ucoz.lv/askripti2/podrobno.png'); background-position: 0px 0px; color: #505252; border: 0px solid white; border-radius: 3px; height: 25px; width: 85px; padding: 0 5px 3px 5px; cursor: pointer; } #mchatBtn:hover {background-position:-85px 0px;color:#505252;border:0px solid #FE8C12;} #mchatBtn:active {background-position:-170px 0px;color:#505252;border:0px solid #FE8C12;} </style> </table> <table> <tr> <td align="left" wigth="88px"> <input type="submit" value="Ierakstīt" class="mchat" id="mchatBtn"> <div style="display:none; width:88px; height:32px; background:url('http://buzz.ucoz.lv/askripti2/loading.gif') no-repeat 30% 50%; position:relative;" id="mchatAjax"><div style="position:absolute; top:8px; left:40px;">Uzgaidiet...</div></div> </td> </tr> </table> <?endif?>
Iznākums:
Pielikumi: 0046148.png(35Kb)
 
Forums » uCoz sistēma » Vizuālie skripti » Mini-čats
Lappuse 1 no 11
Meklēšana: