3,851

(14 replies, posted in PunBB 1.2 troubleshooting)

alicia_3107 wrote:
Smartys wrote:

Once again, calm down. You misunderstood the way pun_include works.
Here are the steps to follow, given that you have a file called my_header.php
1. Put a copy of my_header.php in the include/user folder of the forum
2. In your template, use <pun_include "my_header.php">

pun_include ONLY includes scripts within the include/user directory, therefore there's no need to add path information

aaaahhhh 8)))) OK I understand now. Butthis only available for the new version ! I think it is important to specify this in th doc ...

thanks

I'm a little confused: pun_include has existed for all of 1.2 and the include/user directory rule has been in place since 1.2.6 (which was released in July 2005).
Plus, it's documented in the FAQ:
http://punbb.org/docs/faq.html#faq3_4

3,852

(5 replies, posted in PunBB 1.2 troubleshooting)

That depends on your host

3,853

(12 replies, posted in Feature requests)

There are no plans to backport the feature to 1.2 smile

3,854

(10 replies, posted in PunBB 1.2 troubleshooting)

That's an issue with your host (which I would guess is Netfirms, since they seem to be the only host with this issue)
http://punbb.org/forums/viewtopic.php?pid=82594#p82594
http://punbb.org/forums/viewtopic.php?pid=82621#p82621
http://punbb.org/forums/viewtopic.php?pid=82623#p82623

You'll need to make at least the first change, the second and third are necessary only if you continue to get errors

3,855

(20 replies, posted in PunBB 1.2 troubleshooting)

That changes the language information sent to the browser, not what's stored in the database.
For more information on that, see http://blog.punbb.org/2007/02/12/switching-to-utf-8/

3,856

(14 replies, posted in PunBB 1.2 troubleshooting)

Once again, calm down. You misunderstood the way pun_include works.
Here are the steps to follow, given that you have a file called my_header.php
1. Put a copy of my_header.php in the include/user folder of the forum
2. In your template, use <pun_include "my_header.php">

pun_include ONLY includes scripts within the include/user directory, therefore there's no need to add path information

3,857

(5 replies, posted in PunBB 1.2 troubleshooting)

That sounds like a problem with your server: I'd ask your host.

3,858

(14 replies, posted in PunBB 1.2 troubleshooting)

A. Relax
B. Is your pun_include now
<pun_include "my_header.php">

I couldn't integrate my header and footer into PunBB because the templating system doesn't allow php includes

Of course it does
http://punbb.org/docs/faq.html#faq3_4

3,860

(4 replies, posted in PunBB 1.2 discussion)

Nice smile

3,861

(5 replies, posted in PunBB 1.2 troubleshooting)

Have you modified email.php?

Moved to Plugins

3,863

(20 replies, posted in PunBB 1.2 troubleshooting)

Ahmed wrote:

Lietot? (Member)
--------
User, not member.

That is a language file thing
And I'll say it again: you need to convert the contents of your posts to a charset (in this case UTF-8) that can display ALL the languages.

3,864

(20 replies, posted in PunBB 1.2 troubleshooting)

The issue I believe is that there really isn't a good way to represent all the different characters except in UTF-8. What you would need to do is convert the charset of your posts to UTF-8 (since right now they're using iso-8859-13 characters)

Googling on this type of keywords is usually pointless. I don't have time to wade through wide-ranging technical discussions full of coder/linux jargon just to fix a specific, practical issue in PunBB.

I'd have to disagree with you: it really is helpful, especially when looking to figure out what a PHP variable or function is (not necessarily a PunBB specific one). In this case, the first result was http://us2.php.net/reserved.variables, which gives a rundown of every element of $_SERVER.

In this case my basic question still is whether it is theoretically possible to rearrange the folders. Is it just a matter of editing addresses and redirects or are there, for example, serious security issues involved.

It's not as simple as just rearranging the folders for various reasons: there would be code editing involved

PunBB to me is bloated because I don't need the language files and some other stuff that makes the code more complicated than it could be. I like PunBB, but I'm not too happy that I have to let it take over my entire site if I want to integrate it properly.

I'm not convinced that you have to let PunBB "take over your entire site" in order to have integration. Why can't you just disable/remove PunBB's register.php page, add an insert statement to your registration page that creates a matching forum account, and add a set_cookie bit to your login page so that the user is logged into the forum as well?
And out of curiosity, what features of PunBB would you consider "bloat"? With regards to the language files, I'd say they really don't add another complicating layer: instead, they have all the output strings in one place so you only have to edit a string once to change it throughout the site.

FIND

// Fetch some info about the topic
if (!$pun_user['is_guest'])
    $result = $db->query('SELECT pf.forum_name AS parent_forum, f.parent_forum_id, t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, s.user_id AS is_subscribed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'subscriptions AS s ON (t.id=s.topic_id AND s.user_id='.$pun_user['id'].') LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') LEFT JOIN '.$db->prefix.'forums AS pf ON f.parent_forum_id=pf.id WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());
else
    $result = $db->query('SELECT pf.forum_name AS parent_forum, f.parent_forum_id, t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') LEFT JOIN '.$db->prefix.'forums AS pf ON f.parent_forum_id=pf.id WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());

if (!$db->num_rows($result))
    message($lang_common['Bad request']);

REPLACE WITH

// Fetch some info about the topic
if (!$pun_user['is_guest'])
    $result = $db->query('SELECT pf.forum_name AS parent_forum, f.parent_forum_id, t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, s.user_id AS is_subscribed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'subscriptions AS s ON (t.id=s.topic_id AND s.user_id='.$pun_user['id'].') LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') LEFT JOIN '.$db->prefix.'forums AS pf ON f.parent_forum_id=pf.id WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());
else
    $result = $db->query('SELECT pf.forum_name AS parent_forum, f.parent_forum_id, t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') LEFT JOIN '.$db->prefix.'forums AS pf ON f.parent_forum_id=pf.id WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());

if (!$db->num_rows($result) && $pun_user['is_guest'])
    redirect('register.php', 'Redirecting to registration page...');
else if (!$db->num_rows($result))
    message($lang_common['Bad request']);

3,867

(2 replies, posted in PunBB 1.2 troubleshooting)

http://punbb.org/download/lang_packs-1.2/French.zip
Language packs are all listed on the Download page wink

3,868

(4 replies, posted in PunBB 1.2 troubleshooting)

Sounds like a variable isn't being set properly although it should be: restore a clean copy of admin_forums.php and try installing the mod again

3,869

(5 replies, posted in Feature requests)

Enable debug mode, paste the full error

3,870

(4 replies, posted in PunBB 1.2 troubleshooting)

Enable debug mode, paste the full error

No, there's no way to do this without modifying the code.

Moved to Modifications
There's a plugin (Broadcast Email) and a Newsletter mod

// Fetch some info about the topic
if (!$pun_user['is_guest'])
    $result = $db->query('SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, s.user_id AS is_subscribed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'subscriptions AS s ON (t.id=s.topic_id AND s.user_id='.$pun_user['id'].') LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());
else
    $result = $db->query('SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());

if (!$db->num_rows($result))
    message($lang_common['Bad request']);

You would add an if statement there before the if (!$db->num_rows($result)) one that checks the number of rows and if the user is a guest

Moved to Modifications
Easiest way would be to change viewtopic.php so that if a person doesn't have enough permission to view the topic and they're a guest, they're directed to register

Moved to Modifications
You can either modify extern.php or capture the output in your script and parse it.