PDA

View Full Version : Making thread appear as latest for forum


LMimo
11-08-2007, 05:42 PM
I am adding a reply to a certain thread via a form. The code is like this...


build_new_post('reply', $foruminfo, $threadinfo, $postinfo, $newpost, $errors);


However when I add a new post to this thread via the form, it will not make the thread appear as the latest one updated.

It is the latest post in terms of time, but it doesnt recognise it as being the latest in terms of bumping the thread.

Is there a line of code that I can add that will correct this?

Thanks

Opserty
11-08-2007, 06:21 PM
Add
require_once('path/to/forum/includes/functions_databuild.php');
build_forum_counters($foruminfo['forumid']);
To the line underneath.

LMimo
11-08-2007, 06:57 PM
Thanks

So is this correct?

require_once('xwww.myforum.com/includes/functions_databuild.php');
build_forum_counters($foruminfo['11']);

That didnt work

LMimo
11-09-2007, 07:09 PM
Those added 2 lines are causing an error. I tried both xwww.myforum.com/includes, and ./includes and /includes


Warning: Unknown: failed to open stream: No such file or directory in /newthread.php(71) : eval()'d code on line 967

Fatal error: Unknown: Failed opening required '/includes/functions_databuild.php' (include_path='.:/usr/lib/php:/usr/local/lib/php')


Any ideas anyone?

ZomgStuff
11-09-2007, 07:41 PM
Thanks

So is this correct?

require_once('xwww.myforum.com/includes/functions_databuild.php');
build_forum_counters($foruminfo['11']);

That didnt work

Because it's not your URL, it's your server-relative location.

Save this as a php file and stick it in your forum directory, then open it up.
<?php
echo getcwd();
?>