Moderators: OldWolf, re*s.t.a.r.s.*2
testtest wrote:How about if it appears as an thumbnail (generated by the script?), and then it is displayed full size if clicked.
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.
// image parse
rx = new RegExp('\[img\](.+?)\[/img\]','ig');
msg = msg.replace(rx, '<img src="$1" width="50px" height="50px" />');
[img]http://www.website.com/image.jpg[/img]
[img]http://www.website.com/image.gif[/img]
[img]http://www.website.com/image.png[/img]
Return to Feature Requests (v1.x)
Users browsing this forum: No registered users and 2 guests