Skip to content

Instantly share code, notes, and snippets.

View kricore's full-sized avatar

Krikor Boghossian kricore

  • Greece
View GitHub Profile
@kricore
kricore / functions.php
Created September 1, 2015 21:52
Greeklish permalinks for Wordpres - NOT MINE
<?php
// Paste this function in your theme's function.php file
function greeklish_permalinks_sanitize_title($text) {
if ( !is_admin() ) return $text;
$expressions = array(
'/[αΑ][ιίΙΊ]/u' => 'e',
'/[οΟΕε][ιίΙΊ]/u' => 'i',
'/[αΑ][υύΥΎ]([θΘκΚξΞπΠσςΣτTφΡχΧψΨ]|\s|$)/u' => 'af$1',
@kricore
kricore / gist:2c9a5434748c5f5f6cf9
Created May 15, 2015 12:42
K2 custom meta based on extrafields
<?php
// Option 1 - content is already cleaned up.
// if AAA is set use it, else use BBB
$metacontent = ( isset($this->item->extraFields->AAA->value) && $this->item->extraFields->AAA->value != '' ) ? $this->item->extraFields->AAA->value : $this->item->extraFields->BBB->value;
$doc->addCustomTag('<meta name="anything" content="'.$metacontent.'" />');
?>
<?php // option two the content needs cleaning
// Clean the content prior to the assignment
@kricore
kricore / gist:7abc76e04c1bc9235ce2
Created May 14, 2015 15:59
Cleaning up K2 extrafields.
<?php
$safe = array("", "");
$nonsafe = array("'", "\"");
$custometa = $this->item->extraFields->NAME->value;
$safemeta = str_replace( $nonsafe, $safe, $custometa);
echo $safemeta; ?>
@kricore
kricore / classic.css
Last active August 29, 2015 14:07
Simple Image Gallery Pro's classic template without the image background.
/**
* @version 3.0.x
* @package Simple Image Gallery Pro
* @author JoomlaWorks - http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved.
* @license http://www.joomlaworks.net/license
*/
/* --- Generic Styling --- */
a:active,a:focus { outline:0; }
@kricore
kricore / default.php
Last active February 24, 2017 04:57
Simple Image Gallery Pro responsive template using Foundation's block grid.
<?php
/**
* @version 3.0.x
* @package Simple Image Gallery Pro
* @author JoomlaWorks - http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved.
* @license http://www.joomlaworks.net/license
*/
// no direct access
@kricore
kricore / gist:b8abca7732d614a771b1
Created June 26, 2014 13:53
SigPro German Translation.
JGRID_CHECKBOX_ROW_N="Checkbox für row %d"
COM_SIGPRO___NONE_SELECTED__="-- nichts ausgewählt --"
COM_SIGPRO_YOU_ARE_GOING_TO_DELETE_PERMANENTLY_THE_SELECTED_IMAGES_FROM_THE_SERVER_ARE_YOU_SURE="Sie werden das(die) ausgewählten Bild(er)r dauerhaft vom Server löschen. Sind Sie sicher?"
COM_SIGPRO_YOU_ARE_GOING_TO_DELETE_PERMANENTLY_THE_SELECTED_FOLDERS_FROM_THE_SERVER_ARE_YOU_SURE="Sie werden den(die) ausgewählten Ordner dauerhaft vom Server löschen. Sind Sie sicher?"
COM_SIGPRO_WRITABLE="beschreibbar"
COM_SIGPRO_VIEW="Ansicht"
COM_SIGPRO_USE_COMPONENT_SETTING="- vererbte Komponenten-Einstellung -"
COM_SIGPRO_USER_GALLERIES="Benutzergalerien"
COM_SIGPRO_TYPE_A_FOLDER_NAME_TO_CREATE_THE_GALLERY="vergeben Sie einen Ordnernamen, um die Galerie zu erstellen"
COM_SIGPRO_TYPE="Typ"
@kricore
kricore / gist:8a29c65f724f9ead1860
Last active August 29, 2015 13:57
Responsive: TT template with navigation
<?php
if(!isset($fpssTemplateIncluded)){
header("Content-type: text/css; charset: utf-8");
$width = (int) $_GET['width'];
$height = (int) $_GET['height'];
$sidebarWidth = (int) $_GET['sidebarWidth'];
$thumbnailViewportWidth = (int) $_GET['thumbnailViewportWidth'];
$thumbnailViewportHeight = (int) $_GET['thumbnailViewportHeight'];
$timer = (bool) $_GET['timer'];
$mid = (int) $_GET['mid'];
@kricore
kricore / template.css.php
Last active August 29, 2015 13:57
Responsive: FPSS SIMPLE template - NO sidebar
<?php
if(!isset($fpssTemplateIncluded)){
header("Content-type: text/css; charset: utf-8");
$width = (int) $_GET['width'];
$height = (int) $_GET['height'];
$sidebarWidth = (int) $_GET['sidebarWidth'];
$thumbnailViewportWidth = (int) $_GET['thumbnailViewportWidth'];
$thumbnailViewportHeight = (int) $_GET['thumbnailViewportHeight'];
$timer = (bool) $_GET['timer'];
$mid = (int) $_GET['mid'];
@kricore
kricore / template.css.php
Last active August 18, 2016 13:47
Responsive: FPSS Movies Template
<?php
if(!isset($fpssTemplateIncluded)){
header("Content-type: text/css; charset: utf-8");
$width = (int) $_GET['width'];
$height = (int) $_GET['height'];
$sidebarWidth = (int) $_GET['sidebarWidth'];
$thumbnailViewportWidth = (int) $_GET['thumbnailViewportWidth'];
$thumbnailViewportHeight = (int) $_GET['thumbnailViewportHeight'];
$timer = (bool) $_GET['timer'];
$mid = (int) $_GET['mid'];
@kricore
kricore / gist:eecb43d52de3b2c8883e
Last active August 29, 2015 13:56
SocialConnect responsive styles. A simple addition to SocialConnect compact template.
/* Force load the module on the right (optional) */
#modSocialConnectCompact .socialConnectLeft { right: 0; left: auto; }
#modSocialConnectCompact .socialConnectLeft:after, #modSocialConnectCompact .socialConnectLeft:before { right: 50%; left: auto; }
/* responsive styling */
@media screen and (max-width: 600px) {
#modSocialConnectCompact .socialConnectSignInBlockContainer { max-width: 100%; }
#modSocialConnectCompact .socialConnectSignInBlock, #modSocialConnectCompact .socialConnectServicesBlock { float: none; clear: both; width: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
#modSocialConnectCompact .socialConnectLink { float: left; }