• How to go to thread after reply?

    By Bruce E Stemplewski 2 decades ago

    I am posting a reply to a thread to domBulletin using the WebBoard display mode. Once posted I get taken back to the list of threads rather than the thread to which the reply was posted.



    Is there any way to get taken back to the thread? I would think taking them to the list of threads could be very confusing for the user.

    • not an out of the box feature...

      By Michael Bourak 2 decades ago

      but could be implemented.

      • By Bruce E Stemplewski 2 decades ago

        What do we need to do to have this done?



        Is there something I can patch right now?

        • this is how I do it

          By Craig Vertigan 2 decades ago

          In the WebQuerySave I add an extra macro to run

          @Command([ToolsRunMacro]; "(ResponseRedirect)");



          Then in that agent I have this code:



          Sub Initialize

          %REM

          Work out where to direct the user and print the url

          If the topic has more than 30 replies we need to send them to the correct page rather than just the first one

          To do that we need to calculate how many responses there are and use ?OpenView&Start=1.29 or 1.59 etc

          %END REM

          <br/>
          Dim s As New NotesSession<br/>
          Dim col As NotesDocumentCollection<br/>
          Dim  response As NotesDocument<br/>
          Dim catDoc As NotesDocument<br/>
          Dim view As NotesView<br/>
          Dim start As Integer<br/>
          Dim responseNum As Integer<br/>
          Dim startText As String<br/>
          <br/>
          Dim createDate As Variant 'test var<br/>
          <br/>
          start = 1<br/>
          responseNum = 0<br/>
          startText = &quot;&quot;<br/>
          <br/>
          Set db=s.CurrentDatabase<br/>
          Set ctx = s.DocumentContext<br/>
          Set profile = db.GetProfileDocument(&quot;Configuration_Profile&quot;)<br/>
          Set view = db.GetView(&quot;(LookupCategories)&quot;)<br/>
          Set catDoc = view.GetDocumentByKey(ctx.Category1(0))<br/>
          <br/>
          Set doc=db.GetDocumentByUNID(ctx.GetItemValue(&quot;MainUNID&quot;)(0)) 'Main Topic - parent document<br/>
          If Not doc Is Nothing Then<br/>
              Set col = doc.Responses<br/>
              Call col.AddDocument(doc)<br/>
              <br/>
              If ctx.IsNewNote Then<br/>
              ' now set the start number<br/>
                  If col.Count =&gt; 30 Then<br/>
                      start = Fix((col.Count + 1)/ 30)<br/>
                      start = start * 30 - 1<br/>
                      startText = &quot;&amp;Start=1.&quot; &amp; start<br/>
                  End If<br/>
              Else<br/>
                  <br/>
                  'it was edited so go back to this post within the view<br/>
                  'need to find which number post this is in the collection (only if it's more than one page ie 30 docs)<br/>
                  If col.Count &gt; 30 Then<br/>
                      Set response = col.GetFirstDocument<br/>
                      While Not response Is Nothing<br/>
                          responseNum = responseNum + 1<br/>
                          createDate = response.Created<br/>
                          If response.UniversalID = ctx.UniversalID Then<br/>
                              'now we've found the current doc in the collection<br/>
                              If responseNum &gt; 30 Then<br/>
                                  start = responseNum/ 30<br/>
                                  start = start * 30 -1<br/>
                                  startText = &quot;&amp;Start=1.&quot; &amp; start<br/>
                              End If<br/>
                              Set response = Nothing<br/>
                          Else<br/>
                              Set response = col.GetNextDocument(response)<br/>
                          End If<br/>
                      Wend<br/>
                  End If<br/>
                  <br/>
              End If<br/>
          Else<br/>
              Print &quot;[&quot; &amp; profile.NewsletterServerURL(0) &amp; &quot;/&quot; &amp; Replace(db.FilePath,&quot;\&quot;,&quot;/&quot;) &amp; &quot;/WebBoardMainActiveCategorized?OpenView&amp;RestrictToCategory=&quot; &amp; ctx.Category1(0) &amp; &quot;]&quot;<br/>
              Exit Sub<br/>
          End If<br/>
          <br/>
          If Not catDoc Is Nothing And catDoc.UseApprovalWorkflow(0) = &quot;Y&quot; And ctx.Published(0) = &quot;N&quot; Then<br/>
              Print {&lt;html&gt;&lt;head&gt;&lt;meta http-equiv=&quot;refresh&quot; content=&quot;3;URL=}&amp; profile.NewsletterServerURL(0) &amp; &quot;/&quot; &amp; Replace(db.FilePath,&quot;\&quot;,&quot;/&quot;) &amp; &quot;/WebBoardSub?OpenView&quot; &amp; startText &amp; &quot;&amp;RestrictToCategory=&quot; &amp; doc.UniversalID &amp; &quot;#bottom&quot; &amp;{&quot;&gt;&lt;/head&gt;&lt;body&gt;&lt;h3&gt;Thank you for posting to the forum.&lt;/h3&gt;Please note that there may be a delay before your post appears on the site as it is being moderated.&lt;/body&gt;}<br/>
          Else<br/>
              Print &quot;[&quot; &amp; profile.NewsletterServerURL(0) &amp; &quot;/&quot; &amp; Replace(db.FilePath,&quot;\&quot;,&quot;/&quot;) &amp; &quot;/WebBoardSub?OpenView&quot; &amp; startText &amp; &quot;&amp;RestrictToCategory=&quot; &amp; doc.UniversalID &amp; &quot;#&quot; &amp; ctx.UniversalID &quot;]&quot;<br/>
          End If<br/>
          <br/>
          

          End Sub