The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
vB Hacking Article v1.5
Here's something that I wrote when EvB was around, but Kura has since closed it so I thought I'd post it here.. Feel free to leave any suggestions or feedback. ------------------------------------------------------ vB Hacking Article v1.5 By: Oblivion Knight Article History v1.5 - FTP AUTO mode hint added, program suggestions for Mac users added (thanks to Jolten), query suggestions updated (thanks to Revan), Notepad "goto line" hint added (thanks to rake). v1.4 - Contributed to vB.org, vB.nl and Synergy, general updates. v1.3 - Full Path section added. v1.2 - FTP section added. v1.1 - Changes made to recommended programs, and removed Wordpad font hint. v1.0 - Initial document contributed to EvB. [high]BEFORE HACKING ANY FILES OR RUNNING ANY DATABASE QUERIES, YOU ARE ADVISED TO MAKE BACKUPS OF BOTH THE FILES YOU ARE EDITING AND THE DATABASE YOU ARE RUNNING QUERIES ON. THIS GIVES YOU SOMETHING TO FALL BACK ON IF THINGS GO WRONG AND THE PROBLEM CAN'T BE FIXED![/high] What program should I use to download/upload my files? Well since you've already uploaded vBulletin, you should already have a fairly good idea of what to use. However, if someone uploaded them for you and you're wanting to learn then here we are, a section just for you.! You'll need an FTP Browser. Many internet browsers can browse FTP sites fine, but lack features such as ASCII mode and CHmod. There are many FTP Browsers out there, and which you use depends on which you feel the most comfortable with. Everyone has their own preferences.. Here's a list of FTP Browsers you may want to try.. WS_FTP, LeechFTP, SmartFTP, CuteFTP, FTP Voyager, FlashFXP Where can I download these FTP Browsers from? WS_FTP: http://www.ipswitch.com/Products/WS_FTP/ LeechFTP: http://stud.fh-heilbronn.de/~jdebis/leechftp/ SmartFTP: http://www.smartftp.com/ CuteFTP: http://www.cuteftp.com/cuteftp/ FTP Voyager: http://www.ftpvoyager.com/ FlashFXP: http://www.flashfxp.com/ But... I'm a Mac user! If you're a Mac user, MacOS 10 can directly connect to a server via FTP. However if you want to use an application, try Transmit from Panic or Fetch from Fetch Softworks. How do I CHmod a file? This depends on which FTP Browser you use. For the majority, all you need to do is right click a file on your host and click Properties or Change File Attributes. Usually there are either 3 numbers there which you can edit, or there are several checkboxes (User, Group and World), or both. This is what we call CHmod or the file's permissions. With vBulletin, rarely are you asked to change the file's permissions, but sometimes you are required to change the permissions of a directory you have just created. For example with the Arcade hack, you are asked to create a directory called 'games' which must be CHmodded to 755. How do I switch between ASCII and Binary mode? Again, this depends on which FTP Browser you use. Key words to look out for on the toolbars for this would be 'A-1 Mode' and 'Transfer Mode'. If you have problems finding this, ask at the support forums of your chosen FTP Browser, or asking at a vBulletin community might be helpful (as long as you're polite!). It is worth noting that the vast majority of FTP Browsers also come with an 'AUTO mode', which saves a lot of time. AUTO mode? AUTO mode automatically checks whether or not to upload files in ASCII or Binary mode by checking an internal list. If you use AUTO mode, please make sure to check the list of extensions that will be uploaded in ASCII mode, and make sure that the .php and .php3 extensions are listed. What program should I use to edit my files? The most common question asked where vB hacking is concerned is; "What program should I use to edit my files?" The answer is, there is no definitive program to use.. Some work better much better than others however. Recommended: Notepad, Developers Pad, EditPlus, UltraEdit Not Recommended: Microsoft Word, Wordpad, Macromedia Dreamweaver Notepad will get you by just fine, but the major features it lacks (syntax highlighting, line numbers and customizable keyboard shortcuts) can be found in the other recommended programs; Developers Pad, EditPlus and UltraEdit. However, not many people know that with Notepad you CAN go straight to a line number of your file by pressing 'Ctrl+G', and entering the line number that you want to go to. Where can I get these recommended programs from? Developers Pad: http://www.developerspad.com/devpad/ EditPlus: http://www.editplus.com/ UltraEdit: http://www.ultraedit.com/ But... I'm a Mac user! If you're a Mac user, it is advised that you DON'T use the Macintosh TextEdit application. Instead, try BBEdit from Bare Bones. When I'm asked to enter the "Full Path" to my forums, how do I find this? Occasionally, you'll come accross a hack that requires you to enter the full path to your forums directory. As it should clearly state, you do NOT enter the URL. The full path can be found by accessing your PHP info, and is listed under 'DOCUMENT_ROOT' of your Environment. How do I access my PHP Info? Accessing your PHP Info is easy. In vB2, you are provided with the file phpinfo.php in the extras folder. Upload this to anywhere on your host, and access it with your internet browser. This feature is built in to vB3's Admin Panel, and can be accessed by going to 'Import & Maintenance', and then clicking 'View PHP info'. I get an Internal Server Error.. Help! While this rarely occurs when hacking vBulletin, I see it being asked.. The only explanation I have for this is to make sure your includes/config.php file is set up correctly. If you are unsure of this, ask your host. You should also make sure that you have typed the URL correctly to the file that you are trying to launch. I get this error when uploading my hacked files.. Help! Any error that you receive is likely to be an error on your side rather than the hack's. The problem can be anything from a range of things, but these are the most common ones.. What program did you use to edit the files? If you used Macromedia Dreamweaver, it's likely that something else was changed on top of what you asked it to change. The program is funny like that.. Did you follow the instructions correctly? You'd be amazed how many times people paste code AFTER instead of BEFORE, BEFORE instead of AFTER and REPLACE when they're not even asked to. Other times, the line provided can appear in the file more than once, so make sure you're editing around the correct instance. Ask the hack author if you are unsure of this, and quote the file name or template you are editing. Did you download/upload the file in ASCII mode? If you downloaded/uploaded the file in Binary mode, sometimes the file will corrupt itself and give you some kind of error. While this isn't always the case, it's a good habit to get yourself into downloading/uploading PHP files in ASCII mode. Did you upload the additional files and create the additional templates that came with the hack you're installing? Often, people make the required changes to the original vBulletin files and templates and forget to upload the additional files and create the additional templates that are required for the hack to work. It's a common mistake to make - even the professionals do it from time to time.! Are you running a firewall while uploading to your FTP? Sometimes, firewalls such as ZoneAlarm get in the way of you uploading files to the FTP and these files get "cut". What I mean by this is instead of the whole file being uploaded, some of the file is missing. Did you run the queries required? Occasionally, you are asked to run queries on your MySQL database for the hack to work correctly. Not running these can cause errors, and sometimes have very strange effects on your forums. How do I run queries? Another question commonly asked; "How do I run queries?" First, access to phpMyAdmin on your host would make your life easier.. To access this, you will need to go into your site's admin panel (NOT your vBulletin admin panel). Find your MySQL management and a link to phpMyAdmin should be found around there. Not everyone has admin access to their site however, unfortunately for those running vB2, you will have to ask your host to run the database queries for you or alternatively install one of many hacks available that allows you to run database queries through your vB Admin Panel. vB3 however, comes standard with this feature if you list your userid to be able to run database queries in the file includes/config.php . I get a syntax error when running this query.. Help! Syntax errors are often enough the result of bad copying and pasting, or depending on what you're using to run database queries the query string may differ. If you get a syntax error when running code with a ';' at the end of it, remove the ';' and try running it again. This SHOULD solve your problem. Other things to look out for is poor query structuring by the hack's author. The following is a good example of this: Correct :laugh:[sql]CREATE TABLE `journal` ( `journalid` int(11) NOT NULL auto_increment, `title` text NOT NULL, `description` text NOT NULL, `imagename` text NOT NULL, `entries` int(11) NOT NULL default '0', `views` int(11) NOT NULL default '0', `enabled` smallint(6) default '0', `timestamp` int(11) NOT NULL default '0', `userid` int(11) NOT NULL default '0', `mood` text NOT NULL, `np` text NOT NULL, PRIMARY KEY (`journalid`) ) TYPE=MyISAM;[/sql] Incorrect :dead:[sql]CREATE TABLE 'journal' ( 'journalid' int(11) NOT NULL auto_increment, 'title' text NOT NULL, 'description' text NOT NULL, 'imagename' text NOT NULL, 'entries' int(11) NOT NULL default '0', 'views' int(11) NOT NULL default '0', 'enabled' smallint(6) default '0', 'timestamp' int(11) NOT NULL default '0', 'userid' int(11) NOT NULL default '0', 'mood' text NOT NULL, 'np' text NOT NULL, PRIMARY KEY ('journalid') ) TYPE=MyISAM;[/sql]Can you see the difference? The correct query uses ` marks around the name area, and the incorrect query uses ' marks around the name area. Sometimes, there will be no marks around the name area at all, but this should also work just fine. It's a subtle difference, but it's one that will make the difference between the query running or not. Make absolutely sure that you have copied ALL of the query string before running it.. One mistake could mess up your database, and reversing this effect may not be an easy task.! How do I make a backup of my database? There are several ways of doing this.. The most effective and quickest way I have found is using Telnet/SSH. However, not everyone has access to this due to security reasons.. Other ways of backing up your database are through phpMyAdmin (this is NOT recommended - many problems have been reported of it timing out on large databases), or making a backup through your vB Admin Panel. What command do I need to run in Telnet/SSH? This is the command I run, there are other ways but this seems to be the best for me; [high]mysqldump -uUSERNAME -pPASSWORD DATABASE_NAME > FILENAME.sql[/high] How do I revert my database to the backup I made? Again, there are other ways but this is the command I run in Telnet/SSH; [high]mysql -uUSERNAME -pPASSWORD DATABASE_NAME < FILENAME.sql[/high] |
#12
|
||||
|
||||
To everyone that agreed with DW not being recommended:
Im not here to be an ass and start a huge fight about the compatability of DW, but I would just like to say this. The time it takes for an user to turn off Code Rewriting in Dreamweaver (MX 2004), or at least exclude .php and .php3, is considerably less than the time it takes for a beginner to spot a syntax error without syntax highlighting. And yes I know, other clients on that list has the highlighting Is it not the point for a guide to teach a beginner something new? I would remove Dreamweaver from the Not recommended, and instead put a new section above with something like this: "But I use Dreamweaver! Is that a bad thing? No, Dreamweaver works great for PHP code editing and writing. It supports an extension that enables you to add the entire php.net documentation and user notes to it, which really helps if you are wondering what a specific PHP integrated function does. BUT, you should enter 'Preferences' from the 'Edit' menu, and under the 'Code Rewriting' section, either turn Code Rewriting OFF, or check the 'Never rewrite code: In files with extensions' and put .php and .php3 in the input field." If you tell your readers this, it will have the same effect as telling them not to use DW. Because. Let us draw up a hypothesis: A DW user reads your guide, and is determined to read and follow every comma of your guide, no matter if it reads "Throwing yourself infront of a bus is the only way to resolve that error". Now this user is having trouble with DW code rewriting, and he wonders wether or not to change php editors. Outcome #1: He reads "Dont use DW", and ditches it for another editor with syntax highlighting. 2 years later, this user is a more experienced coder, and often finds himself on php.net to search for a function. His coding never rewrites itself again. Outcome #2: He reads "Turn off code rewriting and/or include .php and .php3 to the exclusions", and continues to use DW. 2 years later, this user is a more experienced coder, and discovers the extension that allows php.net's manual to be downloaded and included into DW. This saves him lots of hassle as he wont have to go online all the time. His coding never rewrites itself again. See my point? Again I say I dont want to sound like an ass, so stop me if Im becoming unserious here |
#13
|
||||
|
||||
Quote:
I may however, add the section about Dreamweaver that you suggested at a later date.. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|