![]() | WEBSITE FOR SALE INCLUDING ALL HACKS,IF INTERESTED EMAIL TO ADMIN@ZIKIHIDEOUT.COM |
| |||||||
| Tutorials/Articles Programming,template and any other tutorials are located here. |
| Welcome to the Ziki's Hideout~The Hideout From Reality~vBulletin Modifications forums. You can download free and paid vBulletin modifications,hacks and styles.You can even find vBulletin services,webmaster and coding help. You are currently viewing our boards as a guest which gives you limited access to our modifications,hacks and other vBulletin resources.By joining our community, you agree to the forum rules and that you do own a valid vBulletin license If you have any problems with the registration process or your account login, please contact us. |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
| | #1 (permalink) |
| Owner/Admin | One of the most basic tutorials but I haven't seen it here So let's start off.Let's say you have an option called Enable hack that is an yesno code.So yes equals 1 and no equals 0.Then you have many options like free,textarea and many more.But this is just basic Now to the ifs.The if syntax looks like this: Code:
So $condition is something we want to check for.In our case the vbulletin options condition is Code:
where youroptionname is the var name you specified for your option.Now we want to check if the hack is enabled and if yes it will execute the code.Yes equals 1 remember?So the hack is set to yes. Code:
The == is to compare.You can also use other comparing signs like > or <. Now to the else Lemme say we got one if conditions Code:
So if the option equals 1, code 1 will be executed but if the option is everything else than 1, code 2 will be executed. Elseif is the a hybrid.It combines the else and if statements: So it starts with an if then follows an elseif statement that allows you to use an condition: Code:
So if option is 1,code 1 will be executed,if option is 2 then code 2 will be executed and if it is everything else than that, code 3 will be executed. Now IMPORTANT: This has to start with an if condition and end with an else or elseif.It can't end with else and after elseif. Hope you understood that. ![]() |
| | |
| | #2 (permalink) |
| Newbie | If can I ask.. Wich is the best way.. Code:
Or.. Code:
? It's the same? |
| | |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is vBulletin (and modifications)? | Ziki | Pre-Sale Questions | 1 | April 14th, 2007 09:54 AM |