vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   See only posts by the thread starter within a thread? (https://vborg.vbsupport.ru/showthread.php?t=273596)

ludachris 11-08-2011 02:51 PM

See only posts by the thread starter within a thread?
 
I've got a fairly unique situation here - I have a sub-forum that's used more as a journal. A thread is started and content is added over time by the original thread author. I'd like to find a way to give the members a way to view that thread and click a link and have all the replies from people that are not the original thread starter be filtered out. This way you can quickly see all the replies by the author of the thread. I know this is possible with the Search feature, and maybe I'll see about building a pre-loaded search link if there's no other way of doing it - one where you can see the full posts not just the search results. But I figured I'd ask here to see if anyone has any ideas. Maybe there's a hack out there that does something similar.

cstreater 11-15-2011 04:27 AM

1.) Open the SHOWTHREAD template & search for <-- / thread display mode -->

2.) Select the highlighted text shown in the picture below.

3.) Replace with the code below.

Note: my code actually includes an additional option to find all posts you have posted in the thread. You can remove that if you'd like by removing the entire <if condition="$show['member']"> section.


http://www.corystreater.com/screenca...21-19-05-1.png

Replace with:

Code:

<!-- **************************************************** -->

<if condition="$show['search']">

<!-- thread search menu -->
<div class="vbmenu_popup" id="threadsearch_menu" style="display:none">
<form action="search.php?do=process&amp;searchthreadid=$threadid" method="post">
        <table cellpadding="4" cellspacing="1" border="0">
        <tr>
                <td class="thead">$vbphrase[search_this_thread]<a name="goto_threadsearch"></a></td>
        </tr>

<tr>
                <td class="vbmenu_option" title="nohilite">
                        <input type="hidden" name="s" value="$session[sessionhash]" />
                        <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
                        <input type="hidden" name="do" value="process" />
                        <input type="hidden" name="searchthreadid" value="$threadid" />
                        <input type="text" class="bginput" name="query" size="25" />$gobutton<br />
                </td>
        </tr>

<tr>
<td class="vbmenu_option" title="nohilite">

<input type="hidden" name="s" value="$session[sessionhash]" />
                        <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
                        <input type="hidden" name="do" value="process" />
                        <input type="hidden" name="searchthreadid" value="$threadid" />

<a href="search.php?$session[sessionurl]searchthreadid=$threadid&amp;do=finduser&amp;u=$thread[postuserid]">Find Thread Author's Posts</a>
</td>
</tr>

<if condition="$show['member']">

<tr>
<td class="vbmenu_option" title="nohilite">

<input type="hidden" name="s" value="$session[sessionhash]" />
                        <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
                        <input type="hidden" name="do" value="process" />
                        <input type="hidden" name="searchthreadid" value="$threadid" />

<a href="search.php?$session[sessionurl]searchthreadid=$threadid&amp;do=finduser&amp;u=$bbuserinfo[userid]">Find My Posts</a>
</td>
</tr>
</if>

<tr>
<td class="vbmenu_option"><a href="search.php?$session[sessionurl]searchthreadid=$threadid">$vbphrase[advanced_search]</a>
</td>
</tr>
</table>
</form>
</div>
<!-- / thread search menu -->
</if>

<!-- **************************************************** -->


blind-eddie 11-15-2011 05:26 AM

Wow, this is an Awesome template edit!

Nice and quick Thread Authors Post search.

Thank you for sharing.

ludachris 11-15-2011 04:25 PM

I figured doing it with search results was fairly easy, but I wanted a cleaner solution - one that involved actual posts instead of search results. Click a link and view all posts inline from the thread author.


All times are GMT. The time now is 02:44 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01377 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete