Jump to content
THIS IS THE TEST SITE OF EUROBRICKS! ×
THIS IS THE TEST SITE OF EUROBRICKS!

Recommended Posts

Posted

Is there anyway to add a countdown to our signature for this site? I've Googled it countless times with no success. I wonder if anyone here knows a code that works for countdowns. Any help would be appreciated.

Posted

There is n real code you can enter, really. Most countdown sigs are embedded into the sig itself. You could always ask anyone who has experience in countdown banners to help you with that sort of thing.

I will see if I can find any sites to make countdowns on, but no guarantees.

Also, some countdowns are made using HTML, which, can't be used on the site, or at least not that I have tried.

Hope that helps.

-VBBN

Posted

The easiest way would be to link to an offsite dynamic picture in your signature that shows the countdown, which is a pretty simple thing to hack together. Something like this (that should count down to Christmas):

import Image
import ImageDraw
import ImageFont
from datetime import datetime
from django.http import HttpResponse

def countdown(request):
delta = datetime(2009,12,24,17) - datetime.now()
img = Image.open('background.png')
draw = ImageDraw.Draw(img)
font = ImageFont.truetype('arial.ttf', 12)
draw.text((30,30), u'%d days till Christmas' % delta.days, 'red', font)
response = HttpResponse(mimetype='image/png')
img.save(response, 'PNG')
return response

The above of course hides away a lot of gritty details, but it should be valid Python code that works with Django.

And since I had already written all the code I of course had to put it to use:

countdown.png

Actually, I think you'd be looking at a piece of JavaScript. Your best bet is probably to ask someone to write it for you, then request an admin to add it to your sig.

Pretty sure the board software will strip away any javascript from signatures, since allowing it would be a nasty security hole.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...