MyBB Community Forums

Full Version: [GoMobile] Can't insert images into post, can't remove images
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
In editpost, newthread, newpost - insert uploaded image into post does nothing. It doesn't work at all. The 'insert into post' button is tappable, it just doesn't do anything.


In editpost - 'removing image' doesn't work. It pops up asking "do you want to remove image", tapping yes and it refreshes the page but image is still there.

Any help appreciated.
(2014-05-02, 12:37 PM)DrXotick Wrote: [ -> ]In editpost, newthread, newpost - insert uploaded image into post does nothing. It doesn't work at all. The 'insert into post' button is tappable, it just doesn't do anything.


In editpost - 'removing image' doesn't work. It pops up asking "do you want to remove image", tapping yes and it refreshes the page but image is still there.

Any help appreciated.

You click on "Choose File" -> "Add Attachment". Then when you're ready, post your comment and it should appear. I don't know what the point of the "Insert into Post" button is to be honest, I just remove it.

On my version of MyBB, I don't have a "Remove Image" button. But I would suggest editing it to bring you to the "Manage Attachments" tab on your profile.
The image is adding fine as an attachment.

It's insert into post in edit,reply,newthread --- And remove image from post from editpost that's not working.

The point to insert into post is that you can add images where you want in the post, instead of having them all sitting at the bottom Confused

The point to remove image from post is just that -> To remove it with a tap instead of having to go into manage attachments. It woks fine in newthread and newpost, but not in editpost.

Rather basic functionality that aren't working in GoMobile. At least not for me. Any help would be appreciated.
Have you checked if the GoMobile templates are updated?
There are many that are not. Due to the extreme differences in MyBB GoMobile and the template injection from the updates, the diff reports are insane. Reverting causes the entire theme to be broken.

GoMobile IMO needs an overhaul. It hasn't been updated in a long while. It's still functional, but there are at least 10-15 templates that have updated since I've installed it.

I have now fixed the 'remove image' from editpost...

but it's still impossible to insert.

What's strange is that by pasting the editpost from my regular theme, the functionality is there. I've gone through it line by line and can't see what the possible difference is.

With this, insert image into post works fine (but obviously the edit 'window' doesn't look right because it's for desktop theme):
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->edit_post}</title>
{$headerinclude}
<script type="text/javascript" src="jscripts/post.js?ver=1400"></script>
</head>
<body>
{$header}
{$preview}
{$post_errors}
{$attacherror}
<form action="editpost.php" method="post" name="editpost">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr><td class="thead" colspan="3"><strong>{$lang->delete_post}</strong></td></tr>

<tr><td class="trow1" style="white-space: nowrap"><input type="checkbox" class="checkbox" name="delete" value="1" tabindex="9" /> <strong>{$lang->delete_q}</strong></td>
<td class="trow1" width="100%">{$lang->delete_1}<br /><span class="smalltext">{$lang->delete_2}</span></td>

<td class="trow1"><input type="submit" class="button" name="submit" value="{$lang->delete_now}" tabindex="10" /></td>
</tr>
</table>
<input type="hidden" name="action" value="deletepost" />
<input type="hidden" name="pid" value="{$pid}" />
</form>
<br />
<form action="editpost.php?pid={$pid}&amp;processed=1" method="post" enctype="multipart/form-data" name="input">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr><td class="thead" colspan="2"><strong>{$lang->edit_post}</strong></td></tr>
{$loginbox}


<tr><td class="trow2"><strong>{$lang->subject}</strong></td>

<td class="trow2">{$prefixselect}<input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" /></td></tr>
{$extra_threadfields}{$posticons}

<tr><td class="trow2" valign="top"><strong>{$lang->your_message}:</strong><br /><div style="text-align: center;">{$smilieinserter}</div></td>

<td class="trow2"><textarea name="message" id="message" rows="20" cols="70" tabindex="3">{$message}</textarea>
{$codebuttons}</td></tr>



<tr><td class="trow1" valign="top"><strong>{$lang->post_options}</strong></td>

<td class="trow1"><span class="smalltext">
<label><input type="checkbox" class="checkbox" name="postoptions[signature]" value="1" tabindex="6"{$postoptionschecked['signature']} /> {$lang->options_sig}</label>
{$disablesmilies}</span>
</td></tr>

{$subscriptionmethod}
{$pollbox}{$editedby}
</table>
{$attachbox}
<br />
<div align="center"><input type="submit" class="button" name="submit" value="{$lang->update_post}" tabindex="3" accesskey="s" />  <input type="submit" class="button" name="previewpost" value="{$lang->preview_post}" tabindex="4" /></div>


<input type="hidden" name="action" value="do_editpost" />
<input type="hidden" name="posthash" value="{$posthash}" />
<input type="hidden" name="attachmentaid" value="" />
<input type="hidden" name="attachmentact" value="" />
</form>
{$footer}
</body>
</html>

This is what I use with GoMobile, where the insert is not working:
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->edit_post}</title>
{$headerinclude}
<script type="text/javascript" src="jscripts/post.js?ver=1400"></script>
</head>
<body>
{$header}
{$preview}
{$post_errors}
{$attacherror}
<form action="editpost.php" method="post" name="editpost">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
	<tr><td class="thead" colspan="2"><strong>{$lang->delete_post}</strong></td></tr>

	<tr><td class="trow1" style="white-space: nowrap"><input type="checkbox" class="checkbox" name="delete" value="1" tabindex="9" /> <strong>{$lang->delete_q}</strong></td>


		<td class="trow1" align="right"><input type="submit" class="button" name="submit" value="{$lang->delete_now}" tabindex="10" /></td>
	</tr>
</table>
<input type="hidden" name="action" value="deletepost" />
<input type="hidden" name="pid" value="{$pid}" />
</form>
<br />
<form action="editpost.php?pid={$pid}&amp;processed=1" method="post" enctype="multipart/form-data" name="input">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
	<tr><td class="thead"><strong>{$lang->edit_post}</strong></td></tr>



	<tr><td class="tcat"><strong>{$lang->subject}:</strong></td></tr>

	<tr><td class="trow2">{$prefixselect}<input type="text" class="textbox" name="subject" style="width: 50%;" maxlength="85" value="{$subject}" tabindex="1" /></td></tr>


	<tr><td class="tcat" valign="top"><strong>{$lang->your_message}:</strong></td></tr>

	<tr><td class="trow2" align="center"><textarea name="message" id="message" style="height: 150px; width: 95%;"tabindex="3">{$message}</textarea></td></tr>




	<tr><td class="tcat" valign="top"><strong>{$lang->post_options}</strong></td></tr>

	<tr><td class="trow1 smalltext">
		<label><input type="checkbox" class="checkbox" name="postoptions[signature]" value="1" tabindex="6"{$postoptionschecked['signature']} /> {$lang->gomobile_showsig}</label>
		{$disablesmilies}
	</td></tr>

	{$subscriptionmethod}


{$attachbox}
<br />
<tr><td class="tfoot" align="center"><input type="submit" class="button" name="submit" value="{$lang->update_post}" tabindex="3" accesskey="s" />  <input type="submit" class="button" name="previewpost" value="{$lang->preview_post}" tabindex="4" /></td></tr>

</table>
<input type="hidden" name="action" value="do_editpost" />
<input type="hidden" name="posthash" value="{$posthash}" />
<input type="hidden" name="attachmentaid" value="" />
<input type="hidden" name="attachmentact" value="" />
</form>
{$footer}
</body>
</html>

I can't see any possible difference between the two that would cause it not to work with the 2nd one. It's very strange...But insert image works fine in the first example, but not in the second.
The codebutton variable is missing. I think the insert to post is included in editor.js and the codebuttons. Not tested.
Hmm... Inserting codebuttons does fix the problem. Is there any way to get the functionality of insert to post without adding the codebuttons?

Also, Leefish, do you have any idea about this:
http://community.mybb.com/thread-153133.html
No idea, sorry.
{$codebuttons} variable is used to call codebuttons template that contains editor.js and editor related theme. In mobile theme development(s) including a text editor has more some issues: if you are using a device (smartphone for example) with a resolution of 480px (in width) you have to make major adjustments to buttons in order to make them clickable in the right way (and by "right way" i mean to adjust them in width and in height - 22px sometimes is to low for a button and when clicking on it you can accidentally clicked on another button near it).
Yea, you can just add a display:none to the toolbar container....

#editor_toolbar_container_bottom, #editor_toolbar_container_top {
display: none;
}

Not the best solution though really Sad
Pages: 1 2