1

(95 replies, posted in News)

Quick thanks and a little issue (not in that order)...

The changelog link on the downloads page is broken.

Big buckets of thanks.
d

[edit] Ooh - where can I find the Hdiff for 1.2.12 - 1.2.13?
[edit2]nm, 'guessed' the url - is there a history link somewhere that I missed? Would it be worth having or am I slower than the average bear?
wink

http://punbb.org/forums/viewtopic.php?id=12535
smile

I've had a quick look through this thread and not found this mentioned so thought I'd add it:

Upon installation and running I had a load of code displayed at the top of my forum pages and (no surprisingly) the mod wasn't working.
After a little poking about under the bonnet I found that several of the files in the pm folder (in includes) used the shorthand php delimiters (<? ? ?>). I replaced these with the full versions (<?php  ?  ?>) and all was good.

Presumably this is a server setting that made it rather fussy about such things but it's a simple fix for a scary looking issue.

Nice mod, thanks.

Is it just me or is this download link broken (in OP)?

I'm interested in adding sub forums to my site but am having trouble finding an existing mod.
sad

Hi,
I'm new to all this modding lark but I wanted to tweak the forum to sometimes display the posts in reverse order so that the topic worked more like a blog. I thought this was what I wanted but that reverses the topic listing (can't think what value that has).

Anyway, I put together this very quick and dirty change which does the job for me and thought I'd share.
It's driven by a 'keyword' in the thread title (which is a bit rubbish but makes it a light change) and this keyword can be changed to suit easily enough.

Here's an example of it working.

Open

viewtopic.php

Around line 138 find

if ($pun_config['o_censoring'] == '1')
    $cur_topic['subject'] = censor_words($cur_topic['subject']);

After add

// Determine whether posts should be listed in reverse order
// (based on set string in topic title)
$reverseidentifyer = '[Blog]';
$reverseposts = false;
if (substr_count($cur_topic['subject'], $reverseidentifyer) > 0)
    $reverseposts = True;

Around line 185 find

// Retrieve the posts (and their respective poster/online status)
$result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());

Replace with

// Retrieve the posts (and their respective poster/online status)
// (reverse order if required)
if ($reverseposts) {
    $result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id DESC LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
} else {
    $result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
}

We have a site which supports many communities each of which with their own forum (http://dmz-gaming.com).

I would like to have a single logon and profile for all the forums but maintain control over permissions locally to each forum (when I refer to 'forum' here I mean installation of punbb, seperate location, files and databases).

As far as I can see there would be two ways of doing this:
1, have a single database of all members details that are not pertinant to permissions and direct all the forums to refer to this.
Pros
Scalability - as more forums are added the code of each will need tweaking and the user table will grow but the processing of each new registration or profile change will be constant.
cons
Means devorcing the basic registration details from the permissions and may require table changes
Harder build

2, Modify the registration and profile change code to apply changes to the databases of all the forums
Pros
Table structure can be maintained
cons
Poor scalability - as each forum is added the processing for registration and profile changes becomes more complex and processor expensive

Does anyone have any better ideas or even a solution already that would offer this function.

I have considered subforums but can't find code to try it out as this link seems to have died (retrieved from wiki and search)
http://punbb.org/forums/viewtopic.php?id=8381

Yeah, but if I put that in the page doesn't work.
hmm

Resolved, needed to change this too:

Within:
        function dump()
changed
    for ($i = 0; $i  $num_args; ++$i)
to
    for ($i = 0; $i = $num_args; ++$i)

thanks to those that helped.

Hi

I made a small change to include/functions.php and after uploading all pages on the site are completly blank.
I rolled back the change and uploaded but the pages are still all blank.

Can anyone suggest a fix?

I changed line 243 from
$links[] = '<li id="navindex"><a href="index.php">'.$lang_common['Index'].'</a>';
to
$links[] = '<li id="navindex"><a href="index.php">'.$lang_common['Index'].' |</a>';