The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Default Avatar in Blog Details »» | |||||||||||||||||||||||||
This mod was simply created because the front page of the vBulletin blog looked hideous when there were massive gaps where the avatars should be in the latest entry/comment lists. It's a very minor set of template edits that replaces the transparent image with a default one.
Note: I know you can replace the GIF BUT this would not be feasible if you wanted to use a PNG or JPEG image, the last which would become a blurry mass of pixels. Yes, this replaces EVERY SINGLE circumstance of a space where an avatar should be with a default you specify. That's why there are so many edits. The edits: Go into blog_home_list_blog and Find: Code:
<if condition="$show['avatar']"> <a href="blog.php?$session[sessionurl]u=$updated[userid]"><img class="inlineimg blog_home_list_image" src="$updated[avatarurl]" border="0" width="30" alt="<phrase 1="$updated[username]">$vbphrase[xs_avatar]</phrase>" /></a> <else /> <img src="$vboptions[cleargifurl]" width="30" height="30" alt="" /> </if> Code:
<if condition="$show['avatar']"> <a href="blog.php?$session[sessionurl]u=$updated[userid]"><img class="inlineimg blog_home_list_image" src="$updated[avatarurl]" border="0" width="30" alt="<phrase 1="$updated[username]">$vbphrase[xs_avatar]</phrase>" /></a> <else /> <img src="images/misc/blog/noavatarpic.PNG" width="31" height="27" alt="" /> </if> Code:
<if condition="$show['avatar']"> <a href="member.php?$session[sessionurl]u=$updated[userid]"><img class="inlineimg blog_home_list_image" src="$updated[avatarurl]" border="0" width="30" alt="<phrase 1="$updated[username]">$vbphrase[xs_avatar]</phrase>" /></a> <else /> <img src="$vboptions[cleargifurl]" width="30" height="30" alt="" /> </if> Code:
<if condition="$show['avatar']"> <a href="member.php?$session[sessionurl]u=$updated[userid]"><img class="inlineimg blog_home_list_image" src="$updated[avatarurl]" border="0" width="30" alt="<phrase 1="$updated[username]">$vbphrase[xs_avatar]</phrase>" /></a> <else /> <img src="images/misc/blog/noavatarpic.PNG" width="31" height="27" alt="" /> </if> Code:
<if condition="$show['avatar']"> <a href="blog.php?$session[sessionurl]u=$updated[userid]"><img class="inlineimg blog_home_list_image" src="$updated[avatarurl]" border="0" width="30" alt="<phrase 1="$updated[username]">$vbphrase[xs_avatar]</phrase>" /></a> <else /> <img src="$vboptions[cleargifurl]" width="30" height="30" alt="" /> </if> Code:
<if condition="$show['avatar']"> <a href="blog.php?$session[sessionurl]u=$updated[userid]"><img class="inlineimg blog_home_list_image" src="$updated[avatarurl]" border="0" width="30" alt="<phrase 1="$updated[username]">$vbphrase[xs_avatar]</phrase>" /></a> <else /> <img src="images/misc/blog/noavatarpic.PNG" width="31" height="27" alt="" /> </if> Code:
<if condition="$show['avatar']"> <div style="margin-bottom:$stylevar[cellpadding]px"> <a href="blog.php?$session[sessionurl]u=$blog[userid]"><img src="$blog[avatarurl]" $blog[avwidth] $blog[avheight] alt="<phrase 1="$blog[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a> </div> </if> Code:
<if condition="$show['avatar']"> <div style="margin-bottom:$stylevar[cellpadding]px"> <a href="blog.php?$session[sessionurl]u=$blog[userid]"><img src="$blog[avatarurl]" $blog[avwidth] $blog[avheight] alt="<phrase 1="$blog[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a> </div> <else /> <div style="margin-bottom:$stylevar[cellpadding]px"> <a href="blog.php?$session[sessionurl]u=$blog[userid]"><img src="images/misc/blog/noavatarpic.PNG" height="27" width="31" alt="<phrase 1="$blog[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a> </div> </if> Code:
<if condition="$show['avatar']"> <div class="tborder" style="border-style:dotted; float:$stylevar[right]; margin-$stylevar[left]:$stylevar[cellpadding]px"> <div class="alt2" style="padding:$stylevar[cellpadding]px"> <a href="blog.php?$session[sessionurl]u=$response[userid]"><img src="$response[avatarurl]" $response[avwidth] $response[avheight] alt="<phrase 1="$response[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a> </div> </div> </if> Code:
<if condition="$show['avatar']"> <div class="tborder" style="border-style:dotted; float:$stylevar[right]; margin-$stylevar[left]:$stylevar[cellpadding]px"> <div class="alt2" style="padding:$stylevar[cellpadding]px"> <a href="blog.php?$session[sessionurl]u=$response[userid]"><img src="$response[avatarurl]" $response[avwidth] $response[avheight] alt="<phrase 1="$response[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a> </div> </div> <else /> <div class="tborder" style="border-style:dotted; float:$stylevar[right]; margin-$stylevar[left]:$stylevar[cellpadding]px"> <div class="alt2" style="padding:$stylevar[cellpadding]px"> <a href="blog.php?$session[sessionurl]u=$response[userid]"><img src="images/misc/blog/noavatarpic.PNG" width="31" height="27" alt="" /></a> </div> </div> </if> Customising This When you have done the above, now comes the annoying part. You must make or download your own image for the default, in whatever program you wish, then edit the height and width so they match EXACTLY. You can find this in Windows here: Note: Your image should be about 30 pixels by 30 pixels in size. Approx. Now find these values in the code and replace with the right ones: Code:
width="31" height="27" Plugin for Template Modification System by yoyoyoyo If you use the Template Modification System, just import this product and it will automatically make the template edits required for this modification for you. Thanks to yoyoyoyo for this awesome addition. https://vborg.vbsupport.ru/attachmen...1&d=1193417641 By the way, this is the Template Modification System modification by Andreas: https://vborg.vbsupport.ru/showthrea...ication+System Troubleshooting Page isn't valid (blog.php) Remove the code from the featured entry template. Goes back to normal, but now should valid. Weirdly, this only happens for the validator and when tested as a guest in Internet Explorer. Displays an X Upload the image to the images/misc/blog directory. Also make sure the capitalisation in the file name is correct. Notes: - It's valid XHTML 1.0 Transitional Screenshots: Show Your Support
|
Comments |
#2
|
||||
|
||||
cool thanks much
I am attaching a Template Modification System (TMS) XML file to make it easier for people to automagically edit their templates |
#3
|
||||
|
||||
Quote:
|
#4
|
||||
|
||||
The fourth in the screenshots. But I recommend you download or make one relevant to your forum topic.
|
#5
|
||||
|
||||
Oh, and thanks for that file. May I add it to post one?
|
#6
|
||||
|
||||
of course
|
#7
|
||||
|
||||
Added with credit and link to required modification.
|
#8
|
||||
|
||||
Anyone got any requests for templates to add this to?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|