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

xmlrpc and authentication

Ok, hopefully this is quick and I just missed something. I am building a click-edit Google map, and everything is alive and functions except for 1 element -- saving marker data. The difficulty (as I see it) is a choice between two ways of moving marker data.

Layout:
Map table -- has/stores map specific settings, center, zoom, etc
Marker table -- has/stores marker data and is keyed to a map entry based on $mapid
The ability to reuse markers without having to re-enter them is an unexpected benefit of this design.

Methods:
1. XMLRPC all the way. I click a point to create a marker, I edit that marker inline in the javascript, and I can save it directly vi XMLRPC. Piece of cake. Not much code, not much effort. The problem is going to be one of access. I can write XMLRPC code to dump all markers, or even in a worst case scenario, the problem of map or location based spam becomes a nightmare. The only token that I am aware I have access to would be document.cookies.PHPSESSID, but I don't know how that relates back to anything in Drupal that would let me authenticate and verify a content creator. The second problem with an XMLRPC only method is the fact that any new markers will/can get updated in a marker table before the map node has a nid assigned (or even exists for that matter)! The work around for that would be a staging table where orphans get deleted after a specified age limit, everything is keyed on PHPSESSID, and markers that belong to a map node that actually gets created get migrated to the live marker table when the submit occurs. Gut feeling tells me this is the method I should be trying to use, but I really don't have much of a starting point as far as Drupal and user verification are concerned.

Flexinode html a pattern field + image field resize

Look more likely that I have thought up !
add in module flexinode an opportunity to place fields according to html a pattern and

add an opportunity of automatic scaling of pictures in a floor image

here new the module

here screenshot

Multiple Forums

Is there a way to create more than one forum? I run a student organization with multiple degrees represented and as we develope our site I was wondering if it was possible to create a couple more forums. I would prefer to have seperate forums instead of just containters. Or, could I focus containers on different pages? I'm still learning the drupal system and would like to avoid having more than one install. Any ideas? Thx guys!

Problem with book module and editing

I don't know if this is the right area for this post, but my problem is with a module.

custom block not viewable from admin/block

I have created a custom module, which includes a custom block. I am unable to view the block from admin/block to enable and configure it. The code is as follows:

/** 
 * Implementation of hook_block(). 
 */ 
function case_calendar_block($op = 'list', $delta = 0) { 
  global $user;
  // The $op parameter determines what piece of information is being requested. 
  if ($op == 'list') { 
    // If $op is "list", we just need to return a list of block descriptions. This 
    // is used to provide a list of possible blocks to the administrator. 
    $blocks[0]['info'] = t('Calendar'); 
    return $blocks; 
  } 
  else if ($op == 'view') {
    if ($user->uid) {
      $block = array(); 
      // If $op is "view", then we need to generate the block for display purposes. 
      // The $delta parameter tells us which block is being requested. 
      switch ($delta) { 
        case 0: 
          // The subject is displayed at the top of the block. Note that it should 
          // be passed through t() for translation. 
          $block['subject'] = t('Calendar'); 
          // The content of the block is typically generated by calling a custom function. 
          $block['content'] = case_calendar_contents(1); 
          break; 
      } 
      return $block; 
	}
  } 
}

What's weird is that the code for this block is borrowed from another block that works perfectly.

How does hook_menu() work? Something missing from documentation.

In Drupal 4.6.0 I tried writing something similar to module taxonomy_menu so that I can insert extra menu items using a different data source. I read the documentation for hook_menu but it does not mention how it uses caching or the menu table. My use of hook_menu produced something different to taxonomy_menu.

Some of the added items never appeared in the menu no matter what I did. I tried MENU_DYNAMIC_ITEM but nothing changed.

I then shut down the computer for a rest (I have a strict rule of spending at least 0.5 hours a day away from the computer). This morning some extra menu items appeared. What changed?

Last night I tried clearing the cache table but that did nothing. I tried resetting the menu table but that did nothing. I tried my code in the $may_cache is true section and in the false section. There must be something else stopping the menu items displaying.

I found the menu items were appearing in the menu table with settings that are exactly the same as menu items that display. When I visit administration >> menus I found some of the temporary menu items from my code were being added to the menu table. After a few visits to the menus page I have items added seven times.

The extra entries have a pid of 1. pid is the index of url_alias but there is no entry in url_alias with pid=1.

The extra entries are of type 22 and I have not found where the type field is defined or used.

Pages

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