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

Kindred

Actualy, it is not just a preference.   Forum/ is the forum directory. You have already removed the filename, index.php...    The other urls formed by the mod are not actual directories... Which is why the ending slash is optional.... Sort of.   Every pretty URL that I have seen actually uses the ending slash.

Btw, if you are using this mod because you think it improves seo with those urls, you are mistaken.
Сл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."

Suki

@travisbwy  Cannot be done unfortunately. The way this mod works is as follows:  action/sa.subaction/action.value  it is strictly related to how SMF handles actions and subations as well, the / is not only for aesthetics but serves as a separator between the different actions SMF can handle.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

travisbwy

I just changed folders for the smf install and simplesef is showing on in package installs but the control panel link is gone. Is there a separate url config for simplesef that I'm missing?

bukharifaran

Simple SEF is working on my one forum hosted with Fatcow.com But it is not working with my other forum hosted with Siteground. URL rewriting is not working.

I have asked this in another thread, kindly read that as well: http://www.simplemachines.org/community/index.php?topic=488819.0
My Forum: Mobile Fun | My Blog: Mobile Fun Blog

bukharifaran

Will some one please reply? First it was working http://www.mobilefun.pk/forum/index.php here if i select "Create Simple URLs" but not working without it. But now even this is not working. When I click on my topi, it opens the main website mobilefun.pk Currently I've disable this Mod. Please help me why this is not working.

Thanks.
My Forum: Mobile Fun | My Blog: Mobile Fun Blog

SoLoGHoST

This mod breaks the pagination ... href urls for the start and order variables.  That is when you click on the ... for example [1] 2 3 ... 17 pagination:  when clicking on the ... your start will be presented with a %1 and the order gets a $d.  I am trying to pinpoint the root cause of this, but could take me awhile...

Suki

Nope...

got it working just fine on my site...

This mod is sufficiently smart enough to know the type of params an url is giving... is its just integers then it shows it as .int where int is the number to show, you might want to check how you are generating your urls...
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

SoLoGHoST

Oh, wait, I see the problem, I had SimpleSEF version 1.1 installed on the forum, yet there is now a 2.1 version.  That is the problem, I'll just update to 2.1.

SoLoGHoST

OMG this Mod is crazy!!!!  Now I can't access my board URL's after installing SimpleSEF 2.1 and enabling it.  I don't have Search Engine Friendly URL's enabled in SMF Features and Options, and am not even able to enable it either.  In any case...

This URL doesn't work (redirecting to the Homepage instead):  http://dream-portal.net/board_65.0/

But this URL does work:  http://dream-portal.net/board_65/

WHY?

My .htaccess looks like this:

RewriteEngine on
# RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


What is wrong here?  Wow, I've been doing this 1 thing for 4 hours now... it's exhausting trying to set this up correctly...

Can anyone help?  I feel like I'm working on my car instead of just uploading and installing an SMF Mod.  And I know this is a problem with this MOD, because I have also tested this on a fresh install of SMF 2.0.2 and SMF 2.0.3.  I am unable to access the board_1.0/, but board_1/ works instead.

Suki

You don't need to specify the .0 after the board name, simpleSEF cuts off that part when re-writing the urls in the buffer.

Again, the mod is sufficiently smart enough to not let you enable the mod if you didn't porperly set up your .htaccess file, there are instructions on the mod's admin page for several web servers, are you using apache?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

SoLoGHoST

Quote...simpleSEF cuts off that part when re-writing the urls in the buffer.

No, simpleSEF did not cut off that part at all.  Not even when I enabled it on a fresh install of SMF 2.0.2 and SMF 2.0.3.

Here's how I fixed this problem for those of you who will also discover this issue...

in your .htaccess file, use the following...

RewriteEngine on
RewriteBase /

RewriteRule ^(board_[0-9]+)\.0/$ $1 [L,R=302]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


You're Welcome!

SoLoGHoST

Also, this is still a problem with board=65.20 urls.  Don't understand what simpleSEF is supposed to do when working correctly for these types of urls.  In any case, the best thing I recommend doing is not using this mod at all and just use Search Engine Friendly URLS in SMF's Features and Options within the SMF Admin.

Suki

Quote from: SoLoGHoST on January 07, 2013, 12:27:39 AM
Also, this is still a problem with board=65.20 urls.  Don't understand what simpleSEF is supposed to do when working correctly for these types of urls.  In any case, the best thing I recommend doing is not using this mod at all and just use Search Engine Friendly URLS in SMF's Features and Options within the SMF Admin.

http://missallsunday.com/blog_40/
http://missallsunday.com/blog_20/

and so on...

This is how you should handle those urls...

http://missallsunday.com/blog/

this is how board url works, no need to add the board ID, it is pointless unless you have 2 different boards with the same name and when that happens, simpleSEF is smart enough to add the ID for you.

there is no need to fix anything that it isn't broken, much less to say this is a bogus mod because it isn't, please do not confuse people just because you couldn't understand how this mod works in the first place...
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

SoLoGHoST

#1413
When you install a mod and do exactly what it says to do on a FRESH install of SMF 2.0.3 and/or SMF 2.0.2, and you create a .htaccess as the Mod tells you to do in order to enable the Mod to begin with.  When you follow all of the steps that the Mod tells you to do, and in the end, it does not work, or messes up your board_20 urls, what is this mod than?  If it's not bogus, than it's definitely something else!

I understand what it is supposed to do with the board urls throughout your forum, I also understand what the mod tells you to do with a .htaccess file in your SMF Root Directory.  This is not the first mod that I ever installed on a forum, and being a Mod Creator myself, I assure you that I'm well capable of identifying that a Mod has a problem when in fact it does, and when a Mod doesn't have a problem due to other circumstances that prevent the mod from working correctly.

My final result:  This mod messes up your board urls in SMF 2.0.2 and SMF 2.0.3 when installing using emulation and creating a .htaccess file (as the mod states to do), and enabling this Mod via the SimpleSEF Admin Panel.  Furthermore, I'm not 100% sure, but I do believe that this mod screws up pagination when clicking on the ... on any pagination other than the Admin sections of your SMF Forum.

@Suki - You have not tried to install this mod on a Fresh Install of SMF 2.0.3 or SMF 2.0.2 (with no other mods installed), otherwise you will understand if you have done so.  I'm not talking about your site.  You're site is custom coded to be honest.  I'm talking about installing this Mod on a fresh install of SMF 2.0.2 and/or SMF 2.0.3 and following the instructions that this mod tells you to do in your .htaccess file of your SMF Root.  Once completed you will see that your board urls do not work properly.  And there are instances where the . after the board number is not always 0, because this has to do with boards that have more topics in them that will show at once.  Pagination of topics within Boards...  For example:  3 pages of topics in a board (with an id of 65) will have the following board urls:

Page 1:  index.php?board=65.0
Page 2:  index.php?board=65.20
Page 3:  index.php?board=65.40

So what is SimpleSEF urls for all three of these URLS??  huh?
If SimpleSEF is supposed to change the urls as follows:

board_65/
board_6520/
board_6540/

None of these URLS will work after you install SimpleSEF with what they tell you to do.

Furthermore, if you are supposed to use the Boards name instead of the Boards ID number and board...  example:

{board name}/
{board name}_20/
{board name}_40/

Than why doesn't SimpleSEF change the board urls for you on your forum?  All of the board urls remain unchanged and instead point to:  board_{id}/

Arantor

QuoteIf SimpleSEF is supposed to change the urls as follows:

The idea is that it shouldn't become board_65 but take on the SimpleSEF name for the board, e.g. myboard, myboard_20, myboard_40. For some reason that didn't happen.
Holder of controversial views, all of which my own.


SoLoGHoST

Ok, the problem is the "Create Simple URLs" setting within this mod.  This breaks your board links!  If you disable this setting, it works.  So, there ya go!  You can see what I mean by going here:  http://developers.dream-portal.net/smf203/

Clicking on the board does not load up the board.  However, if you go to this url:  http://developers.dream-portal.net/smf203/board_1/ it loads up the board.  But if you have pages of topics in that board, I don't know what the URL is supposed to be for that when "Create Simple URLs" is enabled.  In any case, this mod is now uninstalled, my site urls are working again and thank god!

Suki

Quote from: SoLoGHoST on January 07, 2013, 10:27:26 PM
So what is SimpleSEF urls for all three of these URLS??  huh?
If SimpleSEF is supposed to change the urls as follows:

board_65/
board_6520/
board_6540/

None of these URLS will work after you install SimpleSEF with what they tell you to do.


._____.

Of course those urls won't work because THATS A WRONG URL, I already told you twice but you don't want to listen...  the urls created by this mod DOESN'T NEED THE BOARD ID, you don't need to put the board ID there...

And thank you for implying that I haven't installed this mod on a fresh vanilla SMF installation but thats not the case... I have installed this mod not only on fresh smf installs but also on several web servers and not only on apache. I had installed this mod on both a fresh install and also on some heavily modified forums, always with the same result, 100% success.

You keep trying to do something that this mod just doesn't do because there is no need to add the board ID...  also, if you keep changing this mod settings, you need to make sure to clean your forum's cache regularly otherwise you will get non working urls and then you will blame the mod and marked it as bogus...
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

SoLoGHoST

#1417
Quote from: Suki on January 07, 2013, 11:39:39 PM
Quote from: SoLoGHoST on January 07, 2013, 10:27:26 PM
So what is SimpleSEF urls for all three of these URLS??  huh?
If SimpleSEF is supposed to change the urls as follows:

board_65/
board_6520/
board_6540/

None of these URLS will work after you install SimpleSEF with what they tell you to do.


._____.

Of course those urls won't work because THATS A WRONG URL, I already told you twice but you don't want to listen...  the urls created by this mod DOESN'T NEED THE BOARD ID, you don't need to put the board ID there...

And thank you for implying that I haven't installed this mod on a fresh vanilla SMF installation but thats not the case... I have installed this mod not only on fresh smf installs but also on several web servers and not only on apache. I had installed this mod on both a fresh install and also on some heavily modified forums, always with the same result, 100% success.

You keep trying to do something that this mod just doesn't do because there is no need to add the board ID...  also, if you keep changing this mod settings, you need to make sure to clean your forum's cache regularly otherwise you will get non working urls and then you will blame the mod and marked it as bogus...

Cleaning the forum cache will not make a difference when "Create Simple URLs" is enabled!  Your board urls are still broken.

Ok, what I've learned.  This Mod works when "Create Simple URLs" is Disabled.

When "Create Simple URLs" setting is ENABLED (that is checked and saved), this mod breaks your board urls.  The "Create Simple URLs" setting changes your board urls to board_1.0/ and  board_2.0/ etc. etc..  I have emptied out the forums cache numerous times already, this does NOTHING!

So, in short, this mod works when "Create Simple URLs" is DISABLED!  But when it is enabled, it breaks your board links, and I also believe it will break your pagination links that become visible when you click on the ... in pagination.

"Create Simple URLs" SimpleSEF Setting is located just underneath "Enable SimpleSEF" setting, and states the following:

QuoteUrls will look like /forum/board-1/, or /forum/topic-3.html instead of content filled.

This may or may not have something to do with the error I received on installation of this mod (as I haven't looked into that) within the SMF Error Log:

Quote
8: Undefined variable: hook
File: ./Sources/SimpleSEF.php
Line: 781

To Replicate this bug in SimpleSEF, just install the Mod (via SMF Package Manager) emulating SMF 2.0 for SMF 2.0.3.  Now go to the Mods settings (which you will be automatically redirected to), and Enable SimpleSEF and also enable "Create Simple URLs" (just underneath of that).  Save it, and now check out your Board Links within your forum (when clicking on the names of your boards).  They take you NOWHERE!  Clear your forums cache and BAM, you still go NOWHERE when clicking on your board names that are supposed to open up the topics in that board...  Boards never get loaded!  The END!

Suki

OK, for those suffering from this mod adding a noindex metatag.

This mod does not actually add that intensionally, what happens is that SMF checks the $_GET var directly, the checks are performed on Sources/  Display, Board and MessageIndex.

Since SimpleSEF re-writes all $_GET vars, by the time SMF checks those, there will be already changed, thus the checks will be trigger and SMf will set the $context['robot_no_index'] to true.

A simple hackish and nasty fix would be adding the check to see if SimpleSEF is enable and include that check with the $_GET checks, so in Display.php:

change this

// Let's do some work on what to search index.
if (count($_GET) > 2)
foreach ($_GET as $k => $v)
{
if (!in_array($k, array('topic', 'board', 'start', session_name())))
$context['robot_no_index'] = true;
}

if (!empty($_REQUEST['start']) && (!is_numeric($_REQUEST['start']) || $_REQUEST['start'] % $context['messages_per_page'] != 0))
$context['robot_no_index'] = true;


to this:


// Let's do some work on what to search index.
if (count($_GET) > 2 && empty($modSettings['simplesef_enable']))
foreach ($_GET as $k => $v)
{
if (!in_array($k, array('topic', 'board', 'start', session_name())))
$context['robot_no_index'] = true;
}

if (!empty($_REQUEST['start']) && (!is_numeric($_REQUEST['start']) || $_REQUEST['start'] % $context['messages_per_page'] != 0) && empty($modSettings['simplesef_enable']))
$context['robot_no_index'] = true;


So far SimpleSEF has handle all possible bad urls by itself and I haven't had any issue that I couldn't handle via robots.txt

The other checks can be easily spotted, just do a search by $context['robot_no_index'] on the files I mentioned and append the empty($modSettings['simplesef_enable']) check.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Leppie

I've installed simpleSEF v.2.1 on my SMF 2.0.4 forum and enabled the advanced options.

The URLs are rewritten to show the board and topic names instead of the IDs, however I also get pieces like topic number, message number, "topicseen.", "boardseen.", "msg#","new" etc. in the rewritten URLs. I've added some of these words to the "words to strip" list, but they still show up in the URLs.
Example: /boardseen./Testimonials/manjaro_netinstall_3020.msg101719.html#new

All suggestions welcome.

Advertisement: