26

(11 replies, posted in PunBB 1.3 extensions)

It's because you've not placed the php-code inside <?php and ?>. The correct code is

...
?>
<script type="text/javascript" src="http://www.footerchat.com/chat/cons.js"></script>
<?php
if (!$forum_user['is_guest'])
    echo '<script type="text/javascript">autoLogin("'.$forum_user['username'].'");</script>';
?>
    <p id="copyright"><?php echo sprintf($lang_common['Powered by'], '<a href="http://punbb.informer.com/">PunBB</a>'.($forum_config['o_show_version'] == '1' ? ' '.$forum_config['o_cur_version'] : ''), '<a href="http://www.informer.com/">Informer Technologies, Inc</a>') ?></p>
<?php
...

I'm afraid I can't. It requires a little bit more than just a change of some lines.

28

(11 replies, posted in PunBB 1.3 extensions)

You're welcome smile

You've given a link to the new topics RSS feed. It's not logical to put the last post in a topic as the content of this topic, because you can have no new topics, but meantime the content of the RSS feed is likely to change.

Now there are new topics feed and new posts in the topic feed. The reasonable question is "Why there is no new posts in the whole forum feed?" smile We'll consider it.

30

(4 replies, posted in PunBB 1.3 extensions)

Fixed and the new version of pun_bbcode (1.3.5) has been released.

31

(5 replies, posted in PunBB 1.3 discussion)

I didn't get what you want. Please, describe it in details.

32

(4 replies, posted in PunBB 1.3 extensions)

We'll try to fix it. What browser do you use?

Now I can't help you because I don't now what problem you are solving and I don't see the code. Describe it in details, please. And take a look at this topic: http://punbb.informer.com/forums/topic/ … e-website/. Is it what you want?

34

(11 replies, posted in PunBB 1.3 extensions)

I guess you need this code:

if (!$forum_user['is_guest'])
    echo '<script type="text/javascript">autoLogin("'.$forum_user['username'].'");</script>';

$forum_user['is_guest'] is true for guests, $forum_user['username'] contains the username.

35

(14 replies, posted in PunBB 1.3 troubleshooting)

There are functions with the same names in Wordpress and PunBB.

Try to do the next steps.

1. Copy include/essentials.php to include/my_essentials.php.
2. Copy include/functions.php to include/my_functions.php.
3. Change the filename in include/my_essentials.php from functions.php to my_functions.php (line 22):

// Load the functions script
require FORUM_ROOT.'include/my_functions.php';

4. Edit your script like this (I've just successfully tested it)

<?php

    error_reporting(E_ALL);
    define('FORUM_DEBUG', 1);

    $post_info = array(
        "poster" => "Jones",
        "subject" => "test",
        "posted" => time(),
        "forum_id" => 1,
        "poster_id" => 2,
        "message" => "test",
        'is_guest' => false,
        'subscribe' => false,
        'hide_smilies' => 0,
    );

    define('FORUM_ROOT', './');
    require FORUM_ROOT.'include/my_essentials.php';

    add_topic($post_info, $a, $b);

5. Try to run the script. Look through error messages. Remove from my_functions.php all functions with names conflicted.

36

(14 replies, posted in PunBB 1.3 troubleshooting)

Oh, sorry. I've forgotten to tell you to put error_reporting(E_ALL); at the beginning of the file.

I didn't get your question. What table and field in the database do you mean?

The string  a:1:{s:7:"Username";i:5;} looks like a value returned by serialize().

38

(14 replies, posted in PunBB 1.3 troubleshooting)

Any error messages? Try to add

error_reporting(E_ALL);

while debugging.

39

(14 replies, posted in PunBB 1.3 troubleshooting)

Seems like PunBB functions can't work with database if one just includes functions.php.

Try to include PunBB functions this way (as it's described in Wiki):

define('FORUM_ROOT', '../punbb/');
require FORUM_ROOT.'include/common.php';

functions.php will be included automatically.

I'm not sure that this setting

RewriteBase /iourtde/

works as you want.

Try to place the following in .htaccess in the www root directory:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/iourtde/punbb /iourtde/punbb/rewrite.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/iourtde /iourtde/index.php [L]
</IfModule>

41

(7 replies, posted in PunBB 1.3 discussion)

Ok, I've got it. Actually first_post_id is used in some places, for example, in edit.php. You can find the other entries using search in files.

Take a look at the db_update.php, line 1147. You can find there how to set first_post_id.

StevenBullen wrote:

Changed substr to mb_substr to handle utf-8 characters when subject is cut short

There are UTF-8 functions in PunBB. You can use utf8_substr(). It will automatically call mb_substr if available or a custom implementation otherwise.

43

(11 replies, posted in PunBB 1.3 extensions)

As far as I understand, there is no need to make an extension. You can just add those <script> tags to the "main.tpl" template of your style.

44

(1 replies, posted in PunBB show off)

Nice site smile

45

(7 replies, posted in PunBB 1.3 discussion)

Jones wrote:

The Script Dialog can be found at
http://www.jh-scripting.de/convert-bbpress-to-punbb/
now

Thanks. I've added the link to the Wiki migration page. Feel free to add a description or upload the file there.

Jones wrote:

can you tell me the function of the mysql field pun_topics->first_post_id ?

I didn't get what exactly you want. Do you solve this issue?

46

(7 replies, posted in PunBB 1.3 discussion)

Jones wrote:

this only works with the Integration of PunBB with Wordpress, because of the passwords.

Is it because of md5 hashes? Actually, earlier PunBB versions also had md5 hashes. And PunBB 1.3 is able to convert md5 hashes to sha1 hashes on the fly, transparently for users. Take a look at this piece of code.

47

(1 replies, posted in PunBB 1.3 discussion)

You can add the following code to the loop start at 304 line, viewtopic.php:

if ($forum_page['item_count'] == 1)
   echo '<!-- forum_qpost -->';

But the styles don't provide for such quick post form location and it may look ugly.

48

(4 replies, posted in PunBB 1.3 discussion)

Ok, feel free to ask for help.

You have to change the value of the $base_url variable in config.php.

50

(4 replies, posted in PunBB 1.3 discussion)

Redelectric wrote:

I was wondering does pun have that feature where you can see a preview of what's in the top, or post etc when you mouse of the title? or is it possible to add this feature somehow?

There is no such feature in PunBB. But, in principle, one can implement this as an extension. Maybe someone will help you. Please, describe in details what preview on what pages should appear.

Redelectric wrote:

pull the most recent discussions from all topics to display them on the front page, is this relatively easy to do with pun

You can find some examples of integration at this Wiki page. If you want something else, describe it in details, please.