[Pro] Today's Date?

I just finished designing a Freeway Pro website. As part of the design I used this graphic: http://www.shutterstock.com/cat.mhtml?searchterm=calendar+day&x=20&y=11&search_group=&lang=en&search_source=search_form#id=71711458

Is there anyway to have the calendar numbered day of month automatically update with current day?

Thanks,
Kelly


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sure. One way is to re-do the image in HTML, or erase the existing
number and replace that with an HTML number centered in an HTML box
over the top of the base image. Pay attention to the name of the box
that you put the text in, and then you can update that box with
JavaScript using the visitor’s computer to do the work.

var d = new Date();
$('yourHTMLBox').down('p').update(d.getDate());

The second line of that code relies on you having Prototype.js loaded
in your page (it uses it to do the “grab the box by ID, then look
inside it for the first paragraph tag” trick). So you’ll want to use
my Protaculous Action to make this whole thing come together.

If you make a page where you’ve laid out the calendar icon with an
HTML number over the top of it, and post it somewhere, I can give you
the exact recipe.

If you’re not happy with how that looks (browser fonts can be awfully
meh for this) then you can also make a doctored image that shows 31
versions of the icon side by side in one long strip, and then use the
same JavaScript to determine just how far to offset that image (styled
as a background image) from the left, based on how many numbers should
be hidden. If you recall any of Apple’s lovely flicker-clock
countdowns that they have posted for various N-billionth sold events,
that’s how they did those. Naturally, that will look as perfect as you
want, at the expense of a little more download file size.

Walter

On May 2, 2011, at 5:44 PM, Kelly Crossley wrote:

I just finished designing a Freeway Pro website. As part of the
design I used this graphic: 1+ Million Calendar Day Royalty-Free Images, Stock Photos & Pictures | Shutterstock
=71711458

Is there anyway to have the calendar numbered day of month
automatically update with current day?

Thanks,
Kelly


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Here is a v quick example (bottom of the page) I put together http://www.deltadesign.co/examples/picofmonth.php

This uses the image with some PHP to provide the Day, Month and Year text.

I didn’t spend a lot of time on styling the text but it can tweaked to suit your needs.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Here’s another, using JavaScript in place of PHP.

http://scripty.walterdavisstudio.com/calendar

The plus and minus buttons are there so you can fiddle with the date. View source to see how it all works. This also translates into whatever language your browser is set to use without any additional code.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Wow! You guys are geniuses. Thank you.

Unfortunately, I’m note really sure how to implement this into my site. I looked at the source code for the page David built and I see the section that seems to handle the counter, but I’m not sure what to do with with the code. I’m assuming that I’ll have to make these code modifications outside of Freeway Pro. Is that correct?

Thanks again!

Kelly


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Freeway Pro (and even Express) has a very robust system that allows
you to insert snippets of code pretty much anywhere you need to within
your page. Dave’s system requires PHP, which means your host has to
provide that service on their server (most do) and you have to change
the filename extension of your page from .html to .php.

Then in your layout, you would create the little calendar icon whatsit
and style it the way you want it to appear, but instead of the
‘MonthName Year’ line at the top, you would put an inline Markup Item
(main menu / Insert / Markup Item when you have a flashing text cursor
in that box) and in that MI, you would put a tiny snippet of PHP, like
maybe this: <?=$monthyear?>.

And you would do the same for the giant day of the month, with
something like <?=$day?>. Finally, you would have to set up those
variables before you ask for them by name, so in the Before HTML
section of the Page / HTML Markup dialog, you would put in another
lump of code, which would probably be something like this:

<?php
$date = date('j',time());
$monthyear = date('F Y',time());
?>

…and you would be done. A few caveats: once you change your page’s
extension to .php, you can no longer preview it locally – it has to
be served by a Web server that runs PHP in order to convert the code
you added into normal HTML. And once you start fiddling with inline
Markup Items, you will have to become acquainted with the notion of
“wrapping” a MI with styled spaces in order to give the text it emits
a particular style. Both of these concepts are fairly straightforward
once you wrap your head around them.

But the beautiful thing about doing all this in Freeway is that once
you set up the code part, you can fiddle with the design – in
isolation – to your heart’s content, without ever once rewriting that
code.

Walter

On May 3, 2011, at 2:38 AM, Kelly Crossley wrote:

Wow! You guys are geniuses. Thank you.

Unfortunately, I’m note really sure how to implement this into my
site. I looked at the source code for the page David built and I see
the section that seems to handle the counter, but I’m not sure what
to do with with the code. I’m assuming that I’ll have to make these
code modifications outside of Freeway Pro. Is that correct?

Thanks again!

Kelly


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I think my biggest problem is I don’t understand what PHP is and how it’s used.

Also, it looks like David used a jpg file. How exactly does the text get placed overtop of the jpg in the FWP layout window? Is that all code or do I physically have to place a text box overtop of the graphic?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

PHP is a programming language that is designed to be intermingled into
an HTML file (or not, it’s flexible that way) and most hosting
providers support it (like 99.a lot of nines percent of them). What
you saw in my message was literally all there is to it.

The example I posted on my scripty server is pure JavaScript, and uses
the Prototype.js library to make it cross-browser. That doesn’t rely
on anything special from your hosting provider, but it does have the
bad side-effect that if your visitors don’t have JavaScript enabled,
they won’t see the current date – or any date at all.

PHP is more idiot-proof, in other words.

As far as adding text over an image, Freeway Pro lets you layer any
type of content above or below any other. So if you draw an image box,
import your base photo, then choose the HTML Item tool and draw an
HTML box over the top of your image (as long as you have Layers, or
CSS Layout as it says in the interface, on) you will be able to
position that HTML box directly over the top of your image box, and
the HTML text will float over the image. Another way to do this is to
draw an HTML box, switch over to the Style tab, and choose your image
as the background image for your HTML box. Set it to center/center/no-
repeat, and it will just sit there behind any text you add to that
box. You can style the two lines of text to be different sizes and
styles, and use space before/after to get the inter-line spacing just
so. That’s a completely bulletproof way to lay that element out,
although it will look funny when printed, because background images
are generally set to not print (to save ink) in most browsers.

Walter

On May 3, 2011, at 4:05 PM, Kelly Crossley wrote:

I think my biggest problem is I don’t understand what PHP is and how
it’s used.

Also, it looks like David used a jpg file. How exactly does the text
get placed overtop of the jpg in the FWP layout window? Is that all
code or do I physically have to place a text box overtop of the
graphic?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you want the FW page to pull apart then let me know your email address.

Bear in mind I read these posts on the Web and Walter has built in a system so that email addresses on the web site get obfuscated to email@hidden

So if you are posting your email address then use the format myname (at) mysite.com - you can also add your email address to your entry in the People section in Your Account where only FWT users can see it.

And let me know what version of FW you are using.

This is the page with just the calendar http://www.deltadesign.co/examples/pom2.php

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

One more question. How do I turn an html page into a php page? Do I do that from with in FWP or outside of the app?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You change the file name from inside the inspector palette from something.html to something.php

David

On 4 May 2011, at 22:07, “Kelly Crossley” email@hidden wrote:

One more question. How do I turn an html page into a php page? Do I do that from with in FWP or outside of the app?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 3 May 2011, 12:36 pm, waltd wrote:

Freeway Pro (and even Express) has a very robust system that allows
you to insert snippets of code pretty much anywhere you need to within
your page. Dave’s system requires PHP, which means your host has to
provide that service on their server (most do) and you have to change
the filename extension of your page from .html to .php.

Then in your layout, you would create the little calendar icon whatsit
and style it the way you want it to appear, but instead of the
‘MonthName Year’ line at the top, you would put an inline Markup Item
(main menu / Insert / Markup Item when you have a flashing text cursor
in that box) and in that MI, you would put a tiny snippet of PHP, like
maybe this: ``.

And you would do the same for the giant day of the month, with
something like ``. Finally, you would have to set up those
variables before you ask for them by name, so in the Before HTML
section of the Page / HTML Markup dialog, you would put in another
lump of code, which would probably be something like this:

  $date = date('j',time());

$monthyear = date(‘F Y’,time());
?>

…and you would be done. A few caveats: once you change your page’s
extension to .php, you can no longer preview it locally – it has to
be served by a Web server that runs PHP in order to convert the code
you added into normal HTML. And once you start fiddling with inline
Markup Items, you will have to become acquainted with the notion of
“wrapping” a MI with styled spaces in order to give the text it emits
a particular style. Both of these concepts are fairly straightforward
once you wrap your head around them.

But the beautiful thing about doing all this in Freeway is that once
you set up the code part, you can fiddle with the design – in
isolation – to your heart’s content, without ever once rewriting that
code.

Walter

On May 3, 2011, at 2:38 AM, Kelly Crossley wrote:

Wow! You guys are geniuses. Thank you.

Unfortunately, I’m note really sure how to implement this into my
site. I looked at the source code for the page David built and I see
the section that seems to handle the counter, but I’m not sure what
to do with with the code. I’m assuming that I’ll have to make these
code modifications outside of Freeway Pro. Is that correct?

Thanks again!

Kelly

Walter, I tried doing this but I can’t get it to work. Be aware that the main index is located two directories from where godaddy.com has the php.ini file, if that matters. Also, while I was able to setup the graphic and overlay the HTML markup code you suggested I don’t know how to stylize the box that’s created on top of the graphic. Please advise.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter, I tried doing this but I can’t get it to work. Be aware that the main index is located two directories from where godaddy.com has the php.ini file, if that matters.

That doesn’t matter.

Would you like me to send you a FW file that you can look at and see how I did it?

If so I will need an email address and your version of FW. See my May 3rd post for a note about email addresses.

This is the page I will send to you http://www.deltadesign.co/examples/pom2.php

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The People tab isn’t working. So, it’s okay to post my email address here?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yes - but use the format kelly(at)yoursite.com

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

kcrossley(at)mac.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On its way.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Got it. Thanks! Let me try to figure out what you did.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Awesome. Just awesome. Thanks David. BTW, here’s the website: http://geekforceva.com/index.php


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Just out of curiosity, since the date changes every day, and it appears to be HTML text, does that help with the site rankings on search engines like Google and Bing?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options