1 (edited by bingiman 2007-03-22 21:55)

Topic: How to include new post in block

I am using the pun miniportal mod and I would like to know how I can add a block that displays the last post:

Here is the code I used but it comes up  with an error:

<div class="block">
        <h2 class="block2"><span>Recent Post</span></h2>
        <div class="box">
            <div class="inbox">
                <pun_include "search.php?action=show_24h">   
            </div>
        </div>
    </div>

Thanks for the help
Bingiman

Re: How to include new post in block

There is something really similar in the PunPortal mod.

FluxBB - v1.4.8

Re: How to include new post in block

You can only use pun_include on files in the include/user directory. I would instead create a php file that gets the results from extern.php

Re: How to include new post in block

hmm...and how do I go about doing that? I have no clue. sad

Re: How to include new post in block

He means you can only do this:

<pun_include "search.php?action=show_24h">

with files in your include/user folder instead of search.php. (pun_include looks in this folder only)
I don't know, maybe it is just ok if you copy search.php into that include/user folder or you put

<pun_include "../../search.php?action=show_24h">
FluxBB - v1.4.8

6 (edited by bingiman 2007-03-22 19:04)

Re: How to include new post in block

I tried that but it does not work. I see some punBB sites use external files such as: latestpost.php and activetopics.php. I've searched for these files on this and punres and no luck finding them so far.

Re: How to include new post in block

Copy all the code from search.php from the action show_24h, and paste it in a new file in the include/user folder (don't forget to make all the includes and stuff from the beginning of search.php)

FluxBB - v1.4.8

Re: How to include new post in block

I give up....

9

Re: How to include new post in block

create a new file in include/user called file.php or what ever
in that file put

<?php include('http://yourforum.com/search.php?action=show_24h'); ?>

then in main.tpl put

<pun_include "file.php">

or what ever you called it wink

that should work

Re: How to include new post in block

Well, thats didn't work either. All it does is make the site hang. I named the file latestpost.php and added the code to it. No luck.