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 :)
 
KingAdora said:
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 :)


You can, but it would mean that any work derived from phpBB would also become subject to the GPL. You wouldnt be able to charge for it, and, as i understand it, you'd be obliged to make *your* source code freely available.

(The details may be a little fuzzy - I'm not a lawyer....)

Its probably to ohigh a cost if its just a few lines of JS you want. Better to just write it yourself....
 
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? :/
 
For such a small piece of code you're probably OK - a lwayer would have a hard time proving that you took the implemntation from phpBB. And its the implementation, not the idea that is copyrighted.
 
Visage said:
For such a small piece of code you're probably OK - a lwayer would have a hard time proving that you took the implemntation from phpBB. And its the implementation, not the idea that is copyrighted.

Except after reading this thread and seeing he has :p
 
programming at uni, kinda goes like this: you have 3 whiz kids at programming, then you have 10 people per whiz kid who hacks each one up to pass as their own. two of the 3 whiz kids generally wont let anyone touch/view their code, so crafty emails copy n saves extra prints while they arn't looking or hanging round the printer's bin is in order :)

hacks specialise their work in such ways as variable name changes, function name changes, change of layout and disguising visual look with different *-*-*-*-*-* in the comments section for border patterns between functions and chunks of body of code.

More efficient hacks will break down loops into if/else statements and case statements. The more complex code from the whiz kids get removed for two reasons, they can't figure it out, and generally the hack will settle for a C grade, well even a D grade if they are really bad :)

ahem I am not going by my own time at uni. :)
 
Visage said:
You can, but it would mean that any work derived from phpBB would also become subject to the GPL. You wouldnt be able to charge for it, and, as i understand it, you'd be obliged to make *your* source code freely available.

(The details may be a little fuzzy - I'm not a lawyer....)

Its probably to ohigh a cost if its just a few lines of JS you want. Better to just write it yourself....

That's right apart from the fact that they could definitely charge for it if they wanted. By including GPL'd code in your non-GPL'd code, you effectively license your entire project under the GPL, which is something you probably don't want to do in this instance.

You could use Alex King's QuickTags, which are released under the LGPL. Unlike the regular GPL, you can use code that is LGPL licensed in your program, and you only have to make that source available on request, not your entire project. Much better for you, methinks :)

Edit: Disclaimer: I'm not a lawyer either :)
 
Last edited:
Why dont u use thier code as a method to write it your self, for example sketching some ones painting. dont coppy and paste it write it from scratch using the basic outline of what they have done and if the same functions are used thats just co incidence
 
richard1973 said:
programming at uni, kinda goes like this: you have 3 whiz kids at programming, then you have 10 people per whiz kid who hacks each one up to pass as their own. two of the 3 whiz kids generally wont let anyone touch/view their code, so crafty emails copy n saves extra prints while they arn't looking or hanging round the printer's bin is in order :)

hacks specialise their work in such ways as variable name changes, function name changes, change of layout and disguising visual look with different *-*-*-*-*-* in the comments section for border patterns between functions and chunks of body of code.

More efficient hacks will break down loops into if/else statements and case statements. The more complex code from the whiz kids get removed for two reasons, they can't figure it out, and generally the hack will settle for a C grade, well even a D grade if they are really bad :)

ahem I am not going by my own time at uni. :)

Spot on
 
richard1973 said:
programming at uni, kinda goes like this: you have 3 whiz kids at programming, then you have 10 people per whiz kid who hacks each one up to pass as their own. two of the 3 whiz kids generally wont let anyone touch/view their code, so crafty emails copy n saves extra prints while they arn't looking or hanging round the printer's bin is in order :)

hacks specialise their work in such ways as variable name changes, function name changes, change of layout and disguising visual look with different *-*-*-*-*-* in the comments section for border patterns between functions and chunks of body of code.

More efficient hacks will break down loops into if/else statements and case statements. The more complex code from the whiz kids get removed for two reasons, they can't figure it out, and generally the hack will settle for a C grade, well even a D grade if they are really bad :)

ahem I am not going by my own time at uni. :)
You from Leeds mate? Username rings a bell, think I bought some kit off you or sold you some years back and we met up at the Skyrack?
 
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