• Welcome to Simple Machines Community Forum. Please login or sign up.
October 16, 2021, 11:23:21 PM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


Auto Refresh

Started by mitelforums, July 29, 2021, 10:04:56 AM

Previous topic - Next topic

mitelforums

I would like to do a refresh of the webpages and return to the main page every 30 minutes.
I.E. <meta http-equiv="refresh" content="1800; url=http://<mywebsite>/forum">';
I want to do this from the topic pages as well as the individual board indexs.

When digging into my question, I found this related page:  https://www.simplemachines.org/community/index.php?topic=271746.0

I was able to make it work on the main page by editing Boardindex.template.php but I can't figure which files to edit for the individual boards or topics.

What other files do I need to edit?

Thanks.

Kindred

first question: Why?   What perceived problem do you think you will solve by doing this?

second question: Why?  (as a user, this would **REALLY** piss me off)
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mitelforums

Because that's what I want.  ;)
Prior to having upgraded that's the way it worked since 2012.  No user ever complained.  As a matter of fact, the refresh allows the user, (esp moderators) to keep the website up and see that there are new topics or topic updates at a quick glance.

Steve

Quote from: mitelforums on July 29, 2021, 01:28:07 PMAs a matter of fact, the refresh allows the user, (esp moderators) to keep the website up and see that there are new topics or topic updates at a quick glance.

Seems like a lot of work to do what can be accomplished by the user in one click. But, as you said:

Quote from: mitelforums on July 29, 2021, 01:28:07 PMBecause that's what I want.  ;)
Please do not PM me for support.

Kindred

are you trying to just force a refresh of the page that they are on or bounce them back to the index?

If it's just a refresh of their page -- then you would NOT do it in boardindex....   you'd do it in the base index.template.php and use the variable to populate the URL instead of a fixed URL.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mitelforums

July 29, 2021, 04:33:05 PM #5 Last Edit: July 29, 2021, 05:31:11 PM by mitelforums
Quoteare you trying to just force a refresh of the page that they are on or bounce them back to the index?

Yes!  That's exactly what I want to do. After 30 minutes, bounce back to the index.

I thought I did that.  It seems to work if the page is already on the main index.  I'll check again to be sure I edited the right file but this is what I put in:
Quote// Output any remaining HTML headers. (from mods, maybe?)
   echo $context['html_headers'];

   echo '
<meta http-equiv="refresh" content="1800; url=http://<website>/forum/" >
</head>
<body>';

Kindred

holy crap...    you actually want to bounce them back to the main index?? ?? ?? ??

That is, far and above, one of the most stupid ideas I have ever heard of.

I am surprised that you still have any users, if you had this implemented before.   As I initially said, this would piss me off beyond belief.

What happens if a user is in the middle of reading a post/thread... steps away and comes back to find that the screen has reset, losing their last read spot?
Even worse... what happens if a user is in the middle of WRITING a post... steps away and comes back to find that the screen has reset -- LOSING EVERYTHING THEY JUST WROTE??

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Mike66

Firstly, I must agree with Kindred, as a user in the middle of posting a reply, that would very much annoy me!

But, for what you are trying to achieve, can I suggest checking out the SMFPacks Activity Stream mod. I have used this on my forum in the past and it works very well and is almost 'real time'.

Cheers
Mike

efk

Quote from: Kindred on July 29, 2021, 05:22:52 PM
holy crap...    you actually want to bounce them back to the main index?? ?? ?? ??

That is, far and above, one of the most stupid ideas I have ever heard of.

I am surprised that you still have any users, if you had this implemented before.   As I initially said, this would piss me off beyond belief.

What happens if a user is in the middle of reading a post/thread... steps away and comes back to find that the screen has reset, losing their last read spot?
Even worse... what happens if a user is in the middle of WRITING a post... steps away and comes back to find that the screen has reset -- LOSING EVERYTHING THEY JUST WROTE??
I completely agree on this, losing long post just because of what?

Quote from: mitelforums on July 29, 2021, 04:33:05 PM
Quoteare you trying to just force a refresh of the page that they are on or bounce them back to the index?

Yes!  That's exactly what I want to do. After 30 minutes, bounce back to the index.

I thought I did that.  It seems to work if the page is already on the main index.  I'll check again to be sure I edited the right file but this is what I put in:
mitelforums do you offer to your users refund in case they break their computer? Something like this might be better solution if its about only to refresh so your moderators can see new posts (in case if they are not capable to check with 2-3 clicks every 10-20 minutes) https://custom.simplemachines.org/mods/index.php?mod=2198

shadav

i'm confused, if it's just to see what new posts there might be, you can just click on the show unread posts since last visit

mitelforums

thank you everyone for your comments. 
I didn't realize that there would be such a passion about the issue.
I'll poll my users to see if they share the same concerns.

Thanks.


shadav

sorry I can't really help, was just trying to understand

but if it's something that you want you can try posting in the Help Wanted (not for support)
make sure to read this post before posting there: The Help Wanted Board - Please Read this Topic Before Posting Here

[edit] if that's how you had it set up before, if you have a backup from then you can use a program like winmerge and compare the old files with your new files and see if you can find the difference for the refresh

Mick.

You could try this one. Its outdated and I have not updated this since 2010 since really no one uses it lol but if you use our parser, you can quickly see the few edits.

It does not refresh within profile, post and admin.  Oh and I think it has admin settings.

https://custom.simplemachines.org/mods/index.php?mod=1492


Steve

I'll give you props, mitelforums, for taking the criticisms above onboard and not being offended by them. They weren't meant as offense so good on you.

Even the 'stupidest idea' remark by my boss who can be a little, okay, a lot, blunt at times. He absolutely has a valid point and I'll be shocked if your forum members feel otherwise. :)
Please do not PM me for support.

Advertisement: