Announcement

Collapse
No announcement yet.

Changing URLs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Changing URLs

    Which code in vB5 handles {vb:url}?
    Which code in vB5 creates URLs - can I hook there?
    Is there any way to globally change vBulletin URL by hooks? As I see vB code is taking 'frontendurl' configuration directly - without hook system.

    Right now I'm making changes in my product and need to handle lot of different places because I know no way how to change URL globally. Booth base and the rest. Any hints?

    vBulletin Enterprise Translator (vBET) - your forum in 52 languages!

  • #2
    Create a route in the routenew table and use the router.

    http://vb5support.com/resources/api/vB5_Route.html

    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API - Full / Mobile
    Vote for your favorite feature requests and the bugs you want to see fixed.

    Comment


    • #3
      Thanks. Still - I do not know which question this answers and the answer do not help me too mutch.
      The documentation do not precise where is the router class (which file should I include). It says also nothing about creating router in table (by insert query? any examples?).
      Will it change URLs generated by {vb:url}?
      What about code which combines URLs with baseurl, wchich is taken without possibility to dinamically update it? vB5 has a lot of it. Like:
      Code:
      $baseurl = vB::getDatastore()->getOption('frontendurl');
      vBulletin Enterprise Translator (vBET) - your forum in 52 languages!

      Comment


      • #4
        Answers are vague for two reasons...

        1) the questions are vague.
        2) The answers will change based on the specifics.

        We don't really provide support for third-party coding. Though, I've built the API documentation (which I linked above) to help people. There is also an example in package in the do_not_upload development folder. Plus all the packages in the /core/packages directory that can be used as examples. For including the classes, you shouldn't need to load anything. The file is /core/vb5/route.php though it should be loaded through the Autoloader as well.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API - Full / Mobile
        Vote for your favorite feature requests and the bugs you want to see fixed.

        Comment


        • #5
          If questions are vague then one at a time more detailed. And thanks for your help even that you do not support third-party coding. sometimes it its really hard to find anything about solutions for vB5.

          Detailed question: I see in template {vb:url 'search'} and I must change its result. How can I do it? Does code which evaluate this uses hook system and if yes, then which method in which class I need to use in my hook?
          vBulletin Enterprise Translator (vBET) - your forum in 52 languages!

          Comment


          • #6
            Could you give an example of the new search url you want to change to?

            GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

            Comment


            • #7
              Originally posted by Glenn Vergara View Post
              Could you give an example of the new search url you want to change to?
              /de/search
              /pl/search
              /fr/search
              ...

              And so on - I need to change it dynamically, according to request URL. I did it in vB4 just by parsing final HTML, but in vB5 lot of places are mist by this approach. Maybe because I do not handle some ajax results, maybe for other reasons. Anyway the best way would be to just hook globally to URL generation and do it in one place for all generated URLs
              vBulletin Enterprise Translator (vBET) - your forum in 52 languages!

              Comment


              • #8
                /includes/vb5/template/url.php is probably the file you want. It has no hooks. I don't know if it is extendable. If you need a hook in a specific place, then request it in the Tracker linked above.
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud demonstration site.
                vBulletin 5 API - Full / Mobile
                Vote for your favorite feature requests and the bugs you want to see fixed.

                Comment

                Related Topics

                Collapse

                Working...
                X