Minor Rep System Tweak




Posted by lameboyadvance

...I've just noticed something about giving reps. If you rep without a description, it still says "lameboyadvance agrees:".

Surely it couldn't be too hard to add some lines of code that goes along the lines of:[code]if ($description == null)
{ echo $name + " agrees" }
else
{ echo $name + " agrees:" + $description }[/code]



...But this is probably me just being picky. ;)




Posted by Proto Man


Quoting lameboyadvance: ...I've just noticed something about giving reps. If you rep without a description, it still says "lameboyadvance agrees:".

Surely it couldn't be too hard to add some lines of code that goes along the lines of:[code]if ($description == null)
{ echo $name + " agrees" }
else
{ echo $name + " agrees:" + $description }[/code]



...But this is probably me just being picky. ;)


Wait... what's wrong with "lameboyadvance agrees:" ?



Posted by lameboyadvance

With the colon in there, apparently I'm agreeing to nothing.

It would just look better if it only said "lameboyadvance agrees".




Posted by Vampiro V. Empire

makes sense. Likely won't happen though.




Posted by Velvet Nightmare

Jesse is more than capable of doing it, but it would take months of asking, and a considerable amount of ":D" faces




Posted by Linkman

Jesse couldn't do even the simplest of PHP commands. The cause is a lost one. You wouldn't want him copying and pasting your code either, as it's littered with mistakes.




Posted by Vampiro V. Empire

Didn't the rep system used to automatically put "Vampiro agrees!" before? What happened to that?




Posted by Jesse Smith


Quoting Linkman: Jesse couldn't do even the simplest of PHP commands. The cause is a lost one.


grrrr!!!!!! Been to the Dragon Knight game??? Notice you get randon stats when walking around??!!!! I made that hack!!!! grrrrrr!!!!!!


Quoting Linkman: You wouldn't want him copying and pasting your code either, as it's littered with mistakes.






Posted by Hyper


Quoting Linkman: as it's littered with mistakes.

after repping you I realized he put a + in between two variables, which would make the result look like this:

Hyper + " agrees"

when all it needs to be is

$name agrees

SO SCREW ME.



Posted by lameboyadvance

My code above was just meant to be an example. I doubt it would have worked, considering I have no clue what the rep system code even looks like.

That, and I haven't touched PHP in over a year. I've forgotten if the echo statment needs parentheses, and the fact that PHP uses periods to concatenate instead of a plus sign.


If you want something perfect, do it yourself. :rolleyes:




Posted by Linkman

[Quote=Hyper (rep comment)]Hyper agrees: exactly what I was trying to say but an echo doesn't need parentheses

Not true. It only doesn't need parenthesis if it's a variable (or inside another function but I wont go there). If it's text, it does.

echo $name; // good
echo "$name"; // good
echo Linkman; // bad
echo "Linkman"; // good

and Javascript uses plus (+), PHP uses the the period (.).

echo $name." agrees!";




Posted by Vampiro V. Empire

PHP is so stupid.




Posted by Jesse Smith


Quoting Vampiro V. Empire: PHP is so stupid.


I'll second that!!! Perl is what ROCKS!!! :D



Posted by Linkman


Quoting Jesse Smith: I'll second that!!! Perl is what ROCKS!!! :D


Both Perl and CGI are ancient and outdated, just like yourself.



Posted by Jesse Smith


Quoting Linkman: are ancient and outdated, just like yourself.


grrrrr!!!!!!!!!! *cries* And wackos don't cry easily. :(



Posted by Velvet Nightmare


Quoting Linkman: Both Perl and CGI are ancient and outdated


just quoting



Posted by KoH

Maaan, what the **** happened here?




Posted by ed elric

my head is spinning, I can't understand a word that has been said in this tread. I have a hard enough time reading HTML!




Posted by Hyper


Quoting Linkman: Not true. It only doesn't need parenthesis if it's a variable (or inside another function but I wont go there). If it's text, it does.

echo $name; // good
echo "$name"; // good
echo Linkman; // bad
echo "Linkman"; // good

and Javascript uses plus (+), PHP uses the the period (.).

echo $name." agrees!";

there's a big difference between parenthesis and quotation marks :)



Posted by Linkman


Quoting Hyper: there's a big difference between parenthesis and quotation marks :)


...how in the hell... OK then, you're right, it doesn't need to be in parenthesis, but it does need to be in quotation marks. :mad: