I really like this bridge so far, but I am wondering about the lack of ability to easily bookmark a page in the SMF forum (because it is in a frame). Is it possible to add the appropriate SMF URL either as the URL that gets bookmarked or (even better) as part of the Drupal URL?

For example, how it is now:
Unwrapped SMF url: http://www.whatever.com/forum/index.php?board=6.0
Wrapped SMF url: http://www.whatever.com/?q=forum

How it would be cooler:
Unwrapped SMF url: http://www.whatever.com/forum/index.php?board=6.0
Wrapped SMF url: http://www.whatever.com/?q=forum?board=6.0 and this would send you to the right page.

Thanks for writing this module, and getting SMF to go along with it!

Comments

canyonbreeze’s picture

I know this is a couple years later but I had the same issue at a site of mine. I was able to fix it with some mods as shown below...
-----------------

This forum is the SMF (Simple Machines Forum) integrated into Drupal 6 using the integration module. While it works pretty well, one of the things I wanted to improve is the URL that the browser sees. By default it would only see the front page of the forum. So bookmarking, et cetera, would not bring you back to the exact page. Here is some code I put in that seems to fix that. This also makes it so when you open a link from the forum to another page or window it keeps the Drupal framework.

I think this would help SEO as well as the forum content can be better indexed. This slows the response a little due to the reload caused by the php headers command. If that's a problem for you, don't do this.

In .htaccess

  RedirectMatch 301 ^/smf/$ http://example.com/forums/$1

In SMF theme index.template.php

function template_main_above()
{
	global $context, $settings, $options, $scripturl, $txt, $modSettings;

//begin mod
$_SESSION['forum_page']='http://example.com/forums'.substr($_SERVER["REQUEST_URI"],4);

if (!($_SESSION['forum_page'] == $_SESSION['drupal_page']))
{
  $_SESSION['drupal_page'] = $_SESSION['forum_page'];
  header('Location: '.$_SESSION['forum_page']);
}
//echo '<a href="', $_SESSION['forum_page'], '">Link to this page: ', $_SESSION['forum_page'], '</a>';
// end mod

	// Show right to left and the character set for ease of translating.

in Drupal smfforum.module

    $width = variable_get("smfforum_page_width", "100%");
    $height = variable_get("smfforum_page_height", "1024");
    $scrolling = variable_get("smfforum_page_scroll", 2);

// begin mod
if (isset($_SESSION['drupal_page'])) 
{
  $path = $_SESSION['forum_page'];
}
//end mod

    $output = '<iframe id="forumFrame" src="'. $path .'"'; //name="smfforum"';