Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 03-13-2006, 02:04 PM
gopherhockey's Avatar
gopherhockey gopherhockey is offline
 
Join Date: Jul 2002
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to pull information out of a template form

I have an old hack that stopped working with vb 3.5.

At one point we are asking the user to update the condition of a local mountain bike trail. The call is:

Code:
eval('print_output("' . fetch_template('edittrail') . '");');
The template is:

Code:
<html>
<head>
<title>$bbtitle - Update of trail $namit</title>
 
$headinclude

</head>
<body>
$header
<table cellpadding="2" cellspacing="0" border="0"  align="center">
<tr>
 <td width="100%">$navbar</td>
</tr>
</table>
<br>
<form $enctype name="vbform" action="trail.php" method="post" onSubmit="return validate(this)">
<input type="hidden" name="s" value="$session[sessionhash]">
<input type="hidden" name="action" value="updatetrail">
<input type="hidden" name="trailid" value="$trailid">

<table cellspacing="0" border="0" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]"  width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" border="0" width="100%">
<tr>
 <td class="tcat" colspan="2"><normalfont class="tcat"><b>$namit $trailinfo[name]</b></normalfont></td>
</tr>
$logincode
<tr>
<td class="alt2" valign="top" nowrap><normalfont><b>$othercond</b></normalfont></td>
<td class="alt2" valign="top" nowrap>
           <select name="generalid">
             <option value="0">Condition?</option>
             <option value="1">$drop1</option>
             <option value="2">$drop2</option>
             <option value="3">$drop3</option>
             <option value="4">$drop4</option>
             <option value="5">$drop5</option>
           </select>
           &nbsp;&nbsp;&nbsp;&nbsp;<smallfont><b>(Last $othercond:  $lastcond[descript])</b></smallfont>
</td>
</tr>
<tr>
<td class="alt2" valign="top" nowrap><normalfont><b>Link</b></normalfont></td>
<td class="alt2" valign="top" nowrap>
<input type="hidden" name="link" value="$trailinfo[links]">

</td>
</tr>
<tr>
<td class="alt2" valign="top" nowrap><normalfont><b>Time & Date Ridden</d></normalfont></td>
<td  class="alt2" valign="top" nowrap>
<input type="text" name="date" value="$trailinfo[dateline]" size="10">

</td></tr>
<tr>
 <td class="alt1" valign="top" nowrap><normalfont><b>$conditionname to edit:</b><BR><BR>Limit 400 characters</normalfont>
 </td>
 <td class="alt1">
 <table cellpadding="0" cellspacing="0" border="0">
 <tr valign="top">
  <td>
<textarea name="message" rows="6" cols="40" wrap="virtual" tabindex="2"> </textarea>
<br>
  </td>
 </tr>
 </table>
 </td>
</tr>
</table>
</td></tr></table>
<br>
<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextra} align="center">
<tr>
 <td align="center"><normalfont>
 <input type="submit" class="bginput" name="submit" accesskey="s" value="Save Changes" tabindex="3">
        <input type="reset" class="bginput" value="Reset Message" tabindex="4">
 </normalfont></td>
</tr>
</table>
</form>
$footer
</body>
</html>
Immediate after the template there is code that says:

Code:
if ($message=="") {
with an error that says please go back and enter a description of the trail conditions.

It used to work just fine. Now even with text entered in the message field I get the message to go back and enter information in the description.

It appears that I am not getting the form information that is passed back from the template.

Am I missing something?
Reply With Quote
Reply

Thread 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


All times are GMT. The time now is 04:58 PM.


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.03133 seconds
  • Memory Usage 2,164KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (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)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_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • 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
  • 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