vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Show Thread Enhancements - Postbit Legacy - Usergroup Backgrounds vb4 (https://vborg.vbsupport.ru/showthread.php?t=229487)

Fastbird 12-03-2009 10:00 PM

Postbit Legacy - Usergroup Backgrounds vb4
 
1 Attachment(s)
Updated for vBulletin 4.0.1!!!!

Hey Everyone! I went ahead and updated my vb3.x.x mod to work with the new coding in vBulletin 4. There are a few more modifications to make than the last time, but overall, I think you will find this very easy.

To start, let's look at a screenshot of what this mod will do for you, it's the image behind the username and the posbit information. This will not do anything else but assign a special background to the specified usergroup and assign the regular styling to all other usergroups:

DEMO: http://ltxtech.com/forums/showthread...or-New-Upgrade

Now that you have decided to continue with the modification, let's begin!

Navigate to:

Style Manager --> Click on the << >> Next to the template you are editing -->CSS Templates

postbit.css


FIND:
Code:

.postbitlegacy .userinfo {
        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: {vb:stylevar postbit_userinfo_background};
        _background-image: none;
        _margin-top: -{vb:math {vb:math 16px*{vb:stylevar line_height}} + {vb:stylevar padding}-{vb:stylevar postbit_border.borderWidth}};
        clear:both;
}

ADD UNDER:
Code:

/*Custom Postbit Background - Image*/
.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: #xxxxxx /*url(url to image here) no-repeat*/;
        _margin-top: -{vb:math {vb:math 16px*{vb:stylevar line_height}} + {vb:stylevar padding}-{vb:stylevar postbit_border.borderWidth}};
        clear:both;
}

---> Note: The Red xxxxxx is a color number. You need to specify a background color in case you aren't using an image. Remove the /* and */ around the url code to use an image. Otherwise it will just change the color of the box. I suggest fading the image to the color of the background you choose, as shown in the picture example.

FIND:
Code:

.postbitlegacy .userinfo .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}};
}

ADD UNDER:
Code:

/*Custom Postbit Background - Avatar Border*/
.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}};
}

FIND:
Code:

.postbitlegacy .userinfo 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;
}

ADD UNDER:
Code:

/*Custom Postbit Background - Username Style*/
.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;
}

FIND:
Code:

.postbitlegacy .userinfo .postuseravatar, .eventbit .userinfo .eventuseravatar {
        display:block;
        margin:{vb:math {vb:stylevar padding}/3} auto 0;
        text-align:center;
        width: auto;
}

ADD UNDER:
Code:

/*Custom Postbit Background - Avatar Position*/
.postbitlegacy .userinfo2 .postuseravatar, .eventbit .userinfo .eventuseravatar {
        display:block;
        margin:{vb:math {vb:stylevar padding}/3} auto 0;
        text-align:center;
        width: auto;
}

FIND:
Code:

.postbitlegacy dl.userinfo_extra 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;
}

ADD UNDER:
/*Custom Postbit Background - Userinfo Alignment*/
Code:

.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;
}

That does it for the CSS file. Now we need to do one last thing, and that's edit the posbit_legacy template.

Navigate to:

Style Manager --> Click on the << >> Next to the template you are editing -->Postbit Templates

postbit_legacy:

FIND:
Code:

<div class="userinfo">
REPLACE:
Code:

<vb:if condition="is_member_of($post, #)"><div class="userinfo2">
<vb:else />
<div class="userinfo">
</vb:if>

FIND:
Code:

<dl class="userinfo_extra">
REPLACE:
Code:

<vb:if condition="is_member_of($post, #)"><dl class="userinfo_extra2">
<vb:else />
<dl class="userinfo_extra">
</vb:if>

The RED # is the ID of the usergroup that you want to have a unique background. In my example picture, the administrators have the custom image, so the # sign is replaced in the code with a 6, because the ID for the administrator usergroup is 6. To find the ID, go to usergroup options in the AdminCP and look at the chart. The group ID should be on the same line as the usergroup name.

All right! You should now have a styled postbit legacy background image for a specific usergroup!

I can't really provide support, I'm extremely busy with work and life, but if I pop in from time to time I'll try to help. Also, please, please, please create your own background image. I do not want my image being used. If you would like to setup the modification and use my image to get it up and running, that's fine. But I am asking that you create your own after it's installed properly.

Good luck guys!

SİMAR 12-04-2009 01:50 PM

thanks man

abouahmed 12-04-2009 03:04 PM

nice mod

Fastbird 12-04-2009 05:10 PM

No problem guys! Glad it worked for you and you liked it!

gedr80 12-04-2009 08:03 PM

Thank you very much

Dr.osamA 12-05-2009 09:42 PM

thnxxxx

installed
________
Extreme Vaporizer Q

Cableguy69 12-21-2009 12:33 PM

This hasn't worked right for me, Admin avatars were 150x150px, they've now been resized and lost there transparency, other than that it has worked, but what piece of code handles the avatar width?

I think transparency has been lost due to the image being resized.

Edit: I've found the resize code, I've changed this.

Cableguy69 12-21-2009 12:46 PM

It's ok I've worked it out.

Installed

I replaced this

Code:

/*Custom Postbit Background - Avatar Border*/
.postbitlegacy .userinfo2 .postuseravatar img, .eventbit userinfo .eventuseravatar img {
        background: #ffffff;
        border: 1px dotted #d8d8d8;
        padding: 3px;
        max-width: 80px;
        max-height: 80px;
}


With

Code:

/*Custom Postbit Background - Avatar Border*/
.postbitlegacy .userinfo2 .postuseravatar img, .eventbit userinfo .eventuseravatar img {
        background: #ffffff00;
        border: 0px solid #ffffff00;
        padding: 3px;
        max-width: auto;
        max-height: auto;
}


Cableguy69 12-22-2009 09:18 AM

Is it possible to put a background into more than 1 usergroup?

So I could have a different background for Mods and Vip's.

I.am 12-22-2009 10:13 AM

It is possible to reduce the message area?

Fastbird 12-25-2009 03:51 AM

It is possible, I'll get it sorted out once I update this mod to work with vb4 PL2, because right now I guarantee that everything will work from beta 4 to the new version.

Dr.osamA 12-26-2009 03:27 AM

not work with 4 Gold

plzz updaet it

thanx
________
SHEMALE FETISH

Draygonia 12-26-2009 02:46 PM

Definitely looking forward to this, excellent mod... I was thinking about paying someone to make it a few years back for a site idea I had... but this is just wonderful! Kudos!

Merjawy 12-26-2009 08:30 PM

Very nice and useful indeed...

Thanks. tagged

Cableguy69 12-27-2009 11:23 PM

Quote:

Originally Posted by Dr.osamA (Post 1938396)
not work with 4 Gold

plzz updaet it

thanx

Working for me.

http://www.hostmypics.org/pictures/d...b3c7acb502.png

Bouncer222 12-29-2009 01:21 PM

What should the dimensions of the images be in pixels? and If they are smaller than the actual "rectangle" where all the information is under the avatar etc.. is the image placed on the bottom or to the top or to the left or right? Like how is it shifted/placed?

Thanks.

Skyrider 01-05-2010 07:57 AM

I think there's something wrong...

Your modification says to find the following:

Code:

.postbitlegacy .userinfo {
        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;
}

How ever, I found this:
Code:

.postbitlegacy .userinfo {
        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: {vb:stylevar postbit_userinfo_background};
        _background-image: none;
        _margin-top: -{vb:math {vb:math 16px*{vb:stylevar line_height}} + {vb:stylevar padding}-{vb:stylevar postbit_border.borderWidth}};
        clear:both;
}

As you can see, the original is much longer so I think the installation instructions has to be adjusted.

Fastbird 01-05-2010 11:36 AM

I haven't updated this to the newest VB release. This was written on beta 4, so the instructions are only for beta 4.

Dr.osamA 01-09-2010 07:15 PM

Waiting
________
XXX FREE STREAMING

Fastbird 01-16-2010 02:52 AM

Updated for 4.0.1

TimberFloorAu 01-17-2010 07:16 PM

Still have this tagged Fastbird, get it going for 4.0.2 please :up:

TimberFloorAu 01-17-2010 07:20 PM

Ignore me I am a knob, will install :up:

Add:

Where does it pull the image from? Looking over code changes, I cant see where the image is extracted from. Is it profile pic?

Fastbird 01-18-2010 09:37 PM

Quote:

Originally Posted by TimberFloorAu (Post 1958518)
Ignore me I am a knob, will install :up:

Add:

Where does it pull the image from? Looking over code changes, I cant see where the image is extracted from. Is it profile pic?

If you want an image, you need to supply one and place it in the CSS. It's commented out. Check the first section of code to add/replace for it.

TimberFloorAu 01-18-2010 09:48 PM

Quote:

Originally Posted by Fastbird (Post 1959647)
If you want an image, you need to supply one and place it in the CSS. It's commented out. Check the first section of code to add/replace for it.

Yeah got that but tried everything and to no avail. Great hack, but couldnt get it working for us.

Thanks anyhoo :)

your code:
Code:

background: #xxxxxx /*url(url to image here) no-repeat*/;
our code change:
Code:

background: #ff9900 images/bg.jpg no-repeat;
Didnt produce anything.
Even tried absolute URL

Fastbird 01-18-2010 10:22 PM

Quote:

Originally Posted by TimberFloorAu (Post 1959658)
Yeah got that but tried everything and to no avail. Great hack, but couldnt get it working for us.

Thanks anyhoo :)

your code:
Code:

background: #xxxxxx /*url(url to image here) no-repeat*/;
our code change:
Code:

background: #ff9900 images/bg.jpg no-repeat;
Didnt produce anything.
Even tried absolute URL

That's because you removed too much of the code from the CSS. You need to use this line:

Code:

background: #ff9900 url(images/bg.jpg) no-repeat;

Bouncer222 01-21-2010 09:54 PM

I see on your site you used different images for different usergroups, how do I do the same??

Fastbird 01-21-2010 10:07 PM

One usergroup is like this:
Code:

<vb:if condition="is_member_of($post, #)"><dl class="userinfo_extra2">
<vb:else />
<dl class="userinfo_extra">
</vb:if>

Two usergroups is like this:
Code:

<vb:if condition="is_member_of($post, #)"><dl class="userinfo_extra2">
<vb:else />
<vb:if condition="is_member_of($post, #)"><dl class="userinfo_extra3">
<vb:else />
<dl class="userinfo_extra">
</vb:if>
</vb:if>

You keep adding the statement over and over and then add a vb:if at the end for each additional phrase you add. Then, you must duplicate the css each time for each usergroup. So, in the example for installation, I use userinfo2 for the duplicate css codes. Each additional usergroup will have an incremental increase, so the css for the 2nd usergroup would be userinfo3, the 3rd user group would use userinfo4, and so on. Just keep duplicating each of the steps above for each usergroup.

Bouncer222 01-21-2010 10:22 PM

It's not possible to make it simpler? Because duplicating css I think shouldnt be necessary if you can somehow do that.

Fastbird 01-21-2010 10:45 PM

Quote:

Originally Posted by Bouncer222 (Post 1962848)
It's not possible to make it simpler? Because duplicating css I think shouldnt be necessary if you can somehow do that.

If there's a simpler way, I don't know it. The way I explained it is known to work, so if there is a better way, then by all means go for it. I just don't know what that way is, sorry :(

patrick91 02-28-2010 05:05 PM

1 Attachment(s)
Thnx i will install this soon! but how do you get your postbit look like that???

DeadRabbit 07-17-2010 02:36 PM

can i add two or more usergroup ids?

DeadRabbit 07-17-2010 02:37 PM

Quote:

Originally Posted by Fastbird (Post 1962835)
One usergroup is like this:
Code:

<vb:if condition="is_member_of($post, #)"><dl class="userinfo_extra2">
<vb:else />
<dl class="userinfo_extra">
</vb:if>

Two usergroups is like this:
Code:

<vb:if condition="is_member_of($post, #)"><dl class="userinfo_extra2">
<vb:else />
<vb:if condition="is_member_of($post, #)"><dl class="userinfo_extra3">
<vb:else />
<dl class="userinfo_extra">
</vb:if>
</vb:if>

You keep adding the statement over and over and then add a vb:if at the end for each additional phrase you add. Then, you must duplicate the css each time for each usergroup. So, in the example for installation, I use userinfo2 for the duplicate css codes. Each additional usergroup will have an incremental increase, so the css for the 2nd usergroup would be userinfo3, the 3rd user group would use userinfo4, and so on. Just keep duplicating each of the steps above for each usergroup.

thanks, i havent read this one. lol :D

merk_aus 07-26-2010 09:05 AM

Is it possible to have this linked to custom user fields instead of usergroups?

eg: I want people to select their favorite sporting team and have a background of that sporting team display.

midnz 07-30-2010 09:35 PM

Quote:

Originally Posted by Bouncer222 (Post 1962848)
It's not possible to make it simpler? Because duplicating css I think shouldnt be necessary if you can somehow do that.

Quote:

Originally Posted by Fastbird (Post 1962869)
If there's a simpler way, I don't know it. The way I explained it is known to work, so if there is a better way, then by all means go for it. I just don't know what that way is, sorry :(

There is an easier way using vB 4.0.5 for adding a single image to the postbit background. I don't know if it works on postbit_legacy because I haven't tried it. I'm wanting different backgrounds per usergroup which I'm struggling to achieve despite the instructions posted on this thread :confused:

http://img340.imageshack.us/img340/9...background.jpg

midnz 07-31-2010 12:19 AM

Uninstalled until clearer instructions are provided for separate bg postbit images for multiple usergroups or my knowledge increases to where my forum isn't being screwed up with each attempt.
Moving on....

Bouncer222 10-03-2010 08:47 PM

is this still working for 4.0.7??

zonaenlinea 10-07-2010 11:58 AM

for 4.0.7

Prohibit 10-26-2010 06:59 PM

Quote:

Originally Posted by zonaenlinea (Post 2107653)
for 4.0.7

???????????????

:confused:

Prohibit 10-26-2010 07:53 PM

1 Attachment(s)
Well, the background is working.

But it has thrown my post bit kind of out of whack.


Okay, got it going. Thank you for the mod! :)

murekhalir 10-30-2010 09:43 PM

sweeet gotta try this now.


All times are GMT. The time now is 04:15 AM.

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.01393 seconds
  • Memory Usage 1,858KB
  • 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
  • (27)bbcode_code_printable
  • (9)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
  • (40)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