News:

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

Main Menu

Advance SEF URLs

Started by Biology Forums, October 31, 2007, 09:35:32 PM

Previous topic - Next topic

Biology Forums

Link to Mod

                
Advance SEF URLs 1.2.9
                      
Author:
                   
SleePy
                      
Developer:
                   
Masterd



Thank you for Using Advance SEF URLs
This Mod creates and allows you do do some More SEF Options while using the default SMF SEF Urls.
You can have action urls be SEF Friendly, Page urls (from Tinyportal), and even Single Category urls be SEF friendly.
As well you can also choose to use /? or /index instead of /index.php as your scripturl string.

All options come with a shutoff that you can add to your Settings.php incase enabling one of these options causes  your server to fail. Just add the following to your Settings.php if your site fails to load or work after changing SEF options to disable them.
$disable_sef true;

Version 1.3.0
! Updated for SMF 1.1.13 SMF 2.0 RC5

Version 1.2.9
! Fixed a bug with double questions when using Question mark URLs

Version 1.2.8
! Updated for SMF 2.0 RC4

Version 1.2.7
! Updated for SMF 2.0 RC3

Version 1.2.6
! Updated for SMF 2.0 RC2

Version 1.2.5
! Updated for SMF 2.0 RC1

Version 1.2.4
! Added support for no file at all (SMF 2.0+)
! Have install attempt to create a ".htaccess" with some code to better allow the SEF url options. (SMF 2.0+)
! Play nicer with debug urls (SMF 2.0+)
! Updated Support for of only SMF 2.0 Beta 4

Version 1.2.3
! Added Support for SMF 2.0 Beta 3 Public
! Dropped Support for old versions of SMF 2.0 Betas

Version 1.2.2
! Added SMF 2.0 Beta 2.1 Support
! Fixed a issue with captcha and SEF urls

Version 1.2.1
! $smfFunc no longer esists.

Version 1.2
! Added 2.0 Beta 2 Support

Version 1.1
! Sometimes redirection caused double questions when using Question mark urls (UNTESTED!)
! Removed orphaned ending operation.

Version 1.0
! Release

SleePy

I believe those come from the redirectexit function.
Are you sure that there was no errors while installing?

There is no good configuration really, its just a mater of what you prefer.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

SleePy

Does it still work? At the moment I lost my test server due to a upgrade on my computer so I can't perform the tests at the moment.

The only thing I can think of is a str_replace is failing in either the QueryString.php where the urls are written or the Subs.php where redirectexit is.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

SleePy

Can you attach your Subs.php?

Right now I am having issues re-setting up my local test site again as the folder still exists and even my root login or booting off another cd wont delete it. So this is a pain :(

? as the url works on most because apache finds the index file and uses it. Though on some hosts and configurations it wont accept post method correctly so you can't login, posts, etc.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

SleePy

Lets try this.

Find:
// We send a Refresh header only in special cases because Location looks better. (and is quicker...)

Before that code add this

if(!empty($modSettings['enableUseQuestion']) && empty($disable_sef))
$setLocation = str_replace('??', '?', $setLocation);


that should hopefully fix up the url as I suspect its the redirectactions doing this.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

SleePy

Cool, Will add that in so it comes in another update of the mod
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

WWMax

After installing I tried to change options to see how it's going to look but for some reason I am uneble to change anything...

I tried disable SEF url's and even uninstall this mod but nothing is happening.

Can it be related to TinyPortal I have installed?

Thanks
hxxp:esyndicat.info [nonactive] | hxxp:w3bids.com [nonactive] | hxxp:kwtags.com [nonactive]

Smasher

Man is this a headache....

I installed this and decided to click all 5 options on to how the site would look with this... and what absolute craziness...

As soon as I went to go edit a TP article I kept getting thrown to the homepage... so I tried going into the settings and clicking off one of the features to see if it would work without that... then when I click save it will not let me save it... again pops me to the main site page.... next I try to uninstall it... end result is I wind up back at the home page...

Guess this is a good reason to back up everything before you install things.... glad my site is not a live site....

Site in Development

Powered by SMF 2.0.4
     - EzPortal 1.0
     - SA Facebook Integration

Smasher

Quote from: dannbass on November 15, 2007, 09:56:13 AM
But it is very easy to go back to original... just copy the $disable_sef = true; into the settings.php and that should be it... after that go to admin and deselect whatever is the problem and then delete the line from the settings.php upload and enjoy...

The mod works for me and I have TinyPortal installed, is just a matter of getting to know each function and what is best for you.

Hope it helps, this is a great mod!!

Ok I did this and I am now able to get around my site again... which boxes should I not check if I am using TP?

So now that I have this back to normal I go remove that line from settings.php??

and thank you very much....
Site in Development

Powered by SMF 2.0.4
     - EzPortal 1.0
     - SA Facebook Integration

SleePy

Yes you can remove the line if you think you fixed the settings.

Did you choose the option to just do index/ for the urls?
Even though on some servers this works, it doesn't send the post method correctly to submit the pages. I can't figure out why at the moment but its just a thing some servers do.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Kleidi

!   D:\Documents and Settings\Administrator\Desktop\AdvanceSEFurls.xml.tar.gz: The archive is corrupt


Can you upload it again , please?

SleePy

I will be reuploading this later on tonight since 2.0 beta 2 was released to charter members.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

SleePy

I have updated this mod now, it should work correctly.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

digit

Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

digit

I am using winrules Custom Action mod.  Would it be possible to make the sub-action URL's SEF?
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

SleePy

What do the urls look like?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

digit

Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

SleePy

Well as a dirty fix you can do this:

QueryString.php and Subs.php (same code used in both places).
Find:
    if(!empty($modSettings['enableActionurls']) && empty($disable_sef))
        $sef_urls[] = 'action';


Replace:
    if(!empty($modSettings['enableActionurls']) && empty($disable_sef))
    {
        $sef_urls[] = 'action';
        $sef_urls[] = 'sa';
    }


I will do a proper update of it when another release of SMF occurs :)
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

digit

I actually had to uninstall this - I had QUITE a few people reporting they were getting logged out every 5-7 minutes - any idea why?  >:(
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

SleePy

I never had an issue with this, what are you settings at?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Advertisement: