SMF Support > SMF 1.1.x Support

Auto Refresh index.php

<< < (2/3) > >>

Rehash D Internet:
Hi. Is there a way to isolate just the index page and unread topics page for auto-refresh?
Thanks.

Rehash D Internet:

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

--- End quote ---

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?

Kermit:

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

--- End quote ---

For unread topics page you should do that

in Themes/default/Recent.template.php


--- Code: (find) ---function template_unread()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;

--- End code ---



--- Code: (replace with) ---function template_unread()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
echo'
<meta http-equiv="refresh" content="xx; url=',$scripturl,'?action=unread">';
--- End code ---


again xx should be replaced with your desired auto-refresh time

Rehash D Internet:
Cheers pal, I got it through trial and error.

Gà Mái:
Many thanks! Mark to find later ^^

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version