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: 356
  • Total: 357
  • tino

Article - New topic form (pre-formated topic)

Started by londonhogfan, April 20, 2006, 05:14:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MyFSI

#10
Write this in a PHP article:


echo'
<div align="center">
<form action="http://www.the-rota.com/index.php?action=post2;board=5" method="post" name="postmodify" id="postmodify" style="margin: 0;">
Your Gaming Alias - dd/mm/yyyy<br>
<input type="text" name="subject" tabindex="1" size="80" maxlength="80" />
<br><br>
<input name="icon" id="icon" value="xx" type="hidden">
<textarea class="editor" name="message" rows="25" cols="60" tabindex="2">

In Game Alias:

First Name:

Email Address:

XFire Name:

Location(State or Country):

Age:

Invited By: (If any)

Leagues Played In: (If any)

Have you ever been an admin in another clan?:

Why do you want to join ~RoTa~?:

Have you read and understand the Code of Conduct?:

Do you understand our member/recruit process and requirements?:

Are you willing to uphold these at ALL times?:

Any other comments or suggestions?:

</textarea><br>

<input type="submit" name="post" value="Submit" tabindex="3">
<input type="hidden" name="sc" value="', $context['session_id'], '" />
</form>
</div>';


notice the added line:
<input type="hidden" name="sc" value="', $context['session_id'], '" />
this will include your session id so it won't give you that error again.

Porky

#11
Get this error when I try that code

QuoteParse error: parse error, unexpected T_STRING in /home/capital/public_html/test/Sources/Load.php(1607) : eval()'d code(45) : eval()'d code on line 45

londonhogfan

It worked for my site.  I appreciate you MyFSI.

Porky

ok got the form to show up but when I hit submit it logs me out?

Xarcell

I may be way off here, but I think it could be a SMF issue, however they tell me it's a server issue involving extra secruity.

technodragon73

#15
Let me look into this...it may actually be something i can accomplish


EDIT:  Ok, I think i am on to something...however i am stalling a the call to create a new topic...

See my idea is to create a unique Post.php and Post.template.php for the sole purpose of the form you are requesting...however...the easiest way is to pre-poulate the needed info in the textarea...that way when a guest or member wants to apply they click a buttoin that is the direct link to create a new topic in a specified board.  When the post form comes up it will have all of the values that are needed for the application.  Obviously that info can be adjusted for whatever use is needed as well as the specific board that it posts to...I just don't understand quite well enough how the post and post template interact with each other.

The code for the text area in the post box is this:
echo '
<tr>
<td valign="top" align="right"></td>
<td>
<textarea class="editor" name="', $context['post_box_name'], '" rows="', $context['post_box_rows'], '" cols="', $context['post_box_columns'], '" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="', $context['tabindex']++, '"', isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? ' style="border: 1px solid red;"' : '', '>', $message, '</textarea>
</td>
</tr>';


You would change it to this (at least for this purpose anyway):
echo '
<tr>
<td valign="top" align="right"></td>
<td>
<textarea class="editor" name="', $context['post_box_name'], '" rows="', $context['post_box_rows'], '" cols="', $context['post_box_columns'], '" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="', $context['tabindex']++, '"', isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? ' style="border: 1px solid red;"' : '', '>
In Game Alias:

XFire Name:

Location(State or Country):

Age:

Invited By: (If any)

Leagues Played In: (If any)

Have you ever been an admin in another clan?:

Why do you want to join ~RoTa~?:

Have you read and understand the Code of Conduct?:

Do you understand our member/recruit process and requirements?:

Are you willing to uphold these at ALL times?:

Any other comments or suggestions?:

</textarea>
</td>
</tr>';


This would mean that when the special link is clicked the text area is already filled with the questions that are needed so when it is posted it would appear as needed.

londonhogfan

the one I posted a few back works perfectly

try it out if you like.

http://www.the-rota.com/index.php?page=11

Im just using the code MyFSI gave me earlier.

londonhogfan


Omniverse

I was playing with this at my guild site, and one of the officers saw it and thought they could tweak it.

He did, and this is the end result:

http://www.gaminghole.org/ks/index.php?page=24

I set up a little page before that with some recruiting info, then a link to that.

Thought i would let you guys see it, and get your thoughts  :2funny:

I'll try and get the code up for it later. Wanted to ask his permission before i did. :)


technodragon73

is it supposed to make you register?  I thought you were looking for a way for guests to post the app.

Otherwise it looks very cool and hope to see the code for it soon 8)

This website is proudly hosted on Crocweb Cloud Website Hosting.