Announcement

Collapse
No announcement yet.

Search JSON for use in a Navbar sub-menu

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Search JSON for use in a Navbar sub-menu

    I'd like to create a sub-menu Navigation Bar for finding the users started posts. When I use the Advanced Search to identify all my started posts, this is the search JSON:
    Code:
    search?searchJSON=%7B%22starter_only%22%3A1%2C%22author%22%3A%5B%22Snowhog%22%5D%2C%22channel%22%3A%5B%5D%2C%22sort%22%3A%7B%22created%22%3A%22desc%22%7D%2C%22view%22%3A%22%22%2C%22exclude_type%22%3A%5B%22vBForum_PrivateMessage%22%5D%7D&btnSubmit=
    In order for this to be useful in what I want to do, the author needs to be the variable for the user that is logged in. Reviewing https://forum.vbulletin.com/articles...he-search-json hasn't been productive for me, or I'm simply not seeing in it what I need.
    The Linux Community has given me much. I do what I can to return the favor!

    #2
    Ignore the following below. Enclosing in TAGs does prevent the issue. I had spaces accidentally included in the code above. Fixed.

    As an aside, the enclosed code illustrates a problem with space insertion of 'long words' (AdminCP > Options > Topic Display Options > Number of Characters Before Wrapping Text).

    That limitation shouldn't be imposed if the characters are enclosed in TAGS (Quote, Code, PHP, etc).
    The Linux Community has given me much. I do what I can to return the favor!

    Comment


      #3
      It cannot be done using a static search JSON alone because the author should be dynamically set to the currently logged-in user. We could probably include an onclick attribute in the navigation menu to include a Javascript code that will dynamically set the author name in the URL.

      I'll post the code when I figure it out.
      Helpful? Donate. Thanks!
      Buy me a coffeePayPal QR Code
      Fast VPS Host for vBulletin:
      A2 Hosting & IONOS

      Comment


        #4
        Here you go...

        Add "My Started Topics" navigation bar menu item that will display search results containing all the started posts of the currently logged-in user. Login to your forum. Toggle Edit Site slider to ON. Click Navigation Bar. Click New Navigation Item button. Enter Navigation Item Name (e.g. My Started Topics)
        Helpful? Donate. Thanks!
        Buy me a coffeePayPal QR Code
        Fast VPS Host for vBulletin:
        A2 Hosting & IONOS

        Comment

        Users Viewing This Page

        Collapse

        There is 1 user viewing this forum topic.

        • Guest Guest

        Latest Posts

        Collapse

        Working...
        X
        Searching...Please wait.
        An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

        Please push the back button and reload the previous window.'
        An unexpected error was returned: 'Your submission could not be processed because the token has expired.

        Please push the back button and reload the previous window.'
        An internal error has occurred and the module cannot be displayed.
        There are no results that meet this criteria.
        Search Result for "|||"