? facebook-platform Index: fb_app.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/fb/fb_app.install,v retrieving revision 1.8 diff -u -r1.8 fb_app.install --- fb_app.install 3 Apr 2009 23:55:38 -0000 1.8 +++ fb_app.install 6 May 2009 19:25:28 -0000 @@ -33,6 +33,7 @@ 'apikey' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, ), 'id' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, ), 'secret' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, ), + 'canvas' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, ), 'data' => array('type' => 'text', 'size' => 'big', ), ), 'unique keys' => array( @@ -70,7 +71,15 @@ db_drop_field($ret, 'fb_app', 'create_account'); db_drop_field($ret, 'fb_app', 'unique_account'); // canvas moved to fb_canvas.module - db_drop_field($ret, 'fb_app', 'canvas'); + db_drop_field($ret, 'fb_app', 'canvas'); // BAD IDEA! see update 6202 return $ret; +} + +function fb_app_update_6202() { + // canvas is too important, let's support it. + $ret = array(); + db_add_field($ret, 'fb_app', 'canvas', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, )); + drupal_set_message(t('Further action required! Edit and save each of your Facebook Applications nodes. Even if you have made no changes, you must do this for each application which supports canvas pages. Sorry for the inconvenience.')); + return $ret; } \ No newline at end of file Index: fb_app.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/fb/fb_app.module,v retrieving revision 1.29 diff -u -r1.29 fb_app.module --- fb_app.module 3 Apr 2009 23:55:38 -0000 1.29 +++ fb_app.module 6 May 2009 19:25:29 -0000 @@ -365,9 +365,10 @@ $fb_app->data = serialize($node->fb_app_data); $fb_app->nid = $node->nid; - db_query("INSERT INTO {fb_app} (nid, label, apikey, secret, id, data) VALUES (%d, '%s', '%s', '%s', '%s', '%s')", + db_query("INSERT INTO {fb_app} (nid, label, apikey, secret, id, canvas, data) VALUES (%d, '%s', '%s', '%s', '%s', '%s', '%s')", $node->nid, $fb_app->label, $fb_app->apikey, $fb_app->secret, $fb_app->id, + $fb_app->canvas_name, $fb_app->data ); @@ -386,9 +387,10 @@ $fb_app->data = serialize($node->fb_app_data); $fb_app->nid = $node->nid; - db_query("UPDATE {fb_app} SET label='%s', apikey='%s', secret='%s', id='%s', data='%s' WHERE nid=%d", + db_query("UPDATE {fb_app} SET label='%s', apikey='%s', secret='%s', id='%s', canvas='%s', data='%s' WHERE nid=%d", $fb_app->label, $fb_app->apikey, $fb_app->secret, $fb_app->id, + $fb_app->canvas_name, $fb_app->data, $node->nid); Index: fb_canvas.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/fb/fb_canvas.module,v retrieving revision 1.26 diff -u -r1.26 fb_canvas.module --- fb_canvas.module 2 Apr 2009 16:17:52 -0000 1.26 +++ fb_canvas.module 6 May 2009 19:25:29 -0000 @@ -333,10 +333,11 @@ function fb_canvas_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { if ($op == 'view' && $node->type == 'fb_app') { - if (user_access('administer fb apps')) { + if (user_access('administer fb apps') && $node->fb_app->canvas) { $fb_app = $node->fb_app; + $url = 'http://apps.facebook.com/' . $fb_app->canvas; $output = theme('dl', - array(t('Canvas URL') => "http://apps.facebook.com/$fb_app->canvas", + array(t('Canvas URL') => l($url, $url, array('attributes' => array('target' => '_blank'))), )); $node->content['fb_canvas'] = @@ -529,7 +530,6 @@ if (fb_canvas_is_fbml()) { //dpm($output, "before fb_canvas_process"); // We're producing FBML for a canvas page - /* TODO: $output['logo'] is not being processed properly by these patterns. fb_canvas_process() returns '/sites/all/themes/fb_fbml/logo.png'