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

Filtering Content via Taxonomy AND Site on Multisite, Approach?

Hey Drupal Comm,

I had written a few weeks ago about a a multisite configuration I wanted. Namely, one site hosting three domains, each with similar content. Except depending on which URL, regardless of being logged in or not, a different theme would show. Someone was very nice to point out actually how simple this was (editing the $conf array for themes in each of the sites settings.php). Works beautifully.

However, what I would really love to do (and it seems to have been questioned by a few people before me, it seems like an issue that needs to be met though!) is filter content as well by site.

The sites I'm working on in question concern different career fields and colleges that specialize in such. Each separate site has profiles of the schools, perhaps articles about things like getting into school, etc. Each URL pertains to a different concentration.

Now, some content will be available across all of the sites. Others, for instance, a school whose primary focus is on Fashion, would only have content that has something to do with Fashion, etc...

Starred module

Hello,

First I want to thank all the contributers for this outstanding product, it's very useful for me, and I would like to be a part of Drupal in the future. It was love at first sight!

I want to do a proposal and a sketch for a new but quite simple module, maybe you want to give me some useful suggestions.

The module imitates the star function of Google's Gmail. When you click on the star (in front of a e-mail) you will bookmark it automatically, then you will find it in the starred list, that contains all the (important) starred e-mails.

This is the essence of the new module, but nevertheless I want to make it more general:

>> You can use your own icons and labels etc.
>> It's possible to add more than 1 different "star"-field to a node.
>> The information is saved as a normal field (you can filter it with views)
>> You can do the action not only when you are editting a node, but also in a views generated list and on the node itself.

How do I think ik can be realized (Apologize me, because I'm a drupal noob)

Modules who uses techniques useful for this module is the fivestar-module and the unflag module.

How to upload images in a custom node?

$form['image'] = array(
'#type' => 'file',
'#title' => t('Upload Main Image'),
'#default_value' => $node->image,
'#size' => 48,
'#description' => t('Upload Main Image.')
);

I have this in my form, it generates an image upload box. However the image isn't uploading and the name of the file isn't going into the database.

How can i process to this to
a) Get the file name to input into my database
b) Actually make this upload this file to root/files

Incase it is needed the full module can be found below.


<?php
// $Id$
/**
* @file
* Provides a "portfolio" node type.
*/

/**
* Implementation of hook_node_info().
*/
function portfolio_node_info() {
// We return an array since a module can define multiple node types.
// We're only defining one node type, type 'portfolio'.
return array(
'portfolio' => array(
'name' => t('Portfolio'), // Required.
'module' => 'portfolio', // Required.
'description' => t('Add a portfolio item!'), // Required.
'has_title' => TRUE,
'title_label' => t('Title'),
'has_body' => TRUE,
'body_label' => t('Portfolio'),
'locked' => TRUE
)
);
}

/**
* Implementation of hook_menu().
*/
function portfolio_menu($may_cache) {
$items = array();
// Do not cache this menu item during the development of this module.
if (!$may_cache) {
$items[] = array(
'path' => 'node/add/portfolio',

Webform Module - Posting Success and Error Messages to a Node

I have a simple webform contact page that accepts a name, email and message essentially and I would like to post the success and error messages to a particular node.

The reason for this is because I am using the panels module, and I would like to post the success and error messages into an adjacent panel. Does anyone know if this is possible or if it has been done before?

Any help would be greatly appreciated.

Unset form value in module settings so it doesn't save to database

I'm working on my module's settings form and I want the user to be able to enter their FeedBurner account username and password, but then when the form is submitted, I would like to NOT save the password and/or username in the variable table. Here is the code from the settings form (called by drupal_get_form from in the menu):

function feedburner_settings_form() {
  ...
  $form['account'] = array(
    '#type' => 'fieldset',
    '#title' => t('FeedBurner Account'),
  );
  $form['account']['feedburner_username'] = array(
    '#type' => 'textfield',
    '#title' => t('Your FeedBurner username'),
    '#default_value' => variable_get('feedburner_username', ''),
    '#size' => 30,
    '#maxlength' => 30,
  );
  $form['account']['feedburner_password'] = array(
    '#type' => 'password',
    '#title' => t('Your FeedBurner account password'),
    '#default_value' => variable_get('feedburner_password', ''),
    '#size' => 30,
    '#maxlength' => 30,
  );
  $form['account']['feedburner_encrypted'] = array(
    '#type' => 'hidden',
    '#value' => variable_get('feedburner_encrypted', ''),
  );
  ...
  return system_settings_form($form);
}

And here's the validation function and three attempts I've tried so far:

function feedburner_settings_form_validate($form_id, $form_values, $form) {

Accessing a textarea's value

Hi,

I am working through development of my first module and have a question. So here's the 'configure' case in my block hook in the module file:

Pages

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