Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Template Modifications

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
  #12  
Old 11-22-2002, 11:04 PM
imported_N!ck imported_N!ck is offline
 
Join Date: Nov 2002
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i uploaded createshadowedtext.php along with your png (catprebg.png) and a ttf and changed your link to my URL, and still nothing.
Reply With Quote
  #13  
Old 11-22-2002, 11:17 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What's the link?
Reply With Quote
  #14  
Old 11-23-2002, 12:48 AM
imported_N!ck imported_N!ck is offline
 
Join Date: Nov 2002
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="http://www.chevystreettrucks.com/createshadowedtext.php?bgfile=catprebg.png&color=f fffff&shadowcolor=204E6B&fontname=serpentine.ttf&f ontsize=13&&textoffsetpxx=7&textoffsetpxy=5&shadow offsetpxx=0&shadowoffsetpxy=2&s=Some%20Category%20 Name&skipshadow=0" target="_blank">http://www.chevystreettrucks.com/cre...e&skipshadow=0</a>
Reply With Quote
  #15  
Old 11-23-2002, 01:00 AM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Something's wrong with your PHP configuration: http://www.chevystreettrucks.com/cre...e&skipshadow=0

That should generate an error, most likely "imagecreatefrompng failed." It's been a few weeks since I wrote the script but I remember putting in a crapload of error traps.
Reply With Quote
  #16  
Old 01-14-2003, 04:18 AM
geniuscrew's Avatar
geniuscrew geniuscrew is offline
 
Join Date: Nov 2001
Location: UK
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks great but I'm stuck on what to do.

Can you please give us a sample link? parameters doesn't show how it's meant to be layed out [for me anyway]

Thanks in advance.
Reply With Quote
  #17  
Old 01-14-2003, 01:28 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There's already a demo link, just examine that.
Reply With Quote
  #18  
Old 01-14-2003, 04:24 PM
geniuscrew's Avatar
geniuscrew geniuscrew is offline
 
Join Date: Nov 2001
Location: UK
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Doh! Sorry I didn't see that -

Cheers!
Reply With Quote
  #19  
Old 01-30-2003, 03:51 PM
Orfejs's Avatar
Orfejs Orfejs is offline
 
Join Date: Sep 2002
Location: In your mind
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If I only had a GD library. I tried to make this hack myself 2 years ago - but failed. Now you did it even better. Will explore it later. Great.
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 03:30 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.04476 seconds
  • Memory Usage 2,278KB
  • 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
  • (2)bbcode_code
  • (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
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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