I hereby claim:
- I am hanamizuki on github.
- I am hanamizuki (https://keybase.io/hanamizuki) on keybase.
- I have a public key ASCx4fTQm2q93z71CICR-pphbjN86nuj2qitOV4bjp_CVQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
$account = user_load(UID); | |
$check = in_array(ROLE_ID, array_keys($account->roles)); |
// Contest listing | |
$view_modes = array('grid', 'teaser'); | |
foreach ($view_modes as $view_mode) { | |
$view = &${'contest_'.$view_mode}; | |
$display = &${'display_contest_'.$view_mode}; | |
$view = views_get_view('contest_listings'); | |
$display = $view->display[$sort]; | |
$display->display_options['row_options']['view_mode'] = $view_mode; |
$var2 = 'var2'; | |
${'var_'.$var2}; // $var_var2 |
/* Print custom block content */ | |
$block = module_invoke('MODULE_NAME','block_view','DELTA'); | |
print render($block['content']); | |
/* Print the whole custom block (with divs, title etc.) */ | |
$block = block_load('block','1'); | |
print drupal_render(_block_get_renderable_array(_block_render_blocks(array($block)))); | |
/* Print a views block */ | |
$block = module_invoke('views','block_view','print_block_test_view-block'); |
Step 1, Print the FBCONNECT Button, anywhere you want | |
<?php | |
print fboauth_action_display(); | |
?> | |
Step 2, Add this to your CUSTOM_MODULE | |
<?php | |
/** | |
* Implements hook_fboauth_actions_alter(): Customise redirect path |
drupal_goto('<front>'); |
$.fn.bh_label_in_input = function (){ | |
return this.each( function (){ | |
var $form = $( this ); | |
$form.find( '.in-field-label' ).filter( ':visible' ).each( function (){ | |
var $current_input = $( this ); | |
var $label = $current_input.prev().hide().text().replace( '*', '' ).trim(); | |
$current_input.addClass( 'in-field-label-active' ); |
<html> | |
<head> | |
<title> | |
A Simple jQuery Tabs | |
</title> | |
</head> | |
<body> | |
<div id="wrap"> | |
<div id="nav" class="hana-tab-nav"> | |
<ul> |
t(); | |
http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/t/7 | |
An example of using context. | |
<?php | |
print t(‘TEXT TO BE TRANSLATED’, array(), array(‘context’=>‘CONTEXT NAME’)); |