Skip to content

Instantly share code, notes, and snippets.

View brookinsconsulting's full-sized avatar
😀
Creating NeXT Generation eZ Platform Software

Brookins Consulting brookinsconsulting

😀
Creating NeXT Generation eZ Platform Software
View GitHub Profile
@brookinsconsulting
brookinsconsulting / ezpublish5_community_project-2014.07.0-gpl-full--vhost-conf-mod_rewrite-rules-for-static-cache
Created September 21, 2014 18:06
Example working virtual host mod_rewrite rules configuration for serving static cache by default. Tested with ezpublish5_community_project-2014.07.0-gpl-full
RewriteEngine On
#RewriteLog "/tmp/rewrite.log"
#RewriteLogLevel 5
#
# Static cache in eZ Publish
#
# No cache for http posts
@brookinsconsulting
brookinsconsulting / kernel_patch_for_ezpublish44_lib_ezutils_for_php54.patch
Created September 17, 2014 18:38
eZ Publish 4.4 Kernel Patch to Run Using PHP 5.4 (or greater). Apply patch with these commands: cd /path/to/ez; patch -s -p0 < kernel_patch_for_ezpublish44_lib_ezutils_for_php54.patch; Forum Reference: http://share.ez.no/forums/install-configuration/php-5.4.1-no-call-method-defined-for-function
diff -ruN lib/ezutils/classes/ezmodulefunctioninfo.php lib-for-ezp44-patched-for-php-54/ezutils/classes/ezmodulefunctioninfo.php
--- lib/ezutils/classes/ezmodulefunctioninfo.php 2014-09-17 13:31:51.000000000 -0500
+++ lib-for-ezp44-patched-for-php-54/ezutils/classes/ezmodulefunctioninfo.php 2014-09-17 13:27:07.000000000 -0500
@@ -136,13 +136,13 @@
return false;
}
$functionDefinition = $this->FunctionList[$functionName];
- if ( !isset( $functionName['call_method'] ) )
+ if ( !isset( $functionDefinition['call_method'] ) )
{
@brookinsconsulting
brookinsconsulting / kernel_patch_for_ezpublish46_lib_ezutils_for_php54.patch
Created September 10, 2014 18:28
eZ Publish 4.6 Kernel Patch to Run Using PHP 5.4 (or greater). Apply patch with these commands: cd /path/to/ez; patch -s -p0 < kernel_patch_for_ezpublish46_lib_ezutils_for_php54.patch; Forum Reference: http://share.ez.no/forums/install-configuration/php-5.4.1-no-call-method-defined-for-function
diff -ruN lib/ezutils/classes/ezmodulefunctioninfo.php lib-for-ezp46-patched-for-php-54/ezutils/classes/ezmodulefunctioninfo.php
--- lib/ezutils/classes/ezmodulefunctioninfo.php 2014-09-10 13:11:28.000000000 -0500
+++ lib-for-ezp46-patched-for-php-54/ezutils/classes/ezmodulefunctioninfo.php 2014-09-10 13:03:15.000000000 -0500
@@ -112,12 +112,12 @@
return false;
}
$functionDefinition = $this->FunctionList[$functionName];
- if ( !isset( $functionName['call_method'] ) )
+ if ( !isset( $functionDefinition['call_method'] ) )
{
@brookinsconsulting
brookinsconsulting / ezpublish5_community_project-2014.07.0-gpl-full--staticcache.ini.append.php-for-static-cache
Last active August 29, 2015 14:06
Example working staticcache.ini.append.php configuration file. Tested with ezpublish5_community_project-2014.07.0-gpl-full
<?php /*
[CacheSettings]
# This setting has been deprecated since version 4.4
# Hostname is read from site.ini.[SiteSettings].SiteURL per siteaccess
# defined in staticcache.ini.[CacheSettings].CachedSiteAccesses
# This setting will be removed in future release
HostName=
StaticStorageDir=var/ezwebin_site/static
MaxCacheDepth=10
@brookinsconsulting
brookinsconsulting / ezpublish5_community_project-2014.07.0-gpl-full--htaccess-for-static-cache
Last active August 29, 2015 14:06
Example working .htaccess configuration file configured for serving static cache by default. Tested with ezpublish5_community_project-2014.07.0-gpl-full
# Copy this file to a new file called .htaccess in your eZ Publish root
# to secure your installation by turning on .htaccess based virtual host mode.
DirectoryIndex index.php
RewriteEngine On
#
# Static cache in eZ Publish
#
@brookinsconsulting
brookinsconsulting / kernel-shop-orderlist.php
Created August 28, 2014 00:07
The following is a quick and dirty way to send an email to the user informing them of an order status change. This is a kernel hack of the kernel shop module view orderlist. This solution was posted to the forums and then cleaned up here: http://share.ez.no/forums/setup-design/webshop-how-do-i-trigger-a-function-when-changing-status#comment84390
<?php
// begin snippet
if ( $http->hasPostVariable( 'SaveOrderStatusButton' ) )
{
if ( $http->hasPostVariable( 'StatusList' ) )
{
foreach ( $http->postVariable( 'StatusList' ) as $orderID => $statusID )
{
$order = eZOrder::fetch( $orderID );
@brookinsconsulting
brookinsconsulting / bcrolehaspolicykernelclassesezrole.php
Created January 21, 2012 04:13
This is a copy of the kernel/classes/ezrole.php PHP class from eZ Publish GitHub master 8a25d8730ec06cb4cbcdb9d47f13dca8b3fe9aab modified to provide hasPolicy method by default.
Name: BC Role hasPolicy Kernel Override (extension kernel override)
About this Gist
This Gist based solution graduated on 2012/01/22 to a full fledged, ready to use out of the box, eZ Publish based extension.
The extension based solution is ready to use with eZ Publish right out of the box with no additional configuration required.
Distribution
@brookinsconsulting
brookinsconsulting / settingsoverridecontentstructuremenu.ini.append.php
Created January 17, 2012 01:55
Example settings/override/contentstructuremenu.ini.append.php file which enables an additional content class
<?php /* #?ini charset="utf-8"?
[TreeMenu]
ShowClasses[]=blog
*/ ?>
@brookinsconsulting
brookinsconsulting / extensionbclayoutpatch4.6index.php.patch.diff
Created January 16, 2012 00:02
This is the patch file (diff) which adds view parameter support to ezmodule rerun calls including layout/set module view. This solution is also provided as a kernel override extension class. https://gist.github.com/1651245
1072a1073,1087
> // START EDIT BC: Add view parameter support
> $viewParameters = array();
> $uriUserParameters = $uri->userParameters();
>
> foreach( $uriUserParameters as $key => $param )
> {
> if( $param != '' )
> {
> $viewParameters = array_merge( $viewParameters, array( $key => $param ) );
@brookinsconsulting
brookinsconsulting / README.tmp.txt
Created January 14, 2012 08:15
This is a copy of a very old copy of the certify.php command line script created by eZ Systems. You can use this script to test your extension for compliance to eZ Publish (Enterprise) extension development guidelines. Also tests for extension errors ...
README.txt
Solution Name: eZP Certify Extension
Extension Identifier: ezpcertifyextension
Script Name: ezpcertifyextensionbinphpezpcertifyextension.php
About
eZP Certify Extension is an eZ Publish extension script for eZ Publish