MyBB Community Forums

Full Version: Changes Break Quick Edit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello again everyone,

Using an older 1.6 Beta, as most of you know.

I'm currently skinning the postbit. I just replaced the original postbit_edit template with the following:

<a href="javascript:;" onclick="Thread.quickEdit({$post['pid']});">
  Quick Edit<b></b>
</a>

But, when clicked it doesn't do anything. Can anyone shed some insight upon this?

I've basically removed the drop down and added a separate link for a full edit - but quick edit seems to be broken now.

Thanks in advance,
Alex

EDIT:

When I try:

<a href="javascript:Thread.quickEdit({$post['pid']});">
  Quick Edit<b></b>
</a>

I get an all-white page that reads "false" in the top left corner on click of the link.

Any ideas?
This works:

<div id="edit_post_{$post['pid']}"><a href="javascript:;" onclick="Thread.quickEdit({$post['pid']});">{$lang->postbit_quick_edit}</a> or <a href="editpost.php?pid={$post['pid']}">{$lang->postbit_full_edit}</a></div>
(2010-05-31, 02:55 PM)Bob Jansen Wrote: [ -> ]This works:

<div id="edit_post_{$post['pid']}"><a href="javascript:;" onclick="Thread.quickEdit({$post['pid']});">{$lang->postbit_quick_edit}</a> or <a href="editpost.php?pid={$post['pid']}">{$lang->postbit_full_edit}</a></div>

I can't use the wrapping div for my current style and I only need the quick edit link here.

In addition, I need to add a <b></b> sandbag within the anchor.

I'd just like to understand the dependencies here so that I can try to work around them. Why does what you offered work and the following does not?

<a href="javascript:;" onclick="Thread.quickEdit({$post['pid']});">
  Quick Edit<b></b>
</a>
<a href="javascript:;" onclick="Thread.quickEdit({$post['pid']});">{$lang->postbit_quick_edit}</a>

Works for me...
(2010-05-31, 03:00 PM)Bob Jansen Wrote: [ -> ]
<a href="javascript:;" onclick="Thread.quickEdit({$post['pid']});">{$lang->postbit_quick_edit}</a>

Works for me...

Okay.

This problem must go deeper, in that case.

I just tried that very exact code and it didn't work.

Is it possible that I accidentally scrapped a dependency of the quick edit function within the postbit template? I've stripped down the postbit template a good bit, so this wouldn't surprise me.

Any other ideas?
I found it.

I had stripped the div wrapping the message in the postbit as seen here:

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

Thanks for your help.
(2010-05-31, 03:05 PM)ahstanford Wrote: [ -> ]
(2010-05-31, 03:00 PM)Bob Jansen Wrote: [ -> ]
<a href="javascript:;" onclick="Thread.quickEdit({$post['pid']});">{$lang->postbit_quick_edit}</a>

Works for me...

Okay.

This problem must go deeper, in that case.

I just tried that very exact code and it didn't work.

Is it possible that I accidentally scrapped a dependency of the quick edit function within the postbit template? I've stripped down the postbit template a good bit, so this wouldn't surprise me.

Any other ideas?
I have tested this code on 1.4 and just now on 1.6 and they both work. As you stated it must be something you have removed in another template but to be honest I have no clue what that could be. I guess you will have to revert the templates and see which one it affects.