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 - Usergroup Background in postbit Legacy (https://vborg.vbsupport.ru/showthread.php?t=235041)

Dr.osamA 02-04-2010 10:00 PM

Usergroup Background in postbit Legacy
 
1 Attachment(s)
Hi all !!

It's just the idea of making the background of the responses and posts a usergroup in postbit Legacy

Demo

see pic in attachment

lets do it and try

Style Manager -> template postbit.css find

PHP Code:

.postbitlegacy .postbody, .eventbit .eventdetails .eventbody {
    
margin-{vb:stylevar left}: {vb:stylevar postbitlegacy_userinfo_width};
    
border-{vb:stylevar left}: {vb:stylevar postbit_userinfo_border};
    
background: {vb:stylevar postbit_background};
    
_background-imagenone;
    
padding-bottom1em;


add ander it

PHP Code:

/* Dr.osamA - alra7ba editing postbit */
.postbitlegacy .postbody_admin, .eventbit .eventdetails .eventbody {
    
margin-{vb:stylevar left}: {vb:stylevar postbitlegacy_userinfo_width};
    
border-{vb:stylevar left}: {vb:stylevar postbit_userinfo_border};
    
backgroundurl(http://www.xxxx.net/forum/xxx/Back-Admin-1.gif) repeat;
    
_background-imagenone;
    
padding-bottom1em;


chenge the link to your image URL
PHP Code:

http://www.xxxx.net/forum/xxx/Back-Admin-1.gif 

then save work

in template postbit_legacy find


PHP Code:

<div class="postbody"

replece with

PHP Code:

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

the red # is your usergroup's ID

then save work

it is all

you can use this image
http://www.alra7ba.net/vb/alra7ba/Back-Admin-1.gif

or this one
http://www.alra7ba.net/vb/alra7ba/Back-Admin-2.gif

or any image you want

PS: this working in VB 4.0.1 too

Demo

Enjoy

Forum Lover 02-05-2010 04:26 AM

By this, can we make it with more then one user group? How?

saadessa 02-05-2010 03:42 PM

thank you

Forum Lover 02-05-2010 06:23 PM

Quote:

Originally Posted by Dr.osamA (Post 1975434)
PHP Code:

<vb:if condition="is_member_of($post, 1,2,3,4,5,)"><div class="postbody_admin"
<
vb:else /> 
<
div class="postbody"
</
vb:if> 

with same code by changing 1,2,3,4 to your group

I mean, different background for different user group. :) Will that do with your hack?
Clicked Installed already Dr.

WebCraker 02-06-2010 12:07 AM

Great work

Installed

Forum Lover 02-06-2010 05:23 AM

Thanks. Buddy. :)

Jassem 02-06-2010 11:20 PM

بآركـ الله بكـ آخي الكريم

إلى الآمام

TimberFloorAu 02-06-2010 11:58 PM

Not something we would use, but great work Dr. :up:

NAZIA 02-07-2010 07:30 AM

new and nice concept,

n_only 02-12-2010 07:27 PM

hi..

please .. how can I put it only for a user id not for usergroup ?

n_only 02-13-2010 03:08 AM

بارك الله فيك

god bless you brother

vitoreis 04-11-2010 11:47 AM

Great work! Thanks for sharing

Dr.osamA 04-14-2010 08:26 AM

Welcome vitoreis

ToNetU 04-14-2010 09:19 AM

great work, tagged for now...

JohnMcClane 04-14-2010 08:59 PM

Is it possible to have this only for members when it's their birthday? Would be amazing if so!

Dr.osamA 04-25-2010 11:58 AM

Quote:

Originally Posted by JohnMcClane (Post 2021382)
Is it possible to have this only for members when it's their birthday? Would be amazing if so!

hi
i well try to do this for you when i have sometime man

you are welcome

merk_aus 06-27-2010 11:40 AM

I know this thread hasn't been posted in for a little while however I was wondering if someone was able to help me.

I have a sports website and what I am trying to do is have a profile field where people select their favorite sport and when they select that sport it loads a background for them.

Can this mod be edited to read profile fields instead of usergroup eg: If I select football as my favorite sport it turns around and puts a football background in my postbit.

Is anyone able to help?

Dr.osamA 07-11-2010 12:00 AM

hi merk_aus

can you more explain plzzz

merk_aus 07-11-2010 06:21 AM

I will try:
I want to have custom profile fields where my members select their favorite sports. Their options will be like:
- Football
- Golf
- Baseball
- Motorsport

Is there a way to set this up so if I select Motorsport from that custom profile field that this mod/template that you have created will then put a MOTORSPORT background (that I will create) as their postbit background for it.

So if you came to my site and put GOLF as your favorite sport then the GOLF background that I have created will display in your postbit.

Dr.osamA 08-10-2010 04:53 AM

Quote:

Originally Posted by merk_aus (Post 2067534)
I will try:
I want to have custom profile fields where my members select their favorite sports. Their options will be like:
- Football
- Golf
- Baseball
- Motorsport

Is there a way to set this up so if I select Motorsport from that custom profile field that this mod/template that you have created will then put a MOTORSPORT background (that I will create) as their postbit background for it.

So if you came to my site and put GOLF as your favorite sport then the GOLF background that I have created will display in your postbit.

i will try to do this for you bro

give me some time

brb :D

iSins 01-26-2012 06:50 AM

Is it possible to make it Auto Resize? I wanted to use a big background but have it resize automatically.

Cromags21 02-09-2012 04:45 PM

Is there away to have an image on the right side of the post. I run a online gaming site, looking for something that can help us show what leagues members are in..

Some members are in 2 different leagues , This mod is 1 background image. I would like to divide the right side of the post with an image that says Leagues,then under it showing the images of the leagues they are in.. NHL,MLB ...etc

But stack images NHL on top,then MLB in middle and NFL at the bottom

Another then that I think you MOD is awesome, I think I can figure it out myself.

HHelp1 02-10-2012 03:03 PM

May you please share your postbit PLEASE? We very APPRECIATE that!

Pure Dope 07-05-2012 09:04 AM

I believe you could improve this code by doing:

Code:

<div class="postbody postbg{vb:raw post.userid}">
Then when you want to add css for someone do it like this in the additional.css

Code:

.postbitlegacy .postbg<USERID>, .eventbit .eventdetails .eventbody {
  background-color: grey;
}

This way you dont have any conditions, and the code is a bit cleaner. Of course, this works by userid, and not usergroup, but its easily modified to work for usergroups by just adding another class.

svyrydov 08-21-2012 09:40 AM

1 Attachment(s)
Hello
If I want to change background only as shown on screenshot below?
What I have change in code?
Thanks.

Attachment 140633

Pure Dope 10-13-2012 07:33 AM

Quote:

Originally Posted by svyrydov (Post 2358682)
Hello
If I want to change background only as shown on screenshot below?
What I have change in code?
Thanks.

Attachment 140633

ever get help w/it?

Ghostt 05-26-2014 11:39 PM

Quote:

Originally Posted by Pure Dope (Post 2345227)
I believe you could improve this code by doing:

Code:

<div class="postbody postbg{vb:raw post.userid}">
Then when you want to add css for someone do it like this in the additional.css

Code:

.postbitlegacy .postbg<USERID>, .eventbit .eventdetails .eventbody {
  background-color: grey;
}

This way you dont have any conditions, and the code is a bit cleaner. Of course, this works by userid, and not usergroup, but its easily modified to work for usergroups by just adding another class.

can you show me the same please for vb 3.8?


All times are GMT. The time now is 04:22 PM.

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.01275 seconds
  • Memory Usage 1,792KB
  • 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
  • (4)bbcode_code_printable
  • (6)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (27)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete