News:

CPG Release 1.6.29
During HTML5 upload, keep pseudo blank code 200 messages from triggering error condition
added Russian language
correct failure to use theme menu icons in album manager
minor vulnerabilities mitigation

Main Menu

<?php require in a theme?

Started by cerberus, July 17, 2004, 11:10:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cerberus

Hi!
I'm trying to use the SSI functions of YabbSE in a template but I can't understand why it isn't working.
I have the following code
<?php require("/web/htdocs/mysite/home/SSI.php"); ?>
<? recentTopics(); ?>

where should I insert it?

Thanks!
With Best Regards, Cerberus
Edamus, bibamus, gaudeamus.
http://www.pocketpcrussia.com - My Main Site

Joachim Müller

you can't use php in template.html
Use theme.php instead

GauGau

cerberus

I did it
<?php
require(" /web/htdocs/mysite/home/SSI.php");
$template_main_menu = <<<EOT
<? recentTopics(); ?>

                <span class="topmenu">

It isn't working. It says that it has failed opening SSI.php ???
That's weird because the file is there :(
With Best Regards, Cerberus
Edamus, bibamus, gaudeamus.
http://www.pocketpcrussia.com - My Main Site

cerberus

I've tried in a couple of ways, I can't get it to work :(
With Best Regards, Cerberus
Edamus, bibamus, gaudeamus.
http://www.pocketpcrussia.com - My Main Site

kegobeer

require(" /web/htdocs/mysite/home/SSI.php");

See the space between require(" and /web?  Delete it and see if that helps.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

cerberus

My code hasn't got that space. It's just a typo that I did here :-[
With Best Regards, Cerberus
Edamus, bibamus, gaudeamus.
http://www.pocketpcrussia.com - My Main Site

cerberus

I've modified theme.php
<?php
$template_main_menu 

require(
"/web/htdocs/mysite/home/SSI.php");
recentTopics();
<<<EOT
<span class="topmenu">

now I see the recent topics list output by SSI.php, but I don't see nothing related to the gallery. After the recent topics there:
QuoteWarning: main(lang/english.php): failed to open stream: No such file or directory in /web/htdocs/mysite/home/foto/include/init.inc.php on line 246

Fatal error: main(): Failed opening required 'lang/english.php' (include_path='.:/usr/local/lib/php') in /web/htdocs/mysite/home/foto/include/init.inc.php on line 246
But all the files intact and readable ???
With Best Regards, Cerberus
Edamus, bibamus, gaudeamus.
http://www.pocketpcrussia.com - My Main Site

Joachim Müller

Will get hard, as Yabb SE and cpg share some function and var names. I suggest using <iframe> instead, with the source being an empty file that just has the include in it.

GauGau

cerberus

So I have to create an intermediate php file which uses the ssi functions and include it via iframes. I'll try now.
With Best Regards, Cerberus
Edamus, bibamus, gaudeamus.
http://www.pocketpcrussia.com - My Main Site