Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Mesages And Board Auto refresh (Read 10605 times)
GQfresh
New Member
*
Offline


I Love YaBB 2!

Posts: 14
Joined: Aug 6th, 2013
Mesages And Board Auto refresh
Aug 6th, 2013 at 2:38pm
Print Post  
Would anyone know how to have the forum/messages and board auto refresh, viewed a previous mod/code adjustment that allows for refreshing messages  and boards  , it actually is pretty simple, however the files used  (messageindex.pl and Boardindex.pl ) seem to differ from the current version used in 2.5.2.

The mod:
Last update 2007

<id>
Refresh boards
</id>

<version>
1.1
</version>

<mod info>
This mod refreshes the message index automatically by however many seconds you want (90 is default) to show new messages.  Extremely simple, but nice to have.
Version 1.1 - Now refreshes BoradIndex too.
</mod info>

<author>
jazzfan123 SP1 By Ken Ault
</author>



<edit file>
Sources\MessageIndex.pl
</edit file>

<search for>
     # Print the header and board info.
     $curboardurl = $curposlinks ? qq~<a href="$cgi" class="nav">$boardname</a>~ : $boardname;
     $yymain .= qq~
<table width="100%" cellpadding="0" cellspacing="0">
</search for>

<add after>
     <meta http-equiv="refresh" content="90">
</add after>

<edit file>
Sources\BoardIndex.pl
</edit file>

<search for>
 <tr>
   <td align="left">
     <font size="1" class="nav"><IMG SRC="$imagesdir/open.gif" BORDER="0" alt=""><b>$curforumurl</b></font>
</search for>

<add before>
     <meta http-equiv="refresh" content="90">
</add before>

Not able to find the code on either Messageindex.pl or Boardindex.pl

In YaBB 2.5.2 the code seems to be different, can anyone help with this. Your help is appreciated, thank you. Smiley
  
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Mesages And Board Auto refresh
Reply #1 - Aug 6th, 2013 at 3:50pm
Print Post  
Hi GQfresh,

In BoardIndex.pl find:

Code
Select All
    &template;
}

sub GetBotlist { 


And add before:

Code
Select All
    $yyinlinestyle .= qq~<meta http-equiv="refresh" content="90" />~; 


And in MessageIndex.pl find:

Code
Select All
    &template;
}

sub MarkRead { # Mark all threads in this board as read. 


And add before:

Code
Select All
    $yyinlinestyle .= qq~<meta http-equiv="refresh" content="90" />~; 

  
Back to top
 
IP Logged
 
GQfresh
New Member
*
Offline


I Love YaBB 2!

Posts: 14
Joined: Aug 6th, 2013
Re: Mesages And Board Auto refresh
Reply #2 - Aug 6th, 2013 at 4:38pm
Print Post  
Hey Derek,
will try it, thank you for taking the time, very much appreciated.
  
Back to top
 
IP Logged
 
GQfresh
New Member
*
Offline


I Love YaBB 2!

Posts: 14
Joined: Aug 6th, 2013
Re: Mesages And Board Auto refresh
Reply #3 - Aug 6th, 2013 at 5:10pm
Print Post  
Hey Derek, seems to be working, Again very much appriciated.
  
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Mesages And Board Auto refresh
Reply #4 - Aug 6th, 2013 at 6:23pm
Print Post  
No problem. Smiley
  
Back to top
 
IP Logged
 
GQfresh
New Member
*
Offline


I Love YaBB 2!

Posts: 14
Joined: Aug 6th, 2013
Re: Mesages And Board Auto refresh
Reply #5 - Aug 6th, 2013 at 10:49pm
Print Post  
Thanks to Dandello for helping in adding this.

This may help, (messageindex.pl and Boardindex.pl ) in the initial post after modification,  will refresh the boards and messages.

To refresh the forum,
(Any page you are on in the forum it seems to update)

This Code/Mod seems to work
( with out having to edit (messageindex.pl and Boardindex.pl)).

Code for forum refresh.

Edit File "Subs.pl"

(Code Location: Somewhere in the top half of the file Subs.pl)

Find Code:
$yystyle .= $yyinlinestyle; # This is for the Help Center and anywhere else that wants to add inline CSS.

After Code Add:
$yystyle .= q~<meta http-equiv="refresh" content="90" />~;

Smiley

Either or, both Mods  seems to be working.

Hope both codes help, Enjoy the day.
  
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Mesages And Board Auto refresh
Reply #6 - Aug 6th, 2013 at 11:01pm
Print Post  
Dandello - Why did you do that over PM rather than post here? Huh

Anyway, that code will refresh the post page too - you don't really want to refresh the post page when someone is in the middle of typing a post. Wink

Edited:
Among other reasons, you also wouldn't want to refresh the page when users are reading posts, and a lot of pages don't even have content updated so it is not needed.

There was a reason why it only refreshed the board and message indexes.
  
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Mesages And Board Auto refresh
Reply #7 - Aug 6th, 2013 at 11:12pm
Print Post  
It will make editing and saving profile fields pretty impossible as well...

Edited:
Another thing, Dandello - to refresh every page it could have just been added to the template file, rather than edit source code and push it with a variable.
  
Back to top
 
IP Logged
 
GQfresh
New Member
*
Offline


I Love YaBB 2!

Posts: 14
Joined: Aug 6th, 2013
Re: Mesages And Board Auto refresh
Reply #8 - Aug 6th, 2013 at 11:24pm
Print Post  
Would it be able to work more efficiently if the time length was set longer?
  
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Mesages And Board Auto refresh
Reply #9 - Aug 6th, 2013 at 11:29pm
Print Post  
GQfresh wrote on Aug 6th, 2013 at 11:24pm:
Would it be able to work more efficiently if the time length was set longer?

Not in my view. How do you know how long it will take someone to read/post a message, edit their profile etc.

But it's your forum and I'm not here to pass personal judgment. Smiley
  
Back to top
 
IP Logged
 
GQfresh
New Member
*
Offline


I Love YaBB 2!

Posts: 14
Joined: Aug 6th, 2013
Re: Mesages And Board Auto refresh
Reply #10 - Aug 6th, 2013 at 11:37pm
Print Post  
Your input is appreciated, asking to find out the best solution, the pointed out downfalls are true.  Smiley

Sometimes users are idle on various pages, wanted them to get an update if some one sent  a pm or  there was a new post on the board. With out the user having to click anything.
  
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Mesages And Board Auto refresh
Reply #11 - Aug 6th, 2013 at 11:52pm
Print Post  
GQfresh wrote on Aug 6th, 2013 at 11:37pm:
Sometimes users are idle on various pages, wanted them to get an update if some one sent  a pm or  there was a new post on the board. With out the user having to click anything.

Then you should find that the board and message indexes are enough. The meta tag auto-refresh is a pretty old fashioned way of updating content, and I think you'll find that most users will find it annoying. But, like I say, I'm not here to pass personal judgment, only to help people get things working as they wish.

Have a think about which pages you want to auto-refresh, and if you think of any just post back and Dandello or myself will try to help you with it. Smiley
  
Back to top
 
IP Logged
 
GQfresh
New Member
*
Offline


I Love YaBB 2!

Posts: 14
Joined: Aug 6th, 2013
Re: Mesages And Board Auto refresh
Reply #12 - Aug 7th, 2013 at 12:02am
Print Post  
Thanks, will do.   Smiley
  
Back to top
 
IP Logged
 
GQfresh
New Member
*
Offline


I Love YaBB 2!

Posts: 14
Joined: Aug 6th, 2013
Re: Mesages And Board Auto refresh
Reply #13 - Aug 7th, 2013 at 12:38am
Print Post  
On the top of the page on each page it will say Good Evening Member  when logged in.

Underneath it show messages
You have 11 messages, 4 are new.

Is it possible to have that section update it self automatically, so if a pm message is sent , it will say, you have 11 messages and 6 new messages.

The section would auto-update it self.

If the user is idle or left their computer and went to the store.
When they get back it would have updated, not disturbing the users activity.

Smiley


  
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Mesages And Board Auto refresh
Reply #14 - Aug 7th, 2013 at 1:07am
Print Post  
That's not so easily done I'm afraid.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint