![]() |
How to put PHP code into "image_template" ?
I would like put into classic "image_template.html" few rows of PHP code. I have idea put there something like <EXTERNAL_PHP_CODE> and code insert in admin part...but Iīm not specialist for PHP.
Thanks this addon will be able put into clasic HTML template AdSence, shop offer or whatever. Thanks for your suggestions Dr. |
The way that PP is designed doesn't allow for inserting PHP code directly into the templates. In order to have something show up in a template, you have to create an addon that produces the output you want, then use tags to replace the PHP output in the template.
PP comes with a sample addon, Current Date Time, that will serve you well in figuring out how to get the code into your site. |
Thanks
I had some similar ideas, but PHP is not my cup of tee....HTML or server solutions are not acceptable. Is here someone who can write/rewrite this addon? Thanks in advance Dr. |
How to put PHP code into "image_template"
I would like ask if here is anybody who can write addon/or somethink I mentioned. I used "Text Addon" but it doesnīt work with PHP code...
Thanks for suggestions in advance Dr. |
just create an addons the name you want and enable it
create files called: external_php_code.php Code:
<?php |
I used it, it looks great, but in the first row of my page is message from server, file is not in the same place or doesnt have atributs 666. I use long PHP code in the rows, like Adsence, if itīs important.
Thanks for your help Dr. |
sounds as if there is a problem in the PHP code you inserted?
|
Yes!
It wasnīt message from server, but from my external code, sorry my fault! But anyway, in the first row of page (above "head" tag) is output of the test "external_php_code.php"...on the left side, below links is "your code here" from fred-eric addon...may be I didnīt understand instruction. Dr. |
Iīm sure I do something wrong, can you write instruction step by step, please?
Thanks Dr. |
you have to REPLACE "your code here" with your own code, not write it somewhere else!
Since I don't know what kind of code you want to place here it is hard to tell. If the code produces some Output, set the output into a variable (replace echo if there is echo) and put the variable of the output into "$external_php_code". If you have not the minimum PHP knowledge this is not so easy, I know. If everything fails, post the PHP code you want to use |
| All times are GMT. The time now is 12:21 AM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.