Skip to content

Instantly share code, notes, and snippets.

View bhwebworks's full-sized avatar

John Sundberg bhwebworks

View GitHub Profile
@bhwebworks
bhwebworks / gist:1692058
Created January 28, 2012 01:53
Contact Form original lines of code (78-85)
if ($user->get('id') || ($viewnow == 'category' && $viewcache == 0)) {
$view->display();
} else {
$option = JRequest::getCmd('option');
$cache =& JFactory::getCache($option, 'view');
$cache->get($view, 'display');
}
}
@bhwebworks
bhwebworks / gist:1692086
Created January 28, 2012 02:01
Contact form Invalid Token patch
if ($user->get('id') || ($viewnow == 'category' && $viewcache == 0)) {
$view->display();
} else {
+
+ // Workaround for token caching
+ if ($viewName == 'contact')
+ {
+ ob_start();
+ }
+
@bhwebworks
bhwebworks / gist:1695981
Created January 28, 2012 22:22
Standard copyright information
© Copyright 2009, [Your Company Name]. All rights reserved
@bhwebworks
bhwebworks / gist:1695991
Created January 28, 2012 22:23
Current year as PHP date variable
<?php echo date('Y');?>
@bhwebworks
bhwebworks / gist:1695997
Created January 28, 2012 22:24
Copyright text with current year as PHP date variable
&copy; 2009-<?php echo date('Y');?>, [Your Company Name]. All rights reserved
@bhwebworks
bhwebworks / gist:1696003
Created January 28, 2012 22:25
Copyright text as PHP variable
<div id="copyright" >
&copy; <?php echo $copyright_text; ?>
</div>
@bhwebworks
bhwebworks / gist:1696007
Created January 28, 2012 22:26
Copyright text with current year as PHP date variable
&copy; Copyright 2009-<?php echo date('Y');?>, [Your Company Name]. All Rights Reserved
@bhwebworks
bhwebworks / gist:1696012
Created January 28, 2012 22:27
HTML and PHP as entered in PHP module
<div style="text-align: center;">
&copy; Copyright 2009-<?php echo date('Y');?>, Black Hills Web Works. All Rights Reserved
</div>
@bhwebworks
bhwebworks / gist:1696074
Created January 28, 2012 22:49
Default code in error.php
defined( '_JEXEC' ) or die( 'Restricted access' );
?>
@bhwebworks
bhwebworks / gist:1696076
Created January 28, 2012 22:50
Modified code in error.php
defined( '_JEXEC' ) or die( 'Restricted access' );
if (($this->error->code) == '404') {
header('Location: http://blackhillswebworks.com/404');
exit;
}
?>