vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Profile Pic in Postbit Legacy (https://vborg.vbsupport.ru/showthread.php?t=109560)

hiiped 03-05-2006 10:00 PM

Profile Pic in Postbit Legacy
 
This simple template >> postbit_legacy code change shows your profilepicture under your Username in showthread ( topics )


Time to install: 52 seconds :ninja:


log into your admin control panel , go to
StyleManager >>> Edit Templates >>>
Postbit Templates >>> Postbit Legacy >>>

search for
Code:

<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
add below

Code:

  <if condition="$show['profilepic']">
                                <img src="$userinfo[profilepicurl]" $userinfo[profilepicsize] alt="<phrase 1="$userinfo[username]">$vbphrase[xs_picture]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" />
                                </div>
                        </if>
                       
                        <div class="smallfont">
                                &nbsp;<br />

<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="image.php?u=$post[userid]&amp;type=profile&amp;dateline=$userinfo[profilepicdateline]" width="110" /> <br /></a> <br />

Optional: REMOVE THE BELOW CODE FROM THE POSTBIT_LEGACY TEMPLATE IF YOU DONT WANT THE AVATAR TO SHOW THE SAME TIME AS THE PROFILEPIC

Code:

<if condition="$show['avatar']">
                                <div class="smallfont">
                                        &nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
                                </div>
                        </if>

SAVE = DONE

updated: Profile pic is now clickable to view profile

note1: to above, you can place the code in other places if you want
note2: may also add this to regular postbit ( I just use Legacy for my test )

Known bugs

when you change your profilepic, the image does NOT change in your posts :(
maybe an EXPERIENCED coder has idea how to fix this (?)

..

hiiped 03-05-2006 10:58 PM

--- reserved for anything ---

Snoop-It 03-05-2006 11:26 PM

nice hack, what about the members Avatar? is that replaced with the profile pic? or avatar is under the profile pic...?

interesting....

Daniel 03-05-2006 11:46 PM

Nice hack, and it looks like you have an even nicer forum ;)

The Chief 03-06-2006 02:04 AM

nice hack, love this, will see if install or not ;)

Aesma Deva 03-06-2006 04:44 AM

The image doesn't change because of the dateline, $userinfo[profilepicdateline] doesn't work for it. I don't know what would be the right variable for the profile pic dateline, though...

hiiped 03-12-2006 02:44 AM

Quote:

Originally Posted by Aesma Deva
The image doesn't change because of the dateline, $userinfo[profilepicdateline] doesn't work for it....

anybody ?

moonclamp 03-22-2006 02:50 PM

Does it create a thumbnail from the profile pic or does it use the original dimensions?

Might be an idea to have an options conditional that allows you to switch between avatar or profile pic.

hiiped 03-23-2006 11:59 AM

Quote:

Originally Posted by moonclamp
Does it create a thumbnail from the profile pic or does it use the original dimensions?

Might be an idea to have an options conditional that allows you to switch between avatar or profile pic.

Im not a coder who can do all that FANCY stuff...LOL

but it does NOT create a thumbnail, its the actual profile pic rescaled, for display to whatever width you put in the code you use
my default is width="110" />
you can change the 110 to whatever size pixels best suits you .

Smiry Kin's 05-08-2006 09:10 PM

how about an option in User CP to view avatar, or Profile Picture in post bit? please?


All times are GMT. The time now is 05:14 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.01051 seconds
  • Memory Usage 1,738KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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