Current year via scrip

heybigal
11 Posts
heybigal posted this 24 July 2020
Ask a Question

Hi, if you look at my website boscellant.com, at the bottom of thr page, I have a Copyright message with tbe current year. I don’t know how to add scripting to my page instead of doing it outside Nicepage.

Regards
Alain

Hi, if you look at my website boscellant.com, at the bottom of thr page, I have a Copyright message with tbe current year. I don’t know how to add scripting to my page instead of doing it outside Nicepage. Regards Alain
Vote to pay developers attention to this features or issue.
16 Replies
Order By: Standard | Newest
Support Team
Support Team posted this 24 July 2020

Hi Alain,

Try to use the HTML control in the footer to add the code.

...................................................
Sincerely,
Hella
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi Alain, Try to use the HTML control in the footer to add the code. ................................................... Sincerely, Hella Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
heybigal
11 Posts
heybigal posted this 24 July 2020

Hi,

when I try to use HTML, the text included in the

Hi, when I try to use HTML, the text included in the
Support Team
Support Team posted this 27 July 2020

Hi Alain,

Sorry, could you please provide a bit more details.

...................................................
Sincerely,
Hella
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi Alain, Sorry, could you please provide a bit more details. ................................................... Sincerely, Hella Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
heybigal
11 Posts
heybigal posted this 27 July 2020

Hi Hella,

www.boscellant.com... if you look at the footer, I included a copyright note which contain the current year. If you look at the page source, the current year come from a "

Hi Hella, www.boscellant.com... if you look at the footer, I included a copyright note which contain the current year. If you look at the page source, the current year come from a "
simonusher3
28 Posts
simonusher3 posted this 28 July 2020

Hi Alain,

I assume you have created your footer and inserted a text element with the following:

Alain Gosselin creation.
Copyright © 2007-2020. All rights reserved.

Then edited the HTML page and replaced 2020 with the following:

<script>--------------(new Date().getFullYear())</script>

Now, I assume you wish that code to be included on your Nicepage site, so you don't need to edit the HTML every time you update your site.
This what you need to do.
1st, you need to delete the text element and select the HTML element instead.
2nd, on the right hand side of Nicepage should be a box that says code, cut & paste the following into there:

<a href="mailto:agosselin@pacs-it.com">Alain Gosselin</a>&nbsp;creation.<br>Copyright © 2007-<script>--------------(new Date().getFullYear())</script>. All rights reserved.

Hopefully this has helped.

Regards,

Simon.

Hi Alain, I assume you have created your footer and inserted a text element with the following: Alain Gosselin creation. Copyright © 2007-2020. All rights reserved. Then edited the HTML page and replaced 2020 with the following: <script>--------------(new Date().getFullYear())</script> Now, I assume you wish that code to be included on your Nicepage site, so you don't need to edit the HTML every time you update your site. This what you need to do. 1st, you need to delete the text element and select the HTML element instead. 2nd, on the right hand side of Nicepage should be a box that says code, cut & paste the following into there: <a href="mailto:agosselin@pacs-it.com">Alain Gosselin</a>&nbsp;creation.<br>Copyright © 2007-<script>--------------(new Date().getFullYear())</script>. All rights reserved. Hopefully this has helped. Regards, Simon.
heybigal
11 Posts
heybigal posted this 29 July 2020

Thank`s Simon :)

Previously, the text size was set to "Small Text", how I can change it with my HTML elementÉ

Regards
Al

Thank`s Simon :) Previously, the text size was set to "Small Text", how I can change it with my HTML elementÉ Regards Al
simonusher3
28 Posts
simonusher3 posted this 29 July 2020

Hi,

It's no problem. Now to change the text size. Click on the HTML element and the right control panel will show the HTML code, you need to scroll down to CSS Class, click on that, a blank box will appear, enter foot-text and click edit. A pop-up window will show the following:

.foot-text {

}

You need to insert the following below the .foot-text

font-size: 14px;

So It looks like this:

.foot-text {
font-size: 14px;
}

Now back to the HTML code. You need to put at the beginning of the code this:

<foot-text>

And at the end of the code:

</foot-text>

If the text still isn't small enough, then just edit the number part to 13 or 12.
You have just done you first basic CSS styling.

Regards,

Simon.

Hi, It's no problem. Now to change the text size. Click on the HTML element and the right control panel will show the HTML code, you need to scroll down to CSS Class, click on that, a blank box will appear, enter foot-text and click edit. A pop-up window will show the following: .foot-text { } You need to insert the following below the .foot-text font-size: 14px; So It looks like this: .foot-text { font-size: 14px; } Now back to the HTML code. You need to put at the beginning of the code this: <foot-text> And at the end of the code: </foot-text> If the text still isn't small enough, then just edit the number part to 13 or 12. You have just done you first basic CSS styling. Regards, Simon.
heybigal
11 Posts
heybigal posted this 29 July 2020

Thank's Simon, it's exactly what I need :)

Thank's Simon, it's exactly what I need :)
DixQue
56 Posts
DixQue posted this 25 August 2020

Appearently it is not possible to extend an existing CSS script with the one layed out here. Also possible I'm doing something wrong...;)
What's my case?

Because NP doesn't have a setting of it's own to keep the footer sticked too the bottom of the screen nor a setting to underline hyperlinks on my pages with dashes, I already have a CSS script called 'footer-fixed' containing this:

.footer-fixed {
position:fixed;
bottom:0;
width:100%;
}
.dashed-link
a, a:visited, a:active {
text-decoration: none;
border-bottom: 1px dashed;
}

But when I add the following lines to the same script, setting the font size as descibed here has no result.
.foot-text {
font-size: 12px;
}

The text on my footer is set by a HTML-container, which I preceeded with <foot-text> and ended with </foot-text> but no result here.

Anyone?

Appearently it is not possible to extend an existing CSS script with the one layed out here. Also possible I'm doing something wrong...;) What's my case? Because NP doesn't have a setting of it's own to keep the footer sticked too the bottom of the screen nor a setting to underline hyperlinks on my pages with dashes, I already have a CSS script called 'footer-fixed' containing this: .footer-fixed { position:fixed; bottom:0; width:100%; } .dashed-link a, a:visited, a:active { text-decoration: none; border-bottom: 1px dashed; } But when I add the following lines to the same script, setting the font size as descibed here has no result. .foot-text { font-size: 12px; } The text on my footer is set by a HTML-container, which I preceeded with &lt;foot-text&gt; and ended with &lt;/foot-text&gt; but no result here. Anyone?
Support Team
Support Team posted this 26 August 2020

Alain,

Your "foot-text" is a CSS Class.Therefor to apply it, you do not need an HTML Element.

Add a Text. Go to the Property Panel, locate the CSS Class setting, enter "foot-text" without "." into the input.

foot-class.png

Thank you!

...................................................
Sincerely,
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Alain, Your "foot-text" is a CSS Class.Therefor to apply it, you do not need an HTML Element. Add a Text. Go to the Property Panel, locate the CSS Class setting, enter "foot-text" **without "."** into the input. !foot-class.png! Thank you! ................................................... Sincerely, Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp

Last edited 26 August 2020 by Support Team

DixQue
56 Posts
DixQue posted this 31 August 2020

Hi, I need the HTML-element because I want to automatically publish the current year in the footer through a script. Or is there another way to achieve this?

Regards,
Dick

Hi, I need the HTML-element because I want to automatically publish the current year in the footer through a script. Or is there another way to achieve this? Regards, Dick
Support Team
Support Team posted this 31 August 2020

Alain,

Maybe try using the PHP in the PHP Element?

Thank you!
...................................................
Sincerely,
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Alain, Maybe try using the PHP in the PHP Element? Thank you! ................................................... Sincerely, Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
simonusher3
28 Posts
simonusher3 posted this 01 September 2020

Hi,

I maybe able to help, for what I have read, you want a hyperlink underlined with dashes in your footer?
You stated there wasn't any settings for sticking the footer to the bottom, have you created a footer block? Been the footer it will always be at the bottom.

Your CSS didn't work for me either, so I used this instead.

a.dash {
text-decoration: none;
font-size: 12px;
}
a.dash:link {
border-bottom: 1px dashed;
}
a.dash:visited {
border-bottom: 1px dashed;
}
a.dash:active {
border-bottom: 1px dashed;
}

In the HTML code you need to change from a href
to

<a class="dash" href="nicepage.com">Some link to somewhere</a>

Where ever you want the current year to appear insert this code with the html element

`<script>--------------(new Date().getFullYear())</script>`

I hope this example helps.

Simon.

Hi, I maybe able to help, for what I have read, you want a hyperlink underlined with dashes in your footer? You stated there wasn't any settings for sticking the footer to the bottom, have you created a footer block? Been the footer it will always be at the bottom. Your CSS didn't work for me either, so I used this instead. a.dash { text-decoration: none; font-size: 12px; } a.dash:link { border-bottom: 1px dashed; } a.dash:visited { border-bottom: 1px dashed; } a.dash:active { border-bottom: 1px dashed; } In the HTML code you need to change from a href to <a class="dash" href="nicepage.com">Some link to somewhere</a> Where ever you want the current year to appear insert this code with the html element `<script>--------------(new Date().getFullYear())</script>` I hope this example helps. Simon.

Last edited 01 September 2020 by simonusher3

DixQue
56 Posts
DixQue posted this 03 September 2020

Hi Simon,
Thnx for coming in. You helped me with the code you provided, I managed to set the text in the footer the way I want.

I was searching for a way to get hyperlinks underled dashed for the entire website and still don't know how to do that. The NP support team haven't help yet with a practical solution so I'm calling out for help from forum users. Again, I'm not a programmer (html nor php) and hoped that this could be reached with a simple NP setting (not).

I know that a footer block will stick to the bottom of a website, but that's not what I meant: I want it to stick to the bottom of the screen. Again no standard setting in NP but I found the code that does the trick.

Regards, Dick

Hi Simon, Thnx for coming in. You helped me with the code you provided, I managed to set the text in the footer the way I want. I was searching for a way to get hyperlinks underled dashed for the entire website and still don't know how to do that. The NP support team haven't help yet with a practical solution so I'm calling out for help from forum users. Again, I'm not a programmer (html nor php) and hoped that this could be reached with a simple NP setting (not). I know that a footer block will stick to the bottom of a website, but that's not what I meant: I want it to stick to the bottom of the screen. Again no standard setting in NP but I found the code that does the trick. Regards, Dick
simonusher3
28 Posts
simonusher3 posted this 04 September 2020

Hi Dick,

To get all hyperlinks to be underlined (dashed) just remove the .dash from CSS and remove class="dash" from the HTML script. All hyperlinks will be 12px mind you, so if you don't want for all, you need to create footer class.

footer {
font-size: 12px;
}

Insert at beginning

<class="footer">

at the end

</class="footer">

of the text you require it to be 12px, CSS below.

a {
text-decoration: none;
}
a:link {
border-bottom: 1px dashed;
}
a:visited {
border-bottom: 1px dashed;
}
a:active {
border-bottom: 1px dashed;
}
footer {
font-size: 12px;
}

Regards,

Simon.

Hi Dick, To get all hyperlinks to be underlined (dashed) just remove the .dash from CSS and remove class="dash" from the HTML script. All hyperlinks will be 12px mind you, so if you don't want for all, you need to create footer class. footer { font-size: 12px; } Insert at beginning <class="footer"> at the end </class="footer"> of the text you require it to be 12px, CSS below. a { text-decoration: none; } a:link { border-bottom: 1px dashed; } a:visited { border-bottom: 1px dashed; } a:active { border-bottom: 1px dashed; } footer { font-size: 12px; } Regards, Simon.

Last edited 04 September 2020 by simonusher3

DixQue
56 Posts
DixQue posted this 05 September 2020

Thnx for explaining, Simon. I managed to get it all to my liking now...

Regards,
Dick

Thnx for explaining, Simon. I managed to get it all to my liking now... Regards, Dick
You must log in or register to leave comments