Closed (fixed)
Project:
Drupal for Facebook
Version:
6.x-3.x-dev
Component:
Canvas Pages (iframe)
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Oct 2010 at 01:17 UTC
Updated:
12 Feb 2011 at 18:35 UTC
Jump to comment: Most recent file
Comments
Comment #1
e2thex commentedI have attach a patch
Comment #2
Dave Cohen commentedIn the past, I've done this by calling fb_scrub_urls() after the call to url() or l(). But your idea here is better!
I don't like the option name 'off_canvas'. It would have to start with 'fb_...' to clearly belong to the namespace of modules/fb. I'm thinking 'fb_url_no_alter' (in D7, it will be called url altering instead of url rewriting.
My one concern is passing a module-specific option through drupal's core url() and l() functions. Although I personally am in favor of this change, I pinged development@drupal.org about it and I hope to see comments before checking this in.
Comment #3
agentrickardThis should not affect other modules using the custom_url_alter() hook(s). AFAIK, url() itself doesn't care what options values are passed in, so as long as you aren't clobbering a core $options key, this should be fine.
Comment #4
Dave Cohen commentedHere's the patch I'm now considering. Introduces two $options...
if $options['fb_url_alter'] === FALSE, links will be out of canvas pages, to the main website. On canvas pages, this should only be used in conjunction with $options['absolute'] = TRUE.
if $options['fb_canvas'] == TRUE, links will be to canvas pages. That is, will generate an absolute url starting with http://apps.facebook.com/...
Comment #5
e2thex commentedCool I testing the patch from #4 with the fb_url_alter and it worked well (patched beta1)
Comment #6
Dave Cohen commentedChanges checked in for next release.
Thanks guys.
Comment #8
Exploratus commentedIs in the latest release??? I dont see the option.
I really need the links on the Facebook App to link to my Drupal site.
It used to do this with 2.0 but now with 3 it doesnt.