Right, what I'm trying to do is fetch the first post in the topic, the actual post of the topic creator - this is for news, a full news view so to say (when you click the news you come to this page - Page with the news and the comments after).

Ive already managed to get all the comments, but having trouble getting a query only for the first post.

This is what it looks for the code for fetching the first topic post looks like at the moment:

    // Fetch some info about the news
$result = $db->query('SELECT t.id, t.subject, t.num_replies, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.forum_id, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, p.poster, p.poster_id, p.message, p.hide_smilies, p.posted 
                FROM '.$db->prefix.'topics AS t 
                INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id 
                INNER JOIN ' . $db->prefix . 'posts AS p ON topic_id='.$id.'
                INNER JOIN ' . $db->prefix . 'users AS u ON u.id=p.poster_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))
        {
            $cur_topic = $db->fetch_assoc($result);
            $cur_post = $db->fetch_assoc($result);
            while($cur_post)
            {
                $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']);

                echo '
                <h1>'.$cur_topic['subject'].'</h1>
                <p>'.$cur_post['message'].'<br /></p>
                <h3>'.$news_actions.'</h3>
                ';

                $cur_post = $db->fetch_assoc($result);
                if( $cur_post ) echo '';
            }    
    }

and Its not working properly (just giving me all the posts after the first post at the moment).

Could anyone help me with this? smile

Tubby wrote:

so, what you are thinking is that we should a user profile commenting system? seems like a good idea to me. It would probably make a great extension in punbb 1.3.

Well, at the moment I just want it for my community site wink

I managed to get the new fields done myself aswell as a view counter on each profile.

But I'm still looking for the code / addon for listing the last users that has visited the profile aswell as latest replies and topics on viewing profile.

Some other things I've been thinking about is a comment / guestbook for each user, where other users could comment it straight on their profile and a possible way to add friends, which would show up in their profile, listed.

4

(16 replies, posted in Feature requests)

What would I do if I wanted the topic creator to be able to post Img tags in the topic first post? smile

Alright, thanks Smartys smile

Sorry about posting it in wrong section.

Would been great if there was any addon or someone that could show me an way to do the following things, I'm average in php and excellent when it comes to xhtml and css, just to give you an idea of my knowledge when it comes to coding.

What I would like is (most likely self done without addons):
- Add more fields to the profile (character name, character class, race, level, realm..) - How would I do this? How do I add it to the profile and MySQL?
- Last visits, the last users shown up with link to their profile that has viewed the profile you're currently viewing.
- Visits done by registered members showing up in profiles.
- Last 5 forum replies showing up in profile with links to each forum reply.
- Last 5 forum topics showing up in profile with links to each forum topic.

Example for Last visits

Last Visits
- Ropli
- Ropli
- Ropli
- Ropli
- Ropli
- Ropli

Example for Last 5 forum replies / topics in profiles

Thanks In advance,
and yes I posted this on punres aswell, but didn't get any answer so I went ahead and posted here aswell hopefully better luck here smile

Yes, thanks for fast replys tho smile

Fixed it myself, Had the following in header.php tongue

$forum_id = $cur_topic['forum_id'];

Replaced it with

if (in_array(basename($_SERVER['PHP_SELF']), array('viewtopic.php','viewforum.php','profile.php')))
$forum_id = $cur_topic['forum_id'];

Yeah, Ive changed most of the forums codes.

The link you linked is for Bad HTTP_REFERER, not Bad request.

Well, I just recently started getting this error when I try to edit one of the forums (from admin panel) aswell as removing them, everything else works fine. Creating new forums, editing categorizes and so on.

When I try to edit one of the forums (both old and new) I get the following error:

An error was encountered
File: /home/yourspla/public_html/forte/forums/admin_forums.php
Line: 313

PunBB reported: Unable to fetch group forum permission list

Database reported: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') WHERE g.g_id!=1 ORDER BY g.g_id' at line 1 (Errno: 1064)

And when I try to delete a forum I get the following:

Info

Bad request. The link you followed is incorrect or outdated.

The first problem is the main problem, the other one I can probably figure out myself.

Thanks smile