To jest tylko wersja do druku, aby zobaczyć pełn± wersję tematu, kliknij TUTAJ
phpBB2 by Przemo
Support forów phpBB2 modified by Przemo

Poszukiwania - Auto Refresh do Shoutboxa v1.2 by Matti

iPlayCS - 01-11-2012, 18:12
Temat postu: Auto Refresh do Shoutboxa v1.2 by Matti
Tak jak w temacie, na swoim mam podany shoutbox ale musze przyciskiem od¶wieżać nowe wiadomo¶ci a chciałbym żeby się same od¶wieżały, jak to dodać?
Pozdrawiam

kooza - 02-11-2012, 16:34

http://www.przemo.org/php...pic.php?t=23323
iPlayCS - 02-11-2012, 18:20

A można zrobic żeby od¶wieżał sie jak kto¶ cos napisze? Bo tak jak sie ustawi np. 20 sekund i co¶ się zacznie pisać jak jest 5 sekund do od¶wieżenia to sie usuwa to co sie napisało, i to troche głupie...
Arcil - 03-11-2012, 09:25

Hej, nie za bardzo rozumiem jak to zrobić, dlatego pytam, czy mógłby kto¶ edytować mi kod, aby chat od¶wieżał się co 15 sek.?

shoutbox_view_body.tpl
Kod:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <title>ShoutBox</title>
 <link rel="stylesheet" href="templates/CounterStrikev3/{T_HEAD_STYLESHEET}" type="text/css">
</head>
<body bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#5493B4" onload="window.scrollTo(0,99999);" style="padding: 0px; margin: 0px;">
<!-- BEGIN shoutrow -->
<table cellpadding="2" cellspacing="0" border="0" class="table0" width="100%">
    <tr>
        <td class="{shoutrow.ROW_CLASS}" width="100%"><span class="gensmall" style="font-size:9px; font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif">{shoutrow.DELMSG} {shoutrow.EDITMSG} {shoutrow.DATE}</span><span class="gensmall"> {shoutrow.NAME}: {shoutrow.MSG}</span></td>
    </tr>
</table>
<!-- END shoutrow -->
<script language="JavaScript" type="text/javascript">
<!--
    if (window.parent && window.parent.document && window.parent.document.post)
        window.parent.document.post.message.value = '';
//-->
</script>
</body>
</html>




shoutbox_body.tpl
Kod:
<br>
<form name="post" action="{SHOUTBOX_URL}" method="POST" target="shout_iframe">
<table width="{SHOUTBOX_WIDTH}" align="center" cellpadding="0" cellspacing="0" border="0" class="forumline" style="border-width: 1px;">
    <tr>
        <td class="catHead" align="center" height="25"><span class="cattitle"><a href="{SHOUTBOX_URL}" class="mainmenu" title="{L_ALL_MESSAGES}">ShoutBox</a></span></td>
    </tr>
    <tr>
        <td class="row1" align="center" valign="middle"><iframe style="border-width: 1px;" name="shout_iframe" src="{SHOUTBOX_URL}" width="{SHOUTBOX_WIDTH}" height="{SHOUTBOX_HEIGHT}"></iframe></td>
    </tr>
    <tr>
        <td class="row1" align="center" valign="bottom" nowrap="nowrap"><span class="gensmall">
        {L_GG_MES}: <input type="text" name="message" style="height:17px;font-size:9px;width:360px;" size="60" maxlength="{MAXLENGHT}" value="" class="post" onFocus="Active(this)" onBlur="NotActive(this)">
 <input type="submit" name="submit_button" value="" title="{L_SEND}" class="sb_send" onclick="this.form.submit(); post.message.value=''; return false;">
          <input type="submit" name="refresh" value="" title="{L_REFRESH}" class="sb_refresh" onclick="post.message.value=''; this.form.submit();" />
          <input type="button" class="sb_emots" value="" title="Emotki" onclick="window.open('posting.php?mode=smilies', '_chatboxsmilies', 'HEIGHT=400,resizable=yes,scrollbars=yes,WIDTH=375');"/>
        <input type="hidden" name="mode" value="submit"></span></td>
    </tr>
</table>
</form>
[/code]

czesio56560 - 04-11-2012, 11:55

/shoutbox_view_body.tpl:
Kod:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<meta http-equiv="Refresh" content="15">
 <meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <title>ShoutBox</title>
 <link rel="stylesheet" href="templates/CounterStrikev3/{T_HEAD_STYLESHEET}" type="text/css">
</head>
<body bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#5493B4" onload="window.scrollTo(0,99999);" style="padding: 0px; margin: 0px;">
<!-- BEGIN shoutrow -->
<table cellpadding="2" cellspacing="0" border="0" class="table0" width="100%">
    <tr>
        <td class="{shoutrow.ROW_CLASS}" width="100%"><span class="gensmall" style="font-size:9px; font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif">{shoutrow.DELMSG} {shoutrow.EDITMSG} {shoutrow.DATE}</span><span class="gensmall"> {shoutrow.NAME}: {shoutrow.MSG}</span></td>
    </tr>
</table>
<!-- END shoutrow -->
<script language="JavaScript" type="text/javascript">
<!--
    if (window.parent && window.parent.document && window.parent.document.post)
        window.parent.document.post.message.value = '';
     if (window.parent && window.parent.document && window.parent.document.post && window.parent.document.post.autorefresh && window.parent.document.post.autorefresh.value != 'true')
        window.parent.document.post.message.value = '';
    window.parent.document.post.autorefresh.value = 'true';
//-->
</script>
</body>
</html>


/shoutbox_body.tpl :

Kod:
<br>
<form name="post" action="{SHOUTBOX_URL}" method="POST" target="shout_iframe" onsubmit="document.post.autorefresh.value='false';">
<table width="{SHOUTBOX_WIDTH}" align="center" cellpadding="0" cellspacing="0" border="0" class="forumline" style="border-width: 1px;">
    <tr>
        <td class="catHead" align="center" height="25"><span class="cattitle"><a href="{SHOUTBOX_URL}" class="mainmenu" title="{L_ALL_MESSAGES}">ShoutBox</a></span></td>
    </tr>
    <tr>
        <td class="row1" align="center" valign="middle"><iframe style="border-width: 1px;" name="shout_iframe" src="{SHOUTBOX_URL}" width="{SHOUTBOX_WIDTH}" height="{SHOUTBOX_HEIGHT}"></iframe></td>
    </tr>
    <tr>
        <td class="row1" align="center" valign="bottom" nowrap="nowrap"><span class="gensmall">
        {L_GG_MES}: <input type="text" name="message" style="height:17px;font-size:9px;width:360px;" size="60" maxlength="{MAXLENGHT}" value="" class="post" onFocus="Active(this)" onBlur="NotActive(this)">
 <input type="submit" name="submit_button" value="" title="{L_SEND}" class="sb_send" onclick="this.form.submit(); post.message.value=''; return false;">
          <input type="submit" name="refresh" value="" title="{L_REFRESH}" class="sb_refresh" onclick="post.message.value=''; this.form.submit();" />
          <input type="button" class="sb_emots" value="" title="Emotki" onclick="window.open('posting.php?mode=smilies', '_chatboxsmilies', 'HEIGHT=400,resizable=yes,scrollbars=yes,WIDTH=375');"/>
        <input type="hidden" name="mode" value="submit"><input type="hidden" name="autorefresh" value="true">
</span></td>
    </tr>
</table>
</form>



Powered by phpBB modified by Przemo © 2003 phpBB Group