User login

Best practice for an upgraded site to define RDF mappings for RDFa output?

A site that has been upgraded from Drupal 6 to Drupal 7 has not even had this code from standard.install in the Standard profile run yet. Can generic mappings like this be easily taken care of in other custom configuration of RDF or should this (plus more?) go in an update hook?

Use Drush to sync files from one site to another

Believe it or not, this is the function you want:

core-rsync (rsync) Rsync the Drupal tree to/from another server using ssh.

For example:

drush rsync @example.stage:%files @example.local:%files

Can't do remote to remote though.

Manually replace the body of an Activitystream node

Manually updated twitter feed post:

after that they should properly have the twitter name in the title, but not in the body.

and by manually updated, i mean activitystream breaks the bloody node edit form somehow.

Since i only want to do D7 development, and this is D6, i bailed pretty early and made the change direct in the live database (after careful investigation of course).

Remove a trailing slash (if any) from a string with PHP

php remove traling slash
php remove last character

From a line in template.php that also takes out leading http:// to present a more human-friendly web address.

    $display = rtrim(str_replace('http://', '', $url), " /");

Override imagecache module

There should be a module that lets people override the automatically resized and cropped image with one they did for that image and that size specifically. Especially for choosing what part of the image when a crop is necessary.

A workaround would be to create another separate imagefield that does not use imagecache that is used if anything is uploaded to it, but this involves template work and general kludginess.

Syndicate content