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
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
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
echo'
<meta http-equiv="refresh" content="xx; url=',$scripturl,'">';
xx should be replaced with the time,that you wish...
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
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
echo'
<meta http-equiv="refresh" content="xx; url=',$scripturl,'">';
:D
[
xx should be replaced with the time,that you wish...[/b]
Hey buddy,
IT REALLY WORKS!!!!!!!!! You Are GREAT!!!! THANK YOU!!!
Hey Duncan, I needed this also and it works brilliantly. Simple but effective.
Thanks for the tip.
Thank you,
It works perfect! ;)
Hi. Is there a way to isolate just the index page and unread topics page for auto-refresh?
Thanks.
Quote from: Rehash D Internet on January 29, 2009, 06:33:03 PM
Hi. Is there a way to isolate just the index page and unread topics page for auto-refresh?
Thanks.
I've found where to put the code in Recent.php but when it refreshes it takes me back to the index. How can I alter this?
Quote from: Rehash D Internet on January 29, 2009, 06:33:03 PM
Hi. Is there a way to isolate just the index page and unread topics page for auto-refresh?
Thanks.
For unread topics page you should do that
in Themes/default/Recent.template.php
function template_unread()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
function template_unread()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
echo'
<meta http-equiv="refresh" content="xx; url=',$scripturl,'?action=unread">';
again xx should be replaced with your desired auto-refresh time
Cheers pal, I got it through trial and error.
Many thanks! Mark to find later ^^
Don't go marking topics with useless (to everyone else) posts. You just clutter up the boards that way. Bookmark the page/add to Favorites if it's something you want to keep close at hand.