MyBB Community Forums

Full Version: Postbit_Posturl Not Working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Forum link: http://saryndil.net/index.php

Good evening community, I am currently working on a custom theme for my MyBB forum and have come across an issue. When I make a post and then go to copy the link using the "postbit_posturl" to direct link someone to a specific post within a thread it does not bring them directly to that post within the thread. It will bring them to the thread but they still have to scroll through to find the post I was trying to link.

Here is the reformed code I am using in my postbit template:


{$ignore_bit}

<center><div style="width: 900px; height: 200px; z-index: 11111; background-image:url('http://i.imgur.com/2hyGEA5.jpg');"></img></center>

<div style="z-index: 99999; positive: relative;">
<table width="500px" style="margin-top: -180px; margin-left: 400px; z-index: 99999;">
<tr>

<td>

<div style="z-index: 99999; width: 100px; background-color: #111111; padding: 10px; width: 100px; height: 100px;">{$post['useravatar']}</div>

</td>

<td align="left" width="text-align: right; 320px">

<span style="color: #777777; font-family: agency FB; font-size: 40px; font-weight: 100px; text-transform: uppercase; text-align: center; letter-spacing: -2px; line-height: 36px;"><span style="color: #e9e9e9;">{$post['username']}</span>

<br>

<div align="left" style="color: #e9e9e9; font-family: agency FB; font-size: 12px; font-weight: 100px; text-transform: uppercase; line-height: 16px; letter-spacing: 1px;">ALIGNED WITH <span style="color: #ac0c16;">{$post['groupimage']}</span> HAILING FROM <span style="color: #a63c2c;">{$post['usertitle']}</span></div>

<div align="left" style="letter-spacing: 2px; color: #e9e9e9; font-family: courier new; font-size: 11px; font-weight: 100px; text-transform: uppercase; line-height: 16px;">( WRITTEN <span style="color: #a63c2c;">{$post['postnum']}</span> POSTS )</div>

<div align="left" style="letter-spacing: 2px; color: #e9e9e9; font-family: courier new; font-size: 10px; font-weight: 100px; text-transform: uppercase; line-height: 16px;">PLAYED BY - <span style="color: #a63c2c;"><?php
echo $parser->parse_message(htmlspecialchars_decode($post['fid4']),array('allow_mycode'=>1));
?>
</span></div>
</td>

</tr>
</table></div>
<center><div style="border-left: 4px double #141414; border-right: 4px double #141414; background-color: #0b0b0b; width: 892px; margin-top: 54px;">

<table cellspacing="15" valign="center">
<tr>

<td style="background: #111111; color: #777777; padding: 5px; width: 150px; font-size: 10px; line-height: 10px; font-family: verdana; text-align: center;">PROFILE:<br><?php echo $parser->parse_message(htmlspecialchars_decode($post['fid5']),array('allow_mycode'=>1));?></td>

<td style="background: #111111; color: #777777; padding: 5px; width: 150px; font-size: 10px; line-height: 10px; font-family: verdana; text-align: center;">WEAPON:<br><?php echo $parser->parse_message(htmlspecialchars_decode($post['fid6']),array('allow_mycode'=>1));?></td>

<td style="background: #111111; color: #777777; padding: 5px; width: 150px; font-size: 10px; line-height: 10px; font-family: verdana; text-align: center;">STATS:<br><?php echo $parser->parse_message(htmlspecialchars_decode($post['fid7']),array('allow_mycode'=>1));?></td>

<td style="background: #111111; color: #777777; padding: 5px; width: 150px; font-size: 10px; line-height: 10px; font-family: verdana; text-align: center;">INFLUENCE POINTS:<br>{$post['newpoints']}</a></td>

</tr>
</table></div>

<table style="width: 900px; background-color: #0b0b0b; border-left: 4px double #141414; border-right: 4px double #141414;">
<tr>

<td>
<br>
<div style="text-align: center;"><span style="font-size: 22px; font-family: georgia; line-height: 20px; color: #555555; letter-spacing: 1px;">❝ THREAD TITLE: <span style="color: #a63c2c;">{$thread['threadprefix']}{$thread['subject']}</span> ❞</span>

<div style="font-size: 16px; font-weight: 100; font-family: georgia; color: #999999; text-transform: lowercase; letter-spacing: 3px;">WRITTEN BY: <span style="font-style: italic;">{$post['username']}</span></div>

</td>

</tr>
</table>

<table style="padding: 20px; font-size: 10px; color: #444444; font-family: verdana; line-height: 12px; text-align: justify; width: 900px; background-color: #0b0b0b; border-left: 4px double #141414; border-right: 4px double #141414; border-bottom: 4px double #141414;">
<tr>

<td>
<div class="post_body" id="pid_{$post['pid']}">
					{$post['message']}
				</div>
</td>

</tr>
</table>

<div style="margin-left: -70px; padding: 5px; background-color: transparent; font-size: 12px; line-height: 18px; font-family: agency FB; letter-spacing: 2px; text-transform: uppercase; text-align: center; color: #a63c2c; width: 820px;">

<div class="post_content">
	<div class="post_head">
		{$post['posturl']}
		{$post['icon']}
		<span class="post_date">{$post['postdate']} <span class="post_edit" id="edited_by_{$post['pid']}">{$post['editedmsg']}</span></span>
		{$post['subject_extra']}
	</div>
	</div>

</div>

{$post['attachments']}

<br>

<tr>

<td class="trow1 post_buttons {$unapproved_shade}">
					
<center>{$post['button_email']} {$post['button_pm']} {$post['button_edit']} {$post['button_quickdelete']} {$post['button_quote']} {$post['button_reply_pm']} {$post['button_replyall_pm']} {$post['button_forward_pm']} {$post['button_delete_pm']}</center>

</td>

</tr>

</table><br><br>

<div style="margin-left: -70px;"><center>{$post['signature']}</center></div>

<div class="post_meta" id="post_meta_{$post['pid']}">

{$post['iplogged']}

</div></center><br><br>

Thank you for any and all help!
can you post content of postbit_posturl template of the theme ..
This is the code from that template:

<div class="float_right" style="vertical-align: top">
<strong><a href="{$post['postlink']}#pid{$post['pid']}" title="{$post['subject_title']}">#{$post_number}</a></strong>
{$post['inlinecheck']}
</div>
add below code after {$ignorebit} in the postbit templates, save & then check position of the postURL
<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
It works now, thank you so much!