Inserting PHP

cogray
55 Posts
cogray posted this 23 January 2017

I'd like to add this code to Joomla position for footer

© <?php $startyear $curyear echo $startyear . (($startyear ! '-' . $curyear : '');?> www.example.com

but when I save Themler rems out the PHP portion to look like this...

<!--?php
$startYear = 2010;
$curYear = date('Y');
echo $startYear . (($startYear != $curYear) ? '-' . $curYear : '');
?-->
www.example.com

Is there anyway to add a dynamic copyright date to a Joomla template within the themler tenmplate?

I'd like to add this code to Joomla position for footer &copy; &lt;?php $startyear $curyear echo $startyear . (($startyear ! &#39;-&#39; . $curyear : &#39;&#39;);?&gt; www.example.com but when I save Themler rems out the PHP portion to look like this... &lt;!--?php $startYear = 2010; $curYear = date(&#39;Y&#39;); echo $startYear . (($startYear != $curYear) ? &#39;-&#39; . $curYear : &#39;&#39;); ?--&gt; www.example.com Is there anyway to add a dynamic copyright date to a Joomla template within the themler tenmplate?
Vote to pay developers attention to this features or issue.
6 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 23 January 2017

Hi,

Please use the CMS Code control that can be found under the Insert >> More tab. Make sure that you insert the code within the HTML Source tab.

Sincerely,
Hella

Hi, Please use the CMS Code control that can be found under the Insert >> More tab. Make sure that you insert the code within the HTML Source tab. Sincerely, Hella
cogray
55 Posts
cogray posted this 25 January 2017

Sorry but I don't understand. I can see a CMS control and a HTML control but I don't know what you mean when you say "Make sure that you insert the code within the HTML Source tab."

Are you saying that there is an HTML "TAB" within the CMS control?

Sorry but I don't understand. I can see a CMS control and a HTML control but I don't know what you mean when you say "Make sure that you insert the code within the HTML Source tab." Are you saying that there is an HTML "TAB" within the CMS control?
Bayern
128 Posts
Bayern posted this 25 January 2017

i don't need to do this in Themler

I use the JCE Editor and put the code in the source code of the Modul

i don't need to do this in Themler I use the JCE Editor and put the code in the source code of the Modul
Support Team
Support Team posted this 26 January 2017

Hi,

If you need to add php code to the theme in Themler you should use CMS Code control (Insert tab >> More).
The code
<?php $startYear = 2010; $curYear = date('Y'); echo $startYear . (($startYear != $curYear) ? '-' . $curYear : '');?>
works just fine on my side.

Thank you,
Olivia

Hi, If you need to add php code to the theme in Themler you should use CMS Code control (Insert tab >> More). The code `<?php $startYear = 2010; $curYear = date('Y'); echo $startYear . (($startYear != $curYear) ? '-' . $curYear : '');?>` works just fine on my side. Thank you, Olivia
tomy3
11 Posts
tomy3 posted this 07 October 2017

Hello, I dont have this CSM code control!!! where it is???.

Thanks.

Hello, I dont have this CSM code control!!! where it is???. Thanks.
Support Team
Support Team posted this 09 October 2017

Hi,

It's under the Insert >> More tab.

Sincerely,
Hella

Hi, It's under the Insert >> More tab. Sincerely, Hella
You must log in or register to leave comments