SMF Support > SMF 2.0.x Support
Add a message to my forum
DMR123:
Please see attached screenshot...
I currently have my forum in "maintenance mode", I would like to take it off that mode and open the forum..
The attachment is what my forum currently looks like, but I would like to add a similar box to the same location of the forum with a custom message, but with the site open rather than being in maintenance mode.
How can this be done?
Cheers
Doctor Deejay:
Hi :) Do you have a portal installed? A portal might be able to do what you are looking for :)
DMR123:
--- Quote from: 医生唱片骑师 on May 07, 2012, 03:21:12 PM ---Hi :) Do you have a portal installed? A portal might be able to do what you are looking for :)
--- End quote ---
No, I dont have a portal, I dont really like them. I prefer standard.
Is there any coding that can be added?
Doctor Deejay:
Ah, I understand. :) In that case you might want to use this code instead:
login.template.php
--- Code: (find) ---function template_login()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;
echo '
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
<form action="', $scripturl, '?action=login2" name="frmLogin" id="frmLogin" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<div class="tborder login">
<div class="cat_bar">
<h3 class="catbg">
<span class="ie6_header floatleft"><img src="', $settings['images_url'], '/icons/login_sm.gif" alt="" class="icon" /> ', $txt['login'], '</span>
</h3>
</div>
<span class="upperframe"><span></span></span>
<div class="roundframe"><br class="clear" />';
--- End code ---
--- Code: (replace) ---function template_login()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;
echo '
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
<form action="', $scripturl, '?action=login2" name="frmLogin" id="frmLogin" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<div class="tborder login" id="maintenance_mode">
<div class="cat_bar">
<h3 class="catbg">', $context['title'], '</h3>
</div>
<p class="description">
<img class="floatleft" src="', $settings['images_url'], '/construction.png" width="40" height="40" alt="', $txt['in_maintain_mode'], '" />
', $context['description'], '<br class="clear" />
</p>
<div class="tborder login">
<div class="cat_bar">
<h3 class="catbg">
<span class="ie6_header floatleft"><img src="', $settings['images_url'], '/icons/login_sm.gif" alt="" class="icon" /> ', $txt['login'], '</span>
</h3>
</div>
<span class="upperframe"><span></span></span>
<div class="roundframe"><br class="clear" />';
--- End code ---
the $context['title'], $context['description'] and the image etc may need to be edited to what you want. :)
--- Code: (something like this) ---<div class="cat_bar">
<h3 class="catbg">Login Message</h3>
</div>
<p class="description">
test message <br class="clear" />
</p>
--- End code ---
It's not me who wrote the code, though, Illori sent this to me through pm. :P
DMR123:
Thanks,
That works, but only for when the site is in construction/maintenance mode. Is there any way to do it, so that it still shows the same page, but when in that mode, it allows people to register, as currently it only allows admins to login?
Navigation
[0] Message Index
[#] Next page
Go to full version