phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

Handling base64 images in the [img] tag.

Discuss the future of phpBB. It is still nesting in its mother's womb, but it will grow a little bigger each day. Participate in its design & planning here.

Handling base64 images in the [img] tag.

Postby Dragosvr92 » Mon May 28, 2012 2:49 am

What do you think about allowing users to post base64 images, on forums, inside the existing [img] BBCode?

The base64 images are used inside the <img> tag, same as a normal image url, you will only need to modify the way the img bbcode tag interprets the link, and let it read the base64 image also...

I know the complex images are ablout hundreds characters, and that might be a problem for some people that might not want such a thing into posts of their forums. You could probably allow a option to allow board owners if they want to allow this on their board, or if you guys dont agree with my idea of allowing users to post such images, at least, add an error that tells the user that tries to post such an image, instead of having image code in the imb tag, seen as normal text. After the person trys to preview or submit the image, clear the code inside the img tag, and show an error.

Apologizes for the long and messed up post :)
Previous username: TheKiller
Avatar on Memberlist 1.0.3
User avatar
Dragosvr92
Registered User
 
Posts: 358
Joined: Tue May 31, 2011 12:08 pm
Location: Romania

Re: Handling base64 images in the [img] tag.

Postby Oleg » Mon May 28, 2012 5:53 am

This will probably not be advantageous for any images posted/uploaded by users.
Oleg
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: Handling base64 images in the [img] tag.

Postby Dragosvr92 » Mon May 28, 2012 11:16 am

Yeah, guess that it would be annoying to post such long codes, in the post. A warning message should be added if peoples entempt to post a image.
When the post gets previeved or submitten, it should check the [img] tag's contents and if it has data:image/jpeg;base64,, it displays an error.

Maybe it would be nice to display a error if the image link you added is seen as normal text, and it doesnt load any image at all.

PS: i see that the full editor button has changed into Full Editor and preview. What version does this forums use. 3.1.0? I want it out soon =)
Previous username: TheKiller
Avatar on Memberlist 1.0.3
User avatar
Dragosvr92
Registered User
 
Posts: 358
Joined: Tue May 31, 2011 12:08 pm
Location: Romania

Re: Handling base64 images in the [img] tag.

Postby imkingdavid » Mon May 28, 2012 12:36 pm

TheKiller wrote:PS: i see that the full editor button has changed into Full Editor and preview. What version does this forums use. 3.1.0? I want it out soon =)

Yes, that was a change made for 3.1. This forum is occasionally updated to the latest commits on the develop branch, which is 3.1.

As for this request, I'm not sure we really need it, but we can discuss it.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.
User avatar
imkingdavid
Development Team
Development Team
 
Posts: 906
Joined: Thu Jul 30, 2009 12:06 pm

Re: Handling base64 images in the [img] tag.

Postby bantu » Tue May 29, 2012 10:45 am

I completely fail to see the point of this. Initial post does not explain why this would be useful. Please elaborate.
User avatar
bantu
3.0 Release Manager
3.0 Release Manager
 
Posts: 439
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany

Re: Handling base64 images in the [img] tag.

Postby Erik Frèrejean » Tue May 29, 2012 11:23 am

bantu wrote:I completely fail to see the point of this. Initial post does not explain why this would be useful. Please elaborate.

^ that,
sounds like a very specific feature which only will be used by a very limited amount of users. Therefore such a thing would be far better off being an extension than a core feature.
Available on .com
Support Toolkit developer
User avatar
Erik Frèrejean
Registered User
 
Posts: 207
Joined: Thu Oct 25, 2007 2:25 pm
Location: surfnet

Re: Handling base64 images in the [img] tag.

Postby Dragosvr92 » Tue May 29, 2012 3:20 pm

Initially, i was suggesting that you allow base64 images to be posted, but then i thought that the image code is too long.
If someone ever tries to post such a code inside the [img] tag, the code and the [img] tag should be removed, and display an error message, saying that they cant post the images.
Previous username: TheKiller
Avatar on Memberlist 1.0.3
User avatar
Dragosvr92
Registered User
 
Posts: 358
Joined: Tue May 31, 2011 12:08 pm
Location: Romania

Re: Handling base64 images in the [img] tag.

Postby exussum » Wed Jun 27, 2012 7:16 pm

Erik Frèrejean wrote:
bantu wrote:I completely fail to see the point of this. Initial post does not explain why this would be useful. Please elaborate.

^ that,
sounds like a very specific feature which only will be used by a very limited amount of users. Therefore such a thing would be far better off being an extension than a core feature.


I would use it, It annoys me that there are alot of tutorials / posts in general with images like "removed from host" or "too many hits today" or just a 404 giving a bad image.

base64 would allow people to post images without the need of an image host
exussum
Registered User
 
Posts: 1
Joined: Wed Jun 27, 2012 7:13 pm

Re: Handling base64 images in the [img] tag.

Postby Oleg » Thu Jun 28, 2012 2:42 am

The board would still have to host said images. If you want to attach an image to a post there is already a facility for that.
Oleg
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: Handling base64 images in the [img] tag.

Postby Dragosvr92 » Thu Jun 28, 2012 4:30 am

TheKiller wrote:If someone ever tries to post such a code inside the [img] tag, the code and the [img] tag should be removed, and display an error message, saying that they cant post the images.

Can we add an error message ?
Previous username: TheKiller
Avatar on Memberlist 1.0.3
User avatar
Dragosvr92
Registered User
 
Posts: 358
Joined: Tue May 31, 2011 12:08 pm
Location: Romania

Next

Return to [4.x] Discussion

Who is online

Users browsing this forum: No registered users and 5 guests