Announcement

Collapse
No announcement yet.

Help needed with JSON definition

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

  • 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?

  • #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 customization and demonstration site.
    vBulletin 5 Documentation - Updated every Friday. Report issues here.
    vBulletin 5 API - Full / Mobile
    I am not currently available for vB Messenger Chats.

    Comment


    • #3
      Originally posted by Wayne Luke View Post
      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


      • #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 customization and demonstration site.
        vBulletin 5 Documentation - Updated every Friday. Report issues here.
        vBulletin 5 API - Full / Mobile
        I am not currently available for vB Messenger Chats.

        Comment


        • #5
          Originally posted by Wayne Luke View Post
          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


          • #6
            Change topicage to from.

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

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud customization and demonstration site.
            vBulletin 5 Documentation - Updated every Friday. Report issues here.
            vBulletin 5 API - Full / Mobile
            I am not currently available for vB Messenger Chats.

            Comment

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