TwistedGA |
|
---|---|
$multiquote = sed_import('multiquote','G','TXT');
if ($multiquote>0)
{
$multi = $multiquote;
$sql_test = sed_sql_query("SELECT fp_id, fp_text, fp_postername, fp_posterid FROM $db_forum_posts WHERE fp_topicid='$q' AND fp_sectionid='$s' AND fp_id IN ( $multi )");
while ($row4 = sed_sql_fetcharray($sql_test))
{
$newmsg .= "[quote][url=forums.php?m=posts&p=".$row4['fp_id']."#".$row4['fp_id']."]#[/url] [b]".$row4['fp_postername']." :[/b]\n".sed_stripquote($row4['fp_text'])."\n[/quote]\n\n";
}
} So I'm still having the repeat issue. For whatever reason, this code is not just running a single time, instead it runs for each post on the page. If theres a single post, it works how it should, 5 posts on the page, it repeats 5 times. The only way to make it stop running for each post present on the page, is to name "sql_test" "sql"... Which in turn removes all but the first post on the page(not what I want to happen obviously). I'm stumped on what to try that I have not already. I'm certain it's something minor, but it's a problem nonetheless. I'm working my arse off to fix it and release this.. EDIT// Also note that this worked perfectly when it's in the core. These problems of repeating are coming from conversion to plugin. It only works when hooked into the forums.posts.loop, everywhere else the code is ineffective. The code works in the core ONLY if the code is placed right below these lines; /* === Hook - Part1 : Set === */ $extp = sed_getextplugins('forums.posts.loop'); /* ===== */ Apparently, I'm retarded and don't know how to make it insert it right below that. I thought Hooks=forums.post.loop made it insert it right below that. I guess it's Hook - Part2 that defines where it's inserted? [color=#CC0000]Lazymod[/color] [color=#000000]Studios[/color]
|
|
Dit bericht is bewerkt door TwistedGA (2009-03-07 10:30, 16 jaren ago) |