Your Cart is currently empty!
Product update
Coupon
add
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:

www.YOURDOMAIN.com/templates/TEMPLATE_NAME/

So if you're using SJ Hexagon the full path after uploading the file will read as:
www.yourdomain.com/templates/sj_hexagon/offline.php


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:

<?php

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

$app = JFactory::getApplication();
$uri = JURI::getInstance();
jimport('joomla.factory');


// 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>
<html>
<head>
	<jdoc:include type="head" />
	<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,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="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
</head>
<body>
	<div id="yt-Page">
	    <div id="yt-PageTop">
		     <?php 
			 if (!$app->getCfg('offline_image')) :  
				if($logo_image!=''):
					$url = JURI::base().$logo_image;
				else:
					if(is_file('templates/'.$this->template.'/images/styling/'.$themecolor.'/logo.png')){
						$url = JURI::base()."templates/".$this->template.'/images/styling/'.$themecolor.'/logo.png';
					}
				endif;
			?>
					<a class="logo" href="" title="<?php echo $app->getCfg('sitename'); ?>">
						<img src="<?php echo $url; ?>" alt="<?php echo $app->getCfg('sitename'); ?>"   />
					</a>
			<?php else : ?>
                      <a href="./" class="logo">
                            <img src="<?php echo $app->getCfg('offline_image'); ?>" alt="<?php echo $app->getCfg('sitename'); ?>" />
                       </a>
             <?php endif; ?>
			 
			
        </div>
		<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>
		                  <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>
											<div class="form-group">
												  <input type="password" name="password" class="form-control" placeholder="<?php echo JText::_('JGLOBAL_PASSWORD') ?>" id="passwd" />
											</div>
											
											
											<div class="buttons">
												  <input type="submit" name="Submit" class="btn btn-sm btn-success" value="<?php echo JText::_('JLOGIN') ?>" />
											</div>
											<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>
						  </div>
		           
					</div>
		      </div>
	      </div>
	</div>
</body>
</html>


Attachment demo-off.png not found

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

Notification

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
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes