View Full Version : vb3 Font Color Hack v1.0
g-force2k2
01-10-2004, 10:00 PM
Well my second one is in now, and I'm happy with its results :)
What does this hack do?
It enables your users to set their posts to display as a certain color.
Also comes equipped with an override feature that you can turn on or off to not view other members' font colors.
Hack comes with installer, un-installer, uses bitwise permissions for the override, and comes fully vbphrased.
What to do?
Queries to Run: (7)
File Modifications: (4)
Template Modifications (1)
Update
A Modification for a selection of colors from which the user can choose from is located [ HERE (https://vborg.vbsupport.ru/showthread.php?p=460444#post460444) ].
And don't forget to enjoy.
upload the install_fontcolor.php to admincp directory and run for complete installation and steps.
Any comments, feedback, suggestions, etc. are welcomed. Please remember to respect my work and I would appreciate if you clicked install.
Screenshots and zip attached below.
Cheers,
g-force2k2
MindTrix
01-10-2004, 11:49 PM
**claps** calm down on the hacks mate, your making everyone else look bad :)
Only joking, give us more!!!
eXtremeTim
01-11-2004, 12:15 AM
any chance of a txt?
SnowBot
01-11-2004, 01:06 AM
any chance of a txt?
for what?
Zachery
01-11-2004, 01:14 AM
for what?
an installer is way better than txt >.< esp if theres insertion of phrases and the lot
monstergamer
01-11-2004, 01:22 AM
i have done something like this (on my site -->) http://www.monstergamer.net/vb/showthread.php?t=1838 except no Queries + not much editing, i have Glow on mine aswell
all editable from the user profile
Merjawy
01-11-2004, 01:39 AM
Nice hack, thnx
I have one comment though
instead of the color codes or maybe along with it.. can you ad the color image?
like #ffffff <white image>
maybe a drop down list
I just noticed you can use the name of colors which is great but still think adding the colors list is a great idea even if its just to give the name/code
as many users do not really know colors by code :)
thnx again
very nice hack!
im guessing it'd be just as easy to do this for Username color too?
/me clicks Install
MGM out
g-force2k2
01-11-2004, 08:05 AM
Nice hack, thnx
maybe a drop down list
thnx again
Created A Modification To Allow For The Select Option for Colors.
It requires a template modification to my code in the modifyoptions template and requries another modification to the profile.php
I did not test this so if you could that would be great.
Attached below is a zip containing a file ( admincolor.php ) upload to your admincp and it will help you create the template modification to contain the list you are looking for. It's pretty easy so you don't have to waste time coding it in. See the screenshots for an example.
From typing in the code in the second screenshot you get the template modification of the first screenshot.
Cheers,
g-force2k2
Created A Modification To Allow For The Select Option for Colors.
It requires a template modification to my code in the modifyoptions template and requries another modification to the profile.php
I did not test this so if you could that would be great.
Attached below is a zip containing a file ( admincolor.php ) upload to your admincp and it will help you create the template modification to contain the list you are looking for. It's pretty easy so you don't have to waste time coding it in. See the screenshots for an example.
From typing in the code in the second screenshot you get the template modification of the first screenshot.
Cheers,
g-force2k2
nice hack! But, these installers, how do i use them?
g-force2k2
01-11-2004, 08:10 AM
nice hack! But, these installers, how do i use them?
Just upload the admincp and then call it in the browser.
ie. http://yourdomain.com/forum/admincp/install_fontcolor.php
then just follow the steps through. Hope that helps :)
Cheers,
g-force2k2
Just upload the admincp and then call it in the browser.
ie. http://yourdomain.com/forum/admincp/install_fontcolor.php
then just follow the steps through. Hope that helps :)
Cheers,
g-force2k2
thanks :) nice job :) *install*
g-force2k2
01-11-2004, 08:14 AM
very nice hack!
im guessing it'd be just as easy to do this for Username color too?
* MetalGearMaster clicks Install
MGM out
It shouldn't be too hard. Where I have the $post['message'] modified just do the same with the $post['username'].
I will look into the variables and give you a definate answer though.
Regards,
g-force2k2
alright thanks, that would help, but if you can't that's fine, I'm sure I can do it myself (I'm not THAT much of a newbie... and once I DO figure it out, I may release it as a hack...... can I have permission to use some of your code though?)
MGM out
corsacrazy
01-11-2004, 03:45 PM
can u set and disable this feature per usergroup ?
g-force2k2
01-11-2004, 08:32 PM
can u set and disable this feature per usergroup ?
It doesn't currently support bitwise usergroup permissions, but it can be made to do so, just requires so more file and template modifications and then a few queries to insert the vbsettings, very possible if you want me to do it.
alright thanks, that would help, but if you can't that's fine, I'm sure I can do it myself (I'm not THAT much of a newbie... and once I DO figure it out, I may release it as a hack...... can I have permission to use some of your code though?)
I would just make my code a function and then run the $post[username] variable through the function ( i believe the variable is actually $post[musername] ). Thats all that is required unless you wanted a different color for each the post and the username.
Cheers,
g-force2k2
albibak
01-12-2004, 03:56 PM
I have a problem with this hack.
I installed it 4 times and I have allways the same problem.
Look on my screenshot for more explaination
I have nothing on my usercp
g-force2k2
01-12-2004, 05:30 PM
I have a problem with this hack.
I installed it 4 times and I have allways the same problem.
Look on my screenshot for more explaination
I have nothing on my usercp
From what I can guess is that you used the text install, which is why I don't prefer to use text installs. In order for the text to show you need to cache the new phrases which I have done in the auto-install. In order to updated the cache run steps 4 and 5 of the installer.
ie: http://yourforum.com/forum/admincp/install_fontcolor.php?step=4
That should fix your problem.
Cheers,
g-force2k2
albibak
01-12-2004, 05:43 PM
I don't understand, sorry ...
Which phrases ?
I installed the hack by the auto installer (html)
g-force2k2
01-12-2004, 05:51 PM
Is English still the default language and you created the French language as a different languageid?
Regards,
g-force2k2
albibak
01-12-2004, 06:01 PM
Ah okay.
French language is the default language
g-force2k2
01-12-2004, 06:09 PM
Ah okay.
French language is the default language
Alright, check in the admincp if the phrases were inserted into the database just do a search for 'font_color'. If they show up then its probably the language that has to be recached, try to submit one of the entries and see if that recaches them if not I will come up with a solution.
And when you say default did it come with the French language installed OR did it come with English and you made the French phrases and then made that the default?
Regards,
g-force2k2
albibak
01-12-2004, 06:17 PM
I don't understand it : "If they show up then its probably the language that has to be recached, try to submit one of the entries and see if that recaches them if not I will come up with a solution."
I found some font_color in the phrases.
vBulletin was installed in english and I put a french language and put it by default
g-force2k2
01-12-2004, 07:39 PM
I don't understand it : "If they show up then its probably the language that has to be recached, try to submit one of the entries and see if that recaches them if not I will come up with a solution."
I found some font_color in the phrases.
vBulletin was installed in english and I put a french language and put it by default
Alright open install_fontcolor.php
find:
update_phrasegroups ( 'global' ) ;
update_phrasegroups ( 'user' ) ;
and replace with:
update_phrasegroups ( 'global', 2 ) ;
update_phrasegroups ( 'user', 2 ) ;
then reupload the new install_fontcolor.php to the admincp and run ONLY steps 4 and 5
ie: http://yourforum.com/admincp/install_fontcolor.php?step=4
is what you should run.
That will hopefully recache the French language. Let me know if this works.
Regards,
g-force2k2
albibak
01-12-2004, 07:46 PM
Yes, it's OK.
Thx a lot.
albibak
01-12-2004, 10:56 PM
A little remark if someone use prefix on his forum :
Open file install_fontcolor.php
Ligne 61 : " . TABLE_PREFIX . "phrasetype
Ligne 64 : " . TABLE_PREFIX . "phrase
Ligne 68 : " . TABLE_PREFIX . "language
g-force2k2
01-13-2004, 03:43 AM
A little remark if someone use prefix on his forum :
Open file install_fontcolor.php
Ligne 61 : " . TABLE_PREFIX . "phrasetype
Ligne 64 : " . TABLE_PREFIX . "phrase
Ligne 68 : " . TABLE_PREFIX . "language
Thanks for pointing that out, I will have to make some updates for that in the installer. Glad that we got the language problem sorted out :)
Cheers,
g-force2k2
I would just make my code a function and then run the $post[username] variable through the function ( i believe the variable is actually $post[musername] ). Thats all that is required unless you wanted a different color for each the post and the username.
Cheers,
g-force2k2
exactly what I wanted..... to have it for both font color and username color.... couldn't I just "copy" the hack and edit the templates and code to match $post[username] ??? or would it not be that simple :p
MGM out
Kyle0515
01-14-2004, 11:30 PM
Good Hack... It just so happens that the members of my board started asking for this about 3 days ago. So Thank You... :)
g-force2k2
01-15-2004, 04:56 AM
exactly what I wanted..... to have it for both font color and username color.... couldn't I just "copy" the hack and edit the templates and code to match $post[username] ??? or would it not be that simple :p
MGM out
There would be no template edits necessary unless you wanted to have different colors for the username and their post, if not then the php file edit is all thats needed, and I just said to use a function call so you wouldn't have to have as much coding :)
Good Hack... It just so happens that the members of my board started asking for this about 3 days ago. So Thank You... :)
Thanks for the feedback.
Cheers,
g-force2k2
Oblivion Knight
01-22-2004, 09:53 PM
/* vb3 Color Hack -- Copyright g-force2k 2004 */
'overridecolor' => 65536
/* vb3 Color Hack -- Copyright g-force2k 2004 */Was the commar left off the end of this line for a reason.? The lines above it all have a commar at the end of the number.. I added it myself, but I'd like confirmation whether or not it was left off intentionally.
g-force2k2
01-23-2004, 02:26 AM
Was the commar left off the end of this line for a reason.? The lines above it all have a commar at the end of the number.. I added it myself, but I'd like confirmation whether or not it was left off intentionally.
To be quite honest, according to my php knowledge the comma isn't required at the end value of an array. Commas are used to space each value of an array and will cause a php error if you do not add a comma to seperate the array values. But I do not believe it is required at the end of an array nor have I ever used one at the end value of an array. As to whether the vbulletin devs have different reasonings or as to specifically why they added the comma to the end value I do not know, you would have to confront or contact them regarding the issue. But having or not having the comma does not create a php error regardless so you can keep the comma there if you like. Hopefully that will give you some insight into the situation.
Regards,
g-force2k2
Oblivion Knight
01-23-2004, 11:55 AM
Thanks for going in to detail there g-force2k2.. :)
I'm still very much learning the ins and outs of PHP myself.
On a side note, I think this mod could do with a little updating for RC3. The code has changed somewhat in the modifyoptions template, for example each table is now collapsable.
Here's how I did it..
<!-- vb3 User Color Hack v1.0 - Copyright g-force2k2 2004 //-->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
<td class="thead">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('uopt_fcolor')"><img id="collapseimg_uopt_fcolor" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_uopt_fcolor].gif" alt="" border="0" /></a>
$vbphrase[font_color_options]
</td>
</tr>
</thead>
<tbody id="collapseobj_uopt_fcolor" style="$vbcollapse[collapseobj_uopt_fcolor]">
<tr>
<td class="panelsurround" align="center">
<div class="panel" id="collapseobj_uopt_fcolor" style="$vbcollapse[collapseobj_uopt_fcolor]">
<div style="width:$stylevar[formwidth_usercp]" align="$stylevar[left]">
<fieldset class="fieldset">
<legend><label for="sel_show_color">$vbphrase[use_font_color_title]</label></legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td>$vbphrase[use_font_color_desc]</td>
</tr>
<tr>
<td><label for="sel_show_color"><input type="text" name="fontcolor" value="$bbuserinfo[fontcolor]" size="10" id="sel_show_color" /></label></td>
</tr>
<tr>
</table>
</fieldset>
<fieldset class="fieldset">
<legend><label for="sel_override_color">$vbphrase[font_color_override_title]</label></legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td>$vbphrase[font_color_override_desc]</td>
</tr>
<tr>
<td><label for="sel_override_color"><input type="checkbox" name="options[overridecolor]" value="1" id="sel_override_color" $checked[overridecolor] /> $vbphrase[font_color_override_opt]</label></td>
</tr>
</table>
</fieldset>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<br />
<!-- vb3 User Color Hack v1.0 - Copyright g-force2k2 2004 //-->
g-force2k2
01-23-2004, 09:53 PM
Thanks for going in to detail there g-force2k2.. :)
I'm still very much learning the ins and outs of PHP myself.
On a side note, I think this mod could do with a little updating for RC3. The code has changed somewhat in the modifyoptions template, for example each table is now collapsable.
Here's how I did it..
Thanks for the tip, but I haven't the chance to look at RC2 OR RC3 yet, but I will update when I get the chance.
Cheers,
g-force2k2
NuclioN
02-13-2004, 09:03 AM
We use two styles..one dark and one light so there are colors set by users sometimes that are unreadable in 1 style. Is there a solution for this? Maybe a conditional or an addition to this hack so members can choose two colors according to the style(s)?
Reeve of shinra
02-16-2004, 12:55 AM
/me installs
The Quibbler
02-16-2004, 03:37 AM
/me clicks install
gmarik
02-22-2004, 06:50 AM
Could it make a rainbow text?
I mean every letter with some color, like a=green p=bkack p=yellow l=blue e=purple with some algorythm?
SmasherMaster
03-07-2004, 02:05 AM
* SmasherMaster hits install
Wonderful modification, easy to install and very fun. :D
I look forward to the update for VB3Gold. :D
brandy
03-21-2004, 11:59 AM
When I tried to open your installer in my browser I got this error:
Fatal error: Call to undefined function: log_admin_action() in /usr/local/etc/httpd/htdocs/doggiedoor/forums/install_fontcolor.php on line 70
Brandy
MindTrix
03-24-2004, 10:04 PM
Place the install_fontcolor.php in the AdminCP section of your FTP, and then run it
Detomah
03-25-2004, 12:03 AM
Nicely done hacks, my users will really appreciate this one. :)
*wishes there was a list of colours done to make it easier for the add-on* - but that's just me being lazy. :)
I just installed it. While the drop down box add on didnt work (it takes away the option for the member to write their own, the rest works wonderfully!!! Thanks! *clicks install*
weaver
03-27-2004, 12:12 PM
I installed this hack, but don't know where the new options are... Does it work with the newest version of VB?
Hi snobbymom. I have it installed on vb3G right now. Do you mean where to look for it? That's in the members cp under Options.
weaver
03-27-2004, 01:46 PM
Yes, that's what I meant. :) I'm running the same version of VB. I don't see it on the options page so it must not have installed correctly. ???
weaver
03-27-2004, 01:52 PM
Okay I think I realize what I did wrong. I thought it was modifying things for me in step 6. I didn't realize those were instructions for me. Sorry!
weaver
03-27-2004, 02:10 PM
It's working now. :)
weaver
03-27-2004, 02:30 PM
Update
A Modification for a selection of colors from which the user can choose from is located [ HERE ].
I'm getting this error now....
Parse error: parse error, unexpected ']', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home3/shb4_003/mysite.com/public_html/forums/profile.php(2585) : eval()'d code on line 397
weaver
03-27-2004, 02:52 PM
Figured it out. For some reason it was adding a blank option within the code. Maybe I had returned down an extra line and then hit save when entering the color options. Anyway, I took out blank option code with the empty [] and it works fine.
Sin City
04-08-2004, 08:38 AM
whenever i get to Step 4 (the language step) i get this error....
Database error in vBulletin 3.0.0:
Invalid SQL: SELECT phrasetypeid FROM phrasetype WHERE fieldname='global'
mysql error: Table 'databasename.phrasetype' doesn't exist
and then when i try to Un-Install it gives me the same error ... any ideas on how to fix this?... thanks in advance
chataus-pirate
04-21-2004, 08:47 AM
im getting the same error as above what went wrong
Sin City
04-25-2004, 06:10 AM
good luck waiting on a reply man :(
Sirius Black
05-03-2004, 12:53 AM
Great hack !! My members love it !!
*Install
moley
05-09-2004, 08:50 PM
does this hack work on vb3.0.1?
y2krazy
05-16-2004, 07:44 AM
When I installed my vB3, I told it to have vB3_ before all the table entries in the database. I had some sort of problem with the installer, and this is what error I received:
Database error in vBulletin 3.0.1:
Invalid SQL: SELECT phrasetypeid FROM phrasetype WHERE fieldname='global'
mysql error: Table 'bladest_vBulletin.phrasetype' doesn't exist
mysql error number: 1146
Date: Sunday 16th of May 2004 12:02:02 AM
Script: http://forums.bladestorm.net/admincp/install_fontcolor.php?step=5
Referer: http://forums.bladestorm.net/admincp/install_fontcolor.php?step=4
Username: XXXXXXX
IP Address: XX.XX.XXX.XXX
All help would be appreciated! :)
-y2k-
y2krazy
05-16-2004, 10:15 PM
Does the above error mean that I have to go in an edit the installer's database queries to use vB3_ as the prefix for all the tables, or what would fix this? Any help will be greatly appreciated!!
-y2k-
alastair
06-19-2004, 11:38 AM
i have a problem.
i installed it fine, everything went pretty smoothly.
but it doesnt work, at all. :confused:
i get no errors, i don't have a clue why it's not working...
Steve123
07-04-2004, 10:54 AM
Great Hack
Maybe add 2 more features..
Choose font face..
choose font size..
turbidblue
07-11-2004, 04:48 AM
awesome!!!
very easy to install!!
thanks!
*clicks install
Blam Forumz
08-16-2004, 06:58 AM
/me clicks install 0_0
Blam Forumz
03-17-2005, 08:09 AM
is it possible for it to work in this hack?
https://vborg.vbsupport.ru/showthread.php?p=626687
weaver
04-21-2005, 06:16 PM
Well I finally got around to reinstalling this since upgrading vb and I'm getting that parse error again. I've also noticed a typo in the add-on code that is generated when you enter color names and numbers. Has anyone gotten the add-on to work correctly? It worked for me last year after I tinkered with it but nothing I've done has fixed it this time.
Caligo Avalonis
04-22-2005, 04:27 PM
Well, no one seems to be answering, but I'm getting this error:
Database error in vBulletin 3.0.3:
Invalid SQL: ALTER TABLE user ADD fontcolor varchar(30) NOT NULL
mysql error: Duplicate column name 'fontcolor'
mysql error number: 1060
What should I do?
Marco van Herwaarden
04-22-2005, 06:43 PM
Then you already (partially) installed this hack.
is there a way to make this a ushop action?
CrazyLady
07-21-2005, 03:08 PM
Can any one explain why my members font color, after a few weeks, removes itself automatically leaving my members having to reset their font color?
thanks
o0Hubba0o
07-24-2005, 09:39 PM
Can any one explain why my members font color, after a few weeks, removes itself automatically leaving my members having to reset their font color?
thanks
This is great, will help alot of my members, I also added the ustore hack so onle active members have access to this option. Now I just need to figure out how to add a couple colors hehe.
VaaKo
08-01-2005, 10:25 PM
does this hack wok with vb 3.0.7?
o1dirtydog
08-16-2005, 08:53 PM
this didnt work...
o1dirtydog
08-16-2005, 11:50 PM
You know if it didn't work it would be good to elaborate. Nobody is going to have any clue if this will work for them or how to help you if you can't at least take the time to explain.
sorry...
I get this error at step 3
Database error in vBulletin 3.0.5:
Invalid SQL: ALTER TABLE vb3_user ADD fontcolor varchar(30) NOT NULL
mysql error: Duplicate column name 'fontcolor'
mysql error number: 1060
Date: Tuesday 16th of August 2005 05:44:13 PM
Script: http://emceeplanet.com/forums/admincp/install_fontcolor.php?step=3
Referer: http://emceeplanet.com/forums/admincp/install_fontcolor.php?step=2
Username: Malice
IP Address: 24.228.7.38
Yukino_AE
08-18-2005, 08:19 PM
my db for vb uses prefixes where should i insert the prefix to get the install for this to run correctly. cuz right now i'm just getting errors.
nymyth
06-12-2006, 05:58 PM
any chance for a 3.5 port of this????
Peace
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.