Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[release] Filburt's Fun Shadow System Details »»
[release] Filburt's Fun Shadow System
Version: 1.00, by filburt1 filburt1 is offline
Developer Last Online: May 2007 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 11-13-2002 Last Update: Never Installs: 1
 
No support by the author.

Author: filburt1
Description: Given a plethora of parameters, generates a PNG image with shadowed text in it.
Demo: http://www.turtletips.com/testing/cr...e&skipshadow=0 (I told you, plethora of parameters )
Screenshot: http://www.vbulletintemplates.com/mo...=&postid=15585 . This image was generated by the demo URL above.

You need PHP with the GD library for this to work. I think this is standard for Unix and OS X, but it isn't for Windows.

If you look at my forums (see sig) there's a universal virtual light coming from 90? (i.e., exact center-top of the screen). Therefore all text and images have shadows accordingly for consistancy.

You can make shadowed text via CSS/HTML, but it will look horrible. The first method, just making two layers, produces just too plain a look. The second, a Microsoft DirectX filter, only works in IE5.5+ and looks absolutely horrible in Windows XP with ClearType.

So, the attached script generates PNG images with shadowed, antialiased text. It's reasonably well commented too if you want to modify it.

Look at the sample URL for how to state parameters. The available parameters are:
Code:
// $bgfile as the background
// $color as the font color
// $shadowcolor as the color of the shadow in HTML hex color format (no leading #)
// $fontname as the TTF filename
// $fontsize as the font's size (note: shouldn't exceed 100px-y!)
// $s as the actual string to display
// $skipshadow (optional) as a flag to disable the shadow
English:
Quote:
bgfile: a .png (must be .png, no .gif, .jpg, etc!) image to use as the background
color: a hex code for the font color without a leading # (000000 is black, FF0000 is red, FFFFFF is white, etc.)
shadowcolor: same as color but used for the shadow color instead
fontname: the filename of a .ttf (true type font) file to use. Your fonts are in C:\Windows\Fonts, just upload the one you want
fontsize: the size of the font to use (not sure if PHP's GD library uses points or pixels for this)
s: the text to actually write
skipshadow: skips rendering the shadow and just draws only the text
There are no template modifications with this release; rather it is a starting point for making all sorts of crazy modifications. Whenever you want to generate an image and display it in a template, just do:
Code:
<img src="createshadowedimage.php?parameters...">
Just remember that like any URL you have to escape strings; i.e., "Some Category" would have to be "Some%20Category" because spaces aren't allowed in URLs.

And finally, this is clearly not a release for the weak. Questions will be answered but I have to assume that you have at least some knowledge of what the hell I'm rambling about.

Show Your Support

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

Comments
  #2  
Old 11-14-2002, 12:15 AM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Forgot the four (!) most important ones:
Code:
// $textoffsetpxx is the x-offset of the main text in pixels
// $textoffsetpxy is the y-offset of the main text in pixels
// $shadowoffsetpxx is the x-offset of the shadow relative to the main text
// $shadowoffsetpxy is the y-offset of the shadow relative to the main text
English:
Quote:
textoffsetpxx: the number of pixels from the left edge horizontally of the image to draw the text
textoffsetpxy: Same as textoffsetpxx, but pixels from the top edge vertically
shadowoffsetpxx: The number of pixels relative to textoffsetpxx horizontally to shift the shadow. For example, -3 would be three pixels to the left. 8 would be 8 to the right. 0 would be no shift.
shadowoffsetpxy: Same as shadowoffsetpxx but a vertical shift. Negative is up, positive is down.
Screenshot:
Reply With Quote
  #3  
Old 11-14-2002, 12:19 AM
TDS
Guest
 
Posts: n/a
Default

cool
when I breath life back into my fourms I'll probaly use this
Reply With Quote
  #4  
Old 11-14-2002, 01:11 AM
Bungie's Avatar
Bungie Bungie is offline
 
Join Date: Jun 2002
Location: My Home
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Neat, I will find this again when it's not so late....
Reply With Quote
  #5  
Old 11-14-2002, 01:47 AM
Cypher720's Avatar
Cypher720 Cypher720 is offline
 
Join Date: Aug 2002
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

weird...im not gonna use it - but it is crazy!
Reply With Quote
  #6  
Old 11-14-2002, 03:28 AM
Tony G's Avatar
Tony G Tony G is offline
 
Join Date: Nov 2001
Location: Melbourne, Australia
Posts: 8,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Some nice work there filburt.
Reply With Quote
  #7  
Old 11-14-2002, 05:50 PM
LiL pImPsTeR LiL pImPsTeR is offline
 
Join Date: Oct 2001
Location: Everywhere
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

looks kinda complicated, i might try it out one of these days, good work man.
Reply With Quote
  #8  
Old 11-20-2002, 04:11 PM
imported_Mathiau imported_Mathiau is offline
 
Join Date: Oct 2002
Location: Costa Rica and some time good ol home toronto
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

definetly looks sweet! gonna haev to try this one out!
Reply With Quote
  #9  
Old 11-22-2002, 11:57 AM
imported_N!ck imported_N!ck is offline
 
Join Date: Nov 2002
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if i don't have GD, it will just come up blank, right?

i've been told i have GD, but that's what happens.
Reply With Quote
  #10  
Old 11-22-2002, 12:02 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you don't have GD then you'll get PHP errors; if you do and it comes up blank then you screwed up in the arguments or the .png you gave it.
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 04:01 AM.


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.04525 seconds
  • Memory Usage 2,290KB
  • 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
  • (3)bbcode_code
  • (2)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