Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-08-04 16:34:06

SteveG
Member
Registered: 2020-08-04
Posts: 24

Comment with image attached?

Hi all! I just start using Textpattern.
I’m wondering if there is a way to allow commenters to attach an image (like no larger than 2MB) when comment? if so, how?

Offline

#2 2020-08-05 06:07:56

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: Comment with image attached?

SteveG wrote #325148:

Hi all! I just start using Textpattern.
I’m wondering if there is a way to allow commenters to attach an image (like no larger than 2MB) when comment? if so, how?

Hi Steve and welcome to txp.

There is unfortunately no way to upload images for commenters. It is not a feature that I normally see in comments, although many platforms, including txp, allow the ‘embedding’ of remote images within the comments.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2020-08-05 14:03:20

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Comment with image attached?

I have not tried it, but probably one can create an email comment form via a combination of com_connect and ext_file_attach plugins.

Offline

#4 2020-08-05 14:21:38

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: Comment with image attached?

etc wrote #325174:

I have not tried it, but probably one can create an email comment form via a combination of com_connect and ext_file_attach plugins.

Hi Oleg,

I am using that and it works well, but I do not think that it will work in the way Steve needs it.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2020-08-05 14:44:43

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: Comment with image attached?

Aside: we currently assume – and enforce – textile in its restricted form for all comments. Nothing to stop us adding a tag attribute (or a pref?) that permits admins to choose which Textfilter to apply to comments from those installed. Benefits:

  • If anyone wants to turn off the ability to handle Textile, they can.
  • If anyone has installed wet_markdown_filter then people can use Markdown instead.
  • If anyone writes another type of markup system and adds it as a Textfilter, we can support it.
  • We could offer the option to choose between the default (restricted) or full versions of Textile.

We would also need to tweak the comments_help() function to return the help link for the currently in-force Textfilter.

None of this would directly permit image upload, but it might be a nice-to-have, and adds consistency to our ability to support any number of Textfilters.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#6 2020-08-05 16:56:20

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Comment with image attached?

Bloke wrote #325176:

Aside: we currently assume – and enforce – textile in its restricted form for all comments.

We actually have Allow more Textile markup in comments? pref, but allowing more textfilters would be nice indeed.

Offline

#7 2020-08-05 17:06:39

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Comment with image attached?

colak wrote #325175:

Hi Oleg,

I am using that and it works well, but I do not think that it will work in the way Steve needs it.

Hi Yiannis,

you are right, but the situations where you need to attach a file to a comment are rather unusual.

Offline

#8 2020-08-05 17:14:03

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: Comment with image attached?

etc wrote #325178:

Hi Yiannis,

you are right, but the situations where you need to attach a file to a comment are rather unusual.

That is indeed true. The only reason I can think of, are avatars widely used by services like Disqus.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#9 2020-08-05 17:55:14

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: Comment with image attached?

etc wrote #325177:

We actually have Allow more Textile markup in comments? pref

Ah, you’re right. I was getting mixed up between RestrictedParser and ‘Textile lite’. I just saw we called the former from markup_comment() and didn’t notice that it allows more markup options if the ‘fat textile’ pref is on.

allowing more textfilters would be nice indeed

Let’s add it to the list. Can’t be that hard, right?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#10 2020-08-05 19:23:21

SteveG
Member
Registered: 2020-08-04
Posts: 24

Re: Comment with image attached?

colak wrote #325179:

That is indeed true. The only reason I can think of, are avatars widely used by services like Disqus.

Thank you for replying! This may seem like an unusual feature to ask for. But in my community, in most Chinese online communities actually, memes/stickers/emojis have already become part of online communication, and are daily used everywhere.
So I think it will be nice to allow commenters to post memes or stickers that stuff.
Since attaching an image in the comment is a NO, is there a way to use the external image URL and make the image shows in the comment?

Last edited by SteveG (2020-08-05 19:24:15)

Offline

#11 2020-08-05 22:04:32

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Comment with image attached?

SteveG wrote #325181:

Since attaching an image in the comment is a NO, is there a way to use the external image URL and make the image shows in the comment?

Sure, !https://textpattern.com/assets/img/com/index-device-screens.png! will produce at least with Allow more Textile markup in comments? preference enabled.

Offline

#12 2020-08-06 04:44:56

SteveG
Member
Registered: 2020-08-04
Posts: 24

Re: Comment with image attached?

etc wrote #325182:

at least with Allow more Textile markup in comments? preference enabled.

Thanks a lot!

Edit:
I just tried. With the Allow more Textile markup in comments? enabled, I’m still not able to comment an image, Why?
Here is what it shows:
!https://i.imgur.com/cn0ibcy.png!

Last edited by SteveG (2020-08-06 05:03:40)

Offline

Board footer

Powered by FluxBB