Quote:
Originally Posted by DarkJediKiller
It's simple, you don't like the hack? Don't use it! Simple, no?
|
I am not using it. Not due to disrespect for the person's time for writing this, but simply because I have no need for it. Nevertheless I don't believe giving suggestions how to make something better is something which shouldn't be done.
Quote:
Originally Posted by zajako
messy?, its not more than 20-30 lines, the codes made for commands are indeed kinda messy cause i translated them for vb3 by changing the ones for vb2.
I never actualy perfected the vb3 commands, as i dont use it for vb3, it has drop down menus. The coding powering it however is really clean and to the point, if you think its messy, then you must not know how to read php >.>
Sorry but people like you, are what pisses me off about this site. Insulting other peoples work, rather than being greatful somone like me takes the time to make something he does not use himself, to share with other people. If this were my site, i would ban every last person who instuled somone elses work >.>
Grr i sometimes hate this site!!!!
Good day to you all!
|
If you don't like a subtle suggestion to cleanup some of it, then by all means don't do it. But don't get upset over it either. If I wanted to insult you in any way I could have found another fifty different ways to do that more harshly.
Want me to be specific?
-lack of spacing [readability]
-lack of variable naming scheme, no camel/pascal/etc [readability]
-integers in quotes [readability, effeciency]
-double quotes where single quotes are more effecient, and which result in unnecessary escape characters [readability, effeciency]
-improper indentation in several places [readability]
-inconsistent use or AND, OR, &&, || [readability]
-unptopimzied if statements, most likely case should go first and it is also more readable that way [effeciency]
-use of functions which have better counterparts (ie rand(), mt_rand()) [effeciency]
-unnecessary temp variables - but you may argue your way out of this one by the fact that they increase readability [effeciency]
-use of slower functions without need for them (ie strstr(), strpos()) [effeciency]
You are more then welcome to dislike this and ignore it, or you may try to take suggestions so you code better in the future. But if you don't want to improve yoru code, fine, but at least don't cry when suggestions come.
As far as my comment about deletions go - that is is a rather large bug, but I don't see a comment on that. It does not delete the data completely (provided you wanted a complete delete, rather then vb3's "delete" of making it only visible to adminstration) and leaves garbage "lost" data in your database. You also need to delete the proper entries from the post table, postcache, and any other relevant tables I may not have on my mind at the moment too. [bug]
Talking more about logic bugs:
if(strstr($newpost['message'],$key[keyword])){
should be
if ( substr($newpost['message'], $key['keyword'])!==false ) {
Otherwise the command is not triggered if it's the first thing in the message body. (the position of the string will be 0, not 1; substr() vs strstr() is purely efficiency reasons) [bug]
And please don't assume that someone can't read PHP without any factual knowledge about the person.
Best wishes,
Oleg