![]() |
Post Background Color
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 https://vborg.vbsupport.ru/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 |
Reserved
|
Nice work mate :)
|
Very nice I will install.
|
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. |
Quote:
Quote:
Will remove this when i come back. |
Error
Code:
$mh_pbc_color_scheme_picker_options .= "<option value=\"$mh_pbc_colorschemeid\" $selected><span style=\"background-color: $colorscheme[colorcode]\">A </span> $colorscheme[title]</option>"; Code:
$mh_pbc_color_scheme_picker_options .= "<option value=\"$mh_pbc_colorschemeid\" $selected><span style=\"background-color: $colorscheme[colorcode]\">A </span>$colorscheme[title]</option>"; |
Attached is the product XML with the above fix done to it.
|
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. |
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 :() |
Oops i got my dates wrong, add 1 day to each date in changelog :D
|
pfft. No "Thanks Applehat for pointing this out"
haha, jk. Will update now. |
Lol was a bit in a hurry posting the update.
Ofcourse no fixes without people reporting bugs, so thanks applehat (lol what a name). |
Does anybody have an example of a good usage for this hack?
|
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 :-) |
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")? |
Just try'd...nope :-P
|
Also, this works fine in 3.5.2...so you can update the hack info.
|
Quote:
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 ;)
|
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. |
Quote:
Install version 1.03 and try for example: Code:
#869BBF url(images/gradients/gradient_tcat.gif) repeat-x top left Code:
#869BBF url(images/misc/vbulletin3_logo_grey.gif) repeat-x top left |
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 |
Quote:
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 |
Quote:
Quote:
Quote:
Quote:
|
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 ? ;) |
I have tried installing this but not working for me :(
So after trying to un-install the product I am getting this error: Code:
Database error in vBulletin 3.5.4: |
^^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)
|
Quote:
|
Did you try reverting your templates?
|
Quote:
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 :( |
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.
|
Quote:
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): PHP Code:
- Save the product (use the bottom Save button!) Uninstall again. |
Which code do I need to replace?
Uninstall code version 1.00 Code:
// Drop mh_pbc_colorscheme Code:
// Drop mh_pbc_colorscheme Code:
// Clean Datastore |
Quote:
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. |
Quote:
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 :) |
That looks more like a server config problem. What happens if you try to save it without making a change?
|
Quote:
I just tried and I receive the same page not found :( Is there anyway I can fix this? Thank you for your help |
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. |
Quote:
Its was something to do with the mod_security setup on the server and they have sorted it all and everything is good :) Thanks |
All times are GMT. The time now is 05:49 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|