Jump to content

Rename "forums" application to "forum"


Slimer

Recommended Posts

What Adriano said. And also: don’t mess with the FURLs unless you absolutely have too. Your user don’t care at all about the existence of the s. It doesn’t change a thing. And you will forever have custom FURLs and you will have to maintain that forever or loose your ranking in case things go wrong at some point in the future. It’s really not worth it. 

Link to comment
Share on other sites

 

45 minutes ago, Adriano Faria said:

ACP -> System -> Advanced Settings -> Friendly URLs.

There is a problem with this. Then I change furl from forums/topic/{#id}-{?} to forum/topic/{#id}-{?} it automatically added "forums" and saves as forums/forum/topic/{#id}-{?}

Maybe you can look at previous my problem and offer a solution?

 

41 minutes ago, opentype said:

Your user don’t care at all about the existence of the s.

I understand, but all urls already indexed as /forum/topic... I try to move from /forum/ directory to root folder with changing default app to "portal" and want to save all links.

Link to comment
Share on other sites

This is decision for renaming I found:

you must comment lines in /applications/core/modules/admin/settings/advanced.php line 901

					$appIsDefault = FALSE;
					if ( $currentDefinition[ \IPS\Request::i()->key ]['without_top_level'] )
					{
//						$appTopLevel = mb_substr( $currentDefinition[ \IPS\Request::i()->key ]['friendly'], 0, -mb_strlen( $currentDefinition[ \IPS\Request::i()->key ]['without_top_level'] . '/' ) );
//						$friendly = rtrim( preg_replace( '/^' . preg_quote( $appTopLevel, '/' ) . '(\/|$)/', '', $friendly ), '/' );
					}

I try and now it is not added "forums" into url. Be careful with this changes.

Now it is worked like I need.

Link to comment
Share on other sites

  • 6 months later...
On 1/30/2019 at 6:10 AM, Slimer said:

This is decision for renaming I found:

you must comment lines in /applications/core/modules/admin/settings/advanced.php line 901


					$appIsDefault = FALSE;
					if ( $currentDefinition[ \IPS\Request::i()->key ]['without_top_level'] )
					{
//						$appTopLevel = mb_substr( $currentDefinition[ \IPS\Request::i()->key ]['friendly'], 0, -mb_strlen( $currentDefinition[ \IPS\Request::i()->key ]['without_top_level'] . '/' ) );
//						$friendly = rtrim( preg_replace( '/^' . preg_quote( $appTopLevel, '/' ) . '(\/|$)/', '', $friendly ), '/' );
					}

I try and now it is not added "forums" into url. Be careful with this changes.

Now it is worked like I need.

Are you still doing it like this? 

Link to comment
Share on other sites

@Slimer, this worked out for me. I was having an issue where my pagination was not working correctly. Support had me revert my url's to test and that fixed it. However, I have been running a different /forums url for years and when I migrated from vbulletin the fact that I could keep that by editing the furl sold me. So...after reverting and testing yesterday, the software would no longer take the change and the answer I got from support was that the best way was to just keep it with /forums and redirect moving forward. That wasn't the answer I was looking for since everything was working 5 minutes before I reverted FURLs and that's what's indexed for SEO.

Support was no help and I stumbled upon this topic which helped me get back to where I need to be, so thank you for posting this because I was scrambling for a solution. 

Link to comment
Share on other sites

  • Management

Just as a note, to follow up on a ticket, in Invision Community 4, it's not actually intended behavior to "redirect" top level app names in URLs. You'll find by happy accident it works for some apps, but doesn't work for others and while I realize some are using it with success for that purpose, I'm not sure many realize it's not intended. 

A future version will remove all the circa 2002 FURL stuff and introduce a more modern redirect/path manager. In the interim, we do not actively account for top level app rewrites in our development and cannot guarantee it will work for this specific use-case - meaning, if we encounter a bug that happens to touch that area, it's not part of our process to consider this and thus the fix may unintentionally break what you are trying to do. We really recommend using 301 redirects whenever possible.

Naturally, we do not recommend or support modifying source files. If it works for you though and you're happy self-supporting... feel free. 

I wish I had a better answer right now, but we are working on gutting and revamping that system. Query stringed URLs are so yesterday and there's far more use for proper path mapping/redirects - especially for conversion customers. 🙂 

Link to comment
Share on other sites

The only reason my url is different on this one install I have of IPS vs my others is because this site was a vbulletin conversion and that’s how I was running them. I prefer not to change or redirect my url if I don’t have to. Been working fine,  just somewhere along the line the ability to edit it was removed. I honestly thought that one of the powerful features was to be able to customize your furls. 

In this case, it sounds like you are forcing everyone to use /forums no matter what, instead of some other word for that app. 

Link to comment
Share on other sites

  • Management
2 minutes ago, AlexWebsites said:

The only reason my url is different on this one install I have of IPS vs my others is because this site was a vbulletin conversion and that’s how I was running them. I prefer not to change or redirect my url if I don’t have to. Been working fine,  just somewhere along the line the ability to edit it was removed. I honestly thought that one of the powerful features was to be able to customize your furls. 

In this case, it sounds like you are forcing everyone to use /forums no matter what, instead of some other word for that app. 

Right, it's not so much that we purposely 'removed' it; it simply wasn't really designed to exist to begin with. We likely just corrected another issue that had an impact on it (probably pagination changes.) That's why I wanted to clarify changing the top-level app slug wasn't necessarily intended behavior (and it's outright impossible behavior for certain apps) and thus, it's not accounted for during the course of development. 

The FURL system was initially designed to make those ugly URLs with query strings into, as the acronym suggests, friendly URLs. People have used it for a variety of other purposes (and to be honest, it doesn't always end well at all), but that was in fact the original intent and as all URLs should just naturally be friendly now, it makes sense to scrap that and allow you to do what you're trying to do by design. I just wanted to stress that we're not there yet and using the FURL system for that purpose isn't something we super strongly recommend or support, unfortunately. 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...