Error message
Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home1/tylerfra/public_html/includes/common.inc).
planet drupal
jDrupal: Be sure to check out jDrupal for an easy to use JavaScript Library to communicate with Drupal Services.
This document describes how to read/write entities to/from Drupal using the Services module. It also covers how to handle session authentication. Let's get started...
UPDATE: Please read this article for a much more detailed explanation on how to get PhoneGap up and running to communicate with Drupal Services.
Aside from the handy dandy Custom Breadcrumbs module and/or using Views arguments to set your breadcrumb, sometimes you just want to set a breadcrumb programmatically on a certain url menu path with phptemplate_breadcrumb, here's how, right now:
So I had a content type with an optional, unlimited value Imagefield attached to it. The content type's user permissions where set to allow all authenticated users to edit any node of that type. Which is all fine and dandy like sour candy. However, by default users are able to edit and/or remove other user's images in that field. Out-of-the-box that is the intended functionality, but I wanted user's images to be protected from other users. Here is how it can be done with a module:
Sometimes a prerequisite to getting a burrito for lunch involves using Drupal URL arguments in Javascript. So for example, say you had a URL like this:
http://www.tylerfrankenstein.com/chicken/burrito/combo
You can add code like this to your module:
function my_module_init () {
drupal_add_js(array('arg' => arg()),'setting');
}
And finally you can use code like this in Javascript to use the Drupal URL arguments:
Need to hide the formatting guidelines and description that show up by default on Drupal's comment form? Try something like this:
function mymodule_form_alter(&$form, &$form_state, $form_id) {
switch ($form_id) {
case "comment_form":
// begin: hide 'filtered html' input format guidelines and description
unset($form['comment_filter']['format']['format']['guidelines']['#value']);
unset($form['comment_filter']['format'][2]['#value']);
// end
break;
}
}
Need to add a submit handler function to your Drupal form so you can execute some custom code when a form is submitted? Yes? Well then, shuck 'em up partner, try something like this in your module:
Note, since writing this article I learned about Views Arguments 'action to take if argument not present' summary list with counts... it is definitely easier than the approach I documented below. I'll leave what I have done below because I'm not sure the summary list option will handle all cases. Someday I'll update this post to include a tutorial on how to use the aformentioned approach, someday.
Here is how you can hide certain local task menu tabs in Drupal by utilizing theme_menu_local_task. The example below demonstrates how to hide the 'View' tab on user account profile pages. This code goes in your theme's template.php file.
Need to get the HTML output from a URL and place it in Drupal's cache? Well then, you may do something like this:
Pages