Jump to the post that solved this thread.
Solved: 4 Years, 7 Months, 1 Week ago parse images in QUOTES ? change img to url
#1
Solved: 4 Years, 7 Months, 1 Week ago
'When a person posts an image like

[Image: blow-pops.jpeg]

and another person QUOTES this post,
the QUOTED post  will show the message text and instead of the image, it will say something like

-[Click here to view the image from the post]-

'
example:

Quote:When a person posts an image like

-[Click here to view the image from the post]-

and another person QUOTES this post,
the QUOTED post  will show the message text and instead of the image, it will say something like

1: Convert the image to a link
2: Only QUOTED images are converted to LINK
3: Should affect both inline image, and attachment images. * (this one is optional if only inline image can be converted, that's fine)

Please only post the solution, or link to method that actually works.
I have read and tried every methods discussed on mybb.com before, none works as described above.

(2017-04-18, 12:33 AM)Vanz Wrote: 'When a person posts an image like

[Image: blow-pops.jpeg]
[Image: impossibly-cute-puppy-2.jpg]
[Image: blow-pops.jpeg]

and another person QUOTES this post,
the QUOTED post  will show the message text and instead of the image, it will say something like

-[Click here to view the image from the post]-

'
example:

Quote:When a person posts an image like

-[Click here to view the image from the post]-
-[Click here to view the image from the post]-
-[Click here to view the image from the post]-

and another person QUOTES this post,
the QUOTED post  will show the message text and instead of the image, it will say something like

1: Convert the image to a link
2: Only QUOTED images are converted to LINK
3: Should affect both inline image, and attachment images. * (this one is optional if only inline image can be converted, that's fine)

Please only post the solution, or link to method that actually works.
I have read and tried every methods discussed on mybb.com before, none works as described above.
Reply
#2
Solved: 4 Years, 7 Months, 1 Week ago
most probably jQuery can be used for such requirements [something like this]
Reply
#3
Solved: 4 Years, 7 Months, 1 Week ago
(2017-04-18, 05:09 AM).m. Wrote:  [something like this]

Thanks but,


1: That method does not tell the readers that there was any image-ATTACHMENTS in the  OP that was quoted.
2:  Does not LINK back to the image(s) as described here


Tested on MyBB 1.8.11
Reply
#4
Solved: 4 Years, 7 Months, 1 Week ago
Added these attachment images for testing 

   

MB 1 = attached
MB  2 = attachment - inserted in post

Quote this post /Quick reply to this post.


Attached Files Thumbnail(s)
   
Reply
#5
Solved: 4 Years, 7 Months, 1 Week ago
well, you can try using something like below in the showthread template (above </body>)
<script type="text/javascript">
$('blockquote img').each(function () {
var imgurl = $(this).attr("src");
var imgurl2 = '<a href='+imgurl+'>[image]</a>';
$(this).replaceWith(imgurl2);
});
</script> 
Reply
#6
Solved: 4 Years, 7 Months, 1 Week ago
Thanks @.m.

We are part-way there Big Grin
This worked perfect for inserted linked images,
but it truncated all attachments in the quote, even attachments that are "insert in post"

(2017-04-21, 05:20 AM).m. Wrote: well, you can try using something like below in the showthread template (above </body>)
<script type="text/javascript">
$('blockquote img').each(function () {
var imgurl = $(this).attr("src");
var imgurl2 = '<a href='+imgurl+'>[image]</a>';
$(this).replaceWith(imgurl2);
});
</script> 
Reply
#7
Solved: 4 Years, 7 Months, 1 Week ago
^ IIRC, image attachments are no longer displayed in the quoted messages. (eg. #)
Reply
#8
Solved: 4 Years, 7 Months, 1 Week ago
(2017-04-21, 09:56 AM).m. Wrote: ^ IIRC, image attachments are no longer displayed in the quoted messages. (eg. #)

Whats the LAST version of MyBB that attachments was still quotable ?
or
How do I reinstate that capability ?

T.I.A.
Reply
#9
Solved: 4 Years, 7 Months, 1 Week ago
^ I tried searching through different versions of MyBB
and I understand that attachments never appear in the quoted messages.
so far could not trace where exactly that restriction is made.

attachments are tied to specific post (pid)

[attachment=18] <-- does not work here but it works at its specific post
Reply
#10
Solved: 4 Years, 7 Months, 1 Week ago
Thanks for all your help @.m.

I have seen image attachments quoted on MyBB run forums in the past,
I just cant remember the forum(s) ATM.
maybe they had a MOD or they did some file alterations to get that accomplished.

I will keep searching still.
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)