Skip to content

Instantly share code, notes, and snippets.

View hertsch's full-sized avatar

Ralf Hertsch hertsch

View GitHub Profile
@hertsch
hertsch / kitframework_list_routing_patterns.php
Last active April 26, 2017 08:28
Silex: get a list of all routing URI patterns
// get all routing objects
$patterns = $app['routes']->getIterator(); // seems to be changed in Silex 1.1.0 !!! ... ->current()->all();
// walk through the routing objects
foreach ($patterns as $pattern) {
$match = $pattern->getPattern();
echo "$match<br />";
}
@hertsch
hertsch / sample.flexcontent.category.twig
Created January 15, 2014 04:03
Sample for a Twig template structure
{% if loop.index < 3 %}
{# expose the first two items in columns #}
{% include '@phpManufaktur/flexContent/Template/default/command/category.exposed.twig' %}
{% endif %}
@hertsch
hertsch / sample.config.imagetweak.json
Last active January 2, 2016 09:48
imageTweak configuration sample
{
"enabled": true,
"image": {
"alt": {
"default": "- no image description available -",
"set": true
},
"title": {
"default": "- no image description available -",
"set": true
@hertsch
hertsch / kitfilter_imagetweak_en.md
Last active January 2, 2016 08:29
Helpfile for imageTweak

##~~ filter:imageTweak ~~

Attention: imageTweak provide a kitCommand and a kitFilter, this is the helpfile for the kitFilter.

The kitFilter ~~ filter:imageTweak ~~ check all images at the actual shown page of your Content Management System, check the sizes, re-sample them if necessary, reduce the traffic and speed up your Website.

imageTweak does not need any parameters or special handling. Just place the kitFilter

~~ filter:imageTweak ~~
@hertsch
hertsch / changed_search.php
Last active January 2, 2016 06:49
Remove kitCommand command line from CMS search result
if ($query->numRows() > 0) {
if ($res = $query->fetchRow()) {
// remove all kitCommands from the content
preg_match_all('/(~~)( |&nbsp;)(.){3,512}( |&nbsp;)(~~)/', $res['content'], $matches, PREG_SET_ORDER);
foreach ($matches as $match) {
$res['content'] = str_replace($match[0], '', $res['content']);
}
$mod_vars = array(
@hertsch
hertsch / kitcommand_flexcontent_en.md
Last active January 1, 2016 13:08
The helpfile for the kitCommand flexContent

##~~ flexContent ~~

With the kitCommand ~~ flexContent ~~ you can embed flexContent articles, categories, hashtags or FAQ's in any WYSIWYG section of your Content Management System.

Introduction

With the parameter action[] you tell flexContent which action you want to perform, so action[] is always needed and you should have a closer look to it.

Most of the parameters documented in this helpfile are used to override the general configuration of flexContent.

@hertsch
hertsch / kitcommand_ral_en.md
Last active December 29, 2015 13:09
Helpfile for the kitCommand ~~ ral ~~

~~ ral ~~

Introduction

The kitCommand ~~ ral ~~ provide you with a full RAL color palette. You can select a specific RAL color, multiple colors or specific RAL palettes. A click to a color can return his RAL value to the given URL.

For a general help to the kitCommands, the usage and the general available parameters please refer the kitCommand help.

Parameters

@hertsch
hertsch / kitcommand_confirmation_report_en.md
Last active December 24, 2015 13:29
Helpfile for the kitCommand ~~ ConfirmationReport ~~

~~ ConfirmationReport ~~

Introduction

This kitCommand enable you to place reports of missing read confirmations at any page or News/Topics article.

For a general help to the kitCommands, the usage and the parameters available in each kitCommand please refer the kitCommand help.

Parameters

@hertsch
hertsch / kitcommand_confirmation_en.md
Last active December 24, 2015 08:49
Get read confirmations / delivery receipts from the users - helpfile for the kitCommand ~~ confirmation ~~, covers also the droplet [[syncdata_confirmation]]

~~ Confirmation ~~

Introduction

This kitCommand enable you to add a read confirmation at any page or News/Topics article.

For a introduction and general help for the kitCommands, the usage and the parameters available in each kitCommand please read the kitCommand help.

Parameters

@hertsch
hertsch / kitcommand_comments_en.md
Last active December 23, 2015 07:39
Helpfile for the kitCommand Comments from the CommandCollection

~~ Comments ~~

Introduction

Comments is a powerful extension which enable the visitors of your website to leave comments at every page or news article. Comments is using a threading, so it is possible to use it as a micro forum, although the users can stay in touch and will be informed about new comments. The users can also rate each comment.

For a general help to the kitCommands, the usage and the general available parameters please refer the < href="{{ FRAMEWORK_URL }}/basic/help/help">kitCommand help.

Parameters