Topic: show recent topic problem

hello,

My problem is that I can not show my recent topics on my frontpage. I tryed the php way to include it. this is the code I think has to work. <?php include("forum/extern.php?action=active"); ?>

This is the adres on what is should be shown http://www.hortecta.be/site/paginas/index2.htm
The frame where the code is, is a php file. see http://www.hortecta.be/site/paginas/midden.php
And this is the adres that shows that the link is working of recent topics http://www.hortecta.be/site/paginas/for … ion=active

I also tryed this but that also does not work <?php include(http://www.hortecta.be/site/paginas/for … ion=active); ?>

On the same page I also use include for cutenews (a little news cms), and that works. this is the code <?php $number=5;
include("cutenews/show_news.php"); ?> And that works perfectly.

This is realy realy strange, I do not know what I am doing wrong?

Thanks in advance.

Re: show recent topic problem

I realy hope someone can give me an answer, becouse I spent hours searching for an answer on this forum and many others on the internet. But just can't figure out this one problem.
I could give more information about my site, if you need.

Re: show recent topic problem

Are there any errors on the page, when you include file? Maybe URL file-access is disabled on your server.

Re: show recent topic problem

Thank you for your reply, I do not know what URL file-access is and the live chat help from one.com also did not know. I must mail the support team to get an answer for that question.

I made a test site on the same server. to not let the errors been shown on my personal site.

This is what I get from http://www.hortecta.be/test.php

Here are the erros I get:

Warning: include(site/paginas/forum/extern.php?action=active) [function.include]: failed to open stream: No such file or directory in /customers/hortecta.be/hortecta.be/httpd.www/test.php on line 9

Warning: include() [function.include]: Failed opening 'site/paginas/forum/extern.php?action=active' for inclusion (include_path='.:') in /customers/hortecta.be/hortecta.be/httpd.www/test.php on line 9

while the extern.php is perfecly working look http://www.hortecta.be/site/paginas/for … ion=active

This is the code of test.php:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?php include('site/paginas/forum/extern.php?action=active'); ?>
</body>
</html>

Then I made an other test file to show that cutenews is working with the include option of php:

The adres http://www.hortecta.be/test2.php

the code of test2.php:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body><?php include('site/paginas/cutenews/show_news.php'); ?>
</body>
</html>

And that is perfectly working. strange isn't it?

Re: show recent topic problem

You can use this script to get 10 recent posts. Place it into the php-file and use it. If you include it outside the root directory of your forum, change the FORUM_ROOT constant.

Re: show recent topic problem

sad Still not working, I feel so stupid that this is also not working on my site.

When I set the constant correct on your script (require_once FORUM_ROOT.'include/common.php';). I get this message on my site: The constant PUN_ROOT must be defined and point to a valid PunBB installation root directory.

This is wierd becouse if I adjust the PUN_ROOT (on the common.php I adjusted require PUN_ROOT.'include/functions.php'; towards require PUN_ROOT.'functions.php';) the forum stops working and gives errors.
So the PUN_ROOT is perfect. But probably not if I want to get information with the script you gave me.

Do you got plan C for me? tongue
thanks in advance

Re: show recent topic problem

Pun root is the root directory of punbb.

So if you wanted files on the main url (hortecta.be)  you want the root code to look like:

if (!defined('FORUM_ROOT'))
    define('FORUM_ROOT', 'site/paginas/');

The Code above is for 1.3. THIS WILL NOT WORK ON 1.2

I Will have a look for intergration of 1.2

Sorry. Unactive due to personal life.

Re: show recent topic problem

Yes I got 1.2.20
So Plan B will not work anyway. smile

I Will have a look for intergration of 1.2

Thanks allot!

(I still find it very strange that the php include file does not work for me, with punbb forum only?)
coding is and stays a big puzzle. cool