Support Online: Mon - Fri / 08:00am - 05:00pm (GMT +7)
Your Time: Our Time:

question-circle Offline page

More
8 years 5 months ago #8846 by Stephy Crespo
Offline page was created by Stephy Crespo
How can i modify the Offline page?

Please Log in or Create an account to join the conversation.

More
8 years 5 months ago - 8 years 5 months ago #8851 by Sang Manh
Replied by Sang Manh on topic Offline page
Hi stephycrespo,
Thanks for contacting us and choosing our product!
About your question, you can change it by following steps:
Step 1: add new offline.php file.
Copy the file offline.php in folder templates/system then paste to templates/t3_bs3_blank

Step 2: Customize Offline page
Open this file and customize it as you want the Offline page to be.
You can define which CSS file that the page will use.
<link rel="stylesheet" href="/<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/offline.css" type="text/css" />

You can create new css file for Offline page but we suggest to copy the default joomla offline.css file in templates/system/css then paste to templates/t3_bs3_blank/css/ folder.

You can define each theme to use a css file so that each theme will have different style for Offline page.
<?php if($theme && is_file(T3_TEMPLATE_PATH . '/css/themes/' . $theme . '/offline.css')) : ? >
<link rel="stylesheet" href="/<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/themes/<?php echo $theme ?>/offline.css" type="text/css" />
<?php endif; ?>

<?php
defined('_JEXEC') or die;
$app = JFactory::getApplication();
$theme = JFactory::getApplication()->getTemplate(true)->params->get('theme', '');
//check if t3 plugin is existed
if(!defined('T3')){
if (JError::$legacy) {
JError::setErrorHandling(E_ERROR, 'die');
JError::raiseError(500, JText::_('T3_MISSING_T3_PLUGIN'));
exit;
} else {
throw new Exception(JText::_('T3_MISSING_T3_PLUGIN'), 500);
}
}

$t3app = T3::getApp($this);
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns=" www.w3.org/1999/xhtml " xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="/<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/offline.css" type="text/css" />
<?php if($theme && is_file(T3_TEMPLATE_PATH . '/css/themes/' . $theme . '/offline.css')): ? >
<link rel="stylesheet" href="/<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/themes/<?php echo $theme ?>/offline.css" type="text/css" />
<?php endif; ?>
<?php
// T3 BASE HEAD
$t3app->addHead();?>
</head>
<body>

<div id="frame" class="outline">
<div class="offline-page">
<?php if ($app->getCfg('offline_image') && file_exists($app->getCfg('offline_image'))) : ?>

<img src="/<?php echo $app->getCfg('offline_image'); ?>" alt="<?php echo htmlspecialchars($app->getCfg('sitename')); ?>" />
<?php endif; ?>

<div class="brand">
<a href="/\index.php" title="<?php echo htmlspecialchars($app->getCfg('sitename')); ?>"><?php echo htmlspecialchars($app->getCfg('sitename')); ?></a>
</div>

<div class="offline-message">
<?php if ($app->getCfg('display_offline_message', 1) == 1 && str_replace(' ', '', $app->getCfg('offline_message')) != ''): ?>
<p>
<?php echo $app->getCfg('offline_message'); ?>
</p>
<?php elseif ($app->getCfg('display_offline_message', 1) == 2 && str_replace(' ', '', JText::_('JOFFLINE_MESSAGE')) != ''): ?>
<p>
<?php echo JText::_('JOFFLINE_MESSAGE'); ?>
</p>
<?php endif; ?>
</div>

<div class="login-form">
<form action="<?php echo JRoute::_('index.php', true); ?>" method="post" id="form-login">

<fieldset class="input">
<div class="wrap-input">
<p id="form-login-username">
<input name="username" id="username" type="text" class="inputbox" alt="<?php echo JText::_('JGLOBAL_USERNAME') ?>" size="18" placeholder="<?php echo JText::_('JGLOBAL_USERNAME') ?>" />
</p>

<p id="form-login-password">
<input type="password" name="password" class="inputbox" size="18" alt="<?php echo JText::_('JGLOBAL_PASSWORD') ?>" id="passwd" placeholder="<?php echo JText::_('JGLOBAL_PASSWORD') ?>" />
</p>
<?php if (count($twofactormethods) > 1) : ?>
<p id="form-login-secretkey">
<label for="secretkey"><?php echo JText::_('JGLOBAL_SECRETKEY') ?></label>
<input type="text" name="secretkey" class="inputbox" size="18" alt="<?php echo JText::_('JGLOBAL_SECRETKEY') ?>" id="secretkey" />
</p>
<?php endif; ?>
</div>

<?php if (JPluginHelper::isEnabled('system', 'remember')) : ?>
<p id="form-login-remember">

<input type="checkbox" name="remember" class="inputbox" value="yes" alt="<?php echo JText::_('JGLOBAL_REMEMBER_ME') ?>" id="remember" />
<label for="remember"><?php echo JText::_('JGLOBAL_REMEMBER_ME') ?></label>
<input type="submit" name="Submit" class="button" value="<?php echo JText::_('JLOGIN') ?>" />
</p>
<?php endif; ?>


<input type="hidden" name="option" value="com_users" />
<input type="hidden" name="task" value="user.login" />
<input type="hidden" name="return" value="<?php echo base64_encode(JURI::base()) ?>" />
<?php echo JHtml::_('form.token'); ?>
</fieldset>
</form>

<jdoc:include type="message" />
</div>

</div>
</div>
</body>
</html>

The css files of Offline page in each theme is located in templates/t3_bs3_blank/css/themes/theme_name/

Note:
The CSS files are NOT overridden when you compile LESS to CSS.

Hope this help!
Best regards,
SM

Sang Manh
Last edit: 8 years 5 months ago by Sang Manh.

Please Log in or Create an account to join the conversation.

More
8 years 5 months ago #8859 by Stephy Crespo
Replied by Stephy Crespo on topic Offline page
There is no way to change it through the backend of joomla?

I just want to change the text and the background picture

Please Log in or Create an account to join the conversation.

More
8 years 5 months ago #8860 by Sang Manh
Replied by Sang Manh on topic Offline page
Hi stephycrespo,
Thanks for your feedback,
About your question, you can change it by following steps:
Step1: Login to the backend
Step 2: Go to System - > Global Configuration. You will see Custom Message and Offline Image. It is text and picture of offline page.
If you want to change background image of site, you should write code in custom.css.
Hope this help!
Thanks!

Sang Manh

Please Log in or Create an account to join the conversation.

Moderators: Jackie
Time to create page: 0.045 seconds
Powered by Kunena Forum