Help needed with JSON definition

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ssfnl
    Member
    • Jun 2017
    • 34
    • 5.6.3

    Help needed with JSON definition

    On our forum, there is a News section on the FP. What I would like to do is set a maximum of 10 news items in that module, including a restriction for the age of a topic of 14 days. This is what I use:

    Code:
    {"starter_only":1,"date":{"topicage":"14"},"type":["vBForum_Event","vBForum_Gallery","vBForum_Link","vBForum_Photo","vBForum_Poll","vBForum_Text","vBForum_Video"],"channel":["48","71","46"],"sort":{"created":"desc"},"view":"topic","exclude_type":["vBForum_PrivateMessage"]}
    The issue however is that the module still shows topics which are older than 14 days. I must be doing something wrong. Can aynone help me out here?
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 73976

    #2
    When you edit the search module, you would insert the number of results in the "Number of Results" field. This should be available even if you're using the Advanced JSON editor.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    • ssfnl
      Member
      • Jun 2017
      • 34
      • 5.6.3

      #3
      Originally posted by Wayne Luke
      When you edit the search module, you would insert the number of results in the "Number of Results" field. This should be available even if you're using the Advanced JSON editor.
      Sorry, I have been absent for a while.

      thanks for your asnwer. the issue is however not with the number of results, but with the age, as described in my first post.

      Comment

      • Wayne Luke
        vBulletin Technical Support Lead
        • Aug 2000
        • 73976

        #4
        So the only issue is the number of results?

        In a search module, you can limit the number of initial results within the module options.

        I don't know of a way to limit the results from a direct JSON query from the browser's address bar.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment

        • ssfnl
          Member
          • Jun 2017
          • 34
          • 5.6.3

          #5
          Originally posted by Wayne Luke
          So the only issue is the number of results?

          In a search module, you can limit the number of initial results within the module options.

          I don't know of a way to limit the results from a direct JSON query from the browser's address bar.
          No. The number of results is NOT the issue.

          The issue is the AGE of the topics.

          I put {"topicage":"14"} in the query, but older topics keep coming up.

          Comment

          • Wayne Luke
            vBulletin Technical Support Lead
            • Aug 2000
            • 73976

            #6
            Change topicage to from.

            "date":{"from":"14"}
            Last edited by Wayne Luke; Sat 1 Jun '19, 11:13am.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...