Skip to content

Instantly share code, notes, and snippets.

😀
Creating NeXT Generation eZ Platform Software

Brookins Consulting brookinsconsulting

😀
Creating NeXT Generation eZ Platform Software
Block or report user

Report or block brookinsconsulting

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@brookinsconsulting
brookinsconsulting / kernel-shop-orderlist.php
Created Aug 28, 2014
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
View kernel-shop-orderlist.php
<?php
// begin snippet
if ( $http->hasPostVariable( 'SaveOrderStatusButton' ) )
{
if ( $http->hasPostVariable( 'StatusList' ) )
{
foreach ( $http->postVariable( 'StatusList' ) as $orderID => $statusID )
{
$order = eZOrder::fetch( $orderID );
@brookinsconsulting
brookinsconsulting / ezpublish5_community_project-2014.07.0-gpl-full--htaccess-for-static-cache
Last active Aug 29, 2015
Example working .htaccess configuration file configured for serving static cache by default. Tested with ezpublish5_community_project-2014.07.0-gpl-full
View ezpublish5_community_project-2014.07.0-gpl-full--htaccess-for-static-cache
# 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 / ezpublish5_community_project-2014.07.0-gpl-full--staticcache.ini.append.php-for-static-cache
Last active Aug 29, 2015
Example working staticcache.ini.append.php configuration file. Tested with ezpublish5_community_project-2014.07.0-gpl-full
View ezpublish5_community_project-2014.07.0-gpl-full--staticcache.ini.append.php-for-static-cache
<?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 / kernel_patch_for_ezpublish44_lib_ezutils_for_php54.patch
Created Sep 17, 2014
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
View kernel_patch_for_ezpublish44_lib_ezutils_for_php54.patch
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 / ezpublish5_community_project-2014.07.0-gpl-full--vhost-conf-mod_rewrite-rules-for-static-cache
Created Sep 21, 2014
Example working virtual host mod_rewrite rules configuration for serving static cache by default. Tested with ezpublish5_community_project-2014.07.0-gpl-full
View ezpublish5_community_project-2014.07.0-gpl-full--vhost-conf-mod_rewrite-rules-for-static-cache
RewriteEngine On
#RewriteLog "/tmp/rewrite.log"
#RewriteLogLevel 5
#
# Static cache in eZ Publish
#
# No cache for http posts
@brookinsconsulting
brookinsconsulting / request_for_support_to_maxime_email_001.txt
Created Oct 16, 2014
Request for support: Please help me get a copy of Wascou - URL Shortener
View request_for_support_to_maxime_email_001.txt
Hello Maxime,
I am sorry to bother you. I have been trying to connect with you via
Twitter and LinkedIn for the past month.
I use eZ Publish ... a lot. I'm trying to find a copy of "Wascou Software
Edition - URL Shortener (wse_us)" Re: http://projects.ez.no/wse_us
I used to have a copy of the package but I have lost it and can't find it
any longer.
@brookinsconsulting
brookinsconsulting / gist:bf49d467256fdb5f073e
Last active Aug 29, 2015 — forked from arnebratt/gist:571269541df60de1b683
In #ezpublish irc (freenode.net) Bratt shared his solution to use a copy of an ezpublish website from production on a local dev without the var directory images (this is a kernel hack atm but could be transformed into a kernel override)
View gist:bf49d467256fdb5f073e
--- kernel/classes/datatypes/ezimage/ezimagealiashandler.php 2014-07-17 11:18:00.000000000 +0200
+++ kernel/classes/datatypes/ezimage/ezimagealiashandler.php 2014-07-17 11:51:57.000000000 +0200
@@ -551,6 +551,10 @@
}
$this->setOriginalAttributeData( $originalData );
+ $ini = eZINI::instance( 'image.ini' );
+ $imagesRemoteUrl = $ini->variable( 'ImageConverterSettings', 'ImagesRemoteURL' );
+ $imagesRemoteUrl = rtrim( $imagesRemoteUrl, '/' ) . '/';
+
@brookinsconsulting
brookinsconsulting / bc.ezpublish2014.11.1_ezpublish_legacy_kernel_classes_datatypes_ezxmltext_ezxmloutputhandler.php.diff
Last active Aug 29, 2015
BC Developed a kernel class override patch to provide additional ezxmltext template override.ini template override Match conditions. These are nearly all possible (minus state and some other more obscure conditions) conditions. This patch has been lightly tested as functional and it seems to work well. This may cause as of yet unknown problems (…
View bc.ezpublish2014.11.1_ezpublish_legacy_kernel_classes_datatypes_ezxmltext_ezxmloutputhandler.php.diff
--- /Users/graham/web/ez/dual-static-based-off-2014.11.1/ezpublish_legacy/kernel/classes/datatypes/ezxmltext/ezxmloutputhandler.php 2015-05-31 07:02:38.000000000 -0500
+++ /Users/graham/web/ez/dual-static-based-off-2014.11.1/ezpublish_legacy/kernel/classes/datatypes/ezxmltext/ezxmloutputhandler.php.solution.003.works 2015-05-31 06:59:53.000000000 -0500
@@ -162,7 +162,22 @@
$this->Res = eZTemplateDesignResource::instance();
if ( $this->ContentObjectAttribute )
{
- $this->Res->setKeys( array( array( 'attribute_identifier', $this->ContentObjectAttribute->attribute( 'contentclass_attribute_identifier' ) ) ) );
+ $this->Res->setKeys( array(
+ array( 'attribute_identifier', $this->ContentObjectAttribute->attribute( 'contentclass_attribute_identifier' ) ),
+ array( 'object', $this->ContentObjectAttribute->attribute( 'contentobject_id' ) ),
View ContentPackageHandler.php
<?php
/**
* @author Henning Kvinnesland <henning@keyteq.no>
* @since 02.06.15
*/
namespace Kavli\GenericBundle\Override;
class ContentPackageHandler extends \eZContentObjectPackageHandler
{
@brookinsconsulting
brookinsconsulting / services.xml
Last active Aug 29, 2015
Blog post: 'Change user authentication to login with email' Service Definitions (Modified to use validated xml; which was missing from blog post examples). Also added a auto converted services.yml example (Converted using website: http://converter.rosstuck.com). From: http://blog.silversolutions.de/2014/07/ezpublish/extend-ez-5-3-login-email/ Do…
View services.xml
<?xml version="1.0" encoding="utf-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<parameters>
<parameter key="security.authentication.provider.dao.class">SilversolutionsBundleEshopBundleServiceSecurityAuthenticationProvider</parameter>
</parameters>
<services>
<service id="security.authentication.provider.dao" class="%security.authentication.provider.dao.class%" abstract="true" public="false">
<argument /> <!-- User Provider -->
You can’t perform that action at this time.