TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 136
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 96
  • Total: 96

Maintenance mode - smf native message

Started by lebisol, October 30, 2007, 05:37:19 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

lebisol

Hello all,
I was wondering what is the string that shows SMF 'native' message for maintenance mode...the one that users enter as they put forum in maintenance mode.
Currently I see that custom message (default theme)
$txt[616] = 'Remember, this forum is in \'Maintenance Mode\'.';
is being used but I would prefer that message is pulled from SMF 'settings'? vs. being hardcoded.
Many thanks!

IchBin

Man.. I swear when I came to this site it was called tinyportal.co.uk and not simplemachines.org... :D

G6Cad


lebisol

...man I sware without SMF there would be no TP :D
I can't find it on SMF :'( that is why I am posting here
I am trying to improve TP...and using hardcoded message is not really the 'best way to integrate'...as intutivly user would type the message in the same place (core configuration) where they toggle maintanance mode (image that) and enter the message -the default message of
QuoteOkay faithful users...we're attempting to restore an older backup of the database...news will be posted once we're back!
Don't you agree that TP should pull that message?
Ok I am a newbie enough with the  :knuppel2:  :P

IchBin

Why would TP need to pull the maintenance mode message?

lebisol

Doesn't it depend on smf running and not being in mmaintenance mode or can u have forum in maintenance while TP runs alone?
...I don't know...I saw the message in default template so I thought of improving it....I promiss I don't know just don't hit me for asking :D
Thanks IchBin!

IchBin

TP uses the SMF maintenance mode. If the forum is in maintenance mode, so is TP. I don't get what you're asking about.

lebisol

Ok, I am working with default template so my 'knowledge base' comes from it.
In this template when you put the maintenance mode oon 'index.template.php' is displayed by pulling this text string
$txt[616] = 'Remember, this forum is in \'Maintenance Mode\'.';
from "Themes/Theme/languages/index.template.php"
which is different from the message that user can enter by going to:
Admin --> Configuration --> Server Settings [Core Configuration]

so maybe we need to call SSI for "maintenance_message.php" or something where ever this message is "stored".

It is just a thought...not sure if it is worth the effort....

IchBin

Yes, the two are different because they are different messages for different places. $txt[616] is for the message in the userinfo box. The one from the admin settings page is for the main message for other users when they view the site in maintenance mode. Not sure where to grab it, but you're probably looking for that message in the $settings array. And from here on you are on your own because this is SMF related and not TP.

jacortina

What you're looking for are $mtitle and $mmessage.

When you madify them in the Admin Panel, lines for them are written out to the Setting.php file (remember, the DB might not be available while maintenance mode is in effect).

So, when index.php does its "require_once(dirname(__FILE__) . '/Settings.php');" it pulls in lines which say "$mtitle = '<the mtitle text>';" and "$mmessage = '<the mmessage text>';" and if you add those two variables to your "global" line, you can see their values.

This website is proudly hosted on Crocweb Cloud Website Hosting.