Skip to content

Instantly share code, notes, and snippets.

View takeit's full-sized avatar
🏠
Working from home

Rafał Muszyński takeit

🏠
Working from home
View GitHub Profile
{{ $num = $user->identifier % 6 }}
{{ if $user->image() }}
{{ $user->image($width, $height, 'crop') }}
{{ else }}
{{ $user->image($width, $height, 'crop', "_css/img/user_placeholder_`$num`.png") }}
{{ /if }}
@takeit
takeit / upgrade.txt
Created September 12, 2014 07:38
upgrade errors newscoop 4.2->4.3
UPDATE `Languages` SET `RFC3066bis` = "de-DE" WHERE `Code` = "de"
UPDATE `Languages` SET `RFC3066bis` = "pt-PT" WHERE `Code` = "pt"
UPDATE `Languages` SET `RFC3066bis` = "fr-FR" WHERE `Code` = "fr"
UPDATE `Languages` SET `RFC3066bis` = "es-ES" WHERE `Code` = "es"
UPDATE `Languages` SET `RFC3066bis` = "ro-RO" WHERE `Code` = "ro"
ads:
label:
title: "Announcements search"
name: "Title"
description: "Description"
category: "Category"
username: "Username"
publication: "Publication"
price: "Price"
reads: "Reads"
Plugins: Plugins
extra:
sidebar:
name: "Extra plugin"
permissions:
manage: "Manage plugin"
memberships:
errors:
settingserror: "Coudn't save settings."
headersize: "Size of uploaded header can not be more than {{ size }}"
headererror: "Could not upload header!"
showMembership: "Can not change this option at the moment."
menu:
tab:
memberships: "Memberships Settings"
settings: "Settings"
Plugins: Plugins
paywall:
title: "Paywall"
search: "Search..."
toolbar:
label:
configuration: "Configuration"
manage: "Manage Subscriptions"
manageusers: "Manage User Subscriptions"
configure: "Configure Paywall"
{{ 'newscoop.recover.password'|trans({'%variableName%': variableName}, 'home') }}
newscoop:
recover:
password: "Password recovery for %variableName%"
<?php
//Symfony2 controllers translator container
$translator = $this->get('translator');
//non Symfony2 controllers
$translator = \Zend_Registry::get('container')->getService('translator');
//translating string
$translator->trans('newscoop.preferences.error.cache',
array('%cache%' => $cache_engine), 'system_pref'
<VirtualHost *:80>
ServerName newscoop.dev
DocumentRoot %TRAVIS_BUILD_DIR%
SetEnv APPLICATION_ENV "development"
<Directory "%TRAVIS_BUILD_DIR%">
Options Indexes FollowSymLinks MultiViews
DirectoryIndex index.php
AllowOverride all
Order deny,allow