The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Html page with a button to post a new thread.

+6
angel_of_night
Sir. Mayo
Jophy
Pizza Boi
Kite Trojan
RsS.YuGi
10 posters

Page 2 of 2 Previous  1, 2

Go down

Solved Html page with a button to post a new thread.

Post by RsS.YuGi February 19th 2014, 9:24 am

First topic message reminder :

Hello ForuMotion ~

I'm having hard time finding out how to create something that would look like this:
(An html page on DA: http://www.duelacademy.net/h52-academy-registration)

In that page, after filling all information an pressing register, a new thread will be posted in a section.
I know the button used here is all about JS and stuff, but I don't know how to create it. 
Also, are there any online editors to help creating the look of the html page?

Any help would be appreciated, thanks in advanced. 

Ps. I searched around the forum here but I couldn't find anything to help me, maybe I can't figure out what to call this to search more online on it also I already asked an administrator on that site to help me but ... didn't get any. 


Last edited by RsS.YuGi on March 21st 2014, 1:41 pm; edited 2 times in total (Reason for editing : nothing important)
RsS.YuGi
RsS.YuGi
Forumember

Male Posts : 120
Reputation : 4
Language : English
Location : Palestine

http://resurrectionacademy.org

Back to top Go down


Solved Re: Html page with a button to post a new thread.

Post by Sir. Mayo March 6th 2014, 5:57 pm

Its not the css thats the issues its the divs and the elements in the document have Spanish names and if i change the wrong one or forget to change even one of them it will mess the entire code up. I Will admit that i did try i did get the questions to appear in the document, but once Sent it pasted them back in Spanish. I did try but i really don't have an understanding of Java Script and what not. I do apologize
Sir. Mayo
Sir. Mayo
Forumember

Male Posts : 980
Reputation : 90
Language : English, Some french.
Location : you can also reach me on snoonet's irc server. I idle in #Techsupport Username is Vault108

http://sir-mayo.forumotion.com/

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by RsS.YuGi March 6th 2014, 7:41 pm

=/

It's okay, I appreciate your tries to help and efforts.
Thank you anyway =)

I'll be waiting if someone would help >.>
RsS.YuGi
RsS.YuGi
Forumember

Male Posts : 120
Reputation : 4
Language : English
Location : Palestine

http://resurrectionacademy.org

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by angel_of_night March 9th 2014, 12:15 pm

Free bump
angel_of_night
angel_of_night
Forumember

Female Posts : 565
Reputation : 10
Language : portuguese

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by Kite Trojan March 10th 2014, 12:06 am

I found an anwser from PunBB.biz. Credits goes to Shadow(Coolyou on FM Support) for creating this code:
Code:


<script>
    html_tpl = "<b>Title:</b> $0 <br><br><b> Name of the Question:</b> $1 <br><br><b>Forum Address:</b> $2<br><br><b>Forum Version:</b> $3 <br><br>";
    bbcode_tpl = "[b]Details:[/b]\n$1\n\n[b]Your Forum Address:[/b]\n$2 \n\n[b]Forum Version:[/b]\n$3 ";
    $(document).ready(function(){
      $('#bt-apagar').click(function() {
          $('#form-submit input[type="text"],#form-submit textarea').val('');
          $('input[name="f"]').val($(this).val());
      });
      $('#bt-pr-questao').click(function() {
          tpl = html_tpl;
          tpl = tpl.replace("$0", $('#titulo').val());
          tpl = tpl.replace("$1", $('#text_editor_textarea').val());
          tpl = tpl.replace("$2", $('#endereco').val());
          tpl = tpl.replace("$3", $('#versao').val());
          $('html, body').animate({
            scrollTop: $("#pr-questao").offset().top
          }, 800);
          $('#pr-questao').slideDown(300);
          $('#html-questao').html(tpl);
      });
      $('#bt-enviar').click(function() {
          tpl = bbcode_tpl;
          if($('#titulo').val()!=='' && $('#text_editor_textarea').val()!=='' && $('#endereco').val()!=='' && $('#versao').val()!==''){
            jQuery(this).closest('.submit-buttons').fadeOut();
            jQuery(this).closest('.submit-buttons').next('#js').fadeIn();
            tpl = tpl.replace("$0", $('#titulo').val());
            tpl = tpl.replace("$1", $('#text_editor_textarea').val());
            tpl = tpl.replace("$2", $('#endereco').val());
            tpl = tpl.replace("$3", $('#versao').val());
            $('input[name="message"]').val(tpl);
            $('input[name="subject"]').val($('#titulo').val());
            jQuery('#bt-enviar-e').click();
            jQuery('#form-submit').slideUp(300);
            jQuery('#enviado').slideDown(800);
          }else{
            $('#erro').slideUp(1);
            $('#erro').slideDown(800);
          }
      });
  jQuery('#bts .inner #js #js-but span .js-radio').click(function() {
      jQuery('#bts .inner #js #js-but').find('input[class="js-radio"]').removeAttr('checked');
      jQuery(this).attr('checked','checked');
      jQuery('#bts .inner #js').fadeOut();
      jQuery('#bts .inner .submit-buttons, .panel#form-part2').fadeIn();
      if(jQuery(this).attr('name')=="yes-js") {
        jQuery('#frame_perf').contents().each(function() {
            if(jQuery(this).find('form[action="/profile"] .main-content .frm-set dl:contains("Pedidos disponíveis") dd input').val()=="0") {
              jQuery('#bts .inner .submit-buttons').html('<span style="color: red; font-weight: bold; padding: 5px 0;font-size: 13px;">Erro: Limite de pedidos relacionados á JS atingido!</span>');
              jQuery('#bts .inner #js, #frame_perf').remove();
            } else {
              var input=Number(jQuery(this).find('form[action="/profile"] .main-content .frm-set dl:contains("Pedidos disponíveis") dd input').val());
              var valpd=Number(1);
              var somah=Number(input) - Number(valpd);
              jQuery(this).find('form[action="/profile"] .main-content .frm-set dl:contains("Pedidos disponíveis") dd input').val(somah);
              jQuery(this).find('form[action="/profile"]').find('input[class="button2"][type="submit"][name="submit"][value="Salvar"]').click();
            }
        });
      }
  });
      $('#bt-pr-fechar').click(function() {
          $('html, body').animate({
            scrollTop: $("#pr-questao").offset().top
          }, 800);
          $('#pr-questao').slideUp(300);
          return false;
      });
      $('#titulo').click(function() {
          if($('#titulo').val()=='Coloque aqui um título descritivo sobre a sua questão'){
            $('#titulo').val('');
          }
      });
      jQuery('#titulo').keyup(function(){
          var t=document.getElementById('titulo').value.length;
          var i=document.getElementById('identifytitle');
          if(t<10&&t>0){
            var l=t-10;i.innerHTML='You need  '+l*-1+' characters'
          }
          else{
            i.innerHTML=''
          }
      });
      if(VarGET('f')!==''){
          $('#form-part2, #bts').slideDown(800);
          $('input[name="f"]').val(VarGET('f'));
          $('#bt-selecciona-forum').val(VarGET('f'));
      }
    });
    </script>
<form action="/post" method="post" id="form-submit">
   
  <div id="erro" style="display:none;" class="panel">
     
      <div class="inner">
          <span class="corners-top"><span></span></span>
        <center>
            <span class="conteudo_texto" style="color:#C00"><strong>Você deve preencher todos os campos</strong></span>
        </center><span class="corners-bottom"><span></span></span>
      </div>
     
  </div><br /><br />
  <div class="panel">
     
      <div class="inner">
         
        <div class="main-content frm-set">
            <strong>Note:</strong> Before ask a question, use Search option maybe that question is already answered.
        </div>
         
      </div><span class="corners-bottom"></span>
  </div>
   
  <div class="panel" id="form-part2" style="">
     
      <div class="inner">
          <span class="corners-top"><span></span></span><br /><fieldset class="fields1"><dl><dt></dt><label></label>Topic title:<dd><input id="titulo" placeholder="Name of the Question" class="inputbox" style="clear: both; width: 510px;" type="text" /></dd></dl></fieldset>
        <div id="identifytitle" style="display: inline;">
           
        </div><fieldset class="fields1"><dl></dl><dd></dd><br /><dl><dt></dt><label></label>Your Forum Address:<dd><input id="endereco" placeholder="Your Forum Address" class="inputbox" style="clear: both; width: 510px;" type="text" /></dd></dl></fieldset>
        <div id="ender" style="display: inline;">
           
        </div><fieldset class="fields1"><dl><dd></dd></dl><br /><dl><dt><label>Forum Version:</label></dt><dd><select class="inputbox" id="versao"><option value="PunBB">PunBB</option><option value="Phpbb3">Phpbb3</option><option value="Phpbb2">Phpbb2</option><option value="Invision">Invision</option></select></dd></dl><dl><dt><br /><label>Question:<span style="color: red;"><strong> To post IMAGES just post link without [img][/img] tags.</strong></span></label></dt><strong><dd><textarea id="text_editor_textarea" name="questao" class="inputbox" tabindex="14" style="clear: both; height: 280px; width:880px;"></textarea><input name="subject" type="hidden" /><input name="message" type="hidden" /><input name="mode" value="newtopic" type="hidden" /><input name="f" value="7" type="hidden" /><input name="lt" value="0" type="hidden" /><span class="corners-bottom"><span></span></span></dd></strong></dl></fieldset>
      </div>
     
  </div>
   
  <div id="sthd" style="margin:0px">
     
  </div><strong><br /></strong>
  <div id="bts" style="" class="panel">
     
      <div class="inner">
          <span class="corners-top"><span></span></span><fieldset class="submit-buttons" style=""><input id="bt-enviar" value="Send Question" class="button1" name="post" type="button" /><input id="bt-enviar-e" value="Enviar Questão" class="button1" style="display:none;" name="post" type="submit" /></fieldset>
      </div><style>.button1 {
    background: url("http://i43.servimg.com/u/f43/15/93/99/44/highli10.png") repeat-x scroll 0px 0px purple !important;
    border-radius: 3px 3px 3px 3px;
    box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.3);
    color: rgb(255, 255, 255);
    cursor: pointer;
    display: block;
    font-size: 11px;
    font-weight: 400;
    height: 20px;
    line-height: 23px;
    margin: 6px 1px;
    padding: 1px 6px 3px;
}
.pun input {
    border-width: 1px;
    padding: 4px;
}</style>
  </div><strong></strong>
</form>
You'll have to edit it yourself since I don't know how.

Kite Trojan
Kite Trojan
Forumember

Male Posts : 823
Reputation : 19
Language : English

http://galacticda.forumotion.com/

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by Pizza Boi March 10th 2014, 12:51 am

Hi Very Happy

I don't think that's a fully translated code. If ever, try changing the /profile into something else. I can't understand Spanish a lot so I'm confused with the code.

Other than that, it only retrieves stuff from the HTML based on my reading so I'm not sure if that code is either incomplete or something else is wrong with it :/.

^ Already tested it.

Regards,
Pizza Boi
Pizza Boi
Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by RsS.YuGi March 10th 2014, 3:43 pm

Well, thanks for the feedback, but still nothing is what I'm actually looking for, the code isn't in English so I can ... try to edit or even understand...  =x

I wonder if Forumotion will actually help me any time soon.
RsS.YuGi
RsS.YuGi
Forumember

Male Posts : 120
Reputation : 4
Language : English
Location : Palestine

http://resurrectionacademy.org

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by Turbodeif March 11th 2014, 6:14 pm

Hi all!

Code referred in this message https://help.forumotion.com/t130751-html-page-with-a-button-to-post-a-new-thread#878535 it does not work because array keys may not have spaces and especial caracters such as question mark

Correction:

Code:

    /************** ZONA CAMPOS *************************************/
       MISCAMPOS["Username"] = ["Username", CAMPO.USUARIO];
       MISCAMPOS["Avatar"] = ["Avatar", CAMPO.AVATAR];
       MISCAMPOS["Name"] = ["Name", CAMPO.TEXTO, TIPO.OBLIGATORIO, GRUPO.DATOSPERSONALES];
       MISCAMPOS["GameName"] = ["Game Name", CAMPO.TEXTO, TIPO.OBLIGATORIO, GRUPO.DATOSPERSONALES];
       MISCAMPOS["Age"] = ["Age", CAMPO.EDAD, TIPO.OBLIGATORIO, GRUPO.DATOSPERSONALES];
       MISCAMPOS["Gender"] = ["Gender", CAMPO.SEXO, TIPO.OBLIGATORIO, GRUPO.DATOSPERSONALES];
       MISCAMPOS["WhyDoYouWantToJoinUs"] = ["Why do you want to join us?", CAMPO.AREA_TEXTO, TIPO.OPCIONAL, GRUPO.DATOSPERSONALES];
       //Añadir tantos campos como sean necesarios...

Anyway, today a user has asked the same question in the Spanish forum http://asistencia.foroactivo.com/t140443-usar-el-superformulario-en-ingles#820711

The JavaScript and CSS page are the same. There is no modifications related to literal translations.
And below is the HTML page translated to english:
Code:

<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script>
//My custom functions placeholder
</script>
<script> 
jQuery(function(){     
  SF_PARAMETROS = {
 
//###### START EDITABLE ZONE ###########################################################################

    /************** START GENERAL PARAMETERS *********************/
            TITULO_FORMULARIO: "Form title",
            TITULO_TABLA_PUBLICADA: "Form title when published",
           
            TIPO_MENSAJE: MENSAJE.NUEVO,
            TIPO_TEMA: TEMA.NORMAL,
            ID_FORO: 1,
            ID_TEMA: 63,
           
            SKIN_DATEPICKER: DATEPICKER.OSCURO,         
            PERMITIR_HTML: false,
            SKIN_SALIDA: SKIN.OSCURO
    /************** END GENERAL PARAMETERS ******************/       
          };

         
    /************** START GROUPS ZONE ************************************/
        GRUPO["DATOSPERSONALES"]= "My group";
        //You can add more groups
         
    /************** END GROUPS ZONE ********************************/
         
                   
    /************** START FIELDS ZONE *************************************/
      MISCAMPOS["MinecraftName"] = ["Minecraft Name", CAMPO.TEXTO];
      MISCAMPOS["Age"] = ["Age", CAMPO.EDAD];
      MISCAMPOS["Location"] = ["Location", CAMPO.TEXTO];
      MISCAMPOS["Skype"] = ["Skype (If you'd like me to message you on Skype instead)", CAMPO.TEXTO];
      MISCAMPOS["AboutYourself"] = ["Tell us a bit about yourself", CAMPO.AREA_TEXTO];
        //You can add more fields. Above are examples
    /************** END FIELDS ZONE **********************************/

//###### END EDITABLE ZONE ############################################################################


  SF_PARAMETROS["NOMBRE_INVITADO"] = "Anonymous";     
  SF_PARAMETROS["AVATAR_DEFECTO"] = "http://i37.servimg.com/u/f37/17/45/19/77/noavat10.png"; 
  SF_PARAMETROS["CSS_PREFIJO"] = "sf_" + SF_PARAMETROS.SKIN_SALIDA + "_";
  SF_PARAMETROS["CSS_CLASE_TABLA"] = "tabla";
  SF_PARAMETROS["CSS_CLASE_CABECERA"] = "cabecera";
  SF_PARAMETROS["CSS_CLASE_FILA"] = "fila"; 
  SF_PARAMETROS["CSS_CLASE_FILAGRUPO"] = "";
  SF_PARAMETROS["CSS_CLASE_CELDAGRUPO"] = "celdaGrupo";
  SF_PARAMETROS["CSS_CLASE_CELDAGRUPOCIERRE"] = "celdaGrupoCierre";     
  SF_PARAMETROS["CSS_CLASE_CELDACAMPO"] = "celdaTitulo";
  SF_PARAMETROS["CSS_CLASE_CELDADATO"] = "celdaDato"; 
 
  setParameters();
  sfDo();
}); 

//Form is loaded
function preProcesoFormulario(){} 
//Form is loaded and filled
function preProcesoFormulario2(){} 
//Form is loaded, filled and published
function postProcesoFormulario(fv){} 
</script>
<!-- FORM CSS -->
<style type="text/css">
/* Toda la página entera */
body {
  background-color:#ccc;
  color: #424242;
  text-align: center;
  font-family: Verdana, Arial, Sans Serif;
}
/* El div donde se halla el formulario */
form#miFormulario {
  width: 450px; /* Anchura del formulario */
  text-shadow: 1px 1px 0px white;
  margin: auto;
}
/* Área de un grupo */
form#miFormulario fieldset {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 10px;
}
/* La etiqueta o título de un Grupo */
form#miFormulario legend{
  font-weight: bold;

/* El título de un campo */
form#miFormulario label{
  font-style: italic;
  margin-right: 20px;
}           
/* Todos los campos de tipo input */
form#miFormulario input[type='text']{
  width: 100%;
}
/* CSS para los campos no editables, como CAMPO.AVATAR, por ejemplo */
form#miFormulario input[type="text"][disabled] {
  background-color: #D7D7D7;

/* CAMPO.AREA_TEXTO */
form#miFormulario textarea {
  height: 75px;
  width: 100%;
}
/* Campos de tipo lista desplegable o multiselección */
form#miFormulario select{
  width: 100%;

/* Campo multiselección */
form#miFormulario select[multiple]{
  width: 100%;

/* Botón ENVIAR */
form#miFormulario #submit_div input[type='submit'] {
  height: 30px;
  width: 100px;
}
/* Botón RESETEAR */
form#miFormulario #submit_div input[type='reset'] {
  height: 30px;
  width: 100px;
}
/* Cajas de día y mes del CAMPO.EDAD */
form#miFormulario input[type='text'].dia, form#miFormulario input[type='text'].mes{
  width: 30px;
}
/* Caja del año del CAMPO.EDAD */
form#miFormulario input[type='text'].ano{
  width: 50px;

/* CAMPO.FECHA */
form#miFormulario input[type='text'].fecha{
  width: 75px;
}
/* CAMPO.AVATAR y CAMPO.IMAGEN */
form#miFormulario input.sf_avatar_input, form#miFormulario input.fasf_input_img{
  width: 90%;
}
/* CAMPO.IDUSUARIO */
form#miFormulario input.sf_idusuario_input{
  width: 50px;
  text-align: right;
}     
/* Tablas */ 
table[class^="fasf_table_"] {
  width: 100%;
}
/* Primera columna: Título */
td[class^="fasf_td0_"] {
  width: 30%;
}
/* Primera columna: Datos */
td[class^="fasf_td1_"] {
  width: 70%;
}
</style>
<!-- FIN CSS DEL FORMULARIO -->

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="SuperFormulario" />
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link id="ui-theme" rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.min.css">
<div id="hidden" style="display:none"></div>
<div id="fa_hidden_load" style="display:none"></div> 
<div id="fa_hidden_load_avatar" style="display:none"></div> 
<div id="contenedor_formulario">
  <form id="miFormulario" action="/post" method="post" name="post" enctype="multipart/form-data" target="_parent">     
     <div id="hidden_inputs">
      <input type="hidden" name="lt" value="0" />
      <input id="mode" type="hidden" name="mode" value="newtopic" />
      <input id="auth1" type="hidden" value="" name="auth[]" />
      <input id="auth2" type="hidden" value="" name="auth[]" />
      <input id="f_o_t" type="hidden" name="" value="" />     
     </div>
     <input id="topictype" type="hidden" name="topictype" value="" />           
     <input id="cuerpo" type="hidden" name="message" value="" />             
     <input type="hidden" name="subject" id="titulo" value="" />
    
     <div id="form_inner_placeholder"><img src="http://i37.servimg.com/u/f37/17/45/19/77/preloa10.gif" /></div>     
     <div align="center" id="submit_div">             
     <input name="reset" value="Reset" type="reset" />             
     <input name="post" value="Send" onclick="procesarFormulario()" type="submit" />
     </div>                   
  </form>
</div>

<!-- TINYPIC -->
<script type="text/javascript">
tinypic_layout = 'narrow';tinypic_type = 'images';tinypic_links = 'url';tinypic_language = 'es';tinypic_search = 'false';tinypic_autoload = true;
</script>
<script src="http://plugin.tinypic.com/j/plugin.js" type="text/javascript"></script>
<script>
function openTinypic(){     
  jQuery("iframe[id^='tinypic_plugin_']").dialog({
  title: "Upload image",
  height: 400,
  resizable: true,
  position: ['middle',20],
  draggable: true,
  width: 'auto',
  //center: true,
  modal: true,
  show: "fade",
  hide: "fade"     
  }); 
}
</script>
<style>
  iframe[id^='tinypic_plugin_']{
  display: none;
  }
  img#sf_img_hosting{
  cursor: pointer;
  }
</style>
<!-- FIN TINYPIC -->

<!-- SCRIPT MOTOR -->
<script>
var SF_VERSION="1.3_en";var FORM_VALIDATED=false;var CAPTCHA_USADO=false;var FA_USUARIO,FA_IDUSUARIO,FA_AVATAR;var TEMA={NORMAL:0,FIJO:1,ANUNCIO:2,GLOBAL:3};var MENSAJE={NUEVO:"newtopic",RESPUESTA:"reply"};var GRUPO=[];GRUPO.NINGUNO="";var SF_PARAMETROS=[];var CAMPO={IDUSUARIO:1,USUARIO:2,AVATAR:3,EDAD:10,SEXO:11,FECHA:12,TEXTO:20,NUMERICO:21,AREA_TEXTO:22,DESPLEGABLE:30,LISTA:31,LISTAIMGS:32,CHECKBOX:33,OPCION:34,MULTISELECCION:35,IMAGEN:40,URL:41,YOUTUBE:42,FUNCION:50,CAPTCHA:100};var TIPO={OPCIONAL:0,OPCIONAL_SKIP:1,OBLIGATORIO:2,INVISIBLE:3};var OPS={NOPLACEHOLDER:1,FULLURL:2,VALIDAR:3,PLACEHOLDER:function(a){return"[PLACEHOLDER]"+a;},TIP:function(a){return"[TIP]"+a;},COLUMNA_UNICA:{LEFT:10,CENTER:11,RIGHT:12,JUSTIFY:13},NOTITLE:15,ALIGN:{LEFT:20,CENTER:21,RIGHT:22,JUSTIFY:23},VALIGN:{TOP:30,MIDDLE:31,BOTTOM:32},ALIGN_TITLE:{LEFT:40,CENTER:41,RIGHT:43,JUSTIFY:43},VALIGN_TITLE:{TOP:50,MIDDLE:51,BOTTOM:52},COLOR:function(a){return"[COLOR]"+a;},SIZE:function(a){return"[SIZE]"+a;},FONT:function(a){return"[FONT]"+a;},WRAP:function(a){return"[WRAP]"+a;},PREFIJO:function(a){return"[PREFIJO]"+a;},INFIJO:function(a){return"[INFIJO]"+a;},SUFIJO:function(a){return"[SUFIJO]"+a;}};var PERMITIR_HTML=false;var FORM_INVITADO="Anonymous";var TITULO_FORMULARIO="Mi form";var TITULO_TABLA_PUBLICADA="";var CSS_PREFIX="sf_light_";var clase_tabla_formulario=CSS_PREFIX+"tabla";var clase_cabecera_formulario=CSS_PREFIX+"cabecera";var clase_fila_formulario=CSS_PREFIX+"fila";var clase_celdaCampo_formulario=CSS_PREFIX+"celdaTitulo";var clase_celdaDato_formulario=CSS_PREFIX+"celdaDato";var clase_FilaGrupo="";var clase_CeldaGrupo=CSS_PREFIX+"celdaGrupo";var clase_CeldaGrupoCierre=CSS_PREFIX+"celdaGrupoCierre";var tipoDeTema=TEMA.NORMAL;var tipoDeMensaje=MENSAJE.RESPUESTA;var idForoPublicacion=0;var idTemaPublicacion=0;var AVATAR_DEFECTO="http://i37.servimg.com/u/f37/17/45/19/77/noavat10.png";var anyAge=false;function setParameters(){PERMITIR_HTML=SF_PARAMETROS.PERMITIR_HTML;FORM_INVITADO=SF_PARAMETROS.NOMBRE_INVITADO;TITULO_FORMULARIO=SF_PARAMETROS.TITULO_FORMULARIO;TITULO_TABLA_PUBLICADA=SF_PARAMETROS.TITULO_TABLA_PUBLICADA;CSS_PREFIX=SF_PARAMETROS.CSS_PREFIJO;clase_tabla_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_TABLA;clase_cabecera_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CABECERA;clase_fila_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_FILA;clase_celdaCampo_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CELDACAMPO;clase_celdaDato_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CELDADATO;clase_FilaGrupo=SF_PARAMETROS.CSS_CLASE_FILAGRUPO;clase_CeldaGrupo=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CELDAGRUPO;clase_CeldaGrupoCierre=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CELDAGRUPOCIERRE;tipoDeTema=SF_PARAMETROS.TIPO_TEMA;tipoDeMensaje=SF_PARAMETROS.TIPO_MENSAJE;idForoPublicacion=SF_PARAMETROS.ID_FORO;idTemaPublicacion=SF_PARAMETROS.ID_TEMA;AVATAR_DEFECTO=SF_PARAMETROS.AVATAR_DEFECTO;}var MISCAMPOS=[];var MISOPCIONES=[];var IDX={TITULO:0,TIPO:1,REQUERIDO:2,GRUPO:3,VALORES:4,OUTCSS:5,EXTATTRS:6};var DATEPICKER={CLARO:"http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.min.css",OSCURO:"http://code.jquery.com/ui/1.10.3/themes/ui-darkness/jquery-ui.min.css"};var SKIN={CLARO:"light",OSCURO:"dark"};var FA_SF_BASEC={BP:"fasf_"};var FA_SF_C={IN:{CSSPREFIX:{TABLE:FA_SF_BASEC.BP+"table_",TR0:FA_SF_BASEC.BP+"tr0_",TD0:FA_SF_BASEC.BP+"td0_",TR1:FA_SF_BASEC.BP+"tr1_",TD1:FA_SF_BASEC.BP+"td1_",FIELDSET:FA_SF_BASEC.BP+"fieldset_",LEGEND:FA_SF_BASEC.BP+"legend_",LABEL:FA_SF_BASEC.BP+"label_",INPUT:FA_SF_BASEC.BP+"input_",TEXTAREA:FA_SF_BASEC.BP+"textarea_",SELECT:FA_SF_BASEC.BP+"select_",OPTION:FA_SF_BASEC.BP+"option_",IMG:FA_SF_BASEC.BP+"img_"}}};function getGrupo(a){for(keyGrup in GRUPO){if(GRUPO[keyGrup]==a){return keyGrup;}}}function getClaseGrupo(a,b){for(keyGrup in GRUPO){if(GRUPO[keyGrup]==a){return FA_SF_C.IN.CSSPREFIX[b.toUpperCase()]+"GRUPO_"+keyGrup;}}}function getClaseIDGrupo(a,b){return FA_SF_C.IN.CSSPREFIX[b.toUpperCase()]+"GRUPO_"+a;}function getClase(a,b){return FA_SF_C.IN.CSSPREFIX[b.toUpperCase()]+a;}function getCookie(a){var b=document.cookie.split(a+"=");if(b.length==2){return b.pop().split(";").shift();}}var _userdata=new Object();function fa_idusuario(){if(!_userdata.hasOwnProperty("user_id")){var a=unescape(getCookie("fa_"+(document.location.hostname).replace(/\./g,"_")+"_data"));if(a!=null&&a!=undefined&&a!="undefined"){try{_userdata.user_id=a.match(/:\"?\d+\"?;/g)[0].replace(/[\":;]/g,"");return _userdata.user_id;}catch(err){console.log(err);_userdata.user_id=-1;return -1;}}else{_userdata.user_id=-1;return -1;}}else{return parseInt(_userdata.user_id);}}function fa_usuario(){if(fa_idusuario()==-1){return FORM_INVITADO;}else{if(!_userdata.hasOwnProperty("username")){if(jQuery("a#logout.mainmenu").length){_userdata.username=(jQuery("img#i_icon_mini_logout").attr("alt")||"").replace(/^.*?\[ (.*) \]$/,"$1");return _userdata.username;}else{var f=FORM_INVITADO;jQuery.ajaxSetup({async:false});jQuery("#fa_hidden_load").load("/u"+fa_idusuario()+" .mainmenu",function(a){f=(jQuery("#fa_hidden_load img#i_icon_mini_logout").attr("alt")||"").replace(/^.*?\[ (.*) \]$/,"$1");});jQuery.ajaxSetup({async:true});jQuery("#fa_hidden_load").remove();_userdata.username=f;return f;}}else{return _userdata.username;}}}function fa_urlavatar(){var b=AVATAR_DEFECTO;if(fa_idusuario()>-1){if(_userdata.hasOwnProperty("avatar")){b=jQuery(_userdata.avatar).attr("src");}else{jQuery.ajaxSetup({async:false});jQuery("#fa_hidden_load_avatar").load("/profile?mode=editprofile&page_profil=avatars form[action='/profile'] img",function(a){b=jQuery("#fa_hidden_load_avatar img").attr("src")||b;});jQuery.ajaxSetup({async:true});jQuery("#fa_hidden_load_avatar").remove();_userdata.avatar="<img src='"+b+"' />";}}return b;}function fa_soystaff_(){if(!_userdata.hasOwnProperty("user_level")){var b=false;jQuery("body").prepend("<span id='fa_hidden_load' style='display:none'>");jQuery.ajaxSetup({async:false});jQuery("#fa_hidden_load").load("/u1 div#profile-advanced-details span.gen>strong, div#profile-advanced-details div.inner>strong, div#profile-advanced-details div.main-content>strong, div#profile-advanced-details div.box-content>strong",function(a){b=!jQuery("#fa_hidden_load").is(":empty");});jQuery.ajaxSetup({async:true});jQuery("#fa_hidden_load").remove();_userdata.user_level=b;return b;}else{return _userdata.user_level>0;}}function sfDo(){var a="<h2>"+SF_PARAMETROS.TITULO_FORMULARIO+"</h2>";var b="";var c="~";var d="%";var f=false;for(key in MISCAMPOS){var g=MISCAMPOS[key][IDX.TITULO];var h=MISCAMPOS[key][IDX.TIPO];var j=MISCAMPOS[key][IDX.REQUERIDO]==undefined?TIPO.OPCIONAL:MISCAMPOS[key][IDX.REQUERIDO];var k=MISCAMPOS[key][IDX.GRUPO]==undefined?GRUPO.NINGUNO:MISCAMPOS[key][IDX.GRUPO];var l=MISCAMPOS[key][IDX.VALORES]==undefined?["-"]:MISCAMPOS[key][IDX.VALORES];var m=MISCAMPOS[key][IDX.EXTATTRS]==undefined?"":MISCAMPOS[key][IDX.EXTATTRS];var n=MISCAMPOS[key][IDX.OUTCSS]==undefined?"":MISCAMPOS[key][IDX.OUTCSS];var o=getGrupo(k);var p=MISOPCIONES[key];var q="";var tip="";var r=false;for(var i=0;p!=null&&i<p.length;i++){if(/^\[PLACEHOLDER\]/g.test(p[i])){q=p[i].split("[PLACEHOLDER]")[1];continue;}if(/^\[TIP\]/g.test(p[i])){tip=" title='"+p[i].split("[TIP]")[1]+"' ";continue;}if(p[i]==OPS.NOPLACEHOLDER){r=true;continue;}}if(r){q="";}if(j==TIPO.OBLIGATORIO){g+="*";}var s=false;var t="";switch(j){case TIPO.OPCIONAL:t="";break;case TIPO.OPCIONAL_SKIP:t="";break;case TIPO.OBLIGATORIO:if(h!=CAMPO.FUNCION){t="required='required'";if(h==CAMPO.DESPLEGABLE||h==CAMPO.MULTISELECCION){t="required";}}break;case TIPO.INVISIBLE:s=true;t="";break;default:t="";break;}d=b;b=k;var u="";var v="";if(s||h==CAMPO.FUNCION){if(h==CAMPO.FUNCION){var w="";u="value=''";try{if(l[0]!=undefined){var x=window[l[0]];if(x!=null){if(l[1]!=undefined){w=x(l[1]);}else{w=x();}}u="value='"+w+"'";}}catch(err){console.log("SF_ERR: "+e);}h=CAMPO.TEXTO;}else{u="value='"+l+"'";}var v=" style='display:none!important;'";}if(c=="~"){if(b==GRUPO.NINGUNO){f=false;a+="<table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClaseIDGrupo(o,"tr0")+"' "+v+">";}else{a+="<fieldset class='"+getClaseIDGrupo(o,"fieldset")+"'><legend class='"+getClaseIDGrupo(o,"legend")+"'>"+k+"</legend><table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClase(key,"tr0")+"' "+v+">";f=true;}}else{if(b==GRUPO.NINGUNO){f=false;if(c==GRUPO.NINGUNO){a+="</tr><tr class='"+getClase(key,"tr1")+"' "+v+">";}else{a+="</tr></table></fieldset><table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClase(key,"tr1")+"' "+v+">";}}else{if(b!=c){if(f){a+="</tr></table></fieldset><fieldset class='"+getClaseIDGrupo(o,"fieldset")+"'><legend class='"+getClaseIDGrupo(o,"legend")+"'>"+k+"</legend><table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClase(key,"tr1")+"' "+v+">";}else{a+="</tr></table><fieldset class='"+getClaseIDGrupo(o,"fieldset")+"'><legend class='"+getClaseIDGrupo(o,"legend")+"'>"+k+"</legend><table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClase(key,"tr1")+"' "+v+">";}}else{a+="</tr><tr class='"+getClase(key,"tr1")+"' "+v+">";}f=true;}}if(h!=CAMPO.CAPTCHA){a+="<td class='"+getClase(key,"td0")+(f?" inGroup":"")+"'><label class='"+getClase(key,"label")+"' for='"+key+"'>"+g+"</label></td>";}var y="<td class='"+getClase(key,"td1")+(f?" inGroup":"")+"'>";switch(h){case CAMPO.EDAD:a+=y;a+="Day: <input maxlength='2' class='dia "+getClase(key,"input")+"_dia' type='text' "+u+" name='"+key+"_dia' id='"+key+"_dia' "+t+" "+m+"/>  ";a+="Month: <input maxlength='2' class='mes "+getClase(key,"input")+"_mes' type='text' "+u+" name='"+key+"_mes' id='"+key+"_mes' "+t+" "+m+"/>  ";a+="Year: <input maxlength='4' class='ano "+getClase(key,"input")+"_ano' type='text' "+u+" name='"+key+"_ano' id='"+key+"_ano' "+t+" "+m+"/>";a+="</td>";a+="<script>jQuery('#"+key+"_dia, #"+key+"_mes, #"+key+"_ano').forceNumericOnly();<\/script>";break;case CAMPO.SEXO:a+=y;a+="<input "+tip+" class='"+getClase(key,"input")+"' type='radio' value='Man' name='"+key+"' id='"+(key+"_hombre")+"' "+t+" "+m+" >Man";a+="<input "+tip+" class='"+getClase(key,"input")+"' type='radio' value='Woman' name='"+key+"' id='"+(key+"_mujer")+"' "+t+" "+m+" >Woman";a+="</td>";break;case CAMPO.FECHA:a+=y;a+="<input "+tip+" placeholder='"+q+"' class='fecha "+getClase(key,"input")+"' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";a+="<script>jQuery('#"+key+"').datepicker();<\/script>";break;case CAMPO.IDUSUARIO:FA_IDUSUARIO=fa_idusuario();a+=y;a+="<input class='"+getClase(key,"input")+" sf_idusuario_input' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+" value='"+FA_IDUSUARIO+"' disabled />";a+="</td>";break;case CAMPO.USUARIO:FA_USUARIO=fa_usuario();a+=y;a+="<input class='"+getClase(key,"input")+"' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+" value='"+FA_USUARIO+"' disabled />";a+="</td>";break;case CAMPO.AVATAR:FA_AVATAR=fa_urlavatar();a+=y;a+="<input class='"+getClase(key,"input")+" sf_avatar_input' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+" value='"+FA_AVATAR+"' disabled /> <img src='"+FA_AVATAR+"' width='16' height='16' />";a+="</td>";break;case CAMPO.TEXTO:a+=y;a+="<input "+tip+" placeholder='"+q+"' class='"+getClase(key,"input")+"' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";break;case CAMPO.NUMERICO:a+=y;a+="<input "+tip+" placeholder='"+q+"' class='"+getClase(key,"input")+"' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";a+="<script>jQuery('#"+key+"').forceNumericOnly();<\/script>";break;case CAMPO.AREA_TEXTO:a+=y;a+="<textarea "+tip+" placeholder='"+q+"' class='"+getClase(key,"textarea")+"' name='"+key+"' "+u+" id='"+key+"' "+t+" "+m+" /></textarea>";a+="</td>";break;case CAMPO.DESPLEGABLE:var z=l;a+=y;a+="<select "+tip+" class='"+getClase(key,"select")+"' name='"+key+"' id='"+key+"' "+t+" "+m+" >";a+="<option class='"+getClase(key,"option")+"' value=''>--- Select ---";var i=0;for(opt in z){a+="<option class='"+getClase(key,"option")+"' value='"+z[opt]+"' id='"+(key+i)+"'>"+z[opt];i++;}a+="</select>";a+="</td>";break;case CAMPO.LISTA:var z=l;var A=[];if(l!=null&&l[0]!=null&&(typeof l[0]==typeof[])){z=l[0];}if(l!=null&&l[1]!=null&&(typeof l[1]==typeof[])){A=l[1];}a+="<td class='"+getClase(key,"td1")+"' style='text-align:justify'>";var B="";for(var i=0;i<z.length;i++){imgact=A[i]!=null?"<img src='"+A[i]+"' /> ":"";a+="<input "+tip+" class='"+getClase(key,"input")+"' type='radio' value='"+z[i]+"' name='"+key+"' id='"+(key+i)+"' "+t+" "+m+" >"+imgact+z[i]+"<br>";}a+="</td>";break;case CAMPO.CHECKBOX:var z=l;a+=y;var i=0;for(opt in z){a+="<input "+tip+" class='"+getClase(key,"input")+"' onClick='javascript:reqCheck(\""+(key+i)+'", '+MISCAMPOS[key][2]+")' type='checkbox' value='"+z[opt]+"' name='"+key+"[]' id='"+(key+i)+"' "+t+" "+m+" >"+z[opt];i++;}a+="</td>";break;case CAMPO.OPCION:var z=l;a+=y;var i=0;for(opt in z){a+="<input "+tip+" class='"+getClase(key,"input")+"' type='radio' value='"+z[opt]+"' name='"+key+"' id='"+(key+i)+"' "+t+" "+m+" >"+z[opt];i++;}a+="</td>";break;case CAMPO.MULTISELECCION:a+=y;a+="<select "+tip+" class='"+getClase(key,"select")+"' multiple "+t+" name='"+key+"' id='"+key+"' >";var z=l;var i=0;for(opt in z){a+="<option class='"+getClase(key,"option")+"' value='"+z[opt]+"' id='"+(key+i)+"' "+m+" >"+z[opt]+"</option>";i++;}a+="</select>";a+="</td>";break;case CAMPO.IMAGEN:if(!r&&q==""){q="Image URL";}a+=y;a+="<input "+tip+" class='"+getClase(key,"input")+" fasf_input_img' placeholder='"+q+"' "+u+" type='text' name='"+key+"' id='"+key+"' "+t+" "+m+"/> <img title='Upload image' alt='Upload image' id='sf_img_hosting' src='http://i37.servimg.com/u/f37/17/45/19/77/image_10.png' onclick='openTinypic()' />";a+="</td>";break;case CAMPO.URL:if(!r&&q==""){q="URL address";}a+=y;a+="<input "+tip+" class='"+getClase(key,"input")+"' placeholder='"+q+"' "+u+" type='text' name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";break;case CAMPO.YOUTUBE:if(!r&&q==""){q="Youtube video URL";}a+=y;a+="<input "+tip+" class='"+getClase(key,"input")+"' placeholder='"+q+"' "+u+" type='text' name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";break;case CAMPO.CAPTCHA:if(!CAPTCHA_USADO){a+="<td class='"+getClase(key,"td1")+"' colspan='2'>";a+="<div id='cptch'><span>Verification code: </span><span id='txtahc_tpcaDiv'></span><input type='hidden' id='txtahc_tpca' /> <input type='text' name='txtahc_input' id='txtahc_input' style='width:75px !important' /></div>";a+="</td>";CAPTCHA_USADO=true;}break;default:break;}c=b;}if(b==GRUPO.NINGUNO){a+="</tr></table>";}else{a+="</tr></table></fieldset>";}jQuery("#form_inner_placeholder").html(a);if(CAPTCHA_USADO){setcptchcode();}jQuery("#form_inner_placeholder [title]").tooltip();preProcesoFormulario();}jQuery(function(){if(tipoDeMensaje==MENSAJE.NUEVO){jQuery("#hidden").load("/post?f="+idForoPublicacion+"&mode=newtopic form[action='/post'] input[type='hidden']");}if(SF_PARAMETROS.SKIN_DATEPICKER==DATEPICKER.CLARO){jQuery("link#ui-theme").attr("href",DATEPICKER.CLARO);}else{jQuery("link#ui-theme").attr("href",DATEPICKER.OSCURO);}document.title=TITULO_FORMULARIO;jQuery("#miFormulario").submit(function(e){if(!FORM_VALIDATED){e.preventDefault();return false;}});});jQuery(function(a){a.datepicker.regional.es={closeText:"Cerrar",prevText:"<Ant",nextText:"Sig>",currentText:"Hoy",monthNames:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthNamesShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],dayNames:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],dayNamesShort:["Dom","Lun","Mar","Mié","Juv","Vie","Sáb"],dayNamesMin:["Do","Lu","Ma","Mi","Ju","Vi","Sá"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:false,showMonthAfterYear:false,yearSuffix:""};a.datepicker.setDefaults(jQuery.datepicker.regional.en);});function reqCheck(a,b){if(b){var c=jQuery("#"+a).attr("name");var d=false;jQuery("input[type='checkbox'][name='"+c+"']").each(function(){if(jQuery(this).is(":checked")){d=true;}});if(d){jQuery("input[type='checkbox'][name='"+c+"']").removeAttr("required");}else{jQuery("input[type='checkbox'][name='"+c+"']").attr("required","required");}}}var colSpanAlignStyle="style='text-align:center!important'";var ERROR_VALIDACION=false;var MSG_ERRORES_VALIDACION="Validation errors:\n\n";var bbcodes=["b","i","u","quote","code","list","img","url","scroll","fade","blur","flipv","fliph","updown","center","right","strike","flash","hide","spoiler","wow","justify","sub","sup","left","hr"];function procesarFormulario(){ERROR_VALIDACION=false;MSG_ERRORES_VALIDACION="Validation errors:\n\n";if(typeof(preProcesoFormulario2)!="undefined"){preProcesoFormulario2();}var b="[table class='"+clase_tabla_formulario+" sf_table']";if(jQuery.trim(TITULO_TABLA_PUBLICADA).length){b+="[tr class='"+clase_cabecera_formulario+"'][td colspan=2]"+TITULO_TABLA_PUBLICADA+"[/td][/tr]";}var c=["","",""];var d=GRUPO.NINGUNO;var e=false;for(key in MISCAMPOS){c=["","",""];colSpan2=false;var f=false;var g="";var h="";var j="";var k=[];var l="";var m=[];var n="";var o=inf1=inf2=suf="";var p=false;var q=false;var r=MISCAMPOS[key][IDX.TITULO];var s=MISCAMPOS[key][IDX.TIPO];var t=MISCAMPOS[key][IDX.REQUERIDO]==undefined?TIPO.OPCIONAL:MISCAMPOS[key][IDX.REQUERIDO];var u=MISCAMPOS[key][IDX.GRUPO]==undefined?GRUPO.NINGUNO:MISCAMPOS[key][IDX.GRUPO];var v=MISCAMPOS[key][IDX.VALORES]==undefined?[""]:MISCAMPOS[key][IDX.VALORES];var w=MISCAMPOS[key][IDX.EXTATTRS]==undefined?"":MISCAMPOS[key][IDX.EXTATTRS];var x=MISCAMPOS[key][IDX.OUTCSS]==undefined?"":MISCAMPOS[key][IDX.OUTCSS];var y=MISOPCIONES[key];for(var i=0;y!=null&&i<y.length;i++){if(/^\[PREFIJO\]/g.test(y[i])){o+=y[i].split("[PREFIJO]")[1];continue;}if(/^\[INFIJO\]/g.test(y[i])){inf1+=y[i].split("[INFIJO]")[1].split("|")[0]||"";inf2+=y[i].split("[INFIJO]")[1].split("|")[1]||"";continue;}if(/^\[SUFIJO\]/g.test(y[i])){suf+=y[i].split("[SUFIJO]")[1];continue;}if(/^\[COLOR\]/g.test(y[i])){g+="[color="+y[i].split("[COLOR]")[1]+"]";h="[/color]"+h;continue;}if(/^\[SIZE\]/g.test(y[i])){g+="[size="+y[i].split("[SIZE]")[1]+"]";h="[/size]"+h;continue;}if(/^\[FONT\]/g.test(y[i])){g+="[font="+y[i].split("[FONT]")[1]+"]";h="[/font]"+h;continue;}if(/^\[WRAP\]/g.test(y[i])){var z=(y[i].split("[WRAP]")[1]).toLowerCase();var A=[];A[0]=z;var B=z.substring(0,(z.indexOf(" ")==-1?z.length:z.indexOf(" ")));if(z.indexOf(",")>=0){A=z.split(",");}if(jQuery.inArray(A[0],bbcodes)>=0){switch(A[0]){case"img":if(A[1]!=undefined&&A[2]!=undefined){g+="[img("+A[1]+"px,"+A[2]+"px)]";h="[/img]"+h;}else{g+="[img]";h="[/img]"+h;}break;case"spoiler":g+="[spoiler"+(A[1]==undefined?"":'="'+A[1]+'"')+"]";h="[/spoiler]"+h;break;case"quote":g+="[quote"+(A[1]==undefined?"":'="'+A[1]+'"')+"]";h="[/quote]"+h;break;case"url":g+="[url"+(A[1]==undefined?"":'="'+A[1]+'"')+"]";h="[/url]"+h;break;case"list":g+="[list][*]";h="[/list]"+h;break;case"flash":g+="[flash("+(A[1]==undefined?"500":A[1])+","+(A[2]==undefined?"500":A[2])+")]";h="[/flash]"+h;break;default:g+="["+A[0]+"]";h="[/"+A[0]+"]"+h;}}else{g+="<"+A[0]+">";h="</"+B+">"+h;}continue;}switch(y[i]){case OPS.COLUMNA_UNICA.LEFT:colSpan2=true;colSpanAlignStyle="style='text-align:left!important'";break;case OPS.COLUMNA_UNICA.CENTER:colSpan2=true;colSpanAlignStyle="style='text-align:center!important'";break;case OPS.COLUMNA_UNICA.RIGHT:colSpan2=true;colSpanAlignStyle="style='text-align:right!important'";break;case OPS.COLUMNA_UNICA.JUSTIFY:colSpan2=true;colSpanAlignStyle="style='text-align:justify!important'";break;case OPS.NOTITLE:f=true;break;case OPS.SHOWGROUP:break;case OPS.ALIGN.LEFT:m.push("text-align:left!important");break;case OPS.ALIGN.CENTER:m.push("text-align:center!important");break;case OPS.ALIGN.RIGHT:m.push("text-align:right!important");break;case OPS.ALIGN.JUSTIFY:m.push("text-align:justify!important");break;case OPS.VALIGN.TOP:m.push("vertical-align:top!important");break;case OPS.VALIGN.MIDDLE:m.push("vertical-align:middle!important");break;case OPS.VALIGN.BOTTOM:m.push("vertical-align:bottom!important");break;case OPS.ALIGN_TITLE.LEFT:k.push("text-align:left!important");break;case OPS.ALIGN_TITLE.CENTER:k.push("text-align:center!important");break;case OPS.ALIGN_TITLE.RIGHT:k.push("text-align:right!important");break;case OPS.ALIGN_TITLE.JUSTIFY:k.push("text-align:justify!important");break;case OPS.VALIGN_TITLE.TOP:k.push("vertical-align:top!important");break;case OPS.VALIGN_TITLE.MIDDLE:k.push("vertical-align:middle!important");break;case OPS.VALIGN_TITLE.BOTTOM:k.push("vertical-align:bottom!important");break;case OPS.FULLURL:p=true;break;case OPS.VALIDAR:q=true;break;default:}}if(m.join(";").length){n=" style='"+m.join(";")+"'";}if(k.join(";").length){l=" style='"+k.join(";")+"'";}if(s==CAMPO.CAPTCHA){continue;}if(x!=undefined){var C=x;if(typeof C==typeof""){claseFila=C;}if(typeof C==typeof[]){var D=C.length;for(var i=0;i<C.length;i++){c[i]=C[i];}}}var E="";if(jQuery.trim(clase_fila_formulario)){E=clase_fila_formulario;}if(jQuery.trim(c[0])){E=jQuery.trim(E)?E+" "+c[0]:c[0];}var F="";if(jQuery.trim(clase_celdaCampo_formulario)){F=clase_celdaCampo_formulario;}if(jQuery.trim(c[1])){F=jQuery.trim(F)?F+" "+c[1]:c[1];}var G="";if(jQuery.trim(clase_celdaDato_formulario)){G=clase_celdaDato_formulario;}if(s==CAMPO.AVATAR){G=jQuery.trim(G)?G+" sf_tdavatar":"sf_tdavatar";}if(jQuery.trim(c[2])){G=jQuery.trim(G)?G+" "+c[2]:c[2];}if(t==TIPO.OPCIONAL_SKIP){var H="";if(s==CAMPO.OPCION){H=jQuery("input[name='"+key+"']:checked").val();}else{if(s==CAMPO.EDAD){var I,me,an;I=jQuery.trim(jQuery("#miFormulario #"+key+"_dia").val());me=jQuery.trim(jQuery("#miFormulario #"+key+"_mes").val());an=jQuery.trim(jQuery("#miFormulario #"+key+"_ano").val());var J=I+me+an;if(J==null||J==undefined||J==""){continue;}}else{if(s==CAMPO.CHECKBOX){var K=[];jQuery("."+getClase(key,"input")+":checked").each(function(){K.push(jQuery(this).val());});H=K==null?"":K.toString();}else{H=jQuery("#miFormulario #"+key).val();}}}if(H==null||H==undefined||jQuery.trim(H)==""){continue;}}if(u!=d){b+="[tr class='"+clase_FilaGrupo+"']";var L=clase_CeldaGrupo;if(d!=GRUPO.NINGUNO&&u==GRUPO.NINGUNO){L=clase_CeldaGrupoCierre;e=false;}else{e=true;}b+="[td colspan=2 class='"+L+"']"+u+"[/td]";b+="[/tr]";d=u;}if(colSpan2){if(!f){b+="[tr class='"+E+"']";b+="[td colspan=2 "+colSpanAlignStyle+" class='"+F+(e?" inGroup":"")+"' "+l+"]"+r+"[/td]";b+="[/tr]";}b+="[tr class='"+E+"'][td class='"+G+(e?" inGroup":"")+"' colspan=2 "+colSpanAlignStyle+n+"]";}else{b+="[tr class='"+E+"']";if(!f){b+="[td class='"+F+(e?" inGroup":"")+"' "+l+"]"+r+"[/td]";}b+="[td class='"+G+(e?" inGroup":"")+"' "+n+"]";}var M=suf__="";M=o+inf1;suf__=inf2+suf;switch(s){case CAMPO.EDAD:var I,me,an;I=pad(jQuery("#miFormulario #"+key+"_dia").val(),2);me=pad(jQuery("#miFormulario #"+key+"_mes").val(),2);an=pad(jQuery("#miFormulario #"+key+"_ano").val(),4);var N="[b][SF_EDAD]"+I+"/"+me+"/"+an+"[/b]";if(I+me+an=="00000000"&&t!=TIPO.OBLIGATORIO){N="";}else{if(parseInt(I)==0||parseInt(I)>31){ERROR_VALIDACION=true;MSG_ERRORES_VALIDACION+="* Wrong day\n";jQuery("#miFormulario #"+key+"_dia").focus();}if(parseInt(me)==0||parseInt(me)>12){ERROR_VALIDACION=true;MSG_ERRORES_VALIDACION+="* Wrong month\n";jQuery("#miFormulario #"+key+"_mes").focus();}if((!anyAge&&parseInt(an)<1900)||parseInt(an)>new Date().getFullYear()){ERROR_VALIDACION=true;MSG_ERRORES_VALIDACION+="* Year out of range\n";jQuery("#miFormulario #"+key+"_ano").focus();}}b+=g+M+N+suf__+h;break;case CAMPO.SEXO:b+=g+M+get_(jQuery("input[name='"+key+"']:checked").val())+suf__+h;break;case CAMPO.FECHA:b+=g+M+jQuery("#miFormulario #"+key).val()+suf__+h;break;case CAMPO.USUARIO:b+=g+M+FA_USUARIO+suf__+h;break;case CAMPO.AVATAR:b+=g+"[img]"+FA_AVATAR+"[/img]"+h;break;case CAMPO.IDUSUARIO:b+=g+M+FA_IDUSUARIO+suf__+h;break;case CAMPO.FUNCION:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.TEXTO:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.NUMERICO:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.AREA_TEXTO:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.DESPLEGABLE:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.LISTA:var O="";if(v!=null&&v[1]!=null&&(typeof v[1]==typeof[])){if(jQuery("input[name='"+key+"']:checked").next("img").length){O="[img]"+jQuery("input[name='"+key+"']:checked").next("img").attr("src")+"[/img] ";}}b+=g+O+M+get_(jQuery("input[name='"+key+"']:checked").val())+suf__+h;break;case CAMPO.CHECKBOX:var K=[];jQuery("."+getClase(key,"input")+":checked").each(function(){K.push(get_(jQuery(this).val()));});b+=g+M+K+suf__+h;break;case CAMPO.OPCION:b+=g+M+get_(jQuery("input[name='"+key+"']:checked").val())+suf__+h;break;case CAMPO.MULTISELECCION:var P=jQuery("#miFormulario #"+key).val();if(P!=null&&P!=undefined){P=P.toString();}b+=g+M+get_(P)+suf__+h;break;case CAMPO.IMAGEN:var Q=get_(jQuery("#miFormulario #"+key).val());if((Q==null||jQuery.trim(Q)=="")&&t!=TIPO.OBLIGATORIO){q=false;}if(q){ERROR_VALIDACION=!isImg(Q,key);}var R=M+Q+suf__;if(jQuery.trim(R)!=""){R="[img]"+R+"[/img]";}b+=g+R+h;break;case CAMPO.URL:var S=get_(jQuery("#miFormulario #"+key).val());if((S==null||jQuery.trim(S)=="")&&t!=TIPO.OBLIGATORIO){q=false;}if(q){ERROR_VALIDACION=!isUrl(S,key);}var T=S;if(!p&&v!=null&&jQuery.trim(v)!=""){T=v;}var U=M+S+suf__;if(jQuery.trim(U)!=""){U="[url="+U+"]"+T+"[/url]";}b+=g+U+h;break;case CAMPO.YOUTUBE:var T=jQuery("#miFormulario #"+key).val();if((T==null||jQuery.trim(T)=="")&&t!=TIPO.OBLIGATORIO){q=false;}var V=get_(youtube_parser(T,key,q));if(jQuery.trim(V)!=""){V="[youtube]"+V+"[/youtube]";}b+=g+V+h;break;default:}b+="[/td][/tr]";}b+="[/table]";jQuery("input#cuerpo").attr("value",b);if(tipoDeMensaje==MENSAJE.RESPUESTA){jQuery.ajaxSetup({async:false});jQuery("#hidden_inputs").load("/post?t="+idTemaPublicacion+"&mode=reply form[action='/post'] input[type='hidden']");jQuery.ajaxSetup({async:true});}else{var W,auth2;jQuery("#hidden").find("input[name='auth[]']").each(function(a){if(a==0){W=jQuery(this).attr("value");}if(a==1){auth2=jQuery(this).attr("value");}});jQuery("input#mode").attr("value",tipoDeMensaje);jQuery("input#auth1").attr("value",W);jQuery("input#auth2").attr("value",auth2);jQuery("input#f_o_t").attr("name","f");jQuery("input#f_o_t").attr("value",idForoPublicacion);jQuery("input#topictype").attr("value",tipoDeTema);}jQuery("input#titulo").val(TITULO_FORMULARIO);if(CAPTCHA_USADO){FORM_VALIDATED=chk_ek_c_frm(jQuery("#miFormulario"))&&!ERROR_VALIDACION;}else{FORM_VALIDATED=true&&!ERROR_VALIDACION;}if(ERROR_VALIDACION){alert(MSG_ERRORES_VALIDACION);}postProcesoFormulario(FORM_VALIDATED);}function get_(a){if(a==null||a==undefined){return"";}if(!PERMITIR_HTML){return a.replace(/<(?:.|\n)*?>/gm,"");}else{return a;}}function isUrl(s,a){var b=/(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;var c=b.test(s);if(!c){MSG_ERRORES_VALIDACION+="* Not a valid URL address\n";jQuery("#miFormulario #"+a).focus();}return c;}function youtube_parser(a,b,c){var d=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;var e=(a==null?null:a.match(d));if(e&&e[7].length==11){return"http://www.youtube.com/watch?v="+e[7];}else{if(c){MSG_ERRORES_VALIDACION+="* Not a valid Youtube URL\n";jQuery("#miFormulario #"+b).focus();ERROR_VALIDACION=true;}}}function isImg(s,a){var b=(s!=null&&(s.match(/^(https?):\/\/.*(jpg|jpeg|png|gif|bmp)$/gi)!=null));if(!b){MSG_ERRORES_VALIDACION+="* Not a valid image URL\n";jQuery("#miFormulario #"+a).focus();}return b;}jQuery.fn.forceNumericOnly=function(){return this.each(function(){jQuery(this).keydown(function(e){var a=e.charCode||e.keyCode||0;return(a==8||a==9||a==46||a==110||a==190||(a>=35&&a<=40)||(a>=48&&a<=57)||(a>=96&&a<=105));});});};function pad(a,b){return a.length<b?pad("0"+a,b):a;}var _0x503f=["\x72\x61\x6E\x64\x6F\x6D","\x63\x65\x69\x6C","","\x76\x61\x6C\x75\x65","\x74\x78\x74\x61\x68\x63\x5F\x74\x70\x63\x61","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x74\x78\x74\x61\x68\x63\x5F\x74\x70\x63\x61\x44\x69\x76","\x76\x61\x6C","\x23\x6D\x69\x46\x6F\x72\x6D\x75\x6C\x61\x72\x69\x6F\x20\x23\x74\x78\x74\x61\x68\x63\x5F\x69\x6E\x70\x75\x74","\x56\x65\x72\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x20\x63\x6F\x64\x65\x20\x69\x73\x20\x65\x6D\x70\x74\x79","\x56\x65\x72\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x20\x63\x6F\x64\x65\x20\x69\x73\x20\x69\x6E\x63\x6F\x72\x72\x65\x63\x74","\x66\x6F\x63\x75\x73","\x23\x74\x78\x74\x61\x68\x63\x5F\x69\x6E\x70\x75\x74","\x74\x78\x74\x61\x68\x63\x5F\x69\x6E\x70\x75\x74","\x6A\x6F\x69\x6E","\x20","\x73\x70\x6C\x69\x74"];function setcptchcode(){var a=Math[_0x503f[1]](Math[_0x503f[0]]()*9)+_0x503f[2];var b=Math[_0x503f[1]](Math[_0x503f[0]]()*9)+_0x503f[2];var c=Math[_0x503f[1]](Math[_0x503f[0]]()*9)+_0x503f[2];var d=Math[_0x503f[1]](Math[_0x503f[0]]()*9)+_0x503f[2];var e=Math[_0x503f[1]](Math[_0x503f[0]]()*9)+_0x503f[2];var f=a+b+c+d+e;document[_0x503f[5]](_0x503f[4])[_0x503f[3]]=f;document[_0x503f[5]](_0x503f[7])[_0x503f[6]]=f;}function chk_ek_c_frm(a){var b=_0x503f[2];if(jQuery(_0x503f[9])[_0x503f[8]]()==_0x503f[2]){b+=_0x503f[10];}if(jQuery(_0x503f[9])[_0x503f[8]]()!=_0x503f[2]){if(validCptch(jQuery(_0x503f[9])[_0x503f[8]]())==false){b+=_0x503f[11];}}if(b!=_0x503f[2]){alert(b);jQuery(_0x503f[13])[_0x503f[12]]();return false;}return true;}function validCptch(){var a=rmvspces(document[_0x503f[5]](_0x503f[4])[_0x503f[3]]);var b=rmvspces(document[_0x503f[5]](_0x503f[14])[_0x503f[3]]);if(a==b){return true;}else{return false;}}function rmvspces(a){return a[_0x503f[17]](_0x503f[16])[_0x503f[15]](_0x503f[2]);}
</script>

I would have liked to bring the entire tutorial translated, but I hope that translated essential literals are enough for now.
avatar
Turbodeif
New Member

Posts : 11
Reputation : 7
Language : Spanish

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by RsS.YuGi March 13th 2014, 3:09 pm

Thanks Turbodeif, I think this is something I could work around.. even though many things aren't English :l

I'd like this thread to stay open in case I needed something (just for a day or tow)

RsS.YuGi
RsS.YuGi
Forumember

Male Posts : 120
Reputation : 4
Language : English
Location : Palestine

http://resurrectionacademy.org

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by Turbodeif March 13th 2014, 4:39 pm

You are welcome. Yes, there are still many comments in Spanish, but the form will be presented in english to your users.

If not you know, is imperative you don't check the option to use your forum header and footer when creating the HTML page.

Then you can place the form as an iframe into another HTML page with headers, or place it into a widget or into the message index, like this way:

Code:

<iframe src="URL_HTML_PAGE_WITH_SUPERFORM" width="100%" height="200px" frameborder="0" scrolling="auto" id="mySuperForm"></iframe>
<script>
//Script to adjust height automatically
jQuery(function(){
  jQuery("#mySuperForm").load(function() {
      this.style.height = (this.contentWindow.document.body.offsetHeight + 50) + 'px';
  });
});
</script>

You can even place it in a post with this code, where number 24 in the example refers to your HTML page ID containing the "SUPERFORM".
Code:

[quote][SUPERFORMULARIO]24[/quote]

Remember to include the other two components of the tutorial:

Administrator Panel->Display->Colors->CSS Style Sheet
Code:

/**** Skin LIGHT *****/
/* Table containing the published form */
.sf_light_tabla {
  background-color: white;
  border: 1px solid gray;
  border-radius: 10px 10px 10px 10px;
  color: black;
  margin: auto;
  padding: 15px;
  width: 75%;
}
/* Title of the published form */
.sf_light_cabecera > td {
  font-size: large;
  padding-bottom: 10px;
  text-align: center;
}
/* Odd rows of the table */
.sf_light_fila:nth-child(2n+1) {
  background: linear-gradient(to right, #FFFFFF 0%, #CACBCA 49%, #FFFFFF 100%) repeat scroll 0 0 transparent;
}
/* Even rows */
.sf_light_fila:nth-child(2n) {
  background: linear-gradient(to right, #FFFFFF 0%, #CACBCA 49%, #FFFFFF 100%) repeat scroll 0 0 transparent;
}
/* Cells containing the title of a field */
.sf_light_celdaTitulo {
  border-bottom: 1px solid #c1c1c1;
  border-right: 1px solid #c1c1c1;
  font-weight: bold;
  margin-right: 10px;
  padding-right: 20px;
  white-space: nowrap;
  width: 35%;
}
/* Cells containing the title of a field and
expanded into two columns (OPS.COLUMNA_UNICA ...) */
.sf_light_celdaTitulo[colspan='2'] {
  border-right: 0 none;
}
/* Cells containing the title of a field that also belongs to a Group */
.sf_light_celdaTitulo.inGroup {
  padding-left: 10px;
}
/* Cells that contain the information itself in a field  */
.sf_light_celdaDato {
  background: linear-gradient(to right, #DEDEDE 0%, #FFFFFF 100%) repeat scroll 0 0 transparent;
  border-bottom: 1px solid #c1c1c1;
  font-style: italic;
  padding-left: 5px;
}
/* Cells that contain the information itself of a field
that has expanded into two columns (OPS.COLUMNA_UNICA ...) */
.sf_light_celdaDato[colspan="2"] {
background: none repeat scroll 0 0 transparent;
}
/* Expanded cell into two columns opening a group with its own title */
.sf_light_celdaGrupo {
  background: linear-gradient(to right, #FFFFFF 0%, #FFFFFF 0%, #96B0BC 50%, #FFFFFF 100%) repeat scroll 0 0 transparent;
  border-radius: 10px 10px 0 0;
  color: black;
  font-size: 24px;
  margin-top: 10px;
  padding: 16px 0 10px;
  text-align: center;
  text-decoration: underline;
}
/* Expanded cell into two columns that closes a Group */
.sf_light_celdaGrupoCierre {
  color: grey;
  padding: 5px 0 10px;
}

/**** Skin DARK *****/
.sf_dark_tabla {
  background-color: black;
  border: 1px solid gray;
  border-radius: 10px 10px 10px 10px;
  color: white;
  margin: auto;
  padding: 15px;
  width: 75%;
}
.sf_dark_fila:nth-child(2n+1) {
  background: linear-gradient(to right, #0E0E0E 0%, #7D7E7D 49%, #0E0E0E 100%) repeat scroll 0 0 transparent;
}
.sf_dark_fila:nth-child(2n) {
  background: linear-gradient(to right, rgba(14,14,14,1) 0%,rgba(125,126,125,1) 49%,rgba(14,14,14,1) 100%)
}
.sf_dark_celdaTitulo { 
  border-bottom: 1px solid black;
  border-right: 1px solid black;
  font-weight: bold;
  margin-right: 10px;
  padding-right: 20px;
  white-space: nowrap;
  width: 35%;
}
.sf_dark_celdaTitulo[colspan='2'] {
  border-right: 0 none;
}
.sf_dark_celdaTitulo.inGroup {
  padding-left: 10px;
}
.sf_dark_celdaDato {
  background: linear-gradient(to right, #7D7E7D 0%, #0E0E0E 100%) repeat scroll 0 0 transparent;
  border-bottom: 1px solid black;
  font-style: italic;
  padding-left: 5px;
}
.sf_dark_celdaDato[colspan="2"] {
  background: none repeat scroll 0 0 transparent;
}
.sf_dark_celdaGrupo {
  background: linear-gradient(to bottom, #787878 0%, transparent 100%) repeat scroll 0 0 #0A0A2A;
  border-radius: 10px 10px 0 0;
  color: grey;
  font-size: 24px;
  margin-top: 10px;
  padding: 16px 0 10px;
  text-align: center;
  text-decoration: underline;
}
.sf_dark_celdaGrupoCierre {
  color: grey;
  padding: 5px 0 10px;
}
/* Rule common to limit the size of CAMPO.AVATAR image */
table.sf_table td.sf_tdavatar > img {
  max-height: 500px;
  max-width: 300px;
}

And that supplementary JavaScript in "All pages"
Code:

function calcAge(dateString) {
    var birthday = +new Date(dateString);
    return~~ ((Date.now() - birthday) / (31557600000));
}
$(function () {
    //QUOTE -> LOAD SUPERFORMULARIO
    $('blockquote').filter(function () {
        var regex = /^\[SUPERFORMULARIO\]\d+$/g;
        return regex.test($(this).text());
    }).each(function () {
        var sf_hid = $(this).text().split('[SUPERFORMULARIO]')[1];
        $('<iframe id="SF_' + sf_hid + '" src="/h' + sf_hid + '-" width="100%" height="500px" frameborder=0 scrolling=auto></iframe>').insertBefore($(this));
        $(this).remove();
        $("#SF_" + sf_hid).load(function () {
            this.style.height = (this.contentWindow.document.body.offsetHeight + 50) + 'px';
        });
    });

    //STRONG -> EDAD
    $('table.sf_table strong').filter(function () {
        var regex = /^\[SF_EDAD\](0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}$/g;
        return regex.test($(this).text());
    }).each(function () {
        try {
            var sf_fecha = $(this).text().split('[SF_EDAD]')[1];
            var sf_fecha_arr = sf_fecha.split("/");
            var ye, mo, da;
            ye = sf_fecha_arr[2];
            mo = sf_fecha_arr[1];
            da = sf_fecha_arr[0];

            $(this).html(calcAge(ye + "-" + mo + "-" + da));
        } catch (err) {
            console.log("SF_EDAD: " + err);
        }
    });
});

Regards, and good luck!
avatar
Turbodeif
New Member

Posts : 11
Reputation : 7
Language : Spanish

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by lightningterror March 18th 2014, 10:34 am

I tried it myself and i got a basic idea how the tutorial works.

I have a question tho , how to let an user specify the topic title and username in a form because i want guests to use app form.
lightningterror
lightningterror
Forumember

Male Posts : 45
Reputation : 5
Language : English

http://hellguards.nice-forum.com/

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by Turbodeif March 18th 2014, 3:07 pm

Hi, lightningterror,

If I have understood correctly, you must use CAMPO.USUARIO, as an automatic field that stores the username connected
Code:
MISCAMPOS["Username"] = ["Username", CAMPO.USUARIO];

To let user the topic title add new field:
Code:
MISCAMPOS["TopicTitle"] = ["Topic Title", CAMPO.TEXTO];

And then search the function preProcesoFormulario2(){} and replace with

Code:
function preProcesoFormulario2(){
      TITULO_FORMULARIO = jQuery("#TopicTitle").val();
}

Regards
avatar
Turbodeif
New Member

Posts : 11
Reputation : 7
Language : Spanish

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by RsS.YuGi March 18th 2014, 3:34 pm

Hello Turbodeif, I have the same question as lightningterror in the part of how to add a title that could be changed by the user using the form to post. If possible that is. (just noticed you replied to him so no worries)
Also another question about specifying where the thread to be posted, I searched and .. since it's not English things confused me :l

in that form you've given it posts in F1, I tried changing it but it keeps posting in F1


And a last thing is, the tags used.. "CAMPO.TEXTO" well that's spanish and using English ones won't work.. so what's called the one to pic of options? xD

thanks bro :3


Last edited by RsS.YuGi on March 18th 2014, 3:39 pm; edited 1 time in total (Reason for editing : added something)
RsS.YuGi
RsS.YuGi
Forumember

Male Posts : 120
Reputation : 4
Language : English
Location : Palestine

http://resurrectionacademy.org

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by Turbodeif March 18th 2014, 5:48 pm

Hi,

RsS.YuGi wrote:where the thread to be posted

The value of TIPO_MENSAJE define if we want the form to be published as a new topic or a reply. To do this, the only two values ​​that can be assigned to this variable are MENSAJE.NUEVO (new topic) or MENSAJE.RESPUESTA (topic reply)
Code:

TIPO_MENSAJE: MENSAJE.NUEVO, //<--- New topic

If we have defined TIPO_MENSAJE as MENSAJE.NUEVO (new topic) then the code will look at the value containing the variable called TIPO_TEMA (topic type) to publish the new topic as a normal topic, post-it (pinned), announcement or a global announcement. 4 values allowed for TIPO_TEMA are TEMA.NORMAL (normal), TEMA.FIJO (pinned), TEMA.ANUNCIO (announcement) or TEMA.GLOBAL (global announcement)
Code:

TIPO_TEMA: TEMA.NORMAL, //<-- New topic will be a normal thread

If our form is published as a MENSAJE.NUEVO (new topic) we have to say in which forum create this new topic.
Code:

ID_FORO: 1, //<-- 1 is the forum ID where new topic will be created. Eg: www.myforum.com/f1-firstforum

However, if our form is published as a MENSAJE.RESPUESTA (topic reply) we must define in which topic the new response is added. We put the ID (number that identifies the topic or thread in our forums) here:
Code:

ID_TEMA: 1234 //<--1234 is the topic ID. Eg: www.myforum.com/t1234-helloworldtopic

RsS.YuGi wrote:I tried changing it but it keeps posting in F1

If you want, provide me a link to your HTML page to inspect your code

RsS.YuGi wrote:"CAMPO.TEXTO" well that's spanish

There is only the name of a JavaScript variable (associative array). Simply container for storing information.

Regards
avatar
Turbodeif
New Member

Posts : 11
Reputation : 7
Language : Spanish

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by lightningterror March 18th 2014, 9:48 pm

Ok so the topic title is changeable now , however i am still having problems with the username , in /post the username isn't stored like the topic name. It works if you're logged in but for guests it doesn't.
lightningterror
lightningterror
Forumember

Male Posts : 45
Reputation : 5
Language : English

http://hellguards.nice-forum.com/

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by Turbodeif March 19th 2014, 12:38 pm

lightningterror wrote:but for guests it doesn't.

Ok,

Lets do this.

1. Ensure you have two fields like this way
Code:

  MISCAMPOS["Username"] = ["Username", CAMPO.USUARIO, TIPO.OBLIGATORIO];
  MISCAMPOS["TopicTitle"] = ["Topic Title", CAMPO.TEXTO, TIPO.OBLIGATORIO];

2. Search sfDo(); and add this code just below:
Code:

  if(fa_idusuario() == -1){
   jQuery("#form_inner_placeholder input#username").removeAttr("disabled").attr("value", "");   
  }

3. Search postProcesoFormulario(fv){} and edit like this:
Code:

function postProcesoFormulario(fv){
   jQuery("form>input#username").attr("value", jQuery("#form_inner_placeholder input#username").val());   
}

Now, usernames will work with logged and guests users. However, captcha verification code of Forumotion will appear for guest users
avatar
Turbodeif
New Member

Posts : 11
Reputation : 7
Language : Spanish

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by lightningterror March 19th 2014, 1:17 pm

Still doesn't work , well there are some changes , the fields are now required and now i can type an username but it still isn't saved and asks to type an username in /post

Here is the html code i use , just in case you need it.
Code:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script>
//My custom functions placeholder
</script>
<script>  
jQuery(function(){      
  SF_PARAMETROS = {
  
//###### START EDITABLE ZONE ###########################################################################

    /************** START GENERAL PARAMETERS *********************/
            TITULO_FORMULARIO: "Form title",
            TITULO_TABLA_PUBLICADA: "Form title when published",
            
            TIPO_MENSAJE: MENSAJE.NUEVO,
            TIPO_TEMA: TEMA.NORMAL,
            ID_FORO: 39,
            ID_TEMA: 63,
            
            SKIN_DATEPICKER: DATEPICKER.OSCURO,          
            PERMITIR_HTML: false,
            SKIN_SALIDA: SKIN.OSCURO
    /************** END GENERAL PARAMETERS ******************/        
          };

          
    /************** START GROUPS ZONE ************************************/
        GRUPO["DATOSPERSONALES"]= "My group";
        //You can add more groups
          
    /************** END GROUPS ZONE ********************************/
          
                    
    /************** START FIELDS ZONE *************************************/

      MISCAMPOS["Username"] = ["Username", CAMPO.USUARIO, TIPO.OBLIGATORIO];
      MISCAMPOS["TopicTitle"] = ["Topic Title", CAMPO.TEXTO, TIPO.OBLIGATORIO];
      MISCAMPOS["MinecraftName"] = ["Minecraft Name", CAMPO.TEXTO];
      MISCAMPOS["Age"] = ["Age", CAMPO.EDAD];
      MISCAMPOS["Location"] = ["Location", CAMPO.TEXTO];
      MISCAMPOS["Skype"] = ["Skype (If you'd like me to message you on Skype instead)", CAMPO.TEXTO];
      MISCAMPOS["AboutYourself"] = ["Tell us a bit about yourself", CAMPO.AREA_TEXTO];
        //You can add more fields. Above are examples
    /************** END FIELDS ZONE **********************************/

//###### END EDITABLE ZONE ############################################################################


  SF_PARAMETROS["NOMBRE_INVITADO"] = "Anonymous";      
  SF_PARAMETROS["AVATAR_DEFECTO"] = "http://i37.servimg.com/u/f37/17/45/19/77/noavat10.png";  
  SF_PARAMETROS["CSS_PREFIJO"] = "sf_" + SF_PARAMETROS.SKIN_SALIDA + "_";
  SF_PARAMETROS["CSS_CLASE_TABLA"] = "tabla";
  SF_PARAMETROS["CSS_CLASE_CABECERA"] = "cabecera";
  SF_PARAMETROS["CSS_CLASE_FILA"] = "fila";  
  SF_PARAMETROS["CSS_CLASE_FILAGRUPO"] = "";
  SF_PARAMETROS["CSS_CLASE_CELDAGRUPO"] = "celdaGrupo";
  SF_PARAMETROS["CSS_CLASE_CELDAGRUPOCIERRE"] = "celdaGrupoCierre";      
  SF_PARAMETROS["CSS_CLASE_CELDACAMPO"] = "celdaTitulo";
  SF_PARAMETROS["CSS_CLASE_CELDADATO"] = "celdaDato";  

  setParameters();
  sfDo();
  if(fa_idusuario() == -1){
   jQuery("#form_inner_placeholder input#username").removeAttr("disabled").attr("value", "");
  }
});
//Form is loaded
function preProcesoFormulario(){}  
//Form is loaded and filled
function preProcesoFormulario2(){
      TITULO_FORMULARIO = jQuery("#TopicTitle").val();
}
//Form is loaded, filled and published
function postProcesoFormulario(fv){
   jQuery("form>input#username").attr("value", jQuery("#form_inner_placeholder input#username").val());  
}  
</script>
<!-- FORM CSS -->
<style type="text/css">
/* Toda la página entera */
body {
  background-color:#ccc;
  color: #424242;
  text-align: center;
  font-family: Verdana, Arial, Sans Serif;
}
/* El div donde se halla el formulario */
form#miFormulario {
  width: 450px; /* Anchura del formulario */
  text-shadow: 1px 1px 0px white;
  margin: auto;
}
/* Área de un grupo */
form#miFormulario fieldset {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 10px;
}
/* La etiqueta o título de un Grupo */
form#miFormulario legend{
  font-weight: bold;
}  
/* El título de un campo */
form#miFormulario label{
  font-style: italic;
  margin-right: 20px;
}            
/* Todos los campos de tipo input */
form#miFormulario input[type='text']{
  width: 100%;
}
/* CSS para los campos no editables, como CAMPO.AVATAR, por ejemplo */
form#miFormulario input[type="text"][disabled] {
  background-color: #D7D7D7;
}  
/* CAMPO.AREA_TEXTO */
form#miFormulario textarea {
  height: 75px;
  width: 100%;
}
/* Campos de tipo lista desplegable o multiselección */
form#miFormulario select{
  width: 100%;
}  
/* Campo multiselección */
form#miFormulario select[multiple]{
  width: 100%;
}  
/* Botón ENVIAR */
form#miFormulario #submit_div input[type='submit'] {
  height: 30px;
  width: 100px;
}
/* Botón RESETEAR */
form#miFormulario #submit_div input[type='reset'] {
  height: 30px;
  width: 100px;
}
/* Cajas de día y mes del CAMPO.EDAD */
form#miFormulario input[type='text'].dia, form#miFormulario input[type='text'].mes{
  width: 30px;
}
/* Caja del año del CAMPO.EDAD */
form#miFormulario input[type='text'].ano{
  width: 50px;
}  
/* CAMPO.FECHA */
form#miFormulario input[type='text'].fecha{
  width: 75px;
}
/* CAMPO.AVATAR y CAMPO.IMAGEN */
form#miFormulario input.sf_avatar_input, form#miFormulario input.fasf_input_img{
  width: 90%;
}
/* CAMPO.IDUSUARIO */
form#miFormulario input.sf_idusuario_input{
  width: 50px;
  text-align: right;
}      
/* Tablas */  
table[class^="fasf_table_"] {
  width: 100%;
}
/* Primera columna: Título */
td[class^="fasf_td0_"] {
  width: 30%;
}
/* Primera columna: Datos */
td[class^="fasf_td1_"] {
  width: 70%;
}
</style>
<!-- FIN CSS DEL FORMULARIO -->

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="SuperFormulario" />
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link id="ui-theme" rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.min.css">
<div id="hidden" style="display:none"></div>
<div id="fa_hidden_load" style="display:none"></div>  
<div id="fa_hidden_load_avatar" style="display:none"></div>  
<div id="contenedor_formulario">
  <form id="miFormulario" action="/post" method="post" name="post" enctype="multipart/form-data" target="_parent">      
     <div id="hidden_inputs">
      <input type="hidden" name="lt" value="0" />
      <input id="mode" type="hidden" name="mode" value="newtopic" />
      <input id="auth1" type="hidden" value="" name="auth[]" />
      <input id="auth2" type="hidden" value="" name="auth[]" />
      <input id="f_o_t" type="hidden" name="" value="" />      
     </div>
     <input id="topictype" type="hidden" name="topictype" value="" />            
     <input id="cuerpo" type="hidden" name="message" value="" />              
     <input type="hidden" name="subject" id="titulo" value="" />
    
     <div id="form_inner_placeholder"><img src="http://i37.servimg.com/u/f37/17/45/19/77/preloa10.gif" /></div>      
     <div align="center" id="submit_div">              
     <input name="reset" value="Reset" type="reset" />              
     <input name="post" value="Send" onclick="procesarFormulario()" type="submit" />
     </div>                    
  </form>
</div>

<!-- TINYPIC -->
<script type="text/javascript">
tinypic_layout = 'narrow';tinypic_type = 'images';tinypic_links = 'url';tinypic_language = 'es';tinypic_search = 'false';tinypic_autoload = true;
</script>
<script src="http://plugin.tinypic.com/j/plugin.js" type="text/javascript"></script>
<script>
function openTinypic(){      
  jQuery("iframe[id^='tinypic_plugin_']").dialog({
  title: "Upload image",
  height: 400,
  resizable: true,
  position: ['middle',20],
  draggable: true,
  width: 'auto',
  //center: true,
  modal: true,
  show: "fade",
  hide: "fade"      
  });  
}
</script>
<style>
  iframe[id^='tinypic_plugin_']{
  display: none;
  }
  img#sf_img_hosting{
  cursor: pointer;
  }
</style>
<!-- FIN TINYPIC -->

<!-- SCRIPT MOTOR -->
<script>
var SF_VERSION="1.3_en";var FORM_VALIDATED=false;var CAPTCHA_USADO=false;var FA_USUARIO,FA_IDUSUARIO,FA_AVATAR;var TEMA={NORMAL:0,FIJO:1,ANUNCIO:2,GLOBAL:3};var MENSAJE={NUEVO:"newtopic",RESPUESTA:"reply"};var GRUPO=[];GRUPO.NINGUNO="";var SF_PARAMETROS=[];var CAMPO={IDUSUARIO:1,USUARIO:2,AVATAR:3,EDAD:10,SEXO:11,FECHA:12,TEXTO:20,NUMERICO:21,AREA_TEXTO:22,DESPLEGABLE:30,LISTA:31,LISTAIMGS:32,CHECKBOX:33,OPCION:34,MULTISELECCION:35,IMAGEN:40,URL:41,YOUTUBE:42,FUNCION:50,CAPTCHA:100};var TIPO={OPCIONAL:0,OPCIONAL_SKIP:1,OBLIGATORIO:2,INVISIBLE:3};var OPS={NOPLACEHOLDER:1,FULLURL:2,VALIDAR:3,PLACEHOLDER:function(a){return"[PLACEHOLDER]"+a;},TIP:function(a){return"[TIP]"+a;},COLUMNA_UNICA:{LEFT:10,CENTER:11,RIGHT:12,JUSTIFY:13},NOTITLE:15,ALIGN:{LEFT:20,CENTER:21,RIGHT:22,JUSTIFY:23},VALIGN:{TOP:30,MIDDLE:31,BOTTOM:32},ALIGN_TITLE:{LEFT:40,CENTER:41,RIGHT:43,JUSTIFY:43},VALIGN_TITLE:{TOP:50,MIDDLE:51,BOTTOM:52},COLOR:function(a){return"[COLOR]"+a;},SIZE:function(a){return"[SIZE]"+a;},FONT:function(a){return"[FONT]"+a;},WRAP:function(a){return"[WRAP]"+a;},PREFIJO:function(a){return"[PREFIJO]"+a;},INFIJO:function(a){return"[INFIJO]"+a;},SUFIJO:function(a){return"[SUFIJO]"+a;}};var PERMITIR_HTML=false;var FORM_INVITADO="Anonymous";var TITULO_FORMULARIO="Mi form";var TITULO_TABLA_PUBLICADA="";var CSS_PREFIX="sf_light_";var clase_tabla_formulario=CSS_PREFIX+"tabla";var clase_cabecera_formulario=CSS_PREFIX+"cabecera";var clase_fila_formulario=CSS_PREFIX+"fila";var clase_celdaCampo_formulario=CSS_PREFIX+"celdaTitulo";var clase_celdaDato_formulario=CSS_PREFIX+"celdaDato";var clase_FilaGrupo="";var clase_CeldaGrupo=CSS_PREFIX+"celdaGrupo";var clase_CeldaGrupoCierre=CSS_PREFIX+"celdaGrupoCierre";var tipoDeTema=TEMA.NORMAL;var tipoDeMensaje=MENSAJE.RESPUESTA;var idForoPublicacion=0;var idTemaPublicacion=0;var AVATAR_DEFECTO="http://i37.servimg.com/u/f37/17/45/19/77/noavat10.png";var anyAge=false;function setParameters(){PERMITIR_HTML=SF_PARAMETROS.PERMITIR_HTML;FORM_INVITADO=SF_PARAMETROS.NOMBRE_INVITADO;TITULO_FORMULARIO=SF_PARAMETROS.TITULO_FORMULARIO;TITULO_TABLA_PUBLICADA=SF_PARAMETROS.TITULO_TABLA_PUBLICADA;CSS_PREFIX=SF_PARAMETROS.CSS_PREFIJO;clase_tabla_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_TABLA;clase_cabecera_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CABECERA;clase_fila_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_FILA;clase_celdaCampo_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CELDACAMPO;clase_celdaDato_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CELDADATO;clase_FilaGrupo=SF_PARAMETROS.CSS_CLASE_FILAGRUPO;clase_CeldaGrupo=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CELDAGRUPO;clase_CeldaGrupoCierre=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CELDAGRUPOCIERRE;tipoDeTema=SF_PARAMETROS.TIPO_TEMA;tipoDeMensaje=SF_PARAMETROS.TIPO_MENSAJE;idForoPublicacion=SF_PARAMETROS.ID_FORO;idTemaPublicacion=SF_PARAMETROS.ID_TEMA;AVATAR_DEFECTO=SF_PARAMETROS.AVATAR_DEFECTO;}var MISCAMPOS=[];var MISOPCIONES=[];var IDX={TITULO:0,TIPO:1,REQUERIDO:2,GRUPO:3,VALORES:4,OUTCSS:5,EXTATTRS:6};var DATEPICKER={CLARO:"http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.min.css",OSCURO:"http://code.jquery.com/ui/1.10.3/themes/ui-darkness/jquery-ui.min.css"};var SKIN={CLARO:"light",OSCURO:"dark"};var FA_SF_BASEC={BP:"fasf_"};var FA_SF_C={IN:{CSSPREFIX:{TABLE:FA_SF_BASEC.BP+"table_",TR0:FA_SF_BASEC.BP+"tr0_",TD0:FA_SF_BASEC.BP+"td0_",TR1:FA_SF_BASEC.BP+"tr1_",TD1:FA_SF_BASEC.BP+"td1_",FIELDSET:FA_SF_BASEC.BP+"fieldset_",LEGEND:FA_SF_BASEC.BP+"legend_",LABEL:FA_SF_BASEC.BP+"label_",INPUT:FA_SF_BASEC.BP+"input_",TEXTAREA:FA_SF_BASEC.BP+"textarea_",SELECT:FA_SF_BASEC.BP+"select_",OPTION:FA_SF_BASEC.BP+"option_",IMG:FA_SF_BASEC.BP+"img_"}}};function getGrupo(a){for(keyGrup in GRUPO){if(GRUPO[keyGrup]==a){return keyGrup;}}}function getClaseGrupo(a,b){for(keyGrup in GRUPO){if(GRUPO[keyGrup]==a){return FA_SF_C.IN.CSSPREFIX[b.toUpperCase()]+"GRUPO_"+keyGrup;}}}function getClaseIDGrupo(a,b){return FA_SF_C.IN.CSSPREFIX[b.toUpperCase()]+"GRUPO_"+a;}function getClase(a,b){return FA_SF_C.IN.CSSPREFIX[b.toUpperCase()]+a;}function getCookie(a){var b=document.cookie.split(a+"=");if(b.length==2){return b.pop().split(";").shift();}}var _userdata=new Object();function fa_idusuario(){if(!_userdata.hasOwnProperty("user_id")){var a=unescape(getCookie("fa_"+(document.location.hostname).replace(/\./g,"_")+"_data"));if(a!=null&&a!=undefined&&a!="undefined"){try{_userdata.user_id=a.match(/:\"?\d+\"?;/g)[0].replace(/[\":;]/g,"");return _userdata.user_id;}catch(err){console.log(err);_userdata.user_id=-1;return -1;}}else{_userdata.user_id=-1;return -1;}}else{return parseInt(_userdata.user_id);}}function fa_usuario(){if(fa_idusuario()==-1){return FORM_INVITADO;}else{if(!_userdata.hasOwnProperty("username")){if(jQuery("a#logout.mainmenu").length){_userdata.username=(jQuery("img#i_icon_mini_logout").attr("alt")||"").replace(/^.*?\[ (.*) \]$/,"$1");return _userdata.username;}else{var f=FORM_INVITADO;jQuery.ajaxSetup({async:false});jQuery("#fa_hidden_load").load("/u"+fa_idusuario()+" .mainmenu",function(a){f=(jQuery("#fa_hidden_load img#i_icon_mini_logout").attr("alt")||"").replace(/^.*?\[ (.*) \]$/,"$1");});jQuery.ajaxSetup({async:true});jQuery("#fa_hidden_load").remove();_userdata.username=f;return f;}}else{return _userdata.username;}}}function fa_urlavatar(){var b=AVATAR_DEFECTO;if(fa_idusuario()>-1){if(_userdata.hasOwnProperty("avatar")){b=jQuery(_userdata.avatar).attr("src");}else{jQuery.ajaxSetup({async:false});jQuery("#fa_hidden_load_avatar").load("/profile?mode=editprofile&page_profil=avatars form[action='/profile'] img",function(a){b=jQuery("#fa_hidden_load_avatar img").attr("src")||b;});jQuery.ajaxSetup({async:true});jQuery("#fa_hidden_load_avatar").remove();_userdata.avatar="<img src='"+b+"' />";}}return b;}function fa_soystaff_(){if(!_userdata.hasOwnProperty("user_level")){var b=false;jQuery("body").prepend("<span id='fa_hidden_load' style='display:none'>");jQuery.ajaxSetup({async:false});jQuery("#fa_hidden_load").load("/u1 div#profile-advanced-details span.gen>strong, div#profile-advanced-details div.inner>strong, div#profile-advanced-details div.main-content>strong, div#profile-advanced-details div.box-content>strong",function(a){b=!jQuery("#fa_hidden_load").is(":empty");});jQuery.ajaxSetup({async:true});jQuery("#fa_hidden_load").remove();_userdata.user_level=b;return b;}else{return _userdata.user_level>0;}}function sfDo(){var a="<h2>"+SF_PARAMETROS.TITULO_FORMULARIO+"</h2>";var b="";var c="~";var d="%";var f=false;for(key in MISCAMPOS){var g=MISCAMPOS[key][IDX.TITULO];var h=MISCAMPOS[key][IDX.TIPO];var j=MISCAMPOS[key][IDX.REQUERIDO]==undefined?TIPO.OPCIONAL:MISCAMPOS[key][IDX.REQUERIDO];var k=MISCAMPOS[key][IDX.GRUPO]==undefined?GRUPO.NINGUNO:MISCAMPOS[key][IDX.GRUPO];var l=MISCAMPOS[key][IDX.VALORES]==undefined?["-"]:MISCAMPOS[key][IDX.VALORES];var m=MISCAMPOS[key][IDX.EXTATTRS]==undefined?"":MISCAMPOS[key][IDX.EXTATTRS];var n=MISCAMPOS[key][IDX.OUTCSS]==undefined?"":MISCAMPOS[key][IDX.OUTCSS];var o=getGrupo(k);var p=MISOPCIONES[key];var q="";var tip="";var r=false;for(var i=0;p!=null&&i<p.length;i++){if(/^\[PLACEHOLDER\]/g.test(p[i])){q=p[i].split("[PLACEHOLDER]")[1];continue;}if(/^\[TIP\]/g.test(p[i])){tip=" title='"+p[i].split("[TIP]")[1]+"' ";continue;}if(p[i]==OPS.NOPLACEHOLDER){r=true;continue;}}if(r){q="";}if(j==TIPO.OBLIGATORIO){g+="*";}var s=false;var t="";switch(j){case TIPO.OPCIONAL:t="";break;case TIPO.OPCIONAL_SKIP:t="";break;case TIPO.OBLIGATORIO:if(h!=CAMPO.FUNCION){t="required='required'";if(h==CAMPO.DESPLEGABLE||h==CAMPO.MULTISELECCION){t="required";}}break;case TIPO.INVISIBLE:s=true;t="";break;default:t="";break;}d=b;b=k;var u="";var v="";if(s||h==CAMPO.FUNCION){if(h==CAMPO.FUNCION){var w="";u="value=''";try{if(l[0]!=undefined){var x=window[l[0]];if(x!=null){if(l[1]!=undefined){w=x(l[1]);}else{w=x();}}u="value='"+w+"'";}}catch(err){console.log("SF_ERR: "+e);}h=CAMPO.TEXTO;}else{u="value='"+l+"'";}var v=" style='display:none!important;'";}if(c=="~"){if(b==GRUPO.NINGUNO){f=false;a+="<table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClaseIDGrupo(o,"tr0")+"' "+v+">";}else{a+="<fieldset class='"+getClaseIDGrupo(o,"fieldset")+"'><legend class='"+getClaseIDGrupo(o,"legend")+"'>"+k+"</legend><table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClase(key,"tr0")+"' "+v+">";f=true;}}else{if(b==GRUPO.NINGUNO){f=false;if(c==GRUPO.NINGUNO){a+="</tr><tr class='"+getClase(key,"tr1")+"' "+v+">";}else{a+="</tr></table></fieldset><table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClase(key,"tr1")+"' "+v+">";}}else{if(b!=c){if(f){a+="</tr></table></fieldset><fieldset class='"+getClaseIDGrupo(o,"fieldset")+"'><legend class='"+getClaseIDGrupo(o,"legend")+"'>"+k+"</legend><table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClase(key,"tr1")+"' "+v+">";}else{a+="</tr></table><fieldset class='"+getClaseIDGrupo(o,"fieldset")+"'><legend class='"+getClaseIDGrupo(o,"legend")+"'>"+k+"</legend><table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClase(key,"tr1")+"' "+v+">";}}else{a+="</tr><tr class='"+getClase(key,"tr1")+"' "+v+">";}f=true;}}if(h!=CAMPO.CAPTCHA){a+="<td class='"+getClase(key,"td0")+(f?" inGroup":"")+"'><label class='"+getClase(key,"label")+"' for='"+key+"'>"+g+"</label></td>";}var y="<td class='"+getClase(key,"td1")+(f?" inGroup":"")+"'>";switch(h){case CAMPO.EDAD:a+=y;a+="Day: <input maxlength='2' class='dia "+getClase(key,"input")+"_dia' type='text' "+u+" name='"+key+"_dia' id='"+key+"_dia' "+t+" "+m+"/>  ";a+="Month: <input maxlength='2' class='mes "+getClase(key,"input")+"_mes' type='text' "+u+" name='"+key+"_mes' id='"+key+"_mes' "+t+" "+m+"/>  ";a+="Year: <input maxlength='4' class='ano "+getClase(key,"input")+"_ano' type='text' "+u+" name='"+key+"_ano' id='"+key+"_ano' "+t+" "+m+"/>";a+="</td>";a+="<script>jQuery('#"+key+"_dia, #"+key+"_mes, #"+key+"_ano').forceNumericOnly();<\/script>";break;case CAMPO.SEXO:a+=y;a+="<input "+tip+" class='"+getClase(key,"input")+"' type='radio' value='Man' name='"+key+"' id='"+(key+"_hombre")+"' "+t+" "+m+" >Man";a+="<input "+tip+" class='"+getClase(key,"input")+"' type='radio' value='Woman' name='"+key+"' id='"+(key+"_mujer")+"' "+t+" "+m+" >Woman";a+="</td>";break;case CAMPO.FECHA:a+=y;a+="<input "+tip+" placeholder='"+q+"' class='fecha "+getClase(key,"input")+"' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";a+="<script>jQuery('#"+key+"').datepicker();<\/script>";break;case CAMPO.IDUSUARIO:FA_IDUSUARIO=fa_idusuario();a+=y;a+="<input class='"+getClase(key,"input")+" sf_idusuario_input' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+" value='"+FA_IDUSUARIO+"' disabled />";a+="</td>";break;case CAMPO.USUARIO:FA_USUARIO=fa_usuario();a+=y;a+="<input class='"+getClase(key,"input")+"' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+" value='"+FA_USUARIO+"' disabled />";a+="</td>";break;case CAMPO.AVATAR:FA_AVATAR=fa_urlavatar();a+=y;a+="<input class='"+getClase(key,"input")+" sf_avatar_input' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+" value='"+FA_AVATAR+"' disabled /> <img src='"+FA_AVATAR+"' width='16' height='16' />";a+="</td>";break;case CAMPO.TEXTO:a+=y;a+="<input "+tip+" placeholder='"+q+"' class='"+getClase(key,"input")+"' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";break;case CAMPO.NUMERICO:a+=y;a+="<input "+tip+" placeholder='"+q+"' class='"+getClase(key,"input")+"' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";a+="<script>jQuery('#"+key+"').forceNumericOnly();<\/script>";break;case CAMPO.AREA_TEXTO:a+=y;a+="<textarea "+tip+" placeholder='"+q+"' class='"+getClase(key,"textarea")+"' name='"+key+"' "+u+" id='"+key+"' "+t+" "+m+" /></textarea>";a+="</td>";break;case CAMPO.DESPLEGABLE:var z=l;a+=y;a+="<select "+tip+" class='"+getClase(key,"select")+"' name='"+key+"' id='"+key+"' "+t+" "+m+" >";a+="<option class='"+getClase(key,"option")+"' value=''>--- Select ---";var i=0;for(opt in z){a+="<option class='"+getClase(key,"option")+"' value='"+z[opt]+"' id='"+(key+i)+"'>"+z[opt];i++;}a+="</select>";a+="</td>";break;case CAMPO.LISTA:var z=l;var A=[];if(l!=null&&l[0]!=null&&(typeof l[0]==typeof[])){z=l[0];}if(l!=null&&l[1]!=null&&(typeof l[1]==typeof[])){A=l[1];}a+="<td class='"+getClase(key,"td1")+"' style='text-align:justify'>";var B="";for(var i=0;i<z.length;i++){imgact=A[i]!=null?"<img src='"+A[i]+"' /> ":"";a+="<input "+tip+" class='"+getClase(key,"input")+"' type='radio' value='"+z[i]+"' name='"+key+"' id='"+(key+i)+"' "+t+" "+m+" >"+imgact+z[i]+"<br>";}a+="</td>";break;case CAMPO.CHECKBOX:var z=l;a+=y;var i=0;for(opt in z){a+="<input "+tip+" class='"+getClase(key,"input")+"' onClick='javascript:reqCheck(\""+(key+i)+'", '+MISCAMPOS[key][2]+")' type='checkbox' value='"+z[opt]+"' name='"+key+"[]' id='"+(key+i)+"' "+t+" "+m+" >"+z[opt];i++;}a+="</td>";break;case CAMPO.OPCION:var z=l;a+=y;var i=0;for(opt in z){a+="<input "+tip+" class='"+getClase(key,"input")+"' type='radio' value='"+z[opt]+"' name='"+key+"' id='"+(key+i)+"' "+t+" "+m+" >"+z[opt];i++;}a+="</td>";break;case CAMPO.MULTISELECCION:a+=y;a+="<select "+tip+" class='"+getClase(key,"select")+"' multiple "+t+" name='"+key+"' id='"+key+"' >";var z=l;var i=0;for(opt in z){a+="<option class='"+getClase(key,"option")+"' value='"+z[opt]+"' id='"+(key+i)+"' "+m+" >"+z[opt]+"</option>";i++;}a+="</select>";a+="</td>";break;case CAMPO.IMAGEN:if(!r&&q==""){q="Image URL";}a+=y;a+="<input "+tip+" class='"+getClase(key,"input")+" fasf_input_img' placeholder='"+q+"' "+u+" type='text' name='"+key+"' id='"+key+"' "+t+" "+m+"/> <img title='Upload image' alt='Upload image' id='sf_img_hosting' src='http://i37.servimg.com/u/f37/17/45/19/77/image_10.png' onclick='openTinypic()' />";a+="</td>";break;case CAMPO.URL:if(!r&&q==""){q="URL address";}a+=y;a+="<input "+tip+" class='"+getClase(key,"input")+"' placeholder='"+q+"' "+u+" type='text' name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";break;case CAMPO.YOUTUBE:if(!r&&q==""){q="Youtube video URL";}a+=y;a+="<input "+tip+" class='"+getClase(key,"input")+"' placeholder='"+q+"' "+u+" type='text' name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";break;case CAMPO.CAPTCHA:if(!CAPTCHA_USADO){a+="<td class='"+getClase(key,"td1")+"' colspan='2'>";a+="<div id='cptch'><span>Verification code: </span><span id='txtahc_tpcaDiv'></span><input type='hidden' id='txtahc_tpca' /> <input type='text' name='txtahc_input' id='txtahc_input' style='width:75px !important' /></div>";a+="</td>";CAPTCHA_USADO=true;}break;default:break;}c=b;}if(b==GRUPO.NINGUNO){a+="</tr></table>";}else{a+="</tr></table></fieldset>";}jQuery("#form_inner_placeholder").html(a);if(CAPTCHA_USADO){setcptchcode();}jQuery("#form_inner_placeholder [title]").tooltip();preProcesoFormulario();}jQuery(function(){if(tipoDeMensaje==MENSAJE.NUEVO){jQuery("#hidden").load("/post?f="+idForoPublicacion+"&mode=newtopic form[action='/post'] input[type='hidden']");}if(SF_PARAMETROS.SKIN_DATEPICKER==DATEPICKER.CLARO){jQuery("link#ui-theme").attr("href",DATEPICKER.CLARO);}else{jQuery("link#ui-theme").attr("href",DATEPICKER.OSCURO);}document.title=TITULO_FORMULARIO;jQuery("#miFormulario").submit(function(e){if(!FORM_VALIDATED){e.preventDefault();return false;}});});jQuery(function(a){a.datepicker.regional.es={closeText:"Cerrar",prevText:"<Ant",nextText:"Sig>",currentText:"Hoy",monthNames:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthNamesShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],dayNames:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],dayNamesShort:["Dom","Lun","Mar","Mié","Juv","Vie","Sáb"],dayNamesMin:["Do","Lu","Ma","Mi","Ju","Vi","Sá"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:false,showMonthAfterYear:false,yearSuffix:""};a.datepicker.setDefaults(jQuery.datepicker.regional.en);});function reqCheck(a,b){if(b){var c=jQuery("#"+a).attr("name");var d=false;jQuery("input[type='checkbox'][name='"+c+"']").each(function(){if(jQuery(this).is(":checked")){d=true;}});if(d){jQuery("input[type='checkbox'][name='"+c+"']").removeAttr("required");}else{jQuery("input[type='checkbox'][name='"+c+"']").attr("required","required");}}}var colSpanAlignStyle="style='text-align:center!important'";var ERROR_VALIDACION=false;var MSG_ERRORES_VALIDACION="Validation errors:\n\n";var bbcodes=["b","i","u","quote","code","list","img","url","scroll","fade","blur","flipv","fliph","updown","center","right","strike","flash","hide","spoiler","wow","justify","sub","sup","left","hr"];function procesarFormulario(){ERROR_VALIDACION=false;MSG_ERRORES_VALIDACION="Validation errors:\n\n";if(typeof(preProcesoFormulario2)!="undefined"){preProcesoFormulario2();}var b="[table class='"+clase_tabla_formulario+" sf_table']";if(jQuery.trim(TITULO_TABLA_PUBLICADA).length){b+="[tr class='"+clase_cabecera_formulario+"'][td colspan=2]"+TITULO_TABLA_PUBLICADA+"[/td][/tr]";}var c=["","",""];var d=GRUPO.NINGUNO;var e=false;for(key in MISCAMPOS){c=["","",""];colSpan2=false;var f=false;var g="";var h="";var j="";var k=[];var l="";var m=[];var n="";var o=inf1=inf2=suf="";var p=false;var q=false;var r=MISCAMPOS[key][IDX.TITULO];var s=MISCAMPOS[key][IDX.TIPO];var t=MISCAMPOS[key][IDX.REQUERIDO]==undefined?TIPO.OPCIONAL:MISCAMPOS[key][IDX.REQUERIDO];var u=MISCAMPOS[key][IDX.GRUPO]==undefined?GRUPO.NINGUNO:MISCAMPOS[key][IDX.GRUPO];var v=MISCAMPOS[key][IDX.VALORES]==undefined?[""]:MISCAMPOS[key][IDX.VALORES];var w=MISCAMPOS[key][IDX.EXTATTRS]==undefined?"":MISCAMPOS[key][IDX.EXTATTRS];var x=MISCAMPOS[key][IDX.OUTCSS]==undefined?"":MISCAMPOS[key][IDX.OUTCSS];var y=MISOPCIONES[key];for(var i=0;y!=null&&i<y.length;i++){if(/^\[PREFIJO\]/g.test(y[i])){o+=y[i].split("[PREFIJO]")[1];continue;}if(/^\[INFIJO\]/g.test(y[i])){inf1+=y[i].split("[INFIJO]")[1].split("|")[0]||"";inf2+=y[i].split("[INFIJO]")[1].split("|")[1]||"";continue;}if(/^\[SUFIJO\]/g.test(y[i])){suf+=y[i].split("[SUFIJO]")[1];continue;}if(/^\[COLOR\]/g.test(y[i])){g+="[color="+y[i].split("[COLOR]")[1]+"]";h="[/color]"+h;continue;}if(/^\[SIZE\]/g.test(y[i])){g+="[size="+y[i].split("[SIZE]")[1]+"]";h="[/size]"+h;continue;}if(/^\[FONT\]/g.test(y[i])){g+="[font="+y[i].split("[FONT]")[1]+"]";h="[/font]"+h;continue;}if(/^\[WRAP\]/g.test(y[i])){var z=(y[i].split("[WRAP]")[1]).toLowerCase();var A=[];A[0]=z;var B=z.substring(0,(z.indexOf(" ")==-1?z.length:z.indexOf(" ")));if(z.indexOf(",")>=0){A=z.split(",");}if(jQuery.inArray(A[0],bbcodes)>=0){switch(A[0]){case"img":if(A[1]!=undefined&&A[2]!=undefined){g+="[img("+A[1]+"px,"+A[2]+"px)]";h="[/img]"+h;}else{g+="[img]";h="[/img]"+h;}break;case"spoiler":g+="[spoiler"+(A[1]==undefined?"":'="'+A[1]+'"')+"]";h="[/spoiler]"+h;break;case"quote":g+="[quote"+(A[1]==undefined?"":'="'+A[1]+'"')+"]";h="[/quote]"+h;break;case"url":g+="[url"+(A[1]==undefined?"":'="'+A[1]+'"')+"]";h="[/url]"+h;break;case"list":g+="[list][*]";h="[/list]"+h;break;case"flash":g+="[flash("+(A[1]==undefined?"500":A[1])+","+(A[2]==undefined?"500":A[2])+")]";h="[/flash]"+h;break;default:g+="["+A[0]+"]";h="[/"+A[0]+"]"+h;}}else{g+="<"+A[0]+">";h="</"+B+">"+h;}continue;}switch(y[i]){case OPS.COLUMNA_UNICA.LEFT:colSpan2=true;colSpanAlignStyle="style='text-align:left!important'";break;case OPS.COLUMNA_UNICA.CENTER:colSpan2=true;colSpanAlignStyle="style='text-align:center!important'";break;case OPS.COLUMNA_UNICA.RIGHT:colSpan2=true;colSpanAlignStyle="style='text-align:right!important'";break;case OPS.COLUMNA_UNICA.JUSTIFY:colSpan2=true;colSpanAlignStyle="style='text-align:justify!important'";break;case OPS.NOTITLE:f=true;break;case OPS.SHOWGROUP:break;case OPS.ALIGN.LEFT:m.push("text-align:left!important");break;case OPS.ALIGN.CENTER:m.push("text-align:center!important");break;case OPS.ALIGN.RIGHT:m.push("text-align:right!important");break;case OPS.ALIGN.JUSTIFY:m.push("text-align:justify!important");break;case OPS.VALIGN.TOP:m.push("vertical-align:top!important");break;case OPS.VALIGN.MIDDLE:m.push("vertical-align:middle!important");break;case OPS.VALIGN.BOTTOM:m.push("vertical-align:bottom!important");break;case OPS.ALIGN_TITLE.LEFT:k.push("text-align:left!important");break;case OPS.ALIGN_TITLE.CENTER:k.push("text-align:center!important");break;case OPS.ALIGN_TITLE.RIGHT:k.push("text-align:right!important");break;case OPS.ALIGN_TITLE.JUSTIFY:k.push("text-align:justify!important");break;case OPS.VALIGN_TITLE.TOP:k.push("vertical-align:top!important");break;case OPS.VALIGN_TITLE.MIDDLE:k.push("vertical-align:middle!important");break;case OPS.VALIGN_TITLE.BOTTOM:k.push("vertical-align:bottom!important");break;case OPS.FULLURL:p=true;break;case OPS.VALIDAR:q=true;break;default:}}if(m.join(";").length){n=" style='"+m.join(";")+"'";}if(k.join(";").length){l=" style='"+k.join(";")+"'";}if(s==CAMPO.CAPTCHA){continue;}if(x!=undefined){var C=x;if(typeof C==typeof""){claseFila=C;}if(typeof C==typeof[]){var D=C.length;for(var i=0;i<C.length;i++){c[i]=C[i];}}}var E="";if(jQuery.trim(clase_fila_formulario)){E=clase_fila_formulario;}if(jQuery.trim(c[0])){E=jQuery.trim(E)?E+" "+c[0]:c[0];}var F="";if(jQuery.trim(clase_celdaCampo_formulario)){F=clase_celdaCampo_formulario;}if(jQuery.trim(c[1])){F=jQuery.trim(F)?F+" "+c[1]:c[1];}var G="";if(jQuery.trim(clase_celdaDato_formulario)){G=clase_celdaDato_formulario;}if(s==CAMPO.AVATAR){G=jQuery.trim(G)?G+" sf_tdavatar":"sf_tdavatar";}if(jQuery.trim(c[2])){G=jQuery.trim(G)?G+" "+c[2]:c[2];}if(t==TIPO.OPCIONAL_SKIP){var H="";if(s==CAMPO.OPCION){H=jQuery("input[name='"+key+"']:checked").val();}else{if(s==CAMPO.EDAD){var I,me,an;I=jQuery.trim(jQuery("#miFormulario #"+key+"_dia").val());me=jQuery.trim(jQuery("#miFormulario #"+key+"_mes").val());an=jQuery.trim(jQuery("#miFormulario #"+key+"_ano").val());var J=I+me+an;if(J==null||J==undefined||J==""){continue;}}else{if(s==CAMPO.CHECKBOX){var K=[];jQuery("."+getClase(key,"input")+":checked").each(function(){K.push(jQuery(this).val());});H=K==null?"":K.toString();}else{H=jQuery("#miFormulario #"+key).val();}}}if(H==null||H==undefined||jQuery.trim(H)==""){continue;}}if(u!=d){b+="[tr class='"+clase_FilaGrupo+"']";var L=clase_CeldaGrupo;if(d!=GRUPO.NINGUNO&&u==GRUPO.NINGUNO){L=clase_CeldaGrupoCierre;e=false;}else{e=true;}b+="[td colspan=2 class='"+L+"']"+u+"[/td]";b+="[/tr]";d=u;}if(colSpan2){if(!f){b+="[tr class='"+E+"']";b+="[td colspan=2 "+colSpanAlignStyle+" class='"+F+(e?" inGroup":"")+"' "+l+"]"+r+"[/td]";b+="[/tr]";}b+="[tr class='"+E+"'][td class='"+G+(e?" inGroup":"")+"' colspan=2 "+colSpanAlignStyle+n+"]";}else{b+="[tr class='"+E+"']";if(!f){b+="[td class='"+F+(e?" inGroup":"")+"' "+l+"]"+r+"[/td]";}b+="[td class='"+G+(e?" inGroup":"")+"' "+n+"]";}var M=suf__="";M=o+inf1;suf__=inf2+suf;switch(s){case CAMPO.EDAD:var I,me,an;I=pad(jQuery("#miFormulario #"+key+"_dia").val(),2);me=pad(jQuery("#miFormulario #"+key+"_mes").val(),2);an=pad(jQuery("#miFormulario #"+key+"_ano").val(),4);var N="[b][SF_EDAD]"+I+"/"+me+"/"+an+"[/b]";if(I+me+an=="00000000"&&t!=TIPO.OBLIGATORIO){N="";}else{if(parseInt(I)==0||parseInt(I)>31){ERROR_VALIDACION=true;MSG_ERRORES_VALIDACION+="* Wrong day\n";jQuery("#miFormulario #"+key+"_dia").focus();}if(parseInt(me)==0||parseInt(me)>12){ERROR_VALIDACION=true;MSG_ERRORES_VALIDACION+="* Wrong month\n";jQuery("#miFormulario #"+key+"_mes").focus();}if((!anyAge&&parseInt(an)<1900)||parseInt(an)>new Date().getFullYear()){ERROR_VALIDACION=true;MSG_ERRORES_VALIDACION+="* Year out of range\n";jQuery("#miFormulario #"+key+"_ano").focus();}}b+=g+M+N+suf__+h;break;case CAMPO.SEXO:b+=g+M+get_(jQuery("input[name='"+key+"']:checked").val())+suf__+h;break;case CAMPO.FECHA:b+=g+M+jQuery("#miFormulario #"+key).val()+suf__+h;break;case CAMPO.USUARIO:b+=g+M+FA_USUARIO+suf__+h;break;case CAMPO.AVATAR:b+=g+"[img]"+FA_AVATAR+"[/img]"+h;break;case CAMPO.IDUSUARIO:b+=g+M+FA_IDUSUARIO+suf__+h;break;case CAMPO.FUNCION:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.TEXTO:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.NUMERICO:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.AREA_TEXTO:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.DESPLEGABLE:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.LISTA:var O="";if(v!=null&&v[1]!=null&&(typeof v[1]==typeof[])){if(jQuery("input[name='"+key+"']:checked").next("img").length){O="[img]"+jQuery("input[name='"+key+"']:checked").next("img").attr("src")+"[/img] ";}}b+=g+O+M+get_(jQuery("input[name='"+key+"']:checked").val())+suf__+h;break;case CAMPO.CHECKBOX:var K=[];jQuery("."+getClase(key,"input")+":checked").each(function(){K.push(get_(jQuery(this).val()));});b+=g+M+K+suf__+h;break;case CAMPO.OPCION:b+=g+M+get_(jQuery("input[name='"+key+"']:checked").val())+suf__+h;break;case CAMPO.MULTISELECCION:var P=jQuery("#miFormulario #"+key).val();if(P!=null&&P!=undefined){P=P.toString();}b+=g+M+get_(P)+suf__+h;break;case CAMPO.IMAGEN:var Q=get_(jQuery("#miFormulario #"+key).val());if((Q==null||jQuery.trim(Q)=="")&&t!=TIPO.OBLIGATORIO){q=false;}if(q){ERROR_VALIDACION=!isImg(Q,key);}var R=M+Q+suf__;if(jQuery.trim(R)!=""){R="[img]"+R+"[/img]";}b+=g+R+h;break;case CAMPO.URL:var S=get_(jQuery("#miFormulario #"+key).val());if((S==null||jQuery.trim(S)=="")&&t!=TIPO.OBLIGATORIO){q=false;}if(q){ERROR_VALIDACION=!isUrl(S,key);}var T=S;if(!p&&v!=null&&jQuery.trim(v)!=""){T=v;}var U=M+S+suf__;if(jQuery.trim(U)!=""){U="[url="+U+"]"+T+"[/url]";}b+=g+U+h;break;case CAMPO.YOUTUBE:var T=jQuery("#miFormulario #"+key).val();if((T==null||jQuery.trim(T)=="")&&t!=TIPO.OBLIGATORIO){q=false;}var V=get_(youtube_parser(T,key,q));if(jQuery.trim(V)!=""){V="[youtube]"+V+"[/youtube]";}b+=g+V+h;break;default:}b+="[/td][/tr]";}b+="[/table][tr class='"+E+"']
lightningterror
lightningterror
Forumember

Male Posts : 45
Reputation : 5
Language : English

http://hellguards.nice-forum.com/

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by Turbodeif March 19th 2014, 2:55 pm

I'm sorry, I forget one thing:

Search:
Code:

<input type="hidden" name="subject" id="titulo" value="" />

and put this just below:
Code:
             
<input type="hidden" name="username" id="username" value="" />

Try again! Smile
avatar
Turbodeif
New Member

Posts : 11
Reputation : 7
Language : Spanish

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by lightningterror March 19th 2014, 3:53 pm

Works perfectly now  rock  I just have few questions now if it's oke

1. Is it possible to hide the "username" and "topic title" in the topic post because they are shown in there also.
2. Is it possible to add text inputs in the app form under a question instead of being next to it.

Example:
Before:                              
Question: Answer                              

After:
Question:
Answer
lightningterror
lightningterror
Forumember

Male Posts : 45
Reputation : 5
Language : English

http://hellguards.nice-forum.com/

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by Turbodeif March 19th 2014, 6:36 pm

Ok,

I've added a new feature in order to exclude some fields of the published topic

1. Add this code just below of MISCAMPOS["Username"] = ["Username", CAMPO.USUARIO, TIPO.OBLIGATORIO];
Code:

MISOPCIONES["Username"] = [OPS.NOPUBLISH];

2. Do the same with MISCAMPOS["TopicTitle"] = ["Topic Title", CAMPO.TEXTO, TIPO.OBLIGATORIO]; adding this code below:
Code:
MISOPCIONES["TopicTitle"] = [OPS.NOPUBLISH];

3. In your HTML page replace the last part called <!-- SCRIPT MOTOR --> with
Code:

<script>
var SF_VERSION="1.4_en";var FORM_VALIDATED=false;var CAPTCHA_USADO=false;var FA_USUARIO,FA_IDUSUARIO,FA_AVATAR;var TEMA={NORMAL:0,FIJO:1,ANUNCIO:2,GLOBAL:3};var MENSAJE={NUEVO:"newtopic",RESPUESTA:"reply"};var GRUPO=[];GRUPO.NINGUNO="";var SF_PARAMETROS=[];var CAMPO={IDUSUARIO:1,USUARIO:2,AVATAR:3,EDAD:10,SEXO:11,FECHA:12,TEXTO:20,NUMERICO:21,AREA_TEXTO:22,DESPLEGABLE:30,LISTA:31,LISTAIMGS:32,CHECKBOX:33,OPCION:34,MULTISELECCION:35,IMAGEN:40,URL:41,YOUTUBE:42,FUNCION:50,CAPTCHA:100};var TIPO={OPCIONAL:0,OPCIONAL_SKIP:1,OBLIGATORIO:2,INVISIBLE:3};var OPS={NOPLACEHOLDER:1,FULLURL:2,VALIDAR:3,PLACEHOLDER:function(a){return"[PLACEHOLDER]"+a},TIP:function(a){return"[TIP]"+a},COLUMNA_UNICA:{LEFT:10,CENTER:11,RIGHT:12,JUSTIFY:13},NOTITLE:15,NOPUBLISH:16,ALIGN:{LEFT:20,CENTER:21,RIGHT:22,JUSTIFY:23},VALIGN:{TOP:30,MIDDLE:31,BOTTOM:32},ALIGN_TITLE:{LEFT:40,CENTER:41,RIGHT:43,JUSTIFY:43},VALIGN_TITLE:{TOP:50,MIDDLE:51,BOTTOM:52},COLOR:function(a){return"[COLOR]"+a},SIZE:function(a){return"[SIZE]"+a},FONT:function(a){return"[FONT]"+a},WRAP:function(a){return"[WRAP]"+a},PREFIJO:function(a){return"[PREFIJO]"+a},INFIJO:function(a){return"[INFIJO]"+a},SUFIJO:function(a){return"[SUFIJO]"+a}};var PERMITIR_HTML=false;var FORM_INVITADO="Anonymous";var TITULO_FORMULARIO="Mi form";var TITULO_TABLA_PUBLICADA="";var CSS_PREFIX="sf_light_";var clase_tabla_formulario=CSS_PREFIX+"tabla";var clase_cabecera_formulario=CSS_PREFIX+"cabecera";var clase_fila_formulario=CSS_PREFIX+"fila";var clase_celdaCampo_formulario=CSS_PREFIX+"celdaTitulo";var clase_celdaDato_formulario=CSS_PREFIX+"celdaDato";var clase_FilaGrupo="";var clase_CeldaGrupo=CSS_PREFIX+"celdaGrupo";var clase_CeldaGrupoCierre=CSS_PREFIX+"celdaGrupoCierre";var tipoDeTema=TEMA.NORMAL;var tipoDeMensaje=MENSAJE.RESPUESTA;var idForoPublicacion=0;var idTemaPublicacion=0;var AVATAR_DEFECTO="http://i37.servimg.com/u/f37/17/45/19/77/noavat10.png";var anyAge=false;function setParameters(){PERMITIR_HTML=SF_PARAMETROS.PERMITIR_HTML;FORM_INVITADO=SF_PARAMETROS.NOMBRE_INVITADO;TITULO_FORMULARIO=SF_PARAMETROS.TITULO_FORMULARIO;TITULO_TABLA_PUBLICADA=SF_PARAMETROS.TITULO_TABLA_PUBLICADA;CSS_PREFIX=SF_PARAMETROS.CSS_PREFIJO;clase_tabla_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_TABLA;clase_cabecera_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CABECERA;clase_fila_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_FILA;clase_celdaCampo_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CELDACAMPO;clase_celdaDato_formulario=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CELDADATO;clase_FilaGrupo=SF_PARAMETROS.CSS_CLASE_FILAGRUPO;clase_CeldaGrupo=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CELDAGRUPO;clase_CeldaGrupoCierre=CSS_PREFIX+SF_PARAMETROS.CSS_CLASE_CELDAGRUPOCIERRE;tipoDeTema=SF_PARAMETROS.TIPO_TEMA;tipoDeMensaje=SF_PARAMETROS.TIPO_MENSAJE;idForoPublicacion=SF_PARAMETROS.ID_FORO;idTemaPublicacion=SF_PARAMETROS.ID_TEMA;AVATAR_DEFECTO=SF_PARAMETROS.AVATAR_DEFECTO}var MISCAMPOS=[];var MISOPCIONES=[];var IDX={TITULO:0,TIPO:1,REQUERIDO:2,GRUPO:3,VALORES:4,OUTCSS:5,EXTATTRS:6};var DATEPICKER={CLARO:"http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.min.css",OSCURO:"http://code.jquery.com/ui/1.10.3/themes/ui-darkness/jquery-ui.min.css"};var SKIN={CLARO:"light",OSCURO:"dark"};var FA_SF_BASEC={BP:"fasf_"};var FA_SF_C={IN:{CSSPREFIX:{TABLE:FA_SF_BASEC.BP+"table_",TR0:FA_SF_BASEC.BP+"tr0_",TD0:FA_SF_BASEC.BP+"td0_",TR1:FA_SF_BASEC.BP+"tr1_",TD1:FA_SF_BASEC.BP+"td1_",FIELDSET:FA_SF_BASEC.BP+"fieldset_",LEGEND:FA_SF_BASEC.BP+"legend_",LABEL:FA_SF_BASEC.BP+"label_",INPUT:FA_SF_BASEC.BP+"input_",TEXTAREA:FA_SF_BASEC.BP+"textarea_",SELECT:FA_SF_BASEC.BP+"select_",OPTION:FA_SF_BASEC.BP+"option_",IMG:FA_SF_BASEC.BP+"img_"}}};function getGrupo(a){for(keyGrup in GRUPO){if(GRUPO[keyGrup]==a){return keyGrup}}}function getClaseGrupo(a,b){for(keyGrup in GRUPO){if(GRUPO[keyGrup]==a){return FA_SF_C.IN.CSSPREFIX[b.toUpperCase()]+"GRUPO_"+keyGrup}}}function getClaseIDGrupo(a,b){return FA_SF_C.IN.CSSPREFIX[b.toUpperCase()]+"GRUPO_"+a}function getClase(a,b){return FA_SF_C.IN.CSSPREFIX[b.toUpperCase()]+a}function getCookie(a){var b=document.cookie.split(a+"=");if(b.length==2){return b.pop().split(";").shift()}}var _userdata=new Object();function fa_idusuario(){if(!_userdata.hasOwnProperty("user_id")){var a=unescape(getCookie("fa_"+(document.location.hostname).replace(/\./g,"_")+"_data"));if(a!=null&&a!=undefined&&a!="undefined"){try{_userdata.user_id=a.match(/:\"?\d+\"?;/g)[0].replace(/[\":;]/g,"");return _userdata.user_id}catch(err){console.log(err);_userdata.user_id=-1;return-1}}else{_userdata.user_id=-1;return-1}}else{return parseInt(_userdata.user_id)}}function fa_usuario(){if(fa_idusuario()==-1){return FORM_INVITADO}else{if(!_userdata.hasOwnProperty("username")){if(jQuery("a#logout.mainmenu").length){_userdata.username=(jQuery("img#i_icon_mini_logout").attr("alt")||"").replace(/^.*?\[ (.*) \]$/,"$1");return _userdata.username}else{var f=FORM_INVITADO;jQuery.ajaxSetup({async:false});jQuery("#fa_hidden_load").load("/u"+fa_idusuario()+" .mainmenu",function(a){f=(jQuery("#fa_hidden_load img#i_icon_mini_logout").attr("alt")||"").replace(/^.*?\[ (.*) \]$/,"$1")});jQuery.ajaxSetup({async:true});jQuery("#fa_hidden_load").remove();_userdata.username=f;return f}}else{return _userdata.username}}}function fa_urlavatar(){var b=AVATAR_DEFECTO;if(fa_idusuario()>-1){if(_userdata.hasOwnProperty("avatar")){b=jQuery(_userdata.avatar).attr("src")}else{jQuery.ajaxSetup({async:false});jQuery("#fa_hidden_load_avatar").load("/profile?mode=editprofile&page_profil=avatars form[action='/profile'] img",function(a){b=jQuery("#fa_hidden_load_avatar img").attr("src")||b});jQuery.ajaxSetup({async:true});jQuery("#fa_hidden_load_avatar").remove();_userdata.avatar="<img src='"+b+"' />"}}return b}function fa_soystaff_(){if(!_userdata.hasOwnProperty("user_level")){var b=false;jQuery("body").prepend("<span id='fa_hidden_load' style='display:none'>");jQuery.ajaxSetup({async:false});jQuery("#fa_hidden_load").load("/u1 div#profile-advanced-details span.gen>strong, div#profile-advanced-details div.inner>strong, div#profile-advanced-details div.main-content>strong, div#profile-advanced-details div.box-content>strong",function(a){b=!jQuery("#fa_hidden_load").is(":empty")});jQuery.ajaxSetup({async:true});jQuery("#fa_hidden_load").remove();_userdata.user_level=b;return b}else{return _userdata.user_level>0}}function sfDo(){var a="<h2>"+SF_PARAMETROS.TITULO_FORMULARIO+"</h2>";var b="";var c="~";var d="%";var f=false;for(key in MISCAMPOS){var g=MISCAMPOS[key][IDX.TITULO];var h=MISCAMPOS[key][IDX.TIPO];var j=MISCAMPOS[key][IDX.REQUERIDO]==undefined?TIPO.OPCIONAL:MISCAMPOS[key][IDX.REQUERIDO];var k=MISCAMPOS[key][IDX.GRUPO]==undefined?GRUPO.NINGUNO:MISCAMPOS[key][IDX.GRUPO];var l=MISCAMPOS[key][IDX.VALORES]==undefined?["-"]:MISCAMPOS[key][IDX.VALORES];var m=MISCAMPOS[key][IDX.EXTATTRS]==undefined?"":MISCAMPOS[key][IDX.EXTATTRS];var n=MISCAMPOS[key][IDX.OUTCSS]==undefined?"":MISCAMPOS[key][IDX.OUTCSS];var o=getGrupo(k);var p=MISOPCIONES[key];var q="";var tip="";var r=false;for(var i=0;p!=null&&i<p.length;i++){if(/^\[PLACEHOLDER\]/g.test(p[i])){q=p[i].split("[PLACEHOLDER]")[1];continue}if(/^\[TIP\]/g.test(p[i])){tip=" title='"+p[i].split("[TIP]")[1]+"' ";continue}if(p[i]==OPS.NOPLACEHOLDER){r=true;continue}}if(r){q=""}if(j==TIPO.OBLIGATORIO){g+="*"}var s=false;var t="";switch(j){case TIPO.OPCIONAL:t="";break;case TIPO.OPCIONAL_SKIP:t="";break;case TIPO.OBLIGATORIO:if(h!=CAMPO.FUNCION){t="required='required'";if(h==CAMPO.DESPLEGABLE||h==CAMPO.MULTISELECCION){t="required"}}break;case TIPO.INVISIBLE:s=true;t="";break;default:t="";break}d=b;b=k;var u="";var v="";if(s||h==CAMPO.FUNCION){if(h==CAMPO.FUNCION){var w="";u="value=''";try{if(l[0]!=undefined){var x=window[l[0]];if(x!=null){if(l[1]!=undefined){w=x(l[1])}else{w=x()}}u="value='"+w+"'"}}catch(err){console.log("SF_ERR: "+e)}h=CAMPO.TEXTO}else{u="value='"+l+"'"}var v=" style='display:none!important;'"}if(c=="~"){if(b==GRUPO.NINGUNO){f=false;a+="<table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClaseIDGrupo(o,"tr0")+"' "+v+">"}else{a+="<fieldset class='"+getClaseIDGrupo(o,"fieldset")+"'><legend class='"+getClaseIDGrupo(o,"legend")+"'>"+k+"</legend><table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClase(key,"tr0")+"' "+v+">";f=true}}else{if(b==GRUPO.NINGUNO){f=false;if(c==GRUPO.NINGUNO){a+="</tr><tr class='"+getClase(key,"tr1")+"' "+v+">"}else{a+="</tr></table></fieldset><table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClase(key,"tr1")+"' "+v+">"}}else{if(b!=c){if(f){a+="</tr></table></fieldset><fieldset class='"+getClaseIDGrupo(o,"fieldset")+"'><legend class='"+getClaseIDGrupo(o,"legend")+"'>"+k+"</legend><table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClase(key,"tr1")+"' "+v+">"}else{a+="</tr></table><fieldset class='"+getClaseIDGrupo(o,"fieldset")+"'><legend class='"+getClaseIDGrupo(o,"legend")+"'>"+k+"</legend><table class='"+getClaseIDGrupo(o,"table")+"'><tr class='"+getClase(key,"tr1")+"' "+v+">"}}else{a+="</tr><tr class='"+getClase(key,"tr1")+"' "+v+">"}f=true}}if(h!=CAMPO.CAPTCHA){a+="<td class='"+getClase(key,"td0")+(f?" inGroup":"")+"'><label class='"+getClase(key,"label")+"' for='"+key+"'>"+g+"</label></td>"}var y="<td class='"+getClase(key,"td1")+(f?" inGroup":"")+"'>";switch(h){case CAMPO.EDAD:a+=y;a+="Day: <input maxlength='2' class='dia "+getClase(key,"input")+"_dia' type='text' "+u+" name='"+key+"_dia' id='"+key+"_dia' "+t+" "+m+"/>  ";a+="Month: <input maxlength='2' class='mes "+getClase(key,"input")+"_mes' type='text' "+u+" name='"+key+"_mes' id='"+key+"_mes' "+t+" "+m+"/>  ";a+="Year: <input maxlength='4' class='ano "+getClase(key,"input")+"_ano' type='text' "+u+" name='"+key+"_ano' id='"+key+"_ano' "+t+" "+m+"/>";a+="</td>";a+="<script>jQuery('#"+key+"_dia, #"+key+"_mes, #"+key+"_ano').forceNumericOnly();<\/script>";break;case CAMPO.SEXO:a+=y;a+="<input "+tip+" class='"+getClase(key,"input")+"' type='radio' value='Man' name='"+key+"' id='"+(key+"_hombre")+"' "+t+" "+m+" >Man";a+="<input "+tip+" class='"+getClase(key,"input")+"' type='radio' value='Woman' name='"+key+"' id='"+(key+"_mujer")+"' "+t+" "+m+" >Woman";a+="</td>";break;case CAMPO.FECHA:a+=y;a+="<input "+tip+" placeholder='"+q+"' class='fecha "+getClase(key,"input")+"' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";a+="<script>jQuery('#"+key+"').datepicker();<\/script>";break;case CAMPO.IDUSUARIO:FA_IDUSUARIO=fa_idusuario();a+=y;a+="<input class='"+getClase(key,"input")+" sf_idusuario_input' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+" value='"+FA_IDUSUARIO+"' disabled />";a+="</td>";break;case CAMPO.USUARIO:FA_USUARIO=fa_usuario();a+=y;a+="<input class='"+getClase(key,"input")+"' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+" value='"+FA_USUARIO+"' disabled />";a+="</td>";break;case CAMPO.AVATAR:FA_AVATAR=fa_urlavatar();a+=y;a+="<input class='"+getClase(key,"input")+" sf_avatar_input' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+" value='"+FA_AVATAR+"' disabled /> <img src='"+FA_AVATAR+"' width='16' height='16' />";a+="</td>";break;case CAMPO.TEXTO:a+=y;a+="<input "+tip+" placeholder='"+q+"' class='"+getClase(key,"input")+"' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";break;case CAMPO.NUMERICO:a+=y;a+="<input "+tip+" placeholder='"+q+"' class='"+getClase(key,"input")+"' type='text' "+u+" name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";a+="<script>jQuery('#"+key+"').forceNumericOnly();<\/script>";break;case CAMPO.AREA_TEXTO:a+=y;a+="<textarea "+tip+" placeholder='"+q+"' class='"+getClase(key,"textarea")+"' name='"+key+"' "+u+" id='"+key+"' "+t+" "+m+" /></textarea>";a+="</td>";break;case CAMPO.DESPLEGABLE:var z=l;a+=y;a+="<select "+tip+" class='"+getClase(key,"select")+"' name='"+key+"' id='"+key+"' "+t+" "+m+" >";a+="<option class='"+getClase(key,"option")+"' value=''>--- Select ---";var i=0;for(opt in z){a+="<option class='"+getClase(key,"option")+"' value='"+z[opt]+"' id='"+(key+i)+"'>"+z[opt];i++}a+="</select>";a+="</td>";break;case CAMPO.LISTA:var z=l;var A=[];if(l!=null&&l[0]!=null&&(typeof l[0]==typeof[])){z=l[0]}if(l!=null&&l[1]!=null&&(typeof l[1]==typeof[])){A=l[1]}a+="<td class='"+getClase(key,"td1")+"' style='text-align:justify'>";var B="";for(var i=0;i<z.length;i++){imgact=A[i]!=null?"<img src='"+A[i]+"' /> ":"";a+="<input "+tip+" class='"+getClase(key,"input")+"' type='radio' value='"+z[i]+"' name='"+key+"' id='"+(key+i)+"' "+t+" "+m+" >"+imgact+z[i]+"<br>"}a+="</td>";break;case CAMPO.CHECKBOX:var z=l;a+=y;var i=0;for(opt in z){a+="<input "+tip+" class='"+getClase(key,"input")+"' onClick='javascript:reqCheck(\""+(key+i)+'", '+MISCAMPOS[key][2]+")' type='checkbox' value='"+z[opt]+"' name='"+key+"[]' id='"+(key+i)+"' "+t+" "+m+" >"+z[opt];i++}a+="</td>";break;case CAMPO.OPCION:var z=l;a+=y;var i=0;for(opt in z){a+="<input "+tip+" class='"+getClase(key,"input")+"' type='radio' value='"+z[opt]+"' name='"+key+"' id='"+(key+i)+"' "+t+" "+m+" >"+z[opt];i++}a+="</td>";break;case CAMPO.MULTISELECCION:a+=y;a+="<select "+tip+" class='"+getClase(key,"select")+"' multiple "+t+" name='"+key+"' id='"+key+"' >";var z=l;var i=0;for(opt in z){a+="<option class='"+getClase(key,"option")+"' value='"+z[opt]+"' id='"+(key+i)+"' "+m+" >"+z[opt]+"</option>";i++}a+="</select>";a+="</td>";break;case CAMPO.IMAGEN:if(!r&&q==""){q="Image URL"}a+=y;a+="<input "+tip+" class='"+getClase(key,"input")+" fasf_input_img' placeholder='"+q+"' "+u+" type='text' name='"+key+"' id='"+key+"' "+t+" "+m+"/> <img title='Upload image' alt='Upload image' id='sf_img_hosting' src='http://i37.servimg.com/u/f37/17/45/19/77/image_10.png' onclick='openTinypic()' />";a+="</td>";break;case CAMPO.URL:if(!r&&q==""){q="URL address"}a+=y;a+="<input "+tip+" class='"+getClase(key,"input")+"' placeholder='"+q+"' "+u+" type='text' name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";break;case CAMPO.YOUTUBE:if(!r&&q==""){q="Youtube video URL"}a+=y;a+="<input "+tip+" class='"+getClase(key,"input")+"' placeholder='"+q+"' "+u+" type='text' name='"+key+"' id='"+key+"' "+t+" "+m+"/>";a+="</td>";break;case CAMPO.CAPTCHA:if(!CAPTCHA_USADO){a+="<td class='"+getClase(key,"td1")+"' colspan='2'>";a+="<div id='cptch'><span>Verification code: </span><span id='txtahc_tpcaDiv'></span><input type='hidden' id='txtahc_tpca' /> <input type='text' name='txtahc_input' id='txtahc_input' style='width:75px !important' /></div>";a+="</td>";CAPTCHA_USADO=true}break;default:break}c=b}if(b==GRUPO.NINGUNO){a+="</tr></table>"}else{a+="</tr></table></fieldset>"}jQuery("#form_inner_placeholder").html(a);if(CAPTCHA_USADO){setcptchcode()}jQuery("#form_inner_placeholder [title]").tooltip();preProcesoFormulario()}jQuery(function(){if(tipoDeMensaje==MENSAJE.NUEVO){jQuery("#hidden").load("/post?f="+idForoPublicacion+"&mode=newtopic form[action='/post'] input[type='hidden']")}if(SF_PARAMETROS.SKIN_DATEPICKER==DATEPICKER.CLARO){jQuery("link#ui-theme").attr("href",DATEPICKER.CLARO)}else{jQuery("link#ui-theme").attr("href",DATEPICKER.OSCURO)}document.title=TITULO_FORMULARIO;jQuery("#miFormulario").submit(function(e){if(!FORM_VALIDATED){e.preventDefault();return false}})});jQuery(function(a){a.datepicker.regional.es={closeText:"Cerrar",prevText:"<Ant",nextText:"Sig>",currentText:"Hoy",monthNames:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthNamesShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],dayNames:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],dayNamesShort:["Dom","Lun","Mar","Mié","Juv","Vie","Sáb"],dayNamesMin:["Do","Lu","Ma","Mi","Ju","Vi","Sá"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:false,showMonthAfterYear:false,yearSuffix:""};a.datepicker.setDefaults(jQuery.datepicker.regional.en)});function reqCheck(a,b){if(b){var c=jQuery("#"+a).attr("name");var d=false;jQuery("input[type='checkbox'][name='"+c+"']").each(function(){if(jQuery(this).is(":checked")){d=true}});if(d){jQuery("input[type='checkbox'][name='"+c+"']").removeAttr("required")}else{jQuery("input[type='checkbox'][name='"+c+"']").attr("required","required")}}}var colSpanAlignStyle="style='text-align:center!important'";var ERROR_VALIDACION=false;var MSG_ERRORES_VALIDACION="Validation errors:\n\n";var bbcodes=["b","i","u","quote","code","list","img","url","scroll","fade","blur","flipv","fliph","updown","center","right","strike","flash","hide","spoiler","wow","justify","sub","sup","left","hr"];function procesarFormulario(){ERROR_VALIDACION=false;MSG_ERRORES_VALIDACION="Validation errors:\n\n";if(typeof(preProcesoFormulario2)!="undefined"){preProcesoFormulario2()}var b="[table class='"+clase_tabla_formulario+" sf_table']";if(jQuery.trim(TITULO_TABLA_PUBLICADA).length){b+="[tr class='"+clase_cabecera_formulario+"'][td colspan=2]"+TITULO_TABLA_PUBLICADA+"[/td][/tr]"}var c=["","",""];var d=GRUPO.NINGUNO;var e=false;for(key in MISCAMPOS){c=["","",""];colSpan2=false;var f=false;var nopublish=false;var g="";var h="";var j="";var k=[];var l="";var m=[];var n="";var o=inf1=inf2=suf="";var p=false;var q=false;var r=MISCAMPOS[key][IDX.TITULO];var s=MISCAMPOS[key][IDX.TIPO];var t=MISCAMPOS[key][IDX.REQUERIDO]==undefined?TIPO.OPCIONAL:MISCAMPOS[key][IDX.REQUERIDO];var u=MISCAMPOS[key][IDX.GRUPO]==undefined?GRUPO.NINGUNO:MISCAMPOS[key][IDX.GRUPO];var v=MISCAMPOS[key][IDX.VALORES]==undefined?[""]:MISCAMPOS[key][IDX.VALORES];var w=MISCAMPOS[key][IDX.EXTATTRS]==undefined?"":MISCAMPOS[key][IDX.EXTATTRS];var x=MISCAMPOS[key][IDX.OUTCSS]==undefined?"":MISCAMPOS[key][IDX.OUTCSS];var y=MISOPCIONES[key];for(var i=0;y!=null&&i<y.length;i++){if(/^\[PREFIJO\]/g.test(y[i])){o+=y[i].split("[PREFIJO]")[1];continue}if(/^\[INFIJO\]/g.test(y[i])){inf1+=y[i].split("[INFIJO]")[1].split("|")[0]||"";inf2+=y[i].split("[INFIJO]")[1].split("|")[1]||"";continue}if(/^\[SUFIJO\]/g.test(y[i])){suf+=y[i].split("[SUFIJO]")[1];continue}if(/^\[COLOR\]/g.test(y[i])){g+="[color="+y[i].split("[COLOR]")[1]+"]";h="[/color]"+h;continue}if(/^\[SIZE\]/g.test(y[i])){g+="[size="+y[i].split("[SIZE]")[1]+"]";h="[/size]"+h;continue}if(/^\[FONT\]/g.test(y[i])){g+="[font="+y[i].split("[FONT]")[1]+"]";h="[/font]"+h;continue}if(/^\[WRAP\]/g.test(y[i])){var z=(y[i].split("[WRAP]")[1]).toLowerCase();var A=[];A[0]=z;var B=z.substring(0,(z.indexOf(" ")==-1?z.length:z.indexOf(" ")));if(z.indexOf(",")>=0){A=z.split(",")}if(jQuery.inArray(A[0],bbcodes)>=0){switch(A[0]){case"img":if(A[1]!=undefined&&A[2]!=undefined){g+="[img("+A[1]+"px,"+A[2]+"px)]";h="[/img]"+h}else{g+="[img]";h="[/img]"+h}break;case"spoiler":g+="[spoiler"+(A[1]==undefined?"":'="'+A[1]+'"')+"]";h="[/spoiler]"+h;break;case"quote":g+="[quote"+(A[1]==undefined?"":'="'+A[1]+'"')+"]";h="[/quote]"+h;break;case"url":g+="[url"+(A[1]==undefined?"":'="'+A[1]+'"')+"]";h="[/url]"+h;break;case"list":g+="[list][*]";h="[/list]"+h;break;case"flash":g+="[flash("+(A[1]==undefined?"500":A[1])+","+(A[2]==undefined?"500":A[2])+")]";h="[/flash]"+h;break;default:g+="["+A[0]+"]";h="[/"+A[0]+"]"+h}}else{g+="<"+A[0]+">";h="</"+B+">"+h}continue}switch(y[i]){case OPS.COLUMNA_UNICA.LEFT:colSpan2=true;colSpanAlignStyle="style='text-align:left!important'";break;case OPS.COLUMNA_UNICA.CENTER:colSpan2=true;colSpanAlignStyle="style='text-align:center!important'";break;case OPS.COLUMNA_UNICA.RIGHT:colSpan2=true;colSpanAlignStyle="style='text-align:right!important'";break;case OPS.COLUMNA_UNICA.JUSTIFY:colSpan2=true;colSpanAlignStyle="style='text-align:justify!important'";break;case OPS.NOTITLE:f=true;break;case OPS.NOPUBLISH:nopublish=true;break;case OPS.SHOWGROUP:break;case OPS.ALIGN.LEFT:m.push("text-align:left!important");break;case OPS.ALIGN.CENTER:m.push("text-align:center!important");break;case OPS.ALIGN.RIGHT:m.push("text-align:right!important");break;case OPS.ALIGN.JUSTIFY:m.push("text-align:justify!important");break;case OPS.VALIGN.TOP:m.push("vertical-align:top!important");break;case OPS.VALIGN.MIDDLE:m.push("vertical-align:middle!important");break;case OPS.VALIGN.BOTTOM:m.push("vertical-align:bottom!important");break;case OPS.ALIGN_TITLE.LEFT:k.push("text-align:left!important");break;case OPS.ALIGN_TITLE.CENTER:k.push("text-align:center!important");break;case OPS.ALIGN_TITLE.RIGHT:k.push("text-align:right!important");break;case OPS.ALIGN_TITLE.JUSTIFY:k.push("text-align:justify!important");break;case OPS.VALIGN_TITLE.TOP:k.push("vertical-align:top!important");break;case OPS.VALIGN_TITLE.MIDDLE:k.push("vertical-align:middle!important");break;case OPS.VALIGN_TITLE.BOTTOM:k.push("vertical-align:bottom!important");break;case OPS.FULLURL:p=true;break;case OPS.VALIDAR:q=true;break;default:}}if(m.join(";").length){n=" style='"+m.join(";")+"'"}if(k.join(";").length){l=" style='"+k.join(";")+"'"}if(s==CAMPO.CAPTCHA){continue}if(x!=undefined){var C=x;if(typeof C==typeof""){claseFila=C}if(typeof C==typeof[]){var D=C.length;for(var i=0;i<C.length;i++){c[i]=C[i]}}}var E="";if(jQuery.trim(clase_fila_formulario)){E=clase_fila_formulario}if(jQuery.trim(c[0])){E=jQuery.trim(E)?E+" "+c[0]:c[0]}var F="";if(jQuery.trim(clase_celdaCampo_formulario)){F=clase_celdaCampo_formulario}if(jQuery.trim(c[1])){F=jQuery.trim(F)?F+" "+c[1]:c[1]}var G="";if(jQuery.trim(clase_celdaDato_formulario)){G=clase_celdaDato_formulario}if(s==CAMPO.AVATAR){G=jQuery.trim(G)?G+" sf_tdavatar":"sf_tdavatar"}if(jQuery.trim(c[2])){G=jQuery.trim(G)?G+" "+c[2]:c[2]}if(t==TIPO.OPCIONAL_SKIP){var H="";if(s==CAMPO.OPCION){H=jQuery("input[name='"+key+"']:checked").val()}else{if(s==CAMPO.EDAD){var I,me,an;I=jQuery.trim(jQuery("#miFormulario #"+key+"_dia").val());me=jQuery.trim(jQuery("#miFormulario #"+key+"_mes").val());an=jQuery.trim(jQuery("#miFormulario #"+key+"_ano").val());var J=I+me+an;if(J==null||J==undefined||J==""){continue}}else{if(s==CAMPO.CHECKBOX){var K=[];jQuery("."+getClase(key,"input")+":checked").each(function(){K.push(jQuery(this).val())});H=K==null?"":K.toString()}else{H=jQuery("#miFormulario #"+key).val()}}}if(H==null||H==undefined||jQuery.trim(H)==""){continue}}if(!nopublish){if(u!=d){b+="[tr class='"+clase_FilaGrupo+"']";var L=clase_CeldaGrupo;if(d!=GRUPO.NINGUNO&&u==GRUPO.NINGUNO){L=clase_CeldaGrupoCierre;e=false}else{e=true}b+="[td colspan=2 class='"+L+"']"+u+"[/td]";b+="[/tr]";d=u}if(colSpan2){if(!f){b+="[tr class='"+E+"']";b+="[td colspan=2 "+colSpanAlignStyle+" class='"+F+(e?" inGroup":"")+"' "+l+"]"+r+"[/td]";b+="[/tr]"}b+="[tr class='"+E+"'][td class='"+G+(e?" inGroup":"")+"' colspan=2 "+colSpanAlignStyle+n+"]"}else{b+="[tr class='"+E+"']";if(!f){b+="[td class='"+F+(e?" inGroup":"")+"' "+l+"]"+r+"[/td]"}b+="[td class='"+G+(e?" inGroup":"")+"' "+n+"]"}var M=suf__="";M=o+inf1;suf__=inf2+suf;switch(s){case CAMPO.EDAD:var I,me,an;I=pad(jQuery("#miFormulario #"+key+"_dia").val(),2);me=pad(jQuery("#miFormulario #"+key+"_mes").val(),2);an=pad(jQuery("#miFormulario #"+key+"_ano").val(),4);var N="[b][SF_EDAD]"+I+"/"+me+"/"+an+"[/b]";if(I+me+an=="00000000"&&t!=TIPO.OBLIGATORIO){N=""}else{if(parseInt(I)==0||parseInt(I)>31){ERROR_VALIDACION=true;MSG_ERRORES_VALIDACION+="* Wrong day\n";jQuery("#miFormulario #"+key+"_dia").focus()}if(parseInt(me)==0||parseInt(me)>12){ERROR_VALIDACION=true;MSG_ERRORES_VALIDACION+="* Wrong month\n";jQuery("#miFormulario #"+key+"_mes").focus()}if((!anyAge&&parseInt(an)<1900)||parseInt(an)>new Date().getFullYear()){ERROR_VALIDACION=true;MSG_ERRORES_VALIDACION+="* Year out of range\n";jQuery("#miFormulario #"+key+"_ano").focus()}}b+=g+M+N+suf__+h;break;case CAMPO.SEXO:b+=g+M+get_(jQuery("input[name='"+key+"']:checked").val())+suf__+h;break;case CAMPO.FECHA:b+=g+M+jQuery("#miFormulario #"+key).val()+suf__+h;break;case CAMPO.USUARIO:b+=g+M+FA_USUARIO+suf__+h;break;case CAMPO.AVATAR:b+=g+"[img]"+FA_AVATAR+"[/img]"+h;break;case CAMPO.IDUSUARIO:b+=g+M+FA_IDUSUARIO+suf__+h;break;case CAMPO.FUNCION:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.TEXTO:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.NUMERICO:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.AREA_TEXTO:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.DESPLEGABLE:b+=g+M+get_(jQuery("#miFormulario #"+key).val())+suf__+h;break;case CAMPO.LISTA:var O="";if(v!=null&&v[1]!=null&&(typeof v[1]==typeof[])){if(jQuery("input[name='"+key+"']:checked").next("img").length){O="[img]"+jQuery("input[name='"+key+"']:checked").next("img").attr("src")+"[/img] "}}b+=g+O+M+get_(jQuery("input[name='"+key+"']:checked").val())+suf__+h;break;case CAMPO.CHECKBOX:var K=[];jQuery("."+getClase(key,"input")+":checked").each(function(){K.push(get_(jQuery(this).val()))});b+=g+M+K+suf__+h;break;case CAMPO.OPCION:b+=g+M+get_(jQuery("input[name='"+key+"']:checked").val())+suf__+h;break;case CAMPO.MULTISELECCION:var P=jQuery("#miFormulario #"+key).val();if(P!=null&&P!=undefined){P=P.toString()}b+=g+M+get_(P)+suf__+h;break;case CAMPO.IMAGEN:var Q=get_(jQuery("#miFormulario #"+key).val());if((Q==null||jQuery.trim(Q)=="")&&t!=TIPO.OBLIGATORIO){q=false}if(q){ERROR_VALIDACION=!isImg(Q,key)}var R=M+Q+suf__;if(jQuery.trim(R)!=""){R="[img]"+R+"[/img]"}b+=g+R+h;break;case CAMPO.URL:var S=get_(jQuery("#miFormulario #"+key).val());if((S==null||jQuery.trim(S)=="")&&t!=TIPO.OBLIGATORIO){q=false}if(q){ERROR_VALIDACION=!isUrl(S,key)}var T=S;if(!p&&v!=null&&jQuery.trim(v)!=""){T=v}var U=M+S+suf__;if(jQuery.trim(U)!=""){U="[url="+U+"]"+T+"[/url]"}b+=g+U+h;break;case CAMPO.YOUTUBE:var T=jQuery("#miFormulario #"+key).val();if((T==null||jQuery.trim(T)=="")&&t!=TIPO.OBLIGATORIO){q=false}var V=get_(youtube_parser(T,key,q));if(jQuery.trim(V)!=""){V="[youtube]"+V+"[/youtube]"}b+=g+V+h;break;default:}b+="[/td][/tr]"}}b+="[/table]";jQuery("input#cuerpo").attr("value",b);if(tipoDeMensaje==MENSAJE.RESPUESTA){jQuery.ajaxSetup({async:false});jQuery("#hidden_inputs").load("/post?t="+idTemaPublicacion+"&mode=reply form[action='/post'] input[type='hidden']");jQuery.ajaxSetup({async:true})}else{var W,auth2;jQuery("#hidden").find("input[name='auth[]']").each(function(a){if(a==0){W=jQuery(this).attr("value")}if(a==1){auth2=jQuery(this).attr("value")}});jQuery("input#mode").attr("value",tipoDeMensaje);jQuery("input#auth1").attr("value",W);jQuery("input#auth2").attr("value",auth2);jQuery("input#f_o_t").attr("name","f");jQuery("input#f_o_t").attr("value",idForoPublicacion);jQuery("input#topictype").attr("value",tipoDeTema)}jQuery("input#titulo").val(TITULO_FORMULARIO);if(CAPTCHA_USADO){FORM_VALIDATED=chk_ek_c_frm(jQuery("#miFormulario"))&&!ERROR_VALIDACION}else{FORM_VALIDATED=true&&!ERROR_VALIDACION}if(ERROR_VALIDACION){alert(MSG_ERRORES_VALIDACION)}postProcesoFormulario(FORM_VALIDATED)}function get_(a){if(a==null||a==undefined){return""}if(!PERMITIR_HTML){return a.replace(/<(?:.|\n)*?>/gm,"")}else{return a}}function isUrl(s,a){var b=/(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;var c=b.test(s);if(!c){MSG_ERRORES_VALIDACION+="* Not a valid URL address\n";jQuery("#miFormulario #"+a).focus()}return c}function youtube_parser(a,b,c){var d=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;var e=(a==null?null:a.match(d));if(e&&e[7].length==11){return"http://www.youtube.com/watch?v="+e[7]}else{if(c){MSG_ERRORES_VALIDACION+="* Not a valid Youtube URL\n";jQuery("#miFormulario #"+b).focus();ERROR_VALIDACION=true}}}function isImg(s,a){var b=(s!=null&&(s.match(/^(https?):\/\/.*(jpg|jpeg|png|gif|bmp)$/gi)!=null));if(!b){MSG_ERRORES_VALIDACION+="* Not a valid image URL\n";jQuery("#miFormulario #"+a).focus()}return b}jQuery.fn.forceNumericOnly=function(){return this.each(function(){jQuery(this).keydown(function(e){var a=e.charCode||e.keyCode||0;return(a==8||a==9||a==46||a==110||a==190||(a>=35&&a<=40)||(a>=48&&a<=57)||(a>=96&&a<=105))})})};function pad(a,b){return a.length<b?pad("0"+a,b):a}var _0x503f=["\x72\x61\x6E\x64\x6F\x6D","\x63\x65\x69\x6C","","\x76\x61\x6C\x75\x65","\x74\x78\x74\x61\x68\x63\x5F\x74\x70\x63\x61","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x74\x78\x74\x61\x68\x63\x5F\x74\x70\x63\x61\x44\x69\x76","\x76\x61\x6C","\x23\x6D\x69\x46\x6F\x72\x6D\x75\x6C\x61\x72\x69\x6F\x20\x23\x74\x78\x74\x61\x68\x63\x5F\x69\x6E\x70\x75\x74","\x56\x65\x72\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x20\x63\x6F\x64\x65\x20\x69\x73\x20\x65\x6D\x70\x74\x79","\x56\x65\x72\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x20\x63\x6F\x64\x65\x20\x69\x73\x20\x69\x6E\x63\x6F\x72\x72\x65\x63\x74","\x66\x6F\x63\x75\x73","\x23\x74\x78\x74\x61\x68\x63\x5F\x69\x6E\x70\x75\x74","\x74\x78\x74\x61\x68\x63\x5F\x69\x6E\x70\x75\x74","\x6A\x6F\x69\x6E","\x20","\x73\x70\x6C\x69\x74"];function setcptchcode(){var a=Math[_0x503f[1]](Math[_0x503f[0]]()*9)+_0x503f[2];var b=Math[_0x503f[1]](Math[_0x503f[0]]()*9)+_0x503f[2];var c=Math[_0x503f[1]](Math[_0x503f[0]]()*9)+_0x503f[2];var d=Math[_0x503f[1]](Math[_0x503f[0]]()*9)+_0x503f[2];var e=Math[_0x503f[1]](Math[_0x503f[0]]()*9)+_0x503f[2];var f=a+b+c+d+e;document[_0x503f[5]](_0x503f[4])[_0x503f[3]]=f;document[_0x503f[5]](_0x503f[7])[_0x503f[6]]=f}function chk_ek_c_frm(a){var b=_0x503f[2];if(jQuery(_0x503f[9])[_0x503f[8]]()==_0x503f[2]){b+=_0x503f[10]}if(jQuery(_0x503f[9])[_0x503f[8]]()!=_0x503f[2]){if(validCptch(jQuery(_0x503f[9])[_0x503f[8]]())==false){b+=_0x503f[11]}}if(b!=_0x503f[2]){alert(b);jQuery(_0x503f[13])[_0x503f[12]]();return false}return true}function validCptch(){var a=rmvspces(document[_0x503f[5]](_0x503f[4])[_0x503f[3]]);var b=rmvspces(document[_0x503f[5]](_0x503f[14])[_0x503f[3]]);if(a==b){return true}else{return false}}function rmvspces(a){return a[_0x503f[17]](_0x503f[16])[_0x503f[15]](_0x503f[2])}
</script>

Referring to your last question, append this code to the CSS part of your HTML page
Code:

form#miFormulario td {
    float: left;
}
td[class^="fasf_td0_"] {
    text-align: center;
    width: 100%;
}
td[class^="fasf_td1_"] {
    width: 100%;
}

Then, your app form will look like this:
Html page with a button to post a new thread.  - Page 2 Hellgu10

Regards and excuse my english Smile
avatar
Turbodeif
New Member

Posts : 11
Reputation : 7
Language : Spanish

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by lightningterror March 19th 2014, 8:31 pm

Now it's excellent Smile

Btw i just noticed , shouldn't you change the end tag on
Code:
<link id="ui-theme" rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.min.css">
like this
Code:
<link id="ui-theme" rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.min.css" />
?

Other than that i think this tutorial is now perfect , don't forget to update it on the main site Smile


EDIT: Ok so the App form works fine now , however I have another problem , it's with the posted topic , if the answer of a question is too big , it pushes and forces a question to be on more rows , however an answer doesn't appear on more than one row , and it also increases the forum width of the forum which i don't want to happen.

What i wanna know is how to make the answer be on more than one row automatically if it's too long , and i also want both questions and answers to be equal or something , let's say width for questions 30% and 70% for answers of the topic.
lightningterror
lightningterror
Forumember

Male Posts : 45
Reputation : 5
Language : English

http://hellguards.nice-forum.com/

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by Pizza Boi March 20th 2014, 6:04 am

lightningterror wrote:Now it's excellent Smile

Btw i just noticed , shouldn't you change the end tag on
Code:
<link id="ui-theme" rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.min.css">
like this
Code:
<link id="ui-theme" rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.min.css" />
?

Other than that i think this tutorial is now perfect , don't forget to update it on the main site Smile


EDIT: Ok so the App form works fine now , however I have another problem , it's with the posted topic , if the answer of a question is too big , it pushes and forces a question to be on more rows , however an answer doesn't  appear on more than one row , and it also increases the forum width of the forum which i don't want to happen.

What i wanna know is how to make the answer be on more than one row automatically if it's too long , and i also want both questions and answers to be equal or something , let's say width for questions 30% and 70% for answers of the topic.

Hi Very Happy

Why don't you just put in the title to input <br /> for a line break whenever they reach the end of the white box? Or in the form, you can input an example above and on the form, etc.

Regards,
Pizza Boi
Pizza Boi
Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by Turbodeif March 20th 2014, 10:35 am

Hello,

Yes, best if you put the end tag Smile

About too long questions deforming your forum width, it's easy to fix by CSS. Go to Administrator Panel->Display->Colors->CSS Style Sheet and search the rule .sf_light_celdaTitulo and .sf_dark_celdaTitulo, and edit the white-space property to normal value. Moreover, you can edit the width of the questions column of the table:

Code:

.sf_dark_celdaTitulo {    
 border-bottom: 1px solid black;
 border-right: 1px solid black;
 font-weight: bold;
 margin-right: 10px;
 padding-right: 20px;
 white-space: normal; /* The white-space property specifies how white-space inside an element is handled. Turn to normal*/
 width: 35%; /* Width for the questions column of the posted topic */
}

EDIT: Could be interesting to take a look at these options (MISOPCIONES): OPS.COLUMNA_UNICA.CENTER, OPS.COLUMNA_UNICA.RIGHT, OPS.COLUMNA_UNICA.JUSTIFY. Separates the title (question) and the value (answer) of a published field to place both items in separate rows occupying the entire width (the two columns of the table published in the topic post).

Regards
avatar
Turbodeif
New Member

Posts : 11
Reputation : 7
Language : Spanish

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by RsS.YuGi March 21st 2014, 1:27 pm

Turbodeif a GREAT thank to you and your awesome helping to me and everyone else in here.
You've for sure answered the questions of many in this thread, I appreciate your help so much, thank you tons.

I Was gonna ask to lock this since it's solved, but I've got one last question
Can I make the topic title post as what's input to it to the form but then auto adding the username of the poster next to it? or any trick around that would do xD OR BETTER just making the thread title auto post "something"_username of the poster

o.O that would be just perfect.
RsS.YuGi
RsS.YuGi
Forumember

Male Posts : 120
Reputation : 4
Language : English
Location : Palestine

http://resurrectionacademy.org

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by Turbodeif March 21st 2014, 2:13 pm

You are welcome, I'm glad I could help.

Yes, you can append the username to the topic title easily. In response to your previous query:

Code:

function preProcesoFormulario2(){
      TITULO_FORMULARIO = jQuery("#TopicTitle").val() + "_" + fa_usuario();
}

Regards
avatar
Turbodeif
New Member

Posts : 11
Reputation : 7
Language : Spanish

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by Rhino.Freak March 21st 2014, 3:27 pm

Wow. I read through all this and just popped in to say thanks to Turbodeif ! You made me learn a new trick, thanx a lot for support Very Happy

Edit : 1 question.. I saw that before we can make post sticky global etc, and in any forum of choice.. but will it work if user is NOT allowed to view that section or aallowed to create sticky etc. WHat would happeb then?
Rhino.Freak
Rhino.Freak
Helper
Helper

Male Posts : 1248
Reputation : 104
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by lightningterror March 22nd 2014, 3:55 pm

Hmm there seems to be some problem with the "CAMPO.DESPLEGABLE" where you select an answer out of several choices , the whole selected answer is not copied , only part of it.

Everything is works perfectly and it's awesome Smile
lightningterror
lightningterror
Forumember

Male Posts : 45
Reputation : 5
Language : English

http://hellguards.nice-forum.com/

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by Turbodeif March 23rd 2014, 9:35 am

Rhino.Freak wrote:I saw that before we can make post sticky global etc, and in any forum of choice.. but will it work if user is NOT allowed to view that section or aallowed to create sticky etc.  WHat would happeb then?

Hi,

If user is not allowed to view the section, a prompt for login will appear. All other security rules of your forum will be respected. Don't worry about.

lightningterror wrote:Hmm there seems to be some problem with the "CAMPO.DESPLEGABLE" where you select an answer out of several choices , the whole selected answer is not copied , only part of it.

When you use the 5th parameter, ensure replace single quotes with Html page with a button to post a new thread.  - Page 2 Firesh15
Example:
Code:

"Yes 100 % I&quot;ll be there, gonna give my [Language] for The Alliance!"
 

Regards
avatar
Turbodeif
New Member

Posts : 11
Reputation : 7
Language : Spanish

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by lightningterror March 23rd 2014, 10:39 pm

Awesome , I guess the App form is complete now  cheers
lightningterror
lightningterror
Forumember

Male Posts : 45
Reputation : 5
Language : English

http://hellguards.nice-forum.com/

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by RsS.YuGi March 25th 2014, 7:48 pm

Great thanks to Turbodeif, he's been extremely helpful to me and a lot of other people in this thread.
This's solved dear staff.
=)

RsS.YuGi
RsS.YuGi
Forumember

Male Posts : 120
Reputation : 4
Language : English
Location : Palestine

http://resurrectionacademy.org

Back to top Go down

Solved Re: Html page with a button to post a new thread.

Post by SLGray March 25th 2014, 9:25 pm

Problem solved & topic archived.


Html page with a button to post a new thread.  - Page 2 Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51453
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Page 2 of 2 Previous  1, 2

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum