SimpleSEF 2.0 (SMF 1.1.x and SMF 2.0)

Started by SlammedDime, December 05, 2009, 10:08:40 PM

Previous topic - Next topic

Phoestre

#720
Hey guys,
I've been trying to get SimpleSEF to work with SMF Archive.
However no luck, I couldn't get the "full version" URL on top to show SSEF address. It keeps showing the standart SMF URLs.

I'm using SMF 2.0 RC3, any help will be great!

SMF 2.0RC3 + SimplePortal
Custom Theme + Latin5 Turkish
Ubuntu Lucid

rd

Maybe your hosting doesn't have URL rewrite?

Works perfectly here: http://battleplanes.info

SlammedDime

Royal - read his post a bit more carefully...

Quote from: Phoestre on June 04, 2010, 04:01:27 PM
Hey guys,
I've been trying to get SimpleSEF to work with SMF Archive.
However no luck, I couldn't get the "full version" URL on top to show SSEF address. It keeps showing the standart SMF URLs.

I'm using SMF 2.0, any help will be great!

I've never used SMF Archive, so I don't know how it works... link to the mod?
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Phoestre

Its one of vbgamer's mods here is the url:
http://custom.simplemachines.org/mods/index.php?mod=339

Also I'm my very own host so there is no such thing is as my host doesn't provide something ;)

I remember there were some other Archive mods out there but now when I search in modifications portal there is only one.
As I understand it shows the SMF's standart search engine friendly(which is not :)) urls, anyways I hope to hear back from you.

SMF 2.0RC3 + SimplePortal
Custom Theme + Latin5 Turkish
Ubuntu Lucid

SlammedDime

try this...

in archive2.php

Code (Find) Select
mysql_select_db($db_name, $db_connection);

Code (Add After) Select
ob_start('ob_simplesef');

It will not change any links that show http://myurl.com/archive2.php?topic= or board=... because these are not SMF links... you would have to use a mod that used SMF's style of urls... ie: http://myurl.com/index.php?action=archive;topic=xxxx ... not sure if there is one for SMF that does that or not though.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

gisfreak

i use simple portal, is this mod compatible to that mod ?  ???
Me fail English? That's unpossible.

SlammedDime

It should be... I haven't had anyone tell me it didn't work with Simple Portal.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Kisschy


Simple SEF Compatible with Simple Portal. Confirm!!

Phoestre

Quote from: SlammedDime on June 05, 2010, 05:42:56 PM
try this...

in archive2.php

Code (Find) Select
mysql_select_db($db_name, $db_connection);

Code (Add After) Select
ob_start('ob_simplesef');

It will not change any links that show http://myurl.com/archive2.php?topic= or board=... because these are not SMF links... you would have to use a mod that used SMF's style of urls... ie: http://myurl.com/index.php?action=archive;topic=xxxx ... not sure if there is one for SMF that does that or not though.

It works great! I'm not so experienced with SimpleSEF, I used the *famous* SEO mod in past. Thank you.

Quote from: gisfreak on June 06, 2010, 12:40:13 AM
i use simple portal, is this mod compatible to that mod ?  ???

Its totally compatible, there would be no problems however there are 2 minor issues I have noticed.
1) If you go to "domain.com", it sends you to "www.domain.com" as expected however you go to /wwwREDIRECT/WIRELESS_CONNECTION page or something like that, it causes blocks on left and right to disappear, only the articles stay in center(if you have them enabled). However this can be easily fixed by putting the following code in bottom of your htaccess file:
RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

SearchEngine-wise, it would help I think because it also makes a "permanent redirect" so any search engine that sees your "domain.com" and "www.domain.com" as two seperate identities would fix their records. Althought this was my poor solve, there maybe more professional and better solves, some people don't like editing htacccess. Of course its a personal preference to select www.domain.com over domain.com or vice-versa.
2) If you go to a page that doesn't exit (ie: "http://www.domain.com/testnosuchpage"), you'll find yourself back at your SimplePortal front page with one diffrence, all the blocks are gone! If you have SP in Portal Mode and blocks are set to show in only portal, thats gonna happen. If you set the blocks to show in everywhere, there is no such problem, its just that if they are set to only portal they don't appear when SSEF redirects you to homepage if you go for an unexisting page, althought your articles in homepage stays. I'm trying to find a workaround for myself or be sure source of the problem before I actually report it, but just FYI. Maybe sending unexisting pages to an error document would be a good solve?(not sure if thats possible?)

However there would be no visible problem for your visitors.

SMF 2.0RC3 + SimplePortal
Custom Theme + Latin5 Turkish
Ubuntu Lucid

dagod

any way to have a custom startpage on www.myboard.com/ while using this mod?

SlammedDime

assuming you're using SSI.php included somewhere...

require_once('path/to/SSI.php');
ob_start('ob_simplesef');
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Phoestre

Hey SlammedDime,
There is a bug with SimpleSEF + Advanced Reputation System setup. I believe that the problem isn't in SimpleSEF, but in Advanced Reputation System but it only happens when SimpleSEF is active. However I have posted this message there 2 times(a week between them) and again another week has passed but no, no reply from anybody regarding this, it seems Ha2 is LOA so nobody there to help at the moment. I hope you can show me a workaround to fix this.

Quote from: Phoestre on June 13, 2010, 07:32:36 AMHello guys,
I've been testing this mod with SimpleSEF and it seems they aren't meant to work together at the moment.
I installed both of them with no errors however when you try to give rep to someone, it seems like working, you get to write in the reason for your action. However when you send the form, the ajax thingy above("Loading...") works fine but you get no "Reputation sent successfully."(or something like that) and nothing happens to reputation stats.
You get reputation when you post new topics/posts and lose when they are deleted, but there is no way for users to give reputation to others at the moment.
I said SimpleSEF may be the reason because when I unthick the "Enable SimpleSEF" option, you can successfully give reputation to people but when I enable SimpleSEF, it doesn't work.
I believe the problem is about one of the last calls by Advanced Reputation System when giving rep, if it refers to a file or uses a relative path, or the reputation giving action is diffrent than the standart one, so it may not recognize Advanced Reputation System and the URL rewrite may be a problem.
I'm using SMF 2.0 RC3.

BTW great mod, I hope to get it working.

SMF 2.0RC3 + SimplePortal
Custom Theme + Latin5 Turkish
Ubuntu Lucid

SlammedDime

Would need to have a link to your site and username/password to use to test it out and see what is hanging it up.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Phoestre

Quote from: SlammedDime on June 17, 2010, 03:59:51 AM
Would need to have a link to your site and username/password to use to test it out and see what is hanging it up.

Just PM'd you! ;)

SMF 2.0RC3 + SimplePortal
Custom Theme + Latin5 Turkish
Ubuntu Lucid

SlammedDime

The problem is because of the way the sScriptUrl variable is setup in the javascript when the page is loaded... I'm not sure where in the templates it would be, but search for something like sScriptUrl: "' . $scripturl . '" and change it to sScriptUrl: smf_scripturl
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Phoestre

SlammedDime, I must say, you are like an F-16 on legs! It just solved the problem.

For those who are having problem in getting SimpleSEF and Advanced Reputation System working together, I'll post the step by step solve here and inform owner of Advanced Reputation System about the fix.

I checked which files the reputation mod changes in install.xml and looked for sscripturl there. I found it was display.template.php so here is what you should do.

First, take a backup of your display.template.php just in case. (It is in your theme's folder)

Code (Find in display.template.php) Select

sScriptUrl: "' . $scripturl . '"


Then replace it with the following:

Code (Replace with) Select

sScriptUrl: smf_scripturl


It looks weird because of the missing "' but its how its meant to be. Also do NOT change any other $scripturl in this php file or another, only change this one. There are two sScriptUrl:s in my display.template.php, the one to  replace is the first one as the second one already has smf_scripturl. For those who may ask, sscripturl in my display.template.php was at line 46, note that I've MANY mods and it is probably diffrent in your setup.

SMF 2.0RC3 + SimplePortal
Custom Theme + Latin5 Turkish
Ubuntu Lucid

atfosan

Please, add 1) a stricting of "sa=", "area=", "spage=", "in=" from paths. This words are absolutely useless and makes paths ugly!
2) possibility for admins to see forum without SimpleSEF's urls.
my SMF project - school site: forum with PortaMx and SimpleSEF mods

SlammedDime

1) Can't do this, you'll have to live with it.  The mod was originally coded without these, but it caused too many issues because SMF does not standardize how they are used.

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

Phoestre

I have been thinking if its possible to have 404(and other) errors. That would mean a lot of work to detect the unexisting page but I think its possible in theory. Have you tried something like this? My main reason is, search engines are going to unexisting pages and indexing them lol. I've SimplePortal and those unexisting pages show a corrupt version of SimplePortal's frontpage (blocks are missing). Not something urgent but it would be nice if a workaround is possible. I thought about setting error documents in htaccess but I believe it requires work more than this since it looks like SimpleSEF processes every single request.

SMF 2.0RC3 + SimplePortal
Custom Theme + Latin5 Turkish
Ubuntu Lucid

atfosan

SlammedDime
I see that "index.php?action=" is stricted from the paths... I can't understand why it is not possible to strict the same part "index.php?anything="!.. Only some symbols are differing. It's pity.
Maybe there is a way with copy of pieces of code and paste these with replace "action" to "anything"? It is only my logic. I can't sleep without it! :)
If it is not for public version of mod, try to make test version or patch only for some people as me, please! :)
my SMF project - school site: forum with PortaMx and SimpleSEF mods

Advertisement: