Stupid question..
I need to add the google stats php include code into my pages. But when I try to add this via "html" mode in the editor, it seems to erase my code everytime.
Where can I put php code into a page without modifying the template?
Thanks!
How to add php code into a page?
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: How to add php code into a page?
This question is an FAQ and has been answered dozens of times on this forum, and I believe it's also answered in the wiki.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
-
streever
Re: How to add php code into a page?
I might be wrong calguy, I think his problem is most of the forum tells you how to add it to Template: but he looks like he needs to add it to PAGES.
If you CAN access the template, PLEASE put it there--it will make your life more easy. Otherwise, you should create a UDT (user defined tag) as is outlined elsewhere in the forums.
Simply create a udt called (whatever) and paste in your google code. Then, you call the tag by typing, {thename} into your pages--whatever you called it, surrounded by {}.
i hope that helps.
If you CAN access the template, PLEASE put it there--it will make your life more easy. Otherwise, you should create a UDT (user defined tag) as is outlined elsewhere in the forums.
Simply create a udt called (whatever) and paste in your google code. Then, you call the tag by typing, {thename} into your pages--whatever you called it, surrounded by {}.
i hope that helps.
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: How to add php code into a page?
The same methods for adding php code to templates (either via a udt, or using {php} and {/php} ) will work in a content block.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
-
streever
Re: How to add php code into a page?
yea, I think he just can't access templates? would help if he'd post back and let everyone know

