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 11-27-2001, 05:07 AM
SgtSling SgtSling is offline
 
Join Date: Oct 2001
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

?
Anyone know how this is done for 2.21?
Reply With Quote
  #2  
Old 11-28-2001, 11:41 PM
nafae's Avatar
nafae nafae is offline
 
Join Date: Nov 2001
Posts: 240
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i wish i did, thats a good feature
Reply With Quote
  #3  
Old 11-29-2001, 12:48 AM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's cake.

in member.php find:

PHP Code:
 $userinfo[avatarurl]=getavatarurl($userinfo[userid]);
  if (
$userinfo[avatarurl]=="") {
    
$userinfo[avatarurl]="images/clear.gif";
  } 
add after:
PHP Code:

$postsArray
$DB_site->query("Select threadid, title from thread where  postuserid='$userid ORDER BY threadid LIMIT 10'");
if (!
$postsArray)
     
$recentPosts "none";
else {
 while (
$getRecentPosts=$DB_site->fetch_array($postsArray)) {
       
$recentPosts .="<a href='$bburl/showthread.php?threadid=" $getRecentPosts[threadid] ."'>$getRecentPosts[title]</a><br>\n";
  }

Then, simply add the $recentPosts variable in your getinfo template. Formatting is up to you.



NOTE: Check the variables and formatting very carefully. I modified something similar that I did on the fly and have not tested this exact code.
Reply With Quote
  #4  
Old 12-01-2001, 04:26 AM
SgtSling SgtSling is offline
 
Join Date: Oct 2001
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this appeared to work.. but for some reason it listed 100 posts.. instead of ten

Also the sort by call

For some reason it posted all the threads started by this user, instead of the last 10 posts

Can you look at this some more?
Thanks
Reply With Quote
  #5  
Old 12-01-2001, 02:06 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OOPS. I read it wrong. I thought you wanted the last 10 threads. Posts are:

Code:
Select threadid, title from post where  userid='$userid' ORDER BY postid DESC LIMIT 10'

Amy
Reply With Quote
  #6  
Old 12-01-2001, 04:05 PM
SgtSling SgtSling is offline
 
Join Date: Oct 2001
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tired that a few times.. and this is what I got

Database error in vBulletin 2.2.1:

Invalid SQL: Select threadid, title from post where userid='2462' ORDER BY postid DESC LIMIT 10'
mysql error: You have an error in your SQL syntax near ''' at line 1

mysql error number: 1064

Date: Saturday 01st of December 2001 01:03:03 PM
Script: http://www.dlrarmy.com/forums/forums...fo&userid=2462
Referer: http://www.dlrarmy.com/forums/index.php?



I am using this code

PHP Code:
 $postsArray$DB_site->query("Select threadid, title from post where  userid='$userid' ORDER BY postid DESC LIMIT 10'");
if (!
$postsArray)
     
$recentPosts "none";
else {
 while (
$getRecentPosts=$DB_site->fetch_array($postsArray)) {
       
$recentPosts .="<a href='$bburl/showthread.php?threadid=" $getRecentPosts[threadid] ."'>$getRecentPosts[title]</a><br>\n";
  }

Reply With Quote
  #7  
Old 12-01-2001, 04:22 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Let me get back to you on this one. The version of my board didn't have to worry about viewing permissions, etc. because I restricted it to a given set of forums.

Amy
Reply With Quote
  #8  
Old 12-01-2001, 04:49 PM
SgtSling SgtSling is offline
 
Join Date: Oct 2001
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks!

Please do!
Reply With Quote
  #9  
Old 12-01-2001, 05:59 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=32852" target="_blank">https://vborg.vbsupport.ru/showt...threadid=32852</a>
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 09:43 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.04107 seconds
  • Memory Usage 2,248KB
  • Queries Executed 11 (?)
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
  • (3)bbcode_php
  • (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_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