Announcement

Collapse
No announcement yet.

Why do Redirects show up in Latest Topics?

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

  • Why do Redirects show up in Latest Topics?

    It just seems sloppy or redundant. I redirected a post to another Channel. Now, in Latest Topics, I have both the post in its new channel, and the redirect below it....

    Click image for larger version

Name:	latesttopics.jpg
Views:	22
Size:	39.8 KB
ID:	4398743

  • #2
    https://www.vbulletin.com/forum/foru...ation-redirect

    Comment


    • #3
      You can hide them via CSS. There's a unique CSS class for items with redirects. I don't know it off the top of my head so I'd have to see the page to be able to suggest any code.

      GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

      Comment


      • In Omnibus
        In Omnibus commented
        Editing a comment
        It's in the link I posted above. You placed it there.

      • Glenn Vergara
        Glenn Vergara commented
        Editing a comment
        The code I posted in that thread is for removing the default checked state of the Redirect checkbox to prevent the redirect. The solution I was thinking here is for hiding the existing redirects in the list. I think Stephen doesn't want to remove the actual redirect itself. He just wanted to not show the topics with redirects in the list of topics

    • #4
      @Omnibus: I want the redirect inside the forum where the person originally posted it. I don't want the redirect in the Latest Topics list. It's not a Topic, really. In my understanding, these are not separate. Yes I checked [x] Redirect. I want the expiring redirect inside the forum, not in the latest topics list where it makes no sense, since the actual post is right above it.

      @Glenn: thanks for the suggestion, you are correct. By using the widget_id it only hides it in the Latest Topics list, and not in the forum where the redirect is:

      Code:
      /* hide redirects in the latest topics list */
      #widget_7 .topic-item.read.redirect.expiring-redirect.js-topic-item {
          display: none;
      }
      Edit: not quite perfect, but better than nothing. It does remove a topic, so if you have it set to show the 6 latest topics, you will only have 5.

      Comment


      • In Omnibus
        In Omnibus commented
        Editing a comment
        My fault. I thought you were trying to remove the redirect entirely.

    • #5
      Your CSS selector is too specific that some redirects might still show.

      Change it to:
      Code:
      #widget_7 .topic-item.redirect {
          display: none;
      }

      GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

      Comment


      • StephenKay
        StephenKay commented
        Editing a comment
        Thanks! Will do. I only ever use expiring redirects but why not hit 'em all.

    • #6
      You can tell the system to ignore redirects in the search JSON.

      Code:
      'exclude_type':['vBForum_PrivateMessage','vBForum_VisitorMessage','vBForum_Report','vBForum_Redirect']}
      This is the html encoded link that I use for new topics on this site:
      Code:
      https://www.vbulletin.com/forum/search?searchJSON={%22date%22:{%22from%22:%22lastMonth%22},%22view%22:%22topic%22,%22sort%22:{%22lastcontent%22:%22desc%22},%22exclude%22:[38],%22exclude_type%22:[%22vBForum_PrivateMessage%22,%22vBForum_VisitorMessage%22,%22vBForum_Report%22,%22vBForum_Redirect%22]}
      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


      • #7
        Thank you Wayne, that does indeed work. And I still get 6 topics in the list. Wow, this s**t is deep.

        Comment


        • #8
          Wayne Luke
          I spoke too soon, or I'm doing something wrong. VB 5.4.3.

          I edited the Activity Page in Sitebuilder. I opened the Latest Topics Module, it is in Simple View. I switch to Advanced View. I edited my JSON to be:

          Code:
          {"starter_only":1,"date":{"from":"60"},"channel":["2"],"sort":{"created":"desc"},"view":"topic","exclude_type":["vBForum_PrivateMessage", "vBForum_Redirect"]}
          I save the page. I then edit the page and module later. It is back to Simple View. In my understanding since I've edited the JSON, it should stay in Advanced View. But it doesn't. Now, I switch to Advanced View. My JSON Edit is not there, it is back to the default.
          Last edited by StephenKay; Sat 22nd Sep '18, 10:43am.

          Comment


          • #9
            Originally posted by Glenn Vergara View Post
            Your CSS selector is too specific that some redirects might still show.

            Change it to:
            Code:
            #widget_7 .topic-item.redirect {
            display: none;
            }
            I tried this on our site Glenn, but it does not seem to work. We are on Cloud so I added it to the additional CSS. What have I done wrong?
            __________________________________________
            We don't stop playing because we grow old;
            we grow old because we stop playing.
            GBS

            Comment


            • MrsTiggywinkle
              MrsTiggywinkle commented
              Editing a comment
              Thanks so much Glenn, found it and it's working.

              One more question please, I would also like to add the "todays posts" as well as the "new posts" widget id, how would I add another widget id to the code? Or should I just add another copy of the code with a different id?

            • Glenn Vergara
              Glenn Vergara commented
              Editing a comment
              Add them and separate with comma. The last item should have no comma.
              Code:
              #widget_7 .topic-item.redirect,
              #widget_xxxx .topic-item.redirect,
              #widget_yyyy .topic-item.redirect {
                  display: none;
              }

            • MrsTiggywinkle
              MrsTiggywinkle commented
              Editing a comment
              Thanks Glenn. However, "Today's Posts" (all posts including ones you have read) and "New Topics" (only those you haven't read) seem to have the same widget id. It works for Today's posts, which is the main thing but the redirect still shows in New Topics.

              It's not a problem, most of our members use Today's Posts so it's fine.

          • #10
            Wayne, I think my question to you up above got lost in the side discussions.

            I implemented your suggestion for editing the JSON in the Latest Topics Module to exclude redirects, by setting the module to Advanced Editor and editing the JSON. Closed and saved the page. So far, so good - it works an the reirects are excluded.

            But if I go to Edit the Module again, it has switched back to Simple View. If I've edited the JSON, shouldn't it stay in Advanced View? And then, if I click on Advanced view, the JSON edits I made are not there. If I don't edit anything and cancel out, the redirects are still being hidden. Is this a bug? This would seem to mean that if I want to edit anything else in that module, I would have to edit the JSON each time...

            Comment


            • #11
              It would be a bug. I don't know what would be causing that though. We would need a copy of the database to investigate.
              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


              • #12
                Originally posted by Wayne Luke View Post
                It would be a bug. I don't know what would be causing that though. We would need a copy of the database to investigate.
                OK, and how do I provide that?

                Comment


                • #13
                  Through a support ticket. You would have to create a backup of your database, zip it up, upload it to your favorite cloud sharing site and then create a support ticket with the URL of the file so we can download it.

                  https://webcheatsheet.com/sql/mysql_backup_restore.php
                  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


                  • #14
                    I made a support ticket and provided the database.

                    Comment

                    Related Topics

                    Collapse

                    Working...
                    X