Skip to content

Instantly share code, notes, and snippets.

View flegfleg's full-sized avatar

Florian Egermann flegfleg

View GitHub Profile
@flegfleg
flegfleg / Front page dein-lastenrad.de Deutsch.html
Last active June 29, 2020 17:34
Front page dein-lastenrad.de / Deutsch
<!-- Front page dein-lastenrad.de / Deutsch. Mirror: https://gist.github.com/flegfleg/637e0dfc0f3e42f7ab53b77a5ebd873a -->__NOTOC__
{{#css:
hr, .contentHeader, #catlinks { display: none }
h1 { color: #eec241 }
.box img { max-width: 50%; margin-top: 30px; }
.no-padding { padding: 0; }
.hero h1, h2 { border-bottom: 0 }
.hero h2 { color: #FFFFFF }
.hero.blue .col-md-8{ padding: 0; }
.hero.green .col-md-8{ padding: 0; }
@flegfleg
flegfleg / cb tag.php
Last active June 8, 2020 13:36
tag system in cb
<?php
// add this to any template, e.g. booking-publish.php
// echo
CB::echo('item', 'mymeta'); // this is the item meta
CB::echo('item', 'mymethod'); // this is a method in class item
CB::echo('timeframe', 'myproperty'); // this is a property of class timeframe
CB::echo('booking', 'myproperty'); // 'booking' is substited with 'timeframe' in CB.php
@flegfleg
flegfleg / dein-lastenrad.css
Created June 6, 2020 19:47
dein-lastenrad.css
/* Das folgende CSS wird für alle Benutzeroberflächen geladen. */
/* -------------- HEADER ------------ */
/* Header modifications: Logo */
#p-logo {
width: 200px;
}
/* Header modifications: Hide non-essential Page Tools */
#pt-userpage, #pt-mytalk, #pt-watchlist, #pt-mycontris {
@flegfleg
flegfleg / kasimir-theme-padding-anpassen.css
Created June 3, 2020 11:49
Kasimir theme padding anpassen
.wrap {
padding-left: 0 !important;
padding-right: 0 !important;
}
@flegfleg
flegfleg / add caps to wp custom post types
Created February 2, 2019 11:22
add caps to wp custom post types
<?php
function create_post_type_items() {
register_post_type( 'acme_item',
array(
'labels' => array(
'name' => __( 'CB2 Items' ),
'singular_name' => __( 'CB2 Item' )
),
'public' => true,
<?php
// Start with an underscore to hide fields from custom fields list
$prefix = '_cb2_velogistics_';
/**
* Initiate the metabox
*/
$cmb = new_cmb2_box( array(
'id' => '_cb2_velogistics_',
@flegfleg
flegfleg / hide.css
Created July 8, 2018 19:31
commons booking hide contact+opening hours
.single-cb_items .cb-contact,
.single-cb_items .cb-opening-hours {
display: none;
}
<translate>
== Veranstaltungen ==
Veranstaltungen rund um das Thema "Freies Lastenrad". Tragt gerne eure eigenen hier ein.
</translate>
@flegfleg
flegfleg / example output cb-object.php
Last active April 19, 2018 20:33
example output cb-object
<?php
$args = array();
$tf = new CB_Timeframe();
$tf->set_context('timeframe'); // either 1) 'timeframe' (default): group by timeframe or 2) 'calendar': group by date or 3) 'admin_table'
$timeframes = $tf->get_timeframes( $args );
var_dump($timeframes);
?>
array (size=2)
0 =>
@flegfleg
flegfleg / cbDisableDelete.js
Last active April 16, 2018 19:33
Hide/Disable delete button in Commons Booking 0.9 bookings table.
jQuery( document ).ready(function() {
jQuery('body.toplevel_page_cb_bookings span.delete').hide();
});