Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-25-2008, 09:31 PM
bc641990 bc641990 is offline
 
Join Date: Apr 2007
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Putting a php in a template

I read tons of tut's and guides on this, but i understand how to get html pages running with vbulletin, but i made this php script, but just don't understand how to get it working with the plugin system.

PHP Code:
<?
$weapon1 = $_POST['weapon1'];
$explosive = $_POST['explosive'];
$special = $_POST['special'];
$powerups = $_POST['powerups'];
$health = $_POST['health'];
$speed = $_POST['speed'];
$capturer = $_POST['capturer'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
  <table align="center">
    <tr>
      <td><span class="style1">#Equipment Pack<br />
0x004294F4 0x000000<? echo $weapon1 ?><br>
0x004294F8 0x000000<? echo $weapon1 ?><br>
0x004294FC 0x000000<? echo $explosive ?><br>
0x00429500 0x000000<? echo $special ?><br>
0x00429504 0x000000<? echo $powerups ?><br>
0x00429508 0x000000<? echo $health ?><br>
0x0042950C 0x000000<? echo $speed ?><br>
0x00429510 0x000000<? echo $capturer ?><br><br></span></td>
    </tr></table>
<table align="center">
<form id="form1" name="form1" method="post" action="">
<tr><td><fieldset><legend>Weapon 1 Replacement:</legend>
    <select name="weapon1" id="weapon1">
      <option value="01" selected="selected">Blaster Rifle</option>
      <option value="02">Arc Caster</option>
      <option value="03">Carbonite Freeze Gun</option>
      <option value="04">Incinerator</option>
      <option value="05">Shotgun</option>
      <option value="06">Sniper Rifle</option>
      <option value="07">Chaingun</option>
      <option value="08">Bowcaster</option>
      <option value="09">Rocket Launcher</option>
      <option value="0A">Blaster Pistol</option>
      <option value="0B">Fusion Cutter</option>
      <option value="0C">Tri Shot</option>
      <option value="0D">EMP Launcher</option>
      <option value="0E">Explosive Blaster Pistol</option>
      <option value="0F">Grenade Launcher</option>
      <option value="10">Guided Rocket</option>
      <option value="11">Orbital Strike</option>
      <option value="13">Thermal Detonator</option>
      <option value="14">Detpacks</option>
      <option value="15">Proximity Mines</option>
      <option value="16">Cluster Grenade</option>
      <option value="17">Wrist Rocket</option>
      <option value="19">Health and Ammo</option>
      <option value="1A">Auto-Turret</option>
      <option value="1B">Recond Droid</option>
      <option value="1C">Stealth Suit</option>
      <option value="1D">Jet Pack</option>
      <option value="1E">Jump Pack</option>
      <option value="1F">Personal Shield</option>
      <option value="21">Rally</option>
      <option value="22">Rage</option>
      <option value="23">Stamina</option>
      <option value="24">Regenerate</option>
    </select></fieldset>
  <fieldset><legend>Weapon 2 Replacement:<br /></legend>
    <select name="weapon2" id="weapon2">
      <option value="00">Blaster Pistol</option>
      <option value="01">Fusion Cutter</option>
      <option value="02">Tri Shot</option>
      <option value="03">EMP Launcher</option>
      <option value="04">Explosive Blaster Pistol</option>
      <option value="05">Grenade Launcher</option>
      <option value="06">Guided Rocket</option>
      <option value="07">Orbital Strike</option>
      <option value="09">Thermal Detonator</option>
      <option value="0A">Detpacks</option>
      <option value="0B">Proximity Mines</option>
      <option value="0C">Cluster Grenade</option>
      <option value="0D">Wrist Rocket</option>
      <option value="0F">Health and Ammo</option>
      <option value="10">Auto Turret</option>
      <option value="11">Recond Droid</option>
      <option value="12">Stealth Suit</option>
      <option value="13">Jetpack</option>
      <option value="14">Jump Pack</option>
      <option value="15">Personal Shield</option>
      <option value="17">Rally</option>
      <option value="18">Rage</option>
      <option value="19">Stamina</option>
      <option value="1A">Regenerate</option>
    </select></fieldset>

  <fieldset><legend>Explosive:<br /></legend>
    <select name="explosive" id="explosive">
      <option value="01">Thermal Detonator</option>
      <option value="02">Detpacks</option>
      <option value="03">Proximity Mines</option>
      <option value="04">Cluster Grenade</option>
      <option value="05">Wrist Rocket</option>
      <option value="07">Health and Ammo</option>
      <option value="08">Auto Turret</option>
      <option value="09">Recond Droid</option>
      <option value="0A">Stealth Suit</option>
      <option value="0B">Jetpack</option>
      <option value="0C">Jump Pack</option>
      <option value="0D">Personal Shield</option>
      <option value="0F">Rally</option>
      <option value="10">Rage</option>
      <option value="11">Stamina</option>
      <option value="12">Regenerate</option>
    </select></fieldset>

  <fieldset><legend>Special Items:<br /></legend>
    <select name="special" id="special">
      <option value="01">Health and Ammo</option>
      <option value="02">Auto Turret</option>
      <option value="03">Recond Droid</option>
      <option value="04">Stealth Suit</option>
      <option value="05">Jetpack</option>
      <option value="06">Jump Pack</option>
      <option value="07">Personal Shield</option>
      <option value="09">Rally</option>
      <option value="0A">Rage</option>
      <option value="0B">Stamina</option>
      <option value="0C">Regenerate</option>
    </select></fieldset>
</td><td>
 <fieldset><legend>Power Ups:<br /></legend>
    <select name="powerups" id="powerups">
      <option value="01">Rally</option>
      <option value="02">Rage</option>
      <option value="03">Stamina</option>
      <option value="04">Regenerate</option>
    </select></fieldset>
  <fieldset><legend>Health:<br /></legend>
    <select name="health" id="health">
      <option value="04" selected="selected">No Change</option>
      <option value="01">Level 1</option>
      <option value="02">Level 2</option>
      <option value="03">Level 3</option>
    </select></fieldset>
  <fieldset><legend>Speed:<br /></legend>
    <select name="speed" id="speed">
      <option value="04">No Change</option>
      <option value="01">Level 1</option>
      <option value="02">Level 2</option>
      <option value="03">Level 3</option>
    </select></fieldset>
<fieldset><legend>Capture Rate:<br /></legend>
    <select name="capturer" id="capturer">
      <option value="04">No Change</option>
      <option value="01">Level 1</option>
      <option value="02">Level 2</option>
      <option value="03">Level 3</option>
    </select></fieldset></td></tr>
    <tr><td colspan="2">
<center><input type="submit" name="Submit" value="Submit" /></center>
</form></td></tr>
</table>
</body>
</html>

Thanks guys,
Brandon
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 04:43 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03425 seconds
  • Memory Usage 2,250KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete