Help With Making A New Page ...

xEvOx

New Member
Now i am part of a clan and we are opening up for trials and i wanted to make say a custem page to have boxes that they fill in and then its sent say to my inbox are erc anyone know how to do this ?
 

dudl3ys

New Member
here is the coding for making pages in a vb forum(please note that you must fill in the content area with your own coding)

***Please note that red means its important and needs to be read carefully***

create a (name the file what you want it to be).php using this code
<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'NAME OF PAGE'); // change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(

);

// get special data templates from the datastore
$specialtemplates = array(

);

// pre-cache templates used by all actions
$globaltemplates = array(
'NAME OF TEMPLATE',
);

// pre-cache templates used by specific actions
$actiontemplates = array(

);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits = array();
$navbits[$parent] = 'NAME OF TEMPLATE';

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('NAME OF TEMPLATE') . '");');

?>

then in your admincp > Styles & Templates > Style Manager > then your current style > then use the dropdown menu to Add New Template, then enter this code into it.

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header

$navbar

<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tbody>

<tr>
<td class="tcat" colspan="5">
NAME OF PAGE


</td>
</tr>
</tbody>

<tbody id="collapseobj_forumbit_1" style="">


<tr align="center">
<td class="alt1Active" align="left" id="f4">

ENTER YOUR CONTENT HERE - OR CODING HERE

<tr><td class="thead" style="line-height: 0; padding: 0; margin: 0;" colspan="5"><img src="http://www.yourdomain.com/clear.gif" alt="" width="1" height="12" /></td></tr>
</tbody>

</table>


$footer
</body>
</html>
 

newperson2008

New Member
hmm interesting.. question, after making a new page it would then be a vb page correct? could you use this to say oh make a entire website and still having it use the vb system? also.. what about permissions, is there away to use those on custom pages??
 

Hoxxy

New Member
newperson2008 said:
hmm interesting.. question, after making a new page it would then be a vb page correct? could you use this to say oh make a entire website and still having it use the vb system? also.. what about permissions, is there away to use those on custom pages??


You can use a conditional:
PHP:
<if condition="$post['usergroupid'], array(1,2,3,6))"></if>

content

<else />

Sorry you do not have permission to view this page.

</if>

Just replace 1,2,3,6 with the user group number that are allowed to view the page

wrap the content not the tables otherwise users with no permission will see a blank page with the message.
 

Hoxxy

New Member
Found this, might help:


Form Hack 4.1

Features:

Ever wanted an online form that a user can fill out,

which when submitted gets:
Posted into a new thread in a forum of your choice
Create a new poll in the new thread with options of your choice
Posted as a reply in an existing thread of your choice
PMed to you or someone else
Emailed to an email address you specify
Choose to redirect to the post, thread or forum, or a custom thank you message
Choose to redirect to edit post
See a preview before they submit

Or any combination or all of the above?

Well, this is the hack for you!

You can use this for:
Moderator Applications
Quiz Submit Form which gets PMed to a moderator
Contact Form that goes to PM, email or thread
Guests to apply to be members
Report a Moderator form that goes as a PM to you
Guests can PM you for whatever reason
Order form to buy things
Donation form
News or Articles submissions that can go straight to a thread

Or anything you like - this hack is totally customizable via the AdminCP.

The beauty of this hack is that once you install this hack, to make a new form all you need to do is copy the main hook, rename it to whatever you want, edit the variables in the hook, and you have a totally new form!!! You do not need to touch the templates again, but can always create new ones and use different templates for different forms.

Format of the form:
One main input question
3 Radio buttons Choice questions
3 Normal text input questions
1 Drop down menu
3 Check boxes
1 Long answer question
1 VB message editor text box question
Upload attachments

This is customizable via the hook.

Also:
You can set the usergroups you want access to this form.
Depending on your forum permissions, if the new thread is in a public forum, members can reply to it. This hack allows a form to submit the new thread or post wherever you want it to go.
Force the user to answer all questions.

INSTALLATION
Easy - takes only a few minutes:
Import the XML into products. (admin cp -> Plug-in System -> Manage Products -> Add/Import Product)
Edit the main plug-in - the instructions are all inside the hook itself, in the top half. Follow the instructions carefully!
To get to the form, go to: /newthread.php?do=form (change "form" to the name of your form if you have few)
 

Buni

New Member
Hoxxy said:
Found this, might help:


Form Hack 4.1

Features:

Ever wanted an online form that a user can fill out,

which when submitted gets:
Posted into a new thread in a forum of your choice
Create a new poll in the new thread with options of your choice
Posted as a reply in an existing thread of your choice
PMed to you or someone else
Emailed to an email address you specify
Choose to redirect to the post, thread or forum, or a custom thank you message
Choose to redirect to edit post
See a preview before they submit

Or any combination or all of the above?

Well, this is the hack for you!

You can use this for:
Moderator Applications
Quiz Submit Form which gets PMed to a moderator
Contact Form that goes to PM, email or thread
Guests to apply to be members
Report a Moderator form that goes as a PM to you
Guests can PM you for whatever reason
Order form to buy things
Donation form
News or Articles submissions that can go straight to a thread

Or anything you like - this hack is totally customizable via the AdminCP.

The beauty of this hack is that once you install this hack, to make a new form all you need to do is copy the main hook, rename it to whatever you want, edit the variables in the hook, and you have a totally new form!!! You do not need to touch the templates again, but can always create new ones and use different templates for different forms.

Format of the form:
One main input question
3 Radio buttons Choice questions
3 Normal text input questions
1 Drop down menu
3 Check boxes
1 Long answer question
1 VB message editor text box question
Upload attachments

This is customizable via the hook.

Also:
You can set the usergroups you want access to this form.
Depending on your forum permissions, if the new thread is in a public forum, members can reply to it. This hack allows a form to submit the new thread or post wherever you want it to go.
Force the user to answer all questions.

INSTALLATION
Easy - takes only a few minutes:
Import the XML into products. (admin cp -> Plug-in System -> Manage Products -> Add/Import Product)
Edit the main plug-in - the instructions are all inside the hook itself, in the top half. Follow the instructions carefully!
To get to the form, go to: /newthread.php?do=form (change "form" to the name of your form if you have few)

Hey thanks for this hack but I can't find it anywhere in the AdminCP. I can find it in the templates but I can not see where I can edit any of the settings.

Any help as to where to look?
 

xEvOx

New Member
Hey Buni ,
Right i found this to be easyer then i thought right first off read the instructions :
1 - Import the xml into products. (admin cp -> Plugin System -> Manage Products -> Add/Import Product)

2 - Edit the main hook (plug-in) - the instructions are all inside the hook itself, in the top half. Follow the instructions carefully!

3 - To get to the form, go to: /newthread.php?do=form (change "form" to the name of your form if you have few)

now really you dont need the first one as you should have figured that out lol, ok now if you open the xml its self in notepad or i use NFOpad go about half way down the script and you will find this :
Code:
////////////////////////////////////////////////////////////////////////////////////////////////////
//TITLE OF THREAD/POST/PM/EMAIL (do not use quotation marks in the title or you will get a parse error)
//You may use variables from the form for this.
////////////////////////////////////////////////////////////////////////////////////////////////////

$posttitle = "$formtitle";

////////////////////////////////////////////////////////////////////////////////////////////////////
//PURPOSE OF FORM (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$formpurpose = "The purpose of this form is to allow you to submit a form, and this form will be made into a thread in a particular forum, or be PMed to a moderator or be emailed to a moderator.";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//NORMAL INPUT BOX : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$normalquestion1 = "What is the meaning to life?";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion1 = "Choose one of the following choices";

// The following choices must NOT have quotation marks
$radiochoice1a = "yes";
$radiochoice1b = "no";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 2 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion2 = "Choose another one of the following choices";

// The following choices must NOT have quotation marks
$radiochoice2a = "good";
$radiochoice2b = "bad";
$radiochoice2c = "both";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 3 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion3 = "Is it yes or no? If yes, please elaborate";

// The following choices must NOT have quotation marks
$radiochoice3a = "yes";
$radiochoice3b = "no";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question1 = "What is your name?";
$explain1 = "Please enter your real name here.";

//QUESTION 2 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question2 = "What is your email?";
$explain2 = "Please enter your real email here.";

//QUESTION 3 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question3 = "What is your website?";
$explain3 = "Please enter your URL here.";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//DROP DOWN CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$dropdownquestion1 = "What is your gender?";

// The following choices must NOT have quotation marks
$dropdownchoice1a = "no comment";
$dropdownchoice1b = "male";
$dropdownchoice1c = "female";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//CHECK BOX CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$checkboxquestion1 = "This shows how to use checkboxes.";

// The following choices must NOT have quotation marks
$checkboxchoice1_1 = "good";
$checkboxchoice1_2 = "bad";
$checkboxchoice1_3 = "both";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//LONG TEXT AREA INPUT: QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$longquestion1 = "Please write down a paragraph about yourself.";
$longexplain1 = "For example, a bit about your experience in this area.";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//VB TEXT AREA INPUT: You can only have ONE vb text question. (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
////////////////////////////////////////////////////////////////////////////////////////////////////

$vbtextquestion = "Please write down a paragraph about how you like this forum.";
$vbtextexplain = "For example, what makes this forum different from all other forums?";

////////////////////////////////////////////////////////////////////////////////////////////////
////// END OF CUSTOMIZATION ////////////////////////////////////////////////////////////////////
/////  DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!!! ////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////

mow edit them how u please and if you want to have it say "once user inputs done and then send send to my mail box" kinda thing just above this script you will find this :
Code:
////////////////////////////////////////////////////////////////////////////////////////////////////
//REDIRECT OPTIONS:
// 0 - thank you message (thread, reply, pm, or email)
// 1 - redirect to post (thread or reply)
// 2 - redirect to thread (thread only)
// 3 - redirect to forum (thread only)
// 4 - redirect to editpost (thread or reply)
//
// Feel free to change the thank you message if you choose option 0
////////////////////////////////////////////////////////////////////////////////////////////////////

$redirectoption = "0";

$errormessage = "Thank you for submitting this form!"; //This is the thank you message

////////////////////////////////////////////////////////////////////////////////////////////////////
now this is just to tell it were to go but its were u will see if you get me now above that u get loads of other stuff to edit and mess about with ,

lol always make sure you make a backup of the org xml as you may want to start a new one and sorry if this is a long message but this is a tut for you if you dont know how to do this

i would like to thank Hoxxy for this as he spent his time getting this thanks mate

and any questions you may have message me
 

Buni

New Member
Have patience. Someone will answer you eventually. As for me I'm pretty sure you can't make the radio buttons any bigger.
 
Top