The vB Geek

Go Back   The vB Geek > vB Geek Modifications > Tutorials

Tutorials Tutorials and articles on using vB Geek stuff.

Advertisement
  Learn how to remove ads

Comment
 
Tutorial Tools Display Modes
GARS: Module making 101
GARS: Module making 101
Published by The Geek
02-22-2006
Default edit stage

The edit stage provides you with the ability to add additional fields for the user to enter when they create a new thread or edit an existing thread.

Here all we are doing is creating a drop down combo box with a selection of items to choose from and appending it to the $output variable:
PHP Code:
$output .= "Rating: <SELECT name=\"custom1[my_rating]\">
<OPTION value=\"G\">G - General Audiences</OPTION>
<OPTION value=\"PG\">PG - Parental Guidance</OPTION>
<OPTION value=\"PG13\">PG13 - Children under 13 are too cute for this movie</OPTION>
<OPTION value=\"R\">R - Under 17's not admitted without parents</OPTION>
<OPTION value=\"X\">X - It marks the spot</OPTION>
</SELECT>"

NOTE:

Your HTML elements need to be named custom1[MYVARNAME] in order to work. You MYVARNAME should be unique as well!

Another note:

Whatever output you want to produce MUST be APPENDED to the $output variable. In other words:
PHP Code:
$output 'my stuff'
IS BAD while
PHP Code:
$output .= 'my stuff'
is good! If you use the former, then you may overwrite other module output.

Tutorial for
GARS

Contents

Tutorial Tools
Show Printable Version  Email this Page 

<<  <    Next Page: Persist stage (Page 3 of 6)    >  >>
  #1  
By Origin2 on 08-27-2008, 11:01 AM
Default

wow thanks useful stuff ^^
Reply With Quote
Comment

Tutorial Tools
Display Modes

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

Similar Threads
Tutorial Tutorial Starter Category Comments Last Post
making a gab block for gars benj Geek Advertising Banner System 12 08-21-2006 09:42 AM
Problem with the module from the Tutorial 101 trana Geek Article and Review System 4 03-28-2006 07:37 AM
GARS: Module making 102 The Geek Tutorials 0 02-22-2006 09:00 PM
Does anyone have a GARS module that allows an image to be loaded in the module... FRAiD Geek Article and Review System 6 02-11-2006 10:57 AM
If I am using GARS for game reviews, and start making reviews and add new modules... FRAiD Geek Article and Review System 1 02-10-2006 05:57 PM


All times are GMT. The time now is 07:01 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

Tutorial powered by GARS 2.1.9 ©2005-2006