PDA

View Full Version : [RELEASE vB2.0] Auto Refresh 2.0


PeF
15 Mar 2001, 11:31
Description:
This hack will automatically refresh index.php page after 1, 2, 3, 5 or 10 minute(s) or it can be turned off in a user profile.

vBulletin versions supported:
2.0 Beta 3

Files to edit:
member.php, index.php

Templates to modify:
2 - forumhome, modifyoptions, modifycoppa, registeradult, registercoppa

Number of new queries:
0

Number of new templates:
1

Size:
1,52KB

Demo:
N/A

Known bugs and issues:
No known.

Instructions:
Included in the attached ZIP file.

15 Mar 2001, 11:41
I think it would be good if the admin can allow or disallow the use of this opion.

15 Mar 2001, 12:59
Agreed. Working on it. :)

15 Mar 2001, 14:34
Nice hack. :)

15 Mar 2001, 18:54
Don't understand the fonction of the hack...
it's for people who stay manymany time on the index page?:)

16 Mar 2001, 04:31
Yes. If you have opened index.php and you're waiting for new posts you needn't to press refresh icon in a browser.

16 Mar 2001, 12:36
Ah okkkkk :D

18 Mar 2001, 03:07
Originally posted by Fryzid
I think it would be good if the admin can allow or disallow the use of this opion.

No offense, but if you are going to just disallow it, then why install it? It's not as if it's built-in to the system; you actually have to take time to install it before it's even there. I don't understand. :confused:

18 Mar 2001, 09:05
it says like this
6. Edit modifycoppa, registeradult and registercoppa the same way as modifyoptions

and my modifycoppa looks like this

<p>To print out a new permissions form, please click the button below:</p>

<form action="member.php" method="post"><input type="hidden" name="s" value="$session[sessionhash]">
<input type="hidden" name="action" value="coppaform">
<input type="hidden" name="username" value="$username">
<input type="hidden" name="password" value="$password">
<input type=submit value="Display permissions form">
</form>

where should i put the code in there

18 Mar 2001, 19:02
I allready did this on my page by using a simple meta tag on the index.php .. but tnx for the hack

20 Mar 2001, 13:15
Nice hack

20 Mar 2001, 15:19
Installed on www.flash-france.com/forums/
Thx pef

Tw|ZteR
03 Apr 2001, 20:57
does this work in Beta 1 ?

jojo85
03 Apr 2001, 21:01
Originally posted by Tw|ZteR
does this work in Beta 1 ?

with all beta :)

X-PhoeniX
04 Apr 2001, 06:24
Originally posted by tubedogg


No offense, but if you are going to just disallow it, then why install it? It's not as if it's built-in to the system; you actually have to take time to install it before it's even there. I don't understand. :confused: I can think of many times when I want to turn it off.

Let's say it's normally on. But your data has growen too large.. You would to turn the things that have a large impact on the data off, this way you can turn it temporarily off until next month.

Do you see my point? It just would be a nice option. Mabey alot of people wouldn't use it, but anywayz..

tubedogg
04 Apr 2001, 08:19
OK I can see that. :)

boombai
16 Apr 2001, 00:56
3. New templates

************************************************
* forumhome_autorefresh
************************************************

<meta http-equiv="Refresh" content="$refreshtime; URL=index.php?s=$session[sessionhash]">




where do i put that?:)

Wayne Luke
16 Apr 2001, 01:11
You make a new template and put the appropriate code in it.

boombai
16 Apr 2001, 05:34
so i make a forumhome_autorefresh.php and put that in there?
:)

boombai
17 Apr 2001, 18:19
Originally posted by -=WTFxP=-
it says like this
6. Edit modifycoppa, registeradult and registercoppa the same way as modifyoptions

and my modifycoppa looks like this

<p>To print out a new permissions form, please click the button below:</p>

<form action="member.php" method="post"><input type="hidden" name="s" value="$session[sessionhash]">
<input type="hidden" name="action" value="coppaform">
<input type="hidden" name="username" value="$username">
<input type="hidden" name="password" value="$password">
<input type=submit value="Display permissions form">
</form>

where should i put the code in there



im wondering the same thing... p.s. how do i set the refresh time after i do that above?

lichtflits
27 May 2001, 09:44
works this hack also in the full 2.0 version?

PeF
27 May 2001, 17:56
I'm between jobs and I currently don't have time to rewrite those hacks. They'll be available within 14 days.

JGraham9382
31 May 2001, 23:57
Just a little note...something else you could do is add:

<META HTTP-EQUIV="Refresh" content="180;URL=#">

to your header. It seems to work very well for me, the only problem that I have had, is that when I get people that take over 3 minutes to write a post it refreshes and they have to hit the back button (They can pick up where they left off)....but other than that it pretty much does the same thing. You can change the content="X to however many seconds you want. Just something that I thought was a lot quicker.

Spawn182
01 Jun 2001, 10:40
Added an autoupdate template to forumdisplay and forumhome, works great for me.

What's the function of "$session[sessionhash]" in this line of code

<meta http-equiv="Refresh" content="$refreshtime; URL=index.php?s=$session[sessionhash]">

THX

webhost
03 Jun 2001, 04:09
Where do I place script in this template, it does not look like ther rest. Here is the coppa file.


<p>To print out a new permissions form, please click the button below:</p>

<form action="member.php" method="post">
<input type="hidden" name="s" value="$session[sessionhash]">
<input type="hidden" name="action" value="coppaform">
<input type="hidden" name="username" value="$username">
<input type="hidden" name="password" value="$password">
<input type="submit" class="bginput" value="Display permissions form" accesskey="s">
</form>

<p>When you make changes to this profile, you Parent/Guardian will be notified by email.
If you are over the age of 13, you should not be seeing this message.
Please contact the <a href="mailto:$webmasteremail">administrator</a> with your username,
and your account will be changed.</p>


Here is the code that needs to be included,

<TR bgcolor="{firstaltcolor}">
<td><normalfont><b>Automatic refresh</b></normalfont><br><smallfont>Automatic refresh of the main forum page in minutes. If you don't want this feature, select off.</smallfont></TD>
<TD valign=top><select name="autorefresh">
<option value="-1" $autorefreshdefaultselected>Off</option>
<option value="60" $autorefresh60selected>1 minute</option>
<option value="120" $autorefresh120selected>2 minutes</option>
<option value="180" $autorefresh180selected>3 minutes</option>
<option value="240" $autorefresh240selected>4 minutes</option>
<option value="300" $autorefresh300selected>5 minutes</option>
<option value="600" $autorefresh600selected>10 minutes</option>
</select> </TD>
</tr>

webhost
03 Jun 2001, 04:57
I have everything done except the modifycoppa template, I have uploaded and ran the file update.php and deleted it. It shows up now under users options, I select say 5 minutes and when I hit submit I get this error.

There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.


I went and looked at my database the autorefresh field is in the user table.
Setup like this.

Field-autorefresh
type-smallint
length/set- 6
not null
default -1

I can change the default in my database and go back to the forum and it works but when I change it inside the vb option page I get the error.

any suggestions are help would be appreciated.

Joey


Report this

webhost
03 Jun 2001, 06:36
Ok got it working. I still need some help with modification of the modifycoppa template though if someone could help?

Joey

PeF
19 Jun 2001, 12:20
I'm forced to say I have to leave this community for some time due to my new job and some projects I work for (and of course my personal life). This all means I won't be able to rewrite my hacks as promised so if anyone is interested in the rewrite, just go ahead. You'll find links to my old hacks in my signature.
I apologize for any inconveniences.

ztsky
19 Jul 2001, 16:49
this don't need a hack ,just a template edit.
in header template:
add this code:
<meta http-equiv="refresh" content="100">




content="100" is the time in second that you can set for refresh.

webhost
19 Jul 2001, 16:53
Yes you could do that but this hack gives the member the option of setting there own refresh time not the board owner. I like that better, no one can get pissed off at you that way.

ztsky
19 Jul 2001, 17:07
Originally posted by webhost
Yes you could do that but this hack gives the member the option of setting there own refresh time not the board owner. I like that better, no one can get pissed off at you that way.

aha.
Maybe you are right.:p

Sia Bani
10 Oct 2002, 05:17
Hello all. Where would i go add this: <meta http-equiv="refresh" content="100"> to make the search result of "new posts" to automatically refresh?

I like leaving my "newpost" results open and have it refresh automatically. Thanks

Sia Bani
10 Oct 2002, 08:34
Originally posted by Sia Bani
Hello all. Where would i go add this: <meta http-equiv="refresh" content="100"> to make the search result of "new posts" to automatically refresh?

I like leaving my "newpost" results open and have it refresh automatically. Thanks

nevermind..it does it! great hack. nicelly done.