Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Completely Random Font Colours For Graffiti Wall Details »»
Completely Random Font Colours For Graffiti Wall
Version: 1.00, by sabret00the sabret00the is offline
Developer Last Online: Apr 2010 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 04-27-2005 Last Update: Never Installs: 8
 
No support by the author.

Open "wall.php" and find:
PHP Code:
    $randcolor rand(1,9);
    if ( 
$randcolor == $color ImageColorAllocate($myimage2552550);
    elseif ( 
$randcolor == $color ImageColorAllocate($myimage2551650);
    elseif ( 
$randcolor == $color ImageColorAllocate($myimage25520147);
    elseif ( 
$randcolor == $color ImageColorAllocate($myimage25500);    
    elseif ( 
$randcolor == $color ImageColorAllocate($myimage255255255);            
    elseif ( 
$randcolor == $color ImageColorAllocate($myimage0255255);            
    elseif ( 
$randcolor == $color ImageColorAllocate($myimage2550255);            
    else 
$color ImageColorAllocate($myimage02550); 
and replace with
PHP Code:
    // +++ completely random colours
    
$randred rand(1,255);
    
$randgreen rand(1,255);
    
$randblue rand(1,255);

    
$color ImageColorAllocate($myimage$randred$randgreen$randblue);
    
// --- completely random colours 
now save and upload and you're done

Show Your Support

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

Comments
  #2  
Old 04-28-2005, 12:41 PM
nexialys
Guest
 
Posts: n/a
Default

would be good to add a button on the wall entry field to select a random or not... this is good feature!
Reply With Quote
  #3  
Old 04-28-2005, 12:41 PM
Vevina Vevina is offline
 
Join Date: Dec 2004
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sweet installed
Reply With Quote
  #4  
Old 04-28-2005, 07:11 PM
frankenberrie's Avatar
frankenberrie frankenberrie is offline
 
Join Date: Dec 2002
Location: N.Y.
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed
Reply With Quote
  #5  
Old 04-28-2005, 09:39 PM
vulture vulture is offline
 
Join Date: Mar 2005
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The problem on my board is that it generates too many dark colours. Fix it by having the random value from 150-255
Code:
// +++ completely random bright colours
    $randred = rand(150,255);
    $randgreen = rand(150,255);
    $randblue = rand(150,255);

    $color = ImageColorAllocate($myimage, $randred, $randgreen, $randblue);
    // --- completely random bright colours
Reply With Quote
  #6  
Old 04-29-2005, 01:37 AM
jugo jugo is offline
 
Join Date: Feb 2004
Location: Reading your emails.
Posts: 573
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks

/me installs
Reply With Quote
  #7  
Old 04-29-2005, 05:06 AM
MP3 MP3 is offline
 
Join Date: Aug 2004
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any prnt scrn??
Reply With Quote
  #8  
Old 04-29-2005, 07:55 AM
Deska's Avatar
Deska Deska is offline
 
Join Date: Aug 2002
Location: Asia
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank's for this hack!
Reply With Quote
  #9  
Old 04-30-2005, 01:26 AM
MPDev's Avatar
MPDev MPDev is offline
 
Join Date: Oct 2003
Location: Virginia
Posts: 885
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

While developing the Wall I found that random colors didn't render well and I got alot of purple or brown even when it was trying to render some off yellow color. Sticking close to primaries will ensure as close as possible colors.
Reply With Quote
  #10  
Old 04-30-2005, 05:39 AM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MPDev
While developing the Wall I found that random colors didn't render well and I got alot of purple or brown even when it was trying to render some off yellow color. Sticking close to primaries will ensure as close as possible colors.
i've been playing with this, it's a matter of php's favouritism to certain numbers, i've been trying to circumvent this with
PHP Code:
    $randred mt_rand(1,255);
    
$randgreen ceil(rand(1,85) + ceil(rand(1,170) / 2) + rand(1,85));
    
$randblue ceil(rand(1,510) / 2); 
but really i'm just playing with it.
Reply With Quote
Reply

Thread Tools

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 09: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.04680 seconds
  • Memory Usage 2,303KB
  • Queries Executed 23 (?)
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
  • (1)bbcode_code
  • (3)bbcode_php
  • (1)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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (10)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_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