vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Show Only Selected User's Posts (https://vborg.vbsupport.ru/showthread.php?t=116895)

Parker Clack 05-27-2006 10:00 PM

Show Only Selected User's Posts
 
Description and Usage

This feature allows you to view all posts made by a user in a single thread. This feature is accessed by clicking on the any reply number in a thread listing on the fourmdisplay page. The Who Posted popup will be displayed. Click on the Posts number associated with the username and you will be shown only those posts by that username in a particular thread.

I am using version 3.5.4 and it works well with it.

Download the .zip file and follow the installation instructions.

rmxs 05-28-2006 05:32 AM

First post :)

Thanks i need this !!!

Ajavas 05-28-2006 08:16 AM

Installed and it works fine on 3.5.4 :bunny:

Parker Clack 05-28-2006 04:27 PM

Glad to hear it is working. My members were really wanting this as we had it with version 2.xx. Gaming Force did all the original code I was just able to figure out how to port it over to 3.5.4.

Parker

Parker Clack 05-28-2006 09:28 PM

I have found a problem in that if a member has several posts in a thread and the number of posts exceeds the max thread view and you go to the next page via the pagenav you will get everyone else in the thread too.

So it will only display the first page of the posts by a particular user.

Anyone have any ideas on how write this to show only the posts by the user over each page you go to? The earliest version of this hack was written by bira for 2.xx and they was written as a separate .php file outside of the showthread page.

Paul M 05-28-2006 09:33 PM

Those edits to showthread.php should not be necessary - you can alter the sql via plugins. :)

Parker Clack 05-29-2006 02:28 PM

Paul:

I am not a coder and would appreciate your input into how alter the sql via plugins. Also, if you could look over the sql so that when you click on a number in the Who Posted popup so if the posts are a large number that all of the posts by that member are the only ones that are shown with each page via the pagnav I would appreciate it. Right now it only shows you their posts up to the threadmax limit.

Thanks

Parker Clack 05-30-2006 02:30 PM

I have updated the .zip to inlcude the following. I have added another change to the showthread.php file.

In showthread.php look for

Code:

DEVDEBUG("First Post: $FIRSTPOSTID; Last Post: $LASTPOSTID");

        $pagenav = construct_page_nav($vbulletin->GPC['pagenumber'], $perpage, $totalposts, "showthread.php?" . $vbulletin->session->vars['sessionurl'] . "t=$threadid", ""
                . (!empty($vbulletin->GPC['perpage']) ? "&pp=$perpage" : "")
                . "$highlightwords"
        );

and change this to

Code:

        DEVDEBUG("First Post: $FIRSTPOSTID; Last Post: $LASTPOSTID");

          $onlybyuserid == $post['userid'];
       
          if ($onlybyuserid != 0) {

        $pagenav = construct_page_nav($vbulletin->GPC['pagenumber'], $perpage, $totalposts, "showthread.php?" . $vbulletin->session->vars['sessionurl'] . "t=$threadid&onlybyuserid=$onlybyuserid", ""
                . (!empty($vbulletin->GPC['perpage']) ? "&pp=$perpage" : "")
                . "$highlightwords"
        );
        } else {
       
        $pagenav = construct_page_nav($vbulletin->GPC['pagenumber'], $perpage, $totalposts, "showthread.php?" . $vbulletin->session->vars['sessionurl'] . "t=$threadid", ""
                . (!empty($vbulletin->GPC['perpage']) ? "&pp=$perpage" : "")
                . "$highlightwords"
        );
        }

If anyone can write this as the other changes I have to showthread.php as a plugin I would appreciate it.

Thanks,
Parker

Bigblah 07-15-2006 10:08 AM

Hey there, I'm a new admin on Gamingforce (whose head admin did the original code for this mod, apparently), and I came across this thread while looking to *ahem* re-implement this feature on our forums -- so thanks for your work on the port :)

I'm using the hook location showthread_query_postids instead of showthread_post_start, and the plugin code is as follows:
PHP Code:

$onlybyuserid trim($_GET['onlybyuserid']);
$onlybyuserid = ($onlybyuserid 1); // Security
$onlybyuserid = ($onlybyuserid 1); // Security
if ($onlybyuserid 0) {
    
$hook_query_where "AND post.userid = '$onlybyuserid'";
    
$highlightwords .= "&onlybyuserid=$onlybyuserid";


With this, no changes to showthread.php are needed. And yes, I'm hijacking the $highlightwords variable :)

Tested it and it seems to work fine. This is my first time working with hooks and plugins, so please bear with me if there are any mistakes.

Parker Clack 07-15-2006 11:41 AM

Bigblah:

Works great. Thanks.

I will modify my .zip file.


All times are GMT. The time now is 06:23 AM.

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.01553 seconds
  • Memory Usage 1,734KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete