MyBB Community Forums

Full Version: Emerald Theme - Edit Button Broken
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!

I'm using the Emerald Theme, with some editing. I moved the post control buttons from the bottom of the post to the top, and  now the Edit button either doesn't work at all, or the options pop up halfway down the thread.

I'm not sure how to fix this.

I've set up a temporary account

Username: Edit Guest
Pass: bananasplit

All the other buttons work the way they are supposed to, but not the edit button.

Any assistance would be spectacular!

Test Thread
can you post code of your changed postbit_classic template ..
Of course!

{$ignore_bit}
<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
<div class="post classic {$unapproved_shade}" style="{$post_visibility}" id="post_{$post['pid']}">
<div class="post_flexible">
<div class="post_author scaleimages">
	<center><strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}{$post['authorchange']}</center>
	{$post['useravatar']}<br>
	<div class="author_information">
			
			<span class="smalltext">
				{$post['usertitle']}<br />
				{$post['userstars']}
				{$post['groupimage']}
			</span>
	</div>
	<div class="author_statistics">
		{$post['user_details']}{$post['attached_accounts']}
	</div>
</div>

<div class="post_content">
	<div class="post_head">
		{$post['posturl']}
		{$post['icon']}
		<br /><center><span class="post_date"><i class="fa fa-clock-o"></i> {$post['postdate']} <span class="post_edit" id="edited_by_{$post['pid']}">{$post['editedmsg']}</span></span>
		<br /> <div class="postbit_buttons post_management_buttons">
		{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quickrestore']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_purgespammer']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
	</div>
	</div>
	<HR>
	<div class="post_body scaleimages" id="pid_{$post['pid']}">
		{$post['message']}
	</div>
		<HR>
	{$post['attachments']}
	{$post['signature']}
	<div class="post_meta" id="post_meta_{$post['pid']}" align="right">
		{$post['iplogged']}
	</div>
</div>
</div>
		<div class="post_controls">
	<div class="postbit_buttons author_buttons float_left">
		{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}
	</div>
		</div>
</div>
(2018-01-31, 12:35 AM)ThistleProse Wrote: [ -> ]Of course!

Your code works fine for me on the default theme.
Is your postbit_edit template default?
(2018-01-30, 01:18 PM)ThistleProse Wrote: [ -> ]Hi!

I'm using the Emerald Theme, with some editing. I moved the post control buttons from the bottom of the post to the top, and  now the Edit button either doesn't work at all, or the options pop up halfway down the thread.

I'm not sure how to fix this.

I've set up a temporary account

Username: Edit Guest
Pass: bananasplit

All the other buttons work the way they are supposed to, but not the edit button.

Any assistance would be spectacular!

Test Thread

You've deleted a little more than you probably meant to. For example you are missing the find and pm buttons that usually show up on the left. The reason this is important is because the edit button isn't a simple link. It relies on javascript to pull up two different edit options. Since you deleted some of the containing divs, the selector is the js file isn't working properly any more. That's my best guess anyway.
(2018-02-01, 12:26 AM)SeabassG33 Wrote: [ -> ]You've deleted a little more than you probably meant to. For example you are missing the find and pm buttons that usually show up on the left. The reason this is important is because the edit button isn't a simple link. It relies on javascript to pull up two different edit options. Since you deleted some of the containing divs, the selector is the js file isn't working properly any more. That's my best guess anyway.

Those buttons are on the left, under the Classic Profile section, and like everything except the Edit button, they work fine.


(2018-01-31, 01:35 PM)iAndrew Wrote: [ -> ]Your code works fine for me on the default theme.
Is your postbit_edit template default?

No, but when I changed it to the default code, I had the same issue. This is teh edit code;

<a href="editpost.php?pid={$post['pid']}" id="edit_post_{$post['pid']}" title="{$lang->postbit_edit}" class="postbit_edit"><i class="fa fa-edit"></i></a>
<div id="edit_post_{$post['pid']}_popup" class="popup_menu" style="display: none;"><div class="popup_item_container"><a href="javascript:;" class="popup_item quick_edit_button" id="quick_edit_post_{$post['pid']}">{$lang->postbit_quick_edit}</a></div><div class="popup_item_container"><a href="editpost.php?pid={$post['pid']}" class="popup_item">{$lang->postbit_full_edit}</a></div></div>
<script type="text/javascript">
// <!--
	if(use_xmlhttprequest == "1")
	{
		$("#edit_post_{$post['pid']}").popupMenu();
	}
// -->
</script>
It's got to be an issue with javascript. You have all the same files with same permissions?
I believe so? I didn't make any changes to anything except the location of the piece of code to re-locate where the buttons are set.
Polite bump; still having issues Sad