Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: <?php require in a theme?  (Read 4898 times)

0 Members and 1 Guest are viewing this topic.

cerberus

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
    • Pocket PC Russia
<?php require in a theme?
« on: July 17, 2004, 11:10:55 pm »

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
Code: [Select]
<?php require("/web/htdocs/mysite/home/SSI.php"); ?>
<? recentTopics(); ?>
where should I insert it?

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: <?php require in a theme?
« Reply #1 on: July 18, 2004, 07:57:27 am »

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

GauGau
Logged

cerberus

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
    • Pocket PC Russia
Re: <?php require in a theme?
« Reply #2 on: July 18, 2004, 12:14:48 pm »

I did it
Code: [Select]
<?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 :(
Logged
With Best Regards, Cerberus
Edamus, bibamus, gaudeamus.
http://www.pocketpcrussia.com - My Main Site

cerberus

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
    • Pocket PC Russia
Re: <?php require in a theme?
« Reply #3 on: July 18, 2004, 01:00:06 pm »

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

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: <?php require in a theme?
« Reply #4 on: July 18, 2004, 04:17:40 pm »

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

See the space between require(" and /web?  Delete it and see if that helps.
Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
    • Pocket PC Russia
Re: <?php require in a theme?
« Reply #5 on: July 18, 2004, 06:21:13 pm »

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

cerberus

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
    • Pocket PC Russia
Re: <?php require in a theme?
« Reply #6 on: July 18, 2004, 06:56:52 pm »

I've modified theme.php
Code: [Select]
<?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:
Quote
Warning: 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 ???
Logged
With Best Regards, Cerberus
Edamus, bibamus, gaudeamus.
http://www.pocketpcrussia.com - My Main Site

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: <?php require in a theme?
« Reply #7 on: July 18, 2004, 08:24:22 pm »

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
Logged

cerberus

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 46
    • Pocket PC Russia
Re: <?php require in a theme?
« Reply #8 on: July 18, 2004, 08:31:48 pm »

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

Page created in 0.025 seconds with 19 queries.