Skip to content

Instantly share code, notes, and snippets.

View trych's full-sized avatar

trych

View GitHub Profile
@trych
trych / index.php
Created October 5, 2022 21:53
getkirby e() helper function that does not throw error on undefined variable
<?php
function e(&$condition, $value, $alternative = null) {
echo $condition ? $value : $alternative;
}
$class = "banana";
e($class, 'class="' . $class . '"');
e($anotherClass, 'class="' . $anotherClass . '"');
@trych
trych / index.php
Created October 6, 2022 08:35
Null error issue in argument expressions of e()
<?php
$poster = $video->poster()->toFile();
// das geht nicht, wenn $poster null ist, *obwohl* die var $poster existiert
// Call to a member function resize() on null
e($poster, Html::attr('poster', $poster->resize(1280)->url()));
// das hingegen funktioniert:
if($poster) echo Html::attr('poster', $poster->resize(1280)->url());
@trych
trych / Docs_MultiKeywords.md
Last active September 9, 2023 01:40
Multi-Keywords Plug-in for Lightroom Classic

Multi-Keywords Plugin for Lightroom Classic

Small LrC plug-in that enables a very specific workflow for rapidly applying multiple keywords at once via LR's keyword sets.

This will be mainly helpful for situations where you need to tag photos with 3 or 4 different subjects that might appear in the photos in different combinations. A typical example would be family photos with 3-5 different family members. Also, this plugin makes mostly sense when you tag your photos one after the other instead of selecting a bunch of photos at once.

In my search for the most rapid way to tag such photos I find the described workflow the quickest. However, your milage, or your style of tagging, might vary.

Download

multi-keywords.lrplugin.zip