This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Is it possible to store serialized arrays in MySQL via Drupal?

I'm working on (yet another!) sort order patch for the taxonomy module, and I want to store the sort order in a column created for this purpose in term_data.
The sort order is in an array, and I decided to store it in a VARCHAR column called sortorder.

The ouput from _taxonomy_prepare_update looks like this:

Drupal 4.6 image.module from cvs -> how to fast upload images

I installed drupal 4.6rc and image.module.
How can I make an album by giving Photos in a directory on the server, as it worked in 4.5?
thanks

access permissons for specific gallerys

Hey you,
I installed drupal with the image.module, to make some galleries visible for every user.
I would like to add a gallery for non-popular use, so that a specific user must log on to see it.
Is that possible?
Thanks

Suggestion please: use filters or something else?

I need suggestions for how to program some feature that I am planning for my module. I am currently building an "anti-fud linux site" in portuguese and I plan on a feature that will do something like that:

First: a new node type (I called it "grue" on lack of creativity) which only differs from "story" in that you can edit its teaser (actually used as an "abstract"). Only administrators can enter grues. This is already implemented and working.

Second: on each story, an administrator, and only an administrator can edit it to add markups like <13>excerpt of text</13>, meaning that these excerpts will be "marked" as logical fallacies (reference: http://www.datanation.com/fallacies/index.htm. The 13 is the node number for the equivalent grue in this case. A sample text would be like that:

<3>And so this story bla bla bla</3> and also <7>yadda yadda yadda</7>. Besides that, <4>so and so and so</4>.

When an user sees this news story, it would be processed (and I think this would be a good place for a filter) to show something like that. Let's consider that nodes 3, 7 and 4 are grues and have names "bla", "ble" and "bli" respectively.

"And so this story bla bla bla and also yadda yadda yadda. Besides that, so and so and so.

This article has the fallacies bla, ble and bli. Click here for details."

project.module Support Forum link

Each project page can display a "Support forum" link. What is the best way to point that link to a specific user forum. Looking in the project.inc file I see:

$links[] = l(t('Support forum'), variable_get('project_support_forum', 'forum/18'));

But I'm unsure how to set the project_support_forum variable from the GUI.

Thanks,
Jesse

Display Authoring Information and Title

Hi. The question of displaying the authoring information (submitted by user on date) and / or title of the post has been asked sometimes in this forum. I want to be able to toggle this for some posts, which could be of any type, including flexinode. Below is the approach I am following for Drupal 4.5.2; since I alter core functionality (table node, node.module and some theme files) I don't recommend it to anybody. I set two new variables for any node, showcreated and showauthor. It works perfectly for page or image node types. If somebody wants to follow this way and has any question, please feel free to ask me. My point is, I want to follow a similar approach to display the title of the post, if possible WITHOUT making an extra call to the database. The Title is set using the function themewhatever_page($content, $title = NULL, $breadcrumb = NULL); please could somebody tell me how to extract additional node fields (like a hypothetical "node.showtitle") in it? Thanks.

database

ALTER TABLE {node} ADD showauthor int(2) NOT NULL default '1';
ALTER TABLE {node} ADD showcreated int(2) NOT NULL default '1';

node.module

function node_validate($node)
// Under:
// Validate for normal users:
+ $node->showauthor = variable_get("node_showauthor_$node->type", 1);
+ $node->showcreated = variable_get("node_showcreated_$node->type", 1);

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions