Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-20-2005, 09:34 AM
ChrisBaktis ChrisBaktis is offline
 
Join Date: Mar 2004
Location: CT
Posts: 409
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default USER/CP Type Page

Im creating a Trade Center for my users based on the USER/CP area...

When you go into the USER/CP area now it shows all subscribed threads...I would like to replace this (in the trade center) to show the results of a search. I have a link that when you click it it will show all a users threads in a certain forum. I would like this list to display instead of subscribed threads. I dont know how to generate the results of this search without actually clicking a link.

Any help?

Anyone?
Reply With Quote
  #2  
Old 02-21-2005, 02:51 AM
Mark Wing Mark Wing is offline
 
Join Date: Oct 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Chris,

I assume you don't want to get away from subscribing to threads?

Here is how I would attack this: Modify usercp.php and change the subscribed thread query so it return what you need.

Find this:

Code:
// query thread ids
$getthreads = $DB_site->query("
	SELECT thread.threadid, thread.forumid
	FROM " . TABLE_PREFIX . "thread AS thread, " . TABLE_PREFIX . "subscribethread AS subscribethread
	LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(deletionlog.primaryid = thread.threadid AND type = 'thread')
	WHERE subscribethread.threadid = thread.threadid
	AND subscribethread.userid = $bbuserinfo[userid]
	AND thread.visible = 1
	AND lastpost > $bbuserinfo[lastvisit]
	AND deletionlog.primaryid IS NULL
");
and change it to something like this:

Code:
// query thread ids
$getthreads = $DB_site->query("
	SELECT distinct(thread.threadid), thread.forumid
	FROM " . TABLE_PREFIX . "thread AS thread,
                " . TABLE_PREFIX . "post AS post
        WHERE thread.forumid = 36
        AND thread.threadid = post.threadid 
        AND post.userid = $bbuserinfo[userid]
	AND thread.visible = 1
        ORDER BY thread.threadid
");
While I didn't actually test this out, the stuff you want should appear in place of subscribed threads. Finally, modify the USERCP template so that the title says what ever you want and not "Subscribed Threads."

I hope this helps. If you have questions, drop me an e-mail.

Mark
Reply With Quote
  #3  
Old 02-21-2005, 01:19 PM
ChrisBaktis ChrisBaktis is offline
 
Join Date: Mar 2004
Location: CT
Posts: 409
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mark,

Thanks for the help...Just a couple quick things maybe you can help with. This is the one part of vBulletin that I am still learning.

The change you had me do above works great. I want to run this by you so maybe I can get some additional help.

If I post a trade I want to make sure that if the person I traded with goes to his Trade Center that this post will show up. From the code above it looks like only the person who posted the thread will get it pulled. The way our members post trades is through a form that will add both traders names. Is there a way to use the above code to look throught the whole thread for the user name?

For example...If I post a trade with member 'test' and I go to the trade center, that post I just made will show up. I want member 'test' to be able to go to his trade center and see the same thread since his name is in it'. Is this possible?

Also I would like to use this for 2 additional forums, exact same things, but 2 different forums. I would want the results from each forum showing up seperate.

Im going to drop you an email with info also.

Thanks again.
Reply With Quote
Reply


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 01:11 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.12139 seconds
  • Memory Usage 2,183KB
  • 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
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)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