Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Joomla Bridge Support => Topic started by: Chriss Cohn on January 18, 2007, 10:46:39 AM

Title: Guide:How to have a perfect bridging with SEF Advance!
Post by: Chriss Cohn on January 18, 2007, 10:46:39 AM
Hello guys, to have a perfect, wrapped bridging between SMF 1.1.1 and Joomla 1.12 with Orstios Bridge 1.16 and SefAdvance in Version 4.6.x just do the following:

First install Joomla,SMF, and bridge and make sure they are all working correctly togehter! If not, first solve your problems before you continue!

A) Apply Mambo/Joomal Tag cleanup Mod (http://www.simplemachines.org/community/index.php?topic=67889) and copy over your css classes from style.css of your selceted SMF-Theme into the template.css of your selected joomla template. After that make sure to have no double classes in your template.css, also notice that they(smf and joomla) will now use the same classes for "formating", and also copy over your images folder of your SMF-Theme in the specific folder in your "joomla-template/css/" folder or just change path of SMF-pictures in every added class if neccessary.

Remember that all the changes you made in part B) will be within next releases of the great Orstio-bridge. THE CHANGES UNDER 3. ARE STILL IN DEVELOPEMENT AND NOT TESTED TO WORK STABLE IN ALL CASES. ALL CHANGES ARE MADE ON OWN RESPONSIBILITY -  I CANNOT GUARANTEE IF IT WILL WORK FOR YOU TOO! SO ONLY USE IT IF YOU KNOW WHAT YOU ARE DOING!

B) Then apply the following changes to your smf.php which can be found in your /components/com_smf/ Folder:

1. "patch" smf.php to solving preview post problem with Joomla-SEO enabled! This can be found HERE! (http://www.simplemachines.org/community/index.php?topic=115776.0)

2. "patch" smf.php to solving wrong activation links and messed up messages when using SEO. This "fix" can be found HERE! (http://www.simplemachines.org/community/index.php?topic=120081.msg766870#msg766870)


3. "patch" smf.php to make it workable with SefAdvance. Do both of the the following steps :

a) Around line 150 in " function ob_mambofix($buffer)" add after line "global $bridge_reg, $Itemid, $_VERSION;" the code $mosConfig_sef = 0;
The original post you can found HERE! (http://www.sakic.net/forum/index.php?topic=27.msg114#msg114)

b) Around line 209 replace this code {
$sefurl = sefReltoAbs(substr($nonsefurl, strlen($mosConfig_live_site) + 3, strlen($nonsefurl) - strlen($mosConfig_live_site) - 4));
$sefurl = str_replace(";", "/", $sefurl);
$sefurl = str_replace("=", ",", $sefurl);
//Fix for anything previous to Joomla! 1.0.10
if ($_VERSION->PRODUCT != 'Joomla!' || ($_VERSION->PRODUCT == 'Joomla!' && $_VERSION->DEV_LEVEL <= '9'))
$sefurl = substr($sefurl, 0, strpos($sefurl, 'option')) . preg_replace('/(\/)([^,]*)(#)/', '$1$2,$2$3', substr($sefurl, strpos($sefurl, 'option'), strlen($sefurl)));
$sefurl = substr($sefurl, 0, strpos($sefurl, 'option')) . preg_replace('/(\/)([^,]*)(\/)/', '$1$2,$2$3', substr($sefurl, strpos($sefurl, 'option'), strlen($sefurl)));
if (substr($sefurl, strlen($sefurl) - 1, 1) == '/')
$sefurl = substr($sefurl, 0, strlen($sefurl) - 1);
$buffer = str_replace(substr($nonsefurl,1,strlen($nonsefurl)), '"' . $sefurl . '"', $buffer);
//Fix for Joomla! 1.0.10 fragment
$buffer = str_replace("/#", "#", $buffer);
}


with this code:{
$nqsefurl = substr($nonsefurl, 0, strpos($nonsefurl, 'option')) . preg_replace('/(\;)([^=#]*)([#"])/', '$1$2=$2$3', substr($nonsefurl, strpos($nonsefurl, 'option'), strlen($nonsefurl)));
$sefurl = sefReltoAbs(substr($nqsefurl, strlen($mosConfig_live_site) + 3, strlen($nqsefurl) - strlen($mosConfig_live_site) - 4));
$sefurl = str_replace(";", "/", $sefurl);
$sefurl = str_replace("=", ",", $sefurl);
if (substr($sefurl, strlen($sefurl) - 1, 1) == '/')
$sefurl = substr($sefurl, 0, strlen($sefurl) - 1);
$buffer = str_replace(substr($nonsefurl,1,strlen($nonsefurl)), '"' . $sefurl . '"', $buffer);
//Fix for Joomla! 1.0.10 fragment
$buffer = str_replace("/#", "#", $buffer);
}



(4.) If you are using a other language then english and if you have problems with "Umlaute" like ä,ö,ü,ß in your activation,password or notification-emails apply the following in your phpmyadmin: LOOK! (http://www.simplemachines.org/community/index.php?topic=61513.0)
And change your sending "behavior" in the SMF Admin-area from PHP-send to SMTP!

(5.) If you want captcha spam-protection for your registration in a bridged Forum, use the Mod "Advanced Visual verification (http://custom.simplemachines.org/mods/index.php?mod=474)" which works very well! The standart one works not within a bridged joomla-SMF

Now make sure your SEO-part in your .htaccess in joomla looks like the following:
########## Begin - 3rd Party SEF Section
############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension - e.g. OpenSEF, 404_SEF, 404SEFx, SEF Advance, etc
#
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|css|js|pl|txt)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php
#
########## End - 3rd Party SEF Section
Notice: This SEO-part in .htaccess has just worked for me! You have to try if it works for you too.

C)Enable default Joomla-SEO in Backend which can be found in Global-Configurations. Now install SefAdvance. After that go to your Joomla backend, go to your SefAdvace configuration- "components tab" and let SefAdvance "ignore" your SMF-Bridge component.
Thats it!

Joomla-SMF-SefAdvance should now work perfect together. You can see a working result here on my page:www.it-info.org (http://www.it-info.org)
If you have questions feel free to ask.

Regards, a now very lucky Bridge-SMF-JOOMLA user, Christian
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: shawn122 on January 18, 2007, 05:10:22 PM
sef doesnt seem to be turned on at the moment..
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: Chriss Cohn on January 18, 2007, 06:47:25 PM
Quotesef doesnt seem to be turned on at the moment..
Häh?????  ??? ??? ??? ??? ???
if you mean on my page - answer is NO! SEF is definately enabled!
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: minimalize on January 19, 2007, 11:32:42 AM
its enabled.. thats right.. but it doesnt work with the smf. the links are the same as without any sef. only the joomla content is sef enabled! is there an ability to enable this with the forum too?
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: Chriss Cohn on January 19, 2007, 11:41:25 AM
Quote from: minimalize on January 19, 2007, 11:32:42 AM
its enabled.. thats right.. but it doesnt work with the smf. the links are the same as without any sef. only the joomla content is sef enabled! is there an ability to enable this with the forum too?
Hi, probably the most of you don't understand what the problem was?!
The problem was to let a "bridge-system" with SefAdvance run, even when its disabled for that bridge-component. Until yesterday this was NOT POSSIBLE!!!

To get SEF-URLS also for the Forum within a bridged System, with a running SefAdvance is much much much more work to do. We are Currently in a testing phase to let it work wit the Seo4SMF mod. There are only one or two big issues to solve.... probably at the end of this weekend i could show you on my page that this is working!
Btw: Obviously it has worked for a couple hours this day but not perfect, so we still have to make some changes in the Sef Advance Component.
regards, Christian
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: Orstio on January 20, 2007, 10:52:46 AM
You realize that what I did to your bridge when you gave me access is not something that is available for 1.1.6?  It will be for future versions, but it is not yet publicly available.  I helped you out as an experiment to see if it would also work with SEFAdvance and Joomla as it does with ArtioSEF.
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: Chriss Cohn on January 20, 2007, 11:29:53 AM
Quote from: Orstio on January 20, 2007, 10:52:46 AM
You realize that what I did to your bridge when you gave me access is not something that is available for 1.1.6?  It will be for future versions, but it is not yet publicly available.  I helped you out as an experiment to see if it would also work with SEFAdvance and Joomla as it does with ArtioSEF.
Hi Theodore, i don't really understand your post.... remember i'm a german...
I thought the really "trick" to let it work completely without any issues, was Emir's small change($mosConfig_sef = 0;) in your bridge smf.php file.


@ ALL: SMF SEF-URLS now work also within a bridged SMF and of course with working SefAdvance.
Just check it here http://www.it-info.org/SMF/cafe_lounge/test_topic-t5.0.html (http://www.it-info.org/SMF/cafe_lounge/test_topic-t5.0.html)
Thanks to Godfather (Developer of SEO4SMF) for his help to make them work together.
This was a custom change/installation for me to test it together with SEFAdvance + Orstio-bridge.. And as you can see, he get it working!
He will release this "working" Version probably in the next week for everyone.

Reagards Christian



Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: Orstio on January 20, 2007, 01:52:48 PM
What I mean is that some of the code in your bridge is designed to work better with third party SEF than bridge 1.1.6. 
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: ormuz on January 20, 2007, 02:00:21 PM
It means that only you can have this feature, at the moment!

Other users: Do NOT use this!
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: Chriss Cohn on January 20, 2007, 02:06:08 PM
Quote from: Orstio on January 20, 2007, 01:52:48 PM
What I mean is that some of the code in your bridge is designed to work better with third party SEF than bridge 1.1.6. 
Yes of course, i have noted all changes in the "B)" area...
As i wrote before, i my oppinion nothing of that changes you had made, had any real effect. The Forum had errors as before.... As then Emir Sakic added the code showed above in your bridge, everything works.
regards Christian
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: Chriss Cohn on January 20, 2007, 02:07:50 PM
Quote from: ormuz on January 20, 2007, 02:00:21 PM
It means that only you can have this feature, at the moment!

Other users: Do NOT use this!
I dont think so!!!!
And to show you that im right i will make a test enviromet!!!
edit:I've added the changes Orstio made to my bridge into my little guide.
Anyway i can simply send everybody my modified smf.php ....

regards Christian
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: ormuz on January 20, 2007, 04:15:39 PM
Quote from: Orstio on January 20, 2007, 01:52:48 PM
What I mean is that some of the code in your bridge is designed to work better with third party SEF than bridge 1.1.6. 

...
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: Kindred on January 20, 2007, 05:27:45 PM
Quote from: g-c on January 20, 2007, 02:07:50 PM

I dont think so!!!!
And to show you that im right i will make a test enviromet!!!
Anyway i can simply send everybody my modified smf.php ....

1- if Orstio modified your bridge files to make them different form the baseline 1.1.6 bridge, then this will not work for any other user.

2- No, you can not send anybody your modified smf.php. All of the bridge files fall under the SMF lisence, which prohibits re-distribution of any source files.
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: Chriss Cohn on January 20, 2007, 06:26:12 PM
Quote from: Kindred on January 20, 2007, 05:27:45 PM
1- if Orstio modified your bridge files to make them different form the baseline 1.1.6 bridge, then this will not work for any other user.
We will see.....
If something he "changed" in my bridge-files really, i mean really affected the interaction of SefAdvance and the bridged Forum, then he should please post the changes here so we could check if they affect anything.... And if they do, i add the changes above in my little guide because i know people don't want to wait until "future versions". Or Orstio tell us when he release the next Version of the bridge.

Quote
2- No, you can not send anybody your modified smf.php. All of the bridge files fall under the SMF lisence, which prohibits re-distribution of any source files.
Well ok, i think you right with this one.


EDIT: I found out what changes have to be done and i add them in my first post.


Regards, Christian
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: sacx on January 21, 2007, 12:34:31 PM
Hi,

rewrite_comsmf2($buffer) function it's not defined in Seo4SMF any version ... was just for you Christian. Tomorrow I will release Seo4SMF 0.2.5 with this mod included !

Regards
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: Chriss Cohn on January 21, 2007, 12:39:58 PM
Quote from: sacx on January 21, 2007, 12:34:31 PM
Hi,

rewrite_comsmf2($buffer) function it's not defined in Seo4SMF any version ... was just for you Christian. Tomorrow I will release Seo4SMF 0.2.5 with this mod included !

Regards
Ohh ok... so this has nothing to do with workability of SefAdvance - good to know!
Regards Christian
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: sacx on January 22, 2007, 06:28:21 AM
Package 0.2.5 released. Use this installation guide :
http://www.webmasterstalks.com/joomla/joomla-installation-guide-advancedsef-version-t1025.0.html
and also read this thread for Joomla installation .

Regards
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: quicksilver1024 on March 06, 2007, 08:11:51 PM
Does anyone know if this will work with the new version of SMF (v1.1.2)?
Or the editing that needs to be done for it to work on v.1.1.2?
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: Chriss Cohn on March 07, 2007, 05:47:28 AM
Yes this work for 1.12 with bridge 1.1.7 too...
Anyway, don't make that changes i decribed in my opening post, beacuse this was only for bridge 1.1.6
So you only need to make the change with the "$msoConfig_sef = 0;"
Thats it.

Regards, Christian
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: quicksilver1024 on March 07, 2007, 04:45:59 PM
Quote from: g-c on March 07, 2007, 05:47:28 AM
Yes this work for 1.12 with bridge 1.1.7 too...
Anyway, don't make that changes i decribed in my opening post, beacuse this was only for bridge 1.1.6
So you only need to make the change with the "$msoConfig_sef = 0;"
Thats it.

Regards, Christian

Great - thanks for letting me know.
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: smylo on March 18, 2007, 10:43:34 AM
first of all, thanks a lot for this great instruction...

now i have very nice looking links in my smf forum, but my problem is that i don't know where i have to add the following lines

QuoteFor example in template 247 clean you need to add after
Code:

$menuclass = "mainlevel$class_sfx";
        if ($level > 0) {
                $menuclass = "sublevel$class_sfx";
        }
        $menuclass = "images";

in function cssSPLITGetMenuLink
the next code
Code:

        if ($_GET['dummy']==1)
        {
            if ((strncmp($mitem->link,"http://",7)!=0) && (strncmp($mitem->link,"https://",8)!=0))
            $mitem->link = '/'.$mitem->link;
        }


without these settings you can't get back to the normal content of my joomla page  :( , because all links from joomla looking like www.domain.com/forum/news/index.php... and i get an error 404! perhaps it's possible to keep sef joomla content links also when you are reading in forum?

Can anyone help me?
Thanks
Smylo
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: Chriss Cohn on March 18, 2007, 12:49:21 PM
Hi smylo, what Sef-components do you use?
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: smylo on March 18, 2007, 02:11:06 PM
Hallo g-c, i'm using SEF Advance 4.8.2 in combination with Seo 4 SMF 0.2.9.5
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: smylo on March 19, 2007, 04:44:15 PM
there is another think that draw my attention:
on your site it-info.org you have also when you are in the forum "normal" sef links in your joomlamenus - if i'm surfing in my forum i only have standard joomla links without any SEF optimization..., but if i'm navigating thru my normal joomla content i have wonderful sef links???

this must be a problem with this setting, i think so
Quote$dummy  = intval( intval( mosGetParam( $_REQUEST, 'dummy' ) ) );
if ($dummy==1){
$mosConfig_sef=0;
}

perhaps you can help me out - all i have done is this instruction -> http://www.webmasterstalks.com/joomla/joomla-installation-guide-advancedsef-version-t1025.0.html

Some infos about my configuration:
- Joomla 1.0.12
- SMF 1.1.2
- Bridge 1.1.7
- SEF Advance 4.8.2
- SEO4SMF 0.2.9.5

Thanks for your support
Smylo
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: Chriss Cohn on March 19, 2007, 09:21:51 PM
Hi, I have some special changes on my Site which comes with 0.3 probably the next week i think. So just wait till that point.
TheGodFahter has used my unopened Site for testing purposes.
But i also think its so kind related to this:$dummy  = intval( intval( mosGetParam( $_REQUEST, 'dummy' ) ) );
if ($dummy==1){
$mosConfig_sef=0;
}

Anyway, sonce the Upgrade of Sefadvance from 4.80 to 4.82 some tiny things are not working anymore - well only small things like the pathway of joomla and the tree-path of SMF... They had fully SEF-Beautiful URLs before upgrade.
I'll ask TheGodfahter about it when 0.3 or better 0.3.1 is out.
And, with the changes Thegodfather had made to my site via testing, it is now recommend to NOT disabling SefAdvance for the bridge-component anymore.

And the thing:For example in template 247 clean you need to add after
Code:

$menuclass = "mainlevel$class_sfx";
        if ($level > 0) {
                $menuclass = "sublevel$class_sfx";
        }
        $menuclass = "images";

in function cssSPLITGetMenuLink
the next code
Code:

        if ($_GET['dummy']==1)
        {
            if ((strncmp($mitem->link,"http://",7)!=0) && (strncmp($mitem->link,"https://",8)!=0))
            $mitem->link = '/'.$mitem->link;
        }

Come in the Splitmenu-php which my template uses for for the upper menu.

Regards, Christian
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: smylo on April 01, 2007, 06:58:23 PM
thanks for your info and sorry for my late answer...

in the meantime i tryed a lot off thinks with .htaccess and moving backwards some off the changes in php-files and now it seems to working great  :D , but two problems left:
1.) the avatar isn't visible in the joomla login modul for smf (Bridge 1.1.7) with activated sef.
2.) my meta-tags in forum are corrupt, they looking like that:
<meta name="description" content="meta name=&quot;description&quot; content=&quot; (dynamic content) &quot; /" />

perhaps you have an idea what the problem can be...
Thanks
Smylo
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: Chriss Cohn on April 01, 2007, 09:27:38 PM
I had the same issues!
Will be fixed in 0.3 or i can send you my files if you want.
Regards, Christian
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: smylo on April 02, 2007, 08:08:58 PM
hallo g-c,

first - this was one of the fastest answers i ever get, absolutly fantastic!  :D
Sending me your fixed files would be great. I sent you a pm with my email...

With kind regards
Smylo
Title: Re: Guide:How to have a perfect bridging with SEF Advance!
Post by: basicus on April 16, 2007, 12:44:19 AM
Hey Christian: Could you please send me the files as well? It looks like www.webmasterstalks.com are down by the way.