Hi, is there some preliminary version of this module for Drupal 6? I'm very interested. Thanks

CommentFileSizeAuthor
#3 webcams6.module.patch6.6 KBkriskd
#3 webcams6.info_.patch426 byteskriskd

Comments

moonray’s picture

Nope, not yet, as my time is limited.
Any patches are welcome.

didier973’s picture

subscription: I just would like to know if someone had time and knowledge to patch the 5 series for 6.x...

kriskd’s picture

StatusFileSize
new426 bytes
new6.6 KB

I attempted to create a patch for D6, but it's not working. I got an error when I initially created my webcam content, but then could no longer reproduce the error. And, the webcam images are not displaying. Hopefully someone with some more skill can take what I've done and get this great mod working for D6!

If anyone wants to test my patches, please don't do it on a production site! I've attached two files, one for webcams.info and one for webcams.modules.

kriskd’s picture

Here's the error I get with my patch.

warning: Missing argument 2 for db_last_insert_id(), called in C:\xampp\htdocs\drupal-6\sites\default\modules\webcams\webcams.module on line 284 and defined in C:\xampp\htdocs\drupal-6\includes\database.mysql-common.inc on line 531.
vm’s picture

did you run it through the coder.module ?

kriskd’s picture

did you run it through the coder.module ?

Yup, that's exactly how I did it. :-)

kriskd’s picture

Over a month since I took a stab at a patch. Moonray, will you have any availability to see if you can make it work based on what I did? Thanks for your consideration.

kriskd’s picture

I just realized webcams.install needed to be updated for D6, so I took a stab at that, but that is generating errors as well. I replaced function (webcams_install) with the following:

/**
* Implementation of hook_install().
*/
function webcams_install() {
  // Create tables.
  drupal_install_schema('webcams');
}

/**
* Implementation of hook_schema().
*/
function webcams_schema() {
  $schema['webcams'] = array(
    'fields' => array(
      'wid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
      'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
      'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
      'name' => array('type' => 'varchar', 'not null' => TRUE, 'default' => ''),
      'default_url' => array('type' => 'varchar', 'not null' => TRUE, 'default' => ''),
      'url' => array('type' => 'varchar', 'not null' => TRUE, 'default' => ''),
      'width' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
      'height' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
      'thickbox' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
      'link' => array('type' => 'varchar', 'not null' => TRUE, 'default' => ''),
      'delay' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 30),
      'timeout' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
      'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
    ),
    'indexes' => array(
      'nid'    => array('nid'),
      'vid' => array('vid')
    ),
    'primary key' => array('wid'),
  );

  return $schema;
}

Which in turn created this scary error:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL DEFAULT '', `default_url` VARCHAR NOT NULL DEFAULT '', `url` VARCHAR ' at line 5 query: CREATE TABLE webcams ( `wid` INT unsigned NOT NULL auto_increment, `vid` INT unsigned NOT NULL DEFAULT 0, `nid` INT unsigned NOT NULL DEFAULT 0, `name` VARCHAR NOT NULL DEFAULT '', `default_url` VARCHAR NOT NULL DEFAULT '', `url` VARCHAR NOT NULL DEFAULT '0', `width` INT unsigned NOT NULL DEFAULT '0', `height` INT unsigned NOT NULL DEFAULT '0', `thickbox` INT unsigned NOT NULL DEFAULT '0', `link` VARCHAR NOT NULL DEFAULT '', `delay` INT unsigned NOT NULL DEFAULT '30', `timeout` INT unsigned NOT NULL DEFAULT '0', `weight` TINYINT NOT NULL DEFAULT 0, PRIMARY KEY (wid), INDEX nid (nid), INDEX vid (vid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in C:\xampp\htdocs\drupal-6\includes\database.inc on line 514.

While I was at it, I fixed (or I think I fixed) the error mentioned above in line 284 of webcams.module. I changed it to:

$webcam->wid = db_last_insert_id('{webcams}', '{webcams}_wid');

I really feel like I've given this the old college try and would sure appreciate an expert taking over or giving me some guidance.

moonray’s picture

Assigned: Unassigned » moonray

I've started work on the conversion. There are a few issues with upgrading views integration to Views 2.0, though, which is holding things up.

Tony Sharpe’s picture

subscribe

moonray’s picture

Status: Active » Needs work

The development snapshot for D6 of webcams module should be available. It's fully functional, with the exception of Views 2 integration, which is proving more troublesome than I expected. Views integration is coming.

Please test it and give your feedback.

moonray’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Category: support » task
moonray’s picture

Status: Needs work » Fixed

Drupal 6 version released.

kriskd’s picture

Thanks, Moonray!

albertc’s picture

Thanks for the heads-up!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.