2008-04-26, 10:11 PM
So I've been spending the past 2 weeks working on a custom theme with tons of new features. I'm pretty close to finishing, but I got stuck on this while working on my Quick Mod Tool.
Whenever I try to test the deleting function it never gives me the right post id.
Here are some images to give a good idea of what I mean.
It's a rather wide image so I linked it.
The status bar shows it wants to delete post# 46, the thing is, neither of the two posts in that thread have a pid of 46, and it shows the pid as #46 no matter what post I use my mod tool on.
Here are the parts of code that involve that particular function.
Templates -> Post Bit -> postbit_iplogged_hiden (I replaced the IP thing with my mod tool so it only shows for moderators)
Templates -> Post Bit -> postbit_quickdelete
I would really appreciate some help with this matter, thanks a bunch.
Whenever I try to test the deleting function it never gives me the right post id.
Here are some images to give a good idea of what I mean.
It's a rather wide image so I linked it.
The status bar shows it wants to delete post# 46, the thing is, neither of the two posts in that thread have a pid of 46, and it shows the pid as #46 no matter what post I use my mod tool on.
Here are the parts of code that involve that particular function.
Templates -> Post Bit -> postbit_iplogged_hiden (I replaced the IP thing with my mod tool so it only shows for moderators)
<span id="delpost" style="display: none;">
<form action="moderation.php" method="post" style="margin-top: 0; margin-bottom: 0;">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<input type="hidden" name="tid" value="{$tid}" />
<input type="hidden" name="modtype" value="inlinepost" />
<div style="padding: 5px; border: 1px solid #FFF3BA; background-color: #FFF8DD;" width="100%" valign="middle">
<div style="float: right;">
<a href="#cancel" onclick="UnTip()"><sup>[X]</sup></a>
</div>
<b><small>Moderator Tools</small></b><br /><br />
<sup>
Are you sure you want to delete this post?<br />
{$post['button_quickdelete']}
</sup
</div>
</form>
</span>
Templates -> Post Bit -> postbit_quickdelete
<script type="text/javascript">
document.write('<a href="javascript:Thread.deletePost({$post['pid']});"><center>[Delete Post]<\/center><\/a>');
</script>
I would really appreciate some help with this matter, thanks a bunch.