Thread: Forum Display Enhancements - User Avatars In Thread Listing
View Single Post
  #2  
Old 08-16-2011, 10:32 AM
nCODE nCODE is offline
 
Join Date: Aug 2011
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OOO... this looks awesome!!

is there by chance make the avatar the status icon? like totally opaque if there's an unread post and make it 50% transparent if there's no unread post and also a nice border will be awesome...

THANKS!!

anyways, here's something from me:
for a nice border, you have to do the following

[NOTE: You can only use this if you have upgraded to the newer version: 1.01]

Go to: AdminCP --> Styles & Templates --> The "<<>>" button of your template
select Additional.css from CSS Templates and add this at the very bottom:
Code:
/**
* Avatar border by nCODE
*/
a.aw-avatar 
{ 
    *cursor: pointer; /* IE7 refuses to do this */ 
} 

.aw-avatar img,
.aw-avatar .img,
.aw-avatarCropper
{
    background-color: rgb(252, 252, 255);
padding: 2px;
border: 1px solid #a5cae4;
border-radius: 4px; -webkit-border-radius:  4px; -moz-border-radius:  4px; -khtml-border-radius:  4px;

}


    .aw-avatar .img
    {
        display: block;
        background-repeat: no-repeat;
        background-position: 2px 2px;
        text-indent: 1000px;
        overflow: hidden;
        white-space: nowrap;
        word-wrap: normal;
    }
then you have to edit the threadbit template:
find:
Code:
<a href="{vb:link member, {vb:raw thread}, null, 'postuserid',  'postusername'}"><img height="32px" width="32px"  style="float:left;margin-right:4px" src="{vb:raw thread.avatarurl}"  border="0" /></a>
replace with:
Code:
<a class="aw-avatar" href="{vb:link member, {vb:raw thread},  null, 'postuserid', 'postusername'}"><img height="32px"  width="32px" style="float:left;margin-right:4px" src="{vb:raw  thread.avatarurl}" border="0" /></a>
find:
Code:
<a href="{vb:link member, {vb:raw thread}, null,  'lastposterid', 'lastposter'}"><img height="32px" width="32px"  style="float:left;margin-right:4px" src="{vb:raw  thread.lastposteravatarurl}" border="0" /></a>
replace with:
Code:
<a class="aw-avatar" href="{vb:link member, {vb:raw thread},  null, 'lastposterid', 'lastposter'}"><img height="32px"  width="32px" style="float:left;margin-right:4px" src="{vb:raw  thread.lastposteravatarurl}" border="0" /></a>
Edit forumhome_forumbit_level1_post and forumhome_forumbit_level2_post templates as follows.

Find:
Code:
<a href="{vb:link member, {vb:raw forum}, null, 'real_lastposterid', 'real_lastposter'}"><img height="48px" width="48px" style="float:left;margin-right:4px" src="{vb:raw forum.avatarurl}" border="0" /></a>
Replace with:
Code:
<a class="aw-avatar" href="{vb:link member, {vb:raw forum}, null, 'real_lastposterid', 'real_lastposter'}"><img height="48px" width="48px" style="float:left;margin-right:4px" src="{vb:raw forum.avatarurl}" border="0" /></a></a>
P.S. This same coding can also be found here
Reply With Quote
2 благодарности(ей) от:
reddyink, Scalemotorcars
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01075 seconds
  • Memory Usage 1,786KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (2)post_thanks_box_bit
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete