HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Localize the stop word list?

Hi,

I'm setting up a forum in a different language. Can I localize the stopwords (the, any, is, etc) that get left out of URL slugs?

Comments

  • I see now that there is no stop word filtering in the URL slugs. Any plug-ins that do this?

  • hgtonighthgtonight ∞ · New Moderator

    I believe you are looking for the Url() method in Gdn_Format. You can find it on line 1191 in /library/core/class.format.php.

    I suggest you tread lightly when modifying core files. Any modifications cannot be community supported. Basically, you are on your own!

    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.

  • Thank you. Will I be able to modify the URL functionality by writing a plug-in?

  • hgtonighthgtonight ∞ · New Moderator

    No. The framework uses an autoloader to load the framework files. Since a plugin hooks into events fired once the framework is up and running, it would be impossible for it to modify the absolute core functionality.

    If I had to accomplish this same feat, I would fork the class.format.php file and maintain it through version updates.

    Please, someone tell me there is a better way.

    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.

  • joriswjorisw New
    edited May 2013

    Thank you. I'll dig into this. Does the same go for localizing the URLs? E.g. discussion/* -> somethingelse/* .

  • hgtonighthgtonight ∞ · New Moderator

    Just rewriting words in a url can be done in an .htaccess file, no?

    As far as printing out these urls, you would have to do a little more hacking. This thread might be helpful.

    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.

Sign In or Register to comment.