Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[CM] Fancy Background for Userinfo & Post Title (Postbit) Details »»
[CM] Fancy Background for Userinfo & Post Title (Postbit)
Version: 1.00, by ChiNa ChiNa is offline
Developer Last Online: Feb 2023 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.2.0 Rating:
Released: 10-12-2012 Last Update: Never Installs: 15
Template Edits
Re-useable Code Code Changes  
No support by the author.

Credits for the CSS Part to: FASTBIRDfrom vBulletin.org

This mod was requested by member on vBCoderz.com where I am also a Staff Member.

Please notice: This mod has only been tested on (Postbit Legacy)

Fancy Background for Userinfo & Post Title
Used for ADMINS - With 5 Stars Backgounrson Both Background




First of all Upload the 2 Images to your forum Images folder, which is attached below!

userinfo.png + posttitle.png = Upload both to your forum Images folder



1)posttitle.png



2) userinfo.png



You only need to upload userinfo.png + posttitle.png to your images folder.


Tutorial Starts Here

STEP 1: Goto
your Style Manager >> Click on <<>> Button to enter your Templates Area >> Then find your "CSS Templates" >> In CSS Templates look for "postbit.css", Double Click on postbit.css to access it. >> Now scroll all the way down, and add the following code below everything else:

Code to add in postbit.css:

Code:
.postbitlegacy .userinfo2 {
    float:{vb:stylevar left};
    position: relative;
    width:{vb:math {vb:stylevar postbitlegacy_userinfo_width}-{vb:math {vb:stylevar 
padding}*2}}; 
    padding: 2px {vb:stylevar padding} {vb:math {vb:stylevar padding}/2};
    font-size: {vb:stylevar small_fontSize};
    display:block;
       background: url(URL TO YOUR userinfo.png IMAGE) no-repeat;
       width:175px;
       height:400px;
        _margin-top: -{vb:math {vb:math 16px*{vb:stylevar line_height}} +  {vb:stylevar padding}-{vb:stylevar postbit_border.borderWidth}};
    clear:both;
}
.postbitlegacy .userinfo2 .postuseravatar img, .eventbit userinfo .eventuseravatar img {
    border: {vb:stylevar postbitlegacy_avatar_border};
     outline: {vb:stylevar postbitlegacy_avatar_outline};
     max-width: {vb:math {vb:stylevar postbitlegacy_userinfo_width} -  {vb:math {vb:stylevar padding}*2}- {vb:math {vb:stylevar  postbitlegacy_avatar_outline.borderWidth}*2} - {vb:math {vb:stylevar 

postbitlegacy_avatar_border.borderWidth}*2}};
}
.postbitlegacy .userinfo2 a.username, .eventbit .userinfo a.username {
    clear:right;
    font-size:21px;
    font-weight:none;
    width: auto;
    max-width:{vb:math {vb:stylevar postbitlegacy_userinfo_width} - {vb:math {vb:stylevar padding}*2} - 20px};
    word-wrap:break-word;
}
.postbitlegacy .userinfo2 .postuseravatar, .eventbit .userinfo .eventuseravatar {
    display:block;
    margin:{vb:math {vb:stylevar padding}/3} auto 0;
    text-align:center;
    width: auto;
}
.postbitlegacy dl.userinfo_extra2 dt, .postbitlegacy dl.user_rep dt {
    float: {vb:stylevar left};
    text-align: {vb:stylevar left};
    /*color: {vb:stylevar shade_color};*/
    margin-{vb:stylevar right}: {vb:stylevar padding};
    margin-{vb:stylevar left}: 0;
    min-width:60px;
    width:auto !important;
    width:60px;
}


STEP 2: Now
if you look at the FIRST code, I have marked it in red where it says:
(URL TO YOUR userinfo.png IMAGE) on top.

Replace the red code with the FULL URL to the userinfo.png image in you images folder!

Example: http://site.com/forum/images/userinfo.png

So basicly make sure now both of the images in are uploaded the "userinfo.png" and "posttitle.png" to your forums "images" folder!

STEP 3: Now you need to go back to Style Manager and click on the again back to the Template area to Edit the Postbit_legacy template.

Now in the Templates area Locate the Postbit Templates! Click on it and open the template called "postbit_legacy"!

In postbit_legacy:

FIND CODE:
Code:
<div class="userinfo">
REPLACE WITH:
Code:
<vb:if condition="is_member_of($post, 6)"><div class="userinfo2">
<vb:else />
<div class="userinfo">
</vb:if><center>
IN SAME TEMPLATE FIND:
Code:
<dl class="userinfo_extra">
AND REPLACE WITH:
Code:
<vb:if condition="is_member_of($post, 6)"><dl class="userinfo_extra2">
<vb:else />
<dl class="userinfo_extra">
</vb:if><center>
If you can see the NUMBER 6 as ($post, 6)
is the usergroupd ID that you want to have a fancy background!

Now this was for the USERINFO Background, lets fix the "POST TITLE" background, but do not refresh your "postbit_legacy" template, Stay there to add the last part:


LAST PART FOR USERTITLE BACKGROUND:
In your postbit_legacy find the following code below:

FIND THIS CODE:

Code:
<h2 class="title icon">
Add this code below:
Code:
<vb:if condition="is_member_of($post, 6)">
<img src="images/posttitle.png" alt="Admin Image"><br />
</vb:if>
Now lets make all of it to stay in CENTER, if you dont want it to be centered, you can SAVE it now, and DONE!

But if you want it all to be showen nicely then I suggest you center it all following my instructions!

In same Template, Postbit_legacy find..

Find this Code:
Code:
<img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" title="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />


Add this code below:

Code:
</center>
In same Template find Code:
Code:
<dt>{vb:rawphrase posts}</dt> <dd>{vb:raw post.posts}</dd>
ADD THIS CODE BELOW:
Code:
</center>
Now CLICK SAVE, and we are done!

And again the Number 6 is used ($post, 6) the 6 is the usergroup ID for Administrators! So it means that ONLY the admins will be able to have this BACKGROUND IMAGE! If you decided to give other usergroups a fancy background as the admins!

You can add more USERGROUP ID's or Numbers like this: ($post, 2,4,6)

Good luck and you can always ask if anything, and dont forget to visit us and contribute some more time on
vBCoderz.com!
Notice: Dont forget to download the 2 images attached right below, and upload them both to your forums Images folder!


OPTIONAL INFO

If you decided to use your own images for the BACKGROUND, then make sure thar you images should match the options below:

Name one of the images to userinfo.png and name the the other to posttitle.png

Size of images should be:

userinfo.png: 400px height / 175px width
posttitle.png: 276px height / 37px width


The posttitle_EXTRA.png image below is just an an extra image with the ADMIN text added on the opposit side! I you wanted to use it then to change the name to posttitle.png

posttitle_EXTRA.png

Screenshots

File Type: png userinfo.png (27.3 KB, 0 views)
File Type: png posttitle.png (9.6 KB, 0 views)
File Type: png posttitle_EXTRA.png (9.5 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
Karma, patrick91

Comments
  #12  
Old 10-18-2012, 04:00 PM
ChiNa ChiNa is offline
 
Join Date: Jul 2012
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by simonhind View Post
ok ChiNa-Man, yes you deserver an apology, and i do apologize for the accusation saying that this template edit was a copy, when in fact it wasnt
Thank you simonhind, I really appreciate your way of comming back to reply....
Its all good and apology accepted mate. I respect you even more now!

Thanks a lot, and with your work and your codings... You belong to the best in here!

Regards ChiNa-Man
Reply With Quote
  #13  
Old 10-20-2012, 01:13 PM
socialteenz's Avatar
socialteenz socialteenz is offline
 
Join Date: May 2011
Posts: 465
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good job man.

One suggestion:

Ability for members to upload their own background via their cpanel.

Thanks.
Reply With Quote
  #14  
Old 10-20-2012, 05:47 PM
Bluefin221 Bluefin221 is offline
 
Join Date: Jul 2008
Location: Scotland
Posts: 290
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it at all possible to get this per usergroup so that a usergroup would have a different background?
Reply With Quote
  #15  
Old 10-21-2012, 12:40 AM
ChiNa ChiNa is offline
 
Join Date: Jul 2012
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by socialteenz View Post
Good job man.

One suggestion:
Ability for members to upload their own background via their cpanel.
Thanks.
Thank you Mate, Very good one
Reply With Quote
  #16  
Old 10-21-2012, 12:44 AM
ChiNa ChiNa is offline
 
Join Date: Jul 2012
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by socialteenz View Post
Good job man.

One suggestion:
Ability for members to upload their own background via their cpanel.
Thanks.
@socialteenz Thank you Mate, Very good one.. I couldnt click on LIKE! Asks me to like another one befor lol. Pauls Addon ofcourse!


Quote:
Originally Posted by Bluefin221 View Post
Is it at all possible to get this per usergroup so that a usergroup would have a different background?
@Bluefin221 well not in this version and, YES I did try see If i could make one for each but needs hard-coding! Only 1 of them can be made for all users, and thats the POST TITLE BACKGROUND, the USERINFO background is a bit hard and needs more codings.. But I will see if I can make that one day..
Reply With Quote
  #17  
Old 10-21-2012, 03:56 AM
Bluefin221 Bluefin221 is offline
 
Join Date: Jul 2008
Location: Scotland
Posts: 290
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by socialteenz View Post
Good job man.

One suggestion:

Ability for members to upload their own background via their cpanel.

Thanks.
This would work just as well as the usergroups idea as we could make stock graphics which they could use.
Reply With Quote
Благодарность от:
ChiNa
  #18  
Old 10-21-2012, 08:13 PM
alex.devine alex.devine is offline
 
Join Date: Sep 2012
Location: UK
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great little edit and i will be using it with my own styles added

Thank you.


Regarding simonhind, don't worry about him he is a fool wishing he could do the same, I have reported his posts once again. It did the same in another thread and the mods removed his posts.
Reply With Quote
2 благодарности(ей) от:
ChiNa, Kolektor
  #19  
Old 10-21-2012, 10:17 PM
ChiNa ChiNa is offline
 
Join Date: Jul 2012
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by alex.devine View Post
This is a great little edit and i will be using it with my own styles added

Thank you.


Regarding simonhind, don't worry about him he is a fool wishing he could do the same, I have reported his posts once again. It did the same in another thread and the mods removed his posts.

Thank you, I am very new in this forum! I been here for 4 months, yet I have 50 releases or more! But I what I do, I repect older members on here! This is why I stick to myself ! No need to disrespect or make more out of it! But thank you for your kinds words! I just hope it doesnt happen for another person who have worked as hard as me,,
Reply With Quote
  #20  
Old 11-17-2012, 11:22 PM
killerford's Avatar
killerford killerford is offline
 
Join Date: Jan 2012
Location: United Kingdom
Posts: 173
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this only for the one usergroup or can you do this for a number of groups?
Reply With Quote
  #21  
Old 11-19-2012, 11:25 PM
ChiNa ChiNa is offline
 
Join Date: Jul 2012
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by killerford View Post
Is this only for the one usergroup or can you do this for a number of groups?
You can make other groups to see the TITILE images too:

PostTitle Usergroup Permission:
Code:
<vb:if condition="is_member_of($post, 6)">
<img src="images/posttitle.png" alt="Admin Image"><br />
</vb:if>
You can change or add more numbers like 6 in this code ($post, 6) which is the usergroup ID for administrator! Add a few other numbers for example 6,5,7..

So it will look like this:
Code:
<vb:if condition="is_member_of($post, 6,5,7)">
<img src="images/posttitle.png" alt="Admin Image"><br />
</vb:if>
I will try to make others as well! Just have not time for it now! Good luck mate
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 07:03 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05719 seconds
  • Memory Usage 2,376KB
  • Queries Executed 27 (?)
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
  • (13)bbcode_code
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (5)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete