• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ Feature Requests (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Post \"Picture\" instead of text

This forum is now locked as we will no longer be developing the v1.x branch

Moderators: OldWolf, re*s.t.a.r.s.*2

Topic locked
22 posts • Page 1 of 2 • 1, 2

Postby 3ASV467 » Thu Aug 09, 2007 1:17 pm

Can user post an image in the chat room?
3ASV467
New member
 
Posts: 7
Joined: Wed Jun 20, 2007 9:20 am
Top

Postby Wavesonics » Thu Aug 09, 2007 9:01 pm

this shouldn't be hard to do at all, problem is, it could be really really annoying depending on the size of the images.
Wavesonics
Member
 
Posts: 10
Joined: Mon Jul 30, 2007 8:00 pm
Top

Postby phpfreechat » Mon Sep 03, 2007 7:14 am

An new bbcode [img] tag should be easily implemented ut as wavesonics said it could be very annoying when images are too big...
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby testtest » Fri Mar 07, 2008 8:20 pm

How about if it appears as an thumbnail (generated by the script?), and then it is displayed full size if clicked.
testtest
New member
 
Posts: 6
Joined: Mon Aug 13, 2007 6:31 pm
Top

Postby ToxXxicas » Tue Jul 29, 2008 7:40 am

testtest wrote:How about if it appears as an thumbnail (generated by the script?), and then it is displayed full size if clicked.

Thats what i want!!!!

Any mod???
www.ToxXxicas.com/chat
ToxXxicas
New member
 
Posts: 5
Joined: Tue Jul 29, 2008 7:38 am
Location: NW Arkansas
  • Website
Top

Postby phpfreechat » Tue Jul 29, 2008 8:16 am

It's doable, if someone want to implement this feature I'm ready to give some guidelines, to review the patch and to integrate it in the official source code.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby phpfreechat » Wed Oct 01, 2008 5:58 pm

"Ray" is interested to implement this feature, here is what I wrote to him by email :
Here is the guideline:
- You'll have to add a client side regex to catch [img]...[/img] bbcode in the posted messages. To do that, have a look to the "parseMessage" function in the data/public/js/pfcclient.js file.
- Then replace the [img]imageurl[/img] by the correct HTML: <img src="imageurl" alt="" />
If you want to manage thumbnail my advice is to look around a online web service that propose dynamic and online thumbnails.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby ToxXxicas » Wed Oct 01, 2008 9:37 pm

I find the "parseMessage: function(msg)" line but i don't know witch one to change, help!
www.ToxXxicas.com/chat
ToxXxicas
New member
 
Posts: 5
Joined: Tue Jul 29, 2008 7:38 am
Location: NW Arkansas
  • Website
Top

Postby numlock » Thu Nov 13, 2008 1:57 pm

I have implemented this in my Leeloo Chat. But of course, it's not nice to allow posted images in the public chat. I allow this for private messages only, which are managed and displayed in a separate screen.

Anyway, if you want to allow images for unregistered users, it's a pain to track them on the server side, without a user to attach them to. And just imagine the consequences of anonymous image posting on a public forum, depending on the image content ! That's why it should be "registered user only" IMHO.
Last edited by numlock on Thu Nov 13, 2008 2:01 pm, edited 1 time in total.
numlock
New member
 
Posts: 1
Joined: Thu Nov 13, 2008 1:52 pm
Top

Postby runebergen » Wed Nov 19, 2008 7:04 pm

ok, i got it working... PARTLY

if i post [img]myimage.gif[/img] it will work....

But as soon as the image is a real path ... like http://www.somesite.com/someimage.jpg... some other reg replace part of the script kicks in at the URL, and all gets messed up...

How can I prevent the URL inside the [img] tag to be processed by OTHER parts of the script ?


thanks in advance
runebergen
Member
 
Posts: 30
Joined: Tue Aug 12, 2008 10:00 am
Top

Postby runebergen » Wed Nov 19, 2008 8:32 pm

here is my current code

Code: Select all
// image parse
      rx = new RegExp('\[img\](.+?)\[/img\]','ig');
      msg = msg.replace(rx, '<img src="$1" width="50px" height="50px" />');
Last edited by runebergen on Wed Nov 19, 2008 8:33 pm, edited 1 time in total.
runebergen
Member
 
Posts: 30
Joined: Tue Aug 12, 2008 10:00 am
Top

Postby runebergen » Thu Nov 20, 2008 7:12 pm

Anyone??

At least a hint at where the URL parse part is ?


( why is this support forum sooooooooo dead? ) hum


Crossin fingers for some help
runebergen
Member
 
Posts: 30
Joined: Tue Aug 12, 2008 10:00 am
Top

Postby runebergen » Wed Nov 26, 2008 11:07 pm

Anyone who could help me with some regexpr to make the following code produce an image in the chat? In other words make an img BBcode tag work. Would really really apreciate it...

Code: Select all
[img]http://www.website.com/image.jpg[/img]
[img]http://www.website.com/image.gif[/img]
[img]http://www.website.com/image.png[/img]

Thanks in advance if you can
runebergen
Member
 
Posts: 30
Joined: Tue Aug 12, 2008 10:00 am
Top

Postby Calman45 » Sat Dec 13, 2008 10:11 am

I'm going through the "almost" exact same problem! ... I know HTML and I know a fair bit on BBcode, but I can't get it to execute properly in the php environment.

I had success with putting together font selection icons on my chat, but the image side of things is a whole different ball game ( not an easy one to crack either! *sobs* )

Cal :(
Calman45
Support Team
 
Posts: 150
Joined: Sun Oct 26, 2008 11:09 pm
Location: Western Canada
  • Website
Top

Postby Calman45 » Tue Dec 23, 2008 9:27 am

Built my own external system in HTML/Java ... problem fixed.
Calman45
Support Team
 
Posts: 150
Joined: Sun Oct 26, 2008 11:09 pm
Location: Western Canada
  • Website
Top

Next

Topic locked
22 posts • Page 1 of 2 • 1, 2

Return to Feature Requests (v1.x)

Who is online

Users browsing this forum: No registered users and 2 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub