PDA

View Full Version : Code copyright question


Dan615
Fri 30th Aug '02, 7:08pm
There are many things in the vBulletin code that I notice speed things up a whole lot (the Lite version, don't have the full version), like the verifyid function or the iif function. Would it be an infringement of copyrights if I took the concept of those functions and wrote my own version of it, kind of like using an encyclopedia to write a report?

Anakin
Fri 30th Aug '02, 9:12pm
I was going to ask this question, especially about the iif function. While I would never go so far as to usecode from vBulletin without permission, I must admit I've learn an awful lot about PHP from looking through vBs code.

Scott MacVicar
Sat 31st Aug '02, 1:57pm
iif is in other programming languages but its not in php, so I believe it was just added.

Chen
Sat 31st Aug '02, 2:53pm
iif() is just a nice way to do a ?: (http://php.fastmirror.com/manual/en/language.operators.comparison.php).

Dan615
Sat 31st Aug '02, 3:27pm
I guess that means I can use it?

What about the concept of other functions? There's so much to learn and use in the vB Lite code alone....

JohnM
Sat 28th Sep '02, 6:58pm
The iif() function was stoled from Visual Basic anyway... ;)

You'd probably need the permission of the vB developers to use their code... but is it really that hard to write your own version?

Dan615
Sat 28th Sep '02, 9:56pm
Nonononono, I was asking if i can use the concept, not the code :)

filburt1
Sat 28th Sep '02, 10:35pm
Originally posted by FireFly
iif() is just a nice way to do a ?: (http://php.fastmirror.com/manual/en/language.operators.comparison.php).

Well, easier to read at least than that dumb syntax...

JohnM
Mon 30th Sep '02, 12:01am
Then I doubt they'd have any problems unless it was some revolutionary new concept, which is certainly isn't since iif() came from VB (Visual Basic), and verifyid() isn't overly complex ;)

filburt1
Mon 30th Sep '02, 12:06am
You can rewrite iif pretty easily, anyway:

function iif($expression, $iftrue, $iffalse)
{
if ($expression) return $iftrue;
else return $iffalse;
}


C++:
int iif(int expression, int iftrue, int iffalse)
{
if (expression) return iftrue;
else return iffalse;
}


VB:
Function iif(expression As Boolean, iftrue As Variant, iffalse As Variant) As Variant
If expression Then
iif = iftrue
Else
iif = iffalse
End If
End Function

Stupid VB...

Dan615
Tue 1st Oct '02, 4:30pm
i never said it was hard, i just wanted to know if their copyrights covered the concept of some of the coding...if no, then i want to rewrite the functions for my needs, etc.