Topic: Posting Problems

Hi guys,
Website URL: http://www.darkgaming.co.uk
Problem: Firstly, When I post a new topic and want to go back to view that particular topic, the screen goes white. The only way you can view the topic is by logging out and logging back in again.

Secondly, When I post a reply to a thread, everything registers that the post has been saved, it shows up in the no# of posts in topic column etc. But when you click on the topic itself, you can only see the very first post (the one by the topic starter)

Can anyone help me out?
Thanks in advance
Phil 91

Re: Posting Problems

Which mods have you installed?

3 (edited by Phil 91 2006-12-23 23:24)

Re: Posting Problems

Arcade
Calendar
DB Managment
Private Message
Newsletter
Profile Fields
Reputation

Think that is about it.

Re: Posting Problems

For it only showing one post:
You missed a modification to the main topic fetch query. Where it says 'true', change it to 'false'.

For the screen going white: no idea =/

Re: Posting Problems

Sorry for being a newbie, but which sheet is this on?

Basically Steven Bullen (hes a mod at punres) has helped me massivley with the site and he takes care of the backend database and intergration. Therefore, i don't know alot. I would have asked him but hes never online tongue

Re: Posting Problems

viewtopic.php wink

Re: Posting Problems

cheers big_smile

Re: Posting Problems

// Fetch some info about the topic
if (!$pun_user['is_guest'])
    $result = $db->query('SELECT t.subject, t.closed, t.num_replies, t.sticky, t.last_post, 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']);

$cur_topic = $db->fetch_assoc($result);

I guess this is where you mean.. is part of the code missing or something?

Re: Posting Problems

No, I mean where it fetches the posts. It's a large query. The second argument of the function should be set to 0.