vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vb3 Font Color Hack v1.0 (https://vborg.vbsupport.ru/showthread.php?t=60031)

g-force2k2 01-10-2004 10:00 PM

vb3 Font Color Hack v1.0
 
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 ].

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

Quote:

Originally Posted by eXtremeTim
any chance of a txt?

for what?

Zachery 01-11-2004 01:14 AM

Quote:

Originally Posted by SnowBot
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

MGM 01-11-2004 03:40 AM

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

Quote:

Originally Posted by Merjawy
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

idwf 01-11-2004 08:08 AM

Quote:

Originally Posted by 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

Quote:

Originally Posted by idwf
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/..._fontcolor.php

then just follow the steps through. Hope that helps :)

Cheers,
g-force2k2

idwf 01-11-2004 08:11 AM

Quote:

Originally Posted by g-force2k2
Just upload the admincp and then call it in the browser.

ie. http://yourdomain.com/forum/admincp/..._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

Quote:

Originally Posted by MetalGearMaster
very nice hack!

im guessing it'd be just as easy to do this for Username color too?

[high]* MetalGearMaster clicks Install
[/high]

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

MGM 01-11-2004 03:40 PM

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

Quote:

Originally Posted by corsacrazy
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.

Quote:

Originally Posted by MetalGearMaster
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

Quote:

Originally Posted by albibak
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/i...lor.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

Quote:

Originally Posted by albibak
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

Quote:

Originally Posted by albibak
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:

PHP Code:

    update_phrasegroups 'global' ) ;
    
update_phrasegroups 'user' ) ; 

and replace with:

PHP Code:

    update_phrasegroups 'global') ;
    
update_phrasegroups 'user') ; 

then reupload the new install_fontcolor.php to the admincp and run ONLY steps 4 and 5

ie: http://yourforum.com/admincp/install...lor.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

Code:

Ligne 61 : " . TABLE_PREFIX . "phrasetype
Ligne 64 : " . TABLE_PREFIX . "phrase
Ligne 68 : " . TABLE_PREFIX . "language


g-force2k2 01-13-2004 03:43 AM

Quote:

Originally Posted by albibak
A little remark if someone use prefix on his forum :

Open file install_fontcolor.php

Code:

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

MGM 01-13-2004 09:58 PM

Quote:

Originally Posted by 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

Quote:

Originally Posted by MetalGearMaster
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 :)

Quote:

Originally Posted by Kyle0515
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

Code:

/* 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

Quote:

Originally Posted by Oblivion Knight
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..
Code:

<!-- 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

Quote:

Originally Posted by Oblivion Knight
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

[high]* SmasherMaster hits install
[/high]

Wonderful modification, easy to install and very fun. :D

Diva 03-21-2004 02:28 AM

I look forward to the update for VB3Gold. :D


All times are GMT. The time now is 04:46 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
  • Page Generation 0.01365 seconds
  • Memory Usage 1,858KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete