Skip to content

Instantly share code, notes, and snippets.

View kricore's full-sized avatar

Krikor Boghossian kricore

  • Greece
View GitHub Profile
@kricore
kricore / pl-PL.com_k2.ini
Created October 2, 2017 15:55
Polish lang file
;/**
; * @version 2.8.x
; * @package K2
; * @author JoomlaWorks http://www.joomlaworks.net
; * @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
; * @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
; */
COM_K2="K2"
COM_K2_CONFIGURATION="Konfiguracja K2"
@kricore
kricore / webpack.config.js
Last active March 23, 2019 17:13
Kinda defeats the purpose of CSS modules but if you want to use (raw) Bootstrap alongside with CSS modules here you go:
// "postcss" loader applies autoprefixer to our CSS.
// "css" loader resolves paths in CSS and adds assets as dependencies.
// "style" loader turns CSS into JS modules that inject <style> tags.
// In production, we use a plugin to extract that CSS to a file, but
// in development "style" loader enables hot editing of CSS.
// SASS loader
// https://medium.com/@Connorelsea/using-sass-with-create-react-app-7125d6913760
{
test: /\.scss$/,
@kricore
kricore / gist:5f90c8b2301b3016f61017b42b1b9e8b
Created August 11, 2017 09:59
Install React & dependencies
#https://stackoverflow.com/documentation/reactjs/7480/setting-up-react-environment/24700/configure-webpack#t=201708110804335488513
# install react and react-dom
$ npm i react react-dom --save
# install webpack for bundling
$ npm i webpack -g
# install babel for module loading, bundling and transpiling
$ npm i babel-core babel-loader --save
@kricore
kricore / base.php
Created July 3, 2017 10:29
AllVideos 4.8.0 RC base.php file
<?php
/**
* @version 4.8.0
* @package AllVideos (plugin)
* @author JoomlaWorks - http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2016 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
<?php
/**
* @version 2.7.x
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2016 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
@kricore
kricore / functions.php
Created December 16, 2016 11:43
Filter the correct language on WordPress archive pages based on the lang $_GET param.
<?php
/**
* Language Detection
* @param $query,
* @uses pre_get_posts filter
* @return the modified query
*/
function kdk_exclude_category( $query ) {
if ( ($query->is_tag() && $query->is_main_query()) ||
@kricore
kricore / item.php
Created August 18, 2016 13:07
The item's admin form with tag drag n' drop reordering functionality. K2 2.7.x - Joomla! 3.x +
<?php
/**
* @version 2.7.x
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2016 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
@kricore
kricore / The inline player module
Last active June 6, 2016 15:13
Radiowave porting to other services
<div id="jquery_jplayer_1" class="jp-jplayer"></div>
<div id="jp_container_1" class="jp-audio-stream" role="application" aria-label="media player">
<div class="jp-type-single">
<div class="jp-gui jp-interface">
<ul class="jp-controls">
<li>
<a href="javascript:;" style="display:block;" class="jp-play" title="Play"><i class="icon-play"></i><span>Listen Live</span></a>
<a href="javascript:;" style="display:none;" class="jp-pause" title="Pause"><i class="icon-pause"></i><span>Listen Live</span></a>
</li>
<li>
@kricore
kricore / view.feed.php
Created January 27, 2016 17:58
Hack: Add an extrafield to K2 feed items' title. Part of the view.feed.php item
$fields = json_decode($item->extra_fields);
$item->title = $this->escape($item->title);
if ($fields[0]->value && $fields[0]->value !== '')
{
$item->title = html_entity_decode($item->title.' - '.$fields[0]->value);
}
else
{
$item->title = html_entity_decode($item->title);
}
@kricore
kricore / default.php
Last active September 24, 2015 11:17 — forked from anonymous/default.php
Based on @buntom's gist. Removes the K2 item you are browsing from the list.
<?php
/**
* @version 2.6.x
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access