Helpful Information
 
 
Category: vBulletin.org Forum
[RELEASE vB2.0] Auto Refresh 2.0

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.

I think it would be good if the admin can allow or disallow the use of this opion.

Agreed. Working on it. :)

Nice hack. :)

Don't understand the fonction of the hack...
it's for people who stay manymany time on the index page?:)

Yes. If you have opened index.php and you're waiting for new posts you needn't to press refresh icon in a browser.

Ah okkkkk :D

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:

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

I allready did this on my page by using a simple meta tag on the index.php .. but tnx for the hack

Nice hack

Installed on www.flash-france.com/forums/
Thx pef

does this work in Beta 1 ?

Originally posted by Tw|ZteR
does this work in Beta 1 ?

with all beta :)

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..

OK I can see that. :)

3. New templates

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

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




where do i put that?:)

You make a new template and put the appropriate code in it.

so i make a forumhome_autorefresh.php and put that in there?
:)

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?

works this hack also in the full 2.0 version?

I'm between jobs and I currently don't have time to rewrite those hacks. They'll be available within 14 days.

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.

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

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>

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

Ok got it working. I still need some help with modification of the modifycoppa template though if someone could help?

Joey

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.

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.

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.

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

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

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.










privacy (GDPR)