User login

Complete

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

Curses: array_merge_recursive doesn't behave as hoped, it creates arrays for matching strings

The PHP function http://us3.php.net/array_merge_recursive doesn't do what I'd hoped. Instead of merely combining nested arrays if it finds them, it creates arrays for values with matching strings.

In the output below uid and biblio_type should be a single, the last-added, value, not an array of a couple values.

Agaric wants CCK Field Permissions to have smarter defaults (let the world see!)

Enabling CCK Field Permissions (cck_field_perms in Drupal 5, part of CCK itself in Drupal 6) can create bugs on your if you aren't paying attention and cleaning up after it.

Some excerpts from IRC among people trying to figure out why an image on a news post simply wasn't showing up (for the user who posted it in this case, the authenticated role had editing but not viewing rights for the imagefield!).

Your mom likes IE6!

Your mom likes IE6. It is true. Most likely, it is because it is all she knows. So, to all the mom's out there, we love you and appreciate all you have done. We would just appreciate it more if you changed your browser and upgraded to Firefox. But, we would settle for IE8, even IE7.

Find out what sites directory Drupal is currently using

The answer is conf_path().

The backstory is we are making a new 'modules', 'themes', or 'files' level folder inside sites/whatever: 'config', to store configuration settings in files.

This would be the ultimate way to get a listing of all ini files in modules, and could do the same thing for 'config' -- this grabs from the currently in use sites directory (such as sites/default) as well as sites/all, profiles, and the built-in modules directory:

drupal_system_listing('.ini$', 'modules', 'name', 0);

Get the directory name from a file path string in PHP

There is a built-in PHP function to get the directory portion of a file path from a string (lopping off the filename itself).

http://us3.php.net/dirname

Resolution

A Drupal module making module

This note is simply so that next time Agaric searches for Joachim and Dmitri's module-writing module, Module Builder, we find it. (It is selected to be part of Agaric's big list of Drupal development modules, which is the only way I found it again this time.

(Um, note that it doesn't actually write your module, but pads out a nice framework for you to write your module.)

Resolution

Restore locally deleted files with git

In SVN, running svn update will restore any files you have deleted locally where you have not explicitly committed the removal. Not so in git (or at least git-svn) for removed or moved files.

The tip found will restore not just one, but every deleted file. Agaric recommends you check what you're restoring with just git ls-files -d (where -d stands for --delete) first.

git ls-files -d | xargs git checkout --

TinyMCE, iFrames, JQuery and Drupal scattered notes

Drag and drop into the TinyMCE textarea triggers onEvent twice in such close succession that it creates a race condition, and the same values for the length of the textarea before and after are given.

Getting around this by putting the character change check new value set before running the code. Maybe a timer check, or ideally a way to check the textarea with just a timer and not use onEvent at all, would be best.

Testing assisting module: set configurations through site's URL

RoboConf
module
http://drupal.org/project/roboconf

commissioned by Top Notch Themes
test their themes
only way they could do this with a 2-3 person company

security nightmare, should never go anywhere near a production site

in the URL, you give it parameters - logged in, logged out, blocks

RoboConf will configure your site to the setup of the url

view your site in different browsers

using pre-generated URLs

Vocabulary Per User, New Taxonomy Module in the works by George Cassie

every user has their own vocabulary

so you can show, but disabled-- see what everyone else has been tagging a node with

http://castlin.net/blog/1/2009/03/vocabulary-user

Resolution

Syndicate content