MyBB Community Forums

Full Version: mycode & attachment issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm having a few issues with mybb and while I did try to figure out the solution or to google it I just couldn't resolve this problems.

My first issue is mycode.
What I'm trying to do is to replace regular expresion such is

\[img\](.*?)\[/img\]

with

<a href="javascript:void(0)" onclick="window.open('$1', '', 'toolbar=no');myWindow.focus();"><img src="$1" style="max-width: 640px;" alt="Image" title="Full sized Picture" /></a>

and all I'm getting is some sort of an error message that says "The specified my code does not exist".

[attachment=27648] [attachment=27649]


The next problem that I'm trying to solve is related with attachments. First thing, there's no "remove" button when I upload picture. Is there any known fix for this issue?

[attachment=27651]

The second thing is related with preview post where attached pictures are not showing or to be precise, they are showing as broken img link.

[attachment=27653]

It seems that the same problem with previewing attached images exist here on mybb community forum.

[attachment=27654]


I'm using Apart Twilight theme with just a few basic plugins.
Link us to a thread on your forum with attachments in it. A test account may also me useful.
regarding the attachment preview, the image is not completely uploaded and saved in the attachments table yet, thus during the preview the image is a red x becuase the attachment code (its a dynamic image) can't find it yet.

the remove button may be theme issue.make sure sure you have "post_attachments_attachment_remove" template and then you can find {$attach_rem_options} in "post_attachments_attachment" template
Quote:regarding the attachment preview, the image is not completely uploaded and saved in the attachments table yet, thus during the preview the image is a red x becuase the attachment code (its a dynamic image) can't find it yet.

So basicaly, what are you saying is that this sort of preview with attached images that are not displaying is normal because mybb is coded that way? Undecided
If that's the case, than the preview option is somewhat useless because you cannot rearrange images and you can't see how the future post will look like.


Quote:the remove button may be theme issue.make sure sure you have "post_attachments_attachment_remove" template and then you can find {$attach_rem_options} in "post_attachments_attachment" template

Unfortunately, it's not a theme issue. Remove button is also missing in the default theme which I'm trying right now on my computer (xampp, fresh install 1.6.8) and to make things a little bit interesting, here is a screenshot of this thread prior posting this reply.

[attachment=27662]

Could this be a bug?
If you are a keen user of images on your board and want very fine control then you could consider XThreads. It CAN be limiting; it can also be very useful, it depends on your board.

http://mybbhacks.zingaburga.com/showthread.php?tid=288
(2012-11-04, 03:11 PM)perun Wrote: [ -> ]So basicaly, what are you saying is that this sort of preview with attached images that are not displaying is normal because mybb is coded that way? Undecided
If that's the case, than the preview option is somewhat useless because you cannot rearrange images and you can't see how the future post will look like.

That is what i am saying.

Quote:the remove button may be theme issue.make sure sure you have "post_attachments_attachment_remove" template and then you can find {$attach_rem_options} in "post_attachments_attachment" template

Unfortunately, it's not a theme issue. Remove button is also missing in the default theme which I'm trying right now on my computer (xampp, fresh install 1.6.8) and to make things a little bit interesting, here is a screenshot of this thread prior posting this reply.

Could this be a bug?
[/quote]

it is not a bug, the template is in the default installer for 1.6.8, I just looked. Someone deleted the template from your system.
Quote:That is what i am saying.
OK, thank you pavemen for clarifying this.
I want to provide to my members posibility to upload images directly to my board without using external image sharing sites and because of that it would be nice to see the attached image in the preview post. Hearing that you cannot preview image is not something that makes me happy because I know it will make a lot of confusion among members. Sad

Quote:it is not a bug, the template is in the default installer for 1.6.8, I just looked. Someone deleted the template from your system.

It's not deleted. I just double checked it and it's there but it's just not showing when I upload the image. Here is the code from the "post_attachments_attachment_remove" template.

<tr>
<td class="trow2" width="1" align="center">{$attachment['icon']}</td>
<td class="trow2" width="75%" style="white-space: nowrap">{$attachment['filename']} ({$attachment['size']})</td>
<td class="trow2" style="white-space: nowrap; text-align: center;">{$attach_mod_options} {$attach_rem_options} {$postinsert}</td>
</tr>

And if you look at the post #4 you will see attached image with screenshot of mybb community board and as shown on the image, the remove button for the attachment is also missing. So, if this issue is happened on this board, im pretty sure this is not just the issue with my template. Here is another screenshot of mybb community board...

[attachment=27665]

One more thing, when I was starting this thread, in first post I had the option to remove attachments via remove button and now I do not.
bumping this thread, I still have a problem with missing remove button and with mycode error message.