View Single Post
  #18  
Old 01-12-2004, 08:05 PM
okrogius okrogius is offline
 
Join Date: Dec 2001
Location: USA
Posts: 264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01232 seconds
  • Memory Usage 1,779KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete