View Single Post
  #1407  
Old 07-13-2011, 04:56 AM
ascroft ascroft is offline
 
Join Date: Jun 2010
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just to be clear it works fine for the forum it gets moved to, but the forum it was posted in in the first place still shows the header detail for the post that is no longer there...

Thanks

Mark

Quote:
Originally Posted by ascroft View Post
Hi there Dom.

The refresh of what was the last post in a forum using a plugin seems to have stopped working probably due to another change I made using arrays to have the thread prefix working. The move itself to the correct forum is fine but not the forum details update - keen to have this working again. (think it is at the bottom of the code below)

We added a plugin that moved the thread to the correct forum (newthread_post_complete) and it has the following:

if ($fid == 1)
{
$forumid = $q['forumid'];
$dataman =& datamanager_init('Thread', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$dataman->set_existing($threadinfo);
$dataman->setr('forumid', $forumid);
$dataman->pre_save();
if (count($dataman->errors) > 0)
{
foreach ($errors as $error)
{
$errorss .= $error. "<br />";
}
$errormessage = "Form failed to submit. The following error(s) occured: <br /> ".$errorss;
eval(standard_error($errormessage));
}
else
{
$dataman->save();
$foruminfo = fetch_foruminfo($forumid);
$threadinfo = fetch_threadinfo($newpost['threadid']);
mark_thread_read($threadinfo, $foruminfo, $vbulletin->userinfo['userid'], TIMENOW);
build_thread_counters($newpost['threadid']);
build_forum_counters($forumid);
}
}


I have pasted below the code for the custom question from the form that I think is related:

$newarray = array(
158 => $vbulletin->forumcache['158'],
160 => $vbulletin->forumcache['160'],
161 => $vbulletin->forumcache['161'],
162 => $vbulletin->forumcache['162'],
163 => $vbulletin->forumcache['163'],
165 => $vbulletin->forumcache['165'],
167 => $vbulletin->forumcache['167'],
168 => $vbulletin->forumcache['168'],
169 => $vbulletin->forumcache['169'],
170 => $vbulletin->forumcache['170'],
172 => $vbulletin->forumcache['172'],
174 => $vbulletin->forumcache['174'],
175 => $vbulletin->forumcache['175'],
177 => $vbulletin->forumcache['177'],
179 => $vbulletin->forumcache['179'],
181 => $vbulletin->forumcache['181'],
61 => $vbulletin->forumcache['61'],
182 => $vbulletin->forumcache['182'],
183 => $vbulletin->forumcache['183'],
184 => $vbulletin->forumcache['184'],
186 => $vbulletin->forumcache['186'],
188 => $vbulletin->forumcache['188'],
190 => $vbulletin->forumcache['190'],
191 => $vbulletin->forumcache['191'],
193 => $vbulletin->forumcache['193'],
56 => $vbulletin->forumcache['56'],
194 => $vbulletin->forumcache['194'],
195 => $vbulletin->forumcache['195'],
197 => $vbulletin->forumcache['197'],
);
$answer = "<select name=\"$formbit[id]\" id=\"q_" . $formbit[id] . "\">";
foreach ($newarray AS $forumid => $forum)
{
if ($qo['forumid']==$forumid)
{
$forum['selected'] = ' selected="selected"';
}
$answer .= "<option value=\"$forumid\"$forum[selected]>$forum[title]</option>";
}
$answer .= "</select>";


I have also pasted the code for the newthread_form_start -

if (in_array($forumid, array(158,160,161,162,163,165,167,168,169,170,172, 174,175,177,179,181,61,182,183,184,186,188,190,191 ,193,56,194,195,197)))
{
header('Location: /listings/misc.php?do=form&fid=1');
}

Can you advise please?

Thank you

Mark
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01158 seconds
  • Memory Usage 1,787KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete