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

modules not working

I upgraded this thing earlier today and it screwed everything up and now I cant even log in, does anyone know what the deal is with this 4.7.0 version? I used fantastico to upgrade. From my perspective drupal really sucks but at least the old version was technically working, now I nor anyone else can even log in and the site is littered with errors, does anyone have any ideas? Any help would be appreciated. My site is www.filmportal.com

Thanks-

having problems connecting to another db within php snippet

OK I imagine this has security issues and plus it's not working. I'm wanting to pull info from a different db and display it within a block. Something must be wrong with my db_connect call bc it's not connecting to the other db. Am I going about this the right way? Help!

OG Installed and Configured, but everyone sees Posts

I have not been able to locate a solution to this issue in searching the site. I made a request for support on this but no one has answered and I need to try and move forward if possible.

I have installed the 4.7.0 og.module in 4.7.2 Drupal Site. Enabled og and og_basic in modules. Enabled og in admin>>settings>>og. Under admin>>settings>>og I set visability "chosen by author using checkbox -- default to private".

attachments and comments disabled in admin>>settings>>content_type>>groups

Created a group.

image.module mass upload of images

Hi,

I am using the image.module for displaying my photo galleries. What is the best option available for mass uploading of images into a gallery ?

Image Publishing modules seems to offer support similar to the ones available in gallery2 but there is no clear 'howto' describing embedding the gallery applet ?

At photobar seems to be the best bet ?

Is there any other easy way ?

Thanks in advance

regards

Karthik

how does upload module create new input field each time?

I'm looking at this and can't figure it out, it's obviously some kind of javascript thing, but what? any help would be greatly appreciated, I need this kind of behavior for a module I'm developing, even a hint! please! :)

function _upload_form($node) {

$form['#theme'] = 'upload_form_new';

if (is_array($node->files) && count($node->files)) {
$form['files']['#theme'] = 'upload_form_current';
$form['files']['#tree'] = TRUE;
foreach ($node->files as $key => $file) {
$description = file_create_url((strpos($file->fid, 'upload') === false ? $file->filepath : file_create_filename($file->filename, file_create_path())));
$description = "". check_plain($description) ."";
$form['files'][$key]['description'] = array('#type' => 'textfield', '#default_value' => (strlen($file->description)) ? $file->description : $file->filename, '#maxlength' => 256, '#description' => $description );

$form['files'][$key]['size'] = array('#type' => 'markup', '#value' => format_size($file->filesize));
$form['files'][$key]['remove'] = array('#type' => 'checkbox', '#default_value' => $file->remove);
$form['files'][$key]['list'] = array('#type' => 'checkbox', '#default_value' => $file->list);
// if the file was uploaded this page request, set value. this fixes the problem
// formapi has recognizing new checkboxes. see comments in _upload_prepare.

Help with logotool module - hook_init behaviour?

First off, here's my newest module:

http://cvs.drupal.org/viewcvs/drupal/contributions/modules/logotool/logo...

It works fine under the 'normal' and 'random' modes, but when you select 'specifed' mode although it sort of works, I'm having trouble with setting a default logo when a match ISN'T made. Yeah that's right... You'd think that'd be the easiest part? Well that's the part I'm having trouble with...

Here's the code for hook_init:

/**
 * Implementation of hook_init
 */
function logotool_init() {
  switch (variable_get('logotool_display', 0)) {
    case '0':
      variable_set('logotool_logo', variable_get('logotool_path', ''));
      break;
    case '1':
      $logos = file_scan_directory(variable_get('logotool_folder', LT_CWD), '.*');
      variable_set('logotool_logo', array_rand($logos));
      break;
    case '2':
      $temp = explode("\n", variable_get('logotool_pages', ''));
      foreach ($temp as $a) {
        $logo[substr($a, 0, strpos($a, '|'))] = trim(variable_get('logotool_folder', LT_CWD).'/'.substr($a, strpos($a, '|')+1));
      }
      if (array_key_exists($_GET['q'], $logo)) {
        variable_set('logotool_logo', $logo[$_GET['q']]);
      }
      break;
  } // end switch
} // logotool_init

Now case '2' is what I need help with and as you can see it currently has no provisions if a match ISN'T made but in this state... it works... Only it displays the same logo as was specified previously when no match is made (obviously). So common programming sense tells me that all I need to do is add an 'else' to the code like this:

Pages

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