how to use php code in the file themes.inc.php between <<<EOT and EOT;
1) Don't edit include/themes.inc.php! Edit themes/yourtheme/theme.php instead
2) Heredoc syntax: http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc
I am confused about the heredoc, well simply want to use php include(); function to include php files between {IMAGE} and {TITLE} on displayimage.php
so how could i do that.
Just end the hereodc stamement, include your stuff and the re-start it. Example:$foobar = <<< EOT
<ul>
<li>some content</li>
<li>yet some more content</li>
</ul>
EOT;
might become$foobar = <<< EOT
<ul>
<li>some content</li>
<li>yet some more content</li>
EOT;
// do some custom PHP stuff here
include('your/custom/include.php');
// re-start the heredoc-definition of the variable. Note the dot in front of the equal sign.
$foobar .= <<< EOT
</ul>
EOT;
However, don't forget that you're populating a variable - you need to know your way around in PHP to accomplish what you're up to.
the include file works but the file display at the top of the window.
Probably because you're not populating the variable, but just output your stuff. As suggested: you need to understand PHP to do what you're up to. No use in discussing this on the abstract level. Post a real life link and the code you actually applied.
$template_display_media = <<<EOT
..........
.....
...
EOT;
print "my custom php";
$template_display_media.= <<<EOT
..........
.....
...
EOT;
link: http://www.pictures.com.np/displayimage.php?album=51&pos=68
the problem is solved
You should have posted what you did to sove your issue, for the benefit of others.
$foobar = <<< EOT
<ul>
<li>some content</li>
<li>yet some more content</li>
EOT;
// do some custom PHP stuff here
#####php stuffs
$foobar.="#####php stuffs output";
// re-start the heredoc-definition of the variable. Note the dot in front of the equal sign.
$foobar.= <<< EOT
</ul>
EOT;