vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Miscellaneous Hacks - Postbit Legacy - Usergroup Backgrounds (https://vborg.vbsupport.ru/showthread.php?t=203850)

Fastbird 05-23-2009 03:01 PM

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!

hiphabs 05-23-2009 04:51 PM

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

https://vborg.vbsupport.ru/external/2009/05/51.jpg

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.

Fastbird 05-25-2009 01:52 AM

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!

stapler2025 05-31-2009 06:07 AM

Any way to get something like this working on postbit rather than legacy? That'd be awesome!

archonus 05-31-2009 07:54 PM

how can i apply this to the group post too ?

Shadawg 05-31-2009 09:18 PM

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 :)

MAD-DOG 05-31-2009 09:23 PM

Love the mod thanks!

Installed.

Shadawg 05-31-2009 10:11 PM

Okay got an image, gunna mark installed, great little mod man (y)

Shadawg 06-01-2009 01:39 AM

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

archonus 06-01-2009 01:17 PM

how to do it for the posting area?

Fastbird 06-01-2009 05:32 PM

Not sure, and to be fair, you guys can use the image if you ask. It might seem lame but it took some time to make it and it's just a little courtesy. If you would like to use the image to install the mod, that's fine just shoot me a PM and let me know.

Fastbird 06-01-2009 05:34 PM

You can install the code onto the regular postbit template and it should work the same, you would need to change the shape of the image and perhaps a few minor things in the CSS, but it should work the same.

Looks great archonus!

EDIT: I need to take some new screenshots. Our server got hacked and a bunch of images got deleted. *sigh*

Shadawg 06-01-2009 06:08 PM

Quote:

Originally Posted by archonus (Post 1821298)
how to do it for the posting area?

I have not began any work on it yet, when i have sum free time, will be looking into it if its possible at my level of coding.....

Fastbird 06-01-2009 06:58 PM

There's already a hack out there for that, but I can whip something up tonight.

archonus 06-01-2009 09:36 PM

Quote:

Originally Posted by Fastbird (Post 1821496)
There's already a hack out there for that, but I can whip something up tonight.

that will be great !
thanks

archonus 06-05-2009 05:33 PM

any news Fastbird ? :) i tried the post background plugin but its not usefull, will be awesome if u give us a give to do the same as postbit but on the post ^^

DeanLag 07-15-2009 08:05 AM

Nice. I would LOVE to use this MOD. However, I want it to be on particular users and not usergroups cause only a couple of my forum members will be allowed to use it. I could do it the long way (Add people in seperate usergroups) but I rather do it the "proper" way. I'm guessing you only need to change the condition "<if condition="is_member_of($post, #)">" to a condition that looks along this: "<if condition="is_member($post, #)">, but I'm not sure about the syntax :(

morever, I would love to a separate background for the posts, which, I think, ressembles the one people just posted above. I know postbit is the left-sided panel of a post, but how do you call the right-side? (Legacy postbit)

Thanks and again, awesome Mod :)

tommyturnage 08-04-2009 08:08 PM

Quote:

Originally Posted by shervin_dvb (Post 1778763)
hi dear
Thanks İnstalled
how to change quote box like this :

how to get to this form
https://vborg.vbsupport.ru/external/2009/08/98.jpg

i mean it's:

quote: Orginially posted By Fastbird
I Like It

Where can I get that background?

HayleyP 08-16-2009 10:50 PM

Nevermind :)

Great mod.

kellyandmark04 08-19-2009 07:17 AM

Looks great awaiting more screenshots.

KeyHunterz 08-29-2009 01:41 AM

I finally got it to work, had to tweak the code a little to match up with my current skin.

Demo

Great hack!

Mobo 09-15-2009 05:55 PM

I am trying to use a PNG image and have my forums background texture show through. I've tried adding the "transparent" property to the code, but that did not seem to work. Is there a way to make it where the part of the postbit that does not have an image applied via this mod not to be filled with a color, leaving it transparent?

Fastbird 09-23-2009 10:31 PM

Quote:

Originally Posted by Mobo (Post 1885314)
I am trying to use a PNG image and have my forums background texture show through. I've tried adding the "transparent" property to the code, but that did not seem to work. Is there a way to make it where the part of the postbit that does not have an image applied via this mod not to be filled with a color, leaving it transparent?

You need to use a program like Gimp or Photoshop and 'erase the background' so that you see a tile checkboard under the image. Just use the eraser and erase eveything you don't want to show up.

Mobo 09-24-2009 06:47 AM

Sorry, guess I did not explain that very well. I already have the transparent png image. My problem is, when I use the png image, the part that is transparent shows up black and not as the normal color for my site.

Fastbird 09-25-2009 11:32 PM

That's because your image is not transparent.

Mobo 09-28-2009 12:35 PM

The image up there now is not transparent, as it does not display it correctly and cause that area to show as black. So, I replaced it with some thing that does work... a JPG.

Malceski09 10-07-2009 08:10 AM

would this work on 3.7?

ChopSuey 10-07-2009 08:23 AM

Quote:

Originally Posted by Malceski09 (Post 1896032)
would this work on 3.7?

Since its just some edits, im pretty sure it would work;)

Malceski09 10-07-2009 08:26 AM

cheers mate ill give it a go :)

JeansJoe 11-05-2009 06:58 AM

I could use some help here.
I am using this one: https://vborg.vbsupport.ru/showthread.php?t=207742
and I want to have a special background for girls on my forums. So it is not based on a usergroup but on a field.

My coding skills are just too low for that - can someone tell me how to state the if statement for this one?

Mobo 11-05-2009 02:56 PM

My coding skills are crap, but you could create a usergroup for only the girls and then use either the search for user function based on the gender field (if it is a profile field I think) and then manually move all the girls over to the new usergroup. There is also a query you can run to return all users that have filled out a certain field. I can look that up and post it if it will help you. Good luck getting it automated though.

JeansJoe 11-05-2009 05:51 PM

Quote:

Originally Posted by Mobo (Post 1910599)
My coding skills are crap, but you could create a usergroup for only the girls and then use either the search for user function based on the gender field (if it is a profile field I think) and then manually move all the girls over to the new usergroup. There is also a query you can run to return all users that have filled out a certain field. I can look that up and post it if it will help you. Good luck getting it automated though.

I think there must be already a query running as in the postbit there is an image displayed for the gender. my users have to fill out this field btw - so they are either man or woman (sorry for disrespecting transvestites :D ). and if not there would still be the else case.

I could of course move all women to a usergroup - then again this is exactly what I am trying to avoid - would take insanely long and require constant work on it.
I think the postbit query is supposed to already query that profile field - just like the usergroup for the user. So I think there must be a variable for that.

that post might still help me - if you could look it up that'd be great!

Mobo 11-05-2009 07:23 PM

It seems like you might be able to edit the code from the other mod to just call and post the CSS class from this mod... some deep searching around the net might yield you enough info to hack it yourself. If all else fells, you could hire someone to do it for you via the Rent A Coder site. I've personally had good luck there and the site really protects the buyer from getting ripped off from a coder.

Anyway, here is the link to the query I was talking about... not a lot there, but maybe some help.

JeansJoe 11-06-2009 09:57 AM

I managed it!!!

check out this post: https://vborg.vbsupport.ru/showpost....8&postcount=52
Don't forget the additional /if to close each group!

This one:
Code:

<if condition="is_member_of($post, 1)">
has to be:
Code:

<if condition="$post[field5] == 'Girl'">
Whereas field 5 is the number of the profile field and the string Girl is the Value of that Field!
If you use boolean stuff like true false you should do it different. you can also use != for is not.

btw this mod is marked as not working for 3.8.4 - it totally works on 3.8.4!!!

Mobo 11-06-2009 10:54 AM

Glad you got it worked out, thinking about this more, it might actually help me automate my setup. Thanks for posting your findings.

Mobo 11-06-2009 11:08 AM

In order to get this to work with my setup, I need two profile fields filled in. Is it possible to string two if conditions together with some thing like "AND"

Mobo 11-06-2009 11:28 AM

Found it! If you need it to check the condition of two fields, here is what you need...

Code:

<if condition="$post[field#] == 'Option'">
<elseif condition="$post[field#] == 'Option'">
        <td class="postbitbg7" width="175" style="border: $stylevar[cellspacing]px solid $stylevar [tborder_bgcolor]; border-top: 0px; border-bottom: 0px id="td_post_$post[postid]">
        <else />

You need to change the red # to the field number you want to use as well as the red Option, which is the text for that feld.

sisterhood 01-22-2010 05:46 PM

Plz how make it in VB 4.01 ?

a9eel 01-22-2010 06:21 PM

thn

Fastbird 01-22-2010 10:49 PM

Quote:

Originally Posted by sisterhood (Post 1963642)
Plz how make it in VB 4.01 ?

Go look in the correct mod forum and you will see I've already ported it.


All times are GMT. The time now is 01:36 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.01326 seconds
  • Memory Usage 1,830KB
  • 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
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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