vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Making thread appear as latest for forum (https://vborg.vbsupport.ru/showthread.php?t=162223)

LMimo 11-08-2007 05:42 PM

Making thread appear as latest for forum
 
I am adding a reply to a certain thread via a form. The code is like this...

Code:

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
PHP Code:

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?

PHP Code:

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

Code:

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

Quote:

Originally Posted by LMimo (Post 1378582)
Thanks

So is this correct?

PHP Code:

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.
Code:

<?php
echo getcwd();
?>



All times are GMT. The time now is 03:03 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03769 seconds
  • Memory Usage 1,722KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete