vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   USER/CP Type Page (https://vborg.vbsupport.ru/showthread.php?t=76675)

ChrisBaktis 02-20-2005 09:34 AM

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?

Mark Wing 02-21-2005 02:51 AM

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

ChrisBaktis 02-21-2005 01:19 PM

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.


All times are GMT. The time now is 01:46 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.01000 seconds
  • Memory Usage 1,716KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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