Giter VIP home page Giter VIP logo

Comments (3)

simpleauthority avatar simpleauthority commented on August 15, 2024 1

Thanks for looking into this for me. Sorry for my absence. I'll be trying to work on this soon.

from xenfororesourcemanagerapi.

amnotbananaama avatar amnotbananaama commented on August 15, 2024

I ended up looking into this despite knowing very little about Xenforo and SQL. I managed to figure out the following.

  1. The version of a Resource Update is stored as the column version_string in the table xf_resource_version.

  2. The API uses this internally to fetch the latest version of a Resource, filtering by the (already known) id of the latest update.

    INNER JOIN xf_resource_version rv
    ON r.current_version_id = rv.resource_version_id

So—in theory—we would be able to adapt that code into the internal function _resource_update(), using the id of the Resource Update from the request. Unfortunately, this is where I got stuck by my limited knowledge. Could we do something like this perhaps?

private function _resource_update($suffix) {
    return sprintf(
-      "SELECT r.resource_update_id, r.resource_id, r.title, r.message
+      "SELECT r.resource_update_id, r.resource_id, r.title, r.message, rv.version_string
        FROM xf_resource_update r
+          INNER JOIN xf_resource_version rv 
+              ON r.resource_id = rv.resource_id         
        WHERE r.message_state = 'visible' %s",
        $suffix
    );
}

from xenfororesourcemanagerapi.

simpleauthority avatar simpleauthority commented on August 15, 2024

Sorry again for the wait. Life can be crazy. When #66 is merged, this will be available.

from xenfororesourcemanagerapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.