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

Passing data from gallery2 module to drupal module

Hi,

I am using gallery2 with drupal. I have some data that I need to pass from my g2 module to my drupal module. I tried using _SESSION to do that, but it doesn't seem to work. Specficially, I couldn't include bootstrap.inc in my g2 module because of path problems. I guess thats because bootstrap.inc and other inc assumes the current file locates in htdocs?

Anyway, whats the easiest way to pass data from a g2 module to a drupal module?

Thanks.

Form Q

I just started recentrly with drupal and atm I'm (tring) to make some sort of enrollement module.
I've come to the point that i need forms but the thing is:
I can display my forms and all, but the layout isn't good.
What i want is

splitting up the $content output for flexinodes - costumizing the $content (using template.php??)

Hi all,

I'm having a problem with displaying information saved with a flexinode type..

What is happening is that I have a node-flexinode.tpl.php template where all rendering for node of that flexinode type will be done..

In a default situation I would leave the standard

Problem with locale module and submit buttons...

Hey all

I've been trying to fix a problem with my module for a few days now and I'm just not getting anywhere... Thought I'd ask for some help :o)

Here's some example code:

<?php
/**
* Edits table header.
*/
function tablemanager_tableedit($edit) {
if (!is_numeric($edit)) {
drupal_access_denied();
}
$fetch = db_fetch_object(db_query('SELECT tm.name, tm.header, tm.description, tmd.data
FROM {tablemanager} tm
LEFT JOIN {tablemanager_data} tmd ON tm.tid = tmd.tid
WHERE tm.tid = %d',
$edit));
if (!$fetch) {
drupal_not_found();
}
if (!user_access('administer tables')) {
drupal_access_denied();
}
switch ($_POST['op']) {
default:
$col = substr($_POST['op'], 16);
$form['row'] = array(
'#type' => 'hidden',
'#value' => check_plain($edit),
);
$form['col'] = array(
'#type' => 'hidden',
'#value' => $col,
);
$header = unserialize($fetch->header);
if (count($header) == '1') {
drupal_goto('admin/tablemanager/tabledelete/'.$edit);
return;
}
$output = confirm_form(
'tablemanager_columndelete',
$form,
t("Are you sure you want to delete column '%col'?", array('%col' => $col)),

MENU_LOCAL_TASK doesn't work with just one task. Why?

My code below (in my hook_menu() relationship_menu() )

    $items[] = array (
      'path' => 'admin/relationship/tidy',
      'title' => t('check database'), 
      'callback' => 'relationship_check_database', 
      'access' => user_access('administer predicates'), 
      'type' => MENU_LOCAL_TASK
    );
    $items[] = array (
      'path' => 'admin/relationship/tidy/flush',
      'title' => t('flush term cache'), 
      'callback' => 'relationship_flush_terms', 
      'access' => user_access('administer predicates'), 
      'type' => MENU_LOCAL_TASK
    );

Does not work. The "flush cache" link should appear as a secondary local task listed underneath the normal "check database" page.
(the callback does trigger when requested by hand)
The link just fails to appear.

When I add a second secondary local task under the tidy/ path "check database"

    $items[] = array (
      'path' => 'admin/relationship/tidy/all',
      'title' => t('list all'),
      'callback' => 'relationship_list_all',
      'access' => user_access('administer relationships'),
      'type' => MENU_LOCAL_TASK,
    );

... They BOTH show up.

Of course I have to re-save the modules page to reset the callback paths each time.

I tracked the problem down to menu.inc:
menu_secondary_local_tasks()
<?php
foreach ($local_tasks[$pid]['children'] as $mid) {

cck and contemplate: which file defines field classes?

I'm using contemplate to theme cck output

Here is the code from the template box (of contemplate) for me to modify

BEGIN CODE
div class="field-items"

foreach ((array)$field_nameofmyfield as $item) {

div class="field-item"

print $item['view']

END CODE
(I had to modify it because it was being interpreted as formatting by drupal.org

Pages

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