Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Joomla Bridge Support => Topic started by: allycat on April 13, 2007, 06:46:15 PM

Title: Notification link wrong
Post by: allycat on April 13, 2007, 06:46:15 PM
When I subscribe to a thread on my forum I get sent ...

http://www.domain.com/forum/index.php?topic=2550.new;topicseen#new

Should not be the direct url but to the link

http://www.domain.com/component/option,com_smf/Itemid,91/topic,2550

I have implemented the block direct access to force users to login so why is the system sending the direct link not the bridged link?

// Redirect users who try to access /forum directly
if (strpos($_SERVER['QUERY_STRING'], 'dlattach') === false && strpos($_SERVER['QUERY_STRING'], 'verificationcode') === false)
{
        if(!defined('_VALID_MOS')){ header("Location: /index.php?option=com_smf&Itemid=91".$_SERVER['QUERY_STRING']); }
}


Using the latest Joomla/SMF/SMF Bridge

Alison
Title: Re: Notification link wrong
Post by: Orstio on April 13, 2007, 07:13:17 PM
Turn off SEF in SMF.  If you wish to use SEF, turn it on in Joomla, not in SMF.
Title: Re: Notification link wrong
Post by: allycat on April 13, 2007, 10:09:38 PM
Just checked ...

Search engine friendly URLs
Apache only!

No tick in the box

Next idea?  :D
Title: Re: Notification link wrong
Post by: Orstio on April 13, 2007, 10:43:09 PM
Bridge version? 

SMF version?

Can I see the URL?
Title: Re: Notification link wrong
Post by: allycat on April 14, 2007, 12:00:11 AM
All the latest 1.0.12 / 1.1.2 / 1.1.7

URL isn't for public access

Title: Re: Notification link wrong
Post by: Orstio on April 14, 2007, 12:18:21 AM
Have you ever had any other integration installed?
Title: Re: Notification link wrong
Post by: allycat on April 14, 2007, 01:17:55 AM
If you mean "another bridge" then no.

Just one install of Joomla/SMF/Bridge and been going a week and all users complaining - hence the query.

Title: Re: Notification link wrong
Post by: Orstio on April 14, 2007, 08:24:12 AM
I'll need t osee this for myself.  Can you PM me a link?
Title: Re: Notification link wrong
Post by: allycat on April 14, 2007, 05:14:52 PM
Sorry as I said, I can't do that

What is on the server/forum is not for public eyes.
Title: Re: Notification link wrong
Post by: Orstio on April 14, 2007, 05:34:35 PM
Then I can't help you.  If I can't see the behaviour, I can't see why it is behaving that way.
Title: Re: Notification link wrong
Post by: allycat on April 14, 2007, 05:37:32 PM
What files/emails etc do you need to look at that will assist you?

I can create the errors and send the output to you



Title: Re: Notification link wrong
Post by: Orstio on April 14, 2007, 06:18:05 PM
Oh, I see.  So this is happening in the notification email, and not when you click the "Notify" link?

Try this?

http://www.simplemachines.org/community/index.php?topic=152836.msg982449#msg982449

Title: Re: Notification link wrong
Post by: allycat on April 14, 2007, 08:12:32 PM
So you are saying change

function integrate_outgoing_email($subject, &$message, $headers)
{
global $boardurl, $mosConfig_live_site, $Itemid, $scripturl, $mosConfig_sef, $modSettings, $Itemid, $hotmail_fix;

//First, we need to set up the email so that ob_mambofix knows what to do with it
$message = str_replace ($scripturl, '"="' . $scripturl, $message);
//Next, let's make sure that URLs with # and . characters don't get mashed up
$message = str_replace ('#new', '"#new', $message);
$message = preg_replace ('/(\.[0-9])/', '"$1', $message);
$message .= '"="';
$message = ob_mambofix($message);
//Now we need to undo those changes so the email looks normal again
$message = str_replace ('"="', ' ', $message);
$message = str_replace ('"#new', '#new', $message);
$message = str_replace ('".', '.', $message);
//This is an email, after all, so let's make sure entities and special characters are text, not HTML
$message = trim($message);
    $message = html_entity_decode($message);
$message = un_htmlspecialchars($message);
//No idea why sefReltoAbs does this, but....
$message = str_replace ('____', '
', $message ); //yes, it looks ridiculous, but it works :P
$message = substr($message, 0, -1);
$hotmail_fix = false;
return true;
}


with this?

function integrate_outgoing_email($subject, &$message, $headers)
{
global $boardurl, $mosConfig_live_site, $Itemid, $scripturl, $mosConfig_sef, $modSettings, $Itemid, $hotmail_fix;

//First, we need to set up the email so that ob_mambofix knows what to do with it
$message = str_replace ($scripturl, '="' . $scripturl, $message);
$message = preg_replace ('/(http.+)(\b)/', '$1"', $message);
$message = ob_mambofix($message);
//Now we need to undo those changes so the email looks normal again
$message = str_replace ('="', '', $message);
$message = preg_replace ('/(http.+)(")/', '$1', $message);
//THis is an email, after all, so let's make sure entities and special characters are text, not HTML
$message = trim($message);
    $message = html_entity_decode($message);
$message = un_htmlspecialchars($message);
$hotmail_fix = false;
return true;
}
Title: Re: Notification link wrong
Post by: Orstio on April 14, 2007, 08:41:26 PM
Correct.
Title: Re: Notification link wrong
Post by: allycat on April 14, 2007, 08:42:37 PM
cool bananas ... will go see what the outcome is.  :)