1 month 3 weeks ago

The short answer.

Use field_view_field()!

The long answer.

Drupal 7 brought us Entities, and wіth them the powerful Field API fоr 'storing, loading, editing, and rendering field data.' attached tо them. If yоu're managing еverуthіng thrоugh 'manage fields' and 'manage display' tabs of yоur content type, then еverу part оf that process is rаthеr wonderfully tаkеn care оf...

3 months 1 week ago

Wow, so I've been dealing with Drupal for pretty much 5 years now since the days of 4.7. As all of the veterans might know by now, its a pain in the a$$ to upgrade a Drupal install from an old release. Recently one of my clients wanted me to update her site to incorporate new features, but I told her I would need to update her site in order for that to happen as the old drupal was quite...

3 months 1 week ago

Currently I replicated an existing site and now I want to clear out all the nodes that aren't relevant. Yes, you can easily use VBO (Views Bulk Operations) module, but its very cumbersome if you you just want to delete a bunch of stuff, because you'll have to download it and configure it to start deleting. Currently, core drupal has its own content list view, but doesnt give you the option to...

3 months 2 weeks ago

Apparently there's no way to set a breadcrumb for a views page via any module like "custom breadcrumb" or "hansel breadcrumb". As it seem there is a way to set it if you knew about internal drupal functions by using the drupal_set_breadcrumb() and placing the code inside the views header. Of course you will need to know some php for this. If you find another solution please post it. Hope this...

4 months 4 days ago

I just recently got put back on an old project that I haven't worked on for a couple of months. The code base and database on my development machine is outdated, now i go update my code via 'svn up' which goes ok! Now I go grab a copy of the database on the staging server via the module 'project/demo' which takes a snapshot of the database and lets you download it or restore it on the existing...

5 months 2 days ago

How do you get the vocabulary id in Drupal 7 ? Easy, you cant not through the normal methods that is. You'll have to look in the database for the vid if you need it for say as a parameter in taxonomy_get_tree(). Well, Drush to the rescue again or you can just look it up in your mysql gui.

5 months 1 week ago

So one of my clients needed a list view of events categorized by month and then by day. At first I thought it was going to be a simple solution with Views for Drupal 7, but apparently Views only support grouping by only 1 field. This particular problem usually involves multiple loops as a solution to most developers approaching this situation if they are not versed in scripting. I too thought...

5 months 1 week ago

You'll need to expose the $entity object first to see what you want to copy to where using the print_r($entity) or dsm($entity) first.

You want to copy the contents of the core node title into a CCK field with the machine readable name field_title.

Select the nodes you want to process with VBO as usual;
Select the VBO action "Execute arbitrary PHP script";
For Drupal...

5 months 2 weeks ago

A short video showing how to install Drush on a local development machine (Ubuntu 11.10) but the steps should be similar for OS X users.

6 months 2 hours ago

I'm sure this has happened to many people when they forget their passwords and try numerous times to find out they just got locked out of their accounts. Well, there is a cool drush command to resolve that issue by deleting all the flood entires within the "flood" table of the drupal database. If you don't have drush access you might have to go through your mysql gui to clear that up. But the...

8 months 23 hours ago

KISS = Keep it Simple, Stupid!
I looked around the net and all i want is just a simple truncating php snippet, and most people has all these crazy methods of doing where it takes more than 3 lines to complete. Well, here it is. A super simple to the point php snippet to solve your truncating to word boundary problem. Found it useful? Let me know what you used it for if you have a better...

9 months 1 week ago

 

Just when I was looking into NoSQL or MongoDB as something new to learn. Luckily I bumped into Adrians article about the big downfalls and vulnerabilities of this up and coming new NoSQL movement. I guess it really isnt ready for primetime yet while it still has all these security problems.
------------------

Of all оf the presentations аt Black Hat USA 2011, I found...

10 months 4 days ago

Quick and dirty explanation of how to alter a form in your Drupal 7 site. Basically you will need to name the function the same as your theme with _form_alter() in it. From there you can write a conditional to target the form_id that loads and edit the variables you want to edit. To see these variables you'll have to do a dsm($form) to expose the form array. This goes in the template.php file...

10 months 4 days ago

Quick and Dirty Explanation! Everywhere I look online they get too detailed and I get confused.
While modifying drupal 7/6 modules, I come across many functions with the & in their functions. I always wondered what does it mean and I finally got it cleared up today. It's basically just linking the variables together, or think of them as a symbolic links as how its done in the...

10 months 1 week ago

<ivanjaros> Hi. This is more general question then Drupal question but ... I have node type that can be created by anonymous and auth. users. The thing is that I need to know which anonymouse person created which node. It doesnt have to be known for ever just a week or so. So session/cookie come to mind. How would you identify certain user in such way ?
<darkflare> ive just...

10 months 1 week ago

On this week's podcast, Rob and Matt return to talk about the importance of making the front end of your website faster with things like CSS sprites and minimized javascript, ebooks vs. print books, and other completely unrelated ramblings. Oh, and Rob reminds you that if you're reading this, you should probably be outside instead.

Audio Link:...

10 months 1 week ago

Here are some commonly used path variables for Drupal 7/6. This was kind of annoying to find via Google since most sites just lists out the variables, and not showing you the output of them. Well here they are:

This is in reference to a drupal 7 installed in a sub directory. Example used: http://www.foo.com/bar

$base_root =...

10 months 1 week ago

View the node date of a node page and display it in the shell. Very useful if your trying to reference variables in your tpl files or what not.

1
 drush -u admin php-eval "print_r(node_load(17));" | ack -A20 'body'

Another thing I find my self frequently doing is deleting Nodes. I hate it where I have to go the Node page, click on edit...

10 months 1 week ago

If you manage many Drupal 7/6 sites, there are those times you just can't remember all the password and would require a reset via email. But that just takes too long to do. Compared to 1-3 minutes for a password reset via the slow way or the fast way of at most 5 seconds. For all those Drush users, this is a handy command to use:
drush user-password username --password="new_password"...

10 months 2 weeks ago

I've been waiting for 2 step authentication security for some time. Seems like the duo security guys finally did it right. If you value your site or server, this is a must install module. I'll be giving a quick presentation on this at the NYC meetup for this coming August 2011 meetup.

check it out yourself: http://drupal.org/project/duo

10 months 2 weeks ago

ncftp -u "userid" example.com

Handy ncftp command compared to the regular ftp command as this lets you upload/put directories recursively to a remote server.

10 months 2 weeks ago

drush ev 'print_r(theme_get_registry())' | ack -A10B5 '\[table\]'

drush with php command to print out the drupal's theme functions via the command line. And then pipe it through ack, which is just a better version of grep. It just searches for the theme your looking for and outputs it with 10 lines After it and 5 lines Before it.

10 months 3 weeks ago

Greate little tool to convert your fonts to use with the css font face property!

http://www.fontsquirrel.com/fontface/generator

12 months 2 days ago

http://dl.dropbox.com/u/22745533/jbart_view-6.x-1.04.zip

Please use with caution as this is still an Alpha release! Drupal 7 version is on the way.

1 year 5 days ago

http://cheekymonkeymedia.ca/blog/gene/drupal-7-passing-page-level-variab...

Great little tip on passing varibles from the page to the node templates.

1 year 1 week ago

This is awesome the jBart Module just got updated, you can download it from here:

http://dl.dropbox.com/u/22745533/jbart_view-6.x-1.04.zip

or you can just get it from the sandbox page on d.o

http://drupal.org/sandbox/shaibenyehuda/1112148

1 year 1 month ago
Below is a demo of a jBart widget i made using drupal xml feed data generated using views and adding a new feed display. A jBart module was created to output this feed and you can download it here: jBart Drupal Module

Install Instructions:
1. install module.
2. create a feed view/...
1 year 1 month ago
...