User login

Complete

To be used with care. Pages are complete only when they meet the posting guidelines.

Where in the theme are the tabs printed / giving tabs to admins only

On giving View, Edit, Revision, etc. tabs to administrators only.

In Drupal, tabs are not printed by the node, but by the page. On the one hand, since views and administrative pages and anything else you can think of can have tabs, this makes sense. But on the other hand every node can have

But in any case, if you're looking to change the presentation of tabs somehow (or as in our case, restore them to a theme design from which they had been removed), you will find the place to look is not node.tpl.php but page.tpl.php.

Open external URLs in a new window

Personally and professionally I think links should open in the same tab, but some clients insist on opening external links in new tabs.

Harry Slaughter joins WorkHabit

Harry Slaughter of DevBee (in fact, all of DevBee) announces he's going full time with WorkHabit. I've liked following him blog about Drupal and web work and I hope to see him help WorkHabit follow through on some of their more ambitious announced contributions to the open source community... I can identify with that!

Cannot use string offset as an array problem caused by not using curly brace brackets around variable

Why this weirdness?

cannot use string offset as array
Fatal error: Cannot use string offset as an array in /sites/jonassoftware/www/sites/all/modules/field_placement/field_placement.module on line 706

Done with Piston now, too

Too much damn trouble. Piston is out. We will just get drupal core from CVS directly, and use scripts to make it easy to get and update to the current version.

Administration menu initial settings

For the necessary admin_menu module, I prefer the initial settings to not collapse fields on the modules page

With current initial settings this means unchecking "Apply margin-top to page body" and "Collapse fieldsets on modules page." Instead of going through this step every time this should be rolled into Agaric's basic/base installation profile.

Resolution

Make a new Drupal site project in the Agaric system

This is deprecated in favor of Deploying the Agaric Way.

Run from anywhere on the test or development server:

sudo /srv/scripts/agaric-newproject.sh 5 myagaric myagaric.com my.agaricdesign.com

You'll see a fair amount of output, and the last line you see should be:

Site myagaric installed; run /etc/init.d/apache2 reload to enable.

Gathering the data needed to abuse field formatters-- disable and combine and change per node settings set by user

For old times sake... this is one of the last outputs like this before I use a properly integrated development environment, Eclipse PDT (for PHP) with xdebug, which will show all the variables without the Drupal set messaging and such.

Field_placement displaying using CCK field formatters

This is the point where after more blocks and bloopers than I care to admit that we should finally have all the data we need.

Before I try to output any of it though.

The below function produces the below drupal_set_message (dsm using devel) output:

Fastest way to get just one result from a database table in Drupal

To get a single value result – one row from a just one column – the Drupal function for that is db_result(), which takes the result of db_query() as an argument.

http://api.drupal.org/api/function/db_result/5

(The same function works for Drupals 4.7 and 6.)

Different page templates for different content types

Once upon a time there was a drupal themer working on a dark and stormy night, he sat there wondering how to make different page templates for certain content types on his site. He thought about how the drupal template system seems to be missing this for some reason... Suddenly, he had a vision! Like a ray of light bringing, hope and happiness down from the heavens!! oh yes!!

Syndicate content