SMF Support > SMF 1.1.x Support
Auto Refresh index.php
Tien:
hi guys,
i understand that the auto refresh will increase the server load however i really need one for my forum.
I am using SMF 1.1.6 and I added <meta http-equiv="refresh" content="60"; url=" /> onto my indextemplate.php. It works but it refreshes not only the index page (index.php) but also refreshes all the board index. When it auto refresh, it will just redirect the current frame back to the main index page again.
The worst thing; before a user can finish typing his new post, it auto refreshed and redirected to the main index page.
Majority of my forum members requested to have an auto refresh for my forum, and I really need one.
I want only my forum main index page to auto refresh every 2 - 3minutes, but I don't want the board index to auto refresh. And I don't want the page to auto refresh when my user is typing a post.
Is there a way that I can dissolve this problem so that my forum will meets major users' requirement?
Thank you,
Tien
Kermit:
If you want,we can let just the Mainpage,also where categories are located,it wouldn't have effect on posting new messages
$themedir/BoardIndex.template.php
--- Code: (find) ---function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
--- End code ---
--- Code: (replace with) ---function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
echo'
<meta http-equiv="refresh" content="xx; url=',$scripturl,'">';
--- End code ---
xx should be replaced with the time,that you wish...
Tien:
--- Quote from: Duncan85 on November 01, 2008, 03:17:54 PM ---If you want,we can let just the Mainpage,also where categories are located,it wouldn't have effect on posting new messages
$themedir/BoardIndex.template.php
--- Code: (find) ---function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
--- End code ---
--- Code: (replace with) ---function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
echo'
<meta http-equiv="refresh" content="xx; url=',$scripturl,'">';
--- End code ---
:D
[
xx should be replaced with the time,that you wish...[/b]
--- End quote ---
Hey buddy,
IT REALLY WORKS!!!!!!!!! You Are GREAT!!!!
THANK YOU!!!
iant:
Hey Duncan, I needed this also and it works brilliantly. Simple but effective.
Thanks for the tip.
Alb4nian:
Thank you,
It works perfect! ;)
Navigation
[0] Message Index
[#] Next page
Go to full version