Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 12-01-2008, 07:35 AM
Marcus_Fenix Marcus_Fenix is offline
 
Join Date: May 2008
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Different way to display posts of a user

Hi,

I want to tweak a call to search.php, so it does something similar as "search.php?do=finduser&u=[insert_userid]", but it doesn't display a list of posts of that user, but a list of the threads the user has replied in ( Quite similar to the list that you get when using search.php?do=getnew and ordered by the date of the last reply (of any user) in that thread )

Is that even possible with a different call to search.php?
If it's not, is there a plug-in that implements this "my active threads"-feature?
Reply With Quote
  #2  
Old 12-01-2008, 02:37 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you look at the Advanced Search page you'll see a checkbox for whether you want the results returned as Thread or Posts:
HTML Code:
<fieldset class="fieldset">
				<legend>Show Results as</legend>
				<div style="padding:3px">
					<label for="rb_showposts_0"><input type="radio" name="showposts" value="0" id="rb_showposts_0" checked="checked" />Threads</label>
					<label for="rb_showposts_1"><input type="radio" name="showposts" value="1" id="rb_showposts_1"  />Posts</label>
				</div>
			</fieldset>
So, it looks like the variable you want is "showposts" and you want to set it to "0"
Reply With Quote
  #3  
Old 12-02-2008, 09:16 AM
Marcus_Fenix Marcus_Fenix is offline
 
Join Date: May 2008
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, that is a clue in the right direction

How do I incorporate this showposts in an url? So I want something like this, but not exactly this, because this example doesn't work:
/search.php?do=finduser&u=1095&showposts=0
Reply With Quote
  #4  
Old 12-02-2008, 02:43 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It doesn't look like that is a valid parameter for finduser (look around line 3468 in search.php). If you look at the Advanced Search page, you'll see that you can do what you want, you just don't use finduser as the 'do' variable. Take a look at the form and see if you can figure it out. If not, post back and I'll take a look at it.
Reply With Quote
  #5  
Old 12-08-2008, 01:11 PM
Marcus_Fenix Marcus_Fenix is offline
 
Join Date: May 2008
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for your help Lynne. You're probably a good teacher, because you pointed me in the right direction, without giving me the answer immediately

Code:
<form name="MyAT" method="post" action="search.php?do=process">
	<input type="hidden" value="process" name="do"/>
	<input type="hidden" value="1" name="quicksearch"/>
	<input type="hidden" value="1" name="childforums"/>
	<input type="hidden" value="1" name="exactname"/>
	<input type="hidden" value="" name="s"/>
	<input type="hidden" value="0" name="showposts" />
	<input type="hidden" value="$bbuserinfo[securitytoken]" name="securitytoken"/>
	<input type="hidden" value="$bbuserinfo[username]" name="searchuser" />
	<input class="button" type="submit" value="My Active Topics"/>
</form>
Now I just need to change the button into a textlink with javascript
Reply With Quote
  #6  
Old 12-08-2008, 02:36 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So you got it to work? All right!
Reply With Quote
  #7  
Old 12-11-2008, 06:47 AM
Marcus_Fenix Marcus_Fenix is offline
 
Join Date: May 2008
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
So you got it to work? All right!
Yup, it works! And the users like it.... but it saves (it has some sort of searchcache?) the query and doesn't update real-time. Is there any way to turn this off for this search?
Reply With Quote
  #8  
Old 12-11-2008, 03:03 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm, I do know that search looks to see if the query has already been performed recently - see the code around line 440. So, if you have 'nocache' set to true, it will not do that. I'm not sure if that is something you can set in your form as a hidden input? It might be worth a try.
Reply With Quote
  #9  
Old 12-15-2008, 07:32 AM
Marcus_Fenix Marcus_Fenix is offline
 
Join Date: May 2008
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works! You're my new internethero
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:59 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.06195 seconds
  • Memory Usage 2,242KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete