Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Removing the discussion name from the URL?


I've tried setting this in conf.php:

$Configuration['Garden']['RewriteUrls'] = FALSE;

This turns off the friendly URLs, but it still leave the discussion name in the title, ie index.php?p=/discussion/97/discussion_name#Item_465

Thanks :)


  • Options

    Quick bump, is this possible please? :)

    Many thanks

  • Options

    RewriteUrls has nothing to do with it.

    you would have to manually override Url and Anchor function and filter it out based on the request.

    Why are you so desperate to do this? you get better seo and clarity with the slug.

    Alternately you can copy the view to you themes and make the corrections there. That is probably the best solution. the slug is not invalid, if you are irked about having the slug this will reduce it.

    grep is your friend.

  • Options

    Many thanks x00, the forum isn't public so for SEO reasons etc I'd rather just ditch it, in fact it's quite important that the URLs are cleaned from the title

    Pardon my ignorance though, but what is the slug? Rewriting the URL and anchor functions sounds like it has potential to go horribly wrong too ;s

  • Options

    a slug is discussion-name

    what version of vanilla are you using 2.1 uses DiscussionUrl function this might not be fully implemented, by could be overules.

    there is a hook BeforeDiscussionName which the event arguments pass DiscussionUrl which you can modify. This is just the discussion list for discussions view. It is in all sort of places like the feed you would have to copy all those views over to your theme, to be move full proof an make the change in each case. Thing is views can often be radically different between different version of vanilla, so such view overriding is not perfect.

    none of these is goign to automatically work for plugins (as you don't know how these have been implemented, or internal links in posts.

    Knowing how to do it properly, as I won't be implementing it for you or supporting it, I can't reasonably explain what is a patch to the core, as modify core is only for those that know that they are doing, and usually they will do a pull request follows in order not to get stranded with a fork.

    grep is your friend.

  • Options

    Thanks again for the info, we're currently using but hoping to update to 2.1 very shortly (been using this version for a long time now)

    I'll check the code for the DiscussionUrl argument and hope I can change it without breaking things :) thank you!

Sign In or Register to comment.