vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   I'm sick of trying to program this (https://vborg.vbsupport.ru/showthread.php?t=219367)

sebaot 07-24-2009 05:10 PM

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.

Dismounted 07-25-2009 04:44 AM

Quote:

Originally Posted by sebaot (Post 1854740)
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 (Post 1854740)
was it so hard to make a "Save and Reload" there, too?!

It exists. You must be using an older version of vBulletin.

sebaot 07-25-2009 02:00 PM

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.

sherwood 07-25-2009 03:31 PM

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

sebaot 07-25-2009 03:58 PM

Quote:

Originally Posted by sherwood (Post 1855231)
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. :-)

Dismounted 07-26-2009 05:38 AM

Quote:

Originally Posted by sherwood (Post 1855231)
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.

knertified 07-26-2009 07:17 PM

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.

Dismounted 07-27-2009 06:24 AM

Quote:

Originally Posted by knertified (Post 1856039)
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.


All times are GMT. The time now is 08:10 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.01020 seconds
  • Memory Usage 1,735KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete