Recent content by djgxp

  1. djgxp

    Fixed Api get threads with filter last_days

    By default, last_days is defined in Xenforo and if you are not adding any filter parameter to /api/threads/ you are getting something like last_post_date > 11111111 (where 11111111 here is the timestamp of the current date minus 1 month). if I set /api/threads/?last_days=0 in order to get all...
  2. djgxp

    XF 2.1 How to get a thread url from XF Api ?

    Actually I know that I can build manually the urls but from an SEO point of view it would have been great to be able getting friendly urls instead of partial urls leading to 301 redirects. Thanks anyway for your answer, I'll probably extend things in XF to get what I want ;)
  3. djgxp

    XF 2.1 How to get a thread url from XF Api ?

    Trying to play a little bit with the API, I could see JSON thread documents with posts and so on but I didn't see anything like a canonical url of the thread or even a path that would allow me to recreate the thread URL from an external site. So did I miss something or this is something that we...
  4. djgxp

    XF 2.1 Create a new url pattern for some threads without using route filters

    Here is my solution: Create a new addon MyNewAddon (for example) Create a Listener.php with a xfThreadStructure method and add it in the admin panel in the Development tab in Code event listeners mapped to your addon: <?php # File: Listener.php namespace MyNewAddon; use XF\Mvc\Entity\Entity...
  5. djgxp

    XF 2.1 Create a new url pattern for some threads without using route filters

    Ok so I found my answer. We have overwritten assertCanonicalUrl method of the Thread class so that it can take care of the flag set in database.
  6. djgxp

    XF 2.1 Create a new url pattern for some threads without using route filters

    I'm doing some development on a huge forum with about 3.5 million threads. I have an extended class for XF:Thread in an addon that is adding a new field is_faq which is a boolean. I have about 6000 urls to convert to /faq/... instead of /threads/... First, in my extended class, just before the...
Top Bottom