Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 07-24-2009, 05:10 PM
sebaot sebaot is offline
 
Join Date: Jul 2005
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default I'm sick of trying to program this

I've written a few plugins for myself now. Nothing's been easy. The documentation about it (products and plugins) sucks. It's ridiculous. They could've left those little pieces of crap out instead of putting it in there.

Trying to handle the API documentation is a pain. There's comments in there describing methods literally like "Bla bla bla" (i.e. update_ban_status), and, man, is it too much to ask they put a little down on the hooks and when they fire? I've been working with registration_addmember_process and registration_addmember_completed or whatever the hell they're named. Addmember_process works great. Addmember_completed I throw a "standard_error('hello');" in and it doesn't show up. Sure'd like to know why it doesn't show up, but I guess I'm supposed to sit and read documentation that says "bla bla bla" and "does some stuff" and try every single hook in there, click "Save", on my plugin, scroll back down and get into edit mode of my plugin (was it so hard to make a "Save and Reload" there, too?!) and keep trying and trying and trying until something goes right.

No, I've written some plugins, and the documentation has been of no help. The worthless forum search engines are of no help either. I don't know how they filter out the results. Select all and random number generators to fill out the rowsets?

I am sick of this vBulletin hacking, and I write software for a living. :-( It'd be different if there was good documentation and it didn't like heckle you with comments like "bla bla bla" and "does some stuff" when you try to figure out what it does and why it's not working.
Reply With Quote
  #2  
Old 07-25-2009, 04:44 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sebaot View Post
I've written a few plugins for myself now. Nothing's been easy. The documentation about it (products and plugins) sucks. It's ridiculous. They could've left those little pieces of crap out instead of putting it in there.
Compared to other docs for other projects, I agree. It's a PITA to work with. However, I assume that there will be updated documentation as vBulletin 4 comes out. I'm sure IB can pull some people from a documentation department to write some decent stuff.
Quote:
Originally Posted by sebaot View Post
was it so hard to make a "Save and Reload" there, too?!
It exists. You must be using an older version of vBulletin.
Reply With Quote
  #3  
Old 07-25-2009, 02:00 PM
sebaot sebaot is offline
 
Join Date: Jul 2005
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, I'm on 3.7.0 and don't have a "Save & Reload" button. I'd love to have one, though.

--------------- Added [DATE]1248535593[/DATE] at [TIME]1248535593[/TIME] ---------------

Finally got this plugin to work at register_addmember_complete. I've had a whole gang of bots registering with 6 or more digits in their username, so I'm autobanning them if they match my regular expression. Turns out I'd missed a semicolon at the end of a line. I definitely need a debugger to write my code in before I put it into the vBulletin code box.
Reply With Quote
  #4  
Old 07-25-2009, 03:31 PM
sherwood sherwood is offline
 
Join Date: May 2008
Location: United Kingdom
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since I'm not a coder I don't know if this is what you mean but vBulletin has a debugger (I think)

https://vborg.vbsupport.ru/showthread.php?t=82835
Reply With Quote
  #5  
Old 07-25-2009, 03:58 PM
sebaot sebaot is offline
 
Join Date: Jul 2005
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sherwood View Post
Since I'm not a coder I don't know if this is what you mean but vBulletin has a debugger (I think)

https://vborg.vbsupport.ru/showthread.php?t=82835
I'm not sure what the vBulletin debugger does, but the warnings about my code is limited. I do know, however, that I had to turn debug mode on to get access to create new settings groups for my products and plugins -- something I think the documentation should've mentioned in their section on products/plugins, but not the docs I read. :-)
Reply With Quote
  #6  
Old 07-26-2009, 05:38 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sherwood View Post
Since I'm not a coder I don't know if this is what you mean but vBulletin has a debugger (I think)
vBulletin's "debug mode" reveals information about the current page, and allows access to special developer functions. It is not a PHP debugger like sebaot is/was looking for.
Reply With Quote
  #7  
Old 07-26-2009, 07:17 PM
knertified knertified is offline
 
Join Date: Aug 2004
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you want to debug PHP, I've had really good success with Visual Studio + VS.PHP. It's commercial software but works right out of the box. It installs an apache automatically and I have used it to debug my custom plugins inside of vbulletin.

If you want to debug javascript, get IE8. It has a build in debugger (F12). You can step through your code and look at what is in memory.

P.S. I agree with you that the documentation is horrible for vbulletin. I hope they fix that in 4.0.
Reply With Quote
  #8  
Old 07-27-2009, 06:24 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by knertified View Post
If you want to debug PHP, I've had really good success with Visual Studio + VS.PHP. It's commercial software but works right out of the box.
XDebug is free (open-source?) that most likely does as well as, if not better, than a commercial solution. It is also supported by many IDEs, such as NetBeans.
Reply With Quote
Reply

Thread Tools
Display Modes

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 07:30 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07019 seconds
  • Memory Usage 2,227KB
  • Queries Executed 11 (?)
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
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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_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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete