tag to echo year?

General ShopSite user discussion

tag to echo year?

Postby bkgca » Wed Nov 24, 2010 7:39 pm

Is there a tag to call and echo the present year?

Like in php..

<?php echo date('Y'); ?>


Wanted to place it in the footer with our "all rights" / "copy write " statement.

tia
bkgca
 
Posts: 44
Joined: Thu Oct 21, 2010 9:14 pm

Re: tag to echo year?

Postby BFChris » Wed Nov 24, 2010 7:51 pm

I don't think there is any Shopsite tag to do this.

However, if your HTML pages are PHP-enabled, you could just use the PHP.
~~Barefoot Chris
--------------------------------
Barefoot Chris Web Design
www.barefootchris.net
--------------------------------
BFChris
 
Posts: 322
Joined: Mon Oct 09, 2006 3:28 pm
Location: PA

Re: tag to echo year?

Postby bkgca » Wed Nov 24, 2010 8:29 pm

Chris,

tnx..

I'm trying to place it in the layout - footer, not any of the "pages" ...

I tried the php line in the footer html, didn't work.

Searched the tags in the help section, and couldn't find anything, was wondering if I missed it.
bkgca
 
Posts: 44
Joined: Thu Oct 21, 2010 9:14 pm

Re: tag to echo year?

Postby BFChris » Wed Nov 24, 2010 8:45 pm

What do you mean "I tried the php line in the footer html, didn't work."

I assume your product page names end in .htm or .html?

If so, it is possible your web server is not set up to parse PHP code on pages ending in .html

You could tell your server to do this by adding the following to your .htacess file:

Code: Select all
AddType application/x-httpd-php .html
~~Barefoot Chris
--------------------------------
Barefoot Chris Web Design
www.barefootchris.net
--------------------------------
BFChris
 
Posts: 322
Joined: Mon Oct 09, 2006 3:28 pm
Location: PA

Re: tag to echo year?

Postby bkgca » Wed Nov 24, 2010 9:19 pm

BFChris wrote:What do you mean "I tried the php line in the footer html, didn't work."

I assume your product page names end in .htm or .html?

If so, it is possible your web server is not set up to parse PHP code on pages ending in .html

You could tell your server to do this by adding the following to your .htacess file:

Code: Select all
AddType application/x-httpd-php .html



yes, tried the php line/code in the shopsite footer by going into the shopsite back office, Preferences/Layout Settings/ and then editing the footer - pasted in the line of php code " <?php echo date('Y'); ?> " , and it didn't work.

yes the pages generated by shopsite are .html .

Other non-shopsite pages on the site, I use the same php line of code for the year in the footer and not a problem, the year is shown as expected.
So didn't think it was a "site" problem.

Thought it was something with shopsite, when it generates the page, ignoring the php code I had put in the footer for the shopsite pages??
(I have some WP plugins that don't like certain normal html tags for forms, and use their own and own syntax.... annoying , didn't know if shopsite was doing the same thing)

My non-shopsite pages are in the root of the site and other sub-directories, and shopsite is installed in a sub-directory "store" under the root of the site.

??
Thanks a bunch for walking through this with me.
bkgca
 
Posts: 44
Joined: Thu Oct 21, 2010 9:14 pm

Re: tag to echo year?

Postby bkgca » Wed Nov 24, 2010 9:25 pm

Update BFChris...

well , for giggles I modify my .htaccess in the root, added that statement, and the php year code now works in the shopsite footer..

tnx a ton..
bkgca
 
Posts: 44
Joined: Thu Oct 21, 2010 9:14 pm

Re: tag to echo year?

Postby BFChris » Wed Nov 24, 2010 9:27 pm

Glad it worked.

Are the non-Shopsite pages on your site .php files?
~~Barefoot Chris
--------------------------------
Barefoot Chris Web Design
www.barefootchris.net
--------------------------------
BFChris
 
Posts: 322
Joined: Mon Oct 09, 2006 3:28 pm
Location: PA

Re: tag to echo year?

Postby bkgca » Wed Nov 24, 2010 9:37 pm

mostly WP.
some others .htm
bkgca
 
Posts: 44
Joined: Thu Oct 21, 2010 9:14 pm


Return to User Forum

Who is online

Users browsing this forum: No registered users and 136 guests