View Full Version : Show Thread Enhancements - [OzzModz] Postbit Background For Specific Users
ozzy47
08-24-2013, 10:00 PM
Another mod brought to you by,
https://vborg.vbsupport.ru/external/2015/01/1.png
Here is a small modification you can do to have a different background in the postbit, set to specific users, in postbit legacy.
To get this to work, follow the instructions in the attached, Postbit Background For Specific Users.txt file.
I don't have any screenshots at the moment, I'll try to get some. Or if some of you use this mod, please share a screenshot of what you have done.
ozzy47
08-25-2013, 02:38 PM
Reserved.
ozzy47
08-27-2013, 11:32 PM
I see four people have marked as installed, any issues with the mod, or screenshots of how it looks on your style?
Bubble #5
09-01-2013, 12:26 AM
Looks great Ozzy :up:
I noticed that you specify postbit legacy. Will the same code work in postbit or will something blow up? :D
ozzy47
09-01-2013, 11:15 AM
It should, but I did not try it, so all I can say is see what happens, if it don't let me know and I will look into it.
Vick98
09-02-2013, 02:31 PM
Demo or image on what it looks like?
ozzy47
09-02-2013, 05:17 PM
As I stated in the first post:
I don't have any screenshots at the moment, I'll try to get some. Or if some of you use this mod, please share a screenshot of what you have done.
I would suggest installing it and then find a image you want and give it a try.
Bubble #5
09-03-2013, 01:17 AM
Ozzy, do you know of a way to have a background image appear where members type in (create) their post? Years ago there used to be a hack for this but I can't locate it.
ozzy47
09-03-2013, 01:19 AM
So you are saying, that when a member would make a post, they could add their own background to the post they made?
Bubble #5
09-03-2013, 01:33 AM
No, nothing that fancy (but good idea) :D
Where you type in the post, that area would have a image.
ozzy47
09-03-2013, 01:38 AM
Ahh, I dunno I will see what I can come up with.
As far as what I had originally said, I think it is a bad idea, as the posts could get awful ugly looking if users were allowed to add the images.
ozzy47
09-03-2013, 02:04 AM
Ok I found a way to do it, in your style open your CSS templates, then find editor.css.
Find this bit of code:
.texteditor.forum .cke_skin_kama textarea.cke_source,
.texteditor.forum textarea {
color: {vb:stylevar editor_text_color};
font: {vb:stylevar postbit_font};
white-space:pre-wrap;
background: {vb:stylevar editor_background};
}
Replace it with this:
.texteditor.forum .cke_skin_kama textarea.cke_source,
.texteditor.forum textarea {
color: {vb:stylevar editor_text_color};
font: {vb:stylevar postbit_font};
white-space:pre-wrap;
background-color: {vb:stylevar editor_background};
background: url(images/chain_gradient.jpg); no-repeat;
}Of course change chain_gradient.jpg to your image that you want to use. And load your image that you want to use to your images folder.
ozzy47
09-03-2013, 03:13 AM
Actually not that I think about it, you can have a background image in the editor by editing the stylevar, editor_background by entering the following in the Background Image field:
url(images/chain_gradient.jpg)
Of course change chain_gradient.jpg to your image that you want to use. And load your image that you want to use to your images folder.
heyzeus909
09-09-2013, 06:08 PM
Rather than individual members, can usergroup (s) be employed? For example, I could see using this to watermark postbits with a 'Subscriber' logo for members with paid subscriptions. The idea would be that once someone subscribes, they are automatically put into a "subscriber" usergroup, and thus have their postbits denoted as such. Thereby encouraging others to also subscribe.
ozzy47
09-09-2013, 08:24 PM
Rather than individual members, can usergroup (s) be employed? For example, I could see using this to watermark postbits with a 'Subscriber' logo for members with paid subscriptions. The idea would be that once someone subscribes, they are automatically put into a "subscriber" usergroup, and thus have their postbits denoted as such. Thereby encouraging others to also subscribe.
Sure I believe this will work for usergroups.
Change the following line, which is the fist bit in the code.
<vb:if condition="in_array($post['userid'], array(X,X,X))">
To this:
<vb:if condition="is_member_of($post, X,X,X)">
X being the usergroupid, if that does not work let me know and I will test it out.
ozzy47
10-10-2013, 11:08 AM
There is no real update, I just removed the code from the first post, and put it into a txt file.
yardimpaylas
10-24-2013, 10:50 PM
Very good thanks :)
ozzy47
10-24-2013, 10:51 PM
Very good thanks :)
Thanks, don't forget to mark as installed if you are using it. :)
Cusski
11-04-2013, 02:31 PM
You can see this on default skin in any of the threads here http://www.sattvhelp.com/forum/forumdisplay.php/9-Other-news
Cusski
11-04-2013, 02:53 PM
Sure I believe this will work for usergroups.
Change the following line, which is the fist bit in the code.
<vb:if condition="in_array($post['userid'], array(X,X,X))">
To this:
<vb:if condition="is_member_of($post, X,X,X)">
X being the usergroupid, if that does not work let me know and I will test it out.
I have edited in this way, to change from the userid of our bot, to the usergroup that contains the bot, and it works fine
ozzy47
11-04-2013, 07:20 PM
Good deal, thanks for reporting back. :)
thetechgenius
07-21-2014, 08:57 PM
If you want to use Usergroup ID's instead of User ID's, use this code:
<vb:if condition="in_array($post['usergroupid'], array(X,X,X))">
It has worked for me.
ozzy47
07-21-2014, 10:58 PM
If you want to use Usergroup ID's instead of User ID's, use this code:
<vb:if condition="in_array($post['usergroupid'], array(X,X,X))">
It has worked for me.
What about what I posted on post 15, https://vborg.vbsupport.ru/showpost.php?p=2444487&postcount=15
Avros
10-14-2014, 08:25 PM
This is a great mod and many thanks
ozzy47
10-14-2014, 09:24 PM
Don't forget to mark as installed. :)
dolus
11-03-2014, 09:31 AM
I'm using this and changed it so that it is based on usergroup not user id.
But, is it possible to have it change image based on usergroup? Right now i have background for admin, but all the other usergroups have nothing but i want them to have different ones.
dolus
11-03-2014, 10:20 AM
Ok, it tried to change it myself. I added an additional bit to additional.css "postbit_specific_user2".
Then I added the second IF condition to the postbit_legacy template.
<div class="postdetails">
<vb:if condition="is_member_of($post, 6)">
<div class="postbit_specific_user">
<vb:else if condition="is_member_of($post, 2)" />
<div class="postbit_specific_user2">
<vb:else />
It partially works. It does show the correct background for the Usergroup ID 2, but it is not in the same position. It puts it further down the postbit legacy. I think this is because they are in seperate DIVs. Any ideas what I would need to do to fix this?
Eduardo Leon
01-31-2015, 03:48 PM
dont work in vb 4.2.2 :/
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.