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

Reply
 
Thread Tools
Postbit Legacy - Usergroup Backgrounds Details »»
Postbit Legacy - Usergroup Backgrounds
Version: 1.00, by Fastbird Fastbird is offline
Developer Last Online: Jan 2012 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.8.4 Rating:
Released: 01-31-2009 Last Update: Never Installs: 80
Template Edits
Re-useable Code  
No support by the author.

Hello! This is my first submission. I run LTXTech.com, I go by phantomzer0 over there, and I wanted this hack for a long time. I decided to write it on my own and the outcome was perfect. I know enough to get the job done, so if there is a more efficient way to produce this, by all means post it up!

Here is what this hack will do for you:

Demo Link:

http://ltxtech.com/forums/showthread.php?t=2865

Now, you can make any usergroups use these backgrounds. You will have to design your own, of course, but you can assign them however you would like. In the case of my forum, we have them set-up for administrators. You could make a separate image for staff members, reg users, banned users, whatever you need. You can also duplicate it and assign different images for different colored styles. I'll show you how below.

Here's how to do it:
-- Navigate to your Admin CP. Once there go to Styles and Templates, then to Style Manager, and then click the "Go" button once you have decided which template you would like to install this on.

-- Scroll all the way to the bottom and look for the "Additional CSS Definitions" Box. I like to use the second box for all of my custom CSS, but you can surely use either one. Copy this and paste it into the box.

Code:
.postbit {
background: #101010 url(this is the url to your image for the background);
background-repeat: no-repeat;
border-left: solid 1px #3c3c3c;
border-right: solid 1px #3c3c3c;
}
Now, the border colors will need to be the same as the colors on your forum. These are the borders I'm talking about:



You will need to figure out the color code of your borders and assign the same color to the CSS code. You can adjust the size of the border by increasing or decreasing the "1px" numbers. 3px would obviously increase the size of the border to 3 pixels. You can also rename the CSS ".postbit" to something else, but if you do make sure you take note of that.

-- Now we will assign the background to the actual postbit. To do so, you need to navigate to Styles and Templates, then click on the "<< >>" button on the style you want to edit.

-- Scroll down the list and find "Postbit Templates"



-- Double click on "Postbit Legacy", as seen in the picture above.

Find:
Code:
<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px">
Replace With:
Code:
<if condition="is_member_of($post, #)">
<td class="postbit" width="175" style="border: $stylevar[cellspacing]px solid $stylevar [tborder_bgcolor]; border-top: 0px; border-bottom: 0px id="td_post_$post[postid]">
<else />
<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px"></if>
The red # symbol is for you to put a usergroup id # in. In my case, the admin group on my forum is 6, so instead of a # sign, there is a 6 there. You can assign multiple usergroups to use the same image, if you want. You can use the same code above for different forum styles, you just need to change the "td class="postbit"" to whatever the CSS is for the different style.

Example, my forum has a light and dark skin. The dark skin's CSS is "postbit" and the CSS for the light skin is "postbit2". On the Dark skin, I use the code above and for the light skin it's the exact same, only I have changed the td class to postbit2.

The only thing left to do is design a background image. Once you have that, you can upload it and point your CSS url to the image on your server.I'm fairly sure I have included all the steps to accomplish this, if I missed one, please point it out! Good luck and thanks for looking!

Update:

If you would like to assign multiple background images to multiple usergroups, see this post. User down.low explains very well how to achieve this result! Thanks DL!

https://vborg.vbsupport.ru/showpost....8&postcount=52

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #82  
Old 05-23-2009, 03:01 PM
Fastbird's Avatar
Fastbird Fastbird is offline
 
Join Date: Aug 2005
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's my complete header, you will have to find a similar javascript, but you can see how I have set it up. You will need to upload separate javascript files that the code can look to. The banner is setup specifically to make this work. There is a main background image that is just the gradient, no logos or anything. Then we have the left logo, which is clickable and links to the forum home. Then, the javascript rotates the right image based on which image files are in the specific folder. It has to be setup this way because our forum resizes to 95% of the screen on any resolution, if you use one big image, it will stretch past the forum table. Take a look:

Code:
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="144" style="padding-top:0px" background="http://www.ltxtech.com/forums/mid.jpg"><a href="http://ltxtech.com/forums"><img src="http://www.ltxtech.com/leftblog.jpg" width="475" height="145" border="0" /></a></td>
<td align="right" style="padding-top:0px" background="http://www.ltxtech.com/forums/mid.jpg"><a href="http://ltxtech.com/forums/forumdisplay.php?f=86"> <script language="JavaScript">
<!--
function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]="http://ltxtech.com/forums/right.jpg"
myimages[2]="http://ltxtech.com/forums/rightdecember.jpg"
myimages[3]="http://ltxtech.com/forums/springsoul.jpg"
myimages[4]="http://ltxtech.com/forums/ryder2.jpg"
myimages[5]="http://ltxtech.com/forums/larry4.jpg"
myimages[6]="http://ltxtech.com/forums/blownd.jpg"
myimages[7]="http://ltxtech.com/forums/larry4.jpg"
myimages[8]="http://ltxtech.com/forums/pipes.jpg"
myimages[9]="http://ltxtech.com/forums/tbird3.jpg"
myimages[10]="http://ltxtech.com/forums/tbird3.jpg"
myimages[11]="http://ltxtech.com/forums/tbird3.jpg"
myimages[12]="http://ltxtech.com/forums/larry4.jpg"

var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<img src="'+myimages[ry]+'" border=0>')
}
random_imglink()
//-->
</script>
</td>
</tr>
</table>
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" 

cellspacing="0" align="center">
<if condition="$ad_location['ad_header_logo']">$ad_location
</if>
</table>


<!-- content table -->
$spacer_open

$_phpinclude_output

$ad_location[ad_header_end]
<!-- USC header edit start -->
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
$usc_left
<td valign="top">
<!-- USC header edit end -->
<div align="center">$vbam_location[ltx]</div>
By throwing the current winner in the rotation list 3 times, we increase the chance that his car will be seen more frequently throughout the month. If you need any help setting it up or finding the correct javascript, feel free to send me a PM. I'd be glad to help as best I can. Also note that I have an advertisement mod loaded on my forum and there are a few parameters that show up in the head code. Don't worry about that!
Reply With Quote
  #83  
Old 05-23-2009, 04:51 PM
hiphabs hiphabs is offline
 
Join Date: May 2008
Location: montreal
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great mod but something about the centering, how do i move my avatar up? because this is what i have now:



Yea so how can i move it up?


Would i have to move my name and description that says admin below the avatar so it shifts up?

edit:

Yea i had to move the names.


Installed.
Reply With Quote
  #84  
Old 05-25-2009, 01:52 AM
Fastbird's Avatar
Fastbird Fastbird is offline
 
Join Date: Aug 2005
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm glad you got everything to work, but please, all I ask is that you don't use our image. Although i posted this mod, we still try to keep our forum unique. I don't think it would be much to ask in return to not use our images. It was not provided in the hack for a reason.

Thanks!
Reply With Quote
  #85  
Old 05-31-2009, 06:07 AM
stapler2025 stapler2025 is offline
 
Join Date: Nov 2007
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any way to get something like this working on postbit rather than legacy? That'd be awesome!
Reply With Quote
  #86  
Old 05-31-2009, 07:54 PM
archonus archonus is offline
 
Join Date: Jul 2005
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how can i apply this to the group post too ?
Reply With Quote
  #87  
Old 05-31-2009, 09:18 PM
Shadawg's Avatar
Shadawg Shadawg is offline
 
Join Date: Aug 2008
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

stapler im sure it will be basically the same, just a few coding edits here and there.....

Might install this if i can come up with a decent enough background image
Reply With Quote
  #88  
Old 05-31-2009, 09:23 PM
MAD-DOG MAD-DOG is offline
 
Join Date: Dec 2008
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Love the mod thanks!

Installed.
Reply With Quote
  #89  
Old 05-31-2009, 10:11 PM
Shadawg's Avatar
Shadawg Shadawg is offline
 
Join Date: Aug 2008
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay got an image, gunna mark installed, great little mod man (y)
Reply With Quote
  #90  
Old 06-01-2009, 01:39 AM
Shadawg's Avatar
Shadawg Shadawg is offline
 
Join Date: Aug 2008
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="http://www.revolutionofgaming.com/home/showthread.php?t=2355" target="_blank">http://www.revolutionofgaming.com/ho...ead.php?t=2355</a>

Go take alook people, i got it looking good finally, thanks again for the great mod, i will be looking into doing this for the posting area also......
Reply With Quote
  #91  
Old 06-01-2009, 01:17 PM
archonus archonus is offline
 
Join Date: Jul 2005
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how to do it for the posting area?
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 11:37 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.04771 seconds
  • Memory Usage 2,337KB
  • 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
  • (4)bbcode_code
  • (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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete