vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   List of threads a member has started (https://vborg.vbsupport.ru/showthread.php?t=42801)

Grendel 08-28-2002 08:40 AM

Code:

if ($action=="showthread") {
extract ($GLOBALS);
        $users_t=$DB_site->query("SELECT threadid, title,postusername, dateline FROM thread WHERE postuserid=".$postuserid." AND forumid=X AND visible=1");
        while ($users_threads=$DB_site->fetch_array($users_t)) {
          $post[specialthreads].="<a href=\"showthread.php?s=".$session[sessionhash]."&thread=".$users_threads[threadid].'">'.$users_threads[title].'</a> ('.vbdate($dateformat,$users_threads[dateline]).')<br>';
$postusername=$users_threads[postusername]
        }
if (!$post[specialthreads]) {$post[specialthreads]='N/A';}       
  eval("dooutput(\"".gettemplate("usersthreads")."\");");
exit;
}

Code:

if ($action=="showthread") {
  include("./global.php");
extract ($GLOBALS);
        $users_t=$DB_site->query("SELECT threadid, title,postusername, dateline FROM thread WHERE postuserid=".$postuserid." AND forumid=X AND visible=1");
        while ($users_threads=$DB_site->fetch_array($users_t)) {
          $post[specialthreads].="<a href=\"showthread.php?s=".$session[sessionhash]."&thread=".$users_threads[threadid].'">'.$users_threads[title].'</a> ('.vbdate($dateformat,$users_threads[dateline]).')<br>';
$postusername=$users_threads[postusername];
        }
if (!$post[specialthreads]) {$post[specialthreads]='N/A';}       
  eval("dooutput(\"".gettemplate("usersthreads")."\");");
exit;
}

Works fine!
Now only the categories are missing. And then it's done and perfect and a great and useful hack!

Thank you very much again!

Logician 08-28-2002 08:44 AM

what do you mean by categories?

Grendel 08-28-2002 08:47 AM

And
Code:

<a href=\"showthread.php?s=".$session[sessionhash]."&thread=".$users_threads[threadid].'">
must be
Code:

<a href=\"showthread.php?s=".$session[sessionhash]."&threadid=".$users_threads[threadid].'">

Grendel 08-28-2002 08:48 AM

Sorry, not Categories. I mean the forums, where that posting is in.

Grendel 08-28-2002 09:05 AM

If one has no stories in the list, the username is not available too - could this be fixed?

Oh, I added this:

Code:

AND visible=1 AND sticky=0");
So, all sticky-threads (mostly info-threads of mods and admins) are not listed.

Grendel 08-30-2002 06:36 AM

Is it possible to show the forums where that posting is in? Would be great.

Logician 08-30-2002 07:44 AM

Use:

PHP Code:

if ($action=="showthread") {
extract ($GLOBALS);
        
$users_t=$DB_site->query("SELECT thread.threadid, thread.title,thread.postusername, thread.dateline, forum.title as forumtitle FROM thread LEFT JOIN forum ON forum.forumid=thread.forumid WHERE thread.postuserid=".$postuserid." AND thread.forumid=X AND thread.visible=1");
        while (
$users_threads=$DB_site->fetch_array($users_t)) {
          
$post[specialthreads].="<a href=\"showthread.php?s=".$session[sessionhash]."&thread=".$users_threads[threadid].'">'.$users_threads[title].'</a> ('.vbdate($dateformat,$users_threads[dateline]).') ['.$users_threads[forumtitle].']<br>';
$postusername=$users_threads[postusername];
        }
if (!
$post[specialthreads]) 
{
$post[specialthreads]='N/A';


if (!
$postusername
{
$users_t2=$DB_site->query_first("SELECT username FROM user WHERE userid=$postuserid");
$postusername=$users_t2[username];
}       
  eval(
"dooutput(\"".gettemplate("usersthreads")."\");");
exit;



Grendel 08-30-2002 11:19 AM

Forums in list works, username if no postings doesn't :(

Nevertheless - thank you for your work on this!

Logician 08-30-2002 11:36 AM

edited.. try again..

Grendel 08-30-2002 12:38 PM

Hm, I don't see any change to te code before. Can you tell me, what exactly has changed?


All times are GMT. The time now is 10:21 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.02125 seconds
  • Memory Usage 1,746KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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