chopin Posted April 2, 2010 Share Posted April 2, 2010 I suggest allowing for the following format, when it comes to editing furlTemplate.php: www.example.com/topicdirectory(topicnumber)/topic-name/ or... www.example.com/topicdirectory/topicnumber/topic-name/ As of now, furlTemplate does not allow us to remove the dash in friendly urls which precedes the topic name. Please see my topic about this here. I personally find that a friendly URL looks much better when the topic number does not separate the topic name with a dash. My desired format would look like this: www.example.com/t54/topic-name1/ www.example.com/f2/forum-name1/ This leaves for the URL topic title in its own directory, which not only looks neater, but when searching in Google, the highlighted keywords are in its own directory. Whether or not this affects SEO, is not my main concern though, I really am just looking for neatness. I hope this can be considered as a revision in the next IPB update! Thanks for listening. Link to comment Share on other sites More sharing options...
Fishfish0001 Posted April 2, 2010 Share Posted April 2, 2010 Im pretty sure the - needs to be there for the explode function to get the current forum. Not sure, but I think thats why they are there. Link to comment Share on other sites More sharing options...
Wolfie Posted April 2, 2010 Share Posted April 2, 2010 Actually the name is more or less irrelevant to IPB, as it relies solely on the number supplied. However, no matter what is done, the dash has to be there. It's odd really. Link to comment Share on other sites More sharing options...
Axel Wers Posted April 2, 2010 Share Posted April 2, 2010 Not important suggestion. Everybody can change their own furlTemplate as want. I made it. Link to comment Share on other sites More sharing options...
Wolfie Posted April 2, 2010 Share Posted April 2, 2010 Not important suggestion. Everybody can change their own furlTemplate as want. I made it. He wants to have it like: /forums/t123/name-of-topic-here But that won't work. It has to have the dash after the topic number or it won't work. So it's kind of important for those who want to change the format. Link to comment Share on other sites More sharing options...
Axel Wers Posted April 2, 2010 Share Posted April 2, 2010 Yes, I know, that didn't work in my case [url=" well. I use this format: http://community.invisionpower.com/topic-308090-friendly-url-suggestion-furltemplatephp Link to comment Share on other sites More sharing options...
Wolfie Posted April 2, 2010 Share Posted April 2, 2010 Yes, I know, that didn't work in my case [url=" well. I use this format: http://community.invisionpower.com/topic-308090-friendly-url-suggestion-furltemplatephp He doesn't want it like that, thus his request. Link to comment Share on other sites More sharing options...
Mark Posted April 2, 2010 Share Posted April 2, 2010 He wants to have it like: /forums/t123/name-of-topic-here But that won't work. It has to have the dash after the topic number or it won't work. So it's kind of important for those who want to change the format. :blink: What on Earth are you talking about?" alt="" class="ipsImage" width="1000px" height="729px"> 'showforum' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showforum=(.+?)(&|$)#i', 'f$1/#{__title__}/$2' ), 'in' => array( 'regex' => "#/f(d+?)/#i", 'matches' => array( array( 'showforum', '$1' ) ) ) ), The furl templates use regular expressions... you can pretty much make them what you want. Link to comment Share on other sites More sharing options...
Wolfie Posted April 2, 2010 Share Posted April 2, 2010 http://community.invisionpower.com/topic/299217-url-rewriting-help-regex/ I just tried your code and it fails for me. Pretty much, something about how it can never resolve. I think it's caught up in a never-ending loop. Link to comment Share on other sites More sharing options...
chopin Posted April 2, 2010 Author Share Posted April 2, 2010 It "works" as long as you don't use 301's to redirect. If you use 301's however, it goes into a never ending loop. But problems occur when you try installing apps that also use FURL. Now I can't use any apps, and they redirect to my forum home because my format is www.example.com/t#/topic-name/. Not sure what to do other than wait for a fix. I don't want the number included in the topic url, I suppose it is just personal preference, and to me, the looks of a url is important. Thus, in my case at least, I feel the FURL template is a bit limiting. Link to comment Share on other sites More sharing options...
Mark Posted April 2, 2010 Share Posted April 2, 2010 While I may be mistaken, I cannot think why that would be the case, and was unable to reproduce that. The code I posted it working fine for me (see the screenshot). Once you've made that change, you'll just need to rebuild the furl cache (just go to the ACP and you should be alerted to it). If it doesn't work, feel free to drop me a PM and I can take a look. Link to comment Share on other sites More sharing options...
Peter F. Posted April 2, 2010 Share Posted April 2, 2010 Just tried this on my dev board: 'showtopic' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showtopic=(.+?)(&|$)#i', 'topic/$1/#{__title__}/$2' ), 'in' => array( 'regex' => "#/topic/(d+?)/#i", 'matches' => array( array( 'showtopic', '$1' ) ) ) ), and it works fine Link to comment Share on other sites More sharing options...
Peter F. Posted April 2, 2010 Share Posted April 2, 2010 I've also just set it up on my new forum: http://www.modstation.com/index.php?/topic/59/existing-customers/ Link to comment Share on other sites More sharing options...
chopin Posted April 2, 2010 Author Share Posted April 2, 2010 Try enabling mod rewrite, to eliminate index.php? by going here: tools and settings --> systems settings --> Use .htaccess mod_rewrite (set to yes, and apply changes to your htaccess file accordingly) Next, under the same setting, try redirecting your urls by heading to "Incorrect Permalink Handling" and choosing "redirect to correct link with a 301 header" Do you still get success with those settings? Link to comment Share on other sites More sharing options...
Wolfie Posted April 2, 2010 Share Posted April 2, 2010 While I may be mistaken, I cannot think why that would be the case, and was unable to reproduce that. The code I posted it working fine for me (see the screenshot). Once you've made that change, you'll just need to rebuild the furl cache (just go to the ACP and you should be alerted to it). If it doesn't work, feel free to drop me a PM and I can take a look. I had rebuilt the furl cache, as I think it'd just be confused about where to go otherwise and simply go to the main board index. I just now tried it with "Incorrect Permalink Handling" set to "Do Nothing" and that fixed the issue. A bug perhaps? Link to comment Share on other sites More sharing options...
Mark Posted April 2, 2010 Share Posted April 2, 2010 I wouldn't say a bug since you're modifying the code, but I'll see if that can be changed. Link to comment Share on other sites More sharing options...
Wolfie Posted April 2, 2010 Share Posted April 2, 2010 I wouldn't say a bug since you're modifying the code, but I'll see if that can be changed. It only happens when the setting is set to "Redirect to correct link with a '301' header." When setting it to redirect the old ?showxxxx=## to the new fURL format, and doing the 301 header, that works fine. It's only when the other setting is done. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.