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

SlammedDime

Ok, over the past few weeks, I've been pounding this out, mainly for fun, but also because I wanted content filled urls on my forum as well as on my Joomla site.  What I have here is a SEF Extension file for use with OpenSEF 2.0.0RC5 SP2.  I think I've made it much more user friendly over the past week or so, and the readme that is included explains everything I think, as well as a change log for those interested.  I was going to release this as a beta version, but I'm pretty confident (last words, right?) in its ability.

A modification/addition is needed to your smf.php file, which is also explained in the readme.  Before running this live, I HIGHLY recommend that you test it locally or on a test site first.  I can't be held accountable for anything that this may (which it shouldn't anyway) destroy.

I can't attach files here, but I can link to them, so here is a link to a zip file containing the extension and all the information.  PLEASE PLEASE PLEASE, before asking questions, READ the entire readme.html file.

While this isn't a Beta version of sorts, it should still be heavily tested on any test site before going live.  I will continue to test it as well to find errors and if anyone finds some themselves, please point them out.

>> Click Here for version 1.5.3 <<

* 4/29/2007 - Updated link for version 1.5.3 *

Change log:
v1.5.3 - 04/29/2007
   » Error with strrpos... php4 didn't do what php5 does, and I didn't realize that.  More info in readme.html

See readme.html for full Change Log

Any questions, ask here.

And in case anyone wants to see a live version, I always have the latest version running at http://www.airridetalk.com.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

KGIII

Have you considered submitting the modification for review?

At risk of offending (please don't be offended but rather realize that I must do this) I want to add: Downloading unapproved modifications and using them is not the best idea. Please do not do so and, if you must, know that you put yourself at great risk and your forum's stability and security are potentially impacted.

That being said...

I have no doubts that this is well intentioned, coded well, and has been researched. I just need to ensure that people know the risks that they take when they download unapproved mods from third party sites.

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

SlammedDime

#2
Quote from: KGIII on March 20, 2007, 04:43:51 AM
Have you considered submitting the modification for review?

At risk of offending (please don't be offended but rather realize that I must do this) I want to add: Downloading unapproved modifications and using them is not the best idea. Please do not do so and, if you must, know that you put yourself at great risk and your forum's stability and security are potentially impacted.

That being said...

I have no doubts that this is well intentioned, coded well, and has been researched. I just need to ensure that people know the risks that they take when they download unapproved mods from third party sites.
My apologies.  Not too familiar with the process of modifications around here, mostly just watch this particular forum for updates.  How would I go about submitting it for review? (First post edited for time being)

Edit: Keep in mind also, that this is not really a mod for SMF, but really for Joomla!, but ties into the SMF bridge from orstio.  No SMF files are modified/changed/added, not that it makes it any better from your standpoint, but just to point it out.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

KGIII

As a general rule it seems we don't make people remove links. Though I have seen some where we have in the past but not always. To submit a modification for review (and this one MAY be an interesting case as this appears to deal specifically with bridging so I am going to point someone who's been on the team longer than I over here shortly) just click on downloads, at the top of this page, and then on modifications and it will be off on the right near the SDK. Just submit, comment, etc... Someone will review it (in time) and approve it or contact you to let you know if it adheres to the coding guidelines. (That is a big thing - adherence to the guidelines...)

The process is there to hopefully ensure that nothing untoward is done and that all mods meet a certain level of quality prior to being used by thousands of forums.

A simple example:

I wrote one mod that I loved and really needed for my forum. It basically garbles any URLs posted. It took a month and a half for approval but my other one was approved in just a short time. The second was simplistic and, frankly, of no value to me at all. Yet it has been downloaded over 1000 times already and the first one that I wrote has nowhere near as many downloads. These, some of them for the oddest reasons, get a lot of use on a wide variety of servers and with a wide variety of mods. Thus checking to see that a standard in code and in quality is maintained is important.

This being your first I would ask you (I do not know) if there is a way you can check to ensure that Joomla is installed prior to the mod being installed? If so that might be a good idea.

In the mean-time what I would also recommend is changing your first post's title to something about [testing] and then re-link it. I will poke one of the bridging gurus and maybe they will have some insight. It is not that anyone here assumes that you would write a mod that would be malicious but, rather, there is an approval process which will get your mod approved and distributed. But, yeah, in the mean-time I would certainly go ahead and change the topic JUST to make sure that people know they are testing and I would go ahead and re-link your mod.

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

SlammedDime

Thanks for the explanation and insight.  I'll do as you suggested.  I suppose getting feedback from the masses who wish to test this couldn't hurt until I take a more formal approach to this that I unfortunately wasn't aware of before hand.  Thanks again. :)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

KGIII

Not a problem and because I am actually fairly new to the team and am abysmal with the bridging system (I have done a total of two and only for other people) I have asked that someone else step in and take a peek. I am sorry if you felt you had to remove the link, though I am glad you respected the post enough to do so, but rather the post wasn't really directed at you other than the question about submitting it - it was just to ensure that people don't come back and yell at you and claim you hosed their forum on them.

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

Orstio

KGIII:  This isn't a mod (modification) to SMF.  It can't be installed as a package in the Package Manager, and never will be able to be installed that way.  It doesn't need to fall under any of the provisions we have set out for mods to SMF.

What AirRideTalk has done is provided a Joomla SEF extension file, and instructions on how to modify the bridge to make this work with OpenSEF, which is a third party SEF component for Joomla.  This is acceptable within the terms of the SMF license.

I think distributing this on our SMF mod site would cause confusion.

KGIII


My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

Orstio

AirRideTalk:

If I add this to the bridge:

// Fix Javascript if sef_ext.php file is present (well, the one from AirRideTalk anyway)
if(class_exists('sef_smf')){
     include_once($mosConfig_absolute_path . '/components/com_smf/sef_fix.php');
     sef_fix($buffer);
}


Can you put the sef_fix function in a file named sef_fix.php and add appropriate globals, and then we won't need people to hack their bridge?

(This would only be available in the next release, not in 1.1.7, obviously.)

dogood

hello AirRideTalk and orstio

Whao, great patch you did there! thanks! I'm just managing to get it running along with OpenSef on my joomla! 1.0.12 site, with smf 1.1.2. I read everything in your nice readme.html. After configuring the sef_ext.php file, I just uploaded it in the right place, but when I go to OpenSef config, I do not see the component for smf...

I was wondering if OpenSef *has* to be activated for this to work, while mine here is still not activated...

Any idea?

Thanks again for the great work!

:)
Dogood, singer/writer/linuxian of Godon, free french rock band.

My works on <internet>:

http://www.godon.org => Freedom in Music
http://www.charte-zone-libre.org => La Voie Est Libre!
http://www.godon.org/wiki => UnisSon, wiki for free live music!!

DanielTulp

you should be careful with implementations like these, OpenSEF can cause a heavy CPU load on sites with high traffic, and make your site run slow, so be aware that this might happen

SlammedDime

Quote from: Orstio on March 20, 2007, 06:12:43 PM
AirRideTalk:

If I add this to the bridge:

// Fix Javascript if sef_ext.php file is present (well, the one from AirRideTalk anyway)
if(class_exists('sef_smf')){
     include_once($mosConfig_absolute_path . '/components/com_smf/sef_fix.php');
     sef_fix($buffer);
}


Can you put the sef_fix function in a file named sef_fix.php and add appropriate globals, and then we won't need people to hack their bridge?

(This would only be available in the next release, not in 1.1.7, obviously.)
I will definately do that.  Thanks for the tip.  I've already gone ahead and made the change and will re-test later today to make sure everything still works and will update the first post with the new version/changes.

dogood, You must have Orstios bridge installed for the component to show up in your "Components" section of OpenSEF configuration.  If you have the bridge installed, be sure (not that it would make a difference I dont think, but I havent tested it) you have a proper main menu item pointing to the bridged forum.  If OpenSEF is turned off, and Joomla! SEF is on, your forum should have normal Joomla SEF urls.

DanielTulp - Thanks for the tip.  I'll keep an eye on server loads.  The simple queries here aren't really intensive, and there are only sql queries if boards, topics, or users are in the links are in the strings to be parsed.  So while there may be a lot of links on a SMF page, most may not even cause database queries, such as admin panel pages.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

dogood

Quotedogood, You must have Orstios bridge installed for the component to show up in your "Components" section of OpenSEF configuration.  If you have the bridge installed, be sure (not that it would make a difference I dont think, but I havent tested it) you have a proper main menu item pointing to the bridged forum.

thanks for the fast answer!
I have Orstio's bridge installed, latest version always, and everything is going better and better with it! I've been using this bridge for a long time now :) And I have of course a menu item pointing to the component, that is to say, the bridged forum, which is *not* wrapped.

QuoteIf OpenSEF is turned off, and Joomla! SEF is on, your forum should have normal Joomla SEF urls.

This is exactly the case! But I still can't see the Component SMF in OpenSef configuration...

well, thinking about it while answering: shouldn't we put your patch in the admin smf component directory? If this is the case, it would be good to mention it in the readme.html :) I'll try this right now!

edit: well, it stilldoesn't show in the opensef config

@+
Dogood, singer/writer/linuxian of Godon, free french rock band.

My works on <internet>:

http://www.godon.org => Freedom in Music
http://www.charte-zone-libre.org => La Voie Est Libre!
http://www.godon.org/wiki => UnisSon, wiki for free live music!!

Chriss Cohn

Well i have to say: Great work for a "not-so-great" joomla-component (OpenSEF).
People who use this extension and have much Forum topics/boards should not wonder if their server-loads getting very very high. Well this is a big big problem with Open-Sef and much content(and yes now Forum topics/boards are "content" too!), so ,my descision a few months ago, was to throw Open-Sef away and install the best payed ones (SefAdvance). Anyway it seems that Predator(dev. of that component) doesnt continue to develop it. Last Year in November he anounced that he will bring out a beta 6 of Open-SEF RC2 shortly, but till today nothing has happen........

So if you want working SEF-URLS and another cool SEO-Stuff for your bridged Form and if you willing to pay some "little" money(40€), then use SefAdvance and the great MOD: Seo4SMF.

Regards Christian

SlammedDime

#14
Quote from: g-c on March 21, 2007, 01:35:50 PM
Well i have to say: Great work for a "not-so-great" joomla-component (OpenSEF).
People who use this extension and have much Forum topics/boards should not wonder if their server-loads getting very very high. Well this is a big big problem with Open-Sef and much content(and yes now Forum topics/boards are "content" too!), so ,my descision a few months ago, was to throw Open-Sef away and install the best payed ones (SefAdvance). Anyway it seems that Predator(dev. of that component) doesnt continue to develop it. Last Year in November he anounced that he will bring out a beta 6 of Open-SEF RC2 shortly, but till today nothing has happen........

So if you want working SEF-URLS and another cool SEO-Stuff for your bridged Form and if you willing to pay some "little" money(40€), then use SefAdvance and the great MOD: Seo4SMF.

Regards Christian

Thanks for your 'input' Christian.  You do realize that OpenSEF does not store urls from components (ie: com_smf) in the database, right?  They are created and parsed 'on the go'.  OpenSEF does not derive them from stored database entries like it does for content items in Joomla.  While OpenSEF has its pitfalls, so does any software, and I merely created a simple alternative for those who wish to have SEF urls without hacking away at core and template files in either Joomla! or SMF.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

DanielTulp

I don't think it was an attack on your work AirRideTalk, just a more elaborate explanation of what I had said before, chill and keep coding under the GNU/ GPL or other free license  ;D

SlammedDime

Quote from: DanielTulp on March 21, 2007, 02:32:28 PM
I don't think it was an attack on your work AirRideTalk, just a more elaborate explanation of what I had said before, chill and keep coding under the GNU/ GPL or other free license  ;D
Will do  8)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

thinkarcade

I am getting this error after installation.  Using Joomla 1.0.12, SMF 1.1.2, 2.0.0-RC5_SP2 and Bridge 1.1.7. I followed all of the instructions yet I still cant get this one to work.  When I enabled it through OpenSEF it seems like it was working right as when I hovered over the links they displayed as human readable but when i clicked on them it just stays on the index page and give me this error:

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/xxx/xxx/xxx/administrator/components/com_smf/sef_ext.php on line 440

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/xxx/xxx/xxx/administrator/components/com_smf/sef_ext.php on line 447

Any help would be greatly appreciated as I would love to use this mod. 

Thanks

thinkarcade

Geez I feel stupid. :-[  Had a typo in the DB name.  This mod seems to be working GREAT!   

SlammedDime

Quote from: thinkarcade on April 02, 2007, 10:28:05 PM
Geez I feel stupid. :-[  Had a typo in the DB name.  This mod seems to be working GREAT!   
I was gonna suggest you check the db name.  Glad its working for you!
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Advertisement: