Página 1 de 1

Mod De Formulario.

Publicado: 13 Ene 2005, 13:31
por madelmanhouse
Necesita un formulario y poder personalizarlo a mi gusto, lo he encontrado aqui:

http://www.phpbbhacks.com/download/3066

Demo:
http://www.tshacks.net/demo/mail_form.php

Bueno, pues el caso es que me interesa mucho para sorteos que hago con votaciones, pero casi me es imprescindible que el sistema pueda mandar el resultado del formulario a mas de una direccion de correo para que los resultados puedan ser cotejados por mas de una persona.

No se donde tocar. Tampoco se que archivo poneros para que lo veais, podeis pedirme el que querais, os pongo las instrucciones.

Código: Seleccionar todo

############################################### 
##   Hack Title:   Mail Submission Form 
##   Hack Version:   1.4.0
##   Author:      Triumvirate Studios 
##   Description: This hack allows people to input information and then ##		  send it to an e-mail of your own designation. 
##   Compatibility:   2.0.8 - 2.0.10 
## 
##   Installation Level: Easy 
##   Installation Time: 5 minutes 
##   Files To Edit: 4
##      templates/subSilver/overall_header.tpl 
##      language/lang_english/lang_main.php
##	language/lang_english/lang_admin.php
##      includes/page_header.php
## 
##   Included Files: 9 
##      mail_form.php 
##      templates/subSilver/mail_form_body.tpl
##	admin/admin_mail_form.php
##	templates/subSilver/admin/admin_mail_form_body.tpl
##	db_update.php 
## 
##   History: 
##      1.0.0 - Initial Release Version
##      1.1.0 - Redone templates and php coding for cleaner look and    ##              better execution.  Beta Test.
##      1.2.0 - Release Version of 1.1.0 
##	1.2.1 - Less editing to uploaded files, lang controlled 		##		variables, etc.  Generally better, cleaner code.  Also  ##	        only registered users can access the form.  Changed file ##		names around a bit too.
##	1.2.2 - Cleaned up code slightly and added some admin panel     ##		support.  No more editing to the files I include.
##	1.4.0 - cleaned up code, shorted files, added some database
##		support.
## 
##   Author Notes: 
##      None 
## 
##   Support:      http://www.phpbbhacks.com/forums 
##   Copyright:      í?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?Â?í?©2004 Mail Submission Form 1.4.0 - 
##                   Triumvirate Studios 
## 
############################################### 
##   You downloaded this hack from phpBBHacks.com, the #1 source for phpBB related downloads. 
##   Please visit http://www.phpbbhacks.com/forums for support. 
############################################### 
## 
############################################### 
##   This hack is released under the GPL License. 
##   This hack can be freely used, but not distributed, without permission. 
##   Intellectual Property is retained by the hack author(s) listed above. 
############################################### 
# 
#-----[ COPY ]------------------------------------------ 
# 
db_update.php to /

mail_form.php to /

templates/subSilver/mail_form_body.tpl to templates/subSilver/

admin/admin_mail_form.php to admin/

templates/subSilver/admin/admin_mail_form_body.tpl to templates/subSilver/admin/
# 
#-----[ SQL ]------------------------------------------ 
# NOTE:  There are two options here, run the SQL queries given below, or # run the db_update.php file then delete it.  You can do whichever you # choose

CREATE TABLE `phpbb_msf` (
`email` VARCHAR( 100 ) NOT NULL ,
`message` TEXT NOT NULL ,
PRIMARY KEY ( `email` )
);
# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/overall_header.tpl
# 
#-----[ FIND ]-------------------------- 
# 
{L_LOGIN_LOGOUT} 
# 
#-----[ AFTER ADD ]-------------------------- 
# 
 {L_MAIL_FORM} 
# 
#-----[ OPEN ]------------------------------------------ 
# 
language/lang_english/lang_main.php
# 
#-----[ FIND ]------------------------------------------ 
# 
//
// That's all, Folks!
// -------------------------------------------------
# 
#-----[ BEFORE ADD ]------------------------------------------ 
# 
//
// Mail Submission Form
//
$lang['Mail_Form'] = 'Mail Submission Form';
$lang['Field1'] = 'Field 1';
$lang['Field2'] = 'Field 2';
$lang['Field3'] = 'Field 3';
$lang['Field4'] = 'Field 4';
$lang['Field5'] = 'Field 5';
$lang['Field6'] = 'Field 6';
$lang['Field7'] = 'Field 7';
$lang['Field8'] = 'Field 8';
$lang['Field9'] = 'Field 9';
$lang['MSF_Other'] = 'Other';
$lang['MSF_Email'] = 'E-Mail';
# 
#-----[ CHANGE ]------------------------------------------ 
# 
NOTE:  Change the parts that look like 'Field 1';, 'Field 2';, etc.  To whatever you want the names of your fields to be.  DO NOT CHANGE 
$lang['Field1'] that part of the field names though, leave them how they are. 
# 
#-----[ OPEN ]------------------------------------------ 
# 
language/lang_english/lang_admin.php
# 
#-----[ FIND ]------------------------------------------ 
# 
//
// That's all Folks!
// -------------------------------------------------
# 
#-----[ BEFORE ADD ]------------------------------------------ 
# 
//
// Mail Submission Form
//
$lang['Mail_Form'] = 'Mail Submission Form';
$lang['MSF_Email'] = 'E-Mail:
The E-Mail address you want submissions to be sent to (most likely your email).';
$lang['MSF_Message'] = 'Message:
This is the message that appears after a person has submitted the form.';
# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/page_header.php
# 
#-----[ FIND ]------------------------------------------ 
# 
	'L_REGISTER' => $lang['Register'],
# 
#-----[ FIND ]------------------------------------------ 
# 
        'L_MAIL_FORM' => $lang['Mail_Form'],
# 
#-----[ FIND ]------------------------------------------ 
# 
	'U_INDEX' => append_sid('index.'.$phpEx),
# 
#-----[ AFTER ADD ]------------------------------------------ 
# 
        // Mail Submission Form
        'U_MAIL_FORM' => append_sid('mail_form.'.$phpEx),
# 
#-----[ SAVE & CLOSE ALL FILES ]-------------------------- 
# 
#Fin
P.D. Yo creo que tienen un error, pone crear una sola tabla y en el archivo que hay en el admin para poner la direccion de correo y un mensaje que sale cuando se envia correctamente el formulario, hace una llamada a otra tabla con otro nombre (phpbb_raf), yo me he limitado a crearla con la misma estructura que la anterior, pero desde el admin me sale un error, lo tengo que poner a mano en la base de datos.