• Welcome to Valhalla Legends Archive.
 

Karma idea.

Started by Grok, August 06, 2003, 05:44 PM

Previous topic - Next topic

Adron

Really? I thought it was more like Perl based with $variables and stuff. Guess perhaps it isn't so bad after all then.

Arta

#16
No, it's very C based. $ does indicate a variable, but so far as I know, that's where the similarity with PERL ends - that said, I don't know PERL, so I could be wrong. The rest of the syntax is all taken straight from C, with a few additions. Most PHP library functions are named after their C counterparts, although the order of arguments sometimes differs.

Variables are pretty much the only different thing, really. You don't need to declare them, as PHP will work out by itsself what type a variable is. There's an extra equality operator (===) which means 'is the same, and is the same type', so that you can distinguish between '0' and 0, if you needed to. Arrays can be indexed using strings as well as numbers which is quite useful. Include is implemented as a language construct instead of a directive. Functions don't have return types, since that's worked out automatically too.

There are probably a few other bits, but I think that's most of them :)

mavrick_kr

I think this would be the best method for the Karma Idea. I mean when people only roast but not toast its pretty negative. :-[



# Ensure that each user can only give +1/0/-1 for each post. Make it visible who gave karma, and make it possible to later write a small log analyzer program that bans people who always give karma in the other direction from everyone else.

Camel

Calculate karma dynamicly (but not on-the-fly; calculate it every time it is modified) based on the actual stored records of +/- karma. This way, users who are given karma by other users banned for giving "incorrect" karma can have their karma restored. This would help to eliminate grudges.