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

Snap Preview Module

Ok.. since I got sick of overwriting my Snap Preview anywhere code in my template I created a quick module to impliment the previews.

If you dont know Snap Preview gives a nice site preview when users hover over an external link..

Here is the module.. you can get it from the CVS repository link.
http://drupal.org/project/snap

let me know your thoughts..

Enable cache when throttle is on

Does anybody know how to activate cache when throttle conditions are met?

image and image gallery errors

Alright let me just start by saying I am very new to this. I installed Drupal not 2 hours ago. My intention was to use the flash gallery for my current website. So I followed the instructions and installed the image folder that had the image.module and image_gallery.module into the modules directory. Everything seems to work except when I go to Settings > Image or Settings > Image Gallery I just get "warning: Missing argument 2 for drupal_get_form() in site/includes/form.inc on line 61." And I'm just not exactly sure why it does that, so any suggestions would be much appreciated.

problem with menu_execute_active_handler or me?

I am writing my first custom module for drupal 5.

my menu item looks like this:

        $items[] = array(
          'access'             => $access,
          'callback'           => 'drupal_get_form',
          'callback arguments' => 'vcsshop_delete',
          'path'               => 'admin/content/vcsshop/delete',
          'title'              => t('Delete catalog item'),
          'type'               => MENU_CALLBACK,
        );

the link you click on looks like: http://example.com/index.php?q=admin/content/vcsshop/delete/2

I get lots of errors and stuff when I click it. I tracked the problem to menu_execute_active_handler in menu.inc. The code:

  // We found one, and are allowed to execute it.
  $arguments = isset($menu['callbacks'][$path]['callback arguments']) ? $menu['callbacks'][$path]['callback arguments'] : array();
  $arg = substr($_GET['q'], strlen($path) + 1);
  if (strlen($arg)) {
    $arguments = array_merge($arguments, explode('/', $arg));
  }

$arguments is a string, not an array, so array_merge complains. I see in the php doc's that in php5 it was changed to require arrays. I changed the code to this:

  // We found one, and are allowed to execute it.
  $arguments = isset($menu['callbacks'][$path]['callback arguments']) ? Array($menu['callbacks'][$path]['callback arguments']) : array();

Custom Module Required

I was wondering if there is anyway to create a form or node that would display information entered into the form. However an authenticated user would be able to edit it without being given the ability to be an admin. I need to have this solved as soon as possible. I can provide you with more information.

variable_get returns nothing

I am developing a module to perform some action after user logs in to the system for the first time. I ran on quite strange problem. This is the code of hook_settings of my module:

Pages

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