PDA

View Full Version : I'm sick of trying to program this


sebaot
07-24-2009, 05:10 PM
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
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.
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 1248535593 at 1248535593 ---------------

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
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
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
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.