News:

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

Main Menu

(Near) Perfect SEF for Bridged Joomla/SMF with OpenSEF

Started by SlammedDime, March 20, 2007, 04:19:23 AM

Previous topic - Next topic

RebeldeLatino

#120
Version 1.5.3 -  SMF 1.1 RC3



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;



The SearchIP now found O.o
But the Collapse-Expand with the sef_ext not found... :S




SlammedDime

Ok, change your integrate_outgoing_email() function to 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;
}


Also, are you sure you're using version 1.5.3?  I had forgot to include the collapse and expand options in 1.5.1, and added it 1.5.2 if I remember right.  But as I said in the first post as well, I cannot promise that this will work on any SMF version less than 1.1.2.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

willi1

#122
Hello Matt,

really great work  :)
can you explain me how can i make friendly urls in the recent topics modul?

i have see it on your site it is great

kind regards
willi1


SlammedDime

The module needs to be modified quite a bit... after I get off work tomorrow, I'll package up what I have and host it so you can download it.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

willi1

thank you very much  :)

I'm very happy

kind regards
willi1

SlammedDime

SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

adamdidthis

Hi Matt,

Have you had any thoughts on intergrating with joomap?

SlammedDime

Haven't yet had a chance to play with it.  I'll try and take a look into it next week sometime.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

willi1

Hello Matt,

Quotewilli1 - check out the third one down... http://www.airridetalk.com/component/option,com_doqment/Itemid,58/

it works great, thanks a lot for your great work  :)

kind regards


willi1

#129
Hello Matt,

I have three questions:

1.In the recent topics modul now I miss the "Re:" on  the topics. I don't see the "Re:"




   

2.In the Forum the Info-center "newest Posts"  I click on a link and the link looks like so:

/topicseen/topicseen
http://www.alko-hohl.de/forum/topicseen/topicseen/user-stellen-sich-vor/

3.can you explain me this "hallo-236.msg2481.html#msg2481" what makes the # ?
and this "msg2481" is double is this correct?

sorry for my english, i hope you understand me

kind regards
willi1

SlammedDime

1) The reason you don't see a 'Re' like in the info center is because this is a recent topics module, not a recent posts module.  Therefore it shows the topic title.  For example, if the last 5 posts were in one thread, you will only have one entry for that thread in the module.

2) That link is how its supposed to look.  If you were to look at a NON-SEF url, it would look something like http://www.myurl.com/index.php?option=com_smf&Itemid=1&topic=236.msg2481&topicseen

In order for the SEF urls to work properly, any single variables in the url, like topicseen above, need to be repeated so the SEF parser picks them up properly.  Its normal.

3)The double is correct.  The #msg2481 tells your browser what message to go to in that specific topic.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

willi1

Hello Matt,

thank you very much now I understand better.

Is that possible that you can modified the recent posts modul too? I can't becuase I'm a php newbie  ;)

kind regards
willi1

SlammedDime

I look into it, but it may be another week or so.  I'm moving into a new house this week, and on top of work, its a bit hectic
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

willi1

Matt, thank yo very much  :)

it's great

kind regards

willi1

Benson

Matt, i tested your modules (recent topics and who's online) which are great, but for some reason i'm not able to get a list of users who are online with a link to their profile or with the message icon, i only get the overview how many admins, guests etc are online. I configured the module so seems like there's a problem - or isn't it yet supposed to display a complete list of users who are online?

cheers,
Benson

SlammedDime

While the option was probably there in the setup of the module, the person that requested it didn't need that option, so i never adjusted the module for it.  The original that Kindred made, it can be found in the FAQ sticky if you need the list of online users.  It doesn't, however, compute the number of each users.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

willi1

Hello Matt,

have you a lot more of time? to create the recent posts modul? ;-)
and work all with the 1.1.3?

kind regards
willi1

webgyrl

Hi Matt,

I was just wondering if you are going to continue to develop this bridge in light of the Joomla fiasco with 3rd party components etc. I'd like to try it, but I just want to know if you are gonna be around... thanks!

Kindred

webgyrl,

What matt has done is not a bridge, but an add-in for the OpenSEF component to allow the bridge to work corretcly.

However, I think OpenSEF is leaving Joomla as well.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SlammedDime

If OpenSEF chooses to update to RC6, then I'll make the necessary adjustments if needed.  It may work just fine without any adjustments at all.  If/when a bridge for Joomla 1.5 is released, I've already talked with Orstio about creating a file that will use Joomlas native SEF, which is similar to OpenSEF now.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Advertisement: