News:

Wondering if this will always be free?  See why free is better.

Main Menu

Page Reload Mod

Started by Mick., November 25, 2008, 09:04:08 AM

Previous topic - Next topic

Mick.




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 | Comment On This Mod

Author: Nas
Type: Feature Enhancement
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:



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, and install it via your Package Manger.
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 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.
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


jossanaijr

Thank you Nascar!
Working fine!

Costa

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
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

Marcus Forsberg

Thanks for the comment an translation :)
I'll add it when I have my computer fixed, I'm on my mothers computer currenty ;)

jossanaijr

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!

neil h

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

Marcus Forsberg

May I have a link to your site and a copy of your custom theme file?

neil h

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

Marcus Forsberg

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?

neil h

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.

slinouille

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
Visit VAG-Technique.fr
Take a look to my mods

jossanaijr

#11
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

Sudhakar Arjunan

Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Marcus Forsberg

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.

jossanaijr

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.

Marcus Forsberg

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.

neil h

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

jossanaijr

Are you using Vista, XP...?
This week I opened the site in one old PC with Windows 2000 and it did not work.

cleanfiles

Can this be used to reload the Whos online page only? Thats the only page I would like to use something like this.

Marcus Forsberg

Which SMF version are you using, cleanfiles?

barryc

1.1.7 Aqua theme does not work. But if I switch to the core theme it does.  :-\ Any Ideas?

Marcus Forsberg

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

barryc

Ok I will give me a few minutes to find what it is your asking for.

barryc

Thanks for the welcome and the help,,,I have tried for days to figure it out,,,I just have nt  had enough experience yet.

Marcus Forsberg

Try this file.

Happy holidays
Nascar

barryc

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.

Marcus Forsberg

I'm just glad to be able to help :)

barryc

Oh thats just perfect,,,working great. Now there is one for aqua 1.1.7. woohooo.

cleanfiles

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

Marcus Forsberg

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.


cleanfiles

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? :)

Marcus Forsberg


cleanfiles

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

Marcus Forsberg


ttuu

I want users to be able to configure themselves to run if the auto-refresh or not.
Is that possible?

Marcus Forsberg

Should be. Bump me if I don't respond within a week.

ttuu

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?

TW1ST3D

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
Running 2.0 Gold.......SMF Rocks!!

billis_2

Hi. :)

Any way to the Quick Reply?
Do not refresh when posted with Quick Reply!

ttuu

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?

Marcus Forsberg

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.

markettwain

#41
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?

Marcus Forsberg

Changelog
1.1.1.1 | August 28 2009
*  Added support for SMF 2.0 RC1.2.[/size]

Sudhakar Arjunan

such an excellent work.

Keep up this good work author.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

tonnybarros

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');

TheListener

Installed with no errors.

Saves a manual page refresh now.

Well done Nas.

Sudhakar Arjunan

good work nas.

Thanks for this efficient mod.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

TurtleKicker

Any ETA on an RC2 update? Thanks. :)

Marcus Forsberg

This weekend, hopefully, sremick.

Mick.


marwan

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?

cemix

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.

the-wanted

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

Tiensg

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

Advertisement: