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 07-31-2011, 04:44 AM
koby411 koby411 is offline
 
Join Date: May 2007
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Avatar in Last Post Info bit.

I'm trying to figure out how to add the avatar of the last poster in the forumhome_lastpostby but have been unable to figure out the right phrase to get it to work.

Example:
<img src="image.php?u=$lastpostinfo[forumid]" alt="Avatar" class="post_avatar" style="float:left;margin-right:10px;"/>

I need to change [forumid] to whatever works for the user id but I've tried various things but nothing worked. Any help?

I found this: https://vborg.vbsupport.ru/showthrea...tar+lastpostby But it's for vB4 and doesn't work in vB3.
Reply With Quote
  #2  
Old 07-31-2011, 05:54 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is no userid stored in $lastpostinfo...

Here is a copy of all the info in $lastpostinfo-

Code:
[forumid] => 9
    [lastpost] => 1293022161
    [lastposter] => BirdOPrey5
    [lastthread] => my test thread
    [lastthreadid] => 56
    [lasticonid] => 0
    [threadcount] => 2
    [replycount] => 3
    [lastpostid] => 201
    [lastprefixid] => 
    [forumread] => 
    [styleid] => 0
    [title] => Test Forum Y
    [title_clean] => Test Forum Y
    [description] => This is a test forum with a description.
    [description_clean] => This is a test forum with a description.
    [options] => 89799
    [showprivate] => 0
    [displayorder] => 23
    [daysprune] => -1
    [newpostemail] => 
    [newthreademail] => 
    [parentid] => 8
    [parentlist] => 9,8,1,-1
    [password] => 
    [link] => 
    [childlist] => 9,-1
    [defaultsortfield] => lastpost
    [defaultsortorder] => desc
    [imageprefix] => 
    [excludable] => 1
    [podcast] => 0
    [depth] => 2
    [permissions]=> Array
You would need to make some plugin on a forumhome hook to find the userid given the username which is available in: $lastpostinfo[lastposter]

I did some work on this a while back and never fully finished it but I think what I have works if you want to take a look- (attached) - feel free to use it however you want.
Attached Files
File Type: zip BOP5AvataronFORUMHOME.zip (2.0 KB, 36 views)
Reply With Quote
  #3  
Old 08-03-2011, 04:01 AM
koby411 koby411 is offline
 
Join Date: May 2007
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried using that but it broke the forum and left only an error message behind. Should have probably copied the error but didn't think about it as I was trying to get it removed quickly to get the forum working again.
Reply With Quote
  #4  
Old 08-09-2011, 04:03 PM
Feanor_87's Avatar
Feanor_87 Feanor_87 is offline
 
Join Date: Mar 2009
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The Mod is working, but for Guests it says

Quote:
Fatal error: Call to undefined function fetch_avatar_url() in /home/*****/public_html/forums/includes/functions_forumlist.php(487) : eval()'d code on line 26
Anyone know how to fix that?
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 05:26 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.09233 seconds
  • Memory Usage 2,209KB
  • Queries Executed 14 (?)
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
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (1)postbit_attachment
  • (4)postbit_onlinestatus
  • (4)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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete