User login

Documentation

Drupal, project, life documentation. This is where notes go to try to earn their way onto Drupal.org.

Automatically title nodes

Agaric's been searching:

drupal replace node title
drupal replace title with calculated field
use CCK fields for headline text

http://drupal.org/project/auto_nodetitle

(It is not called Node Auto Title, NAT is actually Node Auto Term and is a wonderful, but entirely different, module. That didn't stop me from instructing my co-collective member to download it...)

Agaric's been searching:

drupal replace node title
drupal replace title with calculated field
use CCK fields for headline text

http://drupal.org/project/auto_nodetitle

(It is not called Node Auto Title, NAT is actually Node Auto Term and is a wonderful, but entirely different, module. That didn't stop me from instructing my co-collective member to download it...)

Taxonomy's unused tables: related terms and synonyms

fago__: drupal doesn't use them for anything, afaik
fago__: so it's up to contribs to add value to them
agaric: http://drupal.org/node/148080
bot_module: http://drupal.org/node/148080 => Add related terms & synonym editing => Node Auto Term [NAT], Code, normal, patch (code needs review), 1 IRC mention

fago__: drupal doesn't use them for anything, afaik
fago__: so it's up to contribs to add value to them
agaric: http://drupal.org/node/148080
bot_module: http://drupal.org/node/148080 => Add related terms & synonym editing => Node Auto Term [NAT], Code, normal, patch (code needs review), 1 IRC mention
agaric: And contribs are just starting to do so. But one would think that somewhere taxonomy would have a written rationale for having them in the first place?
fago__: I'm not aware of any.. but yeah, for what synonyms are thought is quite obvious

Copy Custom Content Type Definition

Ever think, so I just did all this cool stuff with CCK, and I want to save it to use it again?

Wanted CCK field structure export and import?

It's called the content_copy module, and comes built into CCK in Drupal 5.

It also reputedly has some of the most beautiful code ever written in PHP, by KarenS. Really, when's the last time you saw peopel spontaneously writing in an issue how amazing code looked?

Ever think, so I just did all this cool stuff with CCK, and I want to save it to use it again?

Wanted CCK field structure export and import?

It's called the content_copy module, and comes built into CCK in Drupal 5.

It also reputedly has some of the most beautiful code ever written in PHP, by KarenS. Really, when's the last time you saw peopel spontaneously writing in an issue how amazing code looked?

Synonyms and Related Terms in use

Evidence emerges that people intend and are finding ways to use Drupal's core taxonomy features related terms and synonyms (which are separate concepts– in the database synonyms are simply alternate names for a term, while related terms provides a table for every term term eligible to to have relations).

Here are the sightings:

Evidence emerges that people intend and are finding ways to use Drupal's core taxonomy features related terms and synonyms (which are separate concepts– in the database synonyms are simply alternate names for a term, while related terms provides a table for every term term eligible to to have relations).

Here are the sightings:

Displaying a Voting module star rating on custom themed CCK node types

Voting module
Drupal 4.7

How to display voting widget on our custom node template

This should do it for you, boys and girls.

if( function_exists("voting_control_node") ) {
$votingwidget = voting_control_node(&$node, FALSE, TRUE);
print $votingwidget;
}

Unrelated notes on not screwing up:

Don't forget parenthesis for if statements! It makes an ugly error.

Parse error: parse error, unexpected T_STRING, expecting '(' in...

Voting module
Drupal 4.7

How to display voting widget on our custom node template

This should do it for you, boys and girls.

if( function_exists("voting_control_node") ) {
$votingwidget = voting_control_node(&$node, FALSE, TRUE);
print $votingwidget;
}

Unrelated notes on not screwing up:

Don't forget parenthesis for if statements! It makes an ugly error.

Parse error: parse error, unexpected T_STRING, expecting '(' in...

Agaric wants to know how to deny access to settings form in 4.7

Agaric got this error message:

Cannot use string offset as an array

(in, say, modules/system.module on line 745, as a hypothetical example)

Turns out this is from using return t("Access Denied") syntax when the hook_settings function expects a form array to be returned.

We thought we had the answer and posted as such here:

http://drupal.org/node/22797#comment-240833

Agaric got this error message:

Cannot use string offset as an array

(in, say, modules/system.module on line 745, as a hypothetical example)

Turns out this is from using return t("Access Denied") syntax when the hook_settings function expects a form array to be returned.

We thought we had the answer and posted as such here:

http://drupal.org/node/22797#comment-240833

But while this effectively denies access, no error message appears and the form is provided as just the save and reset buttons. Not the greatest user interface feedback.

Replacing text that does NOT match a given string

Agaric likes to ask the hard questions...

ereg_replace beginning is not found
ereg_replace not present
ereg_replace not equal
ereg_replace character does not match

This is what Agaric came up with. We think that's what the ^ (carrot) character does in that context: negate, deny, exclude the following characters.

Using the . to also match on shttp, or any letter http if they've got others. Oh man, that's https and the . doesn't work that way anyway. Aborting that part of this.

From our scraper module, no, not right:

Agaric likes to ask the hard questions...

ereg_replace beginning is not found
ereg_replace not present
ereg_replace not equal
ereg_replace character does not match

This is what Agaric came up with. We think that's what the ^ (carrot) character does in that context: negate, deny, exclude the following characters.

Using the . to also match on shttp, or any letter http if they've got others. Oh man, that's https and the . doesn't work that way anyway. Aborting that part of this.

From our scraper module, no, not right:

<

blockquote>

Ask Agaric: Unsubscribing from a Subscription to a Post

From a user of an Agaric client's site:

I was wondering if you could help me. I have subscribed to one of the forums and would like to unsubscribe. Can you tell me how to do so. Thank you.

To unsubscribe from content updates, go to your account:

http://example.org/user

Click on the "Subscriptions" tab. Most likely, uncheck any boxes you see (on the "threads" sub-tab that comes up by default), and press "Save".

From a user of an Agaric client's site:

I was wondering if you could help me. I have subscribed to one of the forums and would like to unsubscribe. Can you tell me how to do so. Thank you.

To unsubscribe from content updates, go to your account:

http://example.org/user

Click on the "Subscriptions" tab. Most likely, uncheck any boxes you see (on the "threads" sub-tab that comes up by default), and press "Save".

Possibly also click the "Edit" tab and make sure your account isn't set to automatically subscribe to threads to which you post.

Bibdesk and Biblio

Agaric wants to know...

Do bibdesk (open source bibliography desktop application for Mac) and biblio drupal module work together?

There's a possible connection, but it's not in English!

BibDesk | pabsta's groove
Je viens de découvrir BibDesk. C’est un GUI fait pour les Macs destiné ? ... J’ai également découvert le module biblio sur Drupal, mais qui semble mal ...
http://www.pabsta.qc.ca/node/399

Agaric wants to know...

Do bibdesk (open source bibliography desktop application for Mac) and biblio drupal module work together?

There's a possible connection, but it's not in English!

BibDesk | pabsta's groove
Je viens de découvrir BibDesk. C’est un GUI fait pour les Macs destiné ? ... J’ai également découvert le module biblio sur Drupal, mais qui semble mal ...
http://www.pabsta.qc.ca/node/399

... translation just says that Biblio's import (of a version he's using in 2007 April) doesn't seem to work.

Migrating a Shared-user Multisite install

Things to watch out for when moving a shared-user multisite install.

The biggest thing is that when moving a site to a different userbase, all the attribution will be screwed up, so you just can't do it. However, assuming that your moving a test site onto a live user install, but you want to migrate all that content you put up and configuration, and will reassign authorship in the database or manually, be sure to:

Things to watch out for when moving a shared-user multisite install.

The biggest thing is that when moving a site to a different userbase, all the attribution will be screwed up, so you just can't do it. However, assuming that your moving a test site onto a live user install, but you want to migrate all that content you put up and configuration, and will reassign authorship in the database or manually, be sure to:

<

ul>

  • The subsite_ prefixed parts of the sequences table must be moved over. Export the table and copy that half the inserts for instance.
  • Syndicate content