Log in

View Full Version : Advice on how to make hacks


MindTrix
01-07-2004, 06:01 PM
Well im aquiring knowledge by the day now :) I have just finished the ARRAYS section of my book and it was very interesting indeed :) Confusing, but interesting. Now i need more knowledge.

Can people here (Obviously people who have made their own hacks) write some advice here on how to start a hack. I know obviously you need the idea first, but what steps should you do next? Look at the information you will need? Make templates first? Everything!! LOL sorry if i sound confusing i just need as much advice as possible or like step by step guide kind of thing.

All tips will be greatly appreciated :)

Gary King
01-07-2004, 11:04 PM
Err I guess write out what you think you'll need first, such as a template for an error page for your hack, a template for the main page, etc.

And then, if the hack is sort of standalone and can have its own page, then that is easiest because you only work with code that you created.
It is also a good idea to have a file-comparing program such as Araxis Merge or Beyond Compare (the precedent is suggested by me.)

NTLDR
01-07-2004, 11:09 PM
I learnt by installing and changing hacks here to work the way I wanted. Setup a test board and install some hacks that interest you, take a look at them and see if you change figure out how they work and/or make some modifications too them.

As for starting a hack, I guess it depends on what it is. Alot of the time whatever I start with is deleted by the end because I've changed my mind or realised it was crap :p

Gary King
01-07-2004, 11:13 PM
If it's something small, release it before you find out it IS crap! :p

MindTrix
01-08-2004, 04:51 AM
Lol thanks for the advice, keep em comming :p

Whats this file comparing you mentioned?

NTLDR
01-08-2004, 07:47 AM
Its compares two files and shows you the changes between the two. Its probably the best way to upgrade a hacked board. Take a look in the Hints and Tips forum, Teck wrote a good tutorial on howto use Araxis Merge.

KuraFire
01-08-2004, 08:56 AM
Its compares two files and shows you the changes between the two. Its probably the best way to upgrade a hacked board. Take a look in the Hints and Tips forum, Teck wrote a good tutorial on howto use Araxis Merge. For now it is, yup, but soon the Hack Tracking Log will be even more useful for upgrading a Hacked board. :)


As for advice on making hacks - the Hack Tracking Log will come with a section dedicated to this. Got some important/useful tips on making vB3 hacks. Additionally, I'm working with a few others to provide some really serious, useful Hacking guidelines for vB3. It'll still be a while before all that is done, though, so for now I'll stick to this:

I learnt my PHP and MySQL from 2 things: developing the CMS for work, and hacking my vBulletin board a LOT. It started with vB and that's always been my biggest aid. I've learnt most things from vB2 and vB3 (the efficiencies from vB3, the basics from vB2). I just kept on adding hacks and trying to create stuff I had in my mind. Slowly, the hacking of the board taught me enough to make serious hacks/systems, like my site's Journal system (http://kurafire.com/thecouch/journal.php?munchie=1) (a vB3 version is being made and, unlike my vB2 one, this will be released on vb.org). Then some time went by and vB3 came out and I started developing the Hack Tracking Log for vB3 and that taught me all the ins and outs of vB3, including all the far more advanced techniques used (compared to vB2).
All in all, I'm now pretty respected for my PHP / MySQL skills, and most of them I've gained by endlessly hacking vBulletin boards and reading through the vB code very thoroughly.

Hope that helps some. :)

MindTrix
01-08-2004, 04:23 PM
Yeah sure does. The main reason im looking forward too the Hack Tracking Log is because i read about the advice etc on hacking ;)

If you need beta tester let me know lol.

So far im reading from a book to learn PHP and today i finished the array sections and am now onto Objects. Getting lost easily now though because they explain it too complicated. Well ill pick it up somehow, or post here asking for an explination, But i guess even knowing about the common stuff, creating a hack from scratch seems like such a mission, i need some guys like you lot who know what their doing on my MSN to pester :p lol.

I've made one hack,and released here, but it was more of a conversion, so too me it is not the same as releasing one i coded from scratch :(

Gary King
01-08-2004, 07:27 PM
Yeah sure does. The main reason im looking forward too the Hack Tracking Log is because i read about the advice etc on hacking ;)

If you need beta tester let me know lol.

So far im reading from a book to learn PHP and today i finished the array sections and am now onto Objects. Getting lost easily now though because they explain it too complicated. Well ill pick it up somehow, or post here asking for an explination, But i guess even knowing about the common stuff, creating a hack from scratch seems like such a mission, i need some guys like you lot who know what their doing on my MSN to pester :p lol.

I've made one hack,and released here, but it was more of a conversion, so too me it is not the same as releasing one i coded from scratch :(
If objects are too complicated, let me assure you that they aren't a requirement to code vBulletin hacks - I haven't yet seen one that uses objects yet, actually I don't think :)

MindTrix
01-08-2004, 07:29 PM
What would you recommend i concentrate on?

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

So far im guessing Arrays, and Database things.

Anything else? BEcause if objects arent nessasary i might just skip that chapter

Gary King
01-08-2004, 07:31 PM
What would you recommend i concentrate on?

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

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 :D

MindTrix
01-08-2004, 07:32 PM
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 :p :$

Actually the variables you can pretty much get from vB3 when you hover over things in the admin cp huh :)

NTLDR
01-08-2004, 07:33 PM
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.

MindTrix
01-08-2004, 07:34 PM
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

NTLDR
01-08-2004, 07:39 PM
$DB_site is the object, query_first() is a function within that object so -> means call the variable or function from that object.

MindTrix
01-08-2004, 07:42 PM
Ahhhhhh i get you!! the query_first() function is stored inside the object, Yeah thats the part im kind of reading now

KuraFire
01-08-2004, 09:42 PM
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:

MindTrix
01-08-2004, 09:45 PM
because................?

NTLDR
01-08-2004, 09:49 PM
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 ;)

rrottman
01-08-2004, 09:53 PM
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.

MindTrix
01-08-2004, 09:56 PM
I got Zend Studio, ful version, Bloody amazing :)

As for thinkin i was a master hacker, thanks :p But sadly no, i know the basics etc and recently i seem to be helping out a hell of alot of people accidently lol, Mainly through PM's and people emailing me from this site :s Oh well lol.

I will get there one day :) As long as i got these tips etc to help along the way.

rrottman
01-08-2004, 10:00 PM
I got Zend Studio, ful version, Bloody amazing :)

As for thinkin i was a master hacker, thanks :p But sadly no, i know the basics etc and recently i seem to be helping out a hell of alot of people accidently lol, Mainly through PM's and people emailing me from this site :s Oh well lol.

I will get there one day :) As long as i got these tips etc to help along the way.
What do you generally think about the vB developer support apart from customers helping customer? Would you appreciate a concepts guide?

MindTrix
01-08-2004, 10:04 PM
I personally would LOVE a documentation or something listing Variables etc and what they do, and maybe some Mini Tutorials (even by members) On how to do things. Now not big tutorials, but something like "This tutorial shows you how to call a template" etc.

NTLDR
01-08-2004, 10:05 PM
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'm not sure what developer documentation will be provided with vB3, for vB2 all we had was a Database Schema from vB 2 RC2 (IIRC) and a template guide.

I can say that vB3 is far more consistent with its code, using the same layout throughout and the naming of its functions which allow you to fairly accurately guess what one would be called should it exist.

As vB doesn't offically support hacked boards I don't think they will produce the kind of documentation you listed, however we maybe supprised :)

rrottman
01-08-2004, 10:10 PM
I'm not sure what developer documentation will be provided with vB3, for vB2 all we had was a Database Schema from vB 2 RC2 (IIRC) and a template guide.

I can say that vB3 is far more consistent with its code, using the same layout throughout and the naming of its functions which allow you to fairly accurately guess what one would be called should it exist.

As vB doesn't offically support hacked boards I don't think they will produce the kind of documentation you listed, however we maybe supprised :)
@NTLDR: So based on your experience (2.457 posts!!!) do you think I could find contributors? Currently vb3 RC2 consists out of 505 files. If we would possibly focus on the 20 most important and try to create a companion developer documentation without violating the license, do you think we could find people helping to create the docs???

And after all: Would it make sense?
All opinions are welcome!

NTLDR
01-08-2004, 10:21 PM
Obviously not knowing what Jelsoft are producing in terms of documentation the following is what I think would be usefull, both to myself as an expericned hacker, and to people starting out:

Function Guide, a list of all the functions in vB3, a desctription of what they do and what information they return (if any) along with what file they are in.

A list of constants in vB3, if appropriate the values they can hold, and what the actaully define if its not obvious.

A list of some of the most common variables used, like $bbuserinfo, $vboptions etc what information they hold etc.

All three of the above can be done without voilating the licence, however it would take along time, there are probably around 1300~ functions and constants (combined, not 1300~ of each) in vB3 RC2.

rrottman
01-08-2004, 10:28 PM
Obviously not knowing what Jelsoft are producing in terms of documentation the following is what I think would be usefull, both to myself as an expericned hacker, and to people starting out:

Function Guide, a list of all the functions in vB3, a desctription of what they do and what information they return (if any) along with what file they are in.

A list of constants in vB3, if appropriate the values they can hold, and what the actaully define if its not obvious.

A list of some of the most common variables used, like $bbuserinfo, $vboptions etc what information they hold etc.

All three of the above can be done without voilating the licence, however it would take along time, there are probably around 1300~ functions and constants (combined, not 1300~ of each) in vB3 RC2.
Okay.
I'm really thinking of setting up a developer documentation project, maybe with an online function reference like php.net and the ability to comment? Maybe we can even use vB to do it??? :-) Post a function and its definition and comments?

Anybody else here: Would you contribute? If so: I create the site and keep you posted.

KuraFire
01-09-2004, 07:47 AM
Okay.
I'm really thinking of setting up a developer documentation project, maybe with an online function reference like php.net and the ability to comment? Maybe we can even use vB to do it??? :-) Post a function and its definition and comments?

Anybody else here: Would you contribute? If so: I create the site and keep you posted.
I've already started a site with a few other skilled hackers and managers, that focuses on this and many other areas of vBulletin. Our site will eventually contain a lot of useful guides such as what you guys are thinking of here. If anyone wants to help out writing those guides, feel free to contact me by PM. Also if you just want more information about this project of ours.

Gary King
01-09-2004, 07:03 PM
I've already started a site with a few other skilled hackers and managers, that focuses on this and many other areas of vBulletin. Our site will eventually contain a lot of useful guides such as what you guys are thinking of here. If anyone wants to help out writing those guides, feel free to contact me by PM. Also if you just want more information about this project of ours.
Sounds interesting Kura :)

MindTrix
01-09-2004, 07:34 PM
im interested also, Maybe you could PM me about this Kura please?? :)

KuraFire
01-10-2004, 03:41 PM
im interested also, Maybe you could PM me about this Kura please?? :)
Send me a pm about it and I'll remember to reply when I get home tonight. I'm not sure if i'll remember it on my own ("my mind is a swirling miasma of scinnelating thoughts and turgid ideas" ;))(a cookie for he or she who knows where that's from ^_^)

ok? :)

MindTrix
01-10-2004, 03:45 PM
If i pretend too know can i have 2 cookies for making the effort?

Gary King
01-10-2004, 04:49 PM
Send me a pm about it and I'll remember to reply when I get home tonight. I'm not sure if i'll remember it on my own ("my mind is a swirling miasma of scinnelating thoughts and turgid ideas" ;))(a cookie for he or she who knows where that's from ^_^)

ok? :)
I sent a PM, haven't received a response yet :ermm:

MindTrix
01-10-2004, 04:55 PM
He said he would PM back when he gets home tonight ;)

Gary King
01-10-2004, 05:01 PM
He said he would PM back when he gets home tonight ;)
Okay, it's just that I PMed him about 2-3 days ago :)

MindTrix
01-10-2004, 05:03 PM
Ah. lol. Well im sure this will remind him then :p

Gary King
01-10-2004, 05:07 PM
Hopefully, because I'm very interested in what he's doing right now :)