Back to vBulletin 3 Articles

Setup for modding vBulletin
by brunod76 12 Dec 2005

Hi all, just wanted to post this since maybe others don't know how to do this, and having a clean setup to do some modding will only ensure that you do some good mods . I'm a full time programmer (java but did some php in the past) and found a few tricks to ease development. Basicly I have setup my vBulletin board locally (on my home PC) exactly like on my online board, so now I'm all set to start some serious modding.

Why do that? Well, the reasons are mostly speed and ease (all files being local it loads MUCH faster), access to all folders and files directly rather than through ftp, comfidence that you can mod AS MUCH as you want without disrupting at all your users. It also ensures you have a live working copy of your website, great in case of disaster.

Here's the steps I did:
- Installed vBulletin online on my hosting along with basic setup (licenses, site name, etc).
- installed Apache, Php & mySql on my home PC using the Xampp package (http://www.apachefriends.org/en/xampp.html), pretty decent to get all that installed without too much pain. I've also tried EasyPHP in the past which was good too.
- Once all the basic stuff was setup (both online and locally), I downloaded all the files (in case vBulletin modifies some of them I wasnt sure) and the mysql database (via phpmyadmin) to my local pc
- created a database on mysql named the same, along with the same user and password to avoid changing configs.
- imported the sql file into my local mysql
- I'm not on linux so I had to change a path or two (in vBulletin admin panel options). If I was I would've created the same paths on my linux machine but I'm sticking to windows to develop. Unless perhaps if you have a unix emulator (such as Cygwin) you might be ok, I havent tried that.
- put your vBulletin site inside your apache document root (using same relative path as on your online setup). At this point if you try your vBulletin locally (ex http://localhost/forum or whatever folder you put it in) it should run without errors.
- change your windows hosts file to 'hide' your domain name and point to your localhost server. To do this, go into C:\windows\system32\drivers\etc and open up the file named "hosts" with notepad (make a copy before editing it in case of screw up please!). Add a line in there (right after 127.0.0.1 localhost) such as
Code:
127.0.0.1     yoursitename.com
This will trick windows into loading your local machine when you type yoursitename.com into an internet browser. Please note that you will have to comment out this line (add dash symbol in front) you just added to see your online website, so don't forget about this I tried looking around for a tool that would switch that dynamically but couldn't find any, bummer...
- I've added a http://httpd.apache.org/docs/1.3/vhosts/ into Apache, but I'm not sure if you need to do this. I did it because I have many sites I want to develop (on different domain names).
- At this point, if you type http://yoursitename.com/forum you should have the local copy of your forum (the one on your computer not online) come up. Neat isnt it? Be careful not to confuse yourself lol. If you want to confirm it's working just add a bogus image (or a different board logo) on your local machine and load it in the browser.
- Bonus: then install a source versionning system (either http://subversion.tigris.org/ or https://www.cvshome.org/ for the traditionnals). I havent tried svn much but it seems to have picked up a lot of fans. I'm used to CVS so I'm sticking to that. The nice thing is once you import your site into your versionning system, you will be able to easily track ALL changes that you've done (even what lines you have edited) and to compare to the previous versions. This is great to feel comfident about trying out things and reverting in case you screw up. It also great for those late evenings your coding and get sleepy if you know what I mean . I use the WinCVS client for managing file versions and a file comparison tool called WinMerge, available on sourceforge for free. Note that this step is more trouble to install, and they usually require a bit of learning curve so there's no instant reward. But if you plan on doing continued developments & tweaks on your site this might be a must.
- That's it! So now I'm ready to get into the serious stuff

Additionally, I might work out a way to do some modding on the templates and export them on my live board (online). Probably this can be done by exporting certain tables in mysql but I'll have to verify. Another neat thing

For what it's worth, I'm developing using Eclipse. It's a great all-around tool that you can use to code many things (such as Java) and an indispensable partner once you've used it for a while. There is a php extension for it (phpeclipse), which works quite well and plugs right into the solid base Eclipse provides.

I have done a few mods so far, I will post them in other topics later on.

By the way, Firefox provides some excellent features too to test and debug your web projects. It has a developer plugin you can install easily which allows many things such as displaying meaningful javascript errors, highlighting elements inside the page (tables, etc) and many other things too long to mention here. Here's the link anyways:

http://www.mozilla.com/firefox/
http://chrispederick.com/work/webdeveloper/

Hey also, while I think of it, another GREAT tool is NetSnippets. It allows you to save 'snippets' from web pages.

It's great because for programmers like us, we very often see pieces of code online / explanations that we need to save somewhere. This little piece of software integrates right into your browser (works best with IE but works allright with Firefox too, some features disabled), you basicly select some text and save it in your snippets. Go check it

http://www.netsnippets.com/

vblts.ru supports vBulletin®, 2022-2024