DragonBlade
10-04-2008, 09:47 AM
I am attempting to create my first plugin, a system for "points" with a simple but powerful shop.
So far, I have been coding it just as I would any PHP script, without worrying about hooks (I don't really understand them yet, tbh). However, it seems I've come to a point where I'll either have to edit the source (a "hack" as opposed to a Plugin) or learn something. XD
I would like to have a field from the users table loaded into the $vbulletin->userinfo array, a field called "shoppe_points". This would make it simpler for me so that I don't have to write a specific query to get the value every time I need it.
So, my question is thus--can I use these "hook" thingies to do just that for me? Or should I edit the source code? (I've read that the latter is unpreferred due to files getting over-written upon updating, thus wiping away any hacks made to it.)
Please be gentle, vB newbie here.
-Sarteck
So far, I have been coding it just as I would any PHP script, without worrying about hooks (I don't really understand them yet, tbh). However, it seems I've come to a point where I'll either have to edit the source (a "hack" as opposed to a Plugin) or learn something. XD
I would like to have a field from the users table loaded into the $vbulletin->userinfo array, a field called "shoppe_points". This would make it simpler for me so that I don't have to write a specific query to get the value every time I need it.
So, my question is thus--can I use these "hook" thingies to do just that for me? Or should I edit the source code? (I've read that the latter is unpreferred due to files getting over-written upon updating, thus wiping away any hacks made to it.)
Please be gentle, vB newbie here.
-Sarteck