Skip to content

Instantly share code, notes, and snippets.

@8lane
8lane / gist:cd600d18be3be18d8ba2
Created February 14, 2015 11:13
SASS Array Map
$profiles: (twitter: #4099FF, facebook: #3B5998, android: #5BC236, apple: #7C7C7C, behance: #1769ff, paypal: #1e477a, delicious: #3399ff, deviantart: #506256, digg: #0093CC, dribbble: #C73B6F, dropbox: #3d9ae8, github: #405a6a, google: #db4a39, google-plus: #db4a39, google-wallet: #4285f4, instagram: #3f729b, lastfm: #D01F3C, linkedin: #0e76a8, reddit: #cee2f8, skype: #12A5F4, steam: #1d1c1a, stumbleupon: #f74425, tumblr: #00225F, vine: #00b488, whatsapp: #34af23, yelp: #c41200, youtube: #cc181e)
.base-social-icons
a:hover
@each $profile, $bgcolor in $profiles
.fa-#{$profile}
color: $bgcolor
{{if $location['module'] == 'forums' and $location['controller'] == 'index'}}
woop!
{{endif}}
@8lane
8lane / gist:998bed8ed31aeb2b0b8b
Created February 12, 2015 18:04
IPS4 Theme Setting - Multi Select
<?php
return new \IPS\Helpers\Form\Select( "core_theme_setting_title_{$row['sc_id']}", explode( ',', $value ), FALSE, array(
'multiple' => TRUE,
'options' => array(
'twitter' => 'Twitter',
'facebook' => 'Facebook',
'google' => 'Google',
'dribbble' => 'Dribbble'
)
@8lane
8lane / gist:bd15d53bb15f96e48f8a
Last active August 29, 2015 14:15
IPS4 Theme Setting - Checkbox
<?php
return new \IPS\Helpers\Form\CheckboxSet( "core_theme_setting_title_{$row['sc_id']}", explode( ',', $value ), FALSE, array(
'options' => array(
'key1' => 'val1',
'key2' => 'val2',
'key3' => 'val3'
)
), NULL, NULL, NULL, 'theme_setting_' . $row['sc_key'] );
@8lane
8lane / gist:b8aa30f26845a4a50916
Last active August 29, 2015 14:12
Xenthemes Slides Class
<?php
class XenthemesSlider_Option_Slides
{
/**
* Renders the media site thumbs options.
*
* @param XenForo_View $view View object
* @param string $fieldPrefix Prefix for the HTML form field name
* @param array $preparedOption Prepared option info
@8lane
8lane / gist:783676f2cadac90e364c
Last active August 29, 2015 14:12
Xenforo Custom Admin Template
<xen:require js="js/XenthemesSlider/options_auto_text_box.js" />
<style>
.inputMediaId
{
width: 30%!important;
}
.inputThumbUrl
{
@8lane
8lane / gist:e79d4d81aa9f1a6f302c
Created December 22, 2014 16:37
Add 'All' tab to Category Tabs by IPS Themes
<!-- Category Tabs by IPS Themes -->
<if test="$this->settings['tcCategoryTabs_enabled'] == '1'">
<php>
$cats = $this->settings['tcCategoryTabs_tabCategories'];
</php>
<script type="text/javascript">
isjQuery = false;
if (!window.jQuery) {
@8lane
8lane / gist:5eae0af4808cba472082
Created December 10, 2014 15:36
IP.Board remove more menu
<li id='nav_other_apps' style='display: none'> <a href='#' class='ipbmenu' id='more_apps'>{$this->lang->words['more_apps']} <img src='{$this->settings['img_url']}/useropts_arrow.png' /></a> </li>
@8lane
8lane / gist:10645e113ba4ffd013b3
Created December 10, 2014 15:34
Add new tab to IP.Board #2
<li class="nav_item_show"><a href="#">My Link</a></li>
@8lane
8lane / gist:ba7dd72764ff7d29678e
Created December 10, 2014 15:33
Add new tab to IP.Board #1
<li id='nav_other_apps' style='display: none'> <a href='#' class='ipbmenu' id='more_apps'>{$this->lang->words['more_apps']} <img src='{$this->settings['img_url']}/useropts_arrow.png' /></a> </li>