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-05-2011, 06:31 PM
sadiq6210 sadiq6210 is offline
 
Join Date: Sep 2005
Posts: 684
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Last post avatar

We have this mod.
https://vborg.vbsupport.ru/showthread.php?t=240021

Can you help us to display the avatar of last post in forumhome ?
something like IPB
http://community.invisionpower.com/
Reply With Quote
  #2  
Old 07-05-2011, 08:10 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sadiq6210 View Post
We have this mod.
https://vborg.vbsupport.ru/showthread.php?t=240021

Can you help us to display the avatar of last post in forumhome ?
something like IPB
http://community.invisionpower.com/
You don't need a mod for this

Edit Template: forumhome_lastpostby

Find this code (it's the very first snippet of code at the top of the template fyi):
Code:
<vb:if condition="$show['lastpostinfo']">
Add below:
Code:
<img src="{vb:raw vboptions.bburl}/image.php?{vb:raw session.sessionurl}u={vb:raw lastpostinfo.lastposterid}&amp;type=thumb&amp;quality=100" alt="Avatar" class="post_avatar" style="float:left;margin-right:10px;"/>
And save, refresh to view the users Avatar to the left of the lastpostinfo on forumhome .

Feel free to adjust the style= part or create your own custom CSS definition to replace the class etc .

If you want to add the users avatar to your CMS you can use a similar code so show the users Avatars on the CMS main for the article previews and then in the actual articles themselves too and that does not require a plugin either, I have seen these plugins but if you reference the correct variables you can do it w/o .

Edit: For RTL Language Users please use:

Code:
<img src="{vb:raw vboptions.bburl}/image.php?{vb:raw session.sessionurl}u={vb:raw lastpostinfo.lastposterid}&amp;type=thumb&amp;quality=100" alt="Avatar" class="post_avatar" style="float:<vb:if condition="$stylevar['textdirection'] == 'rtl'">right<vb:else />left</vb:if>;margin-<vb:if condition="$stylevar['textdirection'] == 'rtl'">left<vb:else />right</vb:if>:10px;"/>
Reply With Quote
  #3  
Old 07-07-2011, 08:19 AM
sadiq6210 sadiq6210 is offline
 
Join Date: Sep 2005
Posts: 684
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks brother ^_^ you are the best

I modified the template but nothing appear?

This is my template:

Code:
<vb:if condition="$show['lastpostinfo']">

<img src="{vb:raw vboptions.bburl}/image.php?{vb:raw session.sessionurl}u={vb:raw lastpostinfo.lastposterid}&amp;type=thumb&amp;quality=100" alt="Avatar" class="post_avatar" style="float:left;margin-right:10px;"/>



	<p class="lastposttitle">
	<vb:if condition="$show['icon']"><img src="{vb:raw icon.iconpath}" alt="{vb:raw icon.title}" border="0" /></vb:if>
	<vb:if condition="$lastpostinfo['prefix']">{vb:raw lastpostinfo.prefix}</vb:if>
	<a href="{vb:link thread, {vb:raw threadinfo}, {vb:raw pageinfo_newpost}}" class="threadtitle" title="{vb:rawphrase go_first_unread_in_thread_x, {vb:raw lastpostinfo.lastthread}}">{vb:raw lastpostinfo.trimthread}</a>
	<a href="{vb:link thread, {vb:raw threadinfo}, {vb:raw pageinfo_lastpost}}#post{vb:raw lastpostinfo.lastpostid}"><img src="{vb:stylevar imgdir_button}/lastpost-{vb:stylevar right}.png" alt="{vb:rawphrase go_to_last_post}" /></a>
	</p>
	<div class="lastpostby">
	<vb:if condition="$lastpostinfo['lastposterid']">
		{vb:rawphrase by_x_memberaction, {vb:raw memberaction_dropdown}}
	<vb:else />
		{vb:rawphrase by_x_guest, {vb:raw lastpostinfo.lastposter}}
	</vb:if>
	</div>
	<p class="lastpostdate">{vb:raw lastpostinfo.lastpostdate}<vb:if condition="!$show['detailedtime']">, <span class="time">{vb:raw lastpostinfo.lastposttime}</span></vb:if></p>
<vb:else />
	<span class="lastpostdate">{vb:raw lastpostinfo.lastpostdate} <vb:if condition="!$show['detailedtime']"><span class="time">{vb:raw lastpostinfo.lastposttime}</span></vb:if></span>
	<a href="{vb:link thread, {vb:raw threadinfo}, {vb:raw pageinfo_lastpost}}#post{vb:raw lastpostinfo.lastpostid}"><img src="{vb:stylevar imgdir_button}/lastpost-{vb:stylevar right}.png" alt="{vb:rawphrase go_to_last_post}" /></a>
</vb:if>

Nothing changed after refresh the page !
Appreciate your support
Reply With Quote
  #4  
Old 07-07-2011, 03:20 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sadiq6210 View Post
Thanks brother ^_^ you are the best

I modified the template but nothing appear?

This is my template:

Code:
<vb:if condition="$show['lastpostinfo']">

<img src="{vb:raw vboptions.bburl}/image.php?{vb:raw session.sessionurl}u={vb:raw lastpostinfo.lastposterid}&amp;type=thumb&amp;quality=100" alt="Avatar" class="post_avatar" style="float:left;margin-right:10px;"/>



	<p class="lastposttitle">
	<vb:if condition="$show['icon']"><img src="{vb:raw icon.iconpath}" alt="{vb:raw icon.title}" border="0" /></vb:if>
	<vb:if condition="$lastpostinfo['prefix']">{vb:raw lastpostinfo.prefix}</vb:if>
	<a href="{vb:link thread, {vb:raw threadinfo}, {vb:raw pageinfo_newpost}}" class="threadtitle" title="{vb:rawphrase go_first_unread_in_thread_x, {vb:raw lastpostinfo.lastthread}}">{vb:raw lastpostinfo.trimthread}</a>
	<a href="{vb:link thread, {vb:raw threadinfo}, {vb:raw pageinfo_lastpost}}#post{vb:raw lastpostinfo.lastpostid}"><img src="{vb:stylevar imgdir_button}/lastpost-{vb:stylevar right}.png" alt="{vb:rawphrase go_to_last_post}" /></a>
	</p>
	<div class="lastpostby">
	<vb:if condition="$lastpostinfo['lastposterid']">
		{vb:rawphrase by_x_memberaction, {vb:raw memberaction_dropdown}}
	<vb:else />
		{vb:rawphrase by_x_guest, {vb:raw lastpostinfo.lastposter}}
	</vb:if>
	</div>
	<p class="lastpostdate">{vb:raw lastpostinfo.lastpostdate}<vb:if condition="!$show['detailedtime']">, <span class="time">{vb:raw lastpostinfo.lastposttime}</span></vb:if></p>
<vb:else />
	<span class="lastpostdate">{vb:raw lastpostinfo.lastpostdate} <vb:if condition="!$show['detailedtime']"><span class="time">{vb:raw lastpostinfo.lastposttime}</span></vb:if></span>
	<a href="{vb:link thread, {vb:raw threadinfo}, {vb:raw pageinfo_lastpost}}#post{vb:raw lastpostinfo.lastpostid}"><img src="{vb:stylevar imgdir_button}/lastpost-{vb:stylevar right}.png" alt="{vb:rawphrase go_to_last_post}" /></a>
</vb:if>

Nothing changed after refresh the page !
Appreciate your support
Hmm I see it in 4.1.4 Test site just fine upon refresh... RTL Language?

If so try:

Code:
<img src="{vb:raw vboptions.bburl}/image.php?{vb:raw session.sessionurl}u={vb:raw lastpostinfo.lastposterid}&amp;type=thumb&amp;quality=100" alt="Avatar" class="post_avatar" style="float:<vb:if condition="$stylevar['textdirection'] == 'rtl'">right<vb:else />left</vb:if>;margin-<vb:if condition="$stylevar['textdirection'] == 'rtl'">left<vb:else />right</vb:if>:10px;"/>
Lemme know
Reply With Quote
  #5  
Old 07-07-2011, 05:28 PM
sadiq6210 sadiq6210 is offline
 
Join Date: Sep 2005
Posts: 684
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Strange, yes brother I am using RTL and nothing appeared in both CODES
Also, I tried to use EN-LTR and nothing appeared for both codes

Hmmm

I opened the page source in Firefox5, have a look

Code:
<div class="forumlastpost td">
			<h4 class="lastpostlabel">Last Post:</h4>

			<div>
				

<img src="http://www.domain.com/forum/image.php?u=9379&amp;type=thumb&amp;quality=100" alt="Avatar" class="post_avatar" style="float:left;margin-right:10px;"/>



	<p class="lastposttitle">
where domain.com = my domain

Even I copy the direct link for avatar:
http://www.domain.com/forum/image.ph...mp;quality=100
OR
http://www.domain.com/forum/image.php?u=9379

It is not working !

Maybe because I am using files system to save the avatars in a folder not in database?
for example, this is a link for an exist avatar
http://www.domain.com/forum/avatar/c...avatar9115.gif

Thank you very very much =)
Reply With Quote
  #6  
Old 07-09-2011, 10:58 AM
sadiq6210 sadiq6210 is offline
 
Join Date: Sep 2005
Posts: 684
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any idea? =)
Reply With Quote
  #7  
Old 07-10-2011, 02:15 AM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sadiq6210 View Post
Maybe because I am using files system to save the avatars in a folder not in database?
for example, this is a link for an exist avatar
http://www.domain.com/forum/avatar/c...avatar9115.gif
That's exactly it I'm afraid, therefor you'll need to create a plugin using the parse_templates hook location to accomplish this.
Reply With Quote
  #8  
Old 06-21-2013, 03:30 AM
K!nG K!nG is offline
 
Join Date: Dec 2010
Location: United States
Posts: 477
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey @TheLastSuperman

Can you help me in fixing ths size of the avatars ?? They all in different sizes. I would like to have them in one single size.

Please see the image & thanks in advance for ur help.

Reply With Quote
  #9  
Old 08-24-2013, 05:37 AM
yestyle yestyle is offline
 
Join Date: Oct 2011
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
<img src="{vb:raw vboptions.bburl}/image.php?{vb:raw session.sessionurl}u={vb:raw lastpostinfo.lastposterid}&amp;type=thumb&amp;qual ity=100" alt="Avatar" class="post_avatar" style="float:left;margin-right:10px;"/>
It showed avatar perfectly but in case members did not upload their avatar then It showed blank space. This very annoyed.
How to change blank space to default avatar. I really need this. Please share code
Reply With Quote
  #10  
Old 08-24-2013, 10:42 AM
peugeot405's Avatar
peugeot405 peugeot405 is offline
 
Join Date: Feb 2010
Posts: 312
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

there is a mod for vb4 that does that:

Last Poster Avatar
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 02:56 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.04534 seconds
  • Memory Usage 2,271KB
  • 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
  • (7)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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