A Practical Guide on how to work with Git Basic Commands and workflows
Introduction In this guide, we will see git basic commands, and fundamentals of…
March 18, 2018
Note: I have public URLs of these images, which I want to save.
return $imageFile; } function savemynode($valueArray) { $node = new stdClass(); $node->title = $valueArray->title $node->type = ‘mycontenttype’; nodeobjectprepare($node);
$node->language = LANGUAGE_NONE; $node->uid = 1; //see if you want to use another user, or logged in user $node->status = 1; $node->promote = 0; $node->comment = 1; //comments closed $node->sticky = 0;
$node->body[$node->language][0][‘value’] = $valueArray->description; $node->body[$node->language][0][‘format’] = filterdefaultformat(); $imageObj = prepareImageObj($valueArray->imageUrl); if (!$imageObj) { return false; } $node->fieldimage[$node->language][0] = (array)$imageObj;
// Prepare node for saving if ($node = nodesubmit($node)) { nodesave($node);
print "\nNode saved, nid: ".$node->nid . ", videoId: ".$youtube_doc['_id'];
} else { print ‘Error’; } }
You can customize this code for more robust error handling.
Enjoy.
Introduction In this guide, we will see git basic commands, and fundamentals of…
Problem Statement I have a drupal module, where there is a file of extension…
Visual Studio Code is one of the awesome developer tools by Microsoft. Let’s…
Introduction to problem So, on my mac, I’ev set timezone to my local city i.e…
If your youtube video looks like:https://www.youtube.com/watch?v=g0kFl7sBdDQ…
Introduction VS code is an excellent free IDE for maany types of programming…
In this post, we will see some of the frequently used concepts/vocabulary in…
System design interview is pretty common these days, specially if you are having…
Introduction You are given an array of integers with size N, and a number K…
Graph Topological Sorting This is a well known problem in graph world…
Problem Statement Given a Binary tree, print out nodes in level order traversal…
Problem Statement Given an array nums of n integers and an integer target, are…