News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Notification link wrong

Started by allycat, April 13, 2007, 06:46:15 PM

Previous topic - Next topic

allycat

When I subscribe to a thread on my forum I get sent ...

hxxp:www.domain.com/forum/index.php?topic=2550.new;topicseen#new [nonactive]

Should not be the direct url but to the link

hxxp:www.domain.com/component/option,com_smf/Itemid,91/topic,2550 [nonactive]

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

Orstio

Turn off SEF in SMF.  If you wish to use SEF, turn it on in Joomla, not in SMF.

allycat

Just checked ...

Search engine friendly URLs
Apache only!

No tick in the box

Next idea?  :D

Orstio

Bridge version? 

SMF version?

Can I see the URL?

allycat

All the latest 1.0.12 / 1.1.2 / 1.1.7

URL isn't for public access


Orstio

Have you ever had any other integration installed?

allycat

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.


Orstio

I'll need t osee this for myself.  Can you PM me a link?

allycat

Sorry as I said, I can't do that

What is on the server/forum is not for public eyes.

Orstio

Then I can't help you.  If I can't see the behaviour, I can't see why it is behaving that way.

allycat

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




Orstio

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


allycat

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;
}

Orstio


allycat

cool bananas ... will go see what the outcome is.  :)

Advertisement: