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

Reply
 
Thread Tools Display Modes
  #21  
Old 08-28-2002, 08:40 AM
Grendel's Avatar
Grendel Grendel is offline
 
Join Date: Jul 2002
Location: Germany
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #22  
Old 08-28-2002, 08:44 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what do you mean by categories?
Reply With Quote
  #23  
Old 08-28-2002, 08:47 AM
Grendel's Avatar
Grendel Grendel is offline
 
Join Date: Jul 2002
Location: Germany
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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].'">
Reply With Quote
  #24  
Old 08-28-2002, 08:48 AM
Grendel's Avatar
Grendel Grendel is offline
 
Join Date: Jul 2002
Location: Germany
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, not Categories. I mean the forums, where that posting is in.
Reply With Quote
  #25  
Old 08-28-2002, 09:05 AM
Grendel's Avatar
Grendel Grendel is offline
 
Join Date: Jul 2002
Location: Germany
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #26  
Old 08-30-2002, 06:36 AM
Grendel's Avatar
Grendel Grendel is offline
 
Join Date: Jul 2002
Location: Germany
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to show the forums where that posting is in? Would be great.
Reply With Quote
  #27  
Old 08-30-2002, 07:44 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;

Reply With Quote
  #28  
Old 08-30-2002, 11:19 AM
Grendel's Avatar
Grendel Grendel is offline
 
Join Date: Jul 2002
Location: Germany
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Nevertheless - thank you for your work on this!
Reply With Quote
  #29  
Old 08-30-2002, 11:36 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

edited.. try again..
Reply With Quote
  #30  
Old 08-30-2002, 12:38 PM
Grendel's Avatar
Grendel Grendel is offline
 
Join Date: Jul 2002
Location: Germany
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hm, I don't see any change to te code before. Can you tell me, what exactly has changed?
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 11:20 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.04198 seconds
  • Memory Usage 2,286KB
  • Queries Executed 12 (?)
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
  • (5)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete