Is this stealing code?

Soldato
Joined
18 Oct 2002
Posts
9,038
Location
London
At work we have a CMS. We licence it out to clients. In the end they have a website.

We have a forums section which is writen by someone else here.

We like the phpbb javascript - used for inserting smilies into the textarea, and when you click on the B button, it puts the {B} bbcode tags in too.
Are we allowed to just lift this javascript and use it on our own CMS?

Note we won't be touching the php or anything else, just the javascript.

From what I understand phpbb is opensource...

Any ideas?
KA :)
 
Trouble is, there's only so many ways of writing the javascript to put a bit of text in a textarea... And they've (no doubt) already done the nicest way.


Code:
	function emoticon(text) {
		var txtarea = document.post.Content;
		text = ' ' + text + ' ';
		if (txtarea.createTextRange && txtarea.caretPos) {
			var caretPos = txtarea.caretPos;
			caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
			txtarea.focus();
		} else {
			txtarea.value  += text;
			txtarea.focus();
		}
	}

What do you suggest, change the variable names? :/
 
Cheers for the info rob.

Ok, here's another good one for you guys ;)
How about the smilies. Is there anywhere that offers 'free to use and do what you want with' images?

Or do I have to make my own? :)
 
Back
Top Bottom