(REQ) Postbit Image + Auto Resize img tags

xenoth

New Member
Postbit Background Image Editable Via Profile w/ Font Border

This will work on any versions of VB 3.6...

If you use and like, please press install.

Description: This gives users the option in their profile to select a background image of their choice to show up in their postbit.

Note: This could mess up the text/font in the postbit so I do advise you to add a border around the text/font in the postbit legacy or postbit templates.

Simply find this code in either postbit or postbit legacy (depending which one you use):


PHP:
$template_hook[postbit_userinfo_right_after_posts]

And replace it with this code:


PHP:
<div style="border: 1px solid #000000; background-color: #FFFFFF; margin-bottom: 3px; padding: 3px;" width="100%"> 
$template_hook[postbit_userinfo_right_after_posts] 
</div>

The border is set at 1 pixels and a black border (#000000) with a white background (#FFFFFF)... You can change any of that to suit your standards.

If you don't want the border to cover all of the text, simply add <div style="border: 1px solid #000000; background-color: #FFFFFF; margin-bottom: 3px; padding: 3px;" width="100%"> before each postbit text. (Example: you will add it before $post[usertitle] etc...) adding the </div> tags after. This will add an individual border around each postbit text/font.

Right now, lets get started.

First thing to do is create a new Profile Field through the Admin Control Panel.

Single Line Text Box

Title: Post Area Background

Description: Here you can add a background image for your post area (where your avatar is displayed) in posts. Just simply put in the address for your image for a cool looking post area of your choice. (Example: http://www.example.com/example.jpg)

The rest is up to you.
biggrin.gif



Now go to your postbit or postbit legacy template and find:


PHP:
<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px">

Replace with:


PHP:
<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px" style="background-image: url($post[fieldXX]);">

Just replace the XX in the fieldXX with your Post Area Background field and you're done
up.gif

, thats it. Hope you like and please click install if you use, thanks.

===================================


For the other mod You have requested I have just added it to this thread:

https://www.vbteam.info/req-addons-template-modifications/3419-req-need-2-hacks.html
 
Top