This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Create wrapper around the node. | |
$wrapper = entity_metadata_wrapper('node', $node); | |
// We can do it also using only $nid. | |
$wrapper = entity_metadata_wrapper('node', $nid); | |
// Get the value of field_name of the nodes author's profile. | |
$wrapper->author->profile->field_name->value(); | |
$wrapper->author->profile->field_name->set('New name'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//form behaviors | |
$('form .form-submit').click(function(e){ | |
$('input.required').each(function(){ | |
if($(this).val()==''){ | |
$(this).focus(); | |
e.preventDefault() | |
return false; | |
} | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Ckedit 定制!隐藏finder链接和图像,并设定默认值 for drupal | |
if(typeof(CKEDITOR) === 'object') | |
CKEDITOR.on( 'dialogDefinition', function( ev ) | |
{ | |
// Take the dialog name and its definition from the event | |
// data. | |
var dialogName = ev.data.name; | |
var dialogDefinition = ev.data.definition; | |
// Check if the definition is from the dialog we're |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="overflow: hidden; margin: 15px auto; max-width: 671px;"> | |
<iframe scrolling="no" src="http://www.tudou.com/programs/view/CsD3k0zPQuU" style="border: 0px none; margin-left: 0px; height: 2354px; margin-top: -853px; width: 926px;"> | |
</iframe> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//drupal7 迁移评论 某个节点的 | |
//dpm(comment_load(381)); | |
$comments = array(); | |
for($i=0;$i<500;$i++) { | |
$comment = comment_load($i); | |
if($comment && $comment->nid == '3') { | |
$comment->nid = '486'; | |
$comment->node_type = 'comment_node_page'; | |
unset($comment->rdf_data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//syfmony安装记录1 | |
composer create-project symfony/framework-standard-edition . 2.4.2 | |
Installing symfony/framework-standard-edition (v2.4.2) | |
- Installing symfony/framework-standard-edition (v2.4.2) | |
Downloading: 100% | |
Created project in . | |
Loading composer repositories with package information | |
Installing dependencies (including require-dev) | |
- Installing jdorn/sql-formatter (v1.2.17) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$time = strtotime('2014-01-01 00:00:00+00:00'); | |
dpm(date('Y-m-d 00:00:00+00:00',$time)); | |
$i=date('z'); | |
dpm($i); | |
$nodes = array(); | |
for($i;$i<=365;$i++) { | |
$created =$time + $i* 86400; | |
$node = new stdClass(); | |
$node->uid = '1'; | |
$node->type = 'grace365'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="bbb-page-user clearfix"> | |
<div class="header"> | |
<div class="bbb-goback"> <a href="list">« 首页</a> </div> | |
<div class="username">@bluesky_still</div> | |
</div> | |
<div class="bbb-user"> | |
<div class="picture"> | |
<a href="#" class=""> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function($){ | |
function drueduNotificationsAjaxSubmit() { | |
$( ".notifications-ajax li a" ).each(function(){ | |
if($(this).hasClass('btn-small')) { | |
$(this).removeClass('btn-small'); | |
} | |
$(this).addClass('btn btn-mini'); | |
}); |
OlderNewer