View Full Version : Post Background Color
Marco van Herwaarden
06 Dec 2005, 15:31
Post Background Color - Version 1.03b
Hack: Post Background Color
Version: v1.03b
Author: MarcoH64
Description
Create Color Schemes, set specific colors for different styles to match the styles colors the best. Give usergroups permissions to attach
a color scheme as background to a post. Great to allow Admins/Moderators to highlight important posts in a thread for example.
Features
- Create Color Schemes
- Override the default color for a Color Scheme for each Style if needed.
- User Usergroup permissions to allow/deny the use of background colors
- On posting/editing, optionally choose a background color
- Choose (vB Options) if you want the background color to be applied to the messagetext, the postbit info, or both.
- Create background images or gradients (thanks to applehat for the idea ;))
Changelog:
17-7-2006 v1.03b
- Fixed uninstall code. Space was missing in the DELETE FROMdatastore.
(if you have currently installed 1.03, then please do an overwrite install with version 1.03b prior to uninstallation. If you are already uninstalling with 1.03 and run into a SQL-error, see post http://www.vbulletin.org/forum/showpost.php?p=1032141&postcount=33 (http://www.vbulletin.org/forum/showpost.php?p=1032141&postcount=33) to fix an aborted uninstall)
7-12-2005 v1.03
- Increased size of colorcode in tables to support larger values so we can also use images and gradients
- Changed the postbit from background-color to background style attribute to support the above.
7-12-2005 v1.02
- Removed   from dropdown menu
- Fixed bug where colorscheme could not be reset to 'None' once a color was set.
5-12-2005 v1.01
- Fixed missing new column for post table in install routines.
5-12-2005 v1.00
- Initial Release
Notes
Copyright ©2005 MarcoH64
This Modification may not be redistributed in whole or significant part or changed without prior agreement of author.
Please don't forget to click Install.
If you like this work and would like to support the author, donations are always welcome at Paypal: Marcoh64 AT gmail.com
Marco van Herwaarden
06 Dec 2005, 15:31
Reserved
Alan @ CIT
06 Dec 2005, 15:33
Nice work mate :)
Flow Fusion
06 Dec 2005, 16:54
Very nice I will install.
Marco van Herwaarden
06 Dec 2005, 18:15
Did you also add some color schemes?
PS I will be gone out of the country in an hour, so i won't be able to give more support until next week.
Marco van Herwaarden
06 Dec 2005, 19:08
lol, now I get this error..
Database error in vBulletin 3.5.1:Install code was missing a new column in the post table. Version 1.01 with updated install code released. Just do an overwrite install.
Also, my dropdowns are showing up as:
 Highlight
 Warning
Sorry no time to look into this anymore. It is probably a left over from an attampt to show the colors in the dropdown (which didn't work, somehow the colors didn't show).
Will remove this when i come back.
apdcanari
06 Dec 2005, 20:03
Error
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Change
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
applehat
06 Dec 2005, 21:07
Attached is the product XML with the above fix done to it.
applehat
06 Dec 2005, 21:17
BUG: If you try and turn it back to NONE, it will not let you.
A Temp. Fix would be to add your alt2 (or alt 1) color as a selection called Default or something to that extent.
Marco van Herwaarden
07 Dec 2005, 08:54
Version 1.02 released:
6-12-2005
- Removed   from dropdown menu
- Fixed bug where colorscheme could not be reset to 'None' once a color was set.
5-12-2005 v1.01
- Fixed missing new column for post table in install routines.
5-12-2005 v1.00
- Initial Release
(Yes i still have not left for my trip :()
Marco van Herwaarden
07 Dec 2005, 08:54
Oops i got my dates wrong, add 1 day to each date in changelog :D
applehat
07 Dec 2005, 21:03
pfft. No "Thanks Applehat for pointing this out"
haha, jk. Will update now.
Marco van Herwaarden
07 Dec 2005, 21:08
Lol was a bit in a hurry posting the update.
Ofcourse no fixes without people reporting bugs, so thanks applehat (lol what a name).
Marco van Herwaarden
07 Dec 2005, 21:10
Does anybody have an example of a good usage for this hack?
applehat
07 Dec 2005, 21:12
haha....I thought it was cool, but have not used it yet....
Maby to highlight some post? Like I run a board with Indoor Tanning information, and i could use it to highlight usefull posts or something.
Realy dont know, just looked cool :-)
applehat
07 Dec 2005, 21:15
You know what would be a nice add on? Not just being able to set a background color, but being able to set a background image...and how to repeat and align it...
Or can this already be done by doing url("blah")?
applehat
07 Dec 2005, 21:17
Just try'd...nope :-P
applehat
07 Dec 2005, 21:19
Also, this works fine in 3.5.2...so you can update the hack info.
Marco van Herwaarden
07 Dec 2005, 21:35
haha....I thought it was cool, but have not used it yet....
Maby to highlight some post? Like I run a board with Indoor Tanning information, and i could use it to highlight usefull posts or something.
So you're going to Tan some posts. :D
Lol i made this after someone was requesting/talking about this a couple of weeks ago. More just as an excercise. I can't even find the thread of the user who was once requesting it.
A background image? cool ;)
Marco van Herwaarden
07 Dec 2005, 21:55
Version 1.03 released:
7-12-2005 v1.03
- Increased size of colorcode in tables to support larger values so we can also use images and gradients
- Changed the postbit from background-color to background style attribute to support the above.
To upgrade, simply choose an overwrite install.
Marco van Herwaarden
07 Dec 2005, 21:57
You know what would be a nice add on? Not just being able to set a background color, but being able to set a background image...and how to repeat and align it...
Or can this already be done by doing url("blah")?
It does now. :D
Install version 1.03 and try for example:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
or:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Reeve of shinra
03 Feb 2006, 03:58
2 stupid questions:
- will this work on the latest version?
- does this mean I can set a different background for usergroups a, b, c & d? Can I prevent the user changing that?
Okay I liked one more:
- I plan to use this with secondary usergroups, how will that work?
Registered = style a
|-- public usergroup b = style b
|-- public usergroup c = style c
Can I have a default in case of conflict like them being part of 2 usergroups?
thanks
It does now. :D
Install version 1.03 and try for example:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
or:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
??????
is this suppose to allow the allowed usergroup to use an IMaGe instead of colors ?
if so, where are we supposed to add/put this ?
or what needs to be edited to have that option
( make instruction n00b proof ) :)
Thanks in advance
Marco van Herwaarden
03 Feb 2006, 09:16
- will this work on the latest version?Not tested by me, but i see no reason why not.
- does this mean I can set a different background for usergroups a, b, c & d? Can I prevent the user changing that?It should merge the permissions to use Color Schemes if using seconday usergroups. Not tested this now since i am not at my development PC.
Can I have a default in case of conflict like them being part of 2 usergroups?There is no option to force a (default) color. Default is always None, in which case it will be a regular post.
is this suppose to allow the allowed usergroup to use an IMaGe instead of colors ?Yes you can use this to put a simple background color, an image or even a gradient. This is plain HTML, sorry i can't help you much with that since my HTML knowledge is also limited. Maybe someone else can post some nice examples.
Im trying to edit to allow user to add an image from a URL as background in post
< no success *sighs* >
where are the HTML geeks ? ;)
Nathan2006
16 Jul 2006, 01:52
I have tried installing this but not working for me :(
So after trying to un-install the product I am getting this error:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Thank you for any help :)
chkdgate
16 Jul 2006, 08:57
^^I'm interested in this as well but didn't the author mention that he wasn't sure it worked on the latest version?(3.5.4)
Nathan2006
16 Jul 2006, 15:08
^^I'm interested in this as well but didn't the author mention that he wasn't sure it worked on the latest version?(3.5.4)
Yeah Im not sure but it does not work for me on 3.54 and I cannot remove the product now :(
chkdgate
16 Jul 2006, 18:04
Did you try reverting your templates?
Nathan2006
16 Jul 2006, 18:13
Did you try reverting your templates?
Hi,
before I make any changes to code I always take a full copy of the
code then if I get any problems I just delete all the code from
the template and replace it all with the original code ;)
This is something to do with the uninstall of the product not he templates :(
And because I am not a coder I don't know how to uninstall it :(
chkdgate
16 Jul 2006, 19:45
PM the author of this hack. I don't want to tell you to do something and then mess up your board. Let me know what happens.
Marco van Herwaarden
17 Jul 2006, 14:18
I have tried installing this but not working for me :(
So after trying to un-install the product I am getting this error:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Thank you for any help :)I have looked into this and there is a space missing from one of the uninstall steps causing a SQL-error. The error you quoted however can only happen if you try to uninstall twice. You would have gotten a different error the first time.
To fix your current situation (this only applies if you tried to uninstall twice, will upload a fixed version in a few minutes for those that still have to start uninstallation), do the following:
Go to AdminCP->Plugin System->Manage Products, then:
- Select 'Edit' from the dropdown menu behind the Post Background Color product.
- On the edit page you will find 3 rows with each 2 columns with install/uninstall code.
- The right column contains the uninstall codes
- Change the uninstall for version 1.00 (the first row) to contain only (overwrite the current code):
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
- Remove all the code from the version 1.01 uninstall code box (right column, second row)
- Save the product (use the bottom Save button!)
Uninstall again.
Nathan2006
17 Jul 2006, 14:31
Which code do I need to replace?
Uninstall code version 1.00
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Replace this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
With this: ?
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
If I'm doing it right I get a page cannot be found?
Marco van Herwaarden
18 Jul 2006, 18:38
- Change the uninstall for version 1.00 (the first row) to contain only (overwrite the current code):
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
- Remove all the code from the version 1.01 uninstall code box (right column, second row)
I don't understand how you can get confused.
When finished, the first row of uninstall code should only contain that delete from datastore, and the second and third unstill rows should be empty.
Nathan2006
18 Jul 2006, 18:54
I don't understand how you can get confused.
When finished, the first row of uninstall code should only contain that delete from datastore, and the second and third unstill rows should be empty.
Hi,
I have tried this (Screenshot 1)
Then after clicking save I get this error (Screenshot 2)
Im doing every correct.
What would happen if I installed your updated product
and tried uninstalling?
Thanks for your help :)
Marco van Herwaarden
19 Jul 2006, 16:22
That looks more like a server config problem. What happens if you try to save it without making a change?
Nathan2006
19 Jul 2006, 18:07
That looks more like a server config problem. What happens if you try to save it without making a change?
Hi,
I just tried and I receive the same page not found :(
Is there anyway I can fix this?
Thank you for your help
Marco van Herwaarden
19 Jul 2006, 18:18
Then it is very likely that it is a server issue.
Please try first by turning off GZip compression in your vBulletin Options.
Other things that might cause something like this:
- A .htaccess rewrite rule playing games
- mod_security settings if this is installed
- memory settings (doubt it in this case)
I very much doubt that this got anything to do with this modification. Can you (fake) edit other products? Are you having more problems with sometimes getting this kind of errors.
Nathan2006
20 Jul 2006, 22:03
Then it is very likely that it is a server issue.
Please try first by turning off GZip compression in your vBulletin Options.
Other things that might cause something like this:
- A .htaccess rewrite rule playing games
- mod_security settings if this is installed
- memory settings (doubt it in this case)
I very much doubt that this got anything to do with this modification. Can you (fake) edit other products? Are you having more problems with sometimes getting this kind of errors.
I got it sorted :)
Its was something to do with the mod_security setup on the server
and they have sorted it all and everything is good :)
Thanks
is it possible to have this setup to change the backgrond automatically every second post.
Not making it user changable tho
Marco van Herwaarden
21 Dec 2007, 11:38
No, this modification is not intended for that.
Derek Chai
12 Jan 2008, 18:38
Possible for vB 3.7? It's
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Instead of <td class="alt2" width="175">
TCE Killa
23 Feb 2008, 18:29
Can this be updated to 3.6.X please? I got everything working on my 3.6.8 version, just can't change the Usergroup Permissions. But everything is there.... Maybe there is away to add the Usergroup Permissions in the Plug-Ins? Thanks.
Scamorz
17 Mar 2008, 13:09
How i can make it compatible with 3.6.8 version???!
Ok I have this on 3.7, but how do I add colors? I don't understand that part in the directions.
Marco, any plans on updating this to work with vBulletin 3.7.X? Or do you know it will work already?
Thanks
TimberFloorAu
12 Jul 2008, 23:19
This does work for 3.7.2
In postbit legacy you just need to tweak the settings if you use custom style.
Still perplexed as to Gradients and Images
I will try it on vB 3.7.x. :erm:
Thanks, Marco.
dnicu26
28 Sep 2008, 17:57
Can't get this to work.. I can't select the colour when posting :(.
This does work for 3.7.2
In postbit legacy you just need to tweak the settings if you use custom style.
Still perplexed as to Gradients and Images
What do you mean tweak the settings, to what?
shawn_RS
05 Oct 2008, 00:07
The drop-down menu is not appearing....how do I fix this?
Marcus_Fenix
16 Dec 2008, 13:25
Ah, a small kick from me, because I'm having the same problem. Any clues?
laytonw
28 Mar 2009, 05:17
Did you also add some color schemes?
PS I will be gone out of the country in an hour, so i won't be able to give more support until next week.
Will this work on 3.8?
Layton
Is there anyway we could put this on 4.0?
JohnMcClane
15 Apr 2010, 15:13
Anyway this can be done for vb4? An option to only display on certain conditions would be perfect. Users birthday?
Prohibit
26 Oct 2010, 20:49
Also looking for this on 4 :)
Would like a moderator post color, donating member, premium member, and admin.
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.