PDA

View Full Version : refresh index.php


cyrus
01-07-2002, 05:19 PM
How can I make the index.php file refresh every 2-3 minsutes ... just liek how the online.php refreshes ?

Thanks

JTMON
01-07-2002, 10:04 PM
I would be interested in this too as long as it isn't going to refresh when replying etc...

StarBuG
01-07-2002, 10:11 PM
The easiest way to do a refresh is with a meta tag in the header like:

<meta http-equiv="refresh" content="120; URL=index.php">

there must be a much more comfortable way but maybe it helps a little! :D

Greetings

StarBuG

cyrus
01-07-2002, 11:11 PM
the meta tag wouldnt be that good I think. I need something like the online.php which has a refres hthingy built into it !

also, when I say refresh, I mean ONLY the index.php, because if you make other .php's refresh ... it would mess up posting msgs and reading threads.

Any one else got any ideas ?

Admin
01-08-2002, 12:58 PM
online.php also uses a meta tag.

scouser
02-25-2003, 10:34 PM
i was searching for this. i've seen a board (http://spf.stileproject.com/) where you can set the refresh rate in your user CP

i want that hack! where do i find it?

Erwin
02-25-2003, 10:50 PM
No need to hack.

Just make a new Custom Profile in your Admin CP, and note down the custom profile id number (not the order - look at the URL to find the id number). Make this custom profile editable by user, and call it "Refresh rate in seconds".

Then, open your forumhome template.

Add this in between <head> and </head>


<meta http-equiv="refresh" content="$bbuserinfo[fieldxx]"; URL=index.php">


Replace xx with the id number of the custom profile field. There you go. :) Not tested, but should work. The user can edit his profile to edit that custom profile and enter the refresh rate in seconds.

If that doesn't work, you may have to hack index.php -

Open index.php and below

<?

Just add:


if (!$bbuserinfo[fieldxx]) {
$bbuserinfo[fieldxx]="yy";
}


Replace xx with the profile id number.
Replace yy with the default refresh rate if someone hasn't changed it.

Again, untested, but should work.

scouser
02-25-2003, 10:57 PM
thanks, i'll try this

Davey
02-26-2003, 01:48 AM
I would use the 2nd method since if the custom profile field isn't added, it wont refresh.
Mind you, that could be handy, no?
"Leave blank if you don't want page to refresh"?
Or not..?

Dave.