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.

How to change Permalinks of topics?

Is there a way to change permalinks of topics?

in url its show discussion/topicid/topicname/

where in vBSEO /topicid-topicname/

also spoiler button needed. which should work on all symbols. [/] [,"+! etc

«1

Comments

  • there is seo advantage between a dash and a slash.

    grep is your friend.

  • hgtonighthgtonight ∞ · New Moderator

    @x00 said:
    there is no seo advantage between a dash and a slash.

    Fixed that for you. :D

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • rajlakshrajlaksh New
    edited November 2013

    Thanks u all for the reply.

    @x00 , @hgtonight
    Hahha. Like i don't know. I'm asking for topic permalink not for SEO .

    I wanna all my old links work. This is simple question . I mention vBSEO. Its seems u ignore it.

  • hgtonighthgtonight ∞ · New Moderator

    What is vBSEO?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • peregrineperegrine MVP
    edited November 2013

    What is vBSEO?

    google was my friend today.

    this was one of the results.

    vBSEO is a 3rd party SEO (Search Engine Optimization) plugin for the forum platform, vBulletin.

    also this...
    VBSEO is Suspending Operations Dear vBSEO Customer: It's a sad day for vBSEO .

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • hgtonighthgtonight ∞ · New Moderator

    I probably should have googled it, but it is early morning. :D

    So you want a redirection script for vB style links?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • peregrineperegrine MVP
    edited November 2013

    So you want a redirection script for vB style links?

    that would be my guess...

    as far as permalinks - the url format that is specified is required by the controller methods.

    as far as links in comments and discussions.

    to convert the topic-id topic name

    /topicid-topicname/

    to

    /topicid/topicname/

    you could process them via an event and preg_replace after formatting

    or you could use

    jquery to convert links to the correct vanilla format.

    or you could do a massive change of links within the database comment and discussion tables.

    or htaccess could probably be used.

    maybe with the massive database change - you have less overhead.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • x00x00 MVP
    edited November 2013

    yeah you need to redirect links 301s in server rules you could also do it, with vanilla routes.

    grep is your friend.

  • R_JR_J Ex-Fanboy Munich Admin

    @peregrine said:
    or you could do a massive change of links within the database comment and discussion tables.

    If you change the links, you'll have a one time effort and a solution.

    Everything else is just a workaround which has to be applied again and again and again and again... That's a waste of resources and it will always be just a lousy workaround.

    Consider: workaround vs. solution ;)

  • rajlakshrajlaksh New
    edited November 2013

    @peregrine thanks for your suggestion and solution :)

    problem is file .htaccess never gonna work. Because its NGINX.

    so is their rewrite for discussion prefix ? how to remove discussion from url?

    How jquery gonna change permalinks?

    @R_J so their is a mods can do it? I'm using Vanilla SEO really useless in my case.

    in it u can't set custom title nothing else. i don't know what kind of seo it is.

    This kind of rewrite possible?

    rewrite ^/topicid-topicname /discussion/topicid/topicname/ last;

    @x00 Thanks. gonna try it.

    @hgtonight vBSeo can change title and links and meta and every permalinks with SEO.

    its not for styles. Its for URL aka SEO

  • hgtonighthgtonight ∞ · New Moderator

    @rajlaksh said:

    hgtonight vBSeo can change title and links and meta and every permalinks with SEO.

    its not for styles. Its for URL aka SEO

    Thanks for the insight. I have never managed a vBulletin forum.

    Vanilla utilizes a dispatcher which relies on URL structure to determine what controllers to load. Changing it is nigh impossible without writing a new dispatcher.

    Universal Resource Locator is not also known as Search Engine Optimization. Using readable URLs is helpful for users. Vanilla has readable URLs. The URLs don't need to be changed.

    You might want to implement some permanent (301) redirects for your old style of links to keep the "SEO Juice" you have built up, but that is a different issue than rewriting the dispatcher.

    You could accomplish this in different ways depending on the original link style. Could you post a full URL example from your old vBSeo style?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • peregrineperegrine MVP
    edited November 2013

    @hgtonight
    You could accomplish this in different ways depending on the original link style. Could you post a full URL example from your old vBSeo style?

    exactly what I was thinking. then maybe someone could give him a tip for a sql to change the body column in discussions and comment and conversations.

    And i don't know why is mentioning permalinks, I think he means links in discussion body content, because we all told him before the permalinks can't be changed, and the import process should have resolved this anyway.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • rajlakshrajlaksh New
    edited November 2013

    @hgtonight
    Could you post a full URL example from your old vBSeo style?

    http://forums.example.com/798-hi/#post4061

  • R_JR_J Ex-Fanboy Munich Admin

    @rajlaksh: that's not easy to achieve with sql alone. It's easier with php.

    1. backup GDN_Discussion and GDN_Comment!
    2. deflate the attached file to your plugin directory
    3. change line 9 forums\.example\.com to your domain
    4. activate the plugin in your dashboard
    5. goto yourdomain/Plugin/Replacer (still logged in as admin!)
    6. deactivate the plugin
    7. check if everything works
    8. come back to report the results

    The magic happens here

    public function NewBody($OldBody) {
       $Result = preg_replace("/(forums\.example\.com\/)(\d+)-(.*)(\/#post)(\d+)/", "$1discussion/$2/$3/#Comment_$5", $OldBody);
       return $Result;
    }
    

    That will look for "forums.example.com/798-hi/#post4061" and change it to forums.example.com/discussion/798/hi/#Comment_4061" which is Vanilla-speak for the link format you have right now.

    But you will still need a rerouting option for external links. Best place I can think of is /dashboard/routes, but I can not help you with that, sorry...

  • IMO this is best done with an external script with allocated resource, such a plugin could time out.

    I have build similar parsers but to work on dump as to be universal throughout the database, it will detect php serialised objects and deserialise before parsing and serialise them.

    grep is your friend.

  • R_JR_J Ex-Fanboy Munich Admin

    @x00: you are right. I just found it comfortable to use Vanilla for it but if you use it for bigger tables, timeouts could be a problem. At least I've built the regex... :|

    Together with a dump you could even use text editors that support regex! I should have considered that earlier. No need for a clumsy plugin hack and your on the safe side, too.

    @R_J <= too overmotivated...

  • @R_J Thanks for solutions. :) +rep you.

  • @R_J i'm getting this message: Bonk

    Something funky happened. Please bear with us while we iron out the kinks.

    Thanks for try.

  • Click this link to find out how to see what the actual error behind the bonk is: http://vanillawiki.homebrewforums.net/index.php/Bonk_Errors

    Add Pages to Vanilla with the Basic Pages app

Sign In or Register to comment.