The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Show only starter's posts
Hi chaps
Does anyone know what code to use so as to just show the original thread starters posts in a thread. This has been specifically asked for by user's and would appear in the thread tools dropdown. I have seen it done on another forum, but it is the code etc that I would actually place into the template so to speak. Here is the sort of code off a forum that uses it. PHP Code:
|
#2
|
|||
|
|||
You could make a plugin using hook showthread_query_postids and this code:
Code:
if ($_REQUEST['do'] == 'filter') { $hook_query_where .= ' AND post.userid = ' . $thread['postuserid'] . ' '; } I tried it but didn't do a lot of testing or anything. |
#3
|
|||
|
|||
Quote:
What else would I need to do to implement this? |
#4
|
|||
|
|||
Well I guess in template SHOWTHREAD you could search for 'thread tools menu' and then add something like this:
Code:
<tr> <td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/filter.gif" alt="Show only Starters Posts" /><a href="showthread.php?t=$threadid&do=filter" rel="nofollow">Show only Starters Posts</a></td> </tr> Of course you want to add it in the right place (inside the table def and in between existing rows or after the last one). Also, the code above assumes you've put a filter icon image in your style button directory. You could also make a phrase for the text instead of coding it in the template if you wanted. BTW, this will display the thread with just the thread starter's posts, but it won't 'remember' that setting - once you click on something else you'll be back to seeing all the posts. |
#5
|
|||
|
|||
Quote:
Thanks a lot. :up: --------------- Added [DATE]1302655764[/DATE] at [TIME]1302655764[/TIME] --------------- Doh! Members are now moaning that on page 2 of a multi page thread, it has reverted back to standard behaviour. Any ideas of how this could be thread wise? As in all pages? |
#6
|
||||
|
||||
Is this possible on VB4? doesnt seem to work probably different coding now from thos
|
#7
|
|||
|
|||
Quote:
Code:
if ($_REQUEST['do'] == 'filter') { $hook_query_where .= ' AND post.userid = ' . $thread['postuserid']; $highlightwords .= '&do=filter'; } That seems to make the page controls work OK but there's probably something else that won't work... I don't know, I'm planning to set up a vb4 test site soon so maybe I'll take a look (if no one else answers by then). |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|