1
Matas
embedding php script in theme.html
  • 2004/7/5 16:53

  • Matas

  • Just popping in

  • Posts: 6

  • Since: 2004/3/21


i would like to embed a php script into theme.html but i have a problem
even <?php echo "I LOVE PHP!"; ?> doesn't return anything on the page
is there some way i can mix php and theme.html so it works properly?
or maybe even call a file where the php script is writen
<?php
....
scipt
....
?>
without html tags

2
chapi
Re: embedding php script in theme.html
  • 2004/7/5 16:59

  • chapi

  • Theme Designer

  • Posts: 611

  • Since: 2002/1/22


Because theme.html is interpreted through smarty it has to look a little bit different.

<{php}>
echo 
"I love Xoops!";
<{/
php}>


This should do the trick

3
Jan304
Re: embedding php script in theme.html
  • 2004/7/5 17:26

  • Jan304

  • Official Support Member

  • Posts: 520

  • Since: 2002/3/31


Chapi has given the solution, however, smarty is exactly designed to keep code and design seperated.

You better might want to 'import' the script to xoops, and dump the final output into a smarty var.

$xoopsTpl->assign('var_to_smarty', $your_var);

You can then call it by <{$var_to_smarty}>

4
iolai
Re: embedding php script in theme.html
  • 2004/7/5 19:41

  • iolai

  • Quite a regular

  • Posts: 206

  • Since: 2004/6/26


Is this the only change I should do?
Or do I need to change the whole syntax of php inside the block?

5
Matas
Re: embedding php script in theme.html
  • 2004/7/5 19:44

  • Matas

  • Just popping in

  • Posts: 6

  • Since: 2004/3/21


i am....how would i put it...hmm...i don't know squat about php, so a bit detailed explanation would be great :)

on the other hand...this is what i had in mind...i planned to put a php menu in the theme.html cause i want it to be on top of the pagehttp://www.chipchapin.com/WebTools/MenuTools/phplayersmenu-2.2.0
I'm lost.
I'll greatly appriciate any tips/advices you may have.

Login

Who's Online

134 user(s) are online (99 user(s) are browsing Support Forums)


Members: 0


Guests: 134


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits