Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Post Background Color Details »»
Post Background Color
Version: 1.03, by Marco van Herwaarden Marco van Herwaarden is offline
Developer Last Online: Dec 2010 Show Printable Version Email this Page

Version: 3.5.2 Rating:
Released: 12-05-2005 Last Update: 07-16-2006 Installs: 40
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

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 &nbsp 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

Show Your Support

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

Comments
  #32  
Old 07-16-2006, 04:13 PM
Nathan2006's Avatar
Nathan2006 Nathan2006 is offline
 
Join Date: Feb 2006
Location: UK
Posts: 862
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by chkdgate
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
Reply With Quote
  #33  
Old 07-16-2006, 05:45 PM
chkdgate's Avatar
chkdgate chkdgate is offline
 
Join Date: Jun 2006
Location: US
Posts: 264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #34  
Old 07-17-2006, 12:18 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nathan2006
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:
 
Invalid SQL:
ALTER TABLE post DROP COLUMN mh_pbc_colorschemeid;
 
MySQL Error  : Can't DROP 'mh_pbc_colorschemeid'; check that column/key exists
Error Number : 1091
Date         : Saturday, July 15th 2006 @ 08:48:54 PM
Script       : http://www.************.com/admincp/plugin.php
Referrer     : http://www.************.com/admincp/plugin.php?do=productdelete&productid=mh_pbc&s=
IP Address   : ************
Username     : ****
Classname    : vb_database
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):
PHP Code:
// Clean Datastore
$vbulletin->db->query_write("DELETE FROM " TABLE_PREFIX "datastore WHERE title = 'mh_pbc'"); 
- 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.
Reply With Quote
  #35  
Old 07-17-2006, 12:31 PM
Nathan2006's Avatar
Nathan2006 Nathan2006 is offline
 
Join Date: Feb 2006
Location: UK
Posts: 862
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Which code do I need to replace?

Uninstall code version 1.00

Code:
// Drop mh_pbc_colorscheme
$vbulletin->db->query_write("DROP TABLE " . TABLE_PREFIX . "mh_pbc_colorscheme");
 
// Drop mh_pbc_stylecolor
$vbulletin->db->query_write("DROP TABLE " . TABLE_PREFIX . "mh_pbc_stylecolor");
 
// Drop usergroup permissions
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "usergroup DROP COLUMN mh_pbc_permissions");
// Clean Datastore
$vbulletin->db->query_write("DELETE FROM" . TABLE_PREFIX . "datastore WHERE title = 'mh_pbc'");
Replace this:
Code:
// Drop mh_pbc_colorscheme
$vbulletin->db->query_write("DROP TABLE " . TABLE_PREFIX . "mh_pbc_colorscheme");
With this: ?
Code:
// Clean Datastore 
$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "datastore WHERE title = 'mh_pbc'");  
If I'm doing it right I get a page cannot be found?
Reply With Quote
  #36  
Old 07-18-2006, 04:38 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Marco van Herwaarden
- Change the uninstall for version 1.00 (the first row) to contain only (overwrite the current code):
PHP Code:
// Clean Datastore
$vbulletin->db->query_write("DELETE FROM " TABLE_PREFIX "datastore WHERE title = 'mh_pbc'"); 

- 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.
Reply With Quote
  #37  
Old 07-18-2006, 04:54 PM
Nathan2006's Avatar
Nathan2006 Nathan2006 is offline
 
Join Date: Feb 2006
Location: UK
Posts: 862
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Marco van Herwaarden
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
Reply With Quote
  #38  
Old 07-19-2006, 02:22 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That looks more like a server config problem. What happens if you try to save it without making a change?
Reply With Quote
  #39  
Old 07-19-2006, 04:07 PM
Nathan2006's Avatar
Nathan2006 Nathan2006 is offline
 
Join Date: Feb 2006
Location: UK
Posts: 862
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Marco van Herwaarden
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
Reply With Quote
  #40  
Old 07-19-2006, 04:18 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #41  
Old 07-20-2006, 08:03 PM
Nathan2006's Avatar
Nathan2006 Nathan2006 is offline
 
Join Date: Feb 2006
Location: UK
Posts: 862
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Marco van Herwaarden
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
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:23 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.05477 seconds
  • Memory Usage 2,333KB
  • 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
  • (2)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)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_postinfo_query
  • fetch_postinfo
  • 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