phpBB2 by Przemo
Support forów phpBB2 modified by Przemo

FAQFAQ - PIERWSZA POMOC!!  regulaminREGULAMIN  SzukajSZUKAJ  UżytkownicyUżytkownicy  GrupyGrupy  StatystykiStatystyki
RejestracjaRejestracja  ZalogujZaloguj  DownloadDownload  katalog Forów DyskusyjnychKatalog Forów   FAQ Video tutoriale

Poprzedni temat «» Następny temat
Use AJAX to refresh shoutbox????
Autor Wiadomość
petekin74

Posty: 79
Wysłany: 04-08-2006, 14:47   Use AJAX to refresh shoutbox????

Im using przemo 1.2.5

I asked this in the bottom of a post a while ago and never got a responce. So just fiqured I would try it again.

Does anybody know if it is possible to use AJAX to automatically refresh the shoutbox on a przemo forum. And if yes, maybe they could give a example.

Thanks
 
     
Gadatliwa Kasia 

   
Crack



Pomógł: 136 razy
Posty: 1442
Wysłany: 19-08-2006, 17:50   

Why AJAX? Adding a META refresh header will make your browser refresh shoutbox automatically. If you insist on using JS, I would recomend simple refreshing function combined with a timeout will suffice - much simplier, more backwards compatible and smaller code. An example in pseudo-JS (should be put below iframe code in the document):
Kod:
function shoutbox_refresh()
{
  // get shoutbox iframe and refresh it
  document.getElelementById('shoutbox_iframe_id').refreshItSomehow;
  // call this function again in 10 seconds
  setTimeout(10000, shoutbox_refresh);
}
// call shoutbox_refresh() in 10 seconds
setTimeout(10000, shoutbox_refresh);
_________________
[ DumpLoader 1.0 ] [ Spider Friendly 1.3.12 Google Sitemaps 1.4 ]
[ Tanuki: recenzje anime | forum ]
 
     
petekin74

Posty: 79
Wysłany: 19-08-2006, 18:13   

can you give me a example of the meta refresh header?
 
     
irekk


Pomógł: 283 razy
Posty: 2927
Wysłany: 19-08-2006, 21:48   

please, next time use google

Kod:
<meta http-equiv="refresh" content="10">

10 - time in seconds
_________________
Cygantura
 
     
petekin74

Posty: 79
Wysłany: 21-08-2006, 03:33   

ok, I put that in between the <iframe> tags, but it doesnt seem to be working. If I move it out of there it refreshes the whole board. Any ideas where this should go.
 
     
azwel


Pomógł: 41 razy
Posty: 402
Wysłany: 28-08-2006, 15:38   

petekin74, put it in the shoutbox file not index.
_________________
Bezpłatnie pomagam na forum. Jeśli to za mało to zapraszam do skorzystania z płatnych usług.
 
     
petekin74

Posty: 79
Wysłany: 28-08-2006, 16:28   

which one?

I have
admin_shoutbox.php
shoutbox_body.tpl
shoutbox_config_body.tpl
shoutbox_view_body.tpl
shoutbox_view.php
shoutbox.php
 
     
azwel


Pomógł: 41 razy
Posty: 402
Wysłany: 28-08-2006, 18:46   

shoutbox_view_body.tpl
_________________
Bezpłatnie pomagam na forum. Jeśli to za mało to zapraszam do skorzystania z płatnych usług.
 
     
petekin74

Posty: 79
Wysłany: 28-08-2006, 18:48   

Thank you
 
     
mafoo

Posty: 2
Wysłany: 28-10-2006, 22:26   

I know this isn't supported anymore but if some one could help me it would be appreciated. If not completely understand. When I use a metatag refresh on shoutbox_view.php I get this error:

Kod:
Warning: Cannot modify header information - headers already sent by (output started at D:\***\***\wwwroot\forum\shoutbox_view.php:4) in D:\***\***\wwwroot\forum\includes\sessions.php on line 367


I am using an iframe to display it and plan on having it on many different pages :D
 
     
azwel


Pomógł: 41 razy
Posty: 402
Wysłany: 29-10-2006, 13:06   

mafoo, put it in the shoutbox_view_body.tpl in head section, below this
Kod:
<meta http-equiv="Content-Style-Type" content="text/css">

So it should look like that:
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">
 <meta http-equiv="refresh" content="60">
 <link rel="stylesheet" href="templates/subSilver/subSilver.css" type="text/css" />
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#5493B4" onload="window.scrollTo(0,99999);" />
 <!-- BEGIN shoutrow -->
 <table cellpadding="2" cellspacing="0" border="0" class="table0" width="100%">
  <tr>
    <td class="{shoutrow.ROW_CLASS}" width="100%"><span class="gensmall">
    <font style="font-size:9px; font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif">{shoutrow.DELMSG} {shoutrow.EDITMSG} {shoutrow.DATE} </font>
    <b>{shoutrow.NAME}: </b>{shoutrow.MSG}</span></td>
  </tr>
 </table>
<!-- END shoutrow -->
</body>
</html>
_________________
Bezpłatnie pomagam na forum. Jeśli to za mało to zapraszam do skorzystania z płatnych usług.
 
     
Gadatliwa Kasia 

   
excess

Posty: 16
Wysłany: 03-04-2007, 17:22   

Hey, apologies for posting in an old thread, but i have used the META tag to refresh my shoutbox on the forum, and a user has reccomended an option to turn this off, i am not very experianced in the modifying of phpbb.

Is there any way i could edit the shoutbox to (if i set a profile option to have auto refresh on) read the mySQL database and determine whether it refreshed itself or not.

Thanks
- Rob.
_________________
Napij się herbaty :)
 
     
Wyświetl posty z ostatnich:   
Odpowiedz do tematu
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Możesz załączać pliki na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Kopiowanie wszelkich treści zawartych na forum, modyfikacji oraz instrukcji bez zgody administracji i autorów tematów/postów zabronione!

Powered by phpBB modified by Przemo © 2003 phpBB
Strona wygenerowana w 0,39 sekundy. Zapytań do SQL: 7
Polecane serwisy

Najlepsze oprogramowanie do prowadzenia sklepu internetowegoNajlepszy program do sklepu firmowany przez Przem'a

Sklep z gadżetami

Design Cart - Tworzenie sklepu internetowego

iRonin.IT

https://nabea.pl

• Zamów reklamę