Hi,

In 1.2, if I didn't want the forum to show the title, description, announcement (at all), whatever, I would remove something like this from the main.tpl: <pun_whatever>

However, if I try to do that with 1.3, nothing happens. Is there something else I need to do aswell? neutral

Alex

I couldn't get it work with the new way either, can someone help me out?

<a href=\"/login.php?action=out&id='.$pun_user['id'].'&csrf_token='.sha1($pun_user['id'].sha1(get_remote_address())).'\">'.$lang_common['Logout'].'</a>

What is wrong with this line?

edit: n/m, I think I got it working:

<a href=\"/web/forum/login.php?action=out&id=".pun_htmlspecialchars($pun_user['id'])."&csrf_token=".sha1($pun_user['id'].sha1(get_remote_address()))."\">'.$lang_common['Logout'].'</a>

Hi there, smile

We're bumping into some integration problems. We tried everything we could, but no luck.

1)
We used the following inlog-script:

<?
define('PUN_ROOT', './forum/');
require PUN_ROOT.'include/common.php';

if($pun_user['is_guest'] == "TRUE")
    {
    echo "<form id=\"login\" name=\"login\" name=\"qpost\" method=\"post\" action=\"forum/login.php?action=in\"  onsubmit=\"return process_form(this)\">
                <p>
                    <input type=\"hidden\" name=\"form_sent\" value=\"1\" />
                    <input type=\"hidden\" name=\"redirect_url\" value=\"index.php\" />
                    Gebruikersnaam:<br />
                    <input type=\"text\" name=\"req_username\" size=\"16\" maxlength=\"25\" /><br /><br />
                    Wachtwoord:<br />
                    <input type=\"password\" name=\"req_password\" size=\"16\" maxlength=\"16\" wrap=\"virtual\"><br /><br />
                   <input type=\"submit\" name=\"login\" value=\"Login\" /><br /><br />
                    <a href=\"forum/register.php\">Registreer</a>
                </p>
</form>";
    }
else
    {
    echo "Welkom, <b>".pun_htmlspecialchars($pun_user['username'])."</b><br><a href=\"/web/forum/profile.php?id=".pun_htmlspecialchars($pun_user['id'])."\">Mijn profiel</a><br><a href=\"/web/forum/message_list.php\">Berichten</a>";
    }
?>

This worked normally, but together with certain scripts of Cutenews.RU we get an error. The Cutenews.RU scripts work fine without the above code. This is the error:

Fatal error: Cannot redeclare get_title() (previously declared in XXX/cms/plugins/latest_comments.php:103) in XXX/forum/include/functions.php on line 536

2)
How can I dynamically include the 10 latest posts on the PunBB forum (just the title of the thread it has been posted in)? Is this similar to this:

forum/extern.php?action=active&show=10

and if so, can I just include that with a PHP-include (with the entire http:// of course.)?


3)
I use the Private Message Mod. I can create a link to the Inbox, but I'm not sure how I can show the number of new messages in this link. And if that's not possible, I'd like like to show a message outside the forum that there ARE new messages (like the PunBB forum does).


Sorry for all these subjects (I didn't want to create 3 different threads). If you can help with just one it would be great, too!

Many thanks,

~

Hey,

All the sudden, my smilies don't work anymore. When I type the smiley-code, all I get to see is the smiley-code - no smiley at all.

I tried to re-upload them, but that didn't work. I also checked Options (Admin menu) to see if the "Convert smilies to small icons" option was turned off, but it wasn't.

Can anyone help? smile (<< works tongue)

Script works great! I'm trying to let the script load the recent news from multiple forum ID's, but nothing worked. I highly doubt that it's possible, but do you know a way? ^^;

Smartys wrote:

You should not include common.php or functions.php twice (or try including both: including common.php includes functions.php).

Oh god, I totally forgot about that file. I thought I was including a php generator script, but I was infact including the dynamic news script which had the common.php on it aswell. God, I feel so stupid! >_< Thank you, thank you so much! Everything works fine now! smile

Ah, okay! Thanks Smartys! smile You are a great help!

So I finally managed to get everything right. However, there seems to be a problem when I include a PHP-page. It works fine when I include a html-page, but with a PHP-page it automaticly blocks off the PunBB integration-script. Is this a standard PHP-issue or is this a PunBB's problem (ergo: my fault)?

Fatal error: Cannot redeclare check_cookie() (previously declared in /~website~/www/forum/include/functions.php:28) in /~website~/www/forum/include/functions.php on line 112
Smartys wrote:

Goldex: You can rename your index.php to whatever you want, you just have to search through all the files for references to index.php and update them as well.

Are you talking about the PunBB index.php? smile

Smartys wrote:

The first script you posted is wrong, please review http://punbb.org/docs/dev.html#integration

Thanks for the link! I did forgot to mention I put the following in the head of my index.php page:

<?php define('PUN_ROOT', './forum/'); ?>
<?php include_once PUN_ROOT.'forum/include/common.php'; ?>

I'm not sure if this would work, given the fact that it's "include once" instead of "require" and I'm also not sure if I have to remove the 'forum/' in the same line (sorry, I'm a big n00b with PunBB coding). Also, do I have to include the code in the link you gave me multiple times for multiple PHP-includes? (this one)

define('PUN_ROOT', './forums/');
require PUN_ROOT.'include/common.php';
Smartys wrote:

The second script is a huge security risk and allows an attacker to execute arbitrary PHP on your site.

Thanks for the notification, I'll get after that once I'm done with this! wink

Okay, thanks! smile

Also, when I have my default site index (index.php) in the root directory, is there a way to change the forum index.php (to forum.php or something) so I wouldn't have to change the site? Or is there a way to get it the same as $_GET['view'] == 'forum'?

Anyway, I just bought this up: The reason why I want to change the directory is so that I can include the login data on normal webpages aswell. This is on my index.php (site):

<?php
define('PUN_ROOT', './forum/');
define('PUN_TURN_OFF_MAINT', 1);

if($pun_user['is_guest'] == "TRUE")
    {
    echo "Welkom! <a href=\"/forum/login.php\">Log in</a> of <a href=\"/forum/register.php\">registreer</a>.";
    }
else
    {
    echo "Welkom, <strong>".pun_htmlspecialchars($pun_user['username'])."</strong>!<br><br>";
    }
?></td>
      <td><div align="right">
        <?php
define('PUN_ROOT', './forum/');
define('PUN_TURN_OFF_MAINT', 1);

if($pun_user['is_guest'] == "TRUE")
    {
    }
else
    {
    echo "<a href=\"/forum/profile.php?id=".pun_htmlspecialchars($pun_user['id'])."\">Profiel</a> - <a href=\"/forum/message_list.php\">Berichten</a>";
    }
?>

I also have a script on the same page (index.php) that lets me include other pages (for example, index.php?page=apagelol):

<?
if(empty($_GET['page'])) {
  include("neus.php");
} else {
  if(eregi("http://",$_GET['page'])) {
    echo "Het is niet toegestaan externe pagina's in te voegen.";
  } elseif(file_exists($_GET['page'].".html")) {
    include($_GET['page'].".html");
  } elseif(file_exists($_GET['page'].".php")) {
    include($_GET['page'].".php");
  } else {
    echo "404 error, pagina niet gevonden.";
  }
}
?>

But when I use these two codes together, the first one gets an error. This does not happen when I put this page in the PunBB forum directory (modified it, of course). So is there a way to get it anyway, or do I have to 'fuse' my forum and site directories?

Hi,


Is it possible to simply move the forum directory to a different level?

http://www.website.com/forum/index.php (etc.) >> http://www.website.com/index.php (etc.).

And do I have to change some stuff in PHPMyAdmin and config.php?


Greets, Goldex - sorry for my bad English.

This is really cool! But is there a way for users to post comments? I know this takes a lot of work to integrate, but isn't there a way to post a thread with a fast gallery picture click so a thumb of one of the gallery pictures comes in the message-box?

Oh and btw, is there a way to include the author of the post, so you can get something like "Posted by: <username>?

Again, thank you very much for this useful script!

I'm getting an error, too. I tried to include it in my own post.php later, but it gave me the same error. Is it possible that some hosts do not exept a PHP-include that includes a page of different servers?

Thanks! This is infact easier working (I'm gonna use this for recently posted topics), but I do find myself bumping against one problem.

When I use it with an PHP-include (so I get index.php?page=news) it gives me an error

Fatal error: Cannot redeclare check_cookie() (previously declared in .mywebsite/forum/include/functions.php:28) in .mywebsite/forum/include/functions.php on line 28

Any ideas on how to fix this?

EDIT: Never mind! I found the problem. This was in my index.php:

<?php define('PUN_ROOT', 'forum/'); ?>
<?php include_once PUN_ROOT.'include/common.php'; ?>

Again, thank you! This script is just what I needed! smile Haven't been to these forums in like 2 months and I happen to find exactly what I was looking for.

quaker wrote:

remove this from the main.tpl

  <pun_title>
            <pun_desc>

Q

Thanks a lot quaker! smile

Hi,

In order to complete my PunBB intergration, I'd like to remove my Board Title and my Board Description (on the top of my Forum). I think this can be done with the include/template/main.tpl file, but I can't get it to work. Can someone help me with this? Sorry for my bad English.