Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Mick. on November 25, 2008, 09:04:08 AM

Title: Page Reload Mod
Post by: Mick. on November 25, 2008, 09:04:08 AM



Page Reload Mod 1.1.1.1
Display a warning message at the top of the forum, if a new pm is recieved.
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1492) | Comment On This Mod (http://www.simplemachines.org/community/index.php?action=post;topic=242233.0)

Author: Nas (http://custom.simplemachines.org/mods/index.php?action=profile;u=143954)
Type: Feature Enhancement (http://custom.simplemachines.org/mods/index.php?action=search;type=2)
Available since: November 1 2008
Latest version: 1.1.1.1
Compatible with: SMF 1.1.x, SMF 2.0 RC1.2, SMF RC2
Available languages: (https://www.simplemachines.org/site_images/lang/english.gif)



What does it do?
Page Reload Mod allows you to make the forum reload automaticlly every xxx second to show updates (In topics etc).

How to use
To use Page Reload Mod, download the package from the SMF customization site (http://custom.simplemachines.org/mods/index.php?mod=1492), and install it via your Package Manger (http://docs.simplemachines.org/index.php?topic=95).
It should display to all members when they recieve a new PM. You can also change the CSS style* in the ACP.

* = Settings are located in
Admin > Modifications (2.0 RC1.2)
Admin > Features & Settings > Basic settings (1.1.x)


Support & comments
If you have a problem with this mod, want to comment, or have any question, please post to the modification support topic (http://www.simplemachines.org/community/index.php?action=post;topic=242233.0) and I will reply as soon as possible.

Other information
Translation of this mod
o I am always happy to get translations of my work so that more users can use it. If you have translated this modification, please post the translation in the support topic (http://www.simplemachines.org/community/index.php?action=post;topic=242233.0).
Please make sure you have translated everything, and that there are no spelling misstakes etc.
Also, please post both a non-UTF8 version and a UTF8 version.
Ad providers
o Some advertising providers do not allow pages where their ads are displayed to reload automatically.
You should check your ad providers agreements before installing this mod.

Changelog
1.1.1.1 | August 28 2009
*  Added support for SMF 2.0 RC1.2.[/size]
1.1.1 | May 23 2009
*  Added support for SMF 2.0 RC1-1.[/size]
1.1 | Mars 17 2009
*  Added support for SMF 2.0 RC1.[/size]
1.0 | October 31 2008
$ Mod was submitted to the SMF Mod Site.





Changelog legend
+ New feature
- Feature removal
! Bugfix
> New language
< Removed language
* New version support
$ Initial release / Big update

Versionnames
Format: $.o.x.!
Example: 3.2.4.1

$ New version
o New features added
x Bugfix
! Small bugfix / New version support


Passed versions of this mod
1.1.1
1.1
1.0

Title: Re: Page Reload Mod
Post by: jossanaijr on November 25, 2008, 09:52:22 AM
Thank you Nascar!
Working fine!
Title: Re: Page Reload Mod
Post by: Costa on November 25, 2008, 12:06:47 PM
Someone tell me you need a portuguese and brazilian translation  :P

modifications.portuguese.php
// Start Reload Page mod by Nascar
$txt['reload_time']='Tempo de espera entre cada recarregamento da página <div class="smalltext">Em segundos, deixe em branco para desligar. <br /></div>';
// End Reload Page mod by Nascar


modifications.portuguese_utf-8.php
// Start Reload Page mod by Nascar
$txt['reload_time']='Tempo de espera entre cada recarregamento da p&aacute;gina <div class="smalltext">Em segundos, deixe em branco para desligar. <br /></div>';
// End Reload Page mod by Nascar


modifications.portuguese_brazilian.php
// Start Reload Page mod by Nascar
$txt['reload_time']='Tempo de espera entre cada recarregamento da página <div class="smalltext">Em segundos, deixe em branco para desligar. <br /></div>';
// End Reload Page mod by Nascar


modifications.portuguese_brazilian_utf-8.php
// Start Reload Page mod by Nascar
$txt['reload_time']='Tempo de espera entre cada recarregamento da p&aacute;gina <div class="smalltext">Em segundos, deixe em branco para desligar. <br /></div>';
// End Reload Page mod by Nascar


Nascar, good job Dude  ;D
Title: Re: Page Reload Mod
Post by: Marcus Forsberg on November 25, 2008, 12:08:29 PM
Thanks for the comment an translation :)
I'll add it when I have my computer fixed, I'm on my mothers computer currenty ;)
Title: Re: Page Reload Mod
Post by: jossanaijr on November 25, 2008, 12:17:57 PM
Nascar,
it's working fine but a notice 2 things:

when you are in a board, or child board, it reloads to main index.php.
Also if you are using quick reply you lost it and also goes to main page.

But it is working fine and stops working, if you are using reply or creating a new topic. Great.
Also it reloads to current page if you are looking who's on line, messages, stats... Great!
Title: Re: Page Reload Mod
Post by: neil h on November 28, 2008, 02:54:45 PM
Hi Nascar,

I've had something like this on my SMF wish-list for a long time!

Unfortunately, I cannot seem to get the mod to work for me. I have installed to the defaults, made edits to my custom theme, and set the reload in 'Basic Features'  to 30 seconds, 60 seconds and 100 seconds, but the page is not reloading for me.

I'm on v.1.1.7 and my theme is RT Versatility.

any advice?

Neil
Title: Re: Page Reload Mod
Post by: Marcus Forsberg on November 28, 2008, 03:13:32 PM
May I have a link to your site and a copy of your custom theme file?
Title: Re: Page Reload Mod
Post by: neil h on November 28, 2008, 05:16:13 PM
Quote from: Nascar on November 28, 2008, 03:13:32 PM
May I have a link to your site and a copy of your custom theme file?

My URL is:
frameforum dot org slash forum3 slash index dot php

Can I PM you a URL for zipped theme file, or do you only need the index tempate?

Thanks,

Neil
Title: Re: Page Reload Mod
Post by: Marcus Forsberg on November 29, 2008, 04:32:18 AM
Quote from: neil h on November 28, 2008, 05:16:13 PM
Quote from: Nascar on November 28, 2008, 03:13:32 PM
May I have a link to your site and a copy of your custom theme file?

My URL is:
frameforum dot org slash forum3 slash index dot php

Can I PM you a URL for zipped theme file, or do you only need the index tempate?

Thanks,

Neil

I only need index.template.php
Also, where there any errors during installation?
Title: Re: Page Reload Mod
Post by: neil h on November 29, 2008, 04:40:08 AM
Hi nascar,

Nope, everything installed seamlessly, and the theme i'm using is very 'mod friendly' in that it uses a lot of default functions. It ought to be working, but it's not!

Here's the index template, before and after modding.
Title: Re: Page Reload Mod
Post by: slinouille on November 30, 2008, 08:51:03 AM
Hello!
Thank you for the mod :-)

Here is my French translation :

$txt['reload_time']='Rafraichissement de la page toutes les <div class="smalltext"> secondes. Ne rien pr&eacute;ciser pour d&eacute;sactiver. <br /></div>';

Just for information concerning the install2.xml, I have errors when installing. Here are the lines I've modified.

<search position="before"><![CDATA[// Show right to left and the character set for ease of translating.]]></search>

<search position="before"><![CDATA[// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!]]></search>

Thank you

Bye

SliN
Title: Re: Page Reload Mod
Post by: jossanaijr on December 03, 2008, 08:51:39 AM
Quote from: jossanaijr on November 25, 2008, 12:17:57 PM
when you are in a board, or child board, it reloads to main index.php.
Also if you are using quick reply you lost it and also goes to main page.
Hi Nascar,
is there a way to fix this?

EDIT: Also I have the problem with action=chat
Title: Re: Page Reload Mod
Post by: Sudhakar Arjunan on December 03, 2008, 05:33:07 PM
Good Mod.
Title: Re: Page Reload Mod
Post by: Marcus Forsberg on December 04, 2008, 12:51:38 AM
Quote from: jossanaijr on December 03, 2008, 08:51:39 AM
Quote from: jossanaijr on November 25, 2008, 12:17:57 PM
when you are in a board, or child board, it reloads to main index.php.
Also if you are using quick reply you lost it and also goes to main page.
Hi Nascar,
is there a way to fix this?

EDIT: Also I have the problem with action=chat

If I remove the reload for qucik reply, the topics will not reload either.
Just add 'chat', among the other actions in index.template.php.
Title: Re: Page Reload Mod
Post by: jossanaijr on December 04, 2008, 05:17:15 AM
Quote from: Nascar on December 04, 2008, 12:51:38 AM
Quote from: jossanaijr on December 03, 2008, 08:51:39 AM
Quote from: jossanaijr on November 25, 2008, 12:17:57 PM
when you are in a board, or child board, it reloads to main index.php.
Also if you are using quick reply you lost it and also goes to main page.
Hi Nascar,
is there a way to fix this?

EDIT: Also I have the problem with action=chat

If I remove the reload for qucik reply, the topics will not reload either.
Just add 'chat', among the other actions in index.template.php.
Hi Nascar,
chat solved.  Added and working (not reloading).
What do you mean with "topics will not reload"?
For me it will be okay if it does not reload when member is reading any board or topic.
Title: Re: Page Reload Mod
Post by: Marcus Forsberg on December 04, 2008, 09:43:21 AM
Thw quickreply is inside each topic. If we do not want the quickreply to reload, the topic won't reload either, and the point of the mod is broken.
Title: Re: Page Reload Mod
Post by: neil h on December 04, 2008, 09:50:39 AM
I'm just trying to get the board index to refresh every couple of minutes, but i can't figure out why the mod is no working for me...  :(
Title: Re: Page Reload Mod
Post by: jossanaijr on December 04, 2008, 01:15:06 PM
Are you using Vista, XP...?
This week I opened the site in one old PC with Windows 2000 and it did not work.
Title: Re: Page Reload Mod
Post by: cleanfiles on December 26, 2008, 09:57:17 PM
Can this be used to reload the Whos online page only? Thats the only page I would like to use something like this.
Title: Re: Page Reload Mod
Post by: Marcus Forsberg on December 27, 2008, 05:12:41 AM
Which SMF version are you using, cleanfiles?
Title: Re: Page Reload Mod
Post by: barryc on December 28, 2008, 04:06:40 AM
1.1.7 Aqua theme does not work. But if I switch to the core theme it does.  :-\ Any Ideas?
Title: Re: Page Reload Mod
Post by: Marcus Forsberg on December 28, 2008, 05:15:44 AM
Welcome to SMF, barryc!

Yes, one idea. :) Attach index.template.php, located in ./Themes/aqua/ and I will do the proper edits for you :)

Happy holidays
Nascar
Title: Re: Page Reload Mod
Post by: barryc on December 28, 2008, 05:29:00 AM
Ok I will give me a few minutes to find what it is your asking for.
Title: Re: Page Reload Mod
Post by: barryc on December 28, 2008, 05:34:45 AM
Thanks for the welcome and the help,,,I have tried for days to figure it out,,,I just have nt  had enough experience yet.
Title: Re: Page Reload Mod
Post by: Marcus Forsberg on December 28, 2008, 05:46:11 AM
Try this file.

Happy holidays
Nascar
Title: Re: Page Reload Mod
Post by: barryc on December 28, 2008, 05:54:34 AM
Wow,,,,,,,That took all of 10 minutes,,,it works great. If you ever have a broken home appliance you can always come see us. appliancerepairhelp dot net,,its free. I don t know what else to say. I m shocked and happy.  :D

I really appreciate the help.
Thank you.
Title: Re: Page Reload Mod
Post by: Marcus Forsberg on December 28, 2008, 05:55:36 AM
I'm just glad to be able to help :)
Title: Re: Page Reload Mod
Post by: barryc on December 28, 2008, 06:00:12 AM
Oh thats just perfect,,,working great. Now there is one for aqua 1.1.7. woohooo.
Title: Re: Page Reload Mod
Post by: cleanfiles on January 17, 2009, 09:00:08 PM
Quote from: Nas on December 27, 2008, 05:12:41 AM
Which SMF version are you using, cleanfiles?
Im using smf 1.1.7 thanks. :)
Title: Re: Page Reload Mod
Post by: Marcus Forsberg on January 18, 2009, 05:00:42 AM
index.template.php:

Code (Find) Select
// No refreshing if you are in any of these actions
$no_refresh_actions = array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers', 'post', 'profile');

// We are good to go - If the refreshing is enabled, and we are not in any of the above actions, that is.
   if (!empty($modSettings['reload_time']) && !in_array($context['current_action'], $no_refresh_actions))
header("Refresh: {$modSettings['reload_time']}; url={$scripturl}?{$_SERVER['QUERY_STRING']}");


Code (Replace whit) Select


// Only refresh if you are in one of these actions
$refresh_actions = array('who');

// We are good to go - If the refreshing is enabled, and we are in any of the above actions, that is.
   if (!empty($modSettings['reload_time']) && in_array($context['current_action'], $refresh_actions))
header("Refresh: {$modSettings['reload_time']}; url={$scripturl}?{$_SERVER['QUERY_STRING']}");


Add other actions into array('who');, like:
array('who', 'profile');

If you like to refresh other actions.

Title: Re: Page Reload Mod
Post by: cleanfiles on January 18, 2009, 04:24:58 PM
Thanks for the reply, before I start though, by the looks of the changes there i need the mod installed first then make these changes right? :)
Title: Re: Page Reload Mod
Post by: Marcus Forsberg on January 18, 2009, 04:45:29 PM
Yes.
Title: Re: Page Reload Mod
Post by: cleanfiles on January 18, 2009, 04:55:57 PM
Ok I installed the mod and made the edits to the theme, then made your changes and it works just right on Firefox and IE. Thank you, now I can get rid of the Firefox plugin. Great work and great support. :)
Title: Re: Page Reload Mod
Post by: Marcus Forsberg on January 18, 2009, 05:07:11 PM
Glad you enjoyed it ;)
Title: Re: Page Reload Mod
Post by: ttuu on February 07, 2009, 04:05:51 PM
I want users to be able to configure themselves to run if the auto-refresh or not.
Is that possible?
Title: Re: Page Reload Mod
Post by: Marcus Forsberg on February 08, 2009, 03:08:15 AM
Should be. Bump me if I don't respond within a week.
Title: Re: Page Reload Mod
Post by: ttuu on March 17, 2009, 07:04:04 AM
Quote from: Nas on February 08, 2009, 03:08:15 AM
Should be. Bump me if I don't respond within a week.
any news?
Title: Re: Page Reload Mod
Post by: TW1ST3D on March 17, 2009, 04:49:51 PM
Quote from: cleanfiles on December 26, 2008, 09:57:17 PM
Can this be used to reload the Whos online page only? Thats the only page I would like to use something like this.

X 2
Title: Re: Page Reload Mod
Post by: billis_2 on March 18, 2009, 01:09:50 PM
Hi. :)

Any way to the Quick Reply?
Do not refresh when posted with Quick Reply!
Title: Re: Page Reload Mod
Post by: ttuu on April 04, 2009, 07:38:13 PM
Quote from: Nas on February 08, 2009, 03:08:15 AM
Should be. Bump me if I don't respond within a week.
Forget it?
Title: Re: Page Reload Mod
Post by: Marcus Forsberg on April 13, 2009, 06:39:29 AM
Sorry for the long delay!

@ttuu
I'll add this feature as soon as I have enough time.

@ billis_2
That might be a hard one if you still want to refresh posts.

@ TW1ST3D
Look back in this topic, the solution has been found for this.
Title: Re: Page Reload Mod
Post by: markettwain on May 14, 2009, 07:01:28 PM
I love the mod, Nas!

Would you be so kind as to post the edits necessary so that only the who's online and main index page reload? I'm using 2.0 RC1.

Thanks!

:)

EDIT: Well I was able to answer my own question and I got things working in RC1. Today I upgraded to RC1.1 and the mod says it's incompatible. Is there a way to make it work?
Title: Re: Page Reload Mod
Post by: Marcus Forsberg on August 28, 2009, 10:38:22 AM
Changelog
1.1.1.1 | August 28 2009
*  Added support for SMF 2.0 RC1.2.[/size]
Title: Re: Page Reload Mod
Post by: Sudhakar Arjunan on August 28, 2009, 05:03:35 PM
such an excellent work.

Keep up this good work author.
Title: Re: Page Reload Mod
Post by: tonnybarros on August 30, 2009, 10:02:45 PM
Hello, as I do not update the page in the topic? I tried to include more topics that code did not work.

// No refreshing if you are in any of these actions
$no_refresh_actions = array('admin', 'post', 'profile');


// No refreshing if you are in any of these actions
$no_refresh_actions = array('admin', 'post', 'profile', 'topic');
Title: Re: Page Reload Mod
Post by: TheListener on September 04, 2009, 01:46:29 PM
Installed with no errors.

Saves a manual page refresh now.

Well done Nas.
Title: Re: Page Reload Mod
Post by: Sudhakar Arjunan on September 08, 2009, 02:19:56 PM
good work nas.

Thanks for this efficient mod.
Title: Re: Page Reload Mod
Post by: TurtleKicker on November 12, 2009, 04:40:10 PM
Any ETA on an RC2 update? Thanks. :)
Title: Re: Page Reload Mod
Post by: Marcus Forsberg on November 13, 2009, 03:20:46 AM
This weekend, hopefully, sremick.
Title: Re: Page Reload Mod
Post by: Mick. on March 09, 2010, 12:11:49 AM
Updated for RC3 ;)
Title: Re: Page Reload Mod
Post by: marwan on September 22, 2010, 04:10:03 AM
Installed this mod on my RC3. Uninstalled it after it kept reloading all forum pages in an annoying way. Still it keeps reloading all pages even after uninstallation. Any idea to clean things up?
Title: Re: Page Reload Mod
Post by: cemix on February 02, 2011, 09:51:06 PM
Turkish Translation

Modifications.turkish.php
// Start Reload Page mod by Nas
$txt['reload_time']='Her sayfayý saniye içinde yeniden yükleyin. <div class="smalltext">Devre dýþý býrakmak için boþ býrakýn.<br /></div>';
// End Reload Page mod by Nas


Modifications.turkish-utf8.php
// Start Reload Page mod by Nas
$txt['reload_time']='Her sayfayı saniye içinde yeniden yükleyin. <div class="smalltext">Devre dışı bırakmak için boş bırakın.<br /></div>';
// End Reload Page mod by Nas


Thank you for the mod.
Title: Re: Page Reload Mod
Post by: the-wanted on February 03, 2011, 04:30:30 AM
Thanks for the mod

Swedish Translation
// Start Reload Page mod by Nas
$ txt ['reload_time'] = 'Väntetid mellan varje sida <div class="smalltext"> Inom några sekunder lämna blankt för att stänga. <br /> </ div> ';
// End Reload Page mod by Nas
Title: Re: Page Reload Mod
Post by: Tiensg on August 17, 2012, 10:37:55 AM
// No refreshing if you are in any of these actions$no_refresh_actions = array('admin', 'post', 'profile');

Why does it still refresh when I have already added 'topic' into the list of array?

Please advise.