Your Cart is currently empty!
Product update
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest

Do you want your own Offline page?
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Do you want your own Offline page?

Do you want your own Offline page? 7 years, 5 months ago #25671

We are web designers and as we hate the bog-standard offline page we decided to spice it up a little. The following script can be used on most Joomla templates.

All you do is copy the text in the attached txt document and save it as offline.php and upload it to your website in the following directory:

So if you're using SJ Hexagon the full path after uploading the file will read as:

Then after uploading, just go to your admin page and head to global configuration and turn your site offline using custom message. Whatever you type as your custom message will read directly below the "Account Login" text.

Enjoy - any problems please message me.

Full offline.php script - do not edit anything on the script - just upload it and it works fine:


 * offline view
 * @version        3.0.0
 * @website
 * @copyright	  Copyright (C) 2015 simpleServeUK. All rights reserved.
// No direct access.
defined('_JEXEC') or die;

$app = JFactory::getApplication();
$uri = JURI::getInstance();

// get necessary template parameters
$templateParams = JFactory::getApplication()->getTemplate(true)->params;
$pageName = JFactory::getDocument()->getTitle();

// get logo configuration
$logo_image = $templateParams->get('overrideLogoImage');
$themecolor	= $templateParams->get('themecolor')

<!DOCTYPE html>
	<jdoc:include type="head" />
	<link href=',600,700' rel='stylesheet' type='text/css'/>
	<link rel="stylesheet" href="<?php echo JURI::base(); ?>templates/<?php echo $this->template; ?>/asset/bootstrap/css/bootstrap.min.css" type="text/css" />
	<link rel="stylesheet" href="<?php echo JURI::base(); ?>templates/<?php echo $this->template; ?>/css/offline.css" type="text/css" />
	<script src=""></script>
	<div id="yt-Page">
	    <div id="yt-PageTop">
			 if (!$app->getCfg('offline_image')) :  
					$url = JURI::base().$logo_image;
						$url = JURI::base()."templates/".$this->template.'/images/styling/'.$themecolor.'/logo.png';
					<a class="logo" href="" title="<?php echo $app->getCfg('sitename'); ?>">
						<img src="<?php echo $url; ?>" alt="<?php echo $app->getCfg('sitename'); ?>"   />
			<?php else : ?>
                      <a href="./" class="logo">
                            <img src="<?php echo $app->getCfg('offline_image'); ?>" alt="<?php echo $app->getCfg('sitename'); ?>" />
             <?php endif; ?>
		<div id="yt-PageWrap">     
		     <div id="frame">
		            <div class="login-panel panel panel-default">
						<div class="panel-heading">
								<h3 class="panel-title">Account Login</h3>
		                  <div class="panel-body">
								<form action="index.php" method="post" name="login" id="form-login">
								<p class="login-text"><?php echo $app->getCfg('offline_message'); ?></p>
									<jdoc:include type="message" />
									  <fieldset >
											<div class="form-group">
												  <input name="username" id="username" type="text" class="form-control" placeholder="<?php echo JText::_('JGLOBAL_USERNAME') ?>"  />
											<div class="form-group">
												  <input type="password" name="password" class="form-control" placeholder="<?php echo JText::_('JGLOBAL_PASSWORD') ?>" id="passwd" />
											<div class="buttons">
												  <input type="submit" name="Submit" class="btn btn-sm btn-success" value="<?php echo JText::_('JLOGIN') ?>" />
											<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'); ?>

Attachment demo-off.png not found

Last Edit: 7 years, 5 months ago by ericgrant.
  • Page:
  • 1
Time to create page: 0.34 seconds


Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon code invalid! Please re-enter!
AJAX loader
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes