Follow vBSEO on Twitter
vBulletin Modifications
  • Forums
  • Add-Ons
  • Template Modifications
  • Styles
  • Graphics
  • Tutorials
  • Support Center
  • Register
  • vBulletin SEO

Member Log In

Site Navigation

  • Register
  • Members List
  • Social Groups
  • Search
  • Today's Posts
  • Mark Forums Read

Latest Modifications

  • [vB 3.8.4] THX - Hack for VB. 3.8.4
    By: bluedog
  • [vB 3.8.4] Cyb - Chatbox V.2.3
    By: bluedog
  • [vB 4.0.x] PHPKD - Advanced Quick...
    By: PHPKD
  • [vB 3.6.x] StopSpam
    By: flappi282
  • [vB 3.8.x] vBulletin Chat Addon for...
    By: 123flashchat

Latest Template Mods

  • [vB 4.0.x] Remove My Profile Link...
    By: Ak Worm
  • [vB 3.8.x] Images DownloadBox...
    By: cRs!MP
  • [vB 3.8.x] Adviertise Mod On Forum...
    By: MG4
  • [vB 3.8.4] Images PassWordBox...
    By: cRs!MP
  • [vB 3.8.4] Footer Follow Ups
    By: Ak Worm

Latest Styles

  • [vB 4.0.x] 4.0.3 - VB4STYLE-TWEETA...
    By: Belon
  • [vB 4.0.x] [4.0.3] vbdesigns.de...
    By: Belon
  • [vB 3.8.4] CompletevB - Skylight
    By: DreadKnight
  • [vB 3.8.3] [vB 3.8.4] Barcelona...
    By: hoiquantinhoc.com
  • [vB 3.8.3] Natures Walk by vBSkin...
    By: Chri5

Latest Graphics

  • [vB ] [anim.]Team Ranks
    By: cRs!MP
  • [vB ] Abstract Circles (3...
    By: cRs!MP
  • [vB ] PlayStation Rank Images
    By: cRs!MP
  • [vB 3.6.12] Heavy Stroked Button...
    By: Shelley
  • [vB ] Minature Ranks.
    By: Shelley
vBulletin Modifications » General vBulletin Section » vBulletin Modification Tutorials » [How-To] Simple hack development stages
Reply
Page 1 of 2 1 2 >

 

  • Thread Tools
Old 08-28-2006, 06:44 PM   4 links from elsewhere to this Post. Click to view. #1
Idan
Coder
Idan's Avatar

Activity Longevity
0/20 18/20
Today Posts
0/3 sssss1484
Location: Israel
Age: 29
Idan is on a distinguished road
Status: Offline [How-To] Simple hack development stages
Hello,

i'm writing this small & simple "beginners guide" tutorial (was requested by garg @ http://www.vbhackers.com/showthread.php?t=5109).

step #1
Have some hack idea (we'll get back to it later on) :p

step #2
next stage should be to put your forums into "debug mode". for that you have 2 ways to do so:
1. edit your config.php file (under /includes/ dir) to add this line:
PHP Code:
$config['Misc']['debug'] = true; 
2. download the wonderfull hack LiveWire made called VbDebug.
(vBDebug Options)
then just install it, and under admincp -> options you should have options to turn debug mode on/off.

step #3
We'll create first the product.
go into admincp -> plugins and products - >manage products

below you should see [Add/Import Product], click it & you'll get this screen:

fill product id, title, version & description.
you can leave blank the product url & check version url fields.
note that product id cannot be changed after it's created.
when done just click on save & now we have some product to start work with.

step #4
for most hacks, you'll require at some point to store for it some options. that can either be simple as "enabled ? yes/no", or some other customized input that your hack requires.
to add an option, login into admincp, there go into "Vbulletin options -> vbulletin option":

now you should see something like this:

click on it (Add new settings group) & you should see this:

just fill the fields. for product choose the product we've created in the previous step we made.
when done you'll get this:

here you can add/edit all the options you need for this group.
i'll post later more details guide about that if needed, but lets for example add a yes/no option.
so click add setting and in screen, fill for example like this:

note instead of choosing product "vbulletin" (like in the picture), just choose your product you've created in step #3.
when done hit save button on bottom, and we've made our first option var for this product.
note that this option/var can be later access from any "hook" (will be explained in next step briefly) via using this kind of code:
PHP Code:
$vbulletin->options[my_var_name] 
repeat this step till after you added all the options (vars) you think your new modification will require.

step #5
hooks system/plugins:
since version 3.5.x jellsoft provided easy way to add code without any need to update core system files.
in order to make your modification work, you'll need to add some php code to it. this where you need to think where do you want it placed.
if for example you want something to be done after every new thread started, then it would be logical to add it into newthread_xxxxx hook.
there is a big list of hooks, you don't have to remember it all - just browse the list.
to add new plugin, just go into admincp -> plugins and products -> plugin manager.
on the bottom you should see link [Add New Plugin] .
click it. again select your product name.
now under Hook Location choose the prefered hook location.
write some title for it. you can leave excution order with the default value of "5", unless you have several plugins under same hook and needs something to be done before the other, in that case just number it like the order you want (1 is done first)
and inside Plugin PHP Code just write your main code (php code).

note that any php code is valid, in addition i'll provide with some common code fragements to help you through coding:

common vbulleltin arrays:
1. you can access the current logged-in userinfo data using
PHP Code:
$vbulletin->userinfo[field_name] 
so for example $vbulletin->userinfo[userid] will hold his id, $vbulletin->userinfo[username] his name/nick & so on.
2. another common array usefull is the $foruminfo[] - that holds some information about the current forum you're browsing.
so for example $foruminfo[forumid] will hold the forum id of the forum user is currently browsing (assuming you're inside forum hooks)

common vbulleltin mysql connections:
read from db:
PHP Code:
$array1 = $vbulletin->db->query_first("MYSQL QUERY HERE"); 
write/update to db:
PHP Code:
$vbulletin->db->query_write("MYSQL QUERY HERE"); 
also check LiveWire datastore tutorial @ Cache System Explanation (datastore) for more information regarding that.

step #6 (optional)
if your modification contains any new templates, then be sure to make those under the admincp -> style and templates -> style manager
expand view for the skin you're using and add template you need.
Note that php vars will be available under the templates that work with the hooks. so if for example you change forumhome template, and you have inside forumhome_xxx hook php var, you will be able to do some conditional check inside the templates.

common vbulletin function to help you with when working under templates - "IF condition":
PHP Code:
<if condition="$my_var">
in case condition is true this will be outputed
<else />
in case condition is false this will be outputed
</if> 
anyway, this is about all i have to write for this tutorial.
this pretty much cover making new modification from idea till coding stage.
i've tried to point out few common stuff to get you going.
be sure to check other great tutorials posted here & at vb.org.

hope this helps :classic:
Regards,
Idan.

* Support will only be given via forums !
* If this post solved/aided your problem, please click "mark as aid" / "mark as solution" as explained in here

Last edited by Idan; 08-28-2006 at 07:11 PM.
Reply With Quote
Old 08-28-2006, 06:53 PM   #2
garg
vB Newbie

Activity Longevity
0/20 13/20
Today Posts
0/3 sssssss21
garg is on a distinguished road
Status: Offline Default
wow :D Thank you very very much. This is great and very helpful! It cleared up a lot of stuff for me :notworthy:
Reply With Quote
Old 08-28-2006, 07:05 PM   #3
Michael Biddle
Staff
Michael Biddle's Avatar

Activity Longevity
1/20 18/20
Today Posts
0/3 sssss2818
Location: Anaheim
Age: 22
Michael Biddle is on a distinguished road
Status: Offline Default
Awsome tut dude
Support will only be offered through forums
Michael Biddle / vBHackers.com
vBSEO 3.3.0 Gold Released with New "Virtual HTML Display" Feature Available for download now

vBSEO Google Sitemap Generator - Version 2.5 Released

Crawlability Network: vBulletin SEO | vBulletin Hackers
Reply With Quote
Old 08-28-2006, 07:12 PM   #4
Idan
Coder
Idan's Avatar

Activity Longevity
0/20 18/20
Today Posts
0/3 sssss1484
Location: Israel
Age: 29
Idan is on a distinguished road
Status: Offline Default
fixed some typo in the vbulletin mysql code, missed "-" (->).
Regards,
Idan.

* Support will only be given via forums !
* If this post solved/aided your problem, please click "mark as aid" / "mark as solution" as explained in here
Reply With Quote
Old 08-28-2006, 09:31 PM   #5
Butcher
Advanced Coder

Butcher's Avatar

Activity Longevity
1/20 19/20
Today Posts
0/3 sssss1070
Location: lake district, england
Age: 30
Butcher is on a distinguished road
Status: Offline Default
great tutorial m8
willhelp alot of people this
Reply With Quote
Old 10-03-2006, 12:52 PM   #6
Rez
vB Newbie

Activity Longevity
0/20 13/20
Today Posts
0/3 ssssssss1
Rez is on a distinguished road
Status: Offline Default
Thanksalot for this tutorial! :D
Reply With Quote
Old 10-30-2006, 08:20 PM   #7
BamaStangGuy
Coder

BamaStangGuy's Avatar

Activity Longevity
0/20 13/20
Today Posts
0/3 sssssss48
BamaStangGuy is on a distinguished road
Status: Offline Default
Very nice tutorial!
Reply With Quote
Old 10-30-2006, 08:27 PM   #8
Joe Ward
vB Expert

Activity Longevity
0/20 16/20
Today Posts
0/3 ssssss561
Joe Ward is on a distinguished road
Status: Offline Default
I discovered this via a linkback. Great tutorial.
Reply With Quote
Old 11-09-2006, 04:29 PM   #9
farooqaaa
vB Newbie

Activity Longevity
0/20 13/20
Today Posts
0/3 sssssss10
Location: Pakistan
Age: 17
farooqaaa is on a distinguished road
Send a message via MSN to farooqaaa Send a message via Skype™ to farooqaaa
Status: Offline Default
thanks alot, its very helpful.

I learned a lot from this tut . And now just wait for my first Mod . hehe not joking :D
Reply With Quote
Old 11-10-2006, 07:17 PM   #10
MadK
Coder

MadK's Avatar

Activity Longevity
0/20 12/20
Today Posts
0/3 ssssss120
Location: Canada
MadK is on a distinguished road
Status: Offline Default
Thanks a lot!
Reply With Quote

Reply
Page 1 of 2 1 2 >

« [HOW-TO] Backup/restore using phpMyAdmin/SSH | [How-To] Integrate Mod with forum search results »

LinkBacks (?)
LinkBack to this Thread: http://www.vbhackers.com/f80/how-simple-hack-development-stages-5111/
Posted By For Type Date
How do I create my own mods? any tutorial to get me started? - vBulletin.org Forum This thread Refback 01-29-2007 11:47 PM
How do I create my own mods? any tutorial to get me started? - vBulletin.org Forum This thread Refback 01-29-2007 11:43 PM
Excellent Article on getting started with vBulletin Hacking - vBulletin Zone This thread Refback 12-01-2006 01:31 PM
Excellent Article on getting started with vBulletin Hacking - vBulletin Zone This thread Pingback 10-30-2006 08:19 PM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
[How To] Run vBulletin On your P.C. Ken Iovino vBulletin Modification Tutorials 83 11-02-2009 05:16 AM
[How To] Run a Query Ken Iovino vBulletin Modification Tutorials 9 07-30-2008 05:29 AM
Install System Part 2 Ken Iovino Announcements 10 05-19-2005 01:40 PM



All times are GMT. The time now is 05:18 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Transverse Styles
  • Top
  • Archive
  • vBSEO
  • Contact Us
LinkBack
See LinkBacks See LinkBacks
LinkBack URL LinkBack URL
About LinkBacks About LinkBacks
Bookmark & Share
Digg this Thread! Digg this Thread!
Add Thread to del.icio.us Add Thread to del.icio.us
Bookmark in Technorati Bookmark in Technorati
Furl this Thread! Furl this Thread!