Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 01-08-2004, 07:31 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MindTrix
What would you recommend i concentrate on?

Note variables and if statements etc dont count cause i know them

So far im guessing Arrays, and Database things.

Anything else? BEcause if objects arent nessasary i might just skip that chapter
I think it's best to start hacking right away, and if you run into any problems then just ask for help - that's how I learned (and you still learn everyday ), using the hands-on approach
Reply With Quote
  #12  
Old 01-08-2004, 07:32 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok well any chance of some kind of mostly used code etc to help?
Like the one to call templates, or some variables etc etc :$

Actually the variables you can pretty much get from vB3 when you hover over things in the admin cp huh
Reply With Quote
  #13  
Old 01-08-2004, 07:33 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You will more than likly use objects for your code, or example $DB_site to run queries, however you don't really need to know how it works, just what the function does, like $DB_site->query_first() runs a query and returns the first row it gets.
Reply With Quote
  #14  
Old 01-08-2004, 07:34 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ahh right thank you

That reminds me

What does -> mean? I kept seeing it in the Objects part of my book yet it did not explain what i meant or does
Reply With Quote
  #15  
Old 01-08-2004, 07:39 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

$DB_site is the object, query_first() is a function within that object so -> means call the variable or function from that object.
Reply With Quote
  #16  
Old 01-08-2004, 07:42 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ahhhhhh i get you!! the query_first() function is stored inside the object, Yeah thats the part im kind of reading now
Reply With Quote
  #17  
Old 01-08-2004, 09:42 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

going through vBulletin's functions files (yes, ALL of them!!!) is very helpful too. Every file in the /includes/ directory is a SUPERBE tutorial for learning PHP and MySQL :up:
Reply With Quote
  #18  
Old 01-08-2004, 09:45 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

because................?
Reply With Quote
  #19  
Old 01-08-2004, 09:49 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You'll find alot of usefull stuff for starters You may also find that it saves you alot of time too, if there is a function there that does what you want, that you don't know about you can use it instead of having to do the work yourself.

With the improved naming of functions in vB3 you can also look at the name which gives you some idea of what it does and then work out how the code does the task. If you want to create some serious vB hacks then you really need to nose through the files and see whats in them
Reply With Quote
  #20  
Old 01-08-2004, 09:53 PM
rrottman rrottman is offline
 
Join Date: Jun 2002
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MindTrix
because................?
MindTrix, I'm happy I finally found somebody at somewhat the same stage as I am... :-) However I though you were a master hacker already... .

I'm coming from a Java, J2EE, Servlet, JSP and Struts background, so I can kind of "read" most of the PHP stuff right away, although the notion of objects seems a little bit "injected" into the language.

I highly recommend to print out the .php files. I don't recommend to try to follow them "on screen". I printed out all of them on a color printer and just try to read through them "offline".

The thing which confuses me most is the overwhelming use of arrays by the vB team. And I'm really missing a basic developer documentation outlining what all the vars, consts and array actually mean in terms of the business objects they represent. Some of them have pretty explanatory names but there are paragraphs I've read n times without understanding even a bit of what and why they are doing things... .

I still think the vB team produces the best and most efficient php code around. So learning from their files is definitely a great privilege.

I also highly recommend Zend's Studio Pro which gives you a great debugger with variable tracing which helps a lot stepping through a vB session.

I still believe it might make sense to create a dedicated forum here at vb.org which focusses not on small hacks but on concepts, guides, documentation of code.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:16 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02199 seconds
  • Memory Usage 2,256KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete