TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,911
  • Total Topics: 21,307
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 362
  • Total: 363
  • tino

[Done!] Join Us! form

Started by mebymyself, October 19, 2006, 08:10:13 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

TimUSA

What code would I need to change if i wanted the "submit" button to change the member's "member group"?

IchBin

You can't just change the link. You'd have to add the code to make that change. I don't think it would be too hard, but I don't have the time to figure that out. Sorry.

tomtom9800

Ok still really confused and lost.......I created a php article with the recruiting form and if I activate it, it works great and shows on the main page under the center block.  However as I previously discussed I dont want it on the front page.  So I tried creating a left block and link to the page but it just goes back to the main page even though the links are different.  Was I supposed to create the actualy php under article manager somewhere else??  Did I do it correctly??  I created it in article manager......

Sorry been tryin for weeks to get the correct and cant seem to get it.  I am able to do links though, so once I get it looking at the different page, I will be straight, just stuck on getting the correct link to the article and going to a new page....

Thanks for the help in advance.

Hairy

#163
You have to leave it on "activate" and turn off "featured"

Featured makes it appear on the front page

If you de-activate, it is no longer viewable at all and you will keep getting sent to the front page if you go to view it.

Cheers

Edit: this might be an easier explanation to get it to work.....back-track to when it appeared on the front page and go to the article manager section. It is probably set as "featured (turn off)".....click on "featured (turn off)" to stop it from appearing on the front page

Now you need to make the article you normally have on the front page set as "featured" to get that one back on the front page.

JOSHSKORN

I know this was asked on an earlier page of the thread but I don't think anyone followed up onto it.  Basically, I'm looking to add text to the top of my application.  Please help.  I tried just pasting it in, then tried putting an echo statement beforehand, surrounded by '      ';.  Here's the text:

Would you like to contact us?  Feel free to use our contact form.  Please note that we do have separate contact pages for different reasons.  Do not use this form to dispute your bans, request scrims or apply to us.  Instead, if you'd like to make a suggestion about our clan, address an issue about our website or voice a concern, you may do so this way.  Please note that you must be a registered member of our forums to submit any contacts with us.  Otherwise, you may E-mail us directly at 3iClan@gmail.com.

Click here to proceed to our contact form.  Thanks!

That's in size 4, or medium.

Here's my Contact code:

global $sourcedir, $user_info, $context ;

require_once($sourcedir . '/Subs.php');
require_once($sourcedir .'/Subs-Post.php');



// CONFIGURATION SECTION

//send the contact by email?
$enable_email=true;

// email address of reqruitment staff member
$email_address='3iclan@gmail.com';

//post the contact on forum?
$enable_post=true;

//board id to which the contact should be posted
$board_id=78.0;

//the id of the this article
$this_article_id = '17';

//article to be redirected when form is submitted
$thank_you_article_id = '16';


//END OF CONFIGURATION SECTION

$show_form= 'true';
if (isset($_POST['submitted'])) {
// Handle the form

// Check required fields
$enroll_errors = array(); //Initialize error array

// Check for User name
if (empty($_POST['name']) ){
$enroll_errors[] = 'You forgot to enter your Gamer Name.  How will we know who you are?';
}

// Check for body text
if (empty($_POST['body_text']) ){
$enroll_errors[] = 'You forgot to enter your E-mail text.  How do we know what to help you with?';


if (empty($enroll_errors)) { //Everything seems to be OK
     
        $show_form='false';



// email the contact

$subject = $_POST['esubject'];
$body = 'E-mail correspondance by ' . $context['user']['name'] .
'from IP Address ' . $user_info['ip'] . '
Gamer Name:  ' . $_POST['name'] . '
Email address:  ' . $_POST['email'] . '
Subject: ' . $_POST['esubject'] . '
Body Text:  '. $_POST['body_text'];

$postbody = 'E-mail correspondance received by ' . $context['user']['name'] .'<br />;
<table>
<tr><td>Profile Name:<td></td><td>  ' . $_POST['name'] . '</td></tr>
<tr><td>Email address:<td></td><td>  ' . $_POST['email'] . '</td></tr>
<tr><td>Subject: <td></td><td>' . $_POST['esubject'] . '</td></tr>
<tr><td>Body text: <td></td><td> ' . $_POST['body_text'] . '</td></tr>
</table>';



            if ($enable_email)
mail($email_address, $subject, $body,"From: " . $_POST['email']);



//create new forum post with application

$msgOptions = array(
'id' =>  0 ,
'subject' => $esubject,
'body' => $postbody ,
'icon' => 'xx',
'smileys_enabled' => true,
'attachments' =>  array(),
);
$topicOptions = array(
'id' => 0 ,
'board' => $board_id,
'poll' =>  null,
'lock_mode' =>  null,
'sticky_mode' =>  null,
'mark_as_read' => true,
);
$posterOptions = array(
'id' => $context['user']['id'],
'name' => $context['user']['name'],
'email' => $user_info['email'],
'update_post_count' => true,
);
   
if ($enable_post)
            createPost($msgOptions, $topicOptions, $posterOptions);

// Redirect to thank you page
header('Location: http://' . $_SERVER['HTTP_HOST'] .'/thesite/index.php?page=' . $thank_you_article_id);

} else {
// Redirect to error page
//header('Location: http://' . $_SERVER['HTTP_HOST'] . '/index.php?page=' . $enroll_error_article_id );
echo '<h2 class="error">Error!</h2>';
echo '<p class="error">The following error(s) occured:<br />';

foreach ($enroll_errors as $msg) {
echo " - $msg<br />";
}
   echo "<p>Please, correct all errors and try again.</p>" ;



}
}
//else { // Display the form

echo '
<form action="index.php?page='  . $this_article_id  . '" method="post">
        <INPUT id="submitted" name="submitted" type="hidden" value="TRUE" />
<TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="100%" border="0">

<TR class ="windowbg">
<TD width = "200px">* Player Name:</TD>
<TD><INPUT id="game_name" name="game_name" type="text" value ="';
if (isset($_POST['game_name'])) echo $_POST['name'];
echo '" /></TD>
</TR>
<TR class ="windowbg2">
<TD width = "200px">* Email address:</TD>
<TD><INPUT id="email" name="email" type="text" value ="';
if (isset($_POST['email'])) echo $_POST['email']; else echo $user_info['email']; 
echo '" /></TD>
</TR>
<TR class ="windowbg">
<TD width = "200px">Subject:</TD>
<TD><SELECT id = "esubject" name = "esubject" style="WIDTH: 152px" value ="';
if (isset($_POST['esubject'])) echo $_POST['esubject'];   
echo '" />
<OPTION value="General Inquiry" selected>General Inquiry</OPTION>
<OPTION value="Unban Request Status">Unban Request Status</OPTION>
<OPTION value="Appication Inquiry">Application Inquiry</OPTION>
</SELECT></TD>
</TR>
<TR class ="windowbg2">
<TD width = "200px">*Enter your e-mail here:</TD>
<TD><TEXTAREA id="body_text" name="body_text" rows="7" cols=80" value ="';
if (isset($_POST['body_text'])) echo $_POST['bod_text'];   
echo '" ></' . 'TEXTAREA></TD>
</TR>
<TR class ="windowbg2">
<TD colspan="2" align="center">
<INPUT type="submit" value="Submit">
<INPUT type="reset" value="Reset"></TD>
</TR>
</TABLE>
</form>

';


IchBin

Remember when you echo something with single quotes if there are any additional single quotes in your text they have to be escaped. Read my little explanation here if you'd like.
http://www.ichbin.us/index.php?topic=19.0

JOSHSKORN

Thanks for the reply.  I got it to work but not to my liking.  Basically what I did was pasted my text in between single quotes that followed the echo statement.  I placed this right at the beginning.  This produced pure text.  I took the easy way out and got rid of single quotes within my text to make my life easier.  Example:


echo 'Would you like to contact us?  Feel free to use our contact form.  Please note that we do have separate contact pages for different reasons.  Do not use this form to dispute your bans, request scrims or apply to us.  Instead, if you'd like to make a suggestion about our clan, address an issue about our website or voice a concern, you may do so this way.  Please note that you must be a registered member of our forums to submit any contacts with us.  Otherwise, you may E-mail us directly at 3iClan@gmail.com.

Click here to proceed to our contact form.  Thanks!';


This version did not recognize paragraph breaks.

When I put in the actual version I wanted, it kept choking on some of the HTML code.

Sorry for not specifying that earlier.  Basically, this is the SOURCE version of the article I want to add to the start of my form.  Basically it's the same text as above, but note the links and the font size = 4.


<font size="4">Would you like to contact us?  Feel free to use our contact form.  Please note that we do have separate contact pages for different reasons.  Do not use this form to dispute your bans, request scrims or apply to us.  Instead, if you'd like to make a suggestion about our clan, address an issue about our website or voice a concern, you may do so this way.  Please note that you must be a registered member of our forums to submit any contacts with us.  Otherwise, you may E-mail us directly at <a href="mailto:3iclan@gmail.com">3iClan@gmail.com</a>.<br />
<br />
Click <a href="http://clansrv.crazynomad.net/thesite/index.php?page=17">here</a> to proceed to our contact form.  Thanks!</font>


Please show me how to intermix these correctly.  Thanks.

Hairy

I think if you read Ichbin's link (I have not read it myself) it explains that you need to put \ before any single quotes in the text, otherwise you have issues

so change you'd to you\'d

Have a fiddle with it after doing that.

Cheers

JOSHSKORN

How can I modify this such that it will get the date of birth from the smf_members table, calculate the age, test if the applicant's age is over 18 or not and produce an error message if under 18?

Bardofyouth

Okay, having this problem again.  I know you showed me how to fix it some half a year ago but when i tried that i didnt get the desired effect.  Still getting a very large space after "appliaction has been made by" and the actual app.

Here is my code, any help is greatly appreciated!

global $sourcedir, $user_info, $context ;

require_once($sourcedir . '/Subs.php');
require_once($sourcedir .'/Subs-Post.php');



// CONFIGURATION SECTION

//send the application by email?
$enable_email=true;

// email address of reqruitment staf member
$email_address='alexanderjmackowiak@yahoo.com';

//post the application on forum?
$enable_post=true;

//board id to which the application should be posted
$board_id=10.0;

//the id of the this article
$this_article_id = '8';

//article to be redirected when form is submitted
$thank_you_article_id = '7';


//END OF CONFIGURATION SECTION

$show_form= 'true';
if (isset($_POST['submitted'])) {
// Handle the form

// Check required fields
$enroll_errors = array(); //Initialize error array

// Check for a name
if (empty($_POST['real_name']) ){
$enroll_errors[] = 'You forgot to enter your name.';
}
// Check for an email
if (empty($_POST['email']) ){
$enroll_errors[] = 'You forgot to enter your email address.';
}
// Check for an AA name
if (empty($_POST['aa_name']) ){
$enroll_errors[] = 'You forgot to enter your In-Game Nickname.';
}       
// Check for an age
if (empty($_POST['age']) ){
$enroll_errors[] = 'You forgot to enter your age.';


if (empty($enroll_errors)) { //Everything seems to be OK
     
        $show_form='false';



// email an application

$subject = 'Enrollment Application';
$body = 'Enrollment application has been made by ' . $context['user']['name'] .
' from IP Address ' . $user_info['ip'] . '
Real Name:  ' . $_POST['real_name'] . '
Email address:  ' . $_POST['email'] . '
Current Game Name:  ' . $_POST['aa_name'] . '
Age:  ' . $_POST['age'] . '
Gender: ' . $_POST['gender'] . '
Location:  ' . $_POST['location'] . '
Current Level:  ' . $_POST['honor'] . '
Previous Guild(s):  ' . $_POST['prev_clans'] . '
Class:  ' . $_POST['banned'] . '
Do you have raiding experience ' . $_POST['aaotracker'] . '
Describe that experience:  ' . $_POST['aaotracker_name'] . '
Do you have any professions  ' . $_POST['xfire'] . '
Which Professions(include skill):  ' . $_POST['xfire_name'] . '
Ventrilo installed?:  ' . $_POST['ts'] . '
Have microphone/headset:  ' . $_POST['mic'] . '
Have you read our guild Constitution and Charter: ' . $_POST['pay'] . '
Why do you want to join our Guild  ' . $_POST['why'] . '
Do you know anyone in Affliction:   ' . $_POST['habbits'] . '
Other information:  ' . $_POST['other'];

$postbody = 'Enrollment application has been made by ' . $context['user']['name'] .'<br />
<table>
<tr><td>Real Name:<td></td><td>  ' . $_POST['real_name'] . '</td></tr>
<tr><td>Email address:<td></td><td>  ' . $_POST['email'] . '</td></tr>
<tr><td>Current Game Name:<td></td><td>  ' . $_POST['aa_name'] . '</td></tr>
<tr><td>Age:<td></td><td>  ' . $_POST['age'] . '</td></tr>
<tr><td>Gender: <td></td><td>' . $_POST['gender'] . '</td></tr>
<tr><td>Location:<td></td><td>  ' . $_POST['location'] . '</td></tr>
<tr><td>Current Level: <td></td><td> ' . $_POST['honor'] . '</td></tr>
<tr><td>Previous Guild(s): <td></td><td> ' . $_POST['prev_clans'] . '</td></tr>
<tr><td>Class: <td></td><td> ' . $_POST['banned'] . '</td></tr>
<tr><td>Do you have raiding experience <td></td><td>' . $_POST['aaotracker'] . '</td></tr>
<tr><td>Describe that experience:  <td></td><td>' . $_POST['aaotracker_name'] . '</td></tr>
<tr><td>Do you have any professions <td></td><td> ' . $_POST['xfire'] . '</td></tr>
<tr><td>Which Professions(include skill): <td></td><td> ' . $_POST['xfire_name'] . '</td></tr>
<tr><td>Ventrilo installed?: <td></td><td> ' . $_POST['ts'] . '</td></tr>
<tr><td>Have microphone/headset: <td></td><td> ' . $_POST['mic'] . '</td></tr>
<tr><td>Have you read our guild Constitution and Charter:<td></td><td> ' . $_POST['pay'] . '</td></tr>
<tr><td>Why do you want to join our Guild <td></td><td> ' . $_POST['why'] . '</td></tr>
<tr><td>Do you know anyone in Affliction: <td></td><td> ' . $_POST['habbits'] . '</td></tr>
<tr><td>Other information: <td></td><td> ' . $_POST['other']. '</td></tr>
</table>';



            if ($enable_email)
mail($email_address, $subject, $body,"From: " . $_POST['email']);



//create new forum post with application

$msgOptions = array(
'id' =>  0 ,
'subject' => '[Pending] Application of ' . $context['user']['name'],
'body' => $postbody ,
'icon' => 'xx',
'smileys_enabled' => true,
'attachments' =>  array(),
);
$topicOptions = array(
'id' => 0 ,
'board' => $board_id,
'poll' =>  null,
'lock_mode' =>  null,
'sticky_mode' =>  null,
'mark_as_read' => true,
);
$posterOptions = array(
'id' => $context['user']['id'],
'name' => $context['user']['name'],
'email' => $user_info['email'],
'update_post_count' => true,
);
   
if ($enable_post)
            createPost($msgOptions, $topicOptions, $posterOptions);

// Redirect to thank you page
header('Location: http://' . $_SERVER['HTTP_HOST'] .'/index.php?page=' . $thank_you_article_id);

} else {
// Redirect to error page
//header('Location: http://' . $_SERVER['HTTP_HOST'] . '/index.php?page=' . $enroll_error_article_id );
echo '<h2 class="error">Error!</h2>';
echo '<p class="error">The following error(s) occured:<br />';

foreach ($enroll_errors as $msg) {
echo " - $msg<br />";
}
   echo "<p>Please, correct all errors and try again.</p>" ;



}
}
//else { // Display the form

echo '
<form action="index.php?page='  . $this_article_id  . '" method="post">
        <INPUT id="submitted" name="submitted" type="hidden" value="TRUE" />
<TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="95%" border="0">
<TR class ="windowbg">
<TD width = "200px">* Your Name:</TD>
<TD><INPUT id="real_name" name="real_name" type="text" value ="';
if (isset($_POST['real_name'])) echo $_POST['real_name'];
echo '" /></TD>
</TR>
<TR class ="windowbg2">
<TD width = "200px">* Email address:</TD>
<TD><INPUT id="email" name="email" type="text" value ="';
if (isset($_POST['email'])) echo $_POST['email']; else echo $user_info['email']; 
echo '" /></TD>
</TR>
<TR class ="windowbg">
<TD width = "200px">* Current In-Game Name:</TD>
<TD><INPUT id="aa_name" name="aa_name" type="text" value ="';
if (isset($_POST['aa_name'])) echo $_POST['aa_name'];
echo '" /></TD>
</TR>
<TR class ="windowbg2">
<TD width = "200px">* Age:</TD>
<TD><INPUT id="age" name="age" type="text" value ="';
if (isset($_POST['age'])) echo $_POST['age'];   
echo '" /></TD>
</TR>
<TR class ="windowbg">
<TD width = "200px">Gender:
</TD>
<TD><SELECT id = "gender" name = "gender" style="WIDTH: 152px" value ="';
if (isset($_POST['gender'])) echo $_POST['gender'];   
echo '" />
<OPTION value="No Answer" selected>--------------------------</OPTION>
<OPTION value="M">Male</OPTION>
<OPTION value="F">Female</OPTION>
</SELECT></TD>
</TR>
<TR class ="windowbg2">
<TD width = "200px">Location:</TD>
<TD><INPUT id="location" name="location" type="text" value ="';
if (isset($_POST['location'])) echo $_POST['location'];   
echo '" /></TD>
</TR>
<TR class ="windowbg">
<TD width = "200px">Current Level:</TD>
<TD><INPUT id="honor" name="honor" type="text" value ="';
if (isset($_POST['honor'])) echo $_POST['honor'];   
echo '" /></TD>
</TR>
<TR class ="windowbg2">
<TD width = "200px">Previous Guild(s) and reason of leaving:</TD>
<TD><TEXTAREA id="prev_clans" name="prev_clans" rows="4" cols="40" value ="';
if (isset($_POST['prev_clans'])) echo $_POST['prev_clans'];   
echo '" ></' . 'TEXTAREA></TD>
</TR>
<TR class ="windowbg">
<TD width = "200px">Class:</TD>
<TD><TEXTAREA id ="banned" name ="banned" rows="4" cols="40"  value ="';
if (isset($_POST['banned'])) echo $_POST['banned'];   
echo '" ></' . 'TEXTAREA></TD>
</TR>
<TR class ="windowbg2">
<TD width = "200px">Do you have raiding experience</TD>
<TD><SELECT id="aaotracker" name="aaotracker" style="WIDTH: 160px" value ="';
if (isset($_POST['aaotraker'])) echo $_POST['aaotraker'];   
echo '" />
<OPTION value="No answer" selected>--------------------------</OPTION>
<OPTION value="YES">Yes</OPTION>
<OPTION value="NO">No</OPTION>
</SELECT></TD>
</TR>
<TR class ="windowbg">
<TD width = "200px">Describe that experience:</TD>
<TD><INPUT id="aaotracker_name" name="aaotracker_name" type="text" value ="';
if (isset($_POST['aaotraker_name'])) echo $_POST['aaotraker_name']; 
echo '" /></TD>
</TR>
<TR class ="windowbg2">
<TD width = "200px">Do you have any professions</TD>
<TD><SELECT id="xfire" name="xfire" style="WIDTH: 160px" value ="';
if (isset($_POST['xfire'])) echo $_POST['xfire'];
echo '" />
<OPTION value="No answer" selected>--------------------------</OPTION>
<OPTION value="YES">Yes</OPTION>
<OPTION value="NO">No</OPTION>
</SELECT></TD>
</TR>
<TR class ="windowbg">
<TD width = "200px">Which Professions(include skill):</TD>
<TD><INPUT id="xfire_name" name="xfire_name" type="text" value ="';
if (isset($_POST['xfire_name'])) echo $_POST['xfire_name'];   
echo '" /></TD>
</TR>
<TR class ="windowbg2">
<TD width = "200px">Do you have Ventrilo installed?:</TD>
<TD><SELECT id="ts" name="ts" style="WIDTH: 160px" value ="';
if (isset($_POST['ts'])) echo $_POST['ts'];   
echo '" />
<OPTION value="No answer" selected>--------------------------</OPTION>
<OPTION value="YES">Yes</OPTION>
<OPTION value="NO">No</OPTION>
</SELECT></TD>
</TR>
<TR class ="windowbg">
<TD width = "200px">Do you have microphone/headset:</TD>
<TD><SELECT id="mic" name="mic" style="WIDTH: 160px" value ="';
if (isset($_POST['mic'])) echo $_POST['mic'];   
echo '" />
<OPTION value="No answer" selected>--------------------------</OPTION>
<OPTION value="YES">Yes</OPTION>
<OPTION value="NO">No</OPTION>
</SELECT></TD>
</TR>
<TR class ="windowbg2">
<TD width = "200px">Have you read our guild Constitution and Charter:</TD>
<TD><SELECT id="pay" name="pay" style="WIDTH: 160px" value ="';
if (isset($_POST['pay'])) echo $_POST['pay'];   
echo '" />
<OPTION value="No answer" selected>--------------------------</OPTION>
<OPTION value="Monthly">Yes, monthly</OPTION>
<OPTION value="Occasionally">Yes, occasionally</OPTION>
<OPTION value="Not">No, not now</OPTION>
</SELECT></TD>
</TR>
<TR class ="windowbg">
<TD width = "200px">Why do you want to join Affliction</TD>
<TD><TEXTAREA id="why" name ="why" rows="4" cols="40" value ="';
if (isset($_POST['why'])) echo $_POST['why'];   
echo '" ></' . 'TEXTAREA></TD>
</TR>
<TR class ="windowbg2">
<TD width = "200px">Do you know anyone in Affliction:
</TD>
<TD><TEXTAREA id="habbits" name="habbits" rows="4" cols="40" value ="';
if (isset($_POST['habbits'])) echo $_POST['habbits'];
echo '" ></' . 'TEXTAREA></TD>
</TR>
<TR class ="windowbg">
<TD width = "200px">Any other information you think can help us to make a decision:</TD>
<TD><TEXTAREA id="other" name = "other" rows="4" cols="40" value ="';
if (isset($_POST['other'])) echo $_POST['other'];   
echo '" ></' . 'TEXTAREA></TD>
</TR>
<TR class ="windowbg2">
<TD colspan="2" align="center">
<INPUT type="submit" value="Submit">
<INPUT type="reset" value="Reset"></TD>
</TR>
</TABLE>
</form>

';

This website is proudly hosted on Crocweb Cloud Website Hosting.