Resource icon

Find Your Posts in a Thread (unsupported)

Matthew Hawley

Well-known member
yolulz submitted a new resource:

Find Your Posts in a Thread (version 1.0) - quick and easy way to find all your posts in one thread

This is a quick and easy way to find all your posts in one thread.

1. Go to the thread_view template.

Find:
Code:
<xen:if is="{$canWatchThread}">
            <a href="{xen:link 'threads/watch-confirm', $thread}" class="OverlayTrigger" data-cacheOverlay="false">{xen:if $thread.thread_is_watched, '{xen:phrase unwatch_thread}', '{xen:phrase watch_thread}'}</a>
        </xen:if>

Add above:
Code:
<label><a href="{xen:link search/search, '', 'type=post', 'thread_id={$thread.thread_id}',...

Read more about this resource...
 
  • Like
Reactions: vVv
Very interesting. The only problem I see is that the link to see my posts appear also in the threads where I've not posted anything. Can you fix it?
 
Fantastic work on this.

As an edit to the install instructions, you should let people who don't know code how to space the add-in items. I wasn't sure if I was supposed to left-align, align with the text below, etc.. I sort of lucked into it by default.
 
Code:
<xen:if is="{$canWatchThread}">
<a href="{xen:link 'threads/watch-confirm', $thread}" class="OverlayTrigger" data-cacheOverlay="false">{xen:if $thread.thread_is_watched, '{xen:phrase unwatch_thread}', '{xen:phrase watch_thread}'}</a>
<label><a href="{xen:link search/search, '', 'type=post', 'thread_id={$thread.thread_id}', 'users={$visitor.username}'}">Your Posts</a></label>
</xen:if>
 
Code:
<xen:if is="{$canWatchThread}">
<a href="{xen:link 'threads/watch-confirm', $thread}" class="OverlayTrigger" data-cacheOverlay="false">{xen:if $thread.thread_is_watched, '{xen:phrase unwatch_thread}', '{xen:phrase watch_thread}'}</a>
<label><a href="{xen:link search/search, '', 'type=post', 'thread_id={$thread.thread_id}', 'users={$visitor.username}'}">Your Posts</a></label>
</xen:if>

;)
 
If you reply you will automatically watch it...sense you replied to this thread (assuming you didn't click watch) you will receive an update saying that I have replied to this thread.
 
Code:
<xen:if is="{$canWatchThread}">
<a href="{xen:link 'threads/watch-confirm', $thread}" class="OverlayTrigger" data-cacheOverlay="false">{xen:if $thread.thread_is_watched, '{xen:phrase unwatch_thread}', '{xen:phrase watch_thread}'}</a>
<label><a href="{xen:link search/search, '', 'type=post', 'thread_id={$thread.thread_id}', 'users={$visitor.username}'}">Your Posts</a></label>
</xen:if>
What's that?
 
If you reply you will automatically watch it...sense you replied to this thread (assuming you didn't click watch) you will receive an update saying that I have replied to this thread.

No. I replied here but not watching this thread. I don't get alerts about this thread at all.
 

Forget about my preevious post that I've deleted. I'm not able to apply this patch using TMS. I've searched for

Code:
<xen:if is="{$canWatchThread}">
            <a href="{xen:link 'threads/watch-confirm', $thread}" class="OverlayTrigger" data-cacheOverlay="false">{xen:if $thread.thread_is_watched, '{xen:phrase unwatch_thread}', '{xen:phrase watch_thread}'}</a>
        </xen:if>

replaced with

Code:
<xen:if is="{$canWatchThread}">
<a href="{xen:link 'threads/watch-confirm', $thread}" class="OverlayTrigger" data-cacheOverlay="false">{xen:if $thread.thread_is_watched, '{xen:phrase unwatch_thread}', '{xen:phrase watch_thread}'}</a>
<label><a href="{xen:link search/search, '', 'type=post', 'thread_id={$thread.thread_id}', 'users={$visitor.username}'}">I miei Post </a></label>
</xen:if>

in thread_view template but nothing happens. Any suggestion on how to do it correctly in TMS?

Thanks!
 
Ok I was able to make it work using TMS. Problem is that the label appear always, also on thread where I've not replied to. As you can see I've not replied to the second and third thread, for example, but the label "I miei Post" (Your post) also appear on these threads; same as before. Any suggestion?

Screenshot 2013-04-04 alle 12.44.50.webp
 
There's something I really don't understand. I've replaced the string with a little image and I've tried many times. If I enter a forum I see the image to find my post in any case, if I've posted or not. If I enter a thread I see the image at the top right also in any case, if I've posted or not. Just what I've said in the post before: I'm expecting to see the image or string only if I've posted in that thread, isn't this correct?
 
Code:
<xen:if is="{$canWatchThread}">
<label><a href="{xen:link search/search, '', 'type=post', 'thread_id={$thread.thread_id}', 'users={$visitor.username}'}">Your Posts</a></label>
</xen:if>

Use this
 
for tms do a preg_replace

search for
Code:
#<xen:if is="{\$canWatchThread}">#s

replace with
Code:
<xen:if is="{$canWatchThread}">
    <label><a href="{xen:link search/search, '', 'type=post', 'thread_id={$thread.thread_id}', 'users={$visitor.username}'}">Your Posts</a></label>

the only diff is it will put the link before the watch threads link
 
Sorry folks but no one of these method works. I really don't know why. Here's two screenshot for the two modifications. Can you please tell me what's wrong?

Screenshot 2013-04-04 alle 15.53.41.webpScreenshot 2013-04-04 alle 15.53.56.webp
 
Sorry folks but no one of these method works. I really don't know why. Here's two screenshot for the two modifications. Can you please tell me what's wrong?

I only did the 2nd edit but you have it exactly as I do. I haven't done the xen update yet. (i don't even think I did the last one.) maybe the thread_view template changed. can you post the contents of the "original template" field so I can check it?
 
Thank for your support. I've version 1.1.2 of XF and I've attached here the contents of the two templates
looks like it should work

- make sure the template mod you made is in the same style as you are browsing the forum
- that the mod is checked
- that it says its been applied 1 time

Screenshot_1.webp
 
Top Bottom