Page 1 of 2
[question] php integration
Posted: Sat 3. Apr 2004, 18:13
by WeDgE
I want to know if its possible :
I have a php script and i want to integrate it with phpwcms
but there are php page with php code and i think its not possible to do like article ?
(display like article)
(if you understand my bad english lol )
Posted: Sat 3. Apr 2004, 18:28
by snobba
If I understood you right this is the solution:
{PHP:your_php_page.php}
Greetings from Martin
Posted: Sat 3. Apr 2004, 18:28
by Jan212
without words
http://www.phpwcms.de/forum/viewtopic.p ... ntegrieren
with words
you can include external scripts like:{PHP:myscript.php}
hightere grüße
Posted: Sat 3. Apr 2004, 18:29
by snobba
Haha Jan I beat you to it!

Posted: Sat 3. Apr 2004, 18:30
by Jan212
Posted: Sat 3. Apr 2004, 18:34
by snobba
Same time 17:28..
It is the same problem my girlfriend always complain about - that I am tooo fast...

Posted: Sat 3. Apr 2004, 18:36
by Jan212
my said i am dancing like an old Indian

Posted: Sat 3. Apr 2004, 18:47
by snobba
LOL

Posted: Sat 3. Apr 2004, 22:40
by WeDgE
Ok !
with that i can integrate a phpBB forum using {PHP:viewforum.php} for example ?
and if i want to use a var like $nick i write {PHP:$nick} and display the nick ?
Posted: Sat 3. Apr 2004, 22:46
by WeDgE
and if i want to change the "template" in admin panel
can i write {phpvar:$username} ?
Posted: Tue 6. Apr 2004, 15:53
by WeDgE
so i want to know if its possible to put php code in the template
and if i can put this : <? print $param[index][mnu_accueil]; ?>
for the category name ?
Posted: Tue 6. Apr 2004, 16:16
by Jan212
test it... never done, sorry
Posted: Tue 6. Apr 2004, 19:58
by tyr
In my templates I use [PHP]echo date("Y");[/PHP] to echo the year for my copyright statement.
Something similar should work for printing other variables.
Posted: Tue 6. Apr 2004, 22:18
by WeDgE
tyr wrote:In my templates I use [PHP]echo date("Y");[/PHP] to echo the year for my copyright statement.
Something similar should work for printing other variables.
ok and the code for date("Y") where is it ?
in my php script i have the connexion to the base and var
and i want to do an echo(); of a var
all in the template
so you write for the echo(); ok
and where i have to write the connexion base.... ?
Posted: Tue 6. Apr 2004, 23:31
by tyr
date("Y") is a php system variable. It's results is the current year (2004). Nothing fancy here. I intendd it as an illustration.
Instead of using <? print $param[index][mnu_accueil]; ?> you could use Oliver's replacement tags like such: [PHP] print $param[index][mnu_accueil]; [/PHP] to get the same result.