| Модератор форума: dotbot |
| Сообщество uCoz Архивариус Корзина Скроллинг чата |
| Скроллинг чата |
|
подскажите пожалуйста! Я свой чат выводил по частям, сначала ту часть где сообщения, и теперь хочу вывести форму добавления сообщений, но не знаю как! Дело в том, что все это я делал чтоб поменять скролл, поэтому и по отдельности пришлось
Code <iframe scrolling="no" frameborder="no" seamless src="/mchat/" height="900"></iframe> вот проблемная стр http://www.forex-fun.ru/index/chat/0-18Сообщение отредактировал RikudoAdmin - Вторник, 03 Апр 2012, 12:26:38
|
|
RikudoAdmin,
Quote (RikudoAdmin) как теперь форму добавления вывеси? $CHAT_BOX$ ... Всё написанное выше - моё личное мнение и на абсолютную правоту не претендует.
Есть вопросы лично ко мне - пиши сюда: http://likbezz.ru/forum/8 |
|
Quote (fflesh) $CHAT_BOX$ я же говорю мне поотдельности нужно, а не целиком! |
|
RikudoAdmin,
Quote (RikudoAdmin) Дело в том, что все это я делал чтоб поменять скролл, поэтому и по отдельности пришлось ... Quote (RikudoAdmin) я же говорю мне поотдельности нужно, а не целиком! По отдельности не выводит. Копируй код и скрипты из исходника ... Всё написанное выше - моё личное мнение и на абсолютную правоту не претендует.
Есть вопросы лично ко мне - пиши сюда: http://likbezz.ru/forum/8 Сообщение отредактировал fflesh - Вторник, 03 Апр 2012, 17:12:24
|
|
вот
Code <div id="jp-container" class="jp-container"> <div target="_blank" href=""> <iframe scrolling="no" frameborder="no" seamless src="/mchat/" height="900"></iframe> </div></div> <script type="text/javascript"> $(function() { // the element we want to apply the jScrollPane var $el = $('#jp-container').jScrollPane({ verticalGutter : -16 }), // the extension functions and options extensionPlugin = { extPluginOpts : { // speed for the fadeOut animation mouseLeaveFadeSpeed : 500, // scrollbar fades out after hovertimeout_t milliseconds hovertimeout_t : 1000, // if set to false, the scrollbar will be shown on mouseenter and hidden on mouseleave // if set to true, the same will happen, but the scrollbar will be also hidden on mouseenter after "hovertimeout_t" ms // also, it will be shown when we start to scroll and hidden when stopping useTimeout : false, // the extension only applies for devices with width > deviceWidth deviceWidth : 980 }, hovertimeout : null, // timeout to hide the scrollbar isScrollbarHover: false,// true if the mouse is over the scrollbar elementtimeout : null, // avoids showing the scrollbar when moving from inside the element to outside, passing over the scrollbar isScrolling : false,// true if scrolling addHoverFunc : function() { // run only if the window has a width bigger than deviceWidth if( $(window).width() <= this.extPluginOpts.deviceWidth ) return false; var instance = this; // functions to show / hide the scrollbar $.fn.jspmouseenter = $.fn.show; $.fn.jspmouseleave = $.fn.fadeOut; // hide the jScrollPane vertical bar var $vBar = this.getContentPane().siblings('.jspVerticalBar').hide(); /* * mouseenter / mouseleave events on the main element * also scrollstart / scrollstop - @James Padolsey : http://james.padolsey.com/javascript/special-scroll-events-for-jquery/ */ $el.bind('mouseenter.jsp',function() { // show the scrollbar $vBar.stop( true, true ).jspmouseenter(); if( !instance.extPluginOpts.useTimeout ) return false; // hide the scrollbar after hovertimeout_t ms clearTimeout( instance.hovertimeout ); instance.hovertimeout = setTimeout(function() { // if scrolling at the moment don't hide it if( !instance.isScrolling ) $vBar.stop( true, true ).jspmouseleave( instance.extPluginOpts.mouseLeaveFadeSpeed || 0 ); }, instance.extPluginOpts.hovertimeout_t ); }).bind('mouseleave.jsp',function() { // hide the scrollbar if( !instance.extPluginOpts.useTimeout ) $vBar.stop( true, true ).jspmouseleave( instance.extPluginOpts.mouseLeaveFadeSpeed || 0 ); else { clearTimeout( instance.elementtimeout ); if( !instance.isScrolling ) $vBar.stop( true, true ).jspmouseleave( instance.extPluginOpts.mouseLeaveFadeSpeed || 0 ); } }); if( this.extPluginOpts.useTimeout ) { $el.bind('scrollstart.jsp', function() { // when scrolling show the scrollbar clearTimeout( instance.hovertimeout ); instance.isScrolling = true; $vBar.stop( true, true ).jspmouseenter(); }).bind('scrollstop.jsp', function() { // when stop scrolling hide the scrollbar (if not hovering it at the moment) clearTimeout( instance.hovertimeout ); instance.isScrolling = false; instance.hovertimeout = setTimeout(function() { if( !instance.isScrollbarHover ) $vBar.stop( true, true ).jspmouseleave( instance.extPluginOpts.mouseLeaveFadeSpeed || 0 ); }, instance.extPluginOpts.hovertimeout_t ); }); // wrap the scrollbar // we need this to be able to add the mouseenter / mouseleave events to the scrollbar var $vBarWrapper = $('<div/>').css({ position : 'absolute', left : $vBar.css('left'), top : $vBar.css('top'), right : $vBar.css('right'), bottom : $vBar.css('bottom'), width : $vBar.width(), height : $vBar.height() }).bind('mouseenter.jsp',function() { clearTimeout( instance.hovertimeout ); clearTimeout( instance.elementtimeout ); instance.isScrollbarHover = true; // show the scrollbar after 100 ms. // avoids showing the scrollbar when moving from inside the element to outside, passing over the scrollbar instance.elementtimeout = setTimeout(function() { $vBar.stop( true, true ).jspmouseenter(); }, 100 ); }).bind('mouseleave.jsp',function() { // hide the scrollbar after hovertimeout_t clearTimeout( instance.hovertimeout ); instance.isScrollbarHover = false; instance.hovertimeout = setTimeout(function() { // if scrolling at the moment don't hide it if( !instance.isScrolling ) $vBar.stop( true, true ).jspmouseleave( instance.extPluginOpts.mouseLeaveFadeSpeed || 0 ); }, instance.extPluginOpts.hovertimeout_t ); }); $vBar.wrap( $vBarWrapper ); } } }, // the jScrollPane instance jspapi = $el.data('jsp'); // extend the jScollPane by merging $.extend( true, jspapi, extensionPlugin ); jspapi.addHoverFunc(); }); </script> ![]() |
|
|
|
Quote (fflesh) По отдельности не выводит. Копируй код и скрипты из исходника ... как тогда поменять скролл при полном выводе $CHAT_BOX$? ![]() |
|
|
|
Quote (Alexander_K) Так же, скриптом. исходник скрипта я брал готовый, просто подставил свое и все, я в скриптах вообще ничего не пониаю! |
|
|
|
Alexander_K,
Quote (Alexander_K) Тогда так как вы сделали, если работает. В том-то и дело что работает только на половину. ... Ему ещё форма добавления нужна, ... ... Всё написанное выше - моё личное мнение и на абсолютную правоту не претендует.
Есть вопросы лично ко мне - пиши сюда: http://likbezz.ru/forum/8 Сообщение отредактировал fflesh - Вторник, 03 Апр 2012, 17:48:29
|
|
|
|
Quote (Alexander_K) Форма добалвения же есть в шаблонах. Скопировать код шаблона формы и вставить куда нужно. ну я пробовал, но так не получается, и даже ucozовские исходники формы ставил, и все не работает! вот пробовал: Code <form style="margin:0;padding:0;" id="MCaddFrm" onsubmit="sbtFrmMC991();return false;"> <table border="0" cellpadding="1" cellspacing="1" width="100%"> <tr><td><select id="mchatRSel" onchange="setT7174(this);" class="mchat" size="1" title="Автообновление" style="font-size:7pt;"><option value="0">--</option><option value="15">15 сек</option><option value="30">30 сек</option><option value="60">1 мин</option><option value="120">2 мин</option></select></td> <td width="70%" align="right"> <a href="javascript://" rel="nofollow" onclick="document.getElementById('mchatIfm2').src='/mchat/?'+Math.random();return false;" title="Обновить"><img alt="" border="0" align="absmiddle" src="http://s36.ucoz.net/img/fr/mcr.gif" width="13" height="15"></a> <a href="javascript://" rel="nofollow" onclick="new _uWnd('Sml',' ',-250,-350,{autosize:0,closeonesc:1,resize:0},{url:'/index/35-23-2'});return false;" title="Вставить смайл"><img alt="" border="0" align="absmiddle" src="http://s36.ucoz.net/img/fr/mcs.gif" width="13" height="15"></a> <a href="javascript://" rel="nofollow" onclick="window.open('/index/17','cbbcodes','scrollbars=1,width=550,height=450,left=0,top=0');return false;" title="BB-Коды"><img alt="" border="0" align="absmiddle" src="http://s36.ucoz.net/img/fr/mcb.gif" width="13" height="15"></a> <a href="javascript://" rel="nofollow" onclick="window.open('/mchat/0-1','mchatCtrl','scrollbars=1,width=550,height=550,left=0,top=0');return false;" title="Управление сообщениями"><img alt="" border="0" align="absmiddle" src="http://s36.ucoz.net/img/fr/mcm.gif" width="15" height="15"></a> </td></tr></table> <table border="0" cellpadding="1" cellspacing="1" width="100%"> <tr><td width="95%" rowspan="2"><textarea name="mcmessage" class="mchat" id="mchatMsgF" title="Сообщение" onkeyup="countMessLength();" onfocus="countMessLength();" style="height:40px;width:100%;resize:none;"></textarea></td> <td align="center" valign="top"><div style="font-size:10px;"><b id="jeuwu28">200</b></div></td> </tr><tr><td align="center" valign="bottom"> <input type="image" src="/cr/OK.png" value="OK" class="mchat" id="mchatBtn" style="width:30px;"> <img alt="" style="display:none;" id="mchatAjax" src="http://s36.ucoz.net/img/fr/ajax3.gif" border="0" width="16"> </td></tr></table> |
|
RikudoAdmin,
Quote (RikudoAdmin) но тогда не посылается сообщение, просто обновляется стр! Quote (RikudoAdmin) <form style="margin:0;padding:0;" id="MCaddFrm" onsubmit="sbtFrmMC991();return false;"> Quote (fflesh) Копируй код и скрипты из исходника ... ... Где функция sbtFrmMC991();? ... Уж проще скролл переделать ) ... Всё написанное выше - моё личное мнение и на абсолютную правоту не претендует.
Есть вопросы лично ко мне - пиши сюда: http://likbezz.ru/forum/8 Сообщение отредактировал fflesh - Вторник, 03 Апр 2012, 18:07:11
|
|
Quote (fflesh) Уж проще скролл переделать ) вот если бы я знал как скролл под чат переделать! В инете куча примеров, но они все для эммуляции скролла в обычных div блоках А чат то как не крути, даже стандартно на ucoz во фрейме загружается! |
| |||
Будьте в курсе всех обновлений: подпишитесь на наш официальный Telegram-канал uCoz и задавайте вопросы в чате сообщества!

Чат сообщества

вот проблемная стр 



